@wordpress/block-editor 14.3.6 → 14.5.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 (953) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +6 -2
  3. package/build/autocompleters/block.js.map +1 -1
  4. package/build/autocompleters/link.js +2 -1
  5. package/build/autocompleters/link.js.map +1 -1
  6. package/build/components/background-image-control/index.js +1 -1
  7. package/build/components/background-image-control/index.js.map +1 -1
  8. package/build/components/block-actions/index.js +1 -13
  9. package/build/components/block-actions/index.js.map +1 -1
  10. package/build/components/block-controls/slot.js.map +1 -1
  11. package/build/components/block-controls/slot.native.js.map +1 -1
  12. package/build/components/block-draggable/draggable-chip.js +1 -1
  13. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  14. package/build/components/block-inspector/index.js +56 -75
  15. package/build/components/block-inspector/index.js.map +1 -1
  16. package/build/components/block-list/block-invalid-warning.native.js +1 -1
  17. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  18. package/build/components/block-list/block-list-item.native.js.map +1 -1
  19. package/build/components/block-list/block.js +5 -16
  20. package/build/components/block-list/block.js.map +1 -1
  21. package/build/components/block-list/index.js +6 -8
  22. package/build/components/block-list/index.js.map +1 -1
  23. package/build/components/block-list/index.native.js.map +1 -1
  24. package/build/components/block-list/use-block-props/index.js +3 -8
  25. package/build/components/block-list/use-block-props/index.js.map +1 -1
  26. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +14 -6
  27. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  28. package/build/components/block-list/use-in-between-inserter.js +5 -3
  29. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  30. package/build/components/block-list/zoom-out-separator.js +24 -13
  31. package/build/components/block-list/zoom-out-separator.js.map +1 -1
  32. package/build/components/block-lock/modal.js +1 -1
  33. package/build/components/block-lock/modal.js.map +1 -1
  34. package/build/components/block-mover/button.js.map +1 -1
  35. package/build/components/block-navigation/dropdown.js +2 -4
  36. package/build/components/block-navigation/dropdown.js.map +1 -1
  37. package/build/components/block-parent-selector/index.js +14 -11
  38. package/build/components/block-parent-selector/index.js.map +1 -1
  39. package/build/components/block-pattern-setup/index.js.map +1 -1
  40. package/build/components/block-pattern-setup/setup-toolbar.js +10 -20
  41. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  42. package/build/components/block-patterns-list/index.js.map +1 -1
  43. package/build/components/block-patterns-paging/index.js +11 -13
  44. package/build/components/block-patterns-paging/index.js.map +1 -1
  45. package/build/components/block-popover/index.js +45 -2
  46. package/build/components/block-popover/index.js.map +1 -1
  47. package/build/components/block-preview/auto.js +1 -4
  48. package/build/components/block-preview/auto.js.map +1 -1
  49. package/build/components/block-preview/index.js.map +1 -1
  50. package/build/components/block-quick-navigation/index.js +2 -4
  51. package/build/components/block-quick-navigation/index.js.map +1 -1
  52. package/build/components/block-rename/modal.js +2 -2
  53. package/build/components/block-rename/modal.js.map +1 -1
  54. package/build/components/block-settings-menu/block-parent-selector-menu-item.js +1 -1
  55. package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  56. package/build/components/block-settings-menu/block-settings-dropdown.js +79 -76
  57. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  58. package/build/components/block-settings-menu-controls/index.js +1 -6
  59. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  60. package/build/components/block-switcher/block-transformations-menu.native.js +1 -1
  61. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  62. package/build/components/block-switcher/index.js +19 -15
  63. package/build/components/block-switcher/index.js.map +1 -1
  64. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  65. package/build/components/block-switcher/use-transformed-patterns.js +1 -0
  66. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  67. package/build/components/block-switcher/utils.js +1 -0
  68. package/build/components/block-switcher/utils.js.map +1 -1
  69. package/build/components/block-toolbar/index.js +16 -19
  70. package/build/components/block-toolbar/index.js.map +1 -1
  71. package/build/components/block-toolbar/use-has-block-toolbar.js +3 -5
  72. package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  73. package/build/components/block-tools/index.js +8 -18
  74. package/build/components/block-tools/index.js.map +1 -1
  75. package/build/components/block-tools/insertion-point.js +1 -4
  76. package/build/components/block-tools/insertion-point.js.map +1 -1
  77. package/build/components/block-tools/use-show-block-tools.js +8 -7
  78. package/build/components/block-tools/use-show-block-tools.js.map +1 -1
  79. package/build/components/block-tools/zoom-out-mode-inserter-button.js +1 -12
  80. package/build/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -1
  81. package/build/components/block-tools/zoom-out-mode-inserters.js +14 -17
  82. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  83. package/build/components/block-tools/zoom-out-popover.js +3 -2
  84. package/build/components/block-tools/zoom-out-popover.js.map +1 -1
  85. package/build/components/block-tools/zoom-out-toolbar.js +5 -32
  86. package/build/components/block-tools/zoom-out-toolbar.js.map +1 -1
  87. package/build/components/block-types-list/index.js.map +1 -1
  88. package/build/components/block-types-list/index.native.js.map +1 -1
  89. package/build/components/block-variation-transforms/index.js +3 -2
  90. package/build/components/block-variation-transforms/index.js.map +1 -1
  91. package/build/components/border-radius-control/index.js.map +1 -1
  92. package/build/components/border-radius-control/utils.js.map +1 -1
  93. package/build/components/button-block-appender/index.js.map +1 -1
  94. package/build/components/color-style-selector/index.js.map +1 -1
  95. package/build/components/colors/utils.js.map +1 -1
  96. package/build/components/colors/with-colors.js.map +1 -1
  97. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  98. package/build/components/date-format-picker/index.js +1 -0
  99. package/build/components/date-format-picker/index.js.map +1 -1
  100. package/build/components/duotone/utils.js.map +1 -1
  101. package/build/components/duotone-control/index.js.map +1 -1
  102. package/build/components/font-sizes/fluid-utils.js.map +1 -1
  103. package/build/components/font-sizes/utils.js.map +1 -1
  104. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  105. package/build/components/global-styles/border-panel.js +1 -1
  106. package/build/components/global-styles/border-panel.js.map +1 -1
  107. package/build/components/global-styles/color-panel.js +1 -1
  108. package/build/components/global-styles/color-panel.js.map +1 -1
  109. package/build/components/global-styles/dimensions-panel.js +3 -3
  110. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  111. package/build/components/global-styles/filters-panel.js.map +1 -1
  112. package/build/components/global-styles/get-block-css-selector.js.map +1 -1
  113. package/build/components/global-styles/get-global-styles-changes.js +2 -1
  114. package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
  115. package/build/components/global-styles/hooks.js.map +1 -1
  116. package/build/components/global-styles/typography-panel.js.map +1 -1
  117. package/build/components/global-styles/use-global-styles-context.native.js.map +1 -1
  118. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  119. package/build/components/global-styles/utils.js.map +1 -1
  120. package/build/components/gradients/use-gradient.js.map +1 -1
  121. package/build/components/grid/grid-item-movers.js.map +1 -1
  122. package/build/components/grid/grid-visualizer.js.map +1 -1
  123. package/build/components/iframe/index.js +44 -9
  124. package/build/components/iframe/index.js.map +1 -1
  125. package/build/components/image-editor/use-save-image.js +1 -1
  126. package/build/components/image-editor/use-save-image.js.map +1 -1
  127. package/build/components/inner-blocks/index.js +1 -9
  128. package/build/components/inner-blocks/index.js.map +1 -1
  129. package/build/components/inner-blocks/use-nested-settings-update.js +15 -8
  130. package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  131. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -1
  132. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  133. package/build/components/inserter/block-patterns-explorer/pattern-list.js +2 -2
  134. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  135. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +1 -1
  136. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  137. package/build/components/inserter/block-types-tab.js +1 -1
  138. package/build/components/inserter/block-types-tab.js.map +1 -1
  139. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  140. package/build/components/inserter/category-tabs/index.js +1 -10
  141. package/build/components/inserter/category-tabs/index.js.map +1 -1
  142. package/build/components/inserter/hooks/use-block-types-state.js +24 -5
  143. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  144. package/build/components/inserter/hooks/use-insertion-point.js +22 -12
  145. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  146. package/build/components/inserter/hooks/use-patterns-state.js +24 -11
  147. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  148. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  149. package/build/components/inserter/media-tab/media-preview.js +36 -14
  150. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  151. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  152. package/build/components/inserter/media-tab/utils.js.map +1 -1
  153. package/build/components/inserter/menu.js +4 -4
  154. package/build/components/inserter/menu.js.map +1 -1
  155. package/build/components/inserter/mobile-tab-navigation.js +5 -5
  156. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  157. package/build/components/inserter/preview-panel.js.map +1 -1
  158. package/build/components/inserter/quick-inserter.js +5 -5
  159. package/build/components/inserter/quick-inserter.js.map +1 -1
  160. package/build/components/inserter/search-results.js +1 -1
  161. package/build/components/inserter/search-results.js.map +1 -1
  162. package/build/components/inserter/tabs.native.js.map +1 -1
  163. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  164. package/build/components/inspector-controls/fill.js.map +1 -1
  165. package/build/components/inspector-controls/fill.native.js.map +1 -1
  166. package/build/components/inspector-controls/slot.js.map +1 -1
  167. package/build/components/inspector-controls/slot.native.js.map +1 -1
  168. package/build/components/line-height-control/index.js.map +1 -1
  169. package/build/components/link-control/index.js +1 -2
  170. package/build/components/link-control/index.js.map +1 -1
  171. package/build/components/link-control/is-url-like.js.map +1 -1
  172. package/build/components/link-control/search-create-button.js +1 -1
  173. package/build/components/link-control/search-create-button.js.map +1 -1
  174. package/build/components/link-control/search-input.js +3 -5
  175. package/build/components/link-control/search-input.js.map +1 -1
  176. package/build/components/link-control/search-results.js +5 -15
  177. package/build/components/link-control/search-results.js.map +1 -1
  178. package/build/components/link-control/settings-drawer.js.map +1 -1
  179. package/build/components/link-control/use-rich-url-data.js.map +1 -1
  180. package/build/components/list-view/appender.js +1 -1
  181. package/build/components/list-view/appender.js.map +1 -1
  182. package/build/components/list-view/block-contents.js +1 -25
  183. package/build/components/list-view/block-contents.js.map +1 -1
  184. package/build/components/list-view/block-select-button.js.map +1 -1
  185. package/build/components/list-view/block.js.map +1 -1
  186. package/build/components/list-view/branch.js.map +1 -1
  187. package/build/components/list-view/drop-indicator.js.map +1 -1
  188. package/build/components/list-view/index.js.map +1 -1
  189. package/build/components/list-view/use-block-selection.js +2 -2
  190. package/build/components/list-view/use-block-selection.js.map +1 -1
  191. package/build/components/list-view/utils.js +1 -1
  192. package/build/components/list-view/utils.js.map +1 -1
  193. package/build/components/media-placeholder/index.native.js +1 -1
  194. package/build/components/media-placeholder/index.native.js.map +1 -1
  195. package/build/components/media-replace-flow/index.js.map +1 -1
  196. package/build/components/multi-selection-inspector/index.js +2 -2
  197. package/build/components/multi-selection-inspector/index.js.map +1 -1
  198. package/build/components/observe-typing/index.js +1 -0
  199. package/build/components/observe-typing/index.js.map +1 -1
  200. package/build/components/recursion-provider/index.js +1 -0
  201. package/build/components/recursion-provider/index.js.map +1 -1
  202. package/build/components/responsive-block-control/index.js +3 -3
  203. package/build/components/responsive-block-control/index.js.map +1 -1
  204. package/build/components/responsive-block-control/label.js +1 -1
  205. package/build/components/responsive-block-control/label.js.map +1 -1
  206. package/build/components/rich-text/content.js.map +1 -1
  207. package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
  208. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  209. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  210. package/build/components/rich-text/index.js +3 -2
  211. package/build/components/rich-text/index.js.map +1 -1
  212. package/build/components/rich-text/multiline.js.map +1 -1
  213. package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
  214. package/build/components/rich-text/native/index.native.js.map +1 -1
  215. package/build/components/rich-text/native/use-format-types.js +1 -0
  216. package/build/components/rich-text/native/use-format-types.js.map +1 -1
  217. package/build/components/rich-text/toolbar-button.js.map +1 -1
  218. package/build/components/rich-text/use-format-types.js +1 -0
  219. package/build/components/rich-text/use-format-types.js.map +1 -1
  220. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  221. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  222. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  223. package/build/components/spacing-sizes-control/utils.js +1 -0
  224. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  225. package/build/components/tool-selector/index.js +13 -8
  226. package/build/components/tool-selector/index.js.map +1 -1
  227. package/build/components/typewriter/index.js +1 -0
  228. package/build/components/typewriter/index.js.map +1 -1
  229. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  230. package/build/components/url-input/index.js +1 -1
  231. package/build/components/url-input/index.js.map +1 -1
  232. package/build/components/use-block-commands/index.js +0 -61
  233. package/build/components/use-block-commands/index.js.map +1 -1
  234. package/build/components/use-block-drop-zone/index.js.map +1 -1
  235. package/build/components/use-flash-editable-blocks/index.js.map +1 -1
  236. package/build/components/use-moving-animation/index.js.map +1 -1
  237. package/build/components/writing-flow/use-tab-nav.js +23 -30
  238. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  239. package/build/hooks/align.js.map +1 -1
  240. package/build/hooks/block-hooks.js +1 -1
  241. package/build/hooks/block-hooks.js.map +1 -1
  242. package/build/hooks/block-style-variation.js.map +1 -1
  243. package/build/hooks/duotone.js +4 -1
  244. package/build/hooks/duotone.js.map +1 -1
  245. package/build/hooks/font-family.js.map +1 -1
  246. package/build/hooks/gap.js.map +1 -1
  247. package/build/hooks/generated-class-name.js +1 -0
  248. package/build/hooks/generated-class-name.js.map +1 -1
  249. package/build/hooks/layout-child.js +3 -1
  250. package/build/hooks/layout-child.js.map +1 -1
  251. package/build/hooks/layout.js.map +1 -1
  252. package/build/hooks/position.js +4 -3
  253. package/build/hooks/position.js.map +1 -1
  254. package/build/hooks/spacing-visualizer.js.map +1 -1
  255. package/build/hooks/style.js.map +1 -1
  256. package/build/hooks/text-align.js.map +1 -1
  257. package/build/hooks/use-typography-props.js.map +1 -1
  258. package/build/hooks/use-zoom-out.js +24 -16
  259. package/build/hooks/use-zoom-out.js.map +1 -1
  260. package/build/layouts/constrained.js.map +1 -1
  261. package/build/layouts/flex.js.map +1 -1
  262. package/build/layouts/grid.js.map +1 -1
  263. package/build/layouts/utils.js.map +1 -1
  264. package/build/store/actions.js +18 -20
  265. package/build/store/actions.js.map +1 -1
  266. package/build/store/private-actions.js +15 -0
  267. package/build/store/private-actions.js.map +1 -1
  268. package/build/store/private-selectors.js +104 -7
  269. package/build/store/private-selectors.js.map +1 -1
  270. package/build/store/reducer.js +24 -44
  271. package/build/store/reducer.js.map +1 -1
  272. package/build/store/selectors.js +149 -71
  273. package/build/store/selectors.js.map +1 -1
  274. package/build/store/utils.js +4 -3
  275. package/build/store/utils.js.map +1 -1
  276. package/build/utils/block-bindings.js +2 -0
  277. package/build/utils/block-bindings.js.map +1 -1
  278. package/build/utils/get-font-styles-and-weights.js +1 -1
  279. package/build/utils/get-font-styles-and-weights.js.map +1 -1
  280. package/build/utils/object.js +1 -0
  281. package/build/utils/object.js.map +1 -1
  282. package/build/utils/pasting.js.map +1 -1
  283. package/build-module/autocompleters/block.js +1 -3
  284. package/build-module/autocompleters/block.js.map +1 -1
  285. package/build-module/autocompleters/link.js +3 -4
  286. package/build-module/autocompleters/link.js.map +1 -1
  287. package/build-module/components/audio-player/index.native.js +1 -2
  288. package/build-module/components/audio-player/index.native.js.map +1 -1
  289. package/build-module/components/background-image-control/index.js +2 -3
  290. package/build-module/components/background-image-control/index.js.map +1 -1
  291. package/build-module/components/block-actions/index.js +1 -13
  292. package/build-module/components/block-actions/index.js.map +1 -1
  293. package/build-module/components/block-alignment-control/ui.js +1 -2
  294. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  295. package/build-module/components/block-breadcrumb/index.js +1 -2
  296. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  297. package/build-module/components/block-canvas/index.js +1 -2
  298. package/build-module/components/block-canvas/index.js.map +1 -1
  299. package/build-module/components/block-card/index.js +1 -2
  300. package/build-module/components/block-card/index.js.map +1 -1
  301. package/build-module/components/block-compare/block-view.js +1 -2
  302. package/build-module/components/block-compare/block-view.js.map +1 -1
  303. package/build-module/components/block-compare/index.js +1 -2
  304. package/build-module/components/block-compare/index.js.map +1 -1
  305. package/build-module/components/block-controls/fill.js +1 -3
  306. package/build-module/components/block-controls/fill.js.map +1 -1
  307. package/build-module/components/block-controls/slot.js.map +1 -1
  308. package/build-module/components/block-controls/slot.native.js.map +1 -1
  309. package/build-module/components/block-draggable/draggable-chip.js +2 -3
  310. package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
  311. package/build-module/components/block-draggable/draggable-chip.native.js +1 -2
  312. package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
  313. package/build-module/components/block-draggable/index.native.js +1 -3
  314. package/build-module/components/block-draggable/index.native.js.map +1 -1
  315. package/build-module/components/block-edit/index.js +1 -2
  316. package/build-module/components/block-edit/index.js.map +1 -1
  317. package/build-module/components/block-edit/multiple-usage-warning.js +1 -2
  318. package/build-module/components/block-edit/multiple-usage-warning.js.map +1 -1
  319. package/build-module/components/block-inspector/index.js +57 -78
  320. package/build-module/components/block-inspector/index.js.map +1 -1
  321. package/build-module/components/block-list/block-crash-warning.js +1 -1
  322. package/build-module/components/block-list/block-crash-warning.js.map +1 -1
  323. package/build-module/components/block-list/block-crash-warning.native.js +1 -1
  324. package/build-module/components/block-list/block-crash-warning.native.js.map +1 -1
  325. package/build-module/components/block-list/block-invalid-warning.js +1 -3
  326. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  327. package/build-module/components/block-list/block-invalid-warning.native.js +1 -1
  328. package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
  329. package/build-module/components/block-list/block-list-item.native.js +1 -2
  330. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  331. package/build-module/components/block-list/block-selection-button.native.js +1 -2
  332. package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
  333. package/build-module/components/block-list/block.js +6 -19
  334. package/build-module/components/block-list/block.js.map +1 -1
  335. package/build-module/components/block-list/block.native.js +1 -2
  336. package/build-module/components/block-list/block.native.js.map +1 -1
  337. package/build-module/components/block-list/index.js +7 -10
  338. package/build-module/components/block-list/index.js.map +1 -1
  339. package/build-module/components/block-list/index.native.js +1 -3
  340. package/build-module/components/block-list/index.native.js.map +1 -1
  341. package/build-module/components/block-list/insertion-point.native.js +1 -2
  342. package/build-module/components/block-list/insertion-point.native.js.map +1 -1
  343. package/build-module/components/block-list/use-block-props/index.js +3 -8
  344. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  345. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +14 -6
  346. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  347. package/build-module/components/block-list/use-in-between-inserter.js +5 -3
  348. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  349. package/build-module/components/block-list/zoom-out-separator.js +24 -13
  350. package/build-module/components/block-list/zoom-out-separator.js.map +1 -1
  351. package/build-module/components/block-lock/menu-item.js +1 -3
  352. package/build-module/components/block-lock/menu-item.js.map +1 -1
  353. package/build-module/components/block-lock/modal.js +2 -3
  354. package/build-module/components/block-lock/modal.js.map +1 -1
  355. package/build-module/components/block-lock/toolbar.js +1 -3
  356. package/build-module/components/block-lock/toolbar.js.map +1 -1
  357. package/build-module/components/block-media-update-progress/index.native.js +1 -2
  358. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  359. package/build-module/components/block-mover/button.js +1 -3
  360. package/build-module/components/block-mover/button.js.map +1 -1
  361. package/build-module/components/block-mover/index.js +1 -2
  362. package/build-module/components/block-mover/index.js.map +1 -1
  363. package/build-module/components/block-mover/index.native.js +1 -2
  364. package/build-module/components/block-mover/index.native.js.map +1 -1
  365. package/build-module/components/block-navigation/dropdown.js +3 -6
  366. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  367. package/build-module/components/block-parent-selector/index.js +14 -11
  368. package/build-module/components/block-parent-selector/index.js.map +1 -1
  369. package/build-module/components/block-pattern-setup/index.js +1 -3
  370. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  371. package/build-module/components/block-pattern-setup/setup-toolbar.js +11 -22
  372. package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  373. package/build-module/components/block-patterns-list/index.js +1 -3
  374. package/build-module/components/block-patterns-list/index.js.map +1 -1
  375. package/build-module/components/block-patterns-paging/index.js +12 -15
  376. package/build-module/components/block-patterns-paging/index.js.map +1 -1
  377. package/build-module/components/block-popover/index.js +45 -2
  378. package/build-module/components/block-popover/index.js.map +1 -1
  379. package/build-module/components/block-preview/auto.js +2 -7
  380. package/build-module/components/block-preview/auto.js.map +1 -1
  381. package/build-module/components/block-preview/index.js +1 -2
  382. package/build-module/components/block-preview/index.js.map +1 -1
  383. package/build-module/components/block-quick-navigation/index.js +3 -6
  384. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  385. package/build-module/components/block-removal-warning-modal/index.js +1 -2
  386. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  387. package/build-module/components/block-rename/modal.js +3 -4
  388. package/build-module/components/block-rename/modal.js.map +1 -1
  389. package/build-module/components/block-rename/rename-control.js +1 -3
  390. package/build-module/components/block-rename/rename-control.js.map +1 -1
  391. package/build-module/components/block-settings/container.native.js +1 -3
  392. package/build-module/components/block-settings/container.native.js.map +1 -1
  393. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js +1 -1
  394. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  395. package/build-module/components/block-settings-menu/block-settings-dropdown.js +80 -79
  396. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  397. package/build-module/components/block-settings-menu-controls/index.js +3 -9
  398. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  399. package/build-module/components/block-styles/index.js +1 -2
  400. package/build-module/components/block-styles/index.js.map +1 -1
  401. package/build-module/components/block-styles/menu-items.js +1 -2
  402. package/build-module/components/block-styles/menu-items.js.map +1 -1
  403. package/build-module/components/block-styles/preview.native.js +1 -2
  404. package/build-module/components/block-styles/preview.native.js.map +1 -1
  405. package/build-module/components/block-switcher/block-transformations-menu.js +1 -3
  406. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  407. package/build-module/components/block-switcher/block-transformations-menu.native.js +1 -1
  408. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  409. package/build-module/components/block-switcher/block-variation-transformations.js +1 -3
  410. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  411. package/build-module/components/block-switcher/index.js +20 -18
  412. package/build-module/components/block-switcher/index.js.map +1 -1
  413. package/build-module/components/block-switcher/pattern-transformations-menu.js +1 -2
  414. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  415. package/build-module/components/block-switcher/preview-block-popover.js +1 -2
  416. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  417. package/build-module/components/block-switcher/use-transformed-patterns.js +1 -0
  418. package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
  419. package/build-module/components/block-switcher/utils.js +1 -0
  420. package/build-module/components/block-switcher/utils.js.map +1 -1
  421. package/build-module/components/block-toolbar/block-toolbar-menu.native.js +1 -2
  422. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  423. package/build-module/components/block-toolbar/index.js +17 -22
  424. package/build-module/components/block-toolbar/index.js.map +1 -1
  425. package/build-module/components/block-toolbar/index.native.js +1 -3
  426. package/build-module/components/block-toolbar/index.native.js.map +1 -1
  427. package/build-module/components/block-toolbar/use-has-block-toolbar.js +3 -5
  428. package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  429. package/build-module/components/block-tools/index.js +9 -20
  430. package/build-module/components/block-tools/index.js.map +1 -1
  431. package/build-module/components/block-tools/insertion-point.js +2 -6
  432. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  433. package/build-module/components/block-tools/use-show-block-tools.js +8 -7
  434. package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
  435. package/build-module/components/block-tools/zoom-out-mode-inserter-button.js +1 -12
  436. package/build-module/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -1
  437. package/build-module/components/block-tools/zoom-out-mode-inserters.js +14 -17
  438. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  439. package/build-module/components/block-tools/zoom-out-popover.js +2 -1
  440. package/build-module/components/block-tools/zoom-out-popover.js.map +1 -1
  441. package/build-module/components/block-tools/zoom-out-toolbar.js +7 -35
  442. package/build-module/components/block-tools/zoom-out-toolbar.js.map +1 -1
  443. package/build-module/components/block-types-list/index.js +1 -2
  444. package/build-module/components/block-types-list/index.js.map +1 -1
  445. package/build-module/components/block-types-list/index.native.js +1 -2
  446. package/build-module/components/block-types-list/index.native.js.map +1 -1
  447. package/build-module/components/block-variation-picker/index.js +1 -2
  448. package/build-module/components/block-variation-picker/index.js.map +1 -1
  449. package/build-module/components/block-variation-picker/index.native.js +1 -2
  450. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  451. package/build-module/components/block-variation-transforms/index.js +4 -4
  452. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  453. package/build-module/components/border-radius-control/index.js +1 -3
  454. package/build-module/components/border-radius-control/index.js.map +1 -1
  455. package/build-module/components/border-radius-control/utils.js.map +1 -1
  456. package/build-module/components/button-block-appender/index.js.map +1 -1
  457. package/build-module/components/button-block-appender/index.native.js +1 -2
  458. package/build-module/components/button-block-appender/index.native.js.map +1 -1
  459. package/build-module/components/child-layout-control/index.js +1 -3
  460. package/build-module/components/child-layout-control/index.js.map +1 -1
  461. package/build-module/components/color-style-selector/index.js.map +1 -1
  462. package/build-module/components/colors/utils.js.map +1 -1
  463. package/build-module/components/colors/with-colors.js.map +1 -1
  464. package/build-module/components/colors-gradients/control.js +1 -2
  465. package/build-module/components/colors-gradients/control.js.map +1 -1
  466. package/build-module/components/colors-gradients/dropdown.js +1 -3
  467. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  468. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +1 -3
  469. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  470. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +1 -3
  471. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  472. package/build-module/components/contrast-checker/index.native.js +1 -2
  473. package/build-module/components/contrast-checker/index.native.js.map +1 -1
  474. package/build-module/components/convert-to-group-buttons/index.js +1 -3
  475. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  476. package/build-module/components/convert-to-group-buttons/toolbar.js +1 -2
  477. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  478. package/build-module/components/date-format-picker/index.js +2 -2
  479. package/build-module/components/date-format-picker/index.js.map +1 -1
  480. package/build-module/components/default-block-appender/index.js +1 -2
  481. package/build-module/components/default-block-appender/index.js.map +1 -1
  482. package/build-module/components/dimensions-tool/index.js +1 -3
  483. package/build-module/components/dimensions-tool/index.js.map +1 -1
  484. package/build-module/components/dimensions-tool/width-height-tool.js +1 -3
  485. package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
  486. package/build-module/components/duotone/utils.js.map +1 -1
  487. package/build-module/components/duotone-control/index.js +1 -2
  488. package/build-module/components/duotone-control/index.js.map +1 -1
  489. package/build-module/components/editor-styles/index.js +1 -3
  490. package/build-module/components/editor-styles/index.js.map +1 -1
  491. package/build-module/components/floating-toolbar/index.native.js +1 -2
  492. package/build-module/components/floating-toolbar/index.native.js.map +1 -1
  493. package/build-module/components/floating-toolbar/nav-up-icon.js +1 -2
  494. package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
  495. package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
  496. package/build-module/components/font-sizes/utils.js.map +1 -1
  497. package/build-module/components/font-sizes/with-font-sizes.js +2 -2
  498. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  499. package/build-module/components/global-styles/advanced-panel.js +1 -2
  500. package/build-module/components/global-styles/advanced-panel.js.map +1 -1
  501. package/build-module/components/global-styles/border-panel.js +2 -3
  502. package/build-module/components/global-styles/border-panel.js.map +1 -1
  503. package/build-module/components/global-styles/color-panel.js +2 -3
  504. package/build-module/components/global-styles/color-panel.js.map +1 -1
  505. package/build-module/components/global-styles/dimensions-panel.js +2 -3
  506. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  507. package/build-module/components/global-styles/filters-panel.js +1 -2
  508. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  509. package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
  510. package/build-module/components/global-styles/get-global-styles-changes.js +2 -1
  511. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
  512. package/build-module/components/global-styles/hooks.js.map +1 -1
  513. package/build-module/components/global-styles/image-settings-panel.js +1 -2
  514. package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
  515. package/build-module/components/global-styles/shadow-panel-components.js +1 -2
  516. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  517. package/build-module/components/global-styles/typography-panel.js +1 -2
  518. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  519. package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -1
  520. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  521. package/build-module/components/global-styles/utils.js.map +1 -1
  522. package/build-module/components/gradients/use-gradient.js.map +1 -1
  523. package/build-module/components/grid/grid-item-movers.js +1 -3
  524. package/build-module/components/grid/grid-item-movers.js.map +1 -1
  525. package/build-module/components/grid/grid-visualizer.js.map +1 -1
  526. package/build-module/components/height-control/index.js +1 -2
  527. package/build-module/components/height-control/index.js.map +1 -1
  528. package/build-module/components/iframe/index.js +45 -12
  529. package/build-module/components/iframe/index.js.map +1 -1
  530. package/build-module/components/image-editor/aspect-ratio-dropdown.js +1 -3
  531. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  532. package/build-module/components/image-editor/cropper.js +1 -3
  533. package/build-module/components/image-editor/cropper.js.map +1 -1
  534. package/build-module/components/image-editor/form-controls.js +1 -3
  535. package/build-module/components/image-editor/form-controls.js.map +1 -1
  536. package/build-module/components/image-editor/index.js +1 -2
  537. package/build-module/components/image-editor/index.js.map +1 -1
  538. package/build-module/components/image-editor/use-save-image.js +1 -1
  539. package/build-module/components/image-editor/use-save-image.js.map +1 -1
  540. package/build-module/components/image-link-destinations/index.native.js +1 -3
  541. package/build-module/components/image-link-destinations/index.native.js.map +1 -1
  542. package/build-module/components/image-size-control/index.js +1 -3
  543. package/build-module/components/image-size-control/index.js.map +1 -1
  544. package/build-module/components/inner-blocks/index.js +1 -9
  545. package/build-module/components/inner-blocks/index.js.map +1 -1
  546. package/build-module/components/inner-blocks/use-nested-settings-update.js +16 -9
  547. package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  548. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js +1 -2
  549. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  550. package/build-module/components/inserter/block-patterns-explorer/index.js +1 -2
  551. package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
  552. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +2 -3
  553. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  554. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +3 -5
  555. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  556. package/build-module/components/inserter/block-patterns-tab/index.js +1 -3
  557. package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
  558. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -3
  559. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  560. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +1 -3
  561. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  562. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js +1 -1
  563. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  564. package/build-module/components/inserter/block-types-tab.js +2 -4
  565. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  566. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  567. package/build-module/components/inserter/category-tabs/index.js +3 -13
  568. package/build-module/components/inserter/category-tabs/index.js.map +1 -1
  569. package/build-module/components/inserter/hooks/use-block-types-state.js +27 -8
  570. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  571. package/build-module/components/inserter/hooks/use-insertion-point.js +22 -12
  572. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  573. package/build-module/components/inserter/hooks/use-patterns-state.js +24 -11
  574. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  575. package/build-module/components/inserter/index.native.js +1 -3
  576. package/build-module/components/inserter/index.native.js.map +1 -1
  577. package/build-module/components/inserter/media-tab/media-panel.js +1 -2
  578. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  579. package/build-module/components/inserter/media-tab/media-preview.js +37 -17
  580. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  581. package/build-module/components/inserter/media-tab/media-tab.js +1 -3
  582. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  583. package/build-module/components/inserter/media-tab/utils.js.map +1 -1
  584. package/build-module/components/inserter/menu.js +5 -7
  585. package/build-module/components/inserter/menu.js.map +1 -1
  586. package/build-module/components/inserter/menu.native.js +1 -3
  587. package/build-module/components/inserter/menu.native.js.map +1 -1
  588. package/build-module/components/inserter/mobile-tab-navigation.js +7 -8
  589. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  590. package/build-module/components/inserter/no-results.js +1 -2
  591. package/build-module/components/inserter/no-results.js.map +1 -1
  592. package/build-module/components/inserter/no-results.native.js +1 -2
  593. package/build-module/components/inserter/no-results.native.js.map +1 -1
  594. package/build-module/components/inserter/panel.js +1 -3
  595. package/build-module/components/inserter/panel.js.map +1 -1
  596. package/build-module/components/inserter/preview-panel.js +1 -2
  597. package/build-module/components/inserter/preview-panel.js.map +1 -1
  598. package/build-module/components/inserter/quick-inserter.js +6 -7
  599. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  600. package/build-module/components/inserter/search-results.js +2 -3
  601. package/build-module/components/inserter/search-results.js.map +1 -1
  602. package/build-module/components/inserter/tabs.native.js.map +1 -1
  603. package/build-module/components/inserter-button/index.native.js +1 -2
  604. package/build-module/components/inserter-button/index.native.js.map +1 -1
  605. package/build-module/components/inserter-list-item/index.js +1 -2
  606. package/build-module/components/inserter-list-item/index.js.map +1 -1
  607. package/build-module/components/inserter-listbox/index.js +1 -2
  608. package/build-module/components/inserter-listbox/index.js.map +1 -1
  609. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  610. package/build-module/components/inspector-controls/fill.js.map +1 -1
  611. package/build-module/components/inspector-controls/fill.native.js +1 -3
  612. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  613. package/build-module/components/inspector-controls/slot.js.map +1 -1
  614. package/build-module/components/inspector-controls/slot.native.js.map +1 -1
  615. package/build-module/components/inspector-controls-tabs/index.js +1 -2
  616. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  617. package/build-module/components/inspector-controls-tabs/settings-tab.js +1 -3
  618. package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  619. package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -3
  620. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  621. package/build-module/components/inspector-popover-header/index.js +1 -2
  622. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  623. package/build-module/components/line-height-control/index.js.map +1 -1
  624. package/build-module/components/link-control/index.js +2 -5
  625. package/build-module/components/link-control/index.js.map +1 -1
  626. package/build-module/components/link-control/is-url-like.js.map +1 -1
  627. package/build-module/components/link-control/link-preview.js +1 -3
  628. package/build-module/components/link-control/link-preview.js.map +1 -1
  629. package/build-module/components/link-control/search-create-button.js +1 -1
  630. package/build-module/components/link-control/search-create-button.js.map +1 -1
  631. package/build-module/components/link-control/search-input.js +4 -7
  632. package/build-module/components/link-control/search-input.js.map +1 -1
  633. package/build-module/components/link-control/search-results.js +6 -17
  634. package/build-module/components/link-control/search-results.js.map +1 -1
  635. package/build-module/components/link-control/settings-drawer.js +1 -3
  636. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  637. package/build-module/components/link-control/settings.js +1 -2
  638. package/build-module/components/link-control/settings.js.map +1 -1
  639. package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
  640. package/build-module/components/list-view/appender.js +2 -3
  641. package/build-module/components/list-view/appender.js.map +1 -1
  642. package/build-module/components/list-view/block-contents.js +2 -28
  643. package/build-module/components/list-view/block-contents.js.map +1 -1
  644. package/build-module/components/list-view/block-select-button.js +1 -2
  645. package/build-module/components/list-view/block-select-button.js.map +1 -1
  646. package/build-module/components/list-view/block.js +1 -3
  647. package/build-module/components/list-view/block.js.map +1 -1
  648. package/build-module/components/list-view/branch.js +1 -3
  649. package/build-module/components/list-view/branch.js.map +1 -1
  650. package/build-module/components/list-view/drop-indicator.js +1 -2
  651. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  652. package/build-module/components/list-view/index.js +1 -2
  653. package/build-module/components/list-view/index.js.map +1 -1
  654. package/build-module/components/list-view/use-block-selection.js +2 -2
  655. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  656. package/build-module/components/list-view/utils.js +1 -1
  657. package/build-module/components/list-view/utils.js.map +1 -1
  658. package/build-module/components/media-placeholder/index.js +1 -3
  659. package/build-module/components/media-placeholder/index.js.map +1 -1
  660. package/build-module/components/media-placeholder/index.native.js +2 -4
  661. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  662. package/build-module/components/media-replace-flow/index.js +1 -3
  663. package/build-module/components/media-replace-flow/index.js.map +1 -1
  664. package/build-module/components/media-upload/index.native.js +1 -3
  665. package/build-module/components/media-upload/index.native.js.map +1 -1
  666. package/build-module/components/media-upload-progress/index.native.js +1 -2
  667. package/build-module/components/media-upload-progress/index.native.js.map +1 -1
  668. package/build-module/components/multi-selection-inspector/index.js +3 -4
  669. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  670. package/build-module/components/observe-typing/index.js +1 -0
  671. package/build-module/components/observe-typing/index.js.map +1 -1
  672. package/build-module/components/provider/index.js +1 -2
  673. package/build-module/components/provider/index.js.map +1 -1
  674. package/build-module/components/publish-date-time-picker/index.js +1 -2
  675. package/build-module/components/publish-date-time-picker/index.js.map +1 -1
  676. package/build-module/components/recursion-provider/index.js +1 -0
  677. package/build-module/components/recursion-provider/index.js.map +1 -1
  678. package/build-module/components/responsive-block-control/index.js +4 -5
  679. package/build-module/components/responsive-block-control/index.js.map +1 -1
  680. package/build-module/components/responsive-block-control/label.js +2 -4
  681. package/build-module/components/responsive-block-control/label.js.map +1 -1
  682. package/build-module/components/rich-text/content.js.map +1 -1
  683. package/build-module/components/rich-text/event-listeners/before-input-rules.js +2 -2
  684. package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
  685. package/build-module/components/rich-text/event-listeners/delete.js +2 -2
  686. package/build-module/components/rich-text/event-listeners/delete.js.map +1 -1
  687. package/build-module/components/rich-text/event-listeners/enter.js +2 -2
  688. package/build-module/components/rich-text/event-listeners/enter.js.map +1 -1
  689. package/build-module/components/rich-text/event-listeners/firefox-compat.js +2 -2
  690. package/build-module/components/rich-text/event-listeners/firefox-compat.js.map +1 -1
  691. package/build-module/components/rich-text/event-listeners/input-events.js +2 -2
  692. package/build-module/components/rich-text/event-listeners/input-events.js.map +1 -1
  693. package/build-module/components/rich-text/event-listeners/input-rules.js +2 -2
  694. package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -1
  695. package/build-module/components/rich-text/event-listeners/insert-replacement-text.js +2 -2
  696. package/build-module/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -1
  697. package/build-module/components/rich-text/event-listeners/paste-handler.js +2 -2
  698. package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -1
  699. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js +2 -2
  700. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -1
  701. package/build-module/components/rich-text/event-listeners/shortcuts.js +2 -2
  702. package/build-module/components/rich-text/event-listeners/shortcuts.js.map +1 -1
  703. package/build-module/components/rich-text/event-listeners/undo-automatic-change.js +2 -2
  704. package/build-module/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -1
  705. package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
  706. package/build-module/components/rich-text/format-toolbar/index.js +1 -3
  707. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  708. package/build-module/components/rich-text/format-toolbar/index.native.js +1 -3
  709. package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
  710. package/build-module/components/rich-text/index.js +4 -5
  711. package/build-module/components/rich-text/index.js.map +1 -1
  712. package/build-module/components/rich-text/index.native.js +1 -3
  713. package/build-module/components/rich-text/index.native.js.map +1 -1
  714. package/build-module/components/rich-text/multiline.js.map +1 -1
  715. package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
  716. package/build-module/components/rich-text/native/index.js +1 -1
  717. package/build-module/components/rich-text/native/index.js.map +1 -1
  718. package/build-module/components/rich-text/native/index.native.js +1 -3
  719. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  720. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js +1 -3
  721. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  722. package/build-module/components/rich-text/native/use-format-types.js +1 -0
  723. package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
  724. package/build-module/components/rich-text/toolbar-button.js.map +1 -1
  725. package/build-module/components/rich-text/use-format-types.js +1 -0
  726. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  727. package/build-module/components/spacing-sizes-control/index.js +1 -2
  728. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  729. package/build-module/components/spacing-sizes-control/input-controls/axial.js +1 -2
  730. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  731. package/build-module/components/spacing-sizes-control/input-controls/separated.js +1 -2
  732. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  733. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +1 -3
  734. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  735. package/build-module/components/spacing-sizes-control/utils.js +1 -0
  736. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  737. package/build-module/components/tabbed-sidebar/index.js +1 -2
  738. package/build-module/components/tabbed-sidebar/index.js.map +1 -1
  739. package/build-module/components/tool-selector/index.js +14 -11
  740. package/build-module/components/tool-selector/index.js.map +1 -1
  741. package/build-module/components/typewriter/index.js +1 -0
  742. package/build-module/components/typewriter/index.js.map +1 -1
  743. package/build-module/components/unsupported-block-details/index.native.js +1 -2
  744. package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
  745. package/build-module/components/url-input/button.js +1 -2
  746. package/build-module/components/url-input/button.js.map +1 -1
  747. package/build-module/components/url-input/index.js +2 -4
  748. package/build-module/components/url-input/index.js.map +1 -1
  749. package/build-module/components/url-popover/image-url-input-ui.js +1 -3
  750. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  751. package/build-module/components/url-popover/index.js +1 -2
  752. package/build-module/components/url-popover/index.js.map +1 -1
  753. package/build-module/components/url-popover/link-editor.js +1 -2
  754. package/build-module/components/url-popover/link-editor.js.map +1 -1
  755. package/build-module/components/url-popover/link-viewer.js +1 -2
  756. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  757. package/build-module/components/use-block-commands/index.js +1 -62
  758. package/build-module/components/use-block-commands/index.js.map +1 -1
  759. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  760. package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
  761. package/build-module/components/use-moving-animation/index.js.map +1 -1
  762. package/build-module/components/video-player/index.native.js +1 -2
  763. package/build-module/components/video-player/index.native.js.map +1 -1
  764. package/build-module/components/warning/index.js +1 -2
  765. package/build-module/components/warning/index.js.map +1 -1
  766. package/build-module/components/warning/index.native.js +1 -2
  767. package/build-module/components/warning/index.native.js.map +1 -1
  768. package/build-module/components/writing-flow/index.js +1 -3
  769. package/build-module/components/writing-flow/index.js.map +1 -1
  770. package/build-module/components/writing-flow/use-tab-nav.js +24 -31
  771. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  772. package/build-module/hooks/align.js.map +1 -1
  773. package/build-module/hooks/anchor.js +1 -3
  774. package/build-module/hooks/anchor.js.map +1 -1
  775. package/build-module/hooks/block-bindings.js +1 -3
  776. package/build-module/hooks/block-bindings.js.map +1 -1
  777. package/build-module/hooks/block-hooks.js +2 -3
  778. package/build-module/hooks/block-hooks.js.map +1 -1
  779. package/build-module/hooks/block-style-variation.js +1 -2
  780. package/build-module/hooks/block-style-variation.js.map +1 -1
  781. package/build-module/hooks/dimensions.js +1 -3
  782. package/build-module/hooks/dimensions.js.map +1 -1
  783. package/build-module/hooks/duotone.js +5 -4
  784. package/build-module/hooks/duotone.js.map +1 -1
  785. package/build-module/hooks/font-family.js.map +1 -1
  786. package/build-module/hooks/gap.js.map +1 -1
  787. package/build-module/hooks/generated-class-name.js +1 -0
  788. package/build-module/hooks/generated-class-name.js.map +1 -1
  789. package/build-module/hooks/grid-visualizer.js +1 -3
  790. package/build-module/hooks/grid-visualizer.js.map +1 -1
  791. package/build-module/hooks/layout-child.js +5 -4
  792. package/build-module/hooks/layout-child.js.map +1 -1
  793. package/build-module/hooks/layout.js +1 -3
  794. package/build-module/hooks/layout.js.map +1 -1
  795. package/build-module/hooks/position.js +5 -2
  796. package/build-module/hooks/position.js.map +1 -1
  797. package/build-module/hooks/spacing-visualizer.js.map +1 -1
  798. package/build-module/hooks/style.js +1 -3
  799. package/build-module/hooks/style.js.map +1 -1
  800. package/build-module/hooks/text-align.js.map +1 -1
  801. package/build-module/hooks/typography.native.js +1 -2
  802. package/build-module/hooks/typography.native.js.map +1 -1
  803. package/build-module/hooks/use-bindings-attributes.js +1 -2
  804. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  805. package/build-module/hooks/use-typography-props.js.map +1 -1
  806. package/build-module/hooks/use-zoom-out.js +24 -17
  807. package/build-module/hooks/use-zoom-out.js.map +1 -1
  808. package/build-module/layouts/constrained.js +1 -3
  809. package/build-module/layouts/constrained.js.map +1 -1
  810. package/build-module/layouts/flex.js +1 -3
  811. package/build-module/layouts/flex.js.map +1 -1
  812. package/build-module/layouts/grid.js +1 -3
  813. package/build-module/layouts/grid.js.map +1 -1
  814. package/build-module/layouts/utils.js.map +1 -1
  815. package/build-module/store/actions.js +17 -18
  816. package/build-module/store/actions.js.map +1 -1
  817. package/build-module/store/private-actions.js +14 -0
  818. package/build-module/store/private-actions.js.map +1 -1
  819. package/build-module/store/private-selectors.js +98 -7
  820. package/build-module/store/private-selectors.js.map +1 -1
  821. package/build-module/store/reducer.js +22 -41
  822. package/build-module/store/reducer.js.map +1 -1
  823. package/build-module/store/selectors.js +150 -70
  824. package/build-module/store/selectors.js.map +1 -1
  825. package/build-module/store/utils.js +3 -2
  826. package/build-module/store/utils.js.map +1 -1
  827. package/build-module/utils/block-bindings.js +2 -0
  828. package/build-module/utils/block-bindings.js.map +1 -1
  829. package/build-module/utils/get-font-styles-and-weights.js +1 -1
  830. package/build-module/utils/get-font-styles-and-weights.js.map +1 -1
  831. package/build-module/utils/get-px-from-css-unit.js +1 -1
  832. package/build-module/utils/get-px-from-css-unit.js.map +1 -1
  833. package/build-module/utils/object.js +1 -0
  834. package/build-module/utils/object.js.map +1 -1
  835. package/build-module/utils/pasting.js.map +1 -1
  836. package/build-style/content-rtl.css +22 -73
  837. package/build-style/content.css +22 -73
  838. package/build-style/default-editor-styles-rtl.css +10 -1
  839. package/build-style/default-editor-styles.css +10 -1
  840. package/build-style/style-rtl.css +48 -165
  841. package/build-style/style.css +48 -165
  842. package/package.json +33 -33
  843. package/src/autocompleters/link.js +2 -1
  844. package/src/components/block-actions/index.js +1 -13
  845. package/src/components/block-canvas/style.scss +0 -1
  846. package/src/components/block-draggable/style.scss +2 -2
  847. package/src/components/block-inspector/index.js +79 -95
  848. package/src/components/block-list/block.js +7 -25
  849. package/src/components/block-list/content.scss +4 -63
  850. package/src/components/block-list/index.js +21 -29
  851. package/src/components/block-list/use-block-props/index.js +2 -8
  852. package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +25 -4
  853. package/src/components/block-list/use-in-between-inserter.js +5 -2
  854. package/src/components/block-list/zoom-out-separator.js +32 -14
  855. package/src/components/block-navigation/dropdown.js +1 -2
  856. package/src/components/block-parent-selector/index.js +13 -10
  857. package/src/components/block-pattern-setup/setup-toolbar.js +5 -10
  858. package/src/components/block-patterns-paging/index.js +8 -7
  859. package/src/components/block-patterns-paging/style.scss +10 -27
  860. package/src/components/block-popover/index.js +64 -2
  861. package/src/components/block-preview/auto.js +1 -4
  862. package/src/components/block-quick-navigation/index.js +1 -2
  863. package/src/components/block-settings-menu/block-settings-dropdown.js +120 -106
  864. package/src/components/block-settings-menu-controls/index.js +0 -15
  865. package/src/components/block-switcher/index.js +37 -30
  866. package/src/components/block-toolbar/index.js +22 -34
  867. package/src/components/block-toolbar/style.scss +10 -1
  868. package/src/components/block-toolbar/use-has-block-toolbar.js +19 -31
  869. package/src/components/block-tools/index.js +7 -27
  870. package/src/components/block-tools/insertion-point.js +1 -4
  871. package/src/components/block-tools/style.scss +0 -90
  872. package/src/components/block-tools/use-show-block-tools.js +10 -13
  873. package/src/components/block-tools/zoom-out-mode-inserter-button.js +2 -17
  874. package/src/components/block-tools/zoom-out-mode-inserters.js +11 -19
  875. package/src/components/block-tools/zoom-out-popover.js +2 -1
  876. package/src/components/block-tools/zoom-out-toolbar.js +4 -36
  877. package/src/components/font-family/README.md +5 -1
  878. package/src/components/global-styles/border-panel.js +1 -1
  879. package/src/components/global-styles/dimensions-panel.js +1 -1
  880. package/src/components/iframe/content.scss +20 -24
  881. package/src/components/iframe/index.js +56 -12
  882. package/src/components/iframe/style.scss +6 -5
  883. package/src/components/inner-blocks/index.js +1 -16
  884. package/src/components/inner-blocks/use-nested-settings-update.js +16 -10
  885. package/src/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -1
  886. package/src/components/inserter/block-types-tab.js +1 -1
  887. package/src/components/inserter/category-tabs/index.js +1 -11
  888. package/src/components/inserter/hooks/use-block-types-state.js +34 -14
  889. package/src/components/inserter/hooks/use-insertion-point.js +35 -13
  890. package/src/components/inserter/hooks/use-patterns-state.js +46 -9
  891. package/src/components/inserter/media-tab/media-preview.js +38 -12
  892. package/src/components/inserter/menu.js +4 -4
  893. package/src/components/inserter/mobile-tab-navigation.js +10 -13
  894. package/src/components/inserter/quick-inserter.js +6 -5
  895. package/src/components/inserter/style.scss +1 -69
  896. package/src/components/inspector-controls-tabs/style.scss +2 -6
  897. package/src/components/link-control/index.js +0 -1
  898. package/src/components/link-control/search-input.js +4 -5
  899. package/src/components/link-control/search-results.js +2 -13
  900. package/src/components/link-control/test/index.js +84 -46
  901. package/src/components/list-view/block-contents.js +1 -28
  902. package/src/components/list-view/style.scss +0 -14
  903. package/src/components/media-replace-flow/test/index.js +1 -1
  904. package/src/components/responsive-block-control/style.scss +0 -1
  905. package/src/components/rich-text/style.scss +5 -0
  906. package/src/components/tool-selector/index.js +15 -7
  907. package/src/components/tool-selector/style.scss +5 -0
  908. package/src/components/use-block-commands/index.js +0 -58
  909. package/src/components/writing-flow/use-tab-nav.js +32 -40
  910. package/src/content.scss +0 -1
  911. package/src/hooks/duotone.js +4 -1
  912. package/src/hooks/layout-child.js +4 -1
  913. package/src/hooks/position.js +4 -1
  914. package/src/hooks/use-zoom-out.js +36 -20
  915. package/src/store/actions.js +17 -15
  916. package/src/store/private-actions.js +14 -0
  917. package/src/store/private-selectors.js +120 -16
  918. package/src/store/reducer.js +22 -45
  919. package/src/store/selectors.js +218 -118
  920. package/src/store/test/private-actions.js +15 -0
  921. package/src/store/test/private-selectors.js +41 -1
  922. package/src/store/test/reducer.js +40 -4
  923. package/src/store/test/selectors.js +195 -21
  924. package/src/store/utils.js +4 -2
  925. package/src/style.scss +1 -0
  926. package/src/utils/block-bindings.js +2 -0
  927. package/build/components/block-controls/use-has-block-controls.js +0 -43
  928. package/build/components/block-controls/use-has-block-controls.js.map +0 -1
  929. package/build/components/block-list/use-block-props/use-nav-mode-exit.js +0 -54
  930. package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +0 -1
  931. package/build/components/block-tools/block-selection-button.js +0 -259
  932. package/build/components/block-tools/block-selection-button.js.map +0 -1
  933. package/build/components/block-tools/block-toolbar-breadcrumb.js +0 -57
  934. package/build/components/block-tools/block-toolbar-breadcrumb.js.map +0 -1
  935. package/build/components/inserter/tabs.js +0 -78
  936. package/build/components/inserter/tabs.js.map +0 -1
  937. package/build-module/components/block-controls/use-has-block-controls.js +0 -34
  938. package/build-module/components/block-controls/use-has-block-controls.js.map +0 -1
  939. package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js +0 -48
  940. package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +0 -1
  941. package/build-module/components/block-tools/block-selection-button.js +0 -254
  942. package/build-module/components/block-tools/block-selection-button.js.map +0 -1
  943. package/build-module/components/block-tools/block-toolbar-breadcrumb.js +0 -49
  944. package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +0 -1
  945. package/build-module/components/inserter/tabs.js +0 -72
  946. package/build-module/components/inserter/tabs.js.map +0 -1
  947. package/src/components/block-controls/use-has-block-controls.js +0 -35
  948. package/src/components/block-list/use-block-props/use-nav-mode-exit.js +0 -46
  949. package/src/components/block-tools/block-selection-button.js +0 -302
  950. package/src/components/block-tools/block-toolbar-breadcrumb.js +0 -51
  951. package/src/components/inner-blocks/content.scss +0 -13
  952. package/src/components/inserter/tabs.js +0 -78
  953. package/src/components/inserter/test/block-types-tab.native.js +0 -67
