@wordpress/block-editor 12.22.0 → 12.24.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 (1508) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +8 -0
  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.map +1 -1
  7. package/build/components/autocomplete/index.js.map +1 -1
  8. package/build/components/block-actions/index.js.map +1 -1
  9. package/build/components/block-alignment-control/constants.js.map +1 -1
  10. package/build/components/block-alignment-control/index.js.map +1 -1
  11. package/build/components/block-alignment-control/ui.js.map +1 -1
  12. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  13. package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
  14. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  15. package/build/components/block-bindings-toolbar-indicator/index.js.map +1 -1
  16. package/build/components/block-breadcrumb/index.js.map +1 -1
  17. package/build/components/block-canvas/index.js.map +1 -1
  18. package/build/components/block-caption/index.native.js.map +1 -1
  19. package/build/components/block-card/index.js.map +1 -1
  20. package/build/components/block-compare/block-view.js.map +1 -1
  21. package/build/components/block-compare/index.js.map +1 -1
  22. package/build/components/block-content-overlay/index.js.map +1 -1
  23. package/build/components/block-context/index.js.map +1 -1
  24. package/build/components/block-controls/fill.js.map +1 -1
  25. package/build/components/block-controls/groups.js.map +1 -1
  26. package/build/components/block-controls/hook.js.map +1 -1
  27. package/build/components/block-controls/index.js.map +1 -1
  28. package/build/components/block-controls/slot.js.map +1 -1
  29. package/build/components/block-controls/slot.native.js.map +1 -1
  30. package/build/components/block-controls/use-has-block-controls.js.map +1 -1
  31. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  32. package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
  33. package/build/components/block-draggable/dropping-insertion-point.native.js +1 -1
  34. package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  35. package/build/components/block-draggable/index.js.map +1 -1
  36. package/build/components/block-draggable/index.native.js +1 -1
  37. package/build/components/block-draggable/index.native.js.map +1 -1
  38. package/build/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
  39. package/build/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
  40. package/build/components/block-edit/context.js +2 -1
  41. package/build/components/block-edit/context.js.map +1 -1
  42. package/build/components/block-edit/edit.js.map +1 -1
  43. package/build/components/block-edit/edit.native.js.map +1 -1
  44. package/build/components/block-edit/index.js +4 -2
  45. package/build/components/block-edit/index.js.map +1 -1
  46. package/build/components/block-edit-visually-button/index.js.map +1 -1
  47. package/build/components/block-editing-mode/index.js.map +1 -1
  48. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  49. package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  50. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  51. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  52. package/build/components/block-icon/index.js.map +1 -1
  53. package/build/components/block-icon/index.native.js.map +1 -1
  54. package/build/components/block-info-slot-fill/index.js.map +1 -1
  55. package/build/components/block-inspector/index.js +5 -4
  56. package/build/components/block-inspector/index.js.map +1 -1
  57. package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  58. package/build/components/block-list/block-crash-boundary.js.map +1 -1
  59. package/build/components/block-list/block-crash-boundary.native.js.map +1 -1
  60. package/build/components/block-list/block-crash-warning.js.map +1 -1
  61. package/build/components/block-list/block-crash-warning.native.js.map +1 -1
  62. package/build/components/block-list/block-html.js.map +1 -1
  63. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  64. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  65. package/build/components/block-list/block-list-context.native.js.map +1 -1
  66. package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
  67. package/build/components/block-list/block-list-item.native.js.map +1 -1
  68. package/build/components/block-list/block-outline.native.js.map +1 -1
  69. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  70. package/build/components/block-list/block.js +55 -29
  71. package/build/components/block-list/block.js.map +1 -1
  72. package/build/components/block-list/block.native.js +2 -2
  73. package/build/components/block-list/block.native.js.map +1 -1
  74. package/build/components/block-list/grid-item.native.js.map +1 -1
  75. package/build/components/block-list/index.js +16 -5
  76. package/build/components/block-list/index.js.map +1 -1
  77. package/build/components/block-list/index.native.js.map +1 -1
  78. package/build/components/block-list/insertion-point.native.js.map +1 -1
  79. package/build/components/block-list/layout.js.map +1 -1
  80. package/build/components/block-list/private-block-context.js.map +1 -1
  81. package/build/components/block-list/subdirectory-icon.js.map +1 -1
  82. package/build/components/block-list/use-block-props/index.js +2 -1
  83. package/build/components/block-list/use-block-props/index.js.map +1 -1
  84. package/build/components/block-list/use-block-props/index.native.js.map +1 -1
  85. package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +1 -1
  86. package/build/components/block-list/use-block-props/use-block-refs.js.map +1 -1
  87. package/build/components/block-list/use-block-props/use-focus-first-element.js +3 -2
  88. package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  89. package/build/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
  90. package/build/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
  91. package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  92. package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
  93. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  94. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  95. package/build/components/block-list/use-scroll-upon-insertion.native.js.map +1 -1
  96. package/build/components/block-list-appender/index.js.map +1 -1
  97. package/build/components/block-list-appender/index.native.js.map +1 -1
  98. package/build/components/block-lock/index.js.map +1 -1
  99. package/build/components/block-lock/menu-item.js.map +1 -1
  100. package/build/components/block-lock/modal.js.map +1 -1
  101. package/build/components/block-lock/toolbar.js.map +1 -1
  102. package/build/components/block-lock/use-block-lock.js.map +1 -1
  103. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  104. package/build/components/block-mover/button.js +4 -1
  105. package/build/components/block-mover/button.js.map +1 -1
  106. package/build/components/block-mover/index.js +5 -1
  107. package/build/components/block-mover/index.js.map +1 -1
  108. package/build/components/block-mover/index.native.js.map +1 -1
  109. package/build/components/block-mover/mover-description.js.map +1 -1
  110. package/build/components/block-mover/mover-description.native.js.map +1 -1
  111. package/build/components/block-navigation/dropdown.js.map +1 -1
  112. package/build/components/block-parent-selector/index.js.map +1 -1
  113. package/build/components/block-pattern-setup/constants.js.map +1 -1
  114. package/build/components/block-pattern-setup/index.js.map +1 -1
  115. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  116. package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  117. package/build/components/block-patterns-list/index.js +4 -1
  118. package/build/components/block-patterns-list/index.js.map +1 -1
  119. package/build/components/block-patterns-paging/index.js +8 -4
  120. package/build/components/block-patterns-paging/index.js.map +1 -1
  121. package/build/components/block-popover/cover.js.map +1 -1
  122. package/build/components/block-popover/drop-zone.js.map +1 -1
  123. package/build/components/block-popover/inbetween.js.map +1 -1
  124. package/build/components/block-popover/index.js.map +1 -1
  125. package/build/components/block-popover/use-popover-scroll.js.map +1 -1
  126. package/build/components/block-preview/auto.js.map +1 -1
  127. package/build/components/block-preview/index.js.map +1 -1
  128. package/build/components/block-quick-navigation/index.js.map +1 -1
  129. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  130. package/build/components/block-rename/index.js.map +1 -1
  131. package/build/components/block-rename/is-empty-string.js.map +1 -1
  132. package/build/components/block-rename/modal.js +13 -9
  133. package/build/components/block-rename/modal.js.map +1 -1
  134. package/build/components/block-rename/rename-control.js +3 -1
  135. package/build/components/block-rename/rename-control.js.map +1 -1
  136. package/build/components/block-rename/use-block-rename.js.map +1 -1
  137. package/build/components/block-selection-clearer/index.js.map +1 -1
  138. package/build/components/block-settings/button.native.js.map +1 -1
  139. package/build/components/block-settings/container.native.js.map +1 -1
  140. package/build/components/block-settings/index.native.js +1 -1
  141. package/build/components/block-settings/index.native.js.map +1 -1
  142. package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  143. package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  144. package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  145. package/build/components/block-settings-menu/block-settings-dropdown.js +7 -3
  146. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  147. package/build/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
  148. package/build/components/block-settings-menu/index.js.map +1 -1
  149. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  150. package/build/components/block-styles/index.js.map +1 -1
  151. package/build/components/block-styles/index.native.js.map +1 -1
  152. package/build/components/block-styles/menu-items.js.map +1 -1
  153. package/build/components/block-styles/preview-panel.js.map +1 -1
  154. package/build/components/block-styles/preview.native.js.map +1 -1
  155. package/build/components/block-styles/use-styles-for-block.js.map +1 -1
  156. package/build/components/block-styles/utils.js.map +1 -1
  157. package/build/components/block-switcher/block-styles-menu.js.map +1 -1
  158. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  159. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  160. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  161. package/build/components/block-switcher/index.js +4 -3
  162. package/build/components/block-switcher/index.js.map +1 -1
  163. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  164. package/build/components/block-switcher/preview-block-popover.js.map +1 -1
  165. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  166. package/build/components/block-switcher/utils.js.map +1 -1
  167. package/build/components/block-title/index.js.map +1 -1
  168. package/build/components/block-title/use-block-display-title.js.map +1 -1
  169. package/build/components/block-toolbar/block-name-context.js.map +1 -1
  170. package/build/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
  171. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  172. package/build/components/block-toolbar/index.js +5 -4
  173. package/build/components/block-toolbar/index.js.map +1 -1
  174. package/build/components/block-toolbar/index.native.js.map +1 -1
  175. package/build/components/block-toolbar/shuffle.js +18 -9
  176. package/build/components/block-toolbar/shuffle.js.map +1 -1
  177. package/build/components/block-toolbar/use-has-block-toolbar.js +6 -3
  178. package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  179. package/build/components/block-toolbar/utils.js.map +1 -1
  180. package/build/components/block-tools/block-selection-button.js +56 -12
  181. package/build/components/block-tools/block-selection-button.js.map +1 -1
  182. package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  183. package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
  184. package/build/components/block-tools/empty-block-inserter.js.map +1 -1
  185. package/build/components/block-tools/index.js +15 -3
  186. package/build/components/block-tools/index.js.map +1 -1
  187. package/build/components/block-tools/insertion-point.js.map +1 -1
  188. package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  189. package/build/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  190. package/build/components/block-tools/use-show-block-tools.js +7 -13
  191. package/build/components/block-tools/use-show-block-tools.js.map +1 -1
  192. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  193. package/build/components/block-types-list/index.js.map +1 -1
  194. package/build/components/block-types-list/index.native.js.map +1 -1
  195. package/build/components/block-variation-picker/index.js.map +1 -1
  196. package/build/components/block-variation-picker/index.native.js.map +1 -1
  197. package/build/components/block-variation-transforms/index.js +4 -1
  198. package/build/components/block-variation-transforms/index.js.map +1 -1
  199. package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
  200. package/build/components/block-vertical-alignment-control/index.js.map +1 -1
  201. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  202. package/build/components/border-radius-control/all-input-control.js.map +1 -1
  203. package/build/components/border-radius-control/index.js.map +1 -1
  204. package/build/components/border-radius-control/input-controls.js.map +1 -1
  205. package/build/components/border-radius-control/linked-button.js.map +1 -1
  206. package/build/components/border-radius-control/utils.js.map +1 -1
  207. package/build/components/button-block-appender/index.js.map +1 -1
  208. package/build/components/button-block-appender/index.native.js +11 -1
  209. package/build/components/button-block-appender/index.native.js.map +1 -1
  210. package/build/components/caption/index.native.js.map +1 -1
  211. package/build/components/child-layout-control/index.js.map +1 -1
  212. package/build/components/color-palette/control.js.map +1 -1
  213. package/build/components/color-palette/index.js.map +1 -1
  214. package/build/components/color-palette/with-color-context.js.map +1 -1
  215. package/build/components/color-style-selector/index.js.map +1 -1
  216. package/build/components/colors/index.js +1 -1
  217. package/build/components/colors/index.js.map +1 -1
  218. package/build/components/colors/utils.js.map +1 -1
  219. package/build/components/colors/with-colors.js.map +1 -1
  220. package/build/components/colors-gradients/control.js.map +1 -1
  221. package/build/components/colors-gradients/dropdown.js.map +1 -1
  222. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  223. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  224. package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
  225. package/build/components/contrast-checker/index.js.map +1 -1
  226. package/build/components/contrast-checker/index.native.js.map +1 -1
  227. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  228. package/build/components/convert-to-group-buttons/index.native.js.map +1 -1
  229. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  230. package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  231. package/build/components/copy-handler/index.js.map +1 -1
  232. package/build/components/date-format-picker/index.js.map +1 -1
  233. package/build/components/default-block-appender/index.js.map +1 -1
  234. package/build/components/default-block-appender/index.native.js.map +1 -1
  235. package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  236. package/build/components/dimensions-tool/index.js.map +1 -1
  237. package/build/components/dimensions-tool/scale-tool.js.map +1 -1
  238. package/build/components/dimensions-tool/width-height-tool.js +6 -2
  239. package/build/components/dimensions-tool/width-height-tool.js.map +1 -1
  240. package/build/components/duotone/utils.js.map +1 -1
  241. package/build/components/duotone-control/index.js.map +1 -1
  242. package/build/components/editable-text/index.js.map +1 -1
  243. package/build/components/editor-styles/index.js +2 -1
  244. package/build/components/editor-styles/index.js.map +1 -1
  245. package/build/components/floating-toolbar/index.native.js.map +1 -1
  246. package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
  247. package/build/components/font-appearance-control/index.js.map +1 -1
  248. package/build/components/font-family/index.js.map +1 -1
  249. package/build/components/font-sizes/fluid-utils.js.map +1 -1
  250. package/build/components/font-sizes/font-size-picker.js.map +1 -1
  251. package/build/components/font-sizes/index.js.map +1 -1
  252. package/build/components/font-sizes/index.native.js.map +1 -1
  253. package/build/components/font-sizes/utils.js.map +1 -1
  254. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  255. package/build/components/global-styles/advanced-panel.js +9 -2
  256. package/build/components/global-styles/advanced-panel.js.map +1 -1
  257. package/build/components/global-styles/background-panel.js +447 -0
  258. package/build/components/global-styles/background-panel.js.map +1 -0
  259. package/build/components/global-styles/border-panel.js.map +1 -1
  260. package/build/components/global-styles/color-panel.js +2 -1
  261. package/build/components/global-styles/color-panel.js.map +1 -1
  262. package/build/components/global-styles/color-panel.native.js.map +1 -1
  263. package/build/components/global-styles/context.js.map +1 -1
  264. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  265. package/build/components/global-styles/filters-panel.js.map +1 -1
  266. package/build/components/global-styles/get-block-css-selector.js.map +1 -1
  267. package/build/components/global-styles/get-global-styles-changes.js +3 -0
  268. package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
  269. package/build/components/global-styles/hooks.js +1 -1
  270. package/build/components/global-styles/hooks.js.map +1 -1
  271. package/build/components/global-styles/image-settings-panel.js.map +1 -1
  272. package/build/components/global-styles/index.js +14 -1
  273. package/build/components/global-styles/index.js.map +1 -1
  274. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  275. package/build/components/global-styles/typography-panel.js.map +1 -1
  276. package/build/components/global-styles/typography-utils.js.map +1 -1
  277. package/build/components/global-styles/use-global-styles-output.js +19 -18
  278. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  279. package/build/components/global-styles/utils.js +2 -1
  280. package/build/components/global-styles/utils.js.map +1 -1
  281. package/build/components/gradients/index.js.map +1 -1
  282. package/build/components/gradients/index.native.js.map +1 -1
  283. package/build/components/gradients/use-gradient.js.map +1 -1
  284. package/build/components/gradients/with-gradient.js.map +1 -1
  285. package/build/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  286. package/build/components/grid-visualizer/grid-visualizer.js.map +1 -1
  287. package/build/components/grid-visualizer/index.js.map +1 -1
  288. package/build/components/grid-visualizer/utils.js.map +1 -1
  289. package/build/components/height-control/index.js.map +1 -1
  290. package/build/components/iframe/get-compatibility-styles.js.map +1 -1
  291. package/build/components/iframe/index.js +14 -10
  292. package/build/components/iframe/index.js.map +1 -1
  293. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  294. package/build/components/image-editor/constants.js.map +1 -1
  295. package/build/components/image-editor/context.js.map +1 -1
  296. package/build/components/image-editor/cropper.js +6 -2
  297. package/build/components/image-editor/cropper.js.map +1 -1
  298. package/build/components/image-editor/form-controls.js.map +1 -1
  299. package/build/components/image-editor/index.js +0 -2
  300. package/build/components/image-editor/index.js.map +1 -1
  301. package/build/components/image-editor/rotation-button.js.map +1 -1
  302. package/build/components/image-editor/use-save-image.js.map +1 -1
  303. package/build/components/image-editor/use-transform-image.js.map +1 -1
  304. package/build/components/image-editor/zoom-dropdown.js.map +1 -1
  305. package/build/components/image-link-destinations/index.native.js.map +1 -1
  306. package/build/components/image-size-control/index.js.map +1 -1
  307. package/build/components/image-size-control/use-dimension-handler.js.map +1 -1
  308. package/build/components/index.js +1 -1
  309. package/build/components/index.js.map +1 -1
  310. package/build/components/index.native.js +1 -1
  311. package/build/components/index.native.js.map +1 -1
  312. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  313. package/build/components/inner-blocks/constants.native.js.map +1 -1
  314. package/build/components/inner-blocks/default-block-appender.js.map +1 -1
  315. package/build/components/inner-blocks/index.js.map +1 -1
  316. package/build/components/inner-blocks/index.native.js.map +1 -1
  317. package/build/components/inner-blocks/use-block-context.js.map +1 -1
  318. package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  319. package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  320. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  321. package/build/components/inner-blocks/with-client-id.js.map +1 -1
  322. package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
  323. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  324. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  325. package/build/components/inserter/block-patterns-tab/index.js +31 -18
  326. package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
  327. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +2 -19
  328. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
  329. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -3
  330. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  331. package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  332. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  333. package/build/components/inserter/block-patterns-tab/utils.js.map +1 -1
  334. package/build/components/inserter/block-types-tab.js.map +1 -1
  335. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  336. package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  337. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  338. package/build/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
  339. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  340. package/build/components/inserter/hooks/use-patterns-paging.js.map +1 -1
  341. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  342. package/build/components/inserter/index.js.map +1 -1
  343. package/build/components/inserter/index.native.js.map +1 -1
  344. package/build/components/inserter/library.js +2 -0
  345. package/build/components/inserter/library.js.map +1 -1
  346. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  347. package/build/components/inserter/media-tab/index.js.map +1 -1
  348. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  349. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  350. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  351. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  352. package/build/components/inserter/media-tab/utils.js.map +1 -1
  353. package/build/components/inserter/menu.js +25 -13
  354. package/build/components/inserter/menu.js.map +1 -1
  355. package/build/components/inserter/menu.native.js.map +1 -1
  356. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  357. package/build/components/inserter/no-results.js.map +1 -1
  358. package/build/components/inserter/no-results.native.js.map +1 -1
  359. package/build/components/inserter/panel.js.map +1 -1
  360. package/build/components/inserter/preview-panel.js.map +1 -1
  361. package/build/components/inserter/quick-inserter.js.map +1 -1
  362. package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
  363. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  364. package/build/components/inserter/search-items.js +36 -15
  365. package/build/components/inserter/search-items.js.map +1 -1
  366. package/build/components/inserter/search-results.js.map +1 -1
  367. package/build/components/inserter/search-results.native.js.map +1 -1
  368. package/build/components/inserter/tabs.js +7 -3
  369. package/build/components/inserter/tabs.js.map +1 -1
  370. package/build/components/inserter/tabs.native.js.map +1 -1
  371. package/build/components/inserter/tips.js.map +1 -1
  372. package/build/components/inserter/utils.native.js.map +1 -1
  373. package/build/components/inserter-button/index.native.js.map +1 -1
  374. package/build/components/inserter-button/sparkles.js.map +1 -1
  375. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  376. package/build/components/inserter-list-item/index.js.map +1 -1
  377. package/build/components/inserter-listbox/context.js.map +1 -1
  378. package/build/components/inserter-listbox/group.js.map +1 -1
  379. package/build/components/inserter-listbox/index.js.map +1 -1
  380. package/build/components/inserter-listbox/item.js.map +1 -1
  381. package/build/components/inserter-listbox/row.js.map +1 -1
  382. package/build/components/inserter-menu-extension/index.js.map +1 -1
  383. package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
  384. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  385. package/build/components/inspector-controls/fill.js.map +1 -1
  386. package/build/components/inspector-controls/fill.native.js.map +1 -1
  387. package/build/components/inspector-controls/groups.js.map +1 -1
  388. package/build/components/inspector-controls/index.js.map +1 -1
  389. package/build/components/inspector-controls/slot.js.map +1 -1
  390. package/build/components/inspector-controls/slot.native.js.map +1 -1
  391. package/build/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
  392. package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  393. package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
  394. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  395. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  396. package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  397. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  398. package/build/components/inspector-controls-tabs/styles-tab.js +1 -1
  399. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  400. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  401. package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
  402. package/build/components/inspector-controls-tabs/utils.js.map +1 -1
  403. package/build/components/inspector-popover-header/index.js.map +1 -1
  404. package/build/components/justify-content-control/index.js.map +1 -1
  405. package/build/components/justify-content-control/ui.js.map +1 -1
  406. package/build/components/keyboard-shortcuts/index.js +11 -0
  407. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  408. package/build/components/letter-spacing-control/index.js.map +1 -1
  409. package/build/components/line-height-control/index.js.map +1 -1
  410. package/build/components/line-height-control/index.native.js.map +1 -1
  411. package/build/components/line-height-control/utils.js.map +1 -1
  412. package/build/components/link-control/constants.js.map +1 -1
  413. package/build/components/link-control/index.js.map +1 -1
  414. package/build/components/link-control/is-url-like.js.map +1 -1
  415. package/build/components/link-control/link-preview.js.map +1 -1
  416. package/build/components/link-control/search-create-button.js.map +1 -1
  417. package/build/components/link-control/search-input.js.map +1 -1
  418. package/build/components/link-control/search-item.js.map +1 -1
  419. package/build/components/link-control/search-results.js.map +1 -1
  420. package/build/components/link-control/settings-drawer.js.map +1 -1
  421. package/build/components/link-control/settings.js.map +1 -1
  422. package/build/components/link-control/use-create-page.js.map +1 -1
  423. package/build/components/link-control/use-internal-value.js.map +1 -1
  424. package/build/components/link-control/use-rich-url-data.js.map +1 -1
  425. package/build/components/link-control/use-search-handler.js.map +1 -1
  426. package/build/components/link-control/viewer-slot.js.map +1 -1
  427. package/build/components/list-view/appender.js.map +1 -1
  428. package/build/components/list-view/aria-referenced-text.js.map +1 -1
  429. package/build/components/list-view/block-contents.js.map +1 -1
  430. package/build/components/list-view/block-select-button.js +45 -1
  431. package/build/components/list-view/block-select-button.js.map +1 -1
  432. package/build/components/list-view/block.js +1 -1
  433. package/build/components/list-view/block.js.map +1 -1
  434. package/build/components/list-view/branch.js.map +1 -1
  435. package/build/components/list-view/context.js.map +1 -1
  436. package/build/components/list-view/drop-indicator.js.map +1 -1
  437. package/build/components/list-view/expander.js.map +1 -1
  438. package/build/components/list-view/index.js +17 -2
  439. package/build/components/list-view/index.js.map +1 -1
  440. package/build/components/list-view/leaf.js.map +1 -1
  441. package/build/components/list-view/use-block-selection.js.map +1 -1
  442. package/build/components/list-view/use-clipboard-handler.js.map +1 -1
  443. package/build/components/list-view/use-list-view-block-indexes.js.map +1 -1
  444. package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
  445. package/build/components/list-view/use-list-view-collapse-items.js +47 -0
  446. package/build/components/list-view/use-list-view-collapse-items.js.map +1 -0
  447. package/build/components/list-view/use-list-view-drop-zone.js +5 -0
  448. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  449. package/build/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
  450. package/build/components/list-view/use-list-view-images.js.map +1 -1
  451. package/build/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
  452. package/build/components/list-view/utils.js.map +1 -1
  453. package/build/components/media-placeholder/index.js.map +1 -1
  454. package/build/components/media-placeholder/index.native.js.map +1 -1
  455. package/build/components/media-replace-flow/index.js.map +1 -1
  456. package/build/components/media-replace-flow/index.native.js.map +1 -1
  457. package/build/components/media-upload/check.js.map +1 -1
  458. package/build/components/media-upload/constants.native.js.map +1 -1
  459. package/build/components/media-upload/index.js.map +1 -1
  460. package/build/components/media-upload/index.native.js.map +1 -1
  461. package/build/components/media-upload-progress/constants.js.map +1 -1
  462. package/build/components/media-upload-progress/index.native.js.map +1 -1
  463. package/build/components/multi-selection-inspector/index.js.map +1 -1
  464. package/build/components/navigable-toolbar/index.js.map +1 -1
  465. package/build/components/observe-typing/index.js.map +1 -1
  466. package/build/components/panel-color-settings/index.js.map +1 -1
  467. package/build/components/plain-text/index.js.map +1 -1
  468. package/build/components/plain-text/index.native.js.map +1 -1
  469. package/build/components/preview-options/index.js.map +1 -1
  470. package/build/components/provider/block-refs-provider.js.map +1 -1
  471. package/build/components/provider/index.js.map +1 -1
  472. package/build/components/provider/index.native.js.map +1 -1
  473. package/build/components/provider/use-block-sync.js.map +1 -1
  474. package/build/components/provider/with-registry-provider.js.map +1 -1
  475. package/build/components/publish-date-time-picker/index.js.map +1 -1
  476. package/build/components/recursion-provider/index.js +2 -2
  477. package/build/components/recursion-provider/index.js.map +1 -1
  478. package/build/components/resizable-box-popover/index.js.map +1 -1
  479. package/build/components/resolution-tool/index.js.map +1 -1
  480. package/build/components/responsive-block-control/index.js.map +1 -1
  481. package/build/components/responsive-block-control/label.js.map +1 -1
  482. package/build/components/rich-text/content.js +26 -19
  483. package/build/components/rich-text/content.js.map +1 -1
  484. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  485. package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
  486. package/build/components/rich-text/format-edit.js.map +1 -1
  487. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  488. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  489. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  490. package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
  491. package/build/components/rich-text/get-rich-text-values.js.map +1 -1
  492. package/build/components/rich-text/index.js +54 -11
  493. package/build/components/rich-text/index.js.map +1 -1
  494. package/build/components/rich-text/index.native.js +20 -12
  495. package/build/components/rich-text/index.native.js.map +1 -1
  496. package/build/components/rich-text/input-event.js.map +1 -1
  497. package/build/components/rich-text/input-event.native.js.map +1 -1
  498. package/build/components/rich-text/multiline.js.map +1 -1
  499. package/build/components/rich-text/native/format-edit.js.map +1 -1
  500. package/build/components/rich-text/native/get-format-colors.native.js +1 -1
  501. package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
  502. package/build/components/rich-text/native/index.js.map +1 -1
  503. package/build/components/rich-text/native/index.native.js +2 -2
  504. package/build/components/rich-text/native/index.native.js.map +1 -1
  505. package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  506. package/build/components/rich-text/native/use-format-types.js.map +1 -1
  507. package/build/components/rich-text/prevent-event-discovery.js.map +1 -1
  508. package/build/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
  509. package/build/components/rich-text/shortcut.js.map +1 -1
  510. package/build/components/rich-text/shortcut.native.js.map +1 -1
  511. package/build/components/rich-text/split-value.js.map +1 -1
  512. package/build/components/rich-text/toolbar-button.js.map +1 -1
  513. package/build/components/rich-text/use-before-input-rules.js.map +1 -1
  514. package/build/components/rich-text/use-delete.js.map +1 -1
  515. package/build/components/rich-text/use-enter.js.map +1 -1
  516. package/build/components/rich-text/use-firefox-compat.js.map +1 -1
  517. package/build/components/rich-text/use-format-types.js.map +1 -1
  518. package/build/components/rich-text/use-input-events.js.map +1 -1
  519. package/build/components/rich-text/use-input-rules.js.map +1 -1
  520. package/build/components/rich-text/use-insert-replacement-text.js.map +1 -1
  521. package/build/components/rich-text/use-mark-persistent.js.map +1 -1
  522. package/build/components/rich-text/use-paste-handler.js.map +1 -1
  523. package/build/components/rich-text/use-remove-browser-shortcuts.js.map +1 -1
  524. package/build/components/rich-text/use-shortcuts.js.map +1 -1
  525. package/build/components/rich-text/use-undo-automatic-change.js +1 -1
  526. package/build/components/rich-text/use-undo-automatic-change.js.map +1 -1
  527. package/build/components/rich-text/utils.js.map +1 -1
  528. package/build/components/rich-text/with-deprecations.js +0 -3
  529. package/build/components/rich-text/with-deprecations.js.map +1 -1
  530. package/build/components/selection-scroll-into-view/index.js.map +1 -1
  531. package/build/components/skip-to-selected-block/index.js.map +1 -1
  532. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  533. package/build/components/spacing-sizes-control/index.js.map +1 -1
  534. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  535. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  536. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  537. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  538. package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  539. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  540. package/build/components/text-decoration-control/index.js.map +1 -1
  541. package/build/components/text-transform-control/index.js.map +1 -1
  542. package/build/components/tool-selector/index.js.map +1 -1
  543. package/build/components/typewriter/index.js.map +1 -1
  544. package/build/components/ungroup-button/index.native.js.map +1 -1
  545. package/build/components/unit-control/index.js.map +1 -1
  546. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  547. package/build/components/url-input/button.js.map +1 -1
  548. package/build/components/url-input/index.js.map +1 -1
  549. package/build/components/url-input/index.native.js.map +1 -1
  550. package/build/components/url-popover/image-url-input-ui.js +50 -36
  551. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  552. package/build/components/url-popover/index.js.map +1 -1
  553. package/build/components/url-popover/link-editor.js.map +1 -1
  554. package/build/components/url-popover/link-viewer-url.js.map +1 -1
  555. package/build/components/url-popover/link-viewer.js.map +1 -1
  556. package/build/components/use-block-commands/index.js +20 -2
  557. package/build/components/use-block-commands/index.js.map +1 -1
  558. package/build/components/use-block-display-information/index.js +4 -6
  559. package/build/components/use-block-display-information/index.js.map +1 -1
  560. package/build/components/use-block-drop-zone/index.js.map +1 -1
  561. package/build/components/use-block-drop-zone/index.native.js.map +1 -1
  562. package/build/components/use-flash-editable-blocks/index.js.map +1 -1
  563. package/build/components/use-moving-animation/index.js.map +1 -1
  564. package/build/components/use-on-block-drop/index.js.map +1 -1
  565. package/build/components/use-on-block-drop/index.native.js.map +1 -1
  566. package/build/components/use-on-block-drop/types.js.map +1 -1
  567. package/build/components/use-paste-styles/index.js +1 -0
  568. package/build/components/use-paste-styles/index.js.map +1 -1
  569. package/build/components/use-resize-canvas/index.js.map +1 -1
  570. package/build/components/use-settings/index.js.map +1 -1
  571. package/build/components/use-unsupported-block-editor/index.native.js.map +1 -1
  572. package/build/components/video-player/gridicon-play.native.js.map +1 -1
  573. package/build/components/video-player/index.native.js.map +1 -1
  574. package/build/components/warning/index.js.map +1 -1
  575. package/build/components/warning/index.native.js.map +1 -1
  576. package/build/components/writing-flow/index.js.map +1 -1
  577. package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
  578. package/build/components/writing-flow/use-click-selection.js.map +1 -1
  579. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
  580. package/build/components/writing-flow/use-drag-selection.js.map +1 -1
  581. package/build/components/writing-flow/use-input.js.map +1 -1
  582. package/build/components/writing-flow/use-multi-selection.js.map +1 -1
  583. package/build/components/writing-flow/use-select-all.js.map +1 -1
  584. package/build/components/writing-flow/use-selection-observer.js.map +1 -1
  585. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  586. package/build/components/writing-flow/utils.js.map +1 -1
  587. package/build/components/writing-mode-control/index.js.map +1 -1
  588. package/build/elements/index.js.map +1 -1
  589. package/build/hooks/align.js.map +1 -1
  590. package/build/hooks/align.native.js +1 -1
  591. package/build/hooks/align.native.js.map +1 -1
  592. package/build/hooks/anchor.js +2 -2
  593. package/build/hooks/anchor.js.map +1 -1
  594. package/build/hooks/aria-label.js.map +1 -1
  595. package/build/hooks/background.js +70 -424
  596. package/build/hooks/background.js.map +1 -1
  597. package/build/hooks/block-hooks.js.map +1 -1
  598. package/build/hooks/block-renaming.js +0 -37
  599. package/build/hooks/block-renaming.js.map +1 -1
  600. package/build/hooks/border.js.map +1 -1
  601. package/build/hooks/color.js +1 -1
  602. package/build/hooks/color.js.map +1 -1
  603. package/build/hooks/compat.js.map +1 -1
  604. package/build/hooks/content-lock-ui.js +5 -5
  605. package/build/hooks/content-lock-ui.js.map +1 -1
  606. package/build/hooks/contrast-checker.js.map +1 -1
  607. package/build/hooks/custom-class-name.js.map +1 -1
  608. package/build/hooks/custom-class-name.native.js.map +1 -1
  609. package/build/hooks/dimensions.js.map +1 -1
  610. package/build/hooks/duotone.js.map +1 -1
  611. package/build/hooks/font-family.js.map +1 -1
  612. package/build/hooks/font-size.js.map +1 -1
  613. package/build/hooks/gap.js.map +1 -1
  614. package/build/hooks/generated-class-name.js.map +1 -1
  615. package/build/hooks/index.js +13 -5
  616. package/build/hooks/index.js.map +1 -1
  617. package/build/hooks/index.native.js.map +1 -1
  618. package/build/hooks/layout-child.js.map +1 -1
  619. package/build/hooks/layout.js +38 -19
  620. package/build/hooks/layout.js.map +1 -1
  621. package/build/hooks/layout.native.js.map +1 -1
  622. package/build/hooks/line-height.js.map +1 -1
  623. package/build/hooks/lock.js.map +1 -1
  624. package/build/hooks/metadata.js.map +1 -1
  625. package/build/hooks/position.js.map +1 -1
  626. package/build/hooks/settings.js.map +1 -1
  627. package/build/hooks/spacing-visualizer.js.map +1 -1
  628. package/build/hooks/style.js.map +1 -1
  629. package/build/hooks/supports.js +27 -4
  630. package/build/hooks/supports.js.map +1 -1
  631. package/build/hooks/text-align.js +156 -0
  632. package/build/hooks/text-align.js.map +1 -0
  633. package/build/hooks/typography.js +3 -2
  634. package/build/hooks/typography.js.map +1 -1
  635. package/build/hooks/typography.native.js.map +1 -1
  636. package/build/hooks/use-bindings-attributes.js +66 -129
  637. package/build/hooks/use-bindings-attributes.js.map +1 -1
  638. package/build/hooks/use-border-props.js.map +1 -1
  639. package/build/hooks/use-cached-truthy.js.map +1 -1
  640. package/build/hooks/use-color-props.js.map +1 -1
  641. package/build/hooks/use-editor-wrapper-styles.native.js.map +1 -1
  642. package/build/hooks/use-shadow-props.js.map +1 -1
  643. package/build/hooks/use-spacing-props.js.map +1 -1
  644. package/build/hooks/use-typography-props.js +2 -1
  645. package/build/hooks/use-typography-props.js.map +1 -1
  646. package/build/hooks/use-zoom-out.js +54 -0
  647. package/build/hooks/use-zoom-out.js.map +1 -0
  648. package/build/hooks/utils.js +29 -5
  649. package/build/hooks/utils.js.map +1 -1
  650. package/build/index.js +7 -0
  651. package/build/index.js.map +1 -1
  652. package/build/index.native.js.map +1 -1
  653. package/build/layouts/constrained.js.map +1 -1
  654. package/build/layouts/definitions.js +8 -6
  655. package/build/layouts/definitions.js.map +1 -1
  656. package/build/layouts/flex.js.map +1 -1
  657. package/build/layouts/flow.js.map +1 -1
  658. package/build/layouts/grid.js +52 -9
  659. package/build/layouts/grid.js.map +1 -1
  660. package/build/layouts/index.js.map +1 -1
  661. package/build/layouts/utils.js.map +1 -1
  662. package/build/lock-unlock.js.map +1 -1
  663. package/build/private-apis.js +7 -2
  664. package/build/private-apis.js.map +1 -1
  665. package/build/private-apis.native.js +4 -2
  666. package/build/private-apis.native.js.map +1 -1
  667. package/build/store/actions.js +18 -4
  668. package/build/store/actions.js.map +1 -1
  669. package/build/store/array.js.map +1 -1
  670. package/build/store/constants.js.map +1 -1
  671. package/build/store/defaults.js.map +1 -1
  672. package/build/store/defaults.native.js.map +1 -1
  673. package/build/store/get-block-settings.js.map +1 -1
  674. package/build/store/index.js +1 -1
  675. package/build/store/index.js.map +1 -1
  676. package/build/store/private-actions.js +18 -2
  677. package/build/store/private-actions.js.map +1 -1
  678. package/build/store/private-keys.js +2 -1
  679. package/build/store/private-keys.js.map +1 -1
  680. package/build/store/private-selectors.js +113 -36
  681. package/build/store/private-selectors.js.map +1 -1
  682. package/build/store/reducer.js +22 -0
  683. package/build/store/reducer.js.map +1 -1
  684. package/build/store/selectors.js +152 -109
  685. package/build/store/selectors.js.map +1 -1
  686. package/build/store/undo-ignore.js.map +1 -1
  687. package/build/store/utils.js +7 -1
  688. package/build/store/utils.js.map +1 -1
  689. package/build/utils/dom.js.map +1 -1
  690. package/build/utils/get-px-from-css-unit.js.map +1 -1
  691. package/build/utils/index.js.map +1 -1
  692. package/build/utils/math.js.map +1 -1
  693. package/build/utils/object.js.map +1 -1
  694. package/build/utils/order-inserter-block-items.js.map +1 -1
  695. package/build/utils/pasting.js.map +1 -1
  696. package/build/utils/selection.js.map +1 -1
  697. package/build/utils/sorting.js.map +1 -1
  698. package/build/utils/transform-styles/index.js +3 -2
  699. package/build/utils/transform-styles/index.js.map +1 -1
  700. package/build/utils/use-notify-copy.js.map +1 -1
  701. package/build-module/autocompleters/block.js.map +1 -1
  702. package/build-module/autocompleters/link.js.map +1 -1
  703. package/build-module/components/alignment-control/index.js.map +1 -1
  704. package/build-module/components/alignment-control/ui.js.map +1 -1
  705. package/build-module/components/autocomplete/index.js.map +1 -1
  706. package/build-module/components/block-actions/index.js.map +1 -1
  707. package/build-module/components/block-alignment-control/constants.js.map +1 -1
  708. package/build-module/components/block-alignment-control/index.js.map +1 -1
  709. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  710. package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
  711. package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
  712. package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
  713. package/build-module/components/block-bindings-toolbar-indicator/index.js.map +1 -1
  714. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  715. package/build-module/components/block-canvas/index.js.map +1 -1
  716. package/build-module/components/block-caption/index.native.js.map +1 -1
  717. package/build-module/components/block-card/index.js.map +1 -1
  718. package/build-module/components/block-compare/block-view.js.map +1 -1
  719. package/build-module/components/block-compare/index.js.map +1 -1
  720. package/build-module/components/block-content-overlay/index.js.map +1 -1
  721. package/build-module/components/block-context/index.js.map +1 -1
  722. package/build-module/components/block-controls/fill.js.map +1 -1
  723. package/build-module/components/block-controls/groups.js.map +1 -1
  724. package/build-module/components/block-controls/hook.js.map +1 -1
  725. package/build-module/components/block-controls/index.js.map +1 -1
  726. package/build-module/components/block-controls/slot.js.map +1 -1
  727. package/build-module/components/block-controls/slot.native.js.map +1 -1
  728. package/build-module/components/block-controls/use-has-block-controls.js.map +1 -1
  729. package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
  730. package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
  731. package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  732. package/build-module/components/block-draggable/index.js.map +1 -1
  733. package/build-module/components/block-draggable/index.native.js.map +1 -1
  734. package/build-module/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
  735. package/build-module/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
  736. package/build-module/components/block-edit/context.js +1 -0
  737. package/build-module/components/block-edit/context.js.map +1 -1
  738. package/build-module/components/block-edit/edit.js.map +1 -1
  739. package/build-module/components/block-edit/edit.native.js.map +1 -1
  740. package/build-module/components/block-edit/index.js +5 -3
  741. package/build-module/components/block-edit/index.js.map +1 -1
  742. package/build-module/components/block-edit-visually-button/index.js.map +1 -1
  743. package/build-module/components/block-editing-mode/index.js.map +1 -1
  744. package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
  745. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  746. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  747. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  748. package/build-module/components/block-icon/index.js.map +1 -1
  749. package/build-module/components/block-icon/index.native.js.map +1 -1
  750. package/build-module/components/block-info-slot-fill/index.js.map +1 -1
  751. package/build-module/components/block-inspector/index.js +5 -4
  752. package/build-module/components/block-inspector/index.js.map +1 -1
  753. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  754. package/build-module/components/block-list/block-crash-boundary.js.map +1 -1
  755. package/build-module/components/block-list/block-crash-boundary.native.js.map +1 -1
  756. package/build-module/components/block-list/block-crash-warning.js.map +1 -1
  757. package/build-module/components/block-list/block-crash-warning.native.js.map +1 -1
  758. package/build-module/components/block-list/block-html.js.map +1 -1
  759. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  760. package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
  761. package/build-module/components/block-list/block-list-context.native.js.map +1 -1
  762. package/build-module/components/block-list/block-list-item-cell.native.js.map +1 -1
  763. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  764. package/build-module/components/block-list/block-outline.native.js.map +1 -1
  765. package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
  766. package/build-module/components/block-list/block.js +55 -29
  767. package/build-module/components/block-list/block.js.map +1 -1
  768. package/build-module/components/block-list/block.native.js +2 -2
  769. package/build-module/components/block-list/block.native.js.map +1 -1
  770. package/build-module/components/block-list/grid-item.native.js.map +1 -1
  771. package/build-module/components/block-list/index.js +16 -5
  772. package/build-module/components/block-list/index.js.map +1 -1
  773. package/build-module/components/block-list/index.native.js.map +1 -1
  774. package/build-module/components/block-list/insertion-point.native.js.map +1 -1
  775. package/build-module/components/block-list/layout.js.map +1 -1
  776. package/build-module/components/block-list/private-block-context.js.map +1 -1
  777. package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
  778. package/build-module/components/block-list/use-block-props/index.js +2 -1
  779. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  780. package/build-module/components/block-list/use-block-props/index.native.js.map +1 -1
  781. package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +1 -1
  782. package/build-module/components/block-list/use-block-props/use-block-refs.js.map +1 -1
  783. package/build-module/components/block-list/use-block-props/use-focus-first-element.js +3 -2
  784. package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  785. package/build-module/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
  786. package/build-module/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
  787. package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  788. package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
  789. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  790. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  791. package/build-module/components/block-list/use-scroll-upon-insertion.native.js.map +1 -1
  792. package/build-module/components/block-list-appender/index.js.map +1 -1
  793. package/build-module/components/block-list-appender/index.native.js.map +1 -1
  794. package/build-module/components/block-lock/index.js.map +1 -1
  795. package/build-module/components/block-lock/menu-item.js.map +1 -1
  796. package/build-module/components/block-lock/modal.js.map +1 -1
  797. package/build-module/components/block-lock/toolbar.js.map +1 -1
  798. package/build-module/components/block-lock/use-block-lock.js.map +1 -1
  799. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  800. package/build-module/components/block-mover/button.js +4 -1
  801. package/build-module/components/block-mover/button.js.map +1 -1
  802. package/build-module/components/block-mover/index.js +5 -1
  803. package/build-module/components/block-mover/index.js.map +1 -1
  804. package/build-module/components/block-mover/index.native.js.map +1 -1
  805. package/build-module/components/block-mover/mover-description.js.map +1 -1
  806. package/build-module/components/block-mover/mover-description.native.js.map +1 -1
  807. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  808. package/build-module/components/block-parent-selector/index.js.map +1 -1
  809. package/build-module/components/block-pattern-setup/constants.js.map +1 -1
  810. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  811. package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  812. package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  813. package/build-module/components/block-patterns-list/index.js +4 -1
  814. package/build-module/components/block-patterns-list/index.js.map +1 -1
  815. package/build-module/components/block-patterns-paging/index.js +8 -4
  816. package/build-module/components/block-patterns-paging/index.js.map +1 -1
  817. package/build-module/components/block-popover/cover.js.map +1 -1
  818. package/build-module/components/block-popover/drop-zone.js.map +1 -1
  819. package/build-module/components/block-popover/inbetween.js.map +1 -1
  820. package/build-module/components/block-popover/index.js.map +1 -1
  821. package/build-module/components/block-popover/use-popover-scroll.js.map +1 -1
  822. package/build-module/components/block-preview/auto.js.map +1 -1
  823. package/build-module/components/block-preview/index.js.map +1 -1
  824. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  825. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  826. package/build-module/components/block-rename/index.js.map +1 -1
  827. package/build-module/components/block-rename/is-empty-string.js.map +1 -1
  828. package/build-module/components/block-rename/modal.js +14 -10
  829. package/build-module/components/block-rename/modal.js.map +1 -1
  830. package/build-module/components/block-rename/rename-control.js +3 -1
  831. package/build-module/components/block-rename/rename-control.js.map +1 -1
  832. package/build-module/components/block-rename/use-block-rename.js.map +1 -1
  833. package/build-module/components/block-selection-clearer/index.js.map +1 -1
  834. package/build-module/components/block-settings/button.native.js.map +1 -1
  835. package/build-module/components/block-settings/container.native.js.map +1 -1
  836. package/build-module/components/block-settings/index.native.js.map +1 -1
  837. package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  838. package/build-module/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  839. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  840. package/build-module/components/block-settings-menu/block-settings-dropdown.js +7 -3
  841. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  842. package/build-module/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
  843. package/build-module/components/block-settings-menu/index.js.map +1 -1
  844. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  845. package/build-module/components/block-styles/index.js.map +1 -1
  846. package/build-module/components/block-styles/index.native.js.map +1 -1
  847. package/build-module/components/block-styles/menu-items.js.map +1 -1
  848. package/build-module/components/block-styles/preview-panel.js.map +1 -1
  849. package/build-module/components/block-styles/preview.native.js.map +1 -1
  850. package/build-module/components/block-styles/use-styles-for-block.js.map +1 -1
  851. package/build-module/components/block-styles/utils.js.map +1 -1
  852. package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
  853. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  854. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  855. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  856. package/build-module/components/block-switcher/index.js +4 -3
  857. package/build-module/components/block-switcher/index.js.map +1 -1
  858. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  859. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  860. package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
  861. package/build-module/components/block-switcher/utils.js.map +1 -1
  862. package/build-module/components/block-title/index.js.map +1 -1
  863. package/build-module/components/block-title/use-block-display-title.js.map +1 -1
  864. package/build-module/components/block-toolbar/block-name-context.js.map +1 -1
  865. package/build-module/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
  866. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  867. package/build-module/components/block-toolbar/index.js +5 -4
  868. package/build-module/components/block-toolbar/index.js.map +1 -1
  869. package/build-module/components/block-toolbar/index.native.js.map +1 -1
  870. package/build-module/components/block-toolbar/shuffle.js +18 -9
  871. package/build-module/components/block-toolbar/shuffle.js.map +1 -1
  872. package/build-module/components/block-toolbar/use-has-block-toolbar.js +6 -3
  873. package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  874. package/build-module/components/block-toolbar/utils.js.map +1 -1
  875. package/build-module/components/block-tools/block-selection-button.js +58 -14
  876. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  877. package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  878. package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
  879. package/build-module/components/block-tools/empty-block-inserter.js.map +1 -1
  880. package/build-module/components/block-tools/index.js +14 -2
  881. package/build-module/components/block-tools/index.js.map +1 -1
  882. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  883. package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  884. package/build-module/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  885. package/build-module/components/block-tools/use-show-block-tools.js +7 -13
  886. package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
  887. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  888. package/build-module/components/block-types-list/index.js.map +1 -1
  889. package/build-module/components/block-types-list/index.native.js.map +1 -1
  890. package/build-module/components/block-variation-picker/index.js.map +1 -1
  891. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  892. package/build-module/components/block-variation-transforms/index.js +4 -1
  893. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  894. package/build-module/components/block-vertical-alignment-control/icons.js.map +1 -1
  895. package/build-module/components/block-vertical-alignment-control/index.js.map +1 -1
  896. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  897. package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
  898. package/build-module/components/border-radius-control/index.js.map +1 -1
  899. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  900. package/build-module/components/border-radius-control/linked-button.js.map +1 -1
  901. package/build-module/components/border-radius-control/utils.js.map +1 -1
  902. package/build-module/components/button-block-appender/index.js.map +1 -1
  903. package/build-module/components/button-block-appender/index.native.js +11 -1
  904. package/build-module/components/button-block-appender/index.native.js.map +1 -1
  905. package/build-module/components/caption/index.native.js.map +1 -1
  906. package/build-module/components/child-layout-control/index.js.map +1 -1
  907. package/build-module/components/color-palette/control.js.map +1 -1
  908. package/build-module/components/color-palette/index.js.map +1 -1
  909. package/build-module/components/color-palette/with-color-context.js.map +1 -1
  910. package/build-module/components/color-style-selector/index.js.map +1 -1
  911. package/build-module/components/colors/index.js.map +1 -1
  912. package/build-module/components/colors/utils.js.map +1 -1
  913. package/build-module/components/colors/with-colors.js.map +1 -1
  914. package/build-module/components/colors-gradients/control.js.map +1 -1
  915. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  916. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  917. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  918. package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
  919. package/build-module/components/contrast-checker/index.js.map +1 -1
  920. package/build-module/components/contrast-checker/index.native.js.map +1 -1
  921. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  922. package/build-module/components/convert-to-group-buttons/index.native.js.map +1 -1
  923. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  924. package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  925. package/build-module/components/copy-handler/index.js.map +1 -1
  926. package/build-module/components/date-format-picker/index.js.map +1 -1
  927. package/build-module/components/default-block-appender/index.js.map +1 -1
  928. package/build-module/components/default-block-appender/index.native.js.map +1 -1
  929. package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  930. package/build-module/components/dimensions-tool/index.js.map +1 -1
  931. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
  932. package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
  933. package/build-module/components/duotone/utils.js.map +1 -1
  934. package/build-module/components/duotone-control/index.js.map +1 -1
  935. package/build-module/components/editable-text/index.js.map +1 -1
  936. package/build-module/components/editor-styles/index.js +3 -2
  937. package/build-module/components/editor-styles/index.js.map +1 -1
  938. package/build-module/components/floating-toolbar/index.native.js.map +1 -1
  939. package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
  940. package/build-module/components/font-appearance-control/index.js.map +1 -1
  941. package/build-module/components/font-family/index.js.map +1 -1
  942. package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
  943. package/build-module/components/font-sizes/font-size-picker.js.map +1 -1
  944. package/build-module/components/font-sizes/index.js.map +1 -1
  945. package/build-module/components/font-sizes/index.native.js.map +1 -1
  946. package/build-module/components/font-sizes/utils.js.map +1 -1
  947. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  948. package/build-module/components/global-styles/advanced-panel.js +9 -2
  949. package/build-module/components/global-styles/advanced-panel.js.map +1 -1
  950. package/build-module/components/global-styles/background-panel.js +433 -0
  951. package/build-module/components/global-styles/background-panel.js.map +1 -0
  952. package/build-module/components/global-styles/border-panel.js.map +1 -1
  953. package/build-module/components/global-styles/color-panel.js +2 -1
  954. package/build-module/components/global-styles/color-panel.js.map +1 -1
  955. package/build-module/components/global-styles/color-panel.native.js.map +1 -1
  956. package/build-module/components/global-styles/context.js.map +1 -1
  957. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  958. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  959. package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
  960. package/build-module/components/global-styles/get-global-styles-changes.js +3 -0
  961. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
  962. package/build-module/components/global-styles/hooks.js +1 -1
  963. package/build-module/components/global-styles/hooks.js.map +1 -1
  964. package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
  965. package/build-module/components/global-styles/index.js +1 -0
  966. package/build-module/components/global-styles/index.js.map +1 -1
  967. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  968. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  969. package/build-module/components/global-styles/typography-utils.js.map +1 -1
  970. package/build-module/components/global-styles/use-global-styles-output.js +20 -19
  971. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  972. package/build-module/components/global-styles/utils.js +1 -0
  973. package/build-module/components/global-styles/utils.js.map +1 -1
  974. package/build-module/components/gradients/index.js.map +1 -1
  975. package/build-module/components/gradients/index.native.js.map +1 -1
  976. package/build-module/components/gradients/use-gradient.js.map +1 -1
  977. package/build-module/components/gradients/with-gradient.js.map +1 -1
  978. package/build-module/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  979. package/build-module/components/grid-visualizer/grid-visualizer.js.map +1 -1
  980. package/build-module/components/grid-visualizer/index.js.map +1 -1
  981. package/build-module/components/grid-visualizer/utils.js.map +1 -1
  982. package/build-module/components/height-control/index.js.map +1 -1
  983. package/build-module/components/iframe/get-compatibility-styles.js.map +1 -1
  984. package/build-module/components/iframe/index.js +14 -10
  985. package/build-module/components/iframe/index.js.map +1 -1
  986. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  987. package/build-module/components/image-editor/constants.js.map +1 -1
  988. package/build-module/components/image-editor/context.js.map +1 -1
  989. package/build-module/components/image-editor/cropper.js +7 -3
  990. package/build-module/components/image-editor/cropper.js.map +1 -1
  991. package/build-module/components/image-editor/form-controls.js.map +1 -1
  992. package/build-module/components/image-editor/index.js +0 -2
  993. package/build-module/components/image-editor/index.js.map +1 -1
  994. package/build-module/components/image-editor/rotation-button.js.map +1 -1
  995. package/build-module/components/image-editor/use-save-image.js.map +1 -1
  996. package/build-module/components/image-editor/use-transform-image.js.map +1 -1
  997. package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
  998. package/build-module/components/image-link-destinations/index.native.js.map +1 -1
  999. package/build-module/components/image-size-control/index.js.map +1 -1
  1000. package/build-module/components/image-size-control/use-dimension-handler.js.map +1 -1
  1001. package/build-module/components/index.js.map +1 -1
  1002. package/build-module/components/index.native.js.map +1 -1
  1003. package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
  1004. package/build-module/components/inner-blocks/constants.native.js.map +1 -1
  1005. package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
  1006. package/build-module/components/inner-blocks/index.js.map +1 -1
  1007. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  1008. package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
  1009. package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  1010. package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  1011. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  1012. package/build-module/components/inner-blocks/with-client-id.js.map +1 -1
  1013. package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
  1014. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  1015. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  1016. package/build-module/components/inserter/block-patterns-tab/index.js +32 -19
  1017. package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
  1018. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +2 -19
  1019. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
  1020. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -4
  1021. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  1022. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  1023. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  1024. package/build-module/components/inserter/block-patterns-tab/utils.js.map +1 -1
  1025. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  1026. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  1027. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  1028. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  1029. package/build-module/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
  1030. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  1031. package/build-module/components/inserter/hooks/use-patterns-paging.js.map +1 -1
  1032. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  1033. package/build-module/components/inserter/index.js.map +1 -1
  1034. package/build-module/components/inserter/index.native.js.map +1 -1
  1035. package/build-module/components/inserter/library.js +2 -0
  1036. package/build-module/components/inserter/library.js.map +1 -1
  1037. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  1038. package/build-module/components/inserter/media-tab/index.js.map +1 -1
  1039. package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
  1040. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  1041. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  1042. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  1043. package/build-module/components/inserter/media-tab/utils.js.map +1 -1
  1044. package/build-module/components/inserter/menu.js +25 -13
  1045. package/build-module/components/inserter/menu.js.map +1 -1
  1046. package/build-module/components/inserter/menu.native.js.map +1 -1
  1047. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  1048. package/build-module/components/inserter/no-results.js.map +1 -1
  1049. package/build-module/components/inserter/no-results.native.js.map +1 -1
  1050. package/build-module/components/inserter/panel.js.map +1 -1
  1051. package/build-module/components/inserter/preview-panel.js.map +1 -1
  1052. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  1053. package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -1
  1054. package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  1055. package/build-module/components/inserter/search-items.js +33 -15
  1056. package/build-module/components/inserter/search-items.js.map +1 -1
  1057. package/build-module/components/inserter/search-results.js.map +1 -1
  1058. package/build-module/components/inserter/search-results.native.js.map +1 -1
  1059. package/build-module/components/inserter/tabs.js +7 -3
  1060. package/build-module/components/inserter/tabs.js.map +1 -1
  1061. package/build-module/components/inserter/tabs.native.js.map +1 -1
  1062. package/build-module/components/inserter/tips.js.map +1 -1
  1063. package/build-module/components/inserter/utils.native.js.map +1 -1
  1064. package/build-module/components/inserter-button/index.native.js.map +1 -1
  1065. package/build-module/components/inserter-button/sparkles.js.map +1 -1
  1066. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  1067. package/build-module/components/inserter-list-item/index.js.map +1 -1
  1068. package/build-module/components/inserter-listbox/context.js.map +1 -1
  1069. package/build-module/components/inserter-listbox/group.js.map +1 -1
  1070. package/build-module/components/inserter-listbox/index.js.map +1 -1
  1071. package/build-module/components/inserter-listbox/item.js.map +1 -1
  1072. package/build-module/components/inserter-listbox/row.js.map +1 -1
  1073. package/build-module/components/inserter-menu-extension/index.js.map +1 -1
  1074. package/build-module/components/inspector-controls/block-support-slot-container.js.map +1 -1
  1075. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  1076. package/build-module/components/inspector-controls/fill.js.map +1 -1
  1077. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  1078. package/build-module/components/inspector-controls/groups.js.map +1 -1
  1079. package/build-module/components/inspector-controls/index.js.map +1 -1
  1080. package/build-module/components/inspector-controls/slot.js.map +1 -1
  1081. package/build-module/components/inspector-controls/slot.native.js.map +1 -1
  1082. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  1083. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
  1084. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  1085. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  1086. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  1087. package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  1088. package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -1
  1089. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  1090. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  1091. package/build-module/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
  1092. package/build-module/components/inspector-controls-tabs/utils.js.map +1 -1
  1093. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  1094. package/build-module/components/justify-content-control/index.js.map +1 -1
  1095. package/build-module/components/justify-content-control/ui.js.map +1 -1
  1096. package/build-module/components/keyboard-shortcuts/index.js +11 -0
  1097. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  1098. package/build-module/components/letter-spacing-control/index.js.map +1 -1
  1099. package/build-module/components/line-height-control/index.js.map +1 -1
  1100. package/build-module/components/line-height-control/index.native.js.map +1 -1
  1101. package/build-module/components/line-height-control/utils.js.map +1 -1
  1102. package/build-module/components/link-control/constants.js.map +1 -1
  1103. package/build-module/components/link-control/index.js.map +1 -1
  1104. package/build-module/components/link-control/is-url-like.js.map +1 -1
  1105. package/build-module/components/link-control/link-preview.js.map +1 -1
  1106. package/build-module/components/link-control/search-create-button.js.map +1 -1
  1107. package/build-module/components/link-control/search-input.js.map +1 -1
  1108. package/build-module/components/link-control/search-item.js.map +1 -1
  1109. package/build-module/components/link-control/search-results.js.map +1 -1
  1110. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  1111. package/build-module/components/link-control/settings.js.map +1 -1
  1112. package/build-module/components/link-control/use-create-page.js.map +1 -1
  1113. package/build-module/components/link-control/use-internal-value.js.map +1 -1
  1114. package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
  1115. package/build-module/components/link-control/use-search-handler.js.map +1 -1
  1116. package/build-module/components/link-control/viewer-slot.js.map +1 -1
  1117. package/build-module/components/list-view/appender.js.map +1 -1
  1118. package/build-module/components/list-view/aria-referenced-text.js.map +1 -1
  1119. package/build-module/components/list-view/block-contents.js.map +1 -1
  1120. package/build-module/components/list-view/block-select-button.js +45 -1
  1121. package/build-module/components/list-view/block-select-button.js.map +1 -1
  1122. package/build-module/components/list-view/block.js +1 -1
  1123. package/build-module/components/list-view/block.js.map +1 -1
  1124. package/build-module/components/list-view/branch.js.map +1 -1
  1125. package/build-module/components/list-view/context.js.map +1 -1
  1126. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  1127. package/build-module/components/list-view/expander.js.map +1 -1
  1128. package/build-module/components/list-view/index.js +17 -2
  1129. package/build-module/components/list-view/index.js.map +1 -1
  1130. package/build-module/components/list-view/leaf.js.map +1 -1
  1131. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  1132. package/build-module/components/list-view/use-clipboard-handler.js.map +1 -1
  1133. package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -1
  1134. package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
  1135. package/build-module/components/list-view/use-list-view-collapse-items.js +40 -0
  1136. package/build-module/components/list-view/use-list-view-collapse-items.js.map +1 -0
  1137. package/build-module/components/list-view/use-list-view-drop-zone.js +5 -0
  1138. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  1139. package/build-module/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
  1140. package/build-module/components/list-view/use-list-view-images.js.map +1 -1
  1141. package/build-module/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
  1142. package/build-module/components/list-view/utils.js.map +1 -1
  1143. package/build-module/components/media-placeholder/index.js.map +1 -1
  1144. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  1145. package/build-module/components/media-replace-flow/index.js.map +1 -1
  1146. package/build-module/components/media-replace-flow/index.native.js.map +1 -1
  1147. package/build-module/components/media-upload/check.js.map +1 -1
  1148. package/build-module/components/media-upload/constants.native.js.map +1 -1
  1149. package/build-module/components/media-upload/index.js.map +1 -1
  1150. package/build-module/components/media-upload/index.native.js.map +1 -1
  1151. package/build-module/components/media-upload-progress/constants.js.map +1 -1
  1152. package/build-module/components/media-upload-progress/index.native.js.map +1 -1
  1153. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  1154. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  1155. package/build-module/components/observe-typing/index.js.map +1 -1
  1156. package/build-module/components/panel-color-settings/index.js.map +1 -1
  1157. package/build-module/components/plain-text/index.js.map +1 -1
  1158. package/build-module/components/plain-text/index.native.js.map +1 -1
  1159. package/build-module/components/preview-options/index.js.map +1 -1
  1160. package/build-module/components/provider/block-refs-provider.js.map +1 -1
  1161. package/build-module/components/provider/index.js.map +1 -1
  1162. package/build-module/components/provider/index.native.js.map +1 -1
  1163. package/build-module/components/provider/use-block-sync.js.map +1 -1
  1164. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  1165. package/build-module/components/publish-date-time-picker/index.js.map +1 -1
  1166. package/build-module/components/recursion-provider/index.js +2 -2
  1167. package/build-module/components/recursion-provider/index.js.map +1 -1
  1168. package/build-module/components/resizable-box-popover/index.js.map +1 -1
  1169. package/build-module/components/resolution-tool/index.js.map +1 -1
  1170. package/build-module/components/responsive-block-control/index.js.map +1 -1
  1171. package/build-module/components/responsive-block-control/label.js.map +1 -1
  1172. package/build-module/components/rich-text/content.js +25 -19
  1173. package/build-module/components/rich-text/content.js.map +1 -1
  1174. package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
  1175. package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
  1176. package/build-module/components/rich-text/format-edit.js.map +1 -1
  1177. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  1178. package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
  1179. package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
  1180. package/build-module/components/rich-text/format-toolbar-container.native.js.map +1 -1
  1181. package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
  1182. package/build-module/components/rich-text/index.js +57 -14
  1183. package/build-module/components/rich-text/index.js.map +1 -1
  1184. package/build-module/components/rich-text/index.native.js +19 -12
  1185. package/build-module/components/rich-text/index.native.js.map +1 -1
  1186. package/build-module/components/rich-text/input-event.js.map +1 -1
  1187. package/build-module/components/rich-text/input-event.native.js.map +1 -1
  1188. package/build-module/components/rich-text/multiline.js.map +1 -1
  1189. package/build-module/components/rich-text/native/format-edit.js.map +1 -1
  1190. package/build-module/components/rich-text/native/get-format-colors.native.js +1 -1
  1191. package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
  1192. package/build-module/components/rich-text/native/index.js.map +1 -1
  1193. package/build-module/components/rich-text/native/index.native.js +2 -2
  1194. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  1195. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  1196. package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
  1197. package/build-module/components/rich-text/prevent-event-discovery.js.map +1 -1
  1198. package/build-module/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
  1199. package/build-module/components/rich-text/shortcut.js.map +1 -1
  1200. package/build-module/components/rich-text/shortcut.native.js.map +1 -1
  1201. package/build-module/components/rich-text/split-value.js.map +1 -1
  1202. package/build-module/components/rich-text/toolbar-button.js.map +1 -1
  1203. package/build-module/components/rich-text/use-before-input-rules.js.map +1 -1
  1204. package/build-module/components/rich-text/use-delete.js.map +1 -1
  1205. package/build-module/components/rich-text/use-enter.js.map +1 -1
  1206. package/build-module/components/rich-text/use-firefox-compat.js.map +1 -1
  1207. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  1208. package/build-module/components/rich-text/use-input-events.js.map +1 -1
  1209. package/build-module/components/rich-text/use-input-rules.js.map +1 -1
  1210. package/build-module/components/rich-text/use-insert-replacement-text.js.map +1 -1
  1211. package/build-module/components/rich-text/use-mark-persistent.js.map +1 -1
  1212. package/build-module/components/rich-text/use-paste-handler.js.map +1 -1
  1213. package/build-module/components/rich-text/use-remove-browser-shortcuts.js.map +1 -1
  1214. package/build-module/components/rich-text/use-shortcuts.js.map +1 -1
  1215. package/build-module/components/rich-text/use-undo-automatic-change.js +2 -2
  1216. package/build-module/components/rich-text/use-undo-automatic-change.js.map +1 -1
  1217. package/build-module/components/rich-text/utils.js.map +1 -1
  1218. package/build-module/components/rich-text/with-deprecations.js +0 -3
  1219. package/build-module/components/rich-text/with-deprecations.js.map +1 -1
  1220. package/build-module/components/selection-scroll-into-view/index.js.map +1 -1
  1221. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  1222. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  1223. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  1224. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  1225. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  1226. package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  1227. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  1228. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  1229. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  1230. package/build-module/components/text-decoration-control/index.js.map +1 -1
  1231. package/build-module/components/text-transform-control/index.js.map +1 -1
  1232. package/build-module/components/tool-selector/index.js.map +1 -1
  1233. package/build-module/components/typewriter/index.js.map +1 -1
  1234. package/build-module/components/ungroup-button/index.native.js.map +1 -1
  1235. package/build-module/components/unit-control/index.js.map +1 -1
  1236. package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
  1237. package/build-module/components/url-input/button.js.map +1 -1
  1238. package/build-module/components/url-input/index.js.map +1 -1
  1239. package/build-module/components/url-input/index.native.js.map +1 -1
  1240. package/build-module/components/url-popover/image-url-input-ui.js +50 -36
  1241. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  1242. package/build-module/components/url-popover/index.js.map +1 -1
  1243. package/build-module/components/url-popover/link-editor.js.map +1 -1
  1244. package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
  1245. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  1246. package/build-module/components/use-block-commands/index.js +20 -2
  1247. package/build-module/components/use-block-commands/index.js.map +1 -1
  1248. package/build-module/components/use-block-display-information/index.js +5 -7
  1249. package/build-module/components/use-block-display-information/index.js.map +1 -1
  1250. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  1251. package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
  1252. package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
  1253. package/build-module/components/use-moving-animation/index.js.map +1 -1
  1254. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  1255. package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
  1256. package/build-module/components/use-on-block-drop/types.js.map +1 -1
  1257. package/build-module/components/use-paste-styles/index.js +2 -1
  1258. package/build-module/components/use-paste-styles/index.js.map +1 -1
  1259. package/build-module/components/use-resize-canvas/index.js.map +1 -1
  1260. package/build-module/components/use-settings/index.js.map +1 -1
  1261. package/build-module/components/use-unsupported-block-editor/index.native.js.map +1 -1
  1262. package/build-module/components/video-player/gridicon-play.native.js.map +1 -1
  1263. package/build-module/components/video-player/index.native.js.map +1 -1
  1264. package/build-module/components/warning/index.js.map +1 -1
  1265. package/build-module/components/warning/index.native.js.map +1 -1
  1266. package/build-module/components/writing-flow/index.js.map +1 -1
  1267. package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
  1268. package/build-module/components/writing-flow/use-click-selection.js.map +1 -1
  1269. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
  1270. package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
  1271. package/build-module/components/writing-flow/use-input.js.map +1 -1
  1272. package/build-module/components/writing-flow/use-multi-selection.js.map +1 -1
  1273. package/build-module/components/writing-flow/use-select-all.js.map +1 -1
  1274. package/build-module/components/writing-flow/use-selection-observer.js.map +1 -1
  1275. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  1276. package/build-module/components/writing-flow/utils.js.map +1 -1
  1277. package/build-module/components/writing-mode-control/index.js.map +1 -1
  1278. package/build-module/elements/index.js.map +1 -1
  1279. package/build-module/hooks/align.js.map +1 -1
  1280. package/build-module/hooks/align.native.js.map +1 -1
  1281. package/build-module/hooks/anchor.js +2 -2
  1282. package/build-module/hooks/anchor.js.map +1 -1
  1283. package/build-module/hooks/aria-label.js.map +1 -1
  1284. package/build-module/hooks/background.js +67 -419
  1285. package/build-module/hooks/background.js.map +1 -1
  1286. package/build-module/hooks/block-hooks.js.map +1 -1
  1287. package/build-module/hooks/block-renaming.js +0 -36
  1288. package/build-module/hooks/block-renaming.js.map +1 -1
  1289. package/build-module/hooks/border.js.map +1 -1
  1290. package/build-module/hooks/color.js.map +1 -1
  1291. package/build-module/hooks/compat.js.map +1 -1
  1292. package/build-module/hooks/content-lock-ui.js +5 -5
  1293. package/build-module/hooks/content-lock-ui.js.map +1 -1
  1294. package/build-module/hooks/contrast-checker.js.map +1 -1
  1295. package/build-module/hooks/custom-class-name.js.map +1 -1
  1296. package/build-module/hooks/custom-class-name.native.js.map +1 -1
  1297. package/build-module/hooks/dimensions.js.map +1 -1
  1298. package/build-module/hooks/duotone.js.map +1 -1
  1299. package/build-module/hooks/font-family.js.map +1 -1
  1300. package/build-module/hooks/font-size.js.map +1 -1
  1301. package/build-module/hooks/gap.js.map +1 -1
  1302. package/build-module/hooks/generated-class-name.js.map +1 -1
  1303. package/build-module/hooks/index.js +6 -4
  1304. package/build-module/hooks/index.js.map +1 -1
  1305. package/build-module/hooks/index.native.js.map +1 -1
  1306. package/build-module/hooks/layout-child.js.map +1 -1
  1307. package/build-module/hooks/layout.js +38 -19
  1308. package/build-module/hooks/layout.js.map +1 -1
  1309. package/build-module/hooks/layout.native.js.map +1 -1
  1310. package/build-module/hooks/line-height.js.map +1 -1
  1311. package/build-module/hooks/lock.js.map +1 -1
  1312. package/build-module/hooks/metadata.js.map +1 -1
  1313. package/build-module/hooks/position.js.map +1 -1
  1314. package/build-module/hooks/settings.js.map +1 -1
  1315. package/build-module/hooks/spacing-visualizer.js.map +1 -1
  1316. package/build-module/hooks/style.js.map +1 -1
  1317. package/build-module/hooks/supports.js +22 -1
  1318. package/build-module/hooks/supports.js.map +1 -1
  1319. package/build-module/hooks/text-align.js +145 -0
  1320. package/build-module/hooks/text-align.js.map +1 -0
  1321. package/build-module/hooks/typography.js +2 -1
  1322. package/build-module/hooks/typography.js.map +1 -1
  1323. package/build-module/hooks/typography.native.js.map +1 -1
  1324. package/build-module/hooks/use-bindings-attributes.js +68 -132
  1325. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  1326. package/build-module/hooks/use-border-props.js.map +1 -1
  1327. package/build-module/hooks/use-cached-truthy.js.map +1 -1
  1328. package/build-module/hooks/use-color-props.js.map +1 -1
  1329. package/build-module/hooks/use-editor-wrapper-styles.native.js.map +1 -1
  1330. package/build-module/hooks/use-shadow-props.js.map +1 -1
  1331. package/build-module/hooks/use-spacing-props.js.map +1 -1
  1332. package/build-module/hooks/use-typography-props.js +2 -1
  1333. package/build-module/hooks/use-typography-props.js.map +1 -1
  1334. package/build-module/hooks/use-zoom-out.js +48 -0
  1335. package/build-module/hooks/use-zoom-out.js.map +1 -0
  1336. package/build-module/hooks/utils.js +30 -6
  1337. package/build-module/hooks/utils.js.map +1 -1
  1338. package/build-module/index.js +1 -1
  1339. package/build-module/index.js.map +1 -1
  1340. package/build-module/index.native.js.map +1 -1
  1341. package/build-module/layouts/constrained.js.map +1 -1
  1342. package/build-module/layouts/definitions.js +8 -6
  1343. package/build-module/layouts/definitions.js.map +1 -1
  1344. package/build-module/layouts/flex.js.map +1 -1
  1345. package/build-module/layouts/flow.js.map +1 -1
  1346. package/build-module/layouts/grid.js +52 -9
  1347. package/build-module/layouts/grid.js.map +1 -1
  1348. package/build-module/layouts/index.js.map +1 -1
  1349. package/build-module/layouts/utils.js.map +1 -1
  1350. package/build-module/lock-unlock.js.map +1 -1
  1351. package/build-module/private-apis.js +7 -2
  1352. package/build-module/private-apis.js.map +1 -1
  1353. package/build-module/private-apis.native.js +3 -1
  1354. package/build-module/private-apis.native.js.map +1 -1
  1355. package/build-module/store/actions.js +18 -4
  1356. package/build-module/store/actions.js.map +1 -1
  1357. package/build-module/store/array.js.map +1 -1
  1358. package/build-module/store/constants.js.map +1 -1
  1359. package/build-module/store/defaults.js.map +1 -1
  1360. package/build-module/store/defaults.native.js.map +1 -1
  1361. package/build-module/store/get-block-settings.js.map +1 -1
  1362. package/build-module/store/index.js.map +1 -1
  1363. package/build-module/store/private-actions.js +17 -2
  1364. package/build-module/store/private-actions.js.map +1 -1
  1365. package/build-module/store/private-keys.js +1 -0
  1366. package/build-module/store/private-keys.js.map +1 -1
  1367. package/build-module/store/private-selectors.js +105 -33
  1368. package/build-module/store/private-selectors.js.map +1 -1
  1369. package/build-module/store/reducer.js +21 -0
  1370. package/build-module/store/reducer.js.map +1 -1
  1371. package/build-module/store/selectors.js +130 -88
  1372. package/build-module/store/selectors.js.map +1 -1
  1373. package/build-module/store/undo-ignore.js.map +1 -1
  1374. package/build-module/store/utils.js +6 -1
  1375. package/build-module/store/utils.js.map +1 -1
  1376. package/build-module/utils/dom.js.map +1 -1
  1377. package/build-module/utils/get-px-from-css-unit.js.map +1 -1
  1378. package/build-module/utils/index.js.map +1 -1
  1379. package/build-module/utils/math.js.map +1 -1
  1380. package/build-module/utils/object.js.map +1 -1
  1381. package/build-module/utils/order-inserter-block-items.js.map +1 -1
  1382. package/build-module/utils/pasting.js.map +1 -1
  1383. package/build-module/utils/selection.js.map +1 -1
  1384. package/build-module/utils/sorting.js.map +1 -1
  1385. package/build-module/utils/transform-styles/index.js +2 -1
  1386. package/build-module/utils/transform-styles/index.js.map +1 -1
  1387. package/build-module/utils/use-notify-copy.js.map +1 -1
  1388. package/build-style/content-rtl.css +40 -19
  1389. package/build-style/content.css +40 -19
  1390. package/build-style/default-editor-styles-rtl.css +1 -1
  1391. package/build-style/default-editor-styles.css +1 -1
  1392. package/build-style/style-rtl.css +150 -130
  1393. package/build-style/style.css +150 -130
  1394. package/package.json +32 -33
  1395. package/src/components/block-bindings-toolbar-indicator/style.scss +1 -1
  1396. package/src/components/block-edit/context.js +1 -0
  1397. package/src/components/block-edit/index.js +4 -0
  1398. package/src/components/block-inspector/index.js +6 -4
  1399. package/src/components/block-list/block.js +69 -30
  1400. package/src/components/block-list/block.native.js +3 -2
  1401. package/src/components/block-list/content.scss +37 -19
  1402. package/src/components/block-list/index.js +22 -6
  1403. package/src/components/block-list/use-block-props/index.js +5 -1
  1404. package/src/components/block-list/use-block-props/use-focus-first-element.js +7 -3
  1405. package/src/components/block-mover/button.js +4 -1
  1406. package/src/components/block-mover/index.js +8 -1
  1407. package/src/components/block-patterns-list/index.js +22 -17
  1408. package/src/components/block-patterns-paging/index.js +4 -0
  1409. package/src/components/block-preview/style.scss +28 -0
  1410. package/src/components/block-rename/modal.js +17 -13
  1411. package/src/components/block-rename/rename-control.js +8 -1
  1412. package/src/components/block-settings-menu/block-settings-dropdown.js +8 -2
  1413. package/src/components/block-switcher/index.js +5 -3
  1414. package/src/components/block-switcher/style.scss +1 -1
  1415. package/src/components/block-toolbar/index.js +16 -9
  1416. package/src/components/block-toolbar/shuffle.js +19 -13
  1417. package/src/components/block-toolbar/style.scss +1 -1
  1418. package/src/components/block-toolbar/use-has-block-toolbar.js +5 -3
  1419. package/src/components/block-tools/block-selection-button.js +103 -34
  1420. package/src/components/block-tools/index.js +18 -1
  1421. package/src/components/block-tools/use-show-block-tools.js +4 -7
  1422. package/src/components/block-variation-transforms/index.js +3 -1
  1423. package/src/components/button-block-appender/content.scss +5 -1
  1424. package/src/components/button-block-appender/index.native.js +16 -1
  1425. package/src/components/default-block-appender/content.scss +3 -3
  1426. package/src/components/editor-styles/index.js +4 -2
  1427. package/src/components/global-styles/advanced-panel.js +8 -2
  1428. package/src/components/global-styles/background-panel.js +595 -0
  1429. package/src/components/global-styles/color-panel.js +2 -1
  1430. package/src/components/global-styles/get-global-styles-changes.js +3 -0
  1431. package/src/components/global-styles/hooks.js +1 -0
  1432. package/src/components/global-styles/index.js +4 -0
  1433. package/src/components/global-styles/style.scss +72 -1
  1434. package/src/{hooks/test/background.js → components/global-styles/test/background-panel.js} +36 -1
  1435. package/src/components/global-styles/test/get-global-styles-changes.js +22 -3
  1436. package/src/components/global-styles/test/use-global-styles-output.js +12 -21
  1437. package/src/components/global-styles/use-global-styles-output.js +32 -21
  1438. package/src/components/global-styles/utils.js +1 -0
  1439. package/src/components/iframe/index.js +17 -14
  1440. package/src/components/image-editor/cropper.js +11 -2
  1441. package/src/components/image-editor/index.js +0 -2
  1442. package/src/components/inserter/block-patterns-tab/index.js +54 -39
  1443. package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +9 -31
  1444. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -2
  1445. package/src/components/inserter/library.js +4 -0
  1446. package/src/components/inserter/menu.js +35 -17
  1447. package/src/components/inserter/search-items.js +37 -15
  1448. package/src/components/inserter/style.scss +88 -70
  1449. package/src/components/inserter/tabs.js +7 -2
  1450. package/src/components/inspector-controls-tabs/styles-tab.js +1 -1
  1451. package/src/components/keyboard-shortcuts/index.js +11 -0
  1452. package/src/components/link-control/style.scss +10 -2
  1453. package/src/components/link-control/test/index.js +1 -1
  1454. package/src/components/list-view/block-select-button.js +44 -3
  1455. package/src/components/list-view/block.js +1 -1
  1456. package/src/components/list-view/index.js +18 -1
  1457. package/src/components/list-view/style.scss +4 -4
  1458. package/src/components/list-view/use-list-view-collapse-items.js +33 -0
  1459. package/src/components/list-view/use-list-view-drop-zone.js +5 -0
  1460. package/src/components/recursion-provider/index.js +2 -2
  1461. package/src/components/rich-text/README.md +4 -0
  1462. package/src/components/rich-text/content.js +26 -19
  1463. package/src/components/rich-text/index.js +76 -15
  1464. package/src/components/rich-text/index.native.js +17 -12
  1465. package/src/components/rich-text/native/get-format-colors.native.js +1 -1
  1466. package/src/components/rich-text/native/index.native.js +2 -2
  1467. package/src/components/rich-text/use-undo-automatic-change.js +2 -6
  1468. package/src/components/rich-text/with-deprecations.js +0 -3
  1469. package/src/components/url-popover/image-url-input-ui.js +68 -51
  1470. package/src/components/use-block-commands/index.js +46 -28
  1471. package/src/components/use-block-display-information/index.js +8 -10
  1472. package/src/components/use-paste-styles/index.js +2 -0
  1473. package/src/hooks/anchor.js +11 -9
  1474. package/src/hooks/background.js +77 -538
  1475. package/src/hooks/block-renaming.js +0 -33
  1476. package/src/hooks/content-lock-ui.js +5 -7
  1477. package/src/hooks/index.js +6 -2
  1478. package/src/hooks/layout.js +57 -25
  1479. package/src/hooks/supports.js +24 -0
  1480. package/src/hooks/test/text-align.js +114 -0
  1481. package/src/hooks/test/use-typography-props.js +3 -1
  1482. package/src/hooks/text-align.js +178 -0
  1483. package/src/hooks/typography.js +2 -0
  1484. package/src/hooks/use-bindings-attributes.js +90 -161
  1485. package/src/hooks/use-typography-props.js +4 -1
  1486. package/src/hooks/use-zoom-out.js +46 -0
  1487. package/src/hooks/utils.js +41 -3
  1488. package/src/index.js +1 -0
  1489. package/src/layouts/definitions.js +6 -6
  1490. package/src/layouts/grid.js +106 -47
  1491. package/src/private-apis.js +13 -1
  1492. package/src/private-apis.native.js +2 -0
  1493. package/src/store/actions.js +22 -6
  1494. package/src/store/private-actions.js +18 -3
  1495. package/src/store/private-keys.js +1 -0
  1496. package/src/store/private-selectors.js +160 -41
  1497. package/src/store/reducer.js +22 -0
  1498. package/src/store/selectors.js +333 -262
  1499. package/src/store/test/private-actions.js +10 -0
  1500. package/src/store/test/private-selectors.js +13 -0
  1501. package/src/store/test/reducer.js +26 -0
  1502. package/src/store/test/selectors.js +90 -199
  1503. package/src/store/utils.js +13 -0
  1504. package/src/style.scss +0 -2
  1505. package/src/utils/transform-styles/index.js +2 -1
  1506. package/tsconfig.tsbuildinfo +1 -1
  1507. package/src/hooks/anchor.scss +0 -4
  1508. package/src/hooks/background.scss +0 -75
