@wordpress/block-library 9.15.1 → 9.17.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 (441) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/archives/edit.js +2 -2
  3. package/build/archives/edit.js.map +1 -1
  4. package/build/button/edit.js +2 -1
  5. package/build/button/edit.js.map +1 -1
  6. package/build/categories/edit.js +115 -37
  7. package/build/categories/edit.js.map +1 -1
  8. package/build/columns/edit.js +1 -1
  9. package/build/columns/edit.js.map +1 -1
  10. package/build/columns/edit.native.js +1 -1
  11. package/build/columns/edit.native.js.map +1 -1
  12. package/build/comment-template/edit.js +2 -2
  13. package/build/comment-template/edit.js.map +1 -1
  14. package/build/comments/edit/comments-inspector-controls.js +6 -5
  15. package/build/comments/edit/comments-inspector-controls.js.map +1 -1
  16. package/build/comments-pagination/index.js +5 -0
  17. package/build/comments-pagination/index.js.map +1 -1
  18. package/build/comments-pagination-next/index.js +7 -6
  19. package/build/comments-pagination-next/index.js.map +1 -1
  20. package/build/comments-pagination-previous/index.js +7 -6
  21. package/build/comments-pagination-previous/index.js.map +1 -1
  22. package/build/cover/deprecated.js +1 -1
  23. package/build/cover/deprecated.js.map +1 -1
  24. package/build/cover/edit/inspector-controls.js +2 -9
  25. package/build/cover/edit/inspector-controls.js.map +1 -1
  26. package/build/details/edit.js +27 -18
  27. package/build/details/edit.js.map +1 -1
  28. package/build/details/index.js +12 -0
  29. package/build/details/index.js.map +1 -1
  30. package/build/details/save.js +2 -0
  31. package/build/details/save.js.map +1 -1
  32. package/build/embed/transforms.js +5 -2
  33. package/build/embed/transforms.js.map +1 -1
  34. package/build/embed/util.js +1 -1
  35. package/build/embed/util.js.map +1 -1
  36. package/build/file/edit.js +7 -4
  37. package/build/file/edit.js.map +1 -1
  38. package/build/file/transforms.js +1 -1
  39. package/build/file/transforms.js.map +1 -1
  40. package/build/file/utils/index.js +1 -1
  41. package/build/file/utils/index.js.map +1 -1
  42. package/build/form/variations.js +1 -1
  43. package/build/form/variations.js.map +1 -1
  44. package/build/form-input/edit.js +1 -1
  45. package/build/form-input/edit.js.map +1 -1
  46. package/build/gallery/edit.js +1 -1
  47. package/build/gallery/edit.js.map +1 -1
  48. package/build/gallery/transforms.js +2 -2
  49. package/build/gallery/transforms.js.map +1 -1
  50. package/build/gallery/use-get-new-images.js +1 -1
  51. package/build/gallery/use-get-new-images.js.map +1 -1
  52. package/build/group/edit.js +2 -9
  53. package/build/group/edit.js.map +1 -1
  54. package/build/home-link/edit.js +1 -2
  55. package/build/home-link/edit.js.map +1 -1
  56. package/build/latest-comments/edit.js +73 -26
  57. package/build/latest-comments/edit.js.map +1 -1
  58. package/build/latest-posts/constants.js +2 -1
  59. package/build/latest-posts/constants.js.map +1 -1
  60. package/build/latest-posts/edit.js +91 -38
  61. package/build/latest-posts/edit.js.map +1 -1
  62. package/build/list-item/edit.native.js +2 -2
  63. package/build/list-item/edit.native.js.map +1 -1
  64. package/build/list-item/index.js +1 -1
  65. package/build/media-text/edit.native.js +2 -2
  66. package/build/media-text/edit.native.js.map +1 -1
  67. package/build/media-text/media-container.native.js +4 -4
  68. package/build/media-text/media-container.native.js.map +1 -1
  69. package/build/navigation/edit/index.js +8 -4
  70. package/build/navigation/edit/index.js.map +1 -1
  71. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -4
  72. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  73. package/build/navigation/edit/use-generate-default-navigation-title.js +4 -4
  74. package/build/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
  75. package/build/navigation/index.js +15 -0
  76. package/build/navigation/index.js.map +1 -1
  77. package/build/navigation-link/edit.js +15 -20
  78. package/build/navigation-link/edit.js.map +1 -1
  79. package/build/navigation-link/link-ui.js +9 -18
  80. package/build/navigation-link/link-ui.js.map +1 -1
  81. package/build/navigation-submenu/edit.js +1 -1
  82. package/build/navigation-submenu/edit.js.map +1 -1
  83. package/build/navigation-submenu/index.js +7 -0
  84. package/build/navigation-submenu/index.js.map +1 -1
  85. package/build/page-list/edit.js +1 -1
  86. package/build/page-list/edit.js.map +1 -1
  87. package/build/page-list/index.js +11 -0
  88. package/build/page-list/index.js.map +1 -1
  89. package/build/paragraph/edit.js +4 -14
  90. package/build/paragraph/edit.js.map +1 -1
  91. package/build/pattern/index.js +1 -1
  92. package/build/post-author-name/edit.js +41 -12
  93. package/build/post-author-name/edit.js.map +1 -1
  94. package/build/post-comments-link/index.js +7 -1
  95. package/build/post-comments-link/index.js.map +1 -1
  96. package/build/post-content/index.js +1 -0
  97. package/build/post-content/index.js.map +1 -1
  98. package/build/post-date/edit.js +1 -1
  99. package/build/post-date/edit.js.map +1 -1
  100. package/build/post-featured-image/edit.js +0 -6
  101. package/build/post-featured-image/edit.js.map +1 -1
  102. package/build/post-featured-image/overlay-controls.js +2 -1
  103. package/build/post-featured-image/overlay-controls.js.map +1 -1
  104. package/build/post-navigation-link/variations.js +2 -2
  105. package/build/post-navigation-link/variations.js.map +1 -1
  106. package/build/post-terms/edit.js +1 -0
  107. package/build/post-terms/edit.js.map +1 -1
  108. package/build/post-time-to-read/index.js +1 -1
  109. package/build/query/edit/inspector-controls/author-control.js +1 -1
  110. package/build/query/edit/inspector-controls/author-control.js.map +1 -1
  111. package/build/query/edit/inspector-controls/index.js +110 -61
  112. package/build/query/edit/inspector-controls/index.js.map +1 -1
  113. package/build/query/edit/query-content.js +2 -6
  114. package/build/query/edit/query-content.js.map +1 -1
  115. package/build/query/utils.js +1 -1
  116. package/build/query/utils.js.map +1 -1
  117. package/build/query-no-results/index.js +1 -1
  118. package/build/query-pagination-numbers/edit.js +1 -1
  119. package/build/query-pagination-numbers/edit.js.map +1 -1
  120. package/build/query-title/edit.js +40 -14
  121. package/build/query-title/edit.js.map +1 -1
  122. package/build/query-total/index.js +7 -1
  123. package/build/query-total/index.js.map +1 -1
  124. package/build/quote/transforms.js +1 -1
  125. package/build/quote/transforms.js.map +1 -1
  126. package/build/read-more/edit.js +25 -7
  127. package/build/read-more/edit.js.map +1 -1
  128. package/build/rss/edit.js +1 -0
  129. package/build/rss/edit.js.map +1 -1
  130. package/build/rss/index.js +6 -0
  131. package/build/rss/index.js.map +1 -1
  132. package/build/search/edit.js +67 -48
  133. package/build/search/edit.js.map +1 -1
  134. package/build/separator/edit.js +2 -4
  135. package/build/separator/edit.js.map +1 -1
  136. package/build/site-logo/edit.js +26 -35
  137. package/build/site-logo/edit.js.map +1 -1
  138. package/build/social-links/edit.js +2 -1
  139. package/build/social-links/edit.js.map +1 -1
  140. package/build/spacer/controls.js +13 -9
  141. package/build/spacer/controls.js.map +1 -1
  142. package/build/spacer/edit.js +23 -21
  143. package/build/spacer/edit.js.map +1 -1
  144. package/build/table-of-contents/edit.js +24 -8
  145. package/build/table-of-contents/edit.js.map +1 -1
  146. package/build/template-part/edit/advanced-controls.js +2 -9
  147. package/build/template-part/edit/advanced-controls.js.map +1 -1
  148. package/build/utils/messages.js +22 -0
  149. package/build/utils/messages.js.map +1 -0
  150. package/build/video/edit-common-settings.js +1 -1
  151. package/build/video/edit-common-settings.js.map +1 -1
  152. package/build/video/edit.native.js +3 -3
  153. package/build/video/edit.native.js.map +1 -1
  154. package/build-module/archives/edit.js +2 -2
  155. package/build-module/archives/edit.js.map +1 -1
  156. package/build-module/button/edit.js +3 -2
  157. package/build-module/button/edit.js.map +1 -1
  158. package/build-module/categories/edit.js +116 -38
  159. package/build-module/categories/edit.js.map +1 -1
  160. package/build-module/columns/edit.js +1 -1
  161. package/build-module/columns/edit.js.map +1 -1
  162. package/build-module/columns/edit.native.js +1 -1
  163. package/build-module/columns/edit.native.js.map +1 -1
  164. package/build-module/comment-template/edit.js +2 -2
  165. package/build-module/comment-template/edit.js.map +1 -1
  166. package/build-module/comments/edit/comments-inspector-controls.js +5 -4
  167. package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
  168. package/build-module/comments-pagination/index.js +5 -0
  169. package/build-module/comments-pagination/index.js.map +1 -1
  170. package/build-module/comments-pagination-next/index.js +7 -6
  171. package/build-module/comments-pagination-next/index.js.map +1 -1
  172. package/build-module/comments-pagination-previous/index.js +7 -6
  173. package/build-module/comments-pagination-previous/index.js.map +1 -1
  174. package/build-module/cover/deprecated.js +1 -1
  175. package/build-module/cover/deprecated.js.map +1 -1
  176. package/build-module/cover/edit/inspector-controls.js +1 -8
  177. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  178. package/build-module/details/edit.js +29 -20
  179. package/build-module/details/edit.js.map +1 -1
  180. package/build-module/details/index.js +12 -0
  181. package/build-module/details/index.js.map +1 -1
  182. package/build-module/details/save.js +2 -0
  183. package/build-module/details/save.js.map +1 -1
  184. package/build-module/embed/transforms.js +5 -2
  185. package/build-module/embed/transforms.js.map +1 -1
  186. package/build-module/embed/util.js +1 -1
  187. package/build-module/embed/util.js.map +1 -1
  188. package/build-module/file/edit.js +7 -4
  189. package/build-module/file/edit.js.map +1 -1
  190. package/build-module/file/transforms.js +1 -1
  191. package/build-module/file/transforms.js.map +1 -1
  192. package/build-module/file/utils/index.js +1 -1
  193. package/build-module/file/utils/index.js.map +1 -1
  194. package/build-module/form/variations.js +1 -1
  195. package/build-module/form/variations.js.map +1 -1
  196. package/build-module/form-input/edit.js +1 -1
  197. package/build-module/form-input/edit.js.map +1 -1
  198. package/build-module/gallery/edit.js +1 -1
  199. package/build-module/gallery/edit.js.map +1 -1
  200. package/build-module/gallery/transforms.js +2 -2
  201. package/build-module/gallery/transforms.js.map +1 -1
  202. package/build-module/gallery/use-get-new-images.js +1 -1
  203. package/build-module/gallery/use-get-new-images.js.map +1 -1
  204. package/build-module/group/edit.js +1 -8
  205. package/build-module/group/edit.js.map +1 -1
  206. package/build-module/home-link/edit.js +1 -2
  207. package/build-module/home-link/edit.js.map +1 -1
  208. package/build-module/latest-comments/edit.js +74 -27
  209. package/build-module/latest-comments/edit.js.map +1 -1
  210. package/build-module/latest-posts/constants.js +1 -0
  211. package/build-module/latest-posts/constants.js.map +1 -1
  212. package/build-module/latest-posts/edit.js +93 -40
  213. package/build-module/latest-posts/edit.js.map +1 -1
  214. package/build-module/list-item/edit.native.js +2 -2
  215. package/build-module/list-item/edit.native.js.map +1 -1
  216. package/build-module/list-item/index.js +1 -1
  217. package/build-module/media-text/edit.native.js +2 -2
  218. package/build-module/media-text/edit.native.js.map +1 -1
  219. package/build-module/media-text/media-container.native.js +4 -4
  220. package/build-module/media-text/media-container.native.js.map +1 -1
  221. package/build-module/navigation/edit/index.js +8 -4
  222. package/build-module/navigation/edit/index.js.map +1 -1
  223. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -4
  224. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  225. package/build-module/navigation/edit/use-generate-default-navigation-title.js +4 -4
  226. package/build-module/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
  227. package/build-module/navigation/index.js +15 -0
  228. package/build-module/navigation/index.js.map +1 -1
  229. package/build-module/navigation-link/edit.js +16 -21
  230. package/build-module/navigation-link/edit.js.map +1 -1
  231. package/build-module/navigation-link/link-ui.js +9 -18
  232. package/build-module/navigation-link/link-ui.js.map +1 -1
  233. package/build-module/navigation-submenu/edit.js +1 -1
  234. package/build-module/navigation-submenu/edit.js.map +1 -1
  235. package/build-module/navigation-submenu/index.js +7 -0
  236. package/build-module/navigation-submenu/index.js.map +1 -1
  237. package/build-module/page-list/edit.js +1 -1
  238. package/build-module/page-list/edit.js.map +1 -1
  239. package/build-module/page-list/index.js +11 -0
  240. package/build-module/page-list/index.js.map +1 -1
  241. package/build-module/paragraph/edit.js +5 -15
  242. package/build-module/paragraph/edit.js.map +1 -1
  243. package/build-module/pattern/index.js +1 -1
  244. package/build-module/post-author-name/edit.js +42 -13
  245. package/build-module/post-author-name/edit.js.map +1 -1
  246. package/build-module/post-comments-link/index.js +7 -1
  247. package/build-module/post-comments-link/index.js.map +1 -1
  248. package/build-module/post-content/index.js +1 -0
  249. package/build-module/post-content/index.js.map +1 -1
  250. package/build-module/post-date/edit.js +1 -1
  251. package/build-module/post-date/edit.js.map +1 -1
  252. package/build-module/post-featured-image/edit.js +0 -6
  253. package/build-module/post-featured-image/edit.js.map +1 -1
  254. package/build-module/post-featured-image/overlay-controls.js +2 -1
  255. package/build-module/post-featured-image/overlay-controls.js.map +1 -1
  256. package/build-module/post-navigation-link/variations.js +2 -2
  257. package/build-module/post-navigation-link/variations.js.map +1 -1
  258. package/build-module/post-terms/edit.js +1 -0
  259. package/build-module/post-terms/edit.js.map +1 -1
  260. package/build-module/post-time-to-read/index.js +1 -1
  261. package/build-module/query/edit/inspector-controls/author-control.js +1 -1
  262. package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
  263. package/build-module/query/edit/inspector-controls/index.js +111 -62
  264. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  265. package/build-module/query/edit/query-content.js +1 -5
  266. package/build-module/query/edit/query-content.js.map +1 -1
  267. package/build-module/query/utils.js +1 -1
  268. package/build-module/query/utils.js.map +1 -1
  269. package/build-module/query-no-results/index.js +1 -1
  270. package/build-module/query-pagination-numbers/edit.js +1 -1
  271. package/build-module/query-pagination-numbers/edit.js.map +1 -1
  272. package/build-module/query-title/edit.js +41 -15
  273. package/build-module/query-title/edit.js.map +1 -1
  274. package/build-module/query-total/index.js +7 -1
  275. package/build-module/query-total/index.js.map +1 -1
  276. package/build-module/quote/transforms.js +1 -1
  277. package/build-module/quote/transforms.js.map +1 -1
  278. package/build-module/read-more/edit.js +26 -8
  279. package/build-module/read-more/edit.js.map +1 -1
  280. package/build-module/rss/edit.js +1 -0
  281. package/build-module/rss/edit.js.map +1 -1
  282. package/build-module/rss/index.js +6 -0
  283. package/build-module/rss/index.js.map +1 -1
  284. package/build-module/search/edit.js +69 -50
  285. package/build-module/search/edit.js.map +1 -1
  286. package/build-module/separator/edit.js +1 -3
  287. package/build-module/separator/edit.js.map +1 -1
  288. package/build-module/site-logo/edit.js +27 -36
  289. package/build-module/site-logo/edit.js.map +1 -1
  290. package/build-module/social-links/edit.js +2 -1
  291. package/build-module/social-links/edit.js.map +1 -1
  292. package/build-module/spacer/controls.js +13 -9
  293. package/build-module/spacer/controls.js.map +1 -1
  294. package/build-module/spacer/edit.js +24 -22
  295. package/build-module/spacer/edit.js.map +1 -1
  296. package/build-module/table-of-contents/edit.js +25 -9
  297. package/build-module/table-of-contents/edit.js.map +1 -1
  298. package/build-module/template-part/edit/advanced-controls.js +1 -8
  299. package/build-module/template-part/edit/advanced-controls.js.map +1 -1
  300. package/build-module/utils/messages.js +15 -0
  301. package/build-module/utils/messages.js.map +1 -0
  302. package/build-module/video/edit-common-settings.js +1 -1
  303. package/build-module/video/edit-common-settings.js.map +1 -1
  304. package/build-module/video/edit.native.js +3 -3
  305. package/build-module/video/edit.native.js.map +1 -1
  306. package/build-style/editor-rtl.css +12 -86
  307. package/build-style/editor.css +12 -86
  308. package/build-style/freeform/editor-rtl.css +2 -4
  309. package/build-style/freeform/editor.css +2 -4
  310. package/build-style/gallery/editor-rtl.css +0 -46
  311. package/build-style/gallery/editor.css +0 -46
  312. package/build-style/image/style-rtl.css +24 -10
  313. package/build-style/image/style.css +24 -10
  314. package/build-style/navigation/style-rtl.css +8 -6
  315. package/build-style/navigation/style.css +8 -6
  316. package/build-style/navigation-link/editor-rtl.css +3 -0
  317. package/build-style/navigation-link/editor.css +3 -0
  318. package/build-style/paragraph/editor-rtl.css +4 -0
  319. package/build-style/paragraph/editor.css +4 -0
  320. package/build-style/post-featured-image/editor-rtl.css +1 -1
  321. package/build-style/post-featured-image/editor.css +1 -1
  322. package/build-style/query/editor-rtl.css +0 -27
  323. package/build-style/query/editor.css +0 -27
  324. package/build-style/site-logo/editor-rtl.css +2 -8
  325. package/build-style/site-logo/editor.css +2 -8
  326. package/build-style/social-links/style-rtl.css +2 -5
  327. package/build-style/social-links/style.css +2 -5
  328. package/build-style/style-rtl.css +34 -21
  329. package/build-style/style.css +34 -21
  330. package/package.json +35 -35
  331. package/src/archives/edit.js +2 -2
  332. package/src/audio/test/transforms.native.js +4 -3
  333. package/src/button/edit.js +6 -2
  334. package/src/categories/edit.js +133 -45
  335. package/src/columns/edit.js +1 -1
  336. package/src/columns/edit.native.js +1 -1
  337. package/src/comment-template/edit.js +2 -2
  338. package/src/comments/edit/comments-inspector-controls.js +5 -8
  339. package/src/comments-pagination/block.json +5 -0
  340. package/src/comments-pagination-next/block.json +0 -5
  341. package/src/comments-pagination-next/index.js +6 -0
  342. package/src/comments-pagination-previous/block.json +0 -5
  343. package/src/comments-pagination-previous/index.js +6 -0
  344. package/src/cover/deprecated.js +1 -1
  345. package/src/cover/edit/inspector-controls.js +1 -21
  346. package/src/cover/test/__snapshots__/edit.native.js.snap +1 -1
  347. package/src/cover/test/edit.js +7 -7
  348. package/src/cover/test/edit.native.js +2 -2
  349. package/src/cover/test/transforms.native.js +9 -5
  350. package/src/details/block.json +12 -0
  351. package/src/details/edit.js +29 -24
  352. package/src/details/save.js +6 -2
  353. package/src/editor.scss +1 -1
  354. package/src/embed/test/index.js +1 -1
  355. package/src/embed/transforms.js +3 -1
  356. package/src/embed/util.js +1 -1
  357. package/src/file/edit.js +4 -3
  358. package/src/file/test/transforms.native.js +4 -3
  359. package/src/file/transforms.js +1 -1
  360. package/src/file/utils/index.js +1 -1
  361. package/src/form/variations.js +1 -1
  362. package/src/form-input/edit.js +1 -1
  363. package/src/freeform/editor.scss +4 -3
  364. package/src/gallery/edit.js +1 -1
  365. package/src/gallery/editor.scss +0 -54
  366. package/src/gallery/test/transforms.native.js +4 -3
  367. package/src/gallery/transforms.js +2 -2
  368. package/src/gallery/use-get-new-images.js +1 -1
  369. package/src/group/edit.js +1 -20
  370. package/src/home-link/edit.js +0 -6
  371. package/src/image/block.json +8 -1
  372. package/src/image/editor.scss +1 -1
  373. package/src/image/index.php +9 -13
  374. package/src/image/style.scss +17 -7
  375. package/src/image/test/edit.native.js +1 -1
  376. package/src/image/test/transforms.native.js +4 -3
  377. package/src/latest-comments/edit.js +93 -33
  378. package/src/latest-posts/constants.js +1 -0
  379. package/src/latest-posts/edit.js +119 -44
  380. package/src/list/test/edit.native.js +10 -10
  381. package/src/list-item/block.json +1 -1
  382. package/src/list-item/edit.native.js +2 -2
  383. package/src/media-text/edit.native.js +2 -2
  384. package/src/media-text/media-container.native.js +4 -4
  385. package/src/media-text/test/transforms.native.js +9 -5
  386. package/src/navigation/edit/index.js +4 -0
  387. package/src/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -4
  388. package/src/navigation/edit/use-generate-default-navigation-title.js +4 -4
  389. package/src/navigation/index.js +20 -0
  390. package/src/navigation/style.scss +7 -4
  391. package/src/navigation-link/edit.js +26 -30
  392. package/src/navigation-link/editor.scss +27 -18
  393. package/src/navigation-link/link-ui.js +7 -13
  394. package/src/navigation-submenu/edit.js +1 -1
  395. package/src/navigation-submenu/index.js +7 -0
  396. package/src/navigation-submenu/index.php +21 -4
  397. package/src/page-list/block.json +11 -0
  398. package/src/page-list/edit.js +52 -50
  399. package/src/paragraph/edit.js +3 -18
  400. package/src/paragraph/editor.scss +7 -0
  401. package/src/paragraph/style.scss +1 -1
  402. package/src/pattern/block.json +1 -1
  403. package/src/post-author-name/edit.js +53 -15
  404. package/src/post-comments-link/block.json +7 -1
  405. package/src/post-content/block.json +2 -1
  406. package/src/post-date/edit.js +1 -3
  407. package/src/post-featured-image/edit.js +2 -15
  408. package/src/post-featured-image/editor.scss +2 -2
  409. package/src/post-featured-image/overlay-controls.js +1 -0
  410. package/src/post-navigation-link/variations.js +2 -2
  411. package/src/post-terms/edit.js +1 -0
  412. package/src/post-time-to-read/block.json +1 -1
  413. package/src/query/edit/inspector-controls/author-control.js +1 -1
  414. package/src/query/edit/inspector-controls/index.js +148 -88
  415. package/src/query/edit/query-content.js +1 -11
  416. package/src/query/editor.scss +0 -31
  417. package/src/query/utils.js +1 -1
  418. package/src/query-no-results/block.json +1 -1
  419. package/src/query-pagination-numbers/edit.js +1 -1
  420. package/src/query-title/edit.js +61 -19
  421. package/src/query-total/block.json +7 -1
  422. package/src/quote/transforms.js +1 -1
  423. package/src/read-more/edit.js +35 -11
  424. package/src/rss/block.json +6 -0
  425. package/src/rss/edit.js +1 -0
  426. package/src/search/edit.js +100 -71
  427. package/src/separator/deprecated.scss +1 -1
  428. package/src/separator/edit.js +1 -6
  429. package/src/site-logo/edit.js +34 -47
  430. package/src/site-logo/editor.scss +3 -6
  431. package/src/social-link/index.php +2 -2
  432. package/src/social-links/edit.js +1 -0
  433. package/src/social-links/style.scss +3 -3
  434. package/src/spacer/controls.js +10 -9
  435. package/src/spacer/edit.js +25 -23
  436. package/src/table-of-contents/edit.js +38 -19
  437. package/src/template-part/edit/advanced-controls.js +1 -21
  438. package/src/utils/messages.js +31 -0
  439. package/src/video/edit-common-settings.js +1 -1
  440. package/src/video/edit.native.js +3 -3
  441. package/src/video/test/transforms.native.js +4 -3
