@wordpress/block-library 8.4.0 → 8.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/archives/edit.js +3 -0
  3. package/build/archives/edit.js.map +1 -1
  4. package/build/audio/edit.js +2 -0
  5. package/build/audio/edit.js.map +1 -1
  6. package/build/avatar/edit.js +5 -9
  7. package/build/avatar/edit.js.map +1 -1
  8. package/build/categories/edit.js +5 -0
  9. package/build/categories/edit.js.map +1 -1
  10. package/build/columns/edit.js +1 -0
  11. package/build/columns/edit.js.map +1 -1
  12. package/build/columns/utils.js +2 -2
  13. package/build/columns/utils.js.map +1 -1
  14. package/build/comment-author-name/edit.js +2 -0
  15. package/build/comment-author-name/edit.js.map +1 -1
  16. package/build/comment-date/edit.js +1 -0
  17. package/build/comment-date/edit.js.map +1 -1
  18. package/build/comment-edit-link/edit.js +1 -0
  19. package/build/comment-edit-link/edit.js.map +1 -1
  20. package/build/comments-title/edit.js +2 -0
  21. package/build/comments-title/edit.js.map +1 -1
  22. package/build/cover/edit/inspector-controls.js +2 -0
  23. package/build/cover/edit/inspector-controls.js.map +1 -1
  24. package/build/embed/embed-controls.js +1 -0
  25. package/build/embed/embed-controls.js.map +1 -1
  26. package/build/file/inspector.js +3 -0
  27. package/build/file/inspector.js.map +1 -1
  28. package/build/freeform/modal.js +1 -1
  29. package/build/freeform/modal.js.map +1 -1
  30. package/build/gallery/edit.js +2 -0
  31. package/build/gallery/edit.js.map +1 -1
  32. package/build/gallery/shared.js +4 -8
  33. package/build/gallery/shared.js.map +1 -1
  34. package/build/gallery/use-image-sizes.js +4 -8
  35. package/build/gallery/use-image-sizes.js.map +1 -1
  36. package/build/gallery/v1/edit.js +8 -3
  37. package/build/gallery/v1/edit.js.map +1 -1
  38. package/build/gallery/v1/gallery-image.js +1 -3
  39. package/build/gallery/v1/gallery-image.js.map +1 -1
  40. package/build/gallery/v1/shared.js +4 -7
  41. package/build/gallery/v1/shared.js.map +1 -1
  42. package/build/image/edit.js +6 -4
  43. package/build/image/edit.js.map +1 -1
  44. package/build/image/image.js +6 -2
  45. package/build/image/image.js.map +1 -1
  46. package/build/image/utils.js +3 -1
  47. package/build/image/utils.js.map +1 -1
  48. package/build/index.js +3 -1
  49. package/build/index.js.map +1 -1
  50. package/build/latest-comments/edit.js +3 -0
  51. package/build/latest-comments/edit.js.map +1 -1
  52. package/build/latest-posts/edit.js +4 -0
  53. package/build/latest-posts/edit.js.map +1 -1
  54. package/build/list/ordered-list-settings.js +1 -0
  55. package/build/list/ordered-list-settings.js.map +1 -1
  56. package/build/list-item/edit.js +2 -2
  57. package/build/list-item/edit.js.map +1 -1
  58. package/build/list-item/hooks/use-outdent-list-item.js +2 -1
  59. package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
  60. package/build/loginout/edit.js +2 -0
  61. package/build/loginout/edit.js.map +1 -1
  62. package/build/media-text/edit.js +2 -0
  63. package/build/media-text/edit.js.map +1 -1
  64. package/build/more/edit.js +1 -0
  65. package/build/more/edit.js.map +1 -1
  66. package/build/navigation/edit/index.js +80 -54
  67. package/build/navigation/edit/index.js.map +1 -1
  68. package/build/navigation/edit/navigation-menu-selector.js +1 -1
  69. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  70. package/build/navigation/edit/overlay-menu-preview.js +1 -0
  71. package/build/navigation/edit/overlay-menu-preview.js.map +1 -1
  72. package/build/navigation/edit/placeholder/index.js +1 -1
  73. package/build/navigation/edit/placeholder/index.js.map +1 -1
  74. package/build/navigation/edit/unsaved-inner-blocks.js +1 -1
  75. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  76. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js +1 -1
  77. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  78. package/build/navigation/edit/use-create-navigation-menu.js +1 -1
  79. package/build/navigation/edit/use-create-navigation-menu.js.map +1 -1
  80. package/build/navigation/edit/use-generate-default-navigation-title.js +1 -1
  81. package/build/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
  82. package/build/navigation/edit/use-navigation-notice.js +4 -7
  83. package/build/navigation/edit/use-navigation-notice.js.map +1 -1
  84. package/build/navigation-link/link-ui.js +1 -0
  85. package/build/navigation-link/link-ui.js.map +1 -1
  86. package/build/page-list/convert-to-links-modal.js +47 -0
  87. package/build/page-list/convert-to-links-modal.js.map +1 -0
  88. package/build/page-list/edit.js +10 -24
  89. package/build/page-list/edit.js.map +1 -1
  90. package/build/paragraph/edit.js +1 -0
  91. package/build/paragraph/edit.js.map +1 -1
  92. package/build/post-author/edit.js +4 -0
  93. package/build/post-author/edit.js.map +1 -1
  94. package/build/post-author-name/edit.js +2 -0
  95. package/build/post-author-name/edit.js.map +1 -1
  96. package/build/post-date/edit.js +2 -0
  97. package/build/post-date/edit.js.map +1 -1
  98. package/build/post-excerpt/edit.js +1 -0
  99. package/build/post-excerpt/edit.js.map +1 -1
  100. package/build/post-featured-image/edit.js +2 -0
  101. package/build/post-featured-image/edit.js.map +1 -1
  102. package/build/post-navigation-link/edit.js +2 -0
  103. package/build/post-navigation-link/edit.js.map +1 -1
  104. package/build/post-terms/use-post-terms.js +1 -1
  105. package/build/post-terms/use-post-terms.js.map +1 -1
  106. package/build/post-time-to-read/edit.js +104 -0
  107. package/build/post-time-to-read/edit.js.map +1 -0
  108. package/build/post-time-to-read/icon.js +25 -0
  109. package/build/post-time-to-read/icon.js.map +1 -0
  110. package/build/post-time-to-read/index.js +57 -0
  111. package/build/post-time-to-read/index.js.map +1 -0
  112. package/build/post-title/edit.js +2 -0
  113. package/build/post-title/edit.js.map +1 -1
  114. package/build/query/edit/inspector-controls/index.js +1 -0
  115. package/build/query/edit/inspector-controls/index.js.map +1 -1
  116. package/build/query-title/edit.js +2 -0
  117. package/build/query-title/edit.js.map +1 -1
  118. package/build/read-more/edit.js +1 -0
  119. package/build/read-more/edit.js.map +1 -1
  120. package/build/rss/edit.js +3 -0
  121. package/build/rss/edit.js.map +1 -1
  122. package/build/site-logo/edit.js +3 -0
  123. package/build/site-logo/edit.js.map +1 -1
  124. package/build/site-tagline/index.js +1 -0
  125. package/build/site-tagline/index.js.map +1 -1
  126. package/build/site-title/edit/index.js +2 -0
  127. package/build/site-title/edit/index.js.map +1 -1
  128. package/build/social-links/edit.js +4 -1
  129. package/build/social-links/edit.js.map +1 -1
  130. package/build/spacer/controls.native.js +10 -8
  131. package/build/spacer/controls.native.js.map +1 -1
  132. package/build/spacer/edit.native.js +43 -5
  133. package/build/spacer/edit.native.js.map +1 -1
  134. package/build/spacer/save.native.js +30 -0
  135. package/build/spacer/save.native.js.map +1 -0
  136. package/build/table/edit.js +3 -0
  137. package/build/table/edit.js.map +1 -1
  138. package/build/table-of-contents/edit.js +1 -0
  139. package/build/table-of-contents/edit.js.map +1 -1
  140. package/build/tag-cloud/edit.js +1 -0
  141. package/build/tag-cloud/edit.js.map +1 -1
  142. package/build/template-part/edit/import-controls.js +29 -6
  143. package/build/template-part/edit/import-controls.js.map +1 -1
  144. package/build/video/edit-common-settings.js +5 -0
  145. package/build/video/edit-common-settings.js.map +1 -1
  146. package/build-module/archives/edit.js +3 -0
  147. package/build-module/archives/edit.js.map +1 -1
  148. package/build-module/audio/edit.js +2 -0
  149. package/build-module/audio/edit.js.map +1 -1
  150. package/build-module/avatar/edit.js +5 -8
  151. package/build-module/avatar/edit.js.map +1 -1
  152. package/build-module/categories/edit.js +5 -0
  153. package/build-module/categories/edit.js.map +1 -1
  154. package/build-module/columns/edit.js +1 -0
  155. package/build-module/columns/edit.js.map +1 -1
  156. package/build-module/columns/utils.js +3 -3
  157. package/build-module/columns/utils.js.map +1 -1
  158. package/build-module/comment-author-name/edit.js +2 -0
  159. package/build-module/comment-author-name/edit.js.map +1 -1
  160. package/build-module/comment-date/edit.js +1 -0
  161. package/build-module/comment-date/edit.js.map +1 -1
  162. package/build-module/comment-edit-link/edit.js +1 -0
  163. package/build-module/comment-edit-link/edit.js.map +1 -1
  164. package/build-module/comments-title/edit.js +2 -0
  165. package/build-module/comments-title/edit.js.map +1 -1
  166. package/build-module/cover/edit/inspector-controls.js +2 -0
  167. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  168. package/build-module/embed/embed-controls.js +1 -0
  169. package/build-module/embed/embed-controls.js.map +1 -1
  170. package/build-module/file/inspector.js +3 -0
  171. package/build-module/file/inspector.js.map +1 -1
  172. package/build-module/freeform/modal.js +1 -1
  173. package/build-module/freeform/modal.js.map +1 -1
  174. package/build-module/gallery/edit.js +2 -0
  175. package/build-module/gallery/edit.js.map +1 -1
  176. package/build-module/gallery/shared.js +4 -7
  177. package/build-module/gallery/shared.js.map +1 -1
  178. package/build-module/gallery/use-image-sizes.js +4 -7
  179. package/build-module/gallery/use-image-sizes.js.map +1 -1
  180. package/build-module/gallery/v1/edit.js +9 -4
  181. package/build-module/gallery/v1/edit.js.map +1 -1
  182. package/build-module/gallery/v1/gallery-image.js +1 -2
  183. package/build-module/gallery/v1/gallery-image.js.map +1 -1
  184. package/build-module/gallery/v1/shared.js +4 -6
  185. package/build-module/gallery/v1/shared.js.map +1 -1
  186. package/build-module/image/edit.js +7 -5
  187. package/build-module/image/edit.js.map +1 -1
  188. package/build-module/image/image.js +7 -3
  189. package/build-module/image/image.js.map +1 -1
  190. package/build-module/image/utils.js +4 -2
  191. package/build-module/image/utils.js.map +1 -1
  192. package/build-module/index.js +2 -1
  193. package/build-module/index.js.map +1 -1
  194. package/build-module/latest-comments/edit.js +3 -0
  195. package/build-module/latest-comments/edit.js.map +1 -1
  196. package/build-module/latest-posts/edit.js +4 -0
  197. package/build-module/latest-posts/edit.js.map +1 -1
  198. package/build-module/list/ordered-list-settings.js +1 -0
  199. package/build-module/list/ordered-list-settings.js.map +1 -1
  200. package/build-module/list-item/edit.js +2 -2
  201. package/build-module/list-item/edit.js.map +1 -1
  202. package/build-module/list-item/hooks/use-outdent-list-item.js +2 -1
  203. package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
  204. package/build-module/loginout/edit.js +2 -0
  205. package/build-module/loginout/edit.js.map +1 -1
  206. package/build-module/media-text/edit.js +2 -0
  207. package/build-module/media-text/edit.js.map +1 -1
  208. package/build-module/more/edit.js +1 -0
  209. package/build-module/more/edit.js.map +1 -1
  210. package/build-module/navigation/edit/index.js +82 -56
  211. package/build-module/navigation/edit/index.js.map +1 -1
  212. package/build-module/navigation/edit/navigation-menu-selector.js +1 -1
  213. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  214. package/build-module/navigation/edit/overlay-menu-preview.js +1 -0
  215. package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
  216. package/build-module/navigation/edit/placeholder/index.js +1 -1
  217. package/build-module/navigation/edit/placeholder/index.js.map +1 -1
  218. package/build-module/navigation/edit/unsaved-inner-blocks.js +1 -1
  219. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  220. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js +1 -1
  221. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  222. package/build-module/navigation/edit/use-create-navigation-menu.js +1 -1
  223. package/build-module/navigation/edit/use-create-navigation-menu.js.map +1 -1
  224. package/build-module/navigation/edit/use-generate-default-navigation-title.js +1 -1
  225. package/build-module/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
  226. package/build-module/navigation/edit/use-navigation-notice.js +5 -8
  227. package/build-module/navigation/edit/use-navigation-notice.js.map +1 -1
  228. package/build-module/navigation-link/link-ui.js +1 -0
  229. package/build-module/navigation-link/link-ui.js.map +1 -1
  230. package/build-module/page-list/convert-to-links-modal.js +35 -0
  231. package/build-module/page-list/convert-to-links-modal.js.map +1 -0
  232. package/build-module/page-list/edit.js +10 -25
  233. package/build-module/page-list/edit.js.map +1 -1
  234. package/build-module/paragraph/edit.js +1 -0
  235. package/build-module/paragraph/edit.js.map +1 -1
  236. package/build-module/post-author/edit.js +4 -0
  237. package/build-module/post-author/edit.js.map +1 -1
  238. package/build-module/post-author-name/edit.js +2 -0
  239. package/build-module/post-author-name/edit.js.map +1 -1
  240. package/build-module/post-date/edit.js +2 -0
  241. package/build-module/post-date/edit.js.map +1 -1
  242. package/build-module/post-excerpt/edit.js +1 -0
  243. package/build-module/post-excerpt/edit.js.map +1 -1
  244. package/build-module/post-featured-image/edit.js +2 -0
  245. package/build-module/post-featured-image/edit.js.map +1 -1
  246. package/build-module/post-navigation-link/edit.js +2 -0
  247. package/build-module/post-navigation-link/edit.js.map +1 -1
  248. package/build-module/post-terms/use-post-terms.js +1 -1
  249. package/build-module/post-terms/use-post-terms.js.map +1 -1
  250. package/build-module/post-time-to-read/edit.js +90 -0
  251. package/build-module/post-time-to-read/edit.js.map +1 -0
  252. package/build-module/post-time-to-read/icon.js +15 -0
  253. package/build-module/post-time-to-read/icon.js.map +1 -0
  254. package/build-module/post-time-to-read/index.js +40 -0
  255. package/build-module/post-time-to-read/index.js.map +1 -0
  256. package/build-module/post-title/edit.js +2 -0
  257. package/build-module/post-title/edit.js.map +1 -1
  258. package/build-module/query/edit/inspector-controls/index.js +1 -0
  259. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  260. package/build-module/query-title/edit.js +2 -0
  261. package/build-module/query-title/edit.js.map +1 -1
  262. package/build-module/read-more/edit.js +1 -0
  263. package/build-module/read-more/edit.js.map +1 -1
  264. package/build-module/rss/edit.js +3 -0
  265. package/build-module/rss/edit.js.map +1 -1
  266. package/build-module/site-logo/edit.js +3 -0
  267. package/build-module/site-logo/edit.js.map +1 -1
  268. package/build-module/site-tagline/index.js +1 -0
  269. package/build-module/site-tagline/index.js.map +1 -1
  270. package/build-module/site-title/edit/index.js +2 -0
  271. package/build-module/site-title/edit/index.js.map +1 -1
  272. package/build-module/social-links/edit.js +4 -1
  273. package/build-module/social-links/edit.js.map +1 -1
  274. package/build-module/spacer/controls.native.js +9 -8
  275. package/build-module/spacer/controls.native.js.map +1 -1
  276. package/build-module/spacer/edit.native.js +39 -7
  277. package/build-module/spacer/edit.native.js.map +1 -1
  278. package/build-module/spacer/save.native.js +22 -0
  279. package/build-module/spacer/save.native.js.map +1 -0
  280. package/build-module/table/edit.js +3 -0
  281. package/build-module/table/edit.js.map +1 -1
  282. package/build-module/table-of-contents/edit.js +1 -0
  283. package/build-module/table-of-contents/edit.js.map +1 -1
  284. package/build-module/tag-cloud/edit.js +1 -0
  285. package/build-module/tag-cloud/edit.js.map +1 -1
  286. package/build-module/template-part/edit/import-controls.js +28 -6
  287. package/build-module/template-part/edit/import-controls.js.map +1 -1
  288. package/build-module/video/edit-common-settings.js +5 -0
  289. package/build-module/video/edit-common-settings.js.map +1 -1
  290. package/build-style/editor-rtl.css +4 -3
  291. package/build-style/editor.css +4 -3
  292. package/build-style/post-excerpt/editor-rtl.css +1 -1
  293. package/build-style/post-excerpt/editor.css +1 -1
  294. package/build-style/query/editor-rtl.css +1 -0
  295. package/build-style/query/editor.css +1 -0
  296. package/build-style/site-logo/editor-rtl.css +2 -2
  297. package/build-style/site-logo/editor.css +2 -2
  298. package/package.json +31 -30
  299. package/src/archives/edit.js +3 -0
  300. package/src/audio/edit.js +2 -0
  301. package/src/audio/test/__snapshots__/edit.native.js.snap +38 -38
  302. package/src/avatar/edit.js +2 -4
  303. package/src/buttons/test/__snapshots__/edit.native.js.snap +11 -11
  304. package/src/categories/edit.js +5 -0
  305. package/src/code/test/__snapshots__/edit.native.js.snap +2 -2
  306. package/src/columns/edit.js +1 -0
  307. package/src/columns/test/__snapshots__/edit.native.js.snap +66 -66
  308. package/src/columns/test/utils.js +54 -0
  309. package/src/columns/utils.js +8 -8
  310. package/src/comment-author-name/edit.js +2 -0
  311. package/src/comment-date/edit.js +1 -0
  312. package/src/comment-edit-link/edit.js +1 -0
  313. package/src/comments-title/edit.js +2 -0
  314. package/src/cover/edit/inspector-controls.js +2 -0
  315. package/src/cover/index.php +4 -6
  316. package/src/cover/test/__snapshots__/edit.native.js.snap +36 -36
  317. package/src/embed/embed-controls.js +1 -0
  318. package/src/embed/test/__snapshots__/index.native.js.snap +52 -52
  319. package/src/file/inspector.js +3 -0
  320. package/src/file/test/__snapshots__/edit.native.js.snap +49 -49
  321. package/src/freeform/modal.js +1 -1
  322. package/src/gallery/edit.js +2 -0
  323. package/src/gallery/shared.js +6 -11
  324. package/src/gallery/test/__snapshots__/index.native.js.snap +71 -71
  325. package/src/gallery/use-image-sizes.js +3 -16
  326. package/src/gallery/v1/edit.js +8 -16
  327. package/src/gallery/v1/gallery-image.js +1 -2
  328. package/src/gallery/v1/shared.js +5 -10
  329. package/src/group/test/__snapshots__/edit.native.js.snap +5 -5
  330. package/src/heading/test/__snapshots__/index.native.js.snap +1 -1
  331. package/src/image/edit.js +4 -4
  332. package/src/image/image.js +4 -9
  333. package/src/image/index.php +4 -4
  334. package/src/image/utils.js +2 -2
  335. package/src/index.js +2 -0
  336. package/src/latest-comments/edit.js +3 -0
  337. package/src/latest-posts/edit.js +4 -0
  338. package/src/list/ordered-list-settings.js +1 -0
  339. package/src/list/test/__snapshots__/edit.native.js.snap +4 -4
  340. package/src/list-item/edit.js +10 -3
  341. package/src/list-item/hooks/use-outdent-list-item.js +2 -1
  342. package/src/loginout/edit.js +2 -0
  343. package/src/media-text/edit.js +2 -0
  344. package/src/missing/test/__snapshots__/edit.native.js.snap +1 -1
  345. package/src/more/edit.js +1 -0
  346. package/src/navigation/edit/index.js +130 -82
  347. package/src/navigation/edit/navigation-menu-selector.js +1 -1
  348. package/src/navigation/edit/overlay-menu-preview.js +1 -0
  349. package/src/navigation/edit/placeholder/index.js +1 -1
  350. package/src/navigation/edit/unsaved-inner-blocks.js +1 -0
  351. package/src/navigation/edit/use-convert-classic-menu-to-block-menu.js +51 -48
  352. package/src/navigation/edit/use-create-navigation-menu.js +1 -1
  353. package/src/navigation/edit/use-generate-default-navigation-title.js +1 -1
  354. package/src/navigation/edit/use-navigation-notice.js +16 -13
  355. package/src/navigation/index.php +42 -19
  356. package/src/navigation-link/link-ui.js +1 -0
  357. package/src/navigation-link/test/__snapshots__/hooks.js.snap +12 -12
  358. package/src/page-list/convert-to-links-modal.js +38 -0
  359. package/src/page-list/edit.js +11 -32
  360. package/src/paragraph/edit.js +1 -0
  361. package/src/post-author/edit.js +4 -0
  362. package/src/post-author-name/edit.js +2 -0
  363. package/src/post-date/edit.js +2 -0
  364. package/src/post-excerpt/edit.js +1 -0
  365. package/src/post-excerpt/editor.scss +1 -1
  366. package/src/post-featured-image/edit.js +2 -0
  367. package/src/post-navigation-link/edit.js +2 -0
  368. package/src/post-terms/index.php +1 -0
  369. package/src/post-terms/use-post-terms.js +1 -1
  370. package/src/post-time-to-read/block.json +20 -0
  371. package/src/post-time-to-read/edit.js +101 -0
  372. package/src/post-time-to-read/icon.js +15 -0
  373. package/src/post-time-to-read/index.js +17 -0
  374. package/src/post-time-to-read/index.php +62 -0
  375. package/src/post-title/edit.js +2 -0
  376. package/src/preformatted/test/__snapshots__/edit.native.js.snap +10 -10
  377. package/src/query/edit/inspector-controls/index.js +1 -0
  378. package/src/query/editor.scss +1 -0
  379. package/src/query-title/edit.js +2 -0
  380. package/src/read-more/edit.js +1 -0
  381. package/src/rss/edit.js +3 -0
  382. package/src/search/test/__snapshots__/edit.native.js.snap +60 -60
  383. package/src/separator/test/__snapshots__/edit.native.js.snap +1 -1
  384. package/src/site-logo/edit.js +3 -0
  385. package/src/site-logo/editor.scss +3 -3
  386. package/src/site-logo/index.php +7 -2
  387. package/src/site-tagline/block.json +1 -0
  388. package/src/site-title/edit/index.js +2 -0
  389. package/src/social-link/index.php +6 -6
  390. package/src/social-links/edit.js +3 -0
  391. package/src/social-links/test/__snapshots__/edit.native.js.snap +16 -16
  392. package/src/spacer/controls.native.js +13 -5
  393. package/src/spacer/edit.native.js +45 -6
  394. package/src/spacer/save.native.js +18 -0
  395. package/src/spacer/test/__snapshots__/index.native.js.snap +21 -9
  396. package/src/spacer/test/index.native.js +81 -0
  397. package/src/table/edit.js +3 -0
  398. package/src/table-of-contents/edit.js +1 -0
  399. package/src/tag-cloud/edit.js +1 -0
  400. package/src/template-part/edit/import-controls.js +24 -5
  401. package/src/template-part/index.php +7 -6
  402. package/src/verse/test/__snapshots__/edit.native.js.snap +2 -2
  403. package/src/video/edit-common-settings.js +5 -0
  404. package/tsconfig.json +2 -1
  405. package/tsconfig.tsbuildinfo +1 -1