@@ -1 +1 @@
1
- {"version":3,"names":["__","sprintf","isRTL","getMovementDirection","moveDirection","orientation","getBlockMoverDescription","selectedCount","type","firstIndex","isFirst","isLast","dir","position","getMultiBlockMoverDescription","movementDirection"],"sources":["@wordpress/block-editor/src/components/block-mover/mover-description.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf, isRTL } from '@wordpress/i18n';\n\nconst getMovementDirection = ( moveDirection, orientation ) => {\n\tif ( moveDirection === 'up' ) {\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\treturn isRTL() ? 'right' : 'left';\n\t\t}\n\t\treturn 'up';\n\t} else if ( moveDirection === 'down' ) {\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\treturn isRTL() ? 'left' : 'right';\n\t\t}\n\t\treturn 'down';\n\t}\n\treturn null;\n};\n\n/**\n * Return a label for the block movement controls depending on block position.\n *\n * @param {number} selectedCount Number of blocks selected.\n * @param {string} type Block type - in the case of a single block, should\n * define its 'type'. I.e. 'Text', 'Heading', 'Image' etc.\n * @param {number} firstIndex The index (position - 1) of the first block selected.\n * @param {boolean} isFirst This is the first block.\n * @param {boolean} isLast This is the last block.\n * @param {number} dir Direction of movement (> 0 is considered to be going\n * down, < 0 is up).\n * @param {string} orientation The orientation of the block movers, vertical or\n * horizontal.\n *\n * @return {string | undefined} Label for the block movement controls.\n */\nexport function getBlockMoverDescription(\n\tselectedCount,\n\ttype,\n\tfirstIndex,\n\tisFirst,\n\tisLast,\n\tdir,\n\torientation\n) {\n\tconst position = firstIndex + 1;\n\n\tif ( selectedCount > 1 ) {\n\t\treturn getMultiBlockMoverDescription(\n\t\t\tselectedCount,\n\t\t\tfirstIndex,\n\t\t\tisFirst,\n\t\t\tisLast,\n\t\t\tdir,\n\t\t\torientation\n\t\t);\n\t}\n\n\tif ( isFirst && isLast ) {\n\t\treturn sprintf(\n\t\t\t// translators: %s: Type of block (i.e. Text, Image etc)\n\t\t\t__( 'Block %s is the only block, and cannot be moved' ),\n\t\t\ttype\n\t\t);\n\t}\n\n\tif ( dir > 0 && ! isLast ) {\n\t\t// Moving down.\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d down to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition + 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d left to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition + 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d right to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition + 1\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir > 0 && isLast ) {\n\t\t// Moving down, and is the last item.\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the end of the content and can’t be moved down'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the end of the content and can’t be moved left'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the end of the content and can’t be moved right'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && ! isFirst ) {\n\t\t// Moving up.\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__( 'Move %1$s block from position %2$d up to position %3$d' ),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition - 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d left to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition - 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d right to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition - 1\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && isFirst ) {\n\t\t// Moving up, and is the first item.\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the beginning of the content and can’t be moved up'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the beginning of the content and can’t be moved left'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the beginning of the content and can’t be moved right'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\t}\n}\n\n/**\n * Return a label for the block movement controls depending on block position.\n *\n * @param {number} selectedCount Number of blocks selected.\n * @param {number} firstIndex The index (position - 1) of the first block selected.\n * @param {boolean} isFirst This is the first block.\n * @param {boolean} isLast This is the last block.\n * @param {number} dir Direction of movement (> 0 is considered to be going\n * down, < 0 is up).\n * @param {string} orientation The orientation of the block movers, vertical or\n * horizontal.\n *\n * @return {string | undefined} Label for the block movement controls.\n */\nexport function getMultiBlockMoverDescription(\n\tselectedCount,\n\tfirstIndex,\n\tisFirst,\n\tisLast,\n\tdir,\n\torientation\n) {\n\tconst position = firstIndex + 1;\n\n\tif ( isFirst && isLast ) {\n\t\t// All blocks are selected\n\t\treturn __( 'All blocks are selected, and cannot be moved' );\n\t}\n\n\tif ( dir > 0 && ! isLast ) {\n\t\t// moving down\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d down by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d left by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d right by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir > 0 && isLast ) {\n\t\t// moving down, and the selected blocks are the last item\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved down as they are already at the bottom'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved left as they are already are at the leftmost position'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved right as they are already are at the rightmost position'\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && ! isFirst ) {\n\t\t// moving up\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d up by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d left by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d right by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && isFirst ) {\n\t\t// moving up, and the selected blocks are the first item\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved up as they are already at the top'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved left as they are already are at the leftmost position'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved right as they are already are at the rightmost position'\n\t\t\t);\n\t\t}\n\t}\n}\n"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EA,IAAKD,GAAG,GAAG,CAAC,IAAIF,OAAO,EAAG;IACzB;IACA,MAAMK,iBAAiB,GAAGZ,oBAAoB,CAAE,IAAI,EAAEE,WAAY,CAAC;IAEnE,IAAKU,iBAAiB,KAAK,IAAI,EAAG;MACjC,OAAOf,EAAE,CACR,0DACD,CAAC;IACF;IAEA,IAAKe,iBAAiB,KAAK,MAAM,EAAG;MACnC,OAAOf,EAAE,CACR,8EACD,CAAC;IACF;IAEA,IAAKe,iBAAiB,KAAK,OAAO,EAAG;MACpC,OAAOf,EAAE,CACR,gFACD,CAAC;IACF;EACD;AACD"}
1
+ {"version":3,"names":["__","sprintf","isRTL","getMovementDirection","moveDirection","orientation","getBlockMoverDescription","selectedCount","type","firstIndex","isFirst","isLast","dir","position","getMultiBlockMoverDescription","movementDirection"],"sources":["@wordpress/block-editor/src/components/block-mover/mover-description.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf, isRTL } from '@wordpress/i18n';\n\nconst getMovementDirection = ( moveDirection, orientation ) => {\n\tif ( moveDirection === 'up' ) {\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\treturn isRTL() ? 'right' : 'left';\n\t\t}\n\t\treturn 'up';\n\t} else if ( moveDirection === 'down' ) {\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\treturn isRTL() ? 'left' : 'right';\n\t\t}\n\t\treturn 'down';\n\t}\n\treturn null;\n};\n\n/**\n * Return a label for the block movement controls depending on block position.\n *\n * @param {number} selectedCount Number of blocks selected.\n * @param {string} type Block type - in the case of a single block, should\n * define its 'type'. I.e. 'Text', 'Heading', 'Image' etc.\n * @param {number} firstIndex The index (position - 1) of the first block selected.\n * @param {boolean} isFirst This is the first block.\n * @param {boolean} isLast This is the last block.\n * @param {number} dir Direction of movement (> 0 is considered to be going\n * down, < 0 is up).\n * @param {string} orientation The orientation of the block movers, vertical or\n * horizontal.\n *\n * @return {string | undefined} Label for the block movement controls.\n */\nexport function getBlockMoverDescription(\n\tselectedCount,\n\ttype,\n\tfirstIndex,\n\tisFirst,\n\tisLast,\n\tdir,\n\torientation\n) {\n\tconst position = firstIndex + 1;\n\n\tif ( selectedCount > 1 ) {\n\t\treturn getMultiBlockMoverDescription(\n\t\t\tselectedCount,\n\t\t\tfirstIndex,\n\t\t\tisFirst,\n\t\t\tisLast,\n\t\t\tdir,\n\t\t\torientation\n\t\t);\n\t}\n\n\tif ( isFirst && isLast ) {\n\t\treturn sprintf(\n\t\t\t// translators: %s: Type of block (i.e. Text, Image etc)\n\t\t\t__( 'Block %s is the only block, and cannot be moved' ),\n\t\t\ttype\n\t\t);\n\t}\n\n\tif ( dir > 0 && ! isLast ) {\n\t\t// Moving down.\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d down to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition + 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d left to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition + 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d right to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition + 1\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir > 0 && isLast ) {\n\t\t// Moving down, and is the last item.\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the end of the content and can’t be moved down'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the end of the content and can’t be moved left'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the end of the content and can’t be moved right'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && ! isFirst ) {\n\t\t// Moving up.\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__( 'Move %1$s block from position %2$d up to position %3$d' ),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition - 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d left to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition - 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d right to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition - 1\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && isFirst ) {\n\t\t// Moving up, and is the first item.\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the beginning of the content and can’t be moved up'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the beginning of the content and can’t be moved left'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the beginning of the content and can’t be moved right'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\t}\n}\n\n/**\n * Return a label for the block movement controls depending on block position.\n *\n * @param {number} selectedCount Number of blocks selected.\n * @param {number} firstIndex The index (position - 1) of the first block selected.\n * @param {boolean} isFirst This is the first block.\n * @param {boolean} isLast This is the last block.\n * @param {number} dir Direction of movement (> 0 is considered to be going\n * down, < 0 is up).\n * @param {string} orientation The orientation of the block movers, vertical or\n * horizontal.\n *\n * @return {string | undefined} Label for the block movement controls.\n */\nexport function getMultiBlockMoverDescription(\n\tselectedCount,\n\tfirstIndex,\n\tisFirst,\n\tisLast,\n\tdir,\n\torientation\n) {\n\tconst position = firstIndex + 1;\n\n\tif ( isFirst && isLast ) {\n\t\t// All blocks are selected\n\t\treturn __( 'All blocks are selected, and cannot be moved' );\n\t}\n\n\tif ( dir > 0 && ! isLast ) {\n\t\t// moving down\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d down by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d left by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d right by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir > 0 && isLast ) {\n\t\t// moving down, and the selected blocks are the last item\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved down as they are already at the bottom'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved left as they are already are at the leftmost position'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved right as they are already are at the rightmost position'\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && ! isFirst ) {\n\t\t// moving up\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d up by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d left by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d right by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && isFirst ) {\n\t\t// moving up, and the selected blocks are the first item\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved up as they are already at the top'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved left as they are already are at the leftmost position'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved right as they are already are at the rightmost position'\n\t\t\t);\n\t\t}\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,EAAEC,KAAK,QAAQ,iBAAiB;AAEpD,MAAMC,oBAAoB,GAAGA,CAAEC,aAAa,EAAEC,WAAW,KAAM;EAC9D,IAAKD,aAAa,KAAK,IAAI,EAAG;IAC7B,IAAKC,WAAW,KAAK,YAAY,EAAG;MACnC,OAAOH,KAAK,CAAC,CAAC,GAAG,OAAO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ACR,8EACD,CAAC;IACF;IAEA,IAAKe,iBAAiB,KAAK,OAAO,EAAG;MACpC,OAAOf,EAAE,CACR,gFACD,CAAC;IACF;EACD;AACD","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["I18nManager","__","sprintf","arrowUp","arrowDown","arrowLeft","arrowRight","horizontalMover","backwardButtonIcon","forwardButtonIcon","backwardButtonHint","forwardButtonHint","firstBlockTitle","lastBlockTitle","backwardButtonTitle","forwardButtonTitle","verticalMover","KEYS","SETUP_GETTER","description","getMoverDescription","icon","getArrowIcon","title","getMoverButtonTitle","actionTitle","getMoverActionTitle","getMoversSetup","isStackedHorizontally","firstIndex","keys","reduce","setup","key","includes","Object","assign","getSetup","switchButtonPropIfRTL","isBackwardButton","forwardButtonProp","backwardButtonProp","isRTL","args","arguments","apply","applyRTLSetup","backward","forward","actionTitlePrev","actionTitleNext","getIndexes","fromIndex","direction","toIndex","buttonTitlePrev","buttonTitleNext"],"sources":["@wordpress/block-editor/src/components/block-mover/mover-description.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { I18nManager } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { arrowUp, arrowDown, arrowLeft, arrowRight } from '@wordpress/icons';\n\nconst horizontalMover = {\n\tbackwardButtonIcon: arrowLeft,\n\tforwardButtonIcon: arrowRight,\n\tbackwardButtonHint: __( 'Double tap to move the block to the left' ),\n\tforwardButtonHint: __( 'Double tap to move the block to the right' ),\n\tfirstBlockTitle: __( 'Move block left' ),\n\tlastBlockTitle: __( 'Move block right' ),\n\t/* translators: accessibility text. %1: current block position (number). %2: next block position (number) */\n\tbackwardButtonTitle: __(\n\t\t'Move block left from position %1$s to position %2$s'\n\t),\n\t/* translators: accessibility text. %1: current block position (number). %2: next block position (number) */\n\tforwardButtonTitle: __(\n\t\t'Move block right from position %1$s to position %2$s'\n\t),\n};\n\nconst verticalMover = {\n\tbackwardButtonIcon: arrowUp,\n\tforwardButtonIcon: arrowDown,\n\tbackwardButtonHint: __( 'Double tap to move the block up' ),\n\tforwardButtonHint: __( 'Double tap to move the block down' ),\n\tfirstBlockTitle: __( 'Move block up' ),\n\tlastBlockTitle: __( 'Move block down' ),\n\t/* translators: accessibility text. %1: current block position (number). %2: next block position (number) */\n\tbackwardButtonTitle: __( 'Move block up from row %1$s to row %2$s' ),\n\t/* translators: accessibility text. %1: current block position (number). %2: next block position (number) */\n\tforwardButtonTitle: __( 'Move block down from row %1$s to row %2$s' ),\n};\n\nconst KEYS = [ 'description', 'icon', 'title', 'actionTitle' ];\n\nconst SETUP_GETTER = {\n\tdescription: getMoverDescription,\n\ticon: getArrowIcon,\n\ttitle: getMoverButtonTitle,\n\tactionTitle: getMoverActionTitle,\n};\n\nexport function getMoversSetup(\n\tisStackedHorizontally,\n\t{ firstIndex, keys = KEYS }\n) {\n\treturn keys.reduce( ( setup, key ) => {\n\t\tif ( KEYS.includes( key ) ) {\n\t\t\tObject.assign( setup, {\n\t\t\t\t[ key ]: getSetup( key, isStackedHorizontally, {\n\t\t\t\t\tfirstIndex,\n\t\t\t\t} ),\n\t\t\t} );\n\t\t}\n\t\treturn setup;\n\t}, {} );\n}\n\nfunction switchButtonPropIfRTL(\n\tisBackwardButton,\n\tforwardButtonProp,\n\tbackwardButtonProp,\n\tisStackedHorizontally\n) {\n\tif ( I18nManager.isRTL && isStackedHorizontally ) {\n\t\t// For RTL and horizontal direction switch prop between forward and backward button.\n\t\tif ( isBackwardButton ) {\n\t\t\treturn forwardButtonProp; // Set forwardButtonProp for backward button.\n\t\t}\n\t\treturn backwardButtonProp; // Set backwardButtonProp for forward button.\n\t}\n\n\treturn isBackwardButton ? backwardButtonProp : forwardButtonProp;\n}\n\nfunction getSetup() {\n\tconst [ key, ...args ] = arguments;\n\treturn SETUP_GETTER[ key ].apply( null, [ ...args ] );\n}\n\nfunction applyRTLSetup( isBackwardButton, args ) {\n\treturn switchButtonPropIfRTL.apply( null, [ isBackwardButton, ...args ] );\n}\n\nfunction getMoverDescription( isStackedHorizontally ) {\n\treturn isStackedHorizontally ? horizontalMover : verticalMover;\n}\n\nfunction getArrowIcon( isStackedHorizontally ) {\n\tconst { forwardButtonIcon, backwardButtonIcon } = getMoverDescription(\n\t\tisStackedHorizontally\n\t);\n\n\tconst args = [\n\t\tforwardButtonIcon,\n\t\tbackwardButtonIcon,\n\t\tisStackedHorizontally,\n\t];\n\n\treturn {\n\t\tbackward: applyRTLSetup( true, args ),\n\t\tforward: applyRTLSetup( false, args ),\n\t};\n}\n\nfunction getMoverActionTitle( isStackedHorizontally ) {\n\tconst { firstBlockTitle, lastBlockTitle } = getMoverDescription(\n\t\tisStackedHorizontally\n\t);\n\n\tconst args = [ lastBlockTitle, firstBlockTitle, isStackedHorizontally ];\n\n\tconst actionTitlePrev = applyRTLSetup( true, args );\n\tconst actionTitleNext = applyRTLSetup( false, args );\n\n\treturn {\n\t\tbackward: sprintf( actionTitlePrev, firstBlockTitle ),\n\t\tforward: sprintf( actionTitleNext, lastBlockTitle ),\n\t};\n}\n\nfunction getMoverButtonTitle( isStackedHorizontally, { firstIndex } ) {\n\tconst getIndexes = ( isBackwardButton ) => {\n\t\tconst fromIndex = firstIndex + 1; // Current position based on index\n\t\t// for backwardButton decrease index (move left/up) for forwardButton increase index (move right/down)\n\t\tconst direction = isBackwardButton ? -1 : 1;\n\t\tconst toIndex = fromIndex + direction; // Position after move.\n\t\treturn [ fromIndex, toIndex ];\n\t};\n\n\tconst { backwardButtonTitle, forwardButtonTitle } = getMoverDescription(\n\t\tisStackedHorizontally\n\t);\n\n\tconst args = [\n\t\tforwardButtonTitle,\n\t\tbackwardButtonTitle,\n\t\tisStackedHorizontally,\n\t];\n\n\tconst buttonTitlePrev = applyRTLSetup( true, args );\n\tconst buttonTitleNext = applyRTLSetup( false, args );\n\n\treturn {\n\t\tbackward: sprintf( buttonTitlePrev, ...getIndexes( true ) ),\n\t\tforward: sprintf( buttonTitleNext, ...getIndexes( false ) ),\n\t};\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Me,IAAI,GAAG,CACZ5B,kBAAkB,EAClBD,mBAAmB,EACnBc,qBAAqB,CACrB;EAED,MAAM2B,eAAe,GAAGT,aAAa,CAAE,IAAI,EAAEH,IAAK,CAAC;EACnD,MAAMa,eAAe,GAAGV,aAAa,CAAE,KAAK,EAAEH,IAAK,CAAC;EAEpD,OAAO;IACNI,QAAQ,EAAE7C,OAAO,CAAEqD,eAAe,EAAE,GAAGJ,UAAU,CAAE,IAAK,CAAE,CAAC;IAC3DH,OAAO,EAAE9C,OAAO,CAAEsD,eAAe,EAAE,GAAGL,UAAU,CAAE,KAAM,CAAE;EAC3D,CAAC;AACF"}
1
+ {"version":3,"names":["I18nManager","__","sprintf","arrowUp","arrowDown","arrowLeft","arrowRight","horizontalMover","backwardButtonIcon","forwardButtonIcon","backwardButtonHint","forwardButtonHint","firstBlockTitle","lastBlockTitle","backwardButtonTitle","forwardButtonTitle","verticalMover","KEYS","SETUP_GETTER","description","getMoverDescription","icon","getArrowIcon","title","getMoverButtonTitle","actionTitle","getMoverActionTitle","getMoversSetup","isStackedHorizontally","firstIndex","keys","reduce","setup","key","includes","Object","assign","getSetup","switchButtonPropIfRTL","isBackwardButton","forwardButtonProp","backwardButtonProp","isRTL","args","arguments","apply","applyRTLSetup","backward","forward","actionTitlePrev","actionTitleNext","getIndexes","fromIndex","direction","toIndex","buttonTitlePrev","buttonTitleNext"],"sources":["@wordpress/block-editor/src/components/block-mover/mover-description.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { I18nManager } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { arrowUp, arrowDown, arrowLeft, arrowRight } from '@wordpress/icons';\n\nconst horizontalMover = {\n\tbackwardButtonIcon: arrowLeft,\n\tforwardButtonIcon: arrowRight,\n\tbackwardButtonHint: __( 'Double tap to move the block to the left' ),\n\tforwardButtonHint: __( 'Double tap to move the block to the right' ),\n\tfirstBlockTitle: __( 'Move block left' ),\n\tlastBlockTitle: __( 'Move block right' ),\n\t/* translators: accessibility text. %1: current block position (number). %2: next block position (number) */\n\tbackwardButtonTitle: __(\n\t\t'Move block left from position %1$s to position %2$s'\n\t),\n\t/* translators: accessibility text. %1: current block position (number). %2: next block position (number) */\n\tforwardButtonTitle: __(\n\t\t'Move block right from position %1$s to position %2$s'\n\t),\n};\n\nconst verticalMover = {\n\tbackwardButtonIcon: arrowUp,\n\tforwardButtonIcon: arrowDown,\n\tbackwardButtonHint: __( 'Double tap to move the block up' ),\n\tforwardButtonHint: __( 'Double tap to move the block down' ),\n\tfirstBlockTitle: __( 'Move block up' ),\n\tlastBlockTitle: __( 'Move block down' ),\n\t/* translators: accessibility text. %1: current block position (number). %2: next block position (number) */\n\tbackwardButtonTitle: __( 'Move block up from row %1$s to row %2$s' ),\n\t/* translators: accessibility text. %1: current block position (number). %2: next block position (number) */\n\tforwardButtonTitle: __( 'Move block down from row %1$s to row %2$s' ),\n};\n\nconst KEYS = [ 'description', 'icon', 'title', 'actionTitle' ];\n\nconst SETUP_GETTER = {\n\tdescription: getMoverDescription,\n\ticon: getArrowIcon,\n\ttitle: getMoverButtonTitle,\n\tactionTitle: getMoverActionTitle,\n};\n\nexport function getMoversSetup(\n\tisStackedHorizontally,\n\t{ firstIndex, keys = KEYS }\n) {\n\treturn keys.reduce( ( setup, key ) => {\n\t\tif ( KEYS.includes( key ) ) {\n\t\t\tObject.assign( setup, {\n\t\t\t\t[ key ]: getSetup( key, isStackedHorizontally, {\n\t\t\t\t\tfirstIndex,\n\t\t\t\t} ),\n\t\t\t} );\n\t\t}\n\t\treturn setup;\n\t}, {} );\n}\n\nfunction switchButtonPropIfRTL(\n\tisBackwardButton,\n\tforwardButtonProp,\n\tbackwardButtonProp,\n\tisStackedHorizontally\n) {\n\tif ( I18nManager.isRTL && isStackedHorizontally ) {\n\t\t// For RTL and horizontal direction switch prop between forward and backward button.\n\t\tif ( isBackwardButton ) {\n\t\t\treturn forwardButtonProp; // Set forwardButtonProp for backward button.\n\t\t}\n\t\treturn backwardButtonProp; // Set backwardButtonProp for forward button.\n\t}\n\n\treturn isBackwardButton ? backwardButtonProp : forwardButtonProp;\n}\n\nfunction getSetup() {\n\tconst [ key, ...args ] = arguments;\n\treturn SETUP_GETTER[ key ].apply( null, [ ...args ] );\n}\n\nfunction applyRTLSetup( isBackwardButton, args ) {\n\treturn switchButtonPropIfRTL.apply( null, [ isBackwardButton, ...args ] );\n}\n\nfunction getMoverDescription( isStackedHorizontally ) {\n\treturn isStackedHorizontally ? horizontalMover : verticalMover;\n}\n\nfunction getArrowIcon( isStackedHorizontally ) {\n\tconst { forwardButtonIcon, backwardButtonIcon } = getMoverDescription(\n\t\tisStackedHorizontally\n\t);\n\n\tconst args = [\n\t\tforwardButtonIcon,\n\t\tbackwardButtonIcon,\n\t\tisStackedHorizontally,\n\t];\n\n\treturn {\n\t\tbackward: applyRTLSetup( true, args ),\n\t\tforward: applyRTLSetup( false, args ),\n\t};\n}\n\nfunction getMoverActionTitle( isStackedHorizontally ) {\n\tconst { firstBlockTitle, lastBlockTitle } = getMoverDescription(\n\t\tisStackedHorizontally\n\t);\n\n\tconst args = [ lastBlockTitle, firstBlockTitle, isStackedHorizontally ];\n\n\tconst actionTitlePrev = applyRTLSetup( true, args );\n\tconst actionTitleNext = applyRTLSetup( false, args );\n\n\treturn {\n\t\tbackward: sprintf( actionTitlePrev, firstBlockTitle ),\n\t\tforward: sprintf( actionTitleNext, lastBlockTitle ),\n\t};\n}\n\nfunction getMoverButtonTitle( isStackedHorizontally, { firstIndex } ) {\n\tconst getIndexes = ( isBackwardButton ) => {\n\t\tconst fromIndex = firstIndex + 1; // Current position based on index\n\t\t// for backwardButton decrease index (move left/up) for forwardButton increase index (move right/down)\n\t\tconst direction = isBackwardButton ? -1 : 1;\n\t\tconst toIndex = fromIndex + direction; // Position after move.\n\t\treturn [ fromIndex, toIndex ];\n\t};\n\n\tconst { backwardButtonTitle, forwardButtonTitle } = getMoverDescription(\n\t\tisStackedHorizontally\n\t);\n\n\tconst args = [\n\t\tforwardButtonTitle,\n\t\tbackwardButtonTitle,\n\t\tisStackedHorizontally,\n\t];\n\n\tconst buttonTitlePrev = applyRTLSetup( true, args );\n\tconst buttonTitleNext = applyRTLSetup( false, args );\n\n\treturn {\n\t\tbackward: sprintf( buttonTitlePrev, ...getIndexes( true ) ),\n\t\tforward: sprintf( buttonTitleNext, ...getIndexes( false ) ),\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,cAAc;AAC1C;AACA;AACA;AACA,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,OAAO,EAAEC,SAAS,EAAEC,SAAS,EAAEC,UAAU,QAAQ,kBAAkB;AAE5E,MAAMC,eAAe,GAAG;EACvBC,kBAAkB,EAAEH,SAAS;EAC7BI,iBAAiB,EAAEH,UAAU;EAC7BI,kBAAkB,EAAET,EAAE,CAAE,0CAA2C,CAAC;EACpEU,iBAAiB,EAAEV,EAAE,CAAE,2CAA4C,CAAC;EACpEW,eAAe,EAAEX,EAAE,CAAE,iBAAkB,CAAC;EACxCY,cAAc,EAAEZ,EAAE,CAAE,kBAAmB,CAAC;EACxC;EACAa,mBAAmB,EAAEb,EAAE,CACtB,qDACD,CAAC;EACD;EACAc,kBAAkB,EAAEd,EAAE,CACrB,sDACD;AACD,CAAC;AAED,MAAMe,aAAa,GAAG;EACrBR,kBAAkB,EAAEL,OAAO;EAC3BM,iBAAiB,EAAEL,SAAS;EAC5BM,kBAAkB,EAAET,EAAE,CAAE,iCAAkC,CAAC;EAC3DU,iBAAiB,EAAEV,EAAE,CAAE,mCAAoC,CAAC;EAC5DW,eAAe,EAAEX,EAAE,CAAE,eAAgB,CAAC;EACtCY,cAAc,EAAEZ,EAAE,CAAE,iBAAkB,CAAC;EACvC;EACAa,mBAAmB,EAAEb,EAAE,CAAE,yCAA0C,CAAC;EACpE;EACAc,kBAAkB,EAAEd,EAAE,CAAE,2CAA4C;AACrE,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wB,SAAS,GAAGd,gBAAgB,GAAG,CAAC,CAAC,GAAG,CAAC;IAC3C,MAAMe,OAAO,GAAGF,SAAS,GAAGC,SAAS,CAAC,CAAC;IACvC,OAAO,CAAED,SAAS,EAAEE,OAAO,CAAE;EAC9B,CAAC;EAED,MAAM;IAAExC,mBAAmB;IAAEC;EAAmB,CAAC,GAAGK,mBAAmB,CACtEQ,qBACD,CAAC;EAED,MAAMe,IAAI,GAAG,CACZ5B,kBAAkB,EAClBD,mBAAmB,EACnBc,qBAAqB,CACrB;EAED,MAAM2B,eAAe,GAAGT,aAAa,CAAE,IAAI,EAAEH,IAAK,CAAC;EACnD,MAAMa,eAAe,GAAGV,aAAa,CAAE,KAAK,EAAEH,IAAK,CAAC;EAEpD,OAAO;IACNI,QAAQ,EAAE7C,OAAO,CAAEqD,eAAe,EAAE,GAAGJ,UAAU,CAAE,IAAK,CAAE,CAAC;IAC3DH,OAAO,EAAE9C,OAAO,CAAEsD,eAAe,EAAE,GAAGL,UAAU,CAAE,KAAM,CAAE;EAC3D,CAAC;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["deprecated","Button","Dropdown","__","useSelect","forwardRef","listView","ListView","store","blockEditorStore","BlockNavigationDropdownToggle","isEnabled","onToggle","isOpen","innerRef","props","createElement","ref","icon","onClick","undefined","label","className","BlockNavigationDropdown","isDisabled","since","alternative","hasBlocks","select","getBlockCount","contentClassName","popoverProps","placement","renderToggle","renderContent"],"sources":["@wordpress/block-editor/src/components/block-navigation/dropdown.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * WordPress dependencies\n */\nimport { Button, Dropdown } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\nimport { listView } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport ListView from '../list-view';\nimport { store as blockEditorStore } from '../../store';\n\nfunction BlockNavigationDropdownToggle( {\n\tisEnabled,\n\tonToggle,\n\tisOpen,\n\tinnerRef,\n\t...props\n} ) {\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ innerRef }\n\t\t\ticon={ listView }\n\t\t\taria-expanded={ isOpen }\n\t\t\taria-haspopup=\"true\"\n\t\t\tonClick={ isEnabled ? onToggle : undefined }\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\tlabel={ __( 'List view' ) }\n\t\t\tclassName=\"block-editor-block-navigation\"\n\t\t\taria-disabled={ ! isEnabled }\n\t\t/>\n\t);\n}\n\nfunction BlockNavigationDropdown( { isDisabled, ...props }, ref ) {\n\tdeprecated( 'wp.blockEditor.BlockNavigationDropdown', {\n\t\tsince: '6.1',\n\t\talternative: 'wp.components.Dropdown and wp.blockEditor.ListView',\n\t} );\n\n\tconst hasBlocks = useSelect(\n\t\t( select ) => !! select( blockEditorStore ).getBlockCount(),\n\t\t[]\n\t);\n\tconst isEnabled = hasBlocks && ! isDisabled;\n\n\treturn (\n\t\t<Dropdown\n\t\t\tcontentClassName=\"block-editor-block-navigation__popover\"\n\t\t\tpopoverProps={ { placement: 'bottom-start' } }\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<BlockNavigationDropdownToggle\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tinnerRef={ ref }\n\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\tonToggle={ onToggle }\n\t\t\t\t\tisEnabled={ isEnabled }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\trenderContent={ () => (\n\t\t\t\t<div className=\"block-editor-block-navigation__container\">\n\t\t\t\t\t<p className=\"block-editor-block-navigation__label\">\n\t\t\t\t\t\t{ __( 'List view' ) }\n\t\t\t\t\t</p>\n\n\t\t\t\t\t<ListView />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( BlockNavigationDropdown );\n"],"mappings":";AAAA;AACA;AACA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,EAAE;IAAe,CAAG;IAC9CC,YAAY,EAAGA,CAAE;MAAEpB,MAAM;MAAED;IAAS,CAAC,KACpCI,aAAA,CAACN,6BAA6B;MAAA,GACxBK,KAAK;MACVD,QAAQ,EAAGG,GAAK;MAChBJ,MAAM,EAAGA,MAAQ;MACjBD,QAAQ,EAAGA,QAAU;MACrBD,SAAS,EAAGA;IAAW,CACvB,CACC;IACHuB,aAAa,EAAGA,CAAA,KACflB,aAAA;MAAKM,SAAS,EAAC;IAA0C,GACxDN,aAAA;MAAGM,SAAS,EAAC;IAAsC,GAChDnB,EAAE,CAAE,WAAY,CAChB,CAAC,EAEJa,aAAA,CAACT,QAAQ,MAAE,CACP;EACH,CACH,CAAC;AAEJ;AAEA,eAAeF,UAAU,CAAEkB,uBAAwB,CAAC"}
1
+ {"version":3,"names":["deprecated","Button","Dropdown","__","useSelect","forwardRef","listView","ListView","store","blockEditorStore","BlockNavigationDropdownToggle","isEnabled","onToggle","isOpen","innerRef","props","createElement","ref","icon","onClick","undefined","label","className","BlockNavigationDropdown","isDisabled","since","alternative","hasBlocks","select","getBlockCount","contentClassName","popoverProps","placement","renderToggle","renderContent"],"sources":["@wordpress/block-editor/src/components/block-navigation/dropdown.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * WordPress dependencies\n */\nimport { Button, Dropdown } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\nimport { listView } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport ListView from '../list-view';\nimport { store as blockEditorStore } from '../../store';\n\nfunction BlockNavigationDropdownToggle( {\n\tisEnabled,\n\tonToggle,\n\tisOpen,\n\tinnerRef,\n\t...props\n} ) {\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ innerRef }\n\t\t\ticon={ listView }\n\t\t\taria-expanded={ isOpen }\n\t\t\taria-haspopup=\"true\"\n\t\t\tonClick={ isEnabled ? onToggle : undefined }\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\tlabel={ __( 'List view' ) }\n\t\t\tclassName=\"block-editor-block-navigation\"\n\t\t\taria-disabled={ ! isEnabled }\n\t\t/>\n\t);\n}\n\nfunction BlockNavigationDropdown( { isDisabled, ...props }, ref ) {\n\tdeprecated( 'wp.blockEditor.BlockNavigationDropdown', {\n\t\tsince: '6.1',\n\t\talternative: 'wp.components.Dropdown and wp.blockEditor.ListView',\n\t} );\n\n\tconst hasBlocks = useSelect(\n\t\t( select ) => !! select( blockEditorStore ).getBlockCount(),\n\t\t[]\n\t);\n\tconst isEnabled = hasBlocks && ! isDisabled;\n\n\treturn (\n\t\t<Dropdown\n\t\t\tcontentClassName=\"block-editor-block-navigation__popover\"\n\t\t\tpopoverProps={ { placement: 'bottom-start' } }\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<BlockNavigationDropdownToggle\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tinnerRef={ ref }\n\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\tonToggle={ onToggle }\n\t\t\t\t\tisEnabled={ isEnabled }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\trenderContent={ () => (\n\t\t\t\t<div className=\"block-editor-block-navigation__container\">\n\t\t\t\t\t<p className=\"block-editor-block-navigation__label\">\n\t\t\t\t\t\t{ __( 'List view' ) }\n\t\t\t\t\t</p>\n\n\t\t\t\t\t<ListView />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( BlockNavigationDropdown );\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,SAASC,MAAM,EAAEC,QAAQ,QAAQ,uBAAuB;AACxD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,UAAU,QAA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QAAQ,EAAGA,QAAU;MACrBD,SAAS,EAAGA;IAAW,CACvB,CACC;IACHuB,aAAa,EAAGA,CAAA,KACflB,aAAA;MAAKM,SAAS,EAAC;IAA0C,GACxDN,aAAA;MAAGM,SAAS,EAAC;IAAsC,GAChDnB,EAAE,CAAE,WAAY,CAChB,CAAC,EAEJa,aAAA,CAACT,QAAQ,MAAE,CACP;EACH,CACH,CAAC;AAEJ;AAEA,eAAeF,UAAU,CAAEkB,uBAAwB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["getBlockType","store","blocksStore","ToolbarButton","useSelect","useDispatch","__","sprintf","useRef","useBlockDisplayInformation","BlockIcon","useShowHoveredOrFocusedGestures","blockEditorStore","BlockParentSelector","selectBlock","firstParentClientId","isVisible","select","getBlockName","getBlockParents","getSelectedBlockClientId","getBlockEditingMode","hasBlockSupport","selectedBlockClientId","parents","_firstParentClientId","length","parentBlockName","_parentBlockType","blockInformation","nodeRef","showHoveredOrFocusedGestures","ref","highlightParent","createElement","className","key","onClick","label","title","showTooltip","icon"],"sources":["@wordpress/block-editor/src/components/block-parent-selector/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType, store as blocksStore } from '@wordpress/blocks';\nimport { ToolbarButton } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport BlockIcon from '../block-icon';\nimport { useShowHoveredOrFocusedGestures } from '../block-toolbar/utils';\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Block parent selector component, displaying the hierarchy of the\n * current block selection as a single icon to \"go up\" a level.\n *\n * @return {Component} Parent block selector.\n */\nexport default function BlockParentSelector() {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tconst { firstParentClientId, isVisible } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetBlockName,\n\t\t\tgetBlockParents,\n\t\t\tgetSelectedBlockClientId,\n\t\t\tgetBlockEditingMode,\n\t\t} = select( blockEditorStore );\n\t\tconst { hasBlockSupport } = select( blocksStore );\n\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\tconst parents = getBlockParents( selectedBlockClientId );\n\t\tconst _firstParentClientId = parents[ parents.length - 1 ];\n\t\tconst parentBlockName = getBlockName( _firstParentClientId );\n\t\tconst _parentBlockType = getBlockType( parentBlockName );\n\t\treturn {\n\t\t\tfirstParentClientId: _firstParentClientId,\n\t\t\tisVisible:\n\t\t\t\t_firstParentClientId &&\n\t\t\t\tgetBlockEditingMode( _firstParentClientId ) === 'default' &&\n\t\t\t\thasBlockSupport(\n\t\t\t\t\t_parentBlockType,\n\t\t\t\t\t'__experimentalParentSelector',\n\t\t\t\t\ttrue\n\t\t\t\t),\n\t\t};\n\t}, [] );\n\tconst blockInformation = useBlockDisplayInformation( firstParentClientId );\n\n\t// Allows highlighting the parent block outline when focusing or hovering\n\t// the parent block selector within the child.\n\tconst nodeRef = useRef();\n\tconst showHoveredOrFocusedGestures = useShowHoveredOrFocusedGestures( {\n\t\tref: nodeRef,\n\t\thighlightParent: true,\n\t} );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"block-editor-block-parent-selector\"\n\t\t\tkey={ firstParentClientId }\n\t\t\tref={ nodeRef }\n\t\t\t{ ...showHoveredOrFocusedGestures }\n\t\t>\n\t\t\t<ToolbarButton\n\t\t\t\tclassName=\"block-editor-block-parent-selector__button\"\n\t\t\t\tonClick={ () => selectBlock( firstParentClientId ) }\n\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t/* translators: %s: Name of the block's parent. */\n\t\t\t\t\t__( 'Select parent block: %s' ),\n\t\t\t\t\tblockInformation?.title\n\t\t\t\t) }\n\t\t\t\tshowTooltip\n\t\t\t\ticon={ <BlockIcon icon={ blockInformation?.icon } /> }\n\t\t\t/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,KAAK,SAAS,IACzDH,eAAe,CACdM,gBAAgB,EAChB,8BAA8B,EAC9B,IACD;IACF,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAMC,gBAAgB,GAAGpB,0BAA0B,CAAEM,mBAAoB,CAAC;;EAE1E;EACA;EACA,MAAMe,OAAO,GAAGtB,MAAM,CAAC,CAAC;EACxB,MAAMuB,4BAA4B,GAAGpB,+BAA+B,CAAE;IACrEqB,GAAG,EAAEF,OAAO;IACZG,eAAe,EAAE;EAClB,CAAE,CAAC;EAEH,IAAK,CAAEjB,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,OACCkB,aAAA;IACCC,SAAS,EAAC,oCAAoC;IAC9CC,GAAG,EAAGrB,mBAAqB;IAC3BiB,GAAG,EAAGF,OAAS;IAAA,GACVC;EAA4B,GAEjCG,aAAA,CAAC/B,aAAa;IACbgC,SAAS,EAAC,4CAA4C;IACtDE,OAAO,EAAGA,CAAA,KAAMvB,WAAW,CAAEC,mBAAoB,CAAG;IACpDuB,KAAK,EAAG/B,OAAO,EACd;IACAD,EAAE,CAAE,yBAA0B,CAAC,EAC/BuB,gBAAgB,EAAEU,KACnB,CAAG;IACHC,WAAW;IACXC,IAAI,EAAGP,aAAA,CAACxB,SAAS;MAAC+B,IAAI,EAAGZ,gBAAgB,EAAEY;IAAM,CAAE;EAAG,CACtD,CACG,CAAC;AAER"}
1
+ {"version":3,"names":["getBlockType","store","blocksStore","ToolbarButton","useSelect","useDispatch","__","sprintf","useRef","useBlockDisplayInformation","BlockIcon","useShowHoveredOrFocusedGestures","blockEditorStore","BlockParentSelector","selectBlock","firstParentClientId","isVisible","select","getBlockName","getBlockParents","getSelectedBlockClientId","getBlockEditingMode","hasBlockSupport","selectedBlockClientId","parents","_firstParentClientId","length","parentBlockName","_parentBlockType","blockInformation","nodeRef","showHoveredOrFocusedGestures","ref","highlightParent","createElement","className","key","onClick","label","title","showTooltip","icon"],"sources":["@wordpress/block-editor/src/components/block-parent-selector/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType, store as blocksStore } from '@wordpress/blocks';\nimport { ToolbarButton } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport BlockIcon from '../block-icon';\nimport { useShowHoveredOrFocusedGestures } from '../block-toolbar/utils';\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Block parent selector component, displaying the hierarchy of the\n * current block selection as a single icon to \"go up\" a level.\n *\n * @return {Component} Parent block selector.\n */\nexport default function BlockParentSelector() {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tconst { firstParentClientId, isVisible } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetBlockName,\n\t\t\tgetBlockParents,\n\t\t\tgetSelectedBlockClientId,\n\t\t\tgetBlockEditingMode,\n\t\t} = select( blockEditorStore );\n\t\tconst { hasBlockSupport } = select( blocksStore );\n\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\tconst parents = getBlockParents( selectedBlockClientId );\n\t\tconst _firstParentClientId = parents[ parents.length - 1 ];\n\t\tconst parentBlockName = getBlockName( _firstParentClientId );\n\t\tconst _parentBlockType = getBlockType( parentBlockName );\n\t\treturn {\n\t\t\tfirstParentClientId: _firstParentClientId,\n\t\t\tisVisible:\n\t\t\t\t_firstParentClientId &&\n\t\t\t\tgetBlockEditingMode( _firstParentClientId ) === 'default' &&\n\t\t\t\thasBlockSupport(\n\t\t\t\t\t_parentBlockType,\n\t\t\t\t\t'__experimentalParentSelector',\n\t\t\t\t\ttrue\n\t\t\t\t),\n\t\t};\n\t}, [] );\n\tconst blockInformation = useBlockDisplayInformation( firstParentClientId );\n\n\t// Allows highlighting the parent block outline when focusing or hovering\n\t// the parent block selector within the child.\n\tconst nodeRef = useRef();\n\tconst showHoveredOrFocusedGestures = useShowHoveredOrFocusedGestures( {\n\t\tref: nodeRef,\n\t\thighlightParent: true,\n\t} );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"block-editor-block-parent-selector\"\n\t\t\tkey={ firstParentClientId }\n\t\t\tref={ nodeRef }\n\t\t\t{ ...showHoveredOrFocusedGestures }\n\t\t>\n\t\t\t<ToolbarButton\n\t\t\t\tclassName=\"block-editor-block-parent-selector__button\"\n\t\t\t\tonClick={ () => selectBlock( firstParentClientId ) }\n\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t/* translators: %s: Name of the block's parent. */\n\t\t\t\t\t__( 'Select parent block: %s' ),\n\t\t\t\t\tblockInformation?.title\n\t\t\t\t) }\n\t\t\t\tshowTooltip\n\t\t\t\ticon={ <BlockIcon icon={ blockInformation?.icon } /> }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,YAAY,EAAEC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACtE,SAASC,aAAa,QAAQ,uBAAuB;AACrD,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,MAAM,QAAQ,oBAAoB;;AAE3C;AACA;AACA;AACA,OAAOC,0BAA0B,MAAM,kCAAkC;AACzE,OAAOC,SAAS,MAAM,eAAe;AACrC,SAASC,+BAA+B,QAAQ,wBAAwB;AACxE,SAASV,KAAK,IAAIW,gBAAgB,QAAQ,aAAa;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,mBAAmBA,CAAA,EAAG;EAC7C,MAAM;IAAEC;EAAY,CAAC,GAAGT,WAAW,CAAEO,gBAAiB,CAAC;EACvD,MAAM;IAAEG,mBAAmB;IAAEC;EAAU,CAAC,GAAGZ,SAAS,CAAIa,MAAM,IAAM;IACnE,MAAM;MACLC,YAAY;MACZC,eAAe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B,CAAC,EAC/BuB,gBAAgB,EAAEU,KACnB,CAAG;IACHC,WAAW;IACXC,IAAI,EAAGP,aAAA,CAACxB,SAAS;MAAC+B,IAAI,EAAGZ,gBAAgB,EAAEY;IAAM,CAAE;EAAG,CACtD,CACG,CAAC;AAER","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["VIEWMODES","carousel","grid"],"sources":["@wordpress/block-editor/src/components/block-pattern-setup/constants.js"],"sourcesContent":["export const VIEWMODES = {\n\tcarousel: 'carousel',\n\tgrid: 'grid',\n};\n"],"mappings":"AAAA,OAAO,MAAMA,SAAS,GAAG;EACxBC,QAAQ,EAAE,UAAU;EACpBC,IAAI,EAAE;AACP,CAAC"}
1
+ {"version":3,"names":["VIEWMODES","carousel","grid"],"sources":["@wordpress/block-editor/src/components/block-pattern-setup/constants.js"],"sourcesContent":["export const VIEWMODES = {\n\tcarousel: 'carousel',\n\tgrid: 'grid',\n};\n"],"mappings":"AAAA,OAAO,MAAMA,SAAS,GAAG;EACxBC,QAAQ,EAAE,UAAU;EACpBC,IAAI,EAAE;AACP,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useDispatch","cloneBlock","VisuallyHidden","privateApis","componentsPrivateApis","useState","useInstanceId","__","store","blockEditorStore","BlockPreview","SetupToolbar","usePatternsSetup","VIEWMODES","unlock","CompositeV2","Composite","CompositeItemV2","CompositeItem","useCompositeStoreV2","useCompositeStore","SetupContent","viewMode","activeSlide","patterns","onBlockPatternSelect","showTitles","compositeStore","containerClass","carousel","slideClass","Map","createElement","className","map","pattern","index","BlockPatternSlide","active","get","key","name","role","BlockPattern","onSelect","baseClassName","blocks","description","viewportWidth","descriptionId","render","undefined","title","id","onClick","minHeight","BlockPatternSetup","clientId","blockName","filterPatternsFn","initialViewMode","setViewMode","setActiveSlide","replaceBlock","length","onBlockPatternSelectDefault","clonedBlocks","block","onPatternSelectCallback","Fragment","totalSlides","handleNext","Math","min","handlePrevious","max"],"sources":["@wordpress/block-editor/src/components/block-pattern-setup/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { cloneBlock } from '@wordpress/blocks';\nimport {\n\tVisuallyHidden,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\n\nimport { useState } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport BlockPreview from '../block-preview';\nimport SetupToolbar from './setup-toolbar';\nimport usePatternsSetup from './use-patterns-setup';\nimport { VIEWMODES } from './constants';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tCompositeV2: Composite,\n\tCompositeItemV2: CompositeItem,\n\tuseCompositeStoreV2: useCompositeStore,\n} = unlock( componentsPrivateApis );\n\nconst SetupContent = ( {\n\tviewMode,\n\tactiveSlide,\n\tpatterns,\n\tonBlockPatternSelect,\n\tshowTitles,\n} ) => {\n\tconst compositeStore = useCompositeStore();\n\tconst containerClass = 'block-editor-block-pattern-setup__container';\n\n\tif ( viewMode === VIEWMODES.carousel ) {\n\t\tconst slideClass = new Map( [\n\t\t\t[ activeSlide, 'active-slide' ],\n\t\t\t[ activeSlide - 1, 'previous-slide' ],\n\t\t\t[ activeSlide + 1, 'next-slide' ],\n\t\t] );\n\t\treturn (\n\t\t\t<div className=\"block-editor-block-pattern-setup__carousel\">\n\t\t\t\t<div className={ containerClass }>\n\t\t\t\t\t<div className=\"carousel-container\">\n\t\t\t\t\t\t{ patterns.map( ( pattern, index ) => (\n\t\t\t\t\t\t\t<BlockPatternSlide\n\t\t\t\t\t\t\t\tactive={ index === activeSlide }\n\t\t\t\t\t\t\t\tclassName={ slideClass.get( index ) || '' }\n\t\t\t\t\t\t\t\tkey={ pattern.name }\n\t\t\t\t\t\t\t\tpattern={ pattern }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"block-editor-block-pattern-setup__grid\">\n\t\t\t<Composite\n\t\t\t\tstore={ compositeStore }\n\t\t\t\trole=\"listbox\"\n\t\t\t\tclassName={ containerClass }\n\t\t\t\taria-label={ __( 'Patterns list' ) }\n\t\t\t>\n\t\t\t\t{ patterns.map( ( pattern ) => (\n\t\t\t\t\t<BlockPattern\n\t\t\t\t\t\tkey={ pattern.name }\n\t\t\t\t\t\tpattern={ pattern }\n\t\t\t\t\t\tonSelect={ onBlockPatternSelect }\n\t\t\t\t\t\tshowTitles={ showTitles }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</Composite>\n\t\t</div>\n\t);\n};\n\nfunction BlockPattern( { pattern, onSelect, showTitles } ) {\n\tconst baseClassName = 'block-editor-block-pattern-setup-list';\n\tconst { blocks, description, viewportWidth = 700 } = pattern;\n\tconst descriptionId = useInstanceId(\n\t\tBlockPattern,\n\t\t`${ baseClassName }__item-description`\n\t);\n\treturn (\n\t\t<div className={ `${ baseClassName }__list-item` }>\n\t\t\t<CompositeItem\n\t\t\t\trender={\n\t\t\t\t\t<div\n\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\tdescription ? descriptionId : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ pattern.title }\n\t\t\t\t\t\tclassName={ `${ baseClassName }__item` }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tid={ `${ baseClassName }__pattern__${ pattern.name }` }\n\t\t\t\trole=\"option\"\n\t\t\t\tonClick={ () => onSelect( blocks ) }\n\t\t\t>\n\t\t\t\t<BlockPreview\n\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\tviewportWidth={ viewportWidth }\n\t\t\t\t/>\n\t\t\t\t{ showTitles && (\n\t\t\t\t\t<div className={ `${ baseClassName }__item-title` }>\n\t\t\t\t\t\t{ pattern.title }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t{ !! description && (\n\t\t\t\t\t<VisuallyHidden id={ descriptionId }>\n\t\t\t\t\t\t{ description }\n\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t) }\n\t\t\t</CompositeItem>\n\t\t</div>\n\t);\n}\n\nfunction BlockPatternSlide( { active, className, pattern, minHeight } ) {\n\tconst { blocks, title, description } = pattern;\n\tconst descriptionId = useInstanceId(\n\t\tBlockPatternSlide,\n\t\t'block-editor-block-pattern-setup-list__item-description'\n\t);\n\treturn (\n\t\t<div\n\t\t\taria-hidden={ ! active }\n\t\t\trole=\"img\"\n\t\t\tclassName={ `pattern-slide ${ className }` }\n\t\t\taria-label={ title }\n\t\t\taria-describedby={ description ? descriptionId : undefined }\n\t\t>\n\t\t\t<BlockPreview blocks={ blocks } minHeight={ minHeight } />\n\t\t\t{ !! description && (\n\t\t\t\t<VisuallyHidden id={ descriptionId }>\n\t\t\t\t\t{ description }\n\t\t\t\t</VisuallyHidden>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nconst BlockPatternSetup = ( {\n\tclientId,\n\tblockName,\n\tfilterPatternsFn,\n\tonBlockPatternSelect,\n\tinitialViewMode = VIEWMODES.carousel,\n\tshowTitles = false,\n} ) => {\n\tconst [ viewMode, setViewMode ] = useState( initialViewMode );\n\tconst [ activeSlide, setActiveSlide ] = useState( 0 );\n\tconst { replaceBlock } = useDispatch( blockEditorStore );\n\tconst patterns = usePatternsSetup( clientId, blockName, filterPatternsFn );\n\n\tif ( ! patterns?.length ) {\n\t\treturn null;\n\t}\n\n\tconst onBlockPatternSelectDefault = ( blocks ) => {\n\t\tconst clonedBlocks = blocks.map( ( block ) => cloneBlock( block ) );\n\t\treplaceBlock( clientId, clonedBlocks );\n\t};\n\tconst onPatternSelectCallback =\n\t\tonBlockPatternSelect || onBlockPatternSelectDefault;\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tclassName={ `block-editor-block-pattern-setup view-mode-${ viewMode }` }\n\t\t\t>\n\t\t\t\t<SetupContent\n\t\t\t\t\tviewMode={ viewMode }\n\t\t\t\t\tactiveSlide={ activeSlide }\n\t\t\t\t\tpatterns={ patterns }\n\t\t\t\t\tonBlockPatternSelect={ onPatternSelectCallback }\n\t\t\t\t\tshowTitles={ showTitles }\n\t\t\t\t/>\n\t\t\t\t<SetupToolbar\n\t\t\t\t\tviewMode={ viewMode }\n\t\t\t\t\tsetViewMode={ setViewMode }\n\t\t\t\t\tactiveSlide={ activeSlide }\n\t\t\t\t\ttotalSlides={ patterns.length }\n\t\t\t\t\thandleNext={ () => {\n\t\t\t\t\t\tsetActiveSlide( ( active ) =>\n\t\t\t\t\t\t\tMath.min( active + 1, patterns.length - 1 )\n\t\t\t\t\t\t);\n\t\t\t\t\t} }\n\t\t\t\t\thandlePrevious={ () => {\n\t\t\t\t\t\tsetActiveSlide( ( active ) =>\n\t\t\t\t\t\t\tMath.max( active - 1, 0 )\n\t\t\t\t\t\t);\n\t\t\t\t\t} }\n\t\t\t\t\tonBlockPatternSelect={ () => {\n\t\t\t\t\t\tonPatternSelectCallback(\n\t\t\t\t\t\t\tpatterns[ activeSlide ].blocks\n\t\t\t\t\t\t);\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n\nexport default BlockPatternSetup;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,UAAU,QAAQ,mBAAmB;AAC9C,SACCC,cAAc,EACdC,WAAW,IAAIC,qBAAqB,QAC9B,uBAAuB;AAE9B,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,gBAAgB,MAAM,sBAAsB;AACn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AAM,CAACZ,GAAG,CAAIiC,KAAK,IAAMlE,UAAU,CAAEkE,KAAM,CAAE,CAAC;IACnEJ,YAAY,CAAEN,QAAQ,EAAES,YAAa,CAAC;EACvC,CAAC;EACD,MAAME,uBAAuB,GAC5B3C,oBAAoB,IAAIwC,2BAA2B;EACpD,OACCjC,aAAA,CAAAqC,QAAA,QACCrC,aAAA;IACCC,SAAS,EAAI,8CAA8CX,QAAU;EAAG,GAExEU,aAAA,CAACX,YAAY;IACZC,QAAQ,EAAGA,QAAU;IACrBC,WAAW,EAAGA,WAAa;IAC3BC,QAAQ,EAAGA,QAAU;IACrBC,oBAAoB,EAAG2C,uBAAyB;IAChD1C,UAAU,EAAGA;EAAY,CACzB,CAAC,EACFM,aAAA,CAACrB,YAAY;IACZW,QAAQ,EAAGA,QAAU;IACrBuC,WAAW,EAAGA,WAAa;IAC3BtC,WAAW,EAAGA,WAAa;IAC3B+C,WAAW,EAAG9C,QAAQ,CAACwC,MAAQ;IAC/BO,UAAU,EAAGA,CAAA,KAAM;MAClBT,cAAc,CAAIxB,MAAM,IACvBkC,IAAI,CAACC,GAAG,CAAEnC,MAAM,GAAG,CAAC,EAAEd,QAAQ,CAACwC,MAAM,GAAG,CAAE,CAC3C,CAAC;IACF,CAAG;IACHU,cAAc,EAAGA,CAAA,KAAM;MACtBZ,cAAc,CAAIxB,MAAM,IACvBkC,IAAI,CAACG,GAAG,CAAErC,MAAM,GAAG,CAAC,EAAE,CAAE,CACzB,CAAC;IACF,CAAG;IACHb,oBAAoB,EAAGA,CAAA,KAAM;MAC5B2C,uBAAuB,CACtB5C,QAAQ,CAAED,WAAW,CAAE,CAACuB,MACzB,CAAC;IACF;EAAG,CACH,CACG,CACJ,CAAC;AAEL,CAAC;AAED,eAAeU,iBAAiB"}
1
+ {"version":3,"names":["useDispatch","cloneBlock","VisuallyHidden","privateApis","componentsPrivateApis","useState","useInstanceId","__","store","blockEditorStore","BlockPreview","SetupToolbar","usePatternsSetup","VIEWMODES","unlock","CompositeV2","Composite","CompositeItemV2","CompositeItem","useCompositeStoreV2","useCompositeStore","SetupContent","viewMode","activeSlide","patterns","onBlockPatternSelect","showTitles","compositeStore","containerClass","carousel","slideClass","Map","createElement","className","map","pattern","index","BlockPatternSlide","active","get","key","name","role","BlockPattern","onSelect","baseClassName","blocks","description","viewportWidth","descriptionId","render","undefined","title","id","onClick","minHeight","BlockPatternSetup","clientId","blockName","filterPatternsFn","initialViewMode","setViewMode","setActiveSlide","replaceBlock","length","onBlockPatternSelectDefault","clonedBlocks","block","onPatternSelectCallback","Fragment","totalSlides","handleNext","Math","min","handlePrevious","max"],"sources":["@wordpress/block-editor/src/components/block-pattern-setup/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { cloneBlock } from '@wordpress/blocks';\nimport {\n\tVisuallyHidden,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\n\nimport { useState } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport BlockPreview from '../block-preview';\nimport SetupToolbar from './setup-toolbar';\nimport usePatternsSetup from './use-patterns-setup';\nimport { VIEWMODES } from './constants';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tCompositeV2: Composite,\n\tCompositeItemV2: CompositeItem,\n\tuseCompositeStoreV2: useCompositeStore,\n} = unlock( componentsPrivateApis );\n\nconst SetupContent = ( {\n\tviewMode,\n\tactiveSlide,\n\tpatterns,\n\tonBlockPatternSelect,\n\tshowTitles,\n} ) => {\n\tconst compositeStore = useCompositeStore();\n\tconst containerClass = 'block-editor-block-pattern-setup__container';\n\n\tif ( viewMode === VIEWMODES.carousel ) {\n\t\tconst slideClass = new Map( [\n\t\t\t[ activeSlide, 'active-slide' ],\n\t\t\t[ activeSlide - 1, 'previous-slide' ],\n\t\t\t[ activeSlide + 1, 'next-slide' ],\n\t\t] );\n\t\treturn (\n\t\t\t<div className=\"block-editor-block-pattern-setup__carousel\">\n\t\t\t\t<div className={ containerClass }>\n\t\t\t\t\t<div className=\"carousel-container\">\n\t\t\t\t\t\t{ patterns.map( ( pattern, index ) => (\n\t\t\t\t\t\t\t<BlockPatternSlide\n\t\t\t\t\t\t\t\tactive={ index === activeSlide }\n\t\t\t\t\t\t\t\tclassName={ slideClass.get( index ) || '' }\n\t\t\t\t\t\t\t\tkey={ pattern.name }\n\t\t\t\t\t\t\t\tpattern={ pattern }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"block-editor-block-pattern-setup__grid\">\n\t\t\t<Composite\n\t\t\t\tstore={ compositeStore }\n\t\t\t\trole=\"listbox\"\n\t\t\t\tclassName={ containerClass }\n\t\t\t\taria-label={ __( 'Patterns list' ) }\n\t\t\t>\n\t\t\t\t{ patterns.map( ( pattern ) => (\n\t\t\t\t\t<BlockPattern\n\t\t\t\t\t\tkey={ pattern.name }\n\t\t\t\t\t\tpattern={ pattern }\n\t\t\t\t\t\tonSelect={ onBlockPatternSelect }\n\t\t\t\t\t\tshowTitles={ showTitles }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</Composite>\n\t\t</div>\n\t);\n};\n\nfunction BlockPattern( { pattern, onSelect, showTitles } ) {\n\tconst baseClassName = 'block-editor-block-pattern-setup-list';\n\tconst { blocks, description, viewportWidth = 700 } = pattern;\n\tconst descriptionId = useInstanceId(\n\t\tBlockPattern,\n\t\t`${ baseClassName }__item-description`\n\t);\n\treturn (\n\t\t<div className={ `${ baseClassName }__list-item` }>\n\t\t\t<CompositeItem\n\t\t\t\trender={\n\t\t\t\t\t<div\n\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\tdescription ? descriptionId : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ pattern.title }\n\t\t\t\t\t\tclassName={ `${ baseClassName }__item` }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tid={ `${ baseClassName }__pattern__${ pattern.name }` }\n\t\t\t\trole=\"option\"\n\t\t\t\tonClick={ () => onSelect( blocks ) }\n\t\t\t>\n\t\t\t\t<BlockPreview\n\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\tviewportWidth={ viewportWidth }\n\t\t\t\t/>\n\t\t\t\t{ showTitles && (\n\t\t\t\t\t<div className={ `${ baseClassName }__item-title` }>\n\t\t\t\t\t\t{ pattern.title }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t{ !! description && (\n\t\t\t\t\t<VisuallyHidden id={ descriptionId }>\n\t\t\t\t\t\t{ description }\n\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t) }\n\t\t\t</CompositeItem>\n\t\t</div>\n\t);\n}\n\nfunction BlockPatternSlide( { active, className, pattern, minHeight } ) {\n\tconst { blocks, title, description } = pattern;\n\tconst descriptionId = useInstanceId(\n\t\tBlockPatternSlide,\n\t\t'block-editor-block-pattern-setup-list__item-description'\n\t);\n\treturn (\n\t\t<div\n\t\t\taria-hidden={ ! active }\n\t\t\trole=\"img\"\n\t\t\tclassName={ `pattern-slide ${ className }` }\n\t\t\taria-label={ title }\n\t\t\taria-describedby={ description ? descriptionId : undefined }\n\t\t>\n\t\t\t<BlockPreview blocks={ blocks } minHeight={ minHeight } />\n\t\t\t{ !! description && (\n\t\t\t\t<VisuallyHidden id={ descriptionId }>\n\t\t\t\t\t{ description }\n\t\t\t\t</VisuallyHidden>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nconst BlockPatternSetup = ( {\n\tclientId,\n\tblockName,\n\tfilterPatternsFn,\n\tonBlockPatternSelect,\n\tinitialViewMode = VIEWMODES.carousel,\n\tshowTitles = false,\n} ) => {\n\tconst [ viewMode, setViewMode ] = useState( initialViewMode );\n\tconst [ activeSlide, setActiveSlide ] = useState( 0 );\n\tconst { replaceBlock } = useDispatch( blockEditorStore );\n\tconst patterns = usePatternsSetup( clientId, blockName, filterPatternsFn );\n\n\tif ( ! patterns?.length ) {\n\t\treturn null;\n\t}\n\n\tconst onBlockPatternSelectDefault = ( blocks ) => {\n\t\tconst clonedBlocks = blocks.map( ( block ) => cloneBlock( block ) );\n\t\treplaceBlock( clientId, clonedBlocks );\n\t};\n\tconst onPatternSelectCallback =\n\t\tonBlockPatternSelect || onBlockPatternSelectDefault;\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tclassName={ `block-editor-block-pattern-setup view-mode-${ viewMode }` }\n\t\t\t>\n\t\t\t\t<SetupContent\n\t\t\t\t\tviewMode={ viewMode }\n\t\t\t\t\tactiveSlide={ activeSlide }\n\t\t\t\t\tpatterns={ patterns }\n\t\t\t\t\tonBlockPatternSelect={ onPatternSelectCallback }\n\t\t\t\t\tshowTitles={ showTitles }\n\t\t\t\t/>\n\t\t\t\t<SetupToolbar\n\t\t\t\t\tviewMode={ viewMode }\n\t\t\t\t\tsetViewMode={ setViewMode }\n\t\t\t\t\tactiveSlide={ activeSlide }\n\t\t\t\t\ttotalSlides={ patterns.length }\n\t\t\t\t\thandleNext={ () => {\n\t\t\t\t\t\tsetActiveSlide( ( active ) =>\n\t\t\t\t\t\t\tMath.min( active + 1, patterns.length - 1 )\n\t\t\t\t\t\t);\n\t\t\t\t\t} }\n\t\t\t\t\thandlePrevious={ () => {\n\t\t\t\t\t\tsetActiveSlide( ( active ) =>\n\t\t\t\t\t\t\tMath.max( active - 1, 0 )\n\t\t\t\t\t\t);\n\t\t\t\t\t} }\n\t\t\t\t\tonBlockPatternSelect={ () => {\n\t\t\t\t\t\tonPatternSelectCallback(\n\t\t\t\t\t\t\tpatterns[ activeSlide ].blocks\n\t\t\t\t\t\t);\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n\nexport default BlockPatternSetup;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,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xB,MAAM,IACvBkC,IAAI,CAACG,GAAG,CAAErC,MAAM,GAAG,CAAC,EAAE,CAAE,CACzB,CAAC;IACF,CAAG;IACHb,oBAAoB,EAAGA,CAAA,KAAM;MAC5B2C,uBAAuB,CACtB5C,QAAQ,CAAED,WAAW,CAAE,CAACuB,MACzB,CAAC;IACF;EAAG,CACH,CACG,CACJ,CAAC;AAEL,CAAC;AAED,eAAeU,iBAAiB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__","Button","chevronRight","chevronLeft","grid","stretchFullWidth","VIEWMODES","Actions","onBlockPatternSelect","createElement","className","variant","onClick","CarouselNavigation","handlePrevious","handleNext","activeSlide","totalSlides","icon","label","disabled","__experimentalIsFocusable","SetupToolbar","viewMode","setViewMode","isCarouselView","carousel","displayControls","isPressed"],"sources":["@wordpress/block-editor/src/components/block-pattern-setup/setup-toolbar.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport {\n\tchevronRight,\n\tchevronLeft,\n\tgrid,\n\tstretchFullWidth,\n} from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { VIEWMODES } from './constants';\n\nconst Actions = ( { onBlockPatternSelect } ) => (\n\t<div className=\"block-editor-block-pattern-setup__actions\">\n\t\t<Button variant=\"primary\" onClick={ onBlockPatternSelect }>\n\t\t\t{ __( 'Choose' ) }\n\t\t</Button>\n\t</div>\n);\n\nconst CarouselNavigation = ( {\n\thandlePrevious,\n\thandleNext,\n\tactiveSlide,\n\ttotalSlides,\n} ) => (\n\t<div className=\"block-editor-block-pattern-setup__navigation\">\n\t\t<Button\n\t\t\ticon={ chevronLeft }\n\t\t\tlabel={ __( 'Previous pattern' ) }\n\t\t\tonClick={ handlePrevious }\n\t\t\tdisabled={ activeSlide === 0 }\n\t\t\t__experimentalIsFocusable\n\t\t/>\n\t\t<Button\n\t\t\ticon={ chevronRight }\n\t\t\tlabel={ __( 'Next pattern' ) }\n\t\t\tonClick={ handleNext }\n\t\t\tdisabled={ activeSlide === totalSlides - 1 }\n\t\t\t__experimentalIsFocusable\n\t\t/>\n\t</div>\n);\n\nconst SetupToolbar = ( {\n\tviewMode,\n\tsetViewMode,\n\thandlePrevious,\n\thandleNext,\n\tactiveSlide,\n\ttotalSlides,\n\tonBlockPatternSelect,\n} ) => {\n\tconst isCarouselView = viewMode === VIEWMODES.carousel;\n\tconst displayControls = (\n\t\t<div className=\"block-editor-block-pattern-setup__display-controls\">\n\t\t\t<Button\n\t\t\t\ticon={ stretchFullWidth }\n\t\t\t\tlabel={ __( 'Carousel view' ) }\n\t\t\t\tonClick={ () => setViewMode( VIEWMODES.carousel ) }\n\t\t\t\tisPressed={ isCarouselView }\n\t\t\t/>\n\t\t\t<Button\n\t\t\t\ticon={ grid }\n\t\t\t\tlabel={ __( 'Grid view' ) }\n\t\t\t\tonClick={ () => setViewMode( VIEWMODES.grid ) }\n\t\t\t\tisPressed={ viewMode === VIEWMODES.grid }\n\t\t\t/>\n\t\t</div>\n\t);\n\treturn (\n\t\t<div className=\"block-editor-block-pattern-setup__toolbar\">\n\t\t\t{ isCarouselView && (\n\t\t\t\t<CarouselNavigation\n\t\t\t\t\thandlePrevious={ handlePrevious }\n\t\t\t\t\thandleNext={ handleNext }\n\t\t\t\t\tactiveSlide={ activeSlide }\n\t\t\t\t\ttotalSlides={ totalSlides }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ displayControls }\n\t\t\t{ isCarouselView && (\n\t\t\t\t<Actions onBlockPatternSelect={ onBlockPatternSelect } />\n\t\t\t) }\n\t\t</div>\n\t);\n};\n\nexport default SetupToolbar;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SACCC,YAAY,EACZC,WAAW,EACXC,IAAI,EACJC,gBAAgB,QACV,kBAAkB;;AAEzB;AACA;AACA;AACA,SAASC,SAAS,QAAQ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,CAAC,EACFhB,aAAA,CAACR,MAAM;IACNiB,IAAI,EAAGd,IAAM;IACbe,KAAK,EAAGnB,EAAE,CAAE,WAAY,CAAG;IAC3BY,OAAO,EAAGA,CAAA,KAAMY,WAAW,CAAElB,SAAS,CAACF,IAAK,CAAG;IAC/CwB,SAAS,EAAGL,QAAQ,KAAKjB,SAAS,CAACF;EAAM,CACzC,CACG,CACL;EACD,OACCK,aAAA;IAAKC,SAAS,EAAC;EAA2C,GACvDe,cAAc,IACfhB,aAAA,CAACI,kBAAkB;IAClBC,cAAc,EAAGA,cAAgB;IACjCC,UAAU,EAAGA,UAAY;IACzBC,WAAW,EAAGA,WAAa;IAC3BC,WAAW,EAAGA;EAAa,CAC3B,CACD,EACCU,eAAe,EACfF,cAAc,IACfhB,aAAA,CAACF,OAAO;IAACC,oBAAoB,EAAGA;EAAsB,CAAE,CAErD,CAAC;AAER,CAAC;AAED,eAAec,YAAY"}
1
+ {"version":3,"names":["__","Button","chevronRight","chevronLeft","grid","stretchFullWidth","VIEWMODES","Actions","onBlockPatternSelect","createElement","className","variant","onClick","CarouselNavigation","handlePrevious","handleNext","activeSlide","totalSlides","icon","label","disabled","__experimentalIsFocusable","SetupToolbar","viewMode","setViewMode","isCarouselView","carousel","displayControls","isPressed"],"sources":["@wordpress/block-editor/src/components/block-pattern-setup/setup-toolbar.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport {\n\tchevronRight,\n\tchevronLeft,\n\tgrid,\n\tstretchFullWidth,\n} from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { VIEWMODES } from './constants';\n\nconst Actions = ( { onBlockPatternSelect } ) => (\n\t<div className=\"block-editor-block-pattern-setup__actions\">\n\t\t<Button variant=\"primary\" onClick={ onBlockPatternSelect }>\n\t\t\t{ __( 'Choose' ) }\n\t\t</Button>\n\t</div>\n);\n\nconst CarouselNavigation = ( {\n\thandlePrevious,\n\thandleNext,\n\tactiveSlide,\n\ttotalSlides,\n} ) => (\n\t<div className=\"block-editor-block-pattern-setup__navigation\">\n\t\t<Button\n\t\t\ticon={ chevronLeft }\n\t\t\tlabel={ __( 'Previous pattern' ) }\n\t\t\tonClick={ handlePrevious }\n\t\t\tdisabled={ activeSlide === 0 }\n\t\t\t__experimentalIsFocusable\n\t\t/>\n\t\t<Button\n\t\t\ticon={ chevronRight }\n\t\t\tlabel={ __( 'Next pattern' ) }\n\t\t\tonClick={ handleNext }\n\t\t\tdisabled={ activeSlide === totalSlides - 1 }\n\t\t\t__experimentalIsFocusable\n\t\t/>\n\t</div>\n);\n\nconst SetupToolbar = ( {\n\tviewMode,\n\tsetViewMode,\n\thandlePrevious,\n\thandleNext,\n\tactiveSlide,\n\ttotalSlides,\n\tonBlockPatternSelect,\n} ) => {\n\tconst isCarouselView = viewMode === VIEWMODES.carousel;\n\tconst displayControls = (\n\t\t<div className=\"block-editor-block-pattern-setup__display-controls\">\n\t\t\t<Button\n\t\t\t\ticon={ stretchFullWidth }\n\t\t\t\tlabel={ __( 'Carousel view' ) }\n\t\t\t\tonClick={ () => setViewMode( VIEWMODES.carousel ) }\n\t\t\t\tisPressed={ isCarouselView }\n\t\t\t/>\n\t\t\t<Button\n\t\t\t\ticon={ grid }\n\t\t\t\tlabel={ __( 'Grid view' ) }\n\t\t\t\tonClick={ () => setViewMode( VIEWMODES.grid ) }\n\t\t\t\tisPressed={ viewMode === VIEWMODES.grid }\n\t\t\t/>\n\t\t</div>\n\t);\n\treturn (\n\t\t<div className=\"block-editor-block-pattern-setup__toolbar\">\n\t\t\t{ isCarouselView && (\n\t\t\t\t<CarouselNavigation\n\t\t\t\t\thandlePrevious={ handlePrevious }\n\t\t\t\t\thandleNext={ handleNext }\n\t\t\t\t\tactiveSlide={ activeSlide }\n\t\t\t\t\ttotalSlides={ totalSlides }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ displayControls }\n\t\t\t{ isCarouselView && (\n\t\t\t\t<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SAAS,CAACoB,QAAQ;EACtD,MAAMC,eAAe,GACpBlB,aAAA;IAAKC,SAAS,EAAC;EAAoD,GAClED,aAAA,CAACR,MAAM;IACNiB,IAAI,EAAGb,gBAAkB;IACzBc,KAAK,EAAGnB,EAAE,CAAE,eAAgB,CAAG;IAC/BY,OAAO,EAAGA,CAAA,KAAMY,WAAW,CAAElB,SAAS,CAACoB,QAAS,CAAG;IACnDE,SAAS,EAAGH;EAAgB,CAC5B,CAAC,EACFhB,aAAA,CAACR,MAAM;IACNiB,IAAI,EAAGd,IAAM;IACbe,KAAK,EAAGnB,EAAE,CAAE,WAAY,CAAG;IAC3BY,OAAO,EAAGA,CAAA,KAAMY,WAAW,CAAElB,SAAS,CAACF,IAAK,CAAG;IAC/CwB,SAAS,EAAGL,QAAQ,KAAKjB,SAAS,CAACF;EAAM,CACzC,CACG,CACL;EACD,OACCK,aAAA;IAAKC,SAAS,EAAC;EAA2C,GACvDe,cAAc,IACfhB,aAAA,CAACI,kBAAkB;IAClBC,cAAc,EAAGA,cAAgB;IACjCC,UAAU,EAAGA,UAAY;IACzBC,WAAW,EAAGA,WAAa;IAC3BC,WAAW,EAAGA;EAAa,CAC3B,CACD,EACCU,eAAe,EACfF,cAAc,IACfhB,aAAA,CAACF,OAAO;IAACC,oBAAoB,EAAGA;EAAsB,CAAE,CAErD,CAAC;AAER,CAAC;AAED,eAAec,YAAY","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","store","blockEditorStore","usePatternsSetup","clientId","blockName","filterPatternsFn","select","getBlockRootClientId","getPatternsByBlockTypes","__experimentalGetAllowedPatterns","rootClientId","filter"],"sources":["@wordpress/block-editor/src/components/block-pattern-setup/use-patterns-setup.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nfunction usePatternsSetup( clientId, blockName, filterPatternsFn ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetPatternsByBlockTypes,\n\t\t\t\t__experimentalGetAllowedPatterns,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\tif ( filterPatternsFn ) {\n\t\t\t\treturn __experimentalGetAllowedPatterns( rootClientId ).filter(\n\t\t\t\t\tfilterPatternsFn\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn getPatternsByBlockTypes( blockName, rootClientId );\n\t\t},\n\t\t[ clientId, blockName, filterPatternsFn ]\n\t);\n}\n\nexport default usePatternsSetup;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AAEvD,SAASC,gBAAgBA,CAAEC,QAAQ,EAAEC,SAAS,EAAEC,gBAAgB,EAAG;EAClE,OAAON,SAAS,CACbO,MAAM,IAAM;IACb,MAAM;MACLC,oBAAoB;MACpBC,uBAAuB;MACvBC;IACD,CAAC,GAAGH,MAAM,CAAEL,gBAAiB,CAAC;IAC9B,MAAMS,YAAY,GAAGH,oBAAoB,CAAEJ,QAAS,CAAC;IACrD,IAAKE,gBAAgB,EAAG;MACvB,OAAOI,gCAAgC,CAAEC,YAAa,CAAC,CAACC,MAAM,CAC7DN,gBACD,CAAC;IACF;IACA,OAAOG,uBAAuB,CAAEJ,SAAS,EAAEM,YAAa,CAAC;EAC1D,CAAC,EACD,CAAEP,QAAQ,EAAEC,SAAS,EAAEC,gBAAgB,CACxC,CAAC;AACF;AAEA,eAAeH,gBAAgB"}
1
+ {"version":3,"names":["useSelect","store","blockEditorStore","usePatternsSetup","clientId","blockName","filterPatternsFn","select","getBlockRootClientId","getPatternsByBlockTypes","__experimentalGetAllowedPatterns","rootClientId","filter"],"sources":["@wordpress/block-editor/src/components/block-pattern-setup/use-patterns-setup.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nfunction usePatternsSetup( clientId, blockName, filterPatternsFn ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetPatternsByBlockTypes,\n\t\t\t\t__experimentalGetAllowedPatterns,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\tif ( filterPatternsFn ) {\n\t\t\t\treturn __experimentalGetAllowedPatterns( rootClientId ).filter(\n\t\t\t\t\tfilterPatternsFn\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn getPatternsByBlockTypes( blockName, rootClientId );\n\t\t},\n\t\t[ clientId, blockName, filterPatternsFn ]\n\t);\n}\n\nexport default usePatternsSetup;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AAEvD,SAASC,gBAAgBA,CAAEC,QAAQ,EAAEC,SAAS,EAAEC,gBAAgB,EAAG;EAClE,OAAON,SAAS,CACbO,MAAM,IAAM;IACb,MAAM;MACLC,oBAAoB;MACpBC,uBAAuB;MACvBC;IACD,CAAC,GAAGH,MAAM,CAAEL,gBAAiB,CAAC;IAC9B,MAAMS,YAAY,GAAGH,oBAAoB,CAAEJ,QAAS,CAAC;IACrD,IAAKE,gBAAgB,EAAG;MACvB,OAAOI,gCAAgC,CAAEC,YAAa,CAAC,CAACC,MAAM,CAC7DN,gBACD,CAAC;IACF;IACA,OAAOG,uBAAuB,CAAEJ,SAAS,EAAEM,YAAa,CAAC;EAC1D,CAAC,EACD,CAAEP,QAAQ,EAAEC,SAAS,EAAEC,gBAAgB,CACxC,CAAC;AACF;AAEA,eAAeH,gBAAgB","ignoreList":[]}
@@ -44,6 +44,7 @@ function BlockPattern({
44
44
  pattern,
45
45
  onClick,
46
46
  onHover,
47
+ showTitle = true,
47
48
  showTooltip
48
49
  }) {
49
50
  const [isDragging, setIsDragging] = useState(false);
@@ -104,7 +105,7 @@ function BlockPattern({
104
105
  }, createElement(BlockPreview, {
105
106
  blocks: blocks,
106
107
  viewportWidth: viewportWidth
107
- }), createElement(HStack, {
108
+ }), showTitle && createElement(HStack, {
108
109
  className: "block-editor-patterns__pattern-details"
109
110
  }, pattern.type === INSERTER_PATTERN_TYPES.user && !pattern.syncStatus && createElement("div", {
110
111
  className: "block-editor-patterns__pattern-icon-wrapper"
@@ -130,6 +131,7 @@ function BlockPatternsList({
130
131
  onClickPattern,
131
132
  orientation,
132
133
  label = __('Block patterns'),
134
+ showTitle = true,
133
135
  showTitlesAsTooltip,
134
136
  pagingProps
135
137
  }, ref) {
@@ -160,6 +162,7 @@ function BlockPatternsList({
160
162
  onClick: onClickPattern,
161
163
  onHover: onHover,
162
164
  isDraggable: isDraggable,
165
+ showTitle: showTitle,
163
166
  showTooltip: showTitlesAsTooltip
164
167
  }) : createElement(BlockPatternPlaceholder, {
165
168
  key: pattern.name
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useEffect","useState","forwardRef","VisuallyHidden","Tooltip","privateApis","componentsPrivateApis","__experimentalHStack","HStack","useInstanceId","__","Icon","symbol","unlock","BlockPreview","InserterDraggableBlocks","BlockPatternsPaging","INSERTER_PATTERN_TYPES","CompositeV2","Composite","CompositeItemV2","CompositeItem","useCompositeStoreV2","useCompositeStore","WithToolTip","showTooltip","title","children","createElement","text","Fragment","BlockPattern","id","isDraggable","pattern","onClick","onHover","isDragging","setIsDragging","blocks","viewportWidth","instanceId","descriptionId","isEnabled","draggable","onDragStart","onDragEnd","className","event","type","user","render","role","description","undefined","syncStatus","onMouseEnter","onMouseLeave","icon","BlockPatternPlaceholder","BlockPatternsList","blockPatterns","shownPatterns","onClickPattern","orientation","label","showTitlesAsTooltip","pagingProps","ref","compositeStore","setActiveId","store","map","isShown","includes","key","name"],"sources":["@wordpress/block-editor/src/components/block-patterns-list/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect, useState, forwardRef } from '@wordpress/element';\nimport {\n\tVisuallyHidden,\n\tTooltip,\n\tprivateApis as componentsPrivateApis,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { Icon, symbol } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport BlockPreview from '../block-preview';\nimport InserterDraggableBlocks from '../inserter-draggable-blocks';\nimport BlockPatternsPaging from '../block-patterns-paging';\nimport { INSERTER_PATTERN_TYPES } from '../inserter/block-patterns-tab/utils';\n\nconst {\n\tCompositeV2: Composite,\n\tCompositeItemV2: CompositeItem,\n\tuseCompositeStoreV2: useCompositeStore,\n} = unlock( componentsPrivateApis );\n\nconst WithToolTip = ( { showTooltip, title, children } ) => {\n\tif ( showTooltip ) {\n\t\treturn <Tooltip text={ title }>{ children }</Tooltip>;\n\t}\n\treturn <>{ children }</>;\n};\n\nfunction BlockPattern( {\n\tid,\n\tisDraggable,\n\tpattern,\n\tonClick,\n\tonHover,\n\tshowTooltip,\n} ) {\n\tconst [ isDragging, setIsDragging ] = useState( false );\n\tconst { blocks, viewportWidth } = pattern;\n\tconst instanceId = useInstanceId( BlockPattern );\n\tconst descriptionId = `block-editor-block-patterns-list__item-description-${ instanceId }`;\n\n\treturn (\n\t\t<InserterDraggableBlocks\n\t\t\tisEnabled={ isDraggable }\n\t\t\tblocks={ blocks }\n\t\t\tpattern={ pattern }\n\t\t>\n\t\t\t{ ( { draggable, onDragStart, onDragEnd } ) => (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"block-editor-block-patterns-list__list-item\"\n\t\t\t\t\tdraggable={ draggable }\n\t\t\t\t\tonDragStart={ ( event ) => {\n\t\t\t\t\t\tsetIsDragging( true );\n\t\t\t\t\t\tif ( onDragStart ) {\n\t\t\t\t\t\t\tonHover?.( null );\n\t\t\t\t\t\t\tonDragStart( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tonDragEnd={ ( event ) => {\n\t\t\t\t\t\tsetIsDragging( false );\n\t\t\t\t\t\tif ( onDragEnd ) {\n\t\t\t\t\t\t\tonDragEnd( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<WithToolTip\n\t\t\t\t\t\tshowTooltip={\n\t\t\t\t\t\t\tshowTooltip &&\n\t\t\t\t\t\t\t! pattern.type !== INSERTER_PATTERN_TYPES.user\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttitle={ pattern.title }\n\t\t\t\t\t>\n\t\t\t\t\t\t<CompositeItem\n\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\t\t\t\taria-label={ pattern.title }\n\t\t\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t\t\tpattern.description\n\t\t\t\t\t\t\t\t\t\t\t? descriptionId\n\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t\t'block-editor-block-patterns-list__item',\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t'block-editor-block-patterns-list__list-item-synced':\n\t\t\t\t\t\t\t\t\t\t\t\tpattern.type ===\n\t\t\t\t\t\t\t\t\t\t\t\t\tINSERTER_PATTERN_TYPES.user &&\n\t\t\t\t\t\t\t\t\t\t\t\t! pattern.syncStatus,\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tid={ id }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonClick( pattern, blocks );\n\t\t\t\t\t\t\t\tonHover?.( null );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonMouseEnter={ () => {\n\t\t\t\t\t\t\t\tif ( isDragging ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonHover?.( pattern );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonMouseLeave={ () => onHover?.( null ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BlockPreview\n\t\t\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\t\t\tviewportWidth={ viewportWidth }\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<HStack className=\"block-editor-patterns__pattern-details\">\n\t\t\t\t\t\t\t\t{ pattern.type ===\n\t\t\t\t\t\t\t\t\tINSERTER_PATTERN_TYPES.user &&\n\t\t\t\t\t\t\t\t\t! pattern.syncStatus && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"block-editor-patterns__pattern-icon-wrapper\">\n\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-patterns__pattern-icon\"\n\t\t\t\t\t\t\t\t\t\t\t\ticon={ symbol }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ ( ! showTooltip ||\n\t\t\t\t\t\t\t\t\tpattern.type ===\n\t\t\t\t\t\t\t\t\t\tINSERTER_PATTERN_TYPES.user ) && (\n\t\t\t\t\t\t\t\t\t<div className=\"block-editor-block-patterns-list__item-title\">\n\t\t\t\t\t\t\t\t\t\t{ pattern.title }\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</HStack>\n\n\t\t\t\t\t\t\t{ !! pattern.description && (\n\t\t\t\t\t\t\t\t<VisuallyHidden id={ descriptionId }>\n\t\t\t\t\t\t\t\t\t{ pattern.description }\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</CompositeItem>\n\t\t\t\t\t</WithToolTip>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</InserterDraggableBlocks>\n\t);\n}\n\nfunction BlockPatternPlaceholder() {\n\treturn (\n\t\t<div className=\"block-editor-block-patterns-list__item is-placeholder\" />\n\t);\n}\n\nfunction BlockPatternsList(\n\t{\n\t\tisDraggable,\n\t\tblockPatterns,\n\t\tshownPatterns,\n\t\tonHover,\n\t\tonClickPattern,\n\t\torientation,\n\t\tlabel = __( 'Block patterns' ),\n\t\tshowTitlesAsTooltip,\n\t\tpagingProps,\n\t},\n\tref\n) {\n\tconst compositeStore = useCompositeStore( { orientation } );\n\tconst { setActiveId } = compositeStore;\n\n\tuseEffect( () => {\n\t\t// We reset the active composite item whenever the\n\t\t// available patterns change, to make sure that\n\t\t// focus is put back to the start.\n\t\tsetActiveId( undefined );\n\t}, [ setActiveId, shownPatterns, blockPatterns ] );\n\n\treturn (\n\t\t<Composite\n\t\t\tstore={ compositeStore }\n\t\t\trole=\"listbox\"\n\t\t\tclassName=\"block-editor-block-patterns-list\"\n\t\t\taria-label={ label }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ blockPatterns.map( ( pattern ) => {\n\t\t\t\tconst isShown = shownPatterns.includes( pattern );\n\t\t\t\treturn isShown ? (\n\t\t\t\t\t<BlockPattern\n\t\t\t\t\t\tkey={ pattern.name }\n\t\t\t\t\t\tid={ pattern.name }\n\t\t\t\t\t\tpattern={ pattern }\n\t\t\t\t\t\tonClick={ onClickPattern }\n\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\tisDraggable={ isDraggable }\n\t\t\t\t\t\tshowTooltip={ showTitlesAsTooltip }\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<BlockPatternPlaceholder key={ pattern.name } />\n\t\t\t\t);\n\t\t\t} ) }\n\t\t\t{ pagingProps && <BlockPatternsPaging { ...pagingProps } /> }\n\t\t</Composite>\n\t);\n}\n\nexport default forwardRef( BlockPatternsList );\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,SAAS,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,oBAAoB;AACpE,SACCC,cAAc,EACdC,OAAO,EACPC,WAAW,IAAIC,qBAAqB,EACpCC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;AAC9B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,IAAI,EAAEC,MAAM,QAAQ,kBAAkB;;AAE/C;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,uBAAuB,MAAM,8BAA8B;AAClE,OAAOC,mBAAmB,MAAM,0BAA0B;AAC1D,SAASC,sBAAsB,QAAQ,sCAAsC;AAE7E,MAAM;EACLC,WAAW,EAAEC,SAAS;EACtBC,eAAe,EAAEC,aAAa;EAC9BC,mBAAmB,EAAEC;AACtB,CAAC,GAAGV,MAAM,CAAEP,qBAAsB,CAAC;AAEnC,MAAMkB,WAAW,GAAGA,CAAE;EAAEC,WAAW;EAAEC,KAAK;EAAEC;AAAS,CAAC,KAAM;EAC3D,IAAKF,WAAW,EAAG;IAClB,OAAOG,aAAA,CAACxB,OAAO;MAACyB,IAAI,EAAGH;IAAO,GAAGC,QAAmB,CAAC;EACtD;EACA,OAAOC,aAAA,CAAAE,QAAA,QAAIH,QAAY,CAAC;AACzB,CAAC;AAED,SAASI,YAAYA,CAAE;EACtBC,EAAE;EACFC,WAAW;EACXC,OAAO;EACPC,OAAO;EACPC,OAAO;EACPX;AACD,CAAC,EAAG;EACH,MAAM,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2B,cAAc;EACdC,WAAW;EACXC,KAAK,GAAGvD,EAAE,CAAE,gBAAiB,CAAC;EAC9BwD,mBAAmB;EACnBC;AACD,CAAC,EACDC,GAAG,EACF;EACD,MAAMC,cAAc,GAAG9C,iBAAiB,CAAE;IAAEyC;EAAY,CAAE,CAAC;EAC3D,MAAM;IAAEM;EAAY,CAAC,GAAGD,cAAc;EAEtCrE,SAAS,CAAE,MAAM;IAChB;IACA;IACA;IACAsE,WAAW,CAAEhB,SAAU,CAAC;EACzB,CAAC,EAAE,CAAEgB,WAAW,EAAER,aAAa,EAAED,aAAa,CAAG,CAAC;EAElD,OACCjC,aAAA,CAACT,SAAS;IACToD,KAAK,EAAGF,cAAgB;IACxBjB,IAAI,EAAC,SAAS;IACdL,SAAS,EAAC,kCAAkC;IAC5C,cAAakB,KAAO;IACpBG,GAAG,EAAGA;EAAK,GAETP,aAAa,CAACW,GAAG,CAAItC,OAAO,IAAM;IACnC,MAAMuC,OAAO,GAAGX,aAAa,CAACY,QAAQ,CAAExC,OAAQ,CAAC;IACjD,OAAOuC,OAAO,GACb7C,aAAA,CAACG,YAAY;MACZ4C,GAAG,EAAGzC,OAAO,CAAC0C,IAAM;MACpB5C,EAAE,EAAGE,OAAO,CAAC0C,IAAM;MACnB1C,OAAO,EAAGA,OAAS;MACnBC,OAAO,EAAG4B,cAAgB;MAC1B3B,OAAO,EAAGA,OAAS;MACnBH,WAAW,EAAGA,WAAa;MAC3BR,WAAW,EAAGyC;IAAqB,CACnC,CAAC,GAEFtC,aAAA,CAAC+B,uBAAuB;MAACgB,GAAG,EAAGzC,OAAO,CAAC0C;IAAM,CAAE,CAC/C;EACF,CAAE,CAAC,EACDT,WAAW,IAAIvC,aAAA,CAACZ,mBAAmB;IAAA,GAAMmD;EAAW,CAAI,CAChD,CAAC;AAEd;AAEA,eAAejE,UAAU,CAAE0D,iBAAkB,CAAC"}
1
+ {"version":3,"names":["classnames","useEffect","useState","forwardRef","VisuallyHidden","Tooltip","privateApis","componentsPrivateApis","__experimentalHStack","HStack","useInstanceId","__","Icon","symbol","unlock","BlockPreview","InserterDraggableBlocks","BlockPatternsPaging","INSERTER_PATTERN_TYPES","CompositeV2","Composite","CompositeItemV2","CompositeItem","useCompositeStoreV2","useCompositeStore","WithToolTip","showTooltip","title","children","createElement","text","Fragment","BlockPattern","id","isDraggable","pattern","onClick","onHover","showTitle","isDragging","setIsDragging","blocks","viewportWidth","instanceId","descriptionId","isEnabled","draggable","onDragStart","onDragEnd","className","event","type","user","render","role","description","undefined","syncStatus","onMouseEnter","onMouseLeave","icon","BlockPatternPlaceholder","BlockPatternsList","blockPatterns","shownPatterns","onClickPattern","orientation","label","showTitlesAsTooltip","pagingProps","ref","compositeStore","setActiveId","store","map","isShown","includes","key","name"],"sources":["@wordpress/block-editor/src/components/block-patterns-list/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect, useState, forwardRef } from '@wordpress/element';\nimport {\n\tVisuallyHidden,\n\tTooltip,\n\tprivateApis as componentsPrivateApis,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { Icon, symbol } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport BlockPreview from '../block-preview';\nimport InserterDraggableBlocks from '../inserter-draggable-blocks';\nimport BlockPatternsPaging from '../block-patterns-paging';\nimport { INSERTER_PATTERN_TYPES } from '../inserter/block-patterns-tab/utils';\n\nconst {\n\tCompositeV2: Composite,\n\tCompositeItemV2: CompositeItem,\n\tuseCompositeStoreV2: useCompositeStore,\n} = unlock( componentsPrivateApis );\n\nconst WithToolTip = ( { showTooltip, title, children } ) => {\n\tif ( showTooltip ) {\n\t\treturn <Tooltip text={ title }>{ children }</Tooltip>;\n\t}\n\treturn <>{ children }</>;\n};\n\nfunction BlockPattern( {\n\tid,\n\tisDraggable,\n\tpattern,\n\tonClick,\n\tonHover,\n\tshowTitle = true,\n\tshowTooltip,\n} ) {\n\tconst [ isDragging, setIsDragging ] = useState( false );\n\tconst { blocks, viewportWidth } = pattern;\n\tconst instanceId = useInstanceId( BlockPattern );\n\tconst descriptionId = `block-editor-block-patterns-list__item-description-${ instanceId }`;\n\n\treturn (\n\t\t<InserterDraggableBlocks\n\t\t\tisEnabled={ isDraggable }\n\t\t\tblocks={ blocks }\n\t\t\tpattern={ pattern }\n\t\t>\n\t\t\t{ ( { draggable, onDragStart, onDragEnd } ) => (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"block-editor-block-patterns-list__list-item\"\n\t\t\t\t\tdraggable={ draggable }\n\t\t\t\t\tonDragStart={ ( event ) => {\n\t\t\t\t\t\tsetIsDragging( true );\n\t\t\t\t\t\tif ( onDragStart ) {\n\t\t\t\t\t\t\tonHover?.( null );\n\t\t\t\t\t\t\tonDragStart( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tonDragEnd={ ( event ) => {\n\t\t\t\t\t\tsetIsDragging( false );\n\t\t\t\t\t\tif ( onDragEnd ) {\n\t\t\t\t\t\t\tonDragEnd( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<WithToolTip\n\t\t\t\t\t\tshowTooltip={\n\t\t\t\t\t\t\tshowTooltip &&\n\t\t\t\t\t\t\t! pattern.type !== INSERTER_PATTERN_TYPES.user\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttitle={ pattern.title }\n\t\t\t\t\t>\n\t\t\t\t\t\t<CompositeItem\n\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\t\t\t\taria-label={ pattern.title }\n\t\t\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t\t\tpattern.description\n\t\t\t\t\t\t\t\t\t\t\t? descriptionId\n\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t\t'block-editor-block-patterns-list__item',\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t'block-editor-block-patterns-list__list-item-synced':\n\t\t\t\t\t\t\t\t\t\t\t\tpattern.type ===\n\t\t\t\t\t\t\t\t\t\t\t\t\tINSERTER_PATTERN_TYPES.user &&\n\t\t\t\t\t\t\t\t\t\t\t\t! pattern.syncStatus,\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tid={ id }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonClick( pattern, blocks );\n\t\t\t\t\t\t\t\tonHover?.( null );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonMouseEnter={ () => {\n\t\t\t\t\t\t\t\tif ( isDragging ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonHover?.( pattern );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonMouseLeave={ () => onHover?.( null ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BlockPreview\n\t\t\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\t\t\tviewportWidth={ viewportWidth }\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t{ showTitle && (\n\t\t\t\t\t\t\t\t<HStack className=\"block-editor-patterns__pattern-details\">\n\t\t\t\t\t\t\t\t\t{ pattern.type ===\n\t\t\t\t\t\t\t\t\t\tINSERTER_PATTERN_TYPES.user &&\n\t\t\t\t\t\t\t\t\t\t! pattern.syncStatus && (\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"block-editor-patterns__pattern-icon-wrapper\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-patterns__pattern-icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ticon={ symbol }\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ ( ! showTooltip ||\n\t\t\t\t\t\t\t\t\t\tpattern.type ===\n\t\t\t\t\t\t\t\t\t\t\tINSERTER_PATTERN_TYPES.user ) && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"block-editor-block-patterns-list__item-title\">\n\t\t\t\t\t\t\t\t\t\t\t{ pattern.title }\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t\t{ !! pattern.description && (\n\t\t\t\t\t\t\t\t<VisuallyHidden id={ descriptionId }>\n\t\t\t\t\t\t\t\t\t{ pattern.description }\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</CompositeItem>\n\t\t\t\t\t</WithToolTip>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</InserterDraggableBlocks>\n\t);\n}\n\nfunction BlockPatternPlaceholder() {\n\treturn (\n\t\t<div className=\"block-editor-block-patterns-list__item is-placeholder\" />\n\t);\n}\n\nfunction BlockPatternsList(\n\t{\n\t\tisDraggable,\n\t\tblockPatterns,\n\t\tshownPatterns,\n\t\tonHover,\n\t\tonClickPattern,\n\t\torientation,\n\t\tlabel = __( 'Block patterns' ),\n\t\tshowTitle = true,\n\t\tshowTitlesAsTooltip,\n\t\tpagingProps,\n\t},\n\tref\n) {\n\tconst compositeStore = useCompositeStore( { orientation } );\n\tconst { setActiveId } = compositeStore;\n\n\tuseEffect( () => {\n\t\t// We reset the active composite item whenever the\n\t\t// available patterns change, to make sure that\n\t\t// focus is put back to the start.\n\t\tsetActiveId( undefined );\n\t}, [ setActiveId, shownPatterns, blockPatterns ] );\n\n\treturn (\n\t\t<Composite\n\t\t\tstore={ compositeStore }\n\t\t\trole=\"listbox\"\n\t\t\tclassName=\"block-editor-block-patterns-list\"\n\t\t\taria-label={ label }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ blockPatterns.map( ( pattern ) => {\n\t\t\t\tconst isShown = shownPatterns.includes( pattern );\n\t\t\t\treturn isShown ? (\n\t\t\t\t\t<BlockPattern\n\t\t\t\t\t\tkey={ pattern.name }\n\t\t\t\t\t\tid={ pattern.name }\n\t\t\t\t\t\tpattern={ pattern }\n\t\t\t\t\t\tonClick={ onClickPattern }\n\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\tisDraggable={ isDraggable }\n\t\t\t\t\t\tshowTitle={ showTitle }\n\t\t\t\t\t\tshowTooltip={ showTitlesAsTooltip }\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<BlockPatternPlaceholder key={ pattern.name } />\n\t\t\t\t);\n\t\t\t} ) }\n\t\t\t{ pagingProps && <BlockPatternsPaging { ...pagingProps } /> }\n\t\t</Composite>\n\t);\n}\n\nexport default forwardRef( BlockPatternsList );\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,SAAS,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,oBAAoB;AACpE,SACCC,cAAc,EACdC,OAAO,EACPC,WAAW,IAAIC,qBAAqB,EACpCC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;AAC9B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,IAAI,EAAEC,MAAM,QAAQ,kBAAkB;;AAE/C;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,OAAOC,YAAY,MAAM,kBAAkB;AAC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K,GAETP,aAAa,CAACW,GAAG,CAAIvC,OAAO,IAAM;IACnC,MAAMwC,OAAO,GAAGX,aAAa,CAACY,QAAQ,CAAEzC,OAAQ,CAAC;IACjD,OAAOwC,OAAO,GACb9C,aAAA,CAACG,YAAY;MACZ6C,GAAG,EAAG1C,OAAO,CAAC2C,IAAM;MACpB7C,EAAE,EAAGE,OAAO,CAAC2C,IAAM;MACnB3C,OAAO,EAAGA,OAAS;MACnBC,OAAO,EAAG6B,cAAgB;MAC1B5B,OAAO,EAAGA,OAAS;MACnBH,WAAW,EAAGA,WAAa;MAC3BI,SAAS,EAAGA,SAAW;MACvBZ,WAAW,EAAG0C;IAAqB,CACnC,CAAC,GAEFvC,aAAA,CAACgC,uBAAuB;MAACgB,GAAG,EAAG1C,OAAO,CAAC2C;IAAM,CAAE,CAC/C;EACF,CAAE,CAAC,EACDT,WAAW,IAAIxC,aAAA,CAACZ,mBAAmB;IAAA,GAAMoD;EAAW,CAAI,CAChD,CAAC;AAEd;AAEA,eAAelE,UAAU,CAAE2D,iBAAkB,CAAC","ignoreList":[]}
@@ -31,12 +31,14 @@ export default function Pagination({
31
31
  variant: "tertiary",
32
32
  onClick: () => changePage(1),
33
33
  disabled: currentPage === 1,
34
- "aria-label": __('First page')
34
+ "aria-label": __('First page'),
35
+ __experimentalIsFocusable: true
35
36
  }, createElement("span", null, "\xAB")), createElement(Button, {
36
37
  variant: "tertiary",
37
38
  onClick: () => changePage(currentPage - 1),
38
39
  disabled: currentPage === 1,
39
- "aria-label": __('Previous page')
40
+ "aria-label": __('Previous page'),
41
+ __experimentalIsFocusable: true
40
42
  }, createElement("span", null, "\u2039"))), createElement(Text, {
41
43
  variant: "muted"
42
44
  }, sprintf(
@@ -49,13 +51,15 @@ export default function Pagination({
49
51
  variant: "tertiary",
50
52
  onClick: () => changePage(currentPage + 1),
51
53
  disabled: currentPage === numPages,
52
- "aria-label": __('Next page')
54
+ "aria-label": __('Next page'),
55
+ __experimentalIsFocusable: true
53
56
  }, createElement("span", null, "\u203A")), createElement(Button, {
54
57
  variant: "tertiary",
55
58
  onClick: () => changePage(numPages),
56
59
  disabled: currentPage === numPages,
57
60
  "aria-label": __('Last page'),
58
- size: "default"
61
+ size: "default",
62
+ __experimentalIsFocusable: true
59
63
  }, createElement("span", null, "\xBB")))));
60
64
  }
61
65
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalVStack","VStack","__experimentalHStack","HStack","__experimentalText","Text","Button","__","_x","_n","sprintf","Pagination","currentPage","numPages","changePage","totalItems","createElement","className","variant","expanded","spacing","justify","onClick","disabled","size"],"sources":["@wordpress/block-editor/src/components/block-patterns-paging/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\t__experimentalText as Text,\n\tButton,\n} from '@wordpress/components';\nimport { __, _x, _n, sprintf } from '@wordpress/i18n';\n\nexport default function Pagination( {\n\tcurrentPage,\n\tnumPages,\n\tchangePage,\n\ttotalItems,\n} ) {\n\treturn (\n\t\t<VStack className=\"block-editor-patterns__grid-pagination-wrapper\">\n\t\t\t<Text variant=\"muted\">\n\t\t\t\t{\n\t\t\t\t\t// translators: %s: Total number of patterns.\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t// translators: %s: Total number of patterns.\n\t\t\t\t\t\t_n( '%s item', '%s items', totalItems ),\n\t\t\t\t\t\ttotalItems\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t</Text>\n\n\t\t\t{ numPages > 1 && (\n\t\t\t\t<HStack\n\t\t\t\t\texpanded={ false }\n\t\t\t\t\tspacing={ 3 }\n\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination\"\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-previous\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( 1 ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === 1 }\n\t\t\t\t\t\t\taria-label={ __( 'First page' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>«</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( currentPage - 1 ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === 1 }\n\t\t\t\t\t\t\taria-label={ __( 'Previous page' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>‹</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t\t<Text variant=\"muted\">\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %1$s: Current page number, %2$s: Total number of pages.\n\t\t\t\t\t\t\t_x( '%1$s of %2$s', 'paging' ),\n\t\t\t\t\t\t\tcurrentPage,\n\t\t\t\t\t\t\tnumPages\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Text>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-next\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( currentPage + 1 ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === numPages }\n\t\t\t\t\t\t\taria-label={ __( 'Next page' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>›</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( numPages ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === numPages }\n\t\t\t\t\t\t\taria-label={ __( 'Last page' ) }\n\t\t\t\t\t\t\tsize=\"default\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>»</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,kBAAkB,IAAIC,IAAI,EAC1BC,MAAM,QACA,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAErD,eAAe,SAASC,UAAUA,CAAE;EACnCC,WAAW;EACXC,QAAQ;EACRC,UAAU;EACVC;AACD,CAAC,EAAG;EACH,OACCC,aAAA,CAACf,MAAM;IAACgB,SAAS,EAAC;EAAgD,GACjED,aAAA,CAACX,IAAI;IAACa,OAAO,EAAC;EAAO;EAEnB;EACAR,OAAO;EACN;EACAD,EAAE,CAAE,SAAS,EAAE,UAAU,EAAEM,UAAW,CAAC,EACvCA,UACD,CAEI,CAAC,EAELF,QAAQ,GAAG,CAAC,IACbG,aAAA,CAACb,MAAM;IACNgB,QAAQ,EAAG,KAAO;IAClBC,OAAO,EAAG,CAAG;IACbC,OAAO,EAAC,YAAY;IACpBJ,SAAS,EAAC;EAAwC,GAElDD,aAAA,CAACb,MAAM;IACNgB,QAAQ,EAAG,KAAO;IAClBC,OAAO,EAAG,CAAG;IACbH,SAAS,EAAC;EAAiD,GAE3DD,aAAA,CAACV,MAAM;IACNY,OAAO,EAAC,UAAU;IAClBI,OAAO,EAAGA,CAAA,KAAMR,UAAU,CAAE,CAAE,CAAG;IACjCS,QAAQ,EAAGX,WAAW,KAAK,CAAG;IAC9B,cAAaL,EAAE,CAAE,YAAa;EAAG,GAEjCS,aAAA,eAAM,MAAO,CACN,CAAC,EACTA,aAAA,CAACV,MAAM;IACNY,OAAO,EAAC,UAAU;IAClBI,OAAO,EAAGA,CAAA,KAAMR,UAAU,CAAEF,WAAW,GAAG,CAAE,CAAG;IAC/CW,QAAQ,EAAGX,WAAW,KAAK,CAAG;IAC9B,cAAaL,EAAE,CAAE,eAAgB;EAAG,GAEpCS,aAAA,eAAM,QAAO,CACN,CACD,CAAC,EACTA,aAAA,CAACX,IAAI;IAACa,OAAO,EAAC;EAAO,GAClBR,OAAO;EACR;EACAF,EAAE,CAAE,cAAc,EAAE,QAAS,CAAC,EAC9BI,WAAW,EACXC,QACD,CACK,CAAC,EACPG,aAAA,CAACb,MAAM;IACNgB,QAAQ,EAAG,KAAO;IAClBC,OAAO,EAAG,CAAG;IACbH,SAAS,EAAC;EAA6C,GAEvDD,aAAA,CAACV,MAAM;IACNY,OAAO,EAAC,UAAU;IAClBI,OAAO,EAAGA,CAAA,KAAMR,UAAU,CAAEF,WAAW,GAAG,CAAE,CAAG;IAC/CW,QAAQ,EAAGX,WAAW,KAAKC,QAAU;IACrC,cAAaN,EAAE,CAAE,WAAY;EAAG,GAEhCS,aAAA,eAAM,QAAO,CACN,CAAC,EACTA,aAAA,CAACV,MAAM;IACNY,OAAO,EAAC,UAAU;IAClBI,OAAO,EAAGA,CAAA,KAAMR,UAAU,CAAED,QAAS,CAAG;IACxCU,QAAQ,EAAGX,WAAW,KAAKC,QAAU;IACrC,cAAaN,EAAE,CAAE,WAAY,CAAG;IAChCiB,IAAI,EAAC;EAAS,GAEdR,aAAA,eAAM,MAAO,CACN,CACD,CACD,CAEF,CAAC;AAEX"}
1
+ {"version":3,"names":["__experimentalVStack","VStack","__experimentalHStack","HStack","__experimentalText","Text","Button","__","_x","_n","sprintf","Pagination","currentPage","numPages","changePage","totalItems","createElement","className","variant","expanded","spacing","justify","onClick","disabled","__experimentalIsFocusable","size"],"sources":["@wordpress/block-editor/src/components/block-patterns-paging/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\t__experimentalText as Text,\n\tButton,\n} from '@wordpress/components';\nimport { __, _x, _n, sprintf } from '@wordpress/i18n';\n\nexport default function Pagination( {\n\tcurrentPage,\n\tnumPages,\n\tchangePage,\n\ttotalItems,\n} ) {\n\treturn (\n\t\t<VStack className=\"block-editor-patterns__grid-pagination-wrapper\">\n\t\t\t<Text variant=\"muted\">\n\t\t\t\t{\n\t\t\t\t\t// translators: %s: Total number of patterns.\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t// translators: %s: Total number of patterns.\n\t\t\t\t\t\t_n( '%s item', '%s items', totalItems ),\n\t\t\t\t\t\ttotalItems\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t</Text>\n\n\t\t\t{ numPages > 1 && (\n\t\t\t\t<HStack\n\t\t\t\t\texpanded={ false }\n\t\t\t\t\tspacing={ 3 }\n\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination\"\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-previous\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( 1 ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === 1 }\n\t\t\t\t\t\t\taria-label={ __( 'First page' ) }\n\t\t\t\t\t\t\t__experimentalIsFocusable\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>«</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( currentPage - 1 ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === 1 }\n\t\t\t\t\t\t\taria-label={ __( 'Previous page' ) }\n\t\t\t\t\t\t\t__experimentalIsFocusable\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>‹</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t\t<Text variant=\"muted\">\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %1$s: Current page number, %2$s: Total number of pages.\n\t\t\t\t\t\t\t_x( '%1$s of %2$s', 'paging' ),\n\t\t\t\t\t\t\tcurrentPage,\n\t\t\t\t\t\t\tnumPages\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Text>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-next\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( currentPage + 1 ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === numPages }\n\t\t\t\t\t\t\taria-label={ __( 'Next page' ) }\n\t\t\t\t\t\t\t__experimentalIsFocusable\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>›</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( numPages ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === numPages }\n\t\t\t\t\t\t\taria-label={ __( 'Last page' ) }\n\t\t\t\t\t\t\tsize=\"default\"\n\t\t\t\t\t\t\t__experimentalIsFocusable\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>»</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MA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OAAO,EAAC;EAAO,GAClBR,OAAO;EACR;EACAF,EAAE,CAAE,cAAc,EAAE,QAAS,CAAC,EAC9BI,WAAW,EACXC,QACD,CACK,CAAC,EACPG,aAAA,CAACb,MAAM;IACNgB,QAAQ,EAAG,KAAO;IAClBC,OAAO,EAAG,CAAG;IACbH,SAAS,EAAC;EAA6C,GAEvDD,aAAA,CAACV,MAAM;IACNY,OAAO,EAAC,UAAU;IAClBI,OAAO,EAAGA,CAAA,KAAMR,UAAU,CAAEF,WAAW,GAAG,CAAE,CAAG;IAC/CW,QAAQ,EAAGX,WAAW,KAAKC,QAAU;IACrC,cAAaN,EAAE,CAAE,WAAY,CAAG;IAChCiB,yBAAyB;EAAA,GAEzBR,aAAA,eAAM,QAAO,CACN,CAAC,EACTA,aAAA,CAACV,MAAM;IACNY,OAAO,EAAC,UAAU;IAClBI,OAAO,EAAGA,CAAA,KAAMR,UAAU,CAAED,QAAS,CAAG;IACxCU,QAAQ,EAAGX,WAAW,KAAKC,QAAU;IACrC,cAAaN,EAAE,CAAE,WAAY,CAAG;IAChCkB,IAAI,EAAC,SAAS;IACdD,yBAAyB;EAAA,GAEzBR,aAAA,eAAM,MAAO,CACN,CACD,CACD,CAEF,CAAC;AAEX","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useState","useMemo","forwardRef","__unstableUseBlockElement","useBlockElement","BlockPopover","BlockPopoverCover","clientId","bottomClientId","children","shift","props","ref","_bottomClientId","selectedElement","createElement","CoverContainer","width","setWidth","offsetWidth","height","setHeight","offsetHeight","observer","window","ResizeObserver","observe","box","disconnect","style","position"],"sources":["@wordpress/block-editor/src/components/block-popover/cover.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useState, useMemo, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport BlockPopover from '.';\n\nfunction BlockPopoverCover(\n\t{ clientId, bottomClientId, children, shift = false, ...props },\n\tref\n) {\n\tbottomClientId ??= clientId;\n\n\tconst selectedElement = useBlockElement( clientId );\n\n\treturn (\n\t\t<BlockPopover\n\t\t\tref={ ref }\n\t\t\tclientId={ clientId }\n\t\t\tbottomClientId={ bottomClientId }\n\t\t\tshift={ shift }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ selectedElement && clientId === bottomClientId ? (\n\t\t\t\t<CoverContainer selectedElement={ selectedElement }>\n\t\t\t\t\t{ children }\n\t\t\t\t</CoverContainer>\n\t\t\t) : (\n\t\t\t\tchildren\n\t\t\t) }\n\t\t</BlockPopover>\n\t);\n}\n\nfunction CoverContainer( { selectedElement, children } ) {\n\tconst [ width, setWidth ] = useState( selectedElement.offsetWidth );\n\tconst [ height, setHeight ] = useState( selectedElement.offsetHeight );\n\n\tuseEffect( () => {\n\t\tconst observer = new window.ResizeObserver( () => {\n\t\t\tsetWidth( selectedElement.offsetWidth );\n\t\t\tsetHeight( selectedElement.offsetHeight );\n\t\t} );\n\t\tobserver.observe( selectedElement, { box: 'border-box' } );\n\t\treturn () => observer.disconnect();\n\t}, [ selectedElement ] );\n\n\tconst style = useMemo( () => {\n\t\treturn {\n\t\t\tposition: 'absolute',\n\t\t\twidth,\n\t\t\theight,\n\t\t};\n\t}, [ width, height ] );\n\n\treturn <div style={ style }>{ children }</div>;\n}\n\nexport default forwardRef( BlockPopoverCover );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,UAAU,QAAQ,oBAAoB;;AAE7E;AACA;AACA;AACA,SAASC,yBAAyB,IAAIC,eAAe,QAAQ,8CAA8C;AAC3G,OAAOC,YAAY,MAAM,GAAG;AAE5B,SAASC,iBAAiBA,CACzB;EAAEC,QAAQ;EAAEC,cAAc;EAAEC,QAAQ;EAAEC,KAAK,GAAG,KAAK;EAAE,GAAGC;AAAM,CAAC,EAC/DC,GAAG,EACF;EAAA,IAAAC,eAAA;E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AAC;EAEtB,OAAOL,aAAA;IAAKc,KAAK,EAAGA;EAAO,GAAGpB,QAAe,CAAC;AAC/C;AAEA,eAAeP,UAAU,CAAEI,iBAAkB,CAAC"}
1
+ {"version":3,"names":["useEffect","useState","useMemo","forwardRef","__unstableUseBlockElement","useBlockElement","BlockPopover","BlockPopoverCover","clientId","bottomClientId","children","shift","props","ref","_bottomClientId","selectedElement","createElement","CoverContainer","width","setWidth","offsetWidth","height","setHeight","offsetHeight","observer","window","ResizeObserver","observe","box","disconnect","style","position"],"sources":["@wordpress/block-editor/src/components/block-popover/cover.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useState, useMemo, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport BlockPopover from '.';\n\nfunction BlockPopoverCover(\n\t{ clientId, bottomClientId, children, shift = false, ...props },\n\tref\n) {\n\tbottomClientId ??= clientId;\n\n\tconst selectedElement = useBlockElement( clientId );\n\n\treturn (\n\t\t<BlockPopover\n\t\t\tref={ ref }\n\t\t\tclientId={ clientId }\n\t\t\tbottomClientId={ bottomClientId }\n\t\t\tshift={ shift }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ selectedElement && clientId === bottomClientId ? (\n\t\t\t\t<CoverContainer selectedElement={ selectedElement }>\n\t\t\t\t\t{ children }\n\t\t\t\t</CoverContainer>\n\t\t\t) : (\n\t\t\t\tchildren\n\t\t\t) }\n\t\t</BlockPopover>\n\t);\n}\n\nfunction CoverContainer( { selectedElement, children } ) {\n\tconst [ width, setWidth ] = useState( selectedElement.offsetWidth );\n\tconst [ height, setHeight ] = useState( selectedElement.offsetHeight );\n\n\tuseEffect( () => {\n\t\tconst observer = new window.ResizeObserver( () => {\n\t\t\tsetWidth( selectedElement.offsetWidth );\n\t\t\tsetHeight( selectedElement.offsetHeight );\n\t\t} );\n\t\tobserver.observe( selectedElement, { box: 'border-box' } );\n\t\treturn () => observer.disconnect();\n\t}, [ selectedElement ] );\n\n\tconst style = useMemo( () => {\n\t\treturn {\n\t\t\tposition: 'absolute',\n\t\t\twidth,\n\t\t\theight,\n\t\t};\n\t}, [ width, height ] );\n\n\treturn <div style={ style }>{ children }</div>;\n}\n\nexport default forwardRef( BlockPopoverCover );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,UAAU,QAAQ,oBAAoB;;AAE7E;AACA;AACA;AACA,SAASC,yBAAyB,IAAIC,eAAe,QAAQ,8CAA8C;AAC3G,OAAOC,YAAY,MAAM,GAAG;AAE5B,SAASC,iBAAiBA,CACzB;EAAEC,QAAQ;EAAEC,cAAc;EAAEC,QAAQ;EAAEC,KAAK,GAAG,KAAK;EAAE,GAAGC;AAAM,CAAC,EAC/DC,GAAG,EACF;EAAA,IAAAC,eAAA;EACD,CAAAA,eAAA,GAAAL,cAAc,cAAAK,eAAA,cAAAA,eAAA,GAAdL,cAAc,GAAKD,QAAQ;EAE3B,MAAMO,eAAe,GAAGV,eAAe,CAAEG,QAAS,CAAC;EAEnD,OACCQ,aAAA,CAACV,YAAY;IACZO,GAAG,EAAGA,GAAK;IACXL,QAAQ,EAAGA,QAAU;IACrBC,cAAc,EAAGA,cAAgB;IACjCE,KAAK,EAAGA,KAAO;IAAA,GACVC;EAAK,GAERG,eAAe,IAAIP,QAAQ,KAAKC,cAAc,GAC/CO,aAAA,CAACC,cAAc;IAACF,eAAe,EAAGA;EAAiB,GAChDL,QACa,CAAC,GAEjBA,QAEY,CAAC;AAEjB;AAEA,SAASO,cAAcA,CAAE;EAAEF,eAAe;EAAEL;AAAS,CAAC,EAAG;EACxD,MAAM,CAAEQ,KAAK,EAAEC,QAAQ,CAAE,GAAGlB,QAAQ,CAAEc,eAAe,CAACK,WAAY,CAAC;EACnE,MAAM,CAAEC,MAAM,EAAEC,SAAS,CAAE,GAAGrB,QAAQ,CAAEc,eAAe,CAACQ,YAAa,CAAC;EAEtEvB,SAAS,CAAE,MAAM;IAChB,MAAMwB,QAAQ,GAAG,IAAIC,MAAM,CAACC,cAAc,CAAE,MAAM;MACjDP,QAAQ,CAAEJ,eAAe,CAACK,WAAY,CAAC;MACvCE,SAAS,CAAEP,eAAe,CAACQ,YAAa,CAAC;IAC1C,CAAE,CAAC;IACHC,QAAQ,CAACG,OAAO,CAAEZ,eAAe,EAAE;MAAEa,GAAG,EAAE;IAAa,CAAE,CAAC;IAC1D,OAAO,MAAMJ,QAAQ,CAACK,UAAU,CAAC,CAAC;EACnC,CAAC,EAAE,CAAEd,eAAe,CAAG,CAAC;EAExB,MAAMe,KAAK,GAAG5B,OAAO,CAAE,MAAM;IAC5B,OAAO;MACN6B,QAAQ,EAAE,UAAU;MACpBb,KAAK;MACLG;IACD,CAAC;EACF,CAAC,EAAE,CAAEH,KAAK,EAAEG,MAAM,CAAG,CAAC;EAEtB,OAAOL,aAAA;IAAKc,KAAK,EAAGA;EAAO,GAAGpB,QAAe,CAAC;AAC/C;AAEA,eAAeP,UAAU,CAAEI,iBAAkB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","useReducedMotion","__unstableMotion","motion","store","blockEditorStore","BlockPopoverCover","animateVariants","hide","opacity","scaleY","show","exit","BlockDropZonePopover","__unstablePopoverSlot","__unstableContentRef","clientId","select","getBlockOrder","getBlockInsertionPoint","insertionPoint","order","rootClientId","length","index","reducedMotion","createElement","className","div","initial","animate"],"sources":["@wordpress/block-editor/src/components/block-popover/drop-zone.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { __unstableMotion as motion } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport BlockPopoverCover from './cover';\n\nconst animateVariants = {\n\thide: { opacity: 0, scaleY: 0.75 },\n\tshow: { opacity: 1, scaleY: 1 },\n\texit: { opacity: 0, scaleY: 0.9 },\n};\n\nfunction BlockDropZonePopover( {\n\t__unstablePopoverSlot,\n\t__unstableContentRef,\n} ) {\n\tconst { clientId } = useSelect( ( select ) => {\n\t\tconst { getBlockOrder, getBlockInsertionPoint } =\n\t\t\tselect( 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\treturn {\n\t\t\tclientId: order[ insertionPoint.index ],\n\t\t};\n\t}, [] );\n\tconst reducedMotion = useReducedMotion();\n\n\treturn (\n\t\t<BlockPopoverCover\n\t\t\tclientId={ clientId }\n\t\t\t__unstablePopoverSlot={ __unstablePopoverSlot }\n\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\tclassName=\"block-editor-block-popover__drop-zone\"\n\t\t>\n\t\t\t<motion.div\n\t\t\t\tdata-testid=\"block-popover-drop-zone\"\n\t\t\t\tinitial={\n\t\t\t\t\treducedMotion ? animateVariants.show : animateVariants.hide\n\t\t\t\t}\n\t\t\t\tanimate={ animateVariants.show }\n\t\t\t\texit={\n\t\t\t\t\treducedMotion ? animateVariants.show : animateVariants.exit\n\t\t\t\t}\n\t\t\t\tclassName=\"block-editor-block-popover__drop-zone-foreground\"\n\t\t\t/>\n\t\t</BlockPopoverCover>\n\t);\n}\n\nexport default BlockDropZonePopover;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,gBAAgB,IAAIC,MAAM,QAAQ,uBAAuB;;AAElE;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,iBAAiB,MAAM,SAAS;AAEvC,MAAMC,eAAe,GAAG;EACvBC,IAAI,EAAE;IAAEC,OAAO,EAAE,CAAC;IAAEC,MAAM,EAAE;EAAK,CAAC;EAClCC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motion","store","blockEditorStore","BlockPopoverCover","animateVariants","hide","opacity","scaleY","show","exit","BlockDropZonePopover","__unstablePopoverSlot","__unstableContentRef","clientId","select","getBlockOrder","getBlockInsertionPoint","insertionPoint","order","rootClientId","length","index","reducedMotion","createElement","className","div","initial","animate"],"sources":["@wordpress/block-editor/src/components/block-popover/drop-zone.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { __unstableMotion as motion } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport BlockPopoverCover from './cover';\n\nconst animateVariants = {\n\thide: { opacity: 0, scaleY: 0.75 },\n\tshow: { opacity: 1, scaleY: 1 },\n\texit: { opacity: 0, scaleY: 0.9 },\n};\n\nfunction BlockDropZonePopover( {\n\t__unstablePopoverSlot,\n\t__unstableContentRef,\n} ) {\n\tconst { clientId } = useSelect( ( select ) => {\n\t\tconst { getBlockOrder, getBlockInsertionPoint } =\n\t\t\tselect( 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\treturn {\n\t\t\tclientId: order[ insertionPoint.index ],\n\t\t};\n\t}, [] );\n\tconst reducedMotion = useReducedMotion();\n\n\treturn (\n\t\t<BlockPopoverCover\n\t\t\tclientId={ clientId }\n\t\t\t__unstablePopoverSlot={ __unstablePopoverSlot }\n\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\tclassName=\"block-editor-block-popover__drop-zone\"\n\t\t>\n\t\t\t<motion.div\n\t\t\t\tdata-testid=\"block-popover-drop-zone\"\n\t\t\t\tinitial={\n\t\t\t\t\treducedMotion ? animateVariants.show : animateVariants.hide\n\t\t\t\t}\n\t\t\t\tanimate={ animateVariants.show }\n\t\t\t\texit={\n\t\t\t\t\treducedMotion ? animateVariants.show : animateVariants.exit\n\t\t\t\t}\n\t\t\t\tclassName=\"block-editor-block-popover__drop-zone-foreground\"\n\t\t\t/>\n\t\t</BlockPopoverCover>\n\t);\n}\n\nexport default BlockDropZonePopover;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,gBAAgB,IAAIC,MAAM,QAAQ,uBAAuB;;AAElE;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,iBAAiB,MAAM,SAAS;AAEvC,MAAMC,eAAe,GAAG;EACvBC,IAAI,EAAE;IAAEC,OAAO,EAAE,CAAC;IAAEC,MAAM,EAAE;EAAK,CAAC;EAClCC,IAAI,EAAE;IAAEF,OAAO,EAAE,CAAC;IAAEC,MAAM,EAAE;EAAE,CAAC;EAC/BE,IAAI,EAAE;IAAEH,OAAO,EAAE,CAAC;IAAEC,MAAM,EAAE;EAAI;AACjC,CAAC;AAED,SAASG,oBAAoBA,CAAE;EAC9BC,qBAAqB;EACrBC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC;EAAS,CAAC,GAAGhB,SAAS,CAAIiB,MAAM,IAAM;IAC7C,MAAM;MAAEC,aAAa;MAAEC;IAAuB,CAAC,GAC9CF,MAAM,CAAEZ,gBAAiB,CAAC;IAC3B,MAAMe,cAAc,GAAGD,sBAAsB,CAAC,CAAC;IAC/C,MAAME,KAAK,GAAGH,aAAa,CAAEE,cAAc,CAACE,YAAa,CAAC;IAE1D,IAAK,CAAED,KAAK,CAACE,MAAM,EAAG;MACrB,OAAO,CAAC,CAAC;IACV;IAEA,OAAO;MACNP,QAAQ,EAAEK,KAAK,CAAED,cAAc,CAACI,KAAK;IACtC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAMC,aAAa,GAAGxB,gBAAgB,CAAC,CAAC;EAExC,OACCyB,aAAA,CAACpB,iBAAiB;IACjBU,QAAQ,EAAGA,QAAU;IACrBF,qBAAqB,EAAGA,qBAAuB;IAC/CC,oBAAoB,EAAGA,oBAAsB;IAC7CY,SAAS,EAAC;EAAuC,GAEjDD,aAAA,CAACvB,MAAM,CAACyB,GAAG;IACV,eAAY,yBAAyB;IACrCC,OAAO,EACNJ,aAAa,GAAGlB,eAAe,CAACI,IAAI,GAAGJ,eAAe,CAACC,IACvD;IACDsB,OAAO,EAAGvB,eAAe,CAACI,IAAM;IAChCC,IAAI,EACHa,aAAa,GAAGlB,eAAe,CAACI,IAAI,GAAGJ,eAAe,CAACK,IACvD;IACDe,SAAS,EAAC;EAAkD,CAC5D,CACiB,CAAC;AAEtB;AAEA,eAAed,oBAAoB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useSelect","useMemo","createContext","useReducer","useLayoutEffect","Popover","isRTL","store","blockEditorStore","__unstableUseBlockElement","useBlockElement","usePopoverScroll","MAX_POPOVER_RECOMPUTE_COUNTER","Number","MAX_SAFE_INTEGER","InsertionPointOpenRef","BlockPopoverInbetween","previousClientId","nextClientId","children","__unstablePopoverSlot","__unstableContentRef","operation","nearestSide","props","popoverRecomputeCounter","forcePopoverRecompute","s","orientation","rootClientId","isVisible","select","getBlockListSettings","getBlockRootClientId","isBlockVisible","_rootClientId","previousElement","nextElement","isVertical","popoverAnchor","undefined","contextElement","getBoundingClientRect","previousRect","nextRect","left","top","width","height","targetRect","bottom","right","window","DOMRect","popoverScrollRef","observer","MutationObserver","observe","attributes","disconnect","ownerDocument","defaultView","addEventListener","removeEventListener","createElement","ref","animate","anchor","focusOnMount","__unstableSlotName","inline","key","className","resize","flip","placement","variant"],"sources":["@wordpress/block-editor/src/components/block-popover/inbetween.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tuseMemo,\n\tcreateContext,\n\tuseReducer,\n\tuseLayoutEffect,\n} from '@wordpress/element';\nimport { Popover } from '@wordpress/components';\nimport { isRTL } from '@wordpress/i18n';\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 usePopoverScroll from './use-popover-scroll';\n\nconst MAX_POPOVER_RECOMPUTE_COUNTER = Number.MAX_SAFE_INTEGER;\n\nexport const InsertionPointOpenRef = createContext();\n\nfunction BlockPopoverInbetween( {\n\tpreviousClientId,\n\tnextClientId,\n\tchildren,\n\t__unstablePopoverSlot,\n\t__unstableContentRef,\n\toperation = 'insert',\n\tnearestSide = 'right',\n\t...props\n} ) {\n\t// This is a temporary hack to get the inbetween inserter to recompute properly.\n\tconst [ popoverRecomputeCounter, forcePopoverRecompute ] = useReducer(\n\t\t// Module is there to make sure that the counter doesn't overflow.\n\t\t( s ) => ( s + 1 ) % MAX_POPOVER_RECOMPUTE_COUNTER,\n\t\t0\n\t);\n\n\tconst { orientation, rootClientId, isVisible } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockListSettings,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tisBlockVisible,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst _rootClientId = getBlockRootClientId(\n\t\t\t\tpreviousClientId ?? nextClientId\n\t\t\t);\n\t\t\treturn {\n\t\t\t\torientation:\n\t\t\t\t\tgetBlockListSettings( _rootClientId )?.orientation ||\n\t\t\t\t\t'vertical',\n\t\t\t\trootClientId: _rootClientId,\n\t\t\t\tisVisible:\n\t\t\t\t\tisBlockVisible( previousClientId ) &&\n\t\t\t\t\tisBlockVisible( nextClientId ),\n\t\t\t};\n\t\t},\n\t\t[ previousClientId, nextClientId ]\n\t);\n\tconst previousElement = useBlockElement( previousClientId );\n\tconst nextElement = useBlockElement( nextClientId );\n\tconst isVertical = orientation === 'vertical';\n\n\tconst popoverAnchor = useMemo( () => {\n\t\tif (\n\t\t\t// popoverRecomputeCounter is by definition always equal or greater than 0.\n\t\t\t// This check is only there to satisfy the correctness of the\n\t\t\t// exhaustive-deps rule for the `useMemo` hook.\n\t\t\tpopoverRecomputeCounter < 0 ||\n\t\t\t( ! previousElement && ! nextElement ) ||\n\t\t\t! isVisible\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst contextElement =\n\t\t\toperation === 'group'\n\t\t\t\t? nextElement || previousElement\n\t\t\t\t: previousElement || nextElement;\n\n\t\treturn {\n\t\t\tcontextElement,\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst previousRect = previousElement\n\t\t\t\t\t? previousElement.getBoundingClientRect()\n\t\t\t\t\t: null;\n\t\t\t\tconst nextRect = nextElement\n\t\t\t\t\t? nextElement.getBoundingClientRect()\n\t\t\t\t\t: null;\n\n\t\t\t\tlet left = 0;\n\t\t\t\tlet top = 0;\n\t\t\t\tlet width = 0;\n\t\t\t\tlet height = 0;\n\n\t\t\t\tif ( operation === 'group' ) {\n\t\t\t\t\tconst targetRect = nextRect || previousRect;\n\t\t\t\t\ttop = targetRect.top;\n\t\t\t\t\t// No spacing is likely around blocks in this operation.\n\t\t\t\t\t// So width of the inserter containing rect is set to 0.\n\t\t\t\t\twidth = 0;\n\t\t\t\t\theight = targetRect.bottom - targetRect.top;\n\t\t\t\t\t// Popover calculates its distance from mid-block so some\n\t\t\t\t\t// adjustments are needed to make it appear in the right place.\n\t\t\t\t\tleft =\n\t\t\t\t\t\tnearestSide === 'left'\n\t\t\t\t\t\t\t? targetRect.left - 2\n\t\t\t\t\t\t\t: targetRect.right - 2;\n\t\t\t\t} else if ( isVertical ) {\n\t\t\t\t\t// vertical\n\t\t\t\t\ttop = previousRect ? previousRect.bottom : nextRect.top;\n\t\t\t\t\twidth = previousRect ? previousRect.width : nextRect.width;\n\t\t\t\t\theight =\n\t\t\t\t\t\tnextRect && previousRect\n\t\t\t\t\t\t\t? nextRect.top - previousRect.bottom\n\t\t\t\t\t\t\t: 0;\n\t\t\t\t\tleft = previousRect ? previousRect.left : nextRect.left;\n\t\t\t\t} else {\n\t\t\t\t\ttop = previousRect ? previousRect.top : nextRect.top;\n\t\t\t\t\theight = previousRect\n\t\t\t\t\t\t? previousRect.height\n\t\t\t\t\t\t: nextRect.height;\n\n\t\t\t\t\tif ( isRTL() ) {\n\t\t\t\t\t\t// non vertical, rtl\n\t\t\t\t\t\tleft = nextRect ? nextRect.right : previousRect.left;\n\t\t\t\t\t\twidth =\n\t\t\t\t\t\t\tpreviousRect && nextRect\n\t\t\t\t\t\t\t\t? previousRect.left - nextRect.right\n\t\t\t\t\t\t\t\t: 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// non vertical, ltr\n\t\t\t\t\t\tleft = previousRect\n\t\t\t\t\t\t\t? previousRect.right\n\t\t\t\t\t\t\t: nextRect.left;\n\t\t\t\t\t\twidth =\n\t\t\t\t\t\t\tpreviousRect && nextRect\n\t\t\t\t\t\t\t\t? nextRect.left - previousRect.right\n\t\t\t\t\t\t\t\t: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn new window.DOMRect( left, top, width, height );\n\t\t\t},\n\t\t};\n\t}, [\n\t\tpreviousElement,\n\t\tnextElement,\n\t\tpopoverRecomputeCounter,\n\t\tisVertical,\n\t\tisVisible,\n\t\toperation,\n\t\tnearestSide,\n\t] );\n\n\tconst popoverScrollRef = usePopoverScroll( __unstableContentRef );\n\n\t// This is only needed for a smooth transition when moving blocks.\n\t// When blocks are moved up/down, their position can be set by\n\t// updating the `transform` property manually (i.e. without using CSS\n\t// transitions or animations). The animation, which can also scroll the block\n\t// editor, can sometimes cause the position of the Popover to get out of sync.\n\t// A MutationObserver is therefore used to make sure that changes to the\n\t// selectedElement's attribute (i.e. `transform`) can be tracked and used to\n\t// trigger the Popover to rerender.\n\tuseLayoutEffect( () => {\n\t\tif ( ! previousElement ) {\n\t\t\treturn;\n\t\t}\n\t\tconst observer = new window.MutationObserver( forcePopoverRecompute );\n\t\tobserver.observe( previousElement, { attributes: true } );\n\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t};\n\t}, [ previousElement ] );\n\n\tuseLayoutEffect( () => {\n\t\tif ( ! nextElement ) {\n\t\t\treturn;\n\t\t}\n\t\tconst observer = new window.MutationObserver( forcePopoverRecompute );\n\t\tobserver.observe( nextElement, { attributes: true } );\n\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t};\n\t}, [ nextElement ] );\n\n\tuseLayoutEffect( () => {\n\t\tif ( ! previousElement ) {\n\t\t\treturn;\n\t\t}\n\t\tpreviousElement.ownerDocument.defaultView.addEventListener(\n\t\t\t'resize',\n\t\t\tforcePopoverRecompute\n\t\t);\n\t\treturn () => {\n\t\t\tpreviousElement.ownerDocument.defaultView?.removeEventListener(\n\t\t\t\t'resize',\n\t\t\t\tforcePopoverRecompute\n\t\t\t);\n\t\t};\n\t}, [ previousElement ] );\n\n\t// If there's either a previous or a next element, show the inbetween popover.\n\t// Note that drag and drop uses the inbetween popover to show the drop indicator\n\t// before the first block and after the last block.\n\tif ( ( ! previousElement && ! nextElement ) || ! isVisible ) {\n\t\treturn null;\n\t}\n\n\t/* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */\n\t// While ideally it would be enough to capture the\n\t// bubbling focus event from the Inserter, due to the\n\t// characteristics of click focusing of `button`s in\n\t// Firefox and Safari, it is not reliable.\n\t//\n\t// See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus\n\treturn (\n\t\t<Popover\n\t\t\tref={ popoverScrollRef }\n\t\t\tanimate={ false }\n\t\t\tanchor={ popoverAnchor }\n\t\t\tfocusOnMount={ false }\n\t\t\t// Render in the old slot if needed for backward compatibility,\n\t\t\t// otherwise render in place (not in the default popover slot).\n\t\t\t__unstableSlotName={ __unstablePopoverSlot }\n\t\t\tinline={ ! __unstablePopoverSlot }\n\t\t\t// Forces a remount of the popover when its position changes\n\t\t\t// This makes sure the popover doesn't animate from its previous position.\n\t\t\tkey={ nextClientId + '--' + rootClientId }\n\t\t\t{ ...props }\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-block-popover',\n\t\t\t\t'block-editor-block-popover__inbetween',\n\t\t\t\tprops.className\n\t\t\t) }\n\t\t\tresize={ false }\n\t\t\tflip={ false }\n\t\t\tplacement=\"overlay\"\n\t\t\tvariant=\"unstyled\"\n\t\t>\n\t\t\t<div className=\"block-editor-block-popover__inbetween-container\">\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</Popover>\n\t);\n\t/* eslint-enable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */\n}\n\nexport default BlockPopoverInbetween;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SACCC,OAAO,EACPC,aAAa,EACbC,UAAU,EACVC,eAAe,QACT,oBAAoB;AAC3B,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,KAAK,QAAQ,iBAAiB;;AAEvC;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,yBAAyB,IAAIC,eAAe,QAAQ,8CAA8C;AAC3G,OAAOC,gBAAgB,MAAM,sBAAsB;AAEnD,MAAMC,6BAA6B,GAAGC,MAAM,CAACC,gBAAgB;AAE7D,OAAO,MAAMC,qBAAqB,GAAGb,aAAa,CAAC,CAAC;AAEpD,SAASc,qBAAqBA,CAAE;EAC/BC,gBAAgB;EAChBC,YAAY;EACZC,QAAQ;EACRC,qBAAqB;EACrBC,oBAAoB;EACpBC,SAAS,GAAG,QAAQ;EACpBC,WAAW,GAAG,OAAO;EACrB,GAAGC;AACJ,CAAC,EAAG;EACH;EACA,MAAM,CAAEC,uBAAuB,EAAEC,qBAAqB,CAAE,GAAGvB,UAAU;EACpE;EACEwB,CAAC,IAAM,CAAEA,CAAC,GAAG,CAAC,IAAKf,6BAA6B,EAClD,CAC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AG,CAAC;EAEpBjC,eAAe,CAAE,MAAM;IACtB,IAAK,CAAEgC,eAAe,EAAG;MACxB;IACD;IACAA,eAAe,CAACwB,aAAa,CAACC,WAAW,CAACC,gBAAgB,CACzD,QAAQ,EACRpC,qBACD,CAAC;IACD,OAAO,MAAM;MACZU,eAAe,CAACwB,aAAa,CAACC,WAAW,EAAEE,mBAAmB,CAC7D,QAAQ,EACRrC,qBACD,CAAC;IACF,CAAC;EACF,CAAC,EAAE,CAAEU,eAAe,CAAG,CAAC;;EAExB;EACA;EACA;EACA,IAAO,CAAEA,eAAe,IAAI,CAAEC,WAAW,IAAM,CAAEP,SAAS,EAAG;IAC5D,OAAO,IAAI;EACZ;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OACCkC,aAAA,CAAC3D,OAAO;IACP4D,GAAG,EAAGX,gBAAkB;IACxBY,OAAO,EAAG,KAAO;IACjBC,MAAM,EAAG5B,aAAe;IACxB6B,YAAY,EAAG;IACf;IACA;IAAA;IACAC,kBAAkB,EAAGjD,qBAAuB;IAC5CkD,MAAM,EAAG,CAAElD;IACX;IACA;IAAA;IACAmD,GAAG,EAAGrD,YAAY,GAAG,IAAI,GAAGW,YAAc;IAAA,GACrCL,KAAK;IACVgD,SAAS,EAAGzE,UAAU,CACrB,4BAA4B,EAC5B,uCAAuC,EACvCyB,KAAK,CAACgD,SACP,CAAG;IACHC,MAAM,EAAG,KAAO;IAChBC,IAAI,EAAG,KAAO;IACdC,SAAS,EAAC,SAAS;IACnBC,OAAO,EAAC;EAAU,GAElBZ,aAAA;IAAKQ,SAAS,EAAC;EAAiD,GAC7DrD,QACE,CACG,CAAC;EAEX;AACD;AAEA,eAAeH,qBAAqB"}
1
+ {"version":3,"names":["classnames","useSelect","useMemo","createContext","useReducer","useLayoutEffect","Popover","isRTL","store","blockEditorStore","__unstableUseBlockElement","useBlockElement","usePopoverScroll","MAX_POPOVER_RECOMPUTE_COUNTER","Number","MAX_SAFE_INTEGER","InsertionPointOpenRef","BlockPopoverInbetween","previousClientId","nextClientId","children","__unstablePopoverSlot","__unstableContentRef","operation","nearestSide","props","popoverRecomputeCounter","forcePopoverRecompute","s","orientation","rootClientId","isVisible","select","getBlockListSettings","getBlockRootClientId","isBlockVisible","_rootClientId","previousElement","nextElement","isVertical","popoverAnchor","undefined","contextElement","getBoundingClientRect","previousRect","nextRect","left","top","width","height","targetRect","bottom","right","window","DOMRect","popoverScrollRef","observer","MutationObserver","observe","attributes","disconnect","ownerDocument","defaultView","addEventListener","removeEventListener","createElement","ref","animate","anchor","focusOnMount","__unstableSlotName","inline","key","className","resize","flip","placement","variant"],"sources":["@wordpress/block-editor/src/components/block-popover/inbetween.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tuseMemo,\n\tcreateContext,\n\tuseReducer,\n\tuseLayoutEffect,\n} from '@wordpress/element';\nimport { Popover } from '@wordpress/components';\nimport { isRTL } from '@wordpress/i18n';\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 usePopoverScroll from './use-popover-scroll';\n\nconst MAX_POPOVER_RECOMPUTE_COUNTER = Number.MAX_SAFE_INTEGER;\n\nexport const InsertionPointOpenRef = createContext();\n\nfunction BlockPopoverInbetween( {\n\tpreviousClientId,\n\tnextClientId,\n\tchildren,\n\t__unstablePopoverSlot,\n\t__unstableContentRef,\n\toperation = 'insert',\n\tnearestSide = 'right',\n\t...props\n} ) {\n\t// This is a temporary hack to get the inbetween inserter to recompute properly.\n\tconst [ popoverRecomputeCounter, forcePopoverRecompute ] = useReducer(\n\t\t// Module is there to make sure that the counter doesn't overflow.\n\t\t( s ) => ( s + 1 ) % MAX_POPOVER_RECOMPUTE_COUNTER,\n\t\t0\n\t);\n\n\tconst { orientation, rootClientId, isVisible } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockListSettings,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tisBlockVisible,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst _rootClientId = getBlockRootClientId(\n\t\t\t\tpreviousClientId ?? nextClientId\n\t\t\t);\n\t\t\treturn {\n\t\t\t\torientation:\n\t\t\t\t\tgetBlockListSettings( _rootClientId )?.orientation ||\n\t\t\t\t\t'vertical',\n\t\t\t\trootClientId: _rootClientId,\n\t\t\t\tisVisible:\n\t\t\t\t\tisBlockVisible( previousClientId ) &&\n\t\t\t\t\tisBlockVisible( nextClientId ),\n\t\t\t};\n\t\t},\n\t\t[ previousClientId, nextClientId ]\n\t);\n\tconst previousElement = useBlockElement( previousClientId );\n\tconst nextElement = useBlockElement( nextClientId );\n\tconst isVertical = orientation === 'vertical';\n\n\tconst popoverAnchor = useMemo( () => {\n\t\tif (\n\t\t\t// popoverRecomputeCounter is by definition always equal or greater than 0.\n\t\t\t// This check is only there to satisfy the correctness of the\n\t\t\t// exhaustive-deps rule for the `useMemo` hook.\n\t\t\tpopoverRecomputeCounter < 0 ||\n\t\t\t( ! previousElement && ! nextElement ) ||\n\t\t\t! isVisible\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst contextElement =\n\t\t\toperation === 'group'\n\t\t\t\t? nextElement || previousElement\n\t\t\t\t: previousElement || nextElement;\n\n\t\treturn {\n\t\t\tcontextElement,\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst previousRect = previousElement\n\t\t\t\t\t? previousElement.getBoundingClientRect()\n\t\t\t\t\t: null;\n\t\t\t\tconst nextRect = nextElement\n\t\t\t\t\t? nextElement.getBoundingClientRect()\n\t\t\t\t\t: null;\n\n\t\t\t\tlet left = 0;\n\t\t\t\tlet top = 0;\n\t\t\t\tlet width = 0;\n\t\t\t\tlet height = 0;\n\n\t\t\t\tif ( operation === 'group' ) {\n\t\t\t\t\tconst targetRect = nextRect || previousRect;\n\t\t\t\t\ttop = targetRect.top;\n\t\t\t\t\t// No spacing is likely around blocks in this operation.\n\t\t\t\t\t// So width of the inserter containing rect is set to 0.\n\t\t\t\t\twidth = 0;\n\t\t\t\t\theight = targetRect.bottom - targetRect.top;\n\t\t\t\t\t// Popover calculates its distance from mid-block so some\n\t\t\t\t\t// adjustments are needed to make it appear in the right place.\n\t\t\t\t\tleft =\n\t\t\t\t\t\tnearestSide === 'left'\n\t\t\t\t\t\t\t? targetRect.left - 2\n\t\t\t\t\t\t\t: targetRect.right - 2;\n\t\t\t\t} else if ( isVertical ) {\n\t\t\t\t\t// vertical\n\t\t\t\t\ttop = previousRect ? previousRect.bottom : nextRect.top;\n\t\t\t\t\twidth = previousRect ? previousRect.width : nextRect.width;\n\t\t\t\t\theight =\n\t\t\t\t\t\tnextRect && previousRect\n\t\t\t\t\t\t\t? nextRect.top - previousRect.bottom\n\t\t\t\t\t\t\t: 0;\n\t\t\t\t\tleft = previousRect ? previousRect.left : nextRect.left;\n\t\t\t\t} else {\n\t\t\t\t\ttop = previousRect ? previousRect.top : nextRect.top;\n\t\t\t\t\theight = previousRect\n\t\t\t\t\t\t? previousRect.height\n\t\t\t\t\t\t: nextRect.height;\n\n\t\t\t\t\tif ( isRTL() ) {\n\t\t\t\t\t\t// non vertical, rtl\n\t\t\t\t\t\tleft = nextRect ? nextRect.right : previousRect.left;\n\t\t\t\t\t\twidth =\n\t\t\t\t\t\t\tpreviousRect && nextRect\n\t\t\t\t\t\t\t\t? previousRect.left - nextRect.right\n\t\t\t\t\t\t\t\t: 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// non vertical, ltr\n\t\t\t\t\t\tleft = previousRect\n\t\t\t\t\t\t\t? previousRect.right\n\t\t\t\t\t\t\t: nextRect.left;\n\t\t\t\t\t\twidth =\n\t\t\t\t\t\t\tpreviousRect && nextRect\n\t\t\t\t\t\t\t\t? nextRect.left - previousRect.right\n\t\t\t\t\t\t\t\t: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn new window.DOMRect( left, top, width, height );\n\t\t\t},\n\t\t};\n\t}, [\n\t\tpreviousElement,\n\t\tnextElement,\n\t\tpopoverRecomputeCounter,\n\t\tisVertical,\n\t\tisVisible,\n\t\toperation,\n\t\tnearestSide,\n\t] );\n\n\tconst popoverScrollRef = usePopoverScroll( __unstableContentRef );\n\n\t// This is only needed for a smooth transition when moving blocks.\n\t// When blocks are moved up/down, their position can be set by\n\t// updating the `transform` property manually (i.e. without using CSS\n\t// transitions or animations). The animation, which can also scroll the block\n\t// editor, can sometimes cause the position of the Popover to get out of sync.\n\t// A MutationObserver is therefore used to make sure that changes to the\n\t// selectedElement's attribute (i.e. `transform`) can be tracked and used to\n\t// trigger the Popover to rerender.\n\tuseLayoutEffect( () => {\n\t\tif ( ! previousElement ) {\n\t\t\treturn;\n\t\t}\n\t\tconst observer = new window.MutationObserver( forcePopoverRecompute );\n\t\tobserver.observe( previousElement, { attributes: true } );\n\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t};\n\t}, [ previousElement ] );\n\n\tuseLayoutEffect( () => {\n\t\tif ( ! nextElement ) {\n\t\t\treturn;\n\t\t}\n\t\tconst observer = new window.MutationObserver( forcePopoverRecompute );\n\t\tobserver.observe( nextElement, { attributes: true } );\n\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t};\n\t}, [ nextElement ] );\n\n\tuseLayoutEffect( () => {\n\t\tif ( ! previousElement ) {\n\t\t\treturn;\n\t\t}\n\t\tpreviousElement.ownerDocument.defaultView.addEventListener(\n\t\t\t'resize',\n\t\t\tforcePopoverRecompute\n\t\t);\n\t\treturn () => {\n\t\t\tpreviousElement.ownerDocument.defaultView?.removeEventListener(\n\t\t\t\t'resize',\n\t\t\t\tforcePopoverRecompute\n\t\t\t);\n\t\t};\n\t}, [ previousElement ] );\n\n\t// If there's either a previous or a next element, show the inbetween popover.\n\t// Note that drag and drop uses the inbetween popover to show the drop indicator\n\t// before the first block and after the last block.\n\tif ( ( ! previousElement && ! nextElement ) || ! isVisible ) {\n\t\treturn null;\n\t}\n\n\t/* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */\n\t// While ideally it would be enough to capture the\n\t// bubbling focus event from the Inserter, due to the\n\t// characteristics of click focusing of `button`s in\n\t// Firefox and Safari, it is not reliable.\n\t//\n\t// See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus\n\treturn (\n\t\t<Popover\n\t\t\tref={ popoverScrollRef }\n\t\t\tanimate={ false }\n\t\t\tanchor={ popoverAnchor }\n\t\t\tfocusOnMount={ false }\n\t\t\t// Render in the old slot if needed for backward compatibility,\n\t\t\t// otherwise render in place (not in the default popover slot).\n\t\t\t__unstableSlotName={ __unstablePopoverSlot }\n\t\t\tinline={ ! __unstablePopoverSlot }\n\t\t\t// Forces a remount of the popover when its position changes\n\t\t\t// This makes sure the popover doesn't animate from its previous position.\n\t\t\tkey={ nextClientId + '--' + rootClientId }\n\t\t\t{ ...props }\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-block-popover',\n\t\t\t\t'block-editor-block-popover__inbetween',\n\t\t\t\tprops.className\n\t\t\t) }\n\t\t\tresize={ false }\n\t\t\tflip={ false }\n\t\t\tplacement=\"overlay\"\n\t\t\tvariant=\"unstyled\"\n\t\t>\n\t\t\t<div className=\"block-editor-block-popover__inbetween-container\">\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</Popover>\n\t);\n\t/* eslint-enable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */\n}\n\nexport default BlockPopoverInbetween;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SACCC,OAAO,EACPC,aAAa,EACbC,UAAU,EACVC,eAAe,QACT,oBAAoB;AAC3B,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,KAAK,QA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