@wordpress/block-library 6.0.23 → 7.0.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 (1171) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/LICENSE.md +1 -1
  3. package/README.md +7 -1
  4. package/build/archives/index.js +1 -0
  5. package/build/archives/index.js.map +1 -1
  6. package/build/audio/edit.js +20 -5
  7. package/build/audio/edit.js.map +1 -1
  8. package/build/audio/index.js +1 -0
  9. package/build/audio/index.js.map +1 -1
  10. package/build/block/index.js +1 -0
  11. package/build/block/index.js.map +1 -1
  12. package/build/button/edit.native.js +1 -1
  13. package/build/button/edit.native.js.map +1 -1
  14. package/build/button/index.js +10 -2
  15. package/build/button/index.js.map +1 -1
  16. package/build/buttons/edit.js +6 -0
  17. package/build/buttons/edit.js.map +1 -1
  18. package/build/buttons/edit.native.js +16 -6
  19. package/build/buttons/edit.native.js.map +1 -1
  20. package/build/buttons/index.js +1 -0
  21. package/build/buttons/index.js.map +1 -1
  22. package/build/buttons/transforms.js +1 -0
  23. package/build/buttons/transforms.js.map +1 -1
  24. package/build/calendar/index.js +5 -1
  25. package/build/calendar/index.js.map +1 -1
  26. package/build/calendar/transforms.js +27 -0
  27. package/build/calendar/transforms.js.map +1 -0
  28. package/build/categories/index.js +1 -0
  29. package/build/categories/index.js.map +1 -1
  30. package/build/code/index.js +11 -2
  31. package/build/code/index.js.map +1 -1
  32. package/build/code/transforms.js +1 -1
  33. package/build/code/transforms.js.map +1 -1
  34. package/build/column/index.js +6 -1
  35. package/build/column/index.js.map +1 -1
  36. package/build/columns/index.js +16 -1
  37. package/build/columns/index.js.map +1 -1
  38. package/build/comment-author-avatar/edit.js +5 -2
  39. package/build/comment-author-avatar/edit.js.map +1 -1
  40. package/build/comment-author-avatar/index.js +9 -1
  41. package/build/comment-author-avatar/index.js.map +1 -1
  42. package/build/comment-author-name/index.js +7 -1
  43. package/build/comment-author-name/index.js.map +1 -1
  44. package/build/comment-content/index.js +6 -1
  45. package/build/comment-content/index.js.map +1 -1
  46. package/build/comment-date/index.js +7 -1
  47. package/build/comment-date/index.js.map +1 -1
  48. package/build/comment-edit-link/index.js +7 -2
  49. package/build/comment-edit-link/index.js.map +1 -1
  50. package/build/comment-reply-link/index.js +6 -1
  51. package/build/comment-reply-link/index.js.map +1 -1
  52. package/build/comment-template/edit.js +155 -26
  53. package/build/comment-template/edit.js.map +1 -1
  54. package/build/comment-template/index.js +4 -2
  55. package/build/comment-template/index.js.map +1 -1
  56. package/build/comment-template/util.js +68 -0
  57. package/build/comment-template/util.js.map +1 -0
  58. package/build/comments-pagination/comments-pagination-arrow-controls.js +39 -0
  59. package/build/comments-pagination/comments-pagination-arrow-controls.js.map +1 -0
  60. package/build/comments-pagination/edit.js +79 -0
  61. package/build/comments-pagination/edit.js.map +1 -0
  62. package/build/comments-pagination/index.js +76 -0
  63. package/build/comments-pagination/index.js.map +1 -0
  64. package/build/comments-pagination/save.js +18 -0
  65. package/build/comments-pagination/save.js.map +1 -0
  66. package/build/comments-pagination-next/edit.js +54 -0
  67. package/build/comments-pagination-next/edit.js.map +1 -0
  68. package/build/comments-pagination-next/index.js +69 -0
  69. package/build/comments-pagination-next/index.js.map +1 -0
  70. package/build/comments-pagination-numbers/edit.js +47 -0
  71. package/build/comments-pagination-numbers/edit.js.map +1 -0
  72. package/build/comments-pagination-numbers/index.js +46 -0
  73. package/build/comments-pagination-numbers/index.js.map +1 -0
  74. package/build/comments-pagination-previous/edit.js +54 -0
  75. package/build/comments-pagination-previous/edit.js.map +1 -0
  76. package/build/comments-pagination-previous/index.js +69 -0
  77. package/build/comments-pagination-previous/index.js.map +1 -0
  78. package/build/comments-query-loop/edit/comments-inspector-controls.js +102 -0
  79. package/build/comments-query-loop/edit/comments-inspector-controls.js.map +1 -0
  80. package/build/comments-query-loop/edit.js +23 -28
  81. package/build/comments-query-loop/edit.js.map +1 -1
  82. package/build/comments-query-loop/index.js +21 -8
  83. package/build/comments-query-loop/index.js.map +1 -1
  84. package/build/cover/deprecated.js +181 -15
  85. package/build/cover/deprecated.js.map +1 -1
  86. package/build/cover/edit.js +9 -5
  87. package/build/cover/edit.js.map +1 -1
  88. package/build/cover/edit.native.js +40 -32
  89. package/build/cover/edit.native.js.map +1 -1
  90. package/build/cover/index.js +1 -0
  91. package/build/cover/index.js.map +1 -1
  92. package/build/cover/overlay-color-settings.native.js +11 -1
  93. package/build/cover/overlay-color-settings.native.js.map +1 -1
  94. package/build/cover/save.js +8 -3
  95. package/build/cover/save.js.map +1 -1
  96. package/build/embed/deprecated.js +1 -0
  97. package/build/embed/deprecated.js.map +1 -1
  98. package/build/embed/edit.native.js +23 -20
  99. package/build/embed/edit.native.js.map +1 -1
  100. package/build/embed/embed-controls.native.js +69 -0
  101. package/build/embed/embed-controls.native.js.map +1 -0
  102. package/build/embed/embed-link-settings.native.js +101 -0
  103. package/build/embed/embed-link-settings.native.js.map +1 -0
  104. package/build/embed/embed-loading.js +1 -3
  105. package/build/embed/embed-loading.js.map +1 -1
  106. package/build/embed/embed-placeholder.native.js +9 -2
  107. package/build/embed/embed-placeholder.native.js.map +1 -1
  108. package/build/embed/index.js +1 -0
  109. package/build/embed/index.js.map +1 -1
  110. package/build/embed/transforms.js +1 -0
  111. package/build/embed/transforms.js.map +1 -1
  112. package/build/embed/util.js +1 -0
  113. package/build/embed/util.js.map +1 -1
  114. package/build/file/edit.native.js +5 -2
  115. package/build/file/edit.native.js.map +1 -1
  116. package/build/file/index.js +1 -0
  117. package/build/file/index.js.map +1 -1
  118. package/build/freeform/index.js +1 -0
  119. package/build/freeform/index.js.map +1 -1
  120. package/build/gallery/constants.js +5 -1
  121. package/build/gallery/constants.js.map +1 -1
  122. package/build/gallery/deprecated.js +4 -0
  123. package/build/gallery/deprecated.js.map +1 -1
  124. package/build/gallery/edit.js +45 -14
  125. package/build/gallery/edit.js.map +1 -1
  126. package/build/gallery/gallery.native.js +1 -1
  127. package/build/gallery/gallery.native.js.map +1 -1
  128. package/build/gallery/index.js +1 -0
  129. package/build/gallery/index.js.map +1 -1
  130. package/build/gallery/shared.js +1 -1
  131. package/build/gallery/shared.js.map +1 -1
  132. package/build/gallery/transforms.js +8 -2
  133. package/build/gallery/transforms.js.map +1 -1
  134. package/build/gallery/utils.js +4 -3
  135. package/build/gallery/utils.js.map +1 -1
  136. package/build/group/index.js +24 -2
  137. package/build/group/index.js.map +1 -1
  138. package/build/group/variations.js +18 -3
  139. package/build/group/variations.js.map +1 -1
  140. package/build/heading/edit.js +2 -0
  141. package/build/heading/edit.js.map +1 -1
  142. package/build/heading/index.js +6 -1
  143. package/build/heading/index.js.map +1 -1
  144. package/build/heading/transforms.js +8 -5
  145. package/build/heading/transforms.js.map +1 -1
  146. package/build/home-link/index.js +1 -0
  147. package/build/home-link/index.js.map +1 -1
  148. package/build/html/index.js +1 -0
  149. package/build/html/index.js.map +1 -1
  150. package/build/image/edit.js +56 -5
  151. package/build/image/edit.js.map +1 -1
  152. package/build/image/edit.native.js +59 -19
  153. package/build/image/edit.native.js.map +1 -1
  154. package/build/image/image.js +15 -4
  155. package/build/image/image.js.map +1 -1
  156. package/build/image/index.js +5 -1
  157. package/build/image/index.js.map +1 -1
  158. package/build/index.js +17 -3
  159. package/build/index.js.map +1 -1
  160. package/build/latest-comments/index.js +1 -0
  161. package/build/latest-comments/index.js.map +1 -1
  162. package/build/latest-posts/deprecated.js +1 -0
  163. package/build/latest-posts/deprecated.js.map +1 -1
  164. package/build/latest-posts/edit.js +47 -58
  165. package/build/latest-posts/edit.js.map +1 -1
  166. package/build/latest-posts/index.js +1 -0
  167. package/build/latest-posts/index.js.map +1 -1
  168. package/build/list/index.js +6 -1
  169. package/build/list/index.js.map +1 -1
  170. package/build/loginout/index.js +1 -0
  171. package/build/loginout/index.js.map +1 -1
  172. package/build/media-text/index.js +6 -1
  173. package/build/media-text/index.js.map +1 -1
  174. package/build/missing/index.js +1 -0
  175. package/build/missing/index.js.map +1 -1
  176. package/build/more/index.js +1 -0
  177. package/build/more/index.js.map +1 -1
  178. package/build/navigation/edit/existing-menus-options.js +62 -0
  179. package/build/navigation/edit/existing-menus-options.js.map +1 -0
  180. package/build/navigation/edit/index.js +48 -15
  181. package/build/navigation/edit/index.js.map +1 -1
  182. package/build/navigation/edit/inner-blocks.js +10 -4
  183. package/build/navigation/edit/inner-blocks.js.map +1 -1
  184. package/build/navigation/edit/navigation-menu-selector.js +51 -21
  185. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  186. package/build/navigation/edit/overlay-menu-icon.js +35 -0
  187. package/build/navigation/edit/overlay-menu-icon.js.map +1 -0
  188. package/build/navigation/edit/placeholder/index.js +33 -109
  189. package/build/navigation/edit/placeholder/index.js.map +1 -1
  190. package/build/navigation/edit/placeholder/placeholder-preview.js +8 -12
  191. package/build/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
  192. package/build/navigation/edit/responsive-wrapper.js +11 -22
  193. package/build/navigation/edit/responsive-wrapper.js.map +1 -1
  194. package/build/navigation/index.js +10 -1
  195. package/build/navigation/index.js.map +1 -1
  196. package/build/navigation/menu-items-to-blocks.js +4 -1
  197. package/build/navigation/menu-items-to-blocks.js.map +1 -1
  198. package/build/navigation/use-convert-classic-menu.js +59 -0
  199. package/build/navigation/use-convert-classic-menu.js.map +1 -0
  200. package/build/navigation/use-navigation-entities.js +6 -3
  201. package/build/navigation/use-navigation-entities.js.map +1 -1
  202. package/build/navigation-area/edit.js +2 -1
  203. package/build/navigation-area/edit.js.map +1 -1
  204. package/build/navigation-area/index.js +2 -1
  205. package/build/navigation-area/index.js.map +1 -1
  206. package/build/navigation-link/edit.js +7 -0
  207. package/build/navigation-link/edit.js.map +1 -1
  208. package/build/navigation-link/index.js +1 -0
  209. package/build/navigation-link/index.js.map +1 -1
  210. package/build/navigation-submenu/edit.js +4 -1
  211. package/build/navigation-submenu/edit.js.map +1 -1
  212. package/build/navigation-submenu/index.js +1 -0
  213. package/build/navigation-submenu/index.js.map +1 -1
  214. package/build/nextpage/index.js +1 -0
  215. package/build/nextpage/index.js.map +1 -1
  216. package/build/page-list/edit.js +37 -10
  217. package/build/page-list/edit.js.map +1 -1
  218. package/build/page-list/index.js +6 -1
  219. package/build/page-list/index.js.map +1 -1
  220. package/build/paragraph/edit.js +12 -2
  221. package/build/paragraph/edit.js.map +1 -1
  222. package/build/paragraph/index.js +7 -2
  223. package/build/paragraph/index.js.map +1 -1
  224. package/build/paragraph/transforms.js +7 -2
  225. package/build/paragraph/transforms.js.map +1 -1
  226. package/build/pattern/index.js +1 -0
  227. package/build/pattern/index.js.map +1 -1
  228. package/build/post-author/index.js +7 -2
  229. package/build/post-author/index.js.map +1 -1
  230. package/build/post-author-biography/edit.js +76 -0
  231. package/build/post-author-biography/edit.js.map +1 -0
  232. package/build/post-author-biography/index.js +68 -0
  233. package/build/post-author-biography/index.js.map +1 -0
  234. package/build/post-author-name/edit.js +98 -0
  235. package/build/post-author-name/edit.js.map +1 -0
  236. package/build/post-author-name/index.js +75 -0
  237. package/build/post-author-name/index.js.map +1 -0
  238. package/build/post-comment/index.js +1 -0
  239. package/build/post-comment/index.js.map +1 -1
  240. package/build/post-comments/index.js +6 -1
  241. package/build/post-comments/index.js.map +1 -1
  242. package/build/post-comments-count/index.js +6 -1
  243. package/build/post-comments-count/index.js.map +1 -1
  244. package/build/post-comments-form/index.js +6 -1
  245. package/build/post-comments-form/index.js.map +1 -1
  246. package/build/post-comments-link/index.js +6 -1
  247. package/build/post-comments-link/index.js.map +1 -1
  248. package/build/post-content/edit.js +9 -3
  249. package/build/post-content/edit.js.map +1 -1
  250. package/build/post-content/index.js +1 -0
  251. package/build/post-content/index.js.map +1 -1
  252. package/build/post-date/index.js +7 -1
  253. package/build/post-date/index.js.map +1 -1
  254. package/build/post-excerpt/edit.js +2 -1
  255. package/build/post-excerpt/edit.js.map +1 -1
  256. package/build/post-excerpt/index.js +10 -1
  257. package/build/post-excerpt/index.js.map +1 -1
  258. package/build/post-excerpt/transforms.js +27 -0
  259. package/build/post-excerpt/transforms.js.map +1 -0
  260. package/build/post-featured-image/dimension-controls.js +74 -32
  261. package/build/post-featured-image/dimension-controls.js.map +1 -1
  262. package/build/post-featured-image/edit.js +52 -20
  263. package/build/post-featured-image/edit.js.map +1 -1
  264. package/build/post-featured-image/index.js +4 -0
  265. package/build/post-featured-image/index.js.map +1 -1
  266. package/build/post-navigation-link/index.js +1 -0
  267. package/build/post-navigation-link/index.js.map +1 -1
  268. package/build/post-template/edit.js +34 -7
  269. package/build/post-template/edit.js.map +1 -1
  270. package/build/post-template/index.js +2 -1
  271. package/build/post-template/index.js.map +1 -1
  272. package/build/post-terms/index.js +10 -1
  273. package/build/post-terms/index.js.map +1 -1
  274. package/build/post-title/edit.js +10 -7
  275. package/build/post-title/edit.js.map +1 -1
  276. package/build/post-title/index.js +7 -1
  277. package/build/post-title/index.js.map +1 -1
  278. package/build/preformatted/edit.native.js +3 -6
  279. package/build/preformatted/edit.native.js.map +1 -1
  280. package/build/preformatted/index.js +6 -1
  281. package/build/preformatted/index.js.map +1 -1
  282. package/build/pullquote/index.js +13 -2
  283. package/build/pullquote/index.js.map +1 -1
  284. package/build/query/deprecated.js +96 -3
  285. package/build/query/deprecated.js.map +1 -1
  286. package/build/query/edit/index.js +4 -4
  287. package/build/query/edit/index.js.map +1 -1
  288. package/build/query/edit/inspector-controls/author-control.js +102 -0
  289. package/build/query/edit/inspector-controls/author-control.js.map +1 -0
  290. package/build/query/edit/inspector-controls/index.js +166 -0
  291. package/build/query/edit/inspector-controls/index.js.map +1 -0
  292. package/build/query/edit/inspector-controls/order-control.js +55 -0
  293. package/build/query/edit/inspector-controls/order-control.js.map +1 -0
  294. package/build/query/edit/inspector-controls/taxonomy-controls.js +158 -0
  295. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -0
  296. package/build/query/index.js +8 -4
  297. package/build/query/index.js.map +1 -1
  298. package/build/query/utils.js +49 -38
  299. package/build/query/utils.js.map +1 -1
  300. package/build/query/variations.js +0 -4
  301. package/build/query/variations.js.map +1 -1
  302. package/build/query-pagination/index.js +8 -2
  303. package/build/query-pagination/index.js.map +1 -1
  304. package/build/query-pagination-next/index.js +6 -2
  305. package/build/query-pagination-next/index.js.map +1 -1
  306. package/build/query-pagination-numbers/index.js +2 -1
  307. package/build/query-pagination-numbers/index.js.map +1 -1
  308. package/build/query-pagination-previous/index.js +6 -2
  309. package/build/query-pagination-previous/index.js.map +1 -1
  310. package/build/query-title/index.js +9 -1
  311. package/build/query-title/index.js.map +1 -1
  312. package/build/quote/index.js +2 -5
  313. package/build/quote/index.js.map +1 -1
  314. package/build/read-more/edit.js +55 -0
  315. package/build/read-more/edit.js.map +1 -0
  316. package/build/read-more/index.js +87 -0
  317. package/build/read-more/index.js.map +1 -0
  318. package/build/rss/index.js +1 -0
  319. package/build/rss/index.js.map +1 -1
  320. package/build/search/edit.js +6 -4
  321. package/build/search/edit.js.map +1 -1
  322. package/build/search/edit.native.js +2 -2
  323. package/build/search/edit.native.js.map +1 -1
  324. package/build/search/index.js +13 -2
  325. package/build/search/index.js.map +1 -1
  326. package/build/separator/index.js +1 -0
  327. package/build/separator/index.js.map +1 -1
  328. package/build/shortcode/index.js +1 -0
  329. package/build/shortcode/index.js.map +1 -1
  330. package/build/site-logo/edit.js +4 -33
  331. package/build/site-logo/edit.js.map +1 -1
  332. package/build/site-logo/index.js +5 -1
  333. package/build/site-logo/index.js.map +1 -1
  334. package/build/site-logo/transforms.js +31 -0
  335. package/build/site-logo/transforms.js.map +1 -0
  336. package/build/site-tagline/edit.js +7 -2
  337. package/build/site-tagline/edit.js.map +1 -1
  338. package/build/site-tagline/index.js +7 -2
  339. package/build/site-tagline/index.js.map +1 -1
  340. package/build/site-title/index.js +10 -1
  341. package/build/site-title/index.js.map +1 -1
  342. package/build/site-title/transforms.js +31 -0
  343. package/build/site-title/transforms.js.map +1 -0
  344. package/build/social-link/edit.js +8 -1
  345. package/build/social-link/edit.js.map +1 -1
  346. package/build/social-link/index.js +3 -2
  347. package/build/social-link/index.js.map +1 -1
  348. package/build/social-links/edit.js +36 -25
  349. package/build/social-links/edit.js.map +1 -1
  350. package/build/social-links/index.js +7 -1
  351. package/build/social-links/index.js.map +1 -1
  352. package/build/social-links/save.js +2 -0
  353. package/build/social-links/save.js.map +1 -1
  354. package/build/spacer/controls.js +111 -0
  355. package/build/spacer/controls.js.map +1 -0
  356. package/build/spacer/controls.native.js +95 -0
  357. package/build/spacer/controls.native.js.map +1 -0
  358. package/build/spacer/deprecated.js +53 -0
  359. package/build/spacer/deprecated.js.map +1 -0
  360. package/build/spacer/edit.js +117 -98
  361. package/build/spacer/edit.js.map +1 -1
  362. package/build/spacer/edit.native.js +76 -0
  363. package/build/spacer/edit.native.js.map +1 -0
  364. package/build/spacer/index.js +8 -4
  365. package/build/spacer/index.js.map +1 -1
  366. package/build/spacer/save.js +6 -3
  367. package/build/spacer/save.js.map +1 -1
  368. package/build/table/index.js +12 -2
  369. package/build/table/index.js.map +1 -1
  370. package/build/table-of-contents/index.js +1 -0
  371. package/build/table-of-contents/index.js.map +1 -1
  372. package/build/tag-cloud/index.js +13 -1
  373. package/build/tag-cloud/index.js.map +1 -1
  374. package/build/tag-cloud/transforms.js +27 -0
  375. package/build/tag-cloud/transforms.js.map +1 -0
  376. package/build/template-part/index.js +1 -0
  377. package/build/template-part/index.js.map +1 -1
  378. package/build/term-description/index.js +6 -1
  379. package/build/term-description/index.js.map +1 -1
  380. package/build/text-columns/index.js +1 -0
  381. package/build/text-columns/index.js.map +1 -1
  382. package/build/verse/index.js +6 -1
  383. package/build/verse/index.js.map +1 -1
  384. package/build/video/index.js +1 -0
  385. package/build/video/index.js.map +1 -1
  386. package/build-module/archives/index.js +1 -0
  387. package/build-module/archives/index.js.map +1 -1
  388. package/build-module/audio/edit.js +18 -6
  389. package/build-module/audio/edit.js.map +1 -1
  390. package/build-module/audio/index.js +1 -0
  391. package/build-module/audio/index.js.map +1 -1
  392. package/build-module/block/index.js +1 -0
  393. package/build-module/block/index.js.map +1 -1
  394. package/build-module/button/edit.native.js +1 -1
  395. package/build-module/button/edit.native.js.map +1 -1
  396. package/build-module/button/index.js +10 -2
  397. package/build-module/button/index.js.map +1 -1
  398. package/build-module/buttons/edit.js +6 -0
  399. package/build-module/buttons/edit.js.map +1 -1
  400. package/build-module/buttons/edit.native.js +17 -7
  401. package/build-module/buttons/edit.native.js.map +1 -1
  402. package/build-module/buttons/index.js +1 -0
  403. package/build-module/buttons/index.js.map +1 -1
  404. package/build-module/buttons/transforms.js +1 -0
  405. package/build-module/buttons/transforms.js.map +1 -1
  406. package/build-module/calendar/index.js +4 -1
  407. package/build-module/calendar/index.js.map +1 -1
  408. package/build-module/calendar/transforms.js +18 -0
  409. package/build-module/calendar/transforms.js.map +1 -0
  410. package/build-module/categories/index.js +1 -0
  411. package/build-module/categories/index.js.map +1 -1
  412. package/build-module/code/index.js +11 -2
  413. package/build-module/code/index.js.map +1 -1
  414. package/build-module/code/transforms.js +1 -1
  415. package/build-module/code/transforms.js.map +1 -1
  416. package/build-module/column/index.js +6 -1
  417. package/build-module/column/index.js.map +1 -1
  418. package/build-module/columns/index.js +16 -1
  419. package/build-module/columns/index.js.map +1 -1
  420. package/build-module/comment-author-avatar/edit.js +6 -3
  421. package/build-module/comment-author-avatar/edit.js.map +1 -1
  422. package/build-module/comment-author-avatar/index.js +9 -1
  423. package/build-module/comment-author-avatar/index.js.map +1 -1
  424. package/build-module/comment-author-name/index.js +7 -1
  425. package/build-module/comment-author-name/index.js.map +1 -1
  426. package/build-module/comment-content/index.js +6 -1
  427. package/build-module/comment-content/index.js.map +1 -1
  428. package/build-module/comment-date/index.js +7 -1
  429. package/build-module/comment-date/index.js.map +1 -1
  430. package/build-module/comment-edit-link/index.js +7 -2
  431. package/build-module/comment-edit-link/index.js.map +1 -1
  432. package/build-module/comment-reply-link/index.js +6 -1
  433. package/build-module/comment-reply-link/index.js.map +1 -1
  434. package/build-module/comment-template/edit.js +153 -28
  435. package/build-module/comment-template/edit.js.map +1 -1
  436. package/build-module/comment-template/index.js +4 -2
  437. package/build-module/comment-template/index.js.map +1 -1
  438. package/build-module/comment-template/util.js +59 -0
  439. package/build-module/comment-template/util.js.map +1 -0
  440. package/build-module/comments-pagination/comments-pagination-arrow-controls.js +30 -0
  441. package/build-module/comments-pagination/comments-pagination-arrow-controls.js.map +1 -0
  442. package/build-module/comments-pagination/edit.js +66 -0
  443. package/build-module/comments-pagination/edit.js.map +1 -0
  444. package/build-module/comments-pagination/index.js +62 -0
  445. package/build-module/comments-pagination/index.js.map +1 -0
  446. package/build-module/comments-pagination/save.js +10 -0
  447. package/build-module/comments-pagination/save.js.map +1 -0
  448. package/build-module/comments-pagination-next/edit.js +41 -0
  449. package/build-module/comments-pagination-next/edit.js.map +1 -0
  450. package/build-module/comments-pagination-next/index.js +56 -0
  451. package/build-module/comments-pagination-next/index.js.map +1 -0
  452. package/build-module/comments-pagination-numbers/edit.js +40 -0
  453. package/build-module/comments-pagination-numbers/edit.js.map +1 -0
  454. package/build-module/comments-pagination-numbers/index.js +33 -0
  455. package/build-module/comments-pagination-numbers/index.js.map +1 -0
  456. package/build-module/comments-pagination-previous/edit.js +41 -0
  457. package/build-module/comments-pagination-previous/edit.js.map +1 -0
  458. package/build-module/comments-pagination-previous/index.js +56 -0
  459. package/build-module/comments-pagination-previous/index.js.map +1 -0
  460. package/build-module/comments-query-loop/edit/comments-inspector-controls.js +91 -0
  461. package/build-module/comments-query-loop/edit/comments-inspector-controls.js.map +1 -0
  462. package/build-module/comments-query-loop/edit.js +24 -28
  463. package/build-module/comments-query-loop/edit.js.map +1 -1
  464. package/build-module/comments-query-loop/index.js +21 -8
  465. package/build-module/comments-query-loop/index.js.map +1 -1
  466. package/build-module/cover/deprecated.js +185 -17
  467. package/build-module/cover/deprecated.js.map +1 -1
  468. package/build-module/cover/edit.js +9 -5
  469. package/build-module/cover/edit.js.map +1 -1
  470. package/build-module/cover/edit.native.js +41 -34
  471. package/build-module/cover/edit.native.js.map +1 -1
  472. package/build-module/cover/index.js +1 -0
  473. package/build-module/cover/index.js.map +1 -1
  474. package/build-module/cover/overlay-color-settings.native.js +11 -1
  475. package/build-module/cover/overlay-color-settings.native.js.map +1 -1
  476. package/build-module/cover/save.js +8 -3
  477. package/build-module/cover/save.js.map +1 -1
  478. package/build-module/embed/deprecated.js +1 -0
  479. package/build-module/embed/deprecated.js.map +1 -1
  480. package/build-module/embed/edit.native.js +24 -21
  481. package/build-module/embed/edit.native.js.map +1 -1
  482. package/build-module/embed/embed-controls.native.js +54 -0
  483. package/build-module/embed/embed-controls.native.js.map +1 -0
  484. package/build-module/embed/embed-link-settings.native.js +90 -0
  485. package/build-module/embed/embed-link-settings.native.js.map +1 -0
  486. package/build-module/embed/embed-loading.js +1 -2
  487. package/build-module/embed/embed-loading.js.map +1 -1
  488. package/build-module/embed/embed-placeholder.native.js +9 -2
  489. package/build-module/embed/embed-placeholder.native.js.map +1 -1
  490. package/build-module/embed/index.js +1 -0
  491. package/build-module/embed/index.js.map +1 -1
  492. package/build-module/embed/transforms.js +1 -0
  493. package/build-module/embed/transforms.js.map +1 -1
  494. package/build-module/embed/util.js +1 -0
  495. package/build-module/embed/util.js.map +1 -1
  496. package/build-module/file/edit.native.js +4 -2
  497. package/build-module/file/edit.native.js.map +1 -1
  498. package/build-module/file/index.js +1 -0
  499. package/build-module/file/index.js.map +1 -1
  500. package/build-module/freeform/index.js +1 -0
  501. package/build-module/freeform/index.js.map +1 -1
  502. package/build-module/gallery/constants.js +2 -0
  503. package/build-module/gallery/constants.js.map +1 -1
  504. package/build-module/gallery/deprecated.js +4 -0
  505. package/build-module/gallery/deprecated.js.map +1 -1
  506. package/build-module/gallery/edit.js +45 -15
  507. package/build-module/gallery/edit.js.map +1 -1
  508. package/build-module/gallery/gallery.native.js +1 -1
  509. package/build-module/gallery/gallery.native.js.map +1 -1
  510. package/build-module/gallery/index.js +1 -0
  511. package/build-module/gallery/index.js.map +1 -1
  512. package/build-module/gallery/shared.js +1 -1
  513. package/build-module/gallery/shared.js.map +1 -1
  514. package/build-module/gallery/transforms.js +8 -2
  515. package/build-module/gallery/transforms.js.map +1 -1
  516. package/build-module/gallery/utils.js +5 -4
  517. package/build-module/gallery/utils.js.map +1 -1
  518. package/build-module/group/index.js +24 -2
  519. package/build-module/group/index.js.map +1 -1
  520. package/build-module/group/variations.js +18 -3
  521. package/build-module/group/variations.js.map +1 -1
  522. package/build-module/heading/edit.js +3 -1
  523. package/build-module/heading/edit.js.map +1 -1
  524. package/build-module/heading/index.js +6 -1
  525. package/build-module/heading/index.js.map +1 -1
  526. package/build-module/heading/transforms.js +8 -5
  527. package/build-module/heading/transforms.js.map +1 -1
  528. package/build-module/home-link/index.js +1 -0
  529. package/build-module/home-link/index.js.map +1 -1
  530. package/build-module/html/index.js +1 -0
  531. package/build-module/html/index.js.map +1 -1
  532. package/build-module/image/edit.js +52 -4
  533. package/build-module/image/edit.js.map +1 -1
  534. package/build-module/image/edit.native.js +58 -19
  535. package/build-module/image/edit.native.js.map +1 -1
  536. package/build-module/image/image.js +16 -5
  537. package/build-module/image/image.js.map +1 -1
  538. package/build-module/image/index.js +5 -1
  539. package/build-module/image/index.js.map +1 -1
  540. package/build-module/index.js +10 -3
  541. package/build-module/index.js.map +1 -1
  542. package/build-module/latest-comments/index.js +1 -0
  543. package/build-module/latest-comments/index.js.map +1 -1
  544. package/build-module/latest-posts/deprecated.js +1 -0
  545. package/build-module/latest-posts/deprecated.js.map +1 -1
  546. package/build-module/latest-posts/edit.js +48 -59
  547. package/build-module/latest-posts/edit.js.map +1 -1
  548. package/build-module/latest-posts/index.js +1 -0
  549. package/build-module/latest-posts/index.js.map +1 -1
  550. package/build-module/list/index.js +6 -1
  551. package/build-module/list/index.js.map +1 -1
  552. package/build-module/loginout/index.js +1 -0
  553. package/build-module/loginout/index.js.map +1 -1
  554. package/build-module/media-text/index.js +6 -1
  555. package/build-module/media-text/index.js.map +1 -1
  556. package/build-module/missing/index.js +1 -0
  557. package/build-module/missing/index.js.map +1 -1
  558. package/build-module/more/index.js +1 -0
  559. package/build-module/more/index.js.map +1 -1
  560. package/build-module/navigation/edit/existing-menus-options.js +53 -0
  561. package/build-module/navigation/edit/existing-menus-options.js.map +1 -0
  562. package/build-module/navigation/edit/index.js +46 -15
  563. package/build-module/navigation/edit/index.js.map +1 -1
  564. package/build-module/navigation/edit/inner-blocks.js +11 -5
  565. package/build-module/navigation/edit/inner-blocks.js.map +1 -1
  566. package/build-module/navigation/edit/navigation-menu-selector.js +49 -21
  567. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  568. package/build-module/navigation/edit/overlay-menu-icon.js +27 -0
  569. package/build-module/navigation/edit/overlay-menu-icon.js.map +1 -0
  570. package/build-module/navigation/edit/placeholder/index.js +32 -109
  571. package/build-module/navigation/edit/placeholder/index.js.map +1 -1
  572. package/build-module/navigation/edit/placeholder/placeholder-preview.js +8 -13
  573. package/build-module/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
  574. package/build-module/navigation/edit/responsive-wrapper.js +10 -21
  575. package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
  576. package/build-module/navigation/index.js +10 -1
  577. package/build-module/navigation/index.js.map +1 -1
  578. package/build-module/navigation/menu-items-to-blocks.js +4 -1
  579. package/build-module/navigation/menu-items-to-blocks.js.map +1 -1
  580. package/build-module/navigation/use-convert-classic-menu.js +47 -0
  581. package/build-module/navigation/use-convert-classic-menu.js.map +1 -0
  582. package/build-module/navigation/use-navigation-entities.js +6 -3
  583. package/build-module/navigation/use-navigation-entities.js.map +1 -1
  584. package/build-module/navigation-area/edit.js +2 -1
  585. package/build-module/navigation-area/edit.js.map +1 -1
  586. package/build-module/navigation-area/index.js +2 -1
  587. package/build-module/navigation-area/index.js.map +1 -1
  588. package/build-module/navigation-link/edit.js +7 -0
  589. package/build-module/navigation-link/edit.js.map +1 -1
  590. package/build-module/navigation-link/index.js +1 -0
  591. package/build-module/navigation-link/index.js.map +1 -1
  592. package/build-module/navigation-submenu/edit.js +4 -1
  593. package/build-module/navigation-submenu/edit.js.map +1 -1
  594. package/build-module/navigation-submenu/index.js +1 -0
  595. package/build-module/navigation-submenu/index.js.map +1 -1
  596. package/build-module/nextpage/index.js +1 -0
  597. package/build-module/nextpage/index.js.map +1 -1
  598. package/build-module/page-list/edit.js +38 -11
  599. package/build-module/page-list/edit.js.map +1 -1
  600. package/build-module/page-list/index.js +6 -1
  601. package/build-module/page-list/index.js.map +1 -1
  602. package/build-module/paragraph/edit.js +13 -3
  603. package/build-module/paragraph/edit.js.map +1 -1
  604. package/build-module/paragraph/index.js +7 -2
  605. package/build-module/paragraph/index.js.map +1 -1
  606. package/build-module/paragraph/transforms.js +7 -2
  607. package/build-module/paragraph/transforms.js.map +1 -1
  608. package/build-module/pattern/index.js +1 -0
  609. package/build-module/pattern/index.js.map +1 -1
  610. package/build-module/post-author/index.js +7 -2
  611. package/build-module/post-author/index.js.map +1 -1
  612. package/build-module/post-author-biography/edit.js +64 -0
  613. package/build-module/post-author-biography/edit.js.map +1 -0
  614. package/build-module/post-author-biography/index.js +59 -0
  615. package/build-module/post-author-biography/index.js.map +1 -0
  616. package/build-module/post-author-name/edit.js +85 -0
  617. package/build-module/post-author-name/edit.js.map +1 -0
  618. package/build-module/post-author-name/index.js +66 -0
  619. package/build-module/post-author-name/index.js.map +1 -0
  620. package/build-module/post-comment/index.js +1 -0
  621. package/build-module/post-comment/index.js.map +1 -1
  622. package/build-module/post-comments/index.js +6 -1
  623. package/build-module/post-comments/index.js.map +1 -1
  624. package/build-module/post-comments-count/index.js +6 -1
  625. package/build-module/post-comments-count/index.js.map +1 -1
  626. package/build-module/post-comments-form/index.js +6 -1
  627. package/build-module/post-comments-form/index.js.map +1 -1
  628. package/build-module/post-comments-link/index.js +6 -1
  629. package/build-module/post-comments-link/index.js.map +1 -1
  630. package/build-module/post-content/edit.js +6 -4
  631. package/build-module/post-content/edit.js.map +1 -1
  632. package/build-module/post-content/index.js +1 -0
  633. package/build-module/post-content/index.js.map +1 -1
  634. package/build-module/post-date/index.js +7 -1
  635. package/build-module/post-date/index.js.map +1 -1
  636. package/build-module/post-excerpt/edit.js +2 -1
  637. package/build-module/post-excerpt/edit.js.map +1 -1
  638. package/build-module/post-excerpt/index.js +9 -1
  639. package/build-module/post-excerpt/index.js.map +1 -1
  640. package/build-module/post-excerpt/transforms.js +18 -0
  641. package/build-module/post-excerpt/transforms.js.map +1 -0
  642. package/build-module/post-featured-image/dimension-controls.js +76 -31
  643. package/build-module/post-featured-image/dimension-controls.js.map +1 -1
  644. package/build-module/post-featured-image/edit.js +54 -22
  645. package/build-module/post-featured-image/edit.js.map +1 -1
  646. package/build-module/post-featured-image/index.js +4 -0
  647. package/build-module/post-featured-image/index.js.map +1 -1
  648. package/build-module/post-navigation-link/index.js +1 -0
  649. package/build-module/post-navigation-link/index.js.map +1 -1
  650. package/build-module/post-template/edit.js +34 -7
  651. package/build-module/post-template/edit.js.map +1 -1
  652. package/build-module/post-template/index.js +2 -1
  653. package/build-module/post-template/index.js.map +1 -1
  654. package/build-module/post-terms/index.js +13 -1
  655. package/build-module/post-terms/index.js.map +1 -1
  656. package/build-module/post-title/edit.js +10 -8
  657. package/build-module/post-title/edit.js.map +1 -1
  658. package/build-module/post-title/index.js +7 -1
  659. package/build-module/post-title/index.js.map +1 -1
  660. package/build-module/preformatted/edit.native.js +3 -3
  661. package/build-module/preformatted/edit.native.js.map +1 -1
  662. package/build-module/preformatted/index.js +6 -1
  663. package/build-module/preformatted/index.js.map +1 -1
  664. package/build-module/pullquote/index.js +13 -2
  665. package/build-module/pullquote/index.js.map +1 -1
  666. package/build-module/query/deprecated.js +95 -4
  667. package/build-module/query/deprecated.js.map +1 -1
  668. package/build-module/query/edit/index.js +3 -3
  669. package/build-module/query/edit/index.js.map +1 -1
  670. package/build-module/query/edit/inspector-controls/author-control.js +89 -0
  671. package/build-module/query/edit/inspector-controls/author-control.js.map +1 -0
  672. package/build-module/query/edit/inspector-controls/index.js +149 -0
  673. package/build-module/query/edit/inspector-controls/index.js.map +1 -0
  674. package/build-module/query/edit/inspector-controls/order-control.js +45 -0
  675. package/build-module/query/edit/inspector-controls/order-control.js.map +1 -0
  676. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +145 -0
  677. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -0
  678. package/build-module/query/index.js +8 -4
  679. package/build-module/query/index.js.map +1 -1
  680. package/build-module/query/utils.js +43 -35
  681. package/build-module/query/utils.js.map +1 -1
  682. package/build-module/query/variations.js +0 -4
  683. package/build-module/query/variations.js.map +1 -1
  684. package/build-module/query-pagination/index.js +8 -2
  685. package/build-module/query-pagination/index.js.map +1 -1
  686. package/build-module/query-pagination-next/index.js +6 -2
  687. package/build-module/query-pagination-next/index.js.map +1 -1
  688. package/build-module/query-pagination-numbers/index.js +2 -1
  689. package/build-module/query-pagination-numbers/index.js.map +1 -1
  690. package/build-module/query-pagination-previous/index.js +6 -2
  691. package/build-module/query-pagination-previous/index.js.map +1 -1
  692. package/build-module/query-title/index.js +12 -1
  693. package/build-module/query-title/index.js.map +1 -1
  694. package/build-module/quote/index.js +2 -5
  695. package/build-module/quote/index.js.map +1 -1
  696. package/build-module/read-more/edit.js +41 -0
  697. package/build-module/read-more/edit.js.map +1 -0
  698. package/build-module/read-more/index.js +74 -0
  699. package/build-module/read-more/index.js.map +1 -0
  700. package/build-module/rss/index.js +1 -0
  701. package/build-module/rss/index.js.map +1 -1
  702. package/build-module/search/edit.js +6 -4
  703. package/build-module/search/edit.js.map +1 -1
  704. package/build-module/search/edit.native.js +2 -2
  705. package/build-module/search/edit.native.js.map +1 -1
  706. package/build-module/search/index.js +13 -2
  707. package/build-module/search/index.js.map +1 -1
  708. package/build-module/separator/index.js +1 -0
  709. package/build-module/separator/index.js.map +1 -1
  710. package/build-module/shortcode/index.js +1 -0
  711. package/build-module/shortcode/index.js.map +1 -1
  712. package/build-module/site-logo/edit.js +4 -33
  713. package/build-module/site-logo/edit.js.map +1 -1
  714. package/build-module/site-logo/index.js +4 -1
  715. package/build-module/site-logo/index.js.map +1 -1
  716. package/build-module/site-logo/transforms.js +22 -0
  717. package/build-module/site-logo/transforms.js.map +1 -0
  718. package/build-module/site-tagline/edit.js +6 -2
  719. package/build-module/site-tagline/edit.js.map +1 -1
  720. package/build-module/site-tagline/index.js +7 -2
  721. package/build-module/site-tagline/index.js.map +1 -1
  722. package/build-module/site-title/index.js +9 -1
  723. package/build-module/site-title/index.js.map +1 -1
  724. package/build-module/site-title/transforms.js +22 -0
  725. package/build-module/site-title/transforms.js.map +1 -0
  726. package/build-module/social-link/edit.js +8 -1
  727. package/build-module/social-link/edit.js.map +1 -1
  728. package/build-module/social-link/index.js +3 -2
  729. package/build-module/social-link/index.js.map +1 -1
  730. package/build-module/social-links/edit.js +36 -25
  731. package/build-module/social-links/edit.js.map +1 -1
  732. package/build-module/social-links/index.js +7 -1
  733. package/build-module/social-links/index.js.map +1 -1
  734. package/build-module/social-links/save.js +2 -0
  735. package/build-module/social-links/save.js.map +1 -1
  736. package/build-module/spacer/controls.js +101 -0
  737. package/build-module/spacer/controls.js.map +1 -0
  738. package/build-module/spacer/controls.native.js +82 -0
  739. package/build-module/spacer/controls.native.js.map +1 -0
  740. package/build-module/spacer/deprecated.js +44 -0
  741. package/build-module/spacer/deprecated.js.map +1 -0
  742. package/build-module/spacer/edit.js +114 -95
  743. package/build-module/spacer/edit.js.map +1 -1
  744. package/build-module/spacer/edit.native.js +61 -0
  745. package/build-module/spacer/edit.native.js.map +1 -0
  746. package/build-module/spacer/index.js +7 -4
  747. package/build-module/spacer/index.js.map +1 -1
  748. package/build-module/spacer/save.js +6 -3
  749. package/build-module/spacer/save.js.map +1 -1
  750. package/build-module/table/index.js +12 -2
  751. package/build-module/table/index.js.map +1 -1
  752. package/build-module/table-of-contents/index.js +1 -0
  753. package/build-module/table-of-contents/index.js.map +1 -1
  754. package/build-module/tag-cloud/index.js +12 -1
  755. package/build-module/tag-cloud/index.js.map +1 -1
  756. package/build-module/tag-cloud/transforms.js +18 -0
  757. package/build-module/tag-cloud/transforms.js.map +1 -0
  758. package/build-module/template-part/index.js +1 -0
  759. package/build-module/template-part/index.js.map +1 -1
  760. package/build-module/term-description/index.js +6 -1
  761. package/build-module/term-description/index.js.map +1 -1
  762. package/build-module/text-columns/index.js +1 -0
  763. package/build-module/text-columns/index.js.map +1 -1
  764. package/build-module/verse/index.js +6 -1
  765. package/build-module/verse/index.js.map +1 -1
  766. package/build-module/video/index.js +1 -0
  767. package/build-module/video/index.js.map +1 -1
  768. package/build-style/audio/editor-rtl.css +11 -0
  769. package/build-style/audio/editor.css +11 -0
  770. package/build-style/code/theme-rtl.css +5 -3
  771. package/build-style/code/theme.css +5 -3
  772. package/build-style/columns/editor-rtl.css +0 -10
  773. package/build-style/columns/editor.css +0 -10
  774. package/build-style/columns/style-rtl.css +8 -21
  775. package/build-style/columns/style.css +8 -21
  776. package/build-style/comment-template/style-rtl.css +91 -0
  777. package/build-style/comment-template/style.css +91 -0
  778. package/build-style/comments-pagination/editor-rtl.css +100 -0
  779. package/build-style/comments-pagination/editor.css +102 -0
  780. package/build-style/comments-pagination/style-rtl.css +104 -0
  781. package/build-style/comments-pagination/style.css +106 -0
  782. package/build-style/comments-pagination-numbers/editor-rtl.css +85 -0
  783. package/build-style/comments-pagination-numbers/editor.css +86 -0
  784. package/build-style/comments-query-loop/editor-rtl.css +79 -0
  785. package/build-style/comments-query-loop/editor.css +79 -0
  786. package/build-style/common-rtl.css +27 -0
  787. package/build-style/common.css +27 -0
  788. package/build-style/cover/style-rtl.css +119 -11
  789. package/build-style/cover/style.css +119 -11
  790. package/build-style/editor-rtl.css +173 -125
  791. package/build-style/editor.css +176 -125
  792. package/build-style/embed/editor-rtl.css +0 -12
  793. package/build-style/embed/editor.css +0 -12
  794. package/build-style/gallery/editor-rtl.css +7 -18
  795. package/build-style/gallery/editor.css +7 -18
  796. package/build-style/gallery/style-rtl.css +5 -1
  797. package/build-style/gallery/style.css +5 -1
  798. package/build-style/group/theme-rtl.css +1 -1
  799. package/build-style/group/theme.css +1 -1
  800. package/build-style/image/style-rtl.css +0 -2
  801. package/build-style/image/style.css +0 -2
  802. package/build-style/latest-posts/editor-rtl.css +7 -0
  803. package/build-style/latest-posts/editor.css +7 -0
  804. package/build-style/latest-posts/style-rtl.css +0 -9
  805. package/build-style/latest-posts/style.css +0 -9
  806. package/build-style/navigation/editor-rtl.css +93 -69
  807. package/build-style/navigation/editor.css +93 -69
  808. package/build-style/navigation/style-rtl.css +18 -7
  809. package/build-style/navigation/style.css +18 -7
  810. package/build-style/page-list/editor-rtl.css +9 -5
  811. package/build-style/page-list/editor.css +9 -5
  812. package/build-style/post-comments/style-rtl.css +9 -4
  813. package/build-style/post-comments/style.css +9 -4
  814. package/build-style/post-featured-image/editor-rtl.css +0 -7
  815. package/build-style/post-featured-image/editor.css +0 -7
  816. package/build-style/post-featured-image/style-rtl.css +1 -1
  817. package/build-style/post-featured-image/style.css +1 -1
  818. package/build-style/post-template/style-rtl.css +4 -0
  819. package/build-style/post-template/style.css +4 -0
  820. package/build-style/post-title/style-rtl.css +3 -0
  821. package/build-style/post-title/style.css +3 -0
  822. package/build-style/pullquote/style-rtl.css +1 -0
  823. package/build-style/pullquote/style.css +1 -0
  824. package/build-style/query-pagination/editor-rtl.css +0 -4
  825. package/build-style/query-pagination/editor.css +0 -4
  826. package/build-style/quote/style-rtl.css +5 -5
  827. package/build-style/quote/style.css +5 -5
  828. package/build-style/{home-link → read-more}/style-rtl.css +5 -22
  829. package/build-style/{home-link → read-more}/style.css +5 -22
  830. package/build-style/separator/style-rtl.css +0 -3
  831. package/build-style/separator/style.css +0 -3
  832. package/build-style/social-links/editor-rtl.css +3 -0
  833. package/build-style/social-links/editor.css +3 -0
  834. package/build-style/social-links/style-rtl.css +8 -1
  835. package/build-style/social-links/style.css +8 -1
  836. package/build-style/spacer/editor-rtl.css +4 -0
  837. package/build-style/spacer/editor.css +4 -0
  838. package/build-style/style-rtl.css +290 -110
  839. package/build-style/style.css +292 -110
  840. package/build-style/table/style-rtl.css +1 -0
  841. package/build-style/table/style.css +1 -0
  842. package/build-style/tag-cloud/style-rtl.css +8 -0
  843. package/build-style/tag-cloud/style.css +8 -0
  844. package/build-style/theme-rtl.css +6 -4
  845. package/build-style/theme.css +6 -4
  846. package/package.json +28 -30
  847. package/src/archives/block.json +1 -0
  848. package/src/archives/index.php +5 -9
  849. package/src/audio/block.json +1 -0
  850. package/src/audio/edit.js +19 -3
  851. package/src/audio/editor.scss +14 -0
  852. package/src/audio/test/__snapshots__/edit.native.js.snap +22 -0
  853. package/src/audio/test/edit.native.js +24 -11
  854. package/src/block/block.json +1 -0
  855. package/src/block/index.php +7 -2
  856. package/src/block/test/edit.native.js +7 -5
  857. package/src/button/block.json +10 -2
  858. package/src/button/edit.native.js +1 -1
  859. package/src/buttons/block.json +2 -1
  860. package/src/buttons/edit.js +17 -0
  861. package/src/buttons/edit.native.js +17 -5
  862. package/src/buttons/test/__snapshots__/edit.native.js.snap +27 -0
  863. package/src/buttons/test/edit.native.js +75 -45
  864. package/src/calendar/block.json +1 -0
  865. package/src/calendar/index.js +2 -0
  866. package/src/calendar/index.php +35 -39
  867. package/src/calendar/transforms.js +23 -0
  868. package/src/categories/block.json +1 -0
  869. package/src/categories/index.php +1 -1
  870. package/src/code/block.json +11 -2
  871. package/src/code/theme.scss +6 -4
  872. package/src/code/transforms.js +1 -1
  873. package/src/column/block.json +6 -1
  874. package/src/columns/block.json +16 -1
  875. package/src/columns/editor.scss +0 -15
  876. package/src/columns/style.scss +15 -36
  877. package/src/comment-author-avatar/block.json +9 -1
  878. package/src/comment-author-avatar/edit.js +9 -2
  879. package/src/comment-author-avatar/index.php +25 -6
  880. package/src/comment-author-name/block.json +7 -1
  881. package/src/comment-content/block.json +6 -1
  882. package/src/comment-date/block.json +7 -1
  883. package/src/comment-date/index.php +2 -2
  884. package/src/comment-edit-link/block.json +6 -1
  885. package/src/comment-edit-link/index.js +1 -1
  886. package/src/comment-reply-link/block.json +6 -1
  887. package/src/comment-template/block.json +4 -2
  888. package/src/comment-template/edit.js +174 -44
  889. package/src/comment-template/index.php +46 -19
  890. package/src/comment-template/style.scss +17 -0
  891. package/src/comment-template/test/index.js +45 -0
  892. package/src/comment-template/util.js +56 -0
  893. package/src/comments-pagination/block.json +42 -0
  894. package/src/comments-pagination/comments-pagination-arrow-controls.js +44 -0
  895. package/src/comments-pagination/edit.js +83 -0
  896. package/src/comments-pagination/editor.scss +34 -0
  897. package/src/comments-pagination/index.js +20 -0
  898. package/src/comments-pagination/index.php +39 -0
  899. package/src/comments-pagination/save.js +8 -0
  900. package/src/comments-pagination/style.scss +38 -0
  901. package/src/comments-pagination-next/block.json +38 -0
  902. package/src/comments-pagination-next/edit.js +44 -0
  903. package/src/comments-pagination-next/index.js +18 -0
  904. package/src/comments-pagination-next/index.php +62 -0
  905. package/src/comments-pagination-numbers/block.json +15 -0
  906. package/src/comments-pagination-numbers/edit.js +22 -0
  907. package/src/comments-pagination-numbers/editor.scss +12 -0
  908. package/src/comments-pagination-numbers/index.js +18 -0
  909. package/src/comments-pagination-numbers/index.php +69 -0
  910. package/src/comments-pagination-previous/block.json +38 -0
  911. package/src/comments-pagination-previous/edit.js +44 -0
  912. package/src/comments-pagination-previous/index.js +18 -0
  913. package/src/comments-pagination-previous/index.php +52 -0
  914. package/src/comments-query-loop/block.json +21 -8
  915. package/src/comments-query-loop/edit/comments-inspector-controls.js +93 -0
  916. package/src/comments-query-loop/edit.js +22 -27
  917. package/src/comments-query-loop/editor.scss +3 -0
  918. package/src/common.scss +28 -0
  919. package/src/cover/block.json +1 -0
  920. package/src/cover/deprecated.js +211 -1
  921. package/src/cover/edit.js +9 -4
  922. package/src/cover/edit.native.js +35 -19
  923. package/src/cover/overlay-color-settings.native.js +10 -0
  924. package/src/cover/save.js +10 -4
  925. package/src/cover/style.scss +24 -2
  926. package/src/cover/test/__snapshots__/edit.native.js.snap +33 -0
  927. package/src/cover/test/edit.native.js +284 -17
  928. package/src/editor.scss +3 -0
  929. package/src/embed/block.json +1 -0
  930. package/src/embed/edit.native.js +23 -18
  931. package/src/embed/editor.scss +0 -15
  932. package/src/embed/embed-controls.native.js +65 -0
  933. package/src/embed/embed-link-settings.native.js +100 -0
  934. package/src/embed/embed-loading.js +0 -2
  935. package/src/embed/embed-placeholder.native.js +8 -0
  936. package/src/embed/test/__snapshots__/index.native.js.snap +10 -0
  937. package/src/embed/test/index.native.js +230 -89
  938. package/src/file/block.json +1 -0
  939. package/src/file/edit.native.js +6 -2
  940. package/src/file/index.php +2 -2
  941. package/src/file/test/__snapshots__/edit.native.js.snap +18 -5
  942. package/src/file/test/edit.native.js +30 -12
  943. package/src/freeform/block.json +1 -0
  944. package/src/gallery/block.json +1 -0
  945. package/src/gallery/constants.js +2 -0
  946. package/src/gallery/deprecated.js +4 -0
  947. package/src/gallery/edit.js +60 -11
  948. package/src/gallery/editor.scss +8 -22
  949. package/src/gallery/gallery.native.js +1 -1
  950. package/src/gallery/shared.js +1 -1
  951. package/src/gallery/style.scss +8 -1
  952. package/src/gallery/test/__snapshots__/index.native.js.snap +7 -0
  953. package/src/gallery/test/index.native.js +128 -0
  954. package/src/gallery/test/use-get-new-images.js +93 -0
  955. package/src/gallery/transforms.js +7 -1
  956. package/src/gallery/utils.js +7 -3
  957. package/src/group/block.json +24 -2
  958. package/src/group/theme.scss +4 -5
  959. package/src/group/variations.js +11 -1
  960. package/src/heading/block.json +6 -1
  961. package/src/heading/edit.js +2 -1
  962. package/src/heading/transforms.js +2 -5
  963. package/src/home-link/block.json +1 -0
  964. package/src/home-link/index.php +3 -3
  965. package/src/html/block.json +1 -0
  966. package/src/image/block.json +5 -1
  967. package/src/image/edit.js +44 -0
  968. package/src/image/edit.native.js +69 -19
  969. package/src/image/image.js +14 -3
  970. package/src/image/index.php +3 -3
  971. package/src/image/style.scss +0 -2
  972. package/src/image/test/edit.native.js +170 -1
  973. package/src/index.js +41 -27
  974. package/src/latest-comments/block.json +1 -0
  975. package/src/latest-comments/index.php +1 -1
  976. package/src/latest-posts/block.json +1 -0
  977. package/src/latest-posts/edit.js +52 -64
  978. package/src/latest-posts/editor.scss +10 -0
  979. package/src/latest-posts/index.php +15 -13
  980. package/src/latest-posts/style.scss +0 -12
  981. package/src/list/block.json +6 -1
  982. package/src/list/test/edit.native.js +3 -3
  983. package/src/loginout/block.json +1 -0
  984. package/src/media-text/block.json +6 -1
  985. package/src/missing/block.json +1 -0
  986. package/src/missing/test/__snapshots__/edit.native.js.snap +5 -0
  987. package/src/missing/test/edit.native.js +26 -30
  988. package/src/more/block.json +1 -0
  989. package/src/navigation/README.md +13 -0
  990. package/src/navigation/block.json +12 -10
  991. package/src/navigation/edit/existing-menus-options.js +70 -0
  992. package/src/navigation/edit/index.js +84 -25
  993. package/src/navigation/edit/inner-blocks.js +19 -4
  994. package/src/navigation/edit/navigation-menu-selector.js +58 -32
  995. package/src/navigation/edit/overlay-menu-icon.js +20 -0
  996. package/src/navigation/edit/placeholder/index.js +49 -142
  997. package/src/navigation/edit/placeholder/placeholder-preview.js +8 -10
  998. package/src/navigation/edit/responsive-wrapper.js +12 -13
  999. package/src/navigation/editor.scss +137 -103
  1000. package/src/navigation/index.php +19 -12
  1001. package/src/navigation/menu-items-to-blocks.js +2 -1
  1002. package/src/navigation/style.scss +24 -7
  1003. package/src/navigation/use-convert-classic-menu.js +58 -0
  1004. package/src/navigation/use-navigation-entities.js +3 -1
  1005. package/src/navigation-area/block.json +3 -7
  1006. package/src/navigation-area/edit.js +2 -1
  1007. package/src/navigation-link/block.json +2 -3
  1008. package/src/navigation-link/edit.js +5 -0
  1009. package/src/navigation-link/index.php +4 -4
  1010. package/src/navigation-submenu/block.json +2 -3
  1011. package/src/navigation-submenu/edit.js +3 -1
  1012. package/src/navigation-submenu/index.php +8 -8
  1013. package/src/nextpage/block.json +1 -0
  1014. package/src/page-list/block.json +4 -0
  1015. package/src/page-list/edit.js +47 -9
  1016. package/src/page-list/editor.scss +8 -5
  1017. package/src/page-list/index.php +14 -9
  1018. package/src/paragraph/block.json +7 -2
  1019. package/src/paragraph/edit.js +12 -4
  1020. package/src/paragraph/test/edit.native.js +4 -13
  1021. package/src/pattern/block.json +1 -0
  1022. package/src/post-author/block.json +7 -2
  1023. package/src/post-author/index.php +1 -1
  1024. package/src/post-author-biography/block.json +41 -0
  1025. package/src/post-author-biography/edit.js +63 -0
  1026. package/src/post-author-biography/index.js +18 -0
  1027. package/src/post-author-biography/index.php +48 -0
  1028. package/src/post-author-name/block.json +48 -0
  1029. package/src/post-author-name/edit.js +95 -0
  1030. package/src/post-author-name/index.js +18 -0
  1031. package/src/post-author-name/index.php +49 -0
  1032. package/src/post-comment/block.json +1 -0
  1033. package/src/post-comments/block.json +6 -1
  1034. package/src/post-comments/style.scss +10 -4
  1035. package/src/post-comments-count/block.json +6 -1
  1036. package/src/post-comments-form/block.json +11 -2
  1037. package/src/post-comments-link/block.json +6 -1
  1038. package/src/post-comments-link/index.php +5 -5
  1039. package/src/post-content/block.json +1 -0
  1040. package/src/post-content/edit.js +4 -4
  1041. package/src/post-content/index.php +1 -1
  1042. package/src/post-date/block.json +7 -1
  1043. package/src/post-date/index.php +1 -1
  1044. package/src/post-excerpt/block.json +7 -1
  1045. package/src/post-excerpt/edit.js +1 -0
  1046. package/src/post-excerpt/index.js +2 -0
  1047. package/src/post-excerpt/index.php +1 -1
  1048. package/src/post-excerpt/transforms.js +23 -0
  1049. package/src/post-featured-image/block.json +4 -0
  1050. package/src/post-featured-image/dimension-controls.js +103 -51
  1051. package/src/post-featured-image/edit.js +61 -22
  1052. package/src/post-featured-image/editor.scss +0 -8
  1053. package/src/post-featured-image/index.php +3 -2
  1054. package/src/post-featured-image/style.scss +1 -1
  1055. package/src/post-navigation-link/block.json +1 -0
  1056. package/src/post-navigation-link/index.php +4 -4
  1057. package/src/post-template/block.json +2 -1
  1058. package/src/post-template/edit.js +27 -7
  1059. package/src/post-template/index.php +2 -2
  1060. package/src/post-template/style.scss +5 -0
  1061. package/src/post-terms/block.json +7 -1
  1062. package/src/post-terms/index.js +6 -0
  1063. package/src/post-terms/index.php +1 -1
  1064. package/src/post-title/block.json +7 -1
  1065. package/src/post-title/edit.js +8 -7
  1066. package/src/post-title/index.php +1 -1
  1067. package/src/post-title/style.scss +6 -2
  1068. package/src/preformatted/block.json +6 -1
  1069. package/src/preformatted/edit.native.js +4 -4
  1070. package/src/preformatted/test/__snapshots__/edit.native.js.snap +53 -14
  1071. package/src/preformatted/test/edit.native.js +11 -10
  1072. package/src/pullquote/block.json +13 -2
  1073. package/src/pullquote/style.scss +1 -0
  1074. package/src/query/block.json +8 -4
  1075. package/src/query/deprecated.js +80 -3
  1076. package/src/query/edit/index.js +3 -3
  1077. package/src/query/edit/inspector-controls/author-control.js +78 -0
  1078. package/src/query/edit/inspector-controls/index.js +163 -0
  1079. package/src/query/edit/inspector-controls/order-control.js +41 -0
  1080. package/src/query/edit/inspector-controls/taxonomy-controls.js +118 -0
  1081. package/src/query/test/utils.js +6 -4
  1082. package/src/query/utils.js +45 -35
  1083. package/src/query/variations.js +0 -4
  1084. package/src/query-pagination/block.json +8 -2
  1085. package/src/query-pagination/editor.scss +0 -4
  1086. package/src/query-pagination-next/block.json +6 -2
  1087. package/src/query-pagination-next/index.php +2 -1
  1088. package/src/query-pagination-numbers/block.json +2 -1
  1089. package/src/query-pagination-previous/block.json +6 -2
  1090. package/src/query-pagination-previous/index.php +2 -1
  1091. package/src/query-title/block.json +6 -1
  1092. package/src/query-title/index.js +6 -0
  1093. package/src/quote/block.json +2 -2
  1094. package/src/quote/index.js +0 -1
  1095. package/src/quote/style.scss +3 -3
  1096. package/src/quote/theme.scss +1 -1
  1097. package/src/read-more/block.json +56 -0
  1098. package/src/read-more/edit.js +50 -0
  1099. package/src/read-more/index.js +18 -0
  1100. package/src/read-more/index.php +45 -0
  1101. package/src/read-more/style.scss +12 -0
  1102. package/src/rss/block.json +1 -0
  1103. package/src/search/block.json +13 -2
  1104. package/src/search/edit.js +4 -2
  1105. package/src/search/edit.native.js +2 -5
  1106. package/src/search/index.php +26 -14
  1107. package/src/search/test/__snapshots__/edit.native.js.snap +7 -15
  1108. package/src/search/test/edit.native.js +32 -24
  1109. package/src/separator/block.json +1 -0
  1110. package/src/separator/style.scss +0 -5
  1111. package/src/shortcode/block.json +1 -0
  1112. package/src/site-logo/block.json +1 -0
  1113. package/src/site-logo/edit.js +5 -40
  1114. package/src/site-logo/index.js +2 -0
  1115. package/src/site-logo/index.php +1 -1
  1116. package/src/site-logo/transforms.js +21 -0
  1117. package/src/site-tagline/block.json +7 -2
  1118. package/src/site-tagline/edit.js +10 -1
  1119. package/src/site-title/block.json +7 -1
  1120. package/src/site-title/index.js +2 -0
  1121. package/src/site-title/index.php +6 -6
  1122. package/src/site-title/transforms.js +21 -0
  1123. package/src/social-link/block.json +3 -1
  1124. package/src/social-link/edit.js +14 -2
  1125. package/src/social-link/index.php +57 -54
  1126. package/src/social-links/block.json +8 -8
  1127. package/src/social-links/edit.js +37 -27
  1128. package/src/social-links/editor.scss +7 -0
  1129. package/src/social-links/save.js +7 -1
  1130. package/src/social-links/style.scss +11 -1
  1131. package/src/spacer/block.json +4 -3
  1132. package/src/spacer/controls.js +108 -0
  1133. package/src/spacer/controls.native.js +82 -0
  1134. package/src/spacer/deprecated.js +41 -0
  1135. package/src/spacer/edit.js +133 -132
  1136. package/src/spacer/edit.native.js +68 -0
  1137. package/src/spacer/editor.scss +6 -0
  1138. package/src/spacer/index.js +2 -0
  1139. package/src/spacer/save.js +5 -2
  1140. package/src/style.scss +4 -2
  1141. package/src/table/block.json +12 -2
  1142. package/src/table/style.scss +1 -0
  1143. package/src/table-of-contents/block.json +1 -0
  1144. package/src/table-of-contents/index.php +3 -3
  1145. package/src/tag-cloud/block.json +5 -0
  1146. package/src/tag-cloud/index.js +2 -0
  1147. package/src/tag-cloud/style.scss +9 -0
  1148. package/src/tag-cloud/transforms.js +23 -0
  1149. package/src/template-part/block.json +1 -0
  1150. package/src/template-part/index.php +6 -6
  1151. package/src/term-description/block.json +6 -1
  1152. package/src/text-columns/block.json +1 -0
  1153. package/src/verse/block.json +6 -1
  1154. package/src/verse/test/edit.native.js +7 -10
  1155. package/src/video/block.json +1 -0
  1156. package/build/comments-query-loop/toolbar.js +0 -58
  1157. package/build/comments-query-loop/toolbar.js.map +0 -1
  1158. package/build/embed/embed-bottom-sheet.native.js +0 -85
  1159. package/build/embed/embed-bottom-sheet.native.js.map +0 -1
  1160. package/build/query/edit/query-inspector-controls.js +0 -275
  1161. package/build/query/edit/query-inspector-controls.js.map +0 -1
  1162. package/build-module/comments-query-loop/toolbar.js +0 -48
  1163. package/build-module/comments-query-loop/toolbar.js.map +0 -1
  1164. package/build-module/embed/embed-bottom-sheet.native.js +0 -74
  1165. package/build-module/embed/embed-bottom-sheet.native.js.map +0 -1
  1166. package/build-module/query/edit/query-inspector-controls.js +0 -261
  1167. package/build-module/query/edit/query-inspector-controls.js.map +0 -1
  1168. package/src/comments-query-loop/toolbar.js +0 -57
  1169. package/src/embed/embed-bottom-sheet.native.js +0 -78
  1170. package/src/home-link/style.scss +0 -51
  1171. package/src/query/edit/query-inspector-controls.js +0 -281
