@wordpress/block-editor 13.3.0 → 14.0.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 (554) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +11 -5
  3. package/build/components/alignment-control/ui.js +2 -2
  4. package/build/components/alignment-control/ui.js.map +1 -1
  5. package/build/components/block-alignment-control/ui.js +1 -1
  6. package/build/components/block-alignment-control/ui.js.map +1 -1
  7. package/build/components/block-alignment-control/ui.native.js +1 -1
  8. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  9. package/build/components/block-breadcrumb/index.js +3 -1
  10. package/build/components/block-breadcrumb/index.js.map +1 -1
  11. package/build/components/block-draggable/index.js +2 -2
  12. package/build/components/block-draggable/index.js.map +1 -1
  13. package/build/components/block-inspector/index.js +6 -3
  14. package/build/components/block-inspector/index.js.map +1 -1
  15. package/build/components/block-list/use-block-props/index.js +3 -1
  16. package/build/components/block-list/use-block-props/index.js.map +1 -1
  17. package/build/components/block-list/use-block-props/use-block-refs.js +26 -27
  18. package/build/components/block-list/use-block-props/use-block-refs.js.map +1 -1
  19. package/build/components/block-list/use-block-props/use-is-hovered.js +25 -9
  20. package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  21. package/build/components/block-list/use-in-between-inserter.js +3 -2
  22. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  23. package/build/components/block-lock/modal.js +2 -0
  24. package/build/components/block-lock/modal.js.map +1 -1
  25. package/build/components/block-mover/index.js +1 -2
  26. package/build/components/block-mover/index.js.map +1 -1
  27. package/build/components/block-popover/cover.js +1 -1
  28. package/build/components/block-popover/cover.js.map +1 -1
  29. package/build/components/block-popover/inbetween.js +2 -2
  30. package/build/components/block-popover/inbetween.js.map +1 -1
  31. package/build/components/block-popover/index.js +2 -2
  32. package/build/components/block-popover/index.js.map +1 -1
  33. package/build/components/block-removal-warning-modal/index.js +2 -0
  34. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  35. package/build/components/block-switcher/index.js +1 -1
  36. package/build/components/block-switcher/index.js.map +1 -1
  37. package/build/components/block-switcher/pattern-transformations-menu.js +11 -12
  38. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  39. package/build/components/block-switcher/preview-block-popover.js +20 -17
  40. package/build/components/block-switcher/preview-block-popover.js.map +1 -1
  41. package/build/components/block-toolbar/shuffle.js +5 -2
  42. package/build/components/block-toolbar/shuffle.js.map +1 -1
  43. package/build/components/block-tools/block-selection-button.js +1 -2
  44. package/build/components/block-tools/block-selection-button.js.map +1 -1
  45. package/build/components/block-tools/index.js +1 -1
  46. package/build/components/block-tools/index.js.map +1 -1
  47. package/build/components/block-tools/use-block-toolbar-popover-props.js +1 -1
  48. package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  49. package/build/components/block-tools/use-show-block-tools.js +7 -8
  50. package/build/components/block-tools/use-show-block-tools.js.map +1 -1
  51. package/build/components/block-tools/zoom-out-mode-inserter-button.js +45 -0
  52. package/build/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -0
  53. package/build/components/block-tools/zoom-out-mode-inserters.js +35 -36
  54. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  55. package/build/components/block-tools/zoom-out-popover.js +2 -1
  56. package/build/components/block-tools/zoom-out-popover.js.map +1 -1
  57. package/build/components/block-tools/zoom-out-toolbar.js +1 -2
  58. package/build/components/block-tools/zoom-out-toolbar.js.map +1 -1
  59. package/build/components/child-layout-control/index.js +3 -1
  60. package/build/components/child-layout-control/index.js.map +1 -1
  61. package/build/components/date-format-picker/index.js +2 -11
  62. package/build/components/date-format-picker/index.js.map +1 -1
  63. package/build/components/default-block-appender/index.js +7 -4
  64. package/build/components/default-block-appender/index.js.map +1 -1
  65. package/build/components/dimensions-tool/scale-tool.js +1 -0
  66. package/build/components/dimensions-tool/scale-tool.js.map +1 -1
  67. package/build/components/font-appearance-control/index.js +2 -7
  68. package/build/components/font-appearance-control/index.js.map +1 -1
  69. package/build/components/font-family/index.js +12 -0
  70. package/build/components/font-family/index.js.map +1 -1
  71. package/build/components/global-styles/background-panel.js +63 -52
  72. package/build/components/global-styles/background-panel.js.map +1 -1
  73. package/build/components/global-styles/hooks.js +5 -1
  74. package/build/components/global-styles/hooks.js.map +1 -1
  75. package/build/components/global-styles/image-settings-panel.js +1 -0
  76. package/build/components/global-styles/image-settings-panel.js.map +1 -1
  77. package/build/components/global-styles/theme-file-uri-utils.js +0 -59
  78. package/build/components/global-styles/theme-file-uri-utils.js.map +1 -1
  79. package/build/components/global-styles/typography-panel.js +26 -44
  80. package/build/components/global-styles/typography-panel.js.map +1 -1
  81. package/build/components/global-styles/typography-utils.js +78 -7
  82. package/build/components/global-styles/typography-utils.js.map +1 -1
  83. package/build/components/global-styles/use-global-styles-output.js +82 -44
  84. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  85. package/build/components/global-styles/utils.js +96 -0
  86. package/build/components/global-styles/utils.js.map +1 -1
  87. package/build/components/grid/grid-item-movers.js +93 -44
  88. package/build/components/grid/grid-item-movers.js.map +1 -1
  89. package/build/components/grid/grid-item-resizer.js +14 -15
  90. package/build/components/grid/grid-item-resizer.js.map +1 -1
  91. package/build/components/grid/grid-visualizer.js +2 -2
  92. package/build/components/grid/grid-visualizer.js.map +1 -1
  93. package/build/components/grid/use-grid-layout-sync.js +93 -45
  94. package/build/components/grid/use-grid-layout-sync.js.map +1 -1
  95. package/build/components/iframe/index.js +4 -8
  96. package/build/components/iframe/index.js.map +1 -1
  97. package/build/components/index.js +1 -9
  98. package/build/components/index.js.map +1 -1
  99. package/build/components/inner-blocks/index.js +1 -1
  100. package/build/components/inner-blocks/index.js.map +1 -1
  101. package/build/components/inserter/block-patterns-tab/patterns-filter.js +20 -23
  102. package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  103. package/build/components/inserter/category-tabs/index.js +29 -2
  104. package/build/components/inserter/category-tabs/index.js.map +1 -1
  105. package/build/components/inserter/media-tab/media-panel.js +1 -0
  106. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  107. package/build/components/inserter/menu.js +3 -3
  108. package/build/components/inserter/menu.js.map +1 -1
  109. package/build/components/inserter/preview-panel.js +20 -3
  110. package/build/components/inserter/preview-panel.js.map +1 -1
  111. package/build/components/inserter-draggable-blocks/index.js +10 -3
  112. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  113. package/build/components/inspector-controls-tabs/settings-tab.js +1 -2
  114. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  115. package/build/components/line-height-control/index.js +0 -15
  116. package/build/components/line-height-control/index.js.map +1 -1
  117. package/build/components/link-control/search-input.js +0 -1
  118. package/build/components/link-control/search-input.js.map +1 -1
  119. package/build/components/list-view/block-select-button.js +2 -6
  120. package/build/components/list-view/block-select-button.js.map +1 -1
  121. package/build/components/list-view/block.js +2 -2
  122. package/build/components/list-view/block.js.map +1 -1
  123. package/build/components/list-view/utils.js +3 -1
  124. package/build/components/list-view/utils.js.map +1 -1
  125. package/build/components/media-replace-flow/index.js +3 -1
  126. package/build/components/media-replace-flow/index.js.map +1 -1
  127. package/build/components/resolution-tool/index.js +1 -0
  128. package/build/components/resolution-tool/index.js.map +1 -1
  129. package/build/components/rich-text/format-toolbar/index.js +1 -1
  130. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  131. package/build/components/rich-text/index.js +1 -1
  132. package/build/components/rich-text/index.js.map +1 -1
  133. package/build/components/skip-to-selected-block/index.js +4 -2
  134. package/build/components/skip-to-selected-block/index.js.map +1 -1
  135. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +8 -8
  136. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  137. package/build/components/url-input/button.js +0 -1
  138. package/build/components/url-input/button.js.map +1 -1
  139. package/build/components/url-input/index.js +1 -11
  140. package/build/components/url-input/index.js.map +1 -1
  141. package/build/components/url-popover/image-url-input-ui.js +3 -3
  142. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  143. package/build/components/url-popover/link-editor.js +0 -1
  144. package/build/components/url-popover/link-editor.js.map +1 -1
  145. package/build/components/use-block-drop-zone/index.js +30 -4
  146. package/build/components/use-block-drop-zone/index.js.map +1 -1
  147. package/build/components/use-on-block-drop/index.js +3 -6
  148. package/build/components/use-on-block-drop/index.js.map +1 -1
  149. package/build/components/use-resize-canvas/index.js +1 -3
  150. package/build/components/use-resize-canvas/index.js.map +1 -1
  151. package/build/components/use-settings/index.js +2 -1
  152. package/build/components/use-settings/index.js.map +1 -1
  153. package/build/hooks/block-bindings.js +248 -36
  154. package/build/hooks/block-bindings.js.map +1 -1
  155. package/build/hooks/block-hooks.js +1 -0
  156. package/build/hooks/block-hooks.js.map +1 -1
  157. package/build/hooks/block-style-variation.js +2 -2
  158. package/build/hooks/block-style-variation.js.map +1 -1
  159. package/build/hooks/contrast-checker.js +6 -6
  160. package/build/hooks/contrast-checker.js.map +1 -1
  161. package/build/hooks/duotone.js +3 -3
  162. package/build/hooks/duotone.js.map +1 -1
  163. package/build/hooks/grid-visualizer.js +5 -8
  164. package/build/hooks/grid-visualizer.js.map +1 -1
  165. package/build/hooks/index.js +7 -1
  166. package/build/hooks/index.js.map +1 -1
  167. package/build/hooks/layout-child.js +9 -2
  168. package/build/hooks/layout-child.js.map +1 -1
  169. package/build/hooks/line-height.js +0 -1
  170. package/build/hooks/line-height.js.map +1 -1
  171. package/build/hooks/position.js +3 -7
  172. package/build/hooks/position.js.map +1 -1
  173. package/build/hooks/spacing-visualizer.js +1 -1
  174. package/build/hooks/spacing-visualizer.js.map +1 -1
  175. package/build/hooks/use-bindings-attributes.js +85 -50
  176. package/build/hooks/use-bindings-attributes.js.map +1 -1
  177. package/build/hooks/use-zoom-out.js +1 -1
  178. package/build/hooks/use-zoom-out.js.map +1 -1
  179. package/build/hooks/utils.js +20 -0
  180. package/build/hooks/utils.js.map +1 -1
  181. package/build/index.js +7 -0
  182. package/build/index.js.map +1 -1
  183. package/build/layouts/constrained.js +6 -2
  184. package/build/layouts/constrained.js.map +1 -1
  185. package/build/layouts/grid.js +2 -0
  186. package/build/layouts/grid.js.map +1 -1
  187. package/build/private-apis.js +0 -4
  188. package/build/private-apis.js.map +1 -1
  189. package/build/store/actions.js +27 -2
  190. package/build/store/actions.js.map +1 -1
  191. package/build/store/reducer.js +19 -1
  192. package/build/store/reducer.js.map +1 -1
  193. package/build/store/selectors.js +17 -5
  194. package/build/store/selectors.js.map +1 -1
  195. package/build/utils/get-editor-region.js +1 -1
  196. package/build/utils/get-editor-region.js.map +1 -1
  197. package/build/utils/get-px-from-css-unit.js +1 -1
  198. package/build/utils/get-px-from-css-unit.js.map +1 -1
  199. package/build-module/components/alignment-control/ui.js +2 -2
  200. package/build-module/components/alignment-control/ui.js.map +1 -1
  201. package/build-module/components/block-alignment-control/ui.js +1 -1
  202. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  203. package/build-module/components/block-alignment-control/ui.native.js +1 -1
  204. package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
  205. package/build-module/components/block-breadcrumb/index.js +4 -2
  206. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  207. package/build-module/components/block-draggable/index.js +3 -3
  208. package/build-module/components/block-draggable/index.js.map +1 -1
  209. package/build-module/components/block-inspector/index.js +6 -3
  210. package/build-module/components/block-inspector/index.js.map +1 -1
  211. package/build-module/components/block-list/use-block-props/index.js +3 -1
  212. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  213. package/build-module/components/block-list/use-block-props/use-block-refs.js +27 -30
  214. package/build-module/components/block-list/use-block-props/use-block-refs.js.map +1 -1
  215. package/build-module/components/block-list/use-block-props/use-is-hovered.js +26 -9
  216. package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  217. package/build-module/components/block-list/use-in-between-inserter.js +3 -2
  218. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  219. package/build-module/components/block-lock/modal.js +2 -0
  220. package/build-module/components/block-lock/modal.js.map +1 -1
  221. package/build-module/components/block-mover/index.js +1 -2
  222. package/build-module/components/block-mover/index.js.map +1 -1
  223. package/build-module/components/block-popover/cover.js +1 -1
  224. package/build-module/components/block-popover/cover.js.map +1 -1
  225. package/build-module/components/block-popover/inbetween.js +1 -1
  226. package/build-module/components/block-popover/inbetween.js.map +1 -1
  227. package/build-module/components/block-popover/index.js +1 -1
  228. package/build-module/components/block-popover/index.js.map +1 -1
  229. package/build-module/components/block-removal-warning-modal/index.js +2 -0
  230. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  231. package/build-module/components/block-switcher/index.js +1 -1
  232. package/build-module/components/block-switcher/index.js.map +1 -1
  233. package/build-module/components/block-switcher/pattern-transformations-menu.js +12 -13
  234. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  235. package/build-module/components/block-switcher/preview-block-popover.js +20 -17
  236. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  237. package/build-module/components/block-toolbar/shuffle.js +5 -2
  238. package/build-module/components/block-toolbar/shuffle.js.map +1 -1
  239. package/build-module/components/block-tools/block-selection-button.js +1 -2
  240. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  241. package/build-module/components/block-tools/index.js +1 -1
  242. package/build-module/components/block-tools/index.js.map +1 -1
  243. package/build-module/components/block-tools/use-block-toolbar-popover-props.js +1 -1
  244. package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  245. package/build-module/components/block-tools/use-show-block-tools.js +7 -8
  246. package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
  247. package/build-module/components/block-tools/zoom-out-mode-inserter-button.js +37 -0
  248. package/build-module/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -0
  249. package/build-module/components/block-tools/zoom-out-mode-inserters.js +37 -38
  250. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  251. package/build-module/components/block-tools/zoom-out-popover.js +2 -1
  252. package/build-module/components/block-tools/zoom-out-popover.js.map +1 -1
  253. package/build-module/components/block-tools/zoom-out-toolbar.js +1 -2
  254. package/build-module/components/block-tools/zoom-out-toolbar.js.map +1 -1
  255. package/build-module/components/child-layout-control/index.js +3 -1
  256. package/build-module/components/child-layout-control/index.js.map +1 -1
  257. package/build-module/components/date-format-picker/index.js +4 -12
  258. package/build-module/components/date-format-picker/index.js.map +1 -1
  259. package/build-module/components/default-block-appender/index.js +7 -4
  260. package/build-module/components/default-block-appender/index.js.map +1 -1
  261. package/build-module/components/dimensions-tool/scale-tool.js +1 -0
  262. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
  263. package/build-module/components/font-appearance-control/index.js +3 -6
  264. package/build-module/components/font-appearance-control/index.js.map +1 -1
  265. package/build-module/components/font-family/index.js +11 -0
  266. package/build-module/components/font-family/index.js.map +1 -1
  267. package/build-module/components/global-styles/background-panel.js +63 -52
  268. package/build-module/components/global-styles/background-panel.js.map +1 -1
  269. package/build-module/components/global-styles/hooks.js +5 -1
  270. package/build-module/components/global-styles/hooks.js.map +1 -1
  271. package/build-module/components/global-styles/image-settings-panel.js +1 -0
  272. package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
  273. package/build-module/components/global-styles/theme-file-uri-utils.js +0 -58
  274. package/build-module/components/global-styles/theme-file-uri-utils.js.map +1 -1
  275. package/build-module/components/global-styles/typography-panel.js +27 -45
  276. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  277. package/build-module/components/global-styles/typography-utils.js +76 -7
  278. package/build-module/components/global-styles/typography-utils.js.map +1 -1
  279. package/build-module/components/global-styles/use-global-styles-output.js +81 -43
  280. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  281. package/build-module/components/global-styles/utils.js +92 -0
  282. package/build-module/components/global-styles/utils.js.map +1 -1
  283. package/build-module/components/grid/grid-item-movers.js +96 -46
  284. package/build-module/components/grid/grid-item-movers.js.map +1 -1
  285. package/build-module/components/grid/grid-item-resizer.js +14 -15
  286. package/build-module/components/grid/grid-item-resizer.js.map +1 -1
  287. package/build-module/components/grid/grid-visualizer.js +2 -2
  288. package/build-module/components/grid/grid-visualizer.js.map +1 -1
  289. package/build-module/components/grid/use-grid-layout-sync.js +94 -46
  290. package/build-module/components/grid/use-grid-layout-sync.js.map +1 -1
  291. package/build-module/components/iframe/index.js +4 -8
  292. package/build-module/components/iframe/index.js.map +1 -1
  293. package/build-module/components/index.js +0 -5
  294. package/build-module/components/index.js.map +1 -1
  295. package/build-module/components/inner-blocks/index.js +1 -1
  296. package/build-module/components/inner-blocks/index.js.map +1 -1
  297. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +20 -23
  298. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  299. package/build-module/components/inserter/category-tabs/index.js +30 -3
  300. package/build-module/components/inserter/category-tabs/index.js.map +1 -1
  301. package/build-module/components/inserter/media-tab/media-panel.js +1 -0
  302. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  303. package/build-module/components/inserter/menu.js +3 -3
  304. package/build-module/components/inserter/menu.js.map +1 -1
  305. package/build-module/components/inserter/preview-panel.js +20 -3
  306. package/build-module/components/inserter/preview-panel.js.map +1 -1
  307. package/build-module/components/inserter-draggable-blocks/index.js +10 -3
  308. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  309. package/build-module/components/inspector-controls-tabs/settings-tab.js +1 -2
  310. package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  311. package/build-module/components/line-height-control/index.js +0 -14
  312. package/build-module/components/line-height-control/index.js.map +1 -1
  313. package/build-module/components/link-control/search-input.js +0 -1
  314. package/build-module/components/link-control/search-input.js.map +1 -1
  315. package/build-module/components/list-view/block-select-button.js +3 -7
  316. package/build-module/components/list-view/block-select-button.js.map +1 -1
  317. package/build-module/components/list-view/block.js +2 -2
  318. package/build-module/components/list-view/block.js.map +1 -1
  319. package/build-module/components/list-view/utils.js +3 -1
  320. package/build-module/components/list-view/utils.js.map +1 -1
  321. package/build-module/components/media-replace-flow/index.js +3 -1
  322. package/build-module/components/media-replace-flow/index.js.map +1 -1
  323. package/build-module/components/resolution-tool/index.js +1 -0
  324. package/build-module/components/resolution-tool/index.js.map +1 -1
  325. package/build-module/components/rich-text/format-toolbar/index.js +1 -1
  326. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  327. package/build-module/components/rich-text/index.js +1 -1
  328. package/build-module/components/rich-text/index.js.map +1 -1
  329. package/build-module/components/skip-to-selected-block/index.js +5 -3
  330. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  331. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +8 -8
  332. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  333. package/build-module/components/url-input/button.js +0 -1
  334. package/build-module/components/url-input/button.js.map +1 -1
  335. package/build-module/components/url-input/index.js +1 -11
  336. package/build-module/components/url-input/index.js.map +1 -1
  337. package/build-module/components/url-popover/image-url-input-ui.js +3 -3
  338. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  339. package/build-module/components/url-popover/link-editor.js +0 -1
  340. package/build-module/components/url-popover/link-editor.js.map +1 -1
  341. package/build-module/components/use-block-drop-zone/index.js +30 -4
  342. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  343. package/build-module/components/use-on-block-drop/index.js +3 -6
  344. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  345. package/build-module/components/use-resize-canvas/index.js +1 -3
  346. package/build-module/components/use-resize-canvas/index.js.map +1 -1
  347. package/build-module/components/use-settings/index.js +2 -1
  348. package/build-module/components/use-settings/index.js.map +1 -1
  349. package/build-module/hooks/block-bindings.js +253 -40
  350. package/build-module/hooks/block-bindings.js.map +1 -1
  351. package/build-module/hooks/block-hooks.js +1 -0
  352. package/build-module/hooks/block-hooks.js.map +1 -1
  353. package/build-module/hooks/block-style-variation.js +3 -3
  354. package/build-module/hooks/block-style-variation.js.map +1 -1
  355. package/build-module/hooks/contrast-checker.js +7 -7
  356. package/build-module/hooks/contrast-checker.js.map +1 -1
  357. package/build-module/hooks/duotone.js +4 -4
  358. package/build-module/hooks/duotone.js.map +1 -1
  359. package/build-module/hooks/grid-visualizer.js +5 -8
  360. package/build-module/hooks/grid-visualizer.js.map +1 -1
  361. package/build-module/hooks/index.js +2 -1
  362. package/build-module/hooks/index.js.map +1 -1
  363. package/build-module/hooks/layout-child.js +9 -2
  364. package/build-module/hooks/layout-child.js.map +1 -1
  365. package/build-module/hooks/line-height.js +0 -1
  366. package/build-module/hooks/line-height.js.map +1 -1
  367. package/build-module/hooks/position.js +3 -7
  368. package/build-module/hooks/position.js.map +1 -1
  369. package/build-module/hooks/spacing-visualizer.js +1 -1
  370. package/build-module/hooks/spacing-visualizer.js.map +1 -1
  371. package/build-module/hooks/use-bindings-attributes.js +84 -51
  372. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  373. package/build-module/hooks/use-zoom-out.js +1 -1
  374. package/build-module/hooks/use-zoom-out.js.map +1 -1
  375. package/build-module/hooks/utils.js +19 -0
  376. package/build-module/hooks/utils.js.map +1 -1
  377. package/build-module/index.js +1 -1
  378. package/build-module/index.js.map +1 -1
  379. package/build-module/layouts/constrained.js +6 -2
  380. package/build-module/layouts/constrained.js.map +1 -1
  381. package/build-module/layouts/grid.js +2 -0
  382. package/build-module/layouts/grid.js.map +1 -1
  383. package/build-module/private-apis.js +1 -5
  384. package/build-module/private-apis.js.map +1 -1
  385. package/build-module/store/actions.js +24 -1
  386. package/build-module/store/actions.js.map +1 -1
  387. package/build-module/store/reducer.js +18 -1
  388. package/build-module/store/reducer.js.map +1 -1
  389. package/build-module/store/selectors.js +14 -4
  390. package/build-module/store/selectors.js.map +1 -1
  391. package/build-module/utils/get-editor-region.js +1 -1
  392. package/build-module/utils/get-editor-region.js.map +1 -1
  393. package/build-module/utils/get-px-from-css-unit.js +1 -1
  394. package/build-module/utils/get-px-from-css-unit.js.map +1 -1
  395. package/build-style/content-rtl.css +11 -18
  396. package/build-style/content.css +11 -18
  397. package/build-style/default-editor-styles-rtl.css +3 -0
  398. package/build-style/default-editor-styles.css +3 -0
  399. package/build-style/style-rtl.css +242 -136
  400. package/build-style/style.css +242 -136
  401. package/build-types/components/block-context/index.d.ts +2 -2
  402. package/build-types/components/block-context/index.d.ts.map +1 -1
  403. package/build-types/utils/dom.d.ts.map +1 -1
  404. package/package.json +31 -31
  405. package/src/autocompleters/style.scss +4 -0
  406. package/src/components/alignment-control/ui.js +2 -2
  407. package/src/components/block-alignment-control/ui.js +1 -1
  408. package/src/components/block-alignment-control/ui.native.js +1 -1
  409. package/src/components/block-breadcrumb/index.js +4 -2
  410. package/src/components/block-canvas/style.scss +1 -0
  411. package/src/components/block-context/README.md +4 -4
  412. package/src/components/block-draggable/index.js +3 -3
  413. package/src/components/block-inspector/index.js +8 -4
  414. package/src/components/block-list/content.scss +2 -16
  415. package/src/components/block-list/use-block-props/index.js +1 -1
  416. package/src/components/block-list/use-block-props/use-block-refs.js +30 -30
  417. package/src/components/block-list/use-block-props/use-is-hovered.js +26 -11
  418. package/src/components/block-list/use-in-between-inserter.js +5 -1
  419. package/src/components/block-lock/modal.js +10 -2
  420. package/src/components/block-lock/style.scss +4 -8
  421. package/src/components/block-mover/index.js +5 -2
  422. package/src/components/block-patterns-paging/style.scss +0 -23
  423. package/src/components/block-popover/cover.js +1 -1
  424. package/src/components/block-popover/inbetween.js +1 -1
  425. package/src/components/block-popover/index.js +1 -1
  426. package/src/components/block-removal-warning-modal/index.js +10 -2
  427. package/src/components/block-switcher/index.js +1 -1
  428. package/src/components/block-switcher/pattern-transformations-menu.js +17 -15
  429. package/src/components/block-switcher/preview-block-popover.js +20 -14
  430. package/src/components/block-switcher/style.scss +8 -17
  431. package/src/components/block-toolbar/shuffle.js +8 -1
  432. package/src/components/block-tools/block-selection-button.js +1 -2
  433. package/src/components/block-tools/index.js +5 -6
  434. package/src/components/block-tools/style.scss +8 -0
  435. package/src/components/block-tools/use-block-toolbar-popover-props.js +1 -1
  436. package/src/components/block-tools/use-show-block-tools.js +12 -9
  437. package/src/components/block-tools/zoom-out-mode-inserter-button.js +47 -0
  438. package/src/components/block-tools/zoom-out-mode-inserters.js +48 -42
  439. package/src/components/block-tools/zoom-out-popover.js +1 -0
  440. package/src/components/block-tools/zoom-out-toolbar.js +1 -2
  441. package/src/components/button-block-appender/content.scss +1 -1
  442. package/src/components/child-layout-control/index.js +2 -0
  443. package/src/components/color-palette/test/__snapshots__/control.js.snap +2 -2
  444. package/src/components/colors-gradients/test/control.js +3 -2
  445. package/src/components/date-format-picker/index.js +2 -11
  446. package/src/components/default-block-appender/index.js +11 -4
  447. package/src/components/dimensions-tool/scale-tool.js +1 -0
  448. package/src/components/font-appearance-control/index.js +1 -5
  449. package/src/components/font-family/README.md +8 -0
  450. package/src/components/font-family/index.js +16 -0
  451. package/src/components/font-family/stories/index.story.js +54 -0
  452. package/src/components/global-styles/background-panel.js +90 -62
  453. package/src/components/global-styles/hooks.js +5 -1
  454. package/src/components/global-styles/image-settings-panel.js +1 -0
  455. package/src/components/global-styles/style.scss +11 -9
  456. package/src/components/global-styles/test/theme-file-uri-utils.js +1 -26
  457. package/src/components/global-styles/test/typography-utils.js +325 -0
  458. package/src/components/global-styles/test/use-global-styles-output.js +52 -5
  459. package/src/components/global-styles/test/utils.js +120 -0
  460. package/src/components/global-styles/theme-file-uri-utils.js +0 -59
  461. package/src/components/global-styles/typography-panel.js +36 -45
  462. package/src/components/global-styles/typography-utils.js +103 -7
  463. package/src/components/global-styles/use-global-styles-output.js +89 -50
  464. package/src/components/global-styles/utils.js +112 -0
  465. package/src/components/grid/grid-item-movers.js +141 -69
  466. package/src/components/grid/grid-item-resizer.js +11 -17
  467. package/src/components/grid/grid-visualizer.js +2 -2
  468. package/src/components/grid/style.scss +164 -0
  469. package/src/components/grid/use-grid-layout-sync.js +133 -40
  470. package/src/components/iframe/content.scss +3 -3
  471. package/src/components/iframe/index.js +3 -7
  472. package/src/components/index.js +0 -5
  473. package/src/components/inner-blocks/index.js +4 -1
  474. package/src/components/inserter/block-patterns-tab/patterns-filter.js +40 -44
  475. package/src/components/inserter/category-tabs/index.js +35 -2
  476. package/src/components/inserter/media-tab/media-panel.js +1 -0
  477. package/src/components/inserter/menu.js +3 -3
  478. package/src/components/inserter/preview-panel.js +27 -4
  479. package/src/components/inserter/style.scss +66 -47
  480. package/src/components/inserter-draggable-blocks/index.js +11 -3
  481. package/src/components/inspector-controls/README.md +5 -0
  482. package/src/components/inspector-controls-tabs/settings-tab.js +0 -2
  483. package/src/components/inspector-controls-tabs/style.scss +0 -21
  484. package/src/components/line-height-control/README.md +0 -8
  485. package/src/components/line-height-control/index.js +1 -21
  486. package/src/components/line-height-control/stories/index.story.js +0 -1
  487. package/src/components/line-height-control/test/index.js +1 -7
  488. package/src/components/link-control/search-input.js +0 -1
  489. package/src/components/list-view/block-select-button.js +3 -13
  490. package/src/components/list-view/block.js +10 -3
  491. package/src/components/list-view/style.scss +2 -1
  492. package/src/components/list-view/utils.js +13 -2
  493. package/src/components/media-replace-flow/README.md +7 -0
  494. package/src/components/media-replace-flow/index.js +3 -1
  495. package/src/components/resolution-tool/index.js +1 -0
  496. package/src/components/responsive-block-control/test/index.js +5 -1
  497. package/src/components/rich-text/format-toolbar/index.js +1 -1
  498. package/src/components/rich-text/index.js +1 -1
  499. package/src/components/skip-to-selected-block/index.js +5 -3
  500. package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +6 -7
  501. package/src/components/tabbed-sidebar/style.scss +1 -19
  502. package/src/components/url-input/README.md +0 -5
  503. package/src/components/url-input/button.js +0 -1
  504. package/src/components/url-input/index.js +1 -15
  505. package/src/components/url-popover/image-url-input-ui.js +3 -3
  506. package/src/components/url-popover/link-editor.js +0 -1
  507. package/src/components/url-popover/style.scss +1 -0
  508. package/src/components/use-block-drop-zone/index.js +66 -14
  509. package/src/components/use-on-block-drop/index.js +1 -9
  510. package/src/components/use-resize-canvas/index.js +1 -3
  511. package/src/components/use-settings/index.js +2 -1
  512. package/src/hooks/block-bindings.js +303 -52
  513. package/src/hooks/block-bindings.scss +13 -2
  514. package/src/hooks/block-hooks.js +1 -0
  515. package/src/hooks/block-hooks.scss +1 -0
  516. package/src/hooks/block-style-variation.js +3 -3
  517. package/src/hooks/contrast-checker.js +7 -7
  518. package/src/hooks/duotone.js +4 -4
  519. package/src/hooks/grid-visualizer.js +5 -7
  520. package/src/hooks/index.js +2 -1
  521. package/src/hooks/layout-child.js +12 -3
  522. package/src/hooks/line-height.js +0 -1
  523. package/src/hooks/position.js +3 -13
  524. package/src/hooks/spacing-visualizer.js +1 -1
  525. package/src/hooks/use-bindings-attributes.js +93 -59
  526. package/src/hooks/use-editor-wrapper-styles.native.scss +1 -0
  527. package/src/hooks/use-zoom-out.js +1 -1
  528. package/src/hooks/utils.js +14 -1
  529. package/src/index.js +1 -0
  530. package/src/layouts/constrained.js +10 -2
  531. package/src/layouts/grid.js +2 -0
  532. package/src/private-apis.js +1 -8
  533. package/src/store/actions.js +28 -5
  534. package/src/store/reducer.js +18 -0
  535. package/src/store/selectors.js +14 -4
  536. package/src/style.scss +1 -1
  537. package/src/utils/get-editor-region.js +1 -1
  538. package/src/utils/get-px-from-css-unit.js +1 -1
  539. package/tsconfig.tsbuildinfo +1 -1
  540. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +0 -30
  541. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +0 -1
  542. package/build/components/inserter/reusable-block-rename-hint.js +0 -71
  543. package/build/components/inserter/reusable-block-rename-hint.js.map +0 -1
  544. package/build/components/inspector-controls-tabs/settings-tab-hint.js +0 -53
  545. package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +0 -1
  546. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +0 -23
  547. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +0 -1
  548. package/build-module/components/inserter/reusable-block-rename-hint.js +0 -64
  549. package/build-module/components/inserter/reusable-block-rename-hint.js.map +0 -1
  550. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js +0 -47
  551. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +0 -1
  552. package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +0 -25
  553. package/src/components/inserter/reusable-block-rename-hint.js +0 -69
  554. package/src/components/inspector-controls-tabs/settings-tab-hint.js +0 -52
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_dom","_components","_keyboardShortcuts","_element","_blocks","_a11y","_i18n","_emptyBlockInserter","_interopRequireDefault","_insertionPoint","_interopRequireWildcard","_blockToolbarPopover","_blockToolbarBreadcrumb","_zoomOutPopover","_store","_usePopoverScroll","_zoomOutModeInserters","_useShowBlockTools","_lockUnlock","_getEditorRegion","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","selector","select","getSelectedBlockClientId","getFirstMultiSelectedBlockClientId","getSettings","__unstableGetEditorMode","isTyping","blockEditorStore","clientId","editorMode","hasFixedToolbar","isZoomOutMode","BlockTools","children","__unstableContentRef","props","useSelect","isMatch","useShortcutEventMatch","getBlocksByClientId","getSelectedBlockClientIds","getBlockRootClientId","isGroupable","getGroupingBlockName","blocksStore","showEmptyBlockSideInserter","showBreadcrumb","showBlockToolbarPopover","showZoomOutToolbar","useShowBlockTools","clearSelectedBlock","duplicateBlocks","removeBlocks","replaceBlocks","insertAfterBlock","insertBeforeBlock","selectBlock","moveBlocksUp","moveBlocksDown","expandBlock","unlock","useDispatch","blockSelectionButtonRef","useRef","onKeyDown","event","defaultPrevented","clientIds","length","preventDefault","rootClientId","target","closest","current","getEditorRegion","focus","isTextField","contentWindow","document","activeElement","blocks","groupingBlockName","newBlocks","switchToBlockType","speak","__","blockToolbarRef","usePopoverScroll","blockToolbarAfterRef","jsx","jsxs","InsertionPointOpenRef","Provider","value","ref","Popover","Slot","name","window","__experimentalEnableZoomedOutPatternsTab"],"sources":["@wordpress/block-editor/src/components/block-tools/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { isTextField } from '@wordpress/dom';\nimport { Popover } from '@wordpress/components';\nimport { __unstableUseShortcutEventMatch as useShortcutEventMatch } from '@wordpress/keyboard-shortcuts';\nimport { useRef } from '@wordpress/element';\nimport { switchToBlockType, store as blocksStore } from '@wordpress/blocks';\nimport { speak } from '@wordpress/a11y';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport EmptyBlockInserter from './empty-block-inserter';\nimport {\n\tInsertionPointOpenRef,\n\tdefault as InsertionPoint,\n} from './insertion-point';\nimport BlockToolbarPopover from './block-toolbar-popover';\nimport BlockToolbarBreadcrumb from './block-toolbar-breadcrumb';\nimport ZoomOutPopover from './zoom-out-popover';\nimport { store as blockEditorStore } from '../../store';\nimport usePopoverScroll from '../block-popover/use-popover-scroll';\nimport ZoomOutModeInserters from './zoom-out-mode-inserters';\nimport { useShowBlockTools } from './use-show-block-tools';\nimport { unlock } from '../../lock-unlock';\nimport getEditorRegion from '../../utils/get-editor-region';\n\nfunction selector( select ) {\n\tconst {\n\t\tgetSelectedBlockClientId,\n\t\tgetFirstMultiSelectedBlockClientId,\n\t\tgetSettings,\n\t\t__unstableGetEditorMode,\n\t\tisTyping,\n\t} = select( blockEditorStore );\n\n\tconst clientId =\n\t\tgetSelectedBlockClientId() || getFirstMultiSelectedBlockClientId();\n\n\tconst editorMode = __unstableGetEditorMode();\n\n\treturn {\n\t\tclientId,\n\t\thasFixedToolbar: getSettings().hasFixedToolbar,\n\t\tisTyping: isTyping(),\n\t\tisZoomOutMode: editorMode === 'zoom-out',\n\t};\n}\n\n/**\n * Renders block tools (the block toolbar, select/navigation mode toolbar, the\n * insertion point and a slot for the inline rich text toolbar). Must be wrapped\n * around the block content and editor styles wrapper or iframe.\n *\n * @param {Object} $0 Props.\n * @param {Object} $0.children The block content and style container.\n * @param {Object} $0.__unstableContentRef Ref holding the content scroll container.\n */\nexport default function BlockTools( {\n\tchildren,\n\t__unstableContentRef,\n\t...props\n} ) {\n\tconst { clientId, hasFixedToolbar, isTyping, isZoomOutMode } = useSelect(\n\t\tselector,\n\t\t[]\n\t);\n\tconst isMatch = useShortcutEventMatch();\n\tconst {\n\t\tgetBlocksByClientId,\n\t\tgetSelectedBlockClientIds,\n\t\tgetBlockRootClientId,\n\t\tisGroupable,\n\t} = useSelect( blockEditorStore );\n\tconst { getGroupingBlockName } = useSelect( blocksStore );\n\tconst {\n\t\tshowEmptyBlockSideInserter,\n\t\tshowBreadcrumb,\n\t\tshowBlockToolbarPopover,\n\t\tshowZoomOutToolbar,\n\t} = useShowBlockTools();\n\n\tconst {\n\t\tclearSelectedBlock,\n\t\tduplicateBlocks,\n\t\tremoveBlocks,\n\t\treplaceBlocks,\n\t\tinsertAfterBlock,\n\t\tinsertBeforeBlock,\n\t\tselectBlock,\n\t\tmoveBlocksUp,\n\t\tmoveBlocksDown,\n\t\texpandBlock,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\n\tconst blockSelectionButtonRef = useRef();\n\n\tfunction onKeyDown( event ) {\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isMatch( 'core/block-editor/move-up', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst rootClientId = getBlockRootClientId( clientIds[ 0 ] );\n\t\t\t\tmoveBlocksUp( clientIds, rootClientId );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/move-down', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst rootClientId = getBlockRootClientId( clientIds[ 0 ] );\n\t\t\t\tmoveBlocksDown( clientIds, rootClientId );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/duplicate', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tduplicateBlocks( clientIds );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/remove', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tremoveBlocks( clientIds );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/insert-after', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tinsertAfterBlock( clientIds[ clientIds.length - 1 ] );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/insert-before', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tinsertBeforeBlock( clientIds[ 0 ] );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/unselect', event ) ) {\n\t\t\tif ( event.target.closest( '[role=toolbar]' ) ) {\n\t\t\t\t// This shouldn't be necessary, but we have a combination of a few things all combining to create a situation where:\n\t\t\t\t// - Because the block toolbar uses createPortal to populate the block toolbar fills, we can't rely on the React event bubbling to hit the onKeyDown listener for the block toolbar\n\t\t\t\t// - Since we can't use the React tree, we use the DOM tree which _should_ handle the event bubbling correctly from a `createPortal` element.\n\t\t\t\t// - This bubbles via the React tree, which hits this `unselect` escape keypress before the block toolbar DOM event listener has access to it.\n\t\t\t\t// An alternative would be to remove the addEventListener on the navigableToolbar and use this event to handle it directly right here. That feels hacky too though.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length > 1 ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\t// If there is more than one block selected, select the first\n\t\t\t\t// block so that focus is directed back to the beginning of the selection.\n\t\t\t\t// In effect, to the user this feels like deselecting the multi-selection.\n\t\t\t\tselectBlock( clientIds[ 0 ] );\n\t\t\t} else if (\n\t\t\t\tclientIds.length === 1 &&\n\t\t\t\tevent.target === blockSelectionButtonRef?.current\n\t\t\t) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tclearSelectedBlock();\n\t\t\t\tgetEditorRegion( __unstableContentRef.current )?.focus();\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/collapse-list-view', event ) ) {\n\t\t\t// If focus is currently within a text field, such as a rich text block or other editable field,\n\t\t\t// skip collapsing the list view, and allow the keyboard shortcut to be handled by the text field.\n\t\t\t// This condition checks for both the active element and the active element within an iframed editor.\n\t\t\tif (\n\t\t\t\tisTextField( event.target ) ||\n\t\t\t\tisTextField(\n\t\t\t\t\tevent.target?.contentWindow?.document?.activeElement\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\texpandBlock( clientId );\n\t\t} else if ( isMatch( 'core/block-editor/group', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length > 1 && isGroupable( clientIds ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst blocks = getBlocksByClientId( clientIds );\n\t\t\t\tconst groupingBlockName = getGroupingBlockName();\n\t\t\t\tconst newBlocks = switchToBlockType(\n\t\t\t\t\tblocks,\n\t\t\t\t\tgroupingBlockName\n\t\t\t\t);\n\t\t\t\treplaceBlocks( clientIds, newBlocks );\n\t\t\t\tspeak( __( 'Selected blocks are grouped.' ) );\n\t\t\t}\n\t\t}\n\t}\n\tconst blockToolbarRef = usePopoverScroll( __unstableContentRef );\n\tconst blockToolbarAfterRef = usePopoverScroll( __unstableContentRef );\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div { ...props } onKeyDown={ onKeyDown }>\n\t\t\t<InsertionPointOpenRef.Provider value={ useRef( false ) }>\n\t\t\t\t{ ! isTyping && (\n\t\t\t\t\t<InsertionPoint\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ showEmptyBlockSideInserter && (\n\t\t\t\t\t<EmptyBlockInserter\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ showBlockToolbarPopover && (\n\t\t\t\t\t<BlockToolbarPopover\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\tisTyping={ isTyping }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ showBreadcrumb && (\n\t\t\t\t\t<BlockToolbarBreadcrumb\n\t\t\t\t\t\tref={ blockSelectionButtonRef }\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ showZoomOutToolbar && (\n\t\t\t\t\t<ZoomOutPopover\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ /* Used for the inline rich text toolbar. Until this toolbar is combined into BlockToolbar, someone implementing their own BlockToolbar will also need to use this to see the image caption toolbar. */ }\n\t\t\t\t{ ! isZoomOutMode && ! hasFixedToolbar && (\n\t\t\t\t\t<Popover.Slot\n\t\t\t\t\t\tname=\"block-toolbar\"\n\t\t\t\t\t\tref={ blockToolbarRef }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t\t{ /* Used for inline rich text popovers. */ }\n\t\t\t\t<Popover.Slot\n\t\t\t\t\tname=\"__unstable-block-tools-after\"\n\t\t\t\t\tref={ blockToolbarAfterRef }\n\t\t\t\t/>\n\t\t\t\t{ window.__experimentalEnableZoomedOutPatternsTab &&\n\t\t\t\t\tisZoomOutMode && (\n\t\t\t\t\t\t<ZoomOutModeInserters\n\t\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t</InsertionPointOpenRef.Provider>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AAKA,IAAAQ,mBAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,eAAA,GAAAC,uBAAA,CAAAX,OAAA;AAIA,IAAAY,oBAAA,GAAAH,sBAAA,CAAAT,OAAA;AACA,IAAAa,uBAAA,GAAAJ,sBAAA,CAAAT,OAAA;AACA,IAAAc,eAAA,GAAAL,sBAAA,CAAAT,OAAA;AACA,IAAAe,MAAA,GAAAf,OAAA;AACA,IAAAgB,iBAAA,GAAAP,sBAAA,CAAAT,OAAA;AACA,IAAAiB,qBAAA,GAAAR,sBAAA,CAAAT,OAAA;AACA,IAAAkB,kBAAA,GAAAlB,OAAA;AACA,IAAAmB,WAAA,GAAAnB,OAAA;AACA,IAAAoB,gBAAA,GAAAX,sBAAA,CAAAT,OAAA;AAA4D,IAAAqB,WAAA,GAAArB,OAAA;AAAA,SAAAsB,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAZ,wBAAAY,CAAA,EAAAE,CAAA,SAA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B,IAAAhD,WAAA,CAAA0F,GAAA,EAACnG,oBAAA,CAAAgB,OAAmB;UACnB4B,oBAAoB,EAAGA,oBAAsB;UAC7CN,QAAQ,EAAGA,QAAU;UACrBF,QAAQ,EAAGA;QAAU,CACrB,CACD,EAECoB,cAAc,iBACf,IAAA/C,WAAA,CAAA0F,GAAA,EAAClG,uBAAA,CAAAe,OAAsB;UACtBwF,GAAG,EAAGhC,uBAAyB;UAC/B5B,oBAAoB,EAAGA,oBAAsB;UAC7CN,QAAQ,EAAGA;QAAU,CACrB,CACD,EAECoB,kBAAkB,iBACnB,IAAAjD,WAAA,CAAA0F,GAAA,EAACjG,eAAA,CAAAc,OAAc;UACd4B,oBAAoB,EAAGA,oBAAsB;UAC7CN,QAAQ,EAAGA;QAAU,CACrB,CACD,EAGC,CAAEG,aAAa,IAAI,CAAED,eAAe,iBACrC,IAAA/B,WAAA,CAAA0F,GAAA,EAAC7G,WAAA,CAAAmH,OAAO,CAACC,IAAI;UACZC,IAAI,EAAC,eAAe;UACpBH,GAAG,EAAGR;QAAiB,CACvB,CACD,EACCrD,QAAQ,eAEV,IAAAlC,WAAA,CAAA0F,GAAA,EAAC7G,WAAA,CAAAmH,OAAO,CAACC,IAAI;UACZC,IAAI,EAAC,8BAA8B;UACnCH,GAAG,EAAGN;QAAsB,CAC5B,CAAC,EACAU,MAAM,CAACC,wCAAwC,IAChDpE,aAAa,iBACZ,IAAAhC,WAAA,CAAA0F,GAAA,EAAC9F,qBAAA,CAAAW,OAAoB;UACpB4B,oBAAoB,EAAGA;QAAsB,CAC7C,CACD;MAAA,CAC6B;IAAC,CAC7B;EAAC;AAER","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_dom","_components","_keyboardShortcuts","_element","_blocks","_a11y","_i18n","_emptyBlockInserter","_interopRequireDefault","_insertionPoint","_interopRequireWildcard","_blockToolbarPopover","_blockToolbarBreadcrumb","_zoomOutPopover","_store","_usePopoverScroll","_zoomOutModeInserters","_useShowBlockTools","_lockUnlock","_getEditorRegion","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","selector","select","getSelectedBlockClientId","getFirstMultiSelectedBlockClientId","getSettings","__unstableGetEditorMode","isTyping","blockEditorStore","clientId","editorMode","hasFixedToolbar","isZoomOutMode","BlockTools","children","__unstableContentRef","props","useSelect","isMatch","useShortcutEventMatch","getBlocksByClientId","getSelectedBlockClientIds","getBlockRootClientId","isGroupable","getGroupingBlockName","blocksStore","showEmptyBlockSideInserter","showBreadcrumb","showBlockToolbarPopover","showZoomOutToolbar","useShowBlockTools","clearSelectedBlock","duplicateBlocks","removeBlocks","replaceBlocks","insertAfterBlock","insertBeforeBlock","selectBlock","moveBlocksUp","moveBlocksDown","expandBlock","unlock","useDispatch","blockSelectionButtonRef","useRef","onKeyDown","event","defaultPrevented","clientIds","length","preventDefault","rootClientId","target","closest","current","getEditorRegion","focus","isTextField","contentWindow","document","activeElement","blocks","groupingBlockName","newBlocks","switchToBlockType","speak","__","blockToolbarRef","usePopoverScroll","blockToolbarAfterRef","jsx","jsxs","InsertionPointOpenRef","Provider","value","ref","Popover","Slot","name"],"sources":["@wordpress/block-editor/src/components/block-tools/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { isTextField } from '@wordpress/dom';\nimport { Popover } from '@wordpress/components';\nimport { __unstableUseShortcutEventMatch as useShortcutEventMatch } from '@wordpress/keyboard-shortcuts';\nimport { useRef } from '@wordpress/element';\nimport { switchToBlockType, store as blocksStore } from '@wordpress/blocks';\nimport { speak } from '@wordpress/a11y';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport EmptyBlockInserter from './empty-block-inserter';\nimport {\n\tInsertionPointOpenRef,\n\tdefault as InsertionPoint,\n} from './insertion-point';\nimport BlockToolbarPopover from './block-toolbar-popover';\nimport BlockToolbarBreadcrumb from './block-toolbar-breadcrumb';\nimport ZoomOutPopover from './zoom-out-popover';\nimport { store as blockEditorStore } from '../../store';\nimport usePopoverScroll from '../block-popover/use-popover-scroll';\nimport ZoomOutModeInserters from './zoom-out-mode-inserters';\nimport { useShowBlockTools } from './use-show-block-tools';\nimport { unlock } from '../../lock-unlock';\nimport getEditorRegion from '../../utils/get-editor-region';\n\nfunction selector( select ) {\n\tconst {\n\t\tgetSelectedBlockClientId,\n\t\tgetFirstMultiSelectedBlockClientId,\n\t\tgetSettings,\n\t\t__unstableGetEditorMode,\n\t\tisTyping,\n\t} = select( blockEditorStore );\n\n\tconst clientId =\n\t\tgetSelectedBlockClientId() || getFirstMultiSelectedBlockClientId();\n\n\tconst editorMode = __unstableGetEditorMode();\n\n\treturn {\n\t\tclientId,\n\t\thasFixedToolbar: getSettings().hasFixedToolbar,\n\t\tisTyping: isTyping(),\n\t\tisZoomOutMode: editorMode === 'zoom-out',\n\t};\n}\n\n/**\n * Renders block tools (the block toolbar, select/navigation mode toolbar, the\n * insertion point and a slot for the inline rich text toolbar). Must be wrapped\n * around the block content and editor styles wrapper or iframe.\n *\n * @param {Object} $0 Props.\n * @param {Object} $0.children The block content and style container.\n * @param {Object} $0.__unstableContentRef Ref holding the content scroll container.\n */\nexport default function BlockTools( {\n\tchildren,\n\t__unstableContentRef,\n\t...props\n} ) {\n\tconst { clientId, hasFixedToolbar, isTyping, isZoomOutMode } = useSelect(\n\t\tselector,\n\t\t[]\n\t);\n\tconst isMatch = useShortcutEventMatch();\n\tconst {\n\t\tgetBlocksByClientId,\n\t\tgetSelectedBlockClientIds,\n\t\tgetBlockRootClientId,\n\t\tisGroupable,\n\t} = useSelect( blockEditorStore );\n\tconst { getGroupingBlockName } = useSelect( blocksStore );\n\tconst {\n\t\tshowEmptyBlockSideInserter,\n\t\tshowBreadcrumb,\n\t\tshowBlockToolbarPopover,\n\t\tshowZoomOutToolbar,\n\t} = useShowBlockTools();\n\n\tconst {\n\t\tclearSelectedBlock,\n\t\tduplicateBlocks,\n\t\tremoveBlocks,\n\t\treplaceBlocks,\n\t\tinsertAfterBlock,\n\t\tinsertBeforeBlock,\n\t\tselectBlock,\n\t\tmoveBlocksUp,\n\t\tmoveBlocksDown,\n\t\texpandBlock,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\n\tconst blockSelectionButtonRef = useRef();\n\n\tfunction onKeyDown( event ) {\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isMatch( 'core/block-editor/move-up', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst rootClientId = getBlockRootClientId( clientIds[ 0 ] );\n\t\t\t\tmoveBlocksUp( clientIds, rootClientId );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/move-down', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst rootClientId = getBlockRootClientId( clientIds[ 0 ] );\n\t\t\t\tmoveBlocksDown( clientIds, rootClientId );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/duplicate', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tduplicateBlocks( clientIds );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/remove', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tremoveBlocks( clientIds );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/insert-after', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tinsertAfterBlock( clientIds[ clientIds.length - 1 ] );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/insert-before', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tinsertBeforeBlock( clientIds[ 0 ] );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/unselect', event ) ) {\n\t\t\tif ( event.target.closest( '[role=toolbar]' ) ) {\n\t\t\t\t// This shouldn't be necessary, but we have a combination of a few things all combining to create a situation where:\n\t\t\t\t// - Because the block toolbar uses createPortal to populate the block toolbar fills, we can't rely on the React event bubbling to hit the onKeyDown listener for the block toolbar\n\t\t\t\t// - Since we can't use the React tree, we use the DOM tree which _should_ handle the event bubbling correctly from a `createPortal` element.\n\t\t\t\t// - This bubbles via the React tree, which hits this `unselect` escape keypress before the block toolbar DOM event listener has access to it.\n\t\t\t\t// An alternative would be to remove the addEventListener on the navigableToolbar and use this event to handle it directly right here. That feels hacky too though.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length > 1 ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\t// If there is more than one block selected, select the first\n\t\t\t\t// block so that focus is directed back to the beginning of the selection.\n\t\t\t\t// In effect, to the user this feels like deselecting the multi-selection.\n\t\t\t\tselectBlock( clientIds[ 0 ] );\n\t\t\t} else if (\n\t\t\t\tclientIds.length === 1 &&\n\t\t\t\tevent.target === blockSelectionButtonRef?.current\n\t\t\t) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tclearSelectedBlock();\n\t\t\t\tgetEditorRegion( __unstableContentRef.current )?.focus();\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/collapse-list-view', event ) ) {\n\t\t\t// If focus is currently within a text field, such as a rich text block or other editable field,\n\t\t\t// skip collapsing the list view, and allow the keyboard shortcut to be handled by the text field.\n\t\t\t// This condition checks for both the active element and the active element within an iframed editor.\n\t\t\tif (\n\t\t\t\tisTextField( event.target ) ||\n\t\t\t\tisTextField(\n\t\t\t\t\tevent.target?.contentWindow?.document?.activeElement\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\texpandBlock( clientId );\n\t\t} else if ( isMatch( 'core/block-editor/group', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length > 1 && isGroupable( clientIds ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst blocks = getBlocksByClientId( clientIds );\n\t\t\t\tconst groupingBlockName = getGroupingBlockName();\n\t\t\t\tconst newBlocks = switchToBlockType(\n\t\t\t\t\tblocks,\n\t\t\t\t\tgroupingBlockName\n\t\t\t\t);\n\t\t\t\treplaceBlocks( clientIds, newBlocks );\n\t\t\t\tspeak( __( 'Selected blocks are grouped.' ) );\n\t\t\t}\n\t\t}\n\t}\n\tconst blockToolbarRef = usePopoverScroll( __unstableContentRef );\n\tconst blockToolbarAfterRef = usePopoverScroll( __unstableContentRef );\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div { ...props } onKeyDown={ onKeyDown }>\n\t\t\t<InsertionPointOpenRef.Provider value={ useRef( false ) }>\n\t\t\t\t{ ! isTyping && (\n\t\t\t\t\t<InsertionPoint\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ showEmptyBlockSideInserter && (\n\t\t\t\t\t<EmptyBlockInserter\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ showBlockToolbarPopover && (\n\t\t\t\t\t<BlockToolbarPopover\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\tisTyping={ isTyping }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ showBreadcrumb && (\n\t\t\t\t\t<BlockToolbarBreadcrumb\n\t\t\t\t\t\tref={ blockSelectionButtonRef }\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ showZoomOutToolbar && (\n\t\t\t\t\t<ZoomOutPopover\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ /* Used for the inline rich text toolbar. Until this toolbar is combined into BlockToolbar, someone implementing their own BlockToolbar will also need to use this to see the image caption toolbar. */ }\n\t\t\t\t{ ! isZoomOutMode && ! hasFixedToolbar && (\n\t\t\t\t\t<Popover.Slot\n\t\t\t\t\t\tname=\"block-toolbar\"\n\t\t\t\t\t\tref={ blockToolbarRef }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t\t{ /* Used for inline rich text popovers. */ }\n\t\t\t\t<Popover.Slot\n\t\t\t\t\tname=\"__unstable-block-tools-after\"\n\t\t\t\t\tref={ blockToolbarAfterRef }\n\t\t\t\t/>\n\t\t\t\t{ isZoomOutMode && (\n\t\t\t\t\t<ZoomOutModeInserters\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</InsertionPointOpenRef.Provider>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAA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AAU,CACrB,CACD,EAGC,CAAEG,aAAa,IAAI,CAAED,eAAe,iBACrC,IAAA/B,WAAA,CAAA0F,GAAA,EAAC7G,WAAA,CAAAmH,OAAO,CAACC,IAAI;UACZC,IAAI,EAAC,eAAe;UACpBH,GAAG,EAAGR;QAAiB,CACvB,CACD,EACCrD,QAAQ,eAEV,IAAAlC,WAAA,CAAA0F,GAAA,EAAC7G,WAAA,CAAAmH,OAAO,CAACC,IAAI;UACZC,IAAI,EAAC,8BAA8B;UACnCH,GAAG,EAAGN;QAAsB,CAC5B,CAAC,EACAzD,aAAa,iBACd,IAAAhC,WAAA,CAAA0F,GAAA,EAAC9F,qBAAA,CAAAW,OAAoB;UACpB4B,oBAAoB,EAAGA;QAAsB,CAC7C,CACD;MAAA,CAC8B;IAAC,CAC7B;EAAC;AAER","ignoreList":[]}
@@ -97,7 +97,7 @@ function useBlockToolbarPopoverProps({
97
97
  contentElement,
98
98
  clientId
99
99
  }) {
100
- const selectedBlockElement = (0, _useBlockRefs.__unstableUseBlockElement)(clientId);
100
+ const selectedBlockElement = (0, _useBlockRefs.useBlockElement)(clientId);
101
101
  const [toolbarHeight, setToolbarHeight] = (0, _element.useState)(0);
102
102
  const {
103
103
  blockIndex,
@@ -1 +1 @@
1
- {"version":3,"names":["_compose","require","_data","_dom","_element","_store","_useBlockRefs","_position","COMMON_PROPS","placement","DEFAULT_PROPS","flip","shift","RESTRICTED_HEIGHT_PROPS","getProps","contentElement","selectedBlockElement","scrollContainer","toolbarHeight","isSticky","scrollTop","blockRect","getBoundingClientRect","contentRect","topOfContentElementInViewport","top","viewportHeight","ownerDocument","documentElement","clientHeight","restrictedTopArea","hasSpaceForToolbarAbove","isBlockTallerThanViewport","height","useBlockToolbarPopoverProps","clientId","useBlockElement","setToolbarHeight","useState","blockIndex","useSelect","select","getBlockIndex","getBlockAttributes","blockEditorStore","hasStickyOrFixedPositionValue","useMemo","getScrollContainer","props","setProps","popoverRef","useRefEffect","popoverNode","offsetHeight","updateProps","useCallback","useLayoutEffect","contentView","defaultView","addEventHandler","resizeObserver","blockView","ResizeObserver","observe","removeEventHandler","disconnect","ref"],"sources":["@wordpress/block-editor/src/components/block-tools/use-block-toolbar-popover-props.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { getScrollContainer } from '@wordpress/dom';\nimport {\n\tuseCallback,\n\tuseLayoutEffect,\n\tuseMemo,\n\tuseState,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport { hasStickyOrFixedPositionValue } from '../../hooks/position';\n\nconst COMMON_PROPS = {\n\tplacement: 'top-start',\n};\n\n// By default the toolbar sets the `shift` prop. If the user scrolls the page\n// down the toolbar will stay on screen by adopting a sticky position at the\n// top of the viewport.\nconst DEFAULT_PROPS = {\n\t...COMMON_PROPS,\n\tflip: false,\n\tshift: true,\n};\n\n// When there isn't enough height between the top of the block and the editor\n// canvas, the `shift` prop is set to `false`, as it will cause the block to be\n// obscured. The `flip` behavior is enabled, which positions the toolbar below\n// the block. This only happens if the block is smaller than the viewport, as\n// otherwise the toolbar will be off-screen.\nconst RESTRICTED_HEIGHT_PROPS = {\n\t...COMMON_PROPS,\n\tflip: true,\n\tshift: false,\n};\n\n/**\n * Get the popover props for the block toolbar, determined by the space at the top of the canvas and the toolbar height.\n *\n * @param {Element} contentElement The DOM element that represents the editor content or canvas.\n * @param {Element} selectedBlockElement The outer DOM element of the first selected block.\n * @param {Element} scrollContainer The scrollable container for the contentElement.\n * @param {number} toolbarHeight The height of the toolbar in pixels.\n * @param {boolean} isSticky Whether or not the selected block is sticky or fixed.\n *\n * @return {Object} The popover props used to determine the position of the toolbar.\n */\nfunction getProps(\n\tcontentElement,\n\tselectedBlockElement,\n\tscrollContainer,\n\ttoolbarHeight,\n\tisSticky\n) {\n\tif ( ! contentElement || ! selectedBlockElement ) {\n\t\treturn DEFAULT_PROPS;\n\t}\n\n\t// Get how far the content area has been scrolled.\n\tconst scrollTop = scrollContainer?.scrollTop || 0;\n\n\tconst blockRect = selectedBlockElement.getBoundingClientRect();\n\tconst contentRect = contentElement.getBoundingClientRect();\n\n\t// Get the vertical position of top of the visible content area.\n\tconst topOfContentElementInViewport = scrollTop + contentRect.top;\n\n\t// The document element's clientHeight represents the viewport height.\n\tconst viewportHeight =\n\t\tcontentElement.ownerDocument.documentElement.clientHeight;\n\n\t// The restricted height area is calculated as the sum of the\n\t// vertical position of the visible content area, plus the height\n\t// of the block toolbar.\n\tconst restrictedTopArea = topOfContentElementInViewport + toolbarHeight;\n\tconst hasSpaceForToolbarAbove = blockRect.top > restrictedTopArea;\n\n\tconst isBlockTallerThanViewport =\n\t\tblockRect.height > viewportHeight - toolbarHeight;\n\n\t// Sticky blocks are treated as if they will never have enough space for the toolbar above.\n\tif (\n\t\t! isSticky &&\n\t\t( hasSpaceForToolbarAbove || isBlockTallerThanViewport )\n\t) {\n\t\treturn DEFAULT_PROPS;\n\t}\n\n\treturn RESTRICTED_HEIGHT_PROPS;\n}\n\n/**\n * Determines the desired popover positioning behavior, returning a set of appropriate props.\n *\n * @param {Object} elements\n * @param {Element} elements.contentElement The DOM element that represents the editor content or canvas.\n * @param {string} elements.clientId The clientId of the first selected block.\n *\n * @return {Object} The popover props used to determine the position of the toolbar.\n */\nexport default function useBlockToolbarPopoverProps( {\n\tcontentElement,\n\tclientId,\n} ) {\n\tconst selectedBlockElement = useBlockElement( clientId );\n\tconst [ toolbarHeight, setToolbarHeight ] = useState( 0 );\n\tconst { blockIndex, isSticky } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockIndex, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn {\n\t\t\t\tblockIndex: getBlockIndex( clientId ),\n\t\t\t\tisSticky: hasStickyOrFixedPositionValue(\n\t\t\t\t\tgetBlockAttributes( clientId )\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst scrollContainer = useMemo( () => {\n\t\tif ( ! contentElement ) {\n\t\t\treturn;\n\t\t}\n\t\treturn getScrollContainer( contentElement );\n\t}, [ contentElement ] );\n\tconst [ props, setProps ] = useState( () =>\n\t\tgetProps(\n\t\t\tcontentElement,\n\t\t\tselectedBlockElement,\n\t\t\tscrollContainer,\n\t\t\ttoolbarHeight,\n\t\t\tisSticky\n\t\t)\n\t);\n\n\tconst popoverRef = useRefEffect( ( popoverNode ) => {\n\t\tsetToolbarHeight( popoverNode.offsetHeight );\n\t}, [] );\n\n\tconst updateProps = useCallback(\n\t\t() =>\n\t\t\tsetProps(\n\t\t\t\tgetProps(\n\t\t\t\t\tcontentElement,\n\t\t\t\t\tselectedBlockElement,\n\t\t\t\t\tscrollContainer,\n\t\t\t\t\ttoolbarHeight,\n\t\t\t\t\tisSticky\n\t\t\t\t)\n\t\t\t),\n\t\t[ contentElement, selectedBlockElement, scrollContainer, toolbarHeight ]\n\t);\n\n\t// Update props when the block is moved. This also ensures the props are\n\t// correct on initial mount, and when the selected block or content element\n\t// changes (since the callback ref will update).\n\tuseLayoutEffect( updateProps, [ blockIndex, updateProps ] );\n\n\t// Update props when the viewport is resized or the block is resized.\n\tuseLayoutEffect( () => {\n\t\tif ( ! contentElement || ! selectedBlockElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Update the toolbar props on viewport resize.\n\t\tconst contentView = contentElement?.ownerDocument?.defaultView;\n\t\tcontentView?.addEventHandler?.( 'resize', updateProps );\n\n\t\t// Update the toolbar props on block resize.\n\t\tlet resizeObserver;\n\t\tconst blockView = selectedBlockElement?.ownerDocument?.defaultView;\n\t\tif ( blockView.ResizeObserver ) {\n\t\t\tresizeObserver = new blockView.ResizeObserver( updateProps );\n\t\t\tresizeObserver.observe( selectedBlockElement );\n\t\t}\n\n\t\treturn () => {\n\t\t\tcontentView?.removeEventHandler?.( 'resize', updateProps );\n\n\t\t\tif ( resizeObserver ) {\n\t\t\t\tresizeObserver.disconnect();\n\t\t\t}\n\t\t};\n\t}, [ updateProps, contentElement, selectedBlockElement ] );\n\n\treturn {\n\t\t...props,\n\t\tref: popoverRef,\n\t};\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAUA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AAlBA;AACA;AACA;;AAWA;AACA;AACA;;AAKA,MAAMO,YAAY,GAAG;EACpBC,SAAS,EAAE;AACZ,CAAC;;AAED;AACA;AACA;AACA,MAAMC,aAAa,GAAG;EACrB,GAAGF,YAAY;EACfG,IAAI,EAAE,KAAK;EACXC,KAAK,EAAE;AACR,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,GAAG;EAC/B,GAAGL,YAAY;EACfG,IAAI,EAAE,IAAI;EACVC,KAAK,EAAE;AACR,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASE,QAAQA,CAChBC,cAAc,EACdC,oBAAoB,EACpBC,eAAe,EACfC,aAAa,EACbC,QAAQ,EACP;EACD,IAAK,CAAEJ,cAAc,IAAI,CAAEC,oBAAoB,EAAG;IACjD,OAAON,aAAa;EACrB;;EAEA;EACA,MAAMU,SAAS,GAAGH,eAAe,EAAEG,SAAS,IAAI,CAAC;EAEjD,MAAMC,SAAS,GAAGL,oBAAoB,CAACM,qBAAqB,CAAC,CAAC;EAC9D,MAAMC,WAAW,GAAGR,cAAc,CAACO,qBAAqB,CAAC,CAAC;;EAE1D;EACA,MAAME,6BAA6B,GAAGJ,SAAS,GAAGG,WAAW,CAACE,GAAG;;EAEjE;EACA,MAAMC,cAAc,GACn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EAAEvC,cAAc,EAAEC,oBAAoB,CAAG,CAAC;EAE1D,OAAO;IACN,GAAGgC,KAAK;IACRkB,GAAG,EAAEhB;EACN,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["_compose","require","_data","_dom","_element","_store","_useBlockRefs","_position","COMMON_PROPS","placement","DEFAULT_PROPS","flip","shift","RESTRICTED_HEIGHT_PROPS","getProps","contentElement","selectedBlockElement","scrollContainer","toolbarHeight","isSticky","scrollTop","blockRect","getBoundingClientRect","contentRect","topOfContentElementInViewport","top","viewportHeight","ownerDocument","documentElement","clientHeight","restrictedTopArea","hasSpaceForToolbarAbove","isBlockTallerThanViewport","height","useBlockToolbarPopoverProps","clientId","useBlockElement","setToolbarHeight","useState","blockIndex","useSelect","select","getBlockIndex","getBlockAttributes","blockEditorStore","hasStickyOrFixedPositionValue","useMemo","getScrollContainer","props","setProps","popoverRef","useRefEffect","popoverNode","offsetHeight","updateProps","useCallback","useLayoutEffect","contentView","defaultView","addEventHandler","resizeObserver","blockView","ResizeObserver","observe","removeEventHandler","disconnect","ref"],"sources":["@wordpress/block-editor/src/components/block-tools/use-block-toolbar-popover-props.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { getScrollContainer } from '@wordpress/dom';\nimport {\n\tuseCallback,\n\tuseLayoutEffect,\n\tuseMemo,\n\tuseState,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport { hasStickyOrFixedPositionValue } from '../../hooks/position';\n\nconst COMMON_PROPS = {\n\tplacement: 'top-start',\n};\n\n// By default the toolbar sets the `shift` prop. If the user scrolls the page\n// down the toolbar will stay on screen by adopting a sticky position at the\n// top of the viewport.\nconst DEFAULT_PROPS = {\n\t...COMMON_PROPS,\n\tflip: false,\n\tshift: true,\n};\n\n// When there isn't enough height between the top of the block and the editor\n// canvas, the `shift` prop is set to `false`, as it will cause the block to be\n// obscured. The `flip` behavior is enabled, which positions the toolbar below\n// the block. This only happens if the block is smaller than the viewport, as\n// otherwise the toolbar will be off-screen.\nconst RESTRICTED_HEIGHT_PROPS = {\n\t...COMMON_PROPS,\n\tflip: true,\n\tshift: false,\n};\n\n/**\n * Get the popover props for the block toolbar, determined by the space at the top of the canvas and the toolbar height.\n *\n * @param {Element} contentElement The DOM element that represents the editor content or canvas.\n * @param {Element} selectedBlockElement The outer DOM element of the first selected block.\n * @param {Element} scrollContainer The scrollable container for the contentElement.\n * @param {number} toolbarHeight The height of the toolbar in pixels.\n * @param {boolean} isSticky Whether or not the selected block is sticky or fixed.\n *\n * @return {Object} The popover props used to determine the position of the toolbar.\n */\nfunction getProps(\n\tcontentElement,\n\tselectedBlockElement,\n\tscrollContainer,\n\ttoolbarHeight,\n\tisSticky\n) {\n\tif ( ! contentElement || ! selectedBlockElement ) {\n\t\treturn DEFAULT_PROPS;\n\t}\n\n\t// Get how far the content area has been scrolled.\n\tconst scrollTop = scrollContainer?.scrollTop || 0;\n\n\tconst blockRect = selectedBlockElement.getBoundingClientRect();\n\tconst contentRect = contentElement.getBoundingClientRect();\n\n\t// Get the vertical position of top of the visible content area.\n\tconst topOfContentElementInViewport = scrollTop + contentRect.top;\n\n\t// The document element's clientHeight represents the viewport height.\n\tconst viewportHeight =\n\t\tcontentElement.ownerDocument.documentElement.clientHeight;\n\n\t// The restricted height area is calculated as the sum of the\n\t// vertical position of the visible content area, plus the height\n\t// of the block toolbar.\n\tconst restrictedTopArea = topOfContentElementInViewport + toolbarHeight;\n\tconst hasSpaceForToolbarAbove = blockRect.top > restrictedTopArea;\n\n\tconst isBlockTallerThanViewport =\n\t\tblockRect.height > viewportHeight - toolbarHeight;\n\n\t// Sticky blocks are treated as if they will never have enough space for the toolbar above.\n\tif (\n\t\t! isSticky &&\n\t\t( hasSpaceForToolbarAbove || isBlockTallerThanViewport )\n\t) {\n\t\treturn DEFAULT_PROPS;\n\t}\n\n\treturn RESTRICTED_HEIGHT_PROPS;\n}\n\n/**\n * Determines the desired popover positioning behavior, returning a set of appropriate props.\n *\n * @param {Object} elements\n * @param {Element} elements.contentElement The DOM element that represents the editor content or canvas.\n * @param {string} elements.clientId The clientId of the first selected block.\n *\n * @return {Object} The popover props used to determine the position of the toolbar.\n */\nexport default function useBlockToolbarPopoverProps( {\n\tcontentElement,\n\tclientId,\n} ) {\n\tconst selectedBlockElement = useBlockElement( clientId );\n\tconst [ toolbarHeight, setToolbarHeight ] = useState( 0 );\n\tconst { blockIndex, isSticky } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockIndex, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn {\n\t\t\t\tblockIndex: getBlockIndex( clientId ),\n\t\t\t\tisSticky: hasStickyOrFixedPositionValue(\n\t\t\t\t\tgetBlockAttributes( clientId )\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst scrollContainer = useMemo( () => {\n\t\tif ( ! contentElement ) {\n\t\t\treturn;\n\t\t}\n\t\treturn getScrollContainer( contentElement );\n\t}, [ contentElement ] );\n\tconst [ props, setProps ] = useState( () =>\n\t\tgetProps(\n\t\t\tcontentElement,\n\t\t\tselectedBlockElement,\n\t\t\tscrollContainer,\n\t\t\ttoolbarHeight,\n\t\t\tisSticky\n\t\t)\n\t);\n\n\tconst popoverRef = useRefEffect( ( popoverNode ) => {\n\t\tsetToolbarHeight( popoverNode.offsetHeight );\n\t}, [] );\n\n\tconst updateProps = useCallback(\n\t\t() =>\n\t\t\tsetProps(\n\t\t\t\tgetProps(\n\t\t\t\t\tcontentElement,\n\t\t\t\t\tselectedBlockElement,\n\t\t\t\t\tscrollContainer,\n\t\t\t\t\ttoolbarHeight,\n\t\t\t\t\tisSticky\n\t\t\t\t)\n\t\t\t),\n\t\t[ contentElement, selectedBlockElement, scrollContainer, toolbarHeight ]\n\t);\n\n\t// Update props when the block is moved. This also ensures the props are\n\t// correct on initial mount, and when the selected block or content element\n\t// changes (since the callback ref will update).\n\tuseLayoutEffect( updateProps, [ blockIndex, updateProps ] );\n\n\t// Update props when the viewport is resized or the block is resized.\n\tuseLayoutEffect( () => {\n\t\tif ( ! contentElement || ! selectedBlockElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Update the toolbar props on viewport resize.\n\t\tconst contentView = contentElement?.ownerDocument?.defaultView;\n\t\tcontentView?.addEventHandler?.( 'resize', updateProps );\n\n\t\t// Update the toolbar props on block resize.\n\t\tlet resizeObserver;\n\t\tconst blockView = selectedBlockElement?.ownerDocument?.defaultView;\n\t\tif ( blockView.ResizeObserver ) {\n\t\t\tresizeObserver = new blockView.ResizeObserver( updateProps );\n\t\t\tresizeObserver.observe( selectedBlockElement );\n\t\t}\n\n\t\treturn () => {\n\t\t\tcontentView?.removeEventHandler?.( 'resize', updateProps );\n\n\t\t\tif ( resizeObserver ) {\n\t\t\t\tresizeObserver.disconnect();\n\t\t\t}\n\t\t};\n\t}, [ updateProps, contentElement, selectedBlockElement ] );\n\n\treturn {\n\t\t...props,\n\t\tref: popoverRef,\n\t};\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAUA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AAlBA;AACA;AACA;;AAWA;AACA;AACA;;AAKA,MAAMO,YAAY,GAAG;EACpBC,SAAS,EAAE;AACZ,CAAC;;AAED;AACA;AACA;AACA,MAAMC,aAAa,GAAG;EACrB,GAAGF,YAAY;EACfG,IAAI,EAAE,KAAK;EACXC,KAAK,EAAE;AACR,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,GAAG;EAC/B,GAAGL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EA;IACA,MAAMyC,WAAW,GAAG1C,cAAc,EAAEY,aAAa,EAAE+B,WAAW;IAC9DD,WAAW,EAAEE,eAAe,GAAI,QAAQ,EAAEL,WAAY,CAAC;;IAEvD;IACA,IAAIM,cAAc;IAClB,MAAMC,SAAS,GAAG7C,oBAAoB,EAAEW,aAAa,EAAE+B,WAAW;IAClE,IAAKG,SAAS,CAACC,cAAc,EAAG;MAC/BF,cAAc,GAAG,IAAIC,SAAS,CAACC,cAAc,CAAER,WAAY,CAAC;MAC5DM,cAAc,CAACG,OAAO,CAAE/C,oBAAqB,CAAC;IAC/C;IAEA,OAAO,MAAM;MACZyC,WAAW,EAAEO,kBAAkB,GAAI,QAAQ,EAAEV,WAAY,CAAC;MAE1D,IAAKM,cAAc,EAAG;QACrBA,cAAc,CAACK,UAAU,CAAC,CAAC;MAC5B;IACD,CAAC;EACF,CAAC,EAAE,CAAEX,WAAW,EAAEvC,cAAc,EAAEC,oBAAoB,CAAG,CAAC;EAE1D,OAAO;IACN,GAAGgC,KAAK;IACRkB,GAAG,EAAEhB;EACN,CAAC;AACF","ignoreList":[]}
@@ -32,21 +32,20 @@ function useShowBlockTools() {
32
32
  isTyping
33
33
  } = select(_store.store);
34
34
  const clientId = getSelectedBlockClientId() || getFirstMultiSelectedBlockClientId();
35
- const block = getBlock(clientId) || {
36
- name: '',
37
- attributes: {}
38
- };
35
+ const block = getBlock(clientId);
39
36
  const editorMode = __unstableGetEditorMode();
40
- const hasSelectedBlock = clientId && block?.name;
41
- const isEmptyDefaultBlock = (0, _blocks.isUnmodifiedDefaultBlock)(block);
37
+ const hasSelectedBlock = !!clientId && !!block;
38
+ const isEmptyDefaultBlock = hasSelectedBlock && (0, _blocks.isUnmodifiedDefaultBlock)(block);
42
39
  const _showEmptyBlockSideInserter = clientId && !isTyping() && editorMode === 'edit' && isEmptyDefaultBlock;
43
40
  const maybeShowBreadcrumb = hasSelectedBlock && !hasMultiSelection() && editorMode === 'navigation';
44
- const _showBlockToolbarPopover = editorMode !== 'zoom-out' && !getSettings().hasFixedToolbar && !_showEmptyBlockSideInserter && hasSelectedBlock && !isEmptyDefaultBlock && !maybeShowBreadcrumb;
41
+ const isZoomOut = editorMode === 'zoom-out';
42
+ const _showZoomOutToolbar = isZoomOut && block?.attributes?.align === 'full' && !_showEmptyBlockSideInserter && !maybeShowBreadcrumb;
43
+ const _showBlockToolbarPopover = !_showZoomOutToolbar && !getSettings().hasFixedToolbar && !_showEmptyBlockSideInserter && hasSelectedBlock && !isEmptyDefaultBlock && !maybeShowBreadcrumb;
45
44
  return {
46
45
  showEmptyBlockSideInserter: _showEmptyBlockSideInserter,
47
46
  showBreadcrumb: !_showEmptyBlockSideInserter && maybeShowBreadcrumb,
48
47
  showBlockToolbarPopover: _showBlockToolbarPopover,
49
- showZoomOutToolbar: editorMode === 'zoom-out' && !_showEmptyBlockSideInserter && !maybeShowBreadcrumb && !_showBlockToolbarPopover
48
+ showZoomOutToolbar: _showZoomOutToolbar
50
49
  };
51
50
  }, []);
52
51
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_blocks","_store","useShowBlockTools","useSelect","select","getSelectedBlockClientId","getFirstMultiSelectedBlockClientId","getBlock","getSettings","hasMultiSelection","__unstableGetEditorMode","isTyping","blockEditorStore","clientId","block","name","attributes","editorMode","hasSelectedBlock","isEmptyDefaultBlock","isUnmodifiedDefaultBlock","_showEmptyBlockSideInserter","maybeShowBreadcrumb","_showBlockToolbarPopover","hasFixedToolbar","showEmptyBlockSideInserter","showBreadcrumb","showBlockToolbarPopover","showZoomOutToolbar"],"sources":["@wordpress/block-editor/src/components/block-tools/use-show-block-tools.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Source of truth for which block tools are showing in the block editor.\n *\n * @return {Object} Object of which block tools will be shown.\n */\nexport function useShowBlockTools() {\n\treturn useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetSelectedBlockClientId,\n\t\t\tgetFirstMultiSelectedBlockClientId,\n\t\t\tgetBlock,\n\t\t\tgetSettings,\n\t\t\thasMultiSelection,\n\t\t\t__unstableGetEditorMode,\n\t\t\tisTyping,\n\t\t} = select( blockEditorStore );\n\n\t\tconst clientId =\n\t\t\tgetSelectedBlockClientId() || getFirstMultiSelectedBlockClientId();\n\n\t\tconst block = getBlock( clientId ) || { name: '', attributes: {} };\n\t\tconst editorMode = __unstableGetEditorMode();\n\t\tconst hasSelectedBlock = clientId && block?.name;\n\t\tconst isEmptyDefaultBlock = isUnmodifiedDefaultBlock( block );\n\t\tconst _showEmptyBlockSideInserter =\n\t\t\tclientId &&\n\t\t\t! isTyping() &&\n\t\t\teditorMode === 'edit' &&\n\t\t\tisEmptyDefaultBlock;\n\t\tconst maybeShowBreadcrumb =\n\t\t\thasSelectedBlock &&\n\t\t\t! hasMultiSelection() &&\n\t\t\teditorMode === 'navigation';\n\n\t\tconst _showBlockToolbarPopover =\n\t\t\teditorMode !== 'zoom-out' &&\n\t\t\t! getSettings().hasFixedToolbar &&\n\t\t\t! _showEmptyBlockSideInserter &&\n\t\t\thasSelectedBlock &&\n\t\t\t! isEmptyDefaultBlock &&\n\t\t\t! maybeShowBreadcrumb;\n\n\t\treturn {\n\t\t\tshowEmptyBlockSideInserter: _showEmptyBlockSideInserter,\n\t\t\tshowBreadcrumb:\n\t\t\t\t! _showEmptyBlockSideInserter && maybeShowBreadcrumb,\n\t\t\tshowBlockToolbarPopover: _showBlockToolbarPopover,\n\t\t\tshowZoomOutToolbar:\n\t\t\t\teditorMode === 'zoom-out' &&\n\t\t\t\t! _showEmptyBlockSideInserter &&\n\t\t\t\t! maybeShowBreadcrumb &&\n\t\t\t\t! _showBlockToolbarPopover,\n\t\t};\n\t}, [] );\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,O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kB,EACjBX,UAAU,KAAK,UAAU,IACzB,CAAEI,2BAA2B,IAC7B,CAAEC,mBAAmB,IACrB,CAAEC;IACJ,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;AACR","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_blocks","_store","useShowBlockTools","useSelect","select","getSelectedBlockClientId","getFirstMultiSelectedBlockClientId","getBlock","getSettings","hasMultiSelection","__unstableGetEditorMode","isTyping","blockEditorStore","clientId","block","editorMode","hasSelectedBlock","isEmptyDefaultBlock","isUnmodifiedDefaultBlock","_showEmptyBlockSideInserter","maybeShowBreadcrumb","isZoomOut","_showZoomOutToolbar","attributes","align","_showBlockToolbarPopover","hasFixedToolbar","showEmptyBlockSideInserter","showBreadcrumb","showBlockToolbarPopover","showZoomOutToolbar"],"sources":["@wordpress/block-editor/src/components/block-tools/use-show-block-tools.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Source of truth for which block tools are showing in the block editor.\n *\n * @return {Object} Object of which block tools will be shown.\n */\nexport function useShowBlockTools() {\n\treturn useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetSelectedBlockClientId,\n\t\t\tgetFirstMultiSelectedBlockClientId,\n\t\t\tgetBlock,\n\t\t\tgetSettings,\n\t\t\thasMultiSelection,\n\t\t\t__unstableGetEditorMode,\n\t\t\tisTyping,\n\t\t} = select( blockEditorStore );\n\n\t\tconst clientId =\n\t\t\tgetSelectedBlockClientId() || getFirstMultiSelectedBlockClientId();\n\n\t\tconst block = getBlock( clientId );\n\t\tconst editorMode = __unstableGetEditorMode();\n\t\tconst hasSelectedBlock = !! clientId && !! block;\n\t\tconst isEmptyDefaultBlock =\n\t\t\thasSelectedBlock && isUnmodifiedDefaultBlock( block );\n\t\tconst _showEmptyBlockSideInserter =\n\t\t\tclientId &&\n\t\t\t! isTyping() &&\n\t\t\teditorMode === 'edit' &&\n\t\t\tisEmptyDefaultBlock;\n\t\tconst maybeShowBreadcrumb =\n\t\t\thasSelectedBlock &&\n\t\t\t! hasMultiSelection() &&\n\t\t\teditorMode === 'navigation';\n\n\t\tconst isZoomOut = editorMode === 'zoom-out';\n\t\tconst _showZoomOutToolbar =\n\t\t\tisZoomOut &&\n\t\t\tblock?.attributes?.align === 'full' &&\n\t\t\t! _showEmptyBlockSideInserter &&\n\t\t\t! maybeShowBreadcrumb;\n\t\tconst _showBlockToolbarPopover =\n\t\t\t! _showZoomOutToolbar &&\n\t\t\t! getSettings().hasFixedToolbar &&\n\t\t\t! _showEmptyBlockSideInserter &&\n\t\t\thasSelectedBlock &&\n\t\t\t! isEmptyDefaultBlock &&\n\t\t\t! maybeShowBreadcrumb;\n\n\t\treturn {\n\t\t\tshowEmptyBlockSideInserter: _showEmptyBlockSideInserter,\n\t\t\tshowBreadcrumb:\n\t\t\t\t! _showEmptyBlockSideInserter && maybeShowBreadcrumb,\n\t\t\tshowBlockToolbarPopover: _showBlockToolbarPopover,\n\t\t\tshowZoomOutToolbar: _showZoomOutToolbar,\n\t\t};\n\t}, [] );\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACO,SAASG,iBAAiBA,CAAA,EAAG;EACnC,OAAO,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAC/B,MAAM;MACLC,wBAAwB;MACxBC,kCAAkC;MAClCC,QAAQ;MACRC,WAAW;MACXC,iBAAiB;MACjBC,uBAAuB;MACvBC;IACD,CAAC,GAAGP,MAAM,CAAEQ,YAAiB,CAAC;IAE9B,MAAMC,QAAQ,GACbR,wBAAwB,CAAC,CAAC,IAAIC,kCAAkC,CAAC,CAAC;IAEnE,MAAMQ,KAAK,GAAGP,QAAQ,CAAEM,QAAS,CAAC;IAClC,MAAME,UAAU,GAAGL,uBAAuB,CAAC,CAAC;IAC5C,MAAMM,gBAAgB,GAAG,CAAC,CAAEH,QAAQ,IAAI,CAAC,CAAEC,KAAK;IAChD,MAAMG,mBAAmB,GACxBD,gBAAgB,IAAI,IAAAE,gCAAwB,EAAEJ,KAAM,CAAC;IACtD,MAAMK,2BAA2B,GAChCN,QAAQ,IACR,CAAEF,QAAQ,CAAC,CAAC,IACZI,UAAU,KAAK,MAAM,IACrBE,mBAAmB;IACpB,MAAMG,mBAAmB,GACxBJ,gBAAgB,IAChB,CAAEP,iBAAiB,CAAC,CAAC,IACrBM,UAAU,KAAK,YAAY;IAE5B,MAAMM,SAAS,GAAGN,UAAU,KAAK,UAAU;IAC3C,MAAMO,mBAAmB,GACxBD,SAAS,IACTP,KAAK,EAAES,UAAU,EAAEC,KAAK,KAAK,MAAM,IACnC,CAAEL,2BAA2B,IAC7B,CAAEC,mBAAmB;IACtB,MAAMK,wBAAwB,GAC7B,CAAEH,mBAAmB,IACrB,CAAEd,WAAW,CAAC,CAAC,CAACkB,eAAe,IAC/B,CAAEP,2BAA2B,IAC7BH,gBAAgB,IAChB,CAAEC,mBAAmB,IACrB,CAAEG,mBAAmB;IAEtB,OAAO;MACNO,0BAA0B,EAAER,2BAA2B;MACvDS,cAAc,EACb,CAAET,2BAA2B,IAAIC,mBAAmB;MACrDS,uBAAuB,EAAEJ,wBAAwB;MACjDK,kBAAkB,EAAER;IACrB,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;AACR","ignoreList":[]}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _clsx = _interopRequireDefault(require("clsx"));
9
+ var _element = require("@wordpress/element");
10
+ var _components = require("@wordpress/components");
11
+ var _icons = require("@wordpress/icons");
12
+ var _i18n = require("@wordpress/i18n");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ /**
15
+ * External dependencies
16
+ */
17
+
18
+ /**
19
+ * WordPress dependencies
20
+ */
21
+
22
+ function ZoomOutModeInserterButton({
23
+ isVisible,
24
+ onClick
25
+ }) {
26
+ const [zoomOutModeInserterButtonHovered, setZoomOutModeInserterButtonHovered] = (0, _element.useState)(false);
27
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
28
+ variant: "primary",
29
+ icon: _icons.plus,
30
+ size: "compact",
31
+ className: (0, _clsx.default)('block-editor-button-pattern-inserter__button', 'block-editor-block-tools__zoom-out-mode-inserter-button', {
32
+ 'is-visible': isVisible || zoomOutModeInserterButtonHovered
33
+ }),
34
+ onClick: onClick,
35
+ onMouseOver: () => {
36
+ setZoomOutModeInserterButtonHovered(true);
37
+ },
38
+ onMouseOut: () => {
39
+ setZoomOutModeInserterButtonHovered(false);
40
+ },
41
+ label: (0, _i18n._x)('Add pattern', 'Generic label for pattern inserter button')
42
+ });
43
+ }
44
+ var _default = exports.default = ZoomOutModeInserterButton;
45
+ //# sourceMappingURL=zoom-out-mode-inserter-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_components","_icons","_i18n","_jsxRuntime","ZoomOutModeInserterButton","isVisible","onClick","zoomOutModeInserterButtonHovered","setZoomOutModeInserterButtonHovered","useState","jsx","Button","variant","icon","plus","size","className","clsx","onMouseOver","onMouseOut","label","_x","_default","exports","default"],"sources":["@wordpress/block-editor/src/components/block-tools/zoom-out-mode-inserter-button.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { Button } from '@wordpress/components';\nimport { plus } from '@wordpress/icons';\nimport { _x } from '@wordpress/i18n';\n\nfunction ZoomOutModeInserterButton( { isVisible, onClick } ) {\n\tconst [\n\t\tzoomOutModeInserterButtonHovered,\n\t\tsetZoomOutModeInserterButtonHovered,\n\t] = useState( false );\n\n\treturn (\n\t\t<Button\n\t\t\tvariant=\"primary\"\n\t\t\ticon={ plus }\n\t\t\tsize=\"compact\"\n\t\t\tclassName={ clsx(\n\t\t\t\t'block-editor-button-pattern-inserter__button',\n\t\t\t\t'block-editor-block-tools__zoom-out-mode-inserter-button',\n\t\t\t\t{\n\t\t\t\t\t'is-visible': isVisible || zoomOutModeInserterButtonHovered,\n\t\t\t\t}\n\t\t\t) }\n\t\t\tonClick={ onClick }\n\t\t\tonMouseOver={ () => {\n\t\t\t\tsetZoomOutModeInserterButtonHovered( true );\n\t\t\t} }\n\t\t\tonMouseOut={ () => {\n\t\t\t\tsetZoomOutModeInserterButtonHovered( false );\n\t\t\t} }\n\t\t\tlabel={ _x(\n\t\t\t\t'Add pattern',\n\t\t\t\t'Generic label for pattern inserter button'\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nexport default ZoomOutModeInserterButton;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAAqC,IAAAK,WAAA,GAAAL,OAAA;AAXrC;AACA;AACA;;AAGA;AACA;AACA;;AAMA,SAASM,yBAAyBA,CAAE;EAAEC,SAAS;EAAEC;AAAQ,CAAC,EAAG;EAC5D,MAAM,CACLC,gCAAgC,EAChCC,mCAAmC,CACnC,GAAG,IAAAC,iBAAQ,EAAE,KAAM,CAAC;EAErB,oBACC,IAAAN,WAAA,CAAAO,GAAA,EAACV,WAAA,CAAAW,MAAM;IACNC,OAAO,EAAC,SAAS;IACjBC,IAAI,EAAGC,WAAM;IACbC,IAAI,EAAC,SAAS;IACdC,SAAS,EAAG,IAAAC,aAAI,EACf,8CAA8C,EAC9C,yDAAyD,EACzD;MACC,YAAY,EAAEZ,SAAS,IAAIE;IAC5B,CACD,CAAG;IACHD,OAAO,EAAGA,OAAS;IACnBY,WAAW,EAAGA,CAAA,KAAM;MACnBV,mCAAmC,CAAE,IAAK,CAAC;IAC5C,CAAG;IACHW,UAAU,EAAGA,CAAA,KAAM;MAClBX,mCAAmC,CAAE,KAAM,CAAC;IAC7C,CAAG;IACHY,KAAK,EAAG,IAAAC,QAAE,EACT,aAAa,EACb,2CACD;EAAG,CACH,CAAC;AAEJ;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcpB,yBAAyB","ignoreList":[]}
@@ -7,10 +7,8 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _data = require("@wordpress/data");
9
9
  var _element = require("@wordpress/element");
10
- var _components = require("@wordpress/components");
11
- var _icons = require("@wordpress/icons");
12
- var _i18n = require("@wordpress/i18n");
13
10
  var _inbetween = _interopRequireDefault(require("../block-popover/inbetween"));
11
+ var _zoomOutModeInserterButton = _interopRequireDefault(require("./zoom-out-mode-inserter-button"));
14
12
  var _store = require("../../store");
15
13
  var _lockUnlock = require("../../lock-unlock");
16
14
  var _jsxRuntime = require("react/jsx-runtime");
@@ -25,44 +23,41 @@ var _jsxRuntime = require("react/jsx-runtime");
25
23
  function ZoomOutModeInserters() {
26
24
  const [isReady, setIsReady] = (0, _element.useState)(false);
27
25
  const {
26
+ hasSelection,
27
+ blockInsertionPoint,
28
28
  blockOrder,
29
- sectionRootClientId,
30
- insertionPoint,
29
+ blockInsertionPointVisible,
31
30
  setInserterIsOpened,
32
- hasSelection
31
+ sectionRootClientId,
32
+ selectedBlockClientId,
33
+ hoveredBlockClientId
33
34
  } = (0, _data.useSelect)(select => {
34
35
  const {
35
36
  getSettings,
37
+ getBlockInsertionPoint,
36
38
  getBlockOrder,
37
- getSelectionStart
39
+ getSelectionStart,
40
+ getSelectedBlockClientId,
41
+ getHoveredBlockClientId,
42
+ isBlockInsertionPointVisible
38
43
  } = select(_store.store);
39
44
  const {
40
45
  sectionRootClientId: root
41
46
  } = (0, _lockUnlock.unlock)(getSettings());
42
- // To do: move ZoomOutModeInserters to core/editor.
43
- // Or we perhaps we should move the insertion point state to the
44
- // block-editor store. I'm not sure what it was ever moved to the editor
45
- // store, because all the inserter components all live in the
46
- // block-editor package.
47
- // eslint-disable-next-line @wordpress/data-no-store-string-literals
48
- const editor = select('core/editor');
49
47
  return {
50
48
  hasSelection: !!getSelectionStart().clientId,
49
+ blockInsertionPoint: getBlockInsertionPoint(),
51
50
  blockOrder: getBlockOrder(root),
52
- insertionPoint: (0, _lockUnlock.unlock)(editor).getInsertionPoint(),
51
+ blockInsertionPointVisible: isBlockInsertionPointVisible(),
53
52
  sectionRootClientId: root,
54
- setInserterIsOpened: getSettings().__experimentalSetIsInserterOpened
53
+ setInserterIsOpened: getSettings().__experimentalSetIsInserterOpened,
54
+ selectedBlockClientId: getSelectedBlockClientId(),
55
+ hoveredBlockClientId: getHoveredBlockClientId()
55
56
  };
56
57
  }, []);
57
- const isMounted = (0, _element.useRef)(false);
58
- (0, _element.useEffect)(() => {
59
- if (!isMounted.current) {
60
- isMounted.current = true;
61
- return;
62
- }
63
- // reset insertion point when the block order changes
64
- setInserterIsOpened(true);
65
- }, [blockOrder, setInserterIsOpened]);
58
+ const {
59
+ showInsertionPoint
60
+ } = (0, _data.useDispatch)(_store.store);
66
61
 
67
62
  // Defer the initial rendering to avoid the jumps due to the animation.
68
63
  (0, _element.useEffect)(() => {
@@ -73,14 +68,19 @@ function ZoomOutModeInserters() {
73
68
  clearTimeout(timeout);
74
69
  };
75
70
  }, []);
76
- if (!isReady || !hasSelection) {
71
+ if (!isReady) {
77
72
  return null;
78
73
  }
79
74
  return [undefined, ...blockOrder].map((clientId, index) => {
75
+ const shouldRenderInsertionPoint = blockInsertionPointVisible && blockInsertionPoint.index === index;
76
+ const previousClientId = clientId;
77
+ const nextClientId = blockOrder[index];
78
+ const isSelected = hasSelection && (selectedBlockClientId === previousClientId || selectedBlockClientId === nextClientId);
79
+ const isHovered = hoveredBlockClientId === previousClientId || hoveredBlockClientId === nextClientId;
80
80
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_inbetween.default, {
81
- previousClientId: clientId,
82
- nextClientId: blockOrder[index],
83
- children: [insertionPoint.insertionIndex === index && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
81
+ previousClientId: previousClientId,
82
+ nextClientId: nextClientId,
83
+ children: [shouldRenderInsertionPoint && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
84
84
  style: {
85
85
  borderRadius: '0',
86
86
  height: '12px',
@@ -89,11 +89,8 @@ function ZoomOutModeInserters() {
89
89
  width: '100%'
90
90
  },
91
91
  className: "block-editor-block-list__insertion-point-indicator"
92
- }), insertionPoint.insertionIndex !== index && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
93
- variant: "primary",
94
- icon: _icons.plus,
95
- size: "compact",
96
- className: "block-editor-button-pattern-inserter__button",
92
+ }), !shouldRenderInsertionPoint && /*#__PURE__*/(0, _jsxRuntime.jsx)(_zoomOutModeInserterButton.default, {
93
+ isVisible: isSelected || isHovered,
97
94
  onClick: () => {
98
95
  setInserterIsOpened({
99
96
  rootClientId: sectionRootClientId,
@@ -101,8 +98,10 @@ function ZoomOutModeInserters() {
101
98
  tab: 'patterns',
102
99
  category: 'all'
103
100
  });
104
- },
105
- label: (0, _i18n._x)('Add pattern', 'Generic label for pattern inserter button')
101
+ showInsertionPoint(sectionRootClientId, index, {
102
+ operation: 'insert'
103
+ });
104
+ }
106
105
  })]
107
106
  }, index);
108
107
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_data","require","_element","_components","_icons","_i18n","_inbetween","_interopRequireDefault","_store","_lockUnlock","_jsxRuntime","ZoomOutModeInserters","isReady","setIsReady","useState","blockOrder","sectionRootClientId","insertionPoint","setInserterIsOpened","hasSelection","useSelect","select","getSettings","getBlockOrder","getSelectionStart","blockEditorStore","root","unlock","editor","clientId","getInsertionPoint","__experimentalSetIsInserterOpened","isMounted","useRef","useEffect","current","timeout","setTimeout","clearTimeout","undefined","map","index","jsxs","default","previousClientId","nextClientId","children","insertionIndex","jsx","style","borderRadius","height","opacity","transform","width","className","Button","variant","icon","plus","size","onClick","rootClientId","tab","category","label","_x","_default","exports"],"sources":["@wordpress/block-editor/src/components/block-tools/zoom-out-mode-inserters.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { Button } from '@wordpress/components';\nimport { plus } from '@wordpress/icons';\nimport { _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BlockPopoverInbetween from '../block-popover/inbetween';\nimport { store as blockEditorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nfunction ZoomOutModeInserters() {\n\tconst [ isReady, setIsReady ] = useState( false );\n\tconst {\n\t\tblockOrder,\n\t\tsectionRootClientId,\n\t\tinsertionPoint,\n\t\tsetInserterIsOpened,\n\t\thasSelection,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSettings, getBlockOrder, getSelectionStart } =\n\t\t\tselect( blockEditorStore );\n\t\tconst { sectionRootClientId: root } = unlock( getSettings() );\n\t\t// To do: move ZoomOutModeInserters to core/editor.\n\t\t// Or we perhaps we should move the insertion point state to the\n\t\t// block-editor store. I'm not sure what it was ever moved to the editor\n\t\t// store, because all the inserter components all live in the\n\t\t// block-editor package.\n\t\t// eslint-disable-next-line @wordpress/data-no-store-string-literals\n\t\tconst editor = select( 'core/editor' );\n\t\treturn {\n\t\t\thasSelection: !! getSelectionStart().clientId,\n\t\t\tblockOrder: getBlockOrder( root ),\n\t\t\tinsertionPoint: unlock( editor ).getInsertionPoint(),\n\t\t\tsectionRootClientId: root,\n\t\t\tsetInserterIsOpened:\n\t\t\t\tgetSettings().__experimentalSetIsInserterOpened,\n\t\t};\n\t}, [] );\n\n\tconst isMounted = useRef( false );\n\n\tuseEffect( () => {\n\t\tif ( ! isMounted.current ) {\n\t\t\tisMounted.current = true;\n\t\t\treturn;\n\t\t}\n\t\t// reset insertion point when the block order changes\n\t\tsetInserterIsOpened( true );\n\t}, [ blockOrder, setInserterIsOpened ] );\n\n\t// Defer the initial rendering to avoid the jumps due to the animation.\n\tuseEffect( () => {\n\t\tconst timeout = setTimeout( () => {\n\t\t\tsetIsReady( true );\n\t\t}, 500 );\n\t\treturn () => {\n\t\t\tclearTimeout( timeout );\n\t\t};\n\t}, [] );\n\n\tif ( ! isReady || ! hasSelection ) {\n\t\treturn null;\n\t}\n\n\treturn [ undefined, ...blockOrder ].map( ( clientId, index ) => {\n\t\treturn (\n\t\t\t<BlockPopoverInbetween\n\t\t\t\tkey={ index }\n\t\t\t\tpreviousClientId={ clientId }\n\t\t\t\tnextClientId={ blockOrder[ index ] }\n\t\t\t>\n\t\t\t\t{ insertionPoint.insertionIndex === index && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\tborderRadius: '0',\n\t\t\t\t\t\t\theight: '12px',\n\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\ttransform: 'translateY(-50%)',\n\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tclassName=\"block-editor-block-list__insertion-point-indicator\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ insertionPoint.insertionIndex !== index && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tclassName=\"block-editor-button-pattern-inserter__button\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetInserterIsOpened( {\n\t\t\t\t\t\t\t\trootClientId: sectionRootClientId,\n\t\t\t\t\t\t\t\tinsertionIndex: index,\n\t\t\t\t\t\t\t\ttab: 'patterns',\n\t\t\t\t\t\t\t\tcategory: 'all',\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t'Add pattern',\n\t\t\t\t\t\t\t'Generic label for pattern inserter button'\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</BlockPopoverInbetween>\n\t\t);\n\t} );\n}\n\nexport default ZoomOutModeInserters;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,UAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAA2C,IAAAS,WAAA,GAAAT,OAAA;AAd3C;AACA;AACA;;AAOA;AACA;AACA;;AAKA,SAASU,oBAAoBA,CAAA,EAAG;EAC/B,MAAM,CAAEC,OAAO,EAAEC,UAAU,CAAE,GAAG,IAAAC,iBAAQ,EAAE,KAAM,CAAC;EACjD,MAAM;IACLC,UAAU;IACVC,mBAAmB;IACnBC,cAAc;IACdC,mBAAmB;IACnBC;EACD,CAAC,GAAG,IAAAC,eAAS,EAAIC,MAAM,IAAM;IAC5B,MAAM;MAAEC,WAAW;MAAEC,aAAa;MAAEC;IAAkB,CAAC,GACtDH,MAAM,CAAEI,YAAiB,CAAC;IAC3B,MAAM;MAAET,mBAAmB,EAAEU;IAAK,CAAC,GAAG,IAAAC,kBAAM,EAAEL,WAAW,CAAC,CAAE,CAAC;IAC7D;IACA;IACA;IACA;IACA;IACA;IACA,MAAMM,MAAM,GAAGP,MAAM,CAAE,aAAc,CAAC;IACtC,OAAO;MACNF,YAAY,EAAE,CAAC,CAAEK,iBAAiB,CAAC,CAAC,CAACK,QAAQ;MAC7Cd,UAAU,E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AAM;UACdC,OAAO,EAAE,CAAC;UACVC,SAAS,EAAE,kBAAkB;UAC7BC,KAAK,EAAE;QACR,CAAG;QACHC,SAAS,EAAC;MAAoD,CAC9D,CACD,EACCtC,cAAc,CAAC8B,cAAc,KAAKN,KAAK,iBACxC,IAAA/B,WAAA,CAAAsC,GAAA,EAAC7C,WAAA,CAAAqD,MAAM;QACNC,OAAO,EAAC,SAAS;QACjBC,IAAI,EAAGC,WAAM;QACbC,IAAI,EAAC,SAAS;QACdL,SAAS,EAAC,8CAA8C;QACxDM,OAAO,EAAGA,CAAA,KAAM;UACf3C,mBAAmB,CAAE;YACpB4C,YAAY,EAAE9C,mBAAmB;YACjC+B,cAAc,EAAEN,KAAK;YACrBsB,GAAG,EAAE,UAAU;YACfC,QAAQ,EAAE;UACX,CAAE,CAAC;QACJ,CAAG;QACHC,KAAK,EAAG,IAAAC,QAAE,EACT,aAAa,EACb,2CACD;MAAG,CACH,CACD;IAAA,GAnCKzB,KAoCgB,CAAC;EAE1B,CAAE,CAAC;AACJ;AAAC,IAAA0B,QAAA,GAAAC,OAAA,CAAAzB,OAAA,GAEchC,oBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["_data","require","_element","_inbetween","_interopRequireDefault","_zoomOutModeInserterButton","_store","_lockUnlock","_jsxRuntime","ZoomOutModeInserters","isReady","setIsReady","useState","hasSelection","blockInsertionPoint","blockOrder","blockInsertionPointVisible","setInserterIsOpened","sectionRootClientId","selectedBlockClientId","hoveredBlockClientId","useSelect","select","getSettings","getBlockInsertionPoint","getBlockOrder","getSelectionStart","getSelectedBlockClientId","getHoveredBlockClientId","isBlockInsertionPointVisible","blockEditorStore","root","unlock","clientId","__experimentalSetIsInserterOpened","showInsertionPoint","useDispatch","useEffect","timeout","setTimeout","clearTimeout","undefined","map","index","shouldRenderInsertionPoint","previousClientId","nextClientId","isSelected","isHovered","jsxs","default","children","jsx","style","borderRadius","height","opacity","transform","width","className","isVisible","onClick","rootClientId","insertionIndex","tab","category","operation","_default","exports"],"sources":["@wordpress/block-editor/src/components/block-tools/zoom-out-mode-inserters.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockPopoverInbetween from '../block-popover/inbetween';\nimport ZoomOutModeInserterButton from './zoom-out-mode-inserter-button';\nimport { store as blockEditorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nfunction ZoomOutModeInserters() {\n\tconst [ isReady, setIsReady ] = useState( false );\n\tconst {\n\t\thasSelection,\n\t\tblockInsertionPoint,\n\t\tblockOrder,\n\t\tblockInsertionPointVisible,\n\t\tsetInserterIsOpened,\n\t\tsectionRootClientId,\n\t\tselectedBlockClientId,\n\t\thoveredBlockClientId,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetSettings,\n\t\t\tgetBlockInsertionPoint,\n\t\t\tgetBlockOrder,\n\t\t\tgetSelectionStart,\n\t\t\tgetSelectedBlockClientId,\n\t\t\tgetHoveredBlockClientId,\n\t\t\tisBlockInsertionPointVisible,\n\t\t} = select( blockEditorStore );\n\t\tconst { sectionRootClientId: root } = unlock( getSettings() );\n\t\treturn {\n\t\t\thasSelection: !! getSelectionStart().clientId,\n\t\t\tblockInsertionPoint: getBlockInsertionPoint(),\n\t\t\tblockOrder: getBlockOrder( root ),\n\t\t\tblockInsertionPointVisible: isBlockInsertionPointVisible(),\n\t\t\tsectionRootClientId: root,\n\t\t\tsetInserterIsOpened:\n\t\t\t\tgetSettings().__experimentalSetIsInserterOpened,\n\t\t\tselectedBlockClientId: getSelectedBlockClientId(),\n\t\t\thoveredBlockClientId: getHoveredBlockClientId(),\n\t\t};\n\t}, [] );\n\n\tconst { showInsertionPoint } = useDispatch( blockEditorStore );\n\n\t// Defer the initial rendering to avoid the jumps due to the animation.\n\tuseEffect( () => {\n\t\tconst timeout = setTimeout( () => {\n\t\t\tsetIsReady( true );\n\t\t}, 500 );\n\t\treturn () => {\n\t\t\tclearTimeout( timeout );\n\t\t};\n\t}, [] );\n\n\tif ( ! isReady ) {\n\t\treturn null;\n\t}\n\n\treturn [ undefined, ...blockOrder ].map( ( clientId, index ) => {\n\t\tconst shouldRenderInsertionPoint =\n\t\t\tblockInsertionPointVisible && blockInsertionPoint.index === index;\n\n\t\tconst previousClientId = clientId;\n\t\tconst nextClientId = blockOrder[ index ];\n\n\t\tconst isSelected =\n\t\t\thasSelection &&\n\t\t\t( selectedBlockClientId === previousClientId ||\n\t\t\t\tselectedBlockClientId === nextClientId );\n\n\t\tconst isHovered =\n\t\t\thoveredBlockClientId === previousClientId ||\n\t\t\thoveredBlockClientId === nextClientId;\n\n\t\treturn (\n\t\t\t<BlockPopoverInbetween\n\t\t\t\tkey={ index }\n\t\t\t\tpreviousClientId={ previousClientId }\n\t\t\t\tnextClientId={ nextClientId }\n\t\t\t>\n\t\t\t\t{ shouldRenderInsertionPoint && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\tborderRadius: '0',\n\t\t\t\t\t\t\theight: '12px',\n\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\ttransform: 'translateY(-50%)',\n\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tclassName=\"block-editor-block-list__insertion-point-indicator\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ! shouldRenderInsertionPoint && (\n\t\t\t\t\t<ZoomOutModeInserterButton\n\t\t\t\t\t\tisVisible={ isSelected || isHovered }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetInserterIsOpened( {\n\t\t\t\t\t\t\t\trootClientId: sectionRootClientId,\n\t\t\t\t\t\t\t\tinsertionIndex: index,\n\t\t\t\t\t\t\t\ttab: 'patterns',\n\t\t\t\t\t\t\t\tcategory: 'all',\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\tshowInsertionPoint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,IAAApC,WAAA,CAAA4C,GAAA;QACCC,KAAK,EAAG;UACPC,YAAY,EAAE,GAAG;UACjBC,MAAM,EAAE,MAAM;UACdC,OAAO,EAAE,CAAC;UACVC,SAAS,EAAE,kBAAkB;UAC7BC,KAAK,EAAE;QACR,CAAG;QACHC,SAAS,EAAC;MAAoD,CAC9D,CACD,EACC,CAAEf,0BAA0B,iBAC7B,IAAApC,WAAA,CAAA4C,GAAA,EAAC/C,0BAAA,CAAA6C,OAAyB;QACzBU,SAAS,EAAGb,UAAU,IAAIC,SAAW;QACrCa,OAAO,EAAGA,CAAA,KAAM;UACf5C,mBAAmB,CAAE;YACpB6C,YAAY,EAAE5C,mBAAmB;YACjC6C,cAAc,EAAEpB,KAAK;YACrBqB,GAAG,EAAE,UAAU;YACfC,QAAQ,EAAE;UACX,CAAE,CAAC;UACH9B,kBAAkB,CAAEjB,mBAAmB,EAAEyB,KAAK,EAAE;YAC/CuB,SAAS,EAAE;UACZ,CAAE,CAAC;QACJ;MAAG,CACH,CACD;IAAA,GA/BKvB,KAgCgB,CAAC;EAE1B,CAAE,CAAC;AACJ;AAAC,IAAAwB,QAAA,GAAAC,OAAA,CAAAlB,OAAA,GAEczC,oBAAoB","ignoreList":[]}
@@ -38,7 +38,8 @@ function ZoomOutPopover({
38
38
  const props = {
39
39
  ...popoverProps,
40
40
  placement: 'left-start',
41
- flip: false
41
+ flip: false,
42
+ shift: true
42
43
  };
43
44
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockPopover.default, {
44
45
  clientId: capturingClientId || clientId,
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockPopover","_useBlockToolbarPopoverProps","_useSelectedBlockToolProps","_zoomOutToolbar","_jsxRuntime","ZoomOutPopover","clientId","__unstableContentRef","capturingClientId","isInsertionPointVisible","lastClientId","rootClientId","useSelectedBlockToolProps","popoverProps","useBlockToolbarPopoverProps","contentElement","current","props","placement","flip","jsx","default","bottomClientId","className","clsx","resize","children"],"sources":["@wordpress/block-editor/src/components/block-tools/zoom-out-popover.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * Internal dependencies\n */\nimport BlockPopover from '../block-popover';\nimport useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';\nimport useSelectedBlockToolProps from './use-selected-block-tool-props';\nimport ZoomOutToolbar from './zoom-out-toolbar';\n\nexport default function ZoomOutPopover( { clientId, __unstableContentRef } ) {\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\t// Override some of the popover props for the zoom-out toolbar.\n\tconst props = {\n\t\t...popoverProps,\n\t\tplacement: 'left-start',\n\t\tflip: false,\n\t};\n\n\treturn (\n\t\t<BlockPopover\n\t\t\tclientId={ capturingClientId || clientId }\n\t\t\tbottomClientId={ lastClientId }\n\t\t\tclassName={ clsx( 'zoom-out-toolbar-popover', {\n\t\t\t\t'is-insertion-point-visible': isInsertionPointVisible,\n\t\t\t} ) }\n\t\t\tresize={ false }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<ZoomOutToolbar\n\t\t\t\tclientId={ clientId }\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t/>\n\t\t</BlockPopover>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,aAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,4BAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,0BAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,eAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAgD,IAAAK,WAAA,GAAAL,OAAA;AAVhD;AACA;AACA;;AAEA;AACA;AACA;;AAMe,SAASM,cAAcA,CAAE;EAAEC,QAAQ;EAAEC;AAAqB,CAAC,EAAG;EAC5E,MAAM;IACLC,iBAAiB;IACjBC,uBAAuB;IACvBC,YAAY;IACZC;EACD,CAAC,GAAG,IAAAC,kCAAyB,EAAEN,QAAS,CAAC;EAEzC,MAAMO,YAAY,GAAG,IAAAC,oCAA2B,EAAE;IACjDC,cAAc,EAAER,oBAAoB,EAAES,OAAO;IAC7CV;EACD,CAAE,CAAC;;EAEH;EACA,MAAMW,KAAK,GAAG;IACb,GAAGJ,YAAY;IACfK,SAAS,EAAE,YAAY;IACvBC,IAAI,EAAE;EACP,CAAC;EAED,oBACC,IAAAf,WAAA,CAAAgB,GAAA,EAACpB,aAAA,CAAAqB,OAAY;IACZf,QAAQ,EAAGE,iBAAiB,IAAIF,QAAU;IAC1CgB,cAAc,EAAGZ,YAAc;IAC/Ba,SAAS,EAAG,IAAAC,aAAI,EAAE,0BAA0B,EAAE;MAC7C,4BAA4B,EAAEf;IAC/B,CAAE,CAAG;IACLgB,MAAM,EAAG,KAAO;IAAA,GACXR,KAAK;IAAAS,QAAA,eAEV,IAAAtB,WAAA,CAAAgB,GAAA,EAACjB,eAAA,CAAAkB,OAAc;MACdf,QAAQ,EAAGA,QAAU;MACrBK,YAAY,EAAGA;IAAc,CAC7B;EAAC,CACW,CAAC;AAEjB","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockPopover","_useBlockToolbarPopoverProps","_useSelectedBlockToolProps","_zoomOutToolbar","_jsxRuntime","ZoomOutPopover","clientId","__unstableContentRef","capturingClientId","isInsertionPointVisible","lastClientId","rootClientId","useSelectedBlockToolProps","popoverProps","useBlockToolbarPopoverProps","contentElement","current","props","placement","flip","shift","jsx","default","bottomClientId","className","clsx","resize","children"],"sources":["@wordpress/block-editor/src/components/block-tools/zoom-out-popover.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * Internal dependencies\n */\nimport BlockPopover from '../block-popover';\nimport useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';\nimport useSelectedBlockToolProps from './use-selected-block-tool-props';\nimport ZoomOutToolbar from './zoom-out-toolbar';\n\nexport default function ZoomOutPopover( { clientId, __unstableContentRef } ) {\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\t// Override some of the popover props for the zoom-out toolbar.\n\tconst props = {\n\t\t...popoverProps,\n\t\tplacement: 'left-start',\n\t\tflip: false,\n\t\tshift: true,\n\t};\n\n\treturn (\n\t\t<BlockPopover\n\t\t\tclientId={ capturingClientId || clientId }\n\t\t\tbottomClientId={ lastClientId }\n\t\t\tclassName={ clsx( 'zoom-out-toolbar-popover', {\n\t\t\t\t'is-insertion-point-visible': isInsertionPointVisible,\n\t\t\t} ) }\n\t\t\tresize={ false }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<ZoomOutToolbar\n\t\t\t\tclientId={ clientId }\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t/>\n\t\t</BlockPopover>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,aAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,4BAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,0BAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,eAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAgD,IAAAK,WAAA,GAAAL,OAAA;AAVhD;AACA;AACA;;AAEA;AACA;AACA;;AAMe,SAASM,cAAcA,CAAE;EAAEC,QAAQ;EAAEC;AAAqB,CAAC,EAAG;EAC5E,MAAM;IACLC,iBAAiB;IACjBC,uBAAuB;IACvBC,YAAY;IACZC;EACD,CAAC,GAAG,IAAAC,kCAAyB,EAAEN,QAAS,CAAC;EAEzC,MAAMO,YAAY,GAAG,IAAAC,oCAA2B,EAAE;IACjDC,cAAc,EAAER,oBAAoB,EAAES,OAAO;IAC7CV;EACD,CAAE,CAAC;;EAEH;EACA,MAAMW,KAAK,GAAG;IACb,GAAGJ,YAAY;IACfK,SAAS,EAAE,YAAY;IACvBC,IAAI,EAAE,KAAK;IACXC,KAAK,EAAE;EACR,CAAC;EAED,oBACC,IAAAhB,WAAA,CAAAiB,GAAA,EAACrB,aAAA,CAAAsB,OAAY;IACZhB,QAAQ,EAAGE,iBAAiB,IAAIF,QAAU;IAC1CiB,cAAc,EAAGb,YAAc;IAC/Bc,SAAS,EAAG,IAAAC,aAAI,EAAE,0BAA0B,EAAE;MAC7C,4BAA4B,EAAEhB;IAC/B,CAAE,CAAG;IACLiB,MAAM,EAAG,KAAO;IAAA,GACXT,KAAK;IAAAU,QAAA,eAEV,IAAAvB,WAAA,CAAAiB,GAAA,EAAClB,eAAA,CAAAmB,OAAc;MACdhB,QAAQ,EAAGA,QAAU;MACrBK,YAAY,EAAGA;IAAc,CAC7B;EAAC,CACW,CAAC;AAEjB","ignoreList":[]}
@@ -105,7 +105,6 @@ function ZoomOutToolbar({
105
105
  children: draggableProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
106
106
  icon: _icons.dragHandle,
107
107
  className: "block-selection-button_drag-handle zoom-out-toolbar-button",
108
- "aria-hidden": "true",
109
108
  label: (0, _i18n.__)('Drag'),
110
109
  iconSize: 24,
111
110
  size: "compact"
@@ -128,7 +127,7 @@ function ZoomOutToolbar({
128
127
  }), canRemove && !isBlockTemplatePart && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToolbarButton, {
129
128
  className: "zoom-out-toolbar-button",
130
129
  icon: _icons.trash,
131
- label: "Delete",
130
+ label: (0, _i18n.__)('Delete'),
132
131
  onClick: () => {
133
132
  removeBlock(clientId);
134
133
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_icons","_components","_data","_blocks","_i18n","_store","_blockDraggable","_blockMover","_shuffle","_navigableToolbar","_jsxRuntime","ZoomOutToolbar","clientId","rootClientId","selected","useSelect","select","getBlock","hasBlockMovingClientId","getNextBlockClientId","getPreviousBlockClientId","canRemoveBlock","canMoveBlock","blockEditorStore","getBlockType","blocksStore","name","blockType","isBlockTemplatePart","isNextBlockTemplatePart","nextClientId","nextName","nextBlockType","isPrevBlockTemplatePart","prevClientId","prevName","prevBlockType","blockMovingMode","canRemove","canMove","removeBlock","useDispatch","classNames","clsx","showBlockDraggable","jsxs","default","className","__","variant","orientation","children","jsx","clientIds","draggableProps","Button","icon","dragHandle","label","iconSize","size","tabIndex","hideDragHandle","isBlockMoverUpButtonDisabled","isBlockMoverDownButtonDisabled","as","ToolbarButton","trash","onClick"],"sources":["@wordpress/block-editor/src/components/block-tools/zoom-out-toolbar.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { dragHandle, trash } from '@wordpress/icons';\nimport { Button, ToolbarButton } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport BlockDraggable from '../block-draggable';\nimport BlockMover from '../block-mover';\nimport Shuffle from '../block-toolbar/shuffle';\nimport NavigableToolbar from '../navigable-toolbar';\n\nexport default function ZoomOutToolbar( { clientId, rootClientId } ) {\n\tconst selected = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlock,\n\t\t\t\thasBlockMovingClientId,\n\t\t\t\tgetNextBlockClientId,\n\t\t\t\tgetPreviousBlockClientId,\n\t\t\t\tcanRemoveBlock,\n\t\t\t\tcanMoveBlock,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { getBlockType } = select( blocksStore );\n\t\t\tconst { name } = getBlock( clientId );\n\t\t\tconst blockType = getBlockType( name );\n\t\t\tconst isBlockTemplatePart =\n\t\t\t\tblockType?.name === 'core/template-part';\n\n\t\t\tlet isNextBlockTemplatePart = false;\n\t\t\tconst nextClientId = getNextBlockClientId();\n\t\t\tif ( nextClientId ) {\n\t\t\t\tconst { name: nextName } = getBlock( nextClientId );\n\t\t\t\tconst nextBlockType = getBlockType( nextName );\n\t\t\t\tisNextBlockTemplatePart =\n\t\t\t\t\tnextBlockType?.name === 'core/template-part';\n\t\t\t}\n\n\t\t\tlet isPrevBlockTemplatePart = false;\n\t\t\tconst prevClientId = getPreviousBlockClientId();\n\t\t\tif ( prevClientId ) {\n\t\t\t\tconst { name: prevName } = getBlock( prevClientId );\n\t\t\t\tconst prevBlockType = getBlockType( prevName );\n\t\t\t\tisPrevBlockTemplatePart =\n\t\t\t\t\tprevBlockType?.name === 'core/template-part';\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tblockMovingMode: hasBlockMovingClientId(),\n\t\t\t\tisBlockTemplatePart,\n\t\t\t\tisNextBlockTemplatePart,\n\t\t\t\tisPrevBlockTemplatePart,\n\t\t\t\tcanRemove: canRemoveBlock( clientId, rootClientId ),\n\t\t\t\tcanMove: canMoveBlock( clientId, rootClientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId, rootClientId ]\n\t);\n\n\tconst {\n\t\tblockMovingMode,\n\t\tisBlockTemplatePart,\n\t\tisNextBlockTemplatePart,\n\t\tisPrevBlockTemplatePart,\n\t\tcanRemove,\n\t\tcanMove,\n\t} = selected;\n\n\tconst { removeBlock } = useDispatch( blockEditorStore );\n\n\tconst classNames = clsx( 'zoom-out-toolbar', {\n\t\t'is-block-moving-mode': !! blockMovingMode,\n\t} );\n\n\tconst showBlockDraggable = canMove && ! isBlockTemplatePart;\n\n\treturn (\n\t\t<NavigableToolbar\n\t\t\tclassName={ classNames }\n\t\t\t/* translators: accessibility text for the block toolbar */\n\t\t\taria-label={ __( 'Block tools' ) }\n\t\t\t// The variant is applied as \"toolbar\" when undefined, which is the black border style of the dropdown from the toolbar popover.\n\t\t\tvariant=\"unstyled\"\n\t\t\torientation=\"vertical\"\n\t\t>\n\t\t\t{ showBlockDraggable && (\n\t\t\t\t<BlockDraggable clientIds={ [ clientId ] }>\n\t\t\t\t\t{ ( draggableProps ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ticon={ dragHandle }\n\t\t\t\t\t\t\tclassName=\"block-selection-button_drag-handle zoom-out-toolbar-button\"\n\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\tlabel={ __( 'Drag' ) }\n\t\t\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t\t\t\tsize=\"compact\"\n\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// button can only be used with a pointer device.\n\t\t\t\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t\t\t\t{ ...draggableProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockDraggable>\n\t\t\t) }\n\t\t\t{ ! isBlockTemplatePart && (\n\t\t\t\t<BlockMover\n\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\thideDragHandle\n\t\t\t\t\tisBlockMoverUpButtonDisabled={ isPrevBlockTemplatePart }\n\t\t\t\t\tisBlockMoverDownButtonDisabled={ isNextBlockTemplatePart }\n\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ canMove && canRemove && (\n\t\t\t\t<Shuffle clientId={ clientId } as={ ToolbarButton } />\n\t\t\t) }\n\t\t\t{ canRemove && ! isBlockTemplatePart && (\n\t\t\t\t<ToolbarButton\n\t\t\t\t\tclassName=\"zoom-out-toolbar-button\"\n\t\t\t\t\ticon={ trash }\n\t\t\t\t\tlabel=\"Delete\"\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tremoveBlock(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MACxB;IAAG,CACH,CACD;EAAA,CACgB,CAAC;AAErB","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_icons","_components","_data","_blocks","_i18n","_store","_blockDraggable","_blockMover","_shuffle","_navigableToolbar","_jsxRuntime","ZoomOutToolbar","clientId","rootClientId","selected","useSelect","select","getBlock","hasBlockMovingClientId","getNextBlockClientId","getPreviousBlockClientId","canRemoveBlock","canMoveBlock","blockEditorStore","getBlockType","blocksStore","name","blockType","isBlockTemplatePart","isNextBlockTemplatePart","nextClientId","nextName","nextBlockType","isPrevBlockTemplatePart","prevClientId","prevName","prevBlockType","blockMovingMode","canRemove","canMove","removeBlock","useDispatch","classNames","clsx","showBlockDraggable","jsxs","default","className","__","variant","orientation","children","jsx","clientIds","draggableProps","Button","icon","dragHandle","label","iconSize","size","tabIndex","hideDragHandle","isBlockMoverUpButtonDisabled","isBlockMoverDownButtonDisabled","as","ToolbarButton","trash","onClick"],"sources":["@wordpress/block-editor/src/components/block-tools/zoom-out-toolbar.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { dragHandle, trash } from '@wordpress/icons';\nimport { Button, ToolbarButton } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport BlockDraggable from '../block-draggable';\nimport BlockMover from '../block-mover';\nimport Shuffle from '../block-toolbar/shuffle';\nimport NavigableToolbar from '../navigable-toolbar';\n\nexport default function ZoomOutToolbar( { clientId, rootClientId } ) {\n\tconst selected = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlock,\n\t\t\t\thasBlockMovingClientId,\n\t\t\t\tgetNextBlockClientId,\n\t\t\t\tgetPreviousBlockClientId,\n\t\t\t\tcanRemoveBlock,\n\t\t\t\tcanMoveBlock,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { getBlockType } = select( blocksStore );\n\t\t\tconst { name } = getBlock( clientId );\n\t\t\tconst blockType = getBlockType( name );\n\t\t\tconst isBlockTemplatePart =\n\t\t\t\tblockType?.name === 'core/template-part';\n\n\t\t\tlet isNextBlockTemplatePart = false;\n\t\t\tconst nextClientId = getNextBlockClientId();\n\t\t\tif ( nextClientId ) {\n\t\t\t\tconst { name: nextName } = getBlock( nextClientId );\n\t\t\t\tconst nextBlockType = getBlockType( nextName );\n\t\t\t\tisNextBlockTemplatePart =\n\t\t\t\t\tnextBlockType?.name === 'core/template-part';\n\t\t\t}\n\n\t\t\tlet isPrevBlockTemplatePart = false;\n\t\t\tconst prevClientId = getPreviousBlockClientId();\n\t\t\tif ( prevClientId ) {\n\t\t\t\tconst { name: prevName } = getBlock( prevClientId );\n\t\t\t\tconst prevBlockType = getBlockType( prevName );\n\t\t\t\tisPrevBlockTemplatePart =\n\t\t\t\t\tprevBlockType?.name === 'core/template-part';\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tblockMovingMode: hasBlockMovingClientId(),\n\t\t\t\tisBlockTemplatePart,\n\t\t\t\tisNextBlockTemplatePart,\n\t\t\t\tisPrevBlockTemplatePart,\n\t\t\t\tcanRemove: canRemoveBlock( clientId, rootClientId ),\n\t\t\t\tcanMove: canMoveBlock( clientId, rootClientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId, rootClientId ]\n\t);\n\n\tconst {\n\t\tblockMovingMode,\n\t\tisBlockTemplatePart,\n\t\tisNextBlockTemplatePart,\n\t\tisPrevBlockTemplatePart,\n\t\tcanRemove,\n\t\tcanMove,\n\t} = selected;\n\n\tconst { removeBlock } = useDispatch( blockEditorStore );\n\n\tconst classNames = clsx( 'zoom-out-toolbar', {\n\t\t'is-block-moving-mode': !! blockMovingMode,\n\t} );\n\n\tconst showBlockDraggable = canMove && ! isBlockTemplatePart;\n\n\treturn (\n\t\t<NavigableToolbar\n\t\t\tclassName={ classNames }\n\t\t\t/* translators: accessibility text for the block toolbar */\n\t\t\taria-label={ __( 'Block tools' ) }\n\t\t\t// The variant is applied as \"toolbar\" when undefined, which is the black border style of the dropdown from the toolbar popover.\n\t\t\tvariant=\"unstyled\"\n\t\t\torientation=\"vertical\"\n\t\t>\n\t\t\t{ showBlockDraggable && (\n\t\t\t\t<BlockDraggable clientIds={ [ clientId ] }>\n\t\t\t\t\t{ ( draggableProps ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ticon={ dragHandle }\n\t\t\t\t\t\t\tclassName=\"block-selection-button_drag-handle zoom-out-toolbar-button\"\n\t\t\t\t\t\t\tlabel={ __( 'Drag' ) }\n\t\t\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t\t\t\tsize=\"compact\"\n\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// button can only be used with a pointer device.\n\t\t\t\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t\t\t\t{ ...draggableProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockDraggable>\n\t\t\t) }\n\t\t\t{ ! isBlockTemplatePart && (\n\t\t\t\t<BlockMover\n\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\thideDragHandle\n\t\t\t\t\tisBlockMoverUpButtonDisabled={ isPrevBlockTemplatePart }\n\t\t\t\t\tisBlockMoverDownButtonDisabled={ isNextBlockTemplatePart }\n\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ canMove && canRemove && (\n\t\t\t\t<Shuffle clientId={ clientId } as={ ToolbarButton } />\n\t\t\t) }\n\t\t\t{ canRemove && ! isBlockTemplatePart && (\n\t\t\t\t<ToolbarButton\n\t\t\t\t\tclassName=\"zoom-out-toolbar-button\"\n\t\t\t\t\ticon={ trash }\n\t\t\t\t\tlabel={ __( 'Delete' ) }\n\t\t\t\t\tonClick={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AAM;QACf5B,WAAW,CAAE5B,QAAS,CAAC;MACxB;IAAG,CACH,CACD;EAAA,CACgB,CAAC;AAErB","ignoreList":[]}
@@ -150,7 +150,9 @@ function FlexControls({
150
150
  flexSize: value
151
151
  });
152
152
  },
153
- value: flexSize
153
+ value: flexSize,
154
+ label: flexResetLabel,
155
+ hideLabelFromVision: true
154
156
  })]
155
157
  });
156
158
  }