@@ -1,254 +0,0 @@
1
- /**
2
- * External dependencies
3
- */
4
- import clsx from 'clsx';
5
-
6
- /**
7
- * WordPress dependencies
8
- */
9
- import { dragHandle } from '@wordpress/icons';
10
- import { Button, Flex, FlexItem } from '@wordpress/components';
11
- import { useSelect, useDispatch } from '@wordpress/data';
12
- import { forwardRef, useEffect } from '@wordpress/element';
13
- import { BACKSPACE, DELETE, UP, DOWN, LEFT, RIGHT, TAB, ESCAPE, ENTER, SPACE } from '@wordpress/keycodes';
14
- import { __experimentalGetAccessibleBlockLabel as getAccessibleBlockLabel, store as blocksStore } from '@wordpress/blocks';
15
- import { speak } from '@wordpress/a11y';
16
- import { focus } from '@wordpress/dom';
17
- import { __ } from '@wordpress/i18n';
18
-
19
- /**
20
- * Internal dependencies
21
- */
22
- import BlockTitle from '../block-title';
23
- import BlockIcon from '../block-icon';
24
- import { store as blockEditorStore } from '../../store';
25
- import BlockDraggable from '../block-draggable';
26
- import { useBlockElement } from '../block-list/use-block-props/use-block-refs';
27
-
28
- /**
29
- * Block selection button component, displaying the label of the block. If the block
30
- * descends from a root block, a button is displayed enabling the user to select
31
- * the root block.
32
- *
33
- * @param {string} props Component props.
34
- * @param {string} props.clientId Client ID of block.
35
- * @param {Object} ref Reference to the component.
36
- *
37
- * @return {Component} The component to be rendered.
38
- */
39
- import { jsx as _jsx } from "react/jsx-runtime";
40
- import { jsxs as _jsxs } from "react/jsx-runtime";
41
- function BlockSelectionButton({
42
- clientId,
43
- rootClientId
44
- }, ref) {
45
- const selected = useSelect(select => {
46
- const {
47
- getBlock,
48
- getBlockIndex,
49
- hasBlockMovingClientId,
50
- getBlockListSettings,
51
- __unstableGetEditorMode,
52
- getNextBlockClientId,
53
- getPreviousBlockClientId,
54
- canMoveBlock
55
- } = select(blockEditorStore);
56
- const {
57
- getActiveBlockVariation,
58
- getBlockType
59
- } = select(blocksStore);
60
- const index = getBlockIndex(clientId);
61
- const {
62
- name,
63
- attributes
64
- } = getBlock(clientId);
65
- const blockType = getBlockType(name);
66
- const orientation = getBlockListSettings(rootClientId)?.orientation;
67
- const match = getActiveBlockVariation(name, attributes);
68
- return {
69
- blockMovingMode: hasBlockMovingClientId(),
70
- editorMode: __unstableGetEditorMode(),
71
- icon: match?.icon || blockType.icon,
72
- label: getAccessibleBlockLabel(blockType, attributes, index + 1, orientation),
73
- canMove: canMoveBlock(clientId, rootClientId),
74
- getNextBlockClientId,
75
- getPreviousBlockClientId
76
- };
77
- }, [clientId, rootClientId]);
78
- const {
79
- label,
80
- icon,
81
- blockMovingMode,
82
- editorMode,
83
- canMove
84
- } = selected;
85
- const {
86
- setNavigationMode,
87
- removeBlock
88
- } = useDispatch(blockEditorStore);
89
-
90
- // Focus the breadcrumb in navigation mode.
91
- useEffect(() => {
92
- if (editorMode === 'navigation') {
93
- ref.current.focus();
94
- speak(label);
95
- }
96
- }, [label, editorMode]);
97
- const blockElement = useBlockElement(clientId);
98
- const {
99
- hasBlockMovingClientId,
100
- getBlockIndex,
101
- getBlockRootClientId,
102
- getClientIdsOfDescendants,
103
- getSelectedBlockClientId,
104
- getMultiSelectedBlocksEndClientId,
105
- getPreviousBlockClientId,
106
- getNextBlockClientId
107
- } = useSelect(blockEditorStore);
108
- const {
109
- selectBlock,
110
- clearSelectedBlock,
111
- setBlockMovingClientId,
112
- moveBlockToPosition
113
- } = useDispatch(blockEditorStore);
114
- function onKeyDown(event) {
115
- const {
116
- keyCode
117
- } = event;
118
- const isUp = keyCode === UP;
119
- const isDown = keyCode === DOWN;
120
- const isLeft = keyCode === LEFT;
121
- const isRight = keyCode === RIGHT;
122
- const isTab = keyCode === TAB;
123
- const isEscape = keyCode === ESCAPE;
124
- const isEnter = keyCode === ENTER;
125
- const isSpace = keyCode === SPACE;
126
- const isShift = event.shiftKey;
127
- if (keyCode === BACKSPACE || keyCode === DELETE) {
128
- removeBlock(clientId);
129
- event.preventDefault();
130
- return;
131
- }
132
- const selectedBlockClientId = getSelectedBlockClientId();
133
- const selectionEndClientId = getMultiSelectedBlocksEndClientId();
134
- const selectionBeforeEndClientId = getPreviousBlockClientId(selectionEndClientId || selectedBlockClientId);
135
- const selectionAfterEndClientId = getNextBlockClientId(selectionEndClientId || selectedBlockClientId);
136
- const navigateUp = isTab && isShift || isUp;
137
- const navigateDown = isTab && !isShift || isDown;
138
- // Move out of current nesting level (no effect if at root level).
139
- const navigateOut = isLeft;
140
- // Move into next nesting level (no effect if the current block has no innerBlocks).
141
- const navigateIn = isRight;
142
- let focusedBlockUid;
143
- if (navigateUp) {
144
- focusedBlockUid = selectionBeforeEndClientId;
145
- } else if (navigateDown) {
146
- focusedBlockUid = selectionAfterEndClientId;
147
- } else if (navigateOut) {
148
- var _getBlockRootClientId;
149
- focusedBlockUid = (_getBlockRootClientId = getBlockRootClientId(selectedBlockClientId)) !== null && _getBlockRootClientId !== void 0 ? _getBlockRootClientId : selectedBlockClientId;
150
- } else if (navigateIn) {
151
- var _getClientIdsOfDescen;
152
- focusedBlockUid = (_getClientIdsOfDescen = getClientIdsOfDescendants(selectedBlockClientId)[0]) !== null && _getClientIdsOfDescen !== void 0 ? _getClientIdsOfDescen : selectedBlockClientId;
153
- }
154
- const startingBlockClientId = hasBlockMovingClientId();
155
- if (isEscape && startingBlockClientId && !event.defaultPrevented) {
156
- setBlockMovingClientId(null);
157
- event.preventDefault();
158
- }
159
- if ((isEnter || isSpace) && startingBlockClientId) {
160
- const sourceRoot = getBlockRootClientId(startingBlockClientId);
161
- const destRoot = getBlockRootClientId(selectedBlockClientId);
162
- const sourceBlockIndex = getBlockIndex(startingBlockClientId);
163
- let destinationBlockIndex = getBlockIndex(selectedBlockClientId);
164
- if (sourceBlockIndex < destinationBlockIndex && sourceRoot === destRoot) {
165
- destinationBlockIndex -= 1;
166
- }
167
- moveBlockToPosition(startingBlockClientId, sourceRoot, destRoot, destinationBlockIndex);
168
- selectBlock(startingBlockClientId);
169
- setBlockMovingClientId(null);
170
- }
171
- // Prevent the block from being moved into itself.
172
- if (startingBlockClientId && selectedBlockClientId === startingBlockClientId && navigateIn) {
173
- return;
174
- }
175
- if (navigateDown || navigateUp || navigateOut || navigateIn) {
176
- if (focusedBlockUid) {
177
- event.preventDefault();
178
- selectBlock(focusedBlockUid);
179
- } else if (isTab && selectedBlockClientId) {
180
- let nextTabbable;
181
- if (navigateDown) {
182
- nextTabbable = blockElement;
183
- do {
184
- nextTabbable = focus.tabbable.findNext(nextTabbable);
185
- } while (nextTabbable && blockElement.contains(nextTabbable));
186
- if (!nextTabbable) {
187
- nextTabbable = blockElement.ownerDocument.defaultView.frameElement;
188
- nextTabbable = focus.tabbable.findNext(nextTabbable);
189
- }
190
- } else {
191
- nextTabbable = focus.tabbable.findPrevious(blockElement);
192
- }
193
- if (nextTabbable) {
194
- event.preventDefault();
195
- nextTabbable.focus();
196
- clearSelectedBlock();
197
- }
198
- }
199
- }
200
- }
201
- const classNames = clsx('block-editor-block-list__block-selection-button', {
202
- 'is-block-moving-mode': !!blockMovingMode
203
- });
204
- const dragHandleLabel = __('Drag');
205
- const showBlockDraggable = canMove && editorMode === 'navigation';
206
- return /*#__PURE__*/_jsx("div", {
207
- className: classNames,
208
- children: /*#__PURE__*/_jsxs(Flex, {
209
- justify: "center",
210
- className: "block-editor-block-list__block-selection-button__content",
211
- children: [/*#__PURE__*/_jsx(FlexItem, {
212
- children: /*#__PURE__*/_jsx(BlockIcon, {
213
- icon: icon,
214
- showColors: true
215
- })
216
- }), showBlockDraggable && /*#__PURE__*/_jsx(FlexItem, {
217
- children: /*#__PURE__*/_jsx(BlockDraggable, {
218
- clientIds: [clientId],
219
- children: draggableProps => /*#__PURE__*/_jsx(Button
220
- // TODO: Switch to `true` (40px size) if possible
221
- , {
222
- __next40pxDefaultSize: false,
223
- icon: dragHandle,
224
- className: "block-selection-button_drag-handle",
225
- label: dragHandleLabel
226
- // Should not be able to tab to drag handle as this
227
- // button can only be used with a pointer device.
228
- ,
229
- tabIndex: "-1",
230
- ...draggableProps
231
- })
232
- })
233
- }), editorMode === 'navigation' && /*#__PURE__*/_jsx(FlexItem, {
234
- children: /*#__PURE__*/_jsx(Button
235
- // TODO: Switch to `true` (40px size) if possible
236
- , {
237
- __next40pxDefaultSize: false,
238
- ref: ref,
239
- onClick: editorMode === 'navigation' ? () => setNavigationMode(false) : undefined,
240
- onKeyDown: onKeyDown,
241
- label: label,
242
- showTooltip: false,
243
- className: "block-selection-button_select-button",
244
- children: /*#__PURE__*/_jsx(BlockTitle, {
245
- clientId: clientId,
246
- maximumLength: 35
247
- })
248
- })
249
- })]
250
- })
251
- });
252
- }
253
- export default forwardRef(BlockSelectionButton);
254
- //# sourceMappingURL=block-selection-button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["clsx","dragHandle","Button","Flex","FlexItem","useSelect","useDispatch","forwardRef","useEffect","BACKSPACE","DELETE","UP","DOWN","LEFT","RIGHT","TAB","ESCAPE","ENTER","SPACE","__experimentalGetAccessibleBlockLabel","getAccessibleBlockLabel","store","blocksStore","speak","focus","__","BlockTitle","BlockIcon","blockEditorStore","BlockDraggable","useBlockElement","jsx","_jsx","jsxs","_jsxs","BlockSelectionButton","clientId","rootClientId","ref","selected","select","getBlock","getBlockIndex","hasBlockMovingClientId","getBlockListSettings","__unstableGetEditorMode","getNextBlockClientId","getPreviousBlockClientId","canMoveBlock","getActiveBlockVariation","getBlockType","index","name","attributes","blockType","orientation","match","blockMovingMode","editorMode","icon","label","canMove","setNavigationMode","removeBlock","current","blockElement","getBlockRootClientId","getClientIdsOfDescendants","getSelectedBlockClientId","getMultiSelectedBlocksEndClientId","selectBlock","clearSelectedBlock","setBlockMovingClientId","moveBlockToPosition","onKeyDown","event","keyCode","isUp","isDown","isLeft","isRight","isTab","isEscape","isEnter","isSpace","isShift","shiftKey","preventDefault","selectedBlockClientId","selectionEndClientId","selectionBeforeEndClientId","selectionAfterEndClientId","navigateUp","navigateDown","navigateOut","navigateIn","focusedBlockUid","_getBlockRootClientId","_getClientIdsOfDescen","startingBlockClientId","defaultPrevented","sourceRoot","destRoot","sourceBlockIndex","destinationBlockIndex","nextTabbable","tabbable","findNext","contains","ownerDocument","defaultView","frameElement","findPrevious","classNames","dragHandleLabel","showBlockDraggable","className","children","justify","showColors","clientIds","draggableProps","__next40pxDefaultSize","tabIndex","onClick","undefined","showTooltip","maximumLength"],"sources":["@wordpress/block-editor/src/components/block-tools/block-selection-button.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { dragHandle } from '@wordpress/icons';\nimport { Button, Flex, FlexItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { forwardRef, useEffect } from '@wordpress/element';\nimport {\n\tBACKSPACE,\n\tDELETE,\n\tUP,\n\tDOWN,\n\tLEFT,\n\tRIGHT,\n\tTAB,\n\tESCAPE,\n\tENTER,\n\tSPACE,\n} from '@wordpress/keycodes';\nimport {\n\t__experimentalGetAccessibleBlockLabel as getAccessibleBlockLabel,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { speak } from '@wordpress/a11y';\nimport { focus } from '@wordpress/dom';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BlockTitle from '../block-title';\nimport BlockIcon from '../block-icon';\nimport { store as blockEditorStore } from '../../store';\nimport BlockDraggable from '../block-draggable';\nimport { useBlockElement } from '../block-list/use-block-props/use-block-refs';\n\n/**\n * Block selection button component, displaying the label of the block. If the block\n * descends from a root block, a button is displayed enabling the user to select\n * the root block.\n *\n * @param {string} props Component props.\n * @param {string} props.clientId Client ID of block.\n * @param {Object} ref Reference to the component.\n *\n * @return {Component} The component to be rendered.\n */\nfunction BlockSelectionButton( { clientId, rootClientId }, ref ) {\n\tconst selected = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlock,\n\t\t\t\tgetBlockIndex,\n\t\t\t\thasBlockMovingClientId,\n\t\t\t\tgetBlockListSettings,\n\t\t\t\t__unstableGetEditorMode,\n\t\t\t\tgetNextBlockClientId,\n\t\t\t\tgetPreviousBlockClientId,\n\t\t\t\tcanMoveBlock,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { getActiveBlockVariation, getBlockType } =\n\t\t\t\tselect( blocksStore );\n\t\t\tconst index = getBlockIndex( clientId );\n\t\t\tconst { name, attributes } = getBlock( clientId );\n\t\t\tconst blockType = getBlockType( name );\n\t\t\tconst orientation =\n\t\t\t\tgetBlockListSettings( rootClientId )?.orientation;\n\t\t\tconst match = getActiveBlockVariation( name, attributes );\n\n\t\t\treturn {\n\t\t\t\tblockMovingMode: hasBlockMovingClientId(),\n\t\t\t\teditorMode: __unstableGetEditorMode(),\n\t\t\t\ticon: match?.icon || blockType.icon,\n\t\t\t\tlabel: getAccessibleBlockLabel(\n\t\t\t\t\tblockType,\n\t\t\t\t\tattributes,\n\t\t\t\t\tindex + 1,\n\t\t\t\t\torientation\n\t\t\t\t),\n\t\t\t\tcanMove: canMoveBlock( clientId, rootClientId ),\n\t\t\t\tgetNextBlockClientId,\n\t\t\t\tgetPreviousBlockClientId,\n\t\t\t};\n\t\t},\n\t\t[ clientId, rootClientId ]\n\t);\n\tconst { label, icon, blockMovingMode, editorMode, canMove } = selected;\n\tconst { setNavigationMode, removeBlock } = useDispatch( blockEditorStore );\n\n\t// Focus the breadcrumb in navigation mode.\n\tuseEffect( () => {\n\t\tif ( editorMode === 'navigation' ) {\n\t\t\tref.current.focus();\n\t\t\tspeak( label );\n\t\t}\n\t}, [ label, editorMode ] );\n\tconst blockElement = useBlockElement( clientId );\n\n\tconst {\n\t\thasBlockMovingClientId,\n\t\tgetBlockIndex,\n\t\tgetBlockRootClientId,\n\t\tgetClientIdsOfDescendants,\n\t\tgetSelectedBlockClientId,\n\t\tgetMultiSelectedBlocksEndClientId,\n\t\tgetPreviousBlockClientId,\n\t\tgetNextBlockClientId,\n\t} = useSelect( blockEditorStore );\n\tconst {\n\t\tselectBlock,\n\t\tclearSelectedBlock,\n\t\tsetBlockMovingClientId,\n\t\tmoveBlockToPosition,\n\t} = useDispatch( blockEditorStore );\n\n\tfunction onKeyDown( event ) {\n\t\tconst { keyCode } = event;\n\t\tconst isUp = keyCode === UP;\n\t\tconst isDown = keyCode === DOWN;\n\t\tconst isLeft = keyCode === LEFT;\n\t\tconst isRight = keyCode === RIGHT;\n\t\tconst isTab = keyCode === TAB;\n\t\tconst isEscape = keyCode === ESCAPE;\n\t\tconst isEnter = keyCode === ENTER;\n\t\tconst isSpace = keyCode === SPACE;\n\t\tconst isShift = event.shiftKey;\n\n\t\tif ( keyCode === BACKSPACE || keyCode === DELETE ) {\n\t\t\tremoveBlock( clientId );\n\t\t\tevent.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\tconst selectionEndClientId = getMultiSelectedBlocksEndClientId();\n\t\tconst selectionBeforeEndClientId = getPreviousBlockClientId(\n\t\t\tselectionEndClientId || selectedBlockClientId\n\t\t);\n\t\tconst selectionAfterEndClientId = getNextBlockClientId(\n\t\t\tselectionEndClientId || selectedBlockClientId\n\t\t);\n\n\t\tconst navigateUp = ( isTab && isShift ) || isUp;\n\t\tconst navigateDown = ( isTab && ! isShift ) || isDown;\n\t\t// Move out of current nesting level (no effect if at root level).\n\t\tconst navigateOut = isLeft;\n\t\t// Move into next nesting level (no effect if the current block has no innerBlocks).\n\t\tconst navigateIn = isRight;\n\n\t\tlet focusedBlockUid;\n\t\tif ( navigateUp ) {\n\t\t\tfocusedBlockUid = selectionBeforeEndClientId;\n\t\t} else if ( navigateDown ) {\n\t\t\tfocusedBlockUid = selectionAfterEndClientId;\n\t\t} else if ( navigateOut ) {\n\t\t\tfocusedBlockUid =\n\t\t\t\tgetBlockRootClientId( selectedBlockClientId ) ??\n\t\t\t\tselectedBlockClientId;\n\t\t} else if ( navigateIn ) {\n\t\t\tfocusedBlockUid =\n\t\t\t\tgetClientIdsOfDescendants( selectedBlockClientId )[ 0 ] ??\n\t\t\t\tselectedBlockClientId;\n\t\t}\n\t\tconst startingBlockClientId = hasBlockMovingClientId();\n\t\tif ( isEscape && startingBlockClientId && ! event.defaultPrevented ) {\n\t\t\tsetBlockMovingClientId( null );\n\t\t\tevent.preventDefault();\n\t\t}\n\t\tif ( ( isEnter || isSpace ) && startingBlockClientId ) {\n\t\t\tconst sourceRoot = getBlockRootClientId( startingBlockClientId );\n\t\t\tconst destRoot = getBlockRootClientId( selectedBlockClientId );\n\t\t\tconst sourceBlockIndex = getBlockIndex( startingBlockClientId );\n\t\t\tlet destinationBlockIndex = getBlockIndex( selectedBlockClientId );\n\t\t\tif (\n\t\t\t\tsourceBlockIndex < destinationBlockIndex &&\n\t\t\t\tsourceRoot === destRoot\n\t\t\t) {\n\t\t\t\tdestinationBlockIndex -= 1;\n\t\t\t}\n\t\t\tmoveBlockToPosition(\n\t\t\t\tstartingBlockClientId,\n\t\t\t\tsourceRoot,\n\t\t\t\tdestRoot,\n\t\t\t\tdestinationBlockIndex\n\t\t\t);\n\t\t\tselectBlock( startingBlockClientId );\n\t\t\tsetBlockMovingClientId( null );\n\t\t}\n\t\t// Prevent the block from being moved into itself.\n\t\tif (\n\t\t\tstartingBlockClientId &&\n\t\t\tselectedBlockClientId === startingBlockClientId &&\n\t\t\tnavigateIn\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tif ( navigateDown || navigateUp || navigateOut || navigateIn ) {\n\t\t\tif ( focusedBlockUid ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tselectBlock( focusedBlockUid );\n\t\t\t} else if ( isTab && selectedBlockClientId ) {\n\t\t\t\tlet nextTabbable;\n\n\t\t\t\tif ( navigateDown ) {\n\t\t\t\t\tnextTabbable = blockElement;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tnextTabbable = focus.tabbable.findNext( nextTabbable );\n\t\t\t\t\t} while (\n\t\t\t\t\t\tnextTabbable &&\n\t\t\t\t\t\tblockElement.contains( nextTabbable )\n\t\t\t\t\t);\n\n\t\t\t\t\tif ( ! nextTabbable ) {\n\t\t\t\t\t\tnextTabbable =\n\t\t\t\t\t\t\tblockElement.ownerDocument.defaultView.frameElement;\n\t\t\t\t\t\tnextTabbable = focus.tabbable.findNext( nextTabbable );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tnextTabbable = focus.tabbable.findPrevious( blockElement );\n\t\t\t\t}\n\n\t\t\t\tif ( nextTabbable ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tnextTabbable.focus();\n\t\t\t\t\tclearSelectedBlock();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tconst classNames = clsx(\n\t\t'block-editor-block-list__block-selection-button',\n\t\t{\n\t\t\t'is-block-moving-mode': !! blockMovingMode,\n\t\t}\n\t);\n\n\tconst dragHandleLabel = __( 'Drag' );\n\tconst showBlockDraggable = canMove && editorMode === 'navigation';\n\n\treturn (\n\t\t<div className={ classNames }>\n\t\t\t<Flex\n\t\t\t\tjustify=\"center\"\n\t\t\t\tclassName=\"block-editor-block-list__block-selection-button__content\"\n\t\t\t>\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<BlockIcon icon={ icon } showColors />\n\t\t\t\t</FlexItem>\n\t\t\t\t{ showBlockDraggable && (\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<BlockDraggable clientIds={ [ clientId ] }>\n\t\t\t\t\t\t\t{ ( draggableProps ) => (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\t\t\t\t\t\ticon={ dragHandle }\n\t\t\t\t\t\t\t\t\tclassName=\"block-selection-button_drag-handle\"\n\t\t\t\t\t\t\t\t\tlabel={ dragHandleLabel }\n\t\t\t\t\t\t\t\t\t// Should not be able to tab to drag handle as this\n\t\t\t\t\t\t\t\t\t// button can only be used with a pointer device.\n\t\t\t\t\t\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t\t\t\t\t\t{ ...draggableProps }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</BlockDraggable>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t) }\n\t\t\t\t{ editorMode === 'navigation' && (\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\teditorMode === 'navigation'\n\t\t\t\t\t\t\t\t\t? () => setNavigationMode( false )\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\tshowTooltip={ false }\n\t\t\t\t\t\t\tclassName=\"block-selection-button_select-button\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BlockTitle\n\t\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\t\tmaximumLength={ 35 }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t) }\n\t\t\t</Flex>\n\t\t</div>\n\t);\n}\n\nexport default forwardRef( BlockSelectionButton );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SA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AI,CACpB;QAAC,CACK;MAAC,CACA,CACV;IAAA,CACI;EAAC,CACH,CAAC;AAER;AAEA,eAAexH,UAAU,CAAE4B,oBAAqB,CAAC","ignoreList":[]}
@@ -1,49 +0,0 @@
1
- /**
2
- * External dependencies
3
- */
4
- import clsx from 'clsx';
5
-
6
- /**
7
- * WordPress dependencies
8
- */
9
- import { forwardRef } from '@wordpress/element';
10
-
11
- /**
12
- * Internal dependencies
13
- */
14
- import BlockSelectionButton from './block-selection-button';
15
- import { PrivateBlockPopover } from '../block-popover';
16
- import useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';
17
- import useSelectedBlockToolProps from './use-selected-block-tool-props';
18
- import { jsx as _jsx } from "react/jsx-runtime";
19
- function BlockToolbarBreadcrumb({
20
- clientId,
21
- __unstableContentRef
22
- }, ref) {
23
- const {
24
- capturingClientId,
25
- isInsertionPointVisible,
26
- lastClientId,
27
- rootClientId
28
- } = useSelectedBlockToolProps(clientId);
29
- const popoverProps = useBlockToolbarPopoverProps({
30
- contentElement: __unstableContentRef?.current,
31
- clientId
32
- });
33
- return /*#__PURE__*/_jsx(PrivateBlockPopover, {
34
- clientId: capturingClientId || clientId,
35
- bottomClientId: lastClientId,
36
- className: clsx('block-editor-block-list__block-popover', {
37
- 'is-insertion-point-visible': isInsertionPointVisible
38
- }),
39
- resize: false,
40
- ...popoverProps,
41
- children: /*#__PURE__*/_jsx(BlockSelectionButton, {
42
- ref: ref,
43
- clientId: clientId,
44
- rootClientId: rootClientId
45
- })
46
- });
47
- }
48
- export default forwardRef(BlockToolbarBreadcrumb);
49
- //# sourceMappingURL=block-toolbar-breadcrumb.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["clsx","forwardRef","BlockSelectionButton","PrivateBlockPopover","useBlockToolbarPopoverProps","useSelectedBlockToolProps","jsx","_jsx","BlockToolbarBreadcrumb","clientId","__unstableContentRef","ref","capturingClientId","isInsertionPointVisible","lastClientId","rootClientId","popoverProps","contentElement","current","bottomClientId","className","resize","children"],"sources":["@wordpress/block-editor/src/components/block-tools/block-toolbar-breadcrumb.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockSelectionButton from './block-selection-button';\nimport { PrivateBlockPopover } from '../block-popover';\nimport useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';\nimport useSelectedBlockToolProps from './use-selected-block-tool-props';\n\nfunction BlockToolbarBreadcrumb( { clientId, __unstableContentRef }, ref ) {\n\tconst {\n\t\tcapturingClientId,\n\t\tisInsertionPointVisible,\n\t\tlastClientId,\n\t\trootClientId,\n\t} = useSelectedBlockToolProps( clientId );\n\n\tconst popoverProps = useBlockToolbarPopoverProps( {\n\t\tcontentElement: __unstableContentRef?.current,\n\t\tclientId,\n\t} );\n\n\treturn (\n\t\t<PrivateBlockPopover\n\t\t\tclientId={ capturingClientId || clientId }\n\t\t\tbottomClientId={ lastClientId }\n\t\t\tclassName={ clsx( 'block-editor-block-list__block-popover', {\n\t\t\t\t'is-insertion-point-visible': isInsertionPointVisible,\n\t\t\t} ) }\n\t\t\tresize={ false }\n\t\t\t{ ...popoverProps }\n\t\t>\n\t\t\t<BlockSelectionButton\n\t\t\t\tref={ ref }\n\t\t\t\tclientId={ clientId }\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t/>\n\t\t</PrivateBlockPopover>\n\t);\n}\n\nexport default forwardRef( BlockToolbarBreadcrumb );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,SAASC,mBAAmB,QAAQ,kBAAkB;AACtD,OAAOC,2BAA2B,MAAM,mCAAmC;AAC3E,OAAOC,yBAAyB,MAAM,iCAAiC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAExE,SAASC,sBAAsBA,CAAE;EAAEC,QAAQ;EAAEC;AAAqB,CAAC,EAAEC,GAAG,EAAG;EAC1E,MAAM;IACLC,iBAAiB;IACjBC,uBAAuB;IACvBC,YAAY;IACZC;EACD,CAAC,GAAGV,yBAAyB,CAAEI,QAAS,CAAC;EAEzC,MAAMO,YAAY,GAAGZ,2BAA2B,CAAE;IACjDa,cAAc,EAAEP,oBAAoB,EAAEQ,OAAO;IAC7CT;EACD,CAAE,CAAC;EAEH,oBACCF,IAAA,CAACJ,mBAAmB;IACnBM,QAAQ,EAAGG,iBAAiB,IAAIH,QAAU;IAC1CU,cAAc,EAAGL,YAAc;IAC/BM,SAAS,EAAGpB,IAAI,CAAE,wCAAwC,EAAE;MAC3D,4BAA4B,EAAEa;IAC/B,CAAE,CAAG;IACLQ,MAAM,EAAG,KAAO;IAAA,GACXL,YAAY;IAAAM,QAAA,eAEjBf,IAAA,CAACL,oBAAoB;MACpBS,GAAG,EAAGA,GAAK;MACXF,QAAQ,EAAGA,QAAU;MACrBM,YAAY,EAAGA;IAAc,CAC7B;EAAC,CACkB,CAAC;AAExB;AAEA,eAAed,UAAU,CAAEO,sBAAuB,CAAC","ignoreList":[]}
@@ -1,72 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { Button, privateApis as componentsPrivateApis } from '@wordpress/components';
5
- import { __ } from '@wordpress/i18n';
6
- import { forwardRef } from '@wordpress/element';
7
- import { closeSmall } from '@wordpress/icons';
8
-
9
- /**
10
- * Internal dependencies
11
- */
12
- import { unlock } from '../../lock-unlock';
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import { jsxs as _jsxs } from "react/jsx-runtime";
15
- const {
16
- Tabs
17
- } = unlock(componentsPrivateApis);
18
- const blocksTab = {
19
- name: 'blocks',
20
- /* translators: Blocks tab title in the block inserter. */
21
- title: __('Blocks')
22
- };
23
- const patternsTab = {
24
- name: 'patterns',
25
- /* translators: Theme and Directory Patterns tab title in the block inserter. */
26
- title: __('Patterns')
27
- };
28
- const mediaTab = {
29
- name: 'media',
30
- /* translators: Media tab title in the block inserter. */
31
- title: __('Media')
32
- };
33
- function InserterTabs({
34
- onSelect,
35
- children,
36
- onClose,
37
- selectedTab
38
- }, ref) {
39
- const tabs = [blocksTab, patternsTab, mediaTab];
40
- return /*#__PURE__*/_jsx("div", {
41
- className: "block-editor-inserter__tabs",
42
- ref: ref,
43
- children: /*#__PURE__*/_jsxs(Tabs, {
44
- onSelect: onSelect,
45
- selectedTabId: selectedTab,
46
- children: [/*#__PURE__*/_jsxs("div", {
47
- className: "block-editor-inserter__tablist-and-close-button",
48
- children: [/*#__PURE__*/_jsx(Button, {
49
- className: "block-editor-inserter__close-button",
50
- icon: closeSmall,
51
- label: __('Close block inserter'),
52
- onClick: () => onClose(),
53
- size: "small"
54
- }), /*#__PURE__*/_jsx(Tabs.TabList, {
55
- className: "block-editor-inserter__tablist",
56
- children: tabs.map(tab => /*#__PURE__*/_jsx(Tabs.Tab, {
57
- tabId: tab.name,
58
- className: "block-editor-inserter__tab",
59
- children: tab.title
60
- }, tab.name))
61
- })]
62
- }), tabs.map(tab => /*#__PURE__*/_jsx(Tabs.TabPanel, {
63
- tabId: tab.name,
64
- focusable: false,
65
- className: "block-editor-inserter__tabpanel",
66
- children: children
67
- }, tab.name))]
68
- })
69
- });
70
- }
71
- export default forwardRef(InserterTabs);
72
- //# sourceMappingURL=tabs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Button","privateApis","componentsPrivateApis","__","forwardRef","closeSmall","unlock","jsx","_jsx","jsxs","_jsxs","Tabs","blocksTab","name","title","patternsTab","mediaTab","InserterTabs","onSelect","children","onClose","selectedTab","ref","tabs","className","selectedTabId","icon","label","onClick","size","TabList","map","tab","Tab","tabId","TabPanel","focusable"],"sources":["@wordpress/block-editor/src/components/inserter/tabs.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst blocksTab = {\n\tname: 'blocks',\n\t/* translators: Blocks tab title in the block inserter. */\n\ttitle: __( 'Blocks' ),\n};\nconst patternsTab = {\n\tname: 'patterns',\n\t/* translators: Theme and Directory Patterns tab title in the block inserter. */\n\ttitle: __( 'Patterns' ),\n};\n\nconst mediaTab = {\n\tname: 'media',\n\t/* translators: Media tab title in the block inserter. */\n\ttitle: __( 'Media' ),\n};\n\nfunction InserterTabs( { onSelect, children, onClose, selectedTab }, ref ) {\n\tconst tabs = [ blocksTab, patternsTab, mediaTab ];\n\n\treturn (\n\t\t<div className=\"block-editor-inserter__tabs\" ref={ ref }>\n\t\t\t<Tabs onSelect={ onSelect } selectedTabId={ selectedTab }>\n\t\t\t\t<div className=\"block-editor-inserter__tablist-and-close-button\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"block-editor-inserter__close-button\"\n\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\tlabel={ __( 'Close block inserter' ) }\n\t\t\t\t\t\tonClick={ () => onClose() }\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t/>\n\n\t\t\t\t\t<Tabs.TabList className=\"block-editor-inserter__tablist\">\n\t\t\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\t\tkey={ tab.name }\n\t\t\t\t\t\t\t\ttabId={ tab.name }\n\t\t\t\t\t\t\t\tclassName=\"block-editor-inserter__tab\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ tab.title }\n\t\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</Tabs.TabList>\n\t\t\t\t</div>\n\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\t\tkey={ tab.name }\n\t\t\t\t\t\ttabId={ tab.name }\n\t\t\t\t\t\tfocusable={ false }\n\t\t\t\t\t\tclassName=\"block-editor-inserter__tabpanel\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t) ) }\n\t\t\t</Tabs>\n\t\t</div>\n\t);\n}\n\nexport default forwardRef( InserterTabs );\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,MAAM,EACNC,WAAW,IAAIC,qBAAqB,QAC9B,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,UAAU,QAAQ,kBAAkB;;AAE7C;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE3C,MAAM;EAAEC;AAAK,CAAC,GAAGL,MAAM,CAAEJ,qBAAsB,CAAC;AAEhD,MAAMU,SAAS,GAAG;EACjBC,IAAI,EAAE,QAAQ;EACd;EACAC,KAAK,EAAEX,EAAE,CAAE,QAAS;AACrB,CAAC;AACD,MAAMY,WAAW,GAAG;EACnBF,IAAI,EAAE,UAAU;EAChB;EACAC,KAAK,EAAEX,EAAE,CAAE,UAAW;AACvB,CAAC;AAED,MAAMa,QAAQ,GAAG;EAChBH,IAAI,EAAE,OAAO;EACb;EACAC,KAAK,EAAEX,EAAE,CAAE,OAAQ;AACpB,CAAC;AAED,SAASc,YAAYA,CAAE;EAAEC,QAAQ;EAAEC,QAAQ;EAAEC,OAAO;EAAEC;AAAY,CAAC,EAAEC,GAAG,EAAG;EAC1E,MAAMC,IAAI,GAAG,CAAEX,SAAS,EAAEG,WAAW,EAAEC,QAAQ,CAAE;EAEjD,oBACCR,IAAA;IAAKgB,SAAS,EAAC,6BAA6B;IAACF,GAAG,EAAGA,GAAK;IAAAH,QAAA,eACvDT,KAAA,CAACC,IAAI;MAACO,QAAQ,EAAGA,QAAU;MAACO,aAAa,EAAGJ,WAAa;MAAAF,QAAA,gBACxDT,KAAA;QAAKc,SAAS,EAAC,iDAAiD;QAAAL,QAAA,gBAC/DX,IAAA,CAACR,MAAM;UACNwB,SAAS,EAAC,qCAAqC;UAC/CE,IAAI,EAAGrB,UAAY;UACnBsB,KAAK,EAAGxB,EAAE,CAAE,sBAAuB,CAAG;UACtCyB,OAAO,EAAGA,CAAA,KAAMR,OAAO,CAAC,CAAG;UAC3BS,IAAI,EAAC;QAAO,CACZ,CAAC,eAEFrB,IAAA,CAACG,IAAI,CAACmB,OAAO;UAACN,SAAS,EAAC,gCAAgC;UAAAL,QAAA,EACrDI,IAAI,CAACQ,GAAG,CAAIC,GAAG,iBAChBxB,IAAA,CAACG,IAAI,CAACsB,GAAG;YAERC,KAAK,EAAGF,GAAG,CAACnB,IAAM;YAClBW,SAAS,EAAC,4BAA4B;YAAAL,QAAA,EAEpCa,GAAG,CAAClB;UAAK,GAJLkB,GAAG,CAACnB,IAKD,CACT;QAAC,CACU,CAAC;MAAA,CACX,CAAC,EACJU,IAAI,CAACQ,GAAG,CAAIC,GAAG,iBAChBxB,IAAA,CAACG,IAAI,CAACwB,QAAQ;QAEbD,KAAK,EAAGF,GAAG,CAACnB,IAAM;QAClBuB,SAAS,EAAG,KAAO;QACnBZ,SAAS,EAAC,iCAAiC;QAAAL,QAAA,EAEzCA;MAAQ,GALJa,GAAG,CAACnB,IAMI,CACd,CAAC;IAAA,CACE;EAAC,CACH,CAAC;AAER;AAEA,eAAeT,UAAU,CAAEa,YAAa,CAAC","ignoreList":[]}
@@ -1,35 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { __experimentalUseSlotFills as useSlotFills } from '@wordpress/components';
5
- import warning from '@wordpress/warning';
6
-
7
- /**
8
- * Internal dependencies
9
- */
10
- import groups from './groups';
11
-
12
- export function useHasAnyBlockControls() {
13
- let hasAnyBlockControls = false;
14
- for ( const group in groups ) {
15
- // It is safe to violate the rules of hooks here as the `groups` object
16
- // is static and will not change length between renders. Do not return
17
- // early as that will cause the hook to be called a different number of
18
- // times between renders.
19
- // eslint-disable-next-line react-hooks/rules-of-hooks
20
- if ( useHasBlockControls( group ) ) {
21
- hasAnyBlockControls = true;
22
- }
23
- }
24
- return hasAnyBlockControls;
25
- }
26
-
27
- export function useHasBlockControls( group = 'default' ) {
28
- const Slot = groups[ group ]?.Slot;
29
- const fills = useSlotFills( Slot?.__unstableName );
30
- if ( ! Slot ) {
31
- warning( `Unknown BlockControls group "${ group }" provided.` );
32
- return null;
33
- }
34
- return !! fills?.length;
35
- }
@@ -1,46 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { useSelect, useDispatch } from '@wordpress/data';
5
- import { useRefEffect } from '@wordpress/compose';
6
-
7
- /**
8
- * Internal dependencies
9
- */
10
- import { store as blockEditorStore } from '../../../store';
11
-
12
- /**
13
- * Allows navigation mode to be exited by clicking in the selected block.
14
- *
15
- * @param {string} clientId Block client ID.
16
- */
17
- export function useNavModeExit( clientId ) {
18
- const { isNavigationMode, isBlockSelected } = useSelect( blockEditorStore );
19
- const { setNavigationMode, selectBlock } = useDispatch( blockEditorStore );
20
- return useRefEffect(
21
- ( node ) => {
22
- function onMouseDown( event ) {
23
- // Don't select a block if it's already handled by a child
24
- // block.
25
- if ( isNavigationMode() && ! event.defaultPrevented ) {
26
- // Prevent focus from moving to the block.
27
- event.preventDefault();
28
-
29
- // When clicking on a selected block, exit navigation mode.
30
- if ( isBlockSelected( clientId ) ) {
31
- setNavigationMode( false );
32
- } else {
33
- selectBlock( clientId );
34
- }
35
- }
36
- }
37
-
38
- node.addEventListener( 'mousedown', onMouseDown );
39
-
40
- return () => {
41
- node.removeEventListener( 'mousedown', onMouseDown );
42
- };
43
- },
44
- [ clientId, isNavigationMode, isBlockSelected, setNavigationMode ]
45
- );
46
- }