@@ -431,6 +431,37 @@ function block_core_navigation_block_contains_core_navigation( $inner_blocks ) {
431
431
  return false;
432
432
  }
433
433
 
434
+ /**
435
+ * Create and returns a navigation menu containing a page-list as a fallback.
436
+ *
437
+ * @return array the newly created navigation menu.
438
+ */
439
+ function block_core_navigation_get_default_pages_fallback() {
440
+ $registry = WP_Block_Type_Registry::get_instance();
441
+
442
+ // If `core/page-list` is not registered then use empty blocks.
443
+ $default_blocks = $registry->is_registered( 'core/page-list' ) ? '<!-- wp:page-list /-->' : '';
444
+
445
+ // Create a new navigation menu from the fallback blocks.
446
+ $wp_insert_post_result = wp_insert_post(
447
+ array(
448
+ 'post_content' => $default_blocks,
449
+ 'post_title' => 'Navigation', // TODO - use the template slug in future.
450
+ 'post_name' => 'Navigation', // TODO - use the template slug in future.
451
+ 'post_status' => 'publish',
452
+ 'post_type' => 'wp_navigation',
453
+ ),
454
+ true // So that we can check whether the result is an error.
455
+ );
456
+
457
+ if ( is_wp_error( $wp_insert_post_result ) ) {
458
+ return;
459
+ }
460
+
461
+ // Fetch the most recently published navigation which will be the default one created above.
462
+ return block_core_navigation_get_most_recently_published_navigation();
463
+ }
464
+
434
465
  /**
435
466
  * Retrieves the appropriate fallback to be used on the front of the
436
467
  * site when there is no menu assigned to the Nav block.
@@ -441,19 +472,7 @@ function block_core_navigation_block_contains_core_navigation( $inner_blocks ) {
441
472
  * @return array the array of blocks to be used as a fallback.
442
473
  */