@@ -1,4 +1,5 @@
1
1
  {
2
+ "$schema": "https://schemas.wp.org/trunk/block.json",
2
3
  "apiVersion": 2,
3
4
  "name": "core/comment-author-name",
4
5
  "title": "Comment Author Name",
@@ -28,7 +29,12 @@
28
29
  },
29
30
  "color": {
30
31
  "gradients": true,
31
- "link": true
32
+ "link": true,
33
+ "__experimentalDefaultControls": {
34
+ "background": true,
35
+ "text": true,
36
+ "link": true
37
+ }
32
38
  },
33
39
  "typography": {
34
40
  "fontSize": true,
@@ -1,4 +1,5 @@
1
1
  {
2
+ "$schema": "https://schemas.wp.org/trunk/block.json",
2
3
  "apiVersion": 2,
3
4
  "name": "core/comment-content",
4
5
  "title": "Comment Content",
@@ -15,7 +16,11 @@
15
16
  "supports": {
16
17
  "color": {
17
18
  "gradients": true,
18
- "link": true
19
+ "link": true,
20
+ "__experimentalDefaultControls": {
21
+ "background": true,
22
+ "text": true
23
+ }
19
24
  },
20
25
  "typography": {
21
26
  "fontSize": true,
@@ -1,4 +1,5 @@
1
1
  {
2
+ "$schema": "https://schemas.wp.org/trunk/block.json",
2
3
  "apiVersion": 2,
3
4
  "name": "core/comment-date",
4
5
  "title": "Comment Date",
@@ -20,7 +21,12 @@
20
21
  "html": false,
21
22
  "color": {
22
23
  "gradients": true,
23
- "link": true
24
+ "link": true,
25
+ "__experimentalDefaultControls": {
26
+ "background": true,
27
+ "text": true,
28
+ "link": true
29
+ }
24
30
  },
25
31
  "typography": {
26
32
  "fontSize": true,
@@ -31,13 +31,13 @@ function render_block_core_comment_date( $attributes, $content, $block ) {
31
31
  $link = get_comment_link( $comment );
32
32
 
33
33
  if ( ! empty( $attributes['isLink'] ) ) {
34
- $formatted_date = sprintf( '<a href="%1s">%2s</a>', $link, $formatted_date );
34
+ $formatted_date = sprintf( '<a href="%1s">%2s</a>', esc_url( $link ), $formatted_date );
35
35
  }
36
36
 
37
37
  return sprintf(
38
38
  '<div %1$s><time datetime="%2$s">%3$s</time></div>',
39
39
  $wrapper_attributes,
40
- get_comment_date( 'c', $comment ),
40
+ esc_attr( get_comment_date( 'c', $comment ) ),
41
41
  $formatted_date
42
42
  );
43
43
  }
@@ -1,4 +1,5 @@
1
1
  {
2
+ "$schema": "https://schemas.wp.org/trunk/block.json",
2
3
  "apiVersion": 2,
3
4
  "name": "core/comment-edit-link",
4
5
  "title": "Comment Edit Link",
@@ -21,7 +22,11 @@
21
22
  "color": {
22
23
  "link": true,
23
24
  "gradients": true,
24
- "text": false
25
+ "text": false,
26
+ "__experimentalDefaultControls": {
27
+ "background": true,
28
+ "link": true
29
+ }
25
30
  },
26
31
  "typography": {
27
32
  "fontSize": true,
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { edit as icon } from '@wordpress/icons';
4
+ import { commentEditLink as icon } from '@wordpress/icons';
5
5
 
6
6
  /**
7
7
  * Internal dependencies
@@ -1,4 +1,5 @@
1
1
  {
2
+ "$schema": "https://schemas.wp.org/trunk/block.json",
2
3
  "apiVersion": 2,
3
4
  "name": "core/comment-reply-link",
4
5
  "title": "Comment Reply Link",
@@ -16,7 +17,11 @@
16
17
  "color": {
17
18
  "gradients": true,
18
19
  "link": true,
19
- "text": false
20
+ "text": false,
21
+ "__experimentalDefaultControls": {
22
+ "background": true,
23
+ "link": true
24
+ }
20
25
  },
21
26
  "typography": {
22
27
  "fontSize": true,
@@ -1,4 +1,5 @@
1
1
  {
2
+ "$schema": "https://schemas.wp.org/trunk/block.json",
2
3
  "apiVersion": 2,
3
4
  "name": "core/comment-template",
4
5
  "title": "Comment Template",
@@ -6,10 +7,11 @@
6
7
  "parent": [ "core/comments-query-loop" ],
7
8
  "description": "Contains the block elements used to render a comment, like the title, date, author, avatar and more.",
8
9
  "textdomain": "default",
9
- "usesContext": [ "queryId", "queryPerPage", "postId" ],
10
+ "usesContext": [ "comments/perPage", "postId", "comments/order" ],
10
11
  "supports": {
11
12
  "reusable": false,
12
13
  "html": false,
13
14
  "align": true
14
- }
15
+ },
16
+ "style": "wp-block-comment-template"
15
17
  }
@@ -1,19 +1,24 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { useState, useMemo } from '@wordpress/element';
4
+ import { useState, useMemo, memo } from '@wordpress/element';
5
5
  import { useSelect } from '@wordpress/data';
6
6
  import { __ } from '@wordpress/i18n';
7
7
  import {
8
8
  BlockContextProvider,
9
- BlockPreview,
10
9
  useBlockProps,
11
10
  useInnerBlocksProps,
12
11
  store as blockEditorStore,
12
+ __experimentalUseBlockPreview as useBlockPreview,
13
13
  } from '@wordpress/block-editor';
14
14
  import { Spinner } from '@wordpress/components';
15
15
  import { store as coreStore } from '@wordpress/core-data';
16
16
 
17
+ /**
18
+ * Internal dependencies
19
+ */
20
+ import { convertToTree } from './util';
21
+
17
22
  const TEMPLATE = [
18
23
  [ 'core/comment-author-avatar' ],
19
24
  [ 'core/comment-author-name' ],
@@ -23,43 +28,185 @@ const TEMPLATE = [
23
28
  [ 'core/comment-edit-link' ],
24
29
  ];
25
30
 
26
- function CommentTemplateInnerBlocks() {
27
- const innerBlocksProps = useInnerBlocksProps( {}, { template: TEMPLATE } );
28
- return <li { ...innerBlocksProps } />;
31
+ /**
32
+ * Component which renders the inner blocks of the Comment Template.
33
+ *
34
+ * @param {Object} props Component props.
35
+ * @param {Array} [props.comment] - A comment object.
36
+ * @param {Array} [props.activeComment] - The block that is currently active.
37
+ * @param {Array} [props.setActiveComment] - The setter for activeComment.
38
+ * @param {Array} [props.firstComment] - First comment in the array.
39
+ * @param {Array} [props.blocks] - Array of blocks returned from
40
+ * getBlocks() in parent .
41
+ * @return {WPElement} Inner blocks of the Comment Template
42
+ */
43
+ function CommentTemplateInnerBlocks( {
44
+ comment,
45
+ activeComment,
46
+ setActiveComment,
47
+ firstComment,
48
+ blocks,
49
+ } ) {
50
+ const { children, ...innerBlocksProps } = useInnerBlocksProps(
51
+ {},
52
+ { template: TEMPLATE }
53
+ );
54
+ return (
55
+ <li { ...innerBlocksProps }>
56
+ { comment === ( activeComment || firstComment ) ? children : null }
57
+
58
+ { /* To avoid flicker when switching active block contexts, a preview
59
+ is ALWAYS rendered and the preview for the active block is hidden.
60
+ This ensures that when switching the active block, the component is not
61
+ mounted again but rather it only toggles the `isHidden` prop.
62
+
63
+ The same strategy is used for preventing the flicker in the Post Template
64
+ block. */ }
65
+ <MemoizedCommentTemplatePreview
66
+ blocks={ blocks }
67
+ comment={ comment }
68
+ setActiveComment={ setActiveComment }
69
+ isHidden={ comment === ( activeComment || firstComment ) }
70
+ />
71
+
72
+ { comment?.children?.length > 0 ? (
73
+ <CommentsList
74
+ comments={ comment.children }
75
+ activeComment={ activeComment }
76
+ setActiveComment={ setActiveComment }
77
+ blocks={ blocks }
78
+ />
79
+ ) : null }
80
+ </li>
81
+ );
29
82
  }
30
83
 
84
+ const CommentTemplatePreview = ( {
85
+ blocks,
86
+ comment,
87
+ setActiveComment,
88
+ isHidden,
89
+ } ) => {
90
+ const blockPreviewProps = useBlockPreview( {
91
+ blocks,
92
+ } );
93
+
94
+ const handleOnClick = () => {
95
+ setActiveComment( comment );
96
+ };
97
+
98
+ // We have to hide the preview block if the `comment` props points to
99
+ // the curently active block!
100
+
101
+ // Or, to put it differently, every preview block is visible unless it is the
102
+ // currently active block - in this case we render its inner blocks.
103
+ const style = {
104
+ display: isHidden ? 'none' : undefined,
105
+ };
106
+
107
+ return (
108
+ <div
109
+ { ...blockPreviewProps }
110
+ tabIndex={ 0 }
111
+ role="button"
112
+ style={ style }
113
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role
114
+ onClick={ handleOnClick }
115
+ onKeyPress={ handleOnClick }
116
+ />
117
+ );
118
+ };
119
+
120
+ const MemoizedCommentTemplatePreview = memo( CommentTemplatePreview );
121
+
122
+ /**
123
+ * Component that renders a list of (nested) comments. It is called recursively.
124
+ *
125
+ * @param {Object} props Component props.
126
+ * @param {Array} [props.comments] - Array of comment objects.
127
+ * @param {Array} [props.blockProps] - Props from parent's `useBlockProps()`.
128
+ * @param {Array} [props.activeComment] - The block that is currently active.
129
+ * @param {Array} [props.setActiveComment] - The setter for activeComment.
130
+ * @param {Array} [props.blocks] - Array of blocks returned from
131
+ * getBlocks() in parent .
132
+ * @return {WPElement} List of comments.
133
+ */
134
+ const CommentsList = ( {
135
+ comments,
136
+ blockProps,
137
+ activeComment,
138
+ setActiveComment,
139
+ blocks,
140
+ } ) => (
141
+ <ol { ...blockProps }>
142
+ { comments &&
143
+ comments.map( ( comment ) => (
144
+ <BlockContextProvider
145
+ key={ comment.commentId }
146
+ value={ comment }
147
+ >
148
+ <CommentTemplateInnerBlocks
149
+ comment={ comment }
150
+ activeComment={ activeComment }
151
+ setActiveComment={ setActiveComment }
152
+ blocks={ blocks }
153
+ firstComment={ comments[ 0 ] }
154
+ />
155
+ </BlockContextProvider>
156
+ ) ) }
157
+ </ol>
158
+ );
159
+
31
160
  export default function CommentTemplateEdit( {
32
161
  clientId,
33
- context: { postId, queryPerPage },
162
+ context: { postId, 'comments/perPage': perPage, 'comments/order': order },
34
163
  } ) {
35
164
  const blockProps = useBlockProps();
36
165
 
37
- const [ activeBlockContext, setActiveBlockContext ] = useState();
38
-
39
- const { comments, blocks } = useSelect(
166
+ const [ activeComment, setActiveComment ] = useState();
167
+ const { commentOrder, commentsPerPage } = useSelect( ( select ) => {
168
+ const { getSettings } = select( blockEditorStore );
169
+ return getSettings().__experimentalDiscussionSettings;
170
+ } );
171
+ const { rawComments, blocks } = useSelect(
40
172
  ( select ) => {
41
173
  const { getEntityRecords } = select( coreStore );
42
174
  const { getBlocks } = select( blockEditorStore );
43
175
 
176
+ const commentQuery = {
177
+ post: postId,
178
+ status: 'approve',
179
+ context: 'embed',
180
+ order: order || commentOrder,
181
+ };
182
+
183
+ if ( order ) {
184
+ commentQuery.order = order;
185
+ }
44
186
  return {
45
- comments: getEntityRecords( 'root', 'comment', {
46
- post: postId,
47
- status: 'approve',
48
- per_page: queryPerPage,
49
- order: 'asc',
50
- } ),
187
+ rawComments: getEntityRecords(
188
+ 'root',
189
+ 'comment',
190
+ commentQuery
191
+ ),
51
192
  blocks: getBlocks( clientId ),
52
193
  };
53
194
  },
54
- [ queryPerPage, postId, clientId ]
195
+ [ postId, clientId, order ]
55
196
  );
56
197
 
57
- const blockContexts = useMemo(
58
- () => comments?.map( ( comment ) => ( { commentId: comment.id } ) ),
59
- [ comments ]
198
+ // TODO: Replicate the logic used on the server.
199
+ perPage = perPage || commentsPerPage;
200
+ // We convert the flat list of comments to tree.
201
+ // Then, we show only a maximum of `perPage` number of comments.
202
+ // This is because passing `per_page` to `getEntityRecords()` does not
203
+ // take into account nested comments.
204
+ const comments = useMemo(
205
+ () => convertToTree( rawComments ).slice( 0, perPage ),
206
+ [ rawComments, perPage ]
60
207
  );
61
208
 
62
- if ( ! comments ) {
209
+ if ( ! rawComments ) {
63
210
  return (
64
211
  <p { ...blockProps }>
65
212
  <Spinner />
@@ -72,29 +219,12 @@ export default function CommentTemplateEdit( {
72
219
  }
73
220
 
74
221
  return (
75
- <ul { ...blockProps }>
76
- { blockContexts &&
77
- blockContexts.map( ( blockContext ) => (
78
- <BlockContextProvider
79
- key={ blockContext.commentId }
80
- value={ blockContext }
81
- >
82
- { blockContext ===
83
- ( activeBlockContext || blockContexts[ 0 ] ) ? (
84
- <CommentTemplateInnerBlocks />
85
- ) : (
86
- <li>
87
- <BlockPreview
88
- blocks={ blocks }
89
- __experimentalLive
90
- __experimentalOnClick={ () =>
91
- setActiveBlockContext( blockContext )
92
- }
93
- />
94
- </li>
95
- ) }
96
- </BlockContextProvider>
97
- ) ) }
98
- </ul>
222
+ <CommentsList
223
+ comments={ comments }
224
+ blockProps={ blockProps }
225
+ blocks={ blocks }
226
+ activeComment={ activeComment }
227
+ setActiveComment={ setActiveComment }
228
+ />
99
229
  );
100
230
  }
@@ -5,6 +5,43 @@
5
5
  * @package WordPress
6
6
  */
7
7
 
8
+ /**
9
+ * Function that recursively renders a list of nested comments.
10
+ *
11
+ * @param WP_Comment[] $comments The array of comments.
12
+ * @param WP_Block $block Block instance.
13
+ * @return string
14
+ */
15
+ function block_core_comment_template_render_comments( $comments, $block ) {
16
+ $content = '';
17
+ foreach ( $comments as $comment ) {
18
+
19
+ $block_content = ( new WP_Block(
20
+ $block->parsed_block,
21
+ array(
22
+ 'commentId' => $comment->comment_ID,
23
+ )
24
+ ) )->render( array( 'dynamic' => false ) );
25
+
26
+ $children = $comment->get_children();
27
+
28
+ // If the comment has children, recurse to create the HTML for the nested
29
+ // comments.
30
+ if ( ! empty( $children ) ) {
31
+ $inner_content = block_core_comment_template_render_comments(
32
+ $children,
33
+ $block
34
+ );
35
+ $block_content .= sprintf( '<ol>%1$s</ol>', $inner_content );
36
+ }
37
+
38
+ $content .= '<li>' . $block_content . '</li>';
39
+ }
40
+
41
+ return $content;
42
+
43
+ }
44
+
8
45
  /**
9
46
  * Renders the `core/comment-template` block on the server.
10
47
  *
@@ -16,37 +53,27 @@
16
53
  * defined by the block's inner blocks.
17
54
  */
18
55
  function render_block_core_comment_template( $attributes, $content, $block ) {
19
-
20
- $post_id = $block->context['postId'];
21
-
22
56
  // Bail out early if the post ID is not set for some reason.
23
- if ( ! isset( $post_id ) ) {
57
+ if ( empty( $block->context['postId'] ) ) {
24
58
  return '';
25
59
  }
26
60
 
27
- $number = $block->context['queryPerPage'];
61
+ $comment_query = new WP_Comment_Query(
62
+ build_comment_query_vars_from_block( $block )
63
+ );
28
64
 
29
65
  // Get an array of comments for the current post.
30
- $comments = get_approved_comments( $post_id, array( 'number' => $number ) );
31
-
66
+ $comments = $comment_query->get_comments();
32
67
  if ( count( $comments ) === 0 ) {
33
68
  return '';
34
69
  }
35
70
 
36
- $content = '';
37
- foreach ( $comments as $comment ) {
38
- $block_content = ( new WP_Block(
39
- $block->parsed_block,
40
- array(
41
- 'commentId' => $comment->comment_ID,
42
- )
43
- ) )->render( array( 'dynamic' => false ) );
44
- $content .= '<li>' . $block_content . '</li>';
45
- }
71
+ $wrapper_attributes = get_block_wrapper_attributes();
46
72
 
47
73
  return sprintf(
48
- '<ul>%1$s</ul>',
49
- $content
74
+ '<ol %1$s>%2$s</ol>',
75
+ $wrapper_attributes,
76
+ block_core_comment_template_render_comments( $comments, $block )
50
77
  );
51
78
  }
52
79
 
@@ -0,0 +1,17 @@
1
+ .wp-block-comment-template {
2
+ margin-bottom: 0;
3
+ max-width: 100%;
4
+ list-style: none;
5
+ padding: 0;
6
+
7
+ li {
8
+ clear: both;
9
+ }
10
+
11
+ ol {
12
+ margin-bottom: 0;
13
+ max-width: 100%;
14
+ list-style: none;
15
+ padding-left: 2rem;
16
+ }
17
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import { convertToTree } from '../util';
5
+
6
+ describe( 'Convert to tree', () => {
7
+ it( 'Empty comments', () => {
8
+ const comments = convertToTree( [] );
9
+
10
+ expect( comments ).toEqual( [] );
11
+ } );
12
+
13
+ it( 'Handle comments', () => {
14
+ const comments = convertToTree( [
15
+ { id: 1, parent: 0 },
16
+ { id: 2, parent: 0 },
17
+ { id: 3, parent: 2 },
18
+ { id: 4, parent: 2 },
19
+ { id: 5, parent: 4 },
20
+ { id: 6, parent: 1 },
21
+ ] );
22
+
23
+ expect( comments ).toEqual( [
24
+ {
25
+ commentId: 1,
26
+ children: [
27
+ {
28
+ commentId: 6,
29
+ children: [],
30
+ },
31
+ ],
32
+ },
33
+ {
34
+ commentId: 2,
35
+ children: [
36
+ { commentId: 3, children: [] },
37
+ {
38
+ commentId: 4,
39
+ children: [ { commentId: 5, children: [] } ],
40
+ },
41
+ ],
42
+ },
43
+ ] );
44
+ } );
45
+ } );
@@ -0,0 +1,56 @@
1
+ /**
2
+ *
3
+ * This function converts a flat list of comment objects with a `parent` property
4
+ * to a nested list of comment objects with a `children` property. The `children`
5
+ * property is itself a list of comment objects.
6
+ *
7
+ * @example
8
+ * ```
9
+ * const comments = [
10
+ * { id: 1, parent: 0 },
11
+ * { id: 2, parent: 1 },
12
+ * { id: 3, parent: 2 },
13
+ * { id: 4, parent: 1 },
14
+ * ];
15
+ * expect( convertToTree( comments ) ).toEqual( [
16
+ * {
17
+ * commentId: 1,
18
+ * children: [
19
+ * { commentId: 2, children: [ { commentId: 3, children: [] } ] },
20
+ * { commentId: 4, children: [] },
21
+ * ],
22
+ * },
23
+ * ] );
24
+ * ```
25
+ * @typedef {{id: number, parent: number}} Comment
26
+ * @param {Comment[]} data - List of comment objects.
27
+ *
28
+ * @return {Object[]} Nested list of comment objects with a `children` property.
29
+ */
30
+ export const convertToTree = ( data ) => {
31
+ const table = {};
32
+ if ( ! data ) return [];
33
+
34
+ // First create a hash table of { [id]: { ...comment, children: [] }}
35
+ data.forEach( ( item ) => {
36
+ table[ item.id ] = { commentId: item.id, children: [] };
37
+ } );
38
+
39
+ const tree = [];
40
+
41
+ // Iterate over the original comments again
42
+ data.forEach( ( item ) => {
43
+ if ( item.parent ) {
44
+ // If the comment has a "parent", then find that parent in the table that
45
+ // we have created above and push the current comment to the array of its
46
+ // children.
47
+ table[ item.parent ]?.children.push( table[ item.id ] );
48
+ } else {
49
+ // Otherwise, if the comment has no parent (also works if parent is 0)
50
+ // that means that it's a top-level comment so we can find it in the table
51
+ // and push it to the final tree.
52
+ tree.push( table[ item.id ] );
53
+ }
54
+ } );
55
+ return tree;
56
+ };
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://schemas.wp.org/trunk/block.json",
3
+ "apiVersion": 2,
4
+ "name": "core/comments-pagination",
5
+ "title": "Comments Pagination",
6
+ "category": "theme",
7
+ "parent": [ "core/comments-query-loop" ],
8
+ "description": "Displays a paginated navigation to next/previous set of comments, when applicable.",
9
+ "textdomain": "default",
10
+ "attributes": {
11
+ "paginationArrow": {
12
+ "type": "string",
13
+ "default": "none"
14
+ }
15
+ },
16
+ "providesContext": {
17
+ "comments/paginationArrow": "paginationArrow"
18
+ },
19
+ "supports": {
20
+ "align": true,
21
+ "reusable": false,
22
+ "html": false,
23
+ "color": {
24
+ "gradients": true,
25
+ "link": true,
26
+ "__experimentalDefaultControls": {
27
+ "background": true,
28
+ "text": true,
29
+ "link": true
30
+ }
31
+ },
32
+ "__experimentalLayout": {
33
+ "allowSwitching": false,
34
+ "allowInheriting": false,
35
+ "default": {
36
+ "type": "flex"
37
+ }
38
+ }
39
+ },
40
+ "editorStyle": "wp-block-comments-pagination-editor",
41
+ "style": "wp-block-comments-pagination"
42
+ }