@wordpress/block-editor 14.3.6 → 14.5.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 (953) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +6 -2
  3. package/build/autocompleters/block.js.map +1 -1
  4. package/build/autocompleters/link.js +2 -1
  5. package/build/autocompleters/link.js.map +1 -1
  6. package/build/components/background-image-control/index.js +1 -1
  7. package/build/components/background-image-control/index.js.map +1 -1
  8. package/build/components/block-actions/index.js +1 -13
  9. package/build/components/block-actions/index.js.map +1 -1
  10. package/build/components/block-controls/slot.js.map +1 -1
  11. package/build/components/block-controls/slot.native.js.map +1 -1
  12. package/build/components/block-draggable/draggable-chip.js +1 -1
  13. package/build/components/block-draggable/draggable-chip.js.map +1 -1
  14. package/build/components/block-inspector/index.js +56 -75
  15. package/build/components/block-inspector/index.js.map +1 -1
  16. package/build/components/block-list/block-invalid-warning.native.js +1 -1
  17. package/build/components/block-list/block-invalid-warning.native.js.map +1 -1
  18. package/build/components/block-list/block-list-item.native.js.map +1 -1
  19. package/build/components/block-list/block.js +5 -16
  20. package/build/components/block-list/block.js.map +1 -1
  21. package/build/components/block-list/index.js +6 -8
  22. package/build/components/block-list/index.js.map +1 -1
  23. package/build/components/block-list/index.native.js.map +1 -1
  24. package/build/components/block-list/use-block-props/index.js +3 -8
  25. package/build/components/block-list/use-block-props/index.js.map +1 -1
  26. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js +14 -6
  27. package/build/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  28. package/build/components/block-list/use-in-between-inserter.js +5 -3
  29. package/build/components/block-list/use-in-between-inserter.js.map +1 -1
  30. package/build/components/block-list/zoom-out-separator.js +24 -13
  31. package/build/components/block-list/zoom-out-separator.js.map +1 -1
  32. package/build/components/block-lock/modal.js +1 -1
  33. package/build/components/block-lock/modal.js.map +1 -1
  34. package/build/components/block-mover/button.js.map +1 -1
  35. package/build/components/block-navigation/dropdown.js +2 -4
  36. package/build/components/block-navigation/dropdown.js.map +1 -1
  37. package/build/components/block-parent-selector/index.js +14 -11
  38. package/build/components/block-parent-selector/index.js.map +1 -1
  39. package/build/components/block-pattern-setup/index.js.map +1 -1
  40. package/build/components/block-pattern-setup/setup-toolbar.js +10 -20
  41. package/build/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  42. package/build/components/block-patterns-list/index.js.map +1 -1
  43. package/build/components/block-patterns-paging/index.js +11 -13
  44. package/build/components/block-patterns-paging/index.js.map +1 -1
  45. package/build/components/block-popover/index.js +45 -2
  46. package/build/components/block-popover/index.js.map +1 -1
  47. package/build/components/block-preview/auto.js +1 -4
  48. package/build/components/block-preview/auto.js.map +1 -1
  49. package/build/components/block-preview/index.js.map +1 -1
  50. package/build/components/block-quick-navigation/index.js +2 -4
  51. package/build/components/block-quick-navigation/index.js.map +1 -1
  52. package/build/components/block-rename/modal.js +2 -2
  53. package/build/components/block-rename/modal.js.map +1 -1
  54. package/build/components/block-settings-menu/block-parent-selector-menu-item.js +1 -1
  55. package/build/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  56. package/build/components/block-settings-menu/block-settings-dropdown.js +79 -76
  57. package/build/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  58. package/build/components/block-settings-menu-controls/index.js +1 -6
  59. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  60. package/build/components/block-switcher/block-transformations-menu.native.js +1 -1
  61. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  62. package/build/components/block-switcher/index.js +19 -15
  63. package/build/components/block-switcher/index.js.map +1 -1
  64. package/build/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  65. package/build/components/block-switcher/use-transformed-patterns.js +1 -0
  66. package/build/components/block-switcher/use-transformed-patterns.js.map +1 -1
  67. package/build/components/block-switcher/utils.js +1 -0
  68. package/build/components/block-switcher/utils.js.map +1 -1
  69. package/build/components/block-toolbar/index.js +16 -19
  70. package/build/components/block-toolbar/index.js.map +1 -1
  71. package/build/components/block-toolbar/use-has-block-toolbar.js +3 -5
  72. package/build/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  73. package/build/components/block-tools/index.js +8 -18
  74. package/build/components/block-tools/index.js.map +1 -1
  75. package/build/components/block-tools/insertion-point.js +1 -4
  76. package/build/components/block-tools/insertion-point.js.map +1 -1
  77. package/build/components/block-tools/use-show-block-tools.js +8 -7
  78. package/build/components/block-tools/use-show-block-tools.js.map +1 -1
  79. package/build/components/block-tools/zoom-out-mode-inserter-button.js +1 -12
  80. package/build/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -1
  81. package/build/components/block-tools/zoom-out-mode-inserters.js +14 -17
  82. package/build/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  83. package/build/components/block-tools/zoom-out-popover.js +3 -2
  84. package/build/components/block-tools/zoom-out-popover.js.map +1 -1
  85. package/build/components/block-tools/zoom-out-toolbar.js +5 -32
  86. package/build/components/block-tools/zoom-out-toolbar.js.map +1 -1
  87. package/build/components/block-types-list/index.js.map +1 -1
  88. package/build/components/block-types-list/index.native.js.map +1 -1
  89. package/build/components/block-variation-transforms/index.js +3 -2
  90. package/build/components/block-variation-transforms/index.js.map +1 -1
  91. package/build/components/border-radius-control/index.js.map +1 -1
  92. package/build/components/border-radius-control/utils.js.map +1 -1
  93. package/build/components/button-block-appender/index.js.map +1 -1
  94. package/build/components/color-style-selector/index.js.map +1 -1
  95. package/build/components/colors/utils.js.map +1 -1
  96. package/build/components/colors/with-colors.js.map +1 -1
  97. package/build/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  98. package/build/components/date-format-picker/index.js +1 -0
  99. package/build/components/date-format-picker/index.js.map +1 -1
  100. package/build/components/duotone/utils.js.map +1 -1
  101. package/build/components/duotone-control/index.js.map +1 -1
  102. package/build/components/font-sizes/fluid-utils.js.map +1 -1
  103. package/build/components/font-sizes/utils.js.map +1 -1
  104. package/build/components/font-sizes/with-font-sizes.js.map +1 -1
  105. package/build/components/global-styles/border-panel.js +1 -1
  106. package/build/components/global-styles/border-panel.js.map +1 -1
  107. package/build/components/global-styles/color-panel.js +1 -1
  108. package/build/components/global-styles/color-panel.js.map +1 -1
  109. package/build/components/global-styles/dimensions-panel.js +3 -3
  110. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  111. package/build/components/global-styles/filters-panel.js.map +1 -1
  112. package/build/components/global-styles/get-block-css-selector.js.map +1 -1
  113. package/build/components/global-styles/get-global-styles-changes.js +2 -1
  114. package/build/components/global-styles/get-global-styles-changes.js.map +1 -1
  115. package/build/components/global-styles/hooks.js.map +1 -1
  116. package/build/components/global-styles/typography-panel.js.map +1 -1
  117. package/build/components/global-styles/use-global-styles-context.native.js.map +1 -1
  118. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  119. package/build/components/global-styles/utils.js.map +1 -1
  120. package/build/components/gradients/use-gradient.js.map +1 -1
  121. package/build/components/grid/grid-item-movers.js.map +1 -1
  122. package/build/components/grid/grid-visualizer.js.map +1 -1
  123. package/build/components/iframe/index.js +44 -9
  124. package/build/components/iframe/index.js.map +1 -1
  125. package/build/components/image-editor/use-save-image.js +1 -1
  126. package/build/components/image-editor/use-save-image.js.map +1 -1
  127. package/build/components/inner-blocks/index.js +1 -9
  128. package/build/components/inner-blocks/index.js.map +1 -1
  129. package/build/components/inner-blocks/use-nested-settings-update.js +15 -8
  130. package/build/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  131. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -1
  132. package/build/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  133. package/build/components/inserter/block-patterns-explorer/pattern-list.js +2 -2
  134. package/build/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  135. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js +1 -1
  136. package/build/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  137. package/build/components/inserter/block-types-tab.js +1 -1
  138. package/build/components/inserter/block-types-tab.js.map +1 -1
  139. package/build/components/inserter/block-types-tab.native.js.map +1 -1
  140. package/build/components/inserter/category-tabs/index.js +1 -10
  141. package/build/components/inserter/category-tabs/index.js.map +1 -1
  142. package/build/components/inserter/hooks/use-block-types-state.js +24 -5
  143. package/build/components/inserter/hooks/use-block-types-state.js.map +1 -1
  144. package/build/components/inserter/hooks/use-insertion-point.js +22 -12
  145. package/build/components/inserter/hooks/use-insertion-point.js.map +1 -1
  146. package/build/components/inserter/hooks/use-patterns-state.js +24 -11
  147. package/build/components/inserter/hooks/use-patterns-state.js.map +1 -1
  148. package/build/components/inserter/media-tab/media-panel.js.map +1 -1
  149. package/build/components/inserter/media-tab/media-preview.js +36 -14
  150. package/build/components/inserter/media-tab/media-preview.js.map +1 -1
  151. package/build/components/inserter/media-tab/media-tab.js.map +1 -1
  152. package/build/components/inserter/media-tab/utils.js.map +1 -1
  153. package/build/components/inserter/menu.js +4 -4
  154. package/build/components/inserter/menu.js.map +1 -1
  155. package/build/components/inserter/mobile-tab-navigation.js +5 -5
  156. package/build/components/inserter/mobile-tab-navigation.js.map +1 -1
  157. package/build/components/inserter/preview-panel.js.map +1 -1
  158. package/build/components/inserter/quick-inserter.js +5 -5
  159. package/build/components/inserter/quick-inserter.js.map +1 -1
  160. package/build/components/inserter/search-results.js +1 -1
  161. package/build/components/inserter/search-results.js.map +1 -1
  162. package/build/components/inserter/tabs.native.js.map +1 -1
  163. package/build/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  164. package/build/components/inspector-controls/fill.js.map +1 -1
  165. package/build/components/inspector-controls/fill.native.js.map +1 -1
  166. package/build/components/inspector-controls/slot.js.map +1 -1
  167. package/build/components/inspector-controls/slot.native.js.map +1 -1
  168. package/build/components/line-height-control/index.js.map +1 -1
  169. package/build/components/link-control/index.js +1 -2
  170. package/build/components/link-control/index.js.map +1 -1
  171. package/build/components/link-control/is-url-like.js.map +1 -1
  172. package/build/components/link-control/search-create-button.js +1 -1
  173. package/build/components/link-control/search-create-button.js.map +1 -1
  174. package/build/components/link-control/search-input.js +3 -5
  175. package/build/components/link-control/search-input.js.map +1 -1
  176. package/build/components/link-control/search-results.js +5 -15
  177. package/build/components/link-control/search-results.js.map +1 -1
  178. package/build/components/link-control/settings-drawer.js.map +1 -1
  179. package/build/components/link-control/use-rich-url-data.js.map +1 -1
  180. package/build/components/list-view/appender.js +1 -1
  181. package/build/components/list-view/appender.js.map +1 -1
  182. package/build/components/list-view/block-contents.js +1 -25
  183. package/build/components/list-view/block-contents.js.map +1 -1
  184. package/build/components/list-view/block-select-button.js.map +1 -1
  185. package/build/components/list-view/block.js.map +1 -1
  186. package/build/components/list-view/branch.js.map +1 -1
  187. package/build/components/list-view/drop-indicator.js.map +1 -1
  188. package/build/components/list-view/index.js.map +1 -1
  189. package/build/components/list-view/use-block-selection.js +2 -2
  190. package/build/components/list-view/use-block-selection.js.map +1 -1
  191. package/build/components/list-view/utils.js +1 -1
  192. package/build/components/list-view/utils.js.map +1 -1
  193. package/build/components/media-placeholder/index.native.js +1 -1
  194. package/build/components/media-placeholder/index.native.js.map +1 -1
  195. package/build/components/media-replace-flow/index.js.map +1 -1
  196. package/build/components/multi-selection-inspector/index.js +2 -2
  197. package/build/components/multi-selection-inspector/index.js.map +1 -1
  198. package/build/components/observe-typing/index.js +1 -0
  199. package/build/components/observe-typing/index.js.map +1 -1
  200. package/build/components/recursion-provider/index.js +1 -0
  201. package/build/components/recursion-provider/index.js.map +1 -1
  202. package/build/components/responsive-block-control/index.js +3 -3
  203. package/build/components/responsive-block-control/index.js.map +1 -1
  204. package/build/components/responsive-block-control/label.js +1 -1
  205. package/build/components/responsive-block-control/label.js.map +1 -1
  206. package/build/components/rich-text/content.js.map +1 -1
  207. package/build/components/rich-text/file-paste-handler.native.js.map +1 -1
  208. package/build/components/rich-text/format-toolbar/index.js.map +1 -1
  209. package/build/components/rich-text/format-toolbar/index.native.js.map +1 -1
  210. package/build/components/rich-text/index.js +3 -2
  211. package/build/components/rich-text/index.js.map +1 -1
  212. package/build/components/rich-text/multiline.js.map +1 -1
  213. package/build/components/rich-text/native/get-format-colors.native.js.map +1 -1
  214. package/build/components/rich-text/native/index.native.js.map +1 -1
  215. package/build/components/rich-text/native/use-format-types.js +1 -0
  216. package/build/components/rich-text/native/use-format-types.js.map +1 -1
  217. package/build/components/rich-text/toolbar-button.js.map +1 -1
  218. package/build/components/rich-text/use-format-types.js +1 -0
  219. package/build/components/rich-text/use-format-types.js.map +1 -1
  220. package/build/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  221. package/build/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  222. package/build/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  223. package/build/components/spacing-sizes-control/utils.js +1 -0
  224. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  225. package/build/components/tool-selector/index.js +13 -8
  226. package/build/components/tool-selector/index.js.map +1 -1
  227. package/build/components/typewriter/index.js +1 -0
  228. package/build/components/typewriter/index.js.map +1 -1
  229. package/build/components/unsupported-block-details/index.native.js.map +1 -1
  230. package/build/components/url-input/index.js +1 -1
  231. package/build/components/url-input/index.js.map +1 -1
  232. package/build/components/use-block-commands/index.js +0 -61
  233. package/build/components/use-block-commands/index.js.map +1 -1
  234. package/build/components/use-block-drop-zone/index.js.map +1 -1
  235. package/build/components/use-flash-editable-blocks/index.js.map +1 -1
  236. package/build/components/use-moving-animation/index.js.map +1 -1
  237. package/build/components/writing-flow/use-tab-nav.js +23 -30
  238. package/build/components/writing-flow/use-tab-nav.js.map +1 -1
  239. package/build/hooks/align.js.map +1 -1
  240. package/build/hooks/block-hooks.js +1 -1
  241. package/build/hooks/block-hooks.js.map +1 -1
  242. package/build/hooks/block-style-variation.js.map +1 -1
  243. package/build/hooks/duotone.js +4 -1
  244. package/build/hooks/duotone.js.map +1 -1
  245. package/build/hooks/font-family.js.map +1 -1
  246. package/build/hooks/gap.js.map +1 -1
  247. package/build/hooks/generated-class-name.js +1 -0
  248. package/build/hooks/generated-class-name.js.map +1 -1
  249. package/build/hooks/layout-child.js +3 -1
  250. package/build/hooks/layout-child.js.map +1 -1
  251. package/build/hooks/layout.js.map +1 -1
  252. package/build/hooks/position.js +4 -3
  253. package/build/hooks/position.js.map +1 -1
  254. package/build/hooks/spacing-visualizer.js.map +1 -1
  255. package/build/hooks/style.js.map +1 -1
  256. package/build/hooks/text-align.js.map +1 -1
  257. package/build/hooks/use-typography-props.js.map +1 -1
  258. package/build/hooks/use-zoom-out.js +24 -16
  259. package/build/hooks/use-zoom-out.js.map +1 -1
  260. package/build/layouts/constrained.js.map +1 -1
  261. package/build/layouts/flex.js.map +1 -1
  262. package/build/layouts/grid.js.map +1 -1
  263. package/build/layouts/utils.js.map +1 -1
  264. package/build/store/actions.js +18 -20
  265. package/build/store/actions.js.map +1 -1
  266. package/build/store/private-actions.js +15 -0
  267. package/build/store/private-actions.js.map +1 -1
  268. package/build/store/private-selectors.js +104 -7
  269. package/build/store/private-selectors.js.map +1 -1
  270. package/build/store/reducer.js +24 -44
  271. package/build/store/reducer.js.map +1 -1
  272. package/build/store/selectors.js +149 -71
  273. package/build/store/selectors.js.map +1 -1
  274. package/build/store/utils.js +4 -3
  275. package/build/store/utils.js.map +1 -1
  276. package/build/utils/block-bindings.js +2 -0
  277. package/build/utils/block-bindings.js.map +1 -1
  278. package/build/utils/get-font-styles-and-weights.js +1 -1
  279. package/build/utils/get-font-styles-and-weights.js.map +1 -1
  280. package/build/utils/object.js +1 -0
  281. package/build/utils/object.js.map +1 -1
  282. package/build/utils/pasting.js.map +1 -1
  283. package/build-module/autocompleters/block.js +1 -3
  284. package/build-module/autocompleters/block.js.map +1 -1
  285. package/build-module/autocompleters/link.js +3 -4
  286. package/build-module/autocompleters/link.js.map +1 -1
  287. package/build-module/components/audio-player/index.native.js +1 -2
  288. package/build-module/components/audio-player/index.native.js.map +1 -1
  289. package/build-module/components/background-image-control/index.js +2 -3
  290. package/build-module/components/background-image-control/index.js.map +1 -1
  291. package/build-module/components/block-actions/index.js +1 -13
  292. package/build-module/components/block-actions/index.js.map +1 -1
  293. package/build-module/components/block-alignment-control/ui.js +1 -2
  294. package/build-module/components/block-alignment-control/ui.js.map +1 -1
  295. package/build-module/components/block-breadcrumb/index.js +1 -2
  296. package/build-module/components/block-breadcrumb/index.js.map +1 -1
  297. package/build-module/components/block-canvas/index.js +1 -2
  298. package/build-module/components/block-canvas/index.js.map +1 -1
  299. package/build-module/components/block-card/index.js +1 -2
  300. package/build-module/components/block-card/index.js.map +1 -1
  301. package/build-module/components/block-compare/block-view.js +1 -2
  302. package/build-module/components/block-compare/block-view.js.map +1 -1
  303. package/build-module/components/block-compare/index.js +1 -2
  304. package/build-module/components/block-compare/index.js.map +1 -1
  305. package/build-module/components/block-controls/fill.js +1 -3
  306. package/build-module/components/block-controls/fill.js.map +1 -1
  307. package/build-module/components/block-controls/slot.js.map +1 -1
  308. package/build-module/components/block-controls/slot.native.js.map +1 -1
  309. package/build-module/components/block-draggable/draggable-chip.js +2 -3
  310. package/build-module/components/block-draggable/draggable-chip.js.map +1 -1
  311. package/build-module/components/block-draggable/draggable-chip.native.js +1 -2
  312. package/build-module/components/block-draggable/draggable-chip.native.js.map +1 -1
  313. package/build-module/components/block-draggable/index.native.js +1 -3
  314. package/build-module/components/block-draggable/index.native.js.map +1 -1
  315. package/build-module/components/block-edit/index.js +1 -2
  316. package/build-module/components/block-edit/index.js.map +1 -1
  317. package/build-module/components/block-edit/multiple-usage-warning.js +1 -2
  318. package/build-module/components/block-edit/multiple-usage-warning.js.map +1 -1
  319. package/build-module/components/block-inspector/index.js +57 -78
  320. package/build-module/components/block-inspector/index.js.map +1 -1
  321. package/build-module/components/block-list/block-crash-warning.js +1 -1
  322. package/build-module/components/block-list/block-crash-warning.js.map +1 -1
  323. package/build-module/components/block-list/block-crash-warning.native.js +1 -1
  324. package/build-module/components/block-list/block-crash-warning.native.js.map +1 -1
  325. package/build-module/components/block-list/block-invalid-warning.js +1 -3
  326. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  327. package/build-module/components/block-list/block-invalid-warning.native.js +1 -1
  328. package/build-module/components/block-list/block-invalid-warning.native.js.map +1 -1
  329. package/build-module/components/block-list/block-list-item.native.js +1 -2
  330. package/build-module/components/block-list/block-list-item.native.js.map +1 -1
  331. package/build-module/components/block-list/block-selection-button.native.js +1 -2
  332. package/build-module/components/block-list/block-selection-button.native.js.map +1 -1
  333. package/build-module/components/block-list/block.js +6 -19
  334. package/build-module/components/block-list/block.js.map +1 -1
  335. package/build-module/components/block-list/block.native.js +1 -2
  336. package/build-module/components/block-list/block.native.js.map +1 -1
  337. package/build-module/components/block-list/index.js +7 -10
  338. package/build-module/components/block-list/index.js.map +1 -1
  339. package/build-module/components/block-list/index.native.js +1 -3
  340. package/build-module/components/block-list/index.native.js.map +1 -1
  341. package/build-module/components/block-list/insertion-point.native.js +1 -2
  342. package/build-module/components/block-list/insertion-point.native.js.map +1 -1
  343. package/build-module/components/block-list/use-block-props/index.js +3 -8
  344. package/build-module/components/block-list/use-block-props/index.js.map +1 -1
  345. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js +14 -6
  346. package/build-module/components/block-list/use-block-props/use-selected-block-event-handlers.js.map +1 -1
  347. package/build-module/components/block-list/use-in-between-inserter.js +5 -3
  348. package/build-module/components/block-list/use-in-between-inserter.js.map +1 -1
  349. package/build-module/components/block-list/zoom-out-separator.js +24 -13
  350. package/build-module/components/block-list/zoom-out-separator.js.map +1 -1
  351. package/build-module/components/block-lock/menu-item.js +1 -3
  352. package/build-module/components/block-lock/menu-item.js.map +1 -1
  353. package/build-module/components/block-lock/modal.js +2 -3
  354. package/build-module/components/block-lock/modal.js.map +1 -1
  355. package/build-module/components/block-lock/toolbar.js +1 -3
  356. package/build-module/components/block-lock/toolbar.js.map +1 -1
  357. package/build-module/components/block-media-update-progress/index.native.js +1 -2
  358. package/build-module/components/block-media-update-progress/index.native.js.map +1 -1
  359. package/build-module/components/block-mover/button.js +1 -3
  360. package/build-module/components/block-mover/button.js.map +1 -1
  361. package/build-module/components/block-mover/index.js +1 -2
  362. package/build-module/components/block-mover/index.js.map +1 -1
  363. package/build-module/components/block-mover/index.native.js +1 -2
  364. package/build-module/components/block-mover/index.native.js.map +1 -1
  365. package/build-module/components/block-navigation/dropdown.js +3 -6
  366. package/build-module/components/block-navigation/dropdown.js.map +1 -1
  367. package/build-module/components/block-parent-selector/index.js +14 -11
  368. package/build-module/components/block-parent-selector/index.js.map +1 -1
  369. package/build-module/components/block-pattern-setup/index.js +1 -3
  370. package/build-module/components/block-pattern-setup/index.js.map +1 -1
  371. package/build-module/components/block-pattern-setup/setup-toolbar.js +11 -22
  372. package/build-module/components/block-pattern-setup/setup-toolbar.js.map +1 -1
  373. package/build-module/components/block-patterns-list/index.js +1 -3
  374. package/build-module/components/block-patterns-list/index.js.map +1 -1
  375. package/build-module/components/block-patterns-paging/index.js +12 -15
  376. package/build-module/components/block-patterns-paging/index.js.map +1 -1
  377. package/build-module/components/block-popover/index.js +45 -2
  378. package/build-module/components/block-popover/index.js.map +1 -1
  379. package/build-module/components/block-preview/auto.js +2 -7
  380. package/build-module/components/block-preview/auto.js.map +1 -1
  381. package/build-module/components/block-preview/index.js +1 -2
  382. package/build-module/components/block-preview/index.js.map +1 -1
  383. package/build-module/components/block-quick-navigation/index.js +3 -6
  384. package/build-module/components/block-quick-navigation/index.js.map +1 -1
  385. package/build-module/components/block-removal-warning-modal/index.js +1 -2
  386. package/build-module/components/block-removal-warning-modal/index.js.map +1 -1
  387. package/build-module/components/block-rename/modal.js +3 -4
  388. package/build-module/components/block-rename/modal.js.map +1 -1
  389. package/build-module/components/block-rename/rename-control.js +1 -3
  390. package/build-module/components/block-rename/rename-control.js.map +1 -1
  391. package/build-module/components/block-settings/container.native.js +1 -3
  392. package/build-module/components/block-settings/container.native.js.map +1 -1
  393. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js +1 -1
  394. package/build-module/components/block-settings-menu/block-parent-selector-menu-item.js.map +1 -1
  395. package/build-module/components/block-settings-menu/block-settings-dropdown.js +80 -79
  396. package/build-module/components/block-settings-menu/block-settings-dropdown.js.map +1 -1
  397. package/build-module/components/block-settings-menu-controls/index.js +3 -9
  398. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  399. package/build-module/components/block-styles/index.js +1 -2
  400. package/build-module/components/block-styles/index.js.map +1 -1
  401. package/build-module/components/block-styles/menu-items.js +1 -2
  402. package/build-module/components/block-styles/menu-items.js.map +1 -1
  403. package/build-module/components/block-styles/preview.native.js +1 -2
  404. package/build-module/components/block-styles/preview.native.js.map +1 -1
  405. package/build-module/components/block-switcher/block-transformations-menu.js +1 -3
  406. package/build-module/components/block-switcher/block-transformations-menu.js.map +1 -1
  407. package/build-module/components/block-switcher/block-transformations-menu.native.js +1 -1
  408. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  409. package/build-module/components/block-switcher/block-variation-transformations.js +1 -3
  410. package/build-module/components/block-switcher/block-variation-transformations.js.map +1 -1
  411. package/build-module/components/block-switcher/index.js +20 -18
  412. package/build-module/components/block-switcher/index.js.map +1 -1
  413. package/build-module/components/block-switcher/pattern-transformations-menu.js +1 -2
  414. package/build-module/components/block-switcher/pattern-transformations-menu.js.map +1 -1
  415. package/build-module/components/block-switcher/preview-block-popover.js +1 -2
  416. package/build-module/components/block-switcher/preview-block-popover.js.map +1 -1
  417. package/build-module/components/block-switcher/use-transformed-patterns.js +1 -0
  418. package/build-module/components/block-switcher/use-transformed-patterns.js.map +1 -1
  419. package/build-module/components/block-switcher/utils.js +1 -0
  420. package/build-module/components/block-switcher/utils.js.map +1 -1
  421. package/build-module/components/block-toolbar/block-toolbar-menu.native.js +1 -2
  422. package/build-module/components/block-toolbar/block-toolbar-menu.native.js.map +1 -1
  423. package/build-module/components/block-toolbar/index.js +17 -22
  424. package/build-module/components/block-toolbar/index.js.map +1 -1
  425. package/build-module/components/block-toolbar/index.native.js +1 -3
  426. package/build-module/components/block-toolbar/index.native.js.map +1 -1
  427. package/build-module/components/block-toolbar/use-has-block-toolbar.js +3 -5
  428. package/build-module/components/block-toolbar/use-has-block-toolbar.js.map +1 -1
  429. package/build-module/components/block-tools/index.js +9 -20
  430. package/build-module/components/block-tools/index.js.map +1 -1
  431. package/build-module/components/block-tools/insertion-point.js +2 -6
  432. package/build-module/components/block-tools/insertion-point.js.map +1 -1
  433. package/build-module/components/block-tools/use-show-block-tools.js +8 -7
  434. package/build-module/components/block-tools/use-show-block-tools.js.map +1 -1
  435. package/build-module/components/block-tools/zoom-out-mode-inserter-button.js +1 -12
  436. package/build-module/components/block-tools/zoom-out-mode-inserter-button.js.map +1 -1
  437. package/build-module/components/block-tools/zoom-out-mode-inserters.js +14 -17
  438. package/build-module/components/block-tools/zoom-out-mode-inserters.js.map +1 -1
  439. package/build-module/components/block-tools/zoom-out-popover.js +2 -1
  440. package/build-module/components/block-tools/zoom-out-popover.js.map +1 -1
  441. package/build-module/components/block-tools/zoom-out-toolbar.js +7 -35
  442. package/build-module/components/block-tools/zoom-out-toolbar.js.map +1 -1
  443. package/build-module/components/block-types-list/index.js +1 -2
  444. package/build-module/components/block-types-list/index.js.map +1 -1
  445. package/build-module/components/block-types-list/index.native.js +1 -2
  446. package/build-module/components/block-types-list/index.native.js.map +1 -1
  447. package/build-module/components/block-variation-picker/index.js +1 -2
  448. package/build-module/components/block-variation-picker/index.js.map +1 -1
  449. package/build-module/components/block-variation-picker/index.native.js +1 -2
  450. package/build-module/components/block-variation-picker/index.native.js.map +1 -1
  451. package/build-module/components/block-variation-transforms/index.js +4 -4
  452. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  453. package/build-module/components/border-radius-control/index.js +1 -3
  454. package/build-module/components/border-radius-control/index.js.map +1 -1
  455. package/build-module/components/border-radius-control/utils.js.map +1 -1
  456. package/build-module/components/button-block-appender/index.js.map +1 -1
  457. package/build-module/components/button-block-appender/index.native.js +1 -2
  458. package/build-module/components/button-block-appender/index.native.js.map +1 -1
  459. package/build-module/components/child-layout-control/index.js +1 -3
  460. package/build-module/components/child-layout-control/index.js.map +1 -1
  461. package/build-module/components/color-style-selector/index.js.map +1 -1
  462. package/build-module/components/colors/utils.js.map +1 -1
  463. package/build-module/components/colors/with-colors.js.map +1 -1
  464. package/build-module/components/colors-gradients/control.js +1 -2
  465. package/build-module/components/colors-gradients/control.js.map +1 -1
  466. package/build-module/components/colors-gradients/dropdown.js +1 -3
  467. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  468. package/build-module/components/colors-gradients/panel-color-gradient-settings.js +1 -3
  469. package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
  470. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js +1 -3
  471. package/build-module/components/colors-gradients/panel-color-gradient-settings.native.js.map +1 -1
  472. package/build-module/components/contrast-checker/index.native.js +1 -2
  473. package/build-module/components/contrast-checker/index.native.js.map +1 -1
  474. package/build-module/components/convert-to-group-buttons/index.js +1 -3
  475. package/build-module/components/convert-to-group-buttons/index.js.map +1 -1
  476. package/build-module/components/convert-to-group-buttons/toolbar.js +1 -2
  477. package/build-module/components/convert-to-group-buttons/toolbar.js.map +1 -1
  478. package/build-module/components/date-format-picker/index.js +2 -2
  479. package/build-module/components/date-format-picker/index.js.map +1 -1
  480. package/build-module/components/default-block-appender/index.js +1 -2
  481. package/build-module/components/default-block-appender/index.js.map +1 -1
  482. package/build-module/components/dimensions-tool/index.js +1 -3
  483. package/build-module/components/dimensions-tool/index.js.map +1 -1
  484. package/build-module/components/dimensions-tool/width-height-tool.js +1 -3
  485. package/build-module/components/dimensions-tool/width-height-tool.js.map +1 -1
  486. package/build-module/components/duotone/utils.js.map +1 -1
  487. package/build-module/components/duotone-control/index.js +1 -2
  488. package/build-module/components/duotone-control/index.js.map +1 -1
  489. package/build-module/components/editor-styles/index.js +1 -3
  490. package/build-module/components/editor-styles/index.js.map +1 -1
  491. package/build-module/components/floating-toolbar/index.native.js +1 -2
  492. package/build-module/components/floating-toolbar/index.native.js.map +1 -1
  493. package/build-module/components/floating-toolbar/nav-up-icon.js +1 -2
  494. package/build-module/components/floating-toolbar/nav-up-icon.js.map +1 -1
  495. package/build-module/components/font-sizes/fluid-utils.js.map +1 -1
  496. package/build-module/components/font-sizes/utils.js.map +1 -1
  497. package/build-module/components/font-sizes/with-font-sizes.js +2 -2
  498. package/build-module/components/font-sizes/with-font-sizes.js.map +1 -1
  499. package/build-module/components/global-styles/advanced-panel.js +1 -2
  500. package/build-module/components/global-styles/advanced-panel.js.map +1 -1
  501. package/build-module/components/global-styles/border-panel.js +2 -3
  502. package/build-module/components/global-styles/border-panel.js.map +1 -1
  503. package/build-module/components/global-styles/color-panel.js +2 -3
  504. package/build-module/components/global-styles/color-panel.js.map +1 -1
  505. package/build-module/components/global-styles/dimensions-panel.js +2 -3
  506. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  507. package/build-module/components/global-styles/filters-panel.js +1 -2
  508. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  509. package/build-module/components/global-styles/get-block-css-selector.js.map +1 -1
  510. package/build-module/components/global-styles/get-global-styles-changes.js +2 -1
  511. package/build-module/components/global-styles/get-global-styles-changes.js.map +1 -1
  512. package/build-module/components/global-styles/hooks.js.map +1 -1
  513. package/build-module/components/global-styles/image-settings-panel.js +1 -2
  514. package/build-module/components/global-styles/image-settings-panel.js.map +1 -1
  515. package/build-module/components/global-styles/shadow-panel-components.js +1 -2
  516. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  517. package/build-module/components/global-styles/typography-panel.js +1 -2
  518. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  519. package/build-module/components/global-styles/use-global-styles-context.native.js.map +1 -1
  520. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  521. package/build-module/components/global-styles/utils.js.map +1 -1
  522. package/build-module/components/gradients/use-gradient.js.map +1 -1
  523. package/build-module/components/grid/grid-item-movers.js +1 -3
  524. package/build-module/components/grid/grid-item-movers.js.map +1 -1
  525. package/build-module/components/grid/grid-visualizer.js.map +1 -1
  526. package/build-module/components/height-control/index.js +1 -2
  527. package/build-module/components/height-control/index.js.map +1 -1
  528. package/build-module/components/iframe/index.js +45 -12
  529. package/build-module/components/iframe/index.js.map +1 -1
  530. package/build-module/components/image-editor/aspect-ratio-dropdown.js +1 -3
  531. package/build-module/components/image-editor/aspect-ratio-dropdown.js.map +1 -1
  532. package/build-module/components/image-editor/cropper.js +1 -3
  533. package/build-module/components/image-editor/cropper.js.map +1 -1
  534. package/build-module/components/image-editor/form-controls.js +1 -3
  535. package/build-module/components/image-editor/form-controls.js.map +1 -1
  536. package/build-module/components/image-editor/index.js +1 -2
  537. package/build-module/components/image-editor/index.js.map +1 -1
  538. package/build-module/components/image-editor/use-save-image.js +1 -1
  539. package/build-module/components/image-editor/use-save-image.js.map +1 -1
  540. package/build-module/components/image-link-destinations/index.native.js +1 -3
  541. package/build-module/components/image-link-destinations/index.native.js.map +1 -1
  542. package/build-module/components/image-size-control/index.js +1 -3
  543. package/build-module/components/image-size-control/index.js.map +1 -1
  544. package/build-module/components/inner-blocks/index.js +1 -9
  545. package/build-module/components/inner-blocks/index.js.map +1 -1
  546. package/build-module/components/inner-blocks/use-nested-settings-update.js +16 -9
  547. package/build-module/components/inner-blocks/use-nested-settings-update.js.map +1 -1
  548. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js +1 -2
  549. package/build-module/components/inner-blocks/warning-max-depth-exceeded.native.js.map +1 -1
  550. package/build-module/components/inserter/block-patterns-explorer/index.js +1 -2
  551. package/build-module/components/inserter/block-patterns-explorer/index.js.map +1 -1
  552. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +2 -3
  553. package/build-module/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js.map +1 -1
  554. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js +3 -5
  555. package/build-module/components/inserter/block-patterns-explorer/pattern-list.js.map +1 -1
  556. package/build-module/components/inserter/block-patterns-tab/index.js +1 -3
  557. package/build-module/components/inserter/block-patterns-tab/index.js.map +1 -1
  558. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js +1 -3
  559. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.js.map +1 -1
  560. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js +1 -3
  561. package/build-module/components/inserter/block-patterns-tab/patterns-filter.js.map +1 -1
  562. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js +1 -1
  563. package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.js.map +1 -1
  564. package/build-module/components/inserter/block-types-tab.js +2 -4
  565. package/build-module/components/inserter/block-types-tab.js.map +1 -1
  566. package/build-module/components/inserter/block-types-tab.native.js.map +1 -1
  567. package/build-module/components/inserter/category-tabs/index.js +3 -13
  568. package/build-module/components/inserter/category-tabs/index.js.map +1 -1
  569. package/build-module/components/inserter/hooks/use-block-types-state.js +27 -8
  570. package/build-module/components/inserter/hooks/use-block-types-state.js.map +1 -1
  571. package/build-module/components/inserter/hooks/use-insertion-point.js +22 -12
  572. package/build-module/components/inserter/hooks/use-insertion-point.js.map +1 -1
  573. package/build-module/components/inserter/hooks/use-patterns-state.js +24 -11
  574. package/build-module/components/inserter/hooks/use-patterns-state.js.map +1 -1
  575. package/build-module/components/inserter/index.native.js +1 -3
  576. package/build-module/components/inserter/index.native.js.map +1 -1
  577. package/build-module/components/inserter/media-tab/media-panel.js +1 -2
  578. package/build-module/components/inserter/media-tab/media-panel.js.map +1 -1
  579. package/build-module/components/inserter/media-tab/media-preview.js +37 -17
  580. package/build-module/components/inserter/media-tab/media-preview.js.map +1 -1
  581. package/build-module/components/inserter/media-tab/media-tab.js +1 -3
  582. package/build-module/components/inserter/media-tab/media-tab.js.map +1 -1
  583. package/build-module/components/inserter/media-tab/utils.js.map +1 -1
  584. package/build-module/components/inserter/menu.js +5 -7
  585. package/build-module/components/inserter/menu.js.map +1 -1
  586. package/build-module/components/inserter/menu.native.js +1 -3
  587. package/build-module/components/inserter/menu.native.js.map +1 -1
  588. package/build-module/components/inserter/mobile-tab-navigation.js +7 -8
  589. package/build-module/components/inserter/mobile-tab-navigation.js.map +1 -1
  590. package/build-module/components/inserter/no-results.js +1 -2
  591. package/build-module/components/inserter/no-results.js.map +1 -1
  592. package/build-module/components/inserter/no-results.native.js +1 -2
  593. package/build-module/components/inserter/no-results.native.js.map +1 -1
  594. package/build-module/components/inserter/panel.js +1 -3
  595. package/build-module/components/inserter/panel.js.map +1 -1
  596. package/build-module/components/inserter/preview-panel.js +1 -2
  597. package/build-module/components/inserter/preview-panel.js.map +1 -1
  598. package/build-module/components/inserter/quick-inserter.js +6 -7
  599. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  600. package/build-module/components/inserter/search-results.js +2 -3
  601. package/build-module/components/inserter/search-results.js.map +1 -1
  602. package/build-module/components/inserter/tabs.native.js.map +1 -1
  603. package/build-module/components/inserter-button/index.native.js +1 -2
  604. package/build-module/components/inserter-button/index.native.js.map +1 -1
  605. package/build-module/components/inserter-list-item/index.js +1 -2
  606. package/build-module/components/inserter-list-item/index.js.map +1 -1
  607. package/build-module/components/inserter-listbox/index.js +1 -2
  608. package/build-module/components/inserter-listbox/index.js.map +1 -1
  609. package/build-module/components/inspector-controls/block-support-tools-panel.js.map +1 -1
  610. package/build-module/components/inspector-controls/fill.js.map +1 -1
  611. package/build-module/components/inspector-controls/fill.native.js +1 -3
  612. package/build-module/components/inspector-controls/fill.native.js.map +1 -1
  613. package/build-module/components/inspector-controls/slot.js.map +1 -1
  614. package/build-module/components/inspector-controls/slot.native.js.map +1 -1
  615. package/build-module/components/inspector-controls-tabs/index.js +1 -2
  616. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  617. package/build-module/components/inspector-controls-tabs/settings-tab.js +1 -3
  618. package/build-module/components/inspector-controls-tabs/settings-tab.js.map +1 -1
  619. package/build-module/components/inspector-controls-tabs/styles-tab.js +1 -3
  620. package/build-module/components/inspector-controls-tabs/styles-tab.js.map +1 -1
  621. package/build-module/components/inspector-popover-header/index.js +1 -2
  622. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  623. package/build-module/components/line-height-control/index.js.map +1 -1
  624. package/build-module/components/link-control/index.js +2 -5
  625. package/build-module/components/link-control/index.js.map +1 -1
  626. package/build-module/components/link-control/is-url-like.js.map +1 -1
  627. package/build-module/components/link-control/link-preview.js +1 -3
  628. package/build-module/components/link-control/link-preview.js.map +1 -1
  629. package/build-module/components/link-control/search-create-button.js +1 -1
  630. package/build-module/components/link-control/search-create-button.js.map +1 -1
  631. package/build-module/components/link-control/search-input.js +4 -7
  632. package/build-module/components/link-control/search-input.js.map +1 -1
  633. package/build-module/components/link-control/search-results.js +6 -17
  634. package/build-module/components/link-control/search-results.js.map +1 -1
  635. package/build-module/components/link-control/settings-drawer.js +1 -3
  636. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  637. package/build-module/components/link-control/settings.js +1 -2
  638. package/build-module/components/link-control/settings.js.map +1 -1
  639. package/build-module/components/link-control/use-rich-url-data.js.map +1 -1
  640. package/build-module/components/list-view/appender.js +2 -3
  641. package/build-module/components/list-view/appender.js.map +1 -1
  642. package/build-module/components/list-view/block-contents.js +2 -28
  643. package/build-module/components/list-view/block-contents.js.map +1 -1
  644. package/build-module/components/list-view/block-select-button.js +1 -2
  645. package/build-module/components/list-view/block-select-button.js.map +1 -1
  646. package/build-module/components/list-view/block.js +1 -3
  647. package/build-module/components/list-view/block.js.map +1 -1
  648. package/build-module/components/list-view/branch.js +1 -3
  649. package/build-module/components/list-view/branch.js.map +1 -1
  650. package/build-module/components/list-view/drop-indicator.js +1 -2
  651. package/build-module/components/list-view/drop-indicator.js.map +1 -1
  652. package/build-module/components/list-view/index.js +1 -2
  653. package/build-module/components/list-view/index.js.map +1 -1
  654. package/build-module/components/list-view/use-block-selection.js +2 -2
  655. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  656. package/build-module/components/list-view/utils.js +1 -1
  657. package/build-module/components/list-view/utils.js.map +1 -1
  658. package/build-module/components/media-placeholder/index.js +1 -3
  659. package/build-module/components/media-placeholder/index.js.map +1 -1
  660. package/build-module/components/media-placeholder/index.native.js +2 -4
  661. package/build-module/components/media-placeholder/index.native.js.map +1 -1
  662. package/build-module/components/media-replace-flow/index.js +1 -3
  663. package/build-module/components/media-replace-flow/index.js.map +1 -1
  664. package/build-module/components/media-upload/index.native.js +1 -3
  665. package/build-module/components/media-upload/index.native.js.map +1 -1
  666. package/build-module/components/media-upload-progress/index.native.js +1 -2
  667. package/build-module/components/media-upload-progress/index.native.js.map +1 -1
  668. package/build-module/components/multi-selection-inspector/index.js +3 -4
  669. package/build-module/components/multi-selection-inspector/index.js.map +1 -1
  670. package/build-module/components/observe-typing/index.js +1 -0
  671. package/build-module/components/observe-typing/index.js.map +1 -1
  672. package/build-module/components/provider/index.js +1 -2
  673. package/build-module/components/provider/index.js.map +1 -1
  674. package/build-module/components/publish-date-time-picker/index.js +1 -2
  675. package/build-module/components/publish-date-time-picker/index.js.map +1 -1
  676. package/build-module/components/recursion-provider/index.js +1 -0
  677. package/build-module/components/recursion-provider/index.js.map +1 -1
  678. package/build-module/components/responsive-block-control/index.js +4 -5
  679. package/build-module/components/responsive-block-control/index.js.map +1 -1
  680. package/build-module/components/responsive-block-control/label.js +2 -4
  681. package/build-module/components/responsive-block-control/label.js.map +1 -1
  682. package/build-module/components/rich-text/content.js.map +1 -1
  683. package/build-module/components/rich-text/event-listeners/before-input-rules.js +2 -2
  684. package/build-module/components/rich-text/event-listeners/before-input-rules.js.map +1 -1
  685. package/build-module/components/rich-text/event-listeners/delete.js +2 -2
  686. package/build-module/components/rich-text/event-listeners/delete.js.map +1 -1
  687. package/build-module/components/rich-text/event-listeners/enter.js +2 -2
  688. package/build-module/components/rich-text/event-listeners/enter.js.map +1 -1
  689. package/build-module/components/rich-text/event-listeners/firefox-compat.js +2 -2
  690. package/build-module/components/rich-text/event-listeners/firefox-compat.js.map +1 -1
  691. package/build-module/components/rich-text/event-listeners/input-events.js +2 -2
  692. package/build-module/components/rich-text/event-listeners/input-events.js.map +1 -1
  693. package/build-module/components/rich-text/event-listeners/input-rules.js +2 -2
  694. package/build-module/components/rich-text/event-listeners/input-rules.js.map +1 -1
  695. package/build-module/components/rich-text/event-listeners/insert-replacement-text.js +2 -2
  696. package/build-module/components/rich-text/event-listeners/insert-replacement-text.js.map +1 -1
  697. package/build-module/components/rich-text/event-listeners/paste-handler.js +2 -2
  698. package/build-module/components/rich-text/event-listeners/paste-handler.js.map +1 -1
  699. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js +2 -2
  700. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.js.map +1 -1
  701. package/build-module/components/rich-text/event-listeners/shortcuts.js +2 -2
  702. package/build-module/components/rich-text/event-listeners/shortcuts.js.map +1 -1
  703. package/build-module/components/rich-text/event-listeners/undo-automatic-change.js +2 -2
  704. package/build-module/components/rich-text/event-listeners/undo-automatic-change.js.map +1 -1
  705. package/build-module/components/rich-text/file-paste-handler.native.js.map +1 -1
  706. package/build-module/components/rich-text/format-toolbar/index.js +1 -3
  707. package/build-module/components/rich-text/format-toolbar/index.js.map +1 -1
  708. package/build-module/components/rich-text/format-toolbar/index.native.js +1 -3
  709. package/build-module/components/rich-text/format-toolbar/index.native.js.map +1 -1
  710. package/build-module/components/rich-text/index.js +4 -5
  711. package/build-module/components/rich-text/index.js.map +1 -1
  712. package/build-module/components/rich-text/index.native.js +1 -3
  713. package/build-module/components/rich-text/index.native.js.map +1 -1
  714. package/build-module/components/rich-text/multiline.js.map +1 -1
  715. package/build-module/components/rich-text/native/get-format-colors.native.js.map +1 -1
  716. package/build-module/components/rich-text/native/index.js +1 -1
  717. package/build-module/components/rich-text/native/index.js.map +1 -1
  718. package/build-module/components/rich-text/native/index.native.js +1 -3
  719. package/build-module/components/rich-text/native/index.native.js.map +1 -1
  720. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js +1 -3
  721. package/build-module/components/rich-text/native/toolbar-button-with-options.native.js.map +1 -1
  722. package/build-module/components/rich-text/native/use-format-types.js +1 -0
  723. package/build-module/components/rich-text/native/use-format-types.js.map +1 -1
  724. package/build-module/components/rich-text/toolbar-button.js.map +1 -1
  725. package/build-module/components/rich-text/use-format-types.js +1 -0
  726. package/build-module/components/rich-text/use-format-types.js.map +1 -1
  727. package/build-module/components/spacing-sizes-control/index.js +1 -2
  728. package/build-module/components/spacing-sizes-control/index.js.map +1 -1
  729. package/build-module/components/spacing-sizes-control/input-controls/axial.js +1 -2
  730. package/build-module/components/spacing-sizes-control/input-controls/axial.js.map +1 -1
  731. package/build-module/components/spacing-sizes-control/input-controls/separated.js +1 -2
  732. package/build-module/components/spacing-sizes-control/input-controls/separated.js.map +1 -1
  733. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js +1 -3
  734. package/build-module/components/spacing-sizes-control/input-controls/spacing-input-control.js.map +1 -1
  735. package/build-module/components/spacing-sizes-control/utils.js +1 -0
  736. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  737. package/build-module/components/tabbed-sidebar/index.js +1 -2
  738. package/build-module/components/tabbed-sidebar/index.js.map +1 -1
  739. package/build-module/components/tool-selector/index.js +14 -11
  740. package/build-module/components/tool-selector/index.js.map +1 -1
  741. package/build-module/components/typewriter/index.js +1 -0
  742. package/build-module/components/typewriter/index.js.map +1 -1
  743. package/build-module/components/unsupported-block-details/index.native.js +1 -2
  744. package/build-module/components/unsupported-block-details/index.native.js.map +1 -1
  745. package/build-module/components/url-input/button.js +1 -2
  746. package/build-module/components/url-input/button.js.map +1 -1
  747. package/build-module/components/url-input/index.js +2 -4
  748. package/build-module/components/url-input/index.js.map +1 -1
  749. package/build-module/components/url-popover/image-url-input-ui.js +1 -3
  750. package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
  751. package/build-module/components/url-popover/index.js +1 -2
  752. package/build-module/components/url-popover/index.js.map +1 -1
  753. package/build-module/components/url-popover/link-editor.js +1 -2
  754. package/build-module/components/url-popover/link-editor.js.map +1 -1
  755. package/build-module/components/url-popover/link-viewer.js +1 -2
  756. package/build-module/components/url-popover/link-viewer.js.map +1 -1
  757. package/build-module/components/use-block-commands/index.js +1 -62
  758. package/build-module/components/use-block-commands/index.js.map +1 -1
  759. package/build-module/components/use-block-drop-zone/index.js.map +1 -1
  760. package/build-module/components/use-flash-editable-blocks/index.js.map +1 -1
  761. package/build-module/components/use-moving-animation/index.js.map +1 -1
  762. package/build-module/components/video-player/index.native.js +1 -2
  763. package/build-module/components/video-player/index.native.js.map +1 -1
  764. package/build-module/components/warning/index.js +1 -2
  765. package/build-module/components/warning/index.js.map +1 -1
  766. package/build-module/components/warning/index.native.js +1 -2
  767. package/build-module/components/warning/index.native.js.map +1 -1
  768. package/build-module/components/writing-flow/index.js +1 -3
  769. package/build-module/components/writing-flow/index.js.map +1 -1
  770. package/build-module/components/writing-flow/use-tab-nav.js +24 -31
  771. package/build-module/components/writing-flow/use-tab-nav.js.map +1 -1
  772. package/build-module/hooks/align.js.map +1 -1
  773. package/build-module/hooks/anchor.js +1 -3
  774. package/build-module/hooks/anchor.js.map +1 -1
  775. package/build-module/hooks/block-bindings.js +1 -3
  776. package/build-module/hooks/block-bindings.js.map +1 -1
  777. package/build-module/hooks/block-hooks.js +2 -3
  778. package/build-module/hooks/block-hooks.js.map +1 -1
  779. package/build-module/hooks/block-style-variation.js +1 -2
  780. package/build-module/hooks/block-style-variation.js.map +1 -1
  781. package/build-module/hooks/dimensions.js +1 -3
  782. package/build-module/hooks/dimensions.js.map +1 -1
  783. package/build-module/hooks/duotone.js +5 -4
  784. package/build-module/hooks/duotone.js.map +1 -1
  785. package/build-module/hooks/font-family.js.map +1 -1
  786. package/build-module/hooks/gap.js.map +1 -1
  787. package/build-module/hooks/generated-class-name.js +1 -0
  788. package/build-module/hooks/generated-class-name.js.map +1 -1
  789. package/build-module/hooks/grid-visualizer.js +1 -3
  790. package/build-module/hooks/grid-visualizer.js.map +1 -1
  791. package/build-module/hooks/layout-child.js +5 -4
  792. package/build-module/hooks/layout-child.js.map +1 -1
  793. package/build-module/hooks/layout.js +1 -3
  794. package/build-module/hooks/layout.js.map +1 -1
  795. package/build-module/hooks/position.js +5 -2
  796. package/build-module/hooks/position.js.map +1 -1
  797. package/build-module/hooks/spacing-visualizer.js.map +1 -1
  798. package/build-module/hooks/style.js +1 -3
  799. package/build-module/hooks/style.js.map +1 -1
  800. package/build-module/hooks/text-align.js.map +1 -1
  801. package/build-module/hooks/typography.native.js +1 -2
  802. package/build-module/hooks/typography.native.js.map +1 -1
  803. package/build-module/hooks/use-bindings-attributes.js +1 -2
  804. package/build-module/hooks/use-bindings-attributes.js.map +1 -1
  805. package/build-module/hooks/use-typography-props.js.map +1 -1
  806. package/build-module/hooks/use-zoom-out.js +24 -17
  807. package/build-module/hooks/use-zoom-out.js.map +1 -1
  808. package/build-module/layouts/constrained.js +1 -3
  809. package/build-module/layouts/constrained.js.map +1 -1
  810. package/build-module/layouts/flex.js +1 -3
  811. package/build-module/layouts/flex.js.map +1 -1
  812. package/build-module/layouts/grid.js +1 -3
  813. package/build-module/layouts/grid.js.map +1 -1
  814. package/build-module/layouts/utils.js.map +1 -1
  815. package/build-module/store/actions.js +17 -18
  816. package/build-module/store/actions.js.map +1 -1
  817. package/build-module/store/private-actions.js +14 -0
  818. package/build-module/store/private-actions.js.map +1 -1
  819. package/build-module/store/private-selectors.js +98 -7
  820. package/build-module/store/private-selectors.js.map +1 -1
  821. package/build-module/store/reducer.js +22 -41
  822. package/build-module/store/reducer.js.map +1 -1
  823. package/build-module/store/selectors.js +150 -70
  824. package/build-module/store/selectors.js.map +1 -1
  825. package/build-module/store/utils.js +3 -2
  826. package/build-module/store/utils.js.map +1 -1
  827. package/build-module/utils/block-bindings.js +2 -0
  828. package/build-module/utils/block-bindings.js.map +1 -1
  829. package/build-module/utils/get-font-styles-and-weights.js +1 -1
  830. package/build-module/utils/get-font-styles-and-weights.js.map +1 -1
  831. package/build-module/utils/get-px-from-css-unit.js +1 -1
  832. package/build-module/utils/get-px-from-css-unit.js.map +1 -1
  833. package/build-module/utils/object.js +1 -0
  834. package/build-module/utils/object.js.map +1 -1
  835. package/build-module/utils/pasting.js.map +1 -1
  836. package/build-style/content-rtl.css +22 -73
  837. package/build-style/content.css +22 -73
  838. package/build-style/default-editor-styles-rtl.css +10 -1
  839. package/build-style/default-editor-styles.css +10 -1
  840. package/build-style/style-rtl.css +48 -165
  841. package/build-style/style.css +48 -165
  842. package/package.json +33 -33
  843. package/src/autocompleters/link.js +2 -1
  844. package/src/components/block-actions/index.js +1 -13
  845. package/src/components/block-canvas/style.scss +0 -1
  846. package/src/components/block-draggable/style.scss +2 -2
  847. package/src/components/block-inspector/index.js +79 -95
  848. package/src/components/block-list/block.js +7 -25
  849. package/src/components/block-list/content.scss +4 -63
  850. package/src/components/block-list/index.js +21 -29
  851. package/src/components/block-list/use-block-props/index.js +2 -8
  852. package/src/components/block-list/use-block-props/use-selected-block-event-handlers.js +25 -4
  853. package/src/components/block-list/use-in-between-inserter.js +5 -2
  854. package/src/components/block-list/zoom-out-separator.js +32 -14
  855. package/src/components/block-navigation/dropdown.js +1 -2
  856. package/src/components/block-parent-selector/index.js +13 -10
  857. package/src/components/block-pattern-setup/setup-toolbar.js +5 -10
  858. package/src/components/block-patterns-paging/index.js +8 -7
  859. package/src/components/block-patterns-paging/style.scss +10 -27
  860. package/src/components/block-popover/index.js +64 -2
  861. package/src/components/block-preview/auto.js +1 -4
  862. package/src/components/block-quick-navigation/index.js +1 -2
  863. package/src/components/block-settings-menu/block-settings-dropdown.js +120 -106
  864. package/src/components/block-settings-menu-controls/index.js +0 -15
  865. package/src/components/block-switcher/index.js +37 -30
  866. package/src/components/block-toolbar/index.js +22 -34
  867. package/src/components/block-toolbar/style.scss +10 -1
  868. package/src/components/block-toolbar/use-has-block-toolbar.js +19 -31
  869. package/src/components/block-tools/index.js +7 -27
  870. package/src/components/block-tools/insertion-point.js +1 -4
  871. package/src/components/block-tools/style.scss +0 -90
  872. package/src/components/block-tools/use-show-block-tools.js +10 -13
  873. package/src/components/block-tools/zoom-out-mode-inserter-button.js +2 -17
  874. package/src/components/block-tools/zoom-out-mode-inserters.js +11 -19
  875. package/src/components/block-tools/zoom-out-popover.js +2 -1
  876. package/src/components/block-tools/zoom-out-toolbar.js +4 -36
  877. package/src/components/font-family/README.md +5 -1
  878. package/src/components/global-styles/border-panel.js +1 -1
  879. package/src/components/global-styles/dimensions-panel.js +1 -1
  880. package/src/components/iframe/content.scss +20 -24
  881. package/src/components/iframe/index.js +56 -12
  882. package/src/components/iframe/style.scss +6 -5
  883. package/src/components/inner-blocks/index.js +1 -16
  884. package/src/components/inner-blocks/use-nested-settings-update.js +16 -10
  885. package/src/components/inserter/block-patterns-explorer/pattern-explorer-sidebar.js +1 -1
  886. package/src/components/inserter/block-types-tab.js +1 -1
  887. package/src/components/inserter/category-tabs/index.js +1 -11
  888. package/src/components/inserter/hooks/use-block-types-state.js +34 -14
  889. package/src/components/inserter/hooks/use-insertion-point.js +35 -13
  890. package/src/components/inserter/hooks/use-patterns-state.js +46 -9
  891. package/src/components/inserter/media-tab/media-preview.js +38 -12
  892. package/src/components/inserter/menu.js +4 -4
  893. package/src/components/inserter/mobile-tab-navigation.js +10 -13
  894. package/src/components/inserter/quick-inserter.js +6 -5
  895. package/src/components/inserter/style.scss +1 -69
  896. package/src/components/inspector-controls-tabs/style.scss +2 -6
  897. package/src/components/link-control/index.js +0 -1
  898. package/src/components/link-control/search-input.js +4 -5
  899. package/src/components/link-control/search-results.js +2 -13
  900. package/src/components/link-control/test/index.js +84 -46
  901. package/src/components/list-view/block-contents.js +1 -28
  902. package/src/components/list-view/style.scss +0 -14
  903. package/src/components/media-replace-flow/test/index.js +1 -1
  904. package/src/components/responsive-block-control/style.scss +0 -1
  905. package/src/components/rich-text/style.scss +5 -0
  906. package/src/components/tool-selector/index.js +15 -7
  907. package/src/components/tool-selector/style.scss +5 -0
  908. package/src/components/use-block-commands/index.js +0 -58
  909. package/src/components/writing-flow/use-tab-nav.js +32 -40
  910. package/src/content.scss +0 -1
  911. package/src/hooks/duotone.js +4 -1
  912. package/src/hooks/layout-child.js +4 -1
  913. package/src/hooks/position.js +4 -1
  914. package/src/hooks/use-zoom-out.js +36 -20
  915. package/src/store/actions.js +17 -15
  916. package/src/store/private-actions.js +14 -0
  917. package/src/store/private-selectors.js +120 -16
  918. package/src/store/reducer.js +22 -45
  919. package/src/store/selectors.js +218 -118
  920. package/src/store/test/private-actions.js +15 -0
  921. package/src/store/test/private-selectors.js +41 -1
  922. package/src/store/test/reducer.js +40 -4
  923. package/src/store/test/selectors.js +195 -21
  924. package/src/store/utils.js +4 -2
  925. package/src/style.scss +1 -0
  926. package/src/utils/block-bindings.js +2 -0
  927. package/build/components/block-controls/use-has-block-controls.js +0 -43
  928. package/build/components/block-controls/use-has-block-controls.js.map +0 -1
  929. package/build/components/block-list/use-block-props/use-nav-mode-exit.js +0 -54
  930. package/build/components/block-list/use-block-props/use-nav-mode-exit.js.map +0 -1
  931. package/build/components/block-tools/block-selection-button.js +0 -259
  932. package/build/components/block-tools/block-selection-button.js.map +0 -1
  933. package/build/components/block-tools/block-toolbar-breadcrumb.js +0 -57
  934. package/build/components/block-tools/block-toolbar-breadcrumb.js.map +0 -1
  935. package/build/components/inserter/tabs.js +0 -78
  936. package/build/components/inserter/tabs.js.map +0 -1
  937. package/build-module/components/block-controls/use-has-block-controls.js +0 -34
  938. package/build-module/components/block-controls/use-has-block-controls.js.map +0 -1
  939. package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js +0 -48
  940. package/build-module/components/block-list/use-block-props/use-nav-mode-exit.js.map +0 -1
  941. package/build-module/components/block-tools/block-selection-button.js +0 -254
  942. package/build-module/components/block-tools/block-selection-button.js.map +0 -1
  943. package/build-module/components/block-tools/block-toolbar-breadcrumb.js +0 -49
  944. package/build-module/components/block-tools/block-toolbar-breadcrumb.js.map +0 -1
  945. package/build-module/components/inserter/tabs.js +0 -72
  946. package/build-module/components/inserter/tabs.js.map +0 -1
  947. package/src/components/block-controls/use-has-block-controls.js +0 -35
  948. package/src/components/block-list/use-block-props/use-nav-mode-exit.js +0 -46
  949. package/src/components/block-tools/block-selection-button.js +0 -302
  950. package/src/components/block-tools/block-toolbar-breadcrumb.js +0 -51
  951. package/src/components/inner-blocks/content.scss +0 -13
  952. package/src/components/inserter/tabs.js +0 -78
  953. package/src/components/inserter/test/block-types-tab.native.js +0 -67
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","useMergeRefs","Popover","forwardRef","useMemo","useReducer","useLayoutEffect","useBlockElement","usePopoverScroll","rectUnion","getVisibleElementBounds","jsx","_jsx","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","contextElement","animate","focusOnMount","anchor","__unstableSlotName","inline","placement","resize","flip","className","variant","PrivateBlockPopover","PublicBlockPopover"],"sources":["@wordpress/block-editor/src/components/block-popover/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\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 { useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport usePopoverScroll from './use-popover-scroll';\nimport { rectUnion, getVisibleElementBounds } from '../../utils/dom';\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\treturn lastSelectedElement\n\t\t\t\t\t? rectUnion(\n\t\t\t\t\t\t\tgetVisibleElementBounds( selectedElement ),\n\t\t\t\t\t\t\tgetVisibleElementBounds( lastSelectedElement )\n\t\t\t\t\t )\n\t\t\t\t\t: getVisibleElementBounds( selectedElement );\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={ clsx( 'block-editor-block-popover', props.className ) }\n\t\t\tvariant=\"unstyled\"\n\t\t>\n\t\t\t{ children }\n\t\t</Popover>\n\t);\n}\n\nexport const PrivateBlockPopover = forwardRef( BlockPopover );\n\nconst PublicBlockPopover = (\n\t{ clientId, bottomClientId, children, ...props },\n\tref\n) => (\n\t<PrivateBlockPopover\n\t\t{ ...props }\n\t\tbottomClientId={ bottomClientId }\n\t\tclientId={ clientId }\n\t\t__unstableContentRef={ undefined }\n\t\t__unstablePopoverSlot={ undefined }\n\t\tref={ ref }\n\t>\n\t\t{ children }\n\t</PrivateBlockPopover>\n);\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-popover/README.md\n */\nexport default forwardRef( PublicBlockPopover );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,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C,GAAG,kBAEHZ,IAAA,CAACuC,mBAAmB;EAAA,GACd5B,KAAK;EACVL,cAAc,EAAGA,cAAgB;EACjCD,QAAQ,EAAGA,QAAU;EACrBI,oBAAoB,EAAGiB,SAAW;EAClClB,qBAAqB,EAAGkB,SAAW;EACnCd,GAAG,EAAGA,GAAK;EAAAL,QAAA,EAETA;AAAQ,CACU,CACrB;;AAED;AACA;AACA;AACA,eAAehB,UAAU,CAAEiD,kBAAmB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useMergeRefs","Popover","useSelect","forwardRef","useMemo","useReducer","useLayoutEffect","useBlockElement","usePopoverScroll","rectUnion","getVisibleElementBounds","store","blockEditorStore","unlock","jsx","_jsx","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","isZoomOut","parentSectionBlock","isSectionSelected","select","_getParentSectionBloc","isZoomOutSelector","getSectionRootClientId","getParentSectionBlock","getBlockOrder","includes","parentSectionElement","popoverAnchor","undefined","getBoundingClientRect","canvasElementRect","current","parentSectionElementRect","anchorHeight","bottom","top","anchorWidth","width","DOMRectReadOnly","left","contextElement","animate","focusOnMount","anchor","__unstableSlotName","inline","placement","resize","flip","className","variant","PrivateBlockPopover","PublicBlockPopover"],"sources":["@wordpress/block-editor/src/components/block-popover/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useMergeRefs } from '@wordpress/compose';\nimport { Popover } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tforwardRef,\n\tuseMemo,\n\tuseReducer,\n\tuseLayoutEffect,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport usePopoverScroll from './use-popover-scroll';\nimport { rectUnion, getVisibleElementBounds } from '../../utils/dom';\nimport { store as blockEditorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\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 { isZoomOut, parentSectionBlock, isSectionSelected } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tisZoomOut: isZoomOutSelector,\n\t\t\t\tgetSectionRootClientId,\n\t\t\t\tgetParentSectionBlock,\n\t\t\t\tgetBlockOrder,\n\t\t\t} = unlock( select( blockEditorStore ) );\n\n\t\t\treturn {\n\t\t\t\tisZoomOut: isZoomOutSelector(),\n\t\t\t\tparentSectionBlock:\n\t\t\t\t\tgetParentSectionBlock( clientId ) ?? clientId,\n\t\t\t\tisSectionSelected: getBlockOrder(\n\t\t\t\t\tgetSectionRootClientId()\n\t\t\t\t).includes( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\t// This element is used to position the zoom out view vertical toolbar\n\t// correctly, relative to the selected section.\n\tconst parentSectionElement = useBlockElement( parentSectionBlock );\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( isZoomOut && ! parentSectionElement ) ||\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\t// The zoom out view has a vertical block toolbar that should always\n\t\t\t\t// be on the edge of the canvas, aligned to the top of the currently\n\t\t\t\t// selected section. This condition changes the anchor of the toolbar\n\t\t\t\t// to the section instead of the block to handle blocks that are\n\t\t\t\t// not full width and nested blocks to keep section height.\n\t\t\t\tif ( isZoomOut && isSectionSelected ) {\n\t\t\t\t\t// Compute the height based on the parent section of the\n\t\t\t\t\t// selected block, because the selected block may be\n\t\t\t\t\t// shorter than the section.\n\t\t\t\t\tconst canvasElementRect = getVisibleElementBounds(\n\t\t\t\t\t\t__unstableContentRef.current\n\t\t\t\t\t);\n\t\t\t\t\tconst parentSectionElementRect =\n\t\t\t\t\t\tgetVisibleElementBounds( parentSectionElement );\n\t\t\t\t\tconst anchorHeight =\n\t\t\t\t\t\tparentSectionElementRect.bottom -\n\t\t\t\t\t\tparentSectionElementRect.top;\n\n\t\t\t\t\t// Always use the width of the section root element to make sure\n\t\t\t\t\t// the toolbar is always on the edge of the canvas.\n\t\t\t\t\tconst anchorWidth = canvasElementRect.width;\n\t\t\t\t\treturn new window.DOMRectReadOnly(\n\t\t\t\t\t\tcanvasElementRect.left,\n\t\t\t\t\t\tparentSectionElementRect.top,\n\t\t\t\t\t\tanchorWidth,\n\t\t\t\t\t\tanchorHeight\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn lastSelectedElement\n\t\t\t\t\t? rectUnion(\n\t\t\t\t\t\t\tgetVisibleElementBounds( selectedElement ),\n\t\t\t\t\t\t\tgetVisibleElementBounds( lastSelectedElement )\n\t\t\t\t\t )\n\t\t\t\t\t: getVisibleElementBounds( selectedElement );\n\t\t\t},\n\t\t\tcontextElement: selectedElement,\n\t\t};\n\t}, [\n\t\tpopoverDimensionsRecomputeCounter,\n\t\tisZoomOut,\n\t\tparentSectionElement,\n\t\tselectedElement,\n\t\tbottomClientId,\n\t\tlastSelectedElement,\n\t\tisSectionSelected,\n\t\t__unstableContentRef,\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={ clsx( 'block-editor-block-popover', props.className ) }\n\t\t\tvariant=\"unstyled\"\n\t\t>\n\t\t\t{ children }\n\t\t</Popover>\n\t);\n}\n\nexport const PrivateBlockPopover = forwardRef( BlockPopover );\n\nconst PublicBlockPopover = (\n\t{ clientId, bottomClientId, children, ...props },\n\tref\n) => (\n\t<PrivateBlockPopover\n\t\t{ ...props }\n\t\tbottomClientId={ bottomClientId }\n\t\tclientId={ clientId }\n\t\t__unstableContentRef={ undefined }\n\t\t__unstablePopoverSlot={ undefined }\n\t\tref={ ref }\n\t>\n\t\t{ children }\n\t</PrivateBlockPopover>\n);\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-popover/README.md\n */\nexport default forwardRef( PublicBlockPopover );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SACCC,UAAU,EACVC,OAAO,EACPC,UAAU,EACVC,eAAe,QACT,oBAAoB;;AAE3B;AACA;AACA;AACA,SAASC,eAAe,QAAQ,8CAA8C;AAC9E,OAAOC,gBAAgB,MAAM,sBAAsB;AACnD,SAASC,SAAS,EAAEC,uBAAuB,QAAQ,iBAAiB;AACpE,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE3C,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,GAAGrB,eAAe,CAAEa,QAAS,CAAC;EACnD,MAAMS,mBAAmB,GAAGtB,eAAe,CAAEc,cAAc,aAAdA,cAAc,cAAdA,cAAc,GAAID,QAAS,CA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BACCd,IAAA,CAACd,OAAO;IACP0B,GAAG,EAAGG,UAAY;IAClBmC,OAAO,EAAG,KAAO;IACjBC,YAAY,EAAG,KAAO;IACtBC,MAAM,EAAGhB;IACT;IACA;IAAA;IACAiB,kBAAkB,EAAG7C,qBAAuB;IAC5C8C,MAAM,EAAG,CAAE9C,qBAAuB;IAClC+C,SAAS,EAAC,WAAW;IACrBC,MAAM,EAAG,KAAO;IAChBC,IAAI,EAAG,KAAO;IACd/C,KAAK,EAAGA,KAAO;IAAA,GACVC,KAAK;IACV+C,SAAS,EAAG1E,IAAI,CAAE,4BAA4B,EAAE2B,KAAK,CAAC+C,SAAU,CAAG;IACnEC,OAAO,EAAC,UAAU;IAAApD,QAAA,EAEhBA;EAAQ,CACF,CAAC;AAEZ;AAEA,OAAO,MAAMqD,mBAAmB,GAAGxE,UAAU,CAAEgB,YAAa,CAAC;AAE7D,MAAMyD,kBAAkB,GAAGA,CAC1B;EAAExD,QAAQ;EAAEC,cAAc;EAAEC,QAAQ;EAAE,GAAGI;AAAM,CAAC,EAChDC,GAAG,kBAEHZ,IAAA,CAAC4D,mBAAmB;EAAA,GACdjD,KAAK;EACVL,cAAc,EAAGA,cAAgB;EACjCD,QAAQ,EAAGA,QAAU;EACrBI,oBAAoB,EAAG4B,SAAW;EAClC7B,qBAAqB,EAAG6B,SAAW;EACnCzB,GAAG,EAAGA,GAAK;EAAAL,QAAA,EAETA;AAAQ,CACU,CACrB;;AAED;AACA;AACA;AACA,eAAenB,UAAU,CAAEyE,kBAAmB,CAAC","ignoreList":[]}
@@ -15,10 +15,8 @@ import EditorStyles from '../editor-styles';
15
15
  import { store } from '../../store';
