@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":["classnames","useSelect","useDispatch","useRef","createContext","useContext","__unstableMotion","motion","useReducedMotion","Inserter","store","blockEditorStore","BlockPopoverInbetween","BlockDropZonePopover","InsertionPointOpenRef","InbetweenInsertionPointPopover","__unstablePopoverSlot","__unstableContentRef","operation","nearestSide","selectBlock","hideInsertionPoint","openRef","ref","orientation","previousClientId","nextClientId","rootClientId","isInserterShown","isDistractionFree","isNavigationMode","select","getBlockOrder","getBlockListSettings","getBlockInsertionPoint","isBlockBeingDragged","getPreviousBlockClientId","getNextBlockClientId","getSettings","_isNavigationMode","insertionPoint","order","length","_previousClientId","index","_nextClientId","settings","__unstableWithInserter","getBlockEditingMode","disableMotion","onClick","event","target","current","maybeHideInserterPoint","onFocus","lineVariants","start","opacity","scale","rest","transition","delay","type","hover","inserterVariants","orientationClassname","className","createElement","div","layout","initial","animate","whileHover","whileTap","exit","tabIndex","onHoverEnd","variants","position","clientId","__experimentalIsQuick","onToggle","isOpen","onSelectOrClose","InsertionPoint","props","isVisible","isBlockListEmpty","isBlockInsertionPointVisible","getBlockCount","blockInsertionPoint","key"],"sources":["@wordpress/block-editor/src/components/block-tools/insertion-point.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRef, createContext, useContext } from '@wordpress/element';\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport { useReducedMotion } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Inserter from '../inserter';\nimport { store as blockEditorStore } from '../../store';\nimport BlockPopoverInbetween from '../block-popover/inbetween';\nimport BlockDropZonePopover from '../block-popover/drop-zone';\n\nexport const InsertionPointOpenRef = createContext();\n\nfunction InbetweenInsertionPointPopover( {\n\t__unstablePopoverSlot,\n\t__unstableContentRef,\n\toperation = 'insert',\n\tnearestSide = 'right',\n} ) {\n\tconst { selectBlock, hideInsertionPoint } = useDispatch( blockEditorStore );\n\tconst openRef = useContext( InsertionPointOpenRef );\n\tconst ref = useRef();\n\tconst {\n\t\torientation,\n\t\tpreviousClientId,\n\t\tnextClientId,\n\t\trootClientId,\n\t\tisInserterShown,\n\t\tisDistractionFree,\n\t\tisNavigationMode,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetBlockOrder,\n\t\t\tgetBlockListSettings,\n\t\t\tgetBlockInsertionPoint,\n\t\t\tisBlockBeingDragged,\n\t\t\tgetPreviousBlockClientId,\n\t\t\tgetNextBlockClientId,\n\t\t\tgetSettings,\n\t\t\tisNavigationMode: _isNavigationMode,\n\t\t} = select( blockEditorStore );\n\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\tconst order = getBlockOrder( insertionPoint.rootClientId );\n\n\t\tif ( ! order.length ) {\n\t\t\treturn {};\n\t\t}\n\n\t\tlet _previousClientId = order[ insertionPoint.index - 1 ];\n\t\tlet _nextClientId = order[ insertionPoint.index ];\n\n\t\twhile ( isBlockBeingDragged( _previousClientId ) ) {\n\t\t\t_previousClientId = getPreviousBlockClientId( _previousClientId );\n\t\t}\n\n\t\twhile ( isBlockBeingDragged( _nextClientId ) ) {\n\t\t\t_nextClientId = getNextBlockClientId( _nextClientId );\n\t\t}\n\n\t\tconst settings = getSettings();\n\n\t\treturn {\n\t\t\tpreviousClientId: _previousClientId,\n\t\t\tnextClientId: _nextClientId,\n\t\t\torientation:\n\t\t\t\tgetBlockListSettings( insertionPoint.rootClientId )\n\t\t\t\t\t?.orientation || 'vertical',\n\t\t\trootClientId: insertionPoint.rootClientId,\n\t\t\tisNavigationMode: _isNavigationMode(),\n\t\t\tisDistractionFree: settings.isDistractionFree,\n\t\t\tisInserterShown: insertionPoint?.__unstableWithInserter,\n\t\t};\n\t}, [] );\n\tconst { getBlockEditingMode } = useSelect( blockEditorStore );\n\n\tconst disableMotion = useReducedMotion();\n\n\tfunction onClick( event ) {\n\t\tif (\n\t\t\tevent.target === ref.current &&\n\t\t\tnextClientId &&\n\t\t\tgetBlockEditingMode( nextClientId ) !== 'disabled'\n\t\t) {\n\t\t\tselectBlock( nextClientId, -1 );\n\t\t}\n\t}\n\n\tfunction maybeHideInserterPoint( event ) {\n\t\t// Only hide the inserter if it's triggered on the wrapper,\n\t\t// and the inserter is not open.\n\t\tif ( event.target === ref.current && ! openRef.current ) {\n\t\t\thideInsertionPoint();\n\t\t}\n\t}\n\n\tfunction onFocus( event ) {\n\t\t// Only handle click on the wrapper specifically, and not an event\n\t\t// bubbled from the inserter itself.\n\t\tif ( event.target !== ref.current ) {\n\t\t\topenRef.current = true;\n\t\t}\n\t}\n\n\tconst lineVariants = {\n\t\t// Initial position starts from the center and invisible.\n\t\tstart: {\n\t\t\topacity: 0,\n\t\t\tscale: 0,\n\t\t},\n\t\t// The line expands to fill the container. If the inserter is visible it\n\t\t// is delayed so it appears orchestrated.\n\t\trest: {\n\t\t\topacity: 1,\n\t\t\tscale: 1,\n\t\t\ttransition: { delay: isInserterShown ? 0.5 : 0, type: 'tween' },\n\t\t},\n\t\thover: {\n\t\t\topacity: 1,\n\t\t\tscale: 1,\n\t\t\ttransition: { delay: 0.5, type: 'tween' },\n\t\t},\n\t};\n\n\tconst inserterVariants = {\n\t\tstart: {\n\t\t\tscale: disableMotion ? 1 : 0,\n\t\t},\n\t\trest: {\n\t\t\tscale: 1,\n\t\t\ttransition: { delay: 0.4, type: 'tween' },\n\t\t},\n\t};\n\n\tif ( isDistractionFree && ! isNavigationMode ) {\n\t\treturn null;\n\t}\n\n\tconst orientationClassname =\n\t\torientation === 'horizontal' || operation === 'group'\n\t\t\t? 'is-horizontal'\n\t\t\t: 'is-vertical';\n\n\tconst className = classnames(\n\t\t'block-editor-block-list__insertion-point',\n\t\torientationClassname\n\t);\n\n\treturn (\n\t\t<BlockPopoverInbetween\n\t\t\tpreviousClientId={ previousClientId }\n\t\t\tnextClientId={ nextClientId }\n\t\t\t__unstablePopoverSlot={ __unstablePopoverSlot }\n\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\toperation={ operation }\n\t\t\tnearestSide={ nearestSide }\n\t\t>\n\t\t\t<motion.div\n\t\t\t\tlayout={ ! disableMotion }\n\t\t\t\tinitial={ disableMotion ? 'rest' : 'start' }\n\t\t\t\tanimate=\"rest\"\n\t\t\t\twhileHover=\"hover\"\n\t\t\t\twhileTap=\"pressed\"\n\t\t\t\texit=\"start\"\n\t\t\t\tref={ ref }\n\t\t\t\ttabIndex={ -1 }\n\t\t\t\tonClick={ onClick }\n\t\t\t\tonFocus={ onFocus }\n\t\t\t\tclassName={ classnames( className, {\n\t\t\t\t\t'is-with-inserter': isInserterShown,\n\t\t\t\t} ) }\n\t\t\t\tonHoverEnd={ maybeHideInserterPoint }\n\t\t\t>\n\t\t\t\t<motion.div\n\t\t\t\t\tvariants={ lineVariants }\n\t\t\t\t\tclassName=\"block-editor-block-list__insertion-point-indicator\"\n\t\t\t\t\tdata-testid=\"block-list-insertion-point-indicator\"\n\t\t\t\t/>\n\t\t\t\t{ isInserterShown && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tvariants={ inserterVariants }\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'block-editor-block-list__insertion-point-inserter'\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Inserter\n\t\t\t\t\t\t\tposition=\"bottom center\"\n\t\t\t\t\t\t\tclientId={ nextClientId }\n\t\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\t\t__experimentalIsQuick\n\t\t\t\t\t\t\tonToggle={ ( isOpen ) => {\n\t\t\t\t\t\t\t\topenRef.current = isOpen;\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonSelectOrClose={ () => {\n\t\t\t\t\t\t\t\topenRef.current = false;\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</motion.div>\n\t\t\t\t) }\n\t\t\t</motion.div>\n\t\t</BlockPopoverInbetween>\n\t);\n}\n\nexport default function InsertionPoint( props ) {\n\tconst { insertionPoint, isVisible, isBlockListEmpty } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockCount,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst blockInsertionPoint = getBlockInsertionPoint();\n\t\t\treturn {\n\t\t\t\tinsertionPoint: blockInsertionPoint,\n\t\t\t\tisVisible: isBlockInsertionPointVisible(),\n\t\t\t\tisBlockListEmpty:\n\t\t\t\t\tgetBlockCount( blockInsertionPoint?.rootClientId ) === 0,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tif (\n\t\t! isVisible ||\n\t\t// Don't render the insertion point if the block list is empty.\n\t\t// The insertion point will be represented by the appender instead.\n\t\tisBlockListEmpty\n\t) {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Render a popover that overlays the block when the desired operation is to replace it.\n\t * Otherwise, render a popover in between blocks for the indication of inserting between them.\n\t */\n\treturn insertionPoint.operation === 'replace' ? (\n\t\t<BlockDropZonePopover\n\t\t\t// Force remount to trigger the animation.\n\t\t\tkey={ `${ insertionPoint.rootClientId }-${ insertionPoint.index }` }\n\t\t\t{ ...props }\n\t\t/>\n\t) : (\n\t\t<InbetweenInsertionPointPopover\n\t\t\toperation={ insertionPoint.operation }\n\t\t\tnearestSide={ insertionPoint.nearestSide }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,MAAM,EAAEC,aAAa,EAAEC,UAAU,QAAQ,oBAAoB;AACtE,SAASC,gBAAgB,IAAIC,MAAM,QAAQ,uBAAuB;AAClE,SAASC,gBAAgB,QAAQ,oBAAoB;;AAErD;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,aAAa;AAClC,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,qBAAqB,MAAM,4BAA4B;AAC9D,OAAOC,oBAAoB,MAAM,4BAA4B;AAE7D,OAAO,MAAMC,qBAAqB,GAAGV,aAAa,CAAC,CAAC;AAEpD,SAASW,8BAA8BA,CAAE;EACxCC,qBAAqB;EACrBC,oBAAoB;EACpBC,SAAS,GAAG,QAAQ;EACpBC,WAAW,GAAG;AACf,CAAC,EAAG;EACH,MAAM;IAAEC,WAAW;IAAEC;EAAmB,CAAC,GAAGnB,WAAW,CAAES,gBAAiB,CAAC;EAC3E,MAAMW,OAAO,GAAGjB,UAAU,CAAES,qBAAsB,CAAC;EACnD,MAAMS,GAAG,GAAGpB,MAAM,CAAC,CAAC;EACpB,MAAM;IACLqB,WAAW;IACXC,gBAAgB;IAChBC,YAAY;IACZC,YAAY;IACZC,eAAe;IACfC,iBAAiB;IACjBC;EACD,CAAC,GAAG7B,SAAS,CAA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rB,WAAa;IAAA,GACrCmE;EAAK,CACV,CACD;AACF"}
1
+ {"version":3,"names":["classnames","useSelect","useDispatch","useRef","createContext","useContext","__unstableMotion","motion","useReducedMotion","Inserter","store","blockEditorStore","BlockPopoverInbetween","BlockDropZonePopover","InsertionPointOpenRef","InbetweenInsertionPointPopover","__unstablePopoverSlot","__unstableContentRef","operation","nearestSide","selectBlock","hideInsertionPoint","openRef","ref","orientation","previousClientId","nextClientId","rootClientId","isInserterShown","isDistractionFree","isNavigationMode","select","getBlockOrder","getBlockListSettings","getBlockInsertionPoint","isBlockBeingDragged","getPreviousBlockClientId","getNextBlockClientId","getSettings","_isNavigationMode","insertionPoint","order","length","_previousClientId","index","_nextClientId","settings","__unstableWithInserter","getBlockEditingMode","disableMotion","onClick","event","target","current","maybeHideInserterPoint","onFocus","lineVariants","start","opacity","scale","rest","transition","delay","type","hover","inserterVariants","orientationClassname","className","createElement","div","layout","initial","animate","whileHover","whileTap","exit","tabIndex","onHoverEnd","variants","position","clientId","__experimentalIsQuick","onToggle","isOpen","onSelectOrClose","InsertionPoint","props","isVisible","isBlockListEmpty","isBlockInsertionPointVisible","getBlockCount","blockInsertionPoint","key"],"sources":["@wordpress/block-editor/src/components/block-tools/insertion-point.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRef, createContext, useContext } from '@wordpress/element';\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport { useReducedMotion } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Inserter from '../inserter';\nimport { store as blockEditorStore } from '../../store';\nimport BlockPopoverInbetween from '../block-popover/inbetween';\nimport BlockDropZonePopover from '../block-popover/drop-zone';\n\nexport const InsertionPointOpenRef = createContext();\n\nfunction InbetweenInsertionPointPopover( {\n\t__unstablePopoverSlot,\n\t__unstableContentRef,\n\toperation = 'insert',\n\tnearestSide = 'right',\n} ) {\n\tconst { selectBlock, hideInsertionPoint } = useDispatch( blockEditorStore );\n\tconst openRef = useContext( InsertionPointOpenRef );\n\tconst ref = useRef();\n\tconst {\n\t\torientation,\n\t\tpreviousClientId,\n\t\tnextClientId,\n\t\trootClientId,\n\t\tisInserterShown,\n\t\tisDistractionFree,\n\t\tisNavigationMode,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetBlockOrder,\n\t\t\tgetBlockListSettings,\n\t\t\tgetBlockInsertionPoint,\n\t\t\tisBlockBeingDragged,\n\t\t\tgetPreviousBlockClientId,\n\t\t\tgetNextBlockClientId,\n\t\t\tgetSettings,\n\t\t\tisNavigationMode: _isNavigationMode,\n\t\t} = select( blockEditorStore );\n\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\tconst order = getBlockOrder( insertionPoint.rootClientId );\n\n\t\tif ( ! order.length ) {\n\t\t\treturn {};\n\t\t}\n\n\t\tlet _previousClientId = order[ insertionPoint.index - 1 ];\n\t\tlet _nextClientId = order[ insertionPoint.index ];\n\n\t\twhile ( isBlockBeingDragged( _previousClientId ) ) {\n\t\t\t_previousClientId = getPreviousBlockClientId( _previousClientId );\n\t\t}\n\n\t\twhile ( isBlockBeingDragged( _nextClientId ) ) {\n\t\t\t_nextClientId = getNextBlockClientId( _nextClientId );\n\t\t}\n\n\t\tconst settings = getSettings();\n\n\t\treturn {\n\t\t\tpreviousClientId: _previousClientId,\n\t\t\tnextClientId: _nextClientId,\n\t\t\torientation:\n\t\t\t\tgetBlockListSettings( insertionPoint.rootClientId )\n\t\t\t\t\t?.orientation || 'vertical',\n\t\t\trootClientId: insertionPoint.rootClientId,\n\t\t\tisNavigationMode: _isNavigationMode(),\n\t\t\tisDistractionFree: settings.isDistractionFree,\n\t\t\tisInserterShown: insertionPoint?.__unstableWithInserter,\n\t\t};\n\t}, [] );\n\tconst { getBlockEditingMode } = useSelect( blockEditorStore );\n\n\tconst disableMotion = useReducedMotion();\n\n\tfunction onClick( event ) {\n\t\tif (\n\t\t\tevent.target === ref.current &&\n\t\t\tnextClientId &&\n\t\t\tgetBlockEditingMode( nextClientId ) !== 'disabled'\n\t\t) {\n\t\t\tselectBlock( nextClientId, -1 );\n\t\t}\n\t}\n\n\tfunction maybeHideInserterPoint( event ) {\n\t\t// Only hide the inserter if it's triggered on the wrapper,\n\t\t// and the inserter is not open.\n\t\tif ( event.target === ref.current && ! openRef.current ) {\n\t\t\thideInsertionPoint();\n\t\t}\n\t}\n\n\tfunction onFocus( event ) {\n\t\t// Only handle click on the wrapper specifically, and not an event\n\t\t// bubbled from the inserter itself.\n\t\tif ( event.target !== ref.current ) {\n\t\t\topenRef.current = true;\n\t\t}\n\t}\n\n\tconst lineVariants = {\n\t\t// Initial position starts from the center and invisible.\n\t\tstart: {\n\t\t\topacity: 0,\n\t\t\tscale: 0,\n\t\t},\n\t\t// The line expands to fill the container. If the inserter is visible it\n\t\t// is delayed so it appears orchestrated.\n\t\trest: {\n\t\t\topacity: 1,\n\t\t\tscale: 1,\n\t\t\ttransition: { delay: isInserterShown ? 0.5 : 0, type: 'tween' },\n\t\t},\n\t\thover: {\n\t\t\topacity: 1,\n\t\t\tscale: 1,\n\t\t\ttransition: { delay: 0.5, type: 'tween' },\n\t\t},\n\t};\n\n\tconst inserterVariants = {\n\t\tstart: {\n\t\t\tscale: disableMotion ? 1 : 0,\n\t\t},\n\t\trest: {\n\t\t\tscale: 1,\n\t\t\ttransition: { delay: 0.4, type: 'tween' },\n\t\t},\n\t};\n\n\tif ( isDistractionFree && ! isNavigationMode ) {\n\t\treturn null;\n\t}\n\n\tconst orientationClassname =\n\t\torientation === 'horizontal' || operation === 'group'\n\t\t\t? 'is-horizontal'\n\t\t\t: 'is-vertical';\n\n\tconst className = classnames(\n\t\t'block-editor-block-list__insertion-point',\n\t\torientationClassname\n\t);\n\n\treturn (\n\t\t<BlockPopoverInbetween\n\t\t\tpreviousClientId={ previousClientId }\n\t\t\tnextClientId={ nextClientId }\n\t\t\t__unstablePopoverSlot={ __unstablePopoverSlot }\n\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\toperation={ operation }\n\t\t\tnearestSide={ nearestSide }\n\t\t>\n\t\t\t<motion.div\n\t\t\t\tlayout={ ! disableMotion }\n\t\t\t\tinitial={ disableMotion ? 'rest' : 'start' }\n\t\t\t\tanimate=\"rest\"\n\t\t\t\twhileHover=\"hover\"\n\t\t\t\twhileTap=\"pressed\"\n\t\t\t\texit=\"start\"\n\t\t\t\tref={ ref }\n\t\t\t\ttabIndex={ -1 }\n\t\t\t\tonClick={ onClick }\n\t\t\t\tonFocus={ onFocus }\n\t\t\t\tclassName={ classnames( className, {\n\t\t\t\t\t'is-with-inserter': isInserterShown,\n\t\t\t\t} ) }\n\t\t\t\tonHoverEnd={ maybeHideInserterPoint }\n\t\t\t>\n\t\t\t\t<motion.div\n\t\t\t\t\tvariants={ lineVariants }\n\t\t\t\t\tclassName=\"block-editor-block-list__insertion-point-indicator\"\n\t\t\t\t\tdata-testid=\"block-list-insertion-point-indicator\"\n\t\t\t\t/>\n\t\t\t\t{ isInserterShown && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tvariants={ inserterVariants }\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'block-editor-block-list__insertion-point-inserter'\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Inserter\n\t\t\t\t\t\t\tposition=\"bottom center\"\n\t\t\t\t\t\t\tclientId={ nextClientId }\n\t\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\t\t__experimentalIsQuick\n\t\t\t\t\t\t\tonToggle={ ( isOpen ) => {\n\t\t\t\t\t\t\t\topenRef.current = isOpen;\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonSelectOrClose={ () => {\n\t\t\t\t\t\t\t\topenRef.current = false;\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</motion.div>\n\t\t\t\t) }\n\t\t\t</motion.div>\n\t\t</BlockPopoverInbetween>\n\t);\n}\n\nexport default function InsertionPoint( props ) {\n\tconst { insertionPoint, isVisible, isBlockListEmpty } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockCount,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst blockInsertionPoint = getBlockInsertionPoint();\n\t\t\treturn {\n\t\t\t\tinsertionPoint: blockInsertionPoint,\n\t\t\t\tisVisible: isBlockInsertionPointVisible(),\n\t\t\t\tisBlockListEmpty:\n\t\t\t\t\tgetBlockCount( blockInsertionPoint?.rootClientId ) === 0,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tif (\n\t\t! isVisible ||\n\t\t// Don't render the insertion point if the block list is empty.\n\t\t// The insertion point will be represented by the appender instead.\n\t\tisBlockListEmpty\n\t) {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Render a popover that overlays the block when the desired operation is to replace it.\n\t * Otherwise, render a popover in between blocks for the indication of inserting between them.\n\t */\n\treturn insertionPoint.operation === 'replace' ? (\n\t\t<BlockDropZonePopover\n\t\t\t// Force remount to trigger the animation.\n\t\t\tkey={ `${ insertionPoint.rootClientId }-${ insertionPoint.index }` }\n\t\t\t{ ...props }\n\t\t/>\n\t) : (\n\t\t<InbetweenInsertionPointPopover\n\t\t\toperation={ insertionPoint.operation }\n\t\t\tnearestSide={ insertionPoint.nearestSide }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,MAAM,EAAEC,aAAa,EAAEC,UAAU,QAAQ,oBAAoB;AACtE,SAASC,gBAAgB,IAAIC,MAAM,QAAQ,uBAAuB;AAClE,SAASC,gBAAgB,QAAQ,oBAAoB;;AAErD;AACA;AACA;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AC;IAC9B,MAAMgF,mBAAmB,GAAGzD,sBAAsB,CAAC,CAAC;IACpD,OAAO;MACNM,cAAc,EAAEmD,mBAAmB;MACnCJ,SAAS,EAAEE,4BAA4B,CAAC,CAAC;MACzCD,gBAAgB,EACfE,aAAa,CAAEC,mBAAmB,EAAEhE,YAAa,CAAC,KAAK;IACzD,CAAC;EACF,CAAC,EACD,EACD,CAAC;EAED,IACC,CAAE4D,SAAS;EACX;EACA;EACAC,gBAAgB,EACf;IACD,OAAO,IAAI;EACZ;;EAEA;AACD;AACA;AACA;EACC,OAAOhD,cAAc,CAACtB,SAAS,KAAK,SAAS,GAC5CkD,aAAA,CAACvD;EACA;EAAA;IACA+E,GAAG,EAAI,GAAGpD,cAAc,CAACb,YAAc,IAAIa,cAAc,CAACI,KAAO,EAAG;IAAA,GAC/D0C;EAAK,CACV,CAAC,GAEFlB,aAAA,CAACrD,8BAA8B;IAC9BG,SAAS,EAAGsB,cAAc,CAACtB,SAAW;IACtCC,WAAW,EAAGqB,cAAc,CAACrB,WAAa;IAAA,GACrCmE;EAAK,CACV,CACD;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useRefEffect","useSelect","getScrollContainer","useCallback","useLayoutEffect","useMemo","useState","store","blockEditorStore","__unstableUseBlockElement","useBlockElement","hasStickyOrFixedPositionValue","COMMON_PROPS","placement","DEFAULT_PROPS","flip","shift","RESTRICTED_HEIGHT_PROPS","getProps","contentElement","selectedBlockElement","scrollContainer","toolbarHeight","isSticky","scrollTop","blockRect","getBoundingClientRect","contentRect","topOfContentElementInViewport","top","viewportHeight","ownerDocument","documentElement","clientHeight","restrictedTopArea","hasSpaceForToolbarAbove","isBlockTallerThanViewport","height","useBlockToolbarPopoverProps","clientId","setToolbarHeight","blockIndex","select","getBlockIndex","getBlockAttributes","props","setProps","popoverRef","popoverNode","offsetHeight","updateProps","contentView","defaultView","addEventHandler","resizeObserver","blockView","ResizeObserver","observe","removeEventHandler","disconnect","ref"],"sources":["@wordpress/block-editor/src/components/block-tools/use-block-toolbar-popover-props.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { getScrollContainer } from '@wordpress/dom';\nimport {\n\tuseCallback,\n\tuseLayoutEffect,\n\tuseMemo,\n\tuseState,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport { hasStickyOrFixedPositionValue } from '../../hooks/position';\n\nconst COMMON_PROPS = {\n\tplacement: 'top-start',\n};\n\n// By default the toolbar sets the `shift` prop. If the user scrolls the page\n// down the toolbar will stay on screen by adopting a sticky position at the\n// top of the viewport.\nconst DEFAULT_PROPS = {\n\t...COMMON_PROPS,\n\tflip: false,\n\tshift: true,\n};\n\n// When there isn't enough height between the top of the block and the editor\n// canvas, the `shift` prop is set to `false`, as it will cause the block to be\n// obscured. The `flip` behavior is enabled, which positions the toolbar below\n// the block. This only happens if the block is smaller than the viewport, as\n// otherwise the toolbar will be off-screen.\nconst RESTRICTED_HEIGHT_PROPS = {\n\t...COMMON_PROPS,\n\tflip: true,\n\tshift: false,\n};\n\n/**\n * Get the popover props for the block toolbar, determined by the space at the top of the canvas and the toolbar height.\n *\n * @param {Element} contentElement The DOM element that represents the editor content or canvas.\n * @param {Element} selectedBlockElement The outer DOM element of the first selected block.\n * @param {Element} scrollContainer The scrollable container for the contentElement.\n * @param {number} toolbarHeight The height of the toolbar in pixels.\n * @param {boolean} isSticky Whether or not the selected block is sticky or fixed.\n *\n * @return {Object} The popover props used to determine the position of the toolbar.\n */\nfunction getProps(\n\tcontentElement,\n\tselectedBlockElement,\n\tscrollContainer,\n\ttoolbarHeight,\n\tisSticky\n) {\n\tif ( ! contentElement || ! selectedBlockElement ) {\n\t\treturn DEFAULT_PROPS;\n\t}\n\n\t// Get how far the content area has been scrolled.\n\tconst scrollTop = scrollContainer?.scrollTop || 0;\n\n\tconst blockRect = selectedBlockElement.getBoundingClientRect();\n\tconst contentRect = contentElement.getBoundingClientRect();\n\n\t// Get the vertical position of top of the visible content area.\n\tconst topOfContentElementInViewport = scrollTop + contentRect.top;\n\n\t// The document element's clientHeight represents the viewport height.\n\tconst viewportHeight =\n\t\tcontentElement.ownerDocument.documentElement.clientHeight;\n\n\t// The restricted height area is calculated as the sum of the\n\t// vertical position of the visible content area, plus the height\n\t// of the block toolbar.\n\tconst restrictedTopArea = topOfContentElementInViewport + toolbarHeight;\n\tconst hasSpaceForToolbarAbove = blockRect.top > restrictedTopArea;\n\n\tconst isBlockTallerThanViewport =\n\t\tblockRect.height > viewportHeight - toolbarHeight;\n\n\t// Sticky blocks are treated as if they will never have enough space for the toolbar above.\n\tif (\n\t\t! isSticky &&\n\t\t( hasSpaceForToolbarAbove || isBlockTallerThanViewport )\n\t) {\n\t\treturn DEFAULT_PROPS;\n\t}\n\n\treturn RESTRICTED_HEIGHT_PROPS;\n}\n\n/**\n * Determines the desired popover positioning behavior, returning a set of appropriate props.\n *\n * @param {Object} elements\n * @param {Element} elements.contentElement The DOM element that represents the editor content or canvas.\n * @param {string} elements.clientId The clientId of the first selected block.\n *\n * @return {Object} The popover props used to determine the position of the toolbar.\n */\nexport default function useBlockToolbarPopoverProps( {\n\tcontentElement,\n\tclientId,\n} ) {\n\tconst selectedBlockElement = useBlockElement( clientId );\n\tconst [ toolbarHeight, setToolbarHeight ] = useState( 0 );\n\tconst { blockIndex, isSticky } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockIndex, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn {\n\t\t\t\tblockIndex: getBlockIndex( clientId ),\n\t\t\t\tisSticky: hasStickyOrFixedPositionValue(\n\t\t\t\t\tgetBlockAttributes( clientId )\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst scrollContainer = useMemo( () => {\n\t\tif ( ! contentElement ) {\n\t\t\treturn;\n\t\t}\n\t\treturn getScrollContainer( contentElement );\n\t}, [ contentElement ] );\n\tconst [ props, setProps ] = useState( () =>\n\t\tgetProps(\n\t\t\tcontentElement,\n\t\t\tselectedBlockElement,\n\t\t\tscrollContainer,\n\t\t\ttoolbarHeight,\n\t\t\tisSticky\n\t\t)\n\t);\n\n\tconst popoverRef = useRefEffect( ( popoverNode ) => {\n\t\tsetToolbarHeight( popoverNode.offsetHeight );\n\t}, [] );\n\n\tconst updateProps = useCallback(\n\t\t() =>\n\t\t\tsetProps(\n\t\t\t\tgetProps(\n\t\t\t\t\tcontentElement,\n\t\t\t\t\tselectedBlockElement,\n\t\t\t\t\tscrollContainer,\n\t\t\t\t\ttoolbarHeight,\n\t\t\t\t\tisSticky\n\t\t\t\t)\n\t\t\t),\n\t\t[ contentElement, selectedBlockElement, scrollContainer, toolbarHeight ]\n\t);\n\n\t// Update props when the block is moved. This also ensures the props are\n\t// correct on initial mount, and when the selected block or content element\n\t// changes (since the callback ref will update).\n\tuseLayoutEffect( updateProps, [ blockIndex, updateProps ] );\n\n\t// Update props when the viewport is resized or the block is resized.\n\tuseLayoutEffect( () => {\n\t\tif ( ! contentElement || ! selectedBlockElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Update the toolbar props on viewport resize.\n\t\tconst contentView = contentElement?.ownerDocument?.defaultView;\n\t\tcontentView?.addEventHandler?.( 'resize', updateProps );\n\n\t\t// Update the toolbar props on block resize.\n\t\tlet resizeObserver;\n\t\tconst blockView = selectedBlockElement?.ownerDocument?.defaultView;\n\t\tif ( blockView.ResizeObserver ) {\n\t\t\tresizeObserver = new blockView.ResizeObserver( updateProps );\n\t\t\tresizeObserver.observe( selectedBlockElement );\n\t\t}\n\n\t\treturn () => {\n\t\t\tcontentView?.removeEventHandler?.( 'resize', updateProps );\n\n\t\t\tif ( resizeObserver ) {\n\t\t\t\tresizeObserver.disconnect();\n\t\t\t}\n\t\t};\n\t}, [ updateProps, contentElement, selectedBlockElement ] );\n\n\treturn {\n\t\t...props,\n\t\tref: popoverRef,\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,oBAAoB;AACjD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,kBAAkB,QAAQ,gBAAgB;AACnD,SACCC,WAAW,EACXC,eAAe,EACfC,OAAO,EACPC,QAAQ,QACF,oBAAoB;;AAE3B;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,yBAAyB,IAAIC,eAAe,QAAQ,8CAA8C;AAC3G,SAASC,6BAA6B,QAAQ,sBAAsB;AAEpE,MAAMC,YAAY,GAAG;EACpBC,SAAS,EAAE;AACZ,CAAC;;AAED;AACA;AACA;AACA,MAAMC,aAAa,GAAG;EACrB,GAAGF,YAAY;EACfG,IAAI,EAAE,KAAK;EACXC,KAAK,EAAE;AACR,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,GAAG;EAC/B,GAAGL,YAAY;EACfG,IAAI,EAAE,IAAI;EACVC,KAAK,EAAE;AACR,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASE,QAAQA,CAChBC,cAAc,EACdC,oBAAoB,EACpBC,eAAe,EACfC,aAAa,EACbC,QAAQ,EACP;EACD,IAAK,CAAEJ,cAAc,IAAI,CAAEC,oBAAoB,EAAG;IACjD,OAAON,aAAa;EACrB;;EAEA;EACA,MAAMU,SAAS,GAAGH,eAAe,EAAEG,SAAS,IAAI,CAAC;EAEjD,MAAMC,SAAS,GAAGL,oBAAoB,CAACM,qBAAqB,CAAC,CAAC;EAC9D,MAAMC,WAAW,GAAGR,cAAc,CAACO,qBAAqB,CAAC,CAAC;;EAE1D;EACA,MAAME,6BAA6B,GAAGJ,SAAS,GAAGG,WAAW,CAACE,GAAG;;EAEjE;EACA,MAAMC,cAAc,GACnBX,cAAc,CAACY,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IACRe,GAAG,EAAEb;EACN,CAAC;AACF"}
1
+ {"version":3,"names":["useRefEffect","useSelect","getScrollContainer","useCallback","useLayoutEffect","useMemo","useState","store","blockEditorStore","__unstableUseBlockElement","useBlockElement","hasStickyOrFixedPositionValue","COMMON_PROPS","placement","DEFAULT_PROPS","flip","shift","RESTRICTED_HEIGHT_PROPS","getProps","contentElement","selectedBlockElement","scrollContainer","toolbarHeight","isSticky","scrollTop","blockRect","getBoundingClientRect","contentRect","topOfContentElementInViewport","top","viewportHeight","ownerDocument","documentElement","clientHeight","restrictedTopArea","hasSpaceForToolbarAbove","isBlockTallerThanViewport","height","useBlockToolbarPopoverProps","clientId","setToolbarHeight","blockIndex","select","getBlockIndex","getBlockAttributes","props","setProps","popoverRef","popoverNode","offsetHeight","updateProps","contentView","defaultView","addEventHandler","resizeObserver","blockView","ResizeObserver","observe","removeEventHandler","disconnect","ref"],"sources":["@wordpress/block-editor/src/components/block-tools/use-block-toolbar-popover-props.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { getScrollContainer } from '@wordpress/dom';\nimport {\n\tuseCallback,\n\tuseLayoutEffect,\n\tuseMemo,\n\tuseState,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport { hasStickyOrFixedPositionValue } from '../../hooks/position';\n\nconst COMMON_PROPS = {\n\tplacement: 'top-start',\n};\n\n// By default the toolbar sets the `shift` prop. If the user scrolls the page\n// down the toolbar will stay on screen by adopting a sticky position at the\n// top of the viewport.\nconst DEFAULT_PROPS = {\n\t...COMMON_PROPS,\n\tflip: false,\n\tshift: true,\n};\n\n// When there isn't enough height between the top of the block and the editor\n// canvas, the `shift` prop is set to `false`, as it will cause the block to be\n// obscured. The `flip` behavior is enabled, which positions the toolbar below\n// the block. This only happens if the block is smaller than the viewport, as\n// otherwise the toolbar will be off-screen.\nconst RESTRICTED_HEIGHT_PROPS = {\n\t...COMMON_PROPS,\n\tflip: true,\n\tshift: false,\n};\n\n/**\n * Get the popover props for the block toolbar, determined by the space at the top of the canvas and the toolbar height.\n *\n * @param {Element} contentElement The DOM element that represents the editor content or canvas.\n * @param {Element} selectedBlockElement The outer DOM element of the first selected block.\n * @param {Element} scrollContainer The scrollable container for the contentElement.\n * @param {number} toolbarHeight The height of the toolbar in pixels.\n * @param {boolean} isSticky Whether or not the selected block is sticky or fixed.\n *\n * @return {Object} The popover props used to determine the position of the toolbar.\n */\nfunction getProps(\n\tcontentElement,\n\tselectedBlockElement,\n\tscrollContainer,\n\ttoolbarHeight,\n\tisSticky\n) {\n\tif ( ! contentElement || ! selectedBlockElement ) {\n\t\treturn DEFAULT_PROPS;\n\t}\n\n\t// Get how far the content area has been scrolled.\n\tconst scrollTop = scrollContainer?.scrollTop || 0;\n\n\tconst blockRect = selectedBlockElement.getBoundingClientRect();\n\tconst contentRect = contentElement.getBoundingClientRect();\n\n\t// Get the vertical position of top of the visible content area.\n\tconst topOfContentElementInViewport = scrollTop + contentRect.top;\n\n\t// The document element's clientHeight represents the viewport height.\n\tconst viewportHeight =\n\t\tcontentElement.ownerDocument.documentElement.clientHeight;\n\n\t// The restricted height area is calculated as the sum of the\n\t// vertical position of the visible content area, plus the height\n\t// of the block toolbar.\n\tconst restrictedTopArea = topOfContentElementInViewport + toolbarHeight;\n\tconst hasSpaceForToolbarAbove = blockRect.top > restrictedTopArea;\n\n\tconst isBlockTallerThanViewport =\n\t\tblockRect.height > viewportHeight - toolbarHeight;\n\n\t// Sticky blocks are treated as if they will never have enough space for the toolbar above.\n\tif (\n\t\t! isSticky &&\n\t\t( hasSpaceForToolbarAbove || isBlockTallerThanViewport )\n\t) {\n\t\treturn DEFAULT_PROPS;\n\t}\n\n\treturn RESTRICTED_HEIGHT_PROPS;\n}\n\n/**\n * Determines the desired popover positioning behavior, returning a set of appropriate props.\n *\n * @param {Object} elements\n * @param {Element} elements.contentElement The DOM element that represents the editor content or canvas.\n * @param {string} elements.clientId The clientId of the first selected block.\n *\n * @return {Object} The popover props used to determine the position of the toolbar.\n */\nexport default function useBlockToolbarPopoverProps( {\n\tcontentElement,\n\tclientId,\n} ) {\n\tconst selectedBlockElement = useBlockElement( clientId );\n\tconst [ toolbarHeight, setToolbarHeight ] = useState( 0 );\n\tconst { blockIndex, isSticky } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockIndex, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn {\n\t\t\t\tblockIndex: getBlockIndex( clientId ),\n\t\t\t\tisSticky: hasStickyOrFixedPositionValue(\n\t\t\t\t\tgetBlockAttributes( clientId )\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst scrollContainer = useMemo( () => {\n\t\tif ( ! contentElement ) {\n\t\t\treturn;\n\t\t}\n\t\treturn getScrollContainer( contentElement );\n\t}, [ contentElement ] );\n\tconst [ props, setProps ] = useState( () =>\n\t\tgetProps(\n\t\t\tcontentElement,\n\t\t\tselectedBlockElement,\n\t\t\tscrollContainer,\n\t\t\ttoolbarHeight,\n\t\t\tisSticky\n\t\t)\n\t);\n\n\tconst popoverRef = useRefEffect( ( popoverNode ) => {\n\t\tsetToolbarHeight( popoverNode.offsetHeight );\n\t}, [] );\n\n\tconst updateProps = useCallback(\n\t\t() =>\n\t\t\tsetProps(\n\t\t\t\tgetProps(\n\t\t\t\t\tcontentElement,\n\t\t\t\t\tselectedBlockElement,\n\t\t\t\t\tscrollContainer,\n\t\t\t\t\ttoolbarHeight,\n\t\t\t\t\tisSticky\n\t\t\t\t)\n\t\t\t),\n\t\t[ contentElement, selectedBlockElement, scrollContainer, toolbarHeight ]\n\t);\n\n\t// Update props when the block is moved. This also ensures the props are\n\t// correct on initial mount, and when the selected block or content element\n\t// changes (since the callback ref will update).\n\tuseLayoutEffect( updateProps, [ blockIndex, updateProps ] );\n\n\t// Update props when the viewport is resized or the block is resized.\n\tuseLayoutEffect( () => {\n\t\tif ( ! contentElement || ! selectedBlockElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Update the toolbar props on viewport resize.\n\t\tconst contentView = contentElement?.ownerDocument?.defaultView;\n\t\tcontentView?.addEventHandler?.( 'resize', updateProps );\n\n\t\t// Update the toolbar props on block resize.\n\t\tlet resizeObserver;\n\t\tconst blockView = selectedBlockElement?.ownerDocument?.defaultView;\n\t\tif ( blockView.ResizeObserver ) {\n\t\t\tresizeObserver = new blockView.ResizeObserver( updateProps );\n\t\t\tresizeObserver.observe( selectedBlockElement );\n\t\t}\n\n\t\treturn () => {\n\t\t\tcontentView?.removeEventHandler?.( 'resize', updateProps );\n\n\t\t\tif ( resizeObserver ) {\n\t\t\t\tresizeObserver.disconnect();\n\t\t\t}\n\t\t};\n\t}, [ updateProps, contentElement, selectedBlockElement ] );\n\n\treturn {\n\t\t...props,\n\t\tref: popoverRef,\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,oBAAoB;AACjD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,kBAAkB,QAAQ,gBAAgB;AACnD,SACCC,WAAW,EACXC,eAAe,EACfC,OAAO,EACPC,QAAQ,QACF,oBAAoB;;AAE3B;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,yBAAyB,IAAIC,eAAe,QAAQ,8CAA8C;AAC3G,SAASC,6BAA6B,QAAQ,sBAAsB;AAEpE,MAAMC,YAAY,GAAG;EACpBC,SAAS,EAAE;AACZ,CAAC;;AAED;AACA;AACA;AACA,MAAMC,aAAa,GAAG;EACrB,GAAGF,YAAY;EACfG,IAAI,EAAE,KAAK;EACXC,KAAK,EAAE;AACR,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,GAAG;EAC/B,GAAGL,YAAY;EACfG,IAA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WAAW,EAAEE,eAAe,GAAI,QAAQ,EAAEH,WAAY,CAAC;;IAEvD;IACA,IAAII,cAAc;IAClB,MAAMC,SAAS,GAAGnC,oBAAoB,EAAEW,aAAa,EAAEqB,WAAW;IAClE,IAAKG,SAAS,CAACC,cAAc,EAAG;MAC/BF,cAAc,GAAG,IAAIC,SAAS,CAACC,cAAc,CAAEN,WAAY,CAAC;MAC5DI,cAAc,CAACG,OAAO,CAAErC,oBAAqB,CAAC;IAC/C;IAEA,OAAO,MAAM;MACZ+B,WAAW,EAAEO,kBAAkB,GAAI,QAAQ,EAAER,WAAY,CAAC;MAE1D,IAAKI,cAAc,EAAG;QACrBA,cAAc,CAACK,UAAU,CAAC,CAAC;MAC5B;IACD,CAAC;EACF,CAAC,EAAE,CAAET,WAAW,EAAE/B,cAAc,EAAEC,oBAAoB,CAAG,CAAC;EAE1D,OAAO;IACN,GAAGyB,KAAK;IACRe,GAAG,EAAEb;EACN,CAAC;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","store","blockEditorStore","useSelectedBlockToolProps","clientId","selectedBlockProps","select","getBlockRootClientId","getBlockParents","__experimentalGetBlockListSettingsForBlocks","isBlockInsertionPointVisible","getBlockInsertionPoint","getBlockOrder","hasMultiSelection","getLastMultiSelectedBlockClientId","blockParentsClientIds","parentBlockListSettings","capturingClientId","find","parentClientId","__experimentalCaptureToolbars","isInsertionPointVisible","insertionPoint","order","rootClientId","index","lastClientId"],"sources":["@wordpress/block-editor/src/components/block-tools/use-selected-block-tool-props.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Returns props for the selected block tools and empty block inserter.\n *\n * @param {string} clientId Selected block client ID.\n */\nexport default function useSelectedBlockToolProps( clientId ) {\n\tconst selectedBlockProps = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetBlockParents,\n\t\t\t\t__experimentalGetBlockListSettingsForBlocks,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tgetBlockOrder,\n\t\t\t\thasMultiSelection,\n\t\t\t\tgetLastMultiSelectedBlockClientId,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst blockParentsClientIds = getBlockParents( clientId );\n\n\t\t\t// Get Block List Settings for all ancestors of the current Block clientId.\n\t\t\tconst parentBlockListSettings =\n\t\t\t\t__experimentalGetBlockListSettingsForBlocks(\n\t\t\t\t\tblockParentsClientIds\n\t\t\t\t);\n\n\t\t\t// Get the clientId of the topmost parent with the capture toolbars setting.\n\t\t\tconst capturingClientId = blockParentsClientIds.find(\n\t\t\t\t( parentClientId ) =>\n\t\t\t\t\tparentBlockListSettings[ parentClientId ]\n\t\t\t\t\t\t?.__experimentalCaptureToolbars\n\t\t\t);\n\n\t\t\tlet isInsertionPointVisible = false;\n\t\t\tif ( isBlockInsertionPointVisible() ) {\n\t\t\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\t\t\tconst order = getBlockOrder( insertionPoint.rootClientId );\n\t\t\t\tisInsertionPointVisible =\n\t\t\t\t\torder[ insertionPoint.index ] === clientId;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tcapturingClientId,\n\t\t\t\tisInsertionPointVisible,\n\t\t\t\tlastClientId: hasMultiSelection()\n\t\t\t\t\t? getLastMultiSelectedBlockClientId()\n\t\t\t\t\t: null,\n\t\t\t\trootClientId: getBlockRootClientId( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\treturn selectedBlockProps;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;;AAEvD;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,yBAAyBA,CAAEC,QAAQ,EAAG;EAC7D,MAAMC,kBAAkB,GAAGL,SAAS,CACjCM,MAAM,IAAM;IACb,MAAM;MACLC,oBAAoB;MACpBC,eAAe;MACfC,2CAA2C;MAC3CC,4BAA4B;MAC5BC,sBAAsB;MACtBC,aAAa;MACbC,iBAAiB;MACjBC;IACD,CAAC,GAAGR,MAAM,CAAEJ,gBAAiB,CAAC;IAE9B,MAAMa,qBAAqB,GAAGP,eAAe,CAAEJ,QAAS,CAAC;;IAEzD;IACA,MAAMY,uBAAuB,GAC5BP,2CAA2C,CAC1CM,qBACD,CAAC;;IAEF;IACA,MAAME,iBAAiB,GAAGF,qBAAqB,CAACG,IAAI,CACjDC,cAAc,IACfH,uBAAuB,CAAEG,cAAc,CAAE,EACtCC,6BACL,CAAC;IAED,IAAIC,uBAAuB,GAAG,KAAK;IACnC,IAAKX,4BAA4B,CAAC,CAAC,EAAG;MACrC,MAAMY,cAAc,GAAGX,sBAAsB,CAAC,CAAC;MAC/C,MAAMY,KAAK,GAAGX,aAAa,CAAEU,cAAc,CAACE,YAAa,CAAC;MAC1DH,uBAAuB,GACtBE,KAAK,CAAED,cAAc,CAACG,KAAK,CAAE,KAAKrB,QAAQ;IAC5C;IAEA,OAAO;MACNa,iBAAiB;MACjBI,uBAAuB;MACvBK,YAAY,EAAEb,iBAAiB,CAAC,CAAC,GAC9BC,iCAAiC,CAAC,CAAC,GACnC,IAAI;MACPU,YAAY,EAAEjB,oBAAoB,CAAEH,QAAS;IAC9C,CAAC;EACF,CAAC,EACD,CAAEA,QAAQ,CACX,CAAC;EAED,OAAOC,kBAAkB;AAC1B"}
1
+ {"version":3,"names":["useSelect","store","blockEditorStore","useSelectedBlockToolProps","clientId","selectedBlockProps","select","getBlockRootClientId","getBlockParents","__experimentalGetBlockListSettingsForBlocks","isBlockInsertionPointVisible","getBlockInsertionPoint","getBlockOrder","hasMultiSelection","getLastMultiSelectedBlockClientId","blockParentsClientIds","parentBlockListSettings","capturingClientId","find","parentClientId","__experimentalCaptureToolbars","isInsertionPointVisible","insertionPoint","order","rootClientId","index","lastClientId"],"sources":["@wordpress/block-editor/src/components/block-tools/use-selected-block-tool-props.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Returns props for the selected block tools and empty block inserter.\n *\n * @param {string} clientId Selected block client ID.\n */\nexport default function useSelectedBlockToolProps( clientId ) {\n\tconst selectedBlockProps = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetBlockParents,\n\t\t\t\t__experimentalGetBlockListSettingsForBlocks,\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tgetBlockOrder,\n\t\t\t\thasMultiSelection,\n\t\t\t\tgetLastMultiSelectedBlockClientId,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst blockParentsClientIds = getBlockParents( clientId );\n\n\t\t\t// Get Block List Settings for all ancestors of the current Block clientId.\n\t\t\tconst parentBlockListSettings =\n\t\t\t\t__experimentalGetBlockListSettingsForBlocks(\n\t\t\t\t\tblockParentsClientIds\n\t\t\t\t);\n\n\t\t\t// Get the clientId of the topmost parent with the capture toolbars setting.\n\t\t\tconst capturingClientId = blockParentsClientIds.find(\n\t\t\t\t( parentClientId ) =>\n\t\t\t\t\tparentBlockListSettings[ parentClientId ]\n\t\t\t\t\t\t?.__experimentalCaptureToolbars\n\t\t\t);\n\n\t\t\tlet isInsertionPointVisible = false;\n\t\t\tif ( isBlockInsertionPointVisible() ) {\n\t\t\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\t\t\tconst order = getBlockOrder( insertionPoint.rootClientId );\n\t\t\t\tisInsertionPointVisible =\n\t\t\t\t\torder[ insertionPoint.index ] === clientId;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tcapturingClientId,\n\t\t\t\tisInsertionPointVisible,\n\t\t\t\tlastClientId: hasMultiSelection()\n\t\t\t\t\t? getLastMultiSelectedBlockClientId()\n\t\t\t\t\t: null,\n\t\t\t\trootClientId: getBlockRootClientId( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\treturn selectedBlockProps;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;;AAEvD;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,yBAAyBA,CAAEC,QAAQ,EAAG;EAC7D,MAAMC,kBAAkB,GAAGL,SAAS,CACjCM,MAAM,IAAM;IACb,MAAM;MACLC,oBAAoB;MACpBC,eAAe;MACfC,2CAA2C;MAC3CC,4BAA4B;MAC5BC,sBAAsB;MACtBC,aAAa;MACbC,iBAAiB;MACjBC;IACD,CAAC,GAAGR,MAAM,CAAEJ,gBAAiB,CAAC;IAE9B,MAAMa,qBAAqB,GAAGP,eAAe,CAAEJ,QAAS,CAAC;;IAEzD;IACA,MAAMY,uBAAuB,GAC5BP,2CAA2C,CAC1CM,qBACD,CAAC;;IAEF;IACA,MAAME,iBAAiB,GAAGF,qBAAqB,CAACG,IAAI,CACjDC,cAAc,IACfH,uBAAuB,CAAEG,cAAc,CAAE,EACtCC,6BACL,CAAC;IAED,IAAIC,uBAAuB,GAAG,KAAK;IACnC,IAAKX,4BAA4B,CAAC,CAAC,EAAG;MACrC,MAAMY,cAAc,GAAGX,sBAAsB,CAAC,CAAC;MAC/C,MAAMY,KAAK,GAAGX,aAAa,CAAEU,cAAc,CAACE,YAAa,CAAC;MAC1DH,uBAAuB,GACtBE,KAAK,CAAED,cAAc,CAACG,KAAK,CAAE,KAAKrB,QAAQ;IAC5C;IAEA,OAAO;MACNa,iBAAiB;MACjBI,uBAAuB;MACvBK,YAAY,EAAEb,iBAAiB,CAAC,CAAC,GAC9BC,iCAAiC,CAAC,CAAC,GACnC,IAAI;MACPU,YAAY,EAAEjB,oBAAoB,CAAEH,QAAS;IAC9C,CAAC;EACF,CAAC,EACD,CAAEA,QAAQ,CACX,CAAC;EAED,OAAOC,kBAAkB;AAC1B","ignoreList":[]}
@@ -28,20 +28,14 @@ export function useShowBlockTools() {
28
28
  isTyping
29
29
  } = select(blockEditorStore);
30
30
  const clientId = getSelectedBlockClientId() || getFirstMultiSelectedBlockClientId();
31
- const {
32
- name = '',
33
- attributes = {}
34
- } = getBlock(clientId) || {};
31
+ const block = getBlock(clientId) || {
32
+ name: '',
33
+ attributes: {}
34
+ };
35
35
  const editorMode = __unstableGetEditorMode();
36
- const hasSelectedBlock = clientId && name;
37
- const isEmptyDefaultBlock = isUnmodifiedDefaultBlock({
38
- name,
39
- attributes
40
- });
41
- const _showEmptyBlockSideInserter = clientId && !isTyping() && editorMode === 'edit' && isUnmodifiedDefaultBlock({
42
- name,
43
- attributes
44
- });
36
+ const hasSelectedBlock = clientId && block?.name;
37
+ const isEmptyDefaultBlock = isUnmodifiedDefaultBlock(block);
38
+ const _showEmptyBlockSideInserter = clientId && !isTyping() && editorMode === 'edit' && isEmptyDefaultBlock;
45
39
  const maybeShowBreadcrumb = hasSelectedBlock && !hasMultiSelection() && (editorMode === 'navigation' || editorMode === 'zoom-out');
46
40
  return {
47
41
  showEmptyBlockSideInserter: _showEmptyBlockSideInserter,
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","isUnmodifiedDefaultBlock","store","blockEditorStore","useHasBlockToolbar","useShowBlockTools","hasBlockToolbar","select","getSelectedBlockClientId","getFirstMultiSelectedBlockClientId","getBlock","getSettings","hasMultiSelection","__unstableGetEditorMode","isTyping","clientId","name","attributes","editorMode","hasSelectedBlock","isEmptyDefaultBlock","_showEmptyBlockSideInserter","maybeShowBreadcrumb","showEmptyBlockSideInserter","showBreadcrumb","showBlockToolbarPopover","hasFixedToolbar","showFixedToolbar"],"sources":["@wordpress/block-editor/src/components/block-tools/use-show-block-tools.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { useHasBlockToolbar } from '../block-toolbar/use-has-block-toolbar';\n\n/**\n * Source of truth for which block tools are showing in the block editor.\n *\n * @return {Object} Object of which block tools will be shown.\n */\nexport function useShowBlockTools() {\n\tconst hasBlockToolbar = useHasBlockToolbar();\n\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\tgetFirstMultiSelectedBlockClientId,\n\t\t\t\tgetBlock,\n\t\t\t\tgetSettings,\n\t\t\t\thasMultiSelection,\n\t\t\t\t__unstableGetEditorMode,\n\t\t\t\tisTyping,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst clientId =\n\t\t\t\tgetSelectedBlockClientId() ||\n\t\t\t\tgetFirstMultiSelectedBlockClientId();\n\n\t\t\tconst { name = '', attributes = {} } = getBlock( clientId ) || {};\n\t\t\tconst editorMode = __unstableGetEditorMode();\n\t\t\tconst hasSelectedBlock = clientId && name;\n\t\t\tconst isEmptyDefaultBlock = isUnmodifiedDefaultBlock( {\n\t\t\t\tname,\n\t\t\t\tattributes,\n\t\t\t} );\n\t\t\tconst _showEmptyBlockSideInserter =\n\t\t\t\tclientId &&\n\t\t\t\t! isTyping() &&\n\t\t\t\teditorMode === 'edit' &&\n\t\t\t\tisUnmodifiedDefaultBlock( { name, attributes } );\n\t\t\tconst maybeShowBreadcrumb =\n\t\t\t\thasSelectedBlock &&\n\t\t\t\t! hasMultiSelection() &&\n\t\t\t\t( editorMode === 'navigation' || editorMode === 'zoom-out' );\n\n\t\t\treturn {\n\t\t\t\tshowEmptyBlockSideInserter: _showEmptyBlockSideInserter,\n\t\t\t\tshowBreadcrumb:\n\t\t\t\t\t! _showEmptyBlockSideInserter && maybeShowBreadcrumb,\n\t\t\t\tshowBlockToolbarPopover:\n\t\t\t\t\thasBlockToolbar &&\n\t\t\t\t\t! getSettings().hasFixedToolbar &&\n\t\t\t\t\t! _showEmptyBlockSideInserter &&\n\t\t\t\t\thasSelectedBlock &&\n\t\t\t\t\t! isEmptyDefaultBlock &&\n\t\t\t\t\t! maybeShowBreadcrumb,\n\t\t\t\tshowFixedToolbar:\n\t\t\t\t\teditorMode !== 'zoom-out' &&\n\t\t\t\t\thasBlockToolbar &&\n\t\t\t\t\tgetSettings().hasFixedToolbar,\n\t\t\t};\n\t\t},\n\t\t[ hasBlockToolbar ]\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,wBAAwB,QAAQ,mBAAmB;;AAE5D;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,kBAAkB,QAAQ,wCAAwC;;AAE3E;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAA,EAAG;EACnC,MAAMC,eAAe,GAAGF,kBAAkB,CAAC,CAAC;EAE5C,OAAOJ,SAAS,CACbO,MAAM,IAAM;IACb,MAAM;MACLC,wBAAwB;MACxBC,kCAAkC;MAClCC,QAAQ;MACRC,WAAW;MACXC,iBAAiB;MACjBC,uBAAuB;MACvBC;IACD,CAAC,GAAGP,MAAM,CAAEJ,gBAAiB,CAAC;IAE9B,MAAMY,QAAQ,GACbP,wBAAwB,CAAC,CAAC,IAC1BC,kCAAkC,CAAC,CAAC;IAErC,MAAM;MAAEO,IAAI,GAAG,EAAE;MAAEC,UAAU,GAAG,CAAC;IAAE,CAAC,GAAGP,QAAQ,CAAEK,QAAS,CAAC,IAAI,CAAC,CAAC;IACjE,MAAMG,UAAU,GAAGL,uBAAuB,CAAC,CAAC;IAC5C,MAAMM,gBAAgB,GAAGJ,QAAQ,IAAIC,IAAI;IACzC,MAAMI,mBAAmB,GAAGnB,wBAAwB,CAAE;MACrDe,IAAI;MACJC;IACD,CAAE,CAAC;IACH,MAAMI,2BAA2B,GAChCN,QAAQ,IACR,CAAED,QAAQ,CAAC,CAAC,IACZI,UAAU,KAAK,MAAM,IACrBjB,wBAAwB,CAAE;MAAEe,IAAI;MAAEC;IAAW,CAAE,CAAC;IACjD,MAAMK,mBAAmB,GACxBH,gBAAgB,IAChB,CAAEP,iBAAiB,CAAC,CAAC,KACnBM,UAAU,KAAK,YAAY,IAAIA,UAAU,KAAK,UAAU,CAAE;IAE7D,OAAO;MACNK,0BAA0B,EAAEF,2BAA2B;MACvDG,cAAc,EACb,CAAEH,2BAA2B,IAAIC,mBAAmB;MACrDG,uBAAuB,EACtBnB,eAAe,IACf,CAAEK,WAAW,CAAC,CAAC,CAACe,eAAe,IAC/B,CAAEL,2BAA2B,IAC7BF,gBAAgB,IAChB,CAAEC,mBAAmB,IACrB,CAAEE,mBAAmB;MACtBK,gBAAgB,EACfT,UAAU,KAAK,UAAU,IACzBZ,eAAe,IACfK,WAAW,CAAC,CAAC,CAACe;IAChB,CAAC;EACF,CAAC,EACD,CAAEpB,eAAe,CAClB,CAAC;AACF"}
1
+ {"version":3,"names":["useSelect","isUnmodifiedDefaultBlock","store","blockEditorStore","useHasBlockToolbar","useShowBlockTools","hasBlockToolbar","select","getSelectedBlockClientId","getFirstMultiSelectedBlockClientId","getBlock","getSettings","hasMultiSelection","__unstableGetEditorMode","isTyping","clientId","block","name","attributes","editorMode","hasSelectedBlock","isEmptyDefaultBlock","_showEmptyBlockSideInserter","maybeShowBreadcrumb","showEmptyBlockSideInserter","showBreadcrumb","showBlockToolbarPopover","hasFixedToolbar","showFixedToolbar"],"sources":["@wordpress/block-editor/src/components/block-tools/use-show-block-tools.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { useHasBlockToolbar } from '../block-toolbar/use-has-block-toolbar';\n\n/**\n * Source of truth for which block tools are showing in the block editor.\n *\n * @return {Object} Object of which block tools will be shown.\n */\nexport function useShowBlockTools() {\n\tconst hasBlockToolbar = useHasBlockToolbar();\n\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\tgetFirstMultiSelectedBlockClientId,\n\t\t\t\tgetBlock,\n\t\t\t\tgetSettings,\n\t\t\t\thasMultiSelection,\n\t\t\t\t__unstableGetEditorMode,\n\t\t\t\tisTyping,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst clientId =\n\t\t\t\tgetSelectedBlockClientId() ||\n\t\t\t\tgetFirstMultiSelectedBlockClientId();\n\n\t\t\tconst block = getBlock( clientId ) || { name: '', attributes: {} };\n\t\t\tconst editorMode = __unstableGetEditorMode();\n\t\t\tconst hasSelectedBlock = clientId && block?.name;\n\t\t\tconst isEmptyDefaultBlock = isUnmodifiedDefaultBlock( block );\n\t\t\tconst _showEmptyBlockSideInserter =\n\t\t\t\tclientId &&\n\t\t\t\t! isTyping() &&\n\t\t\t\teditorMode === 'edit' &&\n\t\t\t\tisEmptyDefaultBlock;\n\t\t\tconst maybeShowBreadcrumb =\n\t\t\t\thasSelectedBlock &&\n\t\t\t\t! hasMultiSelection() &&\n\t\t\t\t( editorMode === 'navigation' || editorMode === 'zoom-out' );\n\n\t\t\treturn {\n\t\t\t\tshowEmptyBlockSideInserter: _showEmptyBlockSideInserter,\n\t\t\t\tshowBreadcrumb:\n\t\t\t\t\t! _showEmptyBlockSideInserter && maybeShowBreadcrumb,\n\t\t\t\tshowBlockToolbarPopover:\n\t\t\t\t\thasBlockToolbar &&\n\t\t\t\t\t! getSettings().hasFixedToolbar &&\n\t\t\t\t\t! _showEmptyBlockSideInserter &&\n\t\t\t\t\thasSelectedBlock &&\n\t\t\t\t\t! isEmptyDefaultBlock &&\n\t\t\t\t\t! maybeShowBreadcrumb,\n\t\t\t\tshowFixedToolbar:\n\t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AU,CAAE;IAE7D,OAAO;MACNK,0BAA0B,EAAEF,2BAA2B;MACvDG,cAAc,EACb,CAAEH,2BAA2B,IAAIC,mBAAmB;MACrDG,uBAAuB,EACtBpB,eAAe,IACf,CAAEK,WAAW,CAAC,CAAC,CAACgB,eAAe,IAC/B,CAAEL,2BAA2B,IAC7BF,gBAAgB,IAChB,CAAEC,mBAAmB,IACrB,CAAEE,mBAAmB;MACtBK,gBAAgB,EACfT,UAAU,KAAK,UAAU,IACzBb,eAAe,IACfK,WAAW,CAAC,CAAC,CAACgB;IAChB,CAAC;EACF,CAAC,EACD,CAAErB,eAAe,CAClB,CAAC;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","useEffect","useState","BlockPopoverInbetween","store","blockEditorStore","Inserter","ZoomOutModeInserters","__unstableContentRef","isReady","setIsReady","blockOrder","select","getBlockOrder","timeout","setTimeout","clearTimeout","map","clientId","index","length","createElement","key","previousClientId","nextClientId","className","position","__experimentalIsQuick"],"sources":["@wordpress/block-editor/src/components/block-tools/zoom-out-mode-inserters.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockPopoverInbetween from '../block-popover/inbetween';\nimport { store as blockEditorStore } from '../../store';\nimport Inserter from '../inserter';\n\nfunction ZoomOutModeInserters( { __unstableContentRef } ) {\n\tconst [ isReady, setIsReady ] = useState( false );\n\tconst blockOrder = useSelect( ( select ) => {\n\t\treturn select( blockEditorStore ).getBlockOrder();\n\t}, [] );\n\n\t// Defer the initial rendering to avoid the jumps due to the animation.\n\tuseEffect( () => {\n\t\tconst timeout = setTimeout( () => {\n\t\t\tsetIsReady( true );\n\t\t}, 500 );\n\t\treturn () => {\n\t\t\tclearTimeout( timeout );\n\t\t};\n\t}, [] );\n\n\tif ( ! isReady ) {\n\t\treturn null;\n\t}\n\n\treturn blockOrder.map( ( clientId, index ) => {\n\t\tif ( index === blockOrder.length - 1 ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<BlockPopoverInbetween\n\t\t\t\tkey={ clientId }\n\t\t\t\tpreviousClientId={ clientId }\n\t\t\t\tnextClientId={ blockOrder[ index + 1 ] }\n\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t>\n\t\t\t\t<div className=\"block-editor-block-list__insertion-point-inserter is-with-inserter\">\n\t\t\t\t\t<Inserter\n\t\t\t\t\t\tposition=\"bottom center\"\n\t\t\t\t\t\tclientId={ blockOrder[ index + 1 ] }\n\t\t\t\t\t\t__experimentalIsQuick\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</BlockPopoverInbetween>\n\t\t);\n\t} );\n}\n\nexport default ZoomOutModeInserters;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,SAAS,EAAEC,QAAQ,QAAQ,oBAAoB;;AAExD;AACA;AACA;AACA,OAAOC,qBAAqB,MAAM,4BAA4B;AAC9D,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,QAAQ,MAAM,aAAa;AAElC,SAASC,oBAAoBA,CAAE;EAAEC;AAAqB,CAAC,EAAG;EACzD,MAAM,CAAEC,OAAO,EAAEC,UAAU,CAAE,GAAGR,QAAQ,CAAE,KAAM,CAAC;EACjD,MAAMS,UAAU,GAAGX,SAAS,CAAIY,MAAM,IAAM;IAC3C,OAAOA,MAAM,CAAEP,gBAAiB,CAAC,CAACQ,aAAa,CAAC,CAAC;EAClD,CAAC,EAAE,EAAG,CAAC;;EAEP;EACAZ,SAAS,CAAE,MAAM;IAChB,MAAMa,OAAO,GAAGC,UAAU,CAAE,MAAM;MACjCL,UAAU,CAAE,IAAK,CAAC;IACnB,CAAC,EAAE,GAAI,CAAC;IACR,OAAO,MAAM;MACZM,YAAY,CAAEF,OAAQ,CAAC;IACxB,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,IAAK,CAAEL,OAAO,EAAG;IAChB,OAAO,IAAI;EACZ;EAEA,OAAOE,UAAU,CAACM,GAAG,CAAE,CAAEC,QAAQ,EAAEC,KAAK,KAAM;IAC7C,IAAKA,KAAK,KAAKR,UAAU,CAACS,MAAM,GAAG,CAAC,EAAG;MACtC,OAAO,IAAI;IACZ;IACA,OACCC,aAAA,CAAClB,qBAAqB;MACrBmB,GAAG,EAAGJ,QAAU;MAChBK,gBAAgB,EAAGL,QAAU;MAC7BM,YAAY,EAAGb,UAAU,CAAEQ,KAAK,GAAG,CAAC,CAAI;MACxCX,oBAAoB,EAAGA;IAAsB,GAE7Ca,aAAA;MAAKI,SAAS,EAAC;IAAoE,GAClFJ,aAAA,CAACf,QAAQ;MACRoB,QAAQ,EAAC,eAAe;MACxBR,QAAQ,EAAGP,UAAU,CAAEQ,KAAK,GAAG,CAAC,CAAI;MACpCQ,qBAAqB;IAAA,CACrB,CACG,CACiB,CAAC;EAE1B,CAAE,CAAC;AACJ;AAEA,eAAepB,oBAAoB"}
1
+ {"version":3,"names":["useSelect","useEffect","useState","BlockPopoverInbetween","store","blockEditorStore","Inserter","ZoomOutModeInserters","__unstableContentRef","isReady","setIsReady","blockOrder","select","getBlockOrder","timeout","setTimeout","clearTimeout","map","clientId","index","length","createElement","key","previousClientId","nextClientId","className","position","__experimentalIsQuick"],"sources":["@wordpress/block-editor/src/components/block-tools/zoom-out-mode-inserters.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockPopoverInbetween from '../block-popover/inbetween';\nimport { store as blockEditorStore } from '../../store';\nimport Inserter from '../inserter';\n\nfunction ZoomOutModeInserters( { __unstableContentRef } ) {\n\tconst [ isReady, setIsReady ] = useState( false );\n\tconst blockOrder = useSelect( ( select ) => {\n\t\treturn select( blockEditorStore ).getBlockOrder();\n\t}, [] );\n\n\t// Defer the initial rendering to avoid the jumps due to the animation.\n\tuseEffect( () => {\n\t\tconst timeout = setTimeout( () => {\n\t\t\tsetIsReady( true );\n\t\t}, 500 );\n\t\treturn () => {\n\t\t\tclearTimeout( timeout );\n\t\t};\n\t}, [] );\n\n\tif ( ! isReady ) {\n\t\treturn null;\n\t}\n\n\treturn blockOrder.map( ( clientId, index ) => {\n\t\tif ( index === blockOrder.length - 1 ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<BlockPopoverInbetween\n\t\t\t\tkey={ clientId }\n\t\t\t\tpreviousClientId={ clientId }\n\t\t\t\tnextClientId={ blockOrder[ index + 1 ] }\n\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t>\n\t\t\t\t<div className=\"block-editor-block-list__insertion-point-inserter is-with-inserter\">\n\t\t\t\t\t<Inserter\n\t\t\t\t\t\tposition=\"bottom center\"\n\t\t\t\t\t\tclientId={ blockOrder[ index + 1 ] }\n\t\t\t\t\t\t__experimentalIsQuick\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</BlockPopoverInbetween>\n\t\t);\n\t} );\n}\n\nexport default ZoomOutModeInserters;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,SAAS,EAAEC,QAAQ,QAAQ,oBAAoB;;AAExD;AACA;AACA;AACA,OAAOC,qBAAqB,MAAM,4BAA4B;AAC9D,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,QAAQ,MAAM,aAAa;AAElC,SAASC,oBAAoBA,CAAE;EAAEC;AAAqB,CAAC,EAAG;EACzD,MAAM,CAAEC,OAAO,EAAEC,UAAU,CAAE,GAAGR,QAAQ,CAAE,KAAM,CAAC;EACjD,MAAMS,UAAU,GAAGX,SAAS,CAAIY,MAAM,IAAM;IAC3C,OAAOA,MAAM,CAAEP,gBAAiB,CAAC,CAACQ,aAAa,CAAC,CAAC;EAClD,CAAC,EAAE,EAAG,CAAC;;EAEP;EACAZ,SAAS,CAAE,MAAM;IAChB,MAAMa,OAAO,GAAGC,UAAU,CAAE,MAAM;MACjCL,UAAU,CAAE,IAAK,CAAC;IACnB,CAAC,EAAE,GAAI,CAAC;IACR,OAAO,MAAM;MACZM,YAAY,CAAEF,OAAQ,CAAC;IACxB,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,IAAK,CAAEL,OAAO,EAAG;IAChB,OAAO,IAAI;EACZ;EAEA,OAAOE,UAAU,CAACM,GAAG,CAAE,CAAEC,QAAQ,EAAEC,KAAK,KAAM;IAC7C,IAAKA,KAAK,KAAKR,UAAU,CAACS,MAAM,GAAG,CAAC,EAAG;MACtC,OAAO,IAAI;IACZ;IACA,OACCC,aAAA,CAAClB,qBAAqB;MACrBmB,GAAG,EAAGJ,QAAU;MAChBK,gBAAgB,EAAGL,QAAU;MAC7BM,YAAY,EAAGb,UAAU,CAAEQ,KAAK,GAAG,CAAC,CAAI;MACxCX,oBAAoB,EAAGA;IAAsB,GAE7Ca,aAAA;MAAKI,SAAS,EAAC;IAAoE,GAClFJ,aAAA,CAACf,QAAQ;MACRoB,QAAQ,EAAC,eAAe;MACxBR,QAAQ,EAAGP,UAAU,CAAEQ,KAAK,GAAG,CAAC,CAAI;MACpCQ,qBAAqB;IAAA,CACrB,CACG,CACiB,CAAC;EAE1B,CAAE,CAAC;AACJ;AAEA,eAAepB,oBAAoB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["getBlockMenuDefaultClassName","useInstanceId","InserterListItem","InserterListboxGroup","InserterListboxRow","chunk","array","size","chunks","i","j","length","push","slice","BlockTypesList","items","onSelect","onHover","children","label","isDraggable","className","listId","createElement","map","row","key","item","id","isDisabled","isFirst","rowId"],"sources":["@wordpress/block-editor/src/components/block-types-list/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockMenuDefaultClassName } from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport InserterListItem from '../inserter-list-item';\nimport { InserterListboxGroup, InserterListboxRow } from '../inserter-listbox';\n\nfunction chunk( array, size ) {\n\tconst chunks = [];\n\tfor ( let i = 0, j = array.length; i < j; i += size ) {\n\t\tchunks.push( array.slice( i, i + size ) );\n\t}\n\treturn chunks;\n}\n\nfunction BlockTypesList( {\n\titems = [],\n\tonSelect,\n\tonHover = () => {},\n\tchildren,\n\tlabel,\n\tisDraggable = true,\n} ) {\n\tconst className = 'block-editor-block-types-list';\n\tconst listId = useInstanceId( BlockTypesList, className );\n\treturn (\n\t\t<InserterListboxGroup className={ className } aria-label={ label }>\n\t\t\t{ chunk( items, 3 ).map( ( row, i ) => (\n\t\t\t\t<InserterListboxRow key={ i }>\n\t\t\t\t\t{ row.map( ( item, j ) => (\n\t\t\t\t\t\t<InserterListItem\n\t\t\t\t\t\t\tkey={ item.id }\n\t\t\t\t\t\t\titem={ item }\n\t\t\t\t\t\t\tclassName={ getBlockMenuDefaultClassName(\n\t\t\t\t\t\t\t\titem.id\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\tisDraggable={ isDraggable && ! item.isDisabled }\n\t\t\t\t\t\t\tisFirst={ i === 0 && j === 0 }\n\t\t\t\t\t\t\trowId={ `${ listId }-${ i }` }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</InserterListboxRow>\n\t\t\t) ) }\n\t\t\t{ children }\n\t\t</InserterListboxGroup>\n\t);\n}\n\nexport default BlockTypesList;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,4BAA4B,QAAQ,mBAAmB;AAChE,SAASC,aAAa,QAAQ,oBAAoB;;AAElD;AACA;AACA;AACA,OAAOC,gBAAgB,MAAM,uBAAuB;AACpD,SAASC,oBAAoB,EAAEC,kBAAkB,QAAQ,qBAAqB;AAE9E,SAASC,KAAKA,CAAEC,KAA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GAAGT,MAAQ,IAAIb,CAAG;EAAG,CAC9B,CACA,CACiB,CACnB,CAAC,EACDS,QACmB,CAAC;AAEzB;AAEA,eAAeJ,cAAc"}
1
+ {"version":3,"names":["getBlockMenuDefaultClassName","useInstanceId","InserterListItem","InserterListboxGroup","InserterListboxRow","chunk","array","size","chunks","i","j","length","push","slice","BlockTypesList","items","onSelect","onHover","children","label","isDraggable","className","listId","createElement","map","row","key","item","id","isDisabled","isFirst","rowId"],"sources":["@wordpress/block-editor/src/components/block-types-list/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockMenuDefaultClassName } from '@wordpress/blocks';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport InserterListItem from '../inserter-list-item';\nimport { InserterListboxGroup, InserterListboxRow } from '../inserter-listbox';\n\nfunction chunk( array, size ) {\n\tconst chunks = [];\n\tfor ( let i = 0, j = array.length; i < j; i += size ) {\n\t\tchunks.push( array.slice( i, i + size ) );\n\t}\n\treturn chunks;\n}\n\nfunction BlockTypesList( {\n\titems = [],\n\tonSelect,\n\tonHover = () => {},\n\tchildren,\n\tlabel,\n\tisDraggable = true,\n} ) {\n\tconst className = 'block-editor-block-types-list';\n\tconst listId = useInstanceId( BlockTypesList, className );\n\treturn (\n\t\t<InserterListboxGroup className={ className } aria-label={ label }>\n\t\t\t{ chunk( items, 3 ).map( ( row, i ) => (\n\t\t\t\t<InserterListboxRow key={ i }>\n\t\t\t\t\t{ row.map( ( item, j ) => (\n\t\t\t\t\t\t<InserterListItem\n\t\t\t\t\t\t\tkey={ item.id }\n\t\t\t\t\t\t\titem={ item }\n\t\t\t\t\t\t\tclassName={ getBlockMenuDefaultClassName(\n\t\t\t\t\t\t\t\titem.id\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\tisDraggable={ isDraggable && ! item.isDisabled }\n\t\t\t\t\t\t\tisFirst={ i === 0 && j === 0 }\n\t\t\t\t\t\t\trowId={ `${ listId }-${ i }` }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</InserterListboxRow>\n\t\t\t) ) }\n\t\t\t{ children }\n\t\t</InserterListboxGroup>\n\t);\n}\n\nexport default BlockTypesList;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,4BAA4B,QAAQ,mBAAmB;AAChE,SAASC,aAAa,QAAQ,oBAAoB;;AAElD;AACA;AACA;AACA,OAAOC,gBAAgB,MAAM,uBAAuB;AACpD,SAASC,oBAAoB,EAAEC,kBAAkB,QAAQ,qBAAqB;AAE9E,SAASC,KAAKA,CAAEC,KAAK,EAAEC,IAAI,EAAG;EAC7B,MAAMC,MAAM,GAAG,EAAE;EACjB,KAAM,IAAIC,CAAC,GAAG,CAAC,EAAEC,CAAC,GAAGJ,KAAK,CAACK,MAAM,EAAEF,CAAC,GAAGC,CAAC,EAAED,CAAC,IAAIF,IAAI,EAAG;IACrDC,MAAM,CAACI,IAAI,CAAEN,KAAK,CAACO,KAAK,CAAEJ,CAAC,EAAEA,CAAC,GAAGF,IAAK,CAAE,CAAC;EAC1C;EACA,OAAOC,MAAM;AACd;AAEA,SAASM,cAAcA,CAAE;EACxBC,KAAK,GAAG,EAAE;EACVC,QAAQ;EACRC,OAAO,GAAGA,CAAA,KAAM,CAAC,CAAC;EAClBC,QAAQ;EACRC,KAAK;EACLC,WAAW,GAAG;AACf,CAAC,EAAG;EACH,MAAMC,SAAS,GAAG,+BAA+B;EACjD,MAAMC,MAAM,GAAGrB,aAAa,CAAEa,cAAc,EAAEO,SAAU,CAAC;EACzD,OACCE,aAAA,CAACpB,oBAAoB;IAACkB,SAAS,EAAGA,SAAW;IAAC,cAAaF;EAAO,GAC/Dd,KAAK,CAAEU,KAAK,EAAE,CAAE,CAAC,CAACS,GAAG,CAAE,CAAEC,GAAG,EAAEhB,CAAC,KAChCc,aAAA,CAACnB,kBAAkB;IAACsB,GAAG,EAAGjB;EAAG,GAC1BgB,GAAG,CAACD,GAAG,CAAE,CAAEG,IAAI,EAAEjB,CAAC,KACnBa,aAAA,CAACrB,gBAAgB;IAChBwB,GAAG,EAAGC,IAAI,CAACC,EAAI;IACfD,IAAI,EAAGA,IAAM;IACbN,SAAS,EAAGrB,4BAA4B,CACvC2B,IAAI,CAACC,EACN,CAAG;IACHZ,QAAQ,EAAGA,QAAU;IACrBC,OAAO,EAAGA,OAAS;IACnBG,WAAW,EAAGA,WAAW,IAAI,CAAEO,IAAI,CAACE,UAAY;IAChDC,OAAO,EAAGrB,CAAC,KAAK,CAAC,IAAIC,CAAC,KAAK,CAAG;IAC9BqB,KAAK,EAAI,GAAGT,MAAQ,IAAIb,CAAG;EAAG,CAC9B,CACA,CACiB,CACnB,CAAC,EACDS,QACmB,CAAC;AAEzB;AAEA,eAAeJ,cAAc","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["Dimensions","FlatList","SectionList","StyleSheet","Text","TouchableWithoutFeedback","View","useState","useEffect","BottomSheet","Gradient","usePreferredColorScheme","usePreferredColorSchemeStyle","styles","InserterButton","MIN_COL_NUM","BlockTypesList","name","sections","onSelect","label","listProps","initialNumToRender","numberOfColumns","setNumberOfColumns","itemWidth","setItemWidth","maxWidth","setMaxWidth","dimensionsChangeSubscription","addEventListener","onLayout","remove","calculateItemWidth","paddingLeft","itemPaddingLeft","paddingRight","itemPaddingRight","Styles","modalItem","width","modalIconWrapper","columnStyle","sumLeftRightPadding","bottomSheetWidth","getWidth","containerTotalWidth","itemTotalWidth","columnsFitToWidth","Math","floor","numColumns","max","updatedItemWidth","contentContainerStyle","flatten","renderSection","item","createElement","accessible","data","list","key","ItemSeparatorComponent","style","scrollEnabled","renderItem","renderListItem","colorScheme","sectionHeaderGradientValue","sectionHeaderTitleStyles","renderSectionHeader","section","metadata","icon","title","gradientValue","testID","accessibilityLabel","keyboardShouldPersistTaps","paddingBottom","safeAreaBottomInset"],"sources":["@wordpress/block-editor/src/components/block-types-list/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tDimensions,\n\tFlatList,\n\tSectionList,\n\tStyleSheet,\n\tText,\n\tTouchableWithoutFeedback,\n\tView,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport { BottomSheet, Gradient } from '@wordpress/components';\nimport {\n\tusePreferredColorScheme,\n\tusePreferredColorSchemeStyle,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport InserterButton from '../inserter-button';\n\nconst MIN_COL_NUM = 3;\n\nexport default function BlockTypesList( {\n\tname,\n\tsections,\n\tonSelect,\n\tlabel,\n\tlistProps,\n\tinitialNumToRender = 3,\n} ) {\n\tconst [ numberOfColumns, setNumberOfColumns ] = useState( MIN_COL_NUM );\n\tconst [ itemWidth, setItemWidth ] = useState();\n\tconst [ maxWidth, setMaxWidth ] = useState();\n\n\tuseEffect( () => {\n\t\tconst dimensionsChangeSubscription = Dimensions.addEventListener(\n\t\t\t'change',\n\t\t\tonLayout\n\t\t);\n\t\tonLayout();\n\t\treturn () => {\n\t\t\tdimensionsChangeSubscription.remove();\n\t\t};\n\t}, [] );\n\n\tfunction calculateItemWidth() {\n\t\tconst { paddingLeft: itemPaddingLeft, paddingRight: itemPaddingRight } =\n\t\t\tInserterButton.Styles.modalItem;\n\t\tconst { width } = InserterButton.Styles.modalIconWrapper;\n\t\treturn width + itemPaddingLeft + itemPaddingRight;\n\t}\n\n\tfunction onLayout() {\n\t\tconst columnStyle = styles[ 'block-types-list__column' ];\n\t\tconst sumLeftRightPadding =\n\t\t\tcolumnStyle.paddingLeft + columnStyle.paddingRight;\n\n\t\tconst bottomSheetWidth = BottomSheet.getWidth();\n\t\tconst containerTotalWidth = bottomSheetWidth - sumLeftRightPadding;\n\t\tconst itemTotalWidth = calculateItemWidth();\n\n\t\tconst columnsFitToWidth = Math.floor(\n\t\t\tcontainerTotalWidth / itemTotalWidth\n\t\t);\n\n\t\tconst numColumns = Math.max( MIN_COL_NUM, columnsFitToWidth );\n\n\t\tsetNumberOfColumns( numColumns );\n\t\tsetMaxWidth( containerTotalWidth / numColumns );\n\n\t\tif ( columnsFitToWidth < MIN_COL_NUM ) {\n\t\t\tconst updatedItemWidth =\n\t\t\t\t( bottomSheetWidth - 2 * sumLeftRightPadding ) / MIN_COL_NUM;\n\t\t\tsetItemWidth( updatedItemWidth );\n\t\t}\n\t}\n\n\tconst contentContainerStyle = StyleSheet.flatten(\n\t\tlistProps.contentContainerStyle\n\t);\n\n\tconst renderSection = ( { item } ) => {\n\t\treturn (\n\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t<FlatList\n\t\t\t\t\tdata={ item.list }\n\t\t\t\t\tkey={ `InserterUI-${ name }-${ numberOfColumns }` } // Re-render when numberOfColumns changes.\n\t\t\t\t\tnumColumns={ numberOfColumns }\n\t\t\t\t\tItemSeparatorComponent={ () => (\n\t\t\t\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\tstyles[ 'block-types-list__row-separator' ]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</TouchableWithoutFeedback>\n\t\t\t\t\t) }\n\t\t\t\t\tscrollEnabled={ false }\n\t\t\t\t\trenderItem={ renderListItem }\n\t\t\t\t/>\n\t\t\t</TouchableWithoutFeedback>\n\t\t);\n\t};\n\n\tconst renderListItem = ( { item } ) => {\n\t\treturn (\n\t\t\t<InserterButton\n\t\t\t\titem={ item }\n\t\t\t\titemWidth={ itemWidth }\n\t\t\t\tmaxWidth={ maxWidth }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t/>\n\t\t);\n\t};\n\n\tconst colorScheme = usePreferredColorScheme();\n\tconst sectionHeaderGradientValue =\n\t\tcolorScheme === 'light'\n\t\t\t? 'linear-gradient(#fff 70%, rgba(255, 255, 255, 0))'\n\t\t\t: 'linear-gradient(#2e2e2e 70%, rgba(46, 46, 46, 0))';\n\tconst sectionHeaderTitleStyles = usePreferredColorSchemeStyle(\n\t\tstyles[ 'block-types-list__section-header-title' ],\n\t\tstyles[ 'block-types-list__section-header-title--dark' ]\n\t);\n\n\tconst renderSectionHeader = ( { section: { metadata } } ) => {\n\t\tif ( ! metadata?.icon || ! metadata?.title ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t<Gradient\n\t\t\t\t\tgradientValue={ sectionHeaderGradientValue }\n\t\t\t\t\tstyle={ styles[ 'block-types-list__section-header' ] }\n\t\t\t\t>\n\t\t\t\t\t{ metadata?.icon }\n\t\t\t\t\t<Text style={ sectionHeaderTitleStyles }>\n\t\t\t\t\t\t{ metadata?.title }\n\t\t\t\t\t</Text>\n\t\t\t\t</Gradient>\n\t\t\t</TouchableWithoutFeedback>\n\t\t);\n\t};\n\n\treturn (\n\t\t<SectionList\n\t\t\tonLayout={ onLayout }\n\t\t\ttestID={ `InserterUI-${ name }` }\n\t\t\taccessibilityLabel={ label }\n\t\t\tkeyboardShouldPersistTaps=\"always\"\n\t\t\tsections={ sections }\n\t\t\tinitialNumToRender={ initialNumToRender }\n\t\t\trenderItem={ renderSection }\n\t\t\trenderSectionHeader={ renderSectionHeader }\n\t\t\t{ ...listProps }\n\t\t\tcontentContainerStyle={ {\n\t\t\t\t...contentContainerStyle,\n\t\t\t\tpaddingBottom: Math.max(\n\t\t\t\t\tlistProps.safeAreaBottomInset,\n\t\t\t\t\tcontentContainerStyle.paddingBottom\n\t\t\t\t),\n\t\t\t} }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,UAAU,EACVC,QAAQ,EACRC,WAAW,EACXC,UAAU,EACVC,IAAI,EACJC,wBAAwB,EACxBC,IAAI,QACE,cAAc;;AAErB;AACA;AACA;AACA,SAASC,QAA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,EAAGV,aAAe;IAC5Be,mBAAmB,EAAGA,mBAAqB;IAAA,GACtClD,SAAS;IACdiC,qBAAqB,EAAG;MACvB,GAAGA,qBAAqB;MACxB0B,aAAa,EAAE/B,IAAI,CAACG,GAAG,CACtB/B,SAAS,CAAC4D,mBAAmB,EAC7B3B,qBAAqB,CAAC0B,aACvB;IACD;EAAG,CACH,CAAC;AAEJ"}
1
+ {"version":3,"names":["Dimensions","FlatList","SectionList","StyleSheet","Text","TouchableWithoutFeedback","View","useState","useEffect","BottomSheet","Gradient","usePreferredColorScheme","usePreferredColorSchemeStyle","styles","InserterButton","MIN_COL_NUM","BlockTypesList","name","sections","onSelect","label","listProps","initialNumToRender","numberOfColumns","setNumberOfColumns","itemWidth","setItemWidth","maxWidth","setMaxWidth","dimensionsChangeSubscription","addEventListener","onLayout","remove","calculateItemWidth","paddingLeft","itemPaddingLeft","paddingRight","itemPaddingRight","Styles","modalItem","width","modalIconWrapper","columnStyle","sumLeftRightPadding","bottomSheetWidth","getWidth","containerTotalWidth","itemTotalWidth","columnsFitToWidth","Math","floor","numColumns","max","updatedItemWidth","contentContainerStyle","flatten","renderSection","item","createElement","accessible","data","list","key","ItemSeparatorComponent","style","scrollEnabled","renderItem","renderListItem","colorScheme","sectionHeaderGradientValue","sectionHeaderTitleStyles","renderSectionHeader","section","metadata","icon","title","gradientValue","testID","accessibilityLabel","keyboardShouldPersistTaps","paddingBottom","safeAreaBottomInset"],"sources":["@wordpress/block-editor/src/components/block-types-list/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tDimensions,\n\tFlatList,\n\tSectionList,\n\tStyleSheet,\n\tText,\n\tTouchableWithoutFeedback,\n\tView,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport { BottomSheet, Gradient } from '@wordpress/components';\nimport {\n\tusePreferredColorScheme,\n\tusePreferredColorSchemeStyle,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport InserterButton from '../inserter-button';\n\nconst MIN_COL_NUM = 3;\n\nexport default function BlockTypesList( {\n\tname,\n\tsections,\n\tonSelect,\n\tlabel,\n\tlistProps,\n\tinitialNumToRender = 3,\n} ) {\n\tconst [ numberOfColumns, setNumberOfColumns ] = useState( MIN_COL_NUM );\n\tconst [ itemWidth, setItemWidth ] = useState();\n\tconst [ maxWidth, setMaxWidth ] = useState();\n\n\tuseEffect( () => {\n\t\tconst dimensionsChangeSubscription = Dimensions.addEventListener(\n\t\t\t'change',\n\t\t\tonLayout\n\t\t);\n\t\tonLayout();\n\t\treturn () => {\n\t\t\tdimensionsChangeSubscription.remove();\n\t\t};\n\t}, [] );\n\n\tfunction calculateItemWidth() {\n\t\tconst { paddingLeft: itemPaddingLeft, paddingRight: itemPaddingRight } =\n\t\t\tInserterButton.Styles.modalItem;\n\t\tconst { width } = InserterButton.Styles.modalIconWrapper;\n\t\treturn width + itemPaddingLeft + itemPaddingRight;\n\t}\n\n\tfunction onLayout() {\n\t\tconst columnStyle = styles[ 'block-types-list__column' ];\n\t\tconst sumLeftRightPadding =\n\t\t\tcolumnStyle.paddingLeft + columnStyle.paddingRight;\n\n\t\tconst bottomSheetWidth = BottomSheet.getWidth();\n\t\tconst containerTotalWidth = bottomSheetWidth - sumLeftRightPadding;\n\t\tconst itemTotalWidth = calculateItemWidth();\n\n\t\tconst columnsFitToWidth = Math.floor(\n\t\t\tcontainerTotalWidth / itemTotalWidth\n\t\t);\n\n\t\tconst numColumns = Math.max( MIN_COL_NUM, columnsFitToWidth );\n\n\t\tsetNumberOfColumns( numColumns );\n\t\tsetMaxWidth( containerTotalWidth / numColumns );\n\n\t\tif ( columnsFitToWidth < MIN_COL_NUM ) {\n\t\t\tconst updatedItemWidth =\n\t\t\t\t( bottomSheetWidth - 2 * sumLeftRightPadding ) / MIN_COL_NUM;\n\t\t\tsetItemWidth( updatedItemWidth );\n\t\t}\n\t}\n\n\tconst contentContainerStyle = StyleSheet.flatten(\n\t\tlistProps.contentContainerStyle\n\t);\n\n\tconst renderSection = ( { item } ) => {\n\t\treturn (\n\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t<FlatList\n\t\t\t\t\tdata={ item.list }\n\t\t\t\t\tkey={ `InserterUI-${ name }-${ numberOfColumns }` } // Re-render when numberOfColumns changes.\n\t\t\t\t\tnumColumns={ numberOfColumns }\n\t\t\t\t\tItemSeparatorComponent={ () => (\n\t\t\t\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\tstyles[ 'block-types-list__row-separator' ]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</TouchableWithoutFeedback>\n\t\t\t\t\t) }\n\t\t\t\t\tscrollEnabled={ false }\n\t\t\t\t\trenderItem={ renderListItem }\n\t\t\t\t/>\n\t\t\t</TouchableWithoutFeedback>\n\t\t);\n\t};\n\n\tconst renderListItem = ( { item } ) => {\n\t\treturn (\n\t\t\t<InserterButton\n\t\t\t\titem={ item }\n\t\t\t\titemWidth={ itemWidth }\n\t\t\t\tmaxWidth={ maxWidth }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t/>\n\t\t);\n\t};\n\n\tconst colorScheme = usePreferredColorScheme();\n\tconst sectionHeaderGradientValue =\n\t\tcolorScheme === 'light'\n\t\t\t? 'linear-gradient(#fff 70%, rgba(255, 255, 255, 0))'\n\t\t\t: 'linear-gradient(#2e2e2e 70%, rgba(46, 46, 46, 0))';\n\tconst sectionHeaderTitleStyles = usePreferredColorSchemeStyle(\n\t\tstyles[ 'block-types-list__section-header-title' ],\n\t\tstyles[ 'block-types-list__section-header-title--dark' ]\n\t);\n\n\tconst renderSectionHeader = ( { section: { metadata } } ) => {\n\t\tif ( ! metadata?.icon || ! metadata?.title ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<TouchableWithoutFeedback accessible={ false }>\n\t\t\t\t<Gradient\n\t\t\t\t\tgradientValue={ sectionHeaderGradientValue }\n\t\t\t\t\tstyle={ styles[ 'block-types-list__section-header' ] }\n\t\t\t\t>\n\t\t\t\t\t{ metadata?.icon }\n\t\t\t\t\t<Text style={ sectionHeaderTitleStyles }>\n\t\t\t\t\t\t{ metadata?.title }\n\t\t\t\t\t</Text>\n\t\t\t\t</Gradient>\n\t\t\t</TouchableWithoutFeedback>\n\t\t);\n\t};\n\n\treturn (\n\t\t<SectionList\n\t\t\tonLayout={ onLayout }\n\t\t\ttestID={ `InserterUI-${ name }` }\n\t\t\taccessibilityLabel={ label }\n\t\t\tkeyboardShouldPersistTaps=\"always\"\n\t\t\tsections={ sections }\n\t\t\tinitialNumToRender={ initialNumToRender }\n\t\t\trenderItem={ renderSection }\n\t\t\trenderSectionHeader={ renderSectionHeader }\n\t\t\t{ ...listProps }\n\t\t\tcontentContainerStyle={ {\n\t\t\t\t...contentContainerStyle,\n\t\t\t\tpaddingBottom: Math.max(\n\t\t\t\t\tlistProps.safeAreaBottomInset,\n\t\t\t\t\tcontentContainerStyle.paddingBottom\n\t\t\t\t),\n\t\t\t} }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,UAAU,EACVC,QAAQ,EACRC,WAAW,EACXC,UAAU,EACVC,IAAI,EACJC,wBAAwB,EACxBC,IAAI,QACE,cAAc;;AAErB;AACA;AACA;AACA,SAASC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AACxD,SAASC,WAAW,EAAEC,QAAQ,QAAQ,uBAAuB;AAC7D,SACCC,uBAAuB,EACvBC,4BAA4B,QACtB,oBAAoB;;AAE3B;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,OAAOC,cAAc,MAAM,oBAAoB;AAE/C,MAAMC,WAAW,GAAG,CAAC;AAErB,eAAe,SAASC,cAAcA,CAAE;EACvCC,IAAI;EACJC,QAAQ;EACRC,QAAQ;EACRC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label","instructions","variations","onSelect","allowSkip","classes","length","createElement","className","role","map","variation","key","name","variant","src","iconSize","onClick","description","title"],"sources":["@wordpress/block-editor/src/components/block-variation-picker/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button, Placeholder } from '@wordpress/components';\nimport { layout } from '@wordpress/icons';\n\nfunction BlockVariationPicker( {\n\ticon = layout,\n\tlabel = __( 'Choose variation' ),\n\tinstructions = __( 'Select a variation to start with.' ),\n\tvariations,\n\tonSelect,\n\tallowSkip,\n} ) {\n\tconst classes = classnames( 'block-editor-block-variation-picker', {\n\t\t'has-many-variations': variations.length > 4,\n\t} );\n\n\treturn (\n\t\t<Placeholder\n\t\t\ticon={ icon }\n\t\t\tlabel={ label }\n\t\t\tinstructions={ instructions }\n\t\t\tclassName={ classes }\n\t\t>\n\t\t\t{ /*\n\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t */\n\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t<ul\n\t\t\t\tclassName=\"block-editor-block-variation-picker__variations\"\n\t\t\t\trole=\"list\"\n\t\t\t\taria-label={ __( 'Block variations' ) }\n\t\t\t>\n\t\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t\t<li key={ variation.name }>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\tvariation.icon && variation.icon.src\n\t\t\t\t\t\t\t\t\t? variation.icon.src\n\t\t\t\t\t\t\t\t\t: variation.icon\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticonSize={ 48 }\n\t\t\t\t\t\t\tonClick={ () => onSelect( variation ) }\n\t\t\t\t\t\t\tclassName=\"block-editor-block-variation-picker__variation\"\n\t\t\t\t\t\t\tlabel={ variation.description || variation.title }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span className=\"block-editor-block-variation-picker__variation-label\">\n\t\t\t\t\t\t\t{ variation.title }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</li>\n\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t{ allowSkip && (\n\t\t\t\t<div className=\"block-editor-block-variation-picker__skip\">\n\t\t\t\t\t<Button variant=\"link\" onClick={ () => onSelect() }>\n\t\t\t\t\t\t{ __( 'Skip' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</Placeholder>\n\t);\n}\n\nexport default BlockVariationPicker;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,MAAM,EAAEC,WAAW,QAAQ,uBAAuB;AAC3D,SAASC,MAAM,QAAQ,kBAAkB;AAEzC,SAASC,oBAAoBA,CAAE;EAC9BC,IAAI,GAAGF,MAAM;EACbG,KAAK,GAAGN,EAAE,CAAE,kBAAmB,CAAC;EAChCO,YAAY,GAAGP,EAAE,CAAE,mCAAoC,CAAC;EACxDQ,UAAU;EACVC,QAAQ;EACRC;AACD,CAAC,EAAG;EACH,MAAMC,OAAO,GAAGZ,UAAU,CAAE,qCAAqC,EAAE;IAClE,qBAAqB,EAAES,UAAU,CAACI,MAAM,GAAG;EAC5C,CAAE,CAAC;EAEH,OACCC,aAAA,CAACX,WAAW;IACXG,IAAI,EAAGA,IAAM;IACbC,KAAK,EAAGA,KAAO;IACfC,YAAY,EAAGA,YAAc;IAC7BO,SAAS,EAAGH;EAAS,GAOrBE,aAAA;IACCC,SAAS,EAAC,iDAAiD;IAC3DC,IAAI,EAAC,MAAM;IACX,cAAaf,EAAE,CAAE,kBAAmB;EAAG,GAErCQ,UAAU,CAACQ,GAAG,CAAIC,SAAS,IAC5BJ,aAAA;IAAIK,GAAG,EAAGD,SAAS,CAACE;EAAM,GACzBN,aAAA,CAACZ,MAAM;IACNmB,OAAO,EAAC,WAAW;IACnBf,IAAI,EACHY,SAAS,CAACZ,IAAI,IAAIY,SAAS,CAACZ,IAAI,CAACgB,GAAG,GACjCJ,SAAS,CAACZ,IAAI,CAACgB,GAAG,GAClBJ,SAAS,CAACZ,IACb;IACDiB,QAAQ,EAAG,EAAI;IACfC,OAAO,EAAGA,CAAA,KAAMd,QAAQ,CAAEQ,SAAU,CAAG;IACvCH,SAAS,EAAC,gDAAgD;IAC1DR,KAAK,EAAGW,SAAS,CAACO,WAAW,IAAIP,SAAS,CAACQ;EAAO,CAClD,CAAC,EACFZ,aAAA;IAAMC,SAAS,EAAC;EAAsD,GACnEG,SAAS,CAACQ,KACP,CACH,CACH,CACC,CAAC,EAEHf,SAAS,IACVG,aAAA;IAAKC,SAAS,EAAC;EAA2C,GACzDD,aAAA,CAACZ,MAAM;IAACmB,OAAO,EAAC,MAAM;IAACG,OAAO,EAAGA,CAAA,KAAMd,QAAQ,CAAC;EAAG,GAChDT,EAAE,CAAE,MAAO,CACN,CACJ,CAEM,CAAC;AAEhB;AAEA,eAAeI,oBAAoB"}
1
+ {"version":3,"names":["classnames","__","Button","Placeholder","layout","BlockVariationPicker","icon","label","instructions","variations","onSelect","allowSkip","classes","length","createElement","className","role","map","variation","key","name","variant","src","iconSize","onClick","description","title"],"sources":["@wordpress/block-editor/src/components/block-variation-picker/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button, Placeholder } from '@wordpress/components';\nimport { layout } from '@wordpress/icons';\n\nfunction BlockVariationPicker( {\n\ticon = layout,\n\tlabel = __( 'Choose variation' ),\n\tinstructions = __( 'Select a variation to start with.' ),\n\tvariations,\n\tonSelect,\n\tallowSkip,\n} ) {\n\tconst classes = classnames( 'block-editor-block-variation-picker', {\n\t\t'has-many-variations': variations.length > 4,\n\t} );\n\n\treturn (\n\t\t<Placeholder\n\t\t\ticon={ icon }\n\t\t\tlabel={ label }\n\t\t\tinstructions={ instructions }\n\t\t\tclassName={ classes }\n\t\t>\n\t\t\t{ /*\n\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t */\n\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t<ul\n\t\t\t\tclassName=\"block-editor-block-variation-picker__variations\"\n\t\t\t\trole=\"list\"\n\t\t\t\taria-label={ __( 'Block variations' ) }\n\t\t\t>\n\t\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t\t<li key={ variation.name }>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\tvariation.icon && variation.icon.src\n\t\t\t\t\t\t\t\t\t? variation.icon.src\n\t\t\t\t\t\t\t\t\t: variation.icon\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticonSize={ 48 }\n\t\t\t\t\t\t\tonClick={ () => onSelect( variation ) }\n\t\t\t\t\t\t\tclassName=\"block-editor-block-variation-picker__variation\"\n\t\t\t\t\t\t\tlabel={ variation.description || variation.title }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span className=\"block-editor-block-variation-picker__variation-label\">\n\t\t\t\t\t\t\t{ variation.title }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</li>\n\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t{ allowSkip && (\n\t\t\t\t<div className=\"block-editor-block-variation-picker__skip\">\n\t\t\t\t\t<Button variant=\"link\" onClick={ () => onSelect() }>\n\t\t\t\t\t\t{ __( 'Skip' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</Placeholder>\n\t);\n}\n\nex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,CAClD,CAAC,EACFZ,aAAA;IAAMC,SAAS,EAAC;EAAsD,GACnEG,SAAS,CAACQ,KACP,CACH,CACH,CACC,CAAC,EAEHf,SAAS,IACVG,aAAA;IAAKC,SAAS,EAAC;EAA2C,GACzDD,aAAA,CAACZ,MAAM;IAACmB,OAAO,EAAC,MAAM;IAACG,OAAO,EAAGA,CAAA,KAAMd,QAAQ,CAAC;EAAG,GAChDT,EAAE,CAAE,MAAO,CACN,CACJ,CAEM,CAAC;AAEhB;AAEA,eAAeI,oBAAoB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["ScrollView","View","Text","TouchableWithoutFeedback","Platform","useDispatch","usePreferredColorSchemeStyle","createBlocksFromInnerBlocksTemplate","__","PanelBody","BottomSheet","FooterMessageControl","Icon","close","styles","store","blockEditorStore","InserterButton","hitSlop","top","bottom","left","right","BlockVariationPicker","isVisible","onClose","clientId","variations","replaceInnerBlocks","isIOS","OS","cancelButtonStyle","cancelButton","cancelButtonDark","leftButton","createElement","onPress","style","maxFontSizeMultiplier","icon","size","closeIcon","onVariationSelect","variation","innerBlocks","title","contentStyle","testID","horizontal","showsHorizontalScrollIndicator","contentContainerStyle","containerStyle","map","v","item","key","name","onSelect","label"],"sources":["@wordpress/block-editor/src/components/block-variation-picker/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tScrollView,\n\tView,\n\tText,\n\tTouchableWithoutFeedback,\n\tPlatform,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\nimport { createBlocksFromInnerBlocksTemplate } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tPanelBody,\n\tBottomSheet,\n\tFooterMessageControl,\n} from '@wordpress/components';\nimport { Icon, close } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport { store as blockEditorStore } from '../../store';\nimport InserterButton from '../inserter-button';\n\nconst hitSlop = { top: 22, bottom: 22, left: 22, right: 22 };\n\nfunction BlockVariationPicker( { isVisible, onClose, clientId, variations } ) {\n\tconst { replaceInnerBlocks } = useDispatch( blockEditorStore );\n\tconst isIOS = Platform.OS === 'ios';\n\n\tconst cancelButtonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.cancelButton,\n\t\tstyles.cancelButtonDark\n\t);\n\n\tconst leftButton = (\n\t\t<TouchableWithoutFeedback onPress={ onClose } hitSlop={ hitSlop }>\n\t\t\t<View>\n\t\t\t\t{ isIOS ? (\n\t\t\t\t\t<Text\n\t\t\t\t\t\tstyle={ cancelButtonStyle }\n\t\t\t\t\t\tmaxFontSizeMultiplier={ 2 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Text>\n\t\t\t\t) : (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\tstyle={ styles.closeIcon }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</View>\n\t\t</TouchableWithoutFeedback>\n\t);\n\n\tconst onVariationSelect = ( variation ) => {\n\t\treplaceInnerBlocks(\n\t\t\tclientId,\n\t\t\tcreateBlocksFromInnerBlocksTemplate( variation.innerBlocks )\n\t\t);\n\t\tonClose();\n\t};\n\n\treturn (\n\t\t<BottomSheet\n\t\t\tisVisible={ isVisible }\n\t\t\tonClose={ onClose }\n\t\t\ttitle={ __( 'Select a layout' ) }\n\t\t\tcontentStyle={ styles.contentStyle }\n\t\t\tleftButton={ leftButton }\n\t\t\ttestID=\"block-variation-modal\"\n\t\t>\n\t\t\t<ScrollView\n\t\t\t\thorizontal\n\t\t\t\tshowsHorizontalScrollIndicator={ false }\n\t\t\t\tcontentContainerStyle={ styles.contentContainerStyle }\n\t\t\t\tstyle={ styles.containerStyle }\n\t\t\t>\n\t\t\t\t{ variations.map( ( v ) => (\n\t\t\t\t\t<InserterButton\n\t\t\t\t\t\titem={ v }\n\t\t\t\t\t\tkey={ v.name }\n\t\t\t\t\t\tonSelect={ () => onVariationSelect( v ) }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ScrollView>\n\t\t\t<PanelBody>\n\t\t\t\t<FooterMessageControl\n\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t'Note: Column layout may vary between themes and screen sizes'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</BottomSheet>\n\t);\n}\n\nexport default BlockVariationPicker;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,UAAU,EACVC,IAAI,EACJC,IAAI,EACJC,wBAAwB,EACxBC,QAAQ,QACF,cAAc;;AAErB;AACA;AACA;AACA,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,4BAA4B,QAAQ,oBAAoB;AACjE,SAASC,mCAAmC,QAAQ,mBAAmB;AACvE,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,SAAS,EACTC,WAAW,EACXC,oBAAoB,QACd,uBAAuB;AAC9B,SAASC,IAAI,EAAEC,KAAK,QAAQ,kBAAkB;;AAE9C;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,cAAc,MAAM,oBAAoB;AAE/C,MAAMC,OAAO,GAAG;EAAEC,GAAG,EAAE,EAAE;EAAEC,MAAM,EAAE,EAAE;EAAEC,IAAI,EAAE,EAAE;EAAEC,KAAK,EAAE;AAAG,CAAC;AAE5D,SAASC,oBAAoBA,CAAE;EAAEC,SAAS;EAAEC,OAAO;EAAEC,QAAQ;EAAEC;AAAW,CAAC,EAAG;EAC7E,MAAM;IAAEC;EAAmB,CAAC,GAAGvB,WAAW,CAAEW,gBAAiB,CAAC;EAC9D,MAAMa,KAAK,GAAGzB,QAAQ,CAAC0B,EAAE,KAAK,KAAK;EAEnC,MAAMC,iBAAiB,GAAGzB,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CACS,CAAC,EACblB,aAAA,CAAC1B,SAAS,QACT0B,aAAA,CAACxB,oBAAoB;IACpB+C,KAAK,EAAGlD,EAAE,CACT,8DACD;EAAG,CACH,CACS,CACC,CAAC;AAEhB;AAEA,eAAee,oBAAoB"}
1
+ {"version":3,"names":["ScrollView","View","Text","TouchableWithoutFeedback","Platform","useDispatch","usePreferredColorSchemeStyle","createBlocksFromInnerBlocksTemplate","__","PanelBody","BottomSheet","FooterMessageControl","Icon","close","styles","store","blockEditorStore","InserterButton","hitSlop","top","bottom","left","right","BlockVariationPicker","isVisible","onClose","clientId","variations","replaceInnerBlocks","isIOS","OS","cancelButtonStyle","cancelButton","cancelButtonDark","leftButton","createElement","onPress","style","maxFontSizeMultiplier","icon","size","closeIcon","onVariationSelect","variation","innerBlocks","title","contentStyle","testID","horizontal","showsHorizontalScrollIndicator","contentContainerStyle","containerStyle","map","v","item","key","name","onSelect","label"],"sources":["@wordpress/block-editor/src/components/block-variation-picker/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tScrollView,\n\tView,\n\tText,\n\tTouchableWithoutFeedback,\n\tPlatform,\n} from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\nimport { createBlocksFromInnerBlocksTemplate } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tPanelBody,\n\tBottomSheet,\n\tFooterMessageControl,\n} from '@wordpress/components';\nimport { Icon, close } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\nimport { store as blockEditorStore } from '../../store';\nimport InserterButton from '../inserter-button';\n\nconst hitSlop = { top: 22, bottom: 22, left: 22, right: 22 };\n\nfunction BlockVariationPicker( { isVisible, onClose, clientId, variations } ) {\n\tconst { replaceInnerBlocks } = useDispatch( blockEditorStore );\n\tconst isIOS = Platform.OS === 'ios';\n\n\tconst cancelButtonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.cancelButton,\n\t\tstyles.cancelButtonDark\n\t);\n\n\tconst leftButton = (\n\t\t<TouchableWithoutFeedback onPress={ onClose } hitSlop={ hitSlop }>\n\t\t\t<View>\n\t\t\t\t{ isIOS ? (\n\t\t\t\t\t<Text\n\t\t\t\t\t\tstyle={ cancelButtonStyle }\n\t\t\t\t\t\tmaxFontSizeMultiplier={ 2 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Text>\n\t\t\t\t) : (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\tstyle={ styles.closeIcon }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</View>\n\t\t</TouchableWithoutFeedback>\n\t);\n\n\tconst onVariationSelect = ( variation ) => {\n\t\treplaceInnerBlocks(\n\t\t\tclientId,\n\t\t\tcreateBlocksFromInnerBlocksTemplate( variation.innerBlocks )\n\t\t);\n\t\tonClose();\n\t};\n\n\treturn (\n\t\t<BottomSheet\n\t\t\tisVisible={ isVisible }\n\t\t\tonClose={ onClose }\n\t\t\ttitle={ __( 'Select a layout' ) }\n\t\t\tcontentStyle={ styles.contentStyle }\n\t\t\tleftButton={ leftButton }\n\t\t\ttestID=\"block-variation-modal\"\n\t\t>\n\t\t\t<ScrollView\n\t\t\t\thorizontal\n\t\t\t\tshowsHorizontalScrollIndicator={ false }\n\t\t\t\tcontentContainerStyle={ styles.contentContainerStyle }\n\t\t\t\tstyle={ styles.containerStyle }\n\t\t\t>\n\t\t\t\t{ variations.map( ( v ) => (\n\t\t\t\t\t<InserterButton\n\t\t\t\t\t\titem={ v }\n\t\t\t\t\t\tkey={ v.name }\n\t\t\t\t\t\tonSelect={ () => onVariationSelect( v ) }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ScrollView>\n\t\t\t<PanelBody>\n\t\t\t\t<FooterMessageControl\n\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t'Note: Column layout may vary between themes and screen sizes'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</BottomSheet>\n\t);\n}\n\nexport default BlockVariationPicker;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,UAAU,EACVC,IAAI,EACJC,IAAI,EACJC,wBAAwB,EACxBC,QAAQ,QACF,cAAc;;AAErB;AACA;AACA;AACA,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,4BAA4B,QAAQ,oBAAoB;AACjE,SAASC,mCAAmC,QAAQ,mBAAmB;AACvE,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,SAAS,EACTC,WAAW,EACXC,oBAAoB,QACd,uBAAuB;AAC9B,SAASC,IAAI,EAAEC,KAAK,QAAQ,kBAAkB;;AAE9C;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,cAAc,MAAM,oBAAoB;AAE/C,MAAMC,OAAO,GAAG;EAAEC,GAAG,EAAE,EAAE;EAAEC,MAAM,EAAE,EAAE;EAAEC,IAAI,EAAE,EAAE;EAAEC,KAAK,EAAE;AAAG,CAAC;AAE5D,SAASC,oBAAoBA,CAAE;EAAEC,SAAS;EAAEC,OAAO;EAAEC,QAAQ;EAAEC;AAAW,CAAC,EAAG;EAC7E,MAAM;IAAEC;EAAmB,CAAC,GAAGvB,WAAW,CAAEW,gBAAiB,CAAC;EAC9D,MAAMa,KAAK,GAAGzB,QAAQ,CAAC0B,EAAE,KAAK,KAAK;EAEnC,MAAMC,iBAAiB,GAAGzB,4BAA4B,CACrDQ,MAAM,CAACkB,YAAY,EACnBlB,MAAM,CAACmB,gBACR,CAAC;EAED,MAAMC,UAAU,GACfC,aAAA,CAAChC,wBAAwB;IAACiC,OAAO,EAAGX,OAAS;IAACP,OAAO,EAAGA;EAAS,GAChEiB,aAAA,CAAClC,IAAI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ariationsToggleGroupControl({
90
90
  __nextHasNoMarginBottom: true
91
91
  }, variations.map(variation => createElement(ToggleGroupControlOptionIcon, {
92
92
  key: variation.name,
93
- icon: variation.icon,
93
+ icon: createElement(BlockIcon, {
94
+ icon: variation.icon,
95
+ showColors: true
96
+ }),
94
97
  value: variation.name,
95
98
  label: selectedValue === variation.name ? variation.title : sprintf( /* translators: %s: Name of the block variation */
96
99
  __('Transform to %s'), variation.title)
@@ -1 +1 @@
1
- {"version":3,"names":["store","blocksStore","__","sprintf","Button","DropdownMenu","MenuGroup","MenuItemsChoice","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOptionIcon","ToggleGroupControlOptionIcon","VisuallyHidden","useSelect","useDispatch","useMemo","chevronDown","BlockIcon","blockEditorStore","VariationsButtons","className","onSelectVariation","selectedValue","variations","createElement","as","map","variation","key","name","icon","showColors","isPressed","label","title","onClick","showTooltip","VariationsDropdown","selectOptions","description","value","info","text","popoverProps","position","toggleProps","iconPosition","choices","onSelect","VariationsToggleGroupControl","hideLabelFromVision","onChange","__next40pxDefaultSize","__nextHasNoMarginBottom","__experimentalBlockVariationTransforms","blockClientId","updateBlockAttributes","activeBlockVariation","select","getActiveBlockVariation","getBlockVariations","getBlockName","getBlockAttributes","hasUniqueIcons","variationIcons","Set","forEach","add","src","size","length","variationName","find","attributes","baseClass","showButtons","ButtonComponent","Component"],"sources":["@wordpress/block-editor/src/components/block-variation-transforms/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItemsChoice,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport { store as blockEditorStore } from '../../store';\n\nfunction VariationsButtons( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\treturn (\n\t\t<fieldset className={ className }>\n\t\t\t<VisuallyHidden as=\"legend\">\n\t\t\t\t{ __( 'Transform to variation' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t<Button\n\t\t\t\t\tkey={ variation.name }\n\t\t\t\t\ticon={ <BlockIcon icon={ variation.icon } showColors /> }\n\t\t\t\t\tisPressed={ selectedValue === variation.name }\n\t\t\t\t\tlabel={\n\t\t\t\t\t\tselectedValue === variation.name\n\t\t\t\t\t\t\t? variation.title\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %s: Name of the block variation */\n\t\t\t\t\t\t\t\t\t__( 'Transform to %s' ),\n\t\t\t\t\t\t\t\t\tvariation.title\n\t\t\t\t\t\t\t )\n\t\t\t\t\t}\n\t\t\t\t\tonClick={ () => onSelectVariation( variation.name ) }\n\t\t\t\t\taria-label={ variation.title }\n\t\t\t\t\tshowTooltip\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</fieldset>\n\t);\n}\n\nfunction VariationsDropdown( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\tconst selectOptions = variations.map(\n\t\t( { name, title, description } ) => ( {\n\t\t\tvalue: name,\n\t\t\tlabel: title,\n\t\t\tinfo: description,\n\t\t} )\n\t);\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\tclassName={ className }\n\t\t\tlabel={ __( 'Transform to variation' ) }\n\t\t\ttext={ __( 'Transform to variation' ) }\n\t\t\tpopoverProps={ {\n\t\t\t\tposition: 'bottom center',\n\t\t\t\tclassName: `${ className }__popover`,\n\t\t\t} }\n\t\t\ticon={ chevronDown }\n\t\t\ttoggleProps={ { iconPosition: 'right' } }\n\t\t>\n\t\t\t{ () => (\n\t\t\t\t<div className={ `${ className }__container` }>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\tchoices={ selectOptions }\n\t\t\t\t\t\t\tvalue={ selectedValue }\n\t\t\t\t\t\t\tonSelect={ onSelectVariation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n\nfunction VariationsToggleGroupControl( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\treturn (\n\t\t<div className={ className }>\n\t\t\t<ToggleGroupControl\n\t\t\t\tlabel={ __( 'Transform to variation' ) }\n\t\t\t\tvalue={ selectedValue }\n\t\t\t\thideLabelFromVision\n\t\t\t\tonChange={ onSelectVariation }\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t>\n\t\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\t\t\tkey={ variation.name }\n\t\t\t\t\t\ticon={ variation.icon }\n\t\t\t\t\t\tvalue={ variation.name }\n\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\tselectedValue === variation.name\n\t\t\t\t\t\t\t\t? variation.title\n\t\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: %s: Name of the block variation */\n\t\t\t\t\t\t\t\t\t\t__( 'Transform to %s' ),\n\t\t\t\t\t\t\t\t\t\tvariation.title\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ToggleGroupControl>\n\t\t</div>\n\t);\n}\n\nfunction __experimentalBlockVariationTransforms( { blockClientId } ) {\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { activeBlockVariation, variations } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getActiveBlockVariation, getBlockVariations } =\n\t\t\t\tselect( blocksStore );\n\t\t\tconst { getBlockName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst name = blockClientId && getBlockName( blockClientId );\n\t\t\treturn {\n\t\t\t\tactiveBlockVariation: getActiveBlockVariation(\n\t\t\t\t\tname,\n\t\t\t\t\tgetBlockAttributes( blockClientId )\n\t\t\t\t),\n\t\t\t\tvariations: name && getBlockVariations( name, 'transform' ),\n\t\t\t};\n\t\t},\n\t\t[ blockClientId ]\n\t);\n\n\tconst selectedValue = activeBlockVariation?.name;\n\n\t// Check if each variation has a unique icon.\n\tconst hasUniqueIcons = useMemo( () => {\n\t\tconst variationIcons = new Set();\n\t\tif ( ! variations ) {\n\t\t\treturn false;\n\t\t}\n\t\tvariations.forEach( ( variation ) => {\n\t\t\tif ( variation.icon ) {\n\t\t\t\tvariationIcons.add( variation.icon?.src || variation.icon );\n\t\t\t}\n\t\t} );\n\t\treturn variationIcons.size === variations.length;\n\t}, [ variations ] );\n\n\tconst onSelectVariation = ( variationName ) => {\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\t...variations.find( ( { name } ) => name === variationName )\n\t\t\t\t.attributes,\n\t\t} );\n\t};\n\n\t// Skip rendering if there are no variations\n\tif ( ! variations?.length ) return null;\n\n\tconst baseClass = 'block-editor-block-variation-transforms';\n\n\t// Show buttons if there are more than 5 variations because the ToggleGroupControl does not wrap\n\tconst showButtons = variations.length > 5;\n\n\tconst ButtonComponent = showButtons\n\t\t? VariationsButtons\n\t\t: VariationsToggleGroupControl;\n\n\tconst Component = hasUniqueIcons ? ButtonComponent : VariationsDropdown;\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={ baseClass }\n\t\t\tonSelectVariation={ onSelectVariation }\n\t\t\tselectedValue={ selectedValue }\n\t\t\tvariations={ variations }\n\t\t/>\n\t);\n}\n\nexport default __experimentalBlockVariationTransforms;\n"],"mappings":";AAAA;AACA;AACA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UAAU,CAAC2C,OAAO,CAAIvC,SAAS,IAAM;MACpC,IAAKA,SAAS,CAACG,IAAI,EAAG;QACrBkC,cAAc,CAACG,GAAG,CAAExC,SAAS,CAACG,IAAI,EAAEsC,GAAG,IAAIzC,SAAS,CAACG,IAAK,CAAC;MAC5D;IACD,CAAE,CAAC;IACH,OAAOkC,cAAc,CAACK,IAAI,KAAK9C,UAAU,CAAC+C,MAAM;EACjD,CAAC,EAAE,CAAE/C,UAAU,CAAG,CAAC;EAEnB,MAAMF,iBAAiB,GAAKkD,aAAa,IAAM;IAC9Cf,qBAAqB,CAAED,aAAa,EAAE;MACrC,GAAGhC,UAAU,CAACiD,IAAI,CAAE,CAAE;QAAE3C;MAAK,CAAC,KAAMA,IAAI,KAAK0C,aAAc,CAAC,CAC1DE;IACH,CAAE,CAAC;EACJ,CAAC;;EAED;EACA,IAAK,CAAElD,UAAU,EAAE+C,MAAM,EAAG,OAAO,IAAI;EAEvC,MAAMI,SAAS,GAAG,yCAAyC;;EAE3D;EACA,MAAMC,WAAW,GAAGpD,UAAU,CAAC+C,MAAM,GAAG,CAAC;EAEzC,MAAMM,eAAe,GAAGD,WAAW,GAChCxD,iBAAiB,GACjB8B,4BAA4B;EAE/B,MAAM4B,SAAS,GAAGd,cAAc,GAAGa,eAAe,GAAGvC,kBAAkB;EAEvE,OACCb,aAAA,CAACqD,SAAS;IACTzD,SAAS,EAAGsD,SAAW;IACvBrD,iBAAiB,EAAGA,iBAAmB;IACvCC,aAAa,EAAGA,aAAe;IAC/BC,UAAU,EAAGA;EAAY,CACzB,CAAC;AAEJ;AAEA,eAAe+B,sCAAsC"}
1
+ {"version":3,"names":["store","blocksStore","__","sprintf","Button","DropdownMenu","MenuGroup","MenuItemsChoice","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOptionIcon","ToggleGroupControlOptionIcon","VisuallyHidden","useSelect","useDispatch","useMemo","chevronDown","BlockIcon","blockEditorStore","VariationsButtons","className","onSelectVariation","selectedValue","variations","createElement","as","map","variation","key","name","icon","showColors","isPressed","label","title","onClick","showTooltip","VariationsDropdown","selectOptions","description","value","info","text","popoverProps","position","toggleProps","iconPosition","choices","onSelect","VariationsToggleGroupControl","hideLabelFromVision","onChange","__next40pxDefaultSize","__nextHasNoMarginBottom","__experimentalBlockVariationTransforms","blockClientId","updateBlockAttributes","activeBlockVariation","select","getActiveBlockVariation","getBlockVariations","getBlockName","getBlockAttributes","hasUniqueIcons","variationIcons","Set","forEach","add","src","size","length","variationName","find","attributes","baseClass","showButtons","ButtonComponent","Component"],"sources":["@wordpress/block-editor/src/components/block-variation-transforms/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItemsChoice,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport { store as blockEditorStore } from '../../store';\n\nfunction VariationsButtons( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\treturn (\n\t\t<fieldset className={ className }>\n\t\t\t<VisuallyHidden as=\"legend\">\n\t\t\t\t{ __( 'Transform to variation' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t<Button\n\t\t\t\t\tkey={ variation.name }\n\t\t\t\t\ticon={ <BlockIcon icon={ variation.icon } showColors /> }\n\t\t\t\t\tisPressed={ selectedValue === variation.name }\n\t\t\t\t\tlabel={\n\t\t\t\t\t\tselectedValue === variation.name\n\t\t\t\t\t\t\t? variation.title\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %s: Name of the block variation */\n\t\t\t\t\t\t\t\t\t__( 'Transform to %s' ),\n\t\t\t\t\t\t\t\t\tvariation.title\n\t\t\t\t\t\t\t )\n\t\t\t\t\t}\n\t\t\t\t\tonClick={ () => onSelectVariation( variation.name ) }\n\t\t\t\t\taria-label={ variation.title }\n\t\t\t\t\tshowTooltip\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</fieldset>\n\t);\n}\n\nfunction VariationsDropdown( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\tconst selectOptions = variations.map(\n\t\t( { name, title, description } ) => ( {\n\t\t\tvalue: name,\n\t\t\tlabel: title,\n\t\t\tinfo: description,\n\t\t} )\n\t);\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\tclassName={ className }\n\t\t\tlabel={ __( 'Transform to variation' ) }\n\t\t\ttext={ __( 'Transform to variation' ) }\n\t\t\tpopoverProps={ {\n\t\t\t\tposition: 'bottom center',\n\t\t\t\tclassName: `${ className }__popover`,\n\t\t\t} }\n\t\t\ticon={ chevronDown }\n\t\t\ttoggleProps={ { iconPosition: 'right' } }\n\t\t>\n\t\t\t{ () => (\n\t\t\t\t<div className={ `${ className }__container` }>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\tchoices={ selectOptions }\n\t\t\t\t\t\t\tvalue={ selectedValue }\n\t\t\t\t\t\t\tonSelect={ onSelectVariation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n\nfunction VariationsToggleGroupControl( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\treturn (\n\t\t<div className={ className }>\n\t\t\t<ToggleGroupControl\n\t\t\t\tlabel={ __( 'Transform to variation' ) }\n\t\t\t\tvalue={ selectedValue }\n\t\t\t\thideLabelFromVision\n\t\t\t\tonChange={ onSelectVariation }\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t>\n\t\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\t\t\tkey={ variation.name }\n\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t<BlockIcon icon={ variation.icon } showColors />\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue={ variation.name }\n\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\tselectedValue === variation.name\n\t\t\t\t\t\t\t\t? variation.title\n\t\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: %s: Name of the block variation */\n\t\t\t\t\t\t\t\t\t\t__( 'Transform to %s' ),\n\t\t\t\t\t\t\t\t\t\tvariation.title\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ToggleGroupControl>\n\t\t</div>\n\t);\n}\n\nfunction __experimentalBlockVariationTransforms( { blockClientId } ) {\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { activeBlockVariation, variations } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getActiveBlockVariation, getBlockVariations } =\n\t\t\t\tselect( blocksStore );\n\t\t\tconst { getBlockName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst name = blockClientId && getBlockName( blockClientId );\n\t\t\treturn {\n\t\t\t\tactiveBlockVariation: getActiveBlockVariation(\n\t\t\t\t\tname,\n\t\t\t\t\tgetBlockAttributes( blockClientId )\n\t\t\t\t),\n\t\t\t\tvariations: name && getBlockVariations( name, 'transform' ),\n\t\t\t};\n\t\t},\n\t\t[ blockClientId ]\n\t);\n\n\tconst selectedValue = activeBlockVariation?.name;\n\n\t// Check if each variation has a unique icon.\n\tconst hasUniqueIcons = useMemo( () => {\n\t\tconst variationIcons = new Set();\n\t\tif ( ! variations ) {\n\t\t\treturn false;\n\t\t}\n\t\tvariations.forEach( ( variation ) => {\n\t\t\tif ( variation.icon ) {\n\t\t\t\tvariationIcons.add( variation.icon?.src || variation.icon );\n\t\t\t}\n\t\t} );\n\t\treturn variationIcons.size === variations.length;\n\t}, [ variations ] );\n\n\tconst onSelectVariation = ( variationName ) => {\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\t...variations.find( ( { name } ) => name === variationName )\n\t\t\t\t.attributes,\n\t\t} );\n\t};\n\n\t// Skip rendering if there are no variations\n\tif ( ! variations?.length ) return null;\n\n\tconst baseClass = 'block-editor-block-variation-transforms';\n\n\t// Show buttons if there are more than 5 variations because the ToggleGroupControl does not wrap\n\tconst showButtons = variations.length > 5;\n\n\tconst ButtonComponent = showButtons\n\t\t? VariationsButtons\n\t\t: VariationsToggleGroupControl;\n\n\tconst Component = hasUniqueIcons ? ButtonComponent : VariationsDropdown;\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={ baseClass }\n\t\t\tonSelectVariation={ onSelectVariation }\n\t\t\tselectedValue={ selectedValue }\n\t\t\tvariations={ variations }\n\t\t/>\n\t);\n}\n\nexport default __experimentalBlockVariationTransforms;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SACCC,MAAM,EACNC,YAAY,EACZC,SAAS,EACTC,eAAe,EACfC,gCAAgC,IAAIC,kBAAkB,EACtDC,0CAA0C,IAAIC,4BAA4B,EAC1EC,cAAc,QACR,uBAAuB;AAC9B,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,WAAW,QAAQ,kBAAkB;;AAE9C;AACA;AACA;AACA,OAAOC,SAAS,MAAM,eAAe;AACrC,SAASjB,KAAK,IAAIkB,gBAAgB,QAAQ,aAAa;AA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C,GAAGhC,UAAU,CAACiD,IAAI,CAAE,CAAE;QAAE3C;MAAK,CAAC,KAAMA,IAAI,KAAK0C,aAAc,CAAC,CAC1DE;IACH,CAAE,CAAC;EACJ,CAAC;;EAED;EACA,IAAK,CAAElD,UAAU,EAAE+C,MAAM,EAAG,OAAO,IAAI;EAEvC,MAAMI,SAAS,GAAG,yCAAyC;;EAE3D;EACA,MAAMC,WAAW,GAAGpD,UAAU,CAAC+C,MAAM,GAAG,CAAC;EAEzC,MAAMM,eAAe,GAAGD,WAAW,GAChCxD,iBAAiB,GACjB8B,4BAA4B;EAE/B,MAAM4B,SAAS,GAAGd,cAAc,GAAGa,eAAe,GAAGvC,kBAAkB;EAEvE,OACCb,aAAA,CAACqD,SAAS;IACTzD,SAAS,EAAGsD,SAAW;IACvBrD,iBAAiB,EAAGA,iBAAmB;IACvCC,aAAa,EAAGA,aAAe;IAC/BC,UAAU,EAAGA;EAAY,CACzB,CAAC;AAEJ;AAEA,eAAe+B,sCAAsC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["Path","SVG","alignBottom","createElement","xmlns","viewBox","d","alignCenter","alignTop","alignStretch","spaceBetween"],"sources":["@wordpress/block-editor/src/components/block-vertical-alignment-control/icons.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/components';\n\nexport const alignBottom = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z\" />\n\t</SVG>\n);\n\nexport const alignCenter = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z\" />\n\t</SVG>\n);\n\nexport const alignTop = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M9 20h6V9H9v11zM4 4v1.5h16V4H4z\" />\n\t</SVG>\n);\n\nexport const alignStretch = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z\" />\n\t</SVG>\n);\n\nexport const spaceBetween = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z\" />\n\t</SVG>\n);\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,GAAG,QAAQ,uBAAuB;AAEjD,OAAO,MAAMC,WAAW,GACvBC,aAAA,CAACF,GAAG;EAACG,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC;AAAW,GAC1DF,aAAA,CAACH,IAAI;EAACM,CAAC,EAAC;AAAsC,CAAE,CAC5C,CACL;AAED,OAAO,MAAMC,WAAW,GACvBJ,aAAA,CAACF,GAAG;EAACG,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC;AAAW,GAC1DF,aAAA,CAACH,IAAI;EAACM,CAAC,EAAC;AAAsC,CAAE,CAC5C,CACL;AAED,OAAO,MAAME,QAAQ,GACpBL,aAAA,CAACF,GAAG;EAACG,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC;AAAW,GAC1DF,aAAA,CAACH,IAAI;EAACM,CAAC,EAAC;AAAiC,CAAE,CACvC,CACL;AAED,OAAO,MAAMG,YAAY,GACxBN,aAAA,CAACF,GAAG;EAACG,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC;AAAW,GAC1DF,aAAA,CAACH,IAAI;EAACM,CAAC,EAAC;AAA4F,CAAE,CAClG,CACL;AAED,OAAO,MAAMI,YAAY,GACxBP,aAAA,CAACF,GAAG;EAACG,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC;AAAW,GAC1DF,aAAA,CAACH,IAAI;EAACM,CAAC,EAAC;AAAoE,CAAE,CAC1E,CACL"}
1
+ {"version":3,"names":["Path","SVG","alignBottom","createElement","xmlns","viewBox","d","alignCenter","alignTop","alignStretch","spaceBetween"],"sources":["@wordpress/block-editor/src/components/block-vertical-alignment-control/icons.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/components';\n\nexport const alignBottom = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z\" />\n\t</SVG>\n);\n\nexport const alignCenter = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z\" />\n\t</SVG>\n);\n\nexport const alignTop = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M9 20h6V9H9v11zM4 4v1.5h16V4H4z\" />\n\t</SVG>\n);\n\nexport const alignStretch = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z\" />\n\t</SVG>\n);\n\nexport const spaceBetween = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z\" />\n\t</SVG>\n);\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,GAAG,QAAQ,uBAAuB;AAEjD,OAAO,MAAMC,WAAW,GACvBC,aAAA,CAACF,GAAG;EAACG,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC;AAAW,GAC1DF,aAAA,CAACH,IAAI;EAACM,CAAC,EAAC;AAAsC,CAAE,CAC5C,CACL;AAED,OAAO,MAAMC,WAAW,GACvBJ,aAAA,CAACF,GAAG;EAACG,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC;AAAW,GAC1DF,aAAA,CAACH,IAAI;EAACM,CAAC,EAAC;AAAsC,CAAE,CAC5C,CACL;AAED,OAAO,MAAME,QAAQ,GACpBL,aAAA,CAACF,GAAG;EAACG,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC;AAAW,GAC1DF,aAAA,CAACH,IAAI;EAACM,CAAC,EAAC;AAAiC,CAAE,CACvC,CACL;AAED,OAAO,MAAMG,YAAY,GACxBN,aAAA,CAACF,GAAG;EAACG,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC;AAAW,GAC1DF,aAAA,CAACH,IAAI;EAACM,CAAC,EAAC;AAA4F,CAAE,CAClG,CACL;AAED,OAAO,MAAMI,YAAY,GACxBP,aAAA,CAACF,GAAG;EAACG,KAAK,EAAC,4BAA4B;EAACC,OAAO,EAAC;AAAW,GAC1DF,aAAA,CAACH,IAAI;EAACM,CAAC,EAAC;AAAoE,CAAE,CAC1E,CACL","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["BlockVerticalAlignmentUI","BlockVerticalAlignmentControl","props","createElement","isToolbar","BlockVerticalAlignmentToolbar"],"sources":["@wordpress/block-editor/src/components/block-vertical-alignment-control/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport BlockVerticalAlignmentUI from './ui';\n\nconst BlockVerticalAlignmentControl = ( props ) => {\n\treturn <BlockVerticalAlignmentUI { ...props } isToolbar={ false } />;\n};\n\nconst BlockVerticalAlignmentToolbar = ( props ) => {\n\treturn <BlockVerticalAlignmentUI { ...props } isToolbar />;\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-vertical-alignment-control/README.md\n */\nexport { BlockVerticalAlignmentControl, BlockVerticalAlignmentToolbar };\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,wBAAwB,MAAM,MAAM;AAE3C,MAAMC,6BAA6B,GAAKC,KAAK,IAAM;EAClD,OAAOC,aAAA,CAACH,wBAAwB;IAAA,GAAME,KAAK;IAAGE,SAAS,EAAG;EAAO,CAAE,CAAC;AACrE,CAAC;AAED,MAAMC,6BAA6B,GAAKH,KAAK,IAAM;EAClD,OAAOC,aAAA,CAACH,wBAAwB;IAAA,GAAME,KAAK;IAAGE,SAAS;EAAA,CAAE,CAAC;AAC3D,CAAC;;AAED;AACA;AACA;AACA,SAASH,6BAA6B,EAAEI,6BAA6B"}
1
+ {"version":3,"names":["BlockVerticalAlignmentUI","BlockVerticalAlignmentControl","props","createElement","isToolbar","BlockVerticalAlignmentToolbar"],"sources":["@wordpress/block-editor/src/components/block-vertical-alignment-control/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport BlockVerticalAlignmentUI from './ui';\n\nconst BlockVerticalAlignmentControl = ( props ) => {\n\treturn <BlockVerticalAlignmentUI { ...props } isToolbar={ false } />;\n};\n\nconst BlockVerticalAlignmentToolbar = ( props ) => {\n\treturn <BlockVerticalAlignmentUI { ...props } isToolbar />;\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-vertical-alignment-control/README.md\n */\nexport { BlockVerticalAlignmentControl, BlockVerticalAlignmentToolbar };\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,wBAAwB,MAAM,MAAM;AAE3C,MAAMC,6BAA6B,GAAKC,KAAK,IAAM;EAClD,OAAOC,aAAA,CAACH,wBAAwB;IAAA,GAAME,KAAK;IAAGE,SAAS,EAAG;EAAO,CAAE,CAAC;AACrE,CAAC;AAED,MAAMC,6BAA6B,GAAKH,KAAK,IAAM;EAClD,OAAOC,aAAA,CAACH,wBAAwB;IAAA,GAAME,KAAK;IAAGE,SAAS;EAAA,CAAE,CAAC;AAC3D,CAAC;;AAED;AACA;AACA;AACA,SAASH,6BAA6B,EAAEI,6BAA6B","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_x","ToolbarGroup","ToolbarDropdownMenu","alignTop","alignCenter","alignBottom","alignStretch","spaceBetween","BLOCK_ALIGNMENTS_CONTROLS","top","icon","title","center","bottom","stretch","DEFAULT_CONTROLS","DEFAULT_CONTROL","BlockVerticalAlignmentUI","value","onChange","controls","isCollapsed","isToolbar","applyOrUnset","align","undefined","activeAlignment","defaultAlignmentControl","UIComponent","extraProps","createElement","label","map","control","isActive","role","onClick"],"sources":["@wordpress/block-editor/src/components/block-vertical-alignment-control/ui.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\nimport { ToolbarGroup, ToolbarDropdownMenu } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport {\n\talignTop,\n\talignCenter,\n\talignBottom,\n\talignStretch,\n\tspaceBetween,\n} from './icons';\n\nconst BLOCK_ALIGNMENTS_CONTROLS = {\n\ttop: {\n\t\ticon: alignTop,\n\t\ttitle: _x( 'Align top', 'Block vertical alignment setting' ),\n\t},\n\tcenter: {\n\t\ticon: alignCenter,\n\t\ttitle: _x( 'Align middle', 'Block vertical alignment setting' ),\n\t},\n\tbottom: {\n\t\ticon: alignBottom,\n\t\ttitle: _x( 'Align bottom', 'Block vertical alignment setting' ),\n\t},\n\tstretch: {\n\t\ticon: alignStretch,\n\t\ttitle: _x( 'Stretch to fill', 'Block vertical alignment setting' ),\n\t},\n\t'space-between': {\n\t\ticon: spaceBetween,\n\t\ttitle: _x( 'Space between', 'Block vertical alignment setting' ),\n\t},\n};\n\nconst DEFAULT_CONTROLS = [ 'top', 'center', 'bottom' ];\nconst DEFAULT_CONTROL = 'top';\n\nfunction BlockVerticalAlignmentUI( {\n\tvalue,\n\tonChange,\n\tcontrols = DEFAULT_CONTROLS,\n\tisCollapsed = true,\n\tisToolbar,\n} ) {\n\tfunction applyOrUnset( align ) {\n\t\treturn () => onChange( value === align ? undefined : align );\n\t}\n\n\tconst activeAlignment = BLOCK_ALIGNMENTS_CONTROLS[ value ];\n\tconst defaultAlignmentControl =\n\t\tBLOCK_ALIGNMENTS_CONTROLS[ DEFAULT_CONTROL ];\n\n\tconst UIComponent = isToolbar ? ToolbarGroup : ToolbarDropdownMenu;\n\tconst extraProps = isToolbar ? { isCollapsed } : {};\n\n\treturn (\n\t\t<UIComponent\n\t\t\ticon={\n\t\t\t\tactiveAlignment\n\t\t\t\t\t? activeAlignment.icon\n\t\t\t\t\t: defaultAlignmentControl.icon\n\t\t\t}\n\t\t\tlabel={ _x(\n\t\t\t\t'Change vertical alignment',\n\t\t\t\t'Block vertical alignment setting label'\n\t\t\t) }\n\t\t\tcontrols={ controls.map( ( control ) => {\n\t\t\t\treturn {\n\t\t\t\t\t...BLOCK_ALIGNMENTS_CONTROLS[ control ],\n\t\t\t\t\tisActive: value === control,\n\t\t\t\t\trole: isCollapsed ? 'menuitemradio' : undefined,\n\t\t\t\t\tonClick: applyOrUnset( control ),\n\t\t\t\t};\n\t\t\t} ) }\n\t\t\t{ ...extraProps }\n\t\t/>\n\t);\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-vertical-alignment-toolbar/README.md\n */\nexport default BlockVerticalAlignmentUI;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,EAAEC,mBAAmB,QAAQ,uBAAuB;;AAEzE;AACA;AACA;AACA,SACCC,QAAQ,EACRC,WAAW,EACXC,WAAW,EACXC,YAAY,EACZC,YAAY,QACN,SAAS;AAEhB,MAAMC,yBAAyB,GAAG;EACjCC,GAAG,EAAE;IACJC,IAAI,EAAEP,QAAQ;IACdQ,KAAK,EAAEX,EAAE,CAAE,WAAW,EAAE,kCAAmC;EAC5D,CAAC;EACDY,MAAM,EAAE;IACPF,IAAI,EAAEN,WAAW;IACjBO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CAAIC,OAAO,IAAM;MACvC,OAAO;QACN,GAAGzB,yBAAyB,CAAEyB,OAAO,CAAE;QACvCC,QAAQ,EAAEhB,KAAK,KAAKe,OAAO;QAC3BE,IAAI,EAAEd,WAAW,GAAG,eAAe,GAAGI,SAAS;QAC/CW,OAAO,EAAEb,YAAY,CAAEU,OAAQ;MAChC,CAAC;IACF,CAAE,CAAG;IAAA,GACAJ;EAAU,CACf,CAAC;AAEJ;;AAEA;AACA;AACA;AACA,eAAeZ,wBAAwB"}
1
+ {"version":3,"names":["_x","ToolbarGroup","ToolbarDropdownMenu","alignTop","alignCenter","alignBottom","alignStretch","spaceBetween","BLOCK_ALIGNMENTS_CONTROLS","top","icon","title","center","bottom","stretch","DEFAULT_CONTROLS","DEFAULT_CONTROL","BlockVerticalAlignmentUI","value","onChange","controls","isCollapsed","isToolbar","applyOrUnset","align","undefined","activeAlignment","defaultAlignmentControl","UIComponent","extraProps","createElement","label","map","control","isActive","role","onClick"],"sources":["@wordpress/block-editor/src/components/block-vertical-alignment-control/ui.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\nimport { ToolbarGroup, ToolbarDropdownMenu } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport {\n\talignTop,\n\talignCenter,\n\talignBottom,\n\talignStretch,\n\tspaceBetween,\n} from './icons';\n\nconst BLOCK_ALIGNMENTS_CONTROLS = {\n\ttop: {\n\t\ticon: alignTop,\n\t\ttitle: _x( 'Align top', 'Block vertical alignment setting' ),\n\t},\n\tcenter: {\n\t\ticon: alignCenter,\n\t\ttitle: _x( 'Align middle', 'Block vertical alignment setting' ),\n\t},\n\tbottom: {\n\t\ticon: alignBottom,\n\t\ttitle: _x( 'Align bottom', 'Block vertical alignment setting' ),\n\t},\n\tstretch: {\n\t\ticon: alignStretch,\n\t\ttitle: _x( 'Stretch to fill', 'Block vertical alignment setting' ),\n\t},\n\t'space-between': {\n\t\ticon: spaceBetween,\n\t\ttitle: _x( 'Space between', 'Block vertical alignment setting' ),\n\t},\n};\n\nconst DEFAULT_CONTROLS = [ 'top', 'center', 'bottom' ];\nconst DEFAULT_CONTROL = 'top';\n\nfunction BlockVerticalAlignmentUI( {\n\tvalue,\n\tonChange,\n\tcontrols = DEFAULT_CONTROLS,\n\tisCollapsed = true,\n\tisToolbar,\n} ) {\n\tfunction applyOrUnset( align ) {\n\t\treturn () => onChange( value === align ? undefined : align );\n\t}\n\n\tconst activeAlignment = BLOCK_ALIGNMENTS_CONTROLS[ value ];\n\tconst defaultAlignmentControl =\n\t\tBLOCK_ALIGNMENTS_CONTROLS[ DEFAULT_CONTROL ];\n\n\tconst UIComponent = isToolbar ? ToolbarGroup : ToolbarDropdownMenu;\n\tconst extraProps = isToolbar ? { isCollapsed } : {};\n\n\treturn (\n\t\t<UIComponent\n\t\t\ticon={\n\t\t\t\tactiveAlignment\n\t\t\t\t\t? activeAlignment.icon\n\t\t\t\t\t: defaultAlignmentControl.icon\n\t\t\t}\n\t\t\tlabel={ _x(\n\t\t\t\t'Change vertical alignment',\n\t\t\t\t'Block vertical alignment setting label'\n\t\t\t) }\n\t\t\tcontrols={ controls.map( ( control ) => {\n\t\t\t\treturn {\n\t\t\t\t\t...BLOCK_ALIGNMENTS_CONTROLS[ control ],\n\t\t\t\t\tisActive: value === control,\n\t\t\t\t\trole: isCollapsed ? 'menuitemradio' : undefined,\n\t\t\t\t\tonClick: applyOrUnset( control ),\n\t\t\t\t};\n\t\t\t} ) }\n\t\t\t{ ...extraProps }\n\t\t/>\n\t);\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-vertical-alignment-toolbar/README.md\n */\nexport default BlockVerticalAlignmentUI;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,EAAEC,mBAAmB,QAAQ,uBAAuB;;AAEzE;AACA;AACA;AACA,SACCC,QAAQ,EACRC,WAAW,EACXC,WA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,CAAC,CAAC;EAEnD,OACCS,aAAA,CAACF,WAAW;IACXlB,IAAI,EACHgB,eAAe,GACZA,eAAe,CAAChB,IAAI,GACpBiB,uBAAuB,CAACjB,IAC3B;IACDqB,KAAK,EAAG/B,EAAE,CACT,2BAA2B,EAC3B,wCACD,CAAG;IACHoB,QAAQ,EAAGA,QAAQ,CAACY,GAAG,CAAIC,OAAO,IAAM;MACvC,OAAO;QACN,GAAGzB,yBAAyB,CAAEyB,OAAO,CAAE;QACvCC,QAAQ,EAAEhB,KAAK,KAAKe,OAAO;QAC3BE,IAAI,EAAEd,WAAW,GAAG,eAAe,GAAGI,SAAS;QAC/CW,OAAO,EAAEb,YAAY,CAAEU,OAAQ;MAChC,CAAC;IACF,CAAE,CAAG;IAAA,GACAJ;EAAU,CACf,CAAC;AAEJ;;AAEA;AACA;AACA;AACA,eAAeZ,wBAAwB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalUnitControl","UnitControl","__","getAllValue","getAllUnit","hasMixedValues","hasDefinedValues","AllInputControl","onChange","selectedUnits","setSelectedUnits","values","props","allValue","undefined","hasValues","isMixed","allPlaceholder","handleOnChange","next","isNumeric","isNaN","parseFloat","nextValue","handleOnUnitChange","unit","topLeft","topRight","bottomLeft","bottomRight","createElement","disableUnits","isOnly","value","onUnitChange","placeholder","size"],"sources":["@wordpress/block-editor/src/components/border-radius-control/all-input-control.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalUnitControl as UnitControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetAllValue,\n\tgetAllUnit,\n\thasMixedValues,\n\thasDefinedValues,\n} from './utils';\n\nexport default function AllInputControl( {\n\tonChange,\n\tselectedUnits,\n\tsetSelectedUnits,\n\tvalues,\n\t...props\n} ) {\n\tlet allValue = getAllValue( values );\n\n\tif ( allValue === undefined ) {\n\t\t// If we don't have any value set the unit to any current selection\n\t\t// or the most common unit from the individual radii values.\n\t\tallValue = getAllUnit( selectedUnits );\n\t}\n\n\tconst hasValues = hasDefinedValues( values );\n\tconst isMixed = hasValues && hasMixedValues( values );\n\tconst allPlaceholder = isMixed ? __( 'Mixed' ) : null;\n\n\t// Filter out CSS-unit-only values to prevent invalid styles.\n\tconst handleOnChange = ( next ) => {\n\t\tconst isNumeric = ! isNaN( parseFloat( next ) );\n\t\tconst nextValue = isNumeric ? next : undefined;\n\t\tonChange( nextValue );\n\t};\n\n\t// Store current unit selection for use as fallback for individual\n\t// radii controls.\n\tconst handleOnUnitChange = ( unit ) => {\n\t\tsetSelectedUnits( {\n\t\t\ttopLeft: unit,\n\t\t\ttopRight: unit,\n\t\t\tbottomLeft: unit,\n\t\t\tbottomRight: unit,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<UnitControl\n\t\t\t{ ...props }\n\t\t\taria-label={ __( 'Border radius' ) }\n\t\t\tdisableUnits={ isMixed }\n\t\t\tisOnly\n\t\t\tvalue={ allValue }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonUnitChange={ handleOnUnitChange }\n\t\t\tplaceholder={ allPlaceholder }\n\t\t\tsize={ '__unstable-large' }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,yBAAyB,IAAIC,WAAW,QAAQ,uBAAuB;AAChF,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SACCC,WAAW,EACXC,UAAU,EACVC,cAAc,EACdC,gBAAgB,QACV,SAAS;AAEhB,eAAe,SAASC,eAAeA,CAAE;EACxCC,QAAQ;EACRC,aAAa;EACbC,gBAAgB;EAChBC,MAAM;EACN,GAAGC;AACJ,CAAC,EAAG;EACH,IAAIC,QAAQ,GAAGV,WAAW,CAAEQ,MAAO,CAAC;EAEpC,IAAKE,QAAQ,KAAKC,SAAS,EAAG;IAC7B;IACA;IACAD,QAAQ,GAAGT,UAAU,CAAEK,aAAc,CAAC;EACvC;EAEA,MAAMM,SAAS,GAAGT,gBAAgB,CAAEK,MAAO,CAAC;EAC5C,MAAMK,OAAO,GAAGD,SAAS,IAAIV,cAAc,CAAEM,MAAO,CAAC;EACrD,MAAMM,cAAc,GAAGD,OAAO,GAAGd,EAAE,CAAE,OAAQ,CAAC,GAAG,IAAI;;EAErD;EACA,MAAMgB,cAAc,GAAKC,IAAI,IAAM;IAClC,MAAMC,SAAS,GAAG,CAAEC,KAAK,CAAEC,UAAU,CAAEH,IAAK,CAAE,CAAC;IAC/C,MAAMI,SAAS,GAAGH,SAAS,GAAGD,IAAI,GAAGL,SAAS;IAC9CN,QAAQ,CAAEe,SAAU,CAAC;EACtB,CAAC;;EAED;EACA;EACA,MAAMC,kBAAkB,GAAKC,IAAI,IAAM;IACtCf,gBAAgB,CAAE;MACjBgB,OAAO,EAAED,IAAI;MACbE,QAAQ,EAAEF,IAAI;MACdG,UAAU,EAAEH,IAAI;MAChBI,WAAW,EAAEJ;IACd,CAAE,CAAC;EACJ,CAAC;EAED,OACCK,aAAA,CAAC7B,WAAW;IAAA,GACNW,KAAK;IACV,cAAaV,EAAE,CAAE,eAAgB,CAAG;IACpC6B,YAAY,EAAGf,OAAS;IACxBgB,MAAM;IACNC,KAAK,EAAGpB,QAAU;IAClBL,QAAQ,EAAGU,cAAgB;IAC3BgB,YAAY,EAAGV,kBAAoB;IACnCW,WAAW,EAAGlB,cAAgB;IAC9BmB,IAAI,EAAG;EAAoB,CAC3B,CAAC;AAEJ"}
1
+ {"version":3,"names":["__experimentalUnitControl","UnitControl","__","getAllValue","getAllUnit","hasMixedValues","hasDefinedValues","AllInputControl","onChange","selectedUnits","setSelectedUnits","values","props","allValue","undefined","hasValues","isMixed","allPlaceholder","handleOnChange","next","isNumeric","isNaN","parseFloat","nextValue","handleOnUnitChange","unit","topLeft","topRight","bottomLeft","bottomRight","createElement","disableUnits","isOnly","value","onUnitChange","placeholder","size"],"sources":["@wordpress/block-editor/src/components/border-radius-control/all-input-control.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __experimentalUnitControl as UnitControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetAllValue,\n\tgetAllUnit,\n\thasMixedValues,\n\thasDefinedValues,\n} from './utils';\n\nexport default function AllInputControl( {\n\tonChange,\n\tselectedUnits,\n\tsetSelectedUnits,\n\tvalues,\n\t...props\n} ) {\n\tlet allValue = getAllValue( values );\n\n\tif ( allValue === undefined ) {\n\t\t// If we don't have any value set the unit to any current selection\n\t\t// or the most common unit from the individual radii values.\n\t\tallValue = getAllUnit( selectedUnits );\n\t}\n\n\tconst hasValues = hasDefinedValues( values );\n\tconst isMixed = hasValues && hasMixedValues( values );\n\tconst allPlaceholder = isMixed ? __( 'Mixed' ) : null;\n\n\t// Filter out CSS-unit-only values to prevent invalid styles.\n\tconst handleOnChange = ( next ) => {\n\t\tconst isNumeric = ! isNaN( parseFloat( next ) );\n\t\tconst nextValue = isNumeric ? next : undefined;\n\t\tonChange( nextValue );\n\t};\n\n\t// Store current unit selection for use as fallback for individual\n\t// radii controls.\n\tconst handleOnUnitChange = ( unit ) => {\n\t\tsetSelectedUnits( {\n\t\t\ttopLeft: unit,\n\t\t\ttopRight: unit,\n\t\t\tbottomLeft: unit,\n\t\t\tbottomRight: unit,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<UnitControl\n\t\t\t{ ...props }\n\t\t\taria-label={ __( 'Border radius' ) }\n\t\t\tdisableUnits={ isMixed }\n\t\t\tisOnly\n\t\t\tvalue={ allValue }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonUnitChange={ handleOnUnitChange }\n\t\t\tplaceholder={ allPlaceholder }\n\t\t\tsize={ '__unstable-large' }\n\t\t/>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,yBAAyB,IAAIC,WAAW,QAAQ,uBAAuB;AAChF,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SACCC,WAAW,EACXC,U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AEJ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["BaseControl","RangeControl","__experimentalParseQuantityAndUnitFromRawValue","parseQuantityAndUnitFromRawValue","__experimentalUseCustomUnits","useCustomUnits","useState","__","AllInputControl","InputControls","LinkedButton","useSettings","getAllValue","getAllUnit","hasDefinedValues","hasMixedValues","DEFAULT_VALUES","topLeft","undefined","topRight","bottomLeft","bottomRight","MIN_BORDER_RADIUS_VALUE","MAX_BORDER_RADIUS_VALUES","px","em","rem","BorderRadiusControl","onChange","values","isLinked","setIsLinked","selectedUnits","setSelectedUnits","flat","availableUnits","units","unit","unitConfig","find","item","value","step","allValue","toggleLinked","handleSliderChange","next","createElement","className","VisualLabel","as","Fragment","min","label","hideLabelFromVision","max","initialPosition","withInputField","__nextHasNoMarginBottom","onClick"],"sources":["@wordpress/block-editor/src/components/border-radius-control/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBaseControl,\n\tRangeControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n\t__experimentalUseCustomUnits as useCustomUnits,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport AllInputControl from './all-input-control';\nimport InputControls from './input-controls';\nimport LinkedButton from './linked-button';\nimport { useSettings } from '../use-settings';\nimport {\n\tgetAllValue,\n\tgetAllUnit,\n\thasDefinedValues,\n\thasMixedValues,\n} from './utils';\n\nconst DEFAULT_VALUES = {\n\ttopLeft: undefined,\n\ttopRight: undefined,\n\tbottomLeft: undefined,\n\tbottomRight: undefined,\n};\nconst MIN_BORDER_RADIUS_VALUE = 0;\nconst MAX_BORDER_RADIUS_VALUES = {\n\tpx: 100,\n\tem: 20,\n\trem: 20,\n};\n\n/**\n * Control to display border radius options.\n *\n * @param {Object} props Component props.\n * @param {Function} props.onChange Callback to handle onChange.\n * @param {Object} props.values Border radius values.\n *\n * @return {Element} Custom border radius control.\n */\nexport default function BorderRadiusControl( { onChange, values } ) {\n\tconst [ isLinked, setIsLinked ] = useState(\n\t\t! hasDefinedValues( values ) || ! hasMixedValues( values )\n\t);\n\n\t// Tracking selected units via internal state allows filtering of CSS unit\n\t// only values from being saved while maintaining preexisting unit selection\n\t// behaviour. Filtering CSS unit only values prevents invalid style values.\n\tconst [ selectedUnits, setSelectedUnits ] = useState( {\n\t\tflat:\n\t\t\ttypeof values === 'string'\n\t\t\t\t? parseQuantityAndUnitFromRawValue( values )[ 1 ]\n\t\t\t\t: undefined,\n\t\ttopLeft: parseQuantityAndUnitFromRawValue( values?.topLeft )[ 1 ],\n\t\ttopRight: parseQuantityAndUnitFromRawValue( values?.topRight )[ 1 ],\n\t\tbottomLeft: parseQuantityAndUnitFromRawValue( values?.bottomLeft )[ 1 ],\n\t\tbottomRight: parseQuantityAndUnitFromRawValue(\n\t\t\tvalues?.bottomRight\n\t\t)[ 1 ],\n\t} );\n\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ 'px', 'em', 'rem' ],\n\t} );\n\n\tconst unit = getAllUnit( selectedUnits );\n\tconst unitConfig = units && units.find( ( item ) => item.value === unit );\n\tconst step = unitConfig?.step || 1;\n\n\tconst [ allValue ] = parseQuantityAndUnitFromRawValue(\n\t\tgetAllValue( values )\n\t);\n\n\tconst toggleLinked = () => setIsLinked( ! isLinked );\n\n\tconst handleSliderChange = ( next ) => {\n\t\tonChange( next !== undefined ? `${ next }${ unit }` : undefined );\n\t};\n\n\treturn (\n\t\t<fieldset className=\"components-border-radius-control\">\n\t\t\t<BaseControl.VisualLabel as=\"legend\">\n\t\t\t\t{ __( 'Radius' ) }\n\t\t\t</BaseControl.VisualLabel>\n\t\t\t<div className=\"components-border-radius-control__wrapper\">\n\t\t\t\t{ isLinked ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<AllInputControl\n\t\t\t\t\t\t\tclassName=\"components-border-radius-control__unit-control\"\n\t\t\t\t\t\t\tvalues={ values }\n\t\t\t\t\t\t\tmin={ MIN_BORDER_RADIUS_VALUE }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tselectedUnits={ selectedUnits }\n\t\t\t\t\t\t\tsetSelectedUnits={ setSelectedUnits }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\tlabel={ __( 'Border radius' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\tclassName=\"components-border-radius-control__range-control\"\n\t\t\t\t\t\t\tvalue={ allValue ?? '' }\n\t\t\t\t\t\t\tmin={ MIN_BORDER_RADIUS_VALUE }\n\t\t\t\t\t\t\tmax={ MAX_BORDER_RADIUS_VALUES[ unit ] }\n\t\t\t\t\t\t\tinitialPosition={ 0 }\n\t\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t\t\tonChange={ handleSliderChange }\n\t\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<InputControls\n\t\t\t\t\t\tmin={ MIN_BORDER_RADIUS_VALUE }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tselectedUnits={ selectedUnits }\n\t\t\t\t\t\tsetSelectedUnits={ setSelectedUnits }\n\t\t\t\t\t\tvalues={ values || DEFAULT_VALUES }\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<LinkedButton onClick={ toggleLinked } isLinked={ isLinked } />\n\t\t\t</div>\n\t\t</fieldset>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,WAAW,EACXC,YAAY,EACZC,8CAA8C,IAAIC,gCAAgC,EAClFC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SAASC,QAAQ,QA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ACrBI,aAAa,EAAGA,aAAe;IAC/BC,gBAAgB,EAAGA,gBAAkB;IACrCG,KAAK,EAAGA;EAAO,CACf,CAAC,EACFW,aAAA,CAAC9C,YAAY;IACZoD,KAAK,EAAG9C,EAAE,CAAE,eAAgB,CAAG;IAC/B+C,mBAAmB;IACnBN,SAAS,EAAC,iDAAiD;IAC3DP,KAAK,EAAGE,QAAQ,aAARA,QAAQ,cAARA,QAAQ,GAAI,EAAI;IACxBS,GAAG,EAAG9B,uBAAyB;IAC/BiC,GAAG,EAAGhC,wBAAwB,CAAEc,IAAI,CAAI;IACxCmB,eAAe,EAAG,CAAG;IACrBC,cAAc,EAAG,KAAO;IACxB7B,QAAQ,EAAGiB,kBAAoB;IAC/BH,IAAI,EAAGA,IAAM;IACbgB,uBAAuB;EAAA,CACvB,CACA,CAAC,GAEHX,aAAA,CAACtC,aAAa;IACb2C,GAAG,EAAG9B,uBAAyB;IAC/BM,QAAQ,EAAGA,QAAU;IACrBI,aAAa,EAAGA,aAAe;IAC/BC,gBAAgB,EAAGA,gBAAkB;IACrCJ,MAAM,EAAGA,MAAM,IAAIb,cAAgB;IACnCoB,KAAK,EAAGA;EAAO,CACf,CACD,EACDW,aAAA,CAACrC,YAAY;IAACiD,OAAO,EAAGf,YAAc;IAACd,QAAQ,EAAGA;EAAU,CAAE,CAC1D,CACI,CAAC;AAEb"}
1
+ {"version":3,"names":["BaseControl","RangeControl","__experimentalParseQuantityAndUnitFromRawValue","parseQuantityAndUnitFromRawValue","__experimentalUseCustomUnits","useCustomUnits","useState","__","AllInputControl","InputControls","LinkedButton","useSettings","getAllValue","getAllUnit","hasDefinedValues","hasMixedValues","DEFAULT_VALUES","topLeft","undefined","topRight","bottomLeft","bottomRight","MIN_BORDER_RADIUS_VALUE","MAX_BORDER_RADIUS_VALUES","px","em","rem","BorderRadiusControl","onChange","values","isLinked","setIsLinked","selectedUnits","setSelectedUnits","flat","availableUnits","units","unit","unitConfig","find","item","value","step","allValue","toggleLinked","handleSliderChange","next","createElement","className","VisualLabel","as","Fragment","min","label","hideLabelFromVision","max","initialPosition","withInputField","__nextHasNoMarginBottom","onClick"],"sources":["@wordpress/block-editor/src/components/border-radius-control/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBaseControl,\n\tRangeControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n\t__experimentalUseCustomUnits as useCustomUnits,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport AllInputControl from './all-input-control';\nimport InputControls from './input-controls';\nimport LinkedButton from './linked-button';\nimport { useSettings } from '../use-settings';\nimport {\n\tgetAllValue,\n\tgetAllUnit,\n\thasDefinedValues,\n\thasMixedValues,\n} from './utils';\n\nconst DEFAULT_VALUES = {\n\ttopLeft: undefined,\n\ttopRight: undefined,\n\tbottomLeft: undefined,\n\tbottomRight: undefined,\n};\nconst MIN_BORDER_RADIUS_VALUE = 0;\nconst MAX_BORDER_RADIUS_VALUES = {\n\tpx: 100,\n\tem: 20,\n\trem: 20,\n};\n\n/**\n * Control to display border radius options.\n *\n * @param {Object} props Component props.\n * @param {Function} props.onChange Callback to handle onChange.\n * @param {Object} props.values Border radius values.\n *\n * @return {Element} Custom border radius control.\n */\nexport default function BorderRadiusControl( { onChange, values } ) {\n\tconst [ isLinked, setIsLinked ] = useState(\n\t\t! hasDefinedValues( values ) || ! hasMixedValues( values )\n\t);\n\n\t// Tracking selected units via internal state allows filtering of CSS unit\n\t// only values from being saved while maintaining preexisting unit selection\n\t// behaviour. Filtering CSS unit only values prevents invalid style values.\n\tconst [ selectedUnits, setSelectedUnits ] = useState( {\n\t\tflat:\n\t\t\ttypeof values === 'string'\n\t\t\t\t? parseQuantityAndUnitFromRawValue( values )[ 1 ]\n\t\t\t\t: undefined,\n\t\ttopLeft: parseQuantityAndUnitFromRawValue( values?.topLeft )[ 1 ],\n\t\ttopRight: parseQuantityAndUnitFromRawValue( values?.topRight )[ 1 ],\n\t\tbottomLeft: parseQuantityAndUnitFromRawValue( values?.bottomLeft )[ 1 ],\n\t\tbottomRight: parseQuantityAndUnitFromRawValue(\n\t\t\tvalues?.bottomRight\n\t\t)[ 1 ],\n\t} );\n\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ 'px', 'em', 'rem' ],\n\t} );\n\n\tconst unit = getAllUnit( selectedUnits );\n\tconst unitConfig = units && units.find( ( item ) => item.value === unit );\n\tconst step = unitConfig?.step || 1;\n\n\tconst [ allValue ] = parseQuantityAndUnitFromRawValue(\n\t\tgetAllValue( values )\n\t);\n\n\tconst toggleLinked = () => setIsLinked( ! isLinked );\n\n\tconst handleSliderChange = ( next ) => {\n\t\tonChange( next !== undefined ? `${ next }${ unit }` : undefined );\n\t};\n\n\treturn (\n\t\t<fieldset className=\"components-border-radius-control\">\n\t\t\t<BaseControl.VisualLabel as=\"legend\">\n\t\t\t\t{ __( 'Radius' ) }\n\t\t\t</BaseControl.VisualLabel>\n\t\t\t<div className=\"components-border-radius-control__wrapper\">\n\t\t\t\t{ isLinked ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<AllInputControl\n\t\t\t\t\t\t\tclassName=\"components-border-radius-control__unit-control\"\n\t\t\t\t\t\t\tvalues={ values }\n\t\t\t\t\t\t\tmin={ MIN_BORDER_RADIUS_VALUE }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tselectedUnits={ selectedUnits }\n\t\t\t\t\t\t\tsetSelectedUnits={ setSelectedUnits }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\tlabel={ __( 'Border radius' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\tclassName=\"components-border-radius-control__range-control\"\n\t\t\t\t\t\t\tvalue={ allValue ?? '' }\n\t\t\t\t\t\t\tmin={ MIN_BORDER_RADIUS_VALUE }\n\t\t\t\t\t\t\tmax={ MAX_BORDER_RADIUS_VALUES[ unit ] }\n\t\t\t\t\t\t\tinitialPosition={ 0 }\n\t\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t\t\tonChange={ handleSliderChange }\n\t\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<InputControls\n\t\t\t\t\t\tmin={ MIN_BORDER_RADIUS_VALUE }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tselectedUnits={ selectedUnits }\n\t\t\t\t\t\tsetSelectedUnits={ setSelectedUnits }\n\t\t\t\t\t\tvalues={ values || DEFAULT_VALUES }\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<LinkedButton onClick={ toggleLinked } isLinked={ isLinked } />\n\t\t\t</div>\n\t\t</fieldset>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,WAAW,EACXC,YAAY,EACZC,8CAA8C,IAAIC,gCAAgC,EAClFC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,OAAOC,eAAe,MAAM,qBAAqB;AACjD,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SACCC,WAAW,EACXC,UAAU,EACVC,gBAAgB,EAChBC,cAAc,QACR,SAAS;AAEhB,MAAMC,cAAc,GAAG;EACtBC,OAAO,EAAEC,SAAS;EAClBC,QAAQ,EAAED,SAAS;EACnBE,UAAU,EAAEF,SAAS;EACrBG,WAAW,EAAEH;AACd,CAAC;AACD,M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