@wordpress/block-editor 15.21.0 → 15.22.1-next.v.202606191442.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 (554) hide show
  1. package/CHANGELOG.md +23 -1
  2. package/build/components/block-card/index.cjs +4 -5
  3. package/build/components/block-card/index.cjs.map +2 -2
  4. package/build/components/block-compare/index.cjs +2 -2
  5. package/build/components/block-compare/index.cjs.map +2 -2
  6. package/build/components/block-inspector/index.cjs +3 -4
  7. package/build/components/block-inspector/index.cjs.map +2 -2
  8. package/build/components/block-mover/mover-description.cjs +6 -6
  9. package/build/components/block-mover/mover-description.cjs.map +1 -1
  10. package/build/components/block-patterns-list/index.cjs +1 -1
  11. package/build/components/block-patterns-list/index.cjs.map +2 -2
  12. package/build/components/block-patterns-paging/index.cjs +4 -4
  13. package/build/components/block-patterns-paging/index.cjs.map +2 -2
  14. package/build/components/block-popover/use-popover-scroll.cjs.map +1 -1
  15. package/build/components/block-quick-navigation/index.cjs +7 -5
  16. package/build/components/block-quick-navigation/index.cjs.map +2 -2
  17. package/build/components/block-switcher/block-transformations-menu.cjs +16 -15
  18. package/build/components/block-switcher/block-transformations-menu.cjs.map +2 -2
  19. package/build/components/block-switcher/index.cjs +4 -4
  20. package/build/components/block-switcher/index.cjs.map +2 -2
  21. package/build/components/block-toolbar/edit-section-button.cjs.map +1 -1
  22. package/build/components/block-tools/use-block-toolbar-popover-props.cjs +10 -4
  23. package/build/components/block-tools/use-block-toolbar-popover-props.cjs.map +2 -2
  24. package/build/components/child-layout-control/index.cjs +51 -19
  25. package/build/components/child-layout-control/index.cjs.map +2 -2
  26. package/build/components/dimensions-tool/index.cjs +4 -5
  27. package/build/components/dimensions-tool/index.cjs.map +2 -2
  28. package/build/components/dimensions-tool/scale-tool.cjs +1 -1
  29. package/build/components/dimensions-tool/scale-tool.cjs.map +2 -2
  30. package/build/components/global-styles/advanced-panel.cjs +23 -15
  31. package/build/components/global-styles/advanced-panel.cjs.map +2 -2
  32. package/build/components/global-styles/background-panel.cjs +2 -2
  33. package/build/components/global-styles/background-panel.cjs.map +2 -2
  34. package/build/components/global-styles/border-panel.cjs +2 -0
  35. package/build/components/global-styles/border-panel.cjs.map +2 -2
  36. package/build/components/global-styles/dimensions-panel.cjs +2 -2
  37. package/build/components/global-styles/dimensions-panel.cjs.map +2 -2
  38. package/build/components/global-styles/shadow-panel-components.cjs.map +2 -2
  39. package/build/components/grid/grid-item-resizer.cjs.map +1 -1
  40. package/build/components/grid/grid-visualizer.cjs.map +1 -1
  41. package/build/components/iframe/index.cjs +6 -3
  42. package/build/components/iframe/index.cjs.map +3 -3
  43. package/build/components/image-editor/use-transform-image.cjs.map +1 -1
  44. package/build/components/inner-blocks/use-inner-block-template-sync.cjs +3 -1
  45. package/build/components/inner-blocks/use-inner-block-template-sync.cjs.map +2 -2
  46. package/build/components/inserter/get-appender-label.cjs.map +1 -1
  47. package/build/components/inserter/hooks/use-patterns-state.cjs +1 -1
  48. package/build/components/inserter/hooks/use-patterns-state.cjs.map +2 -2
  49. package/build/components/inserter/index.cjs +179 -220
  50. package/build/components/inserter/index.cjs.map +3 -3
  51. package/build/components/inserter/media-tab/media-preview.cjs.map +2 -2
  52. package/build/components/inserter/search-items.cjs.map +1 -1
  53. package/build/components/inserter/search-results.cjs +1 -1
  54. package/build/components/inserter/search-results.cjs.map +2 -2
  55. package/build/components/inspector-controls/fill.cjs +1 -3
  56. package/build/components/inspector-controls/fill.cjs.map +2 -2
  57. package/build/components/inspector-controls-tabs/index.cjs.map +2 -2
  58. package/build/components/inspector-controls-tabs/styles-tab.cjs +1 -1
  59. package/build/components/inspector-controls-tabs/styles-tab.cjs.map +2 -2
  60. package/build/components/keyboard-shortcuts/index.cjs.map +1 -1
  61. package/build/components/line-height-control/index.cjs.map +1 -1
  62. package/build/components/link-control/index.cjs +1 -1
  63. package/build/components/link-control/index.cjs.map +1 -1
  64. package/build/components/link-control/normalize-url.cjs.map +1 -1
  65. package/build/components/list-view/block-select-button.cjs +10 -12
  66. package/build/components/list-view/block-select-button.cjs.map +2 -2
  67. package/build/components/list-view/block.cjs +2 -1
  68. package/build/components/list-view/block.cjs.map +2 -2
  69. package/build/components/list-view/utils.cjs.map +1 -1
  70. package/build/components/preset-input-control/custom-value-controls.cjs.map +2 -2
  71. package/build/components/provider/index.cjs.map +1 -1
  72. package/build/components/provider/use-block-sync.cjs +11 -2
  73. package/build/components/provider/use-block-sync.cjs.map +2 -2
  74. package/build/components/rich-text/event-listeners/before-input-rules.cjs +5 -5
  75. package/build/components/rich-text/event-listeners/before-input-rules.cjs.map +3 -3
  76. package/build/components/rich-text/event-listeners/delete.cjs +4 -4
  77. package/build/components/rich-text/event-listeners/delete.cjs.map +3 -3
  78. package/build/components/rich-text/event-listeners/enter.cjs +7 -2
  79. package/build/components/rich-text/event-listeners/enter.cjs.map +2 -2
  80. package/build/components/rich-text/event-listeners/input-events.cjs +4 -4
  81. package/build/components/rich-text/event-listeners/input-events.cjs.map +3 -3
  82. package/build/components/rich-text/event-listeners/input-rules.cjs +17 -4
  83. package/build/components/rich-text/event-listeners/input-rules.cjs.map +3 -3
  84. package/build/components/rich-text/event-listeners/insert-replacement-text.cjs +4 -4
  85. package/build/components/rich-text/event-listeners/insert-replacement-text.cjs.map +3 -3
  86. package/build/components/rich-text/event-listeners/paste-handler.cjs.map +1 -1
  87. package/build/components/rich-text/event-listeners/remove-browser-shortcuts.cjs +4 -4
  88. package/build/components/rich-text/event-listeners/remove-browser-shortcuts.cjs.map +3 -3
  89. package/build/components/rich-text/event-listeners/shortcuts.cjs +4 -4
  90. package/build/components/rich-text/event-listeners/shortcuts.cjs.map +3 -3
  91. package/build/components/rich-text/event-listeners/undo-automatic-change.cjs +4 -4
  92. package/build/components/rich-text/event-listeners/undo-automatic-change.cjs.map +3 -3
  93. package/build/components/rich-text/index.cjs +1 -23
  94. package/build/components/rich-text/index.cjs.map +2 -2
  95. package/build/components/rich-text/prevent-event-discovery.cjs +1 -1
  96. package/build/components/rich-text/prevent-event-discovery.cjs.map +1 -1
  97. package/build/components/use-block-commands/index.cjs +5 -5
  98. package/build/components/use-block-commands/index.cjs.map +2 -2
  99. package/build/components/writing-flow/use-tab-nav.cjs.map +1 -1
  100. package/build/hooks/anchor.cjs +12 -16
  101. package/build/hooks/anchor.cjs.map +2 -2
  102. package/build/hooks/background.cjs.map +1 -1
  103. package/build/hooks/block-fields/index.cjs +13 -2
  104. package/build/hooks/block-fields/index.cjs.map +2 -2
  105. package/build/hooks/border.cjs +0 -3
  106. package/build/hooks/border.cjs.map +2 -2
  107. package/build/hooks/color.cjs +1 -4
  108. package/build/hooks/color.cjs.map +2 -2
  109. package/build/hooks/dimensions.cjs +13 -5
  110. package/build/hooks/dimensions.cjs.map +2 -2
  111. package/build/hooks/fit-text.cjs +11 -0
  112. package/build/hooks/fit-text.cjs.map +2 -2
  113. package/build/hooks/layout-child.cjs +27 -2
  114. package/build/hooks/layout-child.cjs.map +2 -2
  115. package/build/hooks/list-view.cjs +10 -7
  116. package/build/hooks/list-view.cjs.map +2 -2
  117. package/build/hooks/position.cjs +19 -22
  118. package/build/hooks/position.cjs.map +2 -2
  119. package/build/hooks/spacing-visualizer.cjs.map +1 -1
  120. package/build/hooks/state-utils.cjs.map +1 -1
  121. package/build/hooks/style.cjs +42 -2
  122. package/build/hooks/style.cjs.map +2 -2
  123. package/build/hooks/supports.cjs +0 -7
  124. package/build/hooks/supports.cjs.map +2 -2
  125. package/build/private-apis.cjs +4 -0
  126. package/build/private-apis.cjs.map +2 -2
  127. package/build/store/actions.cjs +7 -3
  128. package/build/store/actions.cjs.map +2 -2
  129. package/build/store/private-actions.cjs +1 -2
  130. package/build/store/private-actions.cjs.map +2 -2
  131. package/build/store/private-selectors.cjs +42 -2
  132. package/build/store/private-selectors.cjs.map +2 -2
  133. package/build/store/reducer.cjs +14 -6
  134. package/build/store/reducer.cjs.map +2 -2
  135. package/build/store/selectors.cjs +60 -41
  136. package/build/store/selectors.cjs.map +2 -2
  137. package/build/utils/dom.cjs.map +1 -1
  138. package/build/utils/selection.cjs +1 -1
  139. package/build-module/components/block-card/index.mjs +5 -6
  140. package/build-module/components/block-card/index.mjs.map +2 -2
  141. package/build-module/components/block-compare/index.mjs +1 -1
  142. package/build-module/components/block-compare/index.mjs.map +2 -2
  143. package/build-module/components/block-inspector/index.mjs +3 -5
  144. package/build-module/components/block-inspector/index.mjs.map +2 -2
  145. package/build-module/components/block-mover/mover-description.mjs +6 -6
  146. package/build-module/components/block-mover/mover-description.mjs.map +1 -1
  147. package/build-module/components/block-patterns-list/index.mjs +1 -1
  148. package/build-module/components/block-patterns-list/index.mjs.map +2 -2
  149. package/build-module/components/block-patterns-paging/index.mjs +4 -4
  150. package/build-module/components/block-patterns-paging/index.mjs.map +2 -2
  151. package/build-module/components/block-popover/use-popover-scroll.mjs.map +1 -1
  152. package/build-module/components/block-quick-navigation/index.mjs +8 -6
  153. package/build-module/components/block-quick-navigation/index.mjs.map +2 -2
  154. package/build-module/components/block-switcher/block-transformations-menu.mjs +16 -15
  155. package/build-module/components/block-switcher/block-transformations-menu.mjs.map +2 -2
  156. package/build-module/components/block-switcher/index.mjs +4 -4
  157. package/build-module/components/block-switcher/index.mjs.map +2 -2
  158. package/build-module/components/block-toolbar/edit-section-button.mjs.map +1 -1
  159. package/build-module/components/block-tools/use-block-toolbar-popover-props.mjs +10 -4
  160. package/build-module/components/block-tools/use-block-toolbar-popover-props.mjs.map +2 -2
  161. package/build-module/components/child-layout-control/index.mjs +51 -19
  162. package/build-module/components/child-layout-control/index.mjs.map +2 -2
  163. package/build-module/components/dimensions-tool/index.mjs +4 -5
  164. package/build-module/components/dimensions-tool/index.mjs.map +2 -2
  165. package/build-module/components/dimensions-tool/scale-tool.mjs +1 -1
  166. package/build-module/components/dimensions-tool/scale-tool.mjs.map +2 -2
  167. package/build-module/components/global-styles/advanced-panel.mjs +23 -15
  168. package/build-module/components/global-styles/advanced-panel.mjs.map +2 -2
  169. package/build-module/components/global-styles/background-panel.mjs +3 -3
  170. package/build-module/components/global-styles/background-panel.mjs.map +2 -2
  171. package/build-module/components/global-styles/border-panel.mjs +2 -0
  172. package/build-module/components/global-styles/border-panel.mjs.map +2 -2
  173. package/build-module/components/global-styles/dimensions-panel.mjs +3 -4
  174. package/build-module/components/global-styles/dimensions-panel.mjs.map +2 -2
  175. package/build-module/components/global-styles/shadow-panel-components.mjs.map +2 -2
  176. package/build-module/components/grid/grid-item-resizer.mjs.map +1 -1
  177. package/build-module/components/grid/grid-visualizer.mjs.map +1 -1
  178. package/build-module/components/iframe/index.mjs +6 -3
  179. package/build-module/components/iframe/index.mjs.map +2 -2
  180. package/build-module/components/image-editor/use-transform-image.mjs.map +1 -1
  181. package/build-module/components/inner-blocks/use-inner-block-template-sync.mjs +3 -1
  182. package/build-module/components/inner-blocks/use-inner-block-template-sync.mjs.map +2 -2
  183. package/build-module/components/inserter/get-appender-label.mjs.map +1 -1
  184. package/build-module/components/inserter/hooks/use-patterns-state.mjs +1 -1
  185. package/build-module/components/inserter/hooks/use-patterns-state.mjs.map +2 -2
  186. package/build-module/components/inserter/index.mjs +185 -222
  187. package/build-module/components/inserter/index.mjs.map +3 -3
  188. package/build-module/components/inserter/media-tab/media-preview.mjs.map +2 -2
  189. package/build-module/components/inserter/search-items.mjs.map +1 -1
  190. package/build-module/components/inserter/search-results.mjs +1 -1
  191. package/build-module/components/inserter/search-results.mjs.map +2 -2
  192. package/build-module/components/inspector-controls/fill.mjs +1 -3
  193. package/build-module/components/inspector-controls/fill.mjs.map +2 -2
  194. package/build-module/components/inspector-controls-tabs/index.mjs.map +2 -2
  195. package/build-module/components/inspector-controls-tabs/styles-tab.mjs +1 -1
  196. package/build-module/components/inspector-controls-tabs/styles-tab.mjs.map +2 -2
  197. package/build-module/components/keyboard-shortcuts/index.mjs.map +1 -1
  198. package/build-module/components/line-height-control/index.mjs.map +1 -1
  199. package/build-module/components/link-control/index.mjs +1 -1
  200. package/build-module/components/link-control/index.mjs.map +1 -1
  201. package/build-module/components/link-control/normalize-url.mjs.map +1 -1
  202. package/build-module/components/list-view/block-select-button.mjs +10 -12
  203. package/build-module/components/list-view/block-select-button.mjs.map +2 -2
  204. package/build-module/components/list-view/block.mjs +2 -1
  205. package/build-module/components/list-view/block.mjs.map +2 -2
  206. package/build-module/components/list-view/utils.mjs.map +1 -1
  207. package/build-module/components/preset-input-control/custom-value-controls.mjs.map +2 -2
  208. package/build-module/components/provider/index.mjs.map +1 -1
  209. package/build-module/components/provider/use-block-sync.mjs +11 -2
  210. package/build-module/components/provider/use-block-sync.mjs.map +2 -2
  211. package/build-module/components/rich-text/event-listeners/before-input-rules.mjs +5 -5
  212. package/build-module/components/rich-text/event-listeners/before-input-rules.mjs.map +2 -2
  213. package/build-module/components/rich-text/event-listeners/delete.mjs +4 -4
  214. package/build-module/components/rich-text/event-listeners/delete.mjs.map +2 -2
  215. package/build-module/components/rich-text/event-listeners/enter.mjs +7 -2
  216. package/build-module/components/rich-text/event-listeners/enter.mjs.map +2 -2
  217. package/build-module/components/rich-text/event-listeners/input-events.mjs +4 -4
  218. package/build-module/components/rich-text/event-listeners/input-events.mjs.map +2 -2
  219. package/build-module/components/rich-text/event-listeners/input-rules.mjs +17 -4
  220. package/build-module/components/rich-text/event-listeners/input-rules.mjs.map +2 -2
  221. package/build-module/components/rich-text/event-listeners/insert-replacement-text.mjs +4 -4
  222. package/build-module/components/rich-text/event-listeners/insert-replacement-text.mjs.map +2 -2
  223. package/build-module/components/rich-text/event-listeners/paste-handler.mjs.map +1 -1
  224. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.mjs +4 -4
  225. package/build-module/components/rich-text/event-listeners/remove-browser-shortcuts.mjs.map +2 -2
  226. package/build-module/components/rich-text/event-listeners/shortcuts.mjs +4 -4
  227. package/build-module/components/rich-text/event-listeners/shortcuts.mjs.map +2 -2
  228. package/build-module/components/rich-text/event-listeners/undo-automatic-change.mjs +4 -4
  229. package/build-module/components/rich-text/event-listeners/undo-automatic-change.mjs.map +2 -2
  230. package/build-module/components/rich-text/index.mjs +1 -23
  231. package/build-module/components/rich-text/index.mjs.map +2 -2
  232. package/build-module/components/rich-text/prevent-event-discovery.mjs +1 -1
  233. package/build-module/components/rich-text/prevent-event-discovery.mjs.map +1 -1
  234. package/build-module/components/use-block-commands/index.mjs +5 -5
  235. package/build-module/components/use-block-commands/index.mjs.map +2 -2
  236. package/build-module/components/writing-flow/use-tab-nav.mjs.map +1 -1
  237. package/build-module/hooks/anchor.mjs +12 -16
  238. package/build-module/hooks/anchor.mjs.map +2 -2
  239. package/build-module/hooks/background.mjs.map +1 -1
  240. package/build-module/hooks/block-fields/index.mjs +13 -2
  241. package/build-module/hooks/block-fields/index.mjs.map +2 -2
  242. package/build-module/hooks/border.mjs +1 -4
  243. package/build-module/hooks/border.mjs.map +2 -2
  244. package/build-module/hooks/color.mjs +2 -5
  245. package/build-module/hooks/color.mjs.map +2 -2
  246. package/build-module/hooks/dimensions.mjs +13 -6
  247. package/build-module/hooks/dimensions.mjs.map +2 -2
  248. package/build-module/hooks/fit-text.mjs +11 -0
  249. package/build-module/hooks/fit-text.mjs.map +2 -2
  250. package/build-module/hooks/layout-child.mjs +27 -2
  251. package/build-module/hooks/layout-child.mjs.map +2 -2
  252. package/build-module/hooks/list-view.mjs +10 -7
  253. package/build-module/hooks/list-view.mjs.map +2 -2
  254. package/build-module/hooks/position.mjs +20 -23
  255. package/build-module/hooks/position.mjs.map +2 -2
  256. package/build-module/hooks/spacing-visualizer.mjs.map +1 -1
  257. package/build-module/hooks/state-utils.mjs.map +1 -1
  258. package/build-module/hooks/style.mjs +44 -3
  259. package/build-module/hooks/style.mjs.map +2 -2
  260. package/build-module/hooks/supports.mjs +0 -7
  261. package/build-module/hooks/supports.mjs.map +2 -2
  262. package/build-module/private-apis.mjs +8 -0
  263. package/build-module/private-apis.mjs.map +2 -2
  264. package/build-module/store/actions.mjs +7 -3
  265. package/build-module/store/actions.mjs.map +2 -2
  266. package/build-module/store/private-actions.mjs +1 -2
  267. package/build-module/store/private-actions.mjs.map +2 -2
  268. package/build-module/store/private-selectors.mjs +39 -1
  269. package/build-module/store/private-selectors.mjs.map +2 -2
  270. package/build-module/store/reducer.mjs +14 -6
  271. package/build-module/store/reducer.mjs.map +2 -2
  272. package/build-module/store/selectors.mjs +62 -42
  273. package/build-module/store/selectors.mjs.map +2 -2
  274. package/build-module/utils/dom.mjs.map +1 -1
  275. package/build-module/utils/selection.mjs +1 -1
  276. package/build-style/content-rtl.css +12 -0
  277. package/build-style/content.css +12 -0
  278. package/build-style/style-rtl.css +26 -8
  279. package/build-style/style.css +26 -8
  280. package/package.json +54 -46
  281. package/src/components/block-breadcrumb/README.md +2 -2
  282. package/src/components/block-card/index.js +7 -13
  283. package/src/components/block-compare/README.md +6 -6
  284. package/src/components/block-compare/index.js +1 -3
  285. package/src/components/block-inspector/index.js +2 -10
  286. package/src/components/block-patterns-list/index.js +1 -2
  287. package/src/components/block-preview/README.md +1 -1
  288. package/src/components/block-quick-navigation/index.js +7 -7
  289. package/src/components/block-switcher/block-transformations-menu.js +16 -18
  290. package/src/components/block-switcher/index.js +4 -4
  291. package/src/components/block-tools/use-block-toolbar-popover-props.js +10 -4
  292. package/src/components/block-types-list/README.md +0 -19
  293. package/src/components/child-layout-control/index.js +65 -20
  294. package/src/components/child-layout-control/test/index.js +64 -0
  295. package/src/components/dimensions-tool/index.js +4 -9
  296. package/src/components/dimensions-tool/scale-tool.js +1 -2
  297. package/src/components/dimensions-tool/test/index.js +89 -11
  298. package/src/components/global-styles/advanced-panel.js +5 -1
  299. package/src/components/global-styles/background-panel.js +3 -3
  300. package/src/components/global-styles/border-panel.js +2 -0
  301. package/src/components/global-styles/dimensions-panel.js +13 -15
  302. package/src/components/global-styles/shadow-panel-components.js +0 -1
  303. package/src/components/iframe/index.js +8 -3
  304. package/src/components/inner-blocks/use-inner-block-template-sync.js +3 -1
  305. package/src/components/inserter/hooks/use-patterns-state.js +1 -1
  306. package/src/components/inserter/index.js +257 -288
  307. package/src/components/inserter/media-tab/media-preview.js +0 -1
  308. package/src/components/inserter/search-results.js +1 -3
  309. package/src/components/inspector-controls/fill.js +6 -8
  310. package/src/components/inspector-controls-tabs/index.js +0 -1
  311. package/src/components/inspector-controls-tabs/styles-tab.js +5 -1
  312. package/src/components/justify-content-control/README.md +1 -1
  313. package/src/components/list-view/block-select-button.js +9 -14
  314. package/src/components/list-view/block.js +1 -0
  315. package/src/components/media-placeholder/README.md +1 -29
  316. package/src/components/media-upload/README.md +0 -19
  317. package/src/components/preset-input-control/custom-value-controls.js +0 -1
  318. package/src/components/provider/test/use-block-sync.js +40 -0
  319. package/src/components/provider/use-block-sync.js +12 -2
  320. package/src/components/rich-text/event-listeners/before-input-rules.js +5 -4
  321. package/src/components/rich-text/event-listeners/delete.js +9 -4
  322. package/src/components/rich-text/event-listeners/enter.js +9 -2
  323. package/src/components/rich-text/event-listeners/input-events.js +13 -4
  324. package/src/components/rich-text/event-listeners/input-rules.js +20 -4
  325. package/src/components/rich-text/event-listeners/insert-replacement-text.js +9 -4
  326. package/src/components/rich-text/event-listeners/remove-browser-shortcuts.js +9 -4
  327. package/src/components/rich-text/event-listeners/shortcuts.js +13 -4
  328. package/src/components/rich-text/event-listeners/undo-automatic-change.js +5 -4
  329. package/src/components/rich-text/index.js +1 -33
  330. package/src/components/unit-control/README.md +1 -1
  331. package/src/components/url-popover/README.md +1 -1
  332. package/src/components/use-block-commands/index.js +5 -5
  333. package/src/hooks/anchor.js +9 -17
  334. package/src/hooks/block-fields/index.js +27 -2
  335. package/src/hooks/border.js +1 -5
  336. package/src/hooks/color.js +1 -6
  337. package/src/hooks/dimensions.js +15 -8
  338. package/src/hooks/fit-text.js +16 -0
  339. package/src/hooks/layout-child.js +41 -2
  340. package/src/hooks/list-view.js +10 -11
  341. package/src/hooks/position.js +23 -27
  342. package/src/hooks/style.js +80 -2
  343. package/src/hooks/supports.js +0 -9
  344. package/src/hooks/test/dimensions.js +71 -0
  345. package/src/hooks/test/layout-child.js +165 -0
  346. package/src/hooks/test/style.js +126 -4
  347. package/src/private-apis.js +8 -0
  348. package/src/store/actions.js +13 -3
  349. package/src/store/private-actions.js +1 -4
  350. package/src/store/private-selectors.js +89 -0
  351. package/src/store/reducer.js +19 -7
  352. package/src/store/selectors.js +91 -53
  353. package/src/store/test/actions.js +21 -0
  354. package/src/store/test/private-selectors.js +138 -0
  355. package/src/store/test/reducer.js +46 -0
  356. package/src/store/test/selectors.js +77 -0
  357. package/build/components/media-upload-progress/constants.cjs +0 -46
  358. package/build/components/media-upload-progress/constants.cjs.map +0 -7
  359. package/build/components/rich-text/native/format-edit.cjs +0 -60
  360. package/build/components/rich-text/native/format-edit.cjs.map +0 -7
  361. package/build/components/rich-text/native/index.cjs +0 -28
  362. package/build/components/rich-text/native/index.cjs.map +0 -7
  363. package/build/components/rich-text/native/use-format-types.cjs +0 -139
  364. package/build/components/rich-text/native/use-format-types.cjs.map +0 -7
  365. package/build-module/components/media-upload-progress/constants.mjs +0 -16
  366. package/build-module/components/media-upload-progress/constants.mjs.map +0 -7
  367. package/build-module/components/rich-text/native/format-edit.mjs +0 -39
  368. package/build-module/components/rich-text/native/format-edit.mjs.map +0 -7
  369. package/build-module/components/rich-text/native/index.mjs +0 -7
  370. package/build-module/components/rich-text/native/index.mjs.map +0 -7
  371. package/build-module/components/rich-text/native/use-format-types.mjs +0 -114
  372. package/build-module/components/rich-text/native/use-format-types.mjs.map +0 -7
  373. package/src/components/audio-player/audio-url-parser.native.js +0 -20
  374. package/src/components/audio-player/index.native.js +0 -225
  375. package/src/components/audio-player/styles.native.scss +0 -114
  376. package/src/components/audio-player/test/audio-url-parser.native.js +0 -53
  377. package/src/components/block-alignment-control/test/index.native.js +0 -37
  378. package/src/components/block-alignment-control/ui.native.js +0 -86
  379. package/src/components/block-caption/README.md +0 -104
  380. package/src/components/block-caption/index.native.js +0 -89
  381. package/src/components/block-caption/styles.native.scss +0 -7
  382. package/src/components/block-controls/slot.native.js +0 -33
  383. package/src/components/block-draggable/draggable-chip.native.js +0 -49
  384. package/src/components/block-draggable/dropping-insertion-point.native.js +0 -181
  385. package/src/components/block-draggable/dropping-insertion-point.native.scss +0 -8
  386. package/src/components/block-draggable/index.native.js +0 -467
  387. package/src/components/block-draggable/style.native.scss +0 -19
  388. package/src/components/block-draggable/test/__snapshots__/index.native.js.snap +0 -73
  389. package/src/components/block-draggable/test/helpers.native.js +0 -182
  390. package/src/components/block-draggable/test/index.native.js +0 -419
  391. package/src/components/block-draggable/use-scroll-when-dragging.native.js +0 -135
  392. package/src/components/block-edit/edit.native.js +0 -49
  393. package/src/components/block-edit/test/edit.native.js +0 -65
  394. package/src/components/block-heading-level-dropdown/index.native.js +0 -68
  395. package/src/components/block-icon/index.native.js +0 -47
  396. package/src/components/block-icon/style.native.scss +0 -7
  397. package/src/components/block-list/block-crash-boundary.native.js +0 -43
  398. package/src/components/block-list/block-crash-warning.native.js +0 -21
  399. package/src/components/block-list/block-invalid-warning.native.js +0 -70
  400. package/src/components/block-list/block-list-context.native.js +0 -172
  401. package/src/components/block-list/block-list-item-cell.native.js +0 -62
  402. package/src/components/block-list/block-list-item.native.js +0 -209
  403. package/src/components/block-list/block-list-item.native.scss +0 -16
  404. package/src/components/block-list/block-outline.native.js +0 -77
  405. package/src/components/block-list/block-selection-button.native.js +0 -100
  406. package/src/components/block-list/block-selection-button.native.scss +0 -34
  407. package/src/components/block-list/block.native.js +0 -716
  408. package/src/components/block-list/block.native.scss +0 -62
  409. package/src/components/block-list/grid-item.native.js +0 -58
  410. package/src/components/block-list/index.native.js +0 -437
  411. package/src/components/block-list/insertion-point.native.js +0 -36
  412. package/src/components/block-list/style.native.scss +0 -117
  413. package/src/components/block-list/test/block-invalid-warning.native.js +0 -62
  414. package/src/components/block-list/test/block-list-context.native.js +0 -243
  415. package/src/components/block-list/test/block-outline.native.js +0 -255
  416. package/src/components/block-list/test/fixtures/block-list-context.native.js +0 -79
  417. package/src/components/block-list/test/index.native.js +0 -205
  418. package/src/components/block-list/use-block-props/index.native.js +0 -10
  419. package/src/components/block-list/use-scroll-upon-insertion.native.js +0 -52
  420. package/src/components/block-list-appender/index.native.js +0 -70
  421. package/src/components/block-list-appender/style.native.scss +0 -8
  422. package/src/components/block-media-update-progress/README.md +0 -100
  423. package/src/components/block-media-update-progress/index.native.js +0 -299
  424. package/src/components/block-media-update-progress/styles.native.scss +0 -9
  425. package/src/components/block-media-update-progress/test/index.native.js +0 -543
  426. package/src/components/block-mover/index.native.js +0 -193
  427. package/src/components/block-mover/mover-description.native.js +0 -155
  428. package/src/components/block-mover/test/__snapshots__/index.native.js.snap +0 -218
  429. package/src/components/block-mover/test/index.native.js +0 -186
  430. package/src/components/block-settings/button.native.js +0 -41
  431. package/src/components/block-settings/container.native.js +0 -91
  432. package/src/components/block-settings/container.native.scss +0 -4
  433. package/src/components/block-settings/index.native.js +0 -5
  434. package/src/components/block-styles/index.native.js +0 -94
  435. package/src/components/block-styles/preview.native.js +0 -109
  436. package/src/components/block-styles/style.native.scss +0 -64
  437. package/src/components/block-switcher/block-transformations-menu.native.js +0 -91
  438. package/src/components/block-toolbar/block-toolbar-menu.native.js +0 -477
  439. package/src/components/block-toolbar/index.native.js +0 -126
  440. package/src/components/block-toolbar/test/__snapshots__/block-toolbar-menu.native.js.snap +0 -125
  441. package/src/components/block-toolbar/test/block-toolbar-menu.native.js +0 -405
  442. package/src/components/block-toolbar/test/index.native.js +0 -36
  443. package/src/components/block-types-list/index.native.js +0 -175
  444. package/src/components/block-types-list/style.native.scss +0 -25
  445. package/src/components/block-variation-picker/index.native.js +0 -107
  446. package/src/components/block-variation-picker/style.native.scss +0 -32
  447. package/src/components/button-block-appender/index.native.js +0 -92
  448. package/src/components/button-block-appender/styles.native.scss +0 -43
  449. package/src/components/caption/README.md +0 -44
  450. package/src/components/caption/index.native.js +0 -61
  451. package/src/components/colors-gradients/panel-color-gradient-settings.native.js +0 -59
  452. package/src/components/contrast-checker/index.native.js +0 -113
  453. package/src/components/contrast-checker/style.native.scss +0 -26
  454. package/src/components/convert-to-group-buttons/index.native.js +0 -79
  455. package/src/components/default-block-appender/index.native.js +0 -113
  456. package/src/components/default-block-appender/style.native.scss +0 -18
  457. package/src/components/floating-toolbar/floatingToolbar.android.scss +0 -4
  458. package/src/components/floating-toolbar/floatingToolbar.ios.scss +0 -3
  459. package/src/components/floating-toolbar/index.native.js +0 -141
  460. package/src/components/floating-toolbar/styles.native.scss +0 -43
  461. package/src/components/font-sizes/index.native.js +0 -7
  462. package/src/components/global-styles/color-panel.native.js +0 -207
  463. package/src/components/global-styles/test/use-global-styles-context.native.js +0 -435
  464. package/src/components/global-styles/use-global-styles-context.native.js +0 -592
  465. package/src/components/gradients/index.native.js +0 -2
  466. package/src/components/image-link-destinations/index.native.js +0 -152
  467. package/src/components/image-link-destinations/style.native.scss +0 -16
  468. package/src/components/index.native.js +0 -108
  469. package/src/components/inner-blocks/constants.native.js +0 -5
  470. package/src/components/inner-blocks/index.native.js +0 -221
  471. package/src/components/inner-blocks/warning-max-depth-exceeded.native.js +0 -124
  472. package/src/components/inserter/block-types-tab.native.js +0 -76
  473. package/src/components/inserter/hooks/use-block-type-impressions.native.js +0 -47
  474. package/src/components/inserter/hooks/use-clipboard-block.native.js +0 -40
  475. package/src/components/inserter/index.native.js +0 -424
  476. package/src/components/inserter/menu.native.js +0 -237
  477. package/src/components/inserter/no-results.native.js +0 -49
  478. package/src/components/inserter/reusable-blocks-tab.native.js +0 -45
  479. package/src/components/inserter/search-results.native.js +0 -67
  480. package/src/components/inserter/style.native.scss +0 -83
  481. package/src/components/inserter/tabs.native.js +0 -152
  482. package/src/components/inserter/test/__snapshots__/index.native.js.snap +0 -117
  483. package/src/components/inserter/test/fixtures/index.native.js +0 -12
  484. package/src/components/inserter/test/index.native.js +0 -273
  485. package/src/components/inserter/test/reusable-blocks-tab.native.js +0 -62
  486. package/src/components/inserter/test/utils.native.js +0 -37
  487. package/src/components/inserter/utils.native.js +0 -46
  488. package/src/components/inserter-button/index.native.js +0 -108
  489. package/src/components/inserter-button/style.native.scss +0 -72
  490. package/src/components/inspector-controls/fill.native.js +0 -62
  491. package/src/components/inspector-controls/slot.native.js +0 -35
  492. package/src/components/inspector-controls-tabs/advanced-controls-panel.native.js +0 -31
  493. package/src/components/line-height-control/index.native.js +0 -28
  494. package/src/components/media-placeholder/index.native.js +0 -258
  495. package/src/components/media-placeholder/styles.native.scss +0 -108
  496. package/src/components/media-replace-flow/index.native.js +0 -12
  497. package/src/components/media-upload/constants.native.js +0 -14
  498. package/src/components/media-upload/index.native.js +0 -356
  499. package/src/components/media-upload/style.native.scss +0 -4
  500. package/src/components/media-upload/test/index.native.js +0 -172
  501. package/src/components/media-upload-progress/README.md +0 -100
  502. package/src/components/media-upload-progress/constants.js +0 -6
  503. package/src/components/media-upload-progress/index.native.js +0 -233
  504. package/src/components/media-upload-progress/styles.native.scss +0 -15
  505. package/src/components/media-upload-progress/test/index.native.js +0 -220
  506. package/src/components/plain-text/index.native.js +0 -164
  507. package/src/components/plain-text/style.native.scss +0 -10
  508. package/src/components/provider/index.native.js +0 -32
  509. package/src/components/rich-text/embed-handler-picker.native.js +0 -65
  510. package/src/components/rich-text/file-paste-handler.native.js +0 -3
  511. package/src/components/rich-text/format-toolbar/index.native.js +0 -21
  512. package/src/components/rich-text/format-toolbar-container.native.js +0 -16
  513. package/src/components/rich-text/index.native.js +0 -701
  514. package/src/components/rich-text/input-event.native.js +0 -10
  515. package/src/components/rich-text/native/format-edit.js +0 -44
  516. package/src/components/rich-text/native/get-format-colors.native.js +0 -47
  517. package/src/components/rich-text/native/index.js +0 -1
  518. package/src/components/rich-text/native/index.native.js +0 -1389
  519. package/src/components/rich-text/native/style.native.scss +0 -28
  520. package/src/components/rich-text/native/test/__snapshots__/index.native.js.snap +0 -79
  521. package/src/components/rich-text/native/test/index.native.js +0 -345
  522. package/src/components/rich-text/native/test/performance/rich-text.native.js +0 -44
  523. package/src/components/rich-text/native/toolbar-button-with-options.native.js +0 -61
  524. package/src/components/rich-text/native/use-format-types.js +0 -146
  525. package/src/components/rich-text/remove-browser-shortcuts.native.js +0 -1
  526. package/src/components/rich-text/shortcut.native.js +0 -10
  527. package/src/components/ungroup-button/README.md +0 -23
  528. package/src/components/ungroup-button/index.native.js +0 -77
  529. package/src/components/unsupported-block-details/index.native.js +0 -187
  530. package/src/components/unsupported-block-details/style.native.scss +0 -56
  531. package/src/components/url-input/index.native.js +0 -33
  532. package/src/components/use-block-drop-zone/index.native.js +0 -207
  533. package/src/components/use-on-block-drop/index.native.js +0 -115
  534. package/src/components/use-unsupported-block-editor/index.native.js +0 -59
  535. package/src/components/video-player/gridicon-play.native.js +0 -13
  536. package/src/components/video-player/index.native.js +0 -133
  537. package/src/components/video-player/styles.native.scss +0 -29
  538. package/src/components/warning/index.native.js +0 -64
  539. package/src/components/warning/style.native.scss +0 -47
  540. package/src/hooks/align.native.js +0 -49
  541. package/src/hooks/custom-class-name.native.js +0 -70
  542. package/src/hooks/index.native.js +0 -36
  543. package/src/hooks/layout.native.js +0 -23
  544. package/src/hooks/test/__snapshots__/align.native.js.snap +0 -73
  545. package/src/hooks/test/__snapshots__/anchor.native.js.snap +0 -7
  546. package/src/hooks/test/align.native.js +0 -134
  547. package/src/hooks/test/anchor.native.js +0 -32
  548. package/src/hooks/test/use-editor-wrapper-styles.native.js +0 -282
  549. package/src/hooks/typography.native.js +0 -60
  550. package/src/hooks/use-editor-wrapper-styles.native.js +0 -250
  551. package/src/hooks/use-editor-wrapper-styles.native.scss +0 -12
  552. package/src/index.native.js +0 -6
  553. package/src/private-apis.native.js +0 -21
  554. package/src/store/defaults.native.js +0 -23