16
16
 
17
17
  // This is used to avoid rendering the block list if the sizes change.
18
- import { jsx as _jsx } from "react/jsx-runtime";
19
- import { jsxs as _jsxs } from "react/jsx-runtime";
20
- import { Fragment as _Fragment } from "react/jsx-runtime";
21
- let MemoizedBlockList;
18
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
19
+ const MemoizedBlockList = memo(BlockList);
22
20
  const MAX_HEIGHT = 2000;
23
21
  const EMPTY_ADDITIONAL_STYLES = [];
24
22
  function ScaledBlockPreview({
@@ -52,9 +50,6 @@ function ScaledBlockPreview({
52
50
  }
53
51
  return styles;
54
52
  }, [styles, additionalStyles]);
55
-
56
- // Initialize on render instead of module top level, to avoid circular dependency issues.
57
- MemoizedBlockList = MemoizedBlockList || memo(BlockList);
58
53
  const scale = containerWidth / viewportWidth;
59
54
  const aspectRatio = contentHeight ? containerWidth / (contentHeight * scale) : 0;
60
55
  return /*#__PURE__*/_jsx(Disabled, {
@@ -1 +1 @@
1
- {"version":3,"names":["useResizeObserver","useRefEffect","useSelect","memo","useMemo","Disabled","BlockList","Iframe","EditorStyles","store","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","MemoizedBlockList","MAX_HEIGHT","EMPTY_ADDITIONAL_STYLES","ScaledBlockPreview","viewportWidth","containerWidth","minHeight","additionalStyles","contentResizeListener","height","contentHeight","styles","select","settings","getSettings","editorStyles","css","__unstableType","scale","aspectRatio","className","style","transform","maxHeight","undefined","children","contentRef","bodyElement","ownerDocument","documentElement","classList","add","position","width","boxSizing","tabIndex","pointerEvents","renderAppender","AutoBlockPreview","props","containerResizeListener"],"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/>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C,aAAa;QACrB0B,aAAa,EAAE,MAAM;QACrB;QACA;QACAb,SAAS,EAAEtB,UAAU;QACrBK,SAAS,EACRY,KAAK,KAAK,CAAC,IAAIA,KAAK,GAAG,CAAC,IAAIZ,SAAS,GAClCA,SAAS,GAAGY,KAAK,GACjBZ;MACL,CAAG;MAAAmB,QAAA,gBAEH9B,IAAA,CAACH,YAAY;QAACmB,MAAM,EAAGI;MAAc,CAAE,CAAC,EACtCP,qBAAqB,eACvBb,IAAA,CAACK,iBAAiB;QAACqC,cAAc,EAAG;MAAO,CAAE,CAAC;IAAA,CACvC;EAAC,CACA,CAAC;AAEb;AAEA,eAAe,SAASC,gBAAgBA,CAAEC,KAAK,EAAG;EACjD,MAAM,CAAEC,uBAAuB,EAAE;IAAEP,KAAK,EAAE5B;EAAe,CAAC,CAAE,GAC3DrB,iBAAiB,CAAC,CAAC;EAEpB,oBACCa,KAAA,CAAAE,SAAA;IAAA0B,QAAA,gBACC9B,IAAA;MAAK0B,KAAK,EAAG;QAAEW,QAAQ,EAAE,UAAU;QAAEC,KAAK,EAAE,MAAM;QAAExB,MAAM,EAAE;MAAE,CAAG;MAAAgB,QAAA,EAC9De;IAAuB,CACrB,CAAC,eACN7C,IAAA;MAAKyB,SAAS,EAAC,uCAAuC;MAAAK,QAAA,EACnD,CAAC,CAAEpB,cAAc,iBAClBV,IAAA,CAACQ,kBAAkB;QAAA,GACboC,KAAK;QACVlC,cAAc,EAAGA;MAAgB,CACjC;IACD,CACG,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["useResizeObserver","useRefEffect","useSelect","memo","useMemo","Disabled","BlockList","Iframe","EditorStyles","store","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","MemoizedBlockList","MAX_HEIGHT","EMPTY_ADDITIONAL_STYLES","ScaledBlockPreview","viewportWidth","containerWidth","minHeight","additionalStyles","contentResizeListener","height","contentHeight","styles","select","settings","getSettings","editorStyles","css","__unstableType","scale","aspectRatio","className","style","transform","maxHeight","undefined","children","contentRef","bodyElement","ownerDocument","documentElement","classList","add","position","width","boxSizing","tabIndex","pointerEvents","renderAppender","AutoBlockPreview","props","containerResizeListener"],"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.\nconst MemoizedBlockList = memo( BlockList );\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\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;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AACA,MAAMC,iBAAiB,GAAGb,IAAI,CAAEG,SAAU,CAAC;AAE3C,MAAMW,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,a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AAK,QAAA,EACnD,CAAC,CAAEpB,cAAc,iBAClBV,IAAA,CAACQ,kBAAkB;QAAA,GACboC,KAAK;QACVlC,cAAc,EAAGA;MAAgB,CACjC;IACD,CACG,CAAC;EAAA,CACL,CAAC;AAEL","ignoreList":[]}
@@ -19,8 +19,7 @@ import AutoHeightBlockPreview from './auto';
19
19
  import EditorStyles from '../editor-styles';
20
20
  import { store as blockEditorStore } from '../../store';
21
21
  import { BlockListItems } from '../block-list';
22
- import { jsx as _jsx } from "react/jsx-runtime";
23
- import { jsxs as _jsxs } from "react/jsx-runtime";
22
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
23
  const EMPTY_ADDITIONAL_STYLES = [];
25
24
  export function BlockPreview({
26
25
  blocks,
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","useDisabled","useMergeRefs","useSelect","memo","useMemo","deprecated","ExperimentalBlockEditorProvider","AutoHeightBlockPreview","EditorStyles","store","blockEditorStore","BlockListItems","jsx","_jsx","jsxs","_jsxs","EMPTY_ADDITIONAL_STYLES","BlockPreview","blocks","viewportWidth","minHeight","additionalStyles","__experimentalMinHeight","__experimentalPadding","since","version","alternative","css","originalSettings","select","getSettings","settings","focusMode","__unstableIsPreviewMode","renderedBlocks","Array","isArray","length","value","children","useBlockPreview","props","layout","styles","undefined","disabledRef","ref","renderAppender","className"],"sources":["@wordpress/block-editor/src/components/block-preview/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\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: clsx(\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,IAAI,MAAM,MAAM;;AAEvB;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;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE/C,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;IACnCjB,UAAU,CAAE,kCAAkC,EAAE;MAC/CmB,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;IACDlB,UAAU,CAAE,gDAAgD,EAAE;MAC7DmB,KAAK,EAAE,KAAK;MACZC,OAAO,EAAE,KAAK;MACdC,WAAW,E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;EACD,MAAMC,QAAQ,GAAG3B,OAAO,CACvB,OAAQ;IACP,GAAGwB,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,GAAG7C,WAAW,CAAC,CAAC;EACjC,MAAM8C,GAAG,GAAG7C,YAAY,CAAE,CAAEwC,KAAK,CAACK,GAAG,EAAED,WAAW,CAAG,CAAC;EACtD,MAAMX,cAAc,GAAG9B,OAAO,CAC7B,MAAQ+B,KAAK,CAACC,OAAO,CAAElB,MAAO,CAAC,GAAGA,MAAM,GAAG,CAAEA,MAAM,CAAI,EACvD,CAAEA,MAAM,CACT,CAAC;EAED,MAAMqB,QAAQ,gBACbxB,KAAA,CAACT,+BAA+B;IAC/BgC,KAAK,EAAGJ,cAAgB;IACxBH,QAAQ,EAAGA,QAAU;IAAAQ,QAAA,gBAErB1B,IAAA,CAACL,YAAY,IAAE,CAAC,eAChBK,IAAA,CAACF,cAAc;MAACoC,cAAc,EAAG,KAAO;MAACL,MAAM,EAAGA;IAAQ,CAAE,CAAC;EAAA,CAC7B,CACjC;EAED,OAAO;IACN,GAAGD,KAAK;IACRK,GAAG;IACHE,SAAS,EAAEjD,IAAI,CACd0C,KAAK,CAACO,SAAS,EACf,0CAA0C,EAC1C,qBACD,CAAC;IACDT,QAAQ,EAAErB,MAAM,EAAEmB,MAAM,GAAGE,QAAQ,GAAG;EACvC,CAAC;AACF","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useDisabled","useMergeRefs","useSelect","memo","useMemo","deprecated","ExperimentalBlockEditorProvider","AutoHeightBlockPreview","EditorStyles","store","blockEditorStore","BlockListItems","jsx","_jsx","jsxs","_jsxs","EMPTY_ADDITIONAL_STYLES","BlockPreview","blocks","viewportWidth","minHeight","additionalStyles","__experimentalMinHeight","__experimentalPadding","since","version","alternative","css","originalSettings","select","getSettings","settings","focusMode","__unstableIsPreviewMode","renderedBlocks","Array","isArray","length","value","children","useBlockPreview","props","layout","styles","undefined","disabledRef","ref","renderAppender","className"],"sources":["@wordpress/block-editor/src/components/block-preview/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\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: clsx(\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,IAAI,MAAM,MAAM;;AAEvB;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;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE/C,MAAMC,uBAAuB,GAAG,EAAE;AAElC,OAAO,SAASC,YAAYA,CAAE;EAC7BC,MAAM;EACNC,aAAa,GAAG,IAAI;EACpBC,SAA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AQ,CAAE,CAAC;EAAA,CAC7B,CACjC;EAED,OAAO;IACN,GAAGD,KAAK;IACRK,GAAG;IACHE,SAAS,EAAEjD,IAAI,CACd0C,KAAK,CAACO,SAAS,EACf,0CAA0C,EAC1C,qBACD,CAAC;IACDT,QAAQ,EAAErB,MAAM,EAAEmB,MAAM,GAAGE,QAAQ,GAAG;EACvC,CAAC;AACF","ignoreList":[]}
@@ -11,8 +11,7 @@ import { store as blockEditorStore } from '../../store';
11
11
  import BlockIcon from '../block-icon';
12
12
  import useBlockDisplayInformation from '../use-block-display-information';
13
13
  import useBlockDisplayTitle from '../block-title/use-block-display-title';
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- import { jsxs as _jsxs } from "react/jsx-runtime";
14
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
15
  export default function BlockQuickNavigation({
17
16
  clientIds,
18
17
  onSelect
@@ -51,10 +50,8 @@ function BlockQuickNavigationItem({
51
50
  const {
52
51
  selectBlock
53
52
  } = useDispatch(blockEditorStore);
54
- return /*#__PURE__*/_jsx(Button
55
- // TODO: Switch to `true` (40px size) if possible
56
- , {
57
- __next40pxDefaultSize: false,
53
+ return /*#__PURE__*/_jsx(Button, {
54
+ __next40pxDefaultSize: true,
58
55
  isPressed: isSelected,
59
56
  onClick: async () => {
60
57
  await selectBlock(clientId);
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","useDispatch","Button","__experimentalVStack","VStack","__experimentalTruncate","Truncate","Flex","FlexBlock","FlexItem","store","blockEditorStore","BlockIcon","useBlockDisplayInformation","useBlockDisplayTitle","jsx","_jsx","jsxs","_jsxs","BlockQuickNavigation","clientIds","onSelect","length","spacing","children","map","clientId","BlockQuickNavigationItem","blockInformation","blockTitle","context","isSelected","select","isBlockSelected","hasSelectedInnerBlock","selectBlock","__next40pxDefaultSize","isPressed","onClick","icon","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';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport BlockIcon from '../block-icon';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport useBlockDisplayTitle from '../block-title/use-block-display-title';\n\nexport default function BlockQuickNavigation( { clientIds, onSelect } ) {\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\tonSelect={ onSelect }\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, onSelect } ) {\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst blockTitle = useBlockDisplayTitle( {\n\t\tclientId,\n\t\tcontext: 'list-view',\n\t} );\n\tconst { isSelected } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isBlockSelected, hasSelectedInnerBlock } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\treturn {\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\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t__next40pxDefaultSize={ false }\n\t\t\tisPressed={ isSelected }\n\t\t\tonClick={ async () => {\n\t\t\t\tawait selectBlock( clientId );\n\t\t\t\tif ( onSelect ) {\n\t\t\t\t\tonSelect( clientId );\n\t\t\t\t}\n\t\t\t} }\n\t\t>\n\t\t\t<Flex>\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<BlockIcon icon={ blockInformation?.icon } />\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexBlock style={ { textAlign: 'left' } }>\n\t\t\t\t\t<Truncate>{ blockTitle }</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;;AAE9B;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,0BAA0B,MAAM,kCAAkC;AACzE,OAAOC,oBAAoB,MAAM,wCAAwC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE1E,eAAe,SAASC,oBAAoBA,CAAE;EAAEC,SAAS;EAAEC;AAAS,CAAC,EAAG;EACvE,IAAK,CAAED,SAAS,CAACE,MAAM,EAAG;IACzB,OAAO,IAAI;EACZ;EACA,oBACCN,IAAA,CAACZ,MAAM;IAACmB,OAAO,EAAG,CAAG;IAAAC,QAAA,EAClBJ,SAAS,CAACK,GAAG,CAAIC,QAAQ,iBAC1BV,IAAA,CAACW,wBAAwB;MACxBN,QAAQ,EAAGA,QAAU;MAErBK,QAAQ,EAAGA;IAAU,GADfA,QAEN,CACA;EAAC,CACI,CAAC;AAEX;AAEA,SAASC,wBAAwBA,CAAE;EAAED,QAAQ;EAAEL;AAAS,CAAC,EAAG;EAC3D,MAAMO,gBAAgB,GAAGf,0BAA0B,CAAEa,QAAS,CAAC;EAC/D,MAAMG,UAAU,GAAGf,oBAAoB,CAAE;IACxCY,QAAQ;IACRI,OAAO,EAAE;EACV,CAAE,CAAC;EACH,MAAM;IAAEC;EAAW,CAAC,GAAG/B,SAAS,CAC7BgC,MAAM,IAAM;IACb,MAAM;MAAEC,eAAe;MAAEC;IAAsB,CAAC,GAC/CF,MAAM,CAAErB,gBAAiB,CAAC;IAE3B,OAAO;MACNoB,UAAU,EACTE,eAAe,CAAEP,QAAS,CAAC,IAC3BQ,qBAAqB,CAAER,QAAQ,EAAE,WAAY,IAAK;IACpD,CAAC;EACF,CAAC,EACD,CAAEA,QAAQ,CACX,CAAC;EACD,MAAM;IAAES;EAAY,CAAC,GAAGlC,WAAW,CAAEU,gBAAiB,CAAC;EAEvD,oBACCK,IAAA,CAACd;EACA;EAAA;IACAkC,qBAAqB,EAAG,KAAO;IAC/BC,SAAS,EAAGN,UAAY;IACxBO,OAAO,EAAG,MAAAA,CAAA,KAAY;MACrB,MAAMH,WAAW,CAAET,QAAS,CAAC;MAC7B,IAAKL,QAAQ,EAAG;QACfA,QAAQ,CAAEK,QAAS,CAAC;MACrB;IACD,CAAG;IAAAF,QAAA,eAEHN,KAAA,CAACX,IAAI;MAAAiB,QAAA,gBACJR,IAAA,CAACP,QAAQ;QAAAe,QAAA,eACRR,IAAA,CAACJ,SAAS;UAAC2B,IAAI,EAAGX,gBAAgB,EAAEW;QAAM,CAAE;MAAC,CACpC,CAAC,eACXvB,IAAA,CAACR,SAAS;QAACgC,KAAK,EAAG;UAAEC,SAAS,EAAE;QAAO,CAAG;QAAAjB,QAAA,eACzCR,IAAA,CAACV,QAAQ;UAAAkB,QAAA,EAAGK;QAAU,CAAY;MAAC,CACzB,CAAC;IAAA,CACP;EAAC,CACA,CAAC;AAEX","ignoreList":[]}
1
+ {"version":3,"names":["useSelect","useDispatch","Button","__experimentalVStack","VStack","__experimentalTruncate","Truncate","Flex","FlexBlock","FlexItem","store","blockEditorStore","BlockIcon","useBlockDisplayInformation","useBlockDisplayTitle","jsx","_jsx","jsxs","_jsxs","BlockQuickNavigation","clientIds","onSelect","length","spacing","children","map","clientId","BlockQuickNavigationItem","blockInformation","blockTitle","context","isSelected","select","isBlockSelected","hasSelectedInnerBlock","selectBlock","__next40pxDefaultSize","isPressed","onClick","icon","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';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport BlockIcon from '../block-icon';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport useBlockDisplayTitle from '../block-title/use-block-display-title';\n\nexport default function BlockQuickNavigation( { clientIds, onSelect } ) {\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\tonSelect={ onSelect }\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, onSelect } ) {\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst blockTitle = useBlockDisplayTitle( {\n\t\tclientId,\n\t\tcontext: 'list-view',\n\t} );\n\tconst { isSelected } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isBlockSelected, hasSelectedInnerBlock } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\treturn {\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\t__next40pxDefaultSize\n\t\t\tisPressed={ isSelected }\n\t\t\tonClick={ async () => {\n\t\t\t\tawait selectBlock( clientId );\n\t\t\t\tif ( onSelect ) {\n\t\t\t\t\tonSelect( clientId );\n\t\t\t\t}\n\t\t\t} }\n\t\t>\n\t\t\t<Flex>\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<BlockIcon icon={ blockInformation?.icon } />\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexBlock style={ { textAlign: 'left' } }>\n\t\t\t\t\t<Truncate>{ blockTitle }</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;;AAE9B;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AACvD,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,0BAA0B,MAAM,kCAAkC;AACzE,OAAOC,oBAAoB,MAAM,wCAAwC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE1E,eAAe,SAASC,oBAAoBA,CAAE;EAAEC,SAAS;EAAEC;AAAS,CAAC,EAAG;EACvE,IAAK,CAAED,SAAS,CAACE,MAAM,EAAG;IACzB,OAAO,IAAI;EACZ;EACA,oBACCN,IAAA,CAACZ,MAAM;IAACmB,OAAO,EAAG,CAAG;IAAAC,QAAA,EAClBJ,SAAS,CAACK,GAAG,CAAIC,QAAQ,iBAC1BV,IAAA,CAACW,wBAAwB;MACxBN,QAAQ,EAAGA,QAAU;MAErBK,QAAQ,EAAGA;IAAU,GADfA,QAEN,CACA;EAAC,CACI,CAAC;AAEX;AAEA,SAAS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@wordpress/i18n';
11
11
  */
12
12
  import { store as blockEditorStore } from '../../store';
13
13
  import { unlock } from '../../lock-unlock';
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- import { jsxs as _jsxs } from "react/jsx-runtime";
14
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
15
  export function BlockRemovalWarningModal({
17
16
  rules
18
17
  }) {
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useDispatch","useSelect","Modal","Button","__experimentalHStack","HStack","__","store","blockEditorStore","unlock","jsx","_jsx","jsxs","_jsxs","BlockRemovalWarningModal","rules","clientIds","selectPrevious","message","select","getRemovalPromptData","clearBlockRemovalPrompt","setBlockRemovalRules","privateRemoveBlocks","onConfirmRemoval","title","onRequestClose","size","children","justify","variant","onClick","__next40pxDefaultSize"],"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\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\tonClick={ clearBlockRemovalPrompt }\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t</Button>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\tonClick={ onConfirmRemoval }\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t>\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;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE3C,OAAO,SAASC,wBAAwBA,CAAE;EAAEC;AAAM,CAAC,EAAG;EACrD,MAAM;IAAEC,SAAS;IAAEC,cAAc;IAAEC;EAAQ,CAAC,GAAGjB,SAAS,CAAIkB,MAAM,IACjEV,MAAM,CAAEU,MAAM,CAAEX,gBAAiB,CAAE,CAAC,CAACY,oBAAoB,CAAC,CAC3D,CAAC;EAED,MAAM;IACLC,uBAAuB;IACvBC,oBAAoB;IACpBC;EACD,CAAC,GAAGd,MAAM,CAAET,WAAW,CAAEQ,gBAAiB,CAAE,CAAC;;EAE7C;EACA;EACAT,SAAS,CAAE,MAAM;IAChBuB,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,oBACCR,KAAA,CAACX,KAAK;IACLuB,KAAK,EAAGnB,EAAE,CAAE,aAAc,CAAG;IAC7BoB,cAAc,EAAGL,uBAAyB;IAC1CM,IAAI,EAAC,QAAQ;IAAAC,QAAA,gBAEbjB,IAAA;MAAAiB,QAAA,EAAKV;IAAO,CAAK,CAAC,eAClBL,KAAA,CAACR,MAAM;MAACwB,OAAO,EAAC,OAAO;MAAAD,QAAA,gBACtBjB,IAAA,CAACR,MAAM;QACN2B,OAAO,EAAC,UAAU;QAClBC,OAAO,EAAGV,uBAAyB;QACnCW,qBAAqB;QAAAJ,QAAA,EAEnBtB,EAAE,CAAE,QAAS;MAAC,CACT,CAAC,eACTK,IAAA,CAACR,MAAM;QACN2B,OAAO,EAAC,SAAS;QACjBC,OAAO,EAAGP,gBAAkB;QAC5BQ,qBAAqB;QAAAJ,QAAA,EAEnBtB,EAAE,CAAE,QAAS;MAAC,CACT,CAAC;IAAA,CACF,CAAC;EAAA,CACH,CAAC;AAEV","ignoreList":[]}
1
+ {"version":3,"names":["useEffect","useDispatch","useSelect","Modal","Button","__experimentalHStack","HStack","__","store","blockEditorStore","unlock","jsx","_jsx","jsxs","_jsxs","BlockRemovalWarningModal","rules","clientIds","selectPrevious","message","select","getRemovalPromptData","clearBlockRemovalPrompt","setBlockRemovalRules","privateRemoveBlocks","onConfirmRemoval","title","onRequestClose","size","children","justify","variant","onClick","__next40pxDefaultSize"],"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\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\tonClick={ clearBlockRemovalPrompt }\n\t\t\t\t\t__next40pxDefaultS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BAAgB,GAAGA,CAAA,KAAM;IAC9BD,mBAAmB,CAAEP,SAAS,EAAEC,cAAc,EAAE,WAAY,IAAK,CAAC;IAClEI,uBAAuB,CAAC,CAAC;EAC1B,CAAC;EAED,oBACCR,KAAA,CAACX,KAAK;IACLuB,KAAK,EAAGnB,EAAE,CAAE,aAAc,CAAG;IAC7BoB,cAAc,EAAGL,uBAAyB;IAC1CM,IAAI,EAAC,QAAQ;IAAAC,QAAA,gBAEbjB,IAAA;MAAAiB,QAAA,EAAKV;IAAO,CAAK,CAAC,eAClBL,KAAA,CAACR,MAAM;MAACwB,OAAO,EAAC,OAAO;MAAAD,QAAA,gBACtBjB,IAAA,CAACR,MAAM;QACN2B,OAAO,EAAC,UAAU;QAClBC,OAAO,EAAGV,uBAAyB;QACnCW,qBAAqB;QAAAJ,QAAA,EAEnBtB,EAAE,CAAE,QAAS;MAAC,CACT,CAAC,eACTK,IAAA,CAACR,MAAM;QACN2B,OAAO,EAAC,SAAS;QACjBC,OAAO,EAAGP,gBAAkB;QAC5BQ,qBAAqB;QAAAJ,QAAA,EAEnBtB,EAAE,CAAE,QAAS;MAAC,CACT,CAAC;IAAA,CACF,CAAC;EAAA,CACH,CAAC;AAEV","ignoreList":[]}
@@ -10,8 +10,7 @@ import { speak } from '@wordpress/a11y';
10
10
  * Internal dependencies
11
11
  */
12
12
  import isEmptyString from './is-empty-string';
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import { jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
14
  export default function BlockRenameModal({
16
15
  blockName,
17
16
  originalBlockName,
@@ -28,8 +27,8 @@ export default function BlockRenameModal({
28
27
  const isNameValid = nameHasChanged || nameIsOriginal;
29
28
  const autoSelectInputText = event => event.target.select();
30
29
  const handleSubmit = () => {
31
- const message = nameIsOriginal || nameIsEmpty ? sprintf( /* translators: %s: new name/label for the block */
32
- __('Block name reset to: "%s".'), editedBlockName) : sprintf( /* translators: %s: new name/label for the block */
30
+ const message = nameIsOriginal || nameIsEmpty ? sprintf(/* translators: %s: new name/label for the block */
31
+ __('Block name reset to: "%s".'), editedBlockName) : sprintf(/* translators: %s: new name/label for the block */
33
32
  __('Block name changed to: "%s".'), editedBlockName);
34
33
 
35
34
  // Must be assertive to immediately announce change.
@@ -1 +1 @@
1
- {"version":3,"names":["__experimentalHStack","HStack","__experimentalVStack","VStack","Button","TextControl","Modal","__","sprintf","useState","speak","isEmptyString","jsx","_jsx","jsxs","_jsxs","BlockRenameModal","blockName","originalBlockName","onClose","onSave","hasOverridesWarning","editedBlockName","setEditedBlockName","nameHasChanged","nameIsOriginal","nameIsEmpty","isNameValid","autoSelectInputText","event","target","select","handleSubmit","message","title","onRequestClose","overlayClassName","focusOnMount","size","children","onSubmit","e","preventDefault","spacing","__nextHasNoMarginBottom","__next40pxDefaultSize","value","label","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 } 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\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\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<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={ __( 'Name' ) }\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,QAAQ,oBAAoB;AAC7C,SAASC,KAAK,QAAQ,iBAAiB;;AAEvC;AACA;AACA;AACA,OAAOC,aAAa,MAAM,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE9C,eAAe,SAASC,gBAAgBA,CAAE;EACzCC,SAAS;EACTC,iBAAiB;EACjBC,OAAO;EACPC,MAAM;EACN;EACA;EACAC;AACD,CAAC,EAAG;EACH,MAAM,CAAEC,eAAe,EAAEC,kBAAkB,CAAE,GAAGd,QAAQ,CAAEQ,SAAU,CAAC;EAErE,MAAMO,cAAc,GAAGF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,EAAE,CACF,wHACA,CAAC,GACD0C,SACH;UACDC,WAAW,EAAGhC,iBAAmB;UACjCiC,QAAQ,EAAG5B,kBAAoB;UAC/B6B,OAAO,EAAGxB;QAAqB,CAC/B,CAAC,eACFb,KAAA,CAACd,MAAM;UAACoD,OAAO,EAAC,OAAO;UAAAd,QAAA,gBACtB1B,IAAA,CAACT,MAAM;YACNyC,qBAAqB;YACrBS,OAAO,EAAC,UAAU;YAClBC,OAAO,EAAGpC,OAAS;YAAAoB,QAAA,EAEjBhC,EAAE,CAAE,QAAS;UAAC,CACT,CAAC,eAETM,IAAA,CAACT,MAAM;YACNyC,qBAAqB;YACrB,iBAAgB,CAAElB,WAAa;YAC/B2B,OAAO,EAAC,SAAS;YACjBE,IAAI,EAAC,QAAQ;YAAAjB,QAAA,EAEXhC,EAAE,CAAE,MAAO;UAAC,CACP,CAAC;QAAA,CACF,CAAC;MAAA,CACF;IAAC,CACJ;EAAC,CACD,CAAC;AAEV","ignoreList":[]}
1
+ {"version":3,"names":["__experimentalHStack","HStack","__experimentalVStack","VStack","Button","TextControl","Modal","__","sprintf","useState","speak","isEmptyString","jsx","_jsx","jsxs","_jsxs","BlockRenameModal","blockName","originalBlockName","onClose","onSave","hasOverridesWarning","editedBlockName","setEditedBlockName","nameHasChanged","nameIsOriginal","nameIsEmpty","isNameValid","autoSelectInputText","event","target","select","handleSubmit","message","title","onRequestClose","overlayClassName","focusOnMount","size","children","onSubmit","e","preventDefault","spacing","__nextHasNoMarginBottom","__next40pxDefaultSize","value","label","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 } 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\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\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<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={ __( 'Name' ) }\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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Q,EAAKC,CAAC,IAAM;QACnBA,CAAC,CAACC,cAAc,CAAC,CAAC;QAElB,IAAK,CAAEf,WAAW,EAAG;UACpB;QACD;QAEAK,YAAY,CAAC,CAAC;MACf,CAAG;MAAAO,QAAA,eAEHxB,KAAA,CAACZ,MAAM;QAACwC,OAAO,EAAC,GAAG;QAAAJ,QAAA,gBAClB1B,IAAA,CAACR,WAAW;UACXuC,uBAAuB;UACvBC,qBAAqB;UACrBC,KAAK,EAAGxB,eAAiB;UACzByB,KAAK,EAAGxC,EAAE,CAAE,MAAO,CAAG;UACtByC,IAAI,EACH3B,mBAAmB,GAChBd,EAAE,CACF,wHACA,CAAC,GACD0C,SACH;UACDC,WAAW,EAAGhC,iBAAmB;UACjCiC,QAAQ,EAAG5B,kBAAoB;UAC/B6B,OAAO,EAAGxB;QAAqB,CAC/B,CAAC,eACFb,KAAA,CAACd,MAAM;UAACoD,OAAO,EAAC,OAAO;UAAAd,QAAA,gBACtB1B,IAAA,CAACT,MAAM;YACNyC,qBAAqB;YACrBS,OAAO,EAAC,UAAU;YAClBC,OAAO,EAAGpC,OAAS;YAAAoB,QAAA,EAEjBhC,EAAE,CAAE,QAAS;UAAC,CACT,CAAC,eAETM,IAAA,CAACT,MAAM;YACNyC,qBAAqB;YACrB,iBAAgB,CAAElB,WAAa;YAC/B2B,OAAO,EAAC,SAAS;YACjBE,IAAI,EAAC,QAAQ;YAAAjB,QAAA,EAEXhC,EAAE,CAAE,MAAO;UAAC,CACP,CAAC;QAAA,CACF,CAAC;MAAA,CACF;IAAC,CACJ;EAAC,CACD,CAAC;AAEV","ignoreList":[]}
@@ -13,9 +13,7 @@ import { store as blockEditorStore } from '../../store';
13
13
  import { useBlockDisplayInformation } from '..';
14
14
  import isEmptyString from './is-empty-string';
15
15
  import BlockRenameModal from './modal';
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { Fragment as _Fragment } from "react/jsx-runtime";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
16
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
19
17
  export default function BlockRenameControl({
20
18
  clientId
21
19
  }) {
@@ -1 +1 @@
1
- {"version":3,"names":["MenuItem","useSelect","useDispatch","__","useState","store","blockEditorStore","useBlockDisplayInformation","isEmptyString","BlockRenameModal","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","BlockRenameControl","clientId","renamingBlock","setRenamingBlock","metadata","select","getBlockAttributes","_metadata","updateBlockAttributes","customName","name","hasPatternOverrides","bindings","Object","values","some","binding","source","onChange","newName","blockInformation","children","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;AAAC,SAA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,CAAG;MACH,iBAAgBD,aAAe;MAC/B,iBAAc,QAAQ;MAAAmB,QAAA,EAEpBlC,EAAE,CAAE,QAAS;IAAC,CACP,CAAC,EACTe,aAAa,iBACdP,IAAA,CAACF,gBAAgB;MAChB8B,SAAS,EAAGd,UAAU,IAAI,EAAI;MAC9Be,iBAAiB,EAAGJ,gBAAgB,EAAEK,KAAO;MAC7CC,mBAAmB,EAAGf,mBAAqB;MAC3CgB,OAAO,EAAGA,CAAA,KAAMxB,gBAAgB,CAAE,KAAM,CAAG;MAC3CyB,MAAM,EAAKT,OAAO,IAAM;QACvB;QACA;QACA;QACA,IACCA,OAAO,KAAKC,gBAAgB,EAAEK,KAAK,IACnCjC,aAAa,CAAE2B,OAAQ,CAAC,EACvB;UACDA,OAAO,GAAGU,SAAS;QACpB;QAEAX,QAAQ,CAAEC,OAAQ,CAAC;MACpB;IAAG,CACH,CACD;EAAA,CACA,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["MenuItem","useSelect","useDispatch","__","useState","store","blockEditorStore","useBlockDisplayInformation","isEmptyString","BlockRenameModal","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","BlockRenameControl","clientId","renamingBlock","setRenamingBlock","metadata","select","getBlockAttributes","_metadata","updateBlockAttributes","customName","name","hasPatternOverrides","bindings","Object","values","some","binding","source","onChange","newName","blockInformation","children","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\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Q,CAACQ,QAAS,CAAC,CAACG,IAAI,CACpCC,OAAO,IAAMA,OAAO,CAACC,MAAM,KAAK,wBACnC,CAAC;EAEF,SAASC,QAAQA,CAAEC,OAAO,EAAG;IAC5BX,qBAAqB,CAAE,CAAEP,QAAQ,CAAE,EAAE;MACpCG,QAAQ,EAAE;QACT,GAAGA,QAAQ;QACXM,IAAI,EAAES;MACP;IACD,CAAE,CAAC;EACJ;EAEA,MAAMC,gBAAgB,GAAG7B,0BAA0B,CAAEU,QAAS,CAAC;EAE/D,oBACCF,KAAA,CAAAF,SAAA;IAAAwB,QAAA,gBACC1B,IAAA,CAACX,QAAQ;MACRsC,OAAO,EAAGA,CAAA,KAAM;QACfnB,gBAAgB,CAAE,IAAK,CAAC;MACzB,CAAG;MACH,iBAAgBD,aAAe;MAC/B,iBAAc,QAAQ;MAAAmB,QAAA,EAEpBlC,EAAE,CAAE,QAAS;IAAC,CACP,CAAC,EACTe,aAAa,iBACdP,IAAA,CAACF,gBAAgB;MAChB8B,SAAS,EAAGd,UAAU,IAAI,EAAI;MAC9Be,iBAAiB,EAAGJ,gBAAgB,EAAEK,KAAO;MAC7CC,mBAAmB,EAAGf,mBAAqB;MAC3CgB,OAAO,EAAGA,CAAA,KAAMxB,gBAAgB,CAAE,KAAM,CAAG;MAC3CyB,MAAM,EAAKT,OAAO,IAAM;QACvB;QACA;QACA;QACA,IACCA,OAAO,KAAKC,gBAAgB,EAAEK,KAAK,IACnCjC,aAAa,CAAE2B,OAAQ,CAAC,EACvB;UACDA,OAAO,GAAGU,SAAS;QACpB;QAEAX,QAAQ,CAAEC,OAAQ,CAAC;MACpB;IAAG,CACH,CACD;EAAA,CACA,CAAC;AAEL","ignoreList":[]}
@@ -13,9 +13,7 @@ import ImageLinkDestinationsScreen from '../image-link-destinations';
13
13
  import useMultipleOriginColorsAndGradients from '../colors-gradients/use-multiple-origin-colors-and-gradients';
14
14
  import { useMobileGlobalStylesColors } from '../global-styles/use-global-styles-context';
15
15
  import AdvancedControls from '../inspector-controls-tabs/advanced-controls-panel';
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { Fragment as _Fragment } from "react/jsx-runtime";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
16
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
19
17
  export const blockSettingsScreens = {
20
18
  settings: 'Settings',
21
19
  color: 'Color',
@@ -1 +1 @@
1
- {"version":3,"names":["BottomSheet","ColorSettings","FocalPointSettingsPanel","LinkPickerScreen","useDispatch","useSelect","styles","InspectorControls","ImageLinkDestinationsScreen","useMultipleOriginColorsAndGradients","useMobileGlobalStylesColors","AdvancedControls","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","blockSettingsScreens","settings","color","focalPoint","linkPicker","imageLinkDestinations","BottomSheetSettings","props","colorSettings","allAvailableColors","closeGeneralSidebar","editorSidebarOpened","select","isEditorSidebarOpened","isVisible","onClose","hideHeader","contentStyle","content","hasNavigation","testID","children","NavigationContainer","animate","main","NavigationScreen","name","Slot","SubSheet","screenName","defaultSettings","fullScreen","isScrollable","returnScreenName"],"sources":["@wordpress/block-editor/src/components/block-settings/container.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBottomSheet,\n\tColorSettings,\n\tFocalPointSettingsPanel,\n\tLinkPickerScreen,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport styles from './container.native.scss';\nimport InspectorControls from '../inspector-controls';\nimport ImageLinkDestinationsScreen from '../image-link-destinations';\nimport useMultipleOriginColorsAndGradients from '../colors-gradients/use-multiple-origin-colors-and-gradients';\nimport { useMobileGlobalStylesColors } from '../global-styles/use-global-styles-context';\nimport AdvancedControls from '../inspector-controls-tabs/advanced-controls-panel';\n\nexport const blockSettingsScreens = {\n\tsettings: 'Settings',\n\tcolor: 'Color',\n\tfocalPoint: 'FocalPoint',\n\tlinkPicker: 'linkPicker',\n\timageLinkDestinations: 'imageLinkDestinations',\n};\n\nexport default function BottomSheetSettings( props ) {\n\tconst colorSettings = useMultipleOriginColorsAndGradients();\n\tcolorSettings.allAvailableColors = useMobileGlobalStylesColors();\n\tconst { closeGeneralSidebar } = useDispatch( 'core/edit-post' );\n\tconst editorSidebarOpened = useSelect( ( select ) =>\n\t\tselect( 'core/edit-post' ).isEditorSidebarOpened()\n\t);\n\n\treturn (\n\t\t<BottomSheet\n\t\t\tisVisible={ editorSidebarOpened }\n\t\t\tonClose={ closeGeneralSidebar }\n\t\t\thideHeader\n\t\t\tcontentStyle={ styles.content }\n\t\t\thasNavigation\n\t\t\ttestID=\"block-settings-modal\"\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<BottomSheet.NavigationContainer animate main>\n\t\t\t\t<BottomSheet.NavigationScreen\n\t\t\t\t\tname={ blockSettingsScreens.settings }\n\t\t\t\t>\n\t\t\t\t\t<>\n\t\t\t\t\t\t<InspectorControls.Slot />\n\t\t\t\t\t\t<AdvancedControls />\n\t\t\t\t\t</>\n\t\t\t\t</BottomSheet.NavigationScreen>\n\t\t\t\t<BottomSheet.NavigationScreen\n\t\t\t\t\tname={ BottomSheet.SubSheet.screenName }\n\t\t\t\t>\n\t\t\t\t\t<BottomSheet.SubSheet.Slot />\n\t\t\t\t</BottomSheet.NavigationScreen>\n\n\t\t\t\t<BottomSheet.NavigationScreen\n\t\t\t\t\tname={ blockSettingsScreens.color }\n\t\t\t\t>\n\t\t\t\t\t<ColorSettings defaultSettings={ colorSettings } />\n\t\t\t\t</BottomSheet.NavigationScreen>\n\t\t\t\t<BottomSheet.NavigationScreen\n\t\t\t\t\tname={ blockSettingsScreens.focalPoint }\n\t\t\t\t\tfullScreen\n\t\t\t\t>\n\t\t\t\t\t<FocalPointSettingsPanel />\n\t\t\t\t</BottomSheet.NavigationScreen>\n\t\t\t\t<BottomSheet.NavigationScreen\n\t\t\t\t\tname={ blockSettingsScreens.linkPicker }\n\t\t\t\t\tfullScreen\n\t\t\t\t\tisScrollable\n\t\t\t\t>\n\t\t\t\t\t<LinkPickerScreen\n\t\t\t\t\t\treturnScreenName={ blockSettingsScreens.settings }\n\t\t\t\t\t/>\n\t\t\t\t</BottomSheet.NavigationScreen>\n\t\t\t\t<BottomSheet.NavigationScreen\n\t\t\t\t\tname={ blockSettingsScreens.imageLinkDestinations }\n\t\t\t\t>\n\t\t\t\t\t<ImageLinkDestinationsScreen { ...props } />\n\t\t\t\t</BottomSheet.NavigationScreen>\n\t\t\t</BottomSheet.NavigationContainer>\n\t\t</BottomSheet>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,WAAW,EACXC,aAAa,EACbC,uBAAuB,EACvBC,gBAAgB,QACV,uBAAuB;AAC9B,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;;AAExD;AACA;AACA;AACA,OAAOC,MAAM,MAAM,yBAAyB;AAC5C,OAAOC,iBAAiB,MAAM,uBAAuB;AACrD,OAAOC,2BAA2B,MAAM,4BAA4B;AACpE,OAAOC,mCAAmC,MAAM,8DAA8D;AAC9G,SAASC,2BAA2B,QAAQ,4CAA4C;AACxF,OAAOC,gBAAgB,MAAM,oDAAoD;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAElF,OAAO,MAAMC,oBAAoB,GAAG;EACnCC,QAAQ,EAAE,UAAU;EACpBC,KAAK,EAAE,OAAO;EACdC,UAAU,EAAE,YAAY;EACxBC,UAAU,EAAE,YAAY;EACxBC,qBAAqB,EAAE;AACxB,CAAC;AAED,eAAe,SAASC,mBAAmBA,CAAEC,KAAK,EAAG;EACpD,MAAMC,aAAa,GAAGjB,mCAAmC,CAAC,CAAC;EAC3DiB,aAAa,CAACC,kBAAkB,GAAGjB,2BAA2B,CAAC,CAAC;EAChE,MAAM;IAAEkB;EAAoB,CAAC,GAAGxB,WAAW,CAAE,gBAAiB,CAAC;EAC/D,MAAM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AA,CAACb,WAAW,CAAC2C,gBAAgB;QAC5BC,IAAI,EAAG1B,oBAAoB,CAACI,UAAY;QACxC2B,UAAU;QACVC,YAAY;QAAAX,QAAA,eAEZ1B,IAAA,CAACV,gBAAgB;UAChBgD,gBAAgB,EAAGjC,oBAAoB,CAACC;QAAU,CAClD;MAAC,CAC2B,CAAC,eAC/BN,IAAA,CAACb,WAAW,CAAC2C,gBAAgB;QAC5BC,IAAI,EAAG1B,oBAAoB,CAACK,qBAAuB;QAAAgB,QAAA,eAEnD1B,IAAA,CAACL,2BAA2B;UAAA,GAAMiB;QAAK,CAAI;MAAC,CACf,CAAC;IAAA,CACC;EAAC,CACtB,CAAC;AAEhB","ignoreList":[]}
1
+ {"version":3,"names":["BottomSheet","ColorSettings","FocalPointSettingsPanel","LinkPickerScreen","useDispatch","useSelect","styles","InspectorControls","ImageLinkDestinationsScreen","useMultipleOriginColorsAndGradients","useMobileGlobalStylesColors","AdvancedControls","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","blockSettingsScreens","settings","color","focalPoint","linkPicker","imageLinkDestinations","BottomSheetSettings","props","colorSettings","allAvailableColors","closeGeneralSidebar","editorSidebarOpened","select","isEditorSidebarOpened","isVisible","onClose","hideHeader","contentStyle","content","hasNavigation","testID","children","NavigationContainer","animate","main","NavigationScreen","name","Slot","SubSheet","screenName","defaultSettings","fullScreen","isScrollable","returnScreenName"],"sources":["@wordpress/block-editor/src/components/block-settings/container.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBottomSheet,\n\tColorSettings,\n\tFocalPointSettingsPanel,\n\tLinkPickerScreen,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport styles from './container.native.scss';\nimport InspectorControls from '../inspector-controls';\nimport ImageLinkDestinationsScreen from '../image-link-destinations';\nimport useMultipleOriginColorsAndGradients from '../colors-gradients/use-multiple-origin-colors-and-gradients';\nimport { useMobileGlobalStylesColors } from '../global-styles/use-global-styles-context';\nimport AdvancedControls from '../inspector-controls-tabs/advanced-controls-panel';\n\nexport const blockSettingsScreens = {\n\tsettings: 'Settings',\n\tcolor: 'Color',\n\tfocalPoint: 'FocalPoint',\n\tlinkPicker: 'linkPicker',\n\timageLinkDestinations: 'imageLinkDestinations',\n};\n\nexport default function BottomSheetSettings( props ) {\n\tconst colorSettings = useMultipleOriginColorsAndGradients();\n\tcolorSettings.allAvailableColors = useMobileGlobalStylesColors();\n\tconst { closeGeneralSidebar } = useDispatch( 'core/edit-post' );\n\tconst editorSidebarOpened = useSelect( ( select ) =>\n\t\tselect( 'core/edit-post' ).isEditorSidebarOpened()\n\t);\n\n\treturn (\n\t\t<BottomSheet\n\t\t\tisVisible={ editorSidebarOpened }\n\t\t\tonClose={ closeGeneralSidebar }\n\t\t\thideHeader\n\t\t\tcontentStyle={ styles.content }\n\t\t\thasNavigation\n\t\t\ttestID=\"block-settings-modal\"\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<BottomSheet.NavigationContainer animate main>\n\t\t\t\t<BottomSheet.NavigationScreen\n\t\t\t\t\tname={ blockSettingsScreens.settings }\n\t\t\t\t>\n\t\t\t\t\t<>\n\t\t\t\t\t\t<InspectorControls.Slot />\n\t\t\t\t\t\t<AdvancedControls />\n\t\t\t\t\t</>\n\t\t\t\t</BottomSheet.NavigationScreen>\n\t\t\t\t<BottomSheet.NavigationScreen\n\t\t\t\t\tname={ BottomSheet.SubSheet.screenName }\n\t\t\t\t>\n\t\t\t\t\t<BottomSheet.SubSheet.Slot />\n\t\t\t\t</BottomSheet.NavigationScreen>\n\n\t\t\t\t<BottomSheet.NavigationScreen\n\t\t\t\t\tname={ blockSettingsScreens.color }\n\t\t\t\t>\n\t\t\t\t\t<ColorSettings defaultSettings={ colorSettings } />\n\t\t\t\t</BottomSheet.NavigationScreen>\n\t\t\t\t<BottomSheet.NavigationScreen\n\t\t\t\t\tname={ blockSettingsScreens.focalPoint }\n\t\t\t\t\tfullScreen\n\t\t\t\t>\n\t\t\t\t\t<FocalPointSettingsPanel />\n\t\t\t\t</BottomSheet.NavigationScreen>\n\t\t\t\t<BottomSheet.NavigationScreen\n\t\t\t\t\tname={ blockSettingsScreens.linkPicker }\n\t\t\t\t\tfullScreen\n\t\t\t\t\tisScrollable\n\t\t\t\t>\n\t\t\t\t\t<LinkPickerScreen\n\t\t\t\t\t\treturnScreenName={ blockSettingsScreens.settings }\n\t\t\t\t\t/>\n\t\t\t\t</BottomSheet.NavigationScreen>\n\t\t\t\t<BottomSheet.NavigationScreen\n\t\t\t\t\tname={ blockSettingsScreens.imageLinkDestinations }\n\t\t\t\t>\n\t\t\t\t\t<ImageLinkDestinationsScreen { ...props } />\n\t\t\t\t</BottomSheet.NavigationScreen>\n\t\t\t</BottomSheet.NavigationContainer>\n\t\t</BottomSheet>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,WAAW,EACXC,aAAa,EACbC,uBAAuB,EACvBC,gBAAgB,QACV,uBAAuB;AAC9B,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;;AAExD;AACA;AACA;AACA,OAAOC,MAAM,MAAM,yBAAyB;AAC5C,OAAOC,iBAAiB,MAAM,uBAAuB;AACrD,OAAOC,2BAA2B,MAAM,4BAA4B;AACpE,OAAOC,mCAAmC,MAAM,8DAA8D;AAC9G,SAASC,2BAA2B,QAAQ,4CAA4C;AACxF,OAAOC,gBAAgB,MAAM,oDAAoD;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAElF,OAAO,MAAMC,oBAAoB,GAAG;EACnCC,QAAQ,EAAE,UAAU;EACpBC,KAAK,EAAE,OAAO;EACdC,UAAU,EAAE,YAAY;EACxBC,UAAU,EAAE,YAAY;EACxBC,qBAAqB,EAAE;AACxB,CAAC;AAED,eAAe,SAASC,mBAAmBA,CAAEC,KAAK,EAAG;EACpD,MAAMC,aAAa,GAAGjB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AACb,WAAW,CAAC2C,gBAAgB;QAC5BC,IAAI,EAAG1B,oBAAoB,CAACG,UAAY;QACxC4B,UAAU;QAAAV,QAAA,eAEV1B,IAAA,CAACX,uBAAuB,IAAE;MAAC,CACE,CAAC,eAC/BW,IAAA,CAACb,WAAW,CAAC2C,gBAAgB;QAC5BC,IAAI,EAAG1B,oBAAoB,CAACI,UAAY;QACxC2B,UAAU;QACVC,YAAY;QAAAX,QAAA,eAEZ1B,IAAA,CAACV,gBAAgB;UAChBgD,gBAAgB,EAAGjC,oBAAoB,CAACC;QAAU,CAClD;MAAC,CAC2B,CAAC,eAC/BN,IAAA,CAACb,WAAW,CAAC2C,gBAAgB;QAC5BC,IAAI,EAAG1B,oBAAoB,CAACK,qBAAuB;QAAAgB,QAAA,eAEnD1B,IAAA,CAACL,2BAA2B;UAAA,GAAMiB;QAAK,CAAI;MAAC,CACf,CAAC;IAAA,CACC;EAAC,CACtB,CAAC;AAEhB","ignoreList":[]}
@@ -40,7 +40,7 @@ export default function BlockParentSelectorMenuItem({
40
40
  icon: parentBlockType.icon
41
41
  }),
42
42
  onClick: () => selectBlock(parentClientId),
43
- children: sprintf( /* translators: %s: Name of the block's parent. */
43
+ children: sprintf(/* translators: %s: Name of the block's parent. */
44
44
  __('Select parent block (%s)'), parentBlockType.title)
45
45
  });
46
46
  }
@@ -1 +1 @@
1
- {"version":3,"names":["useRef","MenuItem","useViewportMatch","useDispatch","__","sprintf","BlockIcon","useShowHoveredOrFocusedGestures","store","blockEditorStore","jsx","_jsx","BlockParentSelectorMenuItem","parentClientId","parentBlockType","isSmallViewport","selectBlock","menuItemRef","gesturesProps","ref","highlightParent","icon","onClick","children","title"],"sources":["@wordpress/block-editor/src/components/block-settings-menu/block-parent-selector-menu-item.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\nimport { MenuItem } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport { useShowHoveredOrFocusedGestures } from '../block-toolbar/utils';\nimport { store as blockEditorStore } from '../../store';\n\nexport default function BlockParentSelectorMenuItem( {\n\tparentClientId,\n\tparentBlockType,\n} ) {\n\tconst isSmallViewport = useViewportMatch( 'medium', '<' );\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\n\t// Allows highlighting the parent block outline when focusing or hovering\n\t// the parent block selector within the child.\n\tconst menuItemRef = useRef();\n\tconst gesturesProps = useShowHoveredOrFocusedGestures( {\n\t\tref: menuItemRef,\n\t\thighlightParent: true,\n\t} );\n\n\tif ( ! isSmallViewport ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<MenuItem\n\t\t\t{ ...gesturesProps }\n\t\t\tref={ menuItemRef }\n\t\t\ticon={ <BlockIcon icon={ parentBlockType.icon } /> }\n\t\t\tonClick={ () => selectBlock( parentClientId ) }\n\t\t>\n\t\t\t{ sprintf(\n\t\t\t\t/* translators: %s: Name of the block's parent. */\n\t\t\t\t__( 'Select parent block (%s)' ),\n\t\t\t\tparentBlockType.title\n\t\t\t) }\n\t\t</MenuItem>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;;AAE7C;AACA;AACA;AACA,OAAOC,SAAS,MAAM,eAAe;AACrC,SAASC,+BAA+B,QAAQ,wBAAwB;AACxE,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAExD,eAAe,SAASC,2BAA2BA,CAAE;EACpDC,cAAc;EACdC;AACD,CAAC,EAAG;EACH,MAAMC,eAAe,GAAGb,gBAAgB,CAAE,QAAQ,EAAE,GAAI,CAAC;EACzD,MAAM;IAAEc;EAAY,CAAC,GAAGb,WAAW,CAAEM,gBAAiB,CAAC;;EAEvD;EACA;EACA,MAAMQ,WAAW,GAAGjB,MAAM,CAAC,CAAC;EAC5B,MAAMkB,aAAa,GAAGX,+BAA+B,CAAE;IACtDY,GAAG,EAAEF,WAAW;IAChBG,eAAe,EAAE;EAClB,CAAE,CAAC;EAEH,IAAK,CAAEL,eAAe,EAAG;IACxB,OAAO,IAAI;EACZ;EAEA,oBACCJ,IAAA,CAACV,QAAQ;IAAA,GACHiB,aAAa;IAClBC,GAAG,EAAGF,WAAa;IACnBI,IAAI,eAAGV,IAAA,CAACL,SAAS;MAACe,IAAI,EAAGP,eAAe,CAACO;IAAM,CAAE,CAAG;IACpDC,OAAO,EAAGA,CAAA,KAAMN,WAAW,CAAEH,cAAe,CAAG;IAAAU,QAAA,EAE7ClB,OAAO,EACR;IACAD,EAAE,CAAE,0BAA2B,CAAC,EAChCU,eAAe,CAACU,KACjB;EAAC,CACQ,CAAC;AAEb","ignoreList":[]}
1
+ {"version":3,"names":["useRef","MenuItem","useViewportMatch","useDispatch","__","sprintf","BlockIcon","useShowHoveredOrFocusedGestures","store","blockEditorStore","jsx","_jsx","BlockParentSelectorMenuItem","parentClientId","parentBlockType","isSmallViewport","selectBlock","menuItemRef","gesturesProps","ref","highlightParent","icon","onClick","children","title"],"sources":["@wordpress/block-editor/src/components/block-settings-menu/block-parent-selector-menu-item.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\nimport { MenuItem } from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport { useShowHoveredOrFocusedGestures } from '../block-toolbar/utils';\nimport { store as blockEditorStore } from '../../store';\n\nexport default function BlockParentSelectorMenuItem( {\n\tparentClientId,\n\tparentBlockType,\n} ) {\n\tconst isSmallViewport = useViewportMatch( 'medium', '<' );\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\n\t// Allows highlighting the parent block outline when focusing or hovering\n\t// the parent block selector within the child.\n\tconst menuItemRef = useRef();\n\tconst gesturesProps = useShowHoveredOrFocusedGestures( {\n\t\tref: menuItemRef,\n\t\thighlightParent: true,\n\t} );\n\n\tif ( ! isSmallViewport ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<MenuItem\n\t\t\t{ ...gesturesProps }\n\t\t\tref={ menuItemRef }\n\t\t\ticon={ <BlockIcon icon={ parentBlockType.icon } /> }\n\t\t\tonClick={ () => selectBlock( parentClientId ) }\n\t\t>\n\t\t\t{ sprintf(\n\t\t\t\t/* translators: %s: Name of the block's parent. */\n\t\t\t\t__( 'Select parent block (%s)' ),\n\t\t\t\tparentBlockType.title\n\t\t\t) }\n\t\t</MenuItem>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,WAAW,QAAQ,iBAAiB;AAC7C,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;;AAE7C;AACA;AACA;AACA,OAAOC,SAAS,MAAM,eAAe;AACrC,SAASC,+BAA+B,QAAQ,wBAAwB;AACxE,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAExD,eAAe,SAASC,2BAA2BA,CAAE;EACpDC,cAAc;EACdC;AACD,CAAC,EAAG;EACH,MAAMC,eAAe,GAAGb,gBAAgB,CAAE,QAAQ,EAAE,GAAI,CAAC;EACzD,MAAM;IAAEc;EAAY,CAAC,GAAGb,WAAW,CAAEM,gBAAiB,CAAC;;EAEvD;EACA;EACA,MAAMQ,WAAW,GAAGjB,MAAM,CAAC,CA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