443
474
  function block_core_navigation_get_fallback_blocks() {
444
- $page_list_fallback = array(
445
- array(
446
- 'blockName' => 'core/page-list',
447
- ),
448
- );
449
-
450
- $registry = WP_Block_Type_Registry::get_instance();
451
-
452
- // If `core/page-list` is not registered then return empty blocks.
453
- $fallback_blocks = $registry->is_registered( 'core/page-list' ) ? $page_list_fallback : array();
454
-
455
- // Default to a list of Pages.
456
-
475
+ // Get the most recently published Navigation post.
457
476
  $navigation_post = block_core_navigation_get_most_recently_published_navigation();
458
477
 
459
478
  // If there are no navigation posts then try to find a classic menu
@@ -462,16 +481,21 @@ function block_core_navigation_get_fallback_blocks() {
462
481
  $navigation_post = block_core_navigation_maybe_use_classic_menu_fallback();
463
482
  }
464
483
 
465
- // Use the first non-empty Navigation as fallback if available.
484
+ // If there are no navigation posts then default to a list of Pages.
485
+ if ( ! $navigation_post ) {
486
+ $navigation_post = block_core_navigation_get_default_pages_fallback();
487
+ }
488
+
489
+ // Use the first non-empty Navigation as fallback, there should always be one.
466
490
  if ( $navigation_post ) {
467
491
  $parsed_blocks = parse_blocks( $navigation_post->post_content );
468
492
  $maybe_fallback = block_core_navigation_filter_out_empty_blocks( $parsed_blocks );
469
-
470
- // Normalizing blocks may result in an empty array of blocks if they were all `null` blocks.
471
- // In this case default to the (Page List) fallback.
472
- $fallback_blocks = ! empty( $maybe_fallback ) ? $maybe_fallback : $fallback_blocks;
473
493
  }
474
494
 
495
+ // Normalizing blocks may result in an empty array of blocks if they were all `null` blocks.
496
+ // In this case default empty blocks.
497
+ $fallback_blocks = ! empty( $maybe_fallback ) ? $maybe_fallback : array();
498
+
475
499
  /**
476
500
  * Filters the fallback experience for the Navigation block.
477
501
  *
@@ -531,7 +555,6 @@ function block_core_navigation_from_block_get_post_ids( $block ) {
531
555
  * @return string Returns the post content with the legacy widget added.
532
556
  */
533
557
  function render_block_core_navigation( $attributes, $content, $block ) {
534
-
535
558
  static $seen_menu_names = array();
536
559
 
537
560
  // Flag used to indicate whether the rendered output is considered to be
@@ -165,6 +165,7 @@ export function LinkUI( props ) {
165
165
  placement="bottom"
166
166
  onClose={ props.onClose }
167
167
  anchor={ props.anchor }
168
+ __unstableSlotName={ '__unstable-block-tools-after' }
168
169
  shift
169
170
  >
170
171
  <LinkControl
@@ -1,12 +1,12 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`hooks enhanceNavigationLinkVariations enhances variations with icon and isActive functions 1`] = `
4
- Object {
4
+ {
5
5
  "extraProp": "extraProp",
6
6
  "name": "core/navigation-link",
7
- "variations": Array [
8
- Object {
9
- "attributes": Object {},
7
+ "variations": [
8
+ {
9
+ "attributes": {},
10
10
  "description": "A link to a custom URL.",
11
11
  "icon": <SVG
12
12
  viewBox="0 0 24 24"
@@ -20,8 +20,8 @@ Object {
20
20
  "name": "link",
21
21
  "title": "Custom Link",
22
22
  },
23
- Object {
24
- "attributes": Object {
23
+ {
24
+ "attributes": {
25
25
  "type": "post",
26
26
  },
27
27
  "description": "A link to a post.",
@@ -37,8 +37,8 @@ Object {
37
37
  "name": "post",
38
38
  "title": "Post Link",
39
39
  },
40
- Object {
41
- "attributes": Object {
40
+ {
41
+ "attributes": {
42
42
  "type": "page",
43
43
  },
44
44
  "description": "A link to a page.",
@@ -54,8 +54,8 @@ Object {
54
54
  "name": "page",
55
55
  "title": "Page Link",
56
56
  },
57
- Object {
58
- "attributes": Object {
57
+ {
58
+ "attributes": {
59
59
  "type": "category",
60
60
  },
61
61
  "description": "A link to a category.",
@@ -73,8 +73,8 @@ Object {
73
73
  "name": "category",
74
74
  "title": "Category Link",
75
75
  },
76
- Object {
77
- "attributes": Object {
76
+ {
77
+ "attributes": {
78
78
  "type": "tag",
79
79
  },
80
80
  "description": "A link to a tag.",
@@ -0,0 +1,38 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { Button, Modal } from '@wordpress/components';
5
+ import { __ } from '@wordpress/i18n';
6
+
7
+ export const convertDescription = __(
8
+ 'This menu is automatically kept in sync with pages on your site. You can manage the menu yourself by clicking "Edit" below.'
9
+ );
10
+
11
+ export function ConvertToLinksModal( { onClick, onClose, disabled } ) {
12
+ return (
13
+ <Modal
14
+ onRequestClose={ onClose }
15
+ title={ __( 'Edit this menu' ) }
16
+ className={ 'wp-block-page-list-modal' }
17
+ aria={ {
18
+ describedby: 'wp-block-page-list-modal__description',
19
+ } }
20
+ >
21
+ <p id={ 'wp-block-page-list-modal__description' }>
22
+ { convertDescription }
23
+ </p>
24
+ <div className="wp-block-page-list-modal-buttons">
25
+ <Button variant="tertiary" onClick={ onClose }>
26
+ { __( 'Cancel' ) }
27
+ </Button>
28
+ <Button
29
+ variant="primary"
30
+ disabled={ disabled }
31
+ onClick={ onClick }
32
+ >
33
+ { __( 'Edit' ) }
34
+ </Button>
35
+ </div>
36
+ </Modal>
37
+ );
38
+ }
@@ -23,7 +23,6 @@ import {
23
23
  Notice,
24
24
  ComboboxControl,
25
25
  Button,
26
- Modal,
27
26
  } from '@wordpress/components';
28
27
  import { __, sprintf } from '@wordpress/i18n';
29
28
  import { useMemo, useState, useEffect } from '@wordpress/element';
@@ -34,16 +33,15 @@ import { useSelect } from '@wordpress/data';
34
33
  * Internal dependencies
35
34
  */
36
35
  import { useConvertToNavigationLinks } from './use-convert-to-navigation-links';
36
+ import {
37
+ convertDescription,
38
+ ConvertToLinksModal,
39
+ } from './convert-to-links-modal';
37
40
 
38
41
  // We only show the edit option when page count is <= MAX_PAGE_COUNT
39
42
  // Performance of Navigation Links is not good past this value.
40
43
  const MAX_PAGE_COUNT = 100;
41
44
  const NOOP = () => {};
42
-
43
- const convertDescription = __(
44
- 'This menu is automatically kept in sync with pages on your site. You can manage the menu yourself by clicking "Edit" below.'
45
- );
46
-
47
45
  function BlockContent( {
48
46
  blockProps,
49
47
  innerBlocksProps,
@@ -113,7 +111,7 @@ function BlockContent( {
113
111
  }
114
112
  }
115
113
 
116
- function ConvertToLinksModal( { onClick, disabled } ) {
114
+ function ConvertToLinks( { onClick, disabled } ) {
117
115
  const [ isOpen, setOpen ] = useState( false );
118
116
  const openModal = () => setOpen( true );
119
117
  const closeModal = () => setOpen( false );
@@ -126,30 +124,11 @@ function ConvertToLinksModal( { onClick, disabled } ) {
126
124
  </ToolbarButton>
127
125
  </BlockControls>
128
126
  { isOpen && (
129
- <Modal
130
- onRequestClose={ closeModal }
131
- title={ __( 'Edit this menu' ) }
132
- className={ 'wp-block-page-list-modal' }
133
- aria={ {
134
- describedby: 'wp-block-page-list-modal__description',
135
- } }
136
- >
137
- <p id={ 'wp-block-page-list-modal__description' }>
138
- { convertDescription }
139
- </p>
140
- <div className="wp-block-page-list-modal-buttons">
141
- <Button variant="tertiary" onClick={ closeModal }>
142
- { __( 'Cancel' ) }
143
- </Button>
144
- <Button
145
- variant="primary"
146
- disabled={ disabled }
147
- onClick={ onClick }
148
- >
149
- { __( 'Edit' ) }
150
- </Button>
151
- </div>
152
- </Modal>
127
+ <ConvertToLinksModal
128
+ onClick={ onClick }
129
+ onClose={ closeModal }
130
+ disabled={ disabled }
131
+ />
153
132
  ) }
154
133
  </>
155
134
  );
@@ -344,7 +323,7 @@ export default function PageListEdit( {
344
323
  ) }
345
324
  </InspectorControls>
346
325
  { allowConvertToLinks && (
347
- <ConvertToLinksModal
326
+ <ConvertToLinks
348
327
  disabled={ ! hasResolvedPages }
349
328
  onClick={ convertToNavigationLinks }
350
329
  />
@@ -110,6 +110,7 @@ function ParagraphBlock( {
110
110
  panelId={ clientId }
111
111
  >
112
112
  <ToggleControl
113
+ __nextHasNoMarginBottom
113
114
  label={ __( 'Drop cap' ) }
114
115
  checked={ !! dropCap }
115
116
  onChange={ () =>
@@ -120,6 +120,7 @@ function PostAuthorEdit( {
120
120
  />
121
121
  ) ) }
122
122
  <ToggleControl
123
+ __nextHasNoMarginBottom
123
124
  label={ __( 'Show avatar' ) }
124
125
  checked={ showAvatar }
125
126
  onChange={ () =>
@@ -140,6 +141,7 @@ function PostAuthorEdit( {
140
141
  />
141
142
  ) }
142
143
  <ToggleControl
144
+ __nextHasNoMarginBottom
143
145
  label={ __( 'Show bio' ) }
144
146
  checked={ showBio }
145
147
  onChange={ () =>
@@ -147,12 +149,14 @@ function PostAuthorEdit( {
147
149
  }
148
150
  />
149
151
  <ToggleControl
152
+ __nextHasNoMarginBottom
150
153
  label={ __( 'Link author name to author page' ) }
151
154
  checked={ isLink }
152
155
  onChange={ () => setAttributes( { isLink: ! isLink } ) }
153
156
  />
154
157
  { isLink && (
155
158
  <ToggleControl
159
+ __nextHasNoMarginBottom
156
160
  label={ __( 'Open in new tab' ) }
157
161
  onChange={ ( value ) =>
158
162
  setAttributes( {
@@ -71,12 +71,14 @@ function PostAuthorNameEdit( {
71
71
  <InspectorControls>
72
72
  <PanelBody title={ __( 'Link settings' ) }>
73
73
  <ToggleControl
74
+ __nextHasNoMarginBottom
74
75
  label={ __( 'Link to author archive' ) }
75
76
  onChange={ () => setAttributes( { isLink: ! isLink } ) }
76
77
  checked={ isLink }
77
78
  />
78
79
  { isLink && (
79
80
  <ToggleControl
81
+ __nextHasNoMarginBottom
80
82
  label={ __( 'Open in new tab' ) }
81
83
  onChange={ ( value ) =>
82
84
  setAttributes( {
@@ -150,6 +150,7 @@ export default function PostDateEdit( {
150
150
  }
151
151
  />
152
152
  <ToggleControl
153
+ __nextHasNoMarginBottom
153
154
  label={
154
155
  postType?.labels.singular_name
155
156
  ? sprintf(
@@ -163,6 +164,7 @@ export default function PostDateEdit( {
163
164
  checked={ isLink }
164
165
  />
165
166
  <ToggleControl
167
+ __nextHasNoMarginBottom
166
168
  label={ __( 'Display last modified date' ) }
167
169
  onChange={ ( value ) =>
168
170
  setAttributes( {
@@ -194,6 +194,7 @@ export default function PostExcerptEditor( {
194
194
  <InspectorControls>
195
195
  <PanelBody title={ __( 'Settings' ) }>
196
196
  <ToggleControl
197
+ __nextHasNoMarginBottom
197
198
  label={ __( 'Show link on new line' ) }
198
199
  checked={ showMoreOnNewLine }
199
200
  onChange={ ( newShowMoreOnNewLine ) =>
@@ -1,5 +1,5 @@
1
1
  .wp-block-post-excerpt {
2
2
  .wp-block-post-excerpt__excerpt.is-inline {
3
- display: inline-block;
3
+ display: inline;
4
4
  }
5
5
  }
@@ -141,6 +141,7 @@ export default function PostFeaturedImageEdit( {
141
141
  <InspectorControls>
142
142
  <PanelBody title={ __( 'Link settings' ) }>
143
143
  <ToggleControl
144
+ __nextHasNoMarginBottom
144
145
  label={
145
146
  postType?.labels.singular_name
146
147
  ? sprintf(
@@ -156,6 +157,7 @@ export default function PostFeaturedImageEdit( {
156
157
  { isLink && (
157
158
  <>
158
159
  <ToggleControl
160
+ __nextHasNoMarginBottom
159
161
  label={ __( 'Open in new tab' ) }
160
162
  onChange={ ( value ) =>
161
163
  setAttributes( {
@@ -52,6 +52,7 @@ export default function PostNavigationLinkEdit( {
52
52
  <InspectorControls>
53
53
  <PanelBody>
54
54
  <ToggleControl
55
+ __nextHasNoMarginBottom
55
56
  label={ __( 'Display the title as a link' ) }
56
57
  help={ __(
57
58
  'If you have entered a custom label, it will be prepended before the title.'
@@ -65,6 +66,7 @@ export default function PostNavigationLinkEdit( {
65
66
  />
66
67
  { showTitle && (
67
68
  <ToggleControl
69
+ __nextHasNoMarginBottom
68
70
  label={ __(
69
71
  'Include the label as part of the link'
70
72
  ) }
@@ -87,6 +87,7 @@ function register_block_core_post_terms() {
87
87
  'term' => $taxonomy->name,
88
88
  ),
89
89
  'isActive' => array( 'term' ),
90
+ 'scope' => array( 'inserter', 'transform' ),
90
91
  );
91
92
  // Set the category variation as the default one.
92
93
  if ( 'category' === $taxonomy->name ) {
@@ -36,6 +36,6 @@ export default function usePostTerms( { postId, term } ) {
36
36
  hasPostTerms: !! terms?.length,
37
37
  };
38
38
  },
39
- [ postId, term?.visibility?.publicly_queryable ]
39
+ [ postId, term?.visibility?.publicly_queryable, slug ]
40
40
  );
41
41
  }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://schemas.wp.org/trunk/block.json",
3
+ "apiVersion": 2,
4
+ "__experimental": true,
5
+ "name": "core/post-time-to-read",
6
+ "title": "Time To Read",
7
+ "category": "theme",
8
+ "description": "Show minutes required to finish reading the post.",
9
+ "textdomain": "default",
10
+ "usesContext": [ "postId", "postType" ],
11
+ "attributes": {
12
+ "textAlign": {
13
+ "type": "string"
14
+ }
15
+ },
16
+ "supports": {
17
+ "html": false,
18
+ "multiple": false
19
+ }
20
+ }
@@ -0,0 +1,101 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import classnames from 'classnames';
5
+
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import { _x, _n, sprintf } from '@wordpress/i18n';
10
+ import { useMemo } from '@wordpress/element';
11
+ import {
12
+ AlignmentControl,
13
+ BlockControls,
14
+ useBlockProps,
15
+ } from '@wordpress/block-editor';
16
+ import { __unstableSerializeAndClean } from '@wordpress/blocks';
17
+ import { useEntityProp, useEntityBlockEditor } from '@wordpress/core-data';
18
+ import { count as wordCount } from '@wordpress/wordcount';
19
+
20
+ /**
21
+ * Average reading rate - based on average taken from
22
+ * https://irisreading.com/average-reading-speed-in-various-languages/
23
+ * (Characters/minute used for Chinese rather than words).
24
+ */
25
+ const AVERAGE_READING_RATE = 189;
26
+
27
+ function PostTimeToReadEdit( { attributes, setAttributes, context } ) {
28
+ const { textAlign } = attributes;
29
+ const { postId, postType } = context;
30
+
31
+ const [ contentStructure ] = useEntityProp(
32
+ 'postType',
33
+ postType,
34
+ 'content',
35
+ postId
36
+ );
37
+
38
+ const [ blocks ] = useEntityBlockEditor( 'postType', postType, {
39
+ id: postId,
40
+ } );
41
+
42
+ const minutesToReadString = useMemo( () => {
43
+ // Replicates the logic found in getEditedPostContent().
44
+ let content;
45
+ if ( contentStructure instanceof Function ) {
46
+ content = contentStructure( { blocks } );
47
+ } else if ( blocks ) {
48
+ // If we have parsed blocks already, they should be our source of truth.
49
+ // Parsing applies block deprecations and legacy block conversions that
50
+ // unparsed content will not have.
51
+ content = __unstableSerializeAndClean( blocks );
52
+ } else {
53
+ content = contentStructure;
54
+ }
55
+
56
+ /*
57
+ * translators: If your word count is based on single characters (e.g. East Asian characters),
58
+ * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
59
+ * Do not translate into your own language.
60
+ */
61
+ const wordCountType = _x(
62
+ 'words',
63
+ 'Word count type. Do not translate!'
64
+ );
65
+
66
+ const minutesToRead = Math.max(
67
+ 1,
68
+ Math.round(
69
+ wordCount( content, wordCountType ) / AVERAGE_READING_RATE
70
+ )
71
+ );
72
+
73
+ return sprintf(
74
+ /* translators: %d is the number of minutes the post will take to read. */
75
+ _n( '%d minute', '%d minutes', minutesToRead ),
76
+ minutesToRead
77
+ );
78
+ }, [ contentStructure, blocks ] );
79
+
80
+ const blockProps = useBlockProps( {
81
+ className: classnames( {
82
+ [ `has-text-align-${ textAlign }` ]: textAlign,
83
+ } ),
84
+ } );
85
+
86
+ return (
87
+ <>
88
+ <BlockControls group="block">
89
+ <AlignmentControl
90
+ value={ textAlign }
91
+ onChange={ ( nextAlign ) => {
92
+ setAttributes( { textAlign: nextAlign } );
93
+ } }
94
+ />
95
+ </BlockControls>
96
+ <p { ...blockProps }>{ minutesToReadString }</p>
97
+ </>
98
+ );
99
+ }
100
+
101
+ export default PostTimeToReadEdit;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { SVG, Path } from '@wordpress/components';
5
+
6
+ export default (
7
+ <SVG
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ width="24"
10
+ height="24"
11
+ viewBox="0 0 24 24"
12
+ >
13
+ <Path d="M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16.5c-4.1 0-7.5-3.4-7.5-7.5S7.9 4.5 12 4.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5zM12 7l-1 5c0 .3.2.6.4.8l4.2 2.8-2.7-4.1L12 7z" />
14
+ </SVG>
15
+ );
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import initBlock from '../utils/init-block';
5
+ import metadata from './block.json';
6
+ import edit from './edit';
7
+ import icon from './icon';
8
+
9
+ const { name } = metadata;
10
+ export { metadata, name };
11
+
12
+ export const settings = {
13
+ icon,
14
+ edit,
15
+ };
16
+
17
+ export const init = () => initBlock( { name, metadata, settings } );
@@ -0,0 +1,62 @@
1
+ <?php
2
+ /**
3
+ * Server-side rendering of the `core/post-time-to-read` block.
4
+ *
5
+ * @package WordPress
6
+ */
7
+
8
+ /**
9
+ * Renders the `core/post-time-to-read` block on the server.
10
+ *
11
+ * @param array $attributes Block attributes.
12
+ * @param string $content Block default content.
13
+ * @param WP_Block $block Block instance.
14
+ * @return string Returns the rendered post author name block.
15
+ */
16
+ function render_block_core_post_time_to_read( $attributes, $content, $block ) {
17
+ if ( ! isset( $block->context['postId'] ) ) {
18
+ return '';
19
+ }
20
+
21
+ $content = get_the_content();
22
+
23
+ /*
24
+ * Average reading rate - based on average taken from
25
+ * https://irisreading.com/average-reading-speed-in-various-languages/
26
+ * (Characters/minute used for Chinese rather than words).
27
+ */
28
+ $average_reading_rate = 189;
29
+
30
+ $word_count_type = wp_get_word_count_type();
31
+
32
+ $minutes_to_read = max( 1, (int) round( wp_word_count( $content, $word_count_type ) / $average_reading_rate ) );
33
+
34
+ $minutes_to_read_string = sprintf(
35
+ /* translators: %d is the number of minutes the post will take to read. */
36
+ _n( '%d minute', '%d minutes', $minutes_to_read ),
37
+ $minutes_to_read
38
+ );
39
+
40
+ $align_class_name = empty( $attributes['textAlign'] ) ? '' : "has-text-align-{$attributes['textAlign']}";
41
+
42
+ $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) );
43
+
44
+ return sprintf(
45
+ '<p %1$s>%2$s</p>',
46
+ $wrapper_attributes,
47
+ $minutes_to_read_string
48
+ );
49
+ }
50
+
51
+ /**
52
+ * Registers the `core/post-time-to-read` block on the server.
53
+ */
54
+ function register_block_core_post_time_to_read() {
55
+ register_block_type_from_metadata(
56
+ __DIR__ . '/post-time-to-read',
57
+ array(
58
+ 'render_callback' => 'render_block_core_post_time_to_read',
59
+ )
60
+ );
61
+ }
62
+ add_action( 'init', 'register_block_core_post_time_to_read' );
@@ -118,6 +118,7 @@ export default function PostTitleEdit( {
118
118
  <InspectorControls>
119
119
  <PanelBody title={ __( 'Link settings' ) }>
120
120
  <ToggleControl
121
+ __nextHasNoMarginBottom
121
122
  label={ __( 'Make title a link' ) }
122
123
  onChange={ () => setAttributes( { isLink: ! isLink } ) }
123
124
  checked={ isLink }
@@ -125,6 +126,7 @@ export default function PostTitleEdit( {
125
126
  { isLink && (
126
127
  <>
127
128
  <ToggleControl
129
+ __nextHasNoMarginBottom
128
130
  label={ __( 'Open in new tab' ) }
129
131
  onChange={ ( value ) =>
130
132
  setAttributes( {