@wordpress/block-editor 12.23.0 → 12.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1674) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +5 -1
  3. package/build/autocompleters/block.js.map +1 -1
  4. package/build/autocompleters/link.js.map +1 -1
  5. package/build/components/alignment-control/index.js.map +1 -1
  6. package/build/components/alignment-control/ui.js +3 -1
  7. package/build/components/alignment-control/ui.js.map +1 -1
  8. package/build/components/autocomplete/index.js.map +1 -1
  9. package/build/components/block-actions/index.js.map +1 -1
  10. package/build/components/block-alignment-control/constants.js.map +1 -1
  11. package/build/components/block-alignment-control/index.js.map +1 -1
  12. package/build/components/block-alignment-control/ui.js.map +1 -1
  13. package/build/components/block-alignment-control/ui.native.js.map +1 -1
  14. package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
  15. package/build/components/block-alignment-matrix-control/index.js.map +1 -1
  16. package/build/components/block-bindings-toolbar-indicator/index.js.map +1 -1
  17. package/build/components/block-breadcrumb/index.js.map +1 -1
  18. package/build/components/block-canvas/index.js.map +1 -1
  19. package/build/components/block-caption/index.native.js.map +1 -1
  20. package/build/components/block-card/index.js.map +1 -1
  21. package/build/components/block-compare/block-view.js.map +1 -1
  22. package/build/components/block-compare/index.js.map +1 -1
  23. package/build/components/block-content-overlay/index.js.map +1 -1
  24. package/build/components/block-context/index.js.map +1 -1
  25. package/build/components/block-controls/fill.js.map +1 -1
  26. package/build/components/block-controls/groups.js.map +1 -1
  27. package/build/components/block-controls/hook.js.map +1 -1
  28. package/build/components/block-controls/index.js.map +1 -1
  29. package/build/components/block-controls/slot.js.map +1 -1
  30. package/build/components/block-controls/slot.native.js.map +1 -1
  31. package/build/components/block-controls/use-has-block-controls.js.map +1 -1
  32. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  33. package/build/components/block-draggable/draggable-chip.native.js.map +1 -1
  34. package/build/components/block-draggable/dropping-insertion-point.native.js +1 -1
  35. package/build/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  36. package/build/components/block-draggable/index.js.map +1 -1
  37. package/build/components/block-draggable/index.native.js +1 -1
  38. package/build/components/block-draggable/index.native.js.map +1 -1
  39. package/build/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
  40. package/build/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
  41. package/build/components/block-edit/context.js +2 -1
  42. package/build/components/block-edit/context.js.map +1 -1
  43. package/build/components/block-edit/edit.js.map +1 -1
  44. package/build/components/block-edit/edit.native.js.map +1 -1
  45. package/build/components/block-edit/index.js +4 -2
  46. package/build/components/block-edit/index.js.map +1 -1
  47. package/build/components/block-edit-visually-button/index.js.map +1 -1
  48. package/build/components/block-editing-mode/index.js.map +1 -1
  49. package/build/components/block-full-height-alignment-control/index.js.map +1 -1
  50. package/build/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  51. package/build/components/block-heading-level-dropdown/index.js.map +1 -1
  52. package/build/components/block-heading-level-dropdown/index.native.js.map +1 -1
  53. package/build/components/block-icon/index.js.map +1 -1
  54. package/build/components/block-icon/index.native.js.map +1 -1
  55. package/build/components/block-info-slot-fill/index.js.map +1 -1
  56. package/build/components/block-inspector/index.js +5 -4
  57. package/build/components/block-inspector/index.js.map +1 -1
  58. package/build/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  59. package/build/components/block-list/block-crash-boundary.js.map +1 -1
  60. package/build/components/block-list/block-crash-boundary.native.js.map +1 -1
  61. package/build/components/block-list/block-crash-warning.js.map +1 -1
  62. package/build/components/block-list/block-crash-warning.native.js.map +1 -1
  63. package/build/components/block-list/block-html.js.map +1 -1
  64. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  65. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  66. package/build/components/block-list/block-list-context.native.js.map +1 -1
  67. package/build/components/block-list/block-list-item-cell.native.js.map +1 -1
  68. package/build/components/block-list/block-list-item.native.js.map +1 -1
  69. package/build/components/block-list/block-outline.native.js.map +1 -1
  70. package/build/components/block-list/block-selection-button.native.js.map +1 -1
  71. package/build/components/block-list/block.js +44 -35
  72. package/build/components/block-list/block.js.map +1 -1
  73. package/build/components/block-list/block.native.js +2 -2
  74. package/build/components/block-list/block.native.js.map +1 -1
  75. package/build/components/block-list/grid-item.native.js.map +1 -1
  76. package/build/components/block-list/index.js +18 -6
  77. package/build/components/block-list/index.js.map +1 -1
  78. package/build/components/block-list/index.native.js +1 -9
  79. package/build/components/block-list/index.native.js.map +1 -1
  80. package/build/components/block-list/insertion-point.native.js.map +1 -1
  81. package/build/components/block-list/layout.js.map +1 -1
  82. package/build/components/block-list/private-block-context.js.map +1 -1
  83. package/build/components/block-list/subdirectory-icon.js.map +1 -1
  84. package/build/components/block-list/use-block-props/index.js +8 -7
  85. package/build/components/block-list/use-block-props/index.js.map +1 -1
  86. package/build/components/block-list/use-block-props/index.native.js.map +1 -1
  87. package/build/components/block-list/use-block-props/use-block-refs.js +17 -46
  88. package/build/components/block-list/use-block-props/use-block-refs.js.map +1 -1
  89. package/build/components/block-list/use-block-props/use-focus-first-element.js +3 -2
  90. package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  91. package/build/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
  92. package/build/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
  93. package/build/components/block-list/use-block-props/use-is-hovered.js +10 -14
  94. package/build/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  95. package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
  96. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  97. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  98. package/build/components/block-list/use-scroll-upon-insertion.native.js.map +1 -1
  99. package/build/components/block-list-appender/index.js.map +1 -1
  100. package/build/components/block-list-appender/index.native.js.map +1 -1
  101. package/build/components/block-lock/index.js.map +1 -1
  102. package/build/components/block-lock/menu-item.js.map +1 -1
  103. package/build/components/block-lock/modal.js.map +1 -1
  104. package/build/components/block-lock/toolbar.js.map +1 -1
  105. package/build/components/block-lock/use-block-lock.js.map +1 -1
  106. package/build/components/block-media-update-progress/index.native.js.map +1 -1
  107. package/build/components/block-mover/button.js.map +1 -1
  108. package/build/components/block-mover/index.js.map +1 -1
  109. package/build/components/block-mover/index.native.js +3 -1
  110. package/build/components/block-mover/index.native.js.map +1 -1
  111. package/build/components/block-mover/mover-description.js.map +1 -1
  112. package/build/components/block-mover/mover-description.native.js.map +1 -1
  113. package/build/components/block-navigation/dropdown.js.map +1 -1
  114. package/build/components/block-parent-selector/index.js.map +1 -1
  115. package/build/components/block-pattern-setup/constants.js.map +1 -1
  116. package/build/components/block-pattern-setup/index.js.map +1 -1
  117. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  118. package/build/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  119. package/build/components/block-patterns-list/index.js.map +1 -1
  120. package/build/components/block-patterns-paging/index.js +8 -4
  121. package/build/components/block-patterns-paging/index.js.map +1 -1
  122. package/build/components/block-popover/cover.js.map +1 -1
  123. package/build/components/block-popover/drop-zone.js.map +1 -1
  124. package/build/components/block-popover/inbetween.js.map +1 -1
  125. package/build/components/block-popover/index.js.map +1 -1
  126. package/build/components/block-popover/use-popover-scroll.js.map +1 -1
  127. package/build/components/block-preview/auto.js.map +1 -1
  128. package/build/components/block-preview/index.js.map +1 -1
  129. package/build/components/block-quick-navigation/index.js.map +1 -1
  130. package/build/components/block-removal-warning-modal/index.js.map +1 -1
  131. package/build/components/block-rename/index.js.map +1 -1
  132. package/build/components/block-rename/is-empty-string.js.map +1 -1
  133. package/build/components/block-rename/modal.js +13 -9
  134. package/build/components/block-rename/modal.js.map +1 -1
  135. package/build/components/block-rename/rename-control.js +3 -1
  136. package/build/components/block-rename/rename-control.js.map +1 -1
  137. package/build/components/block-rename/use-block-rename.js.map +1 -1
  138. package/build/components/block-selection-clearer/index.js.map +1 -1
  139. package/build/components/block-settings/button.native.js.map +1 -1
  140. package/build/components/block-settings/container.native.js.map +1 -1
  141. package/build/components/block-settings/index.native.js +1 -1
  142. package/build/components/block-settings/index.native.js.map +1 -1
  143. package/build/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  144. package/build/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  145. package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  146. package/build/components/block-settings-menu/block-settings-dropdown.js +0 -25
  147. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  148. package/build/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
  149. package/build/components/block-settings-menu/index.js.map +1 -1
  150. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  151. package/build/components/block-styles/index.js.map +1 -1
  152. package/build/components/block-styles/index.native.js.map +1 -1
  153. package/build/components/block-styles/menu-items.js.map +1 -1
  154. package/build/components/block-styles/preview-panel.js.map +1 -1
  155. package/build/components/block-styles/preview.native.js.map +1 -1
  156. package/build/components/block-styles/use-styles-for-block.js.map +1 -1
  157. package/build/components/block-styles/utils.js.map +1 -1
  158. package/build/components/block-switcher/block-styles-menu.js.map +1 -1
  159. package/build/components/block-switcher/block-transformations-menu.js.map +1 -1
  160. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  161. package/build/components/block-switcher/block-variation-transformations.js.map +1 -1
  162. package/build/components/block-switcher/index.js.map +1 -1
  163. package/build/components/block-switcher/pattern-transformations-menu.js +3 -1
  164. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  165. package/build/components/block-switcher/preview-block-popover.js.map +1 -1
  166. package/build/components/block-switcher/use-transformed-patterns.js +6 -2
  167. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  168. package/build/components/block-switcher/utils.js +15 -5
  169. package/build/components/block-switcher/utils.js.map +1 -1
  170. package/build/components/block-title/index.js.map +1 -1
  171. package/build/components/block-title/use-block-display-title.js.map +1 -1
  172. package/build/components/block-toolbar/block-name-context.js.map +1 -1
  173. package/build/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
  174. package/build/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  175. package/build/components/block-toolbar/index.js +1 -1
  176. package/build/components/block-toolbar/index.js.map +1 -1
  177. package/build/components/block-toolbar/index.native.js.map +1 -1
  178. package/build/components/block-toolbar/shuffle.js.map +1 -1
  179. package/build/components/block-toolbar/use-has-block-toolbar.js +20 -12
  180. package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  181. package/build/components/block-toolbar/utils.js.map +1 -1
  182. package/build/components/block-tools/block-selection-button.js +16 -12
  183. package/build/components/block-tools/block-selection-button.js.map +1 -1
  184. package/build/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  185. package/build/components/block-tools/block-toolbar-popover.js.map +1 -1
  186. package/build/components/block-tools/empty-block-inserter.js.map +1 -1
  187. package/build/components/block-tools/index.js +4 -2
  188. package/build/components/block-tools/index.js.map +1 -1
  189. package/build/components/block-tools/insertion-point.js.map +1 -1
  190. package/build/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  191. package/build/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  192. package/build/components/block-tools/use-show-block-tools.js +9 -18
  193. package/build/components/block-tools/use-show-block-tools.js.map +1 -1
  194. package/build/components/block-tools/zoom-out-mode-inserters.js +5 -1
  195. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  196. package/build/components/block-types-list/index.js.map +1 -1
  197. package/build/components/block-types-list/index.native.js.map +1 -1
  198. package/build/components/block-variation-picker/index.js +3 -2
  199. package/build/components/block-variation-picker/index.js.map +1 -1
  200. package/build/components/block-variation-picker/index.native.js.map +1 -1
  201. package/build/components/block-variation-transforms/index.js +7 -2
  202. package/build/components/block-variation-transforms/index.js.map +1 -1
  203. package/build/components/block-vertical-alignment-control/icons.js.map +1 -1
  204. package/build/components/block-vertical-alignment-control/index.js.map +1 -1
  205. package/build/components/block-vertical-alignment-control/ui.js.map +1 -1
  206. package/build/components/border-radius-control/all-input-control.js.map +1 -1
  207. package/build/components/border-radius-control/index.js.map +1 -1
  208. package/build/components/border-radius-control/input-controls.js.map +1 -1
  209. package/build/components/border-radius-control/linked-button.js.map +1 -1
  210. package/build/components/border-radius-control/utils.js.map +1 -1
  211. package/build/components/button-block-appender/index.js.map +1 -1
  212. package/build/components/button-block-appender/index.native.js +11 -1
  213. package/build/components/button-block-appender/index.native.js.map +1 -1
  214. package/build/components/caption/index.native.js.map +1 -1
  215. package/build/components/child-layout-control/index.js.map +1 -1
  216. package/build/components/color-palette/control.js.map +1 -1
  217. package/build/components/color-palette/index.js.map +1 -1
  218. package/build/components/color-palette/with-color-context.js.map +1 -1
  219. package/build/components/color-style-selector/index.js.map +1 -1
  220. package/build/components/colors/index.js +1 -1
  221. package/build/components/colors/index.js.map +1 -1
  222. package/build/components/colors/utils.js.map +1 -1
  223. package/build/components/colors/with-colors.js.map +1 -1
  224. package/build/components/colors-gradients/control.js.map +1 -1
  225. package/build/components/colors-gradients/dropdown.js.map +1 -1
  226. package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  227. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  228. package/build/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
  229. package/build/components/contrast-checker/index.js.map +1 -1
  230. package/build/components/contrast-checker/index.native.js.map +1 -1
  231. package/build/components/convert-to-group-buttons/index.js.map +1 -1
  232. package/build/components/convert-to-group-buttons/index.native.js.map +1 -1
  233. package/build/components/convert-to-group-buttons/toolbar.js.map +1 -1
  234. package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  235. package/build/components/copy-handler/index.js.map +1 -1
  236. package/build/components/date-format-picker/index.js.map +1 -1
  237. package/build/components/default-block-appender/index.js.map +1 -1
  238. package/build/components/default-block-appender/index.native.js.map +1 -1
  239. package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  240. package/build/components/dimensions-tool/index.js.map +1 -1
  241. package/build/components/dimensions-tool/scale-tool.js.map +1 -1
  242. package/build/components/dimensions-tool/width-height-tool.js +6 -2
  243. package/build/components/dimensions-tool/width-height-tool.js.map +1 -1
  244. package/build/components/duotone/utils.js.map +1 -1
  245. package/build/components/duotone-control/index.js.map +1 -1
  246. package/build/components/editable-text/index.js.map +1 -1
  247. package/build/components/editor-styles/index.js +2 -1
  248. package/build/components/editor-styles/index.js.map +1 -1
  249. package/build/components/floating-toolbar/index.native.js +9 -5
  250. package/build/components/floating-toolbar/index.native.js.map +1 -1
  251. package/build/components/floating-toolbar/nav-up-icon.js.map +1 -1
  252. package/build/components/font-appearance-control/index.js.map +1 -1
  253. package/build/components/font-family/index.js.map +1 -1
  254. package/build/components/font-sizes/fluid-utils.js.map +1 -1
  255. package/build/components/font-sizes/font-size-picker.js.map +1 -1
  256. package/build/components/font-sizes/index.js.map +1 -1
  257. package/build/components/font-sizes/index.native.js.map +1 -1
  258. package/build/components/font-sizes/utils.js.map +1 -1
  259. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  260. package/build/components/global-styles/advanced-panel.js.map +1 -1
  261. package/build/components/global-styles/background-panel.js +20 -17
  262. package/build/components/global-styles/background-panel.js.map +1 -1
  263. package/build/components/global-styles/border-panel.js.map +1 -1
  264. package/build/components/global-styles/color-panel.js +3 -1
  265. package/build/components/global-styles/color-panel.js.map +1 -1
  266. package/build/components/global-styles/color-panel.native.js.map +1 -1
  267. package/build/components/global-styles/context.js.map +1 -1
  268. package/build/components/global-styles/dimensions-panel.js +16 -0
  269. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  270. package/build/components/global-styles/filters-panel.js.map +1 -1
  271. package/build/components/global-styles/get-block-css-selector.js.map +1 -1
  272. package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
  273. package/build/components/global-styles/hooks.js +3 -2
  274. package/build/components/global-styles/hooks.js.map +1 -1
  275. package/build/components/global-styles/image-settings-panel.js.map +1 -1
  276. package/build/components/global-styles/index.js +1 -1
  277. package/build/components/global-styles/index.js.map +1 -1
  278. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  279. package/build/components/global-styles/typography-panel.js +23 -23
  280. package/build/components/global-styles/typography-panel.js.map +1 -1
  281. package/build/components/global-styles/typography-utils.js.map +1 -1
  282. package/build/components/global-styles/use-global-styles-output.js +153 -136
  283. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  284. package/build/components/global-styles/utils.js +45 -0
  285. package/build/components/global-styles/utils.js.map +1 -1
  286. package/build/components/gradients/index.js.map +1 -1
  287. package/build/components/gradients/index.native.js.map +1 -1
  288. package/build/components/gradients/use-gradient.js.map +1 -1
  289. package/build/components/gradients/with-gradient.js.map +1 -1
  290. package/build/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  291. package/build/components/grid-visualizer/grid-visualizer.js.map +1 -1
  292. package/build/components/grid-visualizer/index.js.map +1 -1
  293. package/build/components/grid-visualizer/utils.js.map +1 -1
  294. package/build/components/height-control/index.js.map +1 -1
  295. package/build/components/iframe/get-compatibility-styles.js.map +1 -1
  296. package/build/components/iframe/index.js +12 -13
  297. package/build/components/iframe/index.js.map +1 -1
  298. package/build/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  299. package/build/components/image-editor/constants.js.map +1 -1
  300. package/build/components/image-editor/context.js.map +1 -1
  301. package/build/components/image-editor/cropper.js +6 -2
  302. package/build/components/image-editor/cropper.js.map +1 -1
  303. package/build/components/image-editor/form-controls.js.map +1 -1
  304. package/build/components/image-editor/index.js +0 -2
  305. package/build/components/image-editor/index.js.map +1 -1
  306. package/build/components/image-editor/rotation-button.js.map +1 -1
  307. package/build/components/image-editor/use-save-image.js.map +1 -1
  308. package/build/components/image-editor/use-transform-image.js.map +1 -1
  309. package/build/components/image-editor/zoom-dropdown.js.map +1 -1
  310. package/build/components/image-link-destinations/index.native.js.map +1 -1
  311. package/build/components/image-size-control/index.js.map +1 -1
  312. package/build/components/image-size-control/use-dimension-handler.js.map +1 -1
  313. package/build/components/index.js +1 -1
  314. package/build/components/index.js.map +1 -1
  315. package/build/components/index.native.js +1 -1
  316. package/build/components/index.native.js.map +1 -1
  317. package/build/components/inner-blocks/button-block-appender.js.map +1 -1
  318. package/build/components/inner-blocks/constants.native.js.map +1 -1
  319. package/build/components/inner-blocks/default-block-appender.js.map +1 -1
  320. package/build/components/inner-blocks/index.js +16 -2
  321. package/build/components/inner-blocks/index.js.map +1 -1
  322. package/build/components/inner-blocks/index.native.js.map +1 -1
  323. package/build/components/inner-blocks/use-block-context.js.map +1 -1
  324. package/build/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  325. package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  326. package/build/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  327. package/build/components/inner-blocks/with-client-id.js.map +1 -1
  328. package/build/components/inserter/block-patterns-explorer/index.js.map +1 -1
  329. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  330. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  331. package/build/components/inserter/block-patterns-tab/index.js +19 -25
  332. package/build/components/inserter/block-patterns-tab/index.js.map +1 -1
  333. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +2 -24
  334. package/build/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
  335. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -3
  336. package/build/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  337. package/build/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  338. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  339. package/build/components/inserter/block-patterns-tab/utils.js.map +1 -1
  340. package/build/components/inserter/block-types-tab.js +4 -0
  341. package/build/components/inserter/block-types-tab.js.map +1 -1
  342. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  343. package/build/components/inserter/category-tabs/index.js +56 -0
  344. package/build/components/inserter/category-tabs/index.js.map +1 -0
  345. package/build/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  346. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  347. package/build/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
  348. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  349. package/build/components/inserter/hooks/use-patterns-paging.js.map +1 -1
  350. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  351. package/build/components/inserter/index.js.map +1 -1
  352. package/build/components/inserter/index.native.js.map +1 -1
  353. package/build/components/inserter/library.js.map +1 -1
  354. package/build/components/inserter/media-tab/hooks.js.map +1 -1
  355. package/build/components/inserter/media-tab/index.js +2 -2
  356. package/build/components/inserter/media-tab/index.js.map +1 -1
  357. package/build/components/inserter/media-tab/media-list.js.map +1 -1
  358. package/build/components/inserter/media-tab/media-panel.js +0 -25
  359. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  360. package/build/components/inserter/media-tab/media-preview.js +13 -3
  361. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  362. package/build/components/inserter/media-tab/media-tab.js +15 -29
  363. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  364. package/build/components/inserter/media-tab/utils.js.map +1 -1
  365. package/build/components/inserter/menu.js +73 -77
  366. package/build/components/inserter/menu.js.map +1 -1
  367. package/build/components/inserter/menu.native.js.map +1 -1
  368. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  369. package/build/components/inserter/no-results.js.map +1 -1
  370. package/build/components/inserter/no-results.native.js.map +1 -1
  371. package/build/components/inserter/panel.js.map +1 -1
  372. package/build/components/inserter/preview-panel.js.map +1 -1
  373. package/build/components/inserter/quick-inserter.js.map +1 -1
  374. package/build/components/inserter/reusable-block-rename-hint.js.map +1 -1
  375. package/build/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  376. package/build/components/inserter/search-items.js.map +1 -1
  377. package/build/components/inserter/search-results.js.map +1 -1
  378. package/build/components/inserter/search-results.native.js.map +1 -1
  379. package/build/components/inserter/tabs.js +13 -9
  380. package/build/components/inserter/tabs.js.map +1 -1
  381. package/build/components/inserter/tabs.native.js.map +1 -1
  382. package/build/components/inserter/tips.js.map +1 -1
  383. package/build/components/inserter/utils.native.js.map +1 -1
  384. package/build/components/inserter-button/index.native.js.map +1 -1
  385. package/build/components/inserter-button/sparkles.js.map +1 -1
  386. package/build/components/inserter-draggable-blocks/index.js.map +1 -1
  387. package/build/components/inserter-list-item/index.js.map +1 -1
  388. package/build/components/inserter-listbox/context.js.map +1 -1
  389. package/build/components/inserter-listbox/group.js.map +1 -1
  390. package/build/components/inserter-listbox/index.js.map +1 -1
  391. package/build/components/inserter-listbox/item.js.map +1 -1
  392. package/build/components/inserter-listbox/row.js.map +1 -1
  393. package/build/components/inserter-menu-extension/index.js.map +1 -1
  394. package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
  395. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  396. package/build/components/inspector-controls/fill.js.map +1 -1
  397. package/build/components/inspector-controls/fill.native.js.map +1 -1
  398. package/build/components/inspector-controls/groups.js.map +1 -1
  399. package/build/components/inspector-controls/index.js.map +1 -1
  400. package/build/components/inspector-controls/slot.js.map +1 -1
  401. package/build/components/inspector-controls/slot.native.js.map +1 -1
  402. package/build/components/inspector-controls-tabs/advanced-controls-panel.js +1 -1
  403. package/build/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  404. package/build/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
  405. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  406. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  407. package/build/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  408. package/build/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  409. package/build/components/inspector-controls-tabs/styles-tab.js +1 -1
  410. package/build/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  411. package/build/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  412. package/build/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
  413. package/build/components/inspector-controls-tabs/utils.js.map +1 -1
  414. package/build/components/inspector-popover-header/index.js.map +1 -1
  415. package/build/components/justify-content-control/index.js.map +1 -1
  416. package/build/components/justify-content-control/ui.js.map +1 -1
  417. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  418. package/build/components/letter-spacing-control/index.js.map +1 -1
  419. package/build/components/line-height-control/index.js +6 -2
  420. package/build/components/line-height-control/index.js.map +1 -1
  421. package/build/components/line-height-control/index.native.js.map +1 -1
  422. package/build/components/line-height-control/utils.js.map +1 -1
  423. package/build/components/link-control/constants.js.map +1 -1
  424. package/build/components/link-control/index.js.map +1 -1
  425. package/build/components/link-control/is-url-like.js.map +1 -1
  426. package/build/components/link-control/link-preview.js.map +1 -1
  427. package/build/components/link-control/search-create-button.js.map +1 -1
  428. package/build/components/link-control/search-input.js.map +1 -1
  429. package/build/components/link-control/search-item.js +9 -3
  430. package/build/components/link-control/search-item.js.map +1 -1
  431. package/build/components/link-control/search-results.js.map +1 -1
  432. package/build/components/link-control/settings-drawer.js.map +1 -1
  433. package/build/components/link-control/settings.js.map +1 -1
  434. package/build/components/link-control/use-create-page.js.map +1 -1
  435. package/build/components/link-control/use-internal-value.js.map +1 -1
  436. package/build/components/link-control/use-rich-url-data.js.map +1 -1
  437. package/build/components/link-control/use-search-handler.js.map +1 -1
  438. package/build/components/link-control/viewer-slot.js.map +1 -1
  439. package/build/components/list-view/appender.js.map +1 -1
  440. package/build/components/list-view/aria-referenced-text.js.map +1 -1
  441. package/build/components/list-view/block-contents.js.map +1 -1
  442. package/build/components/list-view/block-select-button.js +5 -142
  443. package/build/components/list-view/block-select-button.js.map +1 -1
  444. package/build/components/list-view/block.js +166 -14
  445. package/build/components/list-view/block.js.map +1 -1
  446. package/build/components/list-view/branch.js.map +1 -1
  447. package/build/components/list-view/context.js.map +1 -1
  448. package/build/components/list-view/drop-indicator.js.map +1 -1
  449. package/build/components/list-view/expander.js.map +1 -1
  450. package/build/components/list-view/index.js +1 -1
  451. package/build/components/list-view/index.js.map +1 -1
  452. package/build/components/list-view/leaf.js.map +1 -1
  453. package/build/components/list-view/use-block-selection.js.map +1 -1
  454. package/build/components/list-view/use-clipboard-handler.js.map +1 -1
  455. package/build/components/list-view/use-list-view-block-indexes.js.map +1 -1
  456. package/build/components/list-view/use-list-view-client-ids.js.map +1 -1
  457. package/build/components/list-view/use-list-view-collapse-items.js.map +1 -1
  458. package/build/components/list-view/use-list-view-drop-zone.js +6 -1
  459. package/build/components/list-view/use-list-view-drop-zone.js.map +1 -1
  460. package/build/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
  461. package/build/components/list-view/use-list-view-images.js.map +1 -1
  462. package/build/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
  463. package/build/components/list-view/utils.js +3 -1
  464. package/build/components/list-view/utils.js.map +1 -1
  465. package/build/components/media-placeholder/index.js +3 -3
  466. package/build/components/media-placeholder/index.js.map +1 -1
  467. package/build/components/media-placeholder/index.native.js.map +1 -1
  468. package/build/components/media-replace-flow/index.js.map +1 -1
  469. package/build/components/media-replace-flow/index.native.js.map +1 -1
  470. package/build/components/media-upload/check.js.map +1 -1
  471. package/build/components/media-upload/constants.native.js.map +1 -1
  472. package/build/components/media-upload/index.js.map +1 -1
  473. package/build/components/media-upload/index.native.js.map +1 -1
  474. package/build/components/media-upload-progress/constants.js.map +1 -1
  475. package/build/components/media-upload-progress/index.native.js.map +1 -1
  476. package/build/components/multi-selection-inspector/index.js.map +1 -1
  477. package/build/components/navigable-toolbar/index.js +3 -1
  478. package/build/components/navigable-toolbar/index.js.map +1 -1
  479. package/build/components/observe-typing/index.js.map +1 -1
  480. package/build/components/panel-color-settings/index.js.map +1 -1
  481. package/build/components/plain-text/index.js.map +1 -1
  482. package/build/components/plain-text/index.native.js.map +1 -1
  483. package/build/components/preview-options/index.js.map +1 -1
  484. package/build/components/provider/block-refs-provider.js +3 -4
  485. package/build/components/provider/block-refs-provider.js.map +1 -1
  486. package/build/components/provider/index.js.map +1 -1
  487. package/build/components/provider/index.native.js.map +1 -1
  488. package/build/components/provider/use-block-sync.js +3 -12
  489. package/build/components/provider/use-block-sync.js.map +1 -1
  490. package/build/components/provider/with-registry-provider.js.map +1 -1
  491. package/build/components/publish-date-time-picker/index.js.map +1 -1
  492. package/build/components/recursion-provider/index.js +2 -2
  493. package/build/components/recursion-provider/index.js.map +1 -1
  494. package/build/components/resizable-box-popover/index.js.map +1 -1
  495. package/build/components/resolution-tool/index.js.map +1 -1
  496. package/build/components/responsive-block-control/index.js.map +1 -1
  497. package/build/components/responsive-block-control/label.js.map +1 -1
  498. package/build/components/rich-text/content.js +26 -19
  499. package/build/components/rich-text/content.js.map +1 -1
  500. package/build/components/rich-text/embed-handler-picker.native.js.map +1 -1
  501. package/build/components/rich-text/event-listeners/before-input-rules.js +93 -0
  502. package/build/components/rich-text/event-listeners/before-input-rules.js.map +1 -0
  503. package/build/components/rich-text/event-listeners/delete.js +58 -0
  504. package/build/components/rich-text/event-listeners/delete.js.map +1 -0
  505. package/build/components/rich-text/event-listeners/enter.js +98 -0
  506. package/build/components/rich-text/event-listeners/enter.js.map +1 -0
  507. package/build/components/rich-text/event-listeners/firefox-compat.js +36 -0
  508. package/build/components/rich-text/event-listeners/firefox-compat.js.map +1 -0
  509. package/build/components/rich-text/event-listeners/index.js +44 -0
  510. package/build/components/rich-text/event-listeners/index.js.map +1 -0
  511. package/build/components/rich-text/event-listeners/input-events.js +22 -0
  512. package/build/components/rich-text/event-listeners/input-events.js.map +1 -0
  513. package/build/components/rich-text/event-listeners/input-rules.js +135 -0
  514. package/build/components/rich-text/event-listeners/input-rules.js.map +1 -0
  515. package/build/components/rich-text/event-listeners/insert-replacement-text.js +33 -0
  516. package/build/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -0
  517. package/build/components/rich-text/event-listeners/paste-handler.js +146 -0
  518. package/build/components/rich-text/event-listeners/paste-handler.js.map +1 -0
  519. package/build/components/rich-text/event-listeners/remove-browser-shortcuts.js +27 -0
  520. package/build/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -0
  521. package/build/components/rich-text/event-listeners/shortcuts.js +22 -0
  522. package/build/components/rich-text/event-listeners/shortcuts.js.map +1 -0
  523. package/build/components/rich-text/event-listeners/undo-automatic-change.js +51 -0
  524. package/build/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -0
  525. package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
  526. package/build/components/rich-text/format-edit.js.map +1 -1
  527. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  528. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  529. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  530. package/build/components/rich-text/format-toolbar-container.native.js.map +1 -1
  531. package/build/components/rich-text/get-rich-text-values.js.map +1 -1
  532. package/build/components/rich-text/index.js +51 -31
  533. package/build/components/rich-text/index.js.map +1 -1
  534. package/build/components/rich-text/index.native.js +16 -4
  535. package/build/components/rich-text/index.native.js.map +1 -1
  536. package/build/components/rich-text/input-event.js.map +1 -1
  537. package/build/components/rich-text/input-event.native.js.map +1 -1
  538. package/build/components/rich-text/multiline.js +6 -2
  539. package/build/components/rich-text/multiline.js.map +1 -1
  540. package/build/components/rich-text/native/format-edit.js.map +1 -1
  541. package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
  542. package/build/components/rich-text/native/index.js.map +1 -1
  543. package/build/components/rich-text/native/index.native.js +12 -0
  544. package/build/components/rich-text/native/index.native.js.map +1 -1
  545. package/build/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  546. package/build/components/rich-text/native/use-format-types.js.map +1 -1
  547. package/build/components/rich-text/prevent-event-discovery.js.map +1 -1
  548. package/build/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
  549. package/build/components/rich-text/shortcut.js.map +1 -1
  550. package/build/components/rich-text/shortcut.native.js.map +1 -1
  551. package/build/components/rich-text/split-value.js.map +1 -1
  552. package/build/components/rich-text/toolbar-button.js.map +1 -1
  553. package/build/components/rich-text/use-format-types.js +8 -4
  554. package/build/components/rich-text/use-format-types.js.map +1 -1
  555. package/build/components/rich-text/use-mark-persistent.js.map +1 -1
  556. package/build/components/rich-text/utils.js.map +1 -1
  557. package/build/components/rich-text/with-deprecations.js.map +1 -1
  558. package/build/components/segmented-text-control/index.js +62 -0
  559. package/build/components/segmented-text-control/index.js.map +1 -0
  560. package/build/components/selection-scroll-into-view/index.js.map +1 -1
  561. package/build/components/skip-to-selected-block/index.js.map +1 -1
  562. package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  563. package/build/components/spacing-sizes-control/index.js.map +1 -1
  564. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  565. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  566. package/build/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  567. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -2
  568. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  569. package/build/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  570. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  571. package/build/components/text-alignment-control/index.js +76 -0
  572. package/build/components/text-alignment-control/index.js.map +1 -0
  573. package/build/components/text-decoration-control/index.js +21 -25
  574. package/build/components/text-decoration-control/index.js.map +1 -1
  575. package/build/components/text-transform-control/index.js +18 -22
  576. package/build/components/text-transform-control/index.js.map +1 -1
  577. package/build/components/tool-selector/index.js.map +1 -1
  578. package/build/components/typewriter/index.js.map +1 -1
  579. package/build/components/ungroup-button/index.native.js.map +1 -1
  580. package/build/components/unit-control/index.js.map +1 -1
  581. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  582. package/build/components/url-input/button.js.map +1 -1
  583. package/build/components/url-input/index.js.map +1 -1
  584. package/build/components/url-input/index.native.js.map +1 -1
  585. package/build/components/url-popover/image-url-input-ui.js.map +1 -1
  586. package/build/components/url-popover/index.js.map +1 -1
  587. package/build/components/url-popover/link-editor.js.map +1 -1
  588. package/build/components/url-popover/link-viewer-url.js.map +1 -1
  589. package/build/components/url-popover/link-viewer.js.map +1 -1
  590. package/build/components/use-block-commands/index.js +20 -2
  591. package/build/components/use-block-commands/index.js.map +1 -1
  592. package/build/components/use-block-display-information/index.js +9 -3
  593. package/build/components/use-block-display-information/index.js.map +1 -1
  594. package/build/components/use-block-drop-zone/index.js.map +1 -1
  595. package/build/components/use-block-drop-zone/index.native.js.map +1 -1
  596. package/build/components/use-flash-editable-blocks/index.js.map +1 -1
  597. package/build/components/use-moving-animation/index.js.map +1 -1
  598. package/build/components/use-on-block-drop/index.js +3 -1
  599. package/build/components/use-on-block-drop/index.js.map +1 -1
  600. package/build/components/use-on-block-drop/index.native.js.map +1 -1
  601. package/build/components/use-on-block-drop/types.js.map +1 -1
  602. package/build/components/use-paste-styles/index.js +1 -0
  603. package/build/components/use-paste-styles/index.js.map +1 -1
  604. package/build/components/use-resize-canvas/index.js.map +1 -1
  605. package/build/components/use-settings/index.js.map +1 -1
  606. package/build/components/use-unsupported-block-editor/index.native.js.map +1 -1
  607. package/build/components/video-player/gridicon-play.native.js.map +1 -1
  608. package/build/components/video-player/index.native.js.map +1 -1
  609. package/build/components/warning/index.js.map +1 -1
  610. package/build/components/warning/index.native.js.map +1 -1
  611. package/build/components/writing-flow/index.js.map +1 -1
  612. package/build/components/writing-flow/use-arrow-nav.js.map +1 -1
  613. package/build/components/writing-flow/use-click-selection.js.map +1 -1
  614. package/build/components/writing-flow/use-clipboard-handler.js.map +1 -1
  615. package/build/components/writing-flow/use-drag-selection.js +3 -1
  616. package/build/components/writing-flow/use-drag-selection.js.map +1 -1
  617. package/build/components/writing-flow/use-input.js.map +1 -1
  618. package/build/components/writing-flow/use-multi-selection.js.map +1 -1
  619. package/build/components/writing-flow/use-select-all.js.map +1 -1
  620. package/build/components/writing-flow/use-selection-observer.js.map +1 -1
  621. package/build/components/writing-flow/use-tab-nav.js +3 -1
  622. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  623. package/build/components/writing-flow/utils.js.map +1 -1
  624. package/build/components/writing-mode-control/index.js +16 -20
  625. package/build/components/writing-mode-control/index.js.map +1 -1
  626. package/build/elements/index.js.map +1 -1
  627. package/build/hooks/align.js.map +1 -1
  628. package/build/hooks/align.native.js +1 -1
  629. package/build/hooks/align.native.js.map +1 -1
  630. package/build/hooks/anchor.js.map +1 -1
  631. package/build/hooks/aria-label.js.map +1 -1
  632. package/build/hooks/background.js +3 -3
  633. package/build/hooks/background.js.map +1 -1
  634. package/build/hooks/block-hooks.js.map +1 -1
  635. package/build/hooks/block-renaming.js +0 -37
  636. package/build/hooks/block-renaming.js.map +1 -1
  637. package/build/hooks/border.js.map +1 -1
  638. package/build/hooks/color.js +1 -1
  639. package/build/hooks/color.js.map +1 -1
  640. package/build/hooks/compat.js.map +1 -1
  641. package/build/hooks/content-lock-ui.js +5 -5
  642. package/build/hooks/content-lock-ui.js.map +1 -1
  643. package/build/hooks/contrast-checker.js.map +1 -1
  644. package/build/hooks/custom-class-name.js.map +1 -1
  645. package/build/hooks/custom-class-name.native.js.map +1 -1
  646. package/build/hooks/dimensions.js.map +1 -1
  647. package/build/hooks/duotone.js +3 -1
  648. package/build/hooks/duotone.js.map +1 -1
  649. package/build/hooks/font-family.js.map +1 -1
  650. package/build/hooks/font-size.js.map +1 -1
  651. package/build/hooks/gap.js.map +1 -1
  652. package/build/hooks/generated-class-name.js.map +1 -1
  653. package/build/hooks/index.js +6 -5
  654. package/build/hooks/index.js.map +1 -1
  655. package/build/hooks/index.native.js.map +1 -1
  656. package/build/hooks/layout-child.js.map +1 -1
  657. package/build/hooks/layout.js +38 -19
  658. package/build/hooks/layout.js.map +1 -1
  659. package/build/hooks/layout.native.js.map +1 -1
  660. package/build/hooks/line-height.js.map +1 -1
  661. package/build/hooks/lock.js.map +1 -1
  662. package/build/hooks/metadata.js.map +1 -1
  663. package/build/hooks/position.js.map +1 -1
  664. package/build/hooks/settings.js.map +1 -1
  665. package/build/hooks/spacing-visualizer.js.map +1 -1
  666. package/build/hooks/style.js.map +1 -1
  667. package/build/hooks/supports.js +27 -4
  668. package/build/hooks/supports.js.map +1 -1
  669. package/build/hooks/text-align.js +156 -0
  670. package/build/hooks/text-align.js.map +1 -0
  671. package/build/hooks/typography.js +3 -2
  672. package/build/hooks/typography.js.map +1 -1
  673. package/build/hooks/typography.native.js.map +1 -1
  674. package/build/hooks/use-bindings-attributes.js +66 -129
  675. package/build/hooks/use-bindings-attributes.js.map +1 -1
  676. package/build/hooks/use-border-props.js.map +1 -1
  677. package/build/hooks/use-cached-truthy.js.map +1 -1
  678. package/build/hooks/use-color-props.js.map +1 -1
  679. package/build/hooks/use-editor-wrapper-styles.native.js.map +1 -1
  680. package/build/hooks/use-shadow-props.js.map +1 -1
  681. package/build/hooks/use-spacing-props.js.map +1 -1
  682. package/build/hooks/use-typography-props.js +2 -1
  683. package/build/hooks/use-typography-props.js.map +1 -1
  684. package/build/hooks/use-zoom-out.js +22 -15
  685. package/build/hooks/use-zoom-out.js.map +1 -1
  686. package/build/hooks/utils.js +37 -8
  687. package/build/hooks/utils.js.map +1 -1
  688. package/build/index.js.map +1 -1
  689. package/build/index.native.js.map +1 -1
  690. package/build/layouts/constrained.js.map +1 -1
  691. package/build/layouts/definitions.js +8 -6
  692. package/build/layouts/definitions.js.map +1 -1
  693. package/build/layouts/flex.js.map +1 -1
  694. package/build/layouts/flow.js.map +1 -1
  695. package/build/layouts/grid.js +52 -9
  696. package/build/layouts/grid.js.map +1 -1
  697. package/build/layouts/index.js.map +1 -1
  698. package/build/layouts/utils.js.map +1 -1
  699. package/build/lock-unlock.js.map +1 -1
  700. package/build/private-apis.js +5 -3
  701. package/build/private-apis.js.map +1 -1
  702. package/build/private-apis.native.js +1 -1
  703. package/build/private-apis.native.js.map +1 -1
  704. package/build/store/actions.js +47 -9
  705. package/build/store/actions.js.map +1 -1
  706. package/build/store/array.js.map +1 -1
  707. package/build/store/constants.js.map +1 -1
  708. package/build/store/defaults.js.map +1 -1
  709. package/build/store/defaults.native.js.map +1 -1
  710. package/build/store/get-block-settings.js.map +1 -1
  711. package/build/store/index.js +1 -1
  712. package/build/store/index.js.map +1 -1
  713. package/build/store/private-actions.js +5 -2
  714. package/build/store/private-actions.js.map +1 -1
  715. package/build/store/private-keys.js.map +1 -1
  716. package/build/store/private-selectors.js +121 -44
  717. package/build/store/private-selectors.js.map +1 -1
  718. package/build/store/reducer.js +11 -8
  719. package/build/store/reducer.js.map +1 -1
  720. package/build/store/selectors.js +143 -88
  721. package/build/store/selectors.js.map +1 -1
  722. package/build/store/undo-ignore.js.map +1 -1
  723. package/build/store/utils.js.map +1 -1
  724. package/build/utils/dom.js.map +1 -1
  725. package/build/utils/get-px-from-css-unit.js.map +1 -1
  726. package/build/utils/index.js.map +1 -1
  727. package/build/utils/math.js.map +1 -1
  728. package/build/utils/object.js +17 -0
  729. package/build/utils/object.js.map +1 -1
  730. package/build/utils/order-inserter-block-items.js +6 -2
  731. package/build/utils/order-inserter-block-items.js.map +1 -1
  732. package/build/utils/pasting.js +6 -2
  733. package/build/utils/pasting.js.map +1 -1
  734. package/build/utils/selection.js.map +1 -1
  735. package/build/utils/sorting.js.map +1 -1
  736. package/build/utils/transform-styles/index.js +1 -1
  737. package/build/utils/transform-styles/index.js.map +1 -1
  738. package/build/utils/use-notify-copy.js.map +1 -1
  739. package/build-module/autocompleters/block.js.map +1 -1
  740. package/build-module/autocompleters/link.js.map +1 -1
  741. package/build-module/components/alignment-control/index.js.map +1 -1
  742. package/build-module/components/alignment-control/ui.js +3 -1
  743. package/build-module/components/alignment-control/ui.js.map +1 -1
  744. package/build-module/components/autocomplete/index.js.map +1 -1
  745. package/build-module/components/block-actions/index.js.map +1 -1
  746. package/build-module/components/block-alignment-control/constants.js.map +1 -1
  747. package/build-module/components/block-alignment-control/index.js.map +1 -1
  748. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  749. package/build-module/components/block-alignment-control/ui.native.js.map +1 -1
  750. package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
  751. package/build-module/components/block-alignment-matrix-control/index.js.map +1 -1
  752. package/build-module/components/block-bindings-toolbar-indicator/index.js.map +1 -1
  753. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  754. package/build-module/components/block-canvas/index.js.map +1 -1
  755. package/build-module/components/block-caption/index.native.js.map +1 -1
  756. package/build-module/components/block-card/index.js.map +1 -1
  757. package/build-module/components/block-compare/block-view.js.map +1 -1
  758. package/build-module/components/block-compare/index.js.map +1 -1
  759. package/build-module/components/block-content-overlay/index.js.map +1 -1
  760. package/build-module/components/block-context/index.js.map +1 -1
  761. package/build-module/components/block-controls/fill.js.map +1 -1
  762. package/build-module/components/block-controls/groups.js.map +1 -1
  763. package/build-module/components/block-controls/hook.js.map +1 -1
  764. package/build-module/components/block-controls/index.js.map +1 -1
  765. package/build-module/components/block-controls/slot.js.map +1 -1
  766. package/build-module/components/block-controls/slot.native.js.map +1 -1
  767. package/build-module/components/block-controls/use-has-block-controls.js.map +1 -1
  768. package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
  769. package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
  770. package/build-module/components/block-draggable/dropping-insertion-point.native.js.map +1 -1
  771. package/build-module/components/block-draggable/index.js.map +1 -1
  772. package/build-module/components/block-draggable/index.native.js.map +1 -1
  773. package/build-module/components/block-draggable/use-scroll-when-dragging.js.map +1 -1
  774. package/build-module/components/block-draggable/use-scroll-when-dragging.native.js.map +1 -1
  775. package/build-module/components/block-edit/context.js +1 -0
  776. package/build-module/components/block-edit/context.js.map +1 -1
  777. package/build-module/components/block-edit/edit.js.map +1 -1
  778. package/build-module/components/block-edit/edit.native.js.map +1 -1
  779. package/build-module/components/block-edit/index.js +5 -3
  780. package/build-module/components/block-edit/index.js.map +1 -1
  781. package/build-module/components/block-edit-visually-button/index.js.map +1 -1
  782. package/build-module/components/block-editing-mode/index.js.map +1 -1
  783. package/build-module/components/block-full-height-alignment-control/index.js.map +1 -1
  784. package/build-module/components/block-heading-level-dropdown/heading-level-icon.js.map +1 -1
  785. package/build-module/components/block-heading-level-dropdown/index.js.map +1 -1
  786. package/build-module/components/block-heading-level-dropdown/index.native.js.map +1 -1
  787. package/build-module/components/block-icon/index.js.map +1 -1
  788. package/build-module/components/block-icon/index.native.js.map +1 -1
  789. package/build-module/components/block-info-slot-fill/index.js.map +1 -1
  790. package/build-module/components/block-inspector/index.js +5 -4
  791. package/build-module/components/block-inspector/index.js.map +1 -1
  792. package/build-module/components/block-inspector/useBlockInspectorAnimationSettings.js.map +1 -1
  793. package/build-module/components/block-list/block-crash-boundary.js.map +1 -1
  794. package/build-module/components/block-list/block-crash-boundary.native.js.map +1 -1
  795. package/build-module/components/block-list/block-crash-warning.js.map +1 -1
  796. package/build-module/components/block-list/block-crash-warning.native.js.map +1 -1
  797. package/build-module/components/block-list/block-html.js.map +1 -1
  798. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  799. package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
  800. package/build-module/components/block-list/block-list-context.native.js.map +1 -1
  801. package/build-module/components/block-list/block-list-item-cell.native.js.map +1 -1
  802. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  803. package/build-module/components/block-list/block-outline.native.js.map +1 -1
  804. package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
  805. package/build-module/components/block-list/block.js +44 -35
  806. package/build-module/components/block-list/block.js.map +1 -1
  807. package/build-module/components/block-list/block.native.js +2 -2
  808. package/build-module/components/block-list/block.native.js.map +1 -1
  809. package/build-module/components/block-list/grid-item.native.js.map +1 -1
  810. package/build-module/components/block-list/index.js +18 -6
  811. package/build-module/components/block-list/index.js.map +1 -1
  812. package/build-module/components/block-list/index.native.js +1 -9
  813. package/build-module/components/block-list/index.native.js.map +1 -1
  814. package/build-module/components/block-list/insertion-point.native.js.map +1 -1
  815. package/build-module/components/block-list/layout.js.map +1 -1
  816. package/build-module/components/block-list/private-block-context.js.map +1 -1
  817. package/build-module/components/block-list/subdirectory-icon.js.map +1 -1
  818. package/build-module/components/block-list/use-block-props/index.js +8 -7
  819. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  820. package/build-module/components/block-list/use-block-props/index.native.js.map +1 -1
  821. package/build-module/components/block-list/use-block-props/use-block-refs.js +19 -48
  822. package/build-module/components/block-list/use-block-props/use-block-refs.js.map +1 -1
  823. package/build-module/components/block-list/use-block-props/use-focus-first-element.js +3 -2
  824. package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  825. package/build-module/components/block-list/use-block-props/use-focus-handler.js.map +1 -1
  826. package/build-module/components/block-list/use-block-props/use-intersection-observer.js.map +1 -1
  827. package/build-module/components/block-list/use-block-props/use-is-hovered.js +10 -14
  828. package/build-module/components/block-list/use-block-props/use-is-hovered.js.map +1 -1
  829. package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +1 -1
  830. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  831. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  832. package/build-module/components/block-list/use-scroll-upon-insertion.native.js.map +1 -1
  833. package/build-module/components/block-list-appender/index.js.map +1 -1
  834. package/build-module/components/block-list-appender/index.native.js.map +1 -1
  835. package/build-module/components/block-lock/index.js.map +1 -1
  836. package/build-module/components/block-lock/menu-item.js.map +1 -1
  837. package/build-module/components/block-lock/modal.js.map +1 -1
  838. package/build-module/components/block-lock/toolbar.js.map +1 -1
  839. package/build-module/components/block-lock/use-block-lock.js.map +1 -1
  840. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  841. package/build-module/components/block-mover/button.js.map +1 -1
  842. package/build-module/components/block-mover/index.js.map +1 -1
  843. package/build-module/components/block-mover/index.native.js +3 -1
  844. package/build-module/components/block-mover/index.native.js.map +1 -1
  845. package/build-module/components/block-mover/mover-description.js.map +1 -1
  846. package/build-module/components/block-mover/mover-description.native.js.map +1 -1
  847. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  848. package/build-module/components/block-parent-selector/index.js.map +1 -1
  849. package/build-module/components/block-pattern-setup/constants.js.map +1 -1
  850. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  851. package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  852. package/build-module/components/block-pattern-setup/use-patterns-setup.js.map +1 -1
  853. package/build-module/components/block-patterns-list/index.js.map +1 -1
  854. package/build-module/components/block-patterns-paging/index.js +8 -4
  855. package/build-module/components/block-patterns-paging/index.js.map +1 -1
  856. package/build-module/components/block-popover/cover.js.map +1 -1
  857. package/build-module/components/block-popover/drop-zone.js.map +1 -1
  858. package/build-module/components/block-popover/inbetween.js.map +1 -1
  859. package/build-module/components/block-popover/index.js.map +1 -1
  860. package/build-module/components/block-popover/use-popover-scroll.js.map +1 -1
  861. package/build-module/components/block-preview/auto.js.map +1 -1
  862. package/build-module/components/block-preview/index.js.map +1 -1
  863. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  864. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  865. package/build-module/components/block-rename/index.js.map +1 -1
  866. package/build-module/components/block-rename/is-empty-string.js.map +1 -1
  867. package/build-module/components/block-rename/modal.js +14 -10
  868. package/build-module/components/block-rename/modal.js.map +1 -1
  869. package/build-module/components/block-rename/rename-control.js +3 -1
  870. package/build-module/components/block-rename/rename-control.js.map +1 -1
  871. package/build-module/components/block-rename/use-block-rename.js.map +1 -1
  872. package/build-module/components/block-selection-clearer/index.js.map +1 -1
  873. package/build-module/components/block-settings/button.native.js.map +1 -1
  874. package/build-module/components/block-settings/container.native.js.map +1 -1
  875. package/build-module/components/block-settings/index.native.js.map +1 -1
  876. package/build-module/components/block-settings-menu/block-html-convert-button.js.map +1 -1
  877. package/build-module/components/block-settings-menu/block-mode-toggle.js.map +1 -1
  878. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  879. package/build-module/components/block-settings-menu/block-settings-dropdown.js +1 -26
  880. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  881. package/build-module/components/block-settings-menu/block-settings-menu-first-item.js.map +1 -1
  882. package/build-module/components/block-settings-menu/index.js.map +1 -1
  883. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  884. package/build-module/components/block-styles/index.js.map +1 -1
  885. package/build-module/components/block-styles/index.native.js.map +1 -1
  886. package/build-module/components/block-styles/menu-items.js.map +1 -1
  887. package/build-module/components/block-styles/preview-panel.js.map +1 -1
  888. package/build-module/components/block-styles/preview.native.js.map +1 -1
  889. package/build-module/components/block-styles/use-styles-for-block.js.map +1 -1
  890. package/build-module/components/block-styles/utils.js.map +1 -1
  891. package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
  892. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  893. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  894. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  895. package/build-module/components/block-switcher/index.js.map +1 -1
  896. package/build-module/components/block-switcher/pattern-transformations-menu.js +3 -1
  897. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  898. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  899. package/build-module/components/block-switcher/use-transformed-patterns.js +6 -2
  900. package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
  901. package/build-module/components/block-switcher/utils.js +15 -5
  902. package/build-module/components/block-switcher/utils.js.map +1 -1
  903. package/build-module/components/block-title/index.js.map +1 -1
  904. package/build-module/components/block-title/use-block-display-title.js.map +1 -1
  905. package/build-module/components/block-toolbar/block-name-context.js.map +1 -1
  906. package/build-module/components/block-toolbar/block-toolbar-last-item.js.map +1 -1
  907. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  908. package/build-module/components/block-toolbar/index.js +1 -1
  909. package/build-module/components/block-toolbar/index.js.map +1 -1
  910. package/build-module/components/block-toolbar/index.native.js.map +1 -1
  911. package/build-module/components/block-toolbar/shuffle.js.map +1 -1
  912. package/build-module/components/block-toolbar/use-has-block-toolbar.js +20 -12
  913. package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  914. package/build-module/components/block-toolbar/utils.js.map +1 -1
  915. package/build-module/components/block-tools/block-selection-button.js +16 -12
  916. package/build-module/components/block-tools/block-selection-button.js.map +1 -1
  917. package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +1 -1
  918. package/build-module/components/block-tools/block-toolbar-popover.js.map +1 -1
  919. package/build-module/components/block-tools/empty-block-inserter.js.map +1 -1
  920. package/build-module/components/block-tools/index.js +3 -1
  921. package/build-module/components/block-tools/index.js.map +1 -1
  922. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  923. package/build-module/components/block-tools/use-block-toolbar-popover-props.js.map +1 -1
  924. package/build-module/components/block-tools/use-selected-block-tool-props.js.map +1 -1
  925. package/build-module/components/block-tools/use-show-block-tools.js +9 -18
  926. package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
  927. package/build-module/components/block-tools/zoom-out-mode-inserters.js +5 -1
  928. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  929. package/build-module/components/block-types-list/index.js.map +1 -1
  930. package/build-module/components/block-types-list/index.native.js.map +1 -1
  931. package/build-module/components/block-variation-picker/index.js +3 -2
  932. package/build-module/components/block-variation-picker/index.js.map +1 -1
  933. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  934. package/build-module/components/block-variation-transforms/index.js +7 -2
  935. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  936. package/build-module/components/block-vertical-alignment-control/icons.js.map +1 -1
  937. package/build-module/components/block-vertical-alignment-control/index.js.map +1 -1
  938. package/build-module/components/block-vertical-alignment-control/ui.js.map +1 -1
  939. package/build-module/components/border-radius-control/all-input-control.js.map +1 -1
  940. package/build-module/components/border-radius-control/index.js.map +1 -1
  941. package/build-module/components/border-radius-control/input-controls.js.map +1 -1
  942. package/build-module/components/border-radius-control/linked-button.js.map +1 -1
  943. package/build-module/components/border-radius-control/utils.js.map +1 -1
  944. package/build-module/components/button-block-appender/index.js.map +1 -1
  945. package/build-module/components/button-block-appender/index.native.js +11 -1
  946. package/build-module/components/button-block-appender/index.native.js.map +1 -1
  947. package/build-module/components/caption/index.native.js.map +1 -1
  948. package/build-module/components/child-layout-control/index.js.map +1 -1
  949. package/build-module/components/color-palette/control.js.map +1 -1
  950. package/build-module/components/color-palette/index.js.map +1 -1
  951. package/build-module/components/color-palette/with-color-context.js.map +1 -1
  952. package/build-module/components/color-style-selector/index.js.map +1 -1
  953. package/build-module/components/colors/index.js.map +1 -1
  954. package/build-module/components/colors/utils.js.map +1 -1
  955. package/build-module/components/colors/with-colors.js.map +1 -1
  956. package/build-module/components/colors-gradients/control.js.map +1 -1
  957. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  958. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  959. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  960. package/build-module/components/colors-gradients/use-multiple-origin-colors-and-gradients.js.map +1 -1
  961. package/build-module/components/contrast-checker/index.js.map +1 -1
  962. package/build-module/components/contrast-checker/index.native.js.map +1 -1
  963. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  964. package/build-module/components/convert-to-group-buttons/index.native.js.map +1 -1
  965. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  966. package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  967. package/build-module/components/copy-handler/index.js.map +1 -1
  968. package/build-module/components/date-format-picker/index.js.map +1 -1
  969. package/build-module/components/default-block-appender/index.js.map +1 -1
  970. package/build-module/components/default-block-appender/index.native.js.map +1 -1
  971. package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
  972. package/build-module/components/dimensions-tool/index.js.map +1 -1
  973. package/build-module/components/dimensions-tool/scale-tool.js.map +1 -1
  974. package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
  975. package/build-module/components/duotone/utils.js.map +1 -1
  976. package/build-module/components/duotone-control/index.js.map +1 -1
  977. package/build-module/components/editable-text/index.js.map +1 -1
  978. package/build-module/components/editor-styles/index.js +3 -2
  979. package/build-module/components/editor-styles/index.js.map +1 -1
  980. package/build-module/components/floating-toolbar/index.native.js +9 -5
  981. package/build-module/components/floating-toolbar/index.native.js.map +1 -1
  982. package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
  983. package/build-module/components/font-appearance-control/index.js.map +1 -1
  984. package/build-module/components/font-family/index.js.map +1 -1
  985. package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
  986. package/build-module/components/font-sizes/font-size-picker.js.map +1 -1
  987. package/build-module/components/font-sizes/index.js.map +1 -1
  988. package/build-module/components/font-sizes/index.native.js.map +1 -1
  989. package/build-module/components/font-sizes/utils.js.map +1 -1
  990. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  991. package/build-module/components/global-styles/advanced-panel.js.map +1 -1
  992. package/build-module/components/global-styles/background-panel.js +20 -17
  993. package/build-module/components/global-styles/background-panel.js.map +1 -1
  994. package/build-module/components/global-styles/border-panel.js.map +1 -1
  995. package/build-module/components/global-styles/color-panel.js +3 -1
  996. package/build-module/components/global-styles/color-panel.js.map +1 -1
  997. package/build-module/components/global-styles/color-panel.native.js.map +1 -1
  998. package/build-module/components/global-styles/context.js.map +1 -1
  999. package/build-module/components/global-styles/dimensions-panel.js +17 -1
  1000. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  1001. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  1002. package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
  1003. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
  1004. package/build-module/components/global-styles/hooks.js +3 -2
  1005. package/build-module/components/global-styles/hooks.js.map +1 -1
  1006. package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
  1007. package/build-module/components/global-styles/index.js.map +1 -1
  1008. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  1009. package/build-module/components/global-styles/typography-panel.js +24 -24
  1010. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  1011. package/build-module/components/global-styles/typography-utils.js.map +1 -1
  1012. package/build-module/components/global-styles/use-global-styles-output.js +153 -136
  1013. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  1014. package/build-module/components/global-styles/utils.js +44 -0
  1015. package/build-module/components/global-styles/utils.js.map +1 -1
  1016. package/build-module/components/gradients/index.js.map +1 -1
  1017. package/build-module/components/gradients/index.native.js.map +1 -1
  1018. package/build-module/components/gradients/use-gradient.js.map +1 -1
  1019. package/build-module/components/gradients/with-gradient.js.map +1 -1
  1020. package/build-module/components/grid-visualizer/grid-item-resizer.js.map +1 -1
  1021. package/build-module/components/grid-visualizer/grid-visualizer.js.map +1 -1
  1022. package/build-module/components/grid-visualizer/index.js.map +1 -1
  1023. package/build-module/components/grid-visualizer/utils.js.map +1 -1
  1024. package/build-module/components/height-control/index.js.map +1 -1
  1025. package/build-module/components/iframe/get-compatibility-styles.js.map +1 -1
  1026. package/build-module/components/iframe/index.js +12 -13
  1027. package/build-module/components/iframe/index.js.map +1 -1
  1028. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  1029. package/build-module/components/image-editor/constants.js.map +1 -1
  1030. package/build-module/components/image-editor/context.js.map +1 -1
  1031. package/build-module/components/image-editor/cropper.js +7 -3
  1032. package/build-module/components/image-editor/cropper.js.map +1 -1
  1033. package/build-module/components/image-editor/form-controls.js.map +1 -1
  1034. package/build-module/components/image-editor/index.js +0 -2
  1035. package/build-module/components/image-editor/index.js.map +1 -1
  1036. package/build-module/components/image-editor/rotation-button.js.map +1 -1
  1037. package/build-module/components/image-editor/use-save-image.js.map +1 -1
  1038. package/build-module/components/image-editor/use-transform-image.js.map +1 -1
  1039. package/build-module/components/image-editor/zoom-dropdown.js.map +1 -1
  1040. package/build-module/components/image-link-destinations/index.native.js.map +1 -1
  1041. package/build-module/components/image-size-control/index.js.map +1 -1
  1042. package/build-module/components/image-size-control/use-dimension-handler.js.map +1 -1
  1043. package/build-module/components/index.js.map +1 -1
  1044. package/build-module/components/index.native.js.map +1 -1
  1045. package/build-module/components/inner-blocks/button-block-appender.js.map +1 -1
  1046. package/build-module/components/inner-blocks/constants.native.js.map +1 -1
  1047. package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
  1048. package/build-module/components/inner-blocks/index.js +16 -2
  1049. package/build-module/components/inner-blocks/index.js.map +1 -1
  1050. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  1051. package/build-module/components/inner-blocks/use-block-context.js.map +1 -1
  1052. package/build-module/components/inner-blocks/use-inner-block-template-sync.js.map +1 -1
  1053. package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  1054. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  1055. package/build-module/components/inner-blocks/with-client-id.js.map +1 -1
  1056. package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
  1057. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  1058. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  1059. package/build-module/components/inserter/block-patterns-tab/index.js +20 -26
  1060. package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
  1061. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +2 -24
  1062. package/build-module/components/inserter/block-patterns-tab/pattern-category-preview-panel.js.map +1 -1
  1063. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -4
  1064. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  1065. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  1066. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  1067. package/build-module/components/inserter/block-patterns-tab/utils.js.map +1 -1
  1068. package/build-module/components/inserter/block-types-tab.js +4 -0
  1069. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  1070. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  1071. package/build-module/components/inserter/category-tabs/index.js +49 -0
  1072. package/build-module/components/inserter/category-tabs/index.js.map +1 -0
  1073. package/build-module/components/inserter/hooks/use-block-type-impressions.native.js.map +1 -1
  1074. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  1075. package/build-module/components/inserter/hooks/use-clipboard-block.native.js.map +1 -1
  1076. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  1077. package/build-module/components/inserter/hooks/use-patterns-paging.js.map +1 -1
  1078. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  1079. package/build-module/components/inserter/index.js.map +1 -1
  1080. package/build-module/components/inserter/index.native.js.map +1 -1
  1081. package/build-module/components/inserter/library.js.map +1 -1
  1082. package/build-module/components/inserter/media-tab/hooks.js.map +1 -1
  1083. package/build-module/components/inserter/media-tab/index.js +1 -1
  1084. package/build-module/components/inserter/media-tab/index.js.map +1 -1
  1085. package/build-module/components/inserter/media-tab/media-list.js.map +1 -1
  1086. package/build-module/components/inserter/media-tab/media-panel.js +0 -24
  1087. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  1088. package/build-module/components/inserter/media-tab/media-preview.js +13 -3
  1089. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  1090. package/build-module/components/inserter/media-tab/media-tab.js +17 -31
  1091. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  1092. package/build-module/components/inserter/media-tab/utils.js.map +1 -1
  1093. package/build-module/components/inserter/menu.js +75 -79
  1094. package/build-module/components/inserter/menu.js.map +1 -1
  1095. package/build-module/components/inserter/menu.native.js.map +1 -1
  1096. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  1097. package/build-module/components/inserter/no-results.js.map +1 -1
  1098. package/build-module/components/inserter/no-results.native.js.map +1 -1
  1099. package/build-module/components/inserter/panel.js.map +1 -1
  1100. package/build-module/components/inserter/preview-panel.js.map +1 -1
  1101. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  1102. package/build-module/components/inserter/reusable-block-rename-hint.js.map +1 -1
  1103. package/build-module/components/inserter/reusable-blocks-tab.native.js.map +1 -1
  1104. package/build-module/components/inserter/search-items.js.map +1 -1
  1105. package/build-module/components/inserter/search-results.js.map +1 -1
  1106. package/build-module/components/inserter/search-results.native.js.map +1 -1
  1107. package/build-module/components/inserter/tabs.js +13 -9
  1108. package/build-module/components/inserter/tabs.js.map +1 -1
  1109. package/build-module/components/inserter/tabs.native.js.map +1 -1
  1110. package/build-module/components/inserter/tips.js.map +1 -1
  1111. package/build-module/components/inserter/utils.native.js.map +1 -1
  1112. package/build-module/components/inserter-button/index.native.js.map +1 -1
  1113. package/build-module/components/inserter-button/sparkles.js.map +1 -1
  1114. package/build-module/components/inserter-draggable-blocks/index.js.map +1 -1
  1115. package/build-module/components/inserter-list-item/index.js.map +1 -1
  1116. package/build-module/components/inserter-listbox/context.js.map +1 -1
  1117. package/build-module/components/inserter-listbox/group.js.map +1 -1
  1118. package/build-module/components/inserter-listbox/index.js.map +1 -1
  1119. package/build-module/components/inserter-listbox/item.js.map +1 -1
  1120. package/build-module/components/inserter-listbox/row.js.map +1 -1
  1121. package/build-module/components/inserter-menu-extension/index.js.map +1 -1
  1122. package/build-module/components/inspector-controls/block-support-slot-container.js.map +1 -1
  1123. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  1124. package/build-module/components/inspector-controls/fill.js.map +1 -1
  1125. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  1126. package/build-module/components/inspector-controls/groups.js.map +1 -1
  1127. package/build-module/components/inspector-controls/index.js.map +1 -1
  1128. package/build-module/components/inspector-controls/slot.js.map +1 -1
  1129. package/build-module/components/inspector-controls/slot.native.js.map +1 -1
  1130. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.js.map +1 -1
  1131. package/build-module/components/inspector-controls-tabs/advanced-controls-panel.native.js.map +1 -1
  1132. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  1133. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  1134. package/build-module/components/inspector-controls-tabs/settings-tab-hint.js.map +1 -1
  1135. package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  1136. package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -1
  1137. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  1138. package/build-module/components/inspector-controls-tabs/use-inspector-controls-tabs.js.map +1 -1
  1139. package/build-module/components/inspector-controls-tabs/use-is-list-view-tab-disabled.js.map +1 -1
  1140. package/build-module/components/inspector-controls-tabs/utils.js.map +1 -1
  1141. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  1142. package/build-module/components/justify-content-control/index.js.map +1 -1
  1143. package/build-module/components/justify-content-control/ui.js.map +1 -1
  1144. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  1145. package/build-module/components/letter-spacing-control/index.js.map +1 -1
  1146. package/build-module/components/line-height-control/index.js +6 -2
  1147. package/build-module/components/line-height-control/index.js.map +1 -1
  1148. package/build-module/components/line-height-control/index.native.js.map +1 -1
  1149. package/build-module/components/line-height-control/utils.js.map +1 -1
  1150. package/build-module/components/link-control/constants.js.map +1 -1
  1151. package/build-module/components/link-control/index.js.map +1 -1
  1152. package/build-module/components/link-control/is-url-like.js.map +1 -1
  1153. package/build-module/components/link-control/link-preview.js.map +1 -1
  1154. package/build-module/components/link-control/search-create-button.js.map +1 -1
  1155. package/build-module/components/link-control/search-input.js.map +1 -1
  1156. package/build-module/components/link-control/search-item.js +9 -3
  1157. package/build-module/components/link-control/search-item.js.map +1 -1
  1158. package/build-module/components/link-control/search-results.js.map +1 -1
  1159. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  1160. package/build-module/components/link-control/settings.js.map +1 -1
  1161. package/build-module/components/link-control/use-create-page.js.map +1 -1
  1162. package/build-module/components/link-control/use-internal-value.js.map +1 -1
  1163. package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
  1164. package/build-module/components/link-control/use-search-handler.js.map +1 -1
  1165. package/build-module/components/link-control/viewer-slot.js.map +1 -1
  1166. package/build-module/components/list-view/appender.js.map +1 -1
  1167. package/build-module/components/list-view/aria-referenced-text.js.map +1 -1
  1168. package/build-module/components/list-view/block-contents.js.map +1 -1
  1169. package/build-module/components/list-view/block-select-button.js +7 -144
  1170. package/build-module/components/list-view/block-select-button.js.map +1 -1
  1171. package/build-module/components/list-view/block.js +167 -15
  1172. package/build-module/components/list-view/block.js.map +1 -1
  1173. package/build-module/components/list-view/branch.js.map +1 -1
  1174. package/build-module/components/list-view/context.js.map +1 -1
  1175. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  1176. package/build-module/components/list-view/expander.js.map +1 -1
  1177. package/build-module/components/list-view/index.js +1 -1
  1178. package/build-module/components/list-view/index.js.map +1 -1
  1179. package/build-module/components/list-view/leaf.js.map +1 -1
  1180. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  1181. package/build-module/components/list-view/use-clipboard-handler.js.map +1 -1
  1182. package/build-module/components/list-view/use-list-view-block-indexes.js.map +1 -1
  1183. package/build-module/components/list-view/use-list-view-client-ids.js.map +1 -1
  1184. package/build-module/components/list-view/use-list-view-collapse-items.js.map +1 -1
  1185. package/build-module/components/list-view/use-list-view-drop-zone.js +6 -1
  1186. package/build-module/components/list-view/use-list-view-drop-zone.js.map +1 -1
  1187. package/build-module/components/list-view/use-list-view-expand-selected-item.js.map +1 -1
  1188. package/build-module/components/list-view/use-list-view-images.js.map +1 -1
  1189. package/build-module/components/list-view/use-list-view-scroll-into-view.js.map +1 -1
  1190. package/build-module/components/list-view/utils.js +3 -1
  1191. package/build-module/components/list-view/utils.js.map +1 -1
  1192. package/build-module/components/media-placeholder/index.js +3 -3
  1193. package/build-module/components/media-placeholder/index.js.map +1 -1
  1194. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  1195. package/build-module/components/media-replace-flow/index.js.map +1 -1
  1196. package/build-module/components/media-replace-flow/index.native.js.map +1 -1
  1197. package/build-module/components/media-upload/check.js.map +1 -1
  1198. package/build-module/components/media-upload/constants.native.js.map +1 -1
  1199. package/build-module/components/media-upload/index.js.map +1 -1
  1200. package/build-module/components/media-upload/index.native.js.map +1 -1
  1201. package/build-module/components/media-upload-progress/constants.js.map +1 -1
  1202. package/build-module/components/media-upload-progress/index.native.js.map +1 -1
  1203. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  1204. package/build-module/components/navigable-toolbar/index.js +3 -1
  1205. package/build-module/components/navigable-toolbar/index.js.map +1 -1
  1206. package/build-module/components/observe-typing/index.js.map +1 -1
  1207. package/build-module/components/panel-color-settings/index.js.map +1 -1
  1208. package/build-module/components/plain-text/index.js.map +1 -1
  1209. package/build-module/components/plain-text/index.native.js.map +1 -1
  1210. package/build-module/components/preview-options/index.js.map +1 -1
  1211. package/build-module/components/provider/block-refs-provider.js +3 -4
  1212. package/build-module/components/provider/block-refs-provider.js.map +1 -1
  1213. package/build-module/components/provider/index.js.map +1 -1
  1214. package/build-module/components/provider/index.native.js.map +1 -1
  1215. package/build-module/components/provider/use-block-sync.js +4 -13
  1216. package/build-module/components/provider/use-block-sync.js.map +1 -1
  1217. package/build-module/components/provider/with-registry-provider.js.map +1 -1
  1218. package/build-module/components/publish-date-time-picker/index.js.map +1 -1
  1219. package/build-module/components/recursion-provider/index.js +2 -2
  1220. package/build-module/components/recursion-provider/index.js.map +1 -1
  1221. package/build-module/components/resizable-box-popover/index.js.map +1 -1
  1222. package/build-module/components/resolution-tool/index.js.map +1 -1
  1223. package/build-module/components/responsive-block-control/index.js.map +1 -1
  1224. package/build-module/components/responsive-block-control/label.js.map +1 -1
  1225. package/build-module/components/rich-text/content.js +25 -19
  1226. package/build-module/components/rich-text/content.js.map +1 -1
  1227. package/build-module/components/rich-text/embed-handler-picker.native.js.map +1 -1
  1228. package/build-module/components/rich-text/event-listeners/before-input-rules.js +86 -0
  1229. package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -0
  1230. package/build-module/components/rich-text/event-listeners/delete.js +51 -0
  1231. package/build-module/components/rich-text/event-listeners/delete.js.map +1 -0
  1232. package/build-module/components/rich-text/event-listeners/enter.js +92 -0
  1233. package/build-module/components/rich-text/event-listeners/enter.js.map +1 -0
  1234. package/build-module/components/rich-text/event-listeners/firefox-compat.js +29 -0
  1235. package/build-module/components/rich-text/event-listeners/firefox-compat.js.map +1 -0
  1236. package/build-module/components/rich-text/event-listeners/index.js +36 -0
  1237. package/build-module/components/rich-text/event-listeners/index.js.map +1 -0
  1238. package/build-module/components/rich-text/event-listeners/input-events.js +15 -0
  1239. package/build-module/components/rich-text/event-listeners/input-events.js.map +1 -0
  1240. package/build-module/components/rich-text/event-listeners/input-rules.js +127 -0
  1241. package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -0
  1242. package/build-module/components/rich-text/event-listeners/insert-replacement-text.js +27 -0
  1243. package/build-module/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -0
  1244. package/build-module/components/rich-text/event-listeners/paste-handler.js +142 -0
  1245. package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -0
  1246. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js +21 -0
  1247. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -0
  1248. package/build-module/components/rich-text/event-listeners/shortcuts.js +15 -0
  1249. package/build-module/components/rich-text/event-listeners/shortcuts.js.map +1 -0
  1250. package/build-module/components/rich-text/event-listeners/undo-automatic-change.js +45 -0
  1251. package/build-module/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -0
  1252. package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
  1253. package/build-module/components/rich-text/format-edit.js.map +1 -1
  1254. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  1255. package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
  1256. package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
  1257. package/build-module/components/rich-text/format-toolbar-container.native.js.map +1 -1
  1258. package/build-module/components/rich-text/get-rich-text-values.js.map +1 -1
  1259. package/build-module/components/rich-text/index.js +54 -34
  1260. package/build-module/components/rich-text/index.js.map +1 -1
  1261. package/build-module/components/rich-text/index.native.js +16 -4
  1262. package/build-module/components/rich-text/index.native.js.map +1 -1
  1263. package/build-module/components/rich-text/input-event.js.map +1 -1
  1264. package/build-module/components/rich-text/input-event.native.js.map +1 -1
  1265. package/build-module/components/rich-text/multiline.js +6 -2
  1266. package/build-module/components/rich-text/multiline.js.map +1 -1
  1267. package/build-module/components/rich-text/native/format-edit.js.map +1 -1
  1268. package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
  1269. package/build-module/components/rich-text/native/index.js.map +1 -1
  1270. package/build-module/components/rich-text/native/index.native.js +12 -0
  1271. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  1272. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  1273. package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
  1274. package/build-module/components/rich-text/prevent-event-discovery.js.map +1 -1
  1275. package/build-module/components/rich-text/remove-browser-shortcuts.native.js.map +1 -1
  1276. package/build-module/components/rich-text/shortcut.js.map +1 -1
  1277. package/build-module/components/rich-text/shortcut.native.js.map +1 -1
  1278. package/build-module/components/rich-text/split-value.js.map +1 -1
  1279. package/build-module/components/rich-text/toolbar-button.js.map +1 -1
  1280. package/build-module/components/rich-text/use-format-types.js +8 -4
  1281. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  1282. package/build-module/components/rich-text/use-mark-persistent.js.map +1 -1
  1283. package/build-module/components/rich-text/utils.js.map +1 -1
  1284. package/build-module/components/rich-text/with-deprecations.js.map +1 -1
  1285. package/build-module/components/segmented-text-control/index.js +55 -0
  1286. package/build-module/components/segmented-text-control/index.js.map +1 -0
  1287. package/build-module/components/selection-scroll-into-view/index.js.map +1 -1
  1288. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  1289. package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.js.map +1 -1
  1290. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  1291. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  1292. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  1293. package/build-module/components/spacing-sizes-control/input-controls/single.js.map +1 -1
  1294. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -2
  1295. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  1296. package/build-module/components/spacing-sizes-control/sides-dropdown/index.js.map +1 -1
  1297. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  1298. package/build-module/components/text-alignment-control/index.js +68 -0
  1299. package/build-module/components/text-alignment-control/index.js.map +1 -0
  1300. package/build-module/components/text-decoration-control/index.js +21 -25
  1301. package/build-module/components/text-decoration-control/index.js.map +1 -1
  1302. package/build-module/components/text-transform-control/index.js +18 -22
  1303. package/build-module/components/text-transform-control/index.js.map +1 -1
  1304. package/build-module/components/tool-selector/index.js.map +1 -1
  1305. package/build-module/components/typewriter/index.js.map +1 -1
  1306. package/build-module/components/ungroup-button/index.native.js.map +1 -1
  1307. package/build-module/components/unit-control/index.js.map +1 -1
  1308. package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
  1309. package/build-module/components/url-input/button.js.map +1 -1
  1310. package/build-module/components/url-input/index.js.map +1 -1
  1311. package/build-module/components/url-input/index.native.js.map +1 -1
  1312. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  1313. package/build-module/components/url-popover/index.js.map +1 -1
  1314. package/build-module/components/url-popover/link-editor.js.map +1 -1
  1315. package/build-module/components/url-popover/link-viewer-url.js.map +1 -1
  1316. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  1317. package/build-module/components/use-block-commands/index.js +20 -2
  1318. package/build-module/components/use-block-commands/index.js.map +1 -1
  1319. package/build-module/components/use-block-display-information/index.js +9 -3
  1320. package/build-module/components/use-block-display-information/index.js.map +1 -1
  1321. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  1322. package/build-module/components/use-block-drop-zone/index.native.js.map +1 -1
  1323. package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
  1324. package/build-module/components/use-moving-animation/index.js.map +1 -1
  1325. package/build-module/components/use-on-block-drop/index.js +3 -1
  1326. package/build-module/components/use-on-block-drop/index.js.map +1 -1
  1327. package/build-module/components/use-on-block-drop/index.native.js.map +1 -1
  1328. package/build-module/components/use-on-block-drop/types.js.map +1 -1
  1329. package/build-module/components/use-paste-styles/index.js +2 -1
  1330. package/build-module/components/use-paste-styles/index.js.map +1 -1
  1331. package/build-module/components/use-resize-canvas/index.js.map +1 -1
  1332. package/build-module/components/use-settings/index.js.map +1 -1
  1333. package/build-module/components/use-unsupported-block-editor/index.native.js.map +1 -1
  1334. package/build-module/components/video-player/gridicon-play.native.js.map +1 -1
  1335. package/build-module/components/video-player/index.native.js.map +1 -1
  1336. package/build-module/components/warning/index.js.map +1 -1
  1337. package/build-module/components/warning/index.native.js.map +1 -1
  1338. package/build-module/components/writing-flow/index.js.map +1 -1
  1339. package/build-module/components/writing-flow/use-arrow-nav.js.map +1 -1
  1340. package/build-module/components/writing-flow/use-click-selection.js.map +1 -1
  1341. package/build-module/components/writing-flow/use-clipboard-handler.js.map +1 -1
  1342. package/build-module/components/writing-flow/use-drag-selection.js +3 -1
  1343. package/build-module/components/writing-flow/use-drag-selection.js.map +1 -1
  1344. package/build-module/components/writing-flow/use-input.js.map +1 -1
  1345. package/build-module/components/writing-flow/use-multi-selection.js.map +1 -1
  1346. package/build-module/components/writing-flow/use-select-all.js.map +1 -1
  1347. package/build-module/components/writing-flow/use-selection-observer.js.map +1 -1
  1348. package/build-module/components/writing-flow/use-tab-nav.js +3 -1
  1349. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  1350. package/build-module/components/writing-flow/utils.js.map +1 -1
  1351. package/build-module/components/writing-mode-control/index.js +16 -20
  1352. package/build-module/components/writing-mode-control/index.js.map +1 -1
  1353. package/build-module/elements/index.js.map +1 -1
  1354. package/build-module/hooks/align.js.map +1 -1
  1355. package/build-module/hooks/align.native.js.map +1 -1
  1356. package/build-module/hooks/anchor.js.map +1 -1
  1357. package/build-module/hooks/aria-label.js.map +1 -1
  1358. package/build-module/hooks/background.js +2 -2
  1359. package/build-module/hooks/background.js.map +1 -1
  1360. package/build-module/hooks/block-hooks.js.map +1 -1
  1361. package/build-module/hooks/block-renaming.js +0 -36
  1362. package/build-module/hooks/block-renaming.js.map +1 -1
  1363. package/build-module/hooks/border.js.map +1 -1
  1364. package/build-module/hooks/color.js.map +1 -1
  1365. package/build-module/hooks/compat.js.map +1 -1
  1366. package/build-module/hooks/content-lock-ui.js +5 -5
  1367. package/build-module/hooks/content-lock-ui.js.map +1 -1
  1368. package/build-module/hooks/contrast-checker.js.map +1 -1
  1369. package/build-module/hooks/custom-class-name.js.map +1 -1
  1370. package/build-module/hooks/custom-class-name.native.js.map +1 -1
  1371. package/build-module/hooks/dimensions.js.map +1 -1
  1372. package/build-module/hooks/duotone.js +3 -1
  1373. package/build-module/hooks/duotone.js.map +1 -1
  1374. package/build-module/hooks/font-family.js.map +1 -1
  1375. package/build-module/hooks/font-size.js.map +1 -1
  1376. package/build-module/hooks/gap.js.map +1 -1
  1377. package/build-module/hooks/generated-class-name.js.map +1 -1
  1378. package/build-module/hooks/index.js +5 -4
  1379. package/build-module/hooks/index.js.map +1 -1
  1380. package/build-module/hooks/index.native.js.map +1 -1
  1381. package/build-module/hooks/layout-child.js.map +1 -1
  1382. package/build-module/hooks/layout.js +38 -19
  1383. package/build-module/hooks/layout.js.map +1 -1
  1384. package/build-module/hooks/layout.native.js.map +1 -1
  1385. package/build-module/hooks/line-height.js.map +1 -1
  1386. package/build-module/hooks/lock.js.map +1 -1
  1387. package/build-module/hooks/metadata.js.map +1 -1
  1388. package/build-module/hooks/position.js.map +1 -1
  1389. package/build-module/hooks/settings.js.map +1 -1
  1390. package/build-module/hooks/spacing-visualizer.js.map +1 -1
  1391. package/build-module/hooks/style.js.map +1 -1
  1392. package/build-module/hooks/supports.js +22 -1
  1393. package/build-module/hooks/supports.js.map +1 -1
  1394. package/build-module/hooks/text-align.js +145 -0
  1395. package/build-module/hooks/text-align.js.map +1 -0
  1396. package/build-module/hooks/typography.js +2 -1
  1397. package/build-module/hooks/typography.js.map +1 -1
  1398. package/build-module/hooks/typography.native.js.map +1 -1
  1399. package/build-module/hooks/use-bindings-attributes.js +68 -132
  1400. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  1401. package/build-module/hooks/use-border-props.js.map +1 -1
  1402. package/build-module/hooks/use-cached-truthy.js.map +1 -1
  1403. package/build-module/hooks/use-color-props.js.map +1 -1
  1404. package/build-module/hooks/use-editor-wrapper-styles.native.js.map +1 -1
  1405. package/build-module/hooks/use-shadow-props.js.map +1 -1
  1406. package/build-module/hooks/use-spacing-props.js.map +1 -1
  1407. package/build-module/hooks/use-typography-props.js +2 -1
  1408. package/build-module/hooks/use-typography-props.js.map +1 -1
  1409. package/build-module/hooks/use-zoom-out.js +23 -16
  1410. package/build-module/hooks/use-zoom-out.js.map +1 -1
  1411. package/build-module/hooks/utils.js +38 -9
  1412. package/build-module/hooks/utils.js.map +1 -1
  1413. package/build-module/index.js.map +1 -1
  1414. package/build-module/index.native.js.map +1 -1
  1415. package/build-module/layouts/constrained.js.map +1 -1
  1416. package/build-module/layouts/definitions.js +8 -6
  1417. package/build-module/layouts/definitions.js.map +1 -1
  1418. package/build-module/layouts/flex.js.map +1 -1
  1419. package/build-module/layouts/flow.js.map +1 -1
  1420. package/build-module/layouts/grid.js +52 -9
  1421. package/build-module/layouts/grid.js.map +1 -1
  1422. package/build-module/layouts/index.js.map +1 -1
  1423. package/build-module/layouts/utils.js.map +1 -1
  1424. package/build-module/lock-unlock.js.map +1 -1
  1425. package/build-module/private-apis.js +4 -2
  1426. package/build-module/private-apis.js.map +1 -1
  1427. package/build-module/private-apis.native.js.map +1 -1
  1428. package/build-module/store/actions.js +47 -9
  1429. package/build-module/store/actions.js.map +1 -1
  1430. package/build-module/store/array.js.map +1 -1
  1431. package/build-module/store/constants.js.map +1 -1
  1432. package/build-module/store/defaults.js.map +1 -1
  1433. package/build-module/store/defaults.native.js.map +1 -1
  1434. package/build-module/store/get-block-settings.js.map +1 -1
  1435. package/build-module/store/index.js.map +1 -1
  1436. package/build-module/store/private-actions.js +5 -2
  1437. package/build-module/store/private-actions.js.map +1 -1
  1438. package/build-module/store/private-keys.js.map +1 -1
  1439. package/build-module/store/private-selectors.js +113 -37
  1440. package/build-module/store/private-selectors.js.map +1 -1
  1441. package/build-module/store/reducer.js +11 -8
  1442. package/build-module/store/reducer.js.map +1 -1
  1443. package/build-module/store/selectors.js +116 -62
  1444. package/build-module/store/selectors.js.map +1 -1
  1445. package/build-module/store/undo-ignore.js.map +1 -1
  1446. package/build-module/store/utils.js.map +1 -1
  1447. package/build-module/utils/dom.js.map +1 -1
  1448. package/build-module/utils/get-px-from-css-unit.js.map +1 -1
  1449. package/build-module/utils/index.js.map +1 -1
  1450. package/build-module/utils/math.js.map +1 -1
  1451. package/build-module/utils/object.js +16 -0
  1452. package/build-module/utils/object.js.map +1 -1
  1453. package/build-module/utils/order-inserter-block-items.js +6 -2
  1454. package/build-module/utils/order-inserter-block-items.js.map +1 -1
  1455. package/build-module/utils/pasting.js +6 -2
  1456. package/build-module/utils/pasting.js.map +1 -1
  1457. package/build-module/utils/selection.js.map +1 -1
  1458. package/build-module/utils/sorting.js.map +1 -1
  1459. package/build-module/utils/transform-styles/index.js.map +1 -1
  1460. package/build-module/utils/use-notify-copy.js.map +1 -1
  1461. package/build-style/content-rtl.css +77 -86
  1462. package/build-style/content.css +77 -86
  1463. package/build-style/default-editor-styles-rtl.css +1 -1
  1464. package/build-style/default-editor-styles.css +1 -1
  1465. package/build-style/style-rtl.css +158 -242
  1466. package/build-style/style.css +158 -242
  1467. package/package.json +32 -33
  1468. package/src/components/alignment-control/ui.js +3 -1
  1469. package/src/components/block-bindings-toolbar-indicator/style.scss +2 -5
  1470. package/src/components/block-canvas/style.scss +1 -3
  1471. package/src/components/block-draggable/test/helpers.native.js +8 -8
  1472. package/src/components/block-edit/context.js +1 -0
  1473. package/src/components/block-edit/index.js +4 -0
  1474. package/src/components/block-inspector/index.js +7 -6
  1475. package/src/components/block-list/block.js +47 -35
  1476. package/src/components/block-list/block.native.js +3 -2
  1477. package/src/components/block-list/content.scss +46 -20
  1478. package/src/components/block-list/index.js +26 -10
  1479. package/src/components/block-list/index.native.js +1 -6
  1480. package/src/components/block-list/use-block-props/index.js +17 -5
  1481. package/src/components/block-list/use-block-props/use-block-refs.js +17 -57
  1482. package/src/components/block-list/use-block-props/use-focus-first-element.js +7 -3
  1483. package/src/components/block-list/use-block-props/use-is-hovered.js +11 -16
  1484. package/src/components/block-mover/index.native.js +3 -1
  1485. package/src/components/block-patterns-list/style.scss +1 -3
  1486. package/src/components/block-patterns-paging/index.js +4 -0
  1487. package/src/components/block-preview/style.scss +13 -15
  1488. package/src/components/block-rename/modal.js +17 -13
  1489. package/src/components/block-rename/rename-control.js +8 -1
  1490. package/src/components/block-settings-menu/block-settings-dropdown.js +1 -51
  1491. package/src/components/block-switcher/pattern-transformations-menu.js +3 -1
  1492. package/src/components/block-switcher/use-transformed-patterns.js +6 -2
  1493. package/src/components/block-switcher/utils.js +14 -5
  1494. package/src/components/block-toolbar/index.js +26 -22
  1495. package/src/components/block-toolbar/style.scss +8 -11
  1496. package/src/components/block-toolbar/use-has-block-toolbar.js +26 -19
  1497. package/src/components/block-tools/block-selection-button.js +55 -43
  1498. package/src/components/block-tools/index.js +3 -1
  1499. package/src/components/block-tools/use-show-block-tools.js +36 -51
  1500. package/src/components/block-tools/zoom-out-mode-inserters.js +5 -1
  1501. package/src/components/block-variation-picker/content.scss +22 -72
  1502. package/src/components/block-variation-picker/index.js +3 -2
  1503. package/src/components/block-variation-transforms/index.js +6 -2
  1504. package/src/components/button-block-appender/index.native.js +16 -1
  1505. package/src/components/default-block-appender/content.scss +1 -1
  1506. package/src/components/editor-styles/index.js +4 -2
  1507. package/src/components/floating-toolbar/index.native.js +5 -2
  1508. package/src/components/global-styles/background-panel.js +31 -29
  1509. package/src/components/global-styles/color-panel.js +3 -1
  1510. package/src/components/global-styles/dimensions-panel.js +18 -1
  1511. package/src/components/global-styles/hooks.js +2 -0
  1512. package/src/components/global-styles/style.scss +2 -8
  1513. package/src/components/global-styles/test/use-global-styles-output.js +8 -17
  1514. package/src/components/global-styles/test/utils.js +21 -0
  1515. package/src/components/global-styles/typography-panel.js +27 -23
  1516. package/src/components/global-styles/use-global-styles-output.js +216 -192
  1517. package/src/components/global-styles/utils.js +55 -0
  1518. package/src/components/iframe/index.js +20 -27
  1519. package/src/components/image-editor/cropper.js +11 -2
  1520. package/src/components/image-editor/index.js +0 -2
  1521. package/src/components/inner-blocks/index.js +14 -1
  1522. package/src/components/inserter/block-patterns-tab/index.js +32 -68
  1523. package/src/components/inserter/block-patterns-tab/pattern-category-preview-panel.js +9 -36
  1524. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +2 -2
  1525. package/src/components/inserter/block-types-tab.js +5 -0
  1526. package/src/components/inserter/category-tabs/index.js +74 -0
  1527. package/src/components/inserter/media-tab/index.js +1 -1
  1528. package/src/components/inserter/media-tab/media-panel.js +0 -22
  1529. package/src/components/inserter/media-tab/media-preview.js +15 -7
  1530. package/src/components/inserter/media-tab/media-tab.js +44 -83
  1531. package/src/components/inserter/menu.js +155 -122
  1532. package/src/components/inserter/style.scss +161 -217
  1533. package/src/components/inserter/tabs.js +12 -15
  1534. package/src/components/inspector-controls-tabs/styles-tab.js +1 -1
  1535. package/src/components/line-height-control/index.js +6 -2
  1536. package/src/components/link-control/search-item.js +9 -3
  1537. package/src/components/link-control/style.scss +10 -2
  1538. package/src/components/link-control/test/index.js +1 -1
  1539. package/src/components/list-view/block-select-button.js +73 -237
  1540. package/src/components/list-view/block.js +218 -28
  1541. package/src/components/list-view/index.js +1 -1
  1542. package/src/components/list-view/style.scss +20 -28
  1543. package/src/components/list-view/use-list-view-drop-zone.js +6 -1
  1544. package/src/components/list-view/utils.js +3 -1
  1545. package/src/components/media-placeholder/content.scss +0 -11
  1546. package/src/components/media-placeholder/index.js +3 -3
  1547. package/src/components/navigable-toolbar/index.js +3 -1
  1548. package/src/components/provider/block-refs-provider.js +3 -8
  1549. package/src/components/provider/test/use-block-sync.js +7 -0
  1550. package/src/components/provider/use-block-sync.js +3 -20
  1551. package/src/components/recursion-provider/index.js +2 -2
  1552. package/src/components/rich-text/README.md +4 -0
  1553. package/src/components/rich-text/content.js +26 -19
  1554. package/src/components/rich-text/event-listeners/before-input-rules.js +92 -0
  1555. package/src/components/rich-text/event-listeners/delete.js +53 -0
  1556. package/src/components/rich-text/event-listeners/enter.js +104 -0
  1557. package/src/components/rich-text/event-listeners/firefox-compat.js +31 -0
  1558. package/src/components/rich-text/event-listeners/index.js +56 -0
  1559. package/src/components/rich-text/event-listeners/input-events.js +13 -0
  1560. package/src/components/rich-text/event-listeners/input-rules.js +146 -0
  1561. package/src/components/rich-text/event-listeners/insert-replacement-text.js +28 -0
  1562. package/src/components/rich-text/event-listeners/paste-handler.js +169 -0
  1563. package/src/components/rich-text/event-listeners/remove-browser-shortcuts.js +24 -0
  1564. package/src/components/rich-text/event-listeners/shortcuts.js +13 -0
  1565. package/src/components/rich-text/event-listeners/undo-automatic-change.js +45 -0
  1566. package/src/components/rich-text/index.js +53 -36
  1567. package/src/components/rich-text/index.native.js +14 -1
  1568. package/src/components/rich-text/multiline.js +6 -2
  1569. package/src/components/rich-text/native/index.native.js +11 -0
  1570. package/src/components/rich-text/use-format-types.js +6 -2
  1571. package/src/components/segmented-text-control/index.js +63 -0
  1572. package/src/components/{writing-mode-control → segmented-text-control}/style.scss +2 -5
  1573. package/src/components/spacing-sizes-control/input-controls/spacing-input-control.js +16 -1
  1574. package/src/components/text-alignment-control/index.js +91 -0
  1575. package/src/components/text-alignment-control/stories/index.story.js +39 -0
  1576. package/src/components/text-decoration-control/index.js +20 -33
  1577. package/src/components/text-transform-control/index.js +17 -30
  1578. package/src/components/use-block-commands/index.js +46 -28
  1579. package/src/components/use-block-display-information/index.js +9 -3
  1580. package/src/components/use-on-block-drop/index.js +3 -1
  1581. package/src/components/use-paste-styles/index.js +2 -0
  1582. package/src/components/writing-flow/use-drag-selection.js +3 -1
  1583. package/src/components/writing-flow/use-tab-nav.js +3 -1
  1584. package/src/components/writing-mode-control/index.js +15 -28
  1585. package/src/hooks/background.js +2 -2
  1586. package/src/hooks/block-renaming.js +0 -33
  1587. package/src/hooks/content-lock-ui.js +5 -7
  1588. package/src/hooks/duotone.js +3 -1
  1589. package/src/hooks/index.js +5 -2
  1590. package/src/hooks/layout.js +57 -25
  1591. package/src/hooks/supports.js +24 -0
  1592. package/src/hooks/test/text-align.js +114 -0
  1593. package/src/hooks/test/use-typography-props.js +3 -1
  1594. package/src/hooks/text-align.js +178 -0
  1595. package/src/hooks/typography.js +2 -0
  1596. package/src/hooks/use-bindings-attributes.js +90 -161
  1597. package/src/hooks/use-typography-props.js +4 -1
  1598. package/src/hooks/use-zoom-out.js +25 -15
  1599. package/src/hooks/utils.js +57 -5
  1600. package/src/layouts/definitions.js +6 -6
  1601. package/src/layouts/grid.js +106 -47
  1602. package/src/private-apis.js +4 -2
  1603. package/src/store/actions.js +52 -12
  1604. package/src/store/private-actions.js +6 -3
  1605. package/src/store/private-selectors.js +155 -39
  1606. package/src/store/reducer.js +13 -23
  1607. package/src/store/selectors.js +162 -93
  1608. package/src/style.scss +1 -2
  1609. package/src/utils/object.js +16 -0
  1610. package/src/utils/order-inserter-block-items.js +6 -2
  1611. package/src/utils/pasting.js +6 -2
  1612. package/tsconfig.tsbuildinfo +1 -1
  1613. package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -54
  1614. package/build/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +0 -1
  1615. package/build/components/rich-text/use-before-input-rules.js +0 -98
  1616. package/build/components/rich-text/use-before-input-rules.js.map +0 -1
  1617. package/build/components/rich-text/use-delete.js +0 -64
  1618. package/build/components/rich-text/use-delete.js.map +0 -1
  1619. package/build/components/rich-text/use-enter.js +0 -109
  1620. package/build/components/rich-text/use-enter.js.map +0 -1
  1621. package/build/components/rich-text/use-firefox-compat.js +0 -44
  1622. package/build/components/rich-text/use-firefox-compat.js.map +0 -1
  1623. package/build/components/rich-text/use-input-events.js +0 -25
  1624. package/build/components/rich-text/use-input-events.js.map +0 -1
  1625. package/build/components/rich-text/use-input-rules.js +0 -139
  1626. package/build/components/rich-text/use-input-rules.js.map +0 -1
  1627. package/build/components/rich-text/use-insert-replacement-text.js +0 -38
  1628. package/build/components/rich-text/use-insert-replacement-text.js.map +0 -1
  1629. package/build/components/rich-text/use-paste-handler.js +0 -158
  1630. package/build/components/rich-text/use-paste-handler.js.map +0 -1
  1631. package/build/components/rich-text/use-remove-browser-shortcuts.js +0 -32
  1632. package/build/components/rich-text/use-remove-browser-shortcuts.js.map +0 -1
  1633. package/build/components/rich-text/use-shortcuts.js +0 -25
  1634. package/build/components/rich-text/use-shortcuts.js.map +0 -1
  1635. package/build/components/rich-text/use-undo-automatic-change.js +0 -53
  1636. package/build/components/rich-text/use-undo-automatic-change.js.map +0 -1
  1637. package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -47
  1638. package/build-module/components/block-list/use-block-props/use-block-moving-mode-class-names.js.map +0 -1
  1639. package/build-module/components/rich-text/use-before-input-rules.js +0 -92
  1640. package/build-module/components/rich-text/use-before-input-rules.js.map +0 -1
  1641. package/build-module/components/rich-text/use-delete.js +0 -57
  1642. package/build-module/components/rich-text/use-delete.js.map +0 -1
  1643. package/build-module/components/rich-text/use-enter.js +0 -102
  1644. package/build-module/components/rich-text/use-enter.js.map +0 -1
  1645. package/build-module/components/rich-text/use-firefox-compat.js +0 -37
  1646. package/build-module/components/rich-text/use-firefox-compat.js.map +0 -1
  1647. package/build-module/components/rich-text/use-input-events.js +0 -18
  1648. package/build-module/components/rich-text/use-input-events.js.map +0 -1
  1649. package/build-module/components/rich-text/use-input-rules.js +0 -132
  1650. package/build-module/components/rich-text/use-input-rules.js.map +0 -1
  1651. package/build-module/components/rich-text/use-insert-replacement-text.js +0 -32
  1652. package/build-module/components/rich-text/use-insert-replacement-text.js.map +0 -1
  1653. package/build-module/components/rich-text/use-paste-handler.js +0 -152
  1654. package/build-module/components/rich-text/use-paste-handler.js.map +0 -1
  1655. package/build-module/components/rich-text/use-remove-browser-shortcuts.js +0 -26
  1656. package/build-module/components/rich-text/use-remove-browser-shortcuts.js.map +0 -1
  1657. package/build-module/components/rich-text/use-shortcuts.js +0 -18
  1658. package/build-module/components/rich-text/use-shortcuts.js.map +0 -1
  1659. package/build-module/components/rich-text/use-undo-automatic-change.js +0 -46
  1660. package/build-module/components/rich-text/use-undo-automatic-change.js.map +0 -1
  1661. package/src/components/block-list/use-block-props/use-block-moving-mode-class-names.js +0 -55
  1662. package/src/components/rich-text/use-before-input-rules.js +0 -99
  1663. package/src/components/rich-text/use-delete.js +0 -59
  1664. package/src/components/rich-text/use-enter.js +0 -110
  1665. package/src/components/rich-text/use-firefox-compat.js +0 -39
  1666. package/src/components/rich-text/use-input-events.js +0 -19
  1667. package/src/components/rich-text/use-input-rules.js +0 -150
  1668. package/src/components/rich-text/use-insert-replacement-text.js +0 -31
  1669. package/src/components/rich-text/use-paste-handler.js +0 -180
  1670. package/src/components/rich-text/use-remove-browser-shortcuts.js +0 -29
  1671. package/src/components/rich-text/use-shortcuts.js +0 -19
  1672. package/src/components/rich-text/use-undo-automatic-change.js +0 -50
  1673. package/src/components/text-decoration-control/style.scss +0 -18
  1674. package/src/components/text-transform-control/style.scss +0 -18
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalVStack","VStack","__experimentalHStack","HStack","__experimentalText","Text","Button","__","_x","_n","sprintf","Pagination","currentPage","numPages","changePage","totalItems","createElement","className","variant","expanded","spacing","justify","onClick","disabled","size"],"sources":["@wordpress/block-editor/src/components/block-patterns-paging/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\t__experimentalText as Text,\n\tButton,\n} from '@wordpress/components';\nimport { __, _x, _n, sprintf } from '@wordpress/i18n';\n\nexport default function Pagination( {\n\tcurrentPage,\n\tnumPages,\n\tchangePage,\n\ttotalItems,\n} ) {\n\treturn (\n\t\t<VStack className=\"block-editor-patterns__grid-pagination-wrapper\">\n\t\t\t<Text variant=\"muted\">\n\t\t\t\t{\n\t\t\t\t\t// translators: %s: Total number of patterns.\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t// translators: %s: Total number of patterns.\n\t\t\t\t\t\t_n( '%s item', '%s items', totalItems ),\n\t\t\t\t\t\ttotalItems\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t</Text>\n\n\t\t\t{ numPages > 1 && (\n\t\t\t\t<HStack\n\t\t\t\t\texpanded={ false }\n\t\t\t\t\tspacing={ 3 }\n\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination\"\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-previous\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( 1 ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === 1 }\n\t\t\t\t\t\t\taria-label={ __( 'First page' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>«</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( currentPage - 1 ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === 1 }\n\t\t\t\t\t\t\taria-label={ __( 'Previous page' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>‹</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t\t<Text variant=\"muted\">\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %1$s: Current page number, %2$s: Total number of pages.\n\t\t\t\t\t\t\t_x( '%1$s of %2$s', 'paging' ),\n\t\t\t\t\t\t\tcurrentPage,\n\t\t\t\t\t\t\tnumPages\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Text>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-next\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( currentPage + 1 ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === numPages }\n\t\t\t\t\t\t\taria-label={ __( 'Next page' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>›</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( numPages ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === numPages }\n\t\t\t\t\t\t\taria-label={ __( 'Last page' ) }\n\t\t\t\t\t\t\tsize=\"default\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>»</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,kBAAkB,IAAIC,IAAI,EAC1BC,MAAM,QACA,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,EAAE,EAAEC,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AAQ,EAAG,KAAO;IAClBC,OAAO,EAAG,CAAG;IACbH,SAAS,EAAC;EAA6C,GAEvDD,aAAA,CAACV,MAAM;IACNY,OAAO,EAAC,UAAU;IAClBI,OAAO,EAAGA,CAAA,KAAMR,UAAU,CAAEF,WAAW,GAAG,CAAE,CAAG;IAC/CW,QAAQ,EAAGX,WAAW,KAAKC,QAAU;IACrC,cAAaN,EAAE,CAAE,WAAY;EAAG,GAEhCS,aAAA,eAAM,QAAO,CACN,CAAC,EACTA,aAAA,CAACV,MAAM;IACNY,OAAO,EAAC,UAAU;IAClBI,OAAO,EAAGA,CAAA,KAAMR,UAAU,CAAED,QAAS,CAAG;IACxCU,QAAQ,EAAGX,WAAW,KAAKC,QAAU;IACrC,cAAaN,EAAE,CAAE,WAAY,CAAG;IAChCiB,IAAI,EAAC;EAAS,GAEdR,aAAA,eAAM,MAAO,CACN,CACD,CACD,CAEF,CAAC;AAEX"}
1
+ {"version":3,"names":["__experimentalVStack","VStack","__experimentalHStack","HStack","__experimentalText","Text","Button","__","_x","_n","sprintf","Pagination","currentPage","numPages","changePage","totalItems","createElement","className","variant","expanded","spacing","justify","onClick","disabled","__experimentalIsFocusable","size"],"sources":["@wordpress/block-editor/src/components/block-patterns-paging/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\t__experimentalText as Text,\n\tButton,\n} from '@wordpress/components';\nimport { __, _x, _n, sprintf } from '@wordpress/i18n';\n\nexport default function Pagination( {\n\tcurrentPage,\n\tnumPages,\n\tchangePage,\n\ttotalItems,\n} ) {\n\treturn (\n\t\t<VStack className=\"block-editor-patterns__grid-pagination-wrapper\">\n\t\t\t<Text variant=\"muted\">\n\t\t\t\t{\n\t\t\t\t\t// translators: %s: Total number of patterns.\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t// translators: %s: Total number of patterns.\n\t\t\t\t\t\t_n( '%s item', '%s items', totalItems ),\n\t\t\t\t\t\ttotalItems\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t</Text>\n\n\t\t\t{ numPages > 1 && (\n\t\t\t\t<HStack\n\t\t\t\t\texpanded={ false }\n\t\t\t\t\tspacing={ 3 }\n\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination\"\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-previous\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( 1 ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === 1 }\n\t\t\t\t\t\t\taria-label={ __( 'First page' ) }\n\t\t\t\t\t\t\t__experimentalIsFocusable\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>«</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( currentPage - 1 ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === 1 }\n\t\t\t\t\t\t\taria-label={ __( 'Previous page' ) }\n\t\t\t\t\t\t\t__experimentalIsFocusable\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>‹</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t\t<Text variant=\"muted\">\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %1$s: Current page number, %2$s: Total number of pages.\n\t\t\t\t\t\t\t_x( '%1$s of %2$s', 'paging' ),\n\t\t\t\t\t\t\tcurrentPage,\n\t\t\t\t\t\t\tnumPages\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Text>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-next\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( currentPage + 1 ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === numPages }\n\t\t\t\t\t\t\taria-label={ __( 'Next page' ) }\n\t\t\t\t\t\t\t__experimentalIsFocusable\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>›</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( numPages ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === numPages }\n\t\t\t\t\t\t\taria-label={ __( 'Last page' ) }\n\t\t\t\t\t\t\tsize=\"default\"\n\t\t\t\t\t\t\t__experimentalIsFocusable\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>»</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,kBAAkB,IAAIC,IAAI,EAC1BC,MAAM,QACA,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAErD,eAAe,SAASC,UAAUA,CAAE;EACnCC,WAAW;EACXC,QAAQ;EACRC,UAAU;EACVC;AACD,CAAC,EAAG;EACH,OACCC,aAAA,CAACf,MAAM;IAACgB,SAAS,EAAC;EAAgD,GACjED,aAAA,CAACX,IAAI;IAACa,OAAO,EAAC;EAAO;EAEnB;EACAR,OAAO;EACN;EACAD,EAAE,CAAE,SAAS,EAAE,UAAU,EAAEM,UAAW,CAAC,EACvCA,UACD,CA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BAAyB;EAAA,GAEzBR,aAAA,eAAM,QAAO,CACN,CAAC,EACTA,aAAA,CAACV,MAAM;IACNY,OAAO,EAAC,UAAU;IAClBI,OAAO,EAAGA,CAAA,KAAMR,UAAU,CAAED,QAAS,CAAG;IACxCU,QAAQ,EAAGX,WAAW,KAAKC,QAAU;IACrC,cAAaN,EAAE,CAAE,WAAY,CAAG;IAChCkB,IAAI,EAAC,SAAS;IACdD,yBAAyB;EAAA,GAEzBR,aAAA,eAAM,MAAO,CACN,CACD,CACD,CAEF,CAAC;AAEX","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useState","useMemo","forwardRef","__unstableUseBlockElement","useBlockElement","BlockPopover","BlockPopoverCover","clientId","bottomClientId","children","shift","props","ref","_bottomClientId","selectedElement","createElement","CoverContainer","width","setWidth","offsetWidth","height","setHeight","offsetHeight","observer","window","ResizeObserver","observe","box","disconnect","style","position"],"sources":["@wordpress/block-editor/src/components/block-popover/cover.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useState, useMemo, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport BlockPopover from '.';\n\nfunction BlockPopoverCover(\n\t{ clientId, bottomClientId, children, shift = false, ...props },\n\tref\n) {\n\tbottomClientId ??= clientId;\n\n\tconst selectedElement = useBlockElement( clientId );\n\n\treturn (\n\t\t<BlockPopover\n\t\t\tref={ ref }\n\t\t\tclientId={ clientId }\n\t\t\tbottomClientId={ bottomClientId }\n\t\t\tshift={ shift }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ selectedElement && clientId === bottomClientId ? (\n\t\t\t\t<CoverContainer selectedElement={ selectedElement }>\n\t\t\t\t\t{ children }\n\t\t\t\t</CoverContainer>\n\t\t\t) : (\n\t\t\t\tchildren\n\t\t\t) }\n\t\t</BlockPopover>\n\t);\n}\n\nfunction CoverContainer( { selectedElement, children } ) {\n\tconst [ width, setWidth ] = useState( selectedElement.offsetWidth );\n\tconst [ height, setHeight ] = useState( selectedElement.offsetHeight );\n\n\tuseEffect( () => {\n\t\tconst observer = new window.ResizeObserver( () => {\n\t\t\tsetWidth( selectedElement.offsetWidth );\n\t\t\tsetHeight( selectedElement.offsetHeight );\n\t\t} );\n\t\tobserver.observe( selectedElement, { box: 'border-box' } );\n\t\treturn () => observer.disconnect();\n\t}, [ selectedElement ] );\n\n\tconst style = useMemo( () => {\n\t\treturn {\n\t\t\tposition: 'absolute',\n\t\t\twidth,\n\t\t\theight,\n\t\t};\n\t}, [ width, height ] );\n\n\treturn <div style={ style }>{ children }</div>;\n}\n\nexport default forwardRef( BlockPopoverCover );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,UAAU,QAAQ,oBAAoB;;AAE7E;AACA;AACA;AACA,SAASC,yBAAyB,IAAIC,eAAe,QAAQ,8CAA8C;AAC3G,OAAOC,YAAY,MAAM,GAAG;AAE5B,SAASC,iBAAiBA,CACzB;EAAEC,QAAQ;EAAEC,cAAc;EAAEC,QAAQ;EAAEC,KAAK,GAAG,KAAK;EAAE,GAAGC;AAAM,CAAC,EAC/DC,GAAG,EACF;EAAA,IAAAC,eAAA;EACD,CAAAA,eAAA,GAAAL,cAAc,cAAAK,eAAA,cAAAA,eAAA,GAAdL,cAAc,GAAKD,QAAQ;EAE3B,MAAMO,eAAe,GAAGV,eAAe,CAAEG,QAAS,CAAC;EAEnD,OACCQ,aAAA,CAACV,YAAY;IACZO,GAAG,EAAGA,GAAK;IACXL,QAAQ,EAAGA,QAAU;IACrBC,cAAc,EAAGA,cAAgB;IACjCE,KAAK,EAAGA,KAAO;IAAA,GACVC;EAAK,GAERG,eAAe,IAAIP,QAAQ,KAAKC,cAAc,GAC/CO,aAAA,CAACC,cAAc;IAACF,eAAe,EAAGA;EAAiB,GAChDL,QACa,CAAC,GAEjBA,QAEY,CAAC;AAEjB;AAEA,SAASO,cAAcA,CAAE;EAAEF,eAAe;EAAEL;AAAS,CAAC,EAAG;EACxD,MAAM,CAAEQ,KAAK,EAAEC,QAAQ,CAAE,GAAGlB,QAAQ,CAAEc,eAAe,CAACK,WAAY,CAAC;EACnE,MAAM,CAAEC,MAAM,EAAEC,SAAS,CAAE,GAAGrB,QAAQ,CAAEc,eAAe,CAACQ,YAAa,CAAC;EAEtEvB,SAAS,CAAE,MAAM;IAChB,MAAMwB,QAAQ,GAAG,IAAIC,MAAM,CAACC,cAAc,CAAE,MAAM;MACjDP,QAAQ,CAAEJ,eAAe,CAACK,WAAY,CAAC;MACvCE,SAAS,CAAEP,eAAe,CAACQ,YAAa,CAAC;IAC1C,CAAE,CAAC;IACHC,QAAQ,CAACG,OAAO,CAAEZ,eAAe,EAAE;MAAEa,GAAG,EAAE;IAAa,CAAE,CAAC;IAC1D,OAAO,MAAMJ,QAAQ,CAACK,UAAU,CAAC,CAAC;EACnC,CAAC,EAAE,CAAEd,eAAe,CAAG,CAAC;EAExB,MAAMe,KAAK,GAAG5B,OAAO,CAAE,MAAM;IAC5B,OAAO;MACN6B,QAAQ,EAAE,UAAU;MACpBb,KAAK;MACLG;IACD,CAAC;EACF,CAAC,EAAE,CAAEH,KAAK,EAAEG,MAAM,CAAG,CAAC;EAEtB,OAAOL,aAAA;IAAKc,KAAK,EAAGA;EAAO,GAAGpB,QAAe,CAAC;AAC/C;AAEA,eAAeP,UAAU,CAAEI,iBAAkB,CAAC"}
1
+ {"version":3,"names":["useEffect","useState","useMemo","forwardRef","__unstableUseBlockElement","useBlockElement","BlockPopover","BlockPopoverCover","clientId","bottomClientId","children","shift","props","ref","_bottomClientId","selectedElement","createElement","CoverContainer","width","setWidth","offsetWidth","height","setHeight","offsetHeight","observer","window","ResizeObserver","observe","box","disconnect","style","position"],"sources":["@wordpress/block-editor/src/components/block-popover/cover.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useState, useMemo, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport BlockPopover from '.';\n\nfunction BlockPopoverCover(\n\t{ clientId, bottomClientId, children, shift = false, ...props },\n\tref\n) {\n\tbottomClientId ??= clientId;\n\n\tconst selectedElement = useBlockElement( clientId );\n\n\treturn (\n\t\t<BlockPopover\n\t\t\tref={ ref }\n\t\t\tclientId={ clientId }\n\t\t\tbottomClientId={ bottomClientId }\n\t\t\tshift={ shift }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ selectedElement && clientId === bottomClientId ? (\n\t\t\t\t<CoverContainer selectedElement={ selectedElement }>\n\t\t\t\t\t{ children }\n\t\t\t\t</CoverContainer>\n\t\t\t) : (\n\t\t\t\tchildren\n\t\t\t) }\n\t\t</BlockPopover>\n\t);\n}\n\nfunction CoverContainer( { selectedElement, children } ) {\n\tconst [ width, setWidth ] = useState( selectedElement.offsetWidth );\n\tconst [ height, setHeight ] = useState( selectedElement.offsetHeight );\n\n\tuseEffect( () => {\n\t\tconst observer = new window.ResizeObserver( () => {\n\t\t\tsetWidth( selectedElement.offsetWidth );\n\t\t\tsetHeight( selectedElement.offsetHeight );\n\t\t} );\n\t\tobserver.observe( selectedElement, { box: 'border-box' } );\n\t\treturn () => observer.disconnect();\n\t}, [ selectedElement ] );\n\n\tconst style = useMemo( () => {\n\t\treturn {\n\t\t\tposition: 'absolute',\n\t\t\twidth,\n\t\t\theight,\n\t\t};\n\t}, [ width, height ] );\n\n\treturn <div style={ style }>{ children }</div>;\n}\n\nexport default forwardRef( BlockPopoverCover );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,UAAU,QAAQ,oBAAoB;;AAE7E;AACA;AACA;AACA,SAASC,yBAAyB,IAAIC,eAAe,QAAQ,8CAA8C;AAC3G,OAAOC,YAAY,MAAM,GAAG;AAE5B,SAASC,iBAAiBA,C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AAO,CAAE,MAAM;IAC5B,OAAO;MACN6B,QAAQ,EAAE,UAAU;MACpBb,KAAK;MACLG;IACD,CAAC;EACF,CAAC,EAAE,CAAEH,KAAK,EAAEG,MAAM,CAAG,CAAC;EAEtB,OAAOL,aAAA;IAAKc,KAAK,EAAGA;EAAO,GAAGpB,QAAe,CAAC;AAC/C;AAEA,eAAeP,UAAU,CAAEI,iBAAkB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","useReducedMotion","__unstableMotion","motion","store","blockEditorStore","BlockPopoverCover","animateVariants","hide","opacity","scaleY","show","exit","BlockDropZonePopover","__unstablePopoverSlot","__unstableContentRef","clientId","select","getBlockOrder","getBlockInsertionPoint","insertionPoint","order","rootClientId","length","index","reducedMotion","createElement","className","div","initial","animate"],"sources":["@wordpress/block-editor/src/components/block-popover/drop-zone.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { __unstableMotion as motion } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport BlockPopoverCover from './cover';\n\nconst animateVariants = {\n\thide: { opacity: 0, scaleY: 0.75 },\n\tshow: { opacity: 1, scaleY: 1 },\n\texit: { opacity: 0, scaleY: 0.9 },\n};\n\nfunction BlockDropZonePopover( {\n\t__unstablePopoverSlot,\n\t__unstableContentRef,\n} ) {\n\tconst { clientId } = useSelect( ( select ) => {\n\t\tconst { getBlockOrder, getBlockInsertionPoint } =\n\t\t\tselect( blockEditorStore );\n\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\tconst order = getBlockOrder( insertionPoint.rootClientId );\n\n\t\tif ( ! order.length ) {\n\t\t\treturn {};\n\t\t}\n\n\t\treturn {\n\t\t\tclientId: order[ insertionPoint.index ],\n\t\t};\n\t}, [] );\n\tconst reducedMotion = useReducedMotion();\n\n\treturn (\n\t\t<BlockPopoverCover\n\t\t\tclientId={ clientId }\n\t\t\t__unstablePopoverSlot={ __unstablePopoverSlot }\n\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\tclassName=\"block-editor-block-popover__drop-zone\"\n\t\t>\n\t\t\t<motion.div\n\t\t\t\tdata-testid=\"block-popover-drop-zone\"\n\t\t\t\tinitial={\n\t\t\t\t\treducedMotion ? animateVariants.show : animateVariants.hide\n\t\t\t\t}\n\t\t\t\tanimate={ animateVariants.show }\n\t\t\t\texit={\n\t\t\t\t\treducedMotion ? animateVariants.show : animateVariants.exit\n\t\t\t\t}\n\t\t\t\tclassName=\"block-editor-block-popover__drop-zone-foreground\"\n\t\t\t/>\n\t\t</BlockPopoverCover>\n\t);\n}\n\nexport default BlockDropZonePopover;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,gBAAgB,IAAIC,MAAM,QAAQ,uBAAuB;;AAElE;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,iBAAiB,MAAM,SAAS;AAEvC,MAAMC,eAAe,GAAG;EACvBC,IAAI,EAAE;IAAEC,OAAO,EAAE,CAAC;IAAEC,MAAM,EAAE;EAAK,CAAC;EAClCC,IAAI,EAAE;IAAEF,OAAO,EAAE,CAAC;IAAEC,MAAM,EAAE;EAAE,CAAC;EAC/BE,IAAI,EAAE;IAAEH,OAAO,EAAE,CAAC;IAAEC,MAAM,EAAE;EAAI;AACjC,CAAC;AAED,SAASG,oBAAoBA,CAAE;EAC9BC,qBAAqB;EACrBC;AACD,CAAC,EAAG;EACH,MAAM;IAAEC;EAAS,CAAC,GAAGhB,SAAS,CAAIiB,MAAM,IAAM;IAC7C,MAAM;MAAEC,aAAa;MAAEC;IAAuB,CAAC,GAC9CF,MAAM,CAAEZ,gBAAiB,CAAC;IAC3B,MAAMe,cAAc,GAAGD,sBAAsB,CAAC,CAAC;IAC/C,MAAME,KAAK,GAAGH,aAAa,CAAEE,cAAc,CAACE,YAAa,CAAC;IAE1D,IAAK,CAAED,KAAK,CAACE,MAAM,EAAG;MACrB,OAAO,CAAC,CAAC;IACV;IAEA,OAAO;MACNP,QAAQ,EAAEK,KAAK,CAAED,cAAc,CAACI,KAAK;IACtC,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EACP,MAAMC,aAAa,GAAGxB,gBAAgB,CAAC,CAAC;EAExC,OACCyB,aAAA,CAACpB,iBAAiB;IACjBU,QAAQ,EAAGA,QAAU;IACrBF,qBAAqB,EAAGA,qBAAuB;IAC/CC,oBAAoB,EAAGA,oBAAsB;IAC7CY,SAAS,EAAC;EAAuC,GAEjDD,aAAA,CAACvB,MAAM,CAACyB,GAAG;IACV,eAAY,yBAAyB;IACrCC,OAAO,EACNJ,aAAa,GAAGlB,eAAe,CAACI,IAAI,GAAGJ,eAAe,CAACC,IACvD;IACDsB,OAAO,EAAGvB,eAAe,CAACI,IAAM;IAChCC,IAAI,EACHa,aAAa,GAAGlB,eAAe,CAACI,IAAI,GAAGJ,eAAe,CAACK,IACvD;IACDe,SAAS,EAAC;EAAkD,CAC5D,CACiB,CAAC;AAEtB;AAEA,eAAed,oBAAoB"}
1
+ {"version":3,"names":["useSelect","useReducedMotion","__unstableMotion","motion","store","blockEditorStore","BlockPopoverCover","animateVariants","hide","opacity","scaleY","show","exit","BlockDropZonePopover","__unstablePopoverSlot","__unstableContentRef","clientId","select","getBlockOrder","getBlockInsertionPoint","insertionPoint","order","rootClientId","length","index","reducedMotion","createElement","className","div","initial","animate"],"sources":["@wordpress/block-editor/src/components/block-popover/drop-zone.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { __unstableMotion as motion } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport BlockPopoverCover from './cover';\n\nconst animateVariants = {\n\thide: { opacity: 0, scaleY: 0.75 },\n\tshow: { opacity: 1, scaleY: 1 },\n\texit: { opacity: 0, scaleY: 0.9 },\n};\n\nfunction BlockDropZonePopover( {\n\t__unstablePopoverSlot,\n\t__unstableContentRef,\n} ) {\n\tconst { clientId } = useSelect( ( select ) => {\n\t\tconst { getBlockOrder, getBlockInsertionPoint } =\n\t\t\tselect( blockEditorStore );\n\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\tconst order = getBlockOrder( insertionPoint.rootClientId );\n\n\t\tif ( ! order.length ) {\n\t\t\treturn {};\n\t\t}\n\n\t\treturn {\n\t\t\tclientId: order[ insertionPoint.index ],\n\t\t};\n\t}, [] );\n\tconst reducedMotion = useReducedMotion();\n\n\treturn (\n\t\t<BlockPopoverCover\n\t\t\tclientId={ clientId }\n\t\t\t__unstablePopoverSlot={ __unstablePopoverSlot }\n\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\tclassName=\"block-editor-block-popover__drop-zone\"\n\t\t>\n\t\t\t<motion.div\n\t\t\t\tdata-testid=\"block-popover-drop-zone\"\n\t\t\t\tinitial={\n\t\t\t\t\treducedMotion ? animateVariants.show : animateVariants.hide\n\t\t\t\t}\n\t\t\t\tanimate={ animateVariants.show }\n\t\t\t\texit={\n\t\t\t\t\treducedMotion ? animateVariants.show : animateVariants.exit\n\t\t\t\t}\n\t\t\t\tclassName=\"block-editor-block-popover__drop-zone-foreground\"\n\t\t\t/>\n\t\t</BlockPopoverCover>\n\t);\n}\n\nexport default BlockDropZonePopover;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,gBAAgB,IAAIC,MAAM,QAAQ,uBAAuB;;AAElE;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,iBAAiB,MAAM,SAAS;AAEvC,MAAMC,eAAe,GAAG;EACvBC,IAAI,EAAE;IAAEC,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ed,oBAAoB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useSelect","useMemo","createContext","useReducer","useLayoutEffect","Popover","isRTL","store","blockEditorStore","__unstableUseBlockElement","useBlockElement","usePopoverScroll","MAX_POPOVER_RECOMPUTE_COUNTER","Number","MAX_SAFE_INTEGER","InsertionPointOpenRef","BlockPopoverInbetween","previousClientId","nextClientId","children","__unstablePopoverSlot","__unstableContentRef","operation","nearestSide","props","popoverRecomputeCounter","forcePopoverRecompute","s","orientation","rootClientId","isVisible","select","getBlockListSettings","getBlockRootClientId","isBlockVisible","_rootClientId","previousElement","nextElement","isVertical","popoverAnchor","undefined","contextElement","getBoundingClientRect","previousRect","nextRect","left","top","width","height","targetRect","bottom","right","window","DOMRect","popoverScrollRef","observer","MutationObserver","observe","attributes","disconnect","ownerDocument","defaultView","addEventListener","removeEventListener","createElement","ref","animate","anchor","focusOnMount","__unstableSlotName","inline","key","className","resize","flip","placement","variant"],"sources":["@wordpress/block-editor/src/components/block-popover/inbetween.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tuseMemo,\n\tcreateContext,\n\tuseReducer,\n\tuseLayoutEffect,\n} from '@wordpress/element';\nimport { Popover } from '@wordpress/components';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport usePopoverScroll from './use-popover-scroll';\n\nconst MAX_POPOVER_RECOMPUTE_COUNTER = Number.MAX_SAFE_INTEGER;\n\nexport const InsertionPointOpenRef = createContext();\n\nfunction BlockPopoverInbetween( {\n\tpreviousClientId,\n\tnextClientId,\n\tchildren,\n\t__unstablePopoverSlot,\n\t__unstableContentRef,\n\toperation = 'insert',\n\tnearestSide = 'right',\n\t...props\n} ) {\n\t// This is a temporary hack to get the inbetween inserter to recompute properly.\n\tconst [ popoverRecomputeCounter, forcePopoverRecompute ] = useReducer(\n\t\t// Module is there to make sure that the counter doesn't overflow.\n\t\t( s ) => ( s + 1 ) % MAX_POPOVER_RECOMPUTE_COUNTER,\n\t\t0\n\t);\n\n\tconst { orientation, rootClientId, isVisible } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockListSettings,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tisBlockVisible,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst _rootClientId = getBlockRootClientId(\n\t\t\t\tpreviousClientId ?? nextClientId\n\t\t\t);\n\t\t\treturn {\n\t\t\t\torientation:\n\t\t\t\t\tgetBlockListSettings( _rootClientId )?.orientation ||\n\t\t\t\t\t'vertical',\n\t\t\t\trootClientId: _rootClientId,\n\t\t\t\tisVisible:\n\t\t\t\t\tisBlockVisible( previousClientId ) &&\n\t\t\t\t\tisBlockVisible( nextClientId ),\n\t\t\t};\n\t\t},\n\t\t[ previousClientId, nextClientId ]\n\t);\n\tconst previousElement = useBlockElement( previousClientId );\n\tconst nextElement = useBlockElement( nextClientId );\n\tconst isVertical = orientation === 'vertical';\n\n\tconst popoverAnchor = useMemo( () => {\n\t\tif (\n\t\t\t// popoverRecomputeCounter is by definition always equal or greater than 0.\n\t\t\t// This check is only there to satisfy the correctness of the\n\t\t\t// exhaustive-deps rule for the `useMemo` hook.\n\t\t\tpopoverRecomputeCounter < 0 ||\n\t\t\t( ! previousElement && ! nextElement ) ||\n\t\t\t! isVisible\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst contextElement =\n\t\t\toperation === 'group'\n\t\t\t\t? nextElement || previousElement\n\t\t\t\t: previousElement || nextElement;\n\n\t\treturn {\n\t\t\tcontextElement,\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst previousRect = previousElement\n\t\t\t\t\t? previousElement.getBoundingClientRect()\n\t\t\t\t\t: null;\n\t\t\t\tconst nextRect = nextElement\n\t\t\t\t\t? nextElement.getBoundingClientRect()\n\t\t\t\t\t: null;\n\n\t\t\t\tlet left = 0;\n\t\t\t\tlet top = 0;\n\t\t\t\tlet width = 0;\n\t\t\t\tlet height = 0;\n\n\t\t\t\tif ( operation === 'group' ) {\n\t\t\t\t\tconst targetRect = nextRect || previousRect;\n\t\t\t\t\ttop = targetRect.top;\n\t\t\t\t\t// No spacing is likely around blocks in this operation.\n\t\t\t\t\t// So width of the inserter containing rect is set to 0.\n\t\t\t\t\twidth = 0;\n\t\t\t\t\theight = targetRect.bottom - targetRect.top;\n\t\t\t\t\t// Popover calculates its distance from mid-block so some\n\t\t\t\t\t// adjustments are needed to make it appear in the right place.\n\t\t\t\t\tleft =\n\t\t\t\t\t\tnearestSide === 'left'\n\t\t\t\t\t\t\t? targetRect.left - 2\n\t\t\t\t\t\t\t: targetRect.right - 2;\n\t\t\t\t} else if ( isVertical ) {\n\t\t\t\t\t// vertical\n\t\t\t\t\ttop = previousRect ? previousRect.bottom : nextRect.top;\n\t\t\t\t\twidth = previousRect ? previousRect.width : nextRect.width;\n\t\t\t\t\theight =\n\t\t\t\t\t\tnextRect && previousRect\n\t\t\t\t\t\t\t? nextRect.top - previousRect.bottom\n\t\t\t\t\t\t\t: 0;\n\t\t\t\t\tleft = previousRect ? previousRect.left : nextRect.left;\n\t\t\t\t} else {\n\t\t\t\t\ttop = previousRect ? previousRect.top : nextRect.top;\n\t\t\t\t\theight = previousRect\n\t\t\t\t\t\t? previousRect.height\n\t\t\t\t\t\t: nextRect.height;\n\n\t\t\t\t\tif ( isRTL() ) {\n\t\t\t\t\t\t// non vertical, rtl\n\t\t\t\t\t\tleft = nextRect ? nextRect.right : previousRect.left;\n\t\t\t\t\t\twidth =\n\t\t\t\t\t\t\tpreviousRect && nextRect\n\t\t\t\t\t\t\t\t? previousRect.left - nextRect.right\n\t\t\t\t\t\t\t\t: 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// non vertical, ltr\n\t\t\t\t\t\tleft = previousRect\n\t\t\t\t\t\t\t? previousRect.right\n\t\t\t\t\t\t\t: nextRect.left;\n\t\t\t\t\t\twidth =\n\t\t\t\t\t\t\tpreviousRect && nextRect\n\t\t\t\t\t\t\t\t? nextRect.left - previousRect.right\n\t\t\t\t\t\t\t\t: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn new window.DOMRect( left, top, width, height );\n\t\t\t},\n\t\t};\n\t}, [\n\t\tpreviousElement,\n\t\tnextElement,\n\t\tpopoverRecomputeCounter,\n\t\tisVertical,\n\t\tisVisible,\n\t\toperation,\n\t\tnearestSide,\n\t] );\n\n\tconst popoverScrollRef = usePopoverScroll( __unstableContentRef );\n\n\t// This is only needed for a smooth transition when moving blocks.\n\t// When blocks are moved up/down, their position can be set by\n\t// updating the `transform` property manually (i.e. without using CSS\n\t// transitions or animations). The animation, which can also scroll the block\n\t// editor, can sometimes cause the position of the Popover to get out of sync.\n\t// A MutationObserver is therefore used to make sure that changes to the\n\t// selectedElement's attribute (i.e. `transform`) can be tracked and used to\n\t// trigger the Popover to rerender.\n\tuseLayoutEffect( () => {\n\t\tif ( ! previousElement ) {\n\t\t\treturn;\n\t\t}\n\t\tconst observer = new window.MutationObserver( forcePopoverRecompute );\n\t\tobserver.observe( previousElement, { attributes: true } );\n\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t};\n\t}, [ previousElement ] );\n\n\tuseLayoutEffect( () => {\n\t\tif ( ! nextElement ) {\n\t\t\treturn;\n\t\t}\n\t\tconst observer = new window.MutationObserver( forcePopoverRecompute );\n\t\tobserver.observe( nextElement, { attributes: true } );\n\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t};\n\t}, [ nextElement ] );\n\n\tuseLayoutEffect( () => {\n\t\tif ( ! previousElement ) {\n\t\t\treturn;\n\t\t}\n\t\tpreviousElement.ownerDocument.defaultView.addEventListener(\n\t\t\t'resize',\n\t\t\tforcePopoverRecompute\n\t\t);\n\t\treturn () => {\n\t\t\tpreviousElement.ownerDocument.defaultView?.removeEventListener(\n\t\t\t\t'resize',\n\t\t\t\tforcePopoverRecompute\n\t\t\t);\n\t\t};\n\t}, [ previousElement ] );\n\n\t// If there's either a previous or a next element, show the inbetween popover.\n\t// Note that drag and drop uses the inbetween popover to show the drop indicator\n\t// before the first block and after the last block.\n\tif ( ( ! previousElement && ! nextElement ) || ! isVisible ) {\n\t\treturn null;\n\t}\n\n\t/* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */\n\t// While ideally it would be enough to capture the\n\t// bubbling focus event from the Inserter, due to the\n\t// characteristics of click focusing of `button`s in\n\t// Firefox and Safari, it is not reliable.\n\t//\n\t// See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus\n\treturn (\n\t\t<Popover\n\t\t\tref={ popoverScrollRef }\n\t\t\tanimate={ false }\n\t\t\tanchor={ popoverAnchor }\n\t\t\tfocusOnMount={ false }\n\t\t\t// Render in the old slot if needed for backward compatibility,\n\t\t\t// otherwise render in place (not in the default popover slot).\n\t\t\t__unstableSlotName={ __unstablePopoverSlot }\n\t\t\tinline={ ! __unstablePopoverSlot }\n\t\t\t// Forces a remount of the popover when its position changes\n\t\t\t// This makes sure the popover doesn't animate from its previous position.\n\t\t\tkey={ nextClientId + '--' + rootClientId }\n\t\t\t{ ...props }\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-block-popover',\n\t\t\t\t'block-editor-block-popover__inbetween',\n\t\t\t\tprops.className\n\t\t\t) }\n\t\t\tresize={ false }\n\t\t\tflip={ false }\n\t\t\tplacement=\"overlay\"\n\t\t\tvariant=\"unstyled\"\n\t\t>\n\t\t\t<div className=\"block-editor-block-popover__inbetween-container\">\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</Popover>\n\t);\n\t/* eslint-enable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */\n}\n\nexport default BlockPopoverInbetween;\n"],"mappings":";AAAA;AACA;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EACZ;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OACCkC,aAAA,CAAC3D,OAAO;IACP4D,GAAG,EAAGX,gBAAkB;IACxBY,OAAO,EAAG,KAAO;IACjBC,MAAM,EAAG5B,aAAe;IACxB6B,YAAY,EAAG;IACf;IACA;IAAA;IACAC,kBAAkB,EAAGjD,qBAAuB;IAC5CkD,MAAM,EAAG,CAAElD;IACX;IACA;IAAA;IACAmD,GAAG,EAAGrD,YAAY,GAAG,IAAI,GAAGW,YAAc;IAAA,GACrCL,KAAK;IACVgD,SAAS,EAAGzE,UAAU,CACrB,4BAA4B,EAC5B,uCAAuC,EACvCyB,KAAK,CAACgD,SACP,CAAG;IACHC,MAAM,EAAG,KAAO;IAChBC,IAAI,EAAG,KAAO;IACdC,SAAS,EAAC,SAAS;IACnBC,OAAO,EAAC;EAAU,GAElBZ,aAAA;IAAKQ,SAAS,EAAC;EAAiD,GAC7DrD,QACE,CACG,CAAC;EAEX;AACD;AAEA,eAAeH,qBAAqB"}
1
+ {"version":3,"names":["classnames","useSelect","useMemo","createContext","useReducer","useLayoutEffect","Popover","isRTL","store","blockEditorStore","__unstableUseBlockElement","useBlockElement","usePopoverScroll","MAX_POPOVER_RECOMPUTE_COUNTER","Number","MAX_SAFE_INTEGER","InsertionPointOpenRef","BlockPopoverInbetween","previousClientId","nextClientId","children","__unstablePopoverSlot","__unstableContentRef","operation","nearestSide","props","popoverRecomputeCounter","forcePopoverRecompute","s","orientation","rootClientId","isVisible","select","getBlockListSettings","getBlockRootClientId","isBlockVisible","_rootClientId","previousElement","nextElement","isVertical","popoverAnchor","undefined","contextElement","getBoundingClientRect","previousRect","nextRect","left","top","width","height","targetRect","bottom","right","window","DOMRect","popoverScrollRef","observer","MutationObserver","observe","attributes","disconnect","ownerDocument","defaultView","addEventListener","removeEventListener","createElement","ref","animate","anchor","focusOnMount","__unstableSlotName","inline","key","className","resize","flip","placement","variant"],"sources":["@wordpress/block-editor/src/components/block-popover/inbetween.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tuseMemo,\n\tcreateContext,\n\tuseReducer,\n\tuseLayoutEffect,\n} from '@wordpress/element';\nimport { Popover } from '@wordpress/components';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport usePopoverScroll from './use-popover-scroll';\n\nconst MAX_POPOVER_RECOMPUTE_COUNTER = Number.MAX_SAFE_INTEGER;\n\nexport const InsertionPointOpenRef = createContext();\n\nfunction BlockPopoverInbetween( {\n\tpreviousClientId,\n\tnextClientId,\n\tchildren,\n\t__unstablePopoverSlot,\n\t__unstableContentRef,\n\toperation = 'insert',\n\tnearestSide = 'right',\n\t...props\n} ) {\n\t// This is a temporary hack to get the inbetween inserter to recompute properly.\n\tconst [ popoverRecomputeCounter, forcePopoverRecompute ] = useReducer(\n\t\t// Module is there to make sure that the counter doesn't overflow.\n\t\t( s ) => ( s + 1 ) % MAX_POPOVER_RECOMPUTE_COUNTER,\n\t\t0\n\t);\n\n\tconst { orientation, rootClientId, isVisible } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockListSettings,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tisBlockVisible,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst _rootClientId = getBlockRootClientId(\n\t\t\t\tpreviousClientId ?? nextClientId\n\t\t\t);\n\t\t\treturn {\n\t\t\t\torientation:\n\t\t\t\t\tgetBlockListSettings( _rootClientId )?.orientation ||\n\t\t\t\t\t'vertical',\n\t\t\t\trootClientId: _rootClientId,\n\t\t\t\tisVisible:\n\t\t\t\t\tisBlockVisible( previousClientId ) &&\n\t\t\t\t\tisBlockVisible( nextClientId ),\n\t\t\t};\n\t\t},\n\t\t[ previousClientId, nextClientId ]\n\t);\n\tconst previousElement = useBlockElement( previousClientId );\n\tconst nextElement = useBlockElement( nextClientId );\n\tconst isVertical = orientation === 'vertical';\n\n\tconst popoverAnchor = useMemo( () => {\n\t\tif (\n\t\t\t// popoverRecomputeCounter is by definition always equal or greater than 0.\n\t\t\t// This check is only there to satisfy the correctness of the\n\t\t\t// exhaustive-deps rule for the `useMemo` hook.\n\t\t\tpopoverRecomputeCounter < 0 ||\n\t\t\t( ! previousElement && ! nextElement ) ||\n\t\t\t! isVisible\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst contextElement =\n\t\t\toperation === 'group'\n\t\t\t\t? nextElement || previousElement\n\t\t\t\t: previousElement || nextElement;\n\n\t\treturn {\n\t\t\tcontextElement,\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst previousRect = previousElement\n\t\t\t\t\t? previousElement.getBoundingClientRect()\n\t\t\t\t\t: null;\n\t\t\t\tconst nextRect = nextElement\n\t\t\t\t\t? nextElement.getBoundingClientRect()\n\t\t\t\t\t: null;\n\n\t\t\t\tlet left = 0;\n\t\t\t\tlet top = 0;\n\t\t\t\tlet width = 0;\n\t\t\t\tlet height = 0;\n\n\t\t\t\tif ( operation === 'group' ) {\n\t\t\t\t\tconst targetRect = nextRect || previousRect;\n\t\t\t\t\ttop = targetRect.top;\n\t\t\t\t\t// No spacing is likely around blocks in this operation.\n\t\t\t\t\t// So width of the inserter containing rect is set to 0.\n\t\t\t\t\twidth = 0;\n\t\t\t\t\theight = targetRect.bottom - targetRect.top;\n\t\t\t\t\t// Popover calculates its distance from mid-block so some\n\t\t\t\t\t// adjustments are needed to make it appear in the right place.\n\t\t\t\t\tleft =\n\t\t\t\t\t\tnearestSide === 'left'\n\t\t\t\t\t\t\t? targetRect.left - 2\n\t\t\t\t\t\t\t: targetRect.right - 2;\n\t\t\t\t} else if ( isVertical ) {\n\t\t\t\t\t// vertical\n\t\t\t\t\ttop = previousRect ? previousRect.bottom : nextRect.top;\n\t\t\t\t\twidth = previousRect ? previousRect.width : nextRect.width;\n\t\t\t\t\theight =\n\t\t\t\t\t\tnextRect && previousRect\n\t\t\t\t\t\t\t? nextRect.top - previousRect.bottom\n\t\t\t\t\t\t\t: 0;\n\t\t\t\t\tleft = previousRect ? previousRect.left : nextRect.left;\n\t\t\t\t} else {\n\t\t\t\t\ttop = previousRect ? previousRect.top : nextRect.top;\n\t\t\t\t\theight = previousRect\n\t\t\t\t\t\t? previousRect.height\n\t\t\t\t\t\t: nextRect.height;\n\n\t\t\t\t\tif ( isRTL() ) {\n\t\t\t\t\t\t// non vertical, rtl\n\t\t\t\t\t\tleft = nextRect ? nextRect.right : previousRect.left;\n\t\t\t\t\t\twidth =\n\t\t\t\t\t\t\tpreviousRect && nextRect\n\t\t\t\t\t\t\t\t? previousRect.left - nextRect.right\n\t\t\t\t\t\t\t\t: 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// non vertical, ltr\n\t\t\t\t\t\tleft = previousRect\n\t\t\t\t\t\t\t? previousRect.right\n\t\t\t\t\t\t\t: nextRect.left;\n\t\t\t\t\t\twidth =\n\t\t\t\t\t\t\tpreviousRect && nextRect\n\t\t\t\t\t\t\t\t? nextRect.left - previousRect.right\n\t\t\t\t\t\t\t\t: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn new window.DOMRect( left, top, width, height );\n\t\t\t},\n\t\t};\n\t}, [\n\t\tpreviousElement,\n\t\tnextElement,\n\t\tpopoverRecomputeCounter,\n\t\tisVertical,\n\t\tisVisible,\n\t\toperation,\n\t\tnearestSide,\n\t] );\n\n\tconst popoverScrollRef = usePopoverScroll( __unstableContentRef );\n\n\t// This is only needed for a smooth transition when moving blocks.\n\t// When blocks are moved up/down, their position can be set by\n\t// updating the `transform` property manually (i.e. without using CSS\n\t// transitions or animations). The animation, which can also scroll the block\n\t// editor, can sometimes cause the position of the Popover to get out of sync.\n\t// A MutationObserver is therefore used to make sure that changes to the\n\t// selectedElement's attribute (i.e. `transform`) can be tracked and used to\n\t// trigger the Popover to rerender.\n\tuseLayoutEffect( () => {\n\t\tif ( ! previousElement ) {\n\t\t\treturn;\n\t\t}\n\t\tconst observer = new window.MutationObserver( forcePopoverRecompute );\n\t\tobserver.observe( previousElement, { attributes: true } );\n\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t};\n\t}, [ previousElement ] );\n\n\tuseLayoutEffect( () => {\n\t\tif ( ! nextElement ) {\n\t\t\treturn;\n\t\t}\n\t\tconst observer = new window.MutationObserver( forcePopoverRecompute );\n\t\tobserver.observe( nextElement, { attributes: true } );\n\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t};\n\t}, [ nextElement ] );\n\n\tuseLayoutEffect( () => {\n\t\tif ( ! previousElement ) {\n\t\t\treturn;\n\t\t}\n\t\tpreviousElement.ownerDocument.defaultView.addEventListener(\n\t\t\t'resize',\n\t\t\tforcePopoverRecompute\n\t\t);\n\t\treturn () => {\n\t\t\tpreviousElement.ownerDocument.defaultView?.removeEventListener(\n\t\t\t\t'resize',\n\t\t\t\tforcePopoverRecompute\n\t\t\t);\n\t\t};\n\t}, [ previousElement ] );\n\n\t// If there's either a previous or a next element, show the inbetween popover.\n\t// Note that drag and drop uses the inbetween popover to show the drop indicator\n\t// before the first block and after the last block.\n\tif ( ( ! previousElement && ! nextElement ) || ! isVisible ) {\n\t\treturn null;\n\t}\n\n\t/* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */\n\t// While ideally it would be enough to capture the\n\t// bubbling focus event from the Inserter, due to the\n\t// characteristics of click focusing of `button`s in\n\t// Firefox and Safari, it is not reliable.\n\t//\n\t// See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus\n\treturn (\n\t\t<Popover\n\t\t\tref={ popoverScrollRef }\n\t\t\tanimate={ false }\n\t\t\tanchor={ popoverAnchor }\n\t\t\tfocusOnMount={ false }\n\t\t\t// Render in the old slot if needed for backward compatibility,\n\t\t\t// otherwise render in place (not in the default popover slot).\n\t\t\t__unstableSlotName={ __unstablePopoverSlot }\n\t\t\tinline={ ! __unstablePopoverSlot }\n\t\t\t// Forces a remount of the popover when its position changes\n\t\t\t// This makes sure the popover doesn't animate from its previous position.\n\t\t\tkey={ nextClientId + '--' + rootClientId }\n\t\t\t{ ...props }\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-block-popover',\n\t\t\t\t'block-editor-block-popover__inbetween',\n\t\t\t\tprops.className\n\t\t\t) }\n\t\t\tresize={ false }\n\t\t\tflip={ false }\n\t\t\tplacement=\"overlay\"\n\t\t\tvariant=\"unstyled\"\n\t\t>\n\t\t\t<div className=\"block-editor-block-popover__inbetween-container\">\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</Popover>\n\t);\n\t/* eslint-enable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */\n}\n\nexport default BlockPopoverInbetween;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SACCC,OAAO,EACPC,aAAa,EACbC,UAAU,EACVC,eAAe,QACT,oBAAoB;AAC3B,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,KAAK,QAAQ,iBAAiB;;AAEvC;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,yBAAyB,IAAIC,eAAe,QAAQ,8CAA8C;AAC3G,OAAOC,gBAAgB,MAAM,sBAAsB;AAEnD,MAAMC,6BAA6B,GAAGC,MAAM,CAACC,gBAAgB;AAE7D,OAAO,MAAMC,qBAAqB,GAAGb,aAAa,CAAC,CAAC;AAEpD,SAASc,qBAAqBA,CAAE;EAC/BC,gBAAgB;EAChBC,YAAY;EACZC,QAAQ;EACRC,qBAAqB;EACrBC,oBAAoB;EACpBC,SAAS,GAAG,QAAQ;EACpBC,WAAW,GAAG,OAAO;EACr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[]}
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useMergeRefs","Popover","forwardRef","useMemo","useReducer","useLayoutEffect","__unstableUseBlockElement","useBlockElement","usePopoverScroll","MAX_POPOVER_RECOMPUTE_COUNTER","Number","MAX_SAFE_INTEGER","BlockPopover","clientId","bottomClientId","children","__unstablePopoverSlot","__unstableContentRef","shift","props","ref","selectedElement","lastSelectedElement","mergedRefs","popoverDimensionsRecomputeCounter","forceRecomputePopoverDimensions","s","observer","window","MutationObserver","observe","attributes","disconnect","popoverAnchor","undefined","getBoundingClientRect","_lastSelectedBCR$left","_lastSelectedBCR$top","_lastSelectedBCR$righ","_lastSelectedBCR$bott","selectedBCR","lastSelectedBCR","left","Math","min","Infinity","top","right","max","bottom","width","height","DOMRect","contextElement","createElement","animate","focusOnMount","anchor","__unstableSlotName","inline","placement","resize","flip","className","variant"],"sources":["@wordpress/block-editor/src/components/block-popover/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMergeRefs } from '@wordpress/compose';\nimport { Popover } from '@wordpress/components';\nimport {\n\tforwardRef,\n\tuseMemo,\n\tuseReducer,\n\tuseLayoutEffect,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport usePopoverScroll from './use-popover-scroll';\n\nconst MAX_POPOVER_RECOMPUTE_COUNTER = Number.MAX_SAFE_INTEGER;\n\nfunction BlockPopover(\n\t{\n\t\tclientId,\n\t\tbottomClientId,\n\t\tchildren,\n\t\t__unstablePopoverSlot,\n\t\t__unstableContentRef,\n\t\tshift = true,\n\t\t...props\n\t},\n\tref\n) {\n\tconst selectedElement = useBlockElement( clientId );\n\tconst lastSelectedElement = useBlockElement( bottomClientId ?? clientId );\n\tconst mergedRefs = useMergeRefs( [\n\t\tref,\n\t\tusePopoverScroll( __unstableContentRef ),\n\t] );\n\n\tconst [\n\t\tpopoverDimensionsRecomputeCounter,\n\t\tforceRecomputePopoverDimensions,\n\t] = useReducer(\n\t\t// Module is there to make sure that the counter doesn't overflow.\n\t\t( s ) => ( s + 1 ) % MAX_POPOVER_RECOMPUTE_COUNTER,\n\t\t0\n\t);\n\n\t// When blocks are moved up/down, they are animated to their new position by\n\t// updating the `transform` property manually (i.e. without using CSS\n\t// transitions or animations). The animation, which can also scroll the block\n\t// editor, can sometimes cause the position of the Popover to get out of sync.\n\t// A MutationObserver is therefore used to make sure that changes to the\n\t// selectedElement's attribute (i.e. `transform`) can be tracked and used to\n\t// trigger the Popover to rerender.\n\tuseLayoutEffect( () => {\n\t\tif ( ! selectedElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst observer = new window.MutationObserver(\n\t\t\tforceRecomputePopoverDimensions\n\t\t);\n\t\tobserver.observe( selectedElement, { attributes: true } );\n\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t};\n\t}, [ selectedElement ] );\n\n\tconst popoverAnchor = useMemo( () => {\n\t\tif (\n\t\t\t// popoverDimensionsRecomputeCounter is by definition always equal or greater\n\t\t\t// than 0. This check is only there to satisfy the correctness of the\n\t\t\t// exhaustive-deps rule for the `useMemo` hook.\n\t\t\tpopoverDimensionsRecomputeCounter < 0 ||\n\t\t\t! selectedElement ||\n\t\t\t( bottomClientId && ! lastSelectedElement )\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst selectedBCR = selectedElement.getBoundingClientRect();\n\t\t\t\tconst lastSelectedBCR =\n\t\t\t\t\tlastSelectedElement?.getBoundingClientRect();\n\n\t\t\t\t// Get the biggest rectangle that encompasses completely the currently\n\t\t\t\t// selected element and the last selected element:\n\t\t\t\t// - for top/left coordinates, use the smaller numbers\n\t\t\t\t// - for the bottom/right coordinates, use the largest numbers\n\t\t\t\tconst left = Math.min(\n\t\t\t\t\tselectedBCR.left,\n\t\t\t\t\tlastSelectedBCR?.left ?? Infinity\n\t\t\t\t);\n\t\t\t\tconst top = Math.min(\n\t\t\t\t\tselectedBCR.top,\n\t\t\t\t\tlastSelectedBCR?.top ?? Infinity\n\t\t\t\t);\n\t\t\t\tconst right = Math.max(\n\t\t\t\t\tselectedBCR.right,\n\t\t\t\t\tlastSelectedBCR.right ?? -Infinity\n\t\t\t\t);\n\t\t\t\tconst bottom = Math.max(\n\t\t\t\t\tselectedBCR.bottom,\n\t\t\t\t\tlastSelectedBCR.bottom ?? -Infinity\n\t\t\t\t);\n\t\t\t\tconst width = right - left;\n\t\t\t\tconst height = bottom - top;\n\n\t\t\t\treturn new window.DOMRect( left, top, width, height );\n\t\t\t},\n\t\t\tcontextElement: selectedElement,\n\t\t};\n\t}, [\n\t\tbottomClientId,\n\t\tlastSelectedElement,\n\t\tselectedElement,\n\t\tpopoverDimensionsRecomputeCounter,\n\t] );\n\n\tif ( ! selectedElement || ( bottomClientId && ! lastSelectedElement ) ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Popover\n\t\t\tref={ mergedRefs }\n\t\t\tanimate={ false }\n\t\t\tfocusOnMount={ false }\n\t\t\tanchor={ popoverAnchor }\n\t\t\t// Render in the old slot if needed for backward compatibility,\n\t\t\t// otherwise render in place (not in the default popover slot).\n\t\t\t__unstableSlotName={ __unstablePopoverSlot }\n\t\t\tinline={ ! __unstablePopoverSlot }\n\t\t\tplacement=\"top-start\"\n\t\t\tresize={ false }\n\t\t\tflip={ false }\n\t\t\tshift={ shift }\n\t\t\t{ ...props }\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-block-popover',\n\t\t\t\tprops.className\n\t\t\t) }\n\t\t\tvariant=\"unstyled\"\n\t\t>\n\t\t\t{ children }\n\t\t</Popover>\n\t);\n}\n\nexport default forwardRef( BlockPopover );\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,YAAY,QAAQ,oBAAoB;AACjD,S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c,EAAEhC;IACjB,CAAC;EACF,CAAC,EAAE,CACFP,cAAc,EACdQ,mBAAmB,EACnBD,eAAe,EACfG,iCAAiC,CAChC,CAAC;EAEH,IAAK,CAAEH,eAAe,IAAMP,cAAc,IAAI,CAAEQ,mBAAqB,EAAG;IACvE,OAAO,IAAI;EACZ;EAEA,OACCgC,aAAA,CAACrD,OAAO;IACPmB,GAAG,EAAGG,UAAY;IAClBgC,OAAO,EAAG,KAAO;IACjBC,YAAY,EAAG,KAAO;IACtBC,MAAM,EAAGxB;IACT;IACA;IAAA;IACAyB,kBAAkB,EAAG1C,qBAAuB;IAC5C2C,MAAM,EAAG,CAAE3C,qBAAuB;IAClC4C,SAAS,EAAC,WAAW;IACrBC,MAAM,EAAG,KAAO;IAChBC,IAAI,EAAG,KAAO;IACd5C,KAAK,EAAGA,KAAO;IAAA,GACVC,KAAK;IACV4C,SAAS,EAAGhE,UAAU,CACrB,4BAA4B,EAC5BoB,KAAK,CAAC4C,SACP,CAAG;IACHC,OAAO,EAAC;EAAU,GAEhBjD,QACM,CAAC;AAEZ;AAEA,eAAeb,UAAU,CAAEU,YAAa,CAAC"}
1
+ {"version":3,"names":["classnames","useMergeRefs","Popover","forwardRef","useMemo","useReducer","useLayoutEffect","__unstableUseBlockElement","useBlockElement","usePopoverScroll","MAX_POPOVER_RECOMPUTE_COUNTER","Number","MAX_SAFE_INTEGER","BlockPopover","clientId","bottomClientId","children","__unstablePopoverSlot","__unstableContentRef","shift","props","ref","selectedElement","lastSelectedElement","mergedRefs","popoverDimensionsRecomputeCounter","forceRecomputePopoverDimensions","s","observer","window","MutationObserver","observe","attributes","disconnect","popoverAnchor","undefined","getBoundingClientRect","_lastSelectedBCR$left","_lastSelectedBCR$top","_lastSelectedBCR$righ","_lastSelectedBCR$bott","selectedBCR","lastSelectedBCR","left","Math","min","Infinity","top","right","max","bottom","width","height","DOMRect","contextElement","createElement","animate","focusOnMount","anchor","__unstableSlotName","inline","placement","resize","flip","className","variant"],"sources":["@wordpress/block-editor/src/components/block-popover/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMergeRefs } from '@wordpress/compose';\nimport { Popover } from '@wordpress/components';\nimport {\n\tforwardRef,\n\tuseMemo,\n\tuseReducer,\n\tuseLayoutEffect,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport usePopoverScroll from './use-popover-scroll';\n\nconst MAX_POPOVER_RECOMPUTE_COUNTER = Number.MAX_SAFE_INTEGER;\n\nfunction BlockPopover(\n\t{\n\t\tclientId,\n\t\tbottomClientId,\n\t\tchildren,\n\t\t__unstablePopoverSlot,\n\t\t__unstableContentRef,\n\t\tshift = true,\n\t\t...props\n\t},\n\tref\n) {\n\tconst selectedElement = useBlockElement( clientId );\n\tconst lastSelectedElement = useBlockElement( bottomClientId ?? clientId );\n\tconst mergedRefs = useMergeRefs( [\n\t\tref,\n\t\tusePopoverScroll( __unstableContentRef ),\n\t] );\n\n\tconst [\n\t\tpopoverDimensionsRecomputeCounter,\n\t\tforceRecomputePopoverDimensions,\n\t] = useReducer(\n\t\t// Module is there to make sure that the counter doesn't overflow.\n\t\t( s ) => ( s + 1 ) % MAX_POPOVER_RECOMPUTE_COUNTER,\n\t\t0\n\t);\n\n\t// When blocks are moved up/down, they are animated to their new position by\n\t// updating the `transform` property manually (i.e. without using CSS\n\t// transitions or animations). The animation, which can also scroll the block\n\t// editor, can sometimes cause the position of the Popover to get out of sync.\n\t// A MutationObserver is therefore used to make sure that changes to the\n\t// selectedElement's attribute (i.e. `transform`) can be tracked and used to\n\t// trigger the Popover to rerender.\n\tuseLayoutEffect( () => {\n\t\tif ( ! selectedElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst observer = new window.MutationObserver(\n\t\t\tforceRecomputePopoverDimensions\n\t\t);\n\t\tobserver.observe( selectedElement, { attributes: true } );\n\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t};\n\t}, [ selectedElement ] );\n\n\tconst popoverAnchor = useMemo( () => {\n\t\tif (\n\t\t\t// popoverDimensionsRecomputeCounter is by definition always equal or greater\n\t\t\t// than 0. This check is only there to satisfy the correctness of the\n\t\t\t// exhaustive-deps rule for the `useMemo` hook.\n\t\t\tpopoverDimensionsRecomputeCounter < 0 ||\n\t\t\t! selectedElement ||\n\t\t\t( bottomClientId && ! lastSelectedElement )\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst selectedBCR = selectedElement.getBoundingClientRect();\n\t\t\t\tconst lastSelectedBCR =\n\t\t\t\t\tlastSelectedElement?.getBoundingClientRect();\n\n\t\t\t\t// Get the biggest rectangle that encompasses completely the currently\n\t\t\t\t// selected element and the last selected element:\n\t\t\t\t// - for top/left coordinates, use the smaller numbers\n\t\t\t\t// - for the bottom/right coordinates, use the largest numbers\n\t\t\t\tconst left = Math.min(\n\t\t\t\t\tselectedBCR.left,\n\t\t\t\t\tlastSelectedBCR?.left ?? Infinity\n\t\t\t\t);\n\t\t\t\tconst top = Math.min(\n\t\t\t\t\tselectedBCR.top,\n\t\t\t\t\tlastSelectedBCR?.top ?? Infinity\n\t\t\t\t);\n\t\t\t\tconst right = Math.max(\n\t\t\t\t\tselectedBCR.right,\n\t\t\t\t\tlastSelectedBCR.right ?? -Infinity\n\t\t\t\t);\n\t\t\t\tconst bottom = Math.max(\n\t\t\t\t\tselectedBCR.bottom,\n\t\t\t\t\tlastSelectedBCR.bottom ?? -Infinity\n\t\t\t\t);\n\t\t\t\tconst width = right - left;\n\t\t\t\tconst height = bottom - top;\n\n\t\t\t\treturn new window.DOMRect( left, top, width, height );\n\t\t\t},\n\t\t\tcontextElement: selectedElement,\n\t\t};\n\t}, [\n\t\tbottomClientId,\n\t\tlastSelectedElement,\n\t\tselectedElement,\n\t\tpopoverDimensionsRecomputeCounter,\n\t] );\n\n\tif ( ! selectedElement || ( bottomClientId && ! lastSelectedElement ) ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Popover\n\t\t\tref={ mergedRefs }\n\t\t\tanimate={ false }\n\t\t\tfocusOnMount={ false }\n\t\t\tanchor={ popoverAnchor }\n\t\t\t// Render in the old slot if needed for backward compatibility,\n\t\t\t// otherwise render in place (not in the default popover slot).\n\t\t\t__unstableSlotName={ __unstablePopoverSlot }\n\t\t\tinline={ ! __unstablePopoverSlot }\n\t\t\tplacement=\"top-start\"\n\t\t\tresize={ false }\n\t\t\tflip={ false }\n\t\t\tshift={ shift }\n\t\t\t{ ...props }\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-block-popover',\n\t\t\t\tprops.className\n\t\t\t) }\n\t\t\tvariant=\"unstyled\"\n\t\t>\n\t\t\t{ children }\n\t\t</Popover>\n\t);\n}\n\nexport default forwardRef( BlockPopover );\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SACCC,UAAU,EACVC,OAAO,EACPC,UAAU,EACVC,eAAe,QACT,oBAAoB;;AAE3B;AACA;AACA;AACA,SAASC,yBAAyB,IAAIC,eAAe,QAAQ,8CAA8C;AAC3G,OAAOC,gBAAgB,MAAM,sBAAsB;AAEnD,MAAMC,6BAA6B,GAAGC,MAAM,CAACC,gBAAgB;AAE7D,SAASC,YAAYA,CACpB;EACCC,QAAQ;EACRC,cAAc;EACdC,QAAQ;EACRC,qBAAqB;EACrBC,oBAAoB;EACpBC,KAAK,GAAG,IAAI;EACZ,GAAGC;AACJ,CAAC,EACDC,GAAG,EACF;EACD,MAAMC,eAAe,GAAGd,eAAe,CAAEM,QAAS,CAAC;EACnD,MAAMS,mBAAmB,GAAGf,eAAe,CAAEO,cAAc,aAAdA,cAAc,cAAdA,cAAc,GAAID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V4C,SAAS,EAAGhE,UAAU,CACrB,4BAA4B,EAC5BoB,KAAK,CAAC4C,SACP,CAAG;IACHC,OAAO,EAAC;EAAU,GAEhBjD,QACM,CAAC;AAEZ;AAEA,eAAeb,UAAU,CAAEU,YAAa,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useRefEffect","usePopoverScroll","scrollableRef","node","onWheel","event","deltaX","deltaY","current","scrollBy","options","passive","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/block-popover/use-popover-scroll.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Allow scrolling \"through\" popovers over the canvas. This is only called for\n * as long as the pointer is over a popover. Do not use React events because it\n * will bubble through portals.\n *\n * @param {Object} scrollableRef\n */\nfunction usePopoverScroll( scrollableRef ) {\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( ! scrollableRef ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction onWheel( event ) {\n\t\t\t\tconst { deltaX, deltaY } = event;\n\t\t\t\tscrollableRef.current.scrollBy( deltaX, deltaY );\n\t\t\t}\n\t\t\t// Tell the browser that we do not call event.preventDefault\n\t\t\t// See https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#improving_scrolling_performance_with_passive_listeners\n\t\t\tconst options = { passive: true };\n\t\t\tnode.addEventListener( 'wheel', onWheel, options );\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'wheel', onWheel, options );\n\t\t\t};\n\t\t},\n\t\t[ scrollableRef ]\n\t);\n}\n\nexport default usePopoverScroll;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,oBAAoB;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CAAEC,aAAa,EAAG;EAC1C,OAAOF,YAAY,CAChBG,IAAI,IAAM;IACX,IAAK,CAAED,aAAa,EAAG;MACtB;IACD;IAEA,SAASE,OAAOA,CAAEC,KAAK,EAAG;MACzB,MAAM;QAAEC,MAAM;QAAEC;MAAO,CAAC,GAAGF,KAAK;MAChCH,aAAa,CAACM,OAAO,CAACC,QAAQ,CAAEH,MAAM,EAAEC,MAAO,CAAC;IACjD;IACA;IACA;IACA,MAAMG,OAAO,GAAG;MAAEC,OAAO,EAAE;IAAK,CAAC;IACjCR,IAAI,CAACS,gBAAgB,CAAE,OAAO,EAAER,OAAO,EAAEM,OAAQ,CAAC;IAClD,OAAO,MAAM;MACZP,IAAI,CAACU,mBAAmB,CAAE,OAAO,EAAET,OAAO,EAAEM,OAAQ,CAAC;IACtD,CAAC;EACF,CAAC,EACD,CAAER,aAAa,CAChB,CAAC;AACF;AAEA,eAAeD,gBAAgB"}
1
+ {"version":3,"names":["useRefEffect","usePopoverScroll","scrollableRef","node","onWheel","event","deltaX","deltaY","current","scrollBy","options","passive","addEventListener","removeEventListener"],"sources":["@wordpress/block-editor/src/components/block-popover/use-popover-scroll.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Allow scrolling \"through\" popovers over the canvas. This is only called for\n * as long as the pointer is over a popover. Do not use React events because it\n * will bubble through portals.\n *\n * @param {Object} scrollableRef\n */\nfunction usePopoverScroll( scrollableRef ) {\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( ! scrollableRef ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction onWheel( event ) {\n\t\t\t\tconst { deltaX, deltaY } = event;\n\t\t\t\tscrollableRef.current.scrollBy( deltaX, deltaY );\n\t\t\t}\n\t\t\t// Tell the browser that we do not call event.preventDefault\n\t\t\t// See https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#improving_scrolling_performance_with_passive_listeners\n\t\t\tconst options = { passive: true };\n\t\t\tnode.addEventListener( 'wheel', onWheel, options );\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'wheel', onWheel, options );\n\t\t\t};\n\t\t},\n\t\t[ scrollableRef ]\n\t);\n}\n\nexport default usePopoverScroll;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,oBAAoB;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CAAEC,aAAa,EAAG;EAC1C,OAAOF,YAAY,CAChBG,IAAI,IAAM;IACX,IAAK,CAAED,aAAa,EAAG;MACtB;IACD;IAEA,SAASE,OAAOA,CAAEC,KAAK,EAAG;MACzB,MAAM;QAAEC,MAAM;QAAEC;MAAO,CAAC,GAAGF,KAAK;MAChCH,aAAa,CAACM,OAAO,CAACC,QAAQ,CAAEH,MAAM,EAAEC,MAAO,CAAC;IACjD;IACA;IACA;IACA,MAAMG,OAAO,GAAG;MAAEC,OAAO,EAAE;IAAK,CAAC;IACjCR,IAAI,CAACS,gBAAgB,CAAE,OAAO,EAAER,OAAO,EAAEM,OAAQ,CAAC;IAClD,OAAO,MAAM;MACZP,IAAI,CAACU,mBAAmB,CAAE,OAAO,EAAET,OAAO,EAAEM,OAAQ,CAAC;IACtD,CAAC;EACF,CAAC,EACD,CAAER,aAAa,CAChB,CAAC;AACF;AAEA,eAAeD,gBAAgB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useResizeObserver","useRefEffect","useSelect","memo","useMemo","Disabled","BlockList","Iframe","EditorStyles","store","MemoizedBlockList","MAX_HEIGHT","EMPTY_ADDITIONAL_STYLES","ScaledBlockPreview","viewportWidth","containerWidth","minHeight","additionalStyles","contentResizeListener","height","contentHeight","styles","select","settings","getSettings","editorStyles","css","__unstableType","scale","aspectRatio","createElement","className","style","transform","maxHeight","undefined","contentRef","bodyElement","ownerDocument","documentElement","classList","add","position","width","boxSizing","tabIndex","pointerEvents","renderAppender","AutoBlockPreview","props","containerResizeListener","Fragment"],"sources":["@wordpress/block-editor/src/components/block-preview/auto.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useResizeObserver, useRefEffect } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { memo, useMemo } from '@wordpress/element';\nimport { Disabled } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BlockList from '../block-list';\nimport Iframe from '../iframe';\nimport EditorStyles from '../editor-styles';\nimport { store } from '../../store';\n\n// This is used to avoid rendering the block list if the sizes change.\nlet MemoizedBlockList;\n\nconst MAX_HEIGHT = 2000;\nconst EMPTY_ADDITIONAL_STYLES = [];\n\nfunction ScaledBlockPreview( {\n\tviewportWidth,\n\tcontainerWidth,\n\tminHeight,\n\tadditionalStyles = EMPTY_ADDITIONAL_STYLES,\n} ) {\n\tif ( ! viewportWidth ) {\n\t\tviewportWidth = containerWidth;\n\t}\n\n\tconst [ contentResizeListener, { height: contentHeight } ] =\n\t\tuseResizeObserver();\n\tconst { styles } = useSelect( ( select ) => {\n\t\tconst settings = select( store ).getSettings();\n\t\treturn {\n\t\t\tstyles: settings.styles,\n\t\t};\n\t}, [] );\n\n\t// Avoid scrollbars for pattern previews.\n\tconst editorStyles = useMemo( () => {\n\t\tif ( styles ) {\n\t\t\treturn [\n\t\t\t\t...styles,\n\t\t\t\t{\n\t\t\t\t\tcss: 'body{height:auto;overflow:hidden;border:none;padding:0;}',\n\t\t\t\t\t__unstableType: 'presets',\n\t\t\t\t},\n\t\t\t\t...additionalStyles,\n\t\t\t];\n\t\t}\n\n\t\treturn styles;\n\t}, [ styles, additionalStyles ] );\n\n\t// Initialize on render instead of module top level, to avoid circular dependency issues.\n\tMemoizedBlockList = MemoizedBlockList || memo( BlockList );\n\n\tconst scale = containerWidth / viewportWidth;\n\tconst aspectRatio = contentHeight\n\t\t? containerWidth / ( contentHeight * scale )\n\t\t: 0;\n\treturn (\n\t\t<Disabled\n\t\t\tclassName=\"block-editor-block-preview__content\"\n\t\t\tstyle={ {\n\t\t\t\ttransform: `scale(${ scale })`,\n\t\t\t\t// Using width + aspect-ratio instead of height here triggers browsers' native\n\t\t\t\t// handling of scrollbar's visibility. It prevents the flickering issue seen\n\t\t\t\t// in https://github.com/WordPress/gutenberg/issues/52027.\n\t\t\t\t// See https://github.com/WordPress/gutenberg/pull/52921 for more info.\n\t\t\t\taspectRatio,\n\t\t\t\tmaxHeight:\n\t\t\t\t\tcontentHeight > MAX_HEIGHT ? MAX_HEIGHT * scale : undefined,\n\t\t\t\tminHeight,\n\t\t\t} }\n\t\t>\n\t\t\t<Iframe\n\t\t\t\tcontentRef={ useRefEffect( ( bodyElement ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\townerDocument: { documentElement },\n\t\t\t\t\t} = bodyElement;\n\t\t\t\t\tdocumentElement.classList.add(\n\t\t\t\t\t\t'block-editor-block-preview__content-iframe'\n\t\t\t\t\t);\n\t\t\t\t\tdocumentElement.style.position = 'absolute';\n\t\t\t\t\tdocumentElement.style.width = '100%';\n\n\t\t\t\t\t// Necessary for contentResizeListener to work.\n\t\t\t\t\tbodyElement.style.boxSizing = 'border-box';\n\t\t\t\t\tbodyElement.style.position = 'absolute';\n\t\t\t\t\tbodyElement.style.width = '100%';\n\t\t\t\t}, [] ) }\n\t\t\t\taria-hidden\n\t\t\t\ttabIndex={ -1 }\n\t\t\t\tstyle={ {\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\twidth: viewportWidth,\n\t\t\t\t\theight: contentHeight,\n\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t// This is a catch-all max-height for patterns.\n\t\t\t\t\t// See: https://github.com/WordPress/gutenberg/pull/38175.\n\t\t\t\t\tmaxHeight: MAX_HEIGHT,\n\t\t\t\t\tminHeight:\n\t\t\t\t\t\tscale !== 0 && scale < 1 && minHeight\n\t\t\t\t\t\t\t? minHeight / scale\n\t\t\t\t\t\t\t: minHeight,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<EditorStyles styles={ editorStyles } />\n\t\t\t\t{ contentResizeListener }\n\t\t\t\t<MemoizedBlockList renderAppender={ false } />\n\t\t\t</Iframe>\n\t\t</Disabled>\n\t);\n}\n\nexport default function AutoBlockPreview( props ) {\n\tconst [ containerResizeListener, { width: containerWidth } ] =\n\t\tuseResizeObserver();\n\n\treturn (\n\t\t<>\n\t\t\t<div style={ { position: 'relative', width: '100%', height: 0 } }>\n\t\t\t\t{ containerResizeListener }\n\t\t\t</div>\n\t\t\t<div className=\"block-editor-block-preview__container\">\n\t\t\t\t{ !! containerWidth && (\n\t\t\t\t\t<ScaledBlockPreview\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\tcontainerWidth={ containerWidth }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,iBAAiB,EAAEC,YAAY,QAAQ,oBAAoB;AACpE,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,IAAI,EAAEC,OAAO,QAAQ,oBAAoB;AAClD,SAASC,QAAQ,QAAQ,uBAAuB;;AAEhD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,MAAM,MAAM,WAAW;AAC9B,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,SAASC,KAAK,QAAQ,aAAa;;AAEnC;AACA,IAAIC,iBAAiB;AAErB,MAAMC,UAAU,GAAG,IAAI;AACvB,MAAMC,uBAAuB,GAAG,EAAE;AAElC,SAASC,kBAAkBA,CAAE;EAC5BC,aAAa;EACbC,cAAc;EACdC,SAAS;EACTC,gBAAgB,GAAGL;AACpB,CAAC,EAAG;EACH,IAAK,CAAEE,aAAa,EAAG;IACtBA,aAAa,GAAGC,cAAc;EAC/B;EAEA,MAAM,CAAEG,qBAAqB,EAAE;IAAEC,MAAM,EAAEC;EAAc,CAAC,CAAE,GACzDpB,iBAAiB,CAAC,CAAC;EACpB,MAAM;IAAEqB;EAAO,CAAC,GAAGnB,SAAS,CAAIoB,MAAM,IAAM;IAC3C,MAAMC,QAAQ,GAAGD,MAAM,CAAEb,KAAM,CAAC,CAACe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,CAACU,QAAQ,GAAG,UAAU;MACvCL,WAAW,CAACL,KAAK,CAACW,KAAK,GAAG,MAAM;IACjC,CAAC,EAAE,EAAG,CAAG;IACT,mBAAW;IACXE,QAAQ,EAAG,CAAC,CAAG;IACfb,KAAK,EAAG;MACPU,QAAQ,EAAE,UAAU;MACpBC,KAAK,EAAE7B,aAAa;MACpBK,MAAM,EAAEC,aAAa;MACrB0B,aAAa,EAAE,MAAM;MACrB;MACA;MACAZ,SAAS,EAAEvB,UAAU;MACrBK,SAAS,EACRY,KAAK,KAAK,CAAC,IAAIA,KAAK,GAAG,CAAC,IAAIZ,SAAS,GAClCA,SAAS,GAAGY,KAAK,GACjBZ;IACL;EAAG,GAEHc,aAAA,CAACtB,YAAY;IAACa,MAAM,EAAGI;EAAc,CAAE,CAAC,EACtCP,qBAAqB,EACvBY,aAAA,CAACpB,iBAAiB;IAACqC,cAAc,EAAG;EAAO,CAAE,CACtC,CACC,CAAC;AAEb;AAEA,eAAe,SAASC,gBAAgBA,CAAEC,KAAK,EAAG;EACjD,MAAM,CAAEC,uBAAuB,EAAE;IAAEP,KAAK,EAAE5B;EAAe,CAAC,CAAE,GAC3Df,iBAAiB,CAAC,CAAC;EAEpB,OACC8B,aAAA,CAAAqB,QAAA,QACCrB,aAAA;IAAKE,KAAK,EAAG;MAAEU,QAAQ,EAAE,UAAU;MAAEC,KAAK,EAAE,MAAM;MAAExB,MAAM,EAAE;IAAE;EAAG,GAC9D+B,uBACE,CAAC,EACNpB,aAAA;IAAKC,SAAS,EAAC;EAAuC,GACnD,CAAC,CAAEhB,cAAc,IAClBe,aAAA,CAACjB,kBAAkB;IAAA,GACboC,KAAK;IACVlC,cAAc,EAAGA;EAAgB,CACjC,CAEE,CACJ,CAAC;AAEL"}
1
+ {"version":3,"names":["useResizeObserver","useRefEffect","useSelect","memo","useMemo","Disabled","BlockList","Iframe","EditorStyles","store","MemoizedBlockList","MAX_HEIGHT","EMPTY_ADDITIONAL_STYLES","ScaledBlockPreview","viewportWidth","containerWidth","minHeight","additionalStyles","contentResizeListener","height","contentHeight","styles","select","settings","getSettings","editorStyles","css","__unstableType","scale","aspectRatio","createElement","className","style","transform","maxHeight","undefined","contentRef","bodyElement","ownerDocument","documentElement","classList","add","position","width","boxSizing","tabIndex","pointerEvents","renderAppender","AutoBlockPreview","props","containerResizeListener","Fragment"],"sources":["@wordpress/block-editor/src/components/block-preview/auto.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useResizeObserver, useRefEffect } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { memo, useMemo } from '@wordpress/element';\nimport { Disabled } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BlockList from '../block-list';\nimport Iframe from '../iframe';\nimport EditorStyles from '../editor-styles';\nimport { store } from '../../store';\n\n// This is used to avoid rendering the block list if the sizes change.\nlet MemoizedBlockList;\n\nconst MAX_HEIGHT = 2000;\nconst EMPTY_ADDITIONAL_STYLES = [];\n\nfunction ScaledBlockPreview( {\n\tviewportWidth,\n\tcontainerWidth,\n\tminHeight,\n\tadditionalStyles = EMPTY_ADDITIONAL_STYLES,\n} ) {\n\tif ( ! viewportWidth ) {\n\t\tviewportWidth = containerWidth;\n\t}\n\n\tconst [ contentResizeListener, { height: contentHeight } ] =\n\t\tuseResizeObserver();\n\tconst { styles } = useSelect( ( select ) => {\n\t\tconst settings = select( store ).getSettings();\n\t\treturn {\n\t\t\tstyles: settings.styles,\n\t\t};\n\t}, [] );\n\n\t// Avoid scrollbars for pattern previews.\n\tconst editorStyles = useMemo( () => {\n\t\tif ( styles ) {\n\t\t\treturn [\n\t\t\t\t...styles,\n\t\t\t\t{\n\t\t\t\t\tcss: 'body{height:auto;overflow:hidden;border:none;padding:0;}',\n\t\t\t\t\t__unstableType: 'presets',\n\t\t\t\t},\n\t\t\t\t...additionalStyles,\n\t\t\t];\n\t\t}\n\n\t\treturn styles;\n\t}, [ styles, additionalStyles ] );\n\n\t// Initialize on render instead of module top level, to avoid circular dependency issues.\n\tMemoizedBlockList = MemoizedBlockList || memo( BlockList );\n\n\tconst scale = containerWidth / viewportWidth;\n\tconst aspectRatio = contentHeight\n\t\t? containerWidth / ( contentHeight * scale )\n\t\t: 0;\n\treturn (\n\t\t<Disabled\n\t\t\tclassName=\"block-editor-block-preview__content\"\n\t\t\tstyle={ {\n\t\t\t\ttransform: `scale(${ scale })`,\n\t\t\t\t// Using width + aspect-ratio instead of height here triggers browsers' native\n\t\t\t\t// handling of scrollbar's visibility. It prevents the flickering issue seen\n\t\t\t\t// in https://github.com/WordPress/gutenberg/issues/52027.\n\t\t\t\t// See https://github.com/WordPress/gutenberg/pull/52921 for more info.\n\t\t\t\taspectRatio,\n\t\t\t\tmaxHeight:\n\t\t\t\t\tcontentHeight > MAX_HEIGHT ? MAX_HEIGHT * scale : undefined,\n\t\t\t\tminHeight,\n\t\t\t} }\n\t\t>\n\t\t\t<Iframe\n\t\t\t\tcontentRef={ useRefEffect( ( bodyElement ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\townerDocument: { documentElement },\n\t\t\t\t\t} = bodyElement;\n\t\t\t\t\tdocumentElement.classList.add(\n\t\t\t\t\t\t'block-editor-block-preview__content-iframe'\n\t\t\t\t\t);\n\t\t\t\t\tdocumentElement.style.position = 'absolute';\n\t\t\t\t\tdocumentElement.style.width = '100%';\n\n\t\t\t\t\t// Necessary for contentResizeListener to work.\n\t\t\t\t\tbodyElement.style.boxSizing = 'border-box';\n\t\t\t\t\tbodyElement.style.position = 'absolute';\n\t\t\t\t\tbodyElement.style.width = '100%';\n\t\t\t\t}, [] ) }\n\t\t\t\taria-hidden\n\t\t\t\ttabIndex={ -1 }\n\t\t\t\tstyle={ {\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\twidth: viewportWidth,\n\t\t\t\t\theight: contentHeight,\n\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t// This is a catch-all max-height for patterns.\n\t\t\t\t\t// See: https://github.com/WordPress/gutenberg/pull/38175.\n\t\t\t\t\tmaxHeight: MAX_HEIGHT,\n\t\t\t\t\tminHeight:\n\t\t\t\t\t\tscale !== 0 && scale < 1 && minHeight\n\t\t\t\t\t\t\t? minHeight / scale\n\t\t\t\t\t\t\t: minHeight,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<EditorStyles styles={ editorStyles } />\n\t\t\t\t{ contentResizeListener }\n\t\t\t\t<MemoizedBlockList renderAppender={ false } />\n\t\t\t</Iframe>\n\t\t</Disabled>\n\t);\n}\n\nexport default function AutoBlockPreview( props ) {\n\tconst [ containerResizeListener, { width: containerWidth } ] =\n\t\tuseResizeObserver();\n\n\treturn (\n\t\t<>\n\t\t\t<div style={ { position: 'relative', width: '100%', height: 0 } }>\n\t\t\t\t{ containerResizeListener }\n\t\t\t</div>\n\t\t\t<div className=\"block-editor-block-preview__container\">\n\t\t\t\t{ !! containerWidth && (\n\t\t\t\t\t<ScaledBlockPreview\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\tcontainerWidth={ containerWidth }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,iBAAiB,EAAEC,YAAY,QAAQ,oBAAoB;AACpE,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,IAAI,EAAEC,OAAO,QAAQ,oBAAoB;AAClD,SAASC,QAAQ,QAAQ,uBAAuB;;AAEhD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,MAAM,MAAM,WAAW;AAC9B,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,SAASC,KAAK,QAAQ,aAAa;;AAEnC;AACA,IAAIC,iBAAiB;AAErB,MAAMC,UAAU,GAAG,IAAI;AACvB,MAAMC,uBAAuB,GAAG,EAAE;AAElC,SAASC,kBAAkBA,CAAE;EAC5BC,aAAa;EACbC,cAAc;EACdC,SAAS;EACTC,gBAAgB,GAAGL;AACpB,CA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IAAKC,SAAS,EAAC;EAAuC,GACnD,CAAC,CAAEhB,cAAc,IAClBe,aAAA,CAACjB,kBAAkB;IAAA,GACboC,KAAK;IACVlC,cAAc,EAAGA;EAAgB,CACjC,CAEE,CACJ,CAAC;AAEL","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useDisabled","useMergeRefs","useSelect","memo","useMemo","deprecated","ExperimentalBlockEditorProvider","AutoHeightBlockPreview","EditorStyles","store","blockEditorStore","BlockListItems","EMPTY_ADDITIONAL_STYLES","BlockPreview","blocks","viewportWidth","minHeight","additionalStyles","__experimentalMinHeight","__experimentalPadding","since","version","alternative","css","originalSettings","select","getSettings","settings","focusMode","__unstableIsPreviewMode","renderedBlocks","Array","isArray","length","createElement","value","useBlockPreview","props","layout","styles","undefined","disabledRef","ref","children","renderAppender","className"],"sources":["@wordpress/block-editor/src/components/block-preview/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useDisabled, useMergeRefs } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { memo, useMemo } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { ExperimentalBlockEditorProvider } from '../provider';\nimport AutoHeightBlockPreview from './auto';\nimport EditorStyles from '../editor-styles';\nimport { store as blockEditorStore } from '../../store';\nimport { BlockListItems } from '../block-list';\n\nconst EMPTY_ADDITIONAL_STYLES = [];\n\nexport function BlockPreview( {\n\tblocks,\n\tviewportWidth = 1200,\n\tminHeight,\n\tadditionalStyles = EMPTY_ADDITIONAL_STYLES,\n\t// Deprecated props:\n\t__experimentalMinHeight,\n\t__experimentalPadding,\n} ) {\n\tif ( __experimentalMinHeight ) {\n\t\tminHeight = __experimentalMinHeight;\n\t\tdeprecated( 'The __experimentalMinHeight prop', {\n\t\t\tsince: '6.2',\n\t\t\tversion: '6.4',\n\t\t\talternative: 'minHeight',\n\t\t} );\n\t}\n\tif ( __experimentalPadding ) {\n\t\tadditionalStyles = [\n\t\t\t...additionalStyles,\n\t\t\t{ css: `body { padding: ${ __experimentalPadding }px; }` },\n\t\t];\n\t\tdeprecated( 'The __experimentalPadding prop of BlockPreview', {\n\t\t\tsince: '6.2',\n\t\t\tversion: '6.4',\n\t\t\talternative: 'additionalStyles',\n\t\t} );\n\t}\n\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tfocusMode: false, // Disable \"Spotlight mode\".\n\t\t\t__unstableIsPreviewMode: true,\n\t\t} ),\n\t\t[ originalSettings ]\n\t);\n\tconst renderedBlocks = useMemo(\n\t\t() => ( Array.isArray( blocks ) ? blocks : [ blocks ] ),\n\t\t[ blocks ]\n\t);\n\n\tif ( ! blocks || blocks.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ExperimentalBlockEditorProvider\n\t\t\tvalue={ renderedBlocks }\n\t\t\tsettings={ settings }\n\t\t>\n\t\t\t<AutoHeightBlockPreview\n\t\t\t\tviewportWidth={ viewportWidth }\n\t\t\t\tminHeight={ minHeight }\n\t\t\t\tadditionalStyles={ additionalStyles }\n\t\t\t/>\n\t\t</ExperimentalBlockEditorProvider>\n\t);\n}\n\n/**\n * BlockPreview renders a preview of a block or array of blocks.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-preview/README.md\n *\n * @param {Object} preview options for how the preview should be shown\n * @param {Array|Object} preview.blocks A block instance (object) or an array of blocks to be previewed.\n * @param {number} preview.viewportWidth Width of the preview container in pixels. Controls at what size the blocks will be rendered inside the preview. Default: 700.\n *\n * @return {Component} The component to be rendered.\n */\nexport default memo( BlockPreview );\n\n/**\n * This hook is used to lightly mark an element as a block preview wrapper\n * element. Call this hook and pass the returned props to the element to mark as\n * a block preview wrapper, automatically rendering inner blocks as children. If\n * you define a ref for the element, it is important to pass the ref to this\n * hook, which the hook in turn will pass to the component through the props it\n * returns. Optionally, you can also pass any other props through this hook, and\n * they will be merged and returned.\n *\n * @param {Object} options Preview options.\n * @param {WPBlock[]} options.blocks Block objects.\n * @param {Object} options.props Optional. Props to pass to the element. Must contain\n * the ref if one is defined.\n * @param {Object} options.layout Layout settings to be used in the preview.\n */\nexport function useBlockPreview( { blocks, props = {}, layout } ) {\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tstyles: undefined, // Clear styles included by the parent settings, as they are already output by the parent's EditorStyles.\n\t\t\tfocusMode: false, // Disable \"Spotlight mode\".\n\t\t\t__unstableIsPreviewMode: true,\n\t\t} ),\n\t\t[ originalSettings ]\n\t);\n\tconst disabledRef = useDisabled();\n\tconst ref = useMergeRefs( [ props.ref, disabledRef ] );\n\tconst renderedBlocks = useMemo(\n\t\t() => ( Array.isArray( blocks ) ? blocks : [ blocks ] ),\n\t\t[ blocks ]\n\t);\n\n\tconst children = (\n\t\t<ExperimentalBlockEditorProvider\n\t\t\tvalue={ renderedBlocks }\n\t\t\tsettings={ settings }\n\t\t>\n\t\t\t<EditorStyles />\n\t\t\t<BlockListItems renderAppender={ false } layout={ layout } />\n\t\t</ExperimentalBlockEditorProvider>\n\t);\n\n\treturn {\n\t\t...props,\n\t\tref,\n\t\tclassName: classnames(\n\t\t\tprops.className,\n\t\t\t'block-editor-block-preview__live-content',\n\t\t\t'components-disabled'\n\t\t),\n\t\tchildren: blocks?.length ? children : null,\n\t};\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,WAAW,EAAEC,YAAY,QAAQ,oBAAoB;AAC9D,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,IAAI,EAAEC,OAAO,QAAQ,oBAAoB;A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AAElB,MAAO,CAAC,GAAGA,MAAM,GAAG,CAAEA,MAAM,CAAI,EACvD,CAAEA,MAAM,CACT,CAAC;EAED,MAAM6B,QAAQ,GACbT,aAAA,CAAC5B,+BAA+B;IAC/B6B,KAAK,EAAGL,cAAgB;IACxBH,QAAQ,EAAGA;EAAU,GAErBO,aAAA,CAAC1B,YAAY,MAAE,CAAC,EAChB0B,aAAA,CAACvB,cAAc;IAACiC,cAAc,EAAG,KAAO;IAACN,MAAM,EAAGA;EAAQ,CAAE,CAC5B,CACjC;EAED,OAAO;IACN,GAAGD,KAAK;IACRK,GAAG;IACHG,SAAS,EAAE9C,UAAU,CACpBsC,KAAK,CAACQ,SAAS,EACf,0CAA0C,EAC1C,qBACD,CAAC;IACDF,QAAQ,EAAE7B,MAAM,EAAEmB,MAAM,GAAGU,QAAQ,GAAG;EACvC,CAAC;AACF"}
1
+ {"version":3,"names":["classnames","useDisabled","useMergeRefs","useSelect","memo","useMemo","deprecated","ExperimentalBlockEditorProvider","AutoHeightBlockPreview","EditorStyles","store","blockEditorStore","BlockListItems","EMPTY_ADDITIONAL_STYLES","BlockPreview","blocks","viewportWidth","minHeight","additionalStyles","__experimentalMinHeight","__experimentalPadding","since","version","alternative","css","originalSettings","select","getSettings","settings","focusMode","__unstableIsPreviewMode","renderedBlocks","Array","isArray","length","createElement","value","useBlockPreview","props","layout","styles","undefined","disabledRef","ref","children","renderAppender","className"],"sources":["@wordpress/block-editor/src/components/block-preview/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useDisabled, useMergeRefs } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { memo, useMemo } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { ExperimentalBlockEditorProvider } from '../provider';\nimport AutoHeightBlockPreview from './auto';\nimport EditorStyles from '../editor-styles';\nimport { store as blockEditorStore } from '../../store';\nimport { BlockListItems } from '../block-list';\n\nconst EMPTY_ADDITIONAL_STYLES = [];\n\nexport function BlockPreview( {\n\tblocks,\n\tviewportWidth = 1200,\n\tminHeight,\n\tadditionalStyles = EMPTY_ADDITIONAL_STYLES,\n\t// Deprecated props:\n\t__experimentalMinHeight,\n\t__experimentalPadding,\n} ) {\n\tif ( __experimentalMinHeight ) {\n\t\tminHeight = __experimentalMinHeight;\n\t\tdeprecated( 'The __experimentalMinHeight prop', {\n\t\t\tsince: '6.2',\n\t\t\tversion: '6.4',\n\t\t\talternative: 'minHeight',\n\t\t} );\n\t}\n\tif ( __experimentalPadding ) {\n\t\tadditionalStyles = [\n\t\t\t...additionalStyles,\n\t\t\t{ css: `body { padding: ${ __experimentalPadding }px; }` },\n\t\t];\n\t\tdeprecated( 'The __experimentalPadding prop of BlockPreview', {\n\t\t\tsince: '6.2',\n\t\t\tversion: '6.4',\n\t\t\talternative: 'additionalStyles',\n\t\t} );\n\t}\n\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tfocusMode: false, // Disable \"Spotlight mode\".\n\t\t\t__unstableIsPreviewMode: true,\n\t\t} ),\n\t\t[ originalSettings ]\n\t);\n\tconst renderedBlocks = useMemo(\n\t\t() => ( Array.isArray( blocks ) ? blocks : [ blocks ] ),\n\t\t[ blocks ]\n\t);\n\n\tif ( ! blocks || blocks.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ExperimentalBlockEditorProvider\n\t\t\tvalue={ renderedBlocks }\n\t\t\tsettings={ settings }\n\t\t>\n\t\t\t<AutoHeightBlockPreview\n\t\t\t\tviewportWidth={ viewportWidth }\n\t\t\t\tminHeight={ minHeight }\n\t\t\t\tadditionalStyles={ additionalStyles }\n\t\t\t/>\n\t\t</ExperimentalBlockEditorProvider>\n\t);\n}\n\n/**\n * BlockPreview renders a preview of a block or array of blocks.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-preview/README.md\n *\n * @param {Object} preview options for how the preview should be shown\n * @param {Array|Object} preview.blocks A block instance (object) or an array of blocks to be previewed.\n * @param {number} preview.viewportWidth Width of the preview container in pixels. Controls at what size the blocks will be rendered inside the preview. Default: 700.\n *\n * @return {Component} The component to be rendered.\n */\nexport default memo( BlockPreview );\n\n/**\n * This hook is used to lightly mark an element as a block preview wrapper\n * element. Call this hook and pass the returned props to the element to mark as\n * a block preview wrapper, automatically rendering inner blocks as children. If\n * you define a ref for the element, it is important to pass the ref to this\n * hook, which the hook in turn will pass to the component through the props it\n * returns. Optionally, you can also pass any other props through this hook, and\n * they will be merged and returned.\n *\n * @param {Object} options Preview options.\n * @param {WPBlock[]} options.blocks Block objects.\n * @param {Object} options.props Optional. Props to pass to the element. Must contain\n * the ref if one is defined.\n * @param {Object} options.layout Layout settings to be used in the preview.\n */\nexport function useBlockPreview( { blocks, props = {}, layout } ) {\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tstyles: undefined, // Clear styles included by the parent settings, as they are already output by the parent's EditorStyles.\n\t\t\tfocusMode: false, // Disable \"Spotlight mode\".\n\t\t\t__unstableIsPreviewMode: true,\n\t\t} ),\n\t\t[ originalSettings ]\n\t);\n\tconst disabledRef = useDisabled();\n\tconst ref = useMergeRefs( [ props.ref, disabledRef ] );\n\tconst renderedBlocks = useMemo(\n\t\t() => ( Array.isArray( blocks ) ? blocks : [ blocks ] ),\n\t\t[ blocks ]\n\t);\n\n\tconst children = (\n\t\t<ExperimentalBlockEditorProvider\n\t\t\tvalue={ renderedBlocks }\n\t\t\tsettings={ settings }\n\t\t>\n\t\t\t<EditorStyles />\n\t\t\t<BlockListItems renderAppender={ false } layout={ layout } />\n\t\t</ExperimentalBlockEditorProvider>\n\t);\n\n\treturn {\n\t\t...props,\n\t\tref,\n\t\tclassName: classnames(\n\t\t\tprops.className,\n\t\t\t'block-editor-block-preview__live-content',\n\t\t\t'components-disabled'\n\t\t),\n\t\tchildren: blocks?.length ? children : null,\n\t};\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,WAAW,EAAEC,YAAY,QAAQ,oBAAoB;AAC9D,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,IAAI,EAAEC,OAAO,QAAQ,oBAAoB;AAClD,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,SAASC,+BAA+B,QAAQ,aAAa;AAC7D,OAAOC,sBAAsB,MAAM,QAAQ;AAC3C,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,cAAc,QAAQ,eAAe;AAE9C,MAAMC,uBAAuB,GAAG,EAAE;AAElC,OAAO,SAASC,YAAYA,CAAE;EAC7BC,MAAM;EACNC,aAAa,GAAG,IAAI;EACpBC,SAAS;EACTC,gBAAgB,GAAGL,uBAAuB;EAC1C;EACAM,uBAAuB;EACvBC;AACD,CAAC,EAAG;EACH,IAAKD,uBAAuB,EAAG;IAC9BF,SAAS,GAAGE,uBAAuB;IACnCb,UAAU,CAAE,kCAAkC,EAAE;MAC/Ce,KAAK,EAAE,KAAK;MACZC,OAAO,EAAE,KAAK;MACdC,WAAW,EAAE;IACd,CAAE,CAAC;EACJ;EACA,IAAKH,qBAAqB,EAAG;IAC5BF,gBAAgB,GAAG,CAClB,GAAGA,gBAAgB,EACnB;MAAEM,GAAG,EAAG,mBAAmBJ,qBAAuB;IAAO,CAAC,CAC1D;IACDd,UAAU,CAAE,gDAAgD,EAAE;MAC7De,KAAK,EAAE,KAAK;MACZC,OAAO,EAAE,KAAK;MACdC,WAAW,EAAE;IACd,CAAE,CAAC;EACJ;EAEA,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GoB,gBAAgB;IACnBe,MAAM,EAAEC,SAAS;IAAE;IACnBZ,SAAS,EAAE,KAAK;IAAE;IAClBC,uBAAuB,EAAE;EAC1B,CAAC,CAAE,EACH,CAAEL,gBAAgB,CACnB,CAAC;EACD,MAAMiB,WAAW,GAAGzC,WAAW,CAAC,CAAC;EACjC,MAAM0C,GAAG,GAAGzC,YAAY,CAAE,CAAEoC,KAAK,CAACK,GAAG,EAAED,WAAW,CAAG,CAAC;EACtD,MAAMX,cAAc,GAAG1B,OAAO,CAC7B,MAAQ2B,KAAK,CAACC,OAAO,CAAElB,MAAO,CAAC,GAAGA,MAAM,GAAG,CAAEA,MAAM,CAAI,EACvD,CAAEA,MAAM,CACT,CAAC;EAED,MAAM6B,QAAQ,GACbT,aAAA,CAAC5B,+BAA+B;IAC/B6B,KAAK,EAAGL,cAAgB;IACxBH,QAAQ,EAAGA;EAAU,GAErBO,aAAA,CAAC1B,YAAY,MAAE,CAAC,EAChB0B,aAAA,CAACvB,cAAc;IAACiC,cAAc,EAAG,KAAO;IAACN,MAAM,EAAGA;EAAQ,CAAE,CAC5B,CACjC;EAED,OAAO;IACN,GAAGD,KAAK;IACRK,GAAG;IACHG,SAAS,EAAE9C,UAAU,CACpBsC,KAAK,CAACQ,SAAS,EACf,0CAA0C,EAC1C,qBACD,CAAC;IACDF,QAAQ,EAAE7B,MAAM,EAAEmB,MAAM,GAAGU,QAAQ,GAAG;EACvC,CAAC;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","useDispatch","Button","__experimentalVStack","VStack","__experimentalTruncate","Truncate","Flex","FlexBlock","FlexItem","__experimentalGetBlockLabel","store","blocksStore","blockEditorStore","BlockIcon","BlockQuickNavigation","clientIds","length","createElement","spacing","map","clientId","BlockQuickNavigationItem","key","name","icon","isSelected","select","getBlockName","getBlockAttributes","isBlockSelected","hasSelectedInnerBlock","getBlockType","blockType","attributes","selectBlock","isPressed","onClick","style","textAlign"],"sources":["@wordpress/block-editor/src/components/block-quick-navigation/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__experimentalVStack as VStack,\n\t__experimentalTruncate as Truncate,\n\tFlex,\n\tFlexBlock,\n\tFlexItem,\n} from '@wordpress/components';\nimport {\n\t__experimentalGetBlockLabel,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport BlockIcon from '../block-icon';\n\nexport default function BlockQuickNavigation( { clientIds } ) {\n\tif ( ! clientIds.length ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<VStack spacing={ 1 }>\n\t\t\t{ clientIds.map( ( clientId ) => (\n\t\t\t\t<BlockQuickNavigationItem\n\t\t\t\t\tkey={ clientId }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</VStack>\n\t);\n}\n\nfunction BlockQuickNavigationItem( { clientId } ) {\n\tconst { name, icon, isSelected } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tisBlockSelected,\n\t\t\t\thasSelectedInnerBlock,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { getBlockType } = select( blocksStore );\n\n\t\t\tconst blockType = getBlockType( getBlockName( clientId ) );\n\t\t\tconst attributes = getBlockAttributes( clientId );\n\n\t\t\treturn {\n\t\t\t\tname:\n\t\t\t\t\tblockType &&\n\t\t\t\t\t__experimentalGetBlockLabel(\n\t\t\t\t\t\tblockType,\n\t\t\t\t\t\tattributes,\n\t\t\t\t\t\t'list-view'\n\t\t\t\t\t),\n\t\t\t\ticon: blockType?.icon,\n\t\t\t\tisSelected:\n\t\t\t\t\tisBlockSelected( clientId ) ||\n\t\t\t\t\thasSelectedInnerBlock( clientId, /* deep: */ true ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\n\treturn (\n\t\t<Button\n\t\t\tisPressed={ isSelected }\n\t\t\tonClick={ () => selectBlock( clientId ) }\n\t\t>\n\t\t\t<Flex>\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<BlockIcon icon={ icon } />\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexBlock style={ { textAlign: 'left' } }>\n\t\t\t\t\t<Truncate>{ name }</Truncate>\n\t\t\t\t</FlexBlock>\n\t\t\t</Flex>\n\t\t</Button>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCC,MAAM,EACNC,oBAAoB,IAAIC,MAAM,EAC9BC,sBAAsB,IAAIC,QAAQ,EAClCC,IAAI,EACJC,SAAS,EACTC,QAAQ,QACF,uBAAuB;AAC9B,SACCC,2BAA2B,EAC3BC,KAAK,IAAIC,WAAW,QACd,mBAAmB;;AAE1B;AACA;AACA;AACA,SAASD,KAAK,IAAIE,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,SAAS,MAAM,eAAe;AAErC,eAAe,SAASC,oBAAoBA,CAAE;EAAEC;AAAU,CAAC,EAAG;EAC7D,IAAK,CAAEA,SAAS,CAACC,MAAM,EAAG;IACzB,OAAO,IAAI;EACZ;EACA,OACCC,aAAA,CAACd,MAAM;IAACe,OAAO,EAAG;EAAG,GAClBH,SAAS,CAACI,GAAG,CAAIC,QAAQ,IAC1BH,aAAA,CAACI,wBAAwB;IACxBC,GAAG,EAAGF,QAAU;IAChBA,QAAQ,EAAGA;EAAU,CACrB,CACA,CACK,CAAC;AAEX;AAEA,SAASC,wBAAwBA,CAAE;EAAED;AAAS,CAAC,EAAG;EACjD,MAAM;IAAEG,IAAI;IAAEC,IAAI;IAAEC;EAAW,CAAC,GAAG1B,SAAS,CACzC2B,MAAM,IAAM;IACb,MAAM;MACLC,YAAY;MACZC,kBAAkB;MAClBC,eAAe;MACfC;IACD,CAAC,GAAGJ,MAAM,CAAEd,gBAAiB,CAAC;IAC9B,MAAM;MAAEmB;IAAa,CAAC,GAAGL,MAAM,CAAEf,WAAY,CAAC;IAE9C,MAAMqB,SAAS,GAAGD,YAAY,CAAEJ,YAAY,CAAEP,QAAS,CAAE,CAAC;IAC1D,MAAMa,UAAU,GAAGL,kBAAkB,CAAER,QAAS,CAAC;IAEjD,OAAO;MACNG,IAAI,EACHS,SAAS,IACTvB,2BAA2B,CAC1BuB,SAAS,EACTC,UAAU,EACV,WACD,CAAC;MACFT,IAAI,EAAEQ,SAAS,EAAER,IAAI;MACrBC,UAAU,EACTI,eAAe,CAAET,QAAS,CAAC,IAC3BU,qBAAqB,CAAEV,QAAQ,EAAE,WAAY,IAAK;IACpD,CAAC;EACF,CAAC,EACD,CAAEA,QAAQ,CACX,CAAC;EACD,MAAM;IAAEc;EAAY,CAAC,GAAGlC,WAAW,CAAEY,gBAAiB,CAAC;EAEvD,OACCK,aAAA,CAAChB,MAAM;IACNkC,SAAS,EAAGV,UAAY;IACxBW,OAAO,EAAGA,CAAA,KAAMF,WAAW,CAAEd,QAAS;EAAG,GAEzCH,aAAA,CAACX,IAAI,QACJW,aAAA,CAACT,QAAQ,QACRS,aAAA,CAACJ,SAAS;IAACW,IAAI,EAAGA;EAAM,CAAE,CACjB,CAAC,EACXP,aAAA,CAACV,SAAS;IAAC8B,KAAK,EAAG;MAAEC,SAAS,EAAE;IAAO;EAAG,GACzCrB,aAAA,CAACZ,QAAQ,QAAGkB,IAAgB,CAClB,CACN,CACC,CAAC;AAEX"}
1
+ {"version":3,"names":["useSelect","useDispatch","Button","__experimentalVStack","VStack","__experimentalTruncate","Truncate","Flex","FlexBlock","FlexItem","__experimentalGetBlockLabel","store","blocksStore","blockEditorStore","BlockIcon","BlockQuickNavigation","clientIds","length","createElement","spacing","map","clientId","BlockQuickNavigationItem","key","name","icon","isSelected","select","getBlockName","getBlockAttributes","isBlockSelected","hasSelectedInnerBlock","getBlockType","blockType","attributes","selectBlock","isPressed","onClick","style","textAlign"],"sources":["@wordpress/block-editor/src/components/block-quick-navigation/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__experimentalVStack as VStack,\n\t__experimentalTruncate as Truncate,\n\tFlex,\n\tFlexBlock,\n\tFlexItem,\n} from '@wordpress/components';\nimport {\n\t__experimentalGetBlockLabel,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport BlockIcon from '../block-icon';\n\nexport default function BlockQuickNavigation( { clientIds } ) {\n\tif ( ! clientIds.length ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<VStack spacing={ 1 }>\n\t\t\t{ clientIds.map( ( clientId ) => (\n\t\t\t\t<BlockQuickNavigationItem\n\t\t\t\t\tkey={ clientId }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</VStack>\n\t);\n}\n\nfunction BlockQuickNavigationItem( { clientId } ) {\n\tconst { name, icon, isSelected } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tisBlockSelected,\n\t\t\t\thasSelectedInnerBlock,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { getBlockType } = select( blocksStore );\n\n\t\t\tconst blockType = getBlockType( getBlockName( clientId ) );\n\t\t\tconst attributes = getBlockAttributes( clientId );\n\n\t\t\treturn {\n\t\t\t\tname:\n\t\t\t\t\tblockType &&\n\t\t\t\t\t__experimentalGetBlockLabel(\n\t\t\t\t\t\tblockType,\n\t\t\t\t\t\tattributes,\n\t\t\t\t\t\t'list-view'\n\t\t\t\t\t),\n\t\t\t\ticon: blockType?.icon,\n\t\t\t\tisSelected:\n\t\t\t\t\tisBlockSelected( clientId ) ||\n\t\t\t\t\thasSelectedInnerBlock( clientId, /* deep: */ true ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\n\treturn (\n\t\t<Button\n\t\t\tisPressed={ isSelected }\n\t\t\tonClick={ () => selectBlock( clientId ) }\n\t\t>\n\t\t\t<Flex>\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<BlockIcon icon={ icon } />\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexBlock style={ { textAlign: 'left' } }>\n\t\t\t\t\t<Truncate>{ name }</Truncate>\n\t\t\t\t</FlexBlock>\n\t\t\t</Flex>\n\t\t</Button>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SACCC,MAAM,EACNC,oBAAoB,IAAIC,MAAM,EAC9BC,sBAAsB,IAAIC,QAAQ,EAClCC,IAAI,EACJC,SAAS,EACTC,QAAQ,QACF,uBAAuB;AAC9B,SACCC,2BAA2B,EAC3BC,KAAK,IAAIC,WAAW,QACd,mBAAmB;;AAE1B;AACA;AACA;AACA,SAASD,KAAK,IAAIE,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,SAAS,MAAM,eAAe;AAErC,eAAe,SAASC,oBAAoBA,CAAE;EAAEC;AAAU,CAAC,EAAG;EAC7D,IAAK,CAAEA,SAAS,CAACC,MAAM,EAAG;IACzB,OAAO,IAAI;EACZ;EACA,OACCC,aAAA,CAACd,MAAM;IAACe,OAAO,EAAG;EAAG,GAClBH,SAAS,CAACI,GAAG,CAAIC,QAAQ,IAC1BH,aAAA,CAACI,wBAAwB;IACxBC,GAAG,EAAGF,QAAU;IAChBA,QAAQ,EAAGA;EAAU,CACrB,CACA,CACK,CAAC;AAEX;AAEA,SAASC,wBAAwBA,CAAE;EAAED;AAAS,CAAC,EAAG;EACjD,MAAM;IAAEG,IAAI;IAAEC,IAAI;IAAEC;EAAW,CAAC,GAAG1B,SAAS,CACzC2B,MAAM,IAAM;IACb,MAAM;MACLC,YAAY;MACZC,kBAAkB;MAClBC,eAAe;MACfC;IACD,CAAC,GAAGJ,MAAM,CAAEd,gBAAiB,CAAC;IAC9B,MAAM;MAAEmB;IAAa,CAAC,GAAGL,MAAM,CAAEf,WAAY,CAAC;IAE9C,MAAMqB,SAAS,GAAGD,YAAY,CAAEJ,YAAY,CAAEP,QAAS,CAAE,CAAC;IAC1D,MAAMa,UAAU,GAAGL,kBAAkB,CAAER,QAAS,CAAC;IAEjD,OAAO;MACNG,IAAI,EACHS,SAAS,IACTvB,2BAA2B,CAC1BuB,SAAS,EACTC,UAAU,EACV,WACD,CAAC;MACFT,IAAI,EAAEQ,SAAS,EAAER,IAAI;MACrBC,UAAU,EACTI,eAAe,CAAET,QAAS,CAAC,IAC3BU,qBAAqB,CAAEV,QAAQ,EAAE,WAAY,IAAK;IACpD,CAAC;EACF,CAAC,EACD,CAAEA,QAAQ,CACX,CAAC;EACD,MAAM;IAAEc;EAAY,CAAC,GAAGlC,WAAW,CAAEY,gBAAiB,CAAC;EAEvD,OACCK,aAAA,CAAChB,MAAM;IACNkC,SAAS,EAAGV,UAAY;IACxBW,OAAO,EAAGA,CAAA,KAAMF,WAAW,CAAEd,QAAS;EAAG,GAEzCH,aAAA,CAACX,IAAI,QACJW,aAAA,CAACT,QAAQ,QACRS,aAAA,CAACJ,SAAS;IAACW,IAAI,EAAGA;EAAM,CAAE,CACjB,CAAC,EACXP,aAAA,CAACV,SAAS;IAAC8B,KAAK,EAAG;MAAEC,SAAS,EAAE;IAAO;EAAG,GACzCrB,aAAA,CAACZ,QAAQ,QAAGkB,IAAgB,CAClB,CACN,CACC,CAAC;AAEX","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useDispatch","useSelect","Modal","Button","__experimentalHStack","HStack","__","store","blockEditorStore","unlock","BlockRemovalWarningModal","rules","clientIds","selectPrevious","message","select","getRemovalPromptData","clearBlockRemovalPrompt","setBlockRemovalRules","privateRemoveBlocks","onConfirmRemoval","createElement","title","onRequestClose","size","justify","variant","onClick"],"sources":["@wordpress/block-editor/src/components/block-removal-warning-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tModal,\n\tButton,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nexport function BlockRemovalWarningModal( { rules } ) {\n\tconst { clientIds, selectPrevious, message } = useSelect( ( select ) =>\n\t\tunlock( select( blockEditorStore ) ).getRemovalPromptData()\n\t);\n\n\tconst {\n\t\tclearBlockRemovalPrompt,\n\t\tsetBlockRemovalRules,\n\t\tprivateRemoveBlocks,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\n\t// Load block removal rules, simultaneously signalling that the block\n\t// removal prompt is in place.\n\tuseEffect( () => {\n\t\tsetBlockRemovalRules( rules );\n\t\treturn () => {\n\t\t\tsetBlockRemovalRules();\n\t\t};\n\t}, [ rules, setBlockRemovalRules ] );\n\n\tif ( ! message ) {\n\t\treturn;\n\t}\n\n\tconst onConfirmRemoval = () => {\n\t\tprivateRemoveBlocks( clientIds, selectPrevious, /* force */ true );\n\t\tclearBlockRemovalPrompt();\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ __( 'Be careful!' ) }\n\t\t\tonRequestClose={ clearBlockRemovalPrompt }\n\t\t\tsize=\"medium\"\n\t\t>\n\t\t\t<p>{ message }</p>\n\t\t\t<HStack justify=\"right\">\n\t\t\t\t<Button variant=\"tertiary\" onClick={ clearBlockRemovalPrompt }>\n\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t</Button>\n\t\t\t\t<Button variant=\"primary\" onClick={ onConfirmRemoval }>\n\t\t\t\t\t{ __( 'Delete' ) }\n\t\t\t\t</Button>\n\t\t\t</HStack>\n\t\t</Modal>\n\t);\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,MAAM;IAACoB,OAAO,EAAC;EAAO,GACtBJ,aAAA,CAAClB,MAAM;IAACuB,OAAO,EAAC,UAAU;IAACC,OAAO,EAAGV;EAAyB,GAC3DX,EAAE,CAAE,QAAS,CACR,CAAC,EACTe,aAAA,CAAClB,MAAM;IAACuB,OAAO,EAAC,SAAS;IAACC,OAAO,EAAGP;EAAkB,GACnDd,EAAE,CAAE,QAAS,CACR,CACD,CACF,CAAC;AAEV"}
1
+ {"version":3,"names":["useEffect","useDispatch","useSelect","Modal","Button","__experimentalHStack","HStack","__","store","blockEditorStore","unlock","BlockRemovalWarningModal","rules","clientIds","selectPrevious","message","select","getRemovalPromptData","clearBlockRemovalPrompt","setBlockRemovalRules","privateRemoveBlocks","onConfirmRemoval","createElement","title","onRequestClose","size","justify","variant","onClick"],"sources":["@wordpress/block-editor/src/components/block-removal-warning-modal/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tModal,\n\tButton,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nexport function BlockRemovalWarningModal( { rules } ) {\n\tconst { clientIds, selectPrevious, message } = useSelect( ( select ) =>\n\t\tunlock( select( blockEditorStore ) ).getRemovalPromptData()\n\t);\n\n\tconst {\n\t\tclearBlockRemovalPrompt,\n\t\tsetBlockRemovalRules,\n\t\tprivateRemoveBlocks,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\n\t// Load block removal rules, simultaneously signalling that the block\n\t// removal prompt is in place.\n\tuseEffect( () => {\n\t\tsetBlockRemovalRules( rules );\n\t\treturn () => {\n\t\t\tsetBlockRemovalRules();\n\t\t};\n\t}, [ rules, setBlockRemovalRules ] );\n\n\tif ( ! message ) {\n\t\treturn;\n\t}\n\n\tconst onConfirmRemoval = () => {\n\t\tprivateRemoveBlocks( clientIds, selectPrevious, /* force */ true );\n\t\tclearBlockRemovalPrompt();\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ __( 'Be careful!' ) }\n\t\t\tonRequestClose={ clearBlockRemovalPrompt }\n\t\t\tsize=\"medium\"\n\t\t>\n\t\t\t<p>{ message }</p>\n\t\t\t<HStack justify=\"right\">\n\t\t\t\t<Button variant=\"tertiary\" onClick={ clearBlockRemovalPrompt }>\n\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t</Button>\n\t\t\t\t<Button variant=\"primary\" onClick={ onConfirmRemoval }>\n\t\t\t\t\t{ __( 'Delete' ) }\n\t\t\t\t</Button>\n\t\t\t</HStack>\n\t\t</Modal>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SACCC,KAAK,EACLC,MAAM,EACNC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,OAAO,SAASC,wBAAwBA,CAAE;EAAEC;AAAM,CAAC,EAAG;EACrD,MAAM;IAAEC,SAAS;IAAEC,cAAc;IAAEC;EAAQ,CAAC,GAAGb,SAAS,CAAIc,MAAM,IACjEN,MAAM,CAAEM,MAAM,CAAEP,gBAAiB,CAAE,CAAC,CAACQ,oBAAoB,CAAC,CAC3D,CAAC;EAED,MAAM;IACLC,uBAAuB;IACvBC,oBAAoB;IACpBC;EACD,CAAC,GAAGV,MAAM,CAAET,WAAW,CAAEQ,gBAAiB,CAAE,CAAC;;EAE7C;EACA;EACAT,SAAS,CAAE,MAAM;IAChBmB,oBAAoB,CAAEP,KAAM,CAAC;IAC7B,OAAO,MAAM;MACZO,oBAAoB,CAAC,CAAC;IACvB,CAAC;EACF,CAAC,EAAE,CAAEP,KAAK,EAAEO,oBAAoB,CAAG,CAAC;EAEpC,IAAK,CAAEJ,OAAO,EAAG;IAChB;EACD;EAEA,MAAMM,gBAAgB,GAAGA,CAAA,KAAM;IAC9BD,mBAAmB,CAAEP,SAAS,EAAEC,cAAc,EAAE,WAAY,IAAK,CAAC;IAClEI,uBAAuB,CAAC,CAAC;EAC1B,CAAC;EAED,OACCI,aAAA,CAACnB,KAAK;IACLoB,KAAK,EAAGhB,EAAE,CAAE,aAAc,CAAG;IAC7BiB,cAAc,EAAGN,uBAAyB;IAC1CO,IAAI,EAAC;EAAQ,GAEbH,aAAA,YAAKP,OAAY,CAAC,EAClBO,aAAA,CAAChB,MAAM;IAACoB,OAAO,EAAC;EAAO,GACtBJ,aAAA,CAAClB,MAAM;IAACuB,OAAO,EAAC,UAAU;IAACC,OAAO,EAAGV;EAAyB,GAC3DX,EAAE,CAAE,QAAS,CACR,CAAC,EACTe,aAAA,CAAClB,MAAM;IAACuB,OAAO,EAAC,SAAS;IAACC,OAAO,EAAGP;EAAkB,GACnDd,EAAE,CAAE,QAAS,CACR,CACD,CACF,CAAC;AAEV","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["default","BlockRenameControl","BlockRenameModal","useBlockRename"],"sources":["@wordpress/block-editor/src/components/block-rename/index.js"],"sourcesContent":["export { default as BlockRenameControl } from './rename-control';\nexport { default as BlockRenameModal } from './modal';\nexport { default as useBlockRename } from './use-block-rename';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,kBAAkB,QAAQ,kBAAkB;AAChE,SAASD,OAAO,IAAIE,gBAAgB,QAAQ,SAAS;AACrD,SAASF,OAAO,IAAIG,cAAc,QAAQ,oBAAoB"}
1
+ {"version":3,"names":["default","BlockRenameControl","BlockRenameModal","useBlockRename"],"sources":["@wordpress/block-editor/src/components/block-rename/index.js"],"sourcesContent":["export { default as BlockRenameControl } from './rename-control';\nexport { default as BlockRenameModal } from './modal';\nexport { default as useBlockRename } from './use-block-rename';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,kBAAkB,QAAQ,kBAAkB;AAChE,SAASD,OAAO,IAAIE,gBAAgB,QAAQ,SAAS;AACrD,SAASF,OAAO,IAAIG,cAAc,QAAQ,oBAAoB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["isEmptyString","testString","trim","length"],"sources":["@wordpress/block-editor/src/components/block-rename/is-empty-string.js"],"sourcesContent":["export default function isEmptyString( testString ) {\n\treturn testString?.trim()?.length === 0;\n}\n"],"mappings":"AAAA,eAAe,SAASA,aAAaA,CAAEC,UAAU,EAAG;EACnD,OAAOA,UAAU,EAAEC,IAAI,CAAC,CAAC,EAAEC,MAAM,KAAK,CAAC;AACxC"}
1
+ {"version":3,"names":["isEmptyString","testString","trim","length"],"sources":["@wordpress/block-editor/src/components/block-rename/is-empty-string.js"],"sourcesContent":["export default function isEmptyString( testString ) {\n\treturn testString?.trim()?.length === 0;\n}\n"],"mappings":"AAAA,eAAe,SAASA,aAAaA,CAAEC,UAAU,EAAG;EACnD,OAAOA,UAAU,EAAEC,IAAI,CAAC,CAAC,EAAEC,MAAM,KAAK,CAAC;AACxC","ignoreList":[]}
@@ -3,9 +3,8 @@ import { createElement } from "react";
3
3
  * WordPress dependencies
4
4
  */
5
5
  import { __experimentalHStack as HStack, __experimentalVStack as VStack, Button, TextControl, Modal } from '@wordpress/components';
6
- import { useInstanceId } from '@wordpress/compose';
7
6
  import { __, sprintf } from '@wordpress/i18n';
8
- import { useState } from '@wordpress/element';
7
+ import { useState, useId } from '@wordpress/element';
9
8
  import { speak } from '@wordpress/a11y';
10
9
 
11
10
  /**
@@ -16,15 +15,18 @@ export default function BlockRenameModal({
16
15
  blockName,
17
16
  originalBlockName,
18
17
  onClose,
19
- onSave
18
+ onSave,
19
+ // Pattern Overrides is a WordPress-only feature but it also uses the Block Binding API.
20
+ // Ideally this should not be inside the block editor package, but we keep it here for simplicity.
21
+ hasOverridesWarning
20
22
  }) {
21
23
  const [editedBlockName, setEditedBlockName] = useState(blockName);
24
+ const descriptionId = useId();
22
25
  const nameHasChanged = editedBlockName !== blockName;
23
26
  const nameIsOriginal = editedBlockName === originalBlockName;
24
27
  const nameIsEmpty = isEmptyString(editedBlockName);
25
28
  const isNameValid = nameHasChanged || nameIsOriginal;
26
29
  const autoSelectInputText = event => event.target.select();
27
- const dialogDescription = useInstanceId(BlockRenameModal, `block-editor-rename-modal__description`);
28
30
  const handleSubmit = () => {
29
31
  const message = nameIsOriginal || nameIsEmpty ? sprintf( /* translators: %s: new name/label for the block */
30
32
  __('Block name reset to: "%s".'), editedBlockName) : sprintf( /* translators: %s: new name/label for the block */
@@ -41,13 +43,12 @@ export default function BlockRenameModal({
41
43
  title: __('Rename'),
42
44
  onRequestClose: onClose,
43
45
  overlayClassName: "block-editor-block-rename-modal",
46
+ focusOnMount: "firstContentElement",
44
47
  aria: {
45
- describedby: dialogDescription
48
+ describedby: descriptionId
46
49
  },
47
- focusOnMount: "firstContentElement"
48
- }, createElement("p", {
49
- id: dialogDescription
50
- }, __('Enter a custom name for this block.')), createElement("form", {
50
+ size: "small"
51
+ }, createElement("form", {
51
52
  onSubmit: e => {
52
53
  e.preventDefault();
53
54
  if (!isNameValid) {
@@ -55,7 +56,9 @@ export default function BlockRenameModal({
55
56
  }
56
57
  handleSubmit();
57
58
  }
58
- }, createElement(VStack, {
59
+ }, createElement("p", {
60
+ id: descriptionId
61
+ }, __('Enter a custom name for this block.')), createElement(VStack, {
59
62
  spacing: "3"
60
63
  }, createElement(TextControl, {
61
64
  __nextHasNoMarginBottom: true,
@@ -63,6 +66,7 @@ export default function BlockRenameModal({
63
66
  value: editedBlockName,
64
67
  label: __('Block name'),
65
68
  hideLabelFromVision: true,
69
+ help: hasOverridesWarning ? __('This block allows overrides. Changing the name can cause problems with content entered into instances of this pattern.') : undefined,
66
70
  placeholder: originalBlockName,
67
71
  onChange: setEditedBlockName,
68
72
  onFocus: autoSelectInputText
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalHStack","HStack","__experimentalVStack","VStack","Button","TextControl","Modal","useInstanceId","__","sprintf","useState","speak","isEmptyString","BlockRenameModal","blockName","originalBlockName","onClose","onSave","editedBlockName","setEditedBlockName","nameHasChanged","nameIsOriginal","nameIsEmpty","isNameValid","autoSelectInputText","event","target","select","dialogDescription","handleSubmit","message","createElement","title","onRequestClose","overlayClassName","aria","describedby","focusOnMount","id","onSubmit","e","preventDefault","spacing","__nextHasNoMarginBottom","__next40pxDefaultSize","value","label","hideLabelFromVision","placeholder","onChange","onFocus","justify","variant","onClick","type"],"sources":["@wordpress/block-editor/src/components/block-rename/modal.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tButton,\n\tTextControl,\n\tModal,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport isEmptyString from './is-empty-string';\n\nexport default function BlockRenameModal( {\n\tblockName,\n\toriginalBlockName,\n\tonClose,\n\tonSave,\n} ) {\n\tconst [ editedBlockName, setEditedBlockName ] = useState( blockName );\n\n\tconst nameHasChanged = editedBlockName !== blockName;\n\tconst nameIsOriginal = editedBlockName === originalBlockName;\n\tconst nameIsEmpty = isEmptyString( editedBlockName );\n\n\tconst isNameValid = nameHasChanged || nameIsOriginal;\n\n\tconst autoSelectInputText = ( event ) => event.target.select();\n\n\tconst dialogDescription = useInstanceId(\n\t\tBlockRenameModal,\n\t\t`block-editor-rename-modal__description`\n\t);\n\n\tconst handleSubmit = () => {\n\t\tconst message =\n\t\t\tnameIsOriginal || nameIsEmpty\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: %s: new name/label for the block */\n\t\t\t\t\t\t__( 'Block name reset to: \"%s\".' ),\n\t\t\t\t\t\teditedBlockName\n\t\t\t\t )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t/* translators: %s: new name/label for the block */\n\t\t\t\t\t\t__( 'Block name changed to: \"%s\".' ),\n\t\t\t\t\t\teditedBlockName\n\t\t\t\t );\n\n\t\t// Must be assertive to immediately announce change.\n\t\tspeak( message, 'assertive' );\n\t\tonSave( editedBlockName );\n\n\t\t// Immediate close avoids ability to hit save multiple times.\n\t\tonClose();\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ __( 'Rename' ) }\n\t\t\tonRequestClose={ onClose }\n\t\t\toverlayClassName=\"block-editor-block-rename-modal\"\n\t\t\taria={ {\n\t\t\t\tdescribedby: dialogDescription,\n\t\t\t} }\n\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t>\n\t\t\t<p id={ dialogDescription }>\n\t\t\t\t{ __( 'Enter a custom name for this block.' ) }\n\t\t\t</p>\n\t\t\t<form\n\t\t\t\tonSubmit={ ( e ) => {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\tif ( ! isNameValid ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\thandleSubmit();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<VStack spacing=\"3\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvalue={ editedBlockName }\n\t\t\t\t\t\tlabel={ __( 'Block name' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tplaceholder={ originalBlockName }\n\t\t\t\t\t\tonChange={ setEditedBlockName }\n\t\t\t\t\t\tonFocus={ autoSelectInputText }\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\taria-disabled={ ! isNameValid }\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t</form>\n\t\t</Modal>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,MAAM,EACNC,WAAW,EACXC,KAAK,QACC,uBAAuB;AAC9B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,KAAK,QAAQ,iBAAiB;;AAEvC;AACA;AACA;AACA,OAAOC,aAAa,MAAM,mBAAmB;AAE7C,eAAe,SAASC,gBAAgBA,CAAE;EACzCC,SAAS;EACTC,iBAAiB;EACjBC,OAAO;EACPC;AACD,CAAC,EAAG;EACH,MAAM,CAAEC,eAAe,EAAEC,kBAAkB,CAAE,GAAGT,QAAQ,CAAEI,SAAU,CAAC;EAErE,MAAMM,cAAc,GAAGF,eAAe,KAAKJ,SAAS;EACpD,MAAMO,cAAc,GAAGH,eAAe,KAAKH,iBAAiB;EAC5D,MAAMO,WAAW,GAAGV,aAAa,CAAEM,eAAgB,CAAC;EAEpD,MAAMK,WAAW,GAAGH,cAAc,IAAIC,cAAc;EAEpD,MAAMG,mBAAmB,GAAKC,KAAK,IAAMA,KAAK,CAACC,MAAM,CAACC,MAAM,CAAC,CAAC;EAE9D,MAAMC,iBAAiB,GAAGrB,aAAa,CACtCM,gBAAgB,E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;IACrBQ,OAAO,EAAC,UAAU;IAClBC,OAAO,EAAGrC;EAAS,GAEjBR,EAAE,CAAE,QAAS,CACR,CAAC,EAETuB,aAAA,CAAC3B,MAAM;IACNwC,qBAAqB;IACrB,iBAAgB,CAAErB,WAAa;IAC/B6B,OAAO,EAAC,SAAS;IACjBE,IAAI,EAAC;EAAQ,GAEX9C,EAAE,CAAE,MAAO,CACN,CACD,CACD,CACH,CACA,CAAC;AAEV"}
1
+ {"version":3,"names":["__experimentalHStack","HStack","__experimentalVStack","VStack","Button","TextControl","Modal","__","sprintf","useState","useId","speak","isEmptyString","BlockRenameModal","blockName","originalBlockName","onClose","onSave","hasOverridesWarning","editedBlockName","setEditedBlockName","descriptionId","nameHasChanged","nameIsOriginal","nameIsEmpty","isNameValid","autoSelectInputText","event","target","select","handleSubmit","message","createElement","title","onRequestClose","overlayClassName","focusOnMount","aria","describedby","size","onSubmit","e","preventDefault","id","spacing","__nextHasNoMarginBottom","__next40pxDefaultSize","value","label","hideLabelFromVision","help","undefined","placeholder","onChange","onFocus","justify","variant","onClick","type"],"sources":["@wordpress/block-editor/src/components/block-rename/modal.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tButton,\n\tTextControl,\n\tModal,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useState, useId } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport isEmptyString from './is-empty-string';\n\nexport default function BlockRenameModal( {\n\tblockName,\n\toriginalBlockName,\n\tonClose,\n\tonSave,\n\t// Pattern Overrides is a WordPress-only feature but it also uses the Block Binding API.\n\t// Ideally this should not be inside the block editor package, but we keep it here for simplicity.\n\thasOverridesWarning,\n} ) {\n\tconst [ editedBlockName, setEditedBlockName ] = useState( blockName );\n\tconst descriptionId = useId();\n\n\tconst nameHasChanged = editedBlockName !== blockName;\n\tconst nameIsOriginal = editedBlockName === originalBlockName;\n\tconst nameIsEmpty = isEmptyString( editedBlockName );\n\n\tconst isNameValid = nameHasChanged || nameIsOriginal;\n\n\tconst autoSelectInputText = ( event ) => event.target.select();\n\n\tconst handleSubmit = () => {\n\t\tconst message =\n\t\t\tnameIsOriginal || nameIsEmpty\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: %s: new name/label for the block */\n\t\t\t\t\t\t__( 'Block name reset to: \"%s\".' ),\n\t\t\t\t\t\teditedBlockName\n\t\t\t\t )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t/* translators: %s: new name/label for the block */\n\t\t\t\t\t\t__( 'Block name changed to: \"%s\".' ),\n\t\t\t\t\t\teditedBlockName\n\t\t\t\t );\n\n\t\t// Must be assertive to immediately announce change.\n\t\tspeak( message, 'assertive' );\n\t\tonSave( editedBlockName );\n\n\t\t// Immediate close avoids ability to hit save multiple times.\n\t\tonClose();\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ __( 'Rename' ) }\n\t\t\tonRequestClose={ onClose }\n\t\t\toverlayClassName=\"block-editor-block-rename-modal\"\n\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t\taria={ { describedby: descriptionId } }\n\t\t\tsize=\"small\"\n\t\t>\n\t\t\t<form\n\t\t\t\tonSubmit={ ( e ) => {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\tif ( ! isNameValid ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\thandleSubmit();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<p id={ descriptionId }>\n\t\t\t\t\t{ __( 'Enter a custom name for this block.' ) }\n\t\t\t\t</p>\n\t\t\t\t<VStack spacing=\"3\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvalue={ editedBlockName }\n\t\t\t\t\t\tlabel={ __( 'Block name' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\thasOverridesWarning\n\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t'This block allows overrides. Changing the name can cause problems with content entered into instances of this pattern.'\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\tplaceholder={ originalBlockName }\n\t\t\t\t\t\tonChange={ setEditedBlockName }\n\t\t\t\t\t\tonFocus={ autoSelectInputText }\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\taria-disabled={ ! isNameValid }\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t</form>\n\t\t</Modal>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,MAAM,EACNC,WAAW,EACXC,KAAK,QACC,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,QAAQ,EAAEC,KAAK,QAAQ,oBAAoB;AACpD,SAASC,KAAK,QAAQ,iBAAiB;;AAEvC;AACA;AACA;AACA,OAAOC,aAAa,MAAM,mBAAmB;AAE7C,eAAe,SAASC,gBAAgBA,CAAE;EACzCC,SAA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CAAC;IACf;EAAG,GAEHE,aAAA;IAAGW,EAAE,EAAGtB;EAAe,GACpBd,EAAE,CAAE,qCAAsC,CAC1C,CAAC,EACJyB,aAAA,CAAC7B,MAAM;IAACyC,OAAO,EAAC;EAAG,GAClBZ,aAAA,CAAC3B,WAAW;IACXwC,uBAAuB;IACvBC,qBAAqB;IACrBC,KAAK,EAAG5B,eAAiB;IACzB6B,KAAK,EAAGzC,EAAE,CAAE,YAAa,CAAG;IAC5B0C,mBAAmB;IACnBC,IAAI,EACHhC,mBAAmB,GAChBX,EAAE,CACF,wHACA,CAAC,GACD4C,SACH;IACDC,WAAW,EAAGrC,iBAAmB;IACjCsC,QAAQ,EAAGjC,kBAAoB;IAC/BkC,OAAO,EAAG5B;EAAqB,CAC/B,CAAC,EACFM,aAAA,CAAC/B,MAAM;IAACsD,OAAO,EAAC;EAAO,GACtBvB,aAAA,CAAC5B,MAAM;IACN0C,qBAAqB;IACrBU,OAAO,EAAC,UAAU;IAClBC,OAAO,EAAGzC;EAAS,GAEjBT,EAAE,CAAE,QAAS,CACR,CAAC,EAETyB,aAAA,CAAC5B,MAAM;IACN0C,qBAAqB;IACrB,iBAAgB,CAAErB,WAAa;IAC/B+B,OAAO,EAAC,SAAS;IACjBE,IAAI,EAAC;EAAQ,GAEXnD,EAAE,CAAE,MAAO,CACN,CACD,CACD,CACH,CACA,CAAC;AAEV","ignoreList":[]}
@@ -33,10 +33,11 @@ export default function BlockRenameControl({
33
33
  updateBlockAttributes
34
34
  } = useDispatch(blockEditorStore);
35
35
  const customName = metadata?.name;
36
+ const hasPatternOverrides = !!customName && !!metadata?.bindings && Object.values(metadata.bindings).some(binding => binding.source === 'core/pattern-overrides');
36
37
  function onChange(newName) {
37
38
  updateBlockAttributes([clientId], {
38
39
  metadata: {
39
- ...(metadata && metadata),
40
+ ...metadata,
40
41
  name: newName
41
42
  }
42
43
  });
@@ -51,6 +52,7 @@ export default function BlockRenameControl({
51
52
  }, __('Rename')), renamingBlock && createElement(BlockRenameModal, {
52
53
  blockName: customName || '',
53
54
  originalBlockName: blockInformation?.title,
55
+ hasOverridesWarning: hasPatternOverrides,
54
56
  onClose: () => setRenamingBlock(false),
55
57
  onSave: newName => {
56
58
  // If the new value is the block's original name (e.g. `Group`)
@@ -1 +1 @@
1
- {"version":3,"names":["MenuItem","useSelect","useDispatch","__","useState","store","blockEditorStore","useBlockDisplayInformation","isEmptyString","BlockRenameModal","BlockRenameControl","clientId","renamingBlock","setRenamingBlock","metadata","select","getBlockAttributes","_metadata","updateBlockAttributes","customName","name","onChange","newName","blockInformation","createElement","Fragment","onClick","blockName","originalBlockName","title","onClose","onSave","undefined"],"sources":["@wordpress/block-editor/src/components/block-rename/rename-control.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { useBlockDisplayInformation } from '..';\nimport isEmptyString from './is-empty-string';\nimport BlockRenameModal from './modal';\n\nexport default function BlockRenameControl( { clientId } ) {\n\tconst [ renamingBlock, setRenamingBlock ] = useState( false );\n\n\tconst { metadata } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockAttributes } = select( blockEditorStore );\n\n\t\t\tconst _metadata = getBlockAttributes( clientId )?.metadata;\n\t\t\treturn {\n\t\t\t\tmetadata: _metadata,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\tconst customName = metadata?.name;\n\n\tfunction onChange( newName ) {\n\t\tupdateBlockAttributes( [ clientId ], {\n\t\t\tmetadata: {\n\t\t\t\t...( metadata && metadata ),\n\t\t\t\tname: newName,\n\t\t\t},\n\t\t} );\n\t}\n\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetRenamingBlock( true );\n\t\t\t\t} }\n\t\t\t\taria-expanded={ renamingBlock }\n\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t>\n\t\t\t\t{ __( 'Rename' ) }\n\t\t\t</MenuItem>\n\t\t\t{ renamingBlock && (\n\t\t\t\t<BlockRenameModal\n\t\t\t\t\tblockName={ customName || '' }\n\t\t\t\t\toriginalBlockName={ blockInformation?.title }\n\t\t\t\t\tonClose={ () => setRenamingBlock( false ) }\n\t\t\t\t\tonSave={ ( newName ) => {\n\t\t\t\t\t\t// If the new value is the block's original name (e.g. `Group`)\n\t\t\t\t\t\t// or it is an empty string then assume the intent is to reset\n\t\t\t\t\t\t// the value. Therefore reset the metadata.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tnewName === blockInformation?.title ||\n\t\t\t\t\t\t\tisEmptyString( newName )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tnewName = undefined;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tonChange( newName );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,oBAAoB;;AAE7C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,0BAA0B,QAAQ,IAAI;AAC/C,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,gBAAgB,MAAM,SAAS;AAEtC,eAAe,SAASC,kBAAkBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EAC1D,MAAM,CAAEC,aAAa,EAAEC,gBAAgB,CAAE,GAAGT,QAAQ,CAAE,KAAM,CAAC;EAE7D,MAAM;IAAEU;EAAS,CAAC,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;IACpB;EAAG,CACH,CAED,CAAC;AAEL"}
1
+ {"version":3,"names":["MenuItem","useSelect","useDispatch","__","useState","store","blockEditorStore","useBlockDisplayInformation","isEmptyString","BlockRenameModal","BlockRenameControl","clientId","renamingBlock","setRenamingBlock","metadata","select","getBlockAttributes","_metadata","updateBlockAttributes","customName","name","hasPatternOverrides","bindings","Object","values","some","binding","source","onChange","newName","blockInformation","createElement","Fragment","onClick","blockName","originalBlockName","title","hasOverridesWarning","onClose","onSave","undefined"],"sources":["@wordpress/block-editor/src/components/block-rename/rename-control.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { useBlockDisplayInformation } from '..';\nimport isEmptyString from './is-empty-string';\nimport BlockRenameModal from './modal';\n\nexport default function BlockRenameControl( { clientId } ) {\n\tconst [ renamingBlock, setRenamingBlock ] = useState( false );\n\n\tconst { metadata } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockAttributes } = select( blockEditorStore );\n\n\t\t\tconst _metadata = getBlockAttributes( clientId )?.metadata;\n\t\t\treturn {\n\t\t\t\tmetadata: _metadata,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\tconst customName = metadata?.name;\n\tconst hasPatternOverrides =\n\t\t!! customName &&\n\t\t!! metadata?.bindings &&\n\t\tObject.values( metadata.bindings ).some(\n\t\t\t( binding ) => binding.source === 'core/pattern-overrides'\n\t\t);\n\n\tfunction onChange( newName ) {\n\t\tupdateBlockAttributes( [ clientId ], {\n\t\t\tmetadata: {\n\t\t\t\t...metadata,\n\t\t\t\tname: newName,\n\t\t\t},\n\t\t} );\n\t}\n\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetRenamingBlock( true );\n\t\t\t\t} }\n\t\t\t\taria-expanded={ renamingBlock }\n\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t>\n\t\t\t\t{ __( 'Rename' ) }\n\t\t\t</MenuItem>\n\t\t\t{ renamingBlock && (\n\t\t\t\t<BlockRenameModal\n\t\t\t\t\tblockName={ customName || '' }\n\t\t\t\t\toriginalBlockName={ blockInformation?.title }\n\t\t\t\t\thasOverridesWarning={ hasPatternOverrides }\n\t\t\t\t\tonClose={ () => setRenamingBlock( false ) }\n\t\t\t\t\tonSave={ ( newName ) => {\n\t\t\t\t\t\t// If the new value is the block's original name (e.g. `Group`)\n\t\t\t\t\t\t// or it is an empty string then assume the intent is to reset\n\t\t\t\t\t\t// the value. Therefore reset the metadata.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tnewName === blockInformation?.title ||\n\t\t\t\t\t\t\tisEmptyString( newName )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tnewName = undefined;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tonChange( newName );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,QAAQ,oBAAoB;;AAE7C;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,0BAA0B,QAAQ,IAAI;AAC/C,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,gBAAgB,MAAM,SAAS;AAEtC,eAAe,SAASC,kBAAkBA,CAAE;EAAEC;AAAS,CAAC,EAAG;EAC1D,MAAM,CAAEC,aAAa,EAAEC,gBAAgB,CAAE,GA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C,mBAAmB,EAAGhB,mBAAqB;IAC3CiB,OAAO,EAAGA,CAAA,KAAMzB,gBAAgB,CAAE,KAAM,CAAG;IAC3C0B,MAAM,EAAKV,OAAO,IAAM;MACvB;MACA;MACA;MACA,IACCA,OAAO,KAAKC,gBAAgB,EAAEM,KAAK,IACnC5B,aAAa,CAAEqB,OAAQ,CAAC,EACvB;QACDA,OAAO,GAAGW,SAAS;MACpB;MAEAZ,QAAQ,CAAEC,OAAQ,CAAC;IACpB;EAAG,CACH,CAED,CAAC;AAEL","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["getBlockSupport","useBlockRename","name","canRename"],"sources":["@wordpress/block-editor/src/components/block-rename/use-block-rename.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport } from '@wordpress/blocks';\n\nexport default function useBlockRename( name ) {\n\treturn {\n\t\tcanRename: getBlockSupport( name, 'renaming', true ),\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,mBAAmB;AAEnD,eAAe,SAASC,cAAcA,CAAEC,IAAI,EAAG;EAC9C,OAAO;IACNC,SAAS,EAAEH,eAAe,CAAEE,IAAI,EAAE,UAAU,EAAE,IAAK;EACpD,CAAC;AACF"}
1
+ {"version":3,"names":["getBlockSupport","useBlockRename","name","canRename"],"sources":["@wordpress/block-editor/src/components/block-rename/use-block-rename.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport } from '@wordpress/blocks';\n\nexport default function useBlockRename( name ) {\n\treturn {\n\t\tcanRename: getBlockSupport( name, 'renaming', true ),\n\t};\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,QAAQ,mBAAmB;AAEnD,eAAe,SAASC,cAAcA,CAAEC,IAAI,EAAG;EAC9C,OAAO;IACNC,SAAS,EAAEH,eAAe,CAAEE,IAAI,EAAE,UAAU,EAAE,IAAK;EACpD,CAAC;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","useDispatch","useRefEffect","store","blockEditorStore","useBlockSelectionClearer","getSettings","hasSelectedBlock","hasMultiSelection","clearSelectedBlock","clearBlockSelection","isEnabled","node","onMouseDown","event","target","addEventListener","removeEventListener","BlockSelectionClearer","props","createElement","ref"],"sources":["@wordpress/block-editor/src/components/block-selection-clearer/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Pass the returned ref callback to an element that should clear block\n * selection. Selection will only be cleared if the element is clicked directly,\n * not if a child element is clicked.\n *\n * @return {import('react').RefCallback} Ref callback.\n */\nexport function useBlockSelectionClearer() {\n\tconst { getSettings, hasSelectedBlock, hasMultiSelection } =\n\t\tuseSelect( blockEditorStore );\n\tconst { clearSelectedBlock } = useDispatch( blockEditorStore );\n\tconst { clearBlockSelection: isEnabled } = getSettings();\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( ! isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction onMouseDown( event ) {\n\t\t\t\tif ( ! hasSelectedBlock() && ! hasMultiSelection() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Only handle clicks on the element, not the children.\n\t\t\t\tif ( event.target !== node ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tclearSelectedBlock();\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'mousedown', onMouseDown );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'mousedown', onMouseDown );\n\t\t\t};\n\t\t},\n\t\t[ hasSelectedBlock, hasMultiSelection, clearSelectedBlock, isEnabled ]\n\t);\n}\n\nexport default function BlockSelectionClearer( props ) {\n\treturn <div ref={ useBlockSelectionClearer() } { ...props } />;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,YAAY,QAAQ,oBAAoB;;AAEjD;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,wBAAwBA,CAAA,EAAG;EAC1C,MAAM;IAAEC,WAAW;IAAEC,gBAAgB;IAAEC;EAAkB,CAAC,GACzDR,SAAS,CAAEI,gBAAiB,CAAC;EAC9B,MAAM;IAAEK;EAAmB,CAAC,GAAGR,WAAW,CAAEG,gBAAiB,CAAC;EAC9D,MAAM;IAAEM,mBAAmB,EAAEC;EAAU,CAAC,GAAGL,WAAW,CAAC,CAAC;EAExD,OAAOJ,YAAY,CAChBU,IAAI,IAAM;IACX,IAAK,CAAED,SAAS,EAAG;MAClB;IACD;IAEA,SAASE,WAAWA,CAAEC,KAAK,EAAG;MAC7B,IAAK,CAAEP,gBAAgB,CAAC,CAAC,IAAI,CAAEC,iBAAiB,CAAC,CAAC,EAAG;QACpD;MACD;;MAEA;MACA,IAAKM,KAAK,CAACC,MAAM,KAAKH,IAAI,EAAG;QAC5B;MACD;MAEAH,kBAAkB,CAAC,CAAC;IACrB;IAEAG,IAAI,CAACI,gBAAgB,CAAE,WAAW,EAAEH,WAAY,CAAC;IAEjD,OAAO,MAAM;MACZD,IAAI,CAACK,mBAAmB,CAAE,WAAW,EAAEJ,WAAY,CAAC;IACrD,CAAC;EACF,CAAC,EACD,CAAEN,gBAAgB,EAAEC,iBAAiB,EAAEC,kBAAkB,EAAEE,SAAS,CACrE,CAAC;AACF;AAEA,eAAe,SAASO,qBAAqBA,CAAEC,KAAK,EAAG;EACtD,OAAOC,aAAA;IAAKC,GAAG,EAAGhB,wBAAwB,CAAC,CAAG;IAAA,GAAMc;EAAK,CAAI,CAAC;AAC/D"}
1
+ {"version":3,"names":["useSelect","useDispatch","useRefEffect","store","blockEditorStore","useBlockSelectionClearer","getSettings","hasSelectedBlock","hasMultiSelection","clearSelectedBlock","clearBlockSelection","isEnabled","node","onMouseDown","event","target","addEventListener","removeEventListener","BlockSelectionClearer","props","createElement","ref"],"sources":["@wordpress/block-editor/src/components/block-selection-clearer/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Pass the returned ref callback to an element that should clear block\n * selection. Selection will only be cleared if the element is clicked directly,\n * not if a child element is clicked.\n *\n * @return {import('react').RefCallback} Ref callback.\n */\nexport function useBlockSelectionClearer() {\n\tconst { getSettings, hasSelectedBlock, hasMultiSelection } =\n\t\tuseSelect( blockEditorStore );\n\tconst { clearSelectedBlock } = useDispatch( blockEditorStore );\n\tconst { clearBlockSelection: isEnabled } = getSettings();\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( ! isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction onMouseDown( event ) {\n\t\t\t\tif ( ! hasSelectedBlock() && ! hasMultiSelection() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Only handle clicks on the element, not the children.\n\t\t\t\tif ( event.target !== node ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tclearSelectedBlock();\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'mousedown', onMouseDown );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'mousedown', onMouseDown );\n\t\t\t};\n\t\t},\n\t\t[ hasSelectedBlock, hasMultiSelection, clearSelectedBlock, isEnabled ]\n\t);\n}\n\nexport default function BlockSelectionClearer( props ) {\n\treturn <div ref={ useBlockSelectionClearer() } { ...props } />;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,YAAY,QAAQ,oBAAoB;;AAEjD;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,wBAAwBA,CAAA,EAAG;EAC1C,MAAM;IAAEC,WAAW;IAAEC,gBAAgB;IAAEC;EAAkB,CAAC,GACzDR,SAAS,CAAEI,gBAAiB,CAAC;EAC9B,MAAM;IAAEK;EAAmB,CAAC,GAAGR,WAAW,CAAEG,gBAAiB,CAAC;EAC9D,MAAM;IAAEM,mBAAmB,EAAEC;EAAU,CAAC,GAAGL,WAAW,CAAC,CAAC;EAExD,OAAOJ,YAAY,CAChBU,IAAI,IAAM;IACX,IAAK,CAAED,SAAS,EAAG;MAClB;IACD;IAEA,SAASE,WAAWA,CAAEC,KAAK,EAAG;MAC7B,IAAK,CAAEP,gBAAgB,CAAC,CAAC,IAAI,CAAEC,iBAAiB,CAAC,CAAC,EAAG;QACpD;MACD;;MAEA;MACA,IAAKM,KAAK,CAACC,MAAM,KAAKH,IAAI,EAAG;QAC5B;MACD;MAEAH,kBAAkB,CAAC,CAAC;IACrB;IAEAG,IAAI,CAACI,gBAAgB,CAAE,WAAW,EAAEH,WAAY,CAAC;IAEjD,OAAO,MAAM;MACZD,IAAI,CAACK,mBAAmB,CAAE,WAAW,EAAEJ,WAAY,CAAC;IACrD,CAAC;EACF,CAAC,EACD,CAAEN,gBAAgB,EAAEC,iBAAiB,EAAEC,kBAAkB,EAAEE,SAAS,CACrE,CAAC;AACF;AAEA,eAAe,SAASO,qBAAqBA,CAAEC,KAAK,EAAG;EACtD,OAAOC,aAAA;IAAKC,GAAG,EAAGhB,wBAAwB,CAAC,CAAG;IAAA,GAAMc;EAAK,CAAI,CAAC;AAC/D","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["createSlotFill","ToolbarButton","ToolbarGroup","__","withDispatch","cog","Fill","Slot","SettingsButton","openGeneralSidebar","createElement","title","icon","onClick","SettingsButtonFill","props","SettingsToolbarButton","dispatch"],"sources":["@wordpress/block-editor/src/components/block-settings/button.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tcreateSlotFill,\n\tToolbarButton,\n\tToolbarGroup,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { withDispatch } from '@wordpress/data';\nimport { cog } from '@wordpress/icons';\n\nconst { Fill, Slot } = createSlotFill( 'SettingsToolbarButton' );\n\nconst SettingsButton = ( { openGeneralSidebar } ) => (\n\t<ToolbarGroup>\n\t\t<ToolbarButton\n\t\t\ttitle={ __( 'Open Settings' ) }\n\t\t\ticon={ cog }\n\t\t\tonClick={ openGeneralSidebar }\n\t\t/>\n\t</ToolbarGroup>\n);\n\nconst SettingsButtonFill = ( props ) => (\n\t<Fill>\n\t\t<SettingsButton { ...props } />\n\t</Fill>\n);\n\nconst SettingsToolbarButton = withDispatch( ( dispatch ) => {\n\tconst { openGeneralSidebar } = dispatch( 'core/edit-post' );\n\n\treturn {\n\t\topenGeneralSidebar: () => openGeneralSidebar( 'edit-post/block' ),\n\t};\n} )( SettingsButtonFill );\n\nSettingsToolbarButton.Slot = Slot;\n\nexport default SettingsToolbarButton;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,cAAc,EACdC,aAAa,EACbC,YAAY,QACN,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAM;EAAEC,IAAI;EAAEC;AAAK,CAAC,GAAGP,cAAc,CAAE,uBAAwB,CAAC;AAEhE,MAAMQ,cAAc,GAAGA,CAAE;EAAEC;AAAmB,CAAC,KAC9CC,aAAA,CAACR,YAAY,QACZQ,aAAA,CAACT,aAAa;EACbU,KAAK,EAAGR,EAAE,CAAE,eAAgB,CAAG;EAC/BS,IAAI,EAAGP,GAAK;EACZQ,OAAO,EAAGJ;AAAoB,CAC9B,CACY,CACd;AAED,MAAMK,kBAAkB,GAAKC,KAAK,IACjCL,aAAA,CAACJ,IAAI,QACJI,aAAA,CAACF,cAAc;EAAA,GAAMO;AAAK,CAAI,CACzB,CACN;AAED,MAAMC,qBAAqB,GAAGZ,YAAY,CAAIa,QAAQ,IAAM;EAC3D,MAAM;IAAER;EAAmB,CAAC,GAAGQ,QAAQ,CAAE,gBAAiB,CAAC;EAE3D,OAAO;IACNR,kBAAkB,EAAEA,CAAA,KAAMA,kBAAkB,CAAE,iBAAkB;EACjE,CAAC;AACF,CAAE,CAAC,CAAEK,kBAAmB,CAAC;AAEzBE,qBAAqB,CAACT,IAAI,GAAGA,IAAI;AAEjC,eAAeS,qBAAqB"}
1
+ {"version":3,"names":["createSlotFill","ToolbarButton","ToolbarGroup","__","withDispatch","cog","Fill","Slot","SettingsButton","openGeneralSidebar","createElement","title","icon","onClick","SettingsButtonFill","props","SettingsToolbarButton","dispatch"],"sources":["@wordpress/block-editor/src/components/block-settings/button.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tcreateSlotFill,\n\tToolbarButton,\n\tToolbarGroup,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { withDispatch } from '@wordpress/data';\nimport { cog } from '@wordpress/icons';\n\nconst { Fill, Slot } = createSlotFill( 'SettingsToolbarButton' );\n\nconst SettingsButton = ( { openGeneralSidebar } ) => (\n\t<ToolbarGroup>\n\t\t<ToolbarButton\n\t\t\ttitle={ __( 'Open Settings' ) }\n\t\t\ticon={ cog }\n\t\t\tonClick={ openGeneralSidebar }\n\t\t/>\n\t</ToolbarGroup>\n);\n\nconst SettingsButtonFill = ( props ) => (\n\t<Fill>\n\t\t<SettingsButton { ...props } />\n\t</Fill>\n);\n\nconst SettingsToolbarButton = withDispatch( ( dispatch ) => {\n\tconst { openGeneralSidebar } = dispatch( 'core/edit-post' );\n\n\treturn {\n\t\topenGeneralSidebar: () => openGeneralSidebar( 'edit-post/block' ),\n\t};\n} )( SettingsButtonFill );\n\nSettingsToolbarButton.Slot = Slot;\n\nexport default SettingsToolbarButton;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,cAAc,EACdC,aAAa,EACbC,YAAY,QACN,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,GAAG,QAAQ,kBAAkB;AAEtC,MAAM;EAAEC,IAAI;EAAEC;AAAK,CAAC,GAAGP,cAAc,CAAE,uBAAwB,CAAC;AAEhE,MAAMQ,cAAc,GAAGA,CAAE;EAAEC;AAAmB,CAAC,KAC9CC,aAAA,CAACR,YAAY,QACZQ,aAAA,CAACT,aAAa;EACbU,KAAK,EAAGR,EAAE,CAAE,eAAgB,CAAG;EAC/BS,IAAI,EAAGP,GAAK;EACZQ,OAAO,EAAGJ;AAAoB,CAC9B,CACY,CACd;AAED,MAAMK,kBAAkB,GAAKC,KAAK,IACjCL,aAAA,CAACJ,IAAI,QACJI,aAAA,CAACF,cAAc;EAAA,GAAMO;AAAK,CAAI,CACzB,CACN;AAED,MAAMC,qBAAqB,GAAGZ,YAAY,CAAIa,QAAQ,IAAM;EAC3D,MAAM;IAAER;EAAmB,CAAC,GAAGQ,QAAQ,CAAE,gBAAiB,CAAC;EAE3D,OAAO;IACNR,kBAAkB,EAAEA,CAAA,KAAMA,kBAAkB,CAAE,iBAAkB;EACjE,CAAC;AACF,CAAE,CAAC,CAAEK,kBAAmB,CAAC;AAEzBE,qBAAqB,CAACT,IAAI,GAAGA,IAAI;AAEjC,eAAeS,qBAAqB","ignoreList":[]}