package/CHANGELOG.md CHANGED
@@ -2,7 +2,28 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- ## 15.21.0 (2026-06-04)
5
+ ## 15.22.0-next.0 (2026-06-19)
6
+
7
+ ### Enhancements
8
+
9
+ - List View: a block that supports `listView` is now excluded from the List View when it has no inner blocks and disallows insertion (`allowedBlocks` is `[]` or `false`), since there is nothing to show, rearrange, or add. ([#78932](https://github.com/WordPress/gutenberg/pull/78932))
10
+
11
+ ## 15.21.1 (2026-06-16)
12
+
13
+ ## 15.21.0 (2026-06-10)
14
+
15
+ ### Code Quality
16
+
17
+ - Add missing `@types/react` dependency. [#78882](https://github.com/WordPress/gutenberg/pull/78882).
18
+
19
+ ### Documentation
20
+
21
+ - Fix documentation typos and grammar ([#78686](https://github.com/WordPress/gutenberg/pull/78686)).
22
+
23
+ ### Internal
24
+
25
+ - `ListView`: Compute the block visibility label once in `ListViewBlock` and pass it down to `ListViewBlockSelectButton`, removing a duplicated `useSelect`/`getBlockVisibilityLabel` call and clarifying that the label is exposed to assistive technology through the row's `aria-describedby` ([#78640](https://github.com/WordPress/gutenberg/pull/78640)).
26
+ - Dependency updates ([#77954](https://github.com/WordPress/gutenberg/pull/77954)).
6
27
 
7
28
  ## 15.20.0 (2026-05-27)
8
29
 
@@ -13,6 +34,7 @@
13
34
  ### Internal
14
35
 
15
36
  - Remove legacy `Notice` overrides in block placeholder notices and media replace flow error UI ([#78231](https://github.com/WordPress/gutenberg/pull/78231)).
37
+ - Updated `diff` dependency from `^4.0.2` to `^8.0.3` ([#77992](https://github.com/WordPress/gutenberg/pull/77992)).
16
38
 
17
39
  ## 15.19.0 (2026-05-14)
18
40
 
@@ -86,12 +86,11 @@ function BlockCard({
86
86
  if (parentClientId || isChild || !allowParentNavigation) {
87
87
  return {};
88
88
  }
89
- const { getBlockParents, getBlockName } = select(import_store.store);
89
+ const { getBlockParents, getBlockName, shouldRenderBlockListView } = (0, import_lock_unlock.unlock)(select(import_store.store));
90
90
  const parents = getBlockParents(clientId, false);
91
- const foundParentId = parents.find((parentId) => {
92
- const parentName = getBlockName(parentId);
93
- return parentName === "core/navigation" || (0, import_blocks.hasBlockSupport)(parentName, "listView");
94
- });
91
+ const foundParentId = parents.find(
92
+ (parentId) => shouldRenderBlockListView(parentId)
93
+ );
95
94
  return {
96
95
  parentBlockClientId: foundParentId,
97
96
  parentBlockName: foundParentId ? getBlockName(foundParentId) : null
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/block-card/index.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tIcon as WCIcon,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { Text, Stack } from '@wordpress/ui';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { __, sprintf, isRTL } from '@wordpress/i18n';\nimport {\n\tchevronLeft,\n\tchevronRight,\n\tarrowRight,\n\tarrowLeft,\n} from '@wordpress/icons';\nimport { getBlockType, hasBlockSupport } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as blockEditorStore } from '../../store';\nimport BlockIcon from '../block-icon';\n\nconst { Badge: WCBadge } = unlock( componentsPrivateApis );\n\nfunction OptionalParentSelectButton( { children, onClick } ) {\n\tif ( ! onClick ) {\n\t\treturn children;\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\tclassName=\"block-editor-block-card__parent-select-button\"\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\n/**\n * A card component that displays block information including title, icon, and description.\n * Can be used to show block metadata and navigation controls for parent blocks.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-card/README.md\n *\n * @example\n * ```jsx\n * function Example() {\n * return (\n * <BlockCard\n * title=\"My Block\"\n * icon=\"smiley\"\n * description=\"A simple block example\"\n * name=\"Custom Block\"\n * />\n * );\n * }\n * ```\n *\n * @param {Object} props Component props.\n * @param {string} props.title The title of the block.\n * @param {string|Object} props.icon The icon of the block. This can be any of [WordPress' Dashicons](https://developer.wordpress.org/resource/dashicons/), or a custom `svg` element.\n * @param {string} props.description The description of the block.\n * @param {Object} [props.blockType] Deprecated: Object containing block type data.\n * @param {string} [props.className] Additional classes to apply to the card.\n * @param {string} [props.name] Custom block name to display before the title.\n * @param {string} [props.allowParentNavigation] Show a back arrow to the parent block in some situations.\n * @param {string} [props.parentClientId] The parent clientId, if this card is for a parent block.\n * @param {string} [props.isChild] Whether the block card is for a child block, in which case, indent the block using an arrow.\n * @param {string} [props.clientId] Whether the block card is for a child block, in which case, indent the block using an arrow.\n * @param {Element} [props.controls] Controls rendered beside the block title.\n * @param {Element} [props.children] Children.\n * @return {Element} Block card component.\n */\nfunction BlockCard( {\n\ttitle,\n\ticon,\n\tdescription,\n\tblockType,\n\tclassName,\n\tname,\n\tallowParentNavigation,\n\tparentClientId,\n\tisChild,\n\tchildren,\n\tclientId,\n\tcontrols,\n} ) {\n\tif ( blockType ) {\n\t\tdeprecated( '`blockType` property in `BlockCard component`', {\n\t\t\tsince: '5.7',\n\t\t\talternative: '`title, icon and description` properties',\n\t\t} );\n\t\t( { title, icon, description } = blockType );\n\t}\n\n\tconst { parentBlockClientId, parentBlockName } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( parentClientId || isChild || ! allowParentNavigation ) {\n\t\t\t\treturn {};\n\t\t\t}\n\t\t\tconst { getBlockParents, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\t// Find the top-most parent block that is either:\n\t\t\t// 1. A navigation block (special case for ad-hoc list view support)\n\t\t\t// 2. Any block with listView support\n\t\t\tconst parents = getBlockParents( clientId, false );\n\t\t\tconst foundParentId = parents.find( ( parentId ) => {\n\t\t\t\tconst parentName = getBlockName( parentId );\n\t\t\t\treturn (\n\t\t\t\t\tparentName === 'core/navigation' ||\n\t\t\t\t\thasBlockSupport( parentName, 'listView' )\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\treturn {\n\t\t\t\tparentBlockClientId: foundParentId,\n\t\t\t\tparentBlockName: foundParentId\n\t\t\t\t\t? getBlockName( foundParentId )\n\t\t\t\t\t: null,\n\t\t\t};\n\t\t},\n\t\t[ clientId, allowParentNavigation, isChild, parentClientId ]\n\t);\n\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\n\tconst TitleElement = parentClientId ? 'div' : 'h2';\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx(\n\t\t\t\t'block-editor-block-card',\n\t\t\t\t{\n\t\t\t\t\t'is-parent': parentClientId,\n\t\t\t\t\t'is-child': isChild,\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t<Stack direction=\"column\" gap=\"sm\">\n\t\t\t\t<Stack direction=\"row\" align=\"center\" justify=\"space-between\">\n\t\t\t\t\t<Stack direction=\"row\" align=\"center\" justify=\"flex-start\">\n\t\t\t\t\t\t{ parentBlockClientId && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tselectBlock( parentBlockClientId )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\tparentBlockName\n\t\t\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: The name of the parent block. */\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'Go to \"%s\" block' ),\n\t\t\t\t\t\t\t\t\t\t\t\tgetBlockType( parentBlockName )\n\t\t\t\t\t\t\t\t\t\t\t\t\t?.title\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: __( 'Go to parent block' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t// TODO: This style override is also used in ToolsPanelHeader.\n\t\t\t\t\t\t\t\t\t// It should be supported out-of-the-box by Button.\n\t\t\t\t\t\t\t\t\t{ minWidth: 24, padding: 0 }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isChild && (\n\t\t\t\t\t\t\t<span className=\"block-editor-block-card__child-indicator-icon\">\n\t\t\t\t\t\t\t\t<WCIcon\n\t\t\t\t\t\t\t\t\ticon={ isRTL() ? arrowLeft : arrowRight }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<OptionalParentSelectButton\n\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\tparentClientId\n\t\t\t\t\t\t\t\t\t? () => {\n\t\t\t\t\t\t\t\t\t\t\tselectBlock( parentClientId );\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BlockIcon icon={ icon } showColors />\n\t\t\t\t\t\t\t<Stack direction=\"column\" gap=\"xs\">\n\t\t\t\t\t\t\t\t<TitleElement className=\"block-editor-block-card__title\">\n\t\t\t\t\t\t\t\t\t<span className=\"block-editor-block-card__name\">\n\t\t\t\t\t\t\t\t\t\t{ !! name?.length ? name : title }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{ ! parentClientId &&\n\t\t\t\t\t\t\t\t\t\t! isChild &&\n\t\t\t\t\t\t\t\t\t\t!! name?.length && (\n\t\t\t\t\t\t\t\t\t\t\t<WCBadge>{ title }</WCBadge>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</TitleElement>\n\t\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t</OptionalParentSelectButton>\n\t\t\t\t\t</Stack>\n\t\t\t\t\t{ controls }\n\t\t\t\t</Stack>\n\t\t\t\t{ ! parentClientId && ! isChild && description && (\n\t\t\t\t\t<Text className=\"block-editor-block-card__description\">\n\t\t\t\t\t\t{ description }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EAAU,MAAc,YAAU,MAAC;AAAA,kBACpC,6CAAC,mBAAM,WAAU,UAAS,KAAI,MAC7B;AAAA,iEAAC,gBAAa,WAAU,kCACvB;AAAA,kEAAC,UAAK,WAAU,iCACb,WAAC,CAAE,MAAM,SAAS,OAAO,OAC5B;AAAA,sBACE,CAAE,kBACH,CAAE,WACF,CAAC,CAAE,MAAM,UACR,4CAAC,WAAU,iBAAO;AAAA,uBAErB;AAAA,oBACE;AAAA,qBACH;AAAA;AAAA;AAAA,YACD;AAAA,aACD;AAAA,UACE;AAAA,WACH;AAAA,QACE,CAAE,kBAAkB,CAAE,WAAW,eAClC,4CAAC,kBAAK,WAAU,wCACb,uBACH;AAAA,SAEF;AAAA;AAAA,EACD;AAEF;AAEA,IAAO,qBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tIcon as WCIcon,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { Text, Stack } from '@wordpress/ui';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { __, sprintf, isRTL } from '@wordpress/i18n';\nimport {\n\tchevronLeft,\n\tchevronRight,\n\tarrowRight,\n\tarrowLeft,\n} from '@wordpress/icons';\nimport { getBlockType } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as blockEditorStore } from '../../store';\nimport BlockIcon from '../block-icon';\n\nconst { Badge: WCBadge } = unlock( componentsPrivateApis );\n\nfunction OptionalParentSelectButton( { children, onClick } ) {\n\tif ( ! onClick ) {\n\t\treturn children;\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\tclassName=\"block-editor-block-card__parent-select-button\"\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\n/**\n * A card component that displays block information including title, icon, and description.\n * Can be used to show block metadata and navigation controls for parent blocks.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-card/README.md\n *\n * @example\n * ```jsx\n * function Example() {\n * return (\n * <BlockCard\n * title=\"My Block\"\n * icon=\"smiley\"\n * description=\"A simple block example\"\n * name=\"Custom Block\"\n * />\n * );\n * }\n * ```\n *\n * @param {Object} props Component props.\n * @param {string} props.title The title of the block.\n * @param {string|Object} props.icon The icon of the block. This can be any of [WordPress' Dashicons](https://developer.wordpress.org/resource/dashicons/), or a custom `svg` element.\n * @param {string} props.description The description of the block.\n * @param {Object} [props.blockType] Deprecated: Object containing block type data.\n * @param {string} [props.className] Additional classes to apply to the card.\n * @param {string} [props.name] Custom block name to display before the title.\n * @param {string} [props.allowParentNavigation] Show a back arrow to the parent block in some situations.\n * @param {string} [props.parentClientId] The parent clientId, if this card is for a parent block.\n * @param {string} [props.isChild] Whether the block card is for a child block, in which case, indent the block using an arrow.\n * @param {string} [props.clientId] Whether the block card is for a child block, in which case, indent the block using an arrow.\n * @param {Element} [props.controls] Controls rendered beside the block title.\n * @param {Element} [props.children] Children.\n * @return {Element} Block card component.\n */\nfunction BlockCard( {\n\ttitle,\n\ticon,\n\tdescription,\n\tblockType,\n\tclassName,\n\tname,\n\tallowParentNavigation,\n\tparentClientId,\n\tisChild,\n\tchildren,\n\tclientId,\n\tcontrols,\n} ) {\n\tif ( blockType ) {\n\t\tdeprecated( '`blockType` property in `BlockCard component`', {\n\t\t\tsince: '5.7',\n\t\t\talternative: '`title, icon and description` properties',\n\t\t} );\n\t\t( { title, icon, description } = blockType );\n\t}\n\n\tconst { parentBlockClientId, parentBlockName } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( parentClientId || isChild || ! allowParentNavigation ) {\n\t\t\t\treturn {};\n\t\t\t}\n\t\t\tconst { getBlockParents, getBlockName, shouldRenderBlockListView } =\n\t\t\t\tunlock( select( blockEditorStore ) );\n\n\t\t\t// Find the top-most parent block that participates in List View.\n\t\t\tconst parents = getBlockParents( clientId, false );\n\t\t\tconst foundParentId = parents.find( ( parentId ) =>\n\t\t\t\tshouldRenderBlockListView( parentId )\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tparentBlockClientId: foundParentId,\n\t\t\t\tparentBlockName: foundParentId\n\t\t\t\t\t? getBlockName( foundParentId )\n\t\t\t\t\t: null,\n\t\t\t};\n\t\t},\n\t\t[ clientId, allowParentNavigation, isChild, parentClientId ]\n\t);\n\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\n\tconst TitleElement = parentClientId ? 'div' : 'h2';\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx(\n\t\t\t\t'block-editor-block-card',\n\t\t\t\t{\n\t\t\t\t\t'is-parent': parentClientId,\n\t\t\t\t\t'is-child': isChild,\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t<Stack direction=\"column\" gap=\"sm\">\n\t\t\t\t<Stack direction=\"row\" align=\"center\" justify=\"space-between\">\n\t\t\t\t\t<Stack direction=\"row\" align=\"center\" justify=\"flex-start\">\n\t\t\t\t\t\t{ parentBlockClientId && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tselectBlock( parentBlockClientId )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\tparentBlockName\n\t\t\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: The name of the parent block. */\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'Go to \"%s\" block' ),\n\t\t\t\t\t\t\t\t\t\t\t\tgetBlockType( parentBlockName )\n\t\t\t\t\t\t\t\t\t\t\t\t\t?.title\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: __( 'Go to parent block' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t// TODO: This style override is also used in ToolsPanelHeader.\n\t\t\t\t\t\t\t\t\t// It should be supported out-of-the-box by Button.\n\t\t\t\t\t\t\t\t\t{ minWidth: 24, padding: 0 }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ isChild && (\n\t\t\t\t\t\t\t<span className=\"block-editor-block-card__child-indicator-icon\">\n\t\t\t\t\t\t\t\t<WCIcon\n\t\t\t\t\t\t\t\t\ticon={ isRTL() ? arrowLeft : arrowRight }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<OptionalParentSelectButton\n\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\tparentClientId\n\t\t\t\t\t\t\t\t\t? () => {\n\t\t\t\t\t\t\t\t\t\t\tselectBlock( parentClientId );\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BlockIcon icon={ icon } showColors />\n\t\t\t\t\t\t\t<Stack direction=\"column\" gap=\"xs\">\n\t\t\t\t\t\t\t\t<TitleElement className=\"block-editor-block-card__title\">\n\t\t\t\t\t\t\t\t\t<span className=\"block-editor-block-card__name\">\n\t\t\t\t\t\t\t\t\t\t{ !! name?.length ? name : title }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{ ! parentClientId &&\n\t\t\t\t\t\t\t\t\t\t! isChild &&\n\t\t\t\t\t\t\t\t\t\t!! name?.length && (\n\t\t\t\t\t\t\t\t\t\t\t<WCBadge>{ title }</WCBadge>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</TitleElement>\n\t\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t</OptionalParentSelectButton>\n\t\t\t\t\t</Stack>\n\t\t\t\t\t{ controls }\n\t\t\t\t</Stack>\n\t\t\t\t{ ! parentClientId && ! isChild && description && (\n\t\t\t\t\t<Text className=\"block-editor-block-card__description\">\n\t\t\t\t\t\t{ description }\n\t\t\t\t\t</Text>\n\t\t\t\t) }\n\t\t\t</Stack>\n\t\t</div>\n\t);\n}\n\nexport default BlockCard;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,wBAIO;AACP,gBAA4B;AAC5B,kBAAuC;AACvC,wBAAuB;AACvB,kBAAmC;AACnC,mBAKO;AACP,oBAA6B;AAK7B,yBAAuB;AACvB,mBAA0C;AAC1C,wBAAsB;AAUpB;AARF,IAAM,EAAE,OAAO,QAAQ,QAAI,2BAAQ,kBAAAA,WAAsB;AAEzD,SAAS,2BAA4B,EAAE,UAAU,QAAQ,GAAI;AAC5D,MAAK,CAAE,SAAU;AAChB,WAAO;AAAA,EACR;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,uBAAqB;AAAA,MACrB,WAAU;AAAA,MACV;AAAA,MAEE;AAAA;AAAA,EACH;AAEF;AAqCA,SAAS,UAAW;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,MAAK,WAAY;AAChB,0BAAAC,SAAY,iDAAiD;AAAA,MAC5D,OAAO;AAAA,MACP,aAAa;AAAA,IACd,CAAE;AACF,KAAE,EAAE,OAAO,MAAM,YAAY,IAAI;AAAA,EAClC;AAEA,QAAM,EAAE,qBAAqB,gBAAgB,QAAI;AAAA,IAChD,CAAE,WAAY;AACb,UAAK,kBAAkB,WAAW,C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UAAO,mBAAM,IAAI,yBAAY;AAAA;AAAA,YAC9B,GACD;AAAA,YAED;AAAA,cAAC;AAAA;AAAA,gBACA,SACC,iBACG,MAAM;AACN,8BAAa,cAAe;AAAA,gBAC5B,IACA;AAAA,gBAGJ;AAAA,8DAAC,kBAAAC,SAAA,EAAU,MAAc,YAAU,MAAC;AAAA,kBACpC,6CAAC,mBAAM,WAAU,UAAS,KAAI,MAC7B;AAAA,iEAAC,gBAAa,WAAU,kCACvB;AAAA,kEAAC,UAAK,WAAU,iCACb,WAAC,CAAE,MAAM,SAAS,OAAO,OAC5B;AAAA,sBACE,CAAE,kBACH,CAAE,WACF,CAAC,CAAE,MAAM,UACR,4CAAC,WAAU,iBAAO;AAAA,uBAErB;AAAA,oBACE;AAAA,qBACH;AAAA;AAAA;AAAA,YACD;AAAA,aACD;AAAA,UACE;AAAA,WACH;AAAA,QACE,CAAE,kBAAkB,CAAE,WAAW,eAClC,4CAAC,kBAAK,WAAU,wCACb,uBACH;AAAA,SAEF;AAAA;AAAA,EACD;AAEF;AAEA,IAAO,qBAAQ;",
6
6
  "names": ["componentsPrivateApis", "deprecated", "blockEditorStore", "clsx", "WCIcon", "BlockIcon"]
7
7
  }
@@ -34,7 +34,7 @@ __export(block_compare_exports, {
34
34
  });
35
35
  module.exports = __toCommonJS(block_compare_exports);
36
36
  var import_clsx = __toESM(require("clsx"));
37
- var import_character = require("diff/lib/diff/character");
37
+ var import_diff = require("diff");
38
38
  var import_i18n = require("@wordpress/i18n");
39
39
  var import_blocks = require("@wordpress/blocks");
40
40
  var import_block_view = __toESM(require("./block-view.cjs"));
@@ -47,7 +47,7 @@ function BlockCompare({
47
47
  convertButtonText
48
48
  }) {
49
49
  function getDifference(originalContent, newContent) {
50
- const difference2 = (0, import_character.diffChars)(originalContent, newContent);
50
+ const difference2 = (0, import_diff.diffChars)(originalContent, newContent);
51
51
  return difference2.map((item, pos) => {
52
52
  const classes = (0, import_clsx.default)({
53
53
  "block-editor-block-compare__added": item.added,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/block-compare/index.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n// diff doesn't tree-shake correctly, so we import from the individual\n// module here, to avoid including too much of the library\nimport { diffChars } from 'diff/lib/diff/character';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { getSaveContent } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport BlockView from './block-view';\n\nfunction BlockCompare( {\n\tblock,\n\tonKeep,\n\tonConvert,\n\tconvertor,\n\tconvertButtonText,\n} ) {\n\tfunction getDifference( originalContent, newContent ) {\n\t\tconst difference = diffChars( originalContent, newContent );\n\n\t\treturn difference.map( ( item, pos ) => {\n\t\t\tconst classes = clsx( {\n\t\t\t\t'block-editor-block-compare__added': item.added,\n\t\t\t\t'block-editor-block-compare__removed': item.removed,\n\t\t\t} );\n\n\t\t\treturn (\n\t\t\t\t<span key={ pos } className={ classes }>\n\t\t\t\t\t{ item.value }\n\t\t\t\t</span>\n\t\t\t);\n\t\t} );\n\t}\n\n\tfunction getConvertedContent( convertedBlock ) {\n\t\t// The convertor may return an array of items or a single item.\n\t\tconst newBlocks = Array.isArray( convertedBlock )\n\t\t\t? convertedBlock\n\t\t\t: [ convertedBlock ];\n\n\t\t// Get converted block details.\n\t\tconst newContent = newBlocks.map( ( item ) =>\n\t\t\tgetSaveContent( item.name, item.attributes, item.innerBlocks )\n\t\t);\n\n\t\treturn newContent.join( '' );\n\t}\n\n\tconst converted = getConvertedContent( convertor( block ) );\n\tconst difference = getDifference( block.originalContent, converted );\n\n\treturn (\n\t\t<div className=\"block-editor-block-compare__wrapper\">\n\t\t\t<BlockView\n\t\t\t\ttitle={ __( 'Current' ) }\n\t\t\t\tclassName=\"block-editor-block-compare__current\"\n\t\t\t\taction={ onKeep }\n\t\t\t\tactionText={ __( 'Convert to HTML' ) }\n\t\t\t\trawContent={ block.originalContent }\n\t\t\t\trenderedContent={ block.originalContent }\n\t\t\t/>\n\n\t\t\t<BlockView\n\t\t\t\ttitle={ __( 'After Conversion' ) }\n\t\t\t\tclassName=\"block-editor-block-compare__converted\"\n\t\t\t\taction={ onConvert }\n\t\t\t\tactionText={ convertButtonText }\n\t\t\t\trawContent={ difference }\n\t\t\t\trenderedContent={ converted }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport default BlockCompare;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAGjB,uBAA0B;AAK1B,kBAAmB;AACnB,oBAA+B;AAK/B,wBAAsB;AAmBlB;AAjBJ,SAAS,aAAc;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,WAAS,cAAe,iBAAiB,YAAa;AACrD,UAAMA,kBAAa,4BAAW,iBAAiB,UAAW;AAE1D,WAAOA,YAAW,IAAK,CAAE,MAAM,QAAS;AACvC,YAAM,cAAU,YAAAC,SAAM;AAAA,QACrB,qCAAqC,KAAK;AAAA,QAC1C,uCAAuC,KAAK;AAAA,MAC7C,CAAE;AAEF,aACC,4CAAC,UAAiB,WAAY,SAC3B,eAAK,SADI,GAEZ;AAAA,IAEF,CAAE;AAAA,EACH;AAEA,WAAS,oBAAqB,gBAAiB;AAE9C,UAAM,YAAY,MAAM,QAAS,cAAe,IAC7C,iBACA,CAAE,cAAe;AAGpB,UAAM,aAAa,UAAU;AAAA,MAAK,CAAE,aACnC,8BAAgB,KAAK,MAAM,KAAK,YAAY,KAAK,WAAY;AAAA,IAC9D;AAEA,WAAO,WAAW,KAAM,EAAG;AAAA,EAC5B;AAEA,QAAM,YAAY,oBAAqB,UAAW,KAAM,CAAE;AAC1D,QAAM,aAAa,cAAe,MAAM,iBAAiB,SAAU;AAEnE,SACC,6CAAC,SAAI,WAAU,uCACd;AAAA;AAAA,MAAC,kBAAAC;AAAA,MAAA;AAAA,QACA,WAAQ,gBAAI,SAAU;AAAA,QACtB,WAAU;AAAA,QACV,QAAS;AAAA,QACT,gBAAa,gBAAI,iBAAkB;AAAA,QACnC,YAAa,MAAM;AAAA,QACnB,iBAAkB,MAAM;AAAA;AAAA,IACzB;AAAA,IAEA;AAAA,MAAC,kBAAAA;AAAA,MAAA;AAAA,QACA,WAAQ,gBAAI,kBAAmB;AAAA,QAC/B,WAAU;AAAA,QACV,QAAS;AAAA,QACT,YAAa;AAAA,QACb,YAAa;AAAA,QACb,iBAAkB;AAAA;AAAA,IACnB;AAAA,KACD;AAEF;AAEA,IAAO,wBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport { diffChars } from 'diff';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { getSaveContent } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport BlockView from './block-view';\n\nfunction BlockCompare( {\n\tblock,\n\tonKeep,\n\tonConvert,\n\tconvertor,\n\tconvertButtonText,\n} ) {\n\tfunction getDifference( originalContent, newContent ) {\n\t\tconst difference = diffChars( originalContent, newContent );\n\n\t\treturn difference.map( ( item, pos ) => {\n\t\t\tconst classes = clsx( {\n\t\t\t\t'block-editor-block-compare__added': item.added,\n\t\t\t\t'block-editor-block-compare__removed': item.removed,\n\t\t\t} );\n\n\t\t\treturn (\n\t\t\t\t<span key={ pos } className={ classes }>\n\t\t\t\t\t{ item.value }\n\t\t\t\t</span>\n\t\t\t);\n\t\t} );\n\t}\n\n\tfunction getConvertedContent( convertedBlock ) {\n\t\t// The convertor may return an array of items or a single item.\n\t\tconst newBlocks = Array.isArray( convertedBlock )\n\t\t\t? convertedBlock\n\t\t\t: [ convertedBlock ];\n\n\t\t// Get converted block details.\n\t\tconst newContent = newBlocks.map( ( item ) =>\n\t\t\tgetSaveContent( item.name, item.attributes, item.innerBlocks )\n\t\t);\n\n\t\treturn newContent.join( '' );\n\t}\n\n\tconst converted = getConvertedContent( convertor( block ) );\n\tconst difference = getDifference( block.originalContent, converted );\n\n\treturn (\n\t\t<div className=\"block-editor-block-compare__wrapper\">\n\t\t\t<BlockView\n\t\t\t\ttitle={ __( 'Current' ) }\n\t\t\t\tclassName=\"block-editor-block-compare__current\"\n\t\t\t\taction={ onKeep }\n\t\t\t\tactionText={ __( 'Convert to HTML' ) }\n\t\t\t\trawContent={ block.originalContent }\n\t\t\t\trenderedContent={ block.originalContent }\n\t\t\t/>\n\n\t\t\t<BlockView\n\t\t\t\ttitle={ __( 'After Conversion' ) }\n\t\t\t\tclassName=\"block-editor-block-compare__converted\"\n\t\t\t\taction={ onConvert }\n\t\t\t\tactionText={ convertButtonText }\n\t\t\t\trawContent={ difference }\n\t\t\t\trenderedContent={ converted }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport default BlockCompare;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AACjB,kBAA0B;AAK1B,kBAAmB;AACnB,oBAA+B;AAK/B,wBAAsB;AAmBlB;AAjBJ,SAAS,aAAc;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,WAAS,cAAe,iBAAiB,YAAa;AACrD,UAAMA,kBAAa,uBAAW,iBAAiB,UAAW;AAE1D,WAAOA,YAAW,IAAK,CAAE,MAAM,QAAS;AACvC,YAAM,cAAU,YAAAC,SAAM;AAAA,QACrB,qCAAqC,KAAK;AAAA,QAC1C,uCAAuC,KAAK;AAAA,MAC7C,CAAE;AAEF,aACC,4CAAC,UAAiB,WAAY,SAC3B,eAAK,SADI,GAEZ;AAAA,IAEF,CAAE;AAAA,EACH;AAEA,WAAS,oBAAqB,gBAAiB;AAE9C,UAAM,YAAY,MAAM,QAAS,cAAe,IAC7C,iBACA,CAAE,cAAe;AAGpB,UAAM,aAAa,UAAU;AAAA,MAAK,CAAE,aACnC,8BAAgB,KAAK,MAAM,KAAK,YAAY,KAAK,WAAY;AAAA,IAC9D;AAEA,WAAO,WAAW,KAAM,EAAG;AAAA,EAC5B;AAEA,QAAM,YAAY,oBAAqB,UAAW,KAAM,CAAE;AAC1D,QAAM,aAAa,cAAe,MAAM,iBAAiB,SAAU;AAEnE,SACC,6CAAC,SAAI,WAAU,uCACd;AAAA;AAAA,MAAC,kBAAAC;AAAA,MAAA;AAAA,QACA,WAAQ,gBAAI,SAAU;AAAA,QACtB,WAAU;AAAA,QACV,QAAS;AAAA,QACT,gBAAa,gBAAI,iBAAkB;AAAA,QACnC,YAAa,MAAM;AAAA,QACnB,iBAAkB,MAAM;AAAA;AAAA,IACzB;AAAA,IAEA;AAAA,MAAC,kBAAAA;AAAA,MAAA;AAAA,QACA,WAAQ,gBAAI,kBAAmB;AAAA,QAC/B,WAAU;AAAA,QACV,QAAS;AAAA,QACT,YAAa;AAAA,QACb,YAAa;AAAA,QACb,iBAAkB;AAAA;AAAA,IACnB;AAAA,KACD;AAEF;AAEA,IAAO,wBAAQ;",
6
6
  "names": ["difference", "clsx", "BlockView"]
7
7
  }
@@ -223,16 +223,15 @@ function BlockInspector() {
223
223
  }
224
224
  const {
225
225
  getClientIdsOfDescendants,
226
- getBlockName,
227
- getBlockEditingMode
226
+ getBlockEditingMode,
227
+ shouldRenderBlockListView
228
228
  } = (0, import_lock_unlock.unlock)(select(import_store.store));
229
229
  const descendants = getClientIdsOfDescendants(
230
230
  renderedBlockClientId
231
231
  );
232
232
  const listViewDescendants = /* @__PURE__ */ new Set();
233
233
  descendants.forEach((clientId) => {
234
- const blockName = getBlockName(clientId);
235
- if (blockName === "core/navigation" || (0, import_blocks.hasBlockSupport)(blockName, "listView")) {
234
+ if (shouldRenderBlockListView(clientId)) {
236
235
  const listViewChildren = getClientIdsOfDescendants(clientId);
237
236
  listViewChildren.forEach(
238
237
  (childId) => listViewDescendants.add(childId)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/block-inspector/index.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tgetBlockType,\n\tgetUnregisteredTypeHandlerName,\n\thasBlockSupport,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport {\n\tToggleControl,\n\t__experimentalSpacer as Spacer,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport EditContents from './edit-contents';\nimport SkipToSelectedBlock from '../skip-to-selected-block';\nimport BlockCard from '../block-card';\nimport MultiSelectionInspector from '../multi-selection-inspector';\nimport BlockVariationTransforms from '../block-variation-transforms';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { store as blockEditorStore } from '../../store';\nimport BlockStyles from '../block-styles';\nimport { ListViewContentPopover } from '../inspector-controls/list-view-content-popover';\nimport InspectorControls from '../inspector-controls';\nimport { BlockInspectorPreTabsSlot } from './inspector-pre-tabs-slot-fill';\nimport { default as InspectorControlsTabs } from '../inspector-controls-tabs';\nimport useInspectorControlsTabs from '../inspector-controls-tabs/use-inspector-controls-tabs';\nimport InspectorControlsLastItem from '../inspector-controls/last-item';\nimport AdvancedControls from '../inspector-controls-tabs/advanced-controls-panel';\nimport PositionControls from '../inspector-controls-tabs/position-controls-panel';\nimport useBlockInspectorAnimationSettings from './useBlockInspectorAnimationSettings';\nimport { useBorderPanelLabel } from '../../hooks/border';\nimport { BlockStateBadges, BlockStatesControl } from '../../hooks/states';\nimport ContentTab from '../inspector-controls-tabs/content-tab';\nimport ViewportVisibilityInfo from '../block-visibility/viewport-visibility-info';\nimport { unlock } from '../../lock-unlock';\nimport {\n\thasPseudoBlockStyleState,\n\thasViewportBlockStyleState,\n\tisDefaultBlockStyleState,\n} from '../../hooks/block-style-state';\nimport { onViewportStateChangeKey } from '../../store/private-keys';\n\nfunction StyleInspectorSlots( {\n\tblockName,\n\tshowAdvancedControls = true,\n\tshowPositionControls = true,\n\tshowBindingsControls = true,\n} ) {\n\tconst borderPanelLabel = useBorderPanelLabel( { blockName } );\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls.Slot />\n\t\t\t<InspectorControls.Slot\n\t\t\t\tgroup=\"color\"\n\t\t\t\tlabel={ __( 'Color' ) }\n\t\t\t\tclassName=\"color-block-support-panel__inner-wrapper\"\n\t\t\t/>\n\t\t\t<InspectorControls.Slot\n\t\t\t\tgroup=\"background\"\n\t\t\t\tlabel={ __( 'Background image' ) }\n\t\t\t\tclassName=\"background-block-support-panel__inner-wrapper\"\n\t\t\t/>\n\t\t\t<InspectorControls.Slot\n\t\t\t\tgroup=\"typography\"\n\t\t\t\tlabel={ __( 'Typography' ) }\n\t\t\t/>\n\t\t\t<InspectorControls.Slot group=\"layout\" label={ __( 'Layout' ) } />\n\t\t\t<InspectorControls.Slot\n\t\t\t\tgroup=\"dimensions\"\n\t\t\t\tlabel={ __( 'Dimensions' ) }\n\t\t\t/>\n\t\t\t<InspectorControls.Slot group=\"border\" label={ borderPanelLabel } />\n\t\t\t{ showPositionControls && <PositionControls /> }\n\t\t\t<InspectorControls.Slot group=\"styles\" />\n\t\t\t{ showBindingsControls && (\n\t\t\t\t<InspectorControls.Slot group=\"bindings\" />\n\t\t\t) }\n\t\t\t{ showAdvancedControls && (\n\t\t\t\t<div>\n\t\t\t\t\t<AdvancedControls />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction StyleStateInspectorSlots( { blockName, selectedBlockStyleState } ) {\n\tconst borderPanelLabel = useBorderPanelLabel( { blockName } );\n\tconst showLayoutControls =\n\t\thasViewportBlockStyleState( selectedBlockStyleState ) &&\n\t\t! hasPseudoBlockStyleState( selectedBlockStyleState );\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls.Slot\n\t\t\t\tgroup=\"color\"\n\t\t\t\tlabel={ __( 'Color' ) }\n\t\t\t\tclassName=\"color-block-support-panel__inner-wrapper\"\n\t\t\t/>\n\t\t\t<InspectorControls.Slot\n\t\t\t\tgroup=\"background\"\n\t\t\t\tlabel={ __( 'Background image' ) }\n\t\t\t\tclassName=\"background-block-support-panel__inner-wrapper\"\n\t\t\t/>\n\t\t\t<InspectorControls.Slot\n\t\t\t\tgroup=\"typography\"\n\t\t\t\tlabel={ __( 'Typography' ) }\n\t\t\t/>\n\t\t\t{ showLayoutControls && (\n\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\tgroup=\"layout\"\n\t\t\t\t\tlabel={ __( 'Layout' ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<InspectorControls.Slot\n\t\t\t\tgroup=\"dimensions\"\n\t\t\t\tlabel={ __( 'Dimensions' ) }\n\t\t\t/>\n\t\t\t<InspectorControls.Slot group=\"border\" label={ borderPanelLabel } />\n\t\t</>\n\t);\n}\n\nfunction BlockInspector() {\n\tconst {\n\t\tselectedBlockCount,\n\t\trenderedBlockName,\n\t\trenderedBlockClientId,\n\t\tblockType,\n\t\tisSectionBlock,\n\t\tisSectionBlockInSelection,\n\t\thasBlockStyles,\n\t\teditedContentOnlySection,\n\t\tblockEditingMode,\n\t\tselectedBlockStyleState,\n\t\tshowStateOnCanvas,\n\t\tonViewportStateChange,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetSelectedBlockClientId,\n\t\t\tgetSelectedBlockClientIds,\n\t\t\tgetSelectedBlockCount,\n\t\t\tgetBlockName,\n\t\t\tgetParentSectionBlock,\n\t\t\tisSectionBlock: _isSectionBlock,\n\t\t\tgetEditedContentOnlySection,\n\t\t\tisWithinEditedContentOnlySection,\n\t\t\tgetBlockEditingMode,\n\t\t\tgetSelectedBlockStyleState,\n\t\t\tisSelectedBlockStyleStateShownOnCanvas,\n\t\t} = unlock( select( blockEditorStore ) );\n\t\tconst blockEditorSettings = select( blockEditorStore ).getSettings();\n\t\tconst { getBlockStyles } = select( blocksStore );\n\t\tconst _selectedBlockClientId = getSelectedBlockClientId();\n\t\tconst isWithinEditedSection = isWithinEditedContentOnlySection(\n\t\t\t_selectedBlockClientId\n\t\t);\n\t\tconst _renderedBlockClientId = isWithinEditedSection\n\t\t\t? _selectedBlockClientId\n\t\t\t: getParentSectionBlock( _selectedBlockClientId ) ||\n\t\t\t _selectedBlockClientId;\n\t\tconst _renderedBlockName =\n\t\t\t_renderedBlockClientId && getBlockName( _renderedBlockClientId );\n\t\tconst _blockType =\n\t\t\t_renderedBlockName && getBlockType( _renderedBlockName );\n\t\tconst selectedBlockClientIds = getSelectedBlockClientIds();\n\t\tconst _isSectionBlockInSelection = selectedBlockClientIds.some(\n\t\t\t( id ) => _isSectionBlock( id )\n\t\t);\n\t\tconst blockStyles =\n\t\t\t_renderedBlockName && getBlockStyles( _renderedBlockName );\n\t\tconst _hasBlockStyles = blockStyles && blockStyles.length > 0;\n\n\t\treturn {\n\t\t\tselectedBlockCount: getSelectedBlockCount(),\n\t\t\trenderedBlockClientId: _renderedBlockClientId,\n\t\t\trenderedBlockName: _renderedBlockName,\n\t\t\tblockType: _blockType,\n\t\t\tisSectionBlockInSelection: _isSectionBlockInSelection,\n\t\t\tisSectionBlock: _isSectionBlock( _renderedBlockClientId ),\n\t\t\thasBlockStyles: _hasBlockStyles,\n\t\t\teditedContentOnlySection: getEditedContentOnlySection(),\n\t\t\tblockEditingMode: getBlockEditingMode( _renderedBlockClientId ),\n\t\t\tselectedBlockStyleState: getSelectedBlockStyleState(\n\t\t\t\t_renderedBlockClientId\n\t\t\t),\n\t\t\tshowStateOnCanvas: isSelectedBlockStyleStateShownOnCanvas(\n\t\t\t\t_renderedBlockClientId\n\t\t\t),\n\t\t\tonViewportStateChange:\n\t\t\t\tblockEditorSettings?.[ onViewportStateChangeKey ],\n\t\t};\n\t}, [] );\n\n\t// Separate useSelect for contentClientIds with proper dependencies\n\tconst contentClientIds = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isSectionBlock || ! renderedBlockClientId ) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\tconst {\n\t\t\t\tgetClientIdsOfDescendants,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockEditingMode,\n\t\t\t} = unlock( select( blockEditorStore ) );\n\n\t\t\tconst descendants = getClientIdsOfDescendants(\n\t\t\t\trenderedBlockClientId\n\t\t\t);\n\n\t\t\t// Exclude items from the content tab that are already present in the\n\t\t\t// List View tab.\n\t\t\tconst listViewDescendants = new Set();\n\t\t\tdescendants.forEach( ( clientId ) => {\n\t\t\t\tconst blockName = getBlockName( clientId );\n\t\t\t\t// Navigation block doesn't have List View block support, but\n\t\t\t\t// it does have a custom implementation that is shown within\n\t\t\t\t// patterns, so it's included in this condition.\n\t\t\t\tif (\n\t\t\t\t\tblockName === 'core/navigation' ||\n\t\t\t\t\thasBlockSupport( blockName, 'listView' )\n\t\t\t\t) {\n\t\t\t\t\tconst listViewChildren =\n\t\t\t\t\t\tgetClientIdsOfDescendants( clientId );\n\t\t\t\t\tlistViewChildren.forEach( ( childId ) =>\n\t\t\t\t\t\tlistViewDescendants.add( childId )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\treturn descendants.filter( ( current ) => {\n\t\t\t\treturn (\n\t\t\t\t\t! listViewDescendants.has( current ) &&\n\t\t\t\t\tgetBlockEditingMode( current ) === 'contentOnly'\n\t\t\t\t);\n\t\t\t} );\n\t\t},\n\t\t[ isSectionBlock, renderedBlockClientId ]\n\t);\n\n\tconst availableTabs = useInspectorControlsTabs(\n\t\tblockType?.name,\n\t\tcontentClientIds,\n\t\tisSectionBlock,\n\t\thasBlockStyles\n\t);\n\tconst hasMultipleTabs = availableTabs?.length > 1;\n\n\t// The block inspector animation settings will be completely\n\t// removed in the future to create an API which allows the block\n\t// inspector to transition between what it\n\t// displays based on the relationship between the selected block\n\t// and its parent, and only enable it if the parent is controlling\n\t// its children blocks.\n\tconst blockInspectorAnimationSettings =\n\t\tuseBlockInspectorAnimationSettings( blockType );\n\n\tconst hasSelectedBlocks = selectedBlockCount > 1;\n\tconst isBlockStyleStateSelected = ! isDefaultBlockStyleState(\n\t\tselectedBlockStyleState\n\t);\n\n\tif ( hasSelectedBlocks && ! isSectionBlockInSelection ) {\n\t\treturn (\n\t\t\t<div className=\"block-editor-block-inspector\">\n\t\t\t\t<MultiSelectionInspector />\n\t\t\t\t{ hasMultipleTabs ? (\n\t\t\t\t\t<InspectorControlsTabs tabs={ availableTabs } />\n\t\t\t\t) : (\n\t\t\t\t\t<StyleInspectorSlots\n\t\t\t\t\t\tblockName={ renderedBlockName }\n\t\t\t\t\t\tshowAdvancedControls={ false }\n\t\t\t\t\t\tshowPositionControls={ false }\n\t\t\t\t\t\tshowBindingsControls={ false }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif ( hasSelectedBlocks && isSectionBlockInSelection ) {\n\t\treturn (\n\t\t\t<div className=\"block-editor-block-inspector\">\n\t\t\t\t<MultiSelectionInspector />\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst isRenderedBlockUnregistered =\n\t\trenderedBlockName === getUnregisteredTypeHandlerName();\n\n\t/*\n\t * If the rendered block is of an unregistered type, avoid showing it as an actual selection\n\t * because we want the user to focus on the unregistered block warning, not block settings.\n\t */\n\tconst shouldShowWarning =\n\t\t! blockType || ! renderedBlockClientId || isRenderedBlockUnregistered;\n\n\tif ( shouldShowWarning ) {\n\t\treturn (\n\t\t\t<span className=\"block-editor-block-inspector__no-blocks\">\n\t\t\t\t{ __( 'No block selected.' ) }\n\t\t\t</span>\n\t\t);\n\t}\n\n\treturn (\n\t\t<BlockInspectorSingleBlockWrapper\n\t\t\tanimate={ blockInspectorAnimationSettings }\n\t\t\twrapper={ ( children ) => (\n\t\t\t\t<AnimatedContainer\n\t\t\t\t\tblockInspectorAnimationSettings={\n\t\t\t\t\t\tblockInspectorAnimationSettings\n\t\t\t\t\t}\n\t\t\t\t\trenderedBlockClientId={ renderedBlockClientId }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</AnimatedContainer>\n\t\t\t) }\n\t\t>\n\t\t\t<BlockInspectorSingleBlock\n\t\t\t\trenderedBlockClientId={ renderedBlockClientId }\n\t\t\t\tblockName={ blockType.name }\n\t\t\t\tisSectionBlock={ isSectionBlock }\n\t\t\t\tavailableTabs={ availableTabs }\n\t\t\t\tcontentClientIds={ contentClientIds }\n\t\t\t\thasBlockStyles={ hasBlockStyles }\n\t\t\t\teditedContentOnlySection={ editedContentOnlySection }\n\t\t\t\tblockEditingMode={ blockEditingMode }\n\t\t\t\tselectedBlockStyleState={ selectedBlockStyleState }\n\t\t\t\tshowStateOnCanvas={ showStateOnCanvas }\n\t\t\t\tonViewportStateChange={ onViewportStateChange }\n\t\t\t\tisBlockStyleStateSelected={ isBlockStyleStateSelected }\n\t\t\t/>\n\t\t</BlockInspectorSingleBlockWrapper>\n\t);\n}\n\nconst BlockInspectorSingleBlockWrapper = ( { animate, wrapper, children } ) => {\n\treturn animate ? wrapper( children ) : children;\n};\n\nconst AnimatedContainer = ( {\n\tblockInspectorAnimationSettings,\n\trenderedBlockClientId,\n\tchildren,\n} ) => {\n\tconst animationOrigin =\n\t\tblockInspectorAnimationSettings &&\n\t\tblockInspectorAnimationSettings.enterDirection === 'leftToRight'\n\t\t\t? -50\n\t\t\t: 50;\n\n\treturn (\n\t\t<motion.div\n\t\t\tanimate={ {\n\t\t\t\tx: 0,\n\t\t\t\topacity: 1,\n\t\t\t\ttransition: {\n\t\t\t\t\tease: 'easeInOut',\n\t\t\t\t\tduration: 0.14,\n\t\t\t\t},\n\t\t\t} }\n\t\t\tinitial={ {\n\t\t\t\tx: animationOrigin,\n\t\t\t\topacity: 0,\n\t\t\t} }\n\t\t\tkey={ renderedBlockClientId }\n\t\t>\n\t\t\t{ children }\n\t\t</motion.div>\n\t);\n};\n\nconst BlockInspectorSingleBlock = ( {\n\t// The block that is displayed in the inspector. This is the block whose\n\t// controls and information are shown to the user.\n\trenderedBlockClientId,\n\tblockName,\n\tisSectionBlock,\n\tavailableTabs,\n\tcontentClientIds,\n\thasBlockStyles,\n\teditedContentOnlySection,\n\tblockEditingMode,\n\tselectedBlockStyleState,\n\tshowStateOnCanvas,\n\tonViewportStateChange,\n\tisBlockStyleStateSelected,\n} ) => {\n\tconst listViewRef = useRef( null );\n\tconst hasMultipleTabs = availableTabs?.length > 1;\n\tconst hasParentChildBlockCards =\n\t\teditedContentOnlySection &&\n\t\teditedContentOnlySection !== renderedBlockClientId;\n\tconst parentBlockInformation = useBlockDisplayInformation(\n\t\teditedContentOnlySection\n\t);\n\tconst blockInformation = useBlockDisplayInformation(\n\t\trenderedBlockClientId\n\t);\n\tconst isBlockSynced = blockInformation.isSynced;\n\tconst {\n\t\tsetSelectedBlockStyleState,\n\t\tsetSelectedBlockStyleStateCanvasPreview,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\tconst onBlockStyleStateChange = ( value ) => {\n\t\tconst nextSelectedBlockStyleState = {\n\t\t\t...selectedBlockStyleState,\n\t\t\t...value,\n\t\t};\n\n\t\tsetSelectedBlockStyleState(\n\t\t\trenderedBlockClientId,\n\t\t\tnextSelectedBlockStyleState\n\t\t);\n\n\t\tif ( value.viewport ) {\n\t\t\tonViewportStateChange?.( {\n\t\t\t\tviewport: nextSelectedBlockStyleState.viewport,\n\t\t\t\tshowStateOnCanvas,\n\t\t\t} );\n\t\t}\n\t};\n\tconst onShowStateOnCanvasChange = ( value ) => {\n\t\tsetSelectedBlockStyleStateCanvasPreview( renderedBlockClientId, value );\n\n\t\tif ( value ) {\n\t\t\tonViewportStateChange?.( {\n\t\t\t\tviewport: selectedBlockStyleState.viewport,\n\t\t\t\tshowStateOnCanvas: value,\n\t\t\t} );\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"block-editor-block-inspector\">\n\t\t\t{ hasParentChildBlockCards && (\n\t\t\t\t<BlockCard\n\t\t\t\t\t{ ...parentBlockInformation }\n\t\t\t\t\tclassName={\n\t\t\t\t\t\tparentBlockInformation?.isSynced && 'is-synced'\n\t\t\t\t\t}\n\t\t\t\t\tparentClientId={ editedContentOnlySection }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<BlockCard\n\t\t\t\t{ ...blockInformation }\n\t\t\t\tallowParentNavigation\n\t\t\t\tclassName={ isBlockSynced && 'is-synced' }\n\t\t\t\tisChild={ hasParentChildBlockCards }\n\t\t\t\tclientId={ renderedBlockClientId }\n\t\t\t\tcontrols={\n\t\t\t\t\tblockEditingMode === 'default' && (\n\t\t\t\t\t\t<BlockStatesControl\n\t\t\t\t\t\t\tname={ blockName }\n\t\t\t\t\t\t\tvalue={ selectedBlockStyleState }\n\t\t\t\t\t\t\tonChange={ onBlockStyleStateChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ blockEditingMode === 'default' && isBlockStyleStateSelected && (\n\t\t\t\t<Spacer paddingX={ 4 } paddingY={ 2 }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Show state on canvas' ) }\n\t\t\t\t\t\tchecked={ showStateOnCanvas }\n\t\t\t\t\t\tonChange={ onShowStateOnCanvasChange }\n\t\t\t\t\t/>\n\t\t\t\t\t<BlockStateBadges\n\t\t\t\t\t\tname={ blockName }\n\t\t\t\t\t\tvalue={ selectedBlockStyleState }\n\t\t\t\t\t/>\n\t\t\t\t</Spacer>\n\t\t\t) }\n\t\t\t<ViewportVisibilityInfo clientId={ renderedBlockClientId } />\n\t\t\t<EditContents clientId={ renderedBlockClientId } />\n\t\t\t{ ! isBlockStyleStateSelected && (\n\t\t\t\t<BlockVariationTransforms\n\t\t\t\t\tblockClientId={ renderedBlockClientId }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<BlockInspectorPreTabsSlot />\n\t\t\t{ isBlockStyleStateSelected && ! isSectionBlock && (\n\t\t\t\t<StyleStateInspectorSlots\n\t\t\t\t\tblockName={ blockName }\n\t\t\t\t\tselectedBlockStyleState={ selectedBlockStyleState }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ ! isBlockStyleStateSelected && hasMultipleTabs && (\n\t\t\t\t<>\n\t\t\t\t\t<InspectorControlsTabs\n\t\t\t\t\t\thasBlockStyles={ hasBlockStyles }\n\t\t\t\t\t\tclientId={ renderedBlockClientId }\n\t\t\t\t\t\tblockName={ blockName }\n\t\t\t\t\t\ttabs={ availableTabs }\n\t\t\t\t\t\tisSectionBlock={ isSectionBlock }\n\t\t\t\t\t\tcontentClientIds={ contentClientIds }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ ! isBlockStyleStateSelected && ! hasMultipleTabs && (\n\t\t\t\t<>\n\t\t\t\t\t{ hasBlockStyles && (\n\t\t\t\t\t\t<BlockStyles clientId={ renderedBlockClientId } />\n\t\t\t\t\t) }\n\t\t\t\t\t<ContentTab contentClientIds={ contentClientIds } />\n\t\t\t\t\t<InspectorControls.Slot group=\"content\" />\n\t\t\t\t\t<InspectorControls.Slot group=\"list\" ref={ listViewRef } />\n\t\t\t\t\t<ListViewContentPopover listViewRef={ listViewRef } />\n\t\t\t\t\t{ ! isSectionBlock && (\n\t\t\t\t\t\t<StyleInspectorSlots blockName={ blockName } />\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ ! isBlockStyleStateSelected && (\n\t\t\t\t<InspectorControlsLastItem.Slot />\n\t\t\t) }\n\t\t\t<SkipToSelectedBlock key=\"back\" />\n\t\t</div>\n\t);\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-inspector/README.md\n */\nexport default BlockInspector;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AACnB,oBAKO;AACP,wBAIO;AACP,kBAAuC;AACvC,qBAAuB;AAKvB,2BAAyB;AACzB,oCAA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uBAAoB,WAAwB;AAAA,OAE/C;AAAA,IAEC,CAAE,6BACH,4CAAC,iBAAAkB,QAA0B,MAA1B,EAA+B;AAAA,IAEjC,4CAAC,8BAAAC,SAAA,IAAwB,MAAO;AAAA,KACjC;AAEF;AAKA,IAAO,0BAAQ;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tgetBlockType,\n\tgetUnregisteredTypeHandlerName,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport {\n\tToggleControl,\n\t__experimentalSpacer as Spacer,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport EditContents from './edit-contents';\nimport SkipToSelectedBlock from '../skip-to-selected-block';\nimport BlockCard from '../block-card';\nimport MultiSelectionInspector from '../multi-selection-inspector';\nimport BlockVariationTransforms from '../block-variation-transforms';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { store as blockEditorStore } from '../../store';\nimport BlockStyles from '../block-styles';\nimport { ListViewContentPopover } from '../inspector-controls/list-view-content-popover';\nimport InspectorControls from '../inspector-controls';\nimport { BlockInspectorPreTabsSlot } from './inspector-pre-tabs-slot-fill';\nimport { default as InspectorControlsTabs } from '../inspector-controls-tabs';\nimport useInspectorControlsTabs from '../inspector-controls-tabs/use-inspector-controls-tabs';\nimport InspectorControlsLastItem from '../inspector-controls/last-item';\nimport AdvancedControls from '../inspector-controls-tabs/advanced-controls-panel';\nimport PositionControls from '../inspector-controls-tabs/position-controls-panel';\nimport useBlockInspectorAnimationSettings from './useBlockInspectorAnimationSettings';\nimport { useBorderPanelLabel } from '../../hooks/border';\nimport { BlockStateBadges, BlockStatesControl } from '../../hooks/states';\nimport ContentTab from '../inspector-controls-tabs/content-tab';\nimport ViewportVisibilityInfo from '../block-visibility/viewport-visibility-info';\nimport { unlock } from '../../lock-unlock';\nimport {\n\thasPseudoBlockStyleState,\n\thasViewportBlockStyleState,\n\tisDefaultBlockStyleState,\n} from '../../hooks/block-style-state';\nimport { onViewportStateChangeKey } from '../../store/private-keys';\n\nfunction StyleInspectorSlots( {\n\tblockName,\n\tshowAdvancedControls = true,\n\tshowPositionControls = true,\n\tshowBindingsControls = true,\n} ) {\n\tconst borderPanelLabel = useBorderPanelLabel( { blockName } );\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls.Slot />\n\t\t\t<InspectorControls.Slot\n\t\t\t\tgroup=\"color\"\n\t\t\t\tlabel={ __( 'Color' ) }\n\t\t\t\tclassName=\"color-block-support-panel__inner-wrapper\"\n\t\t\t/>\n\t\t\t<InspectorControls.Slot\n\t\t\t\tgroup=\"background\"\n\t\t\t\tlabel={ __( 'Background image' ) }\n\t\t\t\tclassName=\"background-block-support-panel__inner-wrapper\"\n\t\t\t/>\n\t\t\t<InspectorControls.Slot\n\t\t\t\tgroup=\"typography\"\n\t\t\t\tlabel={ __( 'Typography' ) }\n\t\t\t/>\n\t\t\t<InspectorControls.Slot group=\"layout\" label={ __( 'Layout' ) } />\n\t\t\t<InspectorControls.Slot\n\t\t\t\tgroup=\"dimensions\"\n\t\t\t\tlabel={ __( 'Dimensions' ) }\n\t\t\t/>\n\t\t\t<InspectorControls.Slot group=\"border\" label={ borderPanelLabel } />\n\t\t\t{ showPositionControls && <PositionControls /> }\n\t\t\t<InspectorControls.Slot group=\"styles\" />\n\t\t\t{ showBindingsControls && (\n\t\t\t\t<InspectorControls.Slot group=\"bindings\" />\n\t\t\t) }\n\t\t\t{ showAdvancedControls && (\n\t\t\t\t<div>\n\t\t\t\t\t<AdvancedControls />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction StyleStateInspectorSlots( { blockName, selectedBlockStyleState } ) {\n\tconst borderPanelLabel = useBorderPanelLabel( { blockName } );\n\tconst showLayoutControls =\n\t\thasViewportBlockStyleState( selectedBlockStyleState ) &&\n\t\t! hasPseudoBlockStyleState( selectedBlockStyleState );\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls.Slot\n\t\t\t\tgroup=\"color\"\n\t\t\t\tlabel={ __( 'Color' ) }\n\t\t\t\tclassName=\"color-block-support-panel__inner-wrapper\"\n\t\t\t/>\n\t\t\t<InspectorControls.Slot\n\t\t\t\tgroup=\"background\"\n\t\t\t\tlabel={ __( 'Background image' ) }\n\t\t\t\tclassName=\"background-block-support-panel__inner-wrapper\"\n\t\t\t/>\n\t\t\t<InspectorControls.Slot\n\t\t\t\tgroup=\"typography\"\n\t\t\t\tlabel={ __( 'Typography' ) }\n\t\t\t/>\n\t\t\t{ showLayoutControls && (\n\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\tgroup=\"layout\"\n\t\t\t\t\tlabel={ __( 'Layout' ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<InspectorControls.Slot\n\t\t\t\tgroup=\"dimensions\"\n\t\t\t\tlabel={ __( 'Dimensions' ) }\n\t\t\t/>\n\t\t\t<InspectorControls.Slot group=\"border\" label={ borderPanelLabel } />\n\t\t</>\n\t);\n}\n\nfunction BlockInspector() {\n\tconst {\n\t\tselectedBlockCount,\n\t\trenderedBlockName,\n\t\trenderedBlockClientId,\n\t\tblockType,\n\t\tisSectionBlock,\n\t\tisSectionBlockInSelection,\n\t\thasBlockStyles,\n\t\teditedContentOnlySection,\n\t\tblockEditingMode,\n\t\tselectedBlockStyleState,\n\t\tshowStateOnCanvas,\n\t\tonViewportStateChange,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetSelectedBlockClientId,\n\t\t\tgetSelectedBlockClientIds,\n\t\t\tgetSelectedBlockCount,\n\t\t\tgetBlockName,\n\t\t\tgetParentSectionBlock,\n\t\t\tisSectionBlock: _isSectionBlock,\n\t\t\tgetEditedContentOnlySection,\n\t\t\tisWithinEditedContentOnlySection,\n\t\t\tgetBlockEditingMode,\n\t\t\tgetSelectedBlockStyleState,\n\t\t\tisSelectedBlockStyleStateShownOnCanvas,\n\t\t} = unlock( select( blockEditorStore ) );\n\t\tconst blockEditorSettings = select( blockEditorStore ).getSettings();\n\t\tconst { getBlockStyles } = select( blocksStore );\n\t\tconst _selectedBlockClientId = getSelectedBlockClientId();\n\t\tconst isWithinEditedSection = isWithinEditedContentOnlySection(\n\t\t\t_selectedBlockClientId\n\t\t);\n\t\tconst _renderedBlockClientId = isWithinEditedSection\n\t\t\t? _selectedBlockClientId\n\t\t\t: getParentSectionBlock( _selectedBlockClientId ) ||\n\t\t\t _selectedBlockClientId;\n\t\tconst _renderedBlockName =\n\t\t\t_renderedBlockClientId && getBlockName( _renderedBlockClientId );\n\t\tconst _blockType =\n\t\t\t_renderedBlockName && getBlockType( _renderedBlockName );\n\t\tconst selectedBlockClientIds = getSelectedBlockClientIds();\n\t\tconst _isSectionBlockInSelection = selectedBlockClientIds.some(\n\t\t\t( id ) => _isSectionBlock( id )\n\t\t);\n\t\tconst blockStyles =\n\t\t\t_renderedBlockName && getBlockStyles( _renderedBlockName );\n\t\tconst _hasBlockStyles = blockStyles && blockStyles.length > 0;\n\n\t\treturn {\n\t\t\tselectedBlockCount: getSelectedBlockCount(),\n\t\t\trenderedBlockClientId: _renderedBlockClientId,\n\t\t\trenderedBlockName: _renderedBlockName,\n\t\t\tblockType: _blockType,\n\t\t\tisSectionBlockInSelection: _isSectionBlockInSelection,\n\t\t\tisSectionBlock: _isSectionBlock( _renderedBlockClientId ),\n\t\t\thasBlockStyles: _hasBlockStyles,\n\t\t\teditedContentOnlySection: getEditedContentOnlySection(),\n\t\t\tblockEditingMode: getBlockEditingMode( _renderedBlockClientId ),\n\t\t\tselectedBlockStyleState: getSelectedBlockStyleState(\n\t\t\t\t_renderedBlockClientId\n\t\t\t),\n\t\t\tshowStateOnCanvas: isSelectedBlockStyleStateShownOnCanvas(\n\t\t\t\t_renderedBlockClientId\n\t\t\t),\n\t\t\tonViewportStateChange:\n\t\t\t\tblockEditorSettings?.[ onViewportStateChangeKey ],\n\t\t};\n\t}, [] );\n\n\t// Separate useSelect for contentClientIds with proper dependencies\n\tconst contentClientIds = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! isSectionBlock || ! renderedBlockClientId ) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\tconst {\n\t\t\t\tgetClientIdsOfDescendants,\n\t\t\t\tgetBlockEditingMode,\n\t\t\t\tshouldRenderBlockListView,\n\t\t\t} = unlock( select( blockEditorStore ) );\n\n\t\t\tconst descendants = getClientIdsOfDescendants(\n\t\t\t\trenderedBlockClientId\n\t\t\t);\n\n\t\t\t// Exclude items from the content tab that are already present in the\n\t\t\t// List View tab.\n\t\t\tconst listViewDescendants = new Set();\n\t\t\tdescendants.forEach( ( clientId ) => {\n\t\t\t\tif ( shouldRenderBlockListView( clientId ) ) {\n\t\t\t\t\tconst listViewChildren =\n\t\t\t\t\t\tgetClientIdsOfDescendants( clientId );\n\t\t\t\t\tlistViewChildren.forEach( ( childId ) =>\n\t\t\t\t\t\tlistViewDescendants.add( childId )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\treturn descendants.filter( ( current ) => {\n\t\t\t\treturn (\n\t\t\t\t\t! listViewDescendants.has( current ) &&\n\t\t\t\t\tgetBlockEditingMode( current ) === 'contentOnly'\n\t\t\t\t);\n\t\t\t} );\n\t\t},\n\t\t[ isSectionBlock, renderedBlockClientId ]\n\t);\n\n\tconst availableTabs = useInspectorControlsTabs(\n\t\tblockType?.name,\n\t\tcontentClientIds,\n\t\tisSectionBlock,\n\t\thasBlockStyles\n\t);\n\tconst hasMultipleTabs = availableTabs?.length > 1;\n\n\t// The block inspector animation settings will be completely\n\t// removed in the future to create an API which allows the block\n\t// inspector to transition between what it\n\t// displays based on the relationship between the selected block\n\t// and its parent, and only enable it if the parent is controlling\n\t// its children blocks.\n\tconst blockInspectorAnimationSettings =\n\t\tuseBlockInspectorAnimationSettings( blockType );\n\n\tconst hasSelectedBlocks = selectedBlockCount > 1;\n\tconst isBlockStyleStateSelected = ! isDefaultBlockStyleState(\n\t\tselectedBlockStyleState\n\t);\n\n\tif ( hasSelectedBlocks && ! isSectionBlockInSelection ) {\n\t\treturn (\n\t\t\t<div className=\"block-editor-block-inspector\">\n\t\t\t\t<MultiSelectionInspector />\n\t\t\t\t{ hasMultipleTabs ? (\n\t\t\t\t\t<InspectorControlsTabs tabs={ availableTabs } />\n\t\t\t\t) : (\n\t\t\t\t\t<StyleInspectorSlots\n\t\t\t\t\t\tblockName={ renderedBlockName }\n\t\t\t\t\t\tshowAdvancedControls={ false }\n\t\t\t\t\t\tshowPositionControls={ false }\n\t\t\t\t\t\tshowBindingsControls={ false }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif ( hasSelectedBlocks && isSectionBlockInSelection ) {\n\t\treturn (\n\t\t\t<div className=\"block-editor-block-inspector\">\n\t\t\t\t<MultiSelectionInspector />\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst isRenderedBlockUnregistered =\n\t\trenderedBlockName === getUnregisteredTypeHandlerName();\n\n\t/*\n\t * If the rendered block is of an unregistered type, avoid showing it as an actual selection\n\t * because we want the user to focus on the unregistered block warning, not block settings.\n\t */\n\tconst shouldShowWarning =\n\t\t! blockType || ! renderedBlockClientId || isRenderedBlockUnregistered;\n\n\tif ( shouldShowWarning ) {\n\t\treturn (\n\t\t\t<span className=\"block-editor-block-inspector__no-blocks\">\n\t\t\t\t{ __( 'No block selected.' ) }\n\t\t\t</span>\n\t\t);\n\t}\n\n\treturn (\n\t\t<BlockInspectorSingleBlockWrapper\n\t\t\tanimate={ blockInspectorAnimationSettings }\n\t\t\twrapper={ ( children ) => (\n\t\t\t\t<AnimatedContainer\n\t\t\t\t\tblockInspectorAnimationSettings={\n\t\t\t\t\t\tblockInspectorAnimationSettings\n\t\t\t\t\t}\n\t\t\t\t\trenderedBlockClientId={ renderedBlockClientId }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</AnimatedContainer>\n\t\t\t) }\n\t\t>\n\t\t\t<BlockInspectorSingleBlock\n\t\t\t\trenderedBlockClientId={ renderedBlockClientId }\n\t\t\t\tblockName={ blockType.name }\n\t\t\t\tisSectionBlock={ isSectionBlock }\n\t\t\t\tavailableTabs={ availableTabs }\n\t\t\t\tcontentClientIds={ contentClientIds }\n\t\t\t\thasBlockStyles={ hasBlockStyles }\n\t\t\t\teditedContentOnlySection={ editedContentOnlySection }\n\t\t\t\tblockEditingMode={ blockEditingMode }\n\t\t\t\tselectedBlockStyleState={ selectedBlockStyleState }\n\t\t\t\tshowStateOnCanvas={ showStateOnCanvas }\n\t\t\t\tonViewportStateChange={ onViewportStateChange }\n\t\t\t\tisBlockStyleStateSelected={ isBlockStyleStateSelected }\n\t\t\t/>\n\t\t</BlockInspectorSingleBlockWrapper>\n\t);\n}\n\nconst BlockInspectorSingleBlockWrapper = ( { animate, wrapper, children } ) => {\n\treturn animate ? wrapper( children ) : children;\n};\n\nconst AnimatedContainer = ( {\n\tblockInspectorAnimationSettings,\n\trenderedBlockClientId,\n\tchildren,\n} ) => {\n\tconst animationOrigin =\n\t\tblockInspectorAnimationSettings &&\n\t\tblockInspectorAnimationSettings.enterDirection === 'leftToRight'\n\t\t\t? -50\n\t\t\t: 50;\n\n\treturn (\n\t\t<motion.div\n\t\t\tanimate={ {\n\t\t\t\tx: 0,\n\t\t\t\topacity: 1,\n\t\t\t\ttransition: {\n\t\t\t\t\tease: 'easeInOut',\n\t\t\t\t\tduration: 0.14,\n\t\t\t\t},\n\t\t\t} }\n\t\t\tinitial={ {\n\t\t\t\tx: animationOrigin,\n\t\t\t\topacity: 0,\n\t\t\t} }\n\t\t\tkey={ renderedBlockClientId }\n\t\t>\n\t\t\t{ children }\n\t\t</motion.div>\n\t);\n};\n\nconst BlockInspectorSingleBlock = ( {\n\t// The block that is displayed in the inspector. This is the block whose\n\t// controls and information are shown to the user.\n\trenderedBlockClientId,\n\tblockName,\n\tisSectionBlock,\n\tavailableTabs,\n\tcontentClientIds,\n\thasBlockStyles,\n\teditedContentOnlySection,\n\tblockEditingMode,\n\tselectedBlockStyleState,\n\tshowStateOnCanvas,\n\tonViewportStateChange,\n\tisBlockStyleStateSelected,\n} ) => {\n\tconst listViewRef = useRef( null );\n\tconst hasMultipleTabs = availableTabs?.length > 1;\n\tconst hasParentChildBlockCards =\n\t\teditedContentOnlySection &&\n\t\teditedContentOnlySection !== renderedBlockClientId;\n\tconst parentBlockInformation = useBlockDisplayInformation(\n\t\teditedContentOnlySection\n\t);\n\tconst blockInformation = useBlockDisplayInformation(\n\t\trenderedBlockClientId\n\t);\n\tconst isBlockSynced = blockInformation.isSynced;\n\tconst {\n\t\tsetSelectedBlockStyleState,\n\t\tsetSelectedBlockStyleStateCanvasPreview,\n\t} = unlock( useDispatch( blockEditorStore ) );\n\tconst onBlockStyleStateChange = ( value ) => {\n\t\tconst nextSelectedBlockStyleState = {\n\t\t\t...selectedBlockStyleState,\n\t\t\t...value,\n\t\t};\n\n\t\tsetSelectedBlockStyleState(\n\t\t\trenderedBlockClientId,\n\t\t\tnextSelectedBlockStyleState\n\t\t);\n\n\t\tif ( value.viewport ) {\n\t\t\tonViewportStateChange?.( {\n\t\t\t\tviewport: nextSelectedBlockStyleState.viewport,\n\t\t\t\tshowStateOnCanvas,\n\t\t\t} );\n\t\t}\n\t};\n\tconst onShowStateOnCanvasChange = ( value ) => {\n\t\tsetSelectedBlockStyleStateCanvasPreview( renderedBlockClientId, value );\n\n\t\tif ( value ) {\n\t\t\tonViewportStateChange?.( {\n\t\t\t\tviewport: selectedBlockStyleState.viewport,\n\t\t\t\tshowStateOnCanvas: value,\n\t\t\t} );\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"block-editor-block-inspector\">\n\t\t\t{ hasParentChildBlockCards && (\n\t\t\t\t<BlockCard\n\t\t\t\t\t{ ...parentBlockInformation }\n\t\t\t\t\tclassName={\n\t\t\t\t\t\tparentBlockInformation?.isSynced && 'is-synced'\n\t\t\t\t\t}\n\t\t\t\t\tparentClientId={ editedContentOnlySection }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<BlockCard\n\t\t\t\t{ ...blockInformation }\n\t\t\t\tallowParentNavigation\n\t\t\t\tclassName={ isBlockSynced && 'is-synced' }\n\t\t\t\tisChild={ hasParentChildBlockCards }\n\t\t\t\tclientId={ renderedBlockClientId }\n\t\t\t\tcontrols={\n\t\t\t\t\tblockEditingMode === 'default' && (\n\t\t\t\t\t\t<BlockStatesControl\n\t\t\t\t\t\t\tname={ blockName }\n\t\t\t\t\t\t\tvalue={ selectedBlockStyleState }\n\t\t\t\t\t\t\tonChange={ onBlockStyleStateChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ blockEditingMode === 'default' && isBlockStyleStateSelected && (\n\t\t\t\t<Spacer paddingX={ 4 } paddingY={ 2 }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Show state on canvas' ) }\n\t\t\t\t\t\tchecked={ showStateOnCanvas }\n\t\t\t\t\t\tonChange={ onShowStateOnCanvasChange }\n\t\t\t\t\t/>\n\t\t\t\t\t<BlockStateBadges\n\t\t\t\t\t\tname={ blockName }\n\t\t\t\t\t\tvalue={ selectedBlockStyleState }\n\t\t\t\t\t/>\n\t\t\t\t</Spacer>\n\t\t\t) }\n\t\t\t<ViewportVisibilityInfo clientId={ renderedBlockClientId } />\n\t\t\t<EditContents clientId={ renderedBlockClientId } />\n\t\t\t{ ! isBlockStyleStateSelected && (\n\t\t\t\t<BlockVariationTransforms\n\t\t\t\t\tblockClientId={ renderedBlockClientId }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<BlockInspectorPreTabsSlot />\n\t\t\t{ isBlockStyleStateSelected && ! isSectionBlock && (\n\t\t\t\t<StyleStateInspectorSlots\n\t\t\t\t\tblockName={ blockName }\n\t\t\t\t\tselectedBlockStyleState={ selectedBlockStyleState }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ ! isBlockStyleStateSelected && hasMultipleTabs && (\n\t\t\t\t<>\n\t\t\t\t\t<InspectorControlsTabs\n\t\t\t\t\t\thasBlockStyles={ hasBlockStyles }\n\t\t\t\t\t\tclientId={ renderedBlockClientId }\n\t\t\t\t\t\tblockName={ blockName }\n\t\t\t\t\t\ttabs={ availableTabs }\n\t\t\t\t\t\tisSectionBlock={ isSectionBlock }\n\t\t\t\t\t\tcontentClientIds={ contentClientIds }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ ! isBlockStyleStateSelected && ! hasMultipleTabs && (\n\t\t\t\t<>\n\t\t\t\t\t{ hasBlockStyles && (\n\t\t\t\t\t\t<BlockStyles clientId={ renderedBlockClientId } />\n\t\t\t\t\t) }\n\t\t\t\t\t<ContentTab contentClientIds={ contentClientIds } />\n\t\t\t\t\t<InspectorControls.Slot group=\"content\" />\n\t\t\t\t\t<InspectorControls.Slot group=\"list\" ref={ listViewRef } />\n\t\t\t\t\t<ListViewContentPopover listViewRef={ listViewRef } />\n\t\t\t\t\t{ ! isSectionBlock && (\n\t\t\t\t\t\t<StyleInspectorSlots blockName={ blockName } />\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ ! isBlockStyleStateSelected && (\n\t\t\t\t<InspectorControlsLastItem.Slot />\n\t\t\t) }\n\t\t\t<SkipToSelectedBlock key=\"back\" />\n\t\t</div>\n\t);\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-inspector/README.md\n */\nexport default BlockInspector;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AACnB,oBAIO;AACP,wBAIO;AACP,kBAAuC;AACvC,qBAAuB;AAKvB,2BAAyB;AACzB,oCAAgC;AAChC,wBAAsB;AACtB,uCAAoC;AACpC,wCAAqC;AACrC,2CA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C,4CAAC,8BAAAC,SAAA,IAAwB,MAAO;AAAA,KACjC;AAEF;AAKA,IAAO,0BAAQ;",
6
6
  "names": ["InspectorControls", "PositionControls", "AdvancedControls", "blockEditorStore", "blocksStore", "useInspectorControlsTabs", "useBlockInspectorAnimationSettings", "MultiSelectionInspector", "InspectorControlsTabs", "motion", "useBlockDisplayInformation", "BlockCard", "Spacer", "ViewportVisibilityInfo", "EditContents", "BlockVariationTransforms", "BlockStyles", "ContentTab", "InspectorControlsLastItem", "SkipToSelectedBlock"]
7
7
  }
@@ -100,7 +100,7 @@ function getBlockMoverDescription(selectedCount, type, firstIndex, isFirst, isLa
100
100
  return (0, import_i18n.sprintf)(
101
101
  // translators: 1: Type of block (i.e. Text, Image etc)
102
102
  (0, import_i18n.__)(
103
- "Block %1$s is at the end of the content and can\u2019t be moved down"
103
+ "Block %1$s is at the end of the content and can’t be moved down"
104
104
  ),
105
105
  type
106
106
  );
@@ -109,7 +109,7 @@ function getBlockMoverDescription(selectedCount, type, firstIndex, isFirst, isLa
109
109
  return (0, import_i18n.sprintf)(
110
110
  // translators: 1: Type of block (i.e. Text, Image etc)
111
111
  (0, import_i18n.__)(
112
- "Block %1$s is at the end of the content and can\u2019t be moved left"
112
+ "Block %1$s is at the end of the content and can’t be moved left"
113
113
  ),
114
114
  type
115
115
  );
@@ -118,7 +118,7 @@ function getBlockMoverDescription(selectedCount, type, firstIndex, isFirst, isLa
118
118
  return (0, import_i18n.sprintf)(
119
119
  // translators: 1: Type of block (i.e. Text, Image etc)
120
120
  (0, import_i18n.__)(
121
- "Block %1$s is at the end of the content and can\u2019t be moved right"
121
+ "Block %1$s is at the end of the content and can’t be moved right"
122
122
  ),
123
123
  type
124
124
  );
@@ -164,7 +164,7 @@ function getBlockMoverDescription(selectedCount, type, firstIndex, isFirst, isLa
164
164
  return (0, import_i18n.sprintf)(
165
165
  // translators: 1: Type of block (i.e. Text, Image etc)
166
166
  (0, import_i18n.__)(
167
- "Block %1$s is at the beginning of the content and can\u2019t be moved up"
167
+ "Block %1$s is at the beginning of the content and can’t be moved up"
168
168
  ),
169
169
  type
170
170
  );
@@ -173,7 +173,7 @@ function getBlockMoverDescription(selectedCount, type, firstIndex, isFirst, isLa
173
173
  return (0, import_i18n.sprintf)(
174
174
  // translators: 1: Type of block (i.e. Text, Image etc)
175
175
  (0, import_i18n.__)(
176
- "Block %1$s is at the beginning of the content and can\u2019t be moved left"
176
+ "Block %1$s is at the beginning of the content and can’t be moved left"
177
177
  ),
178
178
  type
179
179
  );
@@ -182,7 +182,7 @@ function getBlockMoverDescription(selectedCount, type, firstIndex, isFirst, isLa
182
182
  return (0, import_i18n.sprintf)(
183
183
  // translators: 1: Type of block (i.e. Text, Image etc)
184
184
  (0, import_i18n.__)(
185
- "Block %1$s is at the beginning of the content and can\u2019t be moved right"
185
+ "Block %1$s is at the beginning of the content and can’t be moved right"
186
186
  ),
187
187
  type
188
188
  );
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/block-mover/mover-description.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __, sprintf, isRTL } from '@wordpress/i18n';\n\nconst getMovementDirection = ( moveDirection, orientation ) => {\n\tif ( moveDirection === 'up' ) {\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\treturn isRTL() ? 'right' : 'left';\n\t\t}\n\t\treturn 'up';\n\t} else if ( moveDirection === 'down' ) {\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\treturn isRTL() ? 'left' : 'right';\n\t\t}\n\t\treturn 'down';\n\t}\n\treturn null;\n};\n\n/**\n * Return a label for the block movement controls depending on block position.\n *\n * @param {number} selectedCount Number of blocks selected.\n * @param {string} type Block type - in the case of a single block, should\n * define its 'type'. I.e. 'Text', 'Heading', 'Image' etc.\n * @param {number} firstIndex The index (position - 1) of the first block selected.\n * @param {boolean} isFirst This is the first block.\n * @param {boolean} isLast This is the last block.\n * @param {number} dir Direction of movement (> 0 is considered to be going\n * down, < 0 is up).\n * @param {string} orientation The orientation of the block movers, vertical or\n * horizontal.\n *\n * @return {string | undefined} Label for the block movement controls.\n */\nexport function getBlockMoverDescription(\n\tselectedCount,\n\ttype,\n\tfirstIndex,\n\tisFirst,\n\tisLast,\n\tdir,\n\torientation\n) {\n\tconst position = firstIndex + 1;\n\n\tif ( selectedCount > 1 ) {\n\t\treturn getMultiBlockMoverDescription(\n\t\t\tselectedCount,\n\t\t\tfirstIndex,\n\t\t\tisFirst,\n\t\t\tisLast,\n\t\t\tdir,\n\t\t\torientation\n\t\t);\n\t}\n\n\tif ( isFirst && isLast ) {\n\t\treturn sprintf(\n\t\t\t// translators: %s: Type of block (i.e. Text, Image etc)\n\t\t\t__( 'Block %s is the only block, and cannot be moved' ),\n\t\t\ttype\n\t\t);\n\t}\n\n\tif ( dir > 0 && ! isLast ) {\n\t\t// Moving down.\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d down to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition + 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d left to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition + 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d right to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition + 1\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir > 0 && isLast ) {\n\t\t// Moving down, and is the last item.\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the end of the content and can\u2019t be moved down'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the end of the content and can\u2019t be moved left'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the end of the content and can\u2019t be moved right'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && ! isFirst ) {\n\t\t// Moving up.\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__( 'Move %1$s block from position %2$d up to position %3$d' ),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition - 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d left to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition - 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d right to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition - 1\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && isFirst ) {\n\t\t// Moving up, and is the first item.\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the beginning of the content and can\u2019t be moved up'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the beginning of the content and can\u2019t be moved left'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the beginning of the content and can\u2019t be moved right'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\t}\n}\n\n/**\n * Return a label for the block movement controls depending on block position.\n *\n * @param {number} selectedCount Number of blocks selected.\n * @param {number} firstIndex The index (position - 1) of the first block selected.\n * @param {boolean} isFirst This is the first block.\n * @param {boolean} isLast This is the last block.\n * @param {number} dir Direction of movement (> 0 is considered to be going\n * down, < 0 is up).\n * @param {string} orientation The orientation of the block movers, vertical or\n * horizontal.\n *\n * @return {string | undefined} Label for the block movement controls.\n */\nexport function getMultiBlockMoverDescription(\n\tselectedCount,\n\tfirstIndex,\n\tisFirst,\n\tisLast,\n\tdir,\n\torientation\n) {\n\tconst position = firstIndex + 1;\n\n\tif ( isFirst && isLast ) {\n\t\t// All blocks are selected\n\t\treturn __( 'All blocks are selected, and cannot be moved' );\n\t}\n\n\tif ( dir > 0 && ! isLast ) {\n\t\t// moving down\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d down by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d left by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d right by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir > 0 && isLast ) {\n\t\t// moving down, and the selected blocks are the last item\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved down as they are already at the bottom'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved left as they are already are at the leftmost position'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved right as they are already are at the rightmost position'\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && ! isFirst ) {\n\t\t// moving up\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d up by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d left by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d right by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && isFirst ) {\n\t\t// moving up, and the selected blocks are the first item\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved up as they are already at the top'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved left as they are already are at the leftmost position'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved right as they are already are at the rightmost position'\n\t\t\t);\n\t\t}\n\t}\n}\n"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __, sprintf, isRTL } from '@wordpress/i18n';\n\nconst getMovementDirection = ( moveDirection, orientation ) => {\n\tif ( moveDirection === 'up' ) {\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\treturn isRTL() ? 'right' : 'left';\n\t\t}\n\t\treturn 'up';\n\t} else if ( moveDirection === 'down' ) {\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\treturn isRTL() ? 'left' : 'right';\n\t\t}\n\t\treturn 'down';\n\t}\n\treturn null;\n};\n\n/**\n * Return a label for the block movement controls depending on block position.\n *\n * @param {number} selectedCount Number of blocks selected.\n * @param {string} type Block type - in the case of a single block, should\n * define its 'type'. I.e. 'Text', 'Heading', 'Image' etc.\n * @param {number} firstIndex The index (position - 1) of the first block selected.\n * @param {boolean} isFirst This is the first block.\n * @param {boolean} isLast This is the last block.\n * @param {number} dir Direction of movement (> 0 is considered to be going\n * down, < 0 is up).\n * @param {string} orientation The orientation of the block movers, vertical or\n * horizontal.\n *\n * @return {string | undefined} Label for the block movement controls.\n */\nexport function getBlockMoverDescription(\n\tselectedCount,\n\ttype,\n\tfirstIndex,\n\tisFirst,\n\tisLast,\n\tdir,\n\torientation\n) {\n\tconst position = firstIndex + 1;\n\n\tif ( selectedCount > 1 ) {\n\t\treturn getMultiBlockMoverDescription(\n\t\t\tselectedCount,\n\t\t\tfirstIndex,\n\t\t\tisFirst,\n\t\t\tisLast,\n\t\t\tdir,\n\t\t\torientation\n\t\t);\n\t}\n\n\tif ( isFirst && isLast ) {\n\t\treturn sprintf(\n\t\t\t// translators: %s: Type of block (i.e. Text, Image etc)\n\t\t\t__( 'Block %s is the only block, and cannot be moved' ),\n\t\t\ttype\n\t\t);\n\t}\n\n\tif ( dir > 0 && ! isLast ) {\n\t\t// Moving down.\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d down to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition + 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d left to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition + 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d right to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition + 1\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir > 0 && isLast ) {\n\t\t// Moving down, and is the last item.\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the end of the content and can’t be moved down'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the end of the content and can’t be moved left'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the end of the content and can’t be moved right'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && ! isFirst ) {\n\t\t// Moving up.\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__( 'Move %1$s block from position %2$d up to position %3$d' ),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition - 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d left to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition - 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d right to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition - 1\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && isFirst ) {\n\t\t// Moving up, and is the first item.\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the beginning of the content and can’t be moved up'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the beginning of the content and can’t be moved left'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the beginning of the content and can’t be moved right'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\t}\n}\n\n/**\n * Return a label for the block movement controls depending on block position.\n *\n * @param {number} selectedCount Number of blocks selected.\n * @param {number} firstIndex The index (position - 1) of the first block selected.\n * @param {boolean} isFirst This is the first block.\n * @param {boolean} isLast This is the last block.\n * @param {number} dir Direction of movement (> 0 is considered to be going\n * down, < 0 is up).\n * @param {string} orientation The orientation of the block movers, vertical or\n * horizontal.\n *\n * @return {string | undefined} Label for the block movement controls.\n */\nexport function getMultiBlockMoverDescription(\n\tselectedCount,\n\tfirstIndex,\n\tisFirst,\n\tisLast,\n\tdir,\n\torientation\n) {\n\tconst position = firstIndex + 1;\n\n\tif ( isFirst && isLast ) {\n\t\t// All blocks are selected\n\t\treturn __( 'All blocks are selected, and cannot be moved' );\n\t}\n\n\tif ( dir > 0 && ! isLast ) {\n\t\t// moving down\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d down by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d left by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d right by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir > 0 && isLast ) {\n\t\t// moving down, and the selected blocks are the last item\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved down as they are already at the bottom'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved left as they are already are at the leftmost position'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved right as they are already are at the rightmost position'\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && ! isFirst ) {\n\t\t// moving up\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d up by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d left by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d right by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && isFirst ) {\n\t\t// moving up, and the selected blocks are the first item\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved up as they are already at the top'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved left as they are already are at the leftmost position'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved right as they are already are at the rightmost position'\n\t\t\t);\n\t\t}\n\t}\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmC;AAEnC,IAAM,uBAAuB,CAAE,eAAe,gBAAiB;AAC9D,MAAK,kBAAkB,MAAO;AAC7B,QAAK,gBAAgB,cAAe;AACnC,iBAAO,mBAAM,IAAI,UAAU;AAAA,IAC5B;AACA,WAAO;AAAA,EACR,WAAY,kBAAkB,QAAS;AACtC,QAAK,gBAAgB,cAAe;AACnC,iBAAO,mBAAM,IAAI,SAAS;AAAA,IAC3B;AACA,WAAO;AAAA,EACR;AACA,SAAO;AACR;AAkBO,SAAS,yBACf,eACA,MACA,YACA,SACA,QACA,KACA,aACC;AACD,QAAM,WAAW,aAAa;AAE9B,MAAK,gBAAgB,GAAI;AACxB,WAAO;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,EACD;AAEA,MAAK,WAAW,QAAS;AACxB,eAAO;AAAA;AAAA,UAEN,gBAAI,iDAAkD;AAAA,MACtD;AAAA,IACD;AAAA,EACD;AAEA,MAAK,MAAM,KAAK,CAAE,QAAS;AAE1B,UAAM,oBAAoB,qBAAsB,QAAQ,WAAY;AAEpE,QAAK,sBAAsB,QAAS;AACnC,iBAAO;AAAA;AAAA,YAEN;AAAA,UACC;AAAA,QACD;AAAA,QACA;AAAA,QACA;AAAA,QACA,WAAW;AAAA,MACZ;AAAA,IACD;AAEA,QAAK,sBAA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BAAO;AAAA,QACN;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAEA,MAAK,MAAM,KAAK,CAAE,SAAU;AAE3B,UAAM,oBAAoB,qBAAsB,MAAM,WAAY;AAElE,QAAK,sBAAsB,MAAO;AACjC,iBAAO;AAAA;AAAA,YAEN,gBAAI,qDAAsD;AAAA,QAC1D;AAAA,QACA;AAAA,MACD;AAAA,IACD;AAEA,QAAK,sBAAsB,QAAS;AACnC,iBAAO;AAAA;AAAA,YAEN,gBAAI,uDAAwD;AAAA,QAC5D;AAAA,QACA;AAAA,MACD;AAAA,IACD;AAEA,QAAK,sBAAsB,SAAU;AACpC,iBAAO;AAAA;AAAA,YAEN,gBAAI,wDAAyD;AAAA,QAC7D;AAAA,QACA;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAEA,MAAK,MAAM,KAAK,SAAU;AAEzB,UAAM,oBAAoB,qBAAsB,MAAM,WAAY;AAElE,QAAK,sBAAsB,MAAO;AACjC,iBAAO;AAAA,QACN;AAAA,MACD;AAAA,IACD;AAEA,QAAK,sBAAsB,QAAS;AACnC,iBAAO;AAAA,QACN;AAAA,MACD;AAAA,IACD;AAEA,QAAK,sBAAsB,SAAU;AACpC,iBAAO;AAAA,QACN;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD;",
6
6
  "names": []
7
7
  }
@@ -202,8 +202,8 @@ function BlockPatternsList({
202
202
  onHover,
203
203
  onClickPattern,
204
204
  orientation,
205
- label = (0, import_i18n.__)("Block patterns"),
206
205
  category,
206
+ label = (0, import_i18n.__)("Patterns"),
207
207
  showTitlesAsTooltip,
208
208
  pagingProps
209
209
  }, ref) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/block-patterns-list/index.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { cloneBlock } from '@wordpress/blocks';\nimport { useEffect, useState, forwardRef, useMemo } from '@wordpress/element';\nimport {\n\tComposite,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\n// eslint-disable-next-line @wordpress/use-recommended-components -- `Tooltip` is not yet on the recommended `@wordpress/ui` allow-list; landing as a migration step ahead of the wider rollout.\nimport { VisuallyHidden, Text, Tooltip } from '@wordpress/ui';\nimport { useInstanceId } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { Icon, symbol } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BlockPreview from '../block-preview';\nimport InserterDraggableBlocks from '../inserter-draggable-blocks';\nimport BlockPatternsPaging from '../block-patterns-paging';\nimport { INSERTER_PATTERN_TYPES } from '../inserter/block-patterns-tab/utils';\n\nconst WithToolTip = ( { showTooltip, title, children } ) => {\n\tif ( showTooltip ) {\n\t\treturn (\n\t\t\t<Tooltip.Root>\n\t\t\t\t<Tooltip.Trigger render={ children } />\n\t\t\t\t<Tooltip.Popup>{ title }</Tooltip.Popup>\n\t\t\t</Tooltip.Root>\n\t\t);\n\t}\n\treturn <>{ children }</>;\n};\n\nfunction BlockPattern( {\n\tid,\n\tisDraggable,\n\tpattern,\n\tonClick,\n\tonHover,\n\tshowTitlesAsTooltip,\n\tcategory,\n\tisSelected,\n} ) {\n\tconst [ isDragging, setIsDragging ] = useState( false );\n\tconst { blocks, viewportWidth } = pattern;\n\tconst instanceId = useInstanceId( BlockPattern );\n\tconst descriptionId = `block-editor-block-patterns-list__item-description-${ instanceId }`;\n\tconst isUserPattern = pattern.type === INSERTER_PATTERN_TYPES.user;\n\n\t// When we have a selected category and the pattern is draggable, we need to update the\n\t// pattern's categories in metadata to only contain the selected category, and pass this to\n\t// InserterDraggableBlocks component. We do that because we use this information for pattern\n\t// shuffling and it makes more sense to show only the ones from the initially selected category during insertion.\n\tconst patternBlocks = useMemo( () => {\n\t\tif ( ! category || ! isDraggable ) {\n\t\t\treturn blocks;\n\t\t}\n\t\treturn ( blocks ?? [] ).map( ( block ) => {\n\t\t\tconst clonedBlock = cloneBlock( block );\n\t\t\tif (\n\t\t\t\tclonedBlock.attributes.metadata?.categories?.includes(\n\t\t\t\t\tcategory\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tclonedBlock.attributes.metadata.categories = [ category ];\n\t\t\t}\n\t\t\treturn clonedBlock;\n\t\t} );\n\t}, [ blocks, isDraggable, category ] );\n\n\treturn (\n\t\t<InserterDraggableBlocks\n\t\t\tisEnabled={ isDraggable }\n\t\t\tblocks={ patternBlocks }\n\t\t\tpattern={ pattern }\n\t\t>\n\t\t\t{ ( { draggable, onDragStart, onDragEnd } ) => (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"block-editor-block-patterns-list__list-item\"\n\t\t\t\t\tdraggable={ draggable }\n\t\t\t\t\tonDragStart={ ( event ) => {\n\t\t\t\t\t\tsetIsDragging( true );\n\t\t\t\t\t\tif ( onDragStart ) {\n\t\t\t\t\t\t\tonHover?.( null );\n\t\t\t\t\t\t\tonDragStart( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tonDragEnd={ ( event ) => {\n\t\t\t\t\t\tsetIsDragging( false );\n\t\t\t\t\t\tif ( onDragEnd ) {\n\t\t\t\t\t\t\tonDragEnd( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<WithToolTip\n\t\t\t\t\t\tshowTooltip={ showTitlesAsTooltip && ! isUserPattern }\n\t\t\t\t\t\ttitle={ pattern.title }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Composite.Item\n\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\t\t\t\taria-label={ pattern.title }\n\t\t\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t\t\tpattern.description\n\t\t\t\t\t\t\t\t\t\t\t? descriptionId\n\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t\t'block-editor-block-patterns-list__item',\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t'block-editor-block-patterns-list__list-item-synced':\n\t\t\t\t\t\t\t\t\t\t\t\tpattern.type ===\n\t\t\t\t\t\t\t\t\t\t\t\t\tINSERTER_PATTERN_TYPES.user &&\n\t\t\t\t\t\t\t\t\t\t\t\t! pattern.syncStatus,\n\t\t\t\t\t\t\t\t\t\t\t'is-selected': isSelected,\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tid={ id }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonClick( pattern, blocks );\n\t\t\t\t\t\t\t\tonHover?.( null );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonMouseEnter={ () => {\n\t\t\t\t\t\t\t\tif ( isDragging ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonHover?.( pattern );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonMouseLeave={ () => onHover?.( null ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BlockPreview.Async\n\t\t\t\t\t\t\t\tplaceholder={ <BlockPatternPlaceholder /> }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BlockPreview\n\t\t\t\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\t\t\t\tviewportWidth={ viewportWidth }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</BlockPreview.Async>\n\t\t\t\t\t\t\t{ ( ! showTitlesAsTooltip || isUserPattern ) && (\n\t\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-patterns__pattern-details\"\n\t\t\t\t\t\t\t\t\tspacing={ 2 }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ isUserPattern && ! pattern.syncStatus && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"block-editor-patterns__pattern-icon-wrapper\">\n\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-patterns__pattern-icon\"\n\t\t\t\t\t\t\t\t\t\t\t\ticon={ symbol }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\t\trender={ <div /> }\n\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-block-patterns-list__item-title\"\n\t\t\t\t\t\t\t\t\t\tvariant=\"body-sm\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ pattern.title }\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t\t{ !! pattern.description && (\n\t\t\t\t\t\t\t\t<VisuallyHidden id={ descriptionId }>\n\t\t\t\t\t\t\t\t\t{ pattern.description }\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Composite.Item>\n\t\t\t\t\t</WithToolTip>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</InserterDraggableBlocks>\n\t);\n}\n\nfunction BlockPatternPlaceholder() {\n\treturn (\n\t\t<div className=\"block-editor-block-patterns-list__item is-placeholder\" />\n\t);\n}\n\nfunction BlockPatternsList(\n\t{\n\t\tisDraggable,\n\t\tblockPatterns,\n\t\tonHover,\n\t\tonClickPattern,\n\t\torientation,\n\t\tlabel = __( 'Block patterns' ),\n\t\tcategory,\n\t\tshowTitlesAsTooltip,\n\t\tpagingProps,\n\t},\n\tref\n) {\n\tconst [ activeCompositeId, setActiveCompositeId ] = useState( undefined );\n\tconst [ activePattern, setActivePattern ] = useState( null ); // State to track active pattern\n\n\tuseEffect( () => {\n\t\t// Reset the active composite item whenever the available patterns change,\n\t\t// to make sure that Composite widget can receive focus correctly when its\n\t\t// composite items change. The first composite item will receive focus.\n\t\tconst firstCompositeItemId = blockPatterns[ 0 ]?.name;\n\t\tsetActiveCompositeId( firstCompositeItemId );\n\t}, [ blockPatterns ] );\n\n\tconst handleClickPattern = ( pattern, blocks ) => {\n\t\tsetActivePattern( pattern.name );\n\t\tonClickPattern( pattern, blocks );\n\t};\n\n\treturn (\n\t\t<Composite\n\t\t\torientation={ orientation }\n\t\t\tactiveId={ activeCompositeId }\n\t\t\tsetActiveId={ setActiveCompositeId }\n\t\t\trole=\"listbox\"\n\t\t\tclassName=\"block-editor-block-patterns-list\"\n\t\t\taria-label={ label }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ blockPatterns.map( ( pattern ) => (\n\t\t\t\t<BlockPattern\n\t\t\t\t\tkey={ pattern.name }\n\t\t\t\t\tid={ pattern.name }\n\t\t\t\t\tpattern={ pattern }\n\t\t\t\t\tonClick={ handleClickPattern }\n\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\tisDraggable={ isDraggable }\n\t\t\t\t\tshowTitlesAsTooltip={ showTitlesAsTooltip }\n\t\t\t\t\tcategory={ category }\n\t\t\t\t\tisSelected={\n\t\t\t\t\t\t!! activePattern && activePattern === pattern.name\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t\t{ pagingProps && <BlockPatternsPaging { ...pagingProps } /> }\n\t\t</Composite>\n\t);\n}\n\nexport default forwardRef( BlockPatternsList );\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,oBAA2B;AAC3B,qBAAyD;AACzD,wBAGO;AAEP,gBAA8C;AAC9C,qBAA8B;AAC9B,kBAAmB;A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A,YACA;AAAA,YACA;AAAA,YACA,YACC,CAAC,CAAE,iBAAiB,kBAAkB,QAAQ;AAAA;AAAA,UATzC,QAAQ;AAAA,QAWf,CACC;AAAA,QACA,eAAe,4CAAC,6BAAAC,SAAA,EAAsB,GAAG,aAAc;AAAA;AAAA;AAAA,EAC1D;AAEF;AAEA,IAAO,kCAAQ,2BAAY,iBAAkB;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { cloneBlock } from '@wordpress/blocks';\nimport { useEffect, useState, forwardRef, useMemo } from '@wordpress/element';\nimport {\n\tComposite,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { VisuallyHidden, Text, Tooltip } from '@wordpress/ui';\nimport { useInstanceId } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { Icon, symbol } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BlockPreview from '../block-preview';\nimport InserterDraggableBlocks from '../inserter-draggable-blocks';\nimport BlockPatternsPaging from '../block-patterns-paging';\nimport { INSERTER_PATTERN_TYPES } from '../inserter/block-patterns-tab/utils';\n\nconst WithToolTip = ( { showTooltip, title, children } ) => {\n\tif ( showTooltip ) {\n\t\treturn (\n\t\t\t<Tooltip.Root>\n\t\t\t\t<Tooltip.Trigger render={ children } />\n\t\t\t\t<Tooltip.Popup>{ title }</Tooltip.Popup>\n\t\t\t</Tooltip.Root>\n\t\t);\n\t}\n\treturn <>{ children }</>;\n};\n\nfunction BlockPattern( {\n\tid,\n\tisDraggable,\n\tpattern,\n\tonClick,\n\tonHover,\n\tshowTitlesAsTooltip,\n\tcategory,\n\tisSelected,\n} ) {\n\tconst [ isDragging, setIsDragging ] = useState( false );\n\tconst { blocks, viewportWidth } = pattern;\n\tconst instanceId = useInstanceId( BlockPattern );\n\tconst descriptionId = `block-editor-block-patterns-list__item-description-${ instanceId }`;\n\tconst isUserPattern = pattern.type === INSERTER_PATTERN_TYPES.user;\n\n\t// When we have a selected category and the pattern is draggable, we need to update the\n\t// pattern's categories in metadata to only contain the selected category, and pass this to\n\t// InserterDraggableBlocks component. We do that because we use this information for pattern\n\t// shuffling and it makes more sense to show only the ones from the initially selected category during insertion.\n\tconst patternBlocks = useMemo( () => {\n\t\tif ( ! category || ! isDraggable ) {\n\t\t\treturn blocks;\n\t\t}\n\t\treturn ( blocks ?? [] ).map( ( block ) => {\n\t\t\tconst clonedBlock = cloneBlock( block );\n\t\t\tif (\n\t\t\t\tclonedBlock.attributes.metadata?.categories?.includes(\n\t\t\t\t\tcategory\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tclonedBlock.attributes.metadata.categories = [ category ];\n\t\t\t}\n\t\t\treturn clonedBlock;\n\t\t} );\n\t}, [ blocks, isDraggable, category ] );\n\n\treturn (\n\t\t<InserterDraggableBlocks\n\t\t\tisEnabled={ isDraggable }\n\t\t\tblocks={ patternBlocks }\n\t\t\tpattern={ pattern }\n\t\t>\n\t\t\t{ ( { draggable, onDragStart, onDragEnd } ) => (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"block-editor-block-patterns-list__list-item\"\n\t\t\t\t\tdraggable={ draggable }\n\t\t\t\t\tonDragStart={ ( event ) => {\n\t\t\t\t\t\tsetIsDragging( true );\n\t\t\t\t\t\tif ( onDragStart ) {\n\t\t\t\t\t\t\tonHover?.( null );\n\t\t\t\t\t\t\tonDragStart( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tonDragEnd={ ( event ) => {\n\t\t\t\t\t\tsetIsDragging( false );\n\t\t\t\t\t\tif ( onDragEnd ) {\n\t\t\t\t\t\t\tonDragEnd( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<WithToolTip\n\t\t\t\t\t\tshowTooltip={ showTitlesAsTooltip && ! isUserPattern }\n\t\t\t\t\t\ttitle={ pattern.title }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Composite.Item\n\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\t\t\t\taria-label={ pattern.title }\n\t\t\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t\t\tpattern.description\n\t\t\t\t\t\t\t\t\t\t\t? descriptionId\n\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t\t'block-editor-block-patterns-list__item',\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t'block-editor-block-patterns-list__list-item-synced':\n\t\t\t\t\t\t\t\t\t\t\t\tpattern.type ===\n\t\t\t\t\t\t\t\t\t\t\t\t\tINSERTER_PATTERN_TYPES.user &&\n\t\t\t\t\t\t\t\t\t\t\t\t! pattern.syncStatus,\n\t\t\t\t\t\t\t\t\t\t\t'is-selected': isSelected,\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tid={ id }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonClick( pattern, blocks );\n\t\t\t\t\t\t\t\tonHover?.( null );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonMouseEnter={ () => {\n\t\t\t\t\t\t\t\tif ( isDragging ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonHover?.( pattern );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonMouseLeave={ () => onHover?.( null ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BlockPreview.Async\n\t\t\t\t\t\t\t\tplaceholder={ <BlockPatternPlaceholder /> }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BlockPreview\n\t\t\t\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\t\t\t\tviewportWidth={ viewportWidth }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</BlockPreview.Async>\n\t\t\t\t\t\t\t{ ( ! showTitlesAsTooltip || isUserPattern ) && (\n\t\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-patterns__pattern-details\"\n\t\t\t\t\t\t\t\t\tspacing={ 2 }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ isUserPattern && ! pattern.syncStatus && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"block-editor-patterns__pattern-icon-wrapper\">\n\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-patterns__pattern-icon\"\n\t\t\t\t\t\t\t\t\t\t\t\ticon={ symbol }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\t\trender={ <div /> }\n\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-block-patterns-list__item-title\"\n\t\t\t\t\t\t\t\t\t\tvariant=\"body-sm\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ pattern.title }\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t\t{ !! pattern.description && (\n\t\t\t\t\t\t\t\t<VisuallyHidden id={ descriptionId }>\n\t\t\t\t\t\t\t\t\t{ pattern.description }\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Composite.Item>\n\t\t\t\t\t</WithToolTip>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</InserterDraggableBlocks>\n\t);\n}\n\nfunction BlockPatternPlaceholder() {\n\treturn (\n\t\t<div className=\"block-editor-block-patterns-list__item is-placeholder\" />\n\t);\n}\n\nfunction BlockPatternsList(\n\t{\n\t\tisDraggable,\n\t\tblockPatterns,\n\t\tonHover,\n\t\tonClickPattern,\n\t\torientation,\n\t\tcategory,\n\t\tlabel = __( 'Patterns' ),\n\t\tshowTitlesAsTooltip,\n\t\tpagingProps,\n\t},\n\tref\n) {\n\tconst [ activeCompositeId, setActiveCompositeId ] = useState( undefined );\n\tconst [ activePattern, setActivePattern ] = useState( null ); // State to track active pattern\n\n\tuseEffect( () => {\n\t\t// Reset the active composite item whenever the available patterns change,\n\t\t// to make sure that Composite widget can receive focus correctly when its\n\t\t// composite items change. The first composite item will receive focus.\n\t\tconst firstCompositeItemId = blockPatterns[ 0 ]?.name;\n\t\tsetActiveCompositeId( firstCompositeItemId );\n\t}, [ blockPatterns ] );\n\n\tconst handleClickPattern = ( pattern, blocks ) => {\n\t\tsetActivePattern( pattern.name );\n\t\tonClickPattern( pattern, blocks );\n\t};\n\n\treturn (\n\t\t<Composite\n\t\t\torientation={ orientation }\n\t\t\tactiveId={ activeCompositeId }\n\t\t\tsetActiveId={ setActiveCompositeId }\n\t\t\trole=\"listbox\"\n\t\t\tclassName=\"block-editor-block-patterns-list\"\n\t\t\taria-label={ label }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ blockPatterns.map( ( pattern ) => (\n\t\t\t\t<BlockPattern\n\t\t\t\t\tkey={ pattern.name }\n\t\t\t\t\tid={ pattern.name }\n\t\t\t\t\tpattern={ pattern }\n\t\t\t\t\tonClick={ handleClickPattern }\n\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\tisDraggable={ isDraggable }\n\t\t\t\t\tshowTitlesAsTooltip={ showTitlesAsTooltip }\n\t\t\t\t\tcategory={ category }\n\t\t\t\t\tisSelected={\n\t\t\t\t\t\t!! activePattern && activePattern === pattern.name\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t\t{ pagingProps && <BlockPatternsPaging { ...pagingProps } /> }\n\t\t</Composite>\n\t);\n}\n\nexport default forwardRef( BlockPatternsList );\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,oBAA2B;AAC3B,qBAAyD;AACzD,wBAGO;AACP,gBAA8C;AAC9C,qBAA8B;AAC9B,kBAAmB;AACnB,mBAA6B;AAK7B,2BAAyB;AACzB,uCAAoC;AACpC,mCAAgC;AAChC,mBAAuC;AAKpC;AAHH,IAAM,cAAc,CAAE,EAAE,aAAa,OAAO,SAAS,MAAO;AAC3D,MAAK,aAAc;AAClB,WACC,6CAAC,kBAAQ,MAAR,EACA;AAAA,kDAAC,kBAAQ,SAAR,EAAgB,QAAS,UAAW;AAAA,MACrC,4CAAC,kBAAQ,OAAR,EAAgB,iBAAO;AAAA,OACzB;AAAA,EAEF;AACA,SAAO,2EAAI,UAAU;AACtB;AAEA,SAAS,aAAc;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,CAAE,YAAY,aAAc,QAAI,yBAAU,KAAM;AACtD,QAAM,EAAE,QAAQ,cAAc,IAAI;AAClC,QAAM,iBAAa,8BAAe,YAAa;AAC/C,QAAM,gBAAgB,sDAAuD,UAAW;AACxF,QAAM,gBAAgB,QAAQ,SAAS,oCAAuB;AAM9D,QAAM,oBAAgB,wBAAS,MAAM;AACpC,QAAK,CAAE,YAAY,CAAE,aAAc;AAClC,aAAO;AAAA,IACR;AACA,YAAS,UAAU,CAAC,GAAI,IAAK,CAAE,UAAW;AACzC,YAAM,kBAAc,0BAAY,KAAM;AACtC,UACC,YAAY,WAAW,UAAU,YAAY;AAAA,QAC5C;AAAA,MACD,GACC;AACD,oBAAY,WAAW,SAAS,aAAa,CAAE,QAAS;AAAA,MACzD;AACA,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EACjC;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,UAAW;AAAA,MACX,aAAc;AAAA,MACd,MAAK;AAAA,MACL,WAAU;AAAA,MACV,cAAa;AAAA,MACb;AAAA,MAEE;AAAA,sBAAc,IAAK,CAAE,YACtB;AAAA,UAAC;AAAA;AAAA,YAEA,IAAK,QAAQ;AAAA,YACb;AAAA,YACA,SAAU;AAAA,YACV;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,YACC,CAAC,CAAE,iBAAiB,kBAAkB,QAAQ;AAAA;AAAA,UATzC,QAAQ;AAAA,QAWf,CACC;AAAA,QACA,eAAe,4CAAC,6BAAAC,SAAA,EAAsB,GAAG,aAAc;AAAA;AAAA;AAAA,EAC1D;AAEF;AAEA,IAAO,kCAAQ,2BAAY,iBAAkB;",
6
6
  "names": ["InserterDraggableBlocks", "clsx", "BlockPreview", "HStack", "BlockPatternsPaging"]
7
7
  }
@@ -63,7 +63,7 @@ function Pagination({
63
63
  size: "compact",
64
64
  accessibleWhenDisabled: true,
65
65
  className: "block-editor-patterns__grid-pagination-button",
66
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\xAB" })
66
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "«" })
67
67
  }
68
68
  ),
69
69
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -76,7 +76,7 @@ function Pagination({
76
76
  size: "compact",
77
77
  accessibleWhenDisabled: true,
78
78
  className: "block-editor-patterns__grid-pagination-button",
79
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\u2039" })
79
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "" })
80
80
  }
81
81
  )
82
82
  ]
@@ -105,7 +105,7 @@ function Pagination({
105
105
  size: "compact",
106
106
  accessibleWhenDisabled: true,
107
107
  className: "block-editor-patterns__grid-pagination-button",
108
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\u203A" })
108
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "" })
109
109
  }
110
110
  ),
111
111
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -118,7 +118,7 @@ function Pagination({
118
118
  size: "compact",
119
119
  accessibleWhenDisabled: true,
120
120
  className: "block-editor-patterns__grid-pagination-button",
121
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\xBB" })
121
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "»" })
122
122
  }
123
123
  )
124
124
  ]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/block-patterns-paging/index.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\t__experimentalText as WCText,\n\tButton,\n} from '@wordpress/components';\nimport { __, _x, _n, sprintf } from '@wordpress/i18n';\n\nexport default function Pagination( {\n\tcurrentPage,\n\tnumPages,\n\tchangePage,\n\ttotalItems,\n} ) {\n\treturn (\n\t\t<VStack className=\"block-editor-patterns__grid-pagination-wrapper\">\n\t\t\t<WCText variant=\"muted\">\n\t\t\t\t{ sprintf(\n\t\t\t\t\t// translators: %s: Total number of patterns.\n\t\t\t\t\t_n( '%s item', '%s items', totalItems ),\n\t\t\t\t\ttotalItems\n\t\t\t\t) }\n\t\t\t</WCText>\n\t\t\t{ numPages > 1 && (\n\t\t\t\t<HStack\n\t\t\t\t\texpanded={ false }\n\t\t\t\t\tspacing={ 3 }\n\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination\"\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-previous\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( 1 ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === 1 }\n\t\t\t\t\t\t\taria-label={ __( 'First page' ) }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-button\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>\u00AB</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( currentPage - 1 ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === 1 }\n\t\t\t\t\t\t\taria-label={ __( 'Previous page' ) }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-button\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>\u2039</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t\t<WCText variant=\"muted\">\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: 1: Current page number. 2: Total number of pages.\n\t\t\t\t\t\t\t_x( '%1$s of %2$s', 'paging' ),\n\t\t\t\t\t\t\tcurrentPage,\n\t\t\t\t\t\t\tnumPages\n\t\t\t\t\t\t) }\n\t\t\t\t\t</WCText>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-next\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( currentPage + 1 ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === numPages }\n\t\t\t\t\t\t\taria-label={ __( 'Next page' ) }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-button\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>\u203A</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( numPages ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === numPages }\n\t\t\t\t\t\t\taria-label={ __( 'Last page' ) }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-button\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>\u00BB</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAKO;AACP,kBAAoC;AAUjC;AARY,SAAR,WAA6B;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,SACC,6CAAC,kBAAAA,sBAAA,EAAO,WAAU,kDACjB;AAAA,gDAAC,kBAAAC,oBAAA,EAAO,SAAQ,SACb;AAAA;AAAA,UAED,gBAAI,WAAW,YAAY,UAAW;AAAA,MACtC;AAAA,IACD,GACD;AAAA,IACE,WAAW,KACZ;AAAA,MAAC,kBAAAC;AAAA,MAAA;AAAA,QACA,UAAW;AAAA,QACX,SAAU;AAAA,QACV,SAAQ;AAAA,QACR,WAAU;AAAA,QAEV;AAAA;AAAA,YAAC,kBAAAA;AAAA,YAAA;AAAA,cACA,UAAW;AAAA,cACX,SAAU;AAAA,cACV,WAAU;AAAA,cAEV;AAAA;AAAA,kB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tB,WAAU;AAAA,oBAEV,sDAAC,UAAK,kBAAC;AAAA;AAAA,gBACR;AAAA;AAAA;AAAA,UACD;AAAA;AAAA;AAAA,IACD;AAAA,KAEF;AAEF;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\t__experimentalText as WCText,\n\tButton,\n} from '@wordpress/components';\nimport { __, _x, _n, sprintf } from '@wordpress/i18n';\n\nexport default function Pagination( {\n\tcurrentPage,\n\tnumPages,\n\tchangePage,\n\ttotalItems,\n} ) {\n\treturn (\n\t\t<VStack className=\"block-editor-patterns__grid-pagination-wrapper\">\n\t\t\t<WCText variant=\"muted\">\n\t\t\t\t{ sprintf(\n\t\t\t\t\t// translators: %s: Total number of patterns.\n\t\t\t\t\t_n( '%s item', '%s items', totalItems ),\n\t\t\t\t\ttotalItems\n\t\t\t\t) }\n\t\t\t</WCText>\n\t\t\t{ numPages > 1 && (\n\t\t\t\t<HStack\n\t\t\t\t\texpanded={ false }\n\t\t\t\t\tspacing={ 3 }\n\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination\"\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-previous\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( 1 ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === 1 }\n\t\t\t\t\t\t\taria-label={ __( 'First page' ) }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-button\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>«</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( currentPage - 1 ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === 1 }\n\t\t\t\t\t\t\taria-label={ __( 'Previous page' ) }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-button\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>‹</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t\t<WCText variant=\"muted\">\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: 1: Current page number. 2: Total number of pages.\n\t\t\t\t\t\t\t_x( '%1$s of %2$s', 'paging' ),\n\t\t\t\t\t\t\tcurrentPage,\n\t\t\t\t\t\t\tnumPages\n\t\t\t\t\t\t) }\n\t\t\t\t\t</WCText>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-next\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( currentPage + 1 ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === numPages }\n\t\t\t\t\t\t\taria-label={ __( 'Next page' ) }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-button\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>›</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => changePage( numPages ) }\n\t\t\t\t\t\t\tdisabled={ currentPage === numPages }\n\t\t\t\t\t\t\taria-label={ __( 'Last page' ) }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\tclassName=\"block-editor-patterns__grid-pagination-button\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span>»</span>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAKO;AACP,kBAAoC;AAUjC;AARY,SAAR,WAA6B;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,SACC,6CAAC,kBAAAA,sBAAA,EAAO,WAAU,kDACjB;AAAA,gDAAC,kBAAAC,oBAAA,EAAO,SAAQ,SACb;AAAA;AAAA,UAED,gBAAI,WAAW,YAAY,UAAW;AAAA,MACtC;AAAA,IACD,GACD;AAAA,IACE,WAAW,KACZ;AAAA,MAAC,kBAAAC;AAAA,MAAA;AAAA,QACA,UAAW;AAAA,QACX,SAAU;AAAA,QACV,SAAQ;AAAA,QACR,WAAU;AAAA,QAEV;AAAA;AAAA,YAAC,kBAAAA;AAAA,YAAA;AAAA,cACA,UAAW;AAAA,cACX,SAAU;AAAA,cACV,WAAU;AAAA,cAEV;AAAA;AAAA,kBAAC;AAAA;AAAA,oBACA,SAAQ;AAAA,oBACR,SAAU,MAAM,WAAY,CAAE;AAAA,oBAC9B,UAAW,gBAAgB;AAAA,oBAC3B,kBAAa,gBAAI,YAAa;AAAA,oBAC9B,MAAK;AAAA,oBACL,wBAAsB;AAAA,oBACtB,WAAU;AAAA,oBAEV,sDAAC,UAAK,eAAC;AAAA;AAAA,gBACR;AAAA,gBACA;AAAA,kBAAC;AAAA;AAAA,oBACA,SAAQ;AAAA,oBACR,SAAU,MAAM,WAAY,cAAc,CAAE;AAA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