@@ -23,16 +23,16 @@ const initialHtmlWithVideo = `
23
23
  <!-- /wp:paragraph --></div></div>
24
24
  <!-- /wp:media-text -->`;
25
25
 
26
- const tranformsWithInnerBlocks = [ 'Columns', 'Group' ];
26
+ const transformsWithInnerBlocks = [ 'Columns', 'Group' ];
27
27
  const blockTransformsWithImage = [
28
28
  'Image',
29
29
  'Cover',
30
- ...tranformsWithInnerBlocks,
30
+ ...transformsWithInnerBlocks,
31
31
  ];
32
32
  const blockTransformsWithVideo = [
33
33
  'Video',
34
34
  'Cover',
35
- ...tranformsWithInnerBlocks,
35
+ ...transformsWithInnerBlocks,
36
36
  ];
37
37
 
38
38
  setupCoreBlocks();
@@ -52,7 +52,9 @@ describe( `${ block } block transformations`, () => {
52
52
  {
53
53
  isMediaBlock: true,
54
54
  hasInnerBlocks:
55
- tranformsWithInnerBlocks.includes( blockTransform ),
55
+ transformsWithInnerBlocks.includes(
56
+ blockTransform
57
+ ),
56
58
  }
57
59
  );
58
60
  expect( newBlock ).toBeVisible();
@@ -88,7 +90,9 @@ describe( `${ block } block transformations`, () => {
88
90
  {
89
91
  isMediaBlock: true,
90
92
  hasInnerBlocks:
91
- tranformsWithInnerBlocks.includes( blockTransform ),
93
+ transformsWithInnerBlocks.includes(
94
+ blockTransform
95
+ ),
92
96
  }
93
97
  );
94
98
  expect( newBlock ).toBeVisible();
@@ -142,24 +142,28 @@ function ColorTools( {
142
142
  label: __( 'Text' ),
143
143
  onColorChange: setTextColor,
144
144
  resetAllFilter: () => setTextColor(),
145
+ clearable: true,
145
146
  },
146
147
  {
147
148
  colorValue: backgroundColor.color,
148
149
  label: __( 'Background' ),
149
150
  onColorChange: setBackgroundColor,
150
151
  resetAllFilter: () => setBackgroundColor(),
152
+ clearable: true,
151
153
  },
152
154
  {
153
155
  colorValue: overlayTextColor.color,
154
156
  label: __( 'Submenu & overlay text' ),
155
157
  onColorChange: setOverlayTextColor,
156
158
  resetAllFilter: () => setOverlayTextColor(),
159
+ clearable: true,
157
160
  },
158
161
  {
159
162
  colorValue: overlayBackgroundColor.color,
160
163
  label: __( 'Submenu & overlay background' ),
161
164
  onColorChange: setOverlayBackgroundColor,
162
165
  resetAllFilter: () => setOverlayBackgroundColor(),
166
+ clearable: true,
163
167
  },
164
168
  ] }
165
169
  panelId={ clientId }
@@ -47,7 +47,7 @@ function useConvertClassicToBlockMenu(
47
47
  } catch ( err ) {
48
48
  throw new Error(
49
49
  sprintf(
50
- // translators: %s: the name of a menu (e.g. Header navigation).
50
+ // translators: %s: The name of a menu (e.g. Header menu).
51
51
  __( `Unable to fetch classic menu "%s" from API.` ),
52
52
  menuName
53
53
  ),
@@ -61,7 +61,7 @@ function useConvertClassicToBlockMenu(
61
61
  if ( classicMenuItems === null ) {
62
62
  throw new Error(
63
63
  sprintf(
64
- // translators: %s: the name of a menu (e.g. Header navigation).
64
+ // translators: %s: The name of a menu (e.g. Header menu).
65
65
  __( `Unable to fetch classic menu "%s" from API.` ),
66
66
  menuName
67
67
  )
@@ -98,7 +98,7 @@ function useConvertClassicToBlockMenu(
98
98
  } catch ( err ) {
99
99
  throw new Error(
100
100
  sprintf(
101
- // translators: %s: the name of a menu (e.g. Header navigation).
101
+ // translators: %s: The name of a menu (e.g. Header menu).
102
102
  __( `Unable to create Navigation Menu "%s".` ),
103
103
  menuName
104
104
  ),
@@ -155,7 +155,7 @@ function useConvertClassicToBlockMenu(
155
155
  if ( throwOnError ) {
156
156
  throw new Error(
157
157
  sprintf(
158
- // translators: %s: the name of a menu (e.g. Header navigation).
158
+ // translators: %s: The name of a menu (e.g. Header menu).
159
159
  __( `Unable to create Navigation Menu "%s".` ),
160
160
  menuName
161
161
  ),
@@ -50,12 +50,12 @@ export default function useGenerateDefaultNavigationTitle( clientId ) {
50
50
 
51
51
  const title = area
52
52
  ? sprintf(
53
- // translators: %s: the name of a menu (e.g. Header navigation).
54
- __( '%s navigation' ),
53
+ // translators: %s: the name of a menu (e.g. Header menu).
54
+ __( '%s menu' ),
55
55
  area
56
56
  )
57
- : // translators: 'navigation' as in website navigation.
58
- __( 'Navigation' );
57
+ : // translators: 'menu' as in website navigation menu.
58
+ __( 'Menu' );
59
59
 
60
60
  // Determine how many menus start with the automatic title.
61
61
  const matchingMenuTitleCount = [
@@ -3,6 +3,9 @@
3
3
  */
4
4
  import { __ } from '@wordpress/i18n';
5
5
  import { navigation as icon } from '@wordpress/icons';
6
+ import { select } from '@wordpress/data';
7
+ import { store as coreStore } from '@wordpress/core-data';
8
+ import { decodeEntities } from '@wordpress/html-entities';
6
9
 
7
10
  /**
8
11
  * Internal dependencies
@@ -52,6 +55,23 @@ export const settings = {
52
55
  },
53
56
  edit,
54
57
  save,
58
+ __experimentalLabel: ( { ref } ) => {
59
+ if ( ! ref ) {
60
+ return;
61
+ }
62
+
63
+ const navigation = select( coreStore ).getEditedEntityRecord(
64
+ 'postType',
65
+ 'wp_navigation',
66
+ ref
67
+ );
68
+
69
+ if ( ! navigation?.title ) {
70
+ return;
71
+ }
72
+
73
+ return decodeEntities( navigation.title );
74
+ },
55
75
  deprecated,
56
76
  };
57
77
 
@@ -166,7 +166,9 @@ $navigation-icon-size: 24px;
166
166
 
167
167
  // Hide until hover or focus within.
168
168
  opacity: 0;
169
- transition: opacity 0.1s linear;
169
+ @media not (prefers-reduced-motion) {
170
+ transition: opacity 0.1s linear;
171
+ }
170
172
  visibility: hidden;
171
173
 
172
174
  // Don't take up space when the menu is collapsed.
@@ -502,9 +504,10 @@ button.wp-block-navigation-item__content {
502
504
  background-color: inherit;
503
505
 
504
506
  // Animation.
505
- animation: overlay-menu__fade-in-animation 0.1s ease-out;
506
- animation-fill-mode: forwards;
507
- @include reduce-motion("animation");
507
+ @media not (prefers-reduced-motion) {
508
+ animation: overlay-menu__fade-in-animation 0.1s ease-out;
509
+ animation-fill-mode: forwards;
510
+ }
508
511
 
509
512
  // Try to inherit any root paddings set, so the X can align to a top-right aligned menu.
510
513
  padding-top: clamp(1rem, var(--wp--style--root--padding-top), 20rem);
@@ -14,7 +14,6 @@ import {
14
14
  TextControl,
15
15
  TextareaControl,
16
16
  ToolbarButton,
17
- Tooltip,
18
17
  ToolbarGroup,
19
18
  } from '@wordpress/components';
20
19
  import { displayShortcut, isKeyboardEvent } from '@wordpress/keycodes';
@@ -157,7 +156,7 @@ function getMissingText( type ) {
157
156
  /*
158
157
  * Warning, this duplicated in
159
158
  * packages/block-library/src/navigation-submenu/edit.js
160
- * Consider reuseing this components for both blocks.
159
+ * Consider reusing this components for both blocks.
161
160
  */
162
161
  function Controls( { attributes, setAttributes, setIsLabelFieldFocused } ) {
163
162
  const { label, url, description, title, rel } = attributes;
@@ -490,10 +489,6 @@ export default function NavigationLinkEdit( {
490
489
  const placeholderText = `(${
491
490
  isInvalid ? __( 'Invalid' ) : __( 'Draft' )
492
491
  })`;
493
- const tooltipText =
494
- isInvalid || isDraft
495
- ? __( 'This item has been deleted, or is a draft' )
496
- : __( 'This item is missing a link' );
497
492
 
498
493
  return (
499
494
  <>
@@ -533,9 +528,7 @@ export default function NavigationLinkEdit( {
533
528
  { /* eslint-enable */ }
534
529
  { ! url ? (
535
530
  <div className="wp-block-navigation-link__placeholder-text">
536
- <Tooltip text={ tooltipText }>
537
- <span>{ missingText }</span>
538
- </Tooltip>
531
+ <span>{ missingText }</span>
539
532
  </div>
540
533
  ) : (
541
534
  <>
@@ -578,27 +571,30 @@ export default function NavigationLinkEdit( {
578
571
  { ( isInvalid ||
579
572
  isDraft ||
580
573
  isLabelFieldFocused ) && (
581
- <div className="wp-block-navigation-link__placeholder-text wp-block-navigation-link__label">
582
- <Tooltip text={ tooltipText }>
583
- <span
584
- aria-label={ __(
585
- 'Navigation link text'
586
- ) }
587
- >
588
- {
589
- // Some attributes are stored in an escaped form. It's a legacy issue.
590
- // Ideally they would be stored in a raw, unescaped form.
591
- // Unescape is used here to "recover" the escaped characters
592
- // so they display without encoding.
593
- // See `updateAttributes` for more details.
594
- `${ decodeEntities( label ) } ${
595
- isInvalid || isDraft
596
- ? placeholderText
597
- : ''
598
- }`.trim()
599
- }
600
- </span>
601
- </Tooltip>
574
+ <div
575
+ className={ clsx(
576
+ 'wp-block-navigation-link__placeholder-text',
577
+ 'wp-block-navigation-link__label',
578
+ {
579
+ 'is-invalid': isInvalid,
580
+ 'is-draft': isDraft,
581
+ }
582
+ ) }
583
+ >
584
+ <span>
585
+ {
586
+ // Some attributes are stored in an escaped form. It's a legacy issue.
587
+ // Ideally they would be stored in a raw, unescaped form.
588
+ // Unescape is used here to "recover" the escaped characters
589
+ // so they display without encoding.
590
+ // See `updateAttributes` for more details.
591
+ `${ decodeEntities( label ) } ${
592
+ isInvalid || isDraft
593
+ ? placeholderText
594
+ : ''
595
+ }`.trim()
596
+ }
597
+ </span>
602
598
  </div>
603
599
  ) }
604
600
  </>
@@ -80,24 +80,33 @@
80
80
  background-image: none !important;
81
81
 
82
82
  // Draw a wavy underline.
83
- .wp-block-navigation-link__placeholder-text span {
84
- $blur: 10%;
85
- $width: 6%;
86
- $stop1: 30%;
87
- $stop2: 64%;
88
-
89
- --wp-underline-color: var(--wp-admin-theme-color);
90
-
91
- background-image:
92
- linear-gradient(45deg, transparent ($stop1 - $blur), var(--wp-underline-color) $stop1, var(--wp-underline-color) ($stop1 + $width), transparent ($stop1 + $width + $blur)),
93
- linear-gradient(135deg, transparent ($stop2 - $blur), var(--wp-underline-color) $stop2, var(--wp-underline-color) ($stop2 + $width), transparent ($stop2 + $width + $blur));
94
- background-position: 0 100%;
95
- background-size: 6px 3px;
96
- background-repeat: repeat-x;
97
-
98
- // Since applied to a span, it doesn't change the footprint of the item,
99
- // but it does vertically shift the underline to better align.
100
- padding-bottom: 0.1em;
83
+ .wp-block-navigation-link__placeholder-text {
84
+ span {
85
+ $blur: 10%;
86
+ $width: 6%;
87
+ $stop1: 30%;
88
+ $stop2: 64%;
89
+
90
+ --wp-underline-color: var(--wp-admin-theme-color);
91
+
92
+ background-image:
93
+ linear-gradient(45deg, transparent ($stop1 - $blur), var(--wp-underline-color) $stop1, var(--wp-underline-color) ($stop1 + $width), transparent ($stop1 + $width + $blur)),
94
+ linear-gradient(135deg, transparent ($stop2 - $blur), var(--wp-underline-color) $stop2, var(--wp-underline-color) ($stop2 + $width), transparent ($stop2 + $width + $blur));
95
+ background-position: 0 100%;
96
+ background-size: 6px 3px;
97
+ background-repeat: repeat-x;
98
+
99
+ // Since applied to a span, it doesn't change the footprint of the item,
100
+ // but it does vertically shift the underline to better align.
101
+ padding-bottom: 0.1em;
102
+ }
103
+
104
+ &.is-invalid,
105
+ &.is-draft {
106
+ span {
107
+ --wp-underline-color: var(--wp--preset--color--vivid-red);
108
+ }
109
+ }
101
110
  }
102
111
 
103
112
  // This needs extra specificity.
@@ -78,7 +78,7 @@ export function getSuggestionsQuery( type, kind ) {
78
78
  }
79
79
  }
80
80
 
81
- function LinkUIBlockInserter( { clientId, onBack, onSelectBlock } ) {
81
+ function LinkUIBlockInserter( { clientId, onBack } ) {
82
82
  const { rootBlockClientId } = useSelect(
83
83
  ( select ) => {
84
84
  const { getBlockRootClientId } = select( blockEditorStore );
@@ -96,7 +96,7 @@ function LinkUIBlockInserter( { clientId, onBack, onSelectBlock } ) {
96
96
  LinkControl,
97
97
  `link-ui-block-inserter__title`
98
98
  );
99
- const dialogDescritionId = useInstanceId(
99
+ const dialogDescriptionId = useInstanceId(
100
100
  LinkControl,
101
101
  `link-ui-block-inserter__description`
102
102
  );
@@ -110,13 +110,13 @@ function LinkUIBlockInserter( { clientId, onBack, onSelectBlock } ) {
110
110
  className="link-ui-block-inserter"
111
111
  role="dialog"
112
112
  aria-labelledby={ dialogTitleId }
113
- aria-describedby={ dialogDescritionId }
113
+ aria-describedby={ dialogDescriptionId }
114
114
  ref={ focusOnMountRef }
115
115
  >
116
116
  <VisuallyHidden>
117
117
  <h2 id={ dialogTitleId }>{ __( 'Add block' ) }</h2>
118
118
 
119
- <p id={ dialogDescritionId }>
119
+ <p id={ dialogDescriptionId }>
120
120
  { __( 'Choose a block to add to your Navigation.' ) }
121
121
  </p>
122
122
  </VisuallyHidden>
@@ -140,7 +140,6 @@ function LinkUIBlockInserter( { clientId, onBack, onSelectBlock } ) {
140
140
  prioritizePatterns={ false }
141
141
  selectBlockOnInsert
142
142
  hasSearch={ false }
143
- onSelect={ onSelectBlock }
144
143
  />
145
144
  </div>
146
145
  );
@@ -198,15 +197,11 @@ function UnforwardedLinkUI( props, ref ) {
198
197
  LinkUI,
199
198
  `link-ui-link-control__title`
200
199
  );
201
- const dialogDescritionId = useInstanceId(
200
+ const dialogDescriptionId = useInstanceId(
202
201
  LinkUI,
203
202
  `link-ui-link-control__description`
204
203
  );
205
204
 
206
- // Selecting a block should close the popover and also remove the (previously) automatically inserted
207
- // link block so that the newly selected block can be inserted in its place.
208
- const { onClose: onSelectBlock } = props;
209
-
210
205
  return (
211
206
  <Popover
212
207
  ref={ ref }
@@ -219,12 +214,12 @@ function UnforwardedLinkUI( props, ref ) {
219
214
  <div
220
215
  role="dialog"
221
216
  aria-labelledby={ dialogTitleId }
222
- aria-describedby={ dialogDescritionId }
217
+ aria-describedby={ dialogDescriptionId }
223
218
  >
224
219
  <VisuallyHidden>
225
220
  <h2 id={ dialogTitleId }>{ __( 'Add link' ) }</h2>
226
221
 
227
- <p id={ dialogDescritionId }>
222
+ <p id={ dialogDescriptionId }>
228
223
  { __(
229
224
  'Search for and add a link to your Navigation.'
230
225
  ) }
@@ -287,7 +282,6 @@ function UnforwardedLinkUI( props, ref ) {
287
282
  setAddingBlock( false );
288
283
  setFocusAddBlockButton( true );
289
284
  } }
290
- onSelectBlock={ onSelectBlock }
291
285
  />
292
286
  ) }
293
287
  </Popover>
@@ -276,7 +276,7 @@ export default function NavigationSubmenuEdit( {
276
276
  // as it shares the CMD+K shortcut.
277
277
  // See https://github.com/WordPress/gutenberg/pull/59845.
278
278
  event.preventDefault();
279
- // If we don't stop propogation, this event bubbles up to the parent submenu item
279
+ // If we don't stop propagation, this event bubbles up to the parent submenu item
280
280
  event.stopPropagation();
281
281
  setIsLinkOpen( true );
282
282
  setOpenedBy( ref.current );
@@ -2,6 +2,7 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { page, addSubmenu } from '@wordpress/icons';
5
+ import { _x } from '@wordpress/i18n';
5
6
 
6
7
  /**
7
8
  * Internal dependencies
@@ -37,6 +38,12 @@ export const settings = {
37
38
  return label;
38
39
  },
39
40
  edit,
41
+ example: {
42
+ attributes: {
43
+ label: _x( 'About', 'Example link text for Navigation Submenu' ),
44
+ type: 'page',
45
+ },
46
+ },
40
47
  save,
41
48
  transforms,
42
49
  };
@@ -82,7 +82,6 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) {
82
82
  $font_sizes = block_core_navigation_submenu_build_css_font_sizes( $block->context );
83
83
  $style_attribute = $font_sizes['inline_styles'];
84
84
 
85
- $css_classes = trim( implode( ' ', $font_sizes['css_classes'] ) );
86
85
  $has_submenu = count( $block->inner_blocks ) > 0;
87
86
  $kind = empty( $attributes['kind'] ) ? 'post_type' : str_replace( '-', '_', $attributes['kind'] );
88
87
  $is_active = ! empty( $attributes['id'] ) && get_queried_object_id() === (int) $attributes['id'] && ! empty( get_queried_object()->$kind );
@@ -99,11 +98,29 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) {
99
98
  $open_on_hover_and_click = isset( $block->context['openSubmenusOnClick'] ) && ! $block->context['openSubmenusOnClick'] &&
100
99
  $show_submenu_indicators;
101
100
 
101
+ $classes = array(
102
+ 'wp-block-navigation-item',
103
+ );
104
+ $classes = array_merge(
105
+ $classes,
106
+ $font_sizes['css_classes']
107
+ );
108
+ if ( $has_submenu ) {
109
+ $classes[] = 'has-child';
110
+ }
111
+ if ( $open_on_click ) {
112
+ $classes[] = 'open-on-click';
113
+ }
114
+ if ( $open_on_hover_and_click ) {
115
+ $classes[] = 'open-on-hover-click';
116
+ }
117
+ if ( $is_active ) {
118
+ $classes[] = 'current-menu-item';
119
+ }
120
+
102
121
  $wrapper_attributes = get_block_wrapper_attributes(
103
122
  array(
104
- 'class' => $css_classes . ' wp-block-navigation-item' . ( $has_submenu ? ' has-child' : '' ) .
105
- ( $open_on_click ? ' open-on-click' : '' ) . ( $open_on_hover_and_click ? ' open-on-hover-click' : '' ) .
106
- ( $is_active ? ' current-menu-item' : '' ),
123
+ 'class' => implode( ' ', $classes ),
107
124
  'style' => $style_attribute,
108
125
  )
109
126
  );
@@ -52,6 +52,17 @@
52
52
  "interactivity": {
53
53
  "clientNavigation": true
54
54
  },
55
+ "color": {
56
+ "text": true,
57
+ "background": true,
58
+ "link": true,
59
+ "gradients": true,
60
+ "__experimentalDefaultControls": {
61
+ "background": true,
62
+ "text": true,
63
+ "link": true
64
+ }
65
+ },
55
66
  "__experimentalBorder": {
56
67
  "radius": true,
57
68
  "color": true,
@@ -322,58 +322,60 @@ export default function PageListEdit( {
322
322
 
323
323
  return (
324
324
  <>
325
- <InspectorControls>
326
- <ToolsPanel
327
- label={ __( 'Settings' ) }
328
- resetAll={ () => {
329
- setAttributes( { parentPageID: 0 } );
330
- } }
331
- dropdownMenuProps={ dropdownMenuProps }
332
- >
333
- { pagesTree.length > 0 && (
334
- <ToolsPanelItem
335
- label={ __( 'Parent Page' ) }
336
- hasValue={ () => parentPageID !== 0 }
337
- onDeselect={ () =>
338
- setAttributes( { parentPageID: 0 } )
339
- }
340
- isShownByDefault
341
- >
342
- <ComboboxControl
343
- __nextHasNoMarginBottom
344
- __next40pxDefaultSize
345
- className="editor-page-attributes__parent"
346
- label={ __( 'Parent' ) }
347
- value={ parentPageID }
348
- options={ pagesTree }
349
- onChange={ ( value ) =>
350
- setAttributes( {
351
- parentPageID: value ?? 0,
352
- } )
325
+ { ( pagesTree.length > 0 || allowConvertToLinks ) && (
326
+ <InspectorControls>
327
+ <ToolsPanel
328
+ label={ __( 'Settings' ) }
329
+ resetAll={ () => {
330
+ setAttributes( { parentPageID: 0 } );
331
+ } }
332
+ dropdownMenuProps={ dropdownMenuProps }
333
+ >
334
+ { pagesTree.length > 0 && (
335
+ <ToolsPanelItem
336
+ label={ __( 'Parent Page' ) }
337
+ hasValue={ () => parentPageID !== 0 }
338
+ onDeselect={ () =>
339
+ setAttributes( { parentPageID: 0 } )
353
340
  }
354
- help={ __(
355
- 'Choose a page to show only its subpages.'
356
- ) }
357
- />
358
- </ToolsPanelItem>
359
- ) }
360
-
361
- { allowConvertToLinks && (
362
- <div style={ { gridColumn: '1 / -1' } }>
363
- <p>{ convertDescription }</p>
364
- <Button
365
- __next40pxDefaultSize
366
- variant="primary"
367
- accessibleWhenDisabled
368
- disabled={ ! hasResolvedPages }
369
- onClick={ convertToNavigationLinks }
341
+ isShownByDefault
370
342
  >
371
- { __( 'Edit' ) }
372
- </Button>
373
- </div>
374
- ) }
375
- </ToolsPanel>
376
- </InspectorControls>
343
+ <ComboboxControl
344
+ __nextHasNoMarginBottom
345
+ __next40pxDefaultSize
346
+ className="editor-page-attributes__parent"
347
+ label={ __( 'Parent' ) }
348
+ value={ parentPageID }
349
+ options={ pagesTree }
350
+ onChange={ ( value ) =>
351
+ setAttributes( {
352
+ parentPageID: value ?? 0,
353
+ } )
354
+ }
355
+ help={ __(
356
+ 'Choose a page to show only its subpages.'
357
+ ) }
358
+ />
359
+ </ToolsPanelItem>
360
+ ) }
361
+
362
+ { allowConvertToLinks && (
363
+ <div style={ { gridColumn: '1 / -1' } }>
364
+ <p>{ convertDescription }</p>
365
+ <Button
366
+ __next40pxDefaultSize
367
+ variant="primary"
368
+ accessibleWhenDisabled
369
+ disabled={ ! hasResolvedPages }
370
+ onClick={ convertToNavigationLinks }
371
+ >
372
+ { __( 'Edit' ) }
373
+ </Button>
374
+ </div>
375
+ ) }
376
+ </ToolsPanel>
377
+ </InspectorControls>
378
+ ) }
377
379
  { allowConvertToLinks && (
378
380
  <>
379
381
  <BlockControls group="other">
@@ -20,16 +20,13 @@ import {
20
20
  useBlockProps,
21
21
  useSettings,
22
22
  useBlockEditingMode,
23
- store as blockEditorStore,
24
23
  } from '@wordpress/block-editor';
25
- import { useSelect } from '@wordpress/data';
26
24
  import { getBlockSupport } from '@wordpress/blocks';
27
25
  import { formatLtr } from '@wordpress/icons';
28
26
  /**
29
27
  * Internal dependencies
30
28
  */
31
29
  import { useOnEnter } from './use-enter';
32
- import { unlock } from '../lock-unlock';
33
30
 
34
31
  function ParagraphRTLControl( { direction, setDirection } ) {
35
32
  return (
@@ -111,11 +108,7 @@ function ParagraphBlock( {
111
108
  isSelected: isSingleSelected,
112
109
  name,
113
110
  } ) {
114
- const isZoomOut = useSelect( ( select ) =>
115
- unlock( select( blockEditorStore ) ).isZoomOut()
116
- );
117
-
118
- const { align, content, direction, dropCap } = attributes;
111
+ const { align, content, direction, dropCap, placeholder } = attributes;
119
112
  const blockProps = useBlockProps( {
120
113
  ref: useOnEnter( { clientId, content } ),
121
114
  className: clsx( {
@@ -125,12 +118,6 @@ function ParagraphBlock( {
125
118
  style: { direction },
126
119
  } );
127
120
  const blockEditingMode = useBlockEditingMode();
128
- let { placeholder } = attributes;
129
- if ( isZoomOut ) {
130
- placeholder = '';
131
- } else if ( ! placeholder ) {
132
- placeholder = __( 'Type / to choose a block' );
133
- }
134
121
 
135
122
  return (
136
123
  <>
@@ -182,10 +169,8 @@ function ParagraphBlock( {
182
169
  : __( 'Block: Paragraph' )
183
170
  }
184
171
  data-empty={ RichText.isEmpty( content ) }
185
- placeholder={ placeholder }
186
- data-custom-placeholder={
187
- placeholder && ! isZoomOut ? true : undefined
188
- }
172
+ placeholder={ placeholder || __( 'Type / to choose a block' ) }
173
+ data-custom-placeholder={ placeholder ? true : undefined }
189
174
  __unstableEmbedURLOnPaste
190
175
  __unstableAllowPrefixTransformations
191
176
  />