@wordpress/block-editor 12.23.0 → 12.25.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 (1674) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +5 -1
  3. package/build/autocompleters/block.js.map +1 -1
  4. package/build/autocompleters/link.js.map +1 -1
  5. package/build/components/alignment-control/index.js.map +1 -1
  6. package/build/components/alignment-control/ui.js +3 -1
  7. package/build/components/alignment-control/ui.js.map +1 -1
  8. package/build/components/autocomplete/index.js.map +1 -1
  9. package/build/components/block-actions/index.js.map +1 -1
  10. package/build/components/block-alignment-control/constants.js.map +1 -1
  11. package/build/components/block-alignment-control/index.js.map +1 -1
  12. package/build/components/block-alignment-control/ui.js.map +1 -1
  13. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  14. package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
  15. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  16. package/build/components/block-bindings-toolbar-indicator/index.js.map +1 -1
  17. package/build/components/block-breadcrumb/index.js.map +1 -1
  18. package/build/components/block-canvas/index.js.map +1 -1
  19. package/build/components/block-caption/index.native.js.map +1 -1
  20. package/build/components/block-card/index.js.map +1 -1
  21. package/build/components/block-compare/block-view.js.map +1 -1
  22. package/build/components/block-compare/index.js.map +1 -1
  23. package/build/components/block-content-overlay/index.js.map +1 -1
  24. package/build/components/block-context/index.js.map +1 -1
  25. package/build/components/block-controls/fill.js.map +1 -1
  26. package/build/components/block-controls/groups.js.map +1 -1
  27. package/build/components/block-controls/hook.js.map +1 -1
  28. package/build/components/block-controls/index.js.map +1 -1
  29. package/build/components/block-controls/slot.js.map +1 -1
  30. package/build/components/block-controls/slot.native.js.map +1 -1
  31. package/build/components/block-controls/use-has-block-controls.js.map +1 -1
  32. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  33. package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
  34. package/build/components/block-draggable/dropping-insertion-point.native.js +1 -1
  35. package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  36. package/build/components/block-draggable/index.js.map +1 -1
  37. package/build/components/block-draggable/index.native.js +1 -1
  38. package/build/components/block-draggable/index.native.js.map +1 -1
  39. package/build/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
  40. package/build/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
  41. package/build/components/block-edit/context.js +2 -1
  42. package/build/components/block-edit/context.js.map +1 -1
  43. package/build/components/block-edit/edit.js.map +1 -1
  44. package/build/components/block-edit/edit.native.js.map +1 -1
  45. package/build/components/block-edit/index.js +4 -2
  46. package/build/components/block-edit/index.js.map +1 -1
  47. package/build/components/block-edit-visually-button/index.js.map +1 -1
  48. package/build/components/block-editing-mode/index.js.map +1 -1
  49. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  50. package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  51. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  52. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  53. package/build/components/block-icon/index.js.map +1 -1
  54. package/build/components/block-icon/index.native.js.map +1 -1
  55. package/build/components/block-info-slot-fill/index.js.map +1 -1
  56. package/build/components/block-inspector/index.js +5 -4
  57. package/build/components/block-inspector/index.js.map +1 -1
  58. package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  59. package/build/components/block-list/block-crash-boundary.js.map +1 -1
  60. package/build/components/block-list/block-crash-boundary.native.js.map +1 -1
  61. package/build/components/block-list/block-crash-warning.js.map +1 -1
  62. package/build/components/block-list/block-crash-warning.native.js.map +1 -1
  63. package/build/components/block-list/block-html.js.map +1 -1
  64. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  65. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  66. package/build/components/block-list/block-list-context.native.js.map +1 -1
  67. package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
  68. package/build/components/block-list/block-list-item.native.js.map +1 -1
  69. package/build/components/block-list/block-outline.native.js.map +1 -1
  70. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  71. package/build/components/block-list/block.js +44 -35
  72. package/build/components/block-list/block.js.map +1 -1
  73. package/build/components/block-list/block.native.js +2 -2
  74. package/build/components/block-list/block.native.js.map +1 -1
  75. package/build/components/block-list/grid-item.native.js.map +1 -1
  76. package/build/components/block-list/index.js +18 -6
  77. package/build/components/block-list/index.js.map +1 -1
  78. package/build/components/block-list/index.native.js +1 -9
  79. package/build/components/block-list/index.native.js.map +1 -1
  80. package/build/components/block-list/insertion-point.native.js.map +1 -1
  81. package/build/components/block-list/layout.js.map +1 -1
  82. package/build/components/block-list/private-block-context.js.map +1 -1
  83. package/build/components/block-list/subdirectory-icon.js.map +1 -1
  84. package/build/components/block-list/use-block-props/index.js +8 -7
  85. package/build/components/block-list/use-block-props/index.js.map +1 -1
  86. package/build/components/block-list/use-block-props/index.native.js.map +1 -1
  87. package/build/components/block-list/use-block-props/use-block-refs.js +17 -46
  88. package/build/components/block-list/use-block-props/use-block-refs.js.map +1 -1
  89. package/build/components/block-list/use-block-props/use-focus-first-element.js +3 -2
  90. package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  91. package/build/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
  92. package/build/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
  93. package/build/components/block-list/use-block-props/use-is-hovered.js +10 -14
  94. package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  95. package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
  96. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  97. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  98. package/build/components/block-list/use-scroll-upon-insertion.native.js.map +1 -1
  99. package/build/components/block-list-appender/index.js.map +1 -1
  100. package/build/components/block-list-appender/index.native.js.map +1 -1
  101. package/build/components/block-lock/index.js.map +1 -1
  102. package/build/components/block-lock/menu-item.js.map +1 -1
  103. package/build/components/block-lock/modal.js.map +1 -1
  104. package/build/components/block-lock/toolbar.js.map +1 -1
  105. package/build/components/block-lock/use-block-lock.js.map +1 -1
  106. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  107. package/build/components/block-mover/button.js.map +1 -1
  108. package/build/components/block-mover/index.js.map +1 -1
  109. package/build/components/block-mover/index.native.js +3 -1
  110. package/build/components/block-mover/index.native.js.map +1 -1
  111. package/build/components/block-mover/mover-description.js.map +1 -1
  112. package/build/components/block-mover/mover-description.native.js.map +1 -1
  113. package/build/components/block-navigation/dropdown.js.map +1 -1
  114. package/build/components/block-parent-selector/index.js.map +1 -1
  115. package/build/components/block-pattern-setup/constants.js.map +1 -1
  116. package/build/components/block-pattern-setup/index.js.map +1 -1
  117. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  118. package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  119. package/build/components/block-patterns-list/index.js.map +1 -1
  120. package/build/components/block-patterns-paging/index.js +8 -4
  121. package/build/components/block-patterns-paging/index.js.map +1 -1
  122. package/build/components/block-popover/cover.js.map +1 -1
  123. package/build/components/block-popover/drop-zone.js.map +1 -1
  124. package/build/components/block-popover/inbetween.js.map +1 -1
  125. package/build/components/block-popover/index.js.map +1 -1
  126. package/build/components/block-popover/use-popover-scroll.js.map +1 -1
  127. package/build/components/block-preview/auto.js.map +1 -1
  128. package/build/components/block-preview/index.js.map +1 -1
  129. package/build/components/block-quick-navigation/index.js.map +1 -1
  130. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  131. package/build/components/block-rename/index.js.map +1 -1
  132. package/build/components/block-rename/is-empty-string.js.map +1 -1
  133. package/build/components/block-rename/modal.js +13 -9
  134. package/build/components/block-rename/modal.js.map +1 -1
  135. package/build/components/block-rename/rename-control.js +3 -1
  136. package/build/components/block-rename/rename-control.js.map +1 -1
  137. package/build/components/block-rename/use-block-rename.js.map +1 -1
  138. package/build/components/block-selection-clearer/index.js.map +1 -1
  139. package/build/components/block-settings/button.native.js.map +1 -1
  140. package/build/components/block-settings/container.native.js.map +1 -1
  141. package/build/components/block-settings/index.native.js +1 -1
  142. package/build/components/block-settings/index.native.js.map +1 -1
  143. package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  144. package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  145. package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  146. package/build/components/block-settings-menu/block-settings-dropdown.js +0 -25
  147. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  148. package/build/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
  149. package/build/components/block-settings-menu/index.js.map +1 -1
  150. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  151. package/build/components/block-styles/index.js.map +1 -1
  152. package/build/components/block-styles/index.native.js.map +1 -1
  153. package/build/components/block-styles/menu-items.js.map +1 -1
  154. package/build/components/block-styles/preview-panel.js.map +1 -1
  155. package/build/components/block-styles/preview.native.js.map +1 -1
  156. package/build/components/block-styles/use-styles-for-block.js.map +1 -1
  157. package/build/components/block-styles/utils.js.map +1 -1
  158. package/build/components/block-switcher/block-styles-menu.js.map +1 -1
  159. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  160. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  161. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  162. package/build/components/block-switcher/index.js.map +1 -1
  163. package/build/components/block-switcher/pattern-transformations-menu.js +3 -1
  164. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  165. package/build/components/block-switcher/preview-block-popover.js.map +1 -1
  166. package/build/components/block-switcher/use-transformed-patterns.js +6 -2
  167. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  168. package/build/components/block-switcher/utils.js +15 -5
  169. package/build/components/block-switcher/utils.js.map +1 -1
  170. package/build/components/block-title/index.js.map +1 -1
  171. package/build/components/block-title/use-block-display-title.js.map +1 -1
  172. package/build/components/block-toolbar/block-name-context.js.map +1 -1
  173. package/build/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
  174. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  175. package/build/components/block-toolbar/index.js +1 -1
  176. package/build/components/block-toolbar/index.js.map +1 -1
  177. package/build/components/block-toolbar/index.native.js.map +1 -1
  178. package/build/components/block-toolbar/shuffle.js.map +1 -1
  179. package/build/components/block-toolbar/use-has-block-toolbar.js +20 -12
  180. package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  181. package/build/components/block-toolbar/utils.js.map +1 -1
  182. package/build/components/block-tools/block-selection-button.js +16 -12
  183. package/build/components/block-tools/block-selection-button.js.map +1 -1
  184. package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  185. package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
  186. package/build/components/block-tools/empty-block-inserter.js.map +1 -1
  187. package/build/components/block-tools/index.js +4 -2
  188. package/build/components/block-tools/index.js.map +1 -1
  189. package/build/components/block-tools/insertion-point.js.map +1 -1
  190. package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  191. package/build/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  192. package/build/components/block-tools/use-show-block-tools.js +9 -18
  193. package/build/components/block-tools/use-show-block-tools.js.map +1 -1
  194. package/build/components/block-tools/zoom-out-mode-inserters.js +5 -1
  195. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  196. package/build/components/block-types-list/index.js.map +1 -1
  197. package/build/components/block-types-list/index.native.js.map +1 -1
  198. package/build/components/block-variation-picker/index.js +3 -2
  199. package/build/components/block-variation-picker/index.js.map +1 -1
  200. package/build/components/block-variation-picker/index.native.js.map +1 -1
  201. package/build/components/block-variation-transforms/index.js +7 -2
  202. package/build/components/block-variation-transforms/index.js.map +1 -1
  203. package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
  204. package/build/components/block-vertical-alignment-control/index.js.map +1 -1
  205. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  206. package/build/components/border-radius-control/all-input-control.js.map +1 -1
  207. package/build/components/border-radius-control/index.js.map +1 -1
  208. package/build/components/border-radius-control/input-controls.js.map +1 -1
  209. package/build/components/border-radius-control/linked-button.js.map +1 -1
  210. package/build/components/border-radius-control/utils.js.map +1 -1
  211. package/build/components/button-block-appender/index.js.map +1 -1
  212. package/build/components/button-block-appender/index.native.js +11 -1
  213. package/build/components/button-block-appender/index.native.js.map +1 -1
  214. package/build/components/caption/index.native.js.map +1 -1
  215. package/build/components/child-layout-control/index.js.map +1 -1
  216. package/build/components/color-palette/control.js.map +1 -1
  217. package/build/components/color-palette/index.js.map +1 -1
  218. package/build/components/color-palette/with-color-context.js.map +1 -1
  219. package/build/components/color-style-selector/index.js.map +1 -1
  220. package/build/components/colors/index.js +1 -1
  221. package/build/components/colors/index.js.map +1 -1
  222. package/build/components/colors/utils.js.map +1 -1
  223. package/build/components/colors/with-colors.js.map +1 -1
  224. package/build/components/colors-gradients/control.js.map +1 -1
  225. package/build/components/colors-gradients/dropdown.js.map +1 -1
  226. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  227. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  228. package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
  229. package/build/components/contrast-checker/index.js.map +1 -1
  230. package/build/components/contrast-checker/index.native.js.map +1 -1
  231. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  232. package/build/components/convert-to-group-buttons/index.native.js.map +1 -1
  233. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  234. package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  235. package/build/components/copy-handler/index.js.map +1 -1
  236. package/build/components/date-format-picker/index.js.map +1 -1
  237. package/build/components/default-block-appender/index.js.map +1 -1
  238. package/build/components/default-block-appender/index.native.js.map +1 -1
  239. package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  240. package/build/components/dimensions-tool/index.js.map +1 -1
  241. package/build/components/dimensions-tool/scale-tool.js.map +1 -1
  242. package/build/components/dimensions-tool/width-height-tool.js +6 -2
  243. package/build/components/dimensions-tool/width-height-tool.js.map +1 -1
  244. package/build/components/duotone/utils.js.map +1 -1
  245. package/build/components/duotone-control/index.js.map +1 -1
  246. package/build/components/editable-text/index.js.map +1 -1
  247. package/build/components/editor-styles/index.js +2 -1
  248. package/build/components/editor-styles/index.js.map +1 -1
  249. package/build/components/floating-toolbar/index.native.js +9 -5
  250. package/build/components/floating-toolbar/index.native.js.map +1 -1
  251. package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
  252. package/build/components/font-appearance-control/index.js.map +1 -1
  253. package/build/components/font-family/index.js.map +1 -1
  254. package/build/components/font-sizes/fluid-utils.js.map +1 -1
  255. package/build/components/font-sizes/font-size-picker.js.map +1 -1
  256. package/build/components/font-sizes/index.js.map +1 -1
  257. package/build/components/font-sizes/index.native.js.map +1 -1
  258. package/build/components/font-sizes/utils.js.map +1 -1
  259. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  260. package/build/components/global-styles/advanced-panel.js.map +1 -1
  261. package/build/components/global-styles/background-panel.js +20 -17
  262. package/build/components/global-styles/background-panel.js.map +1 -1
  263. package/build/components/global-styles/border-panel.js.map +1 -1
  264. package/build/components/global-styles/color-panel.js +3 -1
  265. package/build/components/global-styles/color-panel.js.map +1 -1
  266. package/build/components/global-styles/color-panel.native.js.map +1 -1
  267. package/build/components/global-styles/context.js.map +1 -1
  268. package/build/components/global-styles/dimensions-panel.js +16 -0
  269. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  270. package/build/components/global-styles/filters-panel.js.map +1 -1
  271. package/build/components/global-styles/get-block-css-selector.js.map +1 -1
  272. package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
  273. package/build/components/global-styles/hooks.js +3 -2
  274. package/build/components/global-styles/hooks.js.map +1 -1
  275. package/build/components/global-styles/image-settings-panel.js.map +1 -1
  276. package/build/components/global-styles/index.js +1 -1
  277. package/build/components/global-styles/index.js.map +1 -1
  278. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  279. package/build/components/global-styles/typography-panel.js +23 -23
  280. package/build/components/global-styles/typography-panel.js.map +1 -1
  281. package/build/components/global-styles/typography-utils.js.map +1 -1
  282. package/build/components/global-styles/use-global-styles-output.js +153 -136
  283. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  284. package/build/components/global-styles/utils.js +45 -0
  285. package/build/components/global-styles/utils.js.map +1 -1
  286. package/build/components/gradients/index.js.map +1 -1
  287. package/build/components/gradients/index.native.js.map +1 -1
  288. package/build/components/gradients/use-gradient.js.map +1 -1
  289. package/build/components/gradients/with-gradient.js.map +1 -1
  290. package/build/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  291. package/build/components/grid-visualizer/grid-visualizer.js.map +1 -1
  292. package/build/components/grid-visualizer/index.js.map +1 -1
  293. package/build/components/grid-visualizer/utils.js.map +1 -1
  294. package/build/components/height-control/index.js.map +1 -1
  295. package/build/components/iframe/get-compatibility-styles.js.map +1 -1
  296. package/build/components/iframe/index.js +12 -13
  297. package/build/components/iframe/index.js.map +1 -1
  298. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  299. package/build/components/image-editor/constants.js.map +1 -1
  300. package/build/components/image-editor/context.js.map +1 -1
  301. package/build/components/image-editor/cropper.js +6 -2
  302. package/build/components/image-editor/cropper.js.map +1 -1
  303. package/build/components/image-editor/form-controls.js.map +1 -1
  304. package/build/components/image-editor/index.js +0 -2
  305. package/build/components/image-editor/index.js.map +1 -1
  306. package/build/components/image-editor/rotation-button.js.map +1 -1
  307. package/build/components/image-editor/use-save-image.js.map +1 -1
  308. package/build/components/image-editor/use-transform-image.js.map +1 -1
  309. package/build/components/image-editor/zoom-dropdown.js.map +1 -1
  310. package/build/components/image-link-destinations/index.native.js.map +1 -1
  311. package/build/components/image-size-control/index.js.map +1 -1
  312. package/build/components/image-size-control/use-dimension-handler.js.map +1 -1
  313. package/build/components/index.js +1 -1
  314. package/build/components/index.js.map +1 -1
  315. package/build/components/index.native.js +1 -1
  316. package/build/components/index.native.js.map +1 -1
  317. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  318. package/build/components/inner-blocks/constants.native.js.map +1 -1
  319. package/build/components/inner-blocks/default-block-appender.js.map +1 -1
  320. package/build/components/inner-blocks/index.js +16 -2
  321. package/build/components/inner-blocks/index.js.map +1 -1
  322. package/build/components/inner-blocks/index.native.js.map +1 -1
  323. package/build/components/inner-blocks/use-block-context.js.map +1 -1
  324. package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  325. package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  326. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  327. package/build/components/inner-blocks/with-client-id.js.map +1 -1
  328. package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
  329. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  330. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  331. package/build/components/inserter/block-patterns-tab/index.js +19 -25
  332. package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
  333. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +2 -24
  334. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
  335. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -3
  336. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  337. package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  338. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  339. package/build/components/inserter/block-patterns-tab/utils.js.map +1 -1
  340. package/build/components/inserter/block-types-tab.js +4 -0
  341. package/build/components/inserter/block-types-tab.js.map +1 -1
  342. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  343. package/build/components/inserter/category-tabs/index.js +56 -0
  344. package/build/components/inserter/category-tabs/index.js.map +1 -0
  345. package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  346. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  347. package/build/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
  348. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  349. package/build/components/inserter/hooks/use-patterns-paging.js.map +1 -1
  350. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  351. package/build/components/inserter/index.js.map +1 -1
  352. package/build/components/inserter/index.native.js.map +1 -1
  353. package/build/components/inserter/library.js.map +1 -1
  354. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  355. package/build/components/inserter/media-tab/index.js +2 -2
  356. package/build/components/inserter/media-tab/index.js.map +1 -1
  357. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  358. package/build/components/inserter/media-tab/media-panel.js +0 -25
  359. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  360. package/build/components/inserter/media-tab/media-preview.js +13 -3
  361. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  362. package/build/components/inserter/media-tab/media-tab.js +15 -29
  363. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  364. package/build/components/inserter/media-tab/utils.js.map +1 -1
  365. package/build/components/inserter/menu.js +73 -77
  366. package/build/components/inserter/menu.js.map +1 -1
  367. package/build/components/inserter/menu.native.js.map +1 -1
  368. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  369. package/build/components/inserter/no-results.js.map +1 -1
  370. package/build/components/inserter/no-results.native.js.map +1 -1
  371. package/build/components/inserter/panel.js.map +1 -1
  372. package/build/components/inserter/preview-panel.js.map +1 -1
  373. package/build/components/inserter/quick-inserter.js.map +1 -1
  374. package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
  375. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  376. package/build/components/inserter/search-items.js.map +1 -1
  377. package/build/components/inserter/search-results.js.map +1 -1
  378. package/build/components/inserter/search-results.native.js.map +1 -1
  379. package/build/components/inserter/tabs.js +13 -9
  380. package/build/components/inserter/tabs.js.map +1 -1
  381. package/build/components/inserter/tabs.native.js.map +1 -1
  382. package/build/components/inserter/tips.js.map +1 -1
  383. package/build/components/inserter/utils.native.js.map +1 -1
  384. package/build/components/inserter-button/index.native.js.map +1 -1
  385. package/build/components/inserter-button/sparkles.js.map +1 -1
  386. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  387. package/build/components/inserter-list-item/index.js.map +1 -1
  388. package/build/components/inserter-listbox/context.js.map +1 -1
  389. package/build/components/inserter-listbox/group.js.map +1 -1
  390. package/build/components/inserter-listbox/index.js.map +1 -1
  391. package/build/components/inserter-listbox/item.js.map +1 -1
  392. package/build/components/inserter-listbox/row.js.map +1 -1
  393. package/build/components/inserter-menu-extension/index.js.map +1 -1
  394. package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
  395. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  396. package/build/components/inspector-controls/fill.js.map +1 -1
  397. package/build/components/inspector-controls/fill.native.js.map +1 -1
  398. package/build/components/inspector-controls/groups.js.map +1 -1
  399. package/build/components/inspector-controls/index.js.map +1 -1
  400. package/build/components/inspector-controls/slot.js.map +1 -1
  401. package/build/components/inspector-controls/slot.native.js.map +1 -1
  402. package/build/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
  403. package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  404. package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
  405. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  406. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  407. package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  408. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  409. package/build/components/inspector-controls-tabs/styles-tab.js +1 -1
  410. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  411. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  412. package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
  413. package/build/components/inspector-controls-tabs/utils.js.map +1 -1
  414. package/build/components/inspector-popover-header/index.js.map +1 -1
  415. package/build/components/justify-content-control/index.js.map +1 -1
  416. package/build/components/justify-content-control/ui.js.map +1 -1
  417. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  418. package/build/components/letter-spacing-control/index.js.map +1 -1
  419. package/build/components/line-height-control/index.js +6 -2
  420. package/build/components/line-height-control/index.js.map +1 -1
  421. package/build/components/line-height-control/index.native.js.map +1 -1
  422. package/build/components/line-height-control/utils.js.map +1 -1
  423. package/build/components/link-control/constants.js.map +1 -1
  424. package/build/components/link-control/index.js.map +1 -1
  425. package/build/components/link-control/is-url-like.js.map +1 -1
  426. package/build/components/link-control/link-preview.js.map +1 -1
  427. package/build/components/link-control/search-create-button.js.map +1 -1
  428. package/build/components/link-control/search-input.js.map +1 -1
  429. package/build/components/link-control/search-item.js +9 -3
  430. package/build/components/link-control/search-item.js.map +1 -1
  431. package/build/components/link-control/search-results.js.map +1 -1
  432. package/build/components/link-control/settings-drawer.js.map +1 -1
  433. package/build/components/link-control/settings.js.map +1 -1
  434. package/build/components/link-control/use-create-page.js.map +1 -1
  435. package/build/components/link-control/use-internal-value.js.map +1 -1
  436. package/build/components/link-control/use-rich-url-data.js.map +1 -1
  437. package/build/components/link-control/use-search-handler.js.map +1 -1
  438. package/build/components/link-control/viewer-slot.js.map +1 -1
  439. package/build/components/list-view/appender.js.map +1 -1
  440. package/build/components/list-view/aria-referenced-text.js.map +1 -1
  441. package/build/components/list-view/block-contents.js.map +1 -1
  442. package/build/components/list-view/block-select-button.js +5 -142
  443. package/build/components/list-view/block-select-button.js.map +1 -1
  444. package/build/components/list-view/block.js +166 -14
  445. package/build/components/list-view/block.js.map +1 -1
  446. package/build/components/list-view/branch.js.map +1 -1
  447. package/build/components/list-view/context.js.map +1 -1
  448. package/build/components/list-view/drop-indicator.js.map +1 -1
  449. package/build/components/list-view/expander.js.map +1 -1
  450. package/build/components/list-view/index.js +1 -1
  451. package/build/components/list-view/index.js.map +1 -1
  452. package/build/components/list-view/leaf.js.map +1 -1
  453. package/build/components/list-view/use-block-selection.js.map +1 -1
  454. package/build/components/list-view/use-clipboard-handler.js.map +1 -1
  455. package/build/components/list-view/use-list-view-block-indexes.js.map +1 -1
  456. package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
  457. package/build/components/list-view/use-list-view-collapse-items.js.map +1 -1
  458. package/build/components/list-view/use-list-view-drop-zone.js +6 -1
  459. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  460. package/build/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
  461. package/build/components/list-view/use-list-view-images.js.map +1 -1
  462. package/build/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
  463. package/build/components/list-view/utils.js +3 -1
  464. package/build/components/list-view/utils.js.map +1 -1
  465. package/build/components/media-placeholder/index.js +3 -3
  466. package/build/components/media-placeholder/index.js.map +1 -1
  467. package/build/components/media-placeholder/index.native.js.map +1 -1
  468. package/build/components/media-replace-flow/index.js.map +1 -1
  469. package/build/components/media-replace-flow/index.native.js.map +1 -1
  470. package/build/components/media-upload/check.js.map +1 -1
  471. package/build/components/media-upload/constants.native.js.map +1 -1
  472. package/build/components/media-upload/index.js.map +1 -1
  473. package/build/components/media-upload/index.native.js.map +1 -1
  474. package/build/components/media-upload-progress/constants.js.map +1 -1
  475. package/build/components/media-upload-progress/index.native.js.map +1 -1
  476. package/build/components/multi-selection-inspector/index.js.map +1 -1
  477. package/build/components/navigable-toolbar/index.js +3 -1
  478. package/build/components/navigable-toolbar/index.js.map +1 -1
  479. package/build/components/observe-typing/index.js.map +1 -1
  480. package/build/components/panel-color-settings/index.js.map +1 -1
  481. package/build/components/plain-text/index.js.map +1 -1
  482. package/build/components/plain-text/index.native.js.map +1 -1
  483. package/build/components/preview-options/index.js.map +1 -1
  484. package/build/components/provider/block-refs-provider.js +3 -4
  485. package/build/components/provider/block-refs-provider.js.map +1 -1
  486. package/build/components/provider/index.js.map +1 -1
  487. package/build/components/provider/index.native.js.map +1 -1
  488. package/build/components/provider/use-block-sync.js +3 -12
  489. package/build/components/provider/use-block-sync.js.map +1 -1
  490. package/build/components/provider/with-registry-provider.js.map +1 -1
  491. package/build/components/publish-date-time-picker/index.js.map +1 -1
  492. package/build/components/recursion-provider/index.js +2 -2
  493. package/build/components/recursion-provider/index.js.map +1 -1
  494. package/build/components/resizable-box-popover/index.js.map +1 -1
  495. package/build/components/resolution-tool/index.js.map +1 -1
  496. package/build/components/responsive-block-control/index.js.map +1 -1
  497. package/build/components/responsive-block-control/label.js.map +1 -1
  498. package/build/components/rich-text/content.js +26 -19
  499. package/build/components/rich-text/content.js.map +1 -1
  500. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  501. package/build/components/rich-text/event-listeners/before-input-rules.js +93 -0
  502. package/build/components/rich-text/event-listeners/before-input-rules.js.map +1 -0
  503. package/build/components/rich-text/event-listeners/delete.js +58 -0
  504. package/build/components/rich-text/event-listeners/delete.js.map +1 -0
  505. package/build/components/rich-text/event-listeners/enter.js +98 -0
  506. package/build/components/rich-text/event-listeners/enter.js.map +1 -0
  507. package/build/components/rich-text/event-listeners/firefox-compat.js +36 -0
  508. package/build/components/rich-text/event-listeners/firefox-compat.js.map +1 -0
  509. package/build/components/rich-text/event-listeners/index.js +44 -0
  510. package/build/components/rich-text/event-listeners/index.js.map +1 -0
  511. package/build/components/rich-text/event-listeners/input-events.js +22 -0
  512. package/build/components/rich-text/event-listeners/input-events.js.map +1 -0
  513. package/build/components/rich-text/event-listeners/input-rules.js +135 -0
  514. package/build/components/rich-text/event-listeners/input-rules.js.map +1 -0
  515. package/build/components/rich-text/event-listeners/insert-replacement-text.js +33 -0
  516. package/build/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -0
  517. package/build/components/rich-text/event-listeners/paste-handler.js +146 -0
  518. package/build/components/rich-text/event-listeners/paste-handler.js.map +1 -0
  519. package/build/components/rich-text/event-listeners/remove-browser-shortcuts.js +27 -0
  520. package/build/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -0
  521. package/build/components/rich-text/event-listeners/shortcuts.js +22 -0
  522. package/build/components/rich-text/event-listeners/shortcuts.js.map +1 -0
  523. package/build/components/rich-text/event-listeners/undo-automatic-change.js +51 -0
  524. package/build/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -0
  525. package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
  526. package/build/components/rich-text/format-edit.js.map +1 -1
  527. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  528. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  529. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  530. package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
  531. package/build/components/rich-text/get-rich-text-values.js.map +1 -1
  532. package/build/components/rich-text/index.js +51 -31
  533. package/build/components/rich-text/index.js.map +1 -1
  534. package/build/components/rich-text/index.native.js +16 -4
  535. package/build/components/rich-text/index.native.js.map +1 -1
  536. package/build/components/rich-text/input-event.js.map +1 -1
  537. package/build/components/rich-text/input-event.native.js.map +1 -1
  538. package/build/components/rich-text/multiline.js +6 -2
  539. package/build/components/rich-text/multiline.js.map +1 -1
  540. package/build/components/rich-text/native/format-edit.js.map +1 -1
  541. package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
  542. package/build/components/rich-text/native/index.js.map +1 -1
  543. package/build/components/rich-text/native/index.native.js +12 -0
  544. package/build/components/rich-text/native/index.native.js.map +1 -1
  545. package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  546. package/build/components/rich-text/native/use-format-types.js.map +1 -1
  547. package/build/components/rich-text/prevent-event-discovery.js.map +1 -1
  548. package/build/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
  549. package/build/components/rich-text/shortcut.js.map +1 -1
  550. package/build/components/rich-text/shortcut.native.js.map +1 -1
  551. package/build/components/rich-text/split-value.js.map +1 -1
  552. package/build/components/rich-text/toolbar-button.js.map +1 -1
  553. package/build/components/rich-text/use-format-types.js +8 -4
  554. package/build/components/rich-text/use-format-types.js.map +1 -1
  555. package/build/components/rich-text/use-mark-persistent.js.map +1 -1
  556. package/build/components/rich-text/utils.js.map +1 -1
  557. package/build/components/rich-text/with-deprecations.js.map +1 -1
  558. package/build/components/segmented-text-control/index.js +62 -0
  559. package/build/components/segmented-text-control/index.js.map +1 -0
  560. package/build/components/selection-scroll-into-view/index.js.map +1 -1
  561. package/build/components/skip-to-selected-block/index.js.map +1 -1
  562. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  563. package/build/components/spacing-sizes-control/index.js.map +1 -1
  564. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  565. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  566. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  567. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -2
  568. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  569. package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  570. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  571. package/build/components/text-alignment-control/index.js +76 -0
  572. package/build/components/text-alignment-control/index.js.map +1 -0
  573. package/build/components/text-decoration-control/index.js +21 -25
  574. package/build/components/text-decoration-control/index.js.map +1 -1
  575. package/build/components/text-transform-control/index.js +18 -22
  576. package/build/components/text-transform-control/index.js.map +1 -1
  577. package/build/components/tool-selector/index.js.map +1 -1
  578. package/build/components/typewriter/index.js.map +1 -1
  579. package/build/components/ungroup-button/index.native.js.map +1 -1
  580. package/build/components/unit-control/index.js.map +1 -1
  581. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  582. package/build/components/url-input/button.js.map +1 -1
  583. package/build/components/url-input/index.js.map +1 -1
  584. package/build/components/url-input/index.native.js.map +1 -1
  585. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  586. package/build/components/url-popover/index.js.map +1 -1
  587. package/build/components/url-popover/link-editor.js.map +1 -1
  588. package/build/components/url-popover/link-viewer-url.js.map +1 -1
  589. package/build/components/url-popover/link-viewer.js.map +1 -1
  590. package/build/components/use-block-commands/index.js +20 -2
  591. package/build/components/use-block-commands/index.js.map +1 -1
  592. package/build/components/use-block-display-information/index.js +9 -3
  593. package/build/components/use-block-display-information/index.js.map +1 -1
  594. package/build/components/use-block-drop-zone/index.js.map +1 -1
  595. package/build/components/use-block-drop-zone/index.native.js.map +1 -1
  596. package/build/components/use-flash-editable-blocks/index.js.map +1 -1
  597. package/build/components/use-moving-animation/index.js.map +1 -1
  598. package/build/components/use-on-block-drop/index.js +3 -1
  599. package/build/components/use-on-block-drop/index.js.map +1 -1
  600. package/build/components/use-on-block-drop/index.native.js.map +1 -1
  601. package/build/components/use-on-block-drop/types.js.map +1 -1
  602. package/build/components/use-paste-styles/index.js +1 -0
  603. package/build/components/use-paste-styles/index.js.map +1 -1
  604. package/build/components/use-resize-canvas/index.js.map +1 -1
  605. package/build/components/use-settings/index.js.map +1 -1
  606. package/build/components/use-unsupported-block-editor/index.native.js.map +1 -1
  607. package/build/components/video-player/gridicon-play.native.js.map +1 -1
  608. package/build/components/video-player/index.native.js.map +1 -1
  609. package/build/components/warning/index.js.map +1 -1
  610. package/build/components/warning/index.native.js.map +1 -1
  611. package/build/components/writing-flow/index.js.map +1 -1
  612. package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
  613. package/build/components/writing-flow/use-click-selection.js.map +1 -1
  614. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
  615. package/build/components/writing-flow/use-drag-selection.js +3 -1
  616. package/build/components/writing-flow/use-drag-selection.js.map +1 -1
  617. package/build/components/writing-flow/use-input.js.map +1 -1
  618. package/build/components/writing-flow/use-multi-selection.js.map +1 -1
  619. package/build/components/writing-flow/use-select-all.js.map +1 -1
  620. package/build/components/writing-flow/use-selection-observer.js.map +1 -1
  621. package/build/components/writing-flow/use-tab-nav.js +3 -1
  622. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  623. package/build/components/writing-flow/utils.js.map +1 -1
  624. package/build/components/writing-mode-control/index.js +16 -20
  625. package/build/components/writing-mode-control/index.js.map +1 -1
  626. package/build/elements/index.js.map +1 -1
  627. package/build/hooks/align.js.map +1 -1
  628. package/build/hooks/align.native.js +1 -1
  629. package/build/hooks/align.native.js.map +1 -1
  630. package/build/hooks/anchor.js.map +1 -1
  631. package/build/hooks/aria-label.js.map +1 -1
  632. package/build/hooks/background.js +3 -3
  633. package/build/hooks/background.js.map +1 -1
  634. package/build/hooks/block-hooks.js.map +1 -1
  635. package/build/hooks/block-renaming.js +0 -37
  636. package/build/hooks/block-renaming.js.map +1 -1
  637. package/build/hooks/border.js.map +1 -1
  638. package/build/hooks/color.js +1 -1
  639. package/build/hooks/color.js.map +1 -1
  640. package/build/hooks/compat.js.map +1 -1
  641. package/build/hooks/content-lock-ui.js +5 -5
  642. package/build/hooks/content-lock-ui.js.map +1 -1
  643. package/build/hooks/contrast-checker.js.map +1 -1
  644. package/build/hooks/custom-class-name.js.map +1 -1
  645. package/build/hooks/custom-class-name.native.js.map +1 -1
  646. package/build/hooks/dimensions.js.map +1 -1
  647. package/build/hooks/duotone.js +3 -1
  648. package/build/hooks/duotone.js.map +1 -1
  649. package/build/hooks/font-family.js.map +1 -1
  650. package/build/hooks/font-size.js.map +1 -1
  651. package/build/hooks/gap.js.map +1 -1
  652. package/build/hooks/generated-class-name.js.map +1 -1
  653. package/build/hooks/index.js +6 -5
  654. package/build/hooks/index.js.map +1 -1
  655. package/build/hooks/index.native.js.map +1 -1
  656. package/build/hooks/layout-child.js.map +1 -1
  657. package/build/hooks/layout.js +38 -19
  658. package/build/hooks/layout.js.map +1 -1
  659. package/build/hooks/layout.native.js.map +1 -1
  660. package/build/hooks/line-height.js.map +1 -1
  661. package/build/hooks/lock.js.map +1 -1
  662. package/build/hooks/metadata.js.map +1 -1
  663. package/build/hooks/position.js.map +1 -1
  664. package/build/hooks/settings.js.map +1 -1
  665. package/build/hooks/spacing-visualizer.js.map +1 -1
  666. package/build/hooks/style.js.map +1 -1
  667. package/build/hooks/supports.js +27 -4
  668. package/build/hooks/supports.js.map +1 -1
  669. package/build/hooks/text-align.js +156 -0
  670. package/build/hooks/text-align.js.map +1 -0
  671. package/build/hooks/typography.js +3 -2
  672. package/build/hooks/typography.js.map +1 -1
  673. package/build/hooks/typography.native.js.map +1 -1
  674. package/build/hooks/use-bindings-attributes.js +66 -129
  675. package/build/hooks/use-bindings-attributes.js.map +1 -1
  676. package/build/hooks/use-border-props.js.map +1 -1
  677. package/build/hooks/use-cached-truthy.js.map +1 -1
  678. package/build/hooks/use-color-props.js.map +1 -1
  679. package/build/hooks/use-editor-wrapper-styles.native.js.map +1 -1
  680. package/build/hooks/use-shadow-props.js.map +1 -1
  681. package/build/hooks/use-spacing-props.js.map +1 -1
  682. package/build/hooks/use-typography-props.js +2 -1
  683. package/build/hooks/use-typography-props.js.map +1 -1
  684. package/build/hooks/use-zoom-out.js +22 -15
  685. package/build/hooks/use-zoom-out.js.map +1 -1
  686. package/build/hooks/utils.js +37 -8
  687. package/build/hooks/utils.js.map +1 -1
  688. package/build/index.js.map +1 -1
  689. package/build/index.native.js.map +1 -1
  690. package/build/layouts/constrained.js.map +1 -1
  691. package/build/layouts/definitions.js +8 -6
  692. package/build/layouts/definitions.js.map +1 -1
  693. package/build/layouts/flex.js.map +1 -1
  694. package/build/layouts/flow.js.map +1 -1
  695. package/build/layouts/grid.js +52 -9
  696. package/build/layouts/grid.js.map +1 -1
  697. package/build/layouts/index.js.map +1 -1
  698. package/build/layouts/utils.js.map +1 -1
  699. package/build/lock-unlock.js.map +1 -1
  700. package/build/private-apis.js +5 -3
  701. package/build/private-apis.js.map +1 -1
  702. package/build/private-apis.native.js +1 -1
  703. package/build/private-apis.native.js.map +1 -1
  704. package/build/store/actions.js +47 -9
  705. package/build/store/actions.js.map +1 -1
  706. package/build/store/array.js.map +1 -1
  707. package/build/store/constants.js.map +1 -1
  708. package/build/store/defaults.js.map +1 -1
  709. package/build/store/defaults.native.js.map +1 -1
  710. package/build/store/get-block-settings.js.map +1 -1
  711. package/build/store/index.js +1 -1
  712. package/build/store/index.js.map +1 -1
  713. package/build/store/private-actions.js +5 -2
  714. package/build/store/private-actions.js.map +1 -1
  715. package/build/store/private-keys.js.map +1 -1
  716. package/build/store/private-selectors.js +121 -44
  717. package/build/store/private-selectors.js.map +1 -1
  718. package/build/store/reducer.js +11 -8
  719. package/build/store/reducer.js.map +1 -1
  720. package/build/store/selectors.js +143 -88
  721. package/build/store/selectors.js.map +1 -1
  722. package/build/store/undo-ignore.js.map +1 -1
  723. package/build/store/utils.js.map +1 -1
  724. package/build/utils/dom.js.map +1 -1
  725. package/build/utils/get-px-from-css-unit.js.map +1 -1
  726. package/build/utils/index.js.map +1 -1
  727. package/build/utils/math.js.map +1 -1
  728. package/build/utils/object.js +17 -0
  729. package/build/utils/object.js.map +1 -1
  730. package/build/utils/order-inserter-block-items.js +6 -2
  731. package/build/utils/order-inserter-block-items.js.map +1 -1
  732. package/build/utils/pasting.js +6 -2
  733. package/build/utils/pasting.js.map +1 -1
  734. package/build/utils/selection.js.map +1 -1
  735. package/build/utils/sorting.js.map +1 -1
  736. package/build/utils/transform-styles/index.js +1 -1
  737. package/build/utils/transform-styles/index.js.map +1 -1
  738. package/build/utils/use-notify-copy.js.map +1 -1
  739. package/build-module/autocompleters/block.js.map +1 -1
  740. package/build-module/autocompleters/link.js.map +1 -1
  741. package/build-module/components/alignment-control/index.js.map +1 -1
  742. package/build-module/components/alignment-control/ui.js +3 -1
  743. package/build-module/components/alignment-control/ui.js.map +1 -1
  744. package/build-module/components/autocomplete/index.js.map +1 -1
  745. package/build-module/components/block-actions/index.js.map +1 -1
  746. package/build-module/components/block-alignment-control/constants.js.map +1 -1
  747. package/build-module/components/block-alignment-control/index.js.map +1 -1
  748. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  749. package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
  750. package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
  751. package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
  752. package/build-module/components/block-bindings-toolbar-indicator/index.js.map +1 -1
  753. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  754. package/build-module/components/block-canvas/index.js.map +1 -1
  755. package/build-module/components/block-caption/index.native.js.map +1 -1
  756. package/build-module/components/block-card/index.js.map +1 -1
  757. package/build-module/components/block-compare/block-view.js.map +1 -1
  758. package/build-module/components/block-compare/index.js.map +1 -1
  759. package/build-module/components/block-content-overlay/index.js.map +1 -1
  760. package/build-module/components/block-context/index.js.map +1 -1
  761. package/build-module/components/block-controls/fill.js.map +1 -1
  762. package/build-module/components/block-controls/groups.js.map +1 -1
  763. package/build-module/components/block-controls/hook.js.map +1 -1
  764. package/build-module/components/block-controls/index.js.map +1 -1
  765. package/build-module/components/block-controls/slot.js.map +1 -1
  766. package/build-module/components/block-controls/slot.native.js.map +1 -1
  767. package/build-module/components/block-controls/use-has-block-controls.js.map +1 -1
  768. package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
  769. package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
  770. package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  771. package/build-module/components/block-draggable/index.js.map +1 -1
  772. package/build-module/components/block-draggable/index.native.js.map +1 -1
  773. package/build-module/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
  774. package/build-module/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
  775. package/build-module/components/block-edit/context.js +1 -0
  776. package/build-module/components/block-edit/context.js.map +1 -1
  777. package/build-module/components/block-edit/edit.js.map +1 -1
  778. package/build-module/components/block-edit/edit.native.js.map +1 -1
  779. package/build-module/components/block-edit/index.js +5 -3
  780. package/build-module/components/block-edit/index.js.map +1 -1
  781. package/build-module/components/block-edit-visually-button/index.js.map +1 -1
  782. package/build-module/components/block-editing-mode/index.js.map +1 -1
  783. package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
  784. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  785. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  786. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  787. package/build-module/components/block-icon/index.js.map +1 -1
  788. package/build-module/components/block-icon/index.native.js.map +1 -1
  789. package/build-module/components/block-info-slot-fill/index.js.map +1 -1
  790. package/build-module/components/block-inspector/index.js +5 -4
  791. package/build-module/components/block-inspector/index.js.map +1 -1
  792. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  793. package/build-module/components/block-list/block-crash-boundary.js.map +1 -1
  794. package/build-module/components/block-list/block-crash-boundary.native.js.map +1 -1
  795. package/build-module/components/block-list/block-crash-warning.js.map +1 -1
  796. package/build-module/components/block-list/block-crash-warning.native.js.map +1 -1
  797. package/build-module/components/block-list/block-html.js.map +1 -1
  798. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  799. package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
  800. package/build-module/components/block-list/block-list-context.native.js.map +1 -1
  801. package/build-module/components/block-list/block-list-item-cell.native.js.map +1 -1
  802. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  803. package/build-module/components/block-list/block-outline.native.js.map +1 -1
  804. package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
  805. package/build-module/components/block-list/block.js +44 -35
  806. package/build-module/components/block-list/block.js.map +1 -1
  807. package/build-module/components/block-list/block.native.js +2 -2
  808. package/build-module/components/block-list/block.native.js.map +1 -1
  809. package/build-module/components/block-list/grid-item.native.js.map +1 -1
  810. package/build-module/components/block-list/index.js +18 -6
  811. package/build-module/components/block-list/index.js.map +1 -1
  812. package/build-module/components/block-list/index.native.js +1 -9
  813. package/build-module/components/block-list/index.native.js.map +1 -1
  814. package/build-module/components/block-list/insertion-point.native.js.map +1 -1
  815. package/build-module/components/block-list/layout.js.map +1 -1
  816. package/build-module/components/block-list/private-block-context.js.map +1 -1
  817. package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
  818. package/build-module/components/block-list/use-block-props/index.js +8 -7
  819. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  820. package/build-module/components/block-list/use-block-props/index.native.js.map +1 -1
  821. package/build-module/components/block-list/use-block-props/use-block-refs.js +19 -48
  822. package/build-module/components/block-list/use-block-props/use-block-refs.js.map +1 -1
  823. package/build-module/components/block-list/use-block-props/use-focus-first-element.js +3 -2
  824. package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  825. package/build-module/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
  826. package/build-module/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
  827. package/build-module/components/block-list/use-block-props/use-is-hovered.js +10 -14
  828. package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  829. package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
  830. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  831. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  832. package/build-module/components/block-list/use-scroll-upon-insertion.native.js.map +1 -1
  833. package/build-module/components/block-list-appender/index.js.map +1 -1
  834. package/build-module/components/block-list-appender/index.native.js.map +1 -1
  835. package/build-module/components/block-lock/index.js.map +1 -1
  836. package/build-module/components/block-lock/menu-item.js.map +1 -1
  837. package/build-module/components/block-lock/modal.js.map +1 -1
  838. package/build-module/components/block-lock/toolbar.js.map +1 -1
  839. package/build-module/components/block-lock/use-block-lock.js.map +1 -1
  840. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  841. package/build-module/components/block-mover/button.js.map +1 -1
  842. package/build-module/components/block-mover/index.js.map +1 -1
  843. package/build-module/components/block-mover/index.native.js +3 -1
  844. package/build-module/components/block-mover/index.native.js.map +1 -1
  845. package/build-module/components/block-mover/mover-description.js.map +1 -1
  846. package/build-module/components/block-mover/mover-description.native.js.map +1 -1
  847. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  848. package/build-module/components/block-parent-selector/index.js.map +1 -1
  849. package/build-module/components/block-pattern-setup/constants.js.map +1 -1
  850. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  851. package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  852. package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  853. package/build-module/components/block-patterns-list/index.js.map +1 -1
  854. package/build-module/components/block-patterns-paging/index.js +8 -4
  855. package/build-module/components/block-patterns-paging/index.js.map +1 -1
  856. package/build-module/components/block-popover/cover.js.map +1 -1
  857. package/build-module/components/block-popover/drop-zone.js.map +1 -1
  858. package/build-module/components/block-popover/inbetween.js.map +1 -1
  859. package/build-module/components/block-popover/index.js.map +1 -1
  860. package/build-module/components/block-popover/use-popover-scroll.js.map +1 -1
  861. package/build-module/components/block-preview/auto.js.map +1 -1
  862. package/build-module/components/block-preview/index.js.map +1 -1
  863. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  864. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  865. package/build-module/components/block-rename/index.js.map +1 -1
  866. package/build-module/components/block-rename/is-empty-string.js.map +1 -1
  867. package/build-module/components/block-rename/modal.js +14 -10
  868. package/build-module/components/block-rename/modal.js.map +1 -1
  869. package/build-module/components/block-rename/rename-control.js +3 -1
  870. package/build-module/components/block-rename/rename-control.js.map +1 -1
  871. package/build-module/components/block-rename/use-block-rename.js.map +1 -1
  872. package/build-module/components/block-selection-clearer/index.js.map +1 -1
  873. package/build-module/components/block-settings/button.native.js.map +1 -1
  874. package/build-module/components/block-settings/container.native.js.map +1 -1
  875. package/build-module/components/block-settings/index.native.js.map +1 -1
  876. package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  877. package/build-module/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  878. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  879. package/build-module/components/block-settings-menu/block-settings-dropdown.js +1 -26
  880. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  881. package/build-module/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
  882. package/build-module/components/block-settings-menu/index.js.map +1 -1
  883. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  884. package/build-module/components/block-styles/index.js.map +1 -1
  885. package/build-module/components/block-styles/index.native.js.map +1 -1
  886. package/build-module/components/block-styles/menu-items.js.map +1 -1
  887. package/build-module/components/block-styles/preview-panel.js.map +1 -1
  888. package/build-module/components/block-styles/preview.native.js.map +1 -1
  889. package/build-module/components/block-styles/use-styles-for-block.js.map +1 -1
  890. package/build-module/components/block-styles/utils.js.map +1 -1
  891. package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
  892. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  893. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  894. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  895. package/build-module/components/block-switcher/index.js.map +1 -1
  896. package/build-module/components/block-switcher/pattern-transformations-menu.js +3 -1
  897. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  898. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  899. package/build-module/components/block-switcher/use-transformed-patterns.js +6 -2
  900. package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
  901. package/build-module/components/block-switcher/utils.js +15 -5
  902. package/build-module/components/block-switcher/utils.js.map +1 -1
  903. package/build-module/components/block-title/index.js.map +1 -1
  904. package/build-module/components/block-title/use-block-display-title.js.map +1 -1
  905. package/build-module/components/block-toolbar/block-name-context.js.map +1 -1
  906. package/build-module/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
  907. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  908. package/build-module/components/block-toolbar/index.js +1 -1
  909. package/build-module/components/block-toolbar/index.js.map +1 -1
  910. package/build-module/components/block-toolbar/index.native.js.map +1 -1
  911. package/build-module/components/block-toolbar/shuffle.js.map +1 -1
  912. package/build-module/components/block-toolbar/use-has-block-toolbar.js +20 -12
  913. package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  914. package/build-module/components/block-toolbar/utils.js.map +1 -1
  915. package/build-module/components/block-tools/block-selection-button.js +16 -12
  916. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  917. package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  918. package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
  919. package/build-module/components/block-tools/empty-block-inserter.js.map +1 -1
  920. package/build-module/components/block-tools/index.js +3 -1
  921. package/build-module/components/block-tools/index.js.map +1 -1
  922. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  923. package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  924. package/build-module/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  925. package/build-module/components/block-tools/use-show-block-tools.js +9 -18
  926. package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
  927. package/build-module/components/block-tools/zoom-out-mode-inserters.js +5 -1
  928. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  929. package/build-module/components/block-types-list/index.js.map +1 -1
  930. package/build-module/components/block-types-list/index.native.js.map +1 -1
  931. package/build-module/components/block-variation-picker/index.js +3 -2
  932. package/build-module/components/block-variation-picker/index.js.map +1 -1
  933. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  934. package/build-module/components/block-variation-transforms/index.js +7 -2
  935. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  936. package/build-module/components/block-vertical-alignment-control/icons.js.map +1 -1
  937. package/build-module/components/block-vertical-alignment-control/index.js.map +1 -1
  938. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  939. package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
  940. package/build-module/components/border-radius-control/index.js.map +1 -1
  941. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  942. package/build-module/components/border-radius-control/linked-button.js.map +1 -1
  943. package/build-module/components/border-radius-control/utils.js.map +1 -1
  944. package/build-module/components/button-block-appender/index.js.map +1 -1
  945. package/build-module/components/button-block-appender/index.native.js +11 -1
  946. package/build-module/components/button-block-appender/index.native.js.map +1 -1
  947. package/build-module/components/caption/index.native.js.map +1 -1
  948. package/build-module/components/child-layout-control/index.js.map +1 -1
  949. package/build-module/components/color-palette/control.js.map +1 -1
  950. package/build-module/components/color-palette/index.js.map +1 -1
  951. package/build-module/components/color-palette/with-color-context.js.map +1 -1
  952. package/build-module/components/color-style-selector/index.js.map +1 -1
  953. package/build-module/components/colors/index.js.map +1 -1
  954. package/build-module/components/colors/utils.js.map +1 -1
  955. package/build-module/components/colors/with-colors.js.map +1 -1
  956. package/build-module/components/colors-gradients/control.js.map +1 -1
  957. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  958. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  959. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  960. package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
  961. package/build-module/components/contrast-checker/index.js.map +1 -1
  962. package/build-module/components/contrast-checker/index.native.js.map +1 -1
  963. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  964. package/build-module/components/convert-to-group-buttons/index.native.js.map +1 -1
  965. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  966. package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  967. package/build-module/components/copy-handler/index.js.map +1 -1
  968. package/build-module/components/date-format-picker/index.js.map +1 -1
  969. package/build-module/components/default-block-appender/index.js.map +1 -1
  970. package/build-module/components/default-block-appender/index.native.js.map +1 -1
  971. package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  972. package/build-module/components/dimensions-tool/index.js.map +1 -1
  973. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
  974. package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
  975. package/build-module/components/duotone/utils.js.map +1 -1
  976. package/build-module/components/duotone-control/index.js.map +1 -1
  977. package/build-module/components/editable-text/index.js.map +1 -1
  978. package/build-module/components/editor-styles/index.js +3 -2
  979. package/build-module/components/editor-styles/index.js.map +1 -1
  980. package/build-module/components/floating-toolbar/index.native.js +9 -5
  981. package/build-module/components/floating-toolbar/index.native.js.map +1 -1
  982. package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
  983. package/build-module/components/font-appearance-control/index.js.map +1 -1
  984. package/build-module/components/font-family/index.js.map +1 -1
  985. package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
  986. package/build-module/components/font-sizes/font-size-picker.js.map +1 -1
  987. package/build-module/components/font-sizes/index.js.map +1 -1
  988. package/build-module/components/font-sizes/index.native.js.map +1 -1
  989. package/build-module/components/font-sizes/utils.js.map +1 -1
  990. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  991. package/build-module/components/global-styles/advanced-panel.js.map +1 -1
  992. package/build-module/components/global-styles/background-panel.js +20 -17
  993. package/build-module/components/global-styles/background-panel.js.map +1 -1
  994. package/build-module/components/global-styles/border-panel.js.map +1 -1
  995. package/build-module/components/global-styles/color-panel.js +3 -1
  996. package/build-module/components/global-styles/color-panel.js.map +1 -1
  997. package/build-module/components/global-styles/color-panel.native.js.map +1 -1
  998. package/build-module/components/global-styles/context.js.map +1 -1
  999. package/build-module/components/global-styles/dimensions-panel.js +17 -1
  1000. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  1001. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  1002. package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
  1003. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
  1004. package/build-module/components/global-styles/hooks.js +3 -2
  1005. package/build-module/components/global-styles/hooks.js.map +1 -1
  1006. package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
  1007. package/build-module/components/global-styles/index.js.map +1 -1
  1008. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  1009. package/build-module/components/global-styles/typography-panel.js +24 -24
  1010. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  1011. package/build-module/components/global-styles/typography-utils.js.map +1 -1
  1012. package/build-module/components/global-styles/use-global-styles-output.js +153 -136
  1013. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  1014. package/build-module/components/global-styles/utils.js +44 -0
  1015. package/build-module/components/global-styles/utils.js.map +1 -1
  1016. package/build-module/components/gradients/index.js.map +1 -1
  1017. package/build-module/components/gradients/index.native.js.map +1 -1
  1018. package/build-module/components/gradients/use-gradient.js.map +1 -1
  1019. package/build-module/components/gradients/with-gradient.js.map +1 -1
  1020. package/build-module/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  1021. package/build-module/components/grid-visualizer/grid-visualizer.js.map +1 -1
  1022. package/build-module/components/grid-visualizer/index.js.map +1 -1
  1023. package/build-module/components/grid-visualizer/utils.js.map +1 -1
  1024. package/build-module/components/height-control/index.js.map +1 -1
  1025. package/build-module/components/iframe/get-compatibility-styles.js.map +1 -1
  1026. package/build-module/components/iframe/index.js +12 -13
  1027. package/build-module/components/iframe/index.js.map +1 -1
  1028. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  1029. package/build-module/components/image-editor/constants.js.map +1 -1
  1030. package/build-module/components/image-editor/context.js.map +1 -1
  1031. package/build-module/components/image-editor/cropper.js +7 -3
  1032. package/build-module/components/image-editor/cropper.js.map +1 -1
  1033. package/build-module/components/image-editor/form-controls.js.map +1 -1
  1034. package/build-module/components/image-editor/index.js +0 -2
  1035. package/build-module/components/image-editor/index.js.map +1 -1
  1036. package/build-module/components/image-editor/rotation-button.js.map +1 -1
  1037. package/build-module/components/image-editor/use-save-image.js.map +1 -1
  1038. package/build-module/components/image-editor/use-transform-image.js.map +1 -1
  1039. package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
  1040. package/build-module/components/image-link-destinations/index.native.js.map +1 -1
  1041. package/build-module/components/image-size-control/index.js.map +1 -1
  1042. package/build-module/components/image-size-control/use-dimension-handler.js.map +1 -1
  1043. package/build-module/components/index.js.map +1 -1
  1044. package/build-module/components/index.native.js.map +1 -1
  1045. package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
  1046. package/build-module/components/inner-blocks/constants.native.js.map +1 -1
  1047. package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
  1048. package/build-module/components/inner-blocks/index.js +16 -2
  1049. package/build-module/components/inner-blocks/index.js.map +1 -1
  1050. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  1051. package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
  1052. package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  1053. package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  1054. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  1055. package/build-module/components/inner-blocks/with-client-id.js.map +1 -1
  1056. package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
  1057. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  1058. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  1059. package/build-module/components/inserter/block-patterns-tab/index.js +20 -26
  1060. package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
  1061. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +2 -24
  1062. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
  1063. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -4
  1064. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  1065. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  1066. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  1067. package/build-module/components/inserter/block-patterns-tab/utils.js.map +1 -1
  1068. package/build-module/components/inserter/block-types-tab.js +4 -0
  1069. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  1070. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  1071. package/build-module/components/inserter/category-tabs/index.js +49 -0
  1072. package/build-module/components/inserter/category-tabs/index.js.map +1 -0
  1073. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  1074. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  1075. package/build-module/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
  1076. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  1077. package/build-module/components/inserter/hooks/use-patterns-paging.js.map +1 -1
  1078. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  1079. package/build-module/components/inserter/index.js.map +1 -1
  1080. package/build-module/components/inserter/index.native.js.map +1 -1
  1081. package/build-module/components/inserter/library.js.map +1 -1
  1082. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  1083. package/build-module/components/inserter/media-tab/index.js +1 -1
  1084. package/build-module/components/inserter/media-tab/index.js.map +1 -1
  1085. package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
  1086. package/build-module/components/inserter/media-tab/media-panel.js +0 -24
  1087. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  1088. package/build-module/components/inserter/media-tab/media-preview.js +13 -3
  1089. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  1090. package/build-module/components/inserter/media-tab/media-tab.js +17 -31
  1091. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  1092. package/build-module/components/inserter/media-tab/utils.js.map +1 -1
  1093. package/build-module/components/inserter/menu.js +75 -79
  1094. package/build-module/components/inserter/menu.js.map +1 -1
  1095. package/build-module/components/inserter/menu.native.js.map +1 -1
  1096. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  1097. package/build-module/components/inserter/no-results.js.map +1 -1
  1098. package/build-module/components/inserter/no-results.native.js.map +1 -1
  1099. package/build-module/components/inserter/panel.js.map +1 -1
  1100. package/build-module/components/inserter/preview-panel.js.map +1 -1
  1101. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  1102. package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -1
  1103. package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  1104. package/build-module/components/inserter/search-items.js.map +1 -1
  1105. package/build-module/components/inserter/search-results.js.map +1 -1
  1106. package/build-module/components/inserter/search-results.native.js.map +1 -1
  1107. package/build-module/components/inserter/tabs.js +13 -9
  1108. package/build-module/components/inserter/tabs.js.map +1 -1
  1109. package/build-module/components/inserter/tabs.native.js.map +1 -1
  1110. package/build-module/components/inserter/tips.js.map +1 -1
  1111. package/build-module/components/inserter/utils.native.js.map +1 -1
  1112. package/build-module/components/inserter-button/index.native.js.map +1 -1
  1113. package/build-module/components/inserter-button/sparkles.js.map +1 -1
  1114. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  1115. package/build-module/components/inserter-list-item/index.js.map +1 -1
  1116. package/build-module/components/inserter-listbox/context.js.map +1 -1
  1117. package/build-module/components/inserter-listbox/group.js.map +1 -1
  1118. package/build-module/components/inserter-listbox/index.js.map +1 -1
  1119. package/build-module/components/inserter-listbox/item.js.map +1 -1
  1120. package/build-module/components/inserter-listbox/row.js.map +1 -1
  1121. package/build-module/components/inserter-menu-extension/index.js.map +1 -1
  1122. package/build-module/components/inspector-controls/block-support-slot-container.js.map +1 -1
  1123. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  1124. package/build-module/components/inspector-controls/fill.js.map +1 -1
  1125. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  1126. package/build-module/components/inspector-controls/groups.js.map +1 -1
  1127. package/build-module/components/inspector-controls/index.js.map +1 -1
  1128. package/build-module/components/inspector-controls/slot.js.map +1 -1
  1129. package/build-module/components/inspector-controls/slot.native.js.map +1 -1
  1130. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  1131. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
  1132. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  1133. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  1134. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  1135. package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  1136. package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -1
  1137. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  1138. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  1139. package/build-module/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
  1140. package/build-module/components/inspector-controls-tabs/utils.js.map +1 -1
  1141. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  1142. package/build-module/components/justify-content-control/index.js.map +1 -1
  1143. package/build-module/components/justify-content-control/ui.js.map +1 -1
  1144. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  1145. package/build-module/components/letter-spacing-control/index.js.map +1 -1
  1146. package/build-module/components/line-height-control/index.js +6 -2
  1147. package/build-module/components/line-height-control/index.js.map +1 -1
  1148. package/build-module/components/line-height-control/index.native.js.map +1 -1
  1149. package/build-module/components/line-height-control/utils.js.map +1 -1
  1150. package/build-module/components/link-control/constants.js.map +1 -1
  1151. package/build-module/components/link-control/index.js.map +1 -1
  1152. package/build-module/components/link-control/is-url-like.js.map +1 -1
  1153. package/build-module/components/link-control/link-preview.js.map +1 -1
  1154. package/build-module/components/link-control/search-create-button.js.map +1 -1
  1155. package/build-module/components/link-control/search-input.js.map +1 -1
  1156. package/build-module/components/link-control/search-item.js +9 -3
  1157. package/build-module/components/link-control/search-item.js.map +1 -1
  1158. package/build-module/components/link-control/search-results.js.map +1 -1
  1159. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  1160. package/build-module/components/link-control/settings.js.map +1 -1
  1161. package/build-module/components/link-control/use-create-page.js.map +1 -1
  1162. package/build-module/components/link-control/use-internal-value.js.map +1 -1
  1163. package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
  1164. package/build-module/components/link-control/use-search-handler.js.map +1 -1
  1165. package/build-module/components/link-control/viewer-slot.js.map +1 -1
  1166. package/build-module/components/list-view/appender.js.map +1 -1
  1167. package/build-module/components/list-view/aria-referenced-text.js.map +1 -1
  1168. package/build-module/components/list-view/block-contents.js.map +1 -1
  1169. package/build-module/components/list-view/block-select-button.js +7 -144
  1170. package/build-module/components/list-view/block-select-button.js.map +1 -1
  1171. package/build-module/components/list-view/block.js +167 -15
  1172. package/build-module/components/list-view/block.js.map +1 -1
  1173. package/build-module/components/list-view/branch.js.map +1 -1
  1174. package/build-module/components/list-view/context.js.map +1 -1
  1175. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  1176. package/build-module/components/list-view/expander.js.map +1 -1
  1177. package/build-module/components/list-view/index.js +1 -1
  1178. package/build-module/components/list-view/index.js.map +1 -1
  1179. package/build-module/components/list-view/leaf.js.map +1 -1
  1180. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  1181. package/build-module/components/list-view/use-clipboard-handler.js.map +1 -1
  1182. package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -1
  1183. package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
  1184. package/build-module/components/list-view/use-list-view-collapse-items.js.map +1 -1
  1185. package/build-module/components/list-view/use-list-view-drop-zone.js +6 -1
  1186. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  1187. package/build-module/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
  1188. package/build-module/components/list-view/use-list-view-images.js.map +1 -1
  1189. package/build-module/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
  1190. package/build-module/components/list-view/utils.js +3 -1
  1191. package/build-module/components/list-view/utils.js.map +1 -1
  1192. package/build-module/components/media-placeholder/index.js +3 -3
  1193. package/build-module/components/media-placeholder/index.js.map +1 -1
  1194. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  1195. package/build-module/components/media-replace-flow/index.js.map +1 -1
  1196. package/build-module/components/media-replace-flow/index.native.js.map +1 -1
  1197. package/build-module/components/media-upload/check.js.map +1 -1
  1198. package/build-module/components/media-upload/constants.native.js.map +1 -1
  1199. package/build-module/components/media-upload/index.js.map +1 -1
  1200. package/build-module/components/media-upload/index.native.js.map +1 -1
  1201. package/build-module/components/media-upload-progress/constants.js.map +1 -1
  1202. package/build-module/components/media-upload-progress/index.native.js.map +1 -1
  1203. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  1204. package/build-module/components/navigable-toolbar/index.js +3 -1
  1205. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  1206. package/build-module/components/observe-typing/index.js.map +1 -1
  1207. package/build-module/components/panel-color-settings/index.js.map +1 -1
  1208. package/build-module/components/plain-text/index.js.map +1 -1
  1209. package/build-module/components/plain-text/index.native.js.map +1 -1
  1210. package/build-module/components/preview-options/index.js.map +1 -1
  1211. package/build-module/components/provider/block-refs-provider.js +3 -4
  1212. package/build-module/components/provider/block-refs-provider.js.map +1 -1
  1213. package/build-module/components/provider/index.js.map +1 -1
  1214. package/build-module/components/provider/index.native.js.map +1 -1
  1215. package/build-module/components/provider/use-block-sync.js +4 -13
  1216. package/build-module/components/provider/use-block-sync.js.map +1 -1
  1217. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  1218. package/build-module/components/publish-date-time-picker/index.js.map +1 -1
  1219. package/build-module/components/recursion-provider/index.js +2 -2
  1220. package/build-module/components/recursion-provider/index.js.map +1 -1
  1221. package/build-module/components/resizable-box-popover/index.js.map +1 -1
  1222. package/build-module/components/resolution-tool/index.js.map +1 -1
  1223. package/build-module/components/responsive-block-control/index.js.map +1 -1
  1224. package/build-module/components/responsive-block-control/label.js.map +1 -1
  1225. package/build-module/components/rich-text/content.js +25 -19
  1226. package/build-module/components/rich-text/content.js.map +1 -1
  1227. package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
  1228. package/build-module/components/rich-text/event-listeners/before-input-rules.js +86 -0
  1229. package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -0
  1230. package/build-module/components/rich-text/event-listeners/delete.js +51 -0
  1231. package/build-module/components/rich-text/event-listeners/delete.js.map +1 -0
  1232. package/build-module/components/rich-text/event-listeners/enter.js +92 -0
  1233. package/build-module/components/rich-text/event-listeners/enter.js.map +1 -0
  1234. package/build-module/components/rich-text/event-listeners/firefox-compat.js +29 -0
  1235. package/build-module/components/rich-text/event-listeners/firefox-compat.js.map +1 -0
  1236. package/build-module/components/rich-text/event-listeners/index.js +36 -0
  1237. package/build-module/components/rich-text/event-listeners/index.js.map +1 -0
  1238. package/build-module/components/rich-text/event-listeners/input-events.js +15 -0
  1239. package/build-module/components/rich-text/event-listeners/input-events.js.map +1 -0
  1240. package/build-module/components/rich-text/event-listeners/input-rules.js +127 -0
  1241. package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -0
  1242. package/build-module/components/rich-text/event-listeners/insert-replacement-text.js +27 -0
  1243. package/build-module/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -0
  1244. package/build-module/components/rich-text/event-listeners/paste-handler.js +142 -0
  1245. package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -0
  1246. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js +21 -0
  1247. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -0
  1248. package/build-module/components/rich-text/event-listeners/shortcuts.js +15 -0
  1249. package/build-module/components/rich-text/event-listeners/shortcuts.js.map +1 -0
  1250. package/build-module/components/rich-text/event-listeners/undo-automatic-change.js +45 -0
  1251. package/build-module/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -0
  1252. package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
  1253. package/build-module/components/rich-text/format-edit.js.map +1 -1
  1254. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  1255. package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
  1256. package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
  1257. package/build-module/components/rich-text/format-toolbar-container.native.js.map +1 -1
  1258. package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
  1259. package/build-module/components/rich-text/index.js +54 -34
  1260. package/build-module/components/rich-text/index.js.map +1 -1
  1261. package/build-module/components/rich-text/index.native.js +16 -4
  1262. package/build-module/components/rich-text/index.native.js.map +1 -1
  1263. package/build-module/components/rich-text/input-event.js.map +1 -1
  1264. package/build-module/components/rich-text/input-event.native.js.map +1 -1
  1265. package/build-module/components/rich-text/multiline.js +6 -2
  1266. package/build-module/components/rich-text/multiline.js.map +1 -1
  1267. package/build-module/components/rich-text/native/format-edit.js.map +1 -1
  1268. package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
  1269. package/build-module/components/rich-text/native/index.js.map +1 -1
  1270. package/build-module/components/rich-text/native/index.native.js +12 -0
  1271. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  1272. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  1273. package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
  1274. package/build-module/components/rich-text/prevent-event-discovery.js.map +1 -1
  1275. package/build-module/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
  1276. package/build-module/components/rich-text/shortcut.js.map +1 -1
  1277. package/build-module/components/rich-text/shortcut.native.js.map +1 -1
  1278. package/build-module/components/rich-text/split-value.js.map +1 -1
  1279. package/build-module/components/rich-text/toolbar-button.js.map +1 -1
  1280. package/build-module/components/rich-text/use-format-types.js +8 -4
  1281. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  1282. package/build-module/components/rich-text/use-mark-persistent.js.map +1 -1
  1283. package/build-module/components/rich-text/utils.js.map +1 -1
  1284. package/build-module/components/rich-text/with-deprecations.js.map +1 -1
  1285. package/build-module/components/segmented-text-control/index.js +55 -0
  1286. package/build-module/components/segmented-text-control/index.js.map +1 -0
  1287. package/build-module/components/selection-scroll-into-view/index.js.map +1 -1
  1288. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  1289. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  1290. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  1291. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  1292. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  1293. package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  1294. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -2
  1295. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  1296. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  1297. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  1298. package/build-module/components/text-alignment-control/index.js +68 -0
  1299. package/build-module/components/text-alignment-control/index.js.map +1 -0
  1300. package/build-module/components/text-decoration-control/index.js +21 -25
  1301. package/build-module/components/text-decoration-control/index.js.map +1 -1
  1302. package/build-module/components/text-transform-control/index.js +18 -22
  1303. package/build-module/components/text-transform-control/index.js.map +1 -1
  1304. package/build-module/components/tool-selector/index.js.map +1 -1
  1305. package/build-module/components/typewriter/index.js.map +1 -1
  1306. package/build-module/components/ungroup-button/index.native.js.map +1 -1
  1307. package/build-module/components/unit-control/index.js.map +1 -1
  1308. package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
  1309. package/build-module/components/url-input/button.js.map +1 -1
  1310. package/build-module/components/url-input/index.js.map +1 -1
  1311. package/build-module/components/url-input/index.native.js.map +1 -1
  1312. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  1313. package/build-module/components/url-popover/index.js.map +1 -1
  1314. package/build-module/components/url-popover/link-editor.js.map +1 -1
  1315. package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
  1316. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  1317. package/build-module/components/use-block-commands/index.js +20 -2
  1318. package/build-module/components/use-block-commands/index.js.map +1 -1
  1319. package/build-module/components/use-block-display-information/index.js +9 -3
  1320. package/build-module/components/use-block-display-information/index.js.map +1 -1
  1321. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  1322. package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
  1323. package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
  1324. package/build-module/components/use-moving-animation/index.js.map +1 -1
  1325. package/build-module/components/use-on-block-drop/index.js +3 -1
  1326. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  1327. package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
  1328. package/build-module/components/use-on-block-drop/types.js.map +1 -1
  1329. package/build-module/components/use-paste-styles/index.js +2 -1
  1330. package/build-module/components/use-paste-styles/index.js.map +1 -1
  1331. package/build-module/components/use-resize-canvas/index.js.map +1 -1
  1332. package/build-module/components/use-settings/index.js.map +1 -1
  1333. package/build-module/components/use-unsupported-block-editor/index.native.js.map +1 -1
  1334. package/build-module/components/video-player/gridicon-play.native.js.map +1 -1
  1335. package/build-module/components/video-player/index.native.js.map +1 -1
  1336. package/build-module/components/warning/index.js.map +1 -1
  1337. package/build-module/components/warning/index.native.js.map +1 -1
  1338. package/build-module/components/writing-flow/index.js.map +1 -1
  1339. package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
  1340. package/build-module/components/writing-flow/use-click-selection.js.map +1 -1
  1341. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
  1342. package/build-module/components/writing-flow/use-drag-selection.js +3 -1
  1343. package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
  1344. package/build-module/components/writing-flow/use-input.js.map +1 -1
  1345. package/build-module/components/writing-flow/use-multi-selection.js.map +1 -1
  1346. package/build-module/components/writing-flow/use-select-all.js.map +1 -1
  1347. package/build-module/components/writing-flow/use-selection-observer.js.map +1 -1
  1348. package/build-module/components/writing-flow/use-tab-nav.js +3 -1
  1349. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  1350. package/build-module/components/writing-flow/utils.js.map +1 -1
  1351. package/build-module/components/writing-mode-control/index.js +16 -20
  1352. package/build-module/components/writing-mode-control/index.js.map +1 -1
  1353. package/build-module/elements/index.js.map +1 -1
  1354. package/build-module/hooks/align.js.map +1 -1
  1355. package/build-module/hooks/align.native.js.map +1 -1
  1356. package/build-module/hooks/anchor.js.map +1 -1
  1357. package/build-module/hooks/aria-label.js.map +1 -1
  1358. package/build-module/hooks/background.js +2 -2
  1359. package/build-module/hooks/background.js.map +1 -1
  1360. package/build-module/hooks/block-hooks.js.map +1 -1
  1361. package/build-module/hooks/block-renaming.js +0 -36
  1362. package/build-module/hooks/block-renaming.js.map +1 -1
  1363. package/build-module/hooks/border.js.map +1 -1
  1364. package/build-module/hooks/color.js.map +1 -1
  1365. package/build-module/hooks/compat.js.map +1 -1
  1366. package/build-module/hooks/content-lock-ui.js +5 -5
  1367. package/build-module/hooks/content-lock-ui.js.map +1 -1
  1368. package/build-module/hooks/contrast-checker.js.map +1 -1
  1369. package/build-module/hooks/custom-class-name.js.map +1 -1
  1370. package/build-module/hooks/custom-class-name.native.js.map +1 -1
  1371. package/build-module/hooks/dimensions.js.map +1 -1
  1372. package/build-module/hooks/duotone.js +3 -1
  1373. package/build-module/hooks/duotone.js.map +1 -1
  1374. package/build-module/hooks/font-family.js.map +1 -1
  1375. package/build-module/hooks/font-size.js.map +1 -1
  1376. package/build-module/hooks/gap.js.map +1 -1
  1377. package/build-module/hooks/generated-class-name.js.map +1 -1
  1378. package/build-module/hooks/index.js +5 -4
  1379. package/build-module/hooks/index.js.map +1 -1
  1380. package/build-module/hooks/index.native.js.map +1 -1
  1381. package/build-module/hooks/layout-child.js.map +1 -1
  1382. package/build-module/hooks/layout.js +38 -19
  1383. package/build-module/hooks/layout.js.map +1 -1
  1384. package/build-module/hooks/layout.native.js.map +1 -1
  1385. package/build-module/hooks/line-height.js.map +1 -1
  1386. package/build-module/hooks/lock.js.map +1 -1
  1387. package/build-module/hooks/metadata.js.map +1 -1
  1388. package/build-module/hooks/position.js.map +1 -1
  1389. package/build-module/hooks/settings.js.map +1 -1
  1390. package/build-module/hooks/spacing-visualizer.js.map +1 -1
  1391. package/build-module/hooks/style.js.map +1 -1
  1392. package/build-module/hooks/supports.js +22 -1
  1393. package/build-module/hooks/supports.js.map +1 -1
  1394. package/build-module/hooks/text-align.js +145 -0
  1395. package/build-module/hooks/text-align.js.map +1 -0
  1396. package/build-module/hooks/typography.js +2 -1
  1397. package/build-module/hooks/typography.js.map +1 -1
  1398. package/build-module/hooks/typography.native.js.map +1 -1
  1399. package/build-module/hooks/use-bindings-attributes.js +68 -132
  1400. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  1401. package/build-module/hooks/use-border-props.js.map +1 -1
  1402. package/build-module/hooks/use-cached-truthy.js.map +1 -1
  1403. package/build-module/hooks/use-color-props.js.map +1 -1
  1404. package/build-module/hooks/use-editor-wrapper-styles.native.js.map +1 -1
  1405. package/build-module/hooks/use-shadow-props.js.map +1 -1
  1406. package/build-module/hooks/use-spacing-props.js.map +1 -1
  1407. package/build-module/hooks/use-typography-props.js +2 -1
  1408. package/build-module/hooks/use-typography-props.js.map +1 -1
  1409. package/build-module/hooks/use-zoom-out.js +23 -16
  1410. package/build-module/hooks/use-zoom-out.js.map +1 -1
  1411. package/build-module/hooks/utils.js +38 -9
  1412. package/build-module/hooks/utils.js.map +1 -1
  1413. package/build-module/index.js.map +1 -1
  1414. package/build-module/index.native.js.map +1 -1
  1415. package/build-module/layouts/constrained.js.map +1 -1
  1416. package/build-module/layouts/definitions.js +8 -6
  1417. package/build-module/layouts/definitions.js.map +1 -1
  1418. package/build-module/layouts/flex.js.map +1 -1
  1419. package/build-module/layouts/flow.js.map +1 -1
  1420. package/build-module/layouts/grid.js +52 -9
  1421. package/build-module/layouts/grid.js.map +1 -1
  1422. package/build-module/layouts/index.js.map +1 -1
  1423. package/build-module/layouts/utils.js.map +1 -1
  1424. package/build-module/lock-unlock.js.map +1 -1
  1425. package/build-module/private-apis.js +4 -2
  1426. package/build-module/private-apis.js.map +1 -1
  1427. package/build-module/private-apis.native.js.map +1 -1
  1428. package/build-module/store/actions.js +47 -9
  1429. package/build-module/store/actions.js.map +1 -1
  1430. package/build-module/store/array.js.map +1 -1
  1431. package/build-module/store/constants.js.map +1 -1
  1432. package/build-module/store/defaults.js.map +1 -1
  1433. package/build-module/store/defaults.native.js.map +1 -1
  1434. package/build-module/store/get-block-settings.js.map +1 -1
  1435. package/build-module/store/index.js.map +1 -1
  1436. package/build-module/store/private-actions.js +5 -2
  1437. package/build-module/store/private-actions.js.map +1 -1
  1438. package/build-module/store/private-keys.js.map +1 -1
  1439. package/build-module/store/private-selectors.js +113 -37
  1440. package/build-module/store/private-selectors.js.map +1 -1
  1441. package/build-module/store/reducer.js +11 -8
  1442. package/build-module/store/reducer.js.map +1 -1
  1443. package/build-module/store/selectors.js +116 -62
  1444. package/build-module/store/selectors.js.map +1 -1
  1445. package/build-module/store/undo-ignore.js.map +1 -1
  1446. package/build-module/store/utils.js.map +1 -1
  1447. package/build-module/utils/dom.js.map +1 -1
  1448. package/build-module/utils/get-px-from-css-unit.js.map +1 -1
  1449. package/build-module/utils/index.js.map +1 -1
  1450. package/build-module/utils/math.js.map +1 -1
  1451. package/build-module/utils/object.js +16 -0
  1452. package/build-module/utils/object.js.map +1 -1
  1453. package/build-module/utils/order-inserter-block-items.js +6 -2
  1454. package/build-module/utils/order-inserter-block-items.js.map +1 -1
  1455. package/build-module/utils/pasting.js +6 -2
  1456. package/build-module/utils/pasting.js.map +1 -1
  1457. package/build-module/utils/selection.js.map +1 -1
  1458. package/build-module/utils/sorting.js.map +1 -1
  1459. package/build-module/utils/transform-styles/index.js.map +1 -1
  1460. package/build-module/utils/use-notify-copy.js.map +1 -1
  1461. package/build-style/content-rtl.css +77 -86
  1462. package/build-style/content.css +77 -86
  1463. package/build-style/default-editor-styles-rtl.css +1 -1
  1464. package/build-style/default-editor-styles.css +1 -1
  1465. package/build-style/style-rtl.css +158 -242
  1466. package/build-style/style.css +158 -242
  1467. package/package.json +32 -33
  1468. package/src/components/alignment-control/ui.js +3 -1
  1469. package/src/components/block-bindings-toolbar-indicator/style.scss +2 -5
  1470. package/src/components/block-canvas/style.scss +1 -3
  1471. package/src/components/block-draggable/test/helpers.native.js +8 -8
  1472. package/src/components/block-edit/context.js +1 -0
  1473. package/src/components/block-edit/index.js +4 -0
  1474. package/src/components/block-inspector/index.js +7 -6
  1475. package/src/components/block-list/block.js +47 -35
  1476. package/src/components/block-list/block.native.js +3 -2
  1477. package/src/components/block-list/content.scss +46 -20
  1478. package/src/components/block-list/index.js +26 -10
  1479. package/src/components/block-list/index.native.js +1 -6
  1480. package/src/components/block-list/use-block-props/index.js +17 -5
  1481. package/src/components/block-list/use-block-props/use-block-refs.js +17 -57
  1482. package/src/components/block-list/use-block-props/use-focus-first-element.js +7 -3
  1483. package/src/components/block-list/use-block-props/use-is-hovered.js +11 -16
  1484. package/src/components/block-mover/index.native.js +3 -1
  1485. package/src/components/block-patterns-list/style.scss +1 -3
  1486. package/src/components/block-patterns-paging/index.js +4 -0
  1487. package/src/components/block-preview/style.scss +13 -15
  1488. package/src/components/block-rename/modal.js +17 -13
  1489. package/src/components/block-rename/rename-control.js +8 -1
  1490. package/src/components/block-settings-menu/block-settings-dropdown.js +1 -51
  1491. package/src/components/block-switcher/pattern-transformations-menu.js +3 -1
  1492. package/src/components/block-switcher/use-transformed-patterns.js +6 -2
  1493. package/src/components/block-switcher/utils.js +14 -5
  1494. package/src/components/block-toolbar/index.js +26 -22
  1495. package/src/components/block-toolbar/style.scss +8 -11
  1496. package/src/components/block-toolbar/use-has-block-toolbar.js +26 -19
  1497. package/src/components/block-tools/block-selection-button.js +55 -43
  1498. package/src/components/block-tools/index.js +3 -1
  1499. package/src/components/block-tools/use-show-block-tools.js +36 -51
  1500. package/src/components/block-tools/zoom-out-mode-inserters.js +5 -1
  1501. package/src/components/block-variation-picker/content.scss +22 -72
  1502. package/src/components/block-variation-picker/index.js +3 -2
  1503. package/src/components/block-variation-transforms/index.js +6 -2
  1504. package/src/components/button-block-appender/index.native.js +16 -1
  1505. package/src/components/default-block-appender/content.scss +1 -1
  1506. package/src/components/editor-styles/index.js +4 -2
  1507. package/src/components/floating-toolbar/index.native.js +5 -2
  1508. package/src/components/global-styles/background-panel.js +31 -29
  1509. package/src/components/global-styles/color-panel.js +3 -1
  1510. package/src/components/global-styles/dimensions-panel.js +18 -1
  1511. package/src/components/global-styles/hooks.js +2 -0
  1512. package/src/components/global-styles/style.scss +2 -8
  1513. package/src/components/global-styles/test/use-global-styles-output.js +8 -17
  1514. package/src/components/global-styles/test/utils.js +21 -0
  1515. package/src/components/global-styles/typography-panel.js +27 -23
  1516. package/src/components/global-styles/use-global-styles-output.js +216 -192
  1517. package/src/components/global-styles/utils.js +55 -0
  1518. package/src/components/iframe/index.js +20 -27
  1519. package/src/components/image-editor/cropper.js +11 -2
  1520. package/src/components/image-editor/index.js +0 -2
  1521. package/src/components/inner-blocks/index.js +14 -1
  1522. package/src/components/inserter/block-patterns-tab/index.js +32 -68
  1523. package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +9 -36
  1524. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -2
  1525. package/src/components/inserter/block-types-tab.js +5 -0
  1526. package/src/components/inserter/category-tabs/index.js +74 -0
  1527. package/src/components/inserter/media-tab/index.js +1 -1
  1528. package/src/components/inserter/media-tab/media-panel.js +0 -22
  1529. package/src/components/inserter/media-tab/media-preview.js +15 -7
  1530. package/src/components/inserter/media-tab/media-tab.js +44 -83
  1531. package/src/components/inserter/menu.js +155 -122
  1532. package/src/components/inserter/style.scss +161 -217
  1533. package/src/components/inserter/tabs.js +12 -15
  1534. package/src/components/inspector-controls-tabs/styles-tab.js +1 -1
  1535. package/src/components/line-height-control/index.js +6 -2
  1536. package/src/components/link-control/search-item.js +9 -3
  1537. package/src/components/link-control/style.scss +10 -2
  1538. package/src/components/link-control/test/index.js +1 -1
  1539. package/src/components/list-view/block-select-button.js +73 -237
  1540. package/src/components/list-view/block.js +218 -28
  1541. package/src/components/list-view/index.js +1 -1
  1542. package/src/components/list-view/style.scss +20 -28
  1543. package/src/components/list-view/use-list-view-drop-zone.js +6 -1
  1544. package/src/components/list-view/utils.js +3 -1
  1545. package/src/components/media-placeholder/content.scss +0 -11
  1546. package/src/components/media-placeholder/index.js +3 -3
  1547. package/src/components/navigable-toolbar/index.js +3 -1
  1548. package/src/components/provider/block-refs-provider.js +3 -8
  1549. package/src/components/provider/test/use-block-sync.js +7 -0
  1550. package/src/components/provider/use-block-sync.js +3 -20
  1551. package/src/components/recursion-provider/index.js +2 -2
  1552. package/src/components/rich-text/README.md +4 -0
  1553. package/src/components/rich-text/content.js +26 -19
  1554. package/src/components/rich-text/event-listeners/before-input-rules.js +92 -0
  1555. package/src/components/rich-text/event-listeners/delete.js +53 -0
  1556. package/src/components/rich-text/event-listeners/enter.js +104 -0
  1557. package/src/components/rich-text/event-listeners/firefox-compat.js +31 -0
  1558. package/src/components/rich-text/event-listeners/index.js +56 -0
  1559. package/src/components/rich-text/event-listeners/input-events.js +13 -0
  1560. package/src/components/rich-text/event-listeners/input-rules.js +146 -0
  1561. package/src/components/rich-text/event-listeners/insert-replacement-text.js +28 -0
  1562. package/src/components/rich-text/event-listeners/paste-handler.js +169 -0
  1563. package/src/components/rich-text/event-listeners/remove-browser-shortcuts.js +24 -0
  1564. package/src/components/rich-text/event-listeners/shortcuts.js +13 -0
  1565. package/src/components/rich-text/event-listeners/undo-automatic-change.js +45 -0
  1566. package/src/components/rich-text/index.js +53 -36
  1567. package/src/components/rich-text/index.native.js +14 -1
  1568. package/src/components/rich-text/multiline.js +6 -2
  1569. package/src/components/rich-text/native/index.native.js +11 -0
  1570. package/src/components/rich-text/use-format-types.js +6 -2
  1571. package/src/components/segmented-text-control/index.js +63 -0
  1572. package/src/components/{writing-mode-control → segmented-text-control}/style.scss +2 -5
  1573. package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -1
  1574. package/src/components/text-alignment-control/index.js +91 -0
  1575. package/src/components/text-alignment-control/stories/index.story.js +39 -0
  1576. package/src/components/text-decoration-control/index.js +20 -33
  1577. package/src/components/text-transform-control/index.js +17 -30
  1578. package/src/components/use-block-commands/index.js +46 -28
  1579. package/src/components/use-block-display-information/index.js +9 -3
  1580. package/src/components/use-on-block-drop/index.js +3 -1
  1581. package/src/components/use-paste-styles/index.js +2 -0
  1582. package/src/components/writing-flow/use-drag-selection.js +3 -1
  1583. package/src/components/writing-flow/use-tab-nav.js +3 -1
  1584. package/src/components/writing-mode-control/index.js +15 -28
  1585. package/src/hooks/background.js +2 -2
  1586. package/src/hooks/block-renaming.js +0 -33
  1587. package/src/hooks/content-lock-ui.js +5 -7
  1588. package/src/hooks/duotone.js +3 -1
  1589. package/src/hooks/index.js +5 -2
  1590. package/src/hooks/layout.js +57 -25
  1591. package/src/hooks/supports.js +24 -0
  1592. package/src/hooks/test/text-align.js +114 -0
  1593. package/src/hooks/test/use-typography-props.js +3 -1
  1594. package/src/hooks/text-align.js +178 -0
  1595. package/src/hooks/typography.js +2 -0
  1596. package/src/hooks/use-bindings-attributes.js +90 -161
  1597. package/src/hooks/use-typography-props.js +4 -1
  1598. package/src/hooks/use-zoom-out.js +25 -15
  1599. package/src/hooks/utils.js +57 -5
  1600. package/src/layouts/definitions.js +6 -6
  1601. package/src/layouts/grid.js +106 -47
  1602. package/src/private-apis.js +4 -2
  1603. package/src/store/actions.js +52 -12
  1604. package/src/store/private-actions.js +6 -3
  1605. package/src/store/private-selectors.js +155 -39
  1606. package/src/store/reducer.js +13 -23
  1607. package/src/store/selectors.js +162 -93
  1608. package/src/style.scss +1 -2
  1609. package/src/utils/object.js +16 -0
  1610. package/src/utils/order-inserter-block-items.js +6 -2
  1611. package/src/utils/pasting.js +6 -2
  1612. package/tsconfig.tsbuildinfo +1 -1
  1613. package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -54
  1614. package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +0 -1
  1615. package/build/components/rich-text/use-before-input-rules.js +0 -98
  1616. package/build/components/rich-text/use-before-input-rules.js.map +0 -1
  1617. package/build/components/rich-text/use-delete.js +0 -64
  1618. package/build/components/rich-text/use-delete.js.map +0 -1
  1619. package/build/components/rich-text/use-enter.js +0 -109
  1620. package/build/components/rich-text/use-enter.js.map +0 -1
  1621. package/build/components/rich-text/use-firefox-compat.js +0 -44
  1622. package/build/components/rich-text/use-firefox-compat.js.map +0 -1
  1623. package/build/components/rich-text/use-input-events.js +0 -25
  1624. package/build/components/rich-text/use-input-events.js.map +0 -1
  1625. package/build/components/rich-text/use-input-rules.js +0 -139
  1626. package/build/components/rich-text/use-input-rules.js.map +0 -1
  1627. package/build/components/rich-text/use-insert-replacement-text.js +0 -38
  1628. package/build/components/rich-text/use-insert-replacement-text.js.map +0 -1
  1629. package/build/components/rich-text/use-paste-handler.js +0 -158
  1630. package/build/components/rich-text/use-paste-handler.js.map +0 -1
  1631. package/build/components/rich-text/use-remove-browser-shortcuts.js +0 -32
  1632. package/build/components/rich-text/use-remove-browser-shortcuts.js.map +0 -1
  1633. package/build/components/rich-text/use-shortcuts.js +0 -25
  1634. package/build/components/rich-text/use-shortcuts.js.map +0 -1
  1635. package/build/components/rich-text/use-undo-automatic-change.js +0 -53
  1636. package/build/components/rich-text/use-undo-automatic-change.js.map +0 -1
  1637. package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -47
  1638. package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +0 -1
  1639. package/build-module/components/rich-text/use-before-input-rules.js +0 -92
  1640. package/build-module/components/rich-text/use-before-input-rules.js.map +0 -1
  1641. package/build-module/components/rich-text/use-delete.js +0 -57
  1642. package/build-module/components/rich-text/use-delete.js.map +0 -1
  1643. package/build-module/components/rich-text/use-enter.js +0 -102
  1644. package/build-module/components/rich-text/use-enter.js.map +0 -1
  1645. package/build-module/components/rich-text/use-firefox-compat.js +0 -37
  1646. package/build-module/components/rich-text/use-firefox-compat.js.map +0 -1
  1647. package/build-module/components/rich-text/use-input-events.js +0 -18
  1648. package/build-module/components/rich-text/use-input-events.js.map +0 -1
  1649. package/build-module/components/rich-text/use-input-rules.js +0 -132
  1650. package/build-module/components/rich-text/use-input-rules.js.map +0 -1
  1651. package/build-module/components/rich-text/use-insert-replacement-text.js +0 -32
  1652. package/build-module/components/rich-text/use-insert-replacement-text.js.map +0 -1
  1653. package/build-module/components/rich-text/use-paste-handler.js +0 -152
  1654. package/build-module/components/rich-text/use-paste-handler.js.map +0 -1
  1655. package/build-module/components/rich-text/use-remove-browser-shortcuts.js +0 -26
  1656. package/build-module/components/rich-text/use-remove-browser-shortcuts.js.map +0 -1
  1657. package/build-module/components/rich-text/use-shortcuts.js +0 -18
  1658. package/build-module/components/rich-text/use-shortcuts.js.map +0 -1
  1659. package/build-module/components/rich-text/use-undo-automatic-change.js +0 -46
  1660. package/build-module/components/rich-text/use-undo-automatic-change.js.map +0 -1
  1661. package/src/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -55
  1662. package/src/components/rich-text/use-before-input-rules.js +0 -99
  1663. package/src/components/rich-text/use-delete.js +0 -59
  1664. package/src/components/rich-text/use-enter.js +0 -110
  1665. package/src/components/rich-text/use-firefox-compat.js +0 -39
  1666. package/src/components/rich-text/use-input-events.js +0 -19
  1667. package/src/components/rich-text/use-input-rules.js +0 -150
  1668. package/src/components/rich-text/use-insert-replacement-text.js +0 -31
  1669. package/src/components/rich-text/use-paste-handler.js +0 -180
  1670. package/src/components/rich-text/use-remove-browser-shortcuts.js +0 -29
  1671. package/src/components/rich-text/use-shortcuts.js +0 -19
  1672. package/src/components/rich-text/use-undo-automatic-change.js +0 -50
  1673. package/src/components/text-decoration-control/style.scss +0 -18
  1674. package/src/components/text-transform-control/style.scss +0 -18
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","useDispatch","isTextField","Popover","__unstableUseShortcutEventMatch","useShortcutEventMatch","useRef","EmptyBlockInserter","InsertionPointOpenRef","default","InsertionPoint","BlockToolbarPopover","BlockToolbarBreadcrumb","store","blockEditorStore","usePopoverScroll","ZoomOutModeInserters","useShowBlockTools","unlock","selector","select","getSelectedBlockClientId","getFirstMultiSelectedBlockClientId","getSettings","__unstableGetEditorMode","isTyping","clientId","editorMode","hasFixedToolbar","isZoomOutMode","BlockTools","children","__unstableContentRef","props","isMatch","getSelectedBlockClientIds","getBlockRootClientId","showEmptyBlockSideInserter","showBreadcrumb","showBlockToolbarPopover","duplicateBlocks","removeBlocks","insertAfterBlock","insertBeforeBlock","selectBlock","moveBlocksUp","moveBlocksDown","expandBlock","onKeyDown","event","defaultPrevented","clientIds","length","preventDefault","rootClientId","target","closest","contentWindow","document","activeElement","blockToolbarRef","blockToolbarAfterRef","createElement","Provider","value","Slot","name","ref"],"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';\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 { 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';\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 { getSelectedBlockClientIds, getBlockRootClientId } =\n\t\tuseSelect( blockEditorStore );\n\n\tconst {\n\t\tshowEmptyBlockSideInserter,\n\t\tshowBreadcrumb,\n\t\tshowBlockToolbarPopover,\n\t} = useShowBlockTools();\n\n\tconst {\n\t\tduplicateBlocks,\n\t\tremoveBlocks,\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\tfunction onKeyDown( event ) {\n\t\tif ( event.defaultPrevented ) return;\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}\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}\n\t}\n\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\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":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,+BAA+B,IAAIC,qBAAqB,QAAQ,+BAA+B;AACxG,SAASC,MAAM,QAAQ,oBAAoB;;AAE3C;AACA;AACA;AACA,OAAOC,kBAAkB,MAAM,wBAAwB;AACvD,SACCC,qBAAqB,EACrBC,OAAO,IAAIC,cAAc,QACnB,mBAAmB;AAC1B,OAAOC,mBAAmB,MAAM,yBAAyB;AACzD,OAAOC,sBAAsB,MAAM,4BAA4B;AAC/D,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,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,GAAG7C,gBAAgB,CAAEiB,oBAAqB,CAAC;EAChE,MAAM6B,oBAAoB,GAAG9C,gBAAgB,CAAEiB,oBAAqB,CAAC;EAErE;IACC;IACA8B,aAAA;MAAA,GAAU7B,KAAK;MAAGe,SAAS,EAAGA;IAAW,GACxCc,aAAA,CAACtD,qBAAqB,CAACuD,QAAQ;MAACC,KAAK,EAAG1D,MAAM,CAAE,KAAM;IAAG,GACtD,CAAEmB,QAAQ,IACXqC,aAAA,CAACpD,cAAc;MACdsB,oBAAoB,EAAGA;IAAsB,CAC7C,CACD,EAECK,0BAA0B,IAC3ByB,aAAA,CAACvD,kBAAkB;MAClByB,oBAAoB,EAAGA,oBAAsB;MAC7CN,QAAQ,EAAGA;IAAU,CACrB,CACD,EAECa,uBAAuB,IACxBuB,aAAA,CAACnD,mBAAmB;MACnBqB,oBAAoB,EAAGA,oBAAsB;MAC7CN,QAAQ,EAAGA,QAAU;MACrBD,QAAQ,EAAGA;IAAU,CACrB,CACD,EAECa,cAAc,IACfwB,aAAA,CAAClD,sBAAsB;MACtBoB,oBAAoB,EAAGA,oBAAsB;MAC7CN,QAAQ,EAAGA;IAAU,CACrB,CACD,EAGC,CAAEG,aAAa,IAAI,CAAED,eAAe,IACrCkC,aAAA,CAAC3D,OAAO,CAAC8D,IAAI;MACZC,IAAI,EAAC,eAAe;MACpBC,GAAG,EAAGP;IAAiB,CACvB,CACD,EACC7B,QAAQ,EAEV+B,aAAA,CAAC3D,OAAO,CAAC8D,IAAI;MACZC,IAAI,EAAC,8BAA8B;MACnCC,GAAG,EAAGN;IAAsB,CAC5B,CAAC,EACAhC,aAAa,IACdiC,aAAA,CAAC9C,oBAAoB;MACpBgB,oBAAoB,EAAGA;IAAsB,CAC7C,CAE6B,CAC5B;EAAC;AAER"}
1
+ {"version":3,"names":["useSelect","useDispatch","isTextField","Popover","__unstableUseShortcutEventMatch","useShortcutEventMatch","useRef","EmptyBlockInserter","InsertionPointOpenRef","default","InsertionPoint","BlockToolbarPopover","BlockToolbarBreadcrumb","store","blockEditorStore","usePopoverScroll","ZoomOutModeInserters","useShowBlockTools","unlock","selector","select","getSelectedBlockClientId","getFirstMultiSelectedBlockClientId","getSettings","__unstableGetEditorMode","isTyping","clientId","editorMode","hasFixedToolbar","isZoomOutMode","BlockTools","children","__unstableContentRef","props","isMatch","getSelectedBlockClientIds","getBlockRootClientId","showEmptyBlockSideInserter","showBreadcrumb","showBlockToolbarPopover","duplicateBlocks","removeBlocks","insertAfterBlock","insertBeforeBlock","selectBlock","moveBlocksUp","moveBlocksDown","expandBlock","onKeyDown","event","defaultPrevented","clientIds","length","preventDefault","rootClientId","target","closest","contentWindow","document","activeElement","blockToolbarRef","blockToolbarAfterRef","createElement","Provider","value","Slot","name","ref"],"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';\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 { 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';\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 { getSelectedBlockClientIds, getBlockRootClientId } =\n\t\tuseSelect( blockEditorStore );\n\n\tconst {\n\t\tshowEmptyBlockSideInserter,\n\t\tshowBreadcrumb,\n\t\tshowBlockToolbarPopover,\n\t} = useShowBlockTools();\n\n\tconst {\n\t\tduplicateBlocks,\n\t\tremoveBlocks,\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\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}\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}\n\t}\n\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\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":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,+BAA+B,IAAIC,qBAAqB,QAAQ,+BAA+B;AACxG,SAASC,MAAM,QAAQ,oBAAoB;;AAE3C;AACA;AACA;AACA,OAAOC,kBAAkB,MAAM,wBAAwB;AACvD,SACCC,qBAAqB,EACrBC,OAAO,IAAIC,cAAc,QACnB,mBAAmB;AAC1B,OAAOC,mBAAmB,MAAM,yBAAyB;AACzD,OAAOC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["classnames","useSelect","useDispatch","useRef","createContext","useContext","__unstableMotion","motion","useReducedMotion","Inserter","store","blockEditorStore","BlockPopoverInbetween","BlockDropZonePopover","InsertionPointOpenRef","InbetweenInsertionPointPopover","__unstablePopoverSlot","__unstableContentRef","operation","nearestSide","selectBlock","hideInsertionPoint","openRef","ref","orientation","previousClientId","nextClientId","rootClientId","isInserterShown","isDistractionFree","isNavigationMode","select","getBlockOrder","getBlockListSettings","getBlockInsertionPoint","isBlockBeingDragged","getPreviousBlockClientId","getNextBlockClientId","getSettings","_isNavigationMode","insertionPoint","order","length","_previousClientId","index","_nextClientId","settings","__unstableWithInserter","getBlockEditingMode","disableMotion","onClick","event","target","current","maybeHideInserterPoint","onFocus","lineVariants","start","opacity","scale","rest","transition","delay","type","hover","inserterVariants","orientationClassname","className","createElement","div","layout","initial","animate","whileHover","whileTap","exit","tabIndex","onHoverEnd","variants","position","clientId","__experimentalIsQuick","onToggle","isOpen","onSelectOrClose","InsertionPoint","props","isVisible","isBlockListEmpty","isBlockInsertionPointVisible","getBlockCount","blockInsertionPoint","key"],"sources":["@wordpress/block-editor/src/components/block-tools/insertion-point.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRef, createContext, useContext } from '@wordpress/element';\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport { useReducedMotion } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Inserter from '../inserter';\nimport { store as blockEditorStore } from '../../store';\nimport BlockPopoverInbetween from '../block-popover/inbetween';\nimport BlockDropZonePopover from '../block-popover/drop-zone';\n\nexport const InsertionPointOpenRef = createContext();\n\nfunction InbetweenInsertionPointPopover( {\n\t__unstablePopoverSlot,\n\t__unstableContentRef,\n\toperation = 'insert',\n\tnearestSide = 'right',\n} ) {\n\tconst { selectBlock, hideInsertionPoint } = useDispatch( blockEditorStore );\n\tconst openRef = useContext( InsertionPointOpenRef );\n\tconst ref = useRef();\n\tconst {\n\t\torientation,\n\t\tpreviousClientId,\n\t\tnextClientId,\n\t\trootClientId,\n\t\tisInserterShown,\n\t\tisDistractionFree,\n\t\tisNavigationMode,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetBlockOrder,\n\t\t\tgetBlockListSettings,\n\t\t\tgetBlockInsertionPoint,\n\t\t\tisBlockBeingDragged,\n\t\t\tgetPreviousBlockClientId,\n\t\t\tgetNextBlockClientId,\n\t\t\tgetSettings,\n\t\t\tisNavigationMode: _isNavigationMode,\n\t\t} = select( blockEditorStore );\n\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\tconst order = getBlockOrder( insertionPoint.rootClientId );\n\n\t\tif ( ! order.length ) {\n\t\t\treturn {};\n\t\t}\n\n\t\tlet _previousClientId = order[ insertionPoint.index - 1 ];\n\t\tlet _nextClientId = order[ insertionPoint.index ];\n\n\t\twhile ( isBlockBeingDragged( _previousClientId ) ) {\n\t\t\t_previousClientId = getPreviousBlockClientId( _previousClientId );\n\t\t}\n\n\t\twhile ( isBlockBeingDragged( _nextClientId ) ) {\n\t\t\t_nextClientId = getNextBlockClientId( _nextClientId );\n\t\t}\n\n\t\tconst settings = getSettings();\n\n\t\treturn {\n\t\t\tpreviousClientId: _previousClientId,\n\t\t\tnextClientId: _nextClientId,\n\t\t\torientation:\n\t\t\t\tgetBlockListSettings( insertionPoint.rootClientId )\n\t\t\t\t\t?.orientation || 'vertical',\n\t\t\trootClientId: insertionPoint.rootClientId,\n\t\t\tisNavigationMode: _isNavigationMode(),\n\t\t\tisDistractionFree: settings.isDistractionFree,\n\t\t\tisInserterShown: insertionPoint?.__unstableWithInserter,\n\t\t};\n\t}, [] );\n\tconst { getBlockEditingMode } = useSelect( blockEditorStore );\n\n\tconst disableMotion = useReducedMotion();\n\n\tfunction onClick( event ) {\n\t\tif (\n\t\t\tevent.target === ref.current &&\n\t\t\tnextClientId &&\n\t\t\tgetBlockEditingMode( nextClientId ) !== 'disabled'\n\t\t) {\n\t\t\tselectBlock( nextClientId, -1 );\n\t\t}\n\t}\n\n\tfunction maybeHideInserterPoint( event ) {\n\t\t// Only hide the inserter if it's triggered on the wrapper,\n\t\t// and the inserter is not open.\n\t\tif ( event.target === ref.current && ! openRef.current ) {\n\t\t\thideInsertionPoint();\n\t\t}\n\t}\n\n\tfunction onFocus( event ) {\n\t\t// Only handle click on the wrapper specifically, and not an event\n\t\t// bubbled from the inserter itself.\n\t\tif ( event.target !== ref.current ) {\n\t\t\topenRef.current = true;\n\t\t}\n\t}\n\n\tconst lineVariants = {\n\t\t// Initial position starts from the center and invisible.\n\t\tstart: {\n\t\t\topacity: 0,\n\t\t\tscale: 0,\n\t\t},\n\t\t// The line expands to fill the container. If the inserter is visible it\n\t\t// is delayed so it appears orchestrated.\n\t\trest: {\n\t\t\topacity: 1,\n\t\t\tscale: 1,\n\t\t\ttransition: { delay: isInserterShown ? 0.5 : 0, type: 'tween' },\n\t\t},\n\t\thover: {\n\t\t\topacity: 1,\n\t\t\tscale: 1,\n\t\t\ttransition: { delay: 0.5, type: 'tween' },\n\t\t},\n\t};\n\n\tconst inserterVariants = {\n\t\tstart: {\n\t\t\tscale: disableMotion ? 1 : 0,\n\t\t},\n\t\trest: {\n\t\t\tscale: 1,\n\t\t\ttransition: { delay: 0.4, type: 'tween' },\n\t\t},\n\t};\n\n\tif ( isDistractionFree && ! isNavigationMode ) {\n\t\treturn null;\n\t}\n\n\tconst orientationClassname =\n\t\torientation === 'horizontal' || operation === 'group'\n\t\t\t? 'is-horizontal'\n\t\t\t: 'is-vertical';\n\n\tconst className = classnames(\n\t\t'block-editor-block-list__insertion-point',\n\t\torientationClassname\n\t);\n\n\treturn (\n\t\t<BlockPopoverInbetween\n\t\t\tpreviousClientId={ previousClientId }\n\t\t\tnextClientId={ nextClientId }\n\t\t\t__unstablePopoverSlot={ __unstablePopoverSlot }\n\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\toperation={ operation }\n\t\t\tnearestSide={ nearestSide }\n\t\t>\n\t\t\t<motion.div\n\t\t\t\tlayout={ ! disableMotion }\n\t\t\t\tinitial={ disableMotion ? 'rest' : 'start' }\n\t\t\t\tanimate=\"rest\"\n\t\t\t\twhileHover=\"hover\"\n\t\t\t\twhileTap=\"pressed\"\n\t\t\t\texit=\"start\"\n\t\t\t\tref={ ref }\n\t\t\t\ttabIndex={ -1 }\n\t\t\t\tonClick={ onClick }\n\t\t\t\tonFocus={ onFocus }\n\t\t\t\tclassName={ classnames( className, {\n\t\t\t\t\t'is-with-inserter': isInserterShown,\n\t\t\t\t} ) }\n\t\t\t\tonHoverEnd={ maybeHideInserterPoint }\n\t\t\t>\n\t\t\t\t<motion.div\n\t\t\t\t\tvariants={ lineVariants }\n\t\t\t\t\tclassName=\"block-editor-block-list__insertion-point-indicator\"\n\t\t\t\t\tdata-testid=\"block-list-insertion-point-indicator\"\n\t\t\t\t/>\n\t\t\t\t{ isInserterShown && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tvariants={ inserterVariants }\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'block-editor-block-list__insertion-point-inserter'\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Inserter\n\t\t\t\t\t\t\tposition=\"bottom center\"\n\t\t\t\t\t\t\tclientId={ nextClientId }\n\t\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\t\t__experimentalIsQuick\n\t\t\t\t\t\t\tonToggle={ ( isOpen ) => {\n\t\t\t\t\t\t\t\topenRef.current = isOpen;\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonSelectOrClose={ () => {\n\t\t\t\t\t\t\t\topenRef.current = false;\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</motion.div>\n\t\t\t\t) }\n\t\t\t</motion.div>\n\t\t</BlockPopoverInbetween>\n\t);\n}\n\nexport default function InsertionPoint( props ) {\n\tconst { insertionPoint, isVisible, isBlockListEmpty } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockCount,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst blockInsertionPoint = getBlockInsertionPoint();\n\t\t\treturn {\n\t\t\t\tinsertionPoint: blockInsertionPoint,\n\t\t\t\tisVisible: isBlockInsertionPointVisible(),\n\t\t\t\tisBlockListEmpty:\n\t\t\t\t\tgetBlockCount( blockInsertionPoint?.rootClientId ) === 0,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tif (\n\t\t! isVisible ||\n\t\t// Don't render the insertion point if the block list is empty.\n\t\t// The insertion point will be represented by the appender instead.\n\t\tisBlockListEmpty\n\t) {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Render a popover that overlays the block when the desired operation is to replace it.\n\t * Otherwise, render a popover in between blocks for the indication of inserting between them.\n\t */\n\treturn insertionPoint.operation === 'replace' ? (\n\t\t<BlockDropZonePopover\n\t\t\t// Force remount to trigger the animation.\n\t\t\tkey={ `${ insertionPoint.rootClientId }-${ insertionPoint.index }` }\n\t\t\t{ ...props }\n\t\t/>\n\t) : (\n\t\t<InbetweenInsertionPointPopover\n\t\t\toperation={ insertionPoint.operation }\n\t\t\tnearestSide={ insertionPoint.nearestSide }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,MAAM,EAAEC,aAAa,EAAEC,UAAU,QAAQ,oBAAoB;AACtE,SAASC,gBAAgB,IAAIC,MAAM,QAAQ,uBAAuB;AAClE,SAASC,gBAAgB,QAAQ,oBAAoB;;AAErD;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,aAAa;AAClC,SAASC,KAAK,IAAIC,gBAAg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OAAO;MACNM,cAAc,EAAEmD,mBAAmB;MACnCJ,SAAS,EAAEE,4BAA4B,CAAC,CAAC;MACzCD,gBAAgB,EACfE,aAAa,CAAEC,mBAAmB,EAAEhE,YAAa,CAAC,KAAK;IACzD,CAAC;EACF,CAAC,EACD,EACD,CAAC;EAED,IACC,CAAE4D,SAAS;EACX;EACA;EACAC,gBAAgB,EACf;IACD,OAAO,IAAI;EACZ;;EAEA;AACD;AACA;AACA;EACC,OAAOhD,cAAc,CAACtB,SAAS,KAAK,SAAS,GAC5CkD,aAAA,CAACvD;EACA;EAAA;IACA+E,GAAG,EAAI,GAAGpD,cAAc,CAACb,YAAc,IAAIa,cAAc,CAACI,KAAO,EAAG;IAAA,GAC/D0C;EAAK,CACV,CAAC,GAEFlB,aAAA,CAACrD,8BAA8B;IAC9BG,SAAS,EAAGsB,cAAc,CAACtB,SAAW;IACtCC,WAAW,EAAGqB,cAAc,CAACrB,WAAa;IAAA,GACrCmE;EAAK,CACV,CACD;AACF"}
1
+ {"version":3,"names":["classnames","useSelect","useDispatch","useRef","createContext","useContext","__unstableMotion","motion","useReducedMotion","Inserter","store","blockEditorStore","BlockPopoverInbetween","BlockDropZonePopover","InsertionPointOpenRef","InbetweenInsertionPointPopover","__unstablePopoverSlot","__unstableContentRef","operation","nearestSide","selectBlock","hideInsertionPoint","openRef","ref","orientation","previousClientId","nextClientId","rootClientId","isInserterShown","isDistractionFree","isNavigationMode","select","getBlockOrder","getBlockListSettings","getBlockInsertionPoint","isBlockBeingDragged","getPreviousBlockClientId","getNextBlockClientId","getSettings","_isNavigationMode","insertionPoint","order","length","_previousClientId","index","_nextClientId","settings","__unstableWithInserter","getBlockEditingMode","disableMotion","onClick","event","target","current","maybeHideInserterPoint","onFocus","lineVariants","start","opacity","scale","rest","transition","delay","type","hover","inserterVariants","orientationClassname","className","createElement","div","layout","initial","animate","whileHover","whileTap","exit","tabIndex","onHoverEnd","variants","position","clientId","__experimentalIsQuick","onToggle","isOpen","onSelectOrClose","InsertionPoint","props","isVisible","isBlockListEmpty","isBlockInsertionPointVisible","getBlockCount","blockInsertionPoint","key"],"sources":["@wordpress/block-editor/src/components/block-tools/insertion-point.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRef, createContext, useContext } from '@wordpress/element';\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport { useReducedMotion } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Inserter from '../inserter';\nimport { store as blockEditorStore } from '../../store';\nimport BlockPopoverInbetween from '../block-popover/inbetween';\nimport BlockDropZonePopover from '../block-popover/drop-zone';\n\nexport const InsertionPointOpenRef = createContext();\n\nfunction InbetweenInsertionPointPopover( {\n\t__unstablePopoverSlot,\n\t__unstableContentRef,\n\toperation = 'insert',\n\tnearestSide = 'right',\n} ) {\n\tconst { selectBlock, hideInsertionPoint } = useDispatch( blockEditorStore );\n\tconst openRef = useContext( InsertionPointOpenRef );\n\tconst ref = useRef();\n\tconst {\n\t\torientation,\n\t\tpreviousClientId,\n\t\tnextClientId,\n\t\trootClientId,\n\t\tisInserterShown,\n\t\tisDistractionFree,\n\t\tisNavigationMode,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetBlockOrder,\n\t\t\tgetBlockListSettings,\n\t\t\tgetBlockInsertionPoint,\n\t\t\tisBlockBeingDragged,\n\t\t\tgetPreviousBlockClientId,\n\t\t\tgetNextBlockClientId,\n\t\t\tgetSettings,\n\t\t\tisNavigationMode: _isNavigationMode,\n\t\t} = select( blockEditorStore );\n\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\tconst order = getBlockOrder( insertionPoint.rootClientId );\n\n\t\tif ( ! order.length ) {\n\t\t\treturn {};\n\t\t}\n\n\t\tlet _previousClientId = order[ insertionPoint.index - 1 ];\n\t\tlet _nextClientId = order[ insertionPoint.index ];\n\n\t\twhile ( isBlockBeingDragged( _previousClientId ) ) {\n\t\t\t_previousClientId = getPreviousBlockClientId( _previousClientId );\n\t\t}\n\n\t\twhile ( isBlockBeingDragged( _nextClientId ) ) {\n\t\t\t_nextClientId = getNextBlockClientId( _nextClientId );\n\t\t}\n\n\t\tconst settings = getSettings();\n\n\t\treturn {\n\t\t\tpreviousClientId: _previousClientId,\n\t\t\tnextClientId: _nextClientId,\n\t\t\torientation:\n\t\t\t\tgetBlockListSettings( insertionPoint.rootClientId )\n\t\t\t\t\t?.orientation || 'vertical',\n\t\t\trootClientId: insertionPoint.rootClientId,\n\t\t\tisNavigationMode: _isNavigationMode(),\n\t\t\tisDistractionFree: settings.isDistractionFree,\n\t\t\tisInserterShown: insertionPoint?.__unstableWithInserter,\n\t\t};\n\t}, [] );\n\tconst { getBlockEditingMode } = useSelect( blockEditorStore );\n\n\tconst disableMotion = useReducedMotion();\n\n\tfunction onClick( event ) {\n\t\tif (\n\t\t\tevent.target === ref.current &&\n\t\t\tnextClientId &&\n\t\t\tgetBlockEditingMode( nextClientId ) !== 'disabled'\n\t\t) {\n\t\t\tselectBlock( nextClientId, -1 );\n\t\t}\n\t}\n\n\tfunction maybeHideInserterPoint( event ) {\n\t\t// Only hide the inserter if it's triggered on the wrapper,\n\t\t// and the inserter is not open.\n\t\tif ( event.target === ref.current && ! openRef.current ) {\n\t\t\thideInsertionPoint();\n\t\t}\n\t}\n\n\tfunction onFocus( event ) {\n\t\t// Only handle click on the wrapper specifically, and not an event\n\t\t// bubbled from the inserter itself.\n\t\tif ( event.target !== ref.current ) {\n\t\t\topenRef.current = true;\n\t\t}\n\t}\n\n\tconst lineVariants = {\n\t\t// Initial position starts from the center and invisible.\n\t\tstart: {\n\t\t\topacity: 0,\n\t\t\tscale: 0,\n\t\t},\n\t\t// The line expands to fill the container. If the inserter is visible it\n\t\t// is delayed so it appears orchestrated.\n\t\trest: {\n\t\t\topacity: 1,\n\t\t\tscale: 1,\n\t\t\ttransition: { delay: isInserterShown ? 0.5 : 0, type: 'tween' },\n\t\t},\n\t\thover: {\n\t\t\topacity: 1,\n\t\t\tscale: 1,\n\t\t\ttransition: { delay: 0.5, type: 'tween' },\n\t\t},\n\t};\n\n\tconst inserterVariants = {\n\t\tstart: {\n\t\t\tscale: disableMotion ? 1 : 0,\n\t\t},\n\t\trest: {\n\t\t\tscale: 1,\n\t\t\ttransition: { delay: 0.4, type: 'tween' },\n\t\t},\n\t};\n\n\tif ( isDistractionFree && ! isNavigationMode ) {\n\t\treturn null;\n\t}\n\n\tconst orientationClassname =\n\t\torientation === 'horizontal' || operation === 'group'\n\t\t\t? 'is-horizontal'\n\t\t\t: 'is-vertical';\n\n\tconst className = classnames(\n\t\t'block-editor-block-list__insertion-point',\n\t\torientationClassname\n\t);\n\n\treturn (\n\t\t<BlockPopoverInbetween\n\t\t\tpreviousClientId={ previousClientId }\n\t\t\tnextClientId={ nextClientId }\n\t\t\t__unstablePopoverSlot={ __unstablePopoverSlot }\n\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\toperation={ operation }\n\t\t\tnearestSide={ nearestSide }\n\t\t>\n\t\t\t<motion.div\n\t\t\t\tlayout={ ! disableMotion }\n\t\t\t\tinitial={ disableMotion ? 'rest' : 'start' }\n\t\t\t\tanimate=\"rest\"\n\t\t\t\twhileHover=\"hover\"\n\t\t\t\twhileTap=\"pressed\"\n\t\t\t\texit=\"start\"\n\t\t\t\tref={ ref }\n\t\t\t\ttabIndex={ -1 }\n\t\t\t\tonClick={ onClick }\n\t\t\t\tonFocus={ onFocus }\n\t\t\t\tclassName={ classnames( className, {\n\t\t\t\t\t'is-with-inserter': isInserterShown,\n\t\t\t\t} ) }\n\t\t\t\tonHoverEnd={ maybeHideInserterPoint }\n\t\t\t>\n\t\t\t\t<motion.div\n\t\t\t\t\tvariants={ lineVariants }\n\t\t\t\t\tclassName=\"block-editor-block-list__insertion-point-indicator\"\n\t\t\t\t\tdata-testid=\"block-list-insertion-point-indicator\"\n\t\t\t\t/>\n\t\t\t\t{ isInserterShown && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tvariants={ inserterVariants }\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'block-editor-block-list__insertion-point-inserter'\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Inserter\n\t\t\t\t\t\t\tposition=\"bottom center\"\n\t\t\t\t\t\t\tclientId={ nextClientId }\n\t\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\t\t__experimentalIsQuick\n\t\t\t\t\t\t\tonToggle={ ( isOpen ) => {\n\t\t\t\t\t\t\t\topenRef.current = isOpen;\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonSelectOrClose={ () => {\n\t\t\t\t\t\t\t\topenRef.current = false;\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</motion.div>\n\t\t\t\t) }\n\t\t\t</motion.div>\n\t\t</BlockPopoverInbetween>\n\t);\n}\n\nexport default function InsertionPoint( props ) {\n\tconst { insertionPoint, isVisible, isBlockListEmpty } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockCount,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst blockInsertionPoint = getBlockInsertionPoint();\n\t\t\treturn {\n\t\t\t\tinsertionPoint: blockInsertionPoint,\n\t\t\t\tisVisible: isBlockInsertionPointVisible(),\n\t\t\t\tisBlockListEmpty:\n\t\t\t\t\tgetBlockCount( blockInsertionPoint?.rootClientId ) === 0,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tif (\n\t\t! isVisible ||\n\t\t// Don't render the insertion point if the block list is empty.\n\t\t// The insertion point will be represented by the appender instead.\n\t\tisBlockListEmpty\n\t) {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Render a popover that overlays the block when the desired operation is to replace it.\n\t * Otherwise, render a popover in between blocks for the indication of inserting between them.\n\t */\n\treturn insertionPoint.operation === 'replace' ? (\n\t\t<BlockDropZonePopover\n\t\t\t// Force remount to trigger the animation.\n\t\t\tkey={ `${ insertionPoint.rootClientId }-${ insertionPoint.index }` }\n\t\t\t{ ...props }\n\t\t/>\n\t) : (\n\t\t<InbetweenInsertionPointPopover\n\t\t\toperation={ insertionPoint.operation }\n\t\t\tnearestSide={ insertionPoint.nearestSide }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,MAAM,EAAEC,aAAa,EAAEC,UAAU,QAAQ,oBAAoB;AACtE,SAASC,gBAAgB,IAAIC,MAAM,QAAQ,uBAAuB;AAClE,SAASC,gBAAgB,QAAQ,oBAAoB;;AAErD;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,aAAa;AAClC,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,qBAAqB,MAAM,4BAA4B;AAC9D,OAAOC,oBAAoB,MAAM,4BAA4B;AAE7D,OAAO,MAAMC,qBAAqB,GAAGV,aAAa,CAAC,CAAC;AAEpD,SAASW,8BAA8BA,CAAE;EACxCC,qBAAqB;EACrBC,oBAAoB;EACpBC,SAAS,GAAG,QAAQ;EACpBC,WAAW,GAAG;AACf,CAAC,EAAG;EACH,MAAM;IAAEC,WAAW;IAAEC;EAAmB,CAAC,GAAGnB,WAAW,CAAES,gBAAiB,CAAC;EAC3E,MAAMW,OAAO,GAAGjB,UAAU,CAAES,qBAAsB,CAAC;EACnD,MAAMS,GAAG,GAAGpB,MAAM,CAAC,CAAC;EACpB,MAAM;IACLqB,WAAW;IACXC,gBAAgB;IAChBC,YAAY;IACZC,YAAY;IACZC,eAAe;IACfC,iBAAiB;IACjBC;EACD,CAAC,GAAG7B,SAAS,CAAI8B,MAAM,IAAM;IAC5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E;EAAK,CACV,CACD;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useRefEffect","useSelect","getScrollContainer","useCallback","useLayoutEffect","useMemo","useState","store","blockEditorStore","__unstableUseBlockElement","useBlockElement","hasStickyOrFixedPositionValue","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","setToolbarHeight","blockIndex","select","getBlockIndex","getBlockAttributes","props","setProps","popoverRef","popoverNode","offsetHeight","updateProps","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":"AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,oBAAoB;AACjD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,kBAAkB,QAAQ,gBAAgB;AACnD,SACCC,WAAW,EACXC,eAAe,EACfC,OAAO,EACPC,QAAQ,QACF,oBAAoB;;AAE3B;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,yBAAyB,IAAIC,eAAe,QAAQ,8CAA8C;AAC3G,SAASC,6BAA6B,QAAQ,sBAAsB;AAEpE,MAAMC,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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W;IAC9DD,WAAW,EAAEE,eAAe,GAAI,QAAQ,EAAEH,WAAY,CAAC;;IAEvD;IACA,IAAII,cAAc;IAClB,MAAMC,SAAS,GAAGnC,oBAAoB,EAAEW,aAAa,EAAEqB,WAAW;IAClE,IAAKG,SAAS,CAACC,cAAc,EAAG;MAC/BF,cAAc,GAAG,IAAIC,SAAS,CAACC,cAAc,CAAEN,WAAY,CAAC;MAC5DI,cAAc,CAACG,OAAO,CAAErC,oBAAqB,CAAC;IAC/C;IAEA,OAAO,MAAM;MACZ+B,WAAW,EAAEO,kBAAkB,GAAI,QAAQ,EAAER,WAAY,CAAC;MAE1D,IAAKI,cAAc,EAAG;QACrBA,cAAc,CAACK,UAAU,CAAC,CAAC;MAC5B;IACD,CAAC;EACF,CAAC,EAAE,CAAET,WAAW,EAAE/B,cAAc,EAAEC,oBAAoB,CAAG,CAAC;EAE1D,OAAO;IACN,GAAGyB,KAAK;IACRe,GAAG,EAAEb;EACN,CAAC;AACF"}
1
+ {"version":3,"names":["useRefEffect","useSelect","getScrollContainer","useCallback","useLayoutEffect","useMemo","useState","store","blockEditorStore","__unstableUseBlockElement","useBlockElement","hasStickyOrFixedPositionValue","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","setToolbarHeight","blockIndex","select","getBlockIndex","getBlockAttributes","props","setProps","popoverRef","popoverNode","offsetHeight","updateProps","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":"AAAA;AACA;AACA;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useSelectedBlockToolProps","clientId","selectedBlockProps","select","getBlockRootClientId","getBlockParents","__experimentalGetBlockListSettingsForBlocks","isBlockInsertionPointVisible","getBlockInsertionPoint","getBlockOrder","hasMultiSelection","getLastMultiSelectedBlockClientId","blockParentsClientIds","parentBlockListSettings","capturingClientId","find","parentClientId","__experimentalCaptureToolbars","isInsertionPointVisible","insertionPoint","order","rootClientId","index","lastClientId"],"sources":["@wordpress/block-editor/src/components/block-tools/use-selected-block-tool-props.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Returns props for the selected block tools and empty block inserter.\n *\n * @param {string} clientId Selected block client ID.\n */\nexport default function useSelectedBlockToolProps( clientId ) {\n\tconst selectedBlockProps = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetBlockParents,\n\t\t\t\t__experimentalGetBlockListSettingsForBlocks,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tgetBlockOrder,\n\t\t\t\thasMultiSelection,\n\t\t\t\tgetLastMultiSelectedBlockClientId,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst blockParentsClientIds = getBlockParents( clientId );\n\n\t\t\t// Get Block List Settings for all ancestors of the current Block clientId.\n\t\t\tconst parentBlockListSettings =\n\t\t\t\t__experimentalGetBlockListSettingsForBlocks(\n\t\t\t\t\tblockParentsClientIds\n\t\t\t\t);\n\n\t\t\t// Get the clientId of the topmost parent with the capture toolbars setting.\n\t\t\tconst capturingClientId = blockParentsClientIds.find(\n\t\t\t\t( parentClientId ) =>\n\t\t\t\t\tparentBlockListSettings[ parentClientId ]\n\t\t\t\t\t\t?.__experimentalCaptureToolbars\n\t\t\t);\n\n\t\t\tlet isInsertionPointVisible = false;\n\t\t\tif ( isBlockInsertionPointVisible() ) {\n\t\t\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\t\t\tconst order = getBlockOrder( insertionPoint.rootClientId );\n\t\t\t\tisInsertionPointVisible =\n\t\t\t\t\torder[ insertionPoint.index ] === clientId;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tcapturingClientId,\n\t\t\t\tisInsertionPointVisible,\n\t\t\t\tlastClientId: hasMultiSelection()\n\t\t\t\t\t? getLastMultiSelectedBlockClientId()\n\t\t\t\t\t: null,\n\t\t\t\trootClientId: getBlockRootClientId( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\treturn selectedBlockProps;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;;AAEvD;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,yBAAyBA,CAAEC,QAAQ,EAAG;EAC7D,MAAMC,kBAAkB,GAAGL,SAAS,CACjCM,MAAM,IAAM;IACb,MAAM;MACLC,oBAAoB;MACpBC,eAAe;MACfC,2CAA2C;MAC3CC,4BAA4B;MAC5BC,sBAAsB;MACtBC,aAAa;MACbC,iBAAiB;MACjBC;IACD,CAAC,GAAGR,MAAM,CAAEJ,gBAAiB,CAAC;IAE9B,MAAMa,qBAAqB,GAAGP,eAAe,CAAEJ,QAAS,CAAC;;IAEzD;IACA,MAAMY,uBAAuB,GAC5BP,2CAA2C,CAC1CM,qBACD,CAAC;;IAEF;IACA,MAAME,iBAAiB,GAAGF,qBAAqB,CAACG,IAAI,CACjDC,cAAc,IACfH,uBAAuB,CAAEG,cAAc,CAAE,EACtCC,6BACL,CAAC;IAED,IAAIC,uBAAuB,GAAG,KAAK;IACnC,IAAKX,4BAA4B,CAAC,CAAC,EAAG;MACrC,MAAMY,cAAc,GAAGX,sBAAsB,CAAC,CAAC;MAC/C,MAAMY,KAAK,GAAGX,aAAa,CAAEU,cAAc,CAACE,YAAa,CAAC;MAC1DH,uBAAuB,GACtBE,KAAK,CAAED,cAAc,CAACG,KAAK,CAAE,KAAKrB,QAAQ;IAC5C;IAEA,OAAO;MACNa,iBAAiB;MACjBI,uBAAuB;MACvBK,YAAY,EAAEb,iBAAiB,CAAC,CAAC,GAC9BC,iCAAiC,CAAC,CAAC,GACnC,IAAI;MACPU,YAAY,EAAEjB,oBAAoB,CAAEH,QAAS;IAC9C,CAAC;EACF,CAAC,EACD,CAAEA,QAAQ,CACX,CAAC;EAED,OAAOC,kBAAkB;AAC1B"}
1
+ {"version":3,"names":["useSelect","store","blockEditorStore","useSelectedBlockToolProps","clientId","selectedBlockProps","select","getBlockRootClientId","getBlockParents","__experimentalGetBlockListSettingsForBlocks","isBlockInsertionPointVisible","getBlockInsertionPoint","getBlockOrder","hasMultiSelection","getLastMultiSelectedBlockClientId","blockParentsClientIds","parentBlockListSettings","capturingClientId","find","parentClientId","__experimentalCaptureToolbars","isInsertionPointVisible","insertionPoint","order","rootClientId","index","lastClientId"],"sources":["@wordpress/block-editor/src/components/block-tools/use-selected-block-tool-props.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Returns props for the selected block tools and empty block inserter.\n *\n * @param {string} clientId Selected block client ID.\n */\nexport default function useSelectedBlockToolProps( clientId ) {\n\tconst selectedBlockProps = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetBlockParents,\n\t\t\t\t__experimentalGetBlockListSettingsForBlocks,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tgetBlockOrder,\n\t\t\t\thasMultiSelection,\n\t\t\t\tgetLastMultiSelectedBlockClientId,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst blockParentsClientIds = getBlockParents( clientId );\n\n\t\t\t// Get Block List Settings for all ancestors of the current Block clientId.\n\t\t\tconst parentBlockListSettings =\n\t\t\t\t__experimentalGetBlockListSettingsForBlocks(\n\t\t\t\t\tblockParentsClientIds\n\t\t\t\t);\n\n\t\t\t// Get the clientId of the topmost parent with the capture toolbars setting.\n\t\t\tconst capturingClientId = blockParentsClientIds.find(\n\t\t\t\t( parentClientId ) =>\n\t\t\t\t\tparentBlockListSettings[ parentClientId ]\n\t\t\t\t\t\t?.__experimentalCaptureToolbars\n\t\t\t);\n\n\t\t\tlet isInsertionPointVisible = false;\n\t\t\tif ( isBlockInsertionPointVisible() ) {\n\t\t\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\t\t\tconst order = getBlockOrder( insertionPoint.rootClientId );\n\t\t\t\tisInsertionPointVisible =\n\t\t\t\t\torder[ insertionPoint.index ] === clientId;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tcapturingClientId,\n\t\t\t\tisInsertionPointVisible,\n\t\t\t\tlastClientId: hasMultiSelection()\n\t\t\t\t\t? getLastMultiSelectedBlockClientId()\n\t\t\t\t\t: null,\n\t\t\t\trootClientId: getBlockRootClientId( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\treturn selectedBlockProps;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;;AAEvD;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,yBAAyBA,CAAEC,QAAQ,EAAG;EAC7D,MAAMC,kBAAkB,GAAGL,SAAS,CACjCM,MAAM,IAAM;IACb,MAAM;MACLC,oBAAoB;MACpBC,eAAe;MACfC,2CAA2C;MAC3CC,4BAA4B;MAC5BC,sBAAsB;MACtBC,aAAa;MACbC,iBAAiB;MACjBC;IACD,CAAC,GAAGR,MAAM,CAAEJ,gBAAiB,CAAC;IAE9B,MAAMa,qBAAqB,GAAGP,eAAe,CAAEJ,QAAS,CAAC;;IAEzD;IACA,MAAMY,uBAAuB,GAC5BP,2CAA2C,CAC1CM,qBACD,CAAC;;IAEF;IACA,MAAME,iBAAiB,GAAGF,qBAAqB,CAACG,IAAI,CACjDC,cAAc,IACfH,uBAAuB,CAAEG,cAAc,CAAE,EACtCC,6BACL,CAAC;IAED,IAAIC,uBAAuB,GAAG,KAAK;IACnC,IAAKX,4BAA4B,CAAC,CAAC,EAAG;MACrC,MAAMY,cAAc,GAAGX,sBAAsB,CAAC,CAAC;MAC/C,MAAMY,KAAK,GAAGX,aAAa,CAAEU,cAAc,CAACE,YAAa,CAAC;MAC1DH,uBAAuB,GACtBE,KAAK,CAAED,cAAc,CAACG,KAAK,CAAE,KAAKrB,QAAQ;IAC5C;IAEA,OAAO;MACNa,iBAAiB;MACjBI,uBAAuB;MACvBK,YAAY,EAAEb,iBAAiB,CAAC,CAAC,GAC9BC,iCAAiC,CAAC,CAAC,GACnC,IAAI;MACPU,YAAY,EAAEjB,oBAAoB,CAAEH,QAAS;IAC9C,CAAC;EACF,CAAC,EACD,CAAEA,QAAQ,CACX,CAAC;EAED,OAAOC,kBAAkB;AAC1B","ignoreList":[]}
@@ -8,7 +8,6 @@ import { isUnmodifiedDefaultBlock } from '@wordpress/blocks';
8
8
  * Internal dependencies
9
9
  */
10
10
  import { store as blockEditorStore } from '../../store';
11
- import { useHasBlockToolbar } from '../block-toolbar/use-has-block-toolbar';
12
11
 
13
12
  /**
14
13
  * Source of truth for which block tools are showing in the block editor.
@@ -16,7 +15,6 @@ import { useHasBlockToolbar } from '../block-toolbar/use-has-block-toolbar';
16
15
  * @return {Object} Object of which block tools will be shown.
17
16
  */
18
17
  export function useShowBlockTools() {
19
- const hasBlockToolbar = useHasBlockToolbar();
20
18
  return useSelect(select => {
21
19
  const {
22
20
  getSelectedBlockClientId,
@@ -28,27 +26,20 @@ export function useShowBlockTools() {
28
26
  isTyping
29
27
  } = select(blockEditorStore);
30
28
  const clientId = getSelectedBlockClientId() || getFirstMultiSelectedBlockClientId();
31
- const {
32
- name = '',
33
- attributes = {}
34
- } = getBlock(clientId) || {};
29
+ const block = getBlock(clientId) || {
30
+ name: '',
31
+ attributes: {}
32
+ };
35
33
  const editorMode = __unstableGetEditorMode();
36
- const hasSelectedBlock = clientId && name;
37
- const isEmptyDefaultBlock = isUnmodifiedDefaultBlock({
38
- name,
39
- attributes
40
- });
41
- const _showEmptyBlockSideInserter = clientId && !isTyping() && editorMode === 'edit' && isUnmodifiedDefaultBlock({
42
- name,
43
- attributes
44
- });
34
+ const hasSelectedBlock = clientId && block?.name;
35
+ const isEmptyDefaultBlock = isUnmodifiedDefaultBlock(block);
36
+ const _showEmptyBlockSideInserter = clientId && !isTyping() && editorMode === 'edit' && isEmptyDefaultBlock;
45
37
  const maybeShowBreadcrumb = hasSelectedBlock && !hasMultiSelection() && (editorMode === 'navigation' || editorMode === 'zoom-out');
46
38
  return {
47
39
  showEmptyBlockSideInserter: _showEmptyBlockSideInserter,
48
40
  showBreadcrumb: !_showEmptyBlockSideInserter && maybeShowBreadcrumb,
49
- showBlockToolbarPopover: hasBlockToolbar && !getSettings().hasFixedToolbar && !_showEmptyBlockSideInserter && hasSelectedBlock && !isEmptyDefaultBlock && !maybeShowBreadcrumb,
50
- showFixedToolbar: editorMode !== 'zoom-out' && hasBlockToolbar && getSettings().hasFixedToolbar
41
+ showBlockToolbarPopover: !getSettings().hasFixedToolbar && !_showEmptyBlockSideInserter && hasSelectedBlock && !isEmptyDefaultBlock && !maybeShowBreadcrumb
51
42
  };
52
- }, [hasBlockToolbar]);
43
+ }, []);
53
44
  }
54
45
  //# sourceMappingURL=use-show-block-tools.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","isUnmodifiedDefaultBlock","store","blockEditorStore","useHasBlockToolbar","useShowBlockTools","hasBlockToolbar","select","getSelectedBlockClientId","getFirstMultiSelectedBlockClientId","getBlock","getSettings","hasMultiSelection","__unstableGetEditorMode","isTyping","clientId","name","attributes","editorMode","hasSelectedBlock","isEmptyDefaultBlock","_showEmptyBlockSideInserter","maybeShowBreadcrumb","showEmptyBlockSideInserter","showBreadcrumb","showBlockToolbarPopover","hasFixedToolbar","showFixedToolbar"],"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';\nimport { useHasBlockToolbar } from '../block-toolbar/use-has-block-toolbar';\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\tconst hasBlockToolbar = useHasBlockToolbar();\n\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\tgetFirstMultiSelectedBlockClientId,\n\t\t\t\tgetBlock,\n\t\t\t\tgetSettings,\n\t\t\t\thasMultiSelection,\n\t\t\t\t__unstableGetEditorMode,\n\t\t\t\tisTyping,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst clientId =\n\t\t\t\tgetSelectedBlockClientId() ||\n\t\t\t\tgetFirstMultiSelectedBlockClientId();\n\n\t\t\tconst { name = '', attributes = {} } = getBlock( clientId ) || {};\n\t\t\tconst editorMode = __unstableGetEditorMode();\n\t\t\tconst hasSelectedBlock = clientId && name;\n\t\t\tconst isEmptyDefaultBlock = isUnmodifiedDefaultBlock( {\n\t\t\t\tname,\n\t\t\t\tattributes,\n\t\t\t} );\n\t\t\tconst _showEmptyBlockSideInserter =\n\t\t\t\tclientId &&\n\t\t\t\t! isTyping() &&\n\t\t\t\teditorMode === 'edit' &&\n\t\t\t\tisUnmodifiedDefaultBlock( { name, attributes } );\n\t\t\tconst maybeShowBreadcrumb =\n\t\t\t\thasSelectedBlock &&\n\t\t\t\t! hasMultiSelection() &&\n\t\t\t\t( editorMode === 'navigation' || editorMode === 'zoom-out' );\n\n\t\t\treturn {\n\t\t\t\tshowEmptyBlockSideInserter: _showEmptyBlockSideInserter,\n\t\t\t\tshowBreadcrumb:\n\t\t\t\t\t! _showEmptyBlockSideInserter && maybeShowBreadcrumb,\n\t\t\t\tshowBlockToolbarPopover:\n\t\t\t\t\thasBlockToolbar &&\n\t\t\t\t\t! getSettings().hasFixedToolbar &&\n\t\t\t\t\t! _showEmptyBlockSideInserter &&\n\t\t\t\t\thasSelectedBlock &&\n\t\t\t\t\t! isEmptyDefaultBlock &&\n\t\t\t\t\t! maybeShowBreadcrumb,\n\t\t\t\tshowFixedToolbar:\n\t\t\t\t\teditorMode !== 'zoom-out' &&\n\t\t\t\t\thasBlockToolbar &&\n\t\t\t\t\tgetSettings().hasFixedToolbar,\n\t\t\t};\n\t\t},\n\t\t[ hasBlockToolbar ]\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,wBAAwB,QAAQ,mBAAmB;;AAE5D;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,kBAAkB,QAAQ,wCAAwC;;AAE3E;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAA,EAAG;EACnC,MAAMC,eAAe,GAAGF,kBAAkB,CAAC,CAAC;EAE5C,OAAOJ,SAAS,CACbO,MAAM,IAAM;IACb,MAAM;MACLC,wBAAwB;MACxBC,kCAAkC;MAClCC,QAAQ;MACRC,WAAW;MACXC,iBAAiB;MACjBC,uBAAuB;MACvBC;IACD,CAAC,GAAGP,MAAM,CAAEJ,gBAAiB,CAAC;IAE9B,MAAMY,QAAQ,GACbP,wBAAwB,CAAC,CAAC,IAC1BC,kCAAkC,CAAC,CAAC;IAErC,MAAM;MAAEO,IAAI,GAAG,EAAE;MAAEC,UAAU,GAAG,CAAC;IAAE,CAAC,GAAGP,QAAQ,CAAEK,QAAS,CAAC,IAAI,CAAC,CAAC;IACjE,MAAMG,UAAU,GAAGL,uBAAuB,CAAC,CAAC;IAC5C,MAAMM,gBAAgB,GAAGJ,QAAQ,IAAIC,IAAI;IACzC,MAAMI,mBAAmB,GAAGnB,wBAAwB,CAAE;MACrDe,IAAI;MACJC;IACD,CAAE,CAAC;IACH,MAAMI,2BAA2B,GAChCN,QAAQ,IACR,CAAED,QAAQ,CAAC,CAAC,IACZI,UAAU,KAAK,MAAM,IACrBjB,wBAAwB,CAAE;MAAEe,IAAI;MAAEC;IAAW,CAAE,CAAC;IACjD,MAAMK,mBAAmB,GACxBH,gBAAgB,IAChB,CAAEP,iBAAiB,CAAC,CAAC,KACnBM,UAAU,KAAK,YAAY,IAAIA,UAAU,KAAK,UAAU,CAAE;IAE7D,OAAO;MACNK,0BAA0B,EAAEF,2BAA2B;MACvDG,cAAc,EACb,CAAEH,2BAA2B,IAAIC,mBAAmB;MACrDG,uBAAuB,EACtBnB,eAAe,IACf,CAAEK,WAAW,CAAC,CAAC,CAACe,eAAe,IAC/B,CAAEL,2BAA2B,IAC7BF,gBAAgB,IAChB,CAAEC,mBAAmB,IACrB,CAAEE,mBAAmB;MACtBK,gBAAgB,EACfT,UAAU,KAAK,UAAU,IACzBZ,eAAe,IACfK,WAAW,CAAC,CAAC,CAACe;IAChB,CAAC;EACF,CAAC,EACD,CAAEpB,eAAe,CAClB,CAAC;AACF"}
1
+ {"version":3,"names":["useSelect","isUnmodifiedDefaultBlock","store","blockEditorStore","useShowBlockTools","select","getSelectedBlockClientId","getFirstMultiSelectedBlockClientId","getBlock","getSettings","hasMultiSelection","__unstableGetEditorMode","isTyping","clientId","block","name","attributes","editorMode","hasSelectedBlock","isEmptyDefaultBlock","_showEmptyBlockSideInserter","maybeShowBreadcrumb","showEmptyBlockSideInserter","showBreadcrumb","showBlockToolbarPopover","hasFixedToolbar"],"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\t( editorMode === 'navigation' || editorMode === 'zoom-out' );\n\n\t\treturn {\n\t\t\tshowEmptyBlockSideInserter: _showEmptyBlockSideInserter,\n\t\t\tshowBreadcrumb:\n\t\t\t\t! _showEmptyBlockSideInserter && maybeShowBreadcrumb,\n\t\t\tshowBlockToolbarPopover:\n\t\t\t\t! getSettings().hasFixedToolbar &&\n\t\t\t\t! _showEmptyBlockSideInserter &&\n\t\t\t\thasSelectedBlock &&\n\t\t\t\t! isEmptyDefaultBlock &&\n\t\t\t\t! maybeShowBreadcrumb,\n\t\t};\n\t}, [] );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,wBAAwB,Q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11,16 @@ import { useEffect, useState } from '@wordpress/element';
11
11
  import BlockPopoverInbetween from '../block-popover/inbetween';
12
12
  import { store as blockEditorStore } from '../../store';
13
13
  import Inserter from '../inserter';
14
+ import { unlock } from '../../lock-unlock';
14
15
  function ZoomOutModeInserters({
15
16
  __unstableContentRef
16
17
  }) {
17
18
  const [isReady, setIsReady] = useState(false);
18
19
  const blockOrder = useSelect(select => {
19
- return select(blockEditorStore).getBlockOrder();
20
+ const {
21
+ sectionRootClientId
22
+ } = unlock(select(blockEditorStore).getSettings());
23
+ return select(blockEditorStore).getBlockOrder(sectionRootClientId);
20
24
  }, []);
21
25
 
22
26
  // Defer the initial rendering to avoid the jumps due to the animation.
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","useEffect","useState","BlockPopoverInbetween","store","blockEditorStore","Inserter","ZoomOutModeInserters","__unstableContentRef","isReady","setIsReady","blockOrder","select","getBlockOrder","timeout","setTimeout","clearTimeout","map","clientId","index","length","createElement","key","previousClientId","nextClientId","className","position","__experimentalIsQuick"],"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, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockPopoverInbetween from '../block-popover/inbetween';\nimport { store as blockEditorStore } from '../../store';\nimport Inserter from '../inserter';\n\nfunction ZoomOutModeInserters( { __unstableContentRef } ) {\n\tconst [ isReady, setIsReady ] = useState( false );\n\tconst blockOrder = useSelect( ( select ) => {\n\t\treturn select( blockEditorStore ).getBlockOrder();\n\t}, [] );\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 blockOrder.map( ( clientId, index ) => {\n\t\tif ( index === blockOrder.length - 1 ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<BlockPopoverInbetween\n\t\t\t\tkey={ clientId }\n\t\t\t\tpreviousClientId={ clientId }\n\t\t\t\tnextClientId={ blockOrder[ index + 1 ] }\n\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t>\n\t\t\t\t<div className=\"block-editor-block-list__insertion-point-inserter is-with-inserter\">\n\t\t\t\t\t<Inserter\n\t\t\t\t\t\tposition=\"bottom center\"\n\t\t\t\t\t\tclientId={ blockOrder[ index + 1 ] }\n\t\t\t\t\t\t__experimentalIsQuick\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</BlockPopoverInbetween>\n\t\t);\n\t} );\n}\n\nexport default ZoomOutModeInserters;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,SAAS,EAAEC,QAAQ,QAAQ,oBAAoB;;AAExD;AACA;AACA;AACA,OAAOC,qBAAqB,MAAM,4BAA4B;AAC9D,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,QAAQ,MAAM,aAAa;AAElC,SAASC,oBAAoBA,CAAE;EAAEC;AAAqB,CAAC,EAAG;EACzD,MAAM,CAAEC,OAAO,EAAEC,UAAU,CAAE,GAAGR,QAAQ,CAAE,KAAM,CAAC;EACjD,MAAMS,UAAU,GAAGX,SAAS,CAAIY,MAAM,IAAM;IAC3C,OAAOA,MAAM,CAAEP,gBAAiB,CAAC,CAACQ,aAAa,CAAC,CAAC;EAClD,CAAC,EAAE,EAAG,CAAC;;EAEP;EACAZ,SAAS,CAAE,MAAM;IAChB,MAAMa,OAAO,GAAGC,UAAU,CAAE,MAAM;MACjCL,UAAU,CAAE,IAAK,CAAC;IACnB,CAAC,EAAE,GAAI,CAAC;IACR,OAAO,MAAM;MACZM,YAAY,CAAEF,OAAQ,CAAC;IACxB,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,IAAK,CAAEL,OAAO,EAAG;IAChB,OAAO,IAAI;EACZ;EAEA,OAAOE,UAAU,CAACM,GAAG,CAAE,CAAEC,QAAQ,EAAEC,KAAK,KAAM;IAC7C,IAAKA,KAAK,KAAKR,UAAU,CAACS,MAAM,GAAG,CAAC,EAAG;MACtC,OAAO,IAAI;IACZ;IACA,OACCC,aAAA,CAAClB,qBAAqB;MACrBmB,GAAG,EAAGJ,QAAU;MAChBK,gBAAgB,EAAGL,QAAU;MAC7BM,YAAY,EAAGb,UAAU,CAAEQ,KAAK,GAAG,CAAC,CAAI;MACxCX,oBAAoB,EAAGA;IAAsB,GAE7Ca,aAAA;MAAKI,SAAS,EAAC;IAAoE,GAClFJ,aAAA,CAACf,QAAQ;MACRoB,QAAQ,EAAC,eAAe;MACxBR,QAAQ,EAAGP,UAAU,CAAEQ,KAAK,GAAG,CAAC,CAAI;MACpCQ,qBAAqB;IAAA,CACrB,CACG,CACiB,CAAC;EAE1B,CAAE,CAAC;AACJ;AAEA,eAAepB,oBAAoB"}
1
+ {"version":3,"names":["useSelect","useEffect","useState","BlockPopoverInbetween","store","blockEditorStore","Inserter","unlock","ZoomOutModeInserters","__unstableContentRef","isReady","setIsReady","blockOrder","select","sectionRootClientId","getSettings","getBlockOrder","timeout","setTimeout","clearTimeout","map","clientId","index","length","createElement","key","previousClientId","nextClientId","className","position","__experimentalIsQuick"],"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, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockPopoverInbetween from '../block-popover/inbetween';\nimport { store as blockEditorStore } from '../../store';\nimport Inserter from '../inserter';\nimport { unlock } from '../../lock-unlock';\n\nfunction ZoomOutModeInserters( { __unstableContentRef } ) {\n\tconst [ isReady, setIsReady ] = useState( false );\n\tconst blockOrder = useSelect( ( select ) => {\n\t\tconst { sectionRootClientId } = unlock(\n\t\t\tselect( blockEditorStore ).getSettings()\n\t\t);\n\t\treturn select( blockEditorStore ).getBlockOrder( sectionRootClientId );\n\t}, [] );\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 blockOrder.map( ( clientId, index ) => {\n\t\tif ( index === blockOrder.length - 1 ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<BlockPopoverInbetween\n\t\t\t\tkey={ clientId }\n\t\t\t\tpreviousClientId={ clientId }\n\t\t\t\tnextClientId={ blockOrder[ index + 1 ] }\n\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t>\n\t\t\t\t<div className=\"block-editor-block-list__insertion-point-inserter is-with-inserter\">\n\t\t\t\t\t<Inserter\n\t\t\t\t\t\tposition=\"bottom center\"\n\t\t\t\t\t\tclientId={ blockOrder[ index + 1 ] }\n\t\t\t\t\t\t__experimentalIsQuick\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</BlockPopoverInbetween>\n\t\t);\n\t} );\n}\n\nexport default ZoomOutModeInserters;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,SAAS,EAAEC,QAAQ,QAAQ,oBAAoB;;AAExD;AACA;AACA;AACA,OAAOC,qBAAqB,MAAM,4BAA4B;AAC9D,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,QAAQ,MAAM,aAAa;AAClC,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,SAASC,oBAAoBA,CAAE;EAAEC;AAAqB,CAAC,EAAG;EACzD,MAAM,CAAEC,OAAO,EAAEC,UAAU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aultClassName","useInstanceId","InserterListItem","InserterListboxGroup","InserterListboxRow","chunk","array","size","chunks","i","j","length","push","slice","BlockTypesList","items","onSelect","onHover","children","label","isDraggable","className","listId","createElement","map","row","key","item","id","isDisabled","isFirst","rowId"],"sources":["@wordpress/block-editor/src/components/block-types-list/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockMenuDefaultClassName } from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport InserterListItem from '../inserter-list-item';\nimport { InserterListboxGroup, InserterListboxRow } from '../inserter-listbox';\n\nfunction chunk( array, size ) {\n\tconst chunks = [];\n\tfor ( let i = 0, j = array.length; i < j; i += size ) {\n\t\tchunks.push( array.slice( i, i + size ) );\n\t}\n\treturn chunks;\n}\n\nfunction BlockTypesList( {\n\titems = [],\n\tonSelect,\n\tonHover = () => {},\n\tchildren,\n\tlabel,\n\tisDraggable = true,\n} ) {\n\tconst className = 'block-editor-block-types-list';\n\tconst listId = useInstanceId( BlockTypesList, className );\n\treturn (\n\t\t<InserterListboxGroup className={ className } aria-label={ label }>\n\t\t\t{ chunk( items, 3 ).map( ( row, i ) => (\n\t\t\t\t<InserterListboxRow key={ i }>\n\t\t\t\t\t{ row.map( ( item, j ) => (\n\t\t\t\t\t\t<InserterListItem\n\t\t\t\t\t\t\tkey={ item.id }\n\t\t\t\t\t\t\titem={ item }\n\t\t\t\t\t\t\tclassName={ getBlockMenuDefaultClassName(\n\t\t\t\t\t\t\t\titem.id\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\tisDraggable={ isDraggable && ! item.isDisabled }\n\t\t\t\t\t\t\tisFirst={ i === 0 && j === 0 }\n\t\t\t\t\t\t\trowId={ `${ listId }-${ i }` }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</InserterListboxRow>\n\t\t\t) ) }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ACC,EAAI;IACfD,IAAI,EAAGA,IAAM;IACbN,SAAS,EAAGrB,4BAA4B,CACvC2B,IAAI,CAACC,EACN,CAAG;IACHZ,QAAQ,EAAGA,QAAU;IACrBC,OAAO,EAAGA,OAAS;IACnBG,WAAW,EAAGA,WAAW,IAAI,CAAEO,IAAI,CAACE,UAAY;IAChDC,OAAO,EAAGrB,CAAC,KAAK,CAAC,IAAIC,CAAC,KAAK,CAAG;IAC9BqB,KAAK,EAAI,GAAGT,MAAQ,IAAIb,CAAG;EAAG,CAC9B,CACA,CACiB,CACnB,CAAC,EACDS,QACmB,CAAC;AAEzB;AAEA,eAAeJ,cAAc"}
1
+ {"version":3,"names":["getBlockMenuDefaultClassName","useInstanceId","InserterListItem","InserterListboxGroup","InserterListboxRow","chunk","array","size","chunks","i","j","length","push","slice","BlockTypesList","items","onSelect","onHover","children","label","isDraggable","className","listId","createElement","map","row","key","item","id","isDisabled","isFirst","rowId"],"sources":["@wordpress/block-editor/src/components/block-types-list/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockMenuDefaultClassName } from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport InserterListItem from '../inserter-list-item';\nimport { InserterListboxGroup, InserterListboxRow } from '../inserter-listbox';\n\nfunction chunk( array, size ) {\n\tconst chunks = [];\n\tfor ( let i = 0, j = array.length; i < j; i += size ) {\n\t\tchunks.push( array.slice( i, i + size ) );\n\t}\n\treturn chunks;\n}\n\nfunction BlockTypesList( {\n\titems = [],\n\tonSelect,\n\tonHover = () => {},\n\tchildren,\n\tlabel,\n\tisDraggable = true,\n} ) {\n\tconst className = 'block-editor-block-types-list';\n\tconst listId = useInstanceId( BlockTypesList, className );\n\treturn (\n\t\t<InserterListboxGroup className={ className } aria-label={ label }>\n\t\t\t{ chunk( items, 3 ).map( ( row, i ) => (\n\t\t\t\t<InserterListboxRow key={ i }>\n\t\t\t\t\t{ row.map( ( item, j ) => (\n\t\t\t\t\t\t<InserterListItem\n\t\t\t\t\t\t\tkey={ item.id }\n\t\t\t\t\t\t\titem={ item }\n\t\t\t\t\t\t\tclassName={ getBlockMenuDefaultClassName(\n\t\t\t\t\t\t\t\titem.id\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\tisDraggable={ isDraggable && ! item.isDisabled }\n\t\t\t\t\t\t\tisFirst={ i === 0 && j === 0 }\n\t\t\t\t\t\t\trowId={ `${ listId }-${ i }` }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</InserterListboxRow>\n\t\t\t) ) }\n\t\t\t{ children }\n\t\t</InserterListboxGroup>\n\t);\n}\n\nexport default BlockTypesList;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,4BAA4B,QAAQ,mBAAmB;AAChE,SAASC,aAAa,QAAQ,oBAAoB;;AAElD;AACA;AACA;AACA,OAAOC,gBAAgB,MAAM,uBAAuB;AACpD,SAASC,oBAAoB,EAAEC,kBAAkB,QAAQ,qBAAqB;AAE9E,SAASC,KAAKA,CAAEC,KAAK,EAAEC,IAAI,EAAG;EAC7B,MAAMC,MAAM,GAAG,EAAE;EACjB,KAAM,IAAIC,CAAC,GAAG,CAAC,EAAEC,CAAC,GAAGJ,KAAK,CAACK,MAAM,EAAEF,CAAC,GAAGC,CAAC,EAAED,CAAC,IAAIF,IAAI,EAAG;IACrDC,MAAM,CAACI,IAAI,CAAEN,KAAK,CAACO,KAAK,CAAEJ,CAAC,EAAEA,CAAC,GAAGF,IAAK,CAAE,CAAC;EAC1C;EACA,OAAOC,MAAM;AACd;AAEA,SAASM,cAAcA,CAAE;EACxBC,KAAK,GAAG,EAAE;EACVC,QAAQ;EACRC,OAAO,GAAGA,CAAA,KAAM,CAAC,CAAC;EAClBC,QAAQ;EACRC,KAAK;EACLC,WAAW,GAAG;AACf,CAAC,EAAG;EACH,MAAMC,SAAS,GAAG,+BAA+B;EACjD,MAAMC,MAAM,GAAGrB,aAAa,CAAEa,cAAc,EAAEO,SAAU,CAAC;EACzD,OACCE,aAAA,CAACpB,oBAAoB;IAACkB,SAAS,EAAGA,SAAW;IAAC,cAAaF;EAAO,GAC/Dd,KAAK,CAAEU,KAAK,EAAE,CAAE,CAAC,CAACS,GAAG,CAAE,CAAEC,GAAG,EAAEhB,CAAC,KAChCc,aAAA,CAACnB,kBAAkB;IAACsB,GAAG,EAAGjB;EAAG,GAC1BgB,GAAG,CAACD,GAAG,CAAE,CAAEG,IAAI,EAAEjB,CAAC,KACnBa,aAAA,CAACrB,gBAAgB;IAChBwB,GAAG,EAAGC,IAAI,CAACC,EAAI;IACfD,IAAI,EAAGA,IAAM;IACbN,SAAS,EAAGrB,4BAA4B,CACvC2B,IAAI,CAACC,EACN,CAAG;IACHZ,QAAQ,EAAGA,QAAU;IACrBC,OAAO,EAAGA,OAAS;IACnBG,WAAW,EAAGA,WAAW,IAAI,CAAEO,IAAI,CAACE,UAAY;IAChDC,OAAO,EAAGrB,CAAC,KAAK,CAAC,IAAIC,CAAC,KAAK,CAAG;IAC9BqB,KAAK,EAAI,GAAGT,MAAQ,IAAIb,CAAG;EAAG,CAC9B,CACA,CACiB,CACnB,CAAC,EACDS,QACmB,CAAC;AAEzB;AAEA,eAAeJ,cAAc","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["Dimensions","FlatList","SectionList","StyleSheet","Text","TouchableWithoutFeedback","View","useState","useEffect","BottomSheet","Gradient","usePreferredColorScheme","usePreferredColorSchemeStyle","styles","InserterButton","MIN_COL_NUM","BlockTypesList","name","sections","onSelect","label","listProps","initialNumToRender","numberOfColumns","setNumberOfColumns","itemWidth","setItemWidth","maxWidth","setMaxWidth","dimensionsChangeSubscription","addEventListener","onLayout","remove","calculateItemWidth","paddingLeft","itemPaddingLeft","paddingRight","itemPaddingRight","Styles","modalItem","width","modalIconWrapper","columnStyle","sumLeftRightPadding","bottomSheetWidth","getWidth","containerTotalWidth","itemTotalWidth","columnsFitToWidth","Math","floor","numColumns","max","updatedItemWidth","contentContainerStyle","flatten","renderSection","item","createElement","accessible","data","list","key","ItemSeparatorComponent","style","scrollEnabled","renderItem","renderListItem","colorScheme","sectionHeaderGradientValue","sectionHeaderTitleStyles","renderSectionHeader","section","metadata","icon","title","gradientValue","testID","accessibilityLabel","keyboardShouldPersistTaps","paddingBottom","safeAreaBottomInset"],"sources":["@wordpress/block-editor/src/components/block-types-list/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tDimensions,\n\tFlatList,\n\tSectionList,\n\tStyleSheet,\n\tText,\n\tTouchableWithoutFeedback,\n\tView,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport { BottomSheet, Gradient } from '@wordpress/components';\nimport {\n\tusePreferredColorScheme,\n\tusePreferredColorSchemeStyle,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport InserterButton from '../inserter-button';\n\nconst MIN_COL_NUM = 3;\n\nexport default function BlockTypesList( {\n\tname,\n\tsections,\n\tonSelect,\n\tlabel,\n\tlistProps,\n\tinitialNumToRender = 3,\n} ) {\n\tconst [ numberOfColumns, setNumberOfColumns ] = useState( MIN_COL_NUM );\n\tconst [ itemWidth, setItemWidth ] = useState();\n\tconst [ maxWidth, setMaxWidth ] = useState();\n\n\tuseEffect( () => {\n\t\tconst dimensionsChangeSubscription = Dimensions.addEventListener(\n\t\t\t'change',\n\t\t\tonLayout\n\t\t);\n\t\tonLayout();\n\t\treturn () => {\n\t\t\tdimensionsChangeSubscription.remove();\n\t\t};\n\t}, [] );\n\n\tfunction calculateItemWidth() {\n\t\tconst { paddingLeft: itemPaddingLeft, paddingRight: itemPaddingRight } =\n\t\t\tInserterButton.Styles.modalItem;\n\t\tconst { width } = InserterButton.Styles.modalIconWrapper;\n\t\treturn width + itemPaddingLeft + itemPaddingRight;\n\t}\n\n\tfunction onLayout() {\n\t\tconst columnStyle = styles[ 'block-types-list__column' ];\n\t\tconst sumLeftRightPadding =\n\t\t\tcolumnStyle.paddingLeft + columnStyle.paddingRight;\n\n\t\tconst bottomSheetWidth = BottomSheet.getWidth();\n\t\tconst containerTotalWidth = bottomSheetWidth - sumLeftRightPadding;\n\t\tconst itemTotalWidth = calculateItemWidth();\n\n\t\tconst columnsFitToWidth = Math.floor(\n\t\t\tcontainerTotalWidth / itemTotalWidth\n\t\t);\n\n\t\tconst numColumns = Math.max( MIN_COL_NUM, columnsFitToWidth );\n\n\t\tsetNumberOfColumns( numColumns );\n\t\tsetMaxWidth( containerTotalWidth / numColumns );\n\n\t\tif ( columnsFitToWidth < MIN_COL_NUM ) {\n\t\t\tconst updatedItemWidth =\n\t\t\t\t( bottomSheetWidth - 2 * sumLeftRightPadding ) / MIN_COL_NUM;\n\t\t\tsetItemWidth( updatedItemWidth );\n\t\t}\n\t}\n\n\tconst contentContainerStyle = StyleSheet.flatten(\n\t\tlistProps.contentContainerStyle\n\t);\n\n\tconst renderSection = ( { item } ) => {\n\t\treturn (\n\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t<FlatList\n\t\t\t\t\tdata={ item.list }\n\t\t\t\t\tkey={ `InserterUI-${ name }-${ numberOfColumns }` } // Re-render when numberOfColumns changes.\n\t\t\t\t\tnumColumns={ numberOfColumns }\n\t\t\t\t\tItemSeparatorComponent={ () => (\n\t\t\t\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\tstyles[ 'block-types-list__row-separator' ]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</TouchableWithoutFeedback>\n\t\t\t\t\t) }\n\t\t\t\t\tscrollEnabled={ false }\n\t\t\t\t\trenderItem={ renderListItem }\n\t\t\t\t/>\n\t\t\t</TouchableWithoutFeedback>\n\t\t);\n\t};\n\n\tconst renderListItem = ( { item } ) => {\n\t\treturn (\n\t\t\t<InserterButton\n\t\t\t\titem={ item }\n\t\t\t\titemWidth={ itemWidth }\n\t\t\t\tmaxWidth={ maxWidth }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t/>\n\t\t);\n\t};\n\n\tconst colorScheme = usePreferredColorScheme();\n\tconst sectionHeaderGradientValue =\n\t\tcolorScheme === 'light'\n\t\t\t? 'linear-gradient(#fff 70%, rgba(255, 255, 255, 0))'\n\t\t\t: 'linear-gradient(#2e2e2e 70%, rgba(46, 46, 46, 0))';\n\tconst sectionHeaderTitleStyles = usePreferredColorSchemeStyle(\n\t\tstyles[ 'block-types-list__section-header-title' ],\n\t\tstyles[ 'block-types-list__section-header-title--dark' ]\n\t);\n\n\tconst renderSectionHeader = ( { section: { metadata } } ) => {\n\t\tif ( ! metadata?.icon || ! metadata?.title ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t<Gradient\n\t\t\t\t\tgradientValue={ sectionHeaderGradientValue }\n\t\t\t\t\tstyle={ styles[ 'block-types-list__section-header' ] }\n\t\t\t\t>\n\t\t\t\t\t{ metadata?.icon }\n\t\t\t\t\t<Text style={ sectionHeaderTitleStyles }>\n\t\t\t\t\t\t{ metadata?.title }\n\t\t\t\t\t</Text>\n\t\t\t\t</Gradient>\n\t\t\t</TouchableWithoutFeedback>\n\t\t);\n\t};\n\n\treturn (\n\t\t<SectionList\n\t\t\tonLayout={ onLayout }\n\t\t\ttestID={ `InserterUI-${ name }` }\n\t\t\taccessibilityLabel={ label }\n\t\t\tkeyboardShouldPersistTaps=\"always\"\n\t\t\tsections={ sections }\n\t\t\tinitialNumToRender={ initialNumToRender }\n\t\t\trenderItem={ renderSection }\n\t\t\trenderSectionHeader={ renderSectionHeader }\n\t\t\t{ ...listProps }\n\t\t\tcontentContainerStyle={ {\n\t\t\t\t...contentContainerStyle,\n\t\t\t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B,GACrCG,QAAQ,EAAEE,KACP,CACG,CACe,CAAC;EAE7B,CAAC;EAED,OACCjB,aAAA,CAACxD,WAAW;IACX6B,QAAQ,EAAGA,QAAU;IACrB8C,MAAM,EAAI,cAAc5D,IAAM,EAAG;IACjC6D,kBAAkB,EAAG1D,KAAO;IAC5B2D,yBAAyB,EAAC,QAAQ;IAClC7D,QAAQ,EAAGA,QAAU;IACrBI,kBAAkB,EAAGA,kBAAoB;IACzC4C,UAAU,EAAGV,aAAe;IAC5Be,mBAAmB,EAAGA,mBAAqB;IAAA,GACtClD,SAAS;IACdiC,qBAAqB,EAAG;MACvB,GAAGA,qBAAqB;MACxB0B,aAAa,EAAE/B,IAAI,CAACG,GAAG,CACtB/B,SAAS,CAAC4D,mBAAmB,EAC7B3B,qBAAqB,CAAC0B,aACvB;IACD;EAAG,CACH,CAAC;AAEJ"}
1
+ {"version":3,"names":["Dimensions","FlatList","SectionList","StyleSheet","Text","TouchableWithoutFeedback","View","useState","useEffect","BottomSheet","Gradient","usePreferredColorScheme","usePreferredColorSchemeStyle","styles","InserterButton","MIN_COL_NUM","BlockTypesList","name","sections","onSelect","label","listProps","initialNumToRender","numberOfColumns","setNumberOfColumns","itemWidth","setItemWidth","maxWidth","setMaxWidth","dimensionsChangeSubscription","addEventListener","onLayout","remove","calculateItemWidth","paddingLeft","itemPaddingLeft","paddingRight","itemPaddingRight","Styles","modalItem","width","modalIconWrapper","columnStyle","sumLeftRightPadding","bottomSheetWidth","getWidth","containerTotalWidth","itemTotalWidth","columnsFitToWidth","Math","floor","numColumns","max","updatedItemWidth","contentContainerStyle","flatten","renderSection","item","createElement","accessible","data","list","key","ItemSeparatorComponent","style","scrollEnabled","renderItem","renderListItem","colorScheme","sectionHeaderGradientValue","sectionHeaderTitleStyles","renderSectionHeader","section","metadata","icon","title","gradientValue","testID","accessibilityLabel","keyboardShouldPersistTaps","paddingBottom","safeAreaBottomInset"],"sources":["@wordpress/block-editor/src/components/block-types-list/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tDimensions,\n\tFlatList,\n\tSectionList,\n\tStyleSheet,\n\tText,\n\tTouchableWithoutFeedback,\n\tView,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport { BottomSheet, Gradient } from '@wordpress/components';\nimport {\n\tusePreferredColorScheme,\n\tusePreferredColorSchemeStyle,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport InserterButton from '../inserter-button';\n\nconst MIN_COL_NUM = 3;\n\nexport default function BlockTypesList( {\n\tname,\n\tsections,\n\tonSelect,\n\tlabel,\n\tlistProps,\n\tinitialNumToRender = 3,\n} ) {\n\tconst [ numberOfColumns, setNumberOfColumns ] = useState( MIN_COL_NUM );\n\tconst [ itemWidth, setItemWidth ] = useState();\n\tconst [ maxWidth, setMaxWidth ] = useState();\n\n\tuseEffect( () => {\n\t\tconst dimensionsChangeSubscription = Dimensions.addEventListener(\n\t\t\t'change',\n\t\t\tonLayout\n\t\t);\n\t\tonLayout();\n\t\treturn () => {\n\t\t\tdimensionsChangeSubscription.remove();\n\t\t};\n\t}, [] );\n\n\tfunction calculateItemWidth() {\n\t\tconst { paddingLeft: itemPaddingLeft, paddingRight: itemPaddingRight } =\n\t\t\tInserterButton.Styles.modalItem;\n\t\tconst { width } = InserterButton.Styles.modalIconWrapper;\n\t\treturn width + itemPaddingLeft + itemPaddingRight;\n\t}\n\n\tfunction onLayout() {\n\t\tconst columnStyle = styles[ 'block-types-list__column' ];\n\t\tconst sumLeftRightPadding =\n\t\t\tcolumnStyle.paddingLeft + columnStyle.paddingRight;\n\n\t\tconst bottomSheetWidth = BottomSheet.getWidth();\n\t\tconst containerTotalWidth = bottomSheetWidth - sumLeftRightPadding;\n\t\tconst itemTotalWidth = calculateItemWidth();\n\n\t\tconst columnsFitToWidth = Math.floor(\n\t\t\tcontainerTotalWidth / itemTotalWidth\n\t\t);\n\n\t\tconst numColumns = Math.max( MIN_COL_NUM, columnsFitToWidth );\n\n\t\tsetNumberOfColumns( numColumns );\n\t\tsetMaxWidth( containerTotalWidth / numColumns );\n\n\t\tif ( columnsFitToWidth < MIN_COL_NUM ) {\n\t\t\tconst updatedItemWidth =\n\t\t\t\t( bottomSheetWidth - 2 * sumLeftRightPadding ) / MIN_COL_NUM;\n\t\t\tsetItemWidth( updatedItemWidth );\n\t\t}\n\t}\n\n\tconst contentContainerStyle = StyleSheet.flatten(\n\t\tlistProps.contentContainerStyle\n\t);\n\n\tconst renderSection = ( { item } ) => {\n\t\treturn (\n\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t<FlatList\n\t\t\t\t\tdata={ item.list }\n\t\t\t\t\tkey={ `InserterUI-${ name }-${ numberOfColumns }` } // Re-render when numberOfColumns changes.\n\t\t\t\t\tnumColumns={ numberOfColumns }\n\t\t\t\t\tItemSeparatorComponent={ () => (\n\t\t\t\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\tstyles[ 'block-types-list__row-separator' ]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</TouchableWithoutFeedback>\n\t\t\t\t\t) }\n\t\t\t\t\tscrollEnabled={ false }\n\t\t\t\t\trenderItem={ renderListItem }\n\t\t\t\t/>\n\t\t\t</TouchableWithoutFeedback>\n\t\t);\n\t};\n\n\tconst renderListItem = ( { item } ) => {\n\t\treturn (\n\t\t\t<InserterButton\n\t\t\t\titem={ item }\n\t\t\t\titemWidth={ itemWidth }\n\t\t\t\tmaxWidth={ maxWidth }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t/>\n\t\t);\n\t};\n\n\tconst colorScheme = usePreferredColorScheme();\n\tconst sectionHeaderGradientValue =\n\t\tcolorScheme === 'light'\n\t\t\t? 'linear-gradient(#fff 70%, rgba(255, 255, 255, 0))'\n\t\t\t: 'linear-gradient(#2e2e2e 70%, rgba(46, 46, 46, 0))';\n\tconst sectionHeaderTitleStyles = usePreferredColorSchemeStyle(\n\t\tstyles[ 'block-types-list__section-header-title' ],\n\t\tstyles[ 'block-types-list__section-header-title--dark' ]\n\t);\n\n\tconst renderSectionHeader = ( { section: { metadata } } ) => {\n\t\tif ( ! metadata?.icon || ! metadata?.title ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t<Gradient\n\t\t\t\t\tgradientValue={ sectionHeaderGradientValue }\n\t\t\t\t\tstyle={ styles[ 'block-types-list__section-header' ] }\n\t\t\t\t>\n\t\t\t\t\t{ metadata?.icon }\n\t\t\t\t\t<Text style={ sectionHeaderTitleStyles }>\n\t\t\t\t\t\t{ metadata?.title }\n\t\t\t\t\t</Text>\n\t\t\t\t</Gradient>\n\t\t\t</TouchableWithoutFeedback>\n\t\t);\n\t};\n\n\treturn (\n\t\t<SectionList\n\t\t\tonLayout={ onLayout }\n\t\t\ttestID={ `InserterUI-${ name }` }\n\t\t\taccessibilityLabel={ label }\n\t\t\tkeyboardShouldPersistTaps=\"always\"\n\t\t\tsections={ sections }\n\t\t\tinitialNumToRender={ initialNumToRender }\n\t\t\trenderItem={ renderSection }\n\t\t\trenderSectionHeader={ renderSectionHeader }\n\t\t\t{ ...listProps }\n\t\t\tcontentContainerStyle={ {\n\t\t\t\t...contentContainerStyle,\n\t\t\t\tpaddingBottom: Math.max(\n\t\t\t\t\tlistProps.safeAreaBottomInset,\n\t\t\t\t\tcontentContainerStyle.paddingBottom\n\t\t\t\t),\n\t\t\t} }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,UAAU,EACVC,QAAQ,EACRC,WAAW,EACXC,UAAU,EACVC,IAAI,EACJC,wBAAwB,EACxBC,IAAI,QACE,cAAc;;AAErB;AACA;AACA;AACA,SAASC,QAAQ,EAAEC,SAAS,QAAQ,oBAA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B,EAAGA,mBAAqB;IAAA,GACtClD,SAAS;IACdiC,qBAAqB,EAAG;MACvB,GAAGA,qBAAqB;MACxB0B,aAAa,EAAE/B,IAAI,CAACG,GAAG,CACtB/B,SAAS,CAAC4D,mBAAmB,EAC7B3B,qBAAqB,CAAC0B,aACvB;IACD;EAAG,CACH,CAAC;AAEJ","ignoreList":[]}
@@ -13,7 +13,7 @@ import { layout } from '@wordpress/icons';
13
13
  function BlockVariationPicker({
14
14
  icon = layout,
15
15
  label = __('Choose variation'),
16
- instructions = __('Select a variation to start with.'),
16
+ instructions = __('Select a variation to start with:'),
17
17
  variations,
18
18
  onSelect,
19
19
  allowSkip
@@ -33,7 +33,8 @@ function BlockVariationPicker({
33
33
  }, variations.map(variation => createElement("li", {
34
34
  key: variation.name
35
35
  }, createElement(Button, {
36
- variant: "secondary",
36
+ __next40pxDefaultSize: true,
37
+ variant: "tertiary",
37
38
  icon: variation.icon && variation.icon.src ? variation.icon.src : variation.icon,
38
39
  iconSize: 48,
39
40
  onClick: () => onSelect(variation),
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","__","Button","Placeholder","layout","BlockVariationPicker","icon","label","instructions","variations","onSelect","allowSkip","classes","length","createElement","className","role","map","variation","key","name","variant","src","iconSize","onClick","description","title"],"sources":["@wordpress/block-editor/src/components/block-variation-picker/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button, Placeholder } from '@wordpress/components';\nimport { layout } from '@wordpress/icons';\n\nfunction BlockVariationPicker( {\n\ticon = layout,\n\tlabel = __( 'Choose variation' ),\n\tinstructions = __( 'Select a variation to start with.' ),\n\tvariations,\n\tonSelect,\n\tallowSkip,\n} ) {\n\tconst classes = classnames( 'block-editor-block-variation-picker', {\n\t\t'has-many-variations': variations.length > 4,\n\t} );\n\n\treturn (\n\t\t<Placeholder\n\t\t\ticon={ icon }\n\t\t\tlabel={ label }\n\t\t\tinstructions={ instructions }\n\t\t\tclassName={ classes }\n\t\t>\n\t\t\t{ /*\n\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t */\n\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t<ul\n\t\t\t\tclassName=\"block-editor-block-variation-picker__variations\"\n\t\t\t\trole=\"list\"\n\t\t\t\taria-label={ __( 'Block variations' ) }\n\t\t\t>\n\t\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t\t<li key={ variation.name }>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\tvariation.icon && variation.icon.src\n\t\t\t\t\t\t\t\t\t? variation.icon.src\n\t\t\t\t\t\t\t\t\t: variation.icon\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticonSize={ 48 }\n\t\t\t\t\t\t\tonClick={ () => onSelect( variation ) }\n\t\t\t\t\t\t\tclassName=\"block-editor-block-variation-picker__variation\"\n\t\t\t\t\t\t\tlabel={ variation.description || variation.title }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span className=\"block-editor-block-variation-picker__variation-label\">\n\t\t\t\t\t\t\t{ variation.title }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</li>\n\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t{ allowSkip && (\n\t\t\t\t<div className=\"block-editor-block-variation-picker__skip\">\n\t\t\t\t\t<Button variant=\"link\" onClick={ () => onSelect() }>\n\t\t\t\t\t\t{ __( 'Skip' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</Placeholder>\n\t);\n}\n\nexport default BlockVariationPicker;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,S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C,EAEHf,SAAS,IACVG,aAAA;IAAKC,SAAS,EAAC;EAA2C,GACzDD,aAAA,CAACZ,MAAM;IAACmB,OAAO,EAAC,MAAM;IAACG,OAAO,EAAGA,CAAA,KAAMd,QAAQ,CAAC;EAAG,GAChDT,EAAE,CAAE,MAAO,CACN,CACJ,CAEM,CAAC;AAEhB;AAEA,eAAeI,oBAAoB"}
1
+ {"version":3,"names":["classnames","__","Button","Placeholder","layout","BlockVariationPicker","icon","label","instructions","variations","onSelect","allowSkip","classes","length","createElement","className","role","map","variation","key","name","__next40pxDefaultSize","variant","src","iconSize","onClick","description","title"],"sources":["@wordpress/block-editor/src/components/block-variation-picker/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button, Placeholder } from '@wordpress/components';\nimport { layout } from '@wordpress/icons';\n\nfunction BlockVariationPicker( {\n\ticon = layout,\n\tlabel = __( 'Choose variation' ),\n\tinstructions = __( 'Select a variation to start with:' ),\n\tvariations,\n\tonSelect,\n\tallowSkip,\n} ) {\n\tconst classes = classnames( 'block-editor-block-variation-picker', {\n\t\t'has-many-variations': variations.length > 4,\n\t} );\n\n\treturn (\n\t\t<Placeholder\n\t\t\ticon={ icon }\n\t\t\tlabel={ label }\n\t\t\tinstructions={ instructions }\n\t\t\tclassName={ classes }\n\t\t>\n\t\t\t{ /*\n\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t */\n\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t<ul\n\t\t\t\tclassName=\"block-editor-block-variation-picker__variations\"\n\t\t\t\trole=\"list\"\n\t\t\t\taria-label={ __( 'Block variations' ) }\n\t\t\t>\n\t\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t\t<li key={ variation.name }>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\tvariation.icon && variation.icon.src\n\t\t\t\t\t\t\t\t\t? variation.icon.src\n\t\t\t\t\t\t\t\t\t: variation.icon\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticonSize={ 48 }\n\t\t\t\t\t\t\tonClick={ () => onSelect( variation ) }\n\t\t\t\t\t\t\tclassName=\"block-editor-block-variation-picker__variation\"\n\t\t\t\t\t\t\tlabel={ variation.description || variation.title }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span className=\"block-editor-block-variation-picker__variation-label\">\n\t\t\t\t\t\t\t{ variation.title }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</li>\n\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t{ allowSkip && (\n\t\t\t\t<div className=\"block-editor-block-variation-picker__skip\">\n\t\t\t\t\t<Button variant=\"link\" onClick={ () => onSelect() }>\n\t\t\t\t\t\t{ __( 'Skip' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</Placeholder>\n\t);\n}\n\nexport default BlockVariationPicker;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,EAAEC,WAAW,QAAQ,uBAAuB;AAC3D,SAASC,MAAM,QAAQ,kBAAkB;AAEzC,SAASC,oBAAoBA,CAAE;EAC9BC,IAAI,GAAGF,MAAM;EACbG,KAAK,GAAGN,EAAE,CAAE,kBAAmB,CAAC;EAChCO,YAAY,GAAGP,EAAE,CAAE,mCAAoC,CAAC;EACxDQ,UAAU;EACVC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,MAAMC,OAAO,GAAGZ,UAAU,CAAE,qCAAqC,EAAE;IAClE,qBAAqB,EAAES,UAAU,CAACI,MAAM,GAAG;EAC5C,CAAE,CAAC;EAEH,OACCC,aAAA,CAACX,WAAW;IACXG,IAAI,EAAGA,IAAM;IACbC,KAAK,EAAGA,KAAO;IACfC,YAAY,EAAGA,YAAc;IAC7BO,SAAS,EAAGH;EAAS,GAOrBE,aAAA;IACCC,SAAS,EAAC,iDAAiD;IAC3DC,IAAI,EAAC,MAAM;IACX,cAAaf,EAAE,CAAE,kBAAmB;EAAG,GAErCQ,UAAU,CAACQ,GAAG,CAAIC,SAAS,IAC5BJ,aAAA;IAAIK,GAAG,EAAGD,SAAS,CAACE;EAAM,GACzBN,aAAA,CAACZ,MAAM;IACNmB,qBAAqB;IACrBC,OAAO,EAAC,UAAU;IAClBhB,IAAI,EACHY,SAAS,CAACZ,IAAI,IAAIY,SAAS,CAACZ,IAAI,CAACiB,GAAG,GACjCL,SAAS,CAACZ,IAAI,CAACiB,GAAG,GAClBL,SAAS,CAACZ,IACb;IACDkB,QAAQ,EAAG,EAAI;IACfC,OAAO,EAAGA,CAAA,KAAMf,QAAQ,CAAEQ,SAAU,CAAG;IACvCH,SAAS,EAAC,gDAAgD;IAC1DR,KAAK,EAAGW,SAAS,CAACQ,WAAW,IAAIR,SAAS,CAACS;EAAO,CAClD,CAAC,EACFb,aAAA;IAAMC,SAAS,EAAC;EAAsD,GACnEG,SAAS,CAACS,KACP,CACH,CACH,CACC,CAAC,EAEHhB,SAAS,IACVG,aAAA;IAAKC,SAAS,EAAC;EAA2C,GACzDD,aAAA,CAACZ,MAAM;IAACoB,OAAO,EAAC,MAAM;IAACG,OAAO,EAAGA,CAAA,KAAMf,QAAQ,CAAC;EAAG,GAChDT,EAAE,CAAE,MAAO,CACN,CACJ,CAEM,CAAC;AAEhB;AAEA,eAAeI,oBAAoB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["ScrollView","View","Text","TouchableWithoutFeedback","Platform","useDispatch","usePreferredColorSchemeStyle","createBlocksFromInnerBlocksTemplate","__","PanelBody","BottomSheet","FooterMessageControl","Icon","close","styles","store","blockEditorStore","InserterButton","hitSlop","top","bottom","left","right","BlockVariationPicker","isVisible","onClose","clientId","variations","replaceInnerBlocks","isIOS","OS","cancelButtonStyle","cancelButton","cancelButtonDark","leftButton","createElement","onPress","style","maxFontSizeMultiplier","icon","size","closeIcon","onVariationSelect","variation","innerBlocks","title","contentStyle","testID","horizontal","showsHorizontalScrollIndicator","contentContainerStyle","containerStyle","map","v","item","key","name","onSelect","label"],"sources":["@wordpress/block-editor/src/components/block-variation-picker/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tScrollView,\n\tView,\n\tText,\n\tTouchableWithoutFeedback,\n\tPlatform,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\nimport { createBlocksFromInnerBlocksTemplate } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tPanelBody,\n\tBottomSheet,\n\tFooterMessageControl,\n} from '@wordpress/components';\nimport { Icon, close } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport { store as blockEditorStore } from '../../store';\nimport InserterButton from '../inserter-button';\n\nconst hitSlop = { top: 22, bottom: 22, left: 22, right: 22 };\n\nfunction BlockVariationPicker( { isVisible, onClose, clientId, variations } ) {\n\tconst { replaceInnerBlocks } = useDispatch( blockEditorStore );\n\tconst isIOS = Platform.OS === 'ios';\n\n\tconst cancelButtonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.cancelButton,\n\t\tstyles.cancelButtonDark\n\t);\n\n\tconst leftButton = (\n\t\t<TouchableWithoutFeedback onPress={ onClose } hitSlop={ hitSlop }>\n\t\t\t<View>\n\t\t\t\t{ isIOS ? (\n\t\t\t\t\t<Text\n\t\t\t\t\t\tstyle={ cancelButtonStyle }\n\t\t\t\t\t\tmaxFontSizeMultiplier={ 2 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Text>\n\t\t\t\t) : (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\tstyle={ styles.closeIcon }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</View>\n\t\t</TouchableWithoutFeedback>\n\t);\n\n\tconst onVariationSelect = ( variation ) => {\n\t\treplaceInnerBlocks(\n\t\t\tclientId,\n\t\t\tcreateBlocksFromInnerBlocksTemplate( variation.innerBlocks )\n\t\t);\n\t\tonClose();\n\t};\n\n\treturn (\n\t\t<BottomSheet\n\t\t\tisVisible={ isVisible }\n\t\t\tonClose={ onClose }\n\t\t\ttitle={ __( 'Select a layout' ) }\n\t\t\tcontentStyle={ styles.contentStyle }\n\t\t\tleftButton={ leftButton }\n\t\t\ttestID=\"block-variation-modal\"\n\t\t>\n\t\t\t<ScrollView\n\t\t\t\thorizontal\n\t\t\t\tshowsHorizontalScrollIndicator={ false }\n\t\t\t\tcontentContainerStyle={ styles.contentContainerStyle }\n\t\t\t\tstyle={ styles.containerStyle }\n\t\t\t>\n\t\t\t\t{ variations.map( ( v ) => (\n\t\t\t\t\t<InserterButton\n\t\t\t\t\t\titem={ v }\n\t\t\t\t\t\tkey={ v.name }\n\t\t\t\t\t\tonSelect={ () => onVariationSelect( v ) }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ScrollView>\n\t\t\t<PanelBody>\n\t\t\t\t<FooterMessageControl\n\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t'Note: Column layout may vary between themes and screen sizes'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</BottomSheet>\n\t);\n}\n\nexport default BlockVariationPicker;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,UAAU,EACVC,IAAI,EACJC,IAAI,EACJC,wBAAwB,EACxBC,QAAQ,QACF,cAAc;;AAErB;A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B,CAEG,CACmB,CAC1B;EAED,MAAMC,iBAAiB,GAAKC,SAAS,IAAM;IAC1Cf,kBAAkB,CACjBF,QAAQ,EACRnB,mCAAmC,CAAEoC,SAAS,CAACC,WAAY,CAC5D,CAAC;IACDnB,OAAO,CAAC,CAAC;EACV,CAAC;EAED,OACCU,aAAA,CAACzB,WAAW;IACXc,SAAS,EAAGA,SAAW;IACvBC,OAAO,EAAGA,OAAS;IACnBoB,KAAK,EAAGrC,EAAE,CAAE,iBAAkB,CAAG;IACjCsC,YAAY,EAAGhC,MAAM,CAACgC,YAAc;IACpCZ,UAAU,EAAGA,UAAY;IACzBa,MAAM,EAAC;EAAuB,GAE9BZ,aAAA,CAACnC,UAAU;IACVgD,UAAU;IACVC,8BAA8B,EAAG,KAAO;IACxCC,qBAAqB,EAAGpC,MAAM,CAACoC,qBAAuB;IACtDb,KAAK,EAAGvB,MAAM,CAACqC;EAAgB,GAE7BxB,UAAU,CAACyB,GAAG,CAAIC,CAAC,IACpBlB,aAAA,CAAClB,cAAc;IACdqC,IAAI,EAAGD,CAAG;IACVE,GAAG,EAAGF,CAAC,CAACG,IAAM;IACdC,QAAQ,EAAGA,CAAA,KAAMf,iBAAiB,CAAEW,CAAE;EAAG,CACzC,CACA,CACS,CAAC,EACblB,aAAA,CAAC1B,SAAS,QACT0B,aAAA,CAACxB,oBAAoB;IACpB+C,KAAK,EAAGlD,EAAE,CACT,8DACD;EAAG,CACH,CACS,CACC,CAAC;AAEhB;AAEA,eAAee,oBAAoB"}
1
+ {"version":3,"names":["ScrollView","View","Text","TouchableWithoutFeedback","Platform","useDispatch","usePreferredColorSchemeStyle","createBlocksFromInnerBlocksTemplate","__","PanelBody","BottomSheet","FooterMessageControl","Icon","close","styles","store","blockEditorStore","InserterButton","hitSlop","top","bottom","left","right","BlockVariationPicker","isVisible","onClose","clientId","variations","replaceInnerBlocks","isIOS","OS","cancelButtonStyle","cancelButton","cancelButtonDark","leftButton","createElement","onPress","style","maxFontSizeMultiplier","icon","size","closeIcon","onVariationSelect","variation","innerBlocks","title","contentStyle","testID","horizontal","showsHorizontalScrollIndicator","contentContainerStyle","containerStyle","map","v","item","key","name","onSelect","label"],"sources":["@wordpress/block-editor/src/components/block-variation-picker/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tScrollView,\n\tView,\n\tText,\n\tTouchableWithoutFeedback,\n\tPlatform,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\nimport { createBlocksFromInnerBlocksTemplate } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tPanelBody,\n\tBottomSheet,\n\tFooterMessageControl,\n} from '@wordpress/components';\nimport { Icon, close } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport { store as blockEditorStore } from '../../store';\nimport InserterButton from '../inserter-button';\n\nconst hitSlop = { top: 22, bottom: 22, left: 22, right: 22 };\n\nfunction BlockVariationPicker( { isVisible, onClose, clientId, variations } ) {\n\tconst { replaceInnerBlocks } = useDispatch( blockEditorStore );\n\tconst isIOS = Platform.OS === 'ios';\n\n\tconst cancelButtonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.cancelButton,\n\t\tstyles.cancelButtonDark\n\t);\n\n\tconst leftButton = (\n\t\t<TouchableWithoutFeedback onPress={ onClose } hitSlop={ hitSlop }>\n\t\t\t<View>\n\t\t\t\t{ isIOS ? (\n\t\t\t\t\t<Text\n\t\t\t\t\t\tstyle={ cancelButtonStyle }\n\t\t\t\t\t\tmaxFontSizeMultiplier={ 2 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Text>\n\t\t\t\t) : (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\tstyle={ styles.closeIcon }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</View>\n\t\t</TouchableWithoutFeedback>\n\t);\n\n\tconst onVariationSelect = ( variation ) => {\n\t\treplaceInnerBlocks(\n\t\t\tclientId,\n\t\t\tcreateBlocksFromInnerBlocksTemplate( variation.innerBlocks )\n\t\t);\n\t\tonClose();\n\t};\n\n\treturn (\n\t\t<BottomSheet\n\t\t\tisVisible={ isVisible }\n\t\t\tonClose={ onClose }\n\t\t\ttitle={ __( 'Select a layout' ) }\n\t\t\tcontentStyle={ styles.contentStyle }\n\t\t\tleftButton={ leftButton }\n\t\t\ttestID=\"block-variation-modal\"\n\t\t>\n\t\t\t<ScrollView\n\t\t\t\thorizontal\n\t\t\t\tshowsHorizontalScrollIndicator={ false }\n\t\t\t\tcontentContainerStyle={ styles.contentContainerStyle }\n\t\t\t\tstyle={ styles.containerStyle }\n\t\t\t>\n\t\t\t\t{ variations.map( ( v ) => (\n\t\t\t\t\t<InserterButton\n\t\t\t\t\t\titem={ v }\n\t\t\t\t\t\tkey={ v.name }\n\t\t\t\t\t\tonSelect={ () => onVariationSelect( v ) }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ScrollView>\n\t\t\t<PanelBody>\n\t\t\t\t<FooterMessageControl\n\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t'Note: Column layout may vary between themes and screen sizes'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</BottomSheet>\n\t);\n}\n\nexport default BlockVariationPicker;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,UAAU,EACVC,IAAI,EACJC,IAAI,EACJC,wBAAwB,EACxBC,QAAQ,QACF,cAAc;;AAErB;AACA;AACA;AACA,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,4BAA4B,QAAQ,oBAAoB;AACjE,SAASC,mCAAmC,QAAQ,mBAAmB;AACvE,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,SAAS,EACTC,WAAW,EACXC,oBAAoB,Q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U,aAAA,CAACzB,WAAW;IACXc,SAAS,EAAGA,SAAW;IACvBC,OAAO,EAAGA,OAAS;IACnBoB,KAAK,EAAGrC,EAAE,CAAE,iBAAkB,CAAG;IACjCsC,YAAY,EAAGhC,MAAM,CAACgC,YAAc;IACpCZ,UAAU,EAAGA,UAAY;IACzBa,MAAM,EAAC;EAAuB,GAE9BZ,aAAA,CAACnC,UAAU;IACVgD,UAAU;IACVC,8BAA8B,EAAG,KAAO;IACxCC,qBAAqB,EAAGpC,MAAM,CAACoC,qBAAuB;IACtDb,KAAK,EAAGvB,MAAM,CAACqC;EAAgB,GAE7BxB,UAAU,CAACyB,GAAG,CAAIC,CAAC,IACpBlB,aAAA,CAAClB,cAAc;IACdqC,IAAI,EAAGD,CAAG;IACVE,GAAG,EAAGF,CAAC,CAACG,IAAM;IACdC,QAAQ,EAAGA,CAAA,KAAMf,iBAAiB,CAAEW,CAAE;EAAG,CACzC,CACA,CACS,CAAC,EACblB,aAAA,CAAC1B,SAAS,QACT0B,aAAA,CAACxB,oBAAoB;IACpB+C,KAAK,EAAGlD,EAAE,CACT,8DACD;EAAG,CACH,CACS,CACC,CAAC;AAEhB;AAEA,eAAee,oBAAoB","ignoreList":[]}
@@ -90,7 +90,10 @@ function VariationsToggleGroupControl({
90
90
  __nextHasNoMarginBottom: true
91
91
  }, variations.map(variation => createElement(ToggleGroupControlOptionIcon, {
92
92
  key: variation.name,
93
- icon: variation.icon,
93
+ icon: createElement(BlockIcon, {
94
+ icon: variation.icon,
95
+ showColors: true
96
+ }),
94
97
  value: variation.name,
95
98
  label: selectedValue === variation.name ? variation.title : sprintf( /* translators: %s: Name of the block variation */
96
99
  __('Transform to %s'), variation.title)
@@ -144,7 +147,9 @@ function __experimentalBlockVariationTransforms({
144
147
  };
145
148
 
146
149
  // Skip rendering if there are no variations
147
- if (!variations?.length) return null;
150
+ if (!variations?.length) {
151
+ return null;
152
+ }
148
153
  const baseClass = 'block-editor-block-variation-transforms';
149
154
 
150
155
  // Show buttons if there are more than 5 variations because the ToggleGroupControl does not wrap
@@ -1 +1 @@
1
- {"version":3,"names":["store","blocksStore","__","sprintf","Button","DropdownMenu","MenuGroup","MenuItemsChoice","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOptionIcon","ToggleGroupControlOptionIcon","VisuallyHidden","useSelect","useDispatch","useMemo","chevronDown","BlockIcon","blockEditorStore","VariationsButtons","className","onSelectVariation","selectedValue","variations","createElement","as","map","variation","key","name","icon","showColors","isPressed","label","title","onClick","showTooltip","VariationsDropdown","selectOptions","description","value","info","text","popoverProps","position","toggleProps","iconPosition","choices","onSelect","VariationsToggleGroupControl","hideLabelFromVision","onChange","__next40pxDefaultSize","__nextHasNoMarginBottom","__experimentalBlockVariationTransforms","blockClientId","updateBlockAttributes","activeBlockVariation","select","getActiveBlockVariation","getBlockVariations","getBlockName","getBlockAttributes","hasUniqueIcons","variationIcons","Set","forEach","add","src","size","length","variationName","find","attributes","baseClass","showButtons","ButtonComponent","Component"],"sources":["@wordpress/block-editor/src/components/block-variation-transforms/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItemsChoice,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport { store as blockEditorStore } from '../../store';\n\nfunction VariationsButtons( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\treturn (\n\t\t<fieldset className={ className }>\n\t\t\t<VisuallyHidden as=\"legend\">\n\t\t\t\t{ __( 'Transform to variation' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t<Button\n\t\t\t\t\tkey={ variation.name }\n\t\t\t\t\ticon={ <BlockIcon icon={ variation.icon } showColors /> }\n\t\t\t\t\tisPressed={ selectedValue === variation.name }\n\t\t\t\t\tlabel={\n\t\t\t\t\t\tselectedValue === variation.name\n\t\t\t\t\t\t\t? variation.title\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %s: Name of the block variation */\n\t\t\t\t\t\t\t\t\t__( 'Transform to %s' ),\n\t\t\t\t\t\t\t\t\tvariation.title\n\t\t\t\t\t\t\t )\n\t\t\t\t\t}\n\t\t\t\t\tonClick={ () => onSelectVariation( variation.name ) }\n\t\t\t\t\taria-label={ variation.title }\n\t\t\t\t\tshowTooltip\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</fieldset>\n\t);\n}\n\nfunction VariationsDropdown( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\tconst selectOptions = variations.map(\n\t\t( { name, title, description } ) => ( {\n\t\t\tvalue: name,\n\t\t\tlabel: title,\n\t\t\tinfo: description,\n\t\t} )\n\t);\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\tclassName={ className }\n\t\t\tlabel={ __( 'Transform to variation' ) }\n\t\t\ttext={ __( 'Transform to variation' ) }\n\t\t\tpopoverProps={ {\n\t\t\t\tposition: 'bottom center',\n\t\t\t\tclassName: `${ className }__popover`,\n\t\t\t} }\n\t\t\ticon={ chevronDown }\n\t\t\ttoggleProps={ { iconPosition: 'right' } }\n\t\t>\n\t\t\t{ () => (\n\t\t\t\t<div className={ `${ className }__container` }>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\tchoices={ selectOptions }\n\t\t\t\t\t\t\tvalue={ selectedValue }\n\t\t\t\t\t\t\tonSelect={ onSelectVariation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n\nfunction VariationsToggleGroupControl( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\treturn (\n\t\t<div className={ className }>\n\t\t\t<ToggleGroupControl\n\t\t\t\tlabel={ __( 'Transform to variation' ) }\n\t\t\t\tvalue={ selectedValue }\n\t\t\t\thideLabelFromVision\n\t\t\t\tonChange={ onSelectVariation }\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t>\n\t\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\t\t\tkey={ variation.name }\n\t\t\t\t\t\ticon={ variation.icon }\n\t\t\t\t\t\tvalue={ variation.name }\n\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\tselectedValue === variation.name\n\t\t\t\t\t\t\t\t? variation.title\n\t\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: %s: Name of the block variation */\n\t\t\t\t\t\t\t\t\t\t__( 'Transform to %s' ),\n\t\t\t\t\t\t\t\t\t\tvariation.title\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ToggleGroupControl>\n\t\t</div>\n\t);\n}\n\nfunction __experimentalBlockVariationTransforms( { blockClientId } ) {\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { activeBlockVariation, variations } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getActiveBlockVariation, getBlockVariations } =\n\t\t\t\tselect( blocksStore );\n\t\t\tconst { getBlockName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst name = blockClientId && getBlockName( blockClientId );\n\t\t\treturn {\n\t\t\t\tactiveBlockVariation: getActiveBlockVariation(\n\t\t\t\t\tname,\n\t\t\t\t\tgetBlockAttributes( blockClientId )\n\t\t\t\t),\n\t\t\t\tvariations: name && getBlockVariations( name, 'transform' ),\n\t\t\t};\n\t\t},\n\t\t[ blockClientId ]\n\t);\n\n\tconst selectedValue = activeBlockVariation?.name;\n\n\t// Check if each variation has a unique icon.\n\tconst hasUniqueIcons = useMemo( () => {\n\t\tconst variationIcons = new Set();\n\t\tif ( ! variations ) {\n\t\t\treturn false;\n\t\t}\n\t\tvariations.forEach( ( variation ) => {\n\t\t\tif ( variation.icon ) {\n\t\t\t\tvariationIcons.add( variation.icon?.src || variation.icon );\n\t\t\t}\n\t\t} );\n\t\treturn variationIcons.size === variations.length;\n\t}, [ variations ] );\n\n\tconst onSelectVariation = ( variationName ) => {\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\t...variations.find( ( { name } ) => name === variationName )\n\t\t\t\t.attributes,\n\t\t} );\n\t};\n\n\t// Skip rendering if there are no variations\n\tif ( ! variations?.length ) return null;\n\n\tconst baseClass = 'block-editor-block-variation-transforms';\n\n\t// Show buttons if there are more than 5 variations because the ToggleGroupControl does not wrap\n\tconst showButtons = variations.length > 5;\n\n\tconst ButtonComponent = showButtons\n\t\t? VariationsButtons\n\t\t: VariationsToggleGroupControl;\n\n\tconst Component = hasUniqueIcons ? ButtonComponent : VariationsDropdown;\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={ baseClass }\n\t\t\tonSelectVariation={ onSelectVariation }\n\t\t\tselectedValue={ selectedValue }\n\t\t\tvariations={ variations }\n\t\t/>\n\t);\n}\n\nexport default __experimentalBlockVariationTransforms;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SACCC,MAAM,EACNC,YAAY,EACZC,SAAS,EACTC,eAAe,EACfC,gCAAgC,IAAIC,kBAAkB,EACtDC,0CAA0C,IAAIC,4BAA4B,EAC1EC,cAAc,QACR,uBAAuB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9C,UAAU,CAAC+C,MAAM;EACjD,CAAC,EAAE,CAAE/C,UAAU,CAAG,CAAC;EAEnB,MAAMF,iBAAiB,GAAKkD,aAAa,IAAM;IAC9Cf,qBAAqB,CAAED,aAAa,EAAE;MACrC,GAAGhC,UAAU,CAACiD,IAAI,CAAE,CAAE;QAAE3C;MAAK,CAAC,KAAMA,IAAI,KAAK0C,aAAc,CAAC,CAC1DE;IACH,CAAE,CAAC;EACJ,CAAC;;EAED;EACA,IAAK,CAAElD,UAAU,EAAE+C,MAAM,EAAG,OAAO,IAAI;EAEvC,MAAMI,SAAS,GAAG,yCAAyC;;EAE3D;EACA,MAAMC,WAAW,GAAGpD,UAAU,CAAC+C,MAAM,GAAG,CAAC;EAEzC,MAAMM,eAAe,GAAGD,WAAW,GAChCxD,iBAAiB,GACjB8B,4BAA4B;EAE/B,MAAM4B,SAAS,GAAGd,cAAc,GAAGa,eAAe,GAAGvC,kBAAkB;EAEvE,OACCb,aAAA,CAACqD,SAAS;IACTzD,SAAS,EAAGsD,SAAW;IACvBrD,iBAAiB,EAAGA,iBAAmB;IACvCC,aAAa,EAAGA,aAAe;IAC/BC,UAAU,EAAGA;EAAY,CACzB,CAAC;AAEJ;AAEA,eAAe+B,sCAAsC"}
1
+ {"version":3,"names":["store","blocksStore","__","sprintf","Button","DropdownMenu","MenuGroup","MenuItemsChoice","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOptionIcon","ToggleGroupControlOptionIcon","VisuallyHidden","useSelect","useDispatch","useMemo","chevronDown","BlockIcon","blockEditorStore","VariationsButtons","className","onSelectVariation","selectedValue","variations","createElement","as","map","variation","key","name","icon","showColors","isPressed","label","title","onClick","showTooltip","VariationsDropdown","selectOptions","description","value","info","text","popoverProps","position","toggleProps","iconPosition","choices","onSelect","VariationsToggleGroupControl","hideLabelFromVision","onChange","__next40pxDefaultSize","__nextHasNoMarginBottom","__experimentalBlockVariationTransforms","blockClientId","updateBlockAttributes","activeBlockVariation","select","getActiveBlockVariation","getBlockVariations","getBlockName","getBlockAttributes","hasUniqueIcons","variationIcons","Set","forEach","add","src","size","length","variationName","find","attributes","baseClass","showButtons","ButtonComponent","Component"],"sources":["@wordpress/block-editor/src/components/block-variation-transforms/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItemsChoice,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport { store as blockEditorStore } from '../../store';\n\nfunction VariationsButtons( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\treturn (\n\t\t<fieldset className={ className }>\n\t\t\t<VisuallyHidden as=\"legend\">\n\t\t\t\t{ __( 'Transform to variation' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t<Button\n\t\t\t\t\tkey={ variation.name }\n\t\t\t\t\ticon={ <BlockIcon icon={ variation.icon } showColors /> }\n\t\t\t\t\tisPressed={ selectedValue === variation.name }\n\t\t\t\t\tlabel={\n\t\t\t\t\t\tselectedValue === variation.name\n\t\t\t\t\t\t\t? variation.title\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %s: Name of the block variation */\n\t\t\t\t\t\t\t\t\t__( 'Transform to %s' ),\n\t\t\t\t\t\t\t\t\tvariation.title\n\t\t\t\t\t\t\t )\n\t\t\t\t\t}\n\t\t\t\t\tonClick={ () => onSelectVariation( variation.name ) }\n\t\t\t\t\taria-label={ variation.title }\n\t\t\t\t\tshowTooltip\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</fieldset>\n\t);\n}\n\nfunction VariationsDropdown( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\tconst selectOptions = variations.map(\n\t\t( { name, title, description } ) => ( {\n\t\t\tvalue: name,\n\t\t\tlabel: title,\n\t\t\tinfo: description,\n\t\t} )\n\t);\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\tclassName={ className }\n\t\t\tlabel={ __( 'Transform to variation' ) }\n\t\t\ttext={ __( 'Transform to variation' ) }\n\t\t\tpopoverProps={ {\n\t\t\t\tposition: 'bottom center',\n\t\t\t\tclassName: `${ className }__popover`,\n\t\t\t} }\n\t\t\ticon={ chevronDown }\n\t\t\ttoggleProps={ { iconPosition: 'right' } }\n\t\t>\n\t\t\t{ () => (\n\t\t\t\t<div className={ `${ className }__container` }>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\tchoices={ selectOptions }\n\t\t\t\t\t\t\tvalue={ selectedValue }\n\t\t\t\t\t\t\tonSelect={ onSelectVariation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n\nfunction VariationsToggleGroupControl( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\treturn (\n\t\t<div className={ className }>\n\t\t\t<ToggleGroupControl\n\t\t\t\tlabel={ __( 'Transform to variation' ) }\n\t\t\t\tvalue={ selectedValue }\n\t\t\t\thideLabelFromVision\n\t\t\t\tonChange={ onSelectVariation }\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t>\n\t\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\t\t\tkey={ variation.name }\n\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t<BlockIcon icon={ variation.icon } showColors />\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue={ variation.name }\n\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\tselectedValue === variation.name\n\t\t\t\t\t\t\t\t? variation.title\n\t\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: %s: Name of the block variation */\n\t\t\t\t\t\t\t\t\t\t__( 'Transform to %s' ),\n\t\t\t\t\t\t\t\t\t\tvariation.title\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ToggleGroupControl>\n\t\t</div>\n\t);\n}\n\nfunction __experimentalBlockVariationTransforms( { blockClientId } ) {\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { activeBlockVariation, variations } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getActiveBlockVariation, getBlockVariations } =\n\t\t\t\tselect( blocksStore );\n\t\t\tconst { getBlockName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst name = blockClientId && getBlockName( blockClientId );\n\t\t\treturn {\n\t\t\t\tactiveBlockVariation: getActiveBlockVariation(\n\t\t\t\t\tname,\n\t\t\t\t\tgetBlockAttributes( blockClientId )\n\t\t\t\t),\n\t\t\t\tvariations: name && getBlockVariations( name, 'transform' ),\n\t\t\t};\n\t\t},\n\t\t[ blockClientId ]\n\t);\n\n\tconst selectedValue = activeBlockVariation?.name;\n\n\t// Check if each variation has a unique icon.\n\tconst hasUniqueIcons = useMemo( () => {\n\t\tconst variationIcons = new Set();\n\t\tif ( ! variations ) {\n\t\t\treturn false;\n\t\t}\n\t\tvariations.forEach( ( variation ) => {\n\t\t\tif ( variation.icon ) {\n\t\t\t\tvariationIcons.add( variation.icon?.src || variation.icon );\n\t\t\t}\n\t\t} );\n\t\treturn variationIcons.size === variations.length;\n\t}, [ variations ] );\n\n\tconst onSelectVariation = ( variationName ) => {\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\t...variations.find( ( { name } ) => name === variationName )\n\t\t\t\t.attributes,\n\t\t} );\n\t};\n\n\t// Skip rendering if there are no variations\n\tif ( ! variations?.length ) {\n\t\treturn null;\n\t}\n\n\tconst baseClass = 'block-editor-block-variation-transforms';\n\n\t// Show buttons if there are more than 5 variations because the ToggleGroupControl does not wrap\n\tconst showButtons = variations.length > 5;\n\n\tconst ButtonComponent = showButtons\n\t\t? VariationsButtons\n\t\t: VariationsToggleGroupControl;\n\n\tconst Component = hasUniqueIcons ? ButtonComponent : VariationsDropdown;\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={ baseClass }\n\t\t\tonSelectVariation={ onSelectVariation }\n\t\t\tselectedValue={ selectedValue }\n\t\t\tvariations={ variations }\n\t\t/>\n\t);\n}\n\nexport default __experimentalBlockVariationTransforms;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SACCC,MAAM,EACNC,YAAY,EACZC,SAAS,EACTC,eAAe,EACfC,gCAAgC,IAAIC,kBAAkB,EACtDC,0CAA0C,IAAIC,4BAA4B,EAC1EC,cAAc,QACR,uBAAuB;AAC9B,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,WAAW,QAAQ,kBAAkB;;AAE9C;AACA;AACA;AACA,OAAOC,SAAS,MAAM,eAAe;AACrC,SAASjB,KAAK,IAAIkB,gBAAgB,QAAQ,aAAa;AAEvD,SAASC,iBAAiBA,CAAE;EAC3BC,SAAS;EACTC,iBAAiB;EACjBC,aAAa;EACbC;AACD,CAAC,EAAG;EACH,OACCC,aAAA;IAAUJ,SAAS,EAAGA;EAAW,GAChCI,aAAA,CAACZ,cAAc;IAACa,EAAE,EAAC;EAAQ,GACxBvB,EAAE,CAAE,wBAAyB,CAChB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