@wordpress/block-library 6.1.0 → 7.0.1

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 (494) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +7 -1
  3. package/build/audio/edit.js +1 -1
  4. package/build/audio/edit.js.map +1 -1
  5. package/build/button/index.js +5 -1
  6. package/build/button/index.js.map +1 -1
  7. package/build/calendar/index.js +4 -1
  8. package/build/calendar/index.js.map +1 -1
  9. package/build/calendar/transforms.js +27 -0
  10. package/build/calendar/transforms.js.map +1 -0
  11. package/build/code/index.js +5 -1
  12. package/build/code/index.js.map +1 -1
  13. package/build/code/transforms.js +1 -1
  14. package/build/code/transforms.js.map +1 -1
  15. package/build/column/index.js +5 -1
  16. package/build/column/index.js.map +1 -1
  17. package/build/columns/index.js +5 -1
  18. package/build/columns/index.js.map +1 -1
  19. package/build/comment-author-avatar/index.js +4 -1
  20. package/build/comment-author-avatar/index.js.map +1 -1
  21. package/build/comment-author-name/index.js +6 -1
  22. package/build/comment-author-name/index.js.map +1 -1
  23. package/build/comment-content/index.js +5 -1
  24. package/build/comment-content/index.js.map +1 -1
  25. package/build/comment-date/index.js +6 -1
  26. package/build/comment-date/index.js.map +1 -1
  27. package/build/comment-edit-link/index.js +5 -1
  28. package/build/comment-edit-link/index.js.map +1 -1
  29. package/build/comment-reply-link/index.js +5 -1
  30. package/build/comment-reply-link/index.js.map +1 -1
  31. package/build/comment-template/edit.js +49 -11
  32. package/build/comment-template/edit.js.map +1 -1
  33. package/build/comments-pagination/index.js +6 -1
  34. package/build/comments-pagination/index.js.map +1 -1
  35. package/build/comments-pagination-next/index.js +4 -1
  36. package/build/comments-pagination-next/index.js.map +1 -1
  37. package/build/comments-pagination-previous/index.js +4 -1
  38. package/build/comments-pagination-previous/index.js.map +1 -1
  39. package/build/comments-query-loop/index.js +6 -1
  40. package/build/comments-query-loop/index.js.map +1 -1
  41. package/build/cover/deprecated.js +181 -15
  42. package/build/cover/deprecated.js.map +1 -1
  43. package/build/cover/edit.js +7 -4
  44. package/build/cover/edit.js.map +1 -1
  45. package/build/cover/save.js +8 -3
  46. package/build/cover/save.js.map +1 -1
  47. package/build/gallery/constants.js +5 -1
  48. package/build/gallery/constants.js.map +1 -1
  49. package/build/gallery/edit.js +26 -14
  50. package/build/gallery/edit.js.map +1 -1
  51. package/build/gallery/shared.js +1 -1
  52. package/build/gallery/shared.js.map +1 -1
  53. package/build/gallery/transforms.js +8 -2
  54. package/build/gallery/transforms.js.map +1 -1
  55. package/build/gallery/utils.js +4 -3
  56. package/build/gallery/utils.js.map +1 -1
  57. package/build/group/index.js +5 -1
  58. package/build/group/index.js.map +1 -1
  59. package/build/group/variations.js +18 -3
  60. package/build/group/variations.js.map +1 -1
  61. package/build/heading/index.js +5 -1
  62. package/build/heading/index.js.map +1 -1
  63. package/build/heading/transforms.js +7 -5
  64. package/build/heading/transforms.js.map +1 -1
  65. package/build/image/edit.native.js +55 -15
  66. package/build/image/edit.native.js.map +1 -1
  67. package/build/index.js +7 -3
  68. package/build/index.js.map +1 -1
  69. package/build/latest-posts/edit.js +46 -57
  70. package/build/latest-posts/edit.js.map +1 -1
  71. package/build/list/index.js +5 -1
  72. package/build/list/index.js.map +1 -1
  73. package/build/media-text/index.js +5 -1
  74. package/build/media-text/index.js.map +1 -1
  75. package/build/navigation/edit/existing-menus-options.js +62 -0
  76. package/build/navigation/edit/existing-menus-options.js.map +1 -0
  77. package/build/navigation/edit/index.js +4 -5
  78. package/build/navigation/edit/index.js.map +1 -1
  79. package/build/navigation/edit/inner-blocks.js +7 -3
  80. package/build/navigation/edit/inner-blocks.js.map +1 -1
  81. package/build/navigation/edit/navigation-menu-selector.js +25 -33
  82. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  83. package/build/navigation/edit/overlay-menu-icon.js +0 -1
  84. package/build/navigation/edit/overlay-menu-icon.js.map +1 -1
  85. package/build/navigation/edit/placeholder/index.js +26 -71
  86. package/build/navigation/edit/placeholder/index.js.map +1 -1
  87. package/build/navigation/edit/placeholder/placeholder-preview.js +8 -12
  88. package/build/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
  89. package/build/paragraph/index.js +5 -1
  90. package/build/paragraph/index.js.map +1 -1
  91. package/build/paragraph/transforms.js +5 -1
  92. package/build/paragraph/transforms.js.map +1 -1
  93. package/build/post-author/index.js +5 -1
  94. package/build/post-author/index.js.map +1 -1
  95. package/build/post-author-biography/edit.js +76 -0
  96. package/build/post-author-biography/edit.js.map +1 -0
  97. package/build/post-author-biography/index.js +68 -0
  98. package/build/post-author-biography/index.js.map +1 -0
  99. package/build/post-author-name/index.js +6 -1
  100. package/build/post-author-name/index.js.map +1 -1
  101. package/build/post-comments/index.js +5 -1
  102. package/build/post-comments/index.js.map +1 -1
  103. package/build/post-comments-count/index.js +5 -1
  104. package/build/post-comments-count/index.js.map +1 -1
  105. package/build/post-comments-form/index.js +5 -1
  106. package/build/post-comments-form/index.js.map +1 -1
  107. package/build/post-comments-link/index.js +5 -1
  108. package/build/post-comments-link/index.js.map +1 -1
  109. package/build/post-content/edit.js +9 -3
  110. package/build/post-content/edit.js.map +1 -1
  111. package/build/post-date/index.js +6 -1
  112. package/build/post-date/index.js.map +1 -1
  113. package/build/post-excerpt/index.js +6 -1
  114. package/build/post-excerpt/index.js.map +1 -1
  115. package/build/post-terms/index.js +9 -1
  116. package/build/post-terms/index.js.map +1 -1
  117. package/build/post-title/edit.js +10 -7
  118. package/build/post-title/edit.js.map +1 -1
  119. package/build/post-title/index.js +6 -1
  120. package/build/post-title/index.js.map +1 -1
  121. package/build/preformatted/index.js +5 -1
  122. package/build/preformatted/index.js.map +1 -1
  123. package/build/pullquote/index.js +5 -1
  124. package/build/pullquote/index.js.map +1 -1
  125. package/build/query/index.js +5 -1
  126. package/build/query/index.js.map +1 -1
  127. package/build/query-pagination/index.js +6 -1
  128. package/build/query-pagination/index.js.map +1 -1
  129. package/build/query-pagination-next/index.js +4 -1
  130. package/build/query-pagination-next/index.js.map +1 -1
  131. package/build/query-pagination-previous/index.js +4 -1
  132. package/build/query-pagination-previous/index.js.map +1 -1
  133. package/build/query-title/index.js +8 -1
  134. package/build/query-title/index.js.map +1 -1
  135. package/build/quote/index.js +1 -5
  136. package/build/quote/index.js.map +1 -1
  137. package/build/read-more/edit.js +55 -0
  138. package/build/read-more/edit.js.map +1 -0
  139. package/build/read-more/index.js +87 -0
  140. package/build/read-more/index.js.map +1 -0
  141. package/build/search/edit.js +1 -1
  142. package/build/search/edit.js.map +1 -1
  143. package/build/search/index.js +5 -1
  144. package/build/search/index.js.map +1 -1
  145. package/build/site-logo/edit.js +4 -8
  146. package/build/site-logo/edit.js.map +1 -1
  147. package/build/site-tagline/edit.js +7 -2
  148. package/build/site-tagline/edit.js.map +1 -1
  149. package/build/site-tagline/index.js +5 -1
  150. package/build/site-tagline/index.js.map +1 -1
  151. package/build/site-title/index.js +6 -1
  152. package/build/site-title/index.js.map +1 -1
  153. package/build/social-link/edit.js +8 -1
  154. package/build/social-link/edit.js.map +1 -1
  155. package/build/social-link/index.js +1 -1
  156. package/build/social-links/edit.js +7 -2
  157. package/build/social-links/edit.js.map +1 -1
  158. package/build/social-links/index.js +5 -0
  159. package/build/social-links/index.js.map +1 -1
  160. package/build/social-links/save.js +2 -0
  161. package/build/social-links/save.js.map +1 -1
  162. package/build/table/index.js +5 -1
  163. package/build/table/index.js.map +1 -1
  164. package/build/tag-cloud/index.js +12 -1
  165. package/build/tag-cloud/index.js.map +1 -1
  166. package/build/tag-cloud/transforms.js +27 -0
  167. package/build/tag-cloud/transforms.js.map +1 -0
  168. package/build/term-description/index.js +5 -1
  169. package/build/term-description/index.js.map +1 -1
  170. package/build/verse/index.js +5 -1
  171. package/build/verse/index.js.map +1 -1
  172. package/build-module/audio/edit.js +1 -1
  173. package/build-module/audio/edit.js.map +1 -1
  174. package/build-module/button/index.js +5 -1
  175. package/build-module/button/index.js.map +1 -1
  176. package/build-module/calendar/index.js +3 -1
  177. package/build-module/calendar/index.js.map +1 -1
  178. package/build-module/calendar/transforms.js +18 -0
  179. package/build-module/calendar/transforms.js.map +1 -0
  180. package/build-module/code/index.js +5 -1
  181. package/build-module/code/index.js.map +1 -1
  182. package/build-module/code/transforms.js +1 -1
  183. package/build-module/code/transforms.js.map +1 -1
  184. package/build-module/column/index.js +5 -1
  185. package/build-module/column/index.js.map +1 -1
  186. package/build-module/columns/index.js +5 -1
  187. package/build-module/columns/index.js.map +1 -1
  188. package/build-module/comment-author-avatar/index.js +4 -1
  189. package/build-module/comment-author-avatar/index.js.map +1 -1
  190. package/build-module/comment-author-name/index.js +6 -1
  191. package/build-module/comment-author-name/index.js.map +1 -1
  192. package/build-module/comment-content/index.js +5 -1
  193. package/build-module/comment-content/index.js.map +1 -1
  194. package/build-module/comment-date/index.js +6 -1
  195. package/build-module/comment-date/index.js.map +1 -1
  196. package/build-module/comment-edit-link/index.js +5 -1
  197. package/build-module/comment-edit-link/index.js.map +1 -1
  198. package/build-module/comment-reply-link/index.js +5 -1
  199. package/build-module/comment-reply-link/index.js.map +1 -1
  200. package/build-module/comment-template/edit.js +48 -13
  201. package/build-module/comment-template/edit.js.map +1 -1
  202. package/build-module/comments-pagination/index.js +6 -1
  203. package/build-module/comments-pagination/index.js.map +1 -1
  204. package/build-module/comments-pagination-next/index.js +4 -1
  205. package/build-module/comments-pagination-next/index.js.map +1 -1
  206. package/build-module/comments-pagination-previous/index.js +4 -1
  207. package/build-module/comments-pagination-previous/index.js.map +1 -1
  208. package/build-module/comments-query-loop/index.js +6 -1
  209. package/build-module/comments-query-loop/index.js.map +1 -1
  210. package/build-module/cover/deprecated.js +185 -17
  211. package/build-module/cover/deprecated.js.map +1 -1
  212. package/build-module/cover/edit.js +7 -4
  213. package/build-module/cover/edit.js.map +1 -1
  214. package/build-module/cover/save.js +8 -3
  215. package/build-module/cover/save.js.map +1 -1
  216. package/build-module/gallery/constants.js +2 -0
  217. package/build-module/gallery/constants.js.map +1 -1
  218. package/build-module/gallery/edit.js +25 -14
  219. package/build-module/gallery/edit.js.map +1 -1
  220. package/build-module/gallery/shared.js +1 -1
  221. package/build-module/gallery/shared.js.map +1 -1
  222. package/build-module/gallery/transforms.js +8 -2
  223. package/build-module/gallery/transforms.js.map +1 -1
  224. package/build-module/gallery/utils.js +5 -4
  225. package/build-module/gallery/utils.js.map +1 -1
  226. package/build-module/group/index.js +5 -1
  227. package/build-module/group/index.js.map +1 -1
  228. package/build-module/group/variations.js +18 -3
  229. package/build-module/group/variations.js.map +1 -1
  230. package/build-module/heading/index.js +5 -1
  231. package/build-module/heading/index.js.map +1 -1
  232. package/build-module/heading/transforms.js +7 -5
  233. package/build-module/heading/transforms.js.map +1 -1
  234. package/build-module/image/edit.native.js +54 -15
  235. package/build-module/image/edit.native.js.map +1 -1
  236. package/build-module/index.js +5 -3
  237. package/build-module/index.js.map +1 -1
  238. package/build-module/latest-posts/edit.js +47 -58
  239. package/build-module/latest-posts/edit.js.map +1 -1
  240. package/build-module/list/index.js +5 -1
  241. package/build-module/list/index.js.map +1 -1
  242. package/build-module/media-text/index.js +5 -1
  243. package/build-module/media-text/index.js.map +1 -1
  244. package/build-module/navigation/edit/existing-menus-options.js +53 -0
  245. package/build-module/navigation/edit/existing-menus-options.js.map +1 -0
  246. package/build-module/navigation/edit/index.js +4 -5
  247. package/build-module/navigation/edit/index.js.map +1 -1
  248. package/build-module/navigation/edit/inner-blocks.js +8 -4
  249. package/build-module/navigation/edit/inner-blocks.js.map +1 -1
  250. package/build-module/navigation/edit/navigation-menu-selector.js +26 -33
  251. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  252. package/build-module/navigation/edit/overlay-menu-icon.js +0 -1
  253. package/build-module/navigation/edit/overlay-menu-icon.js.map +1 -1
  254. package/build-module/navigation/edit/placeholder/index.js +26 -71
  255. package/build-module/navigation/edit/placeholder/index.js.map +1 -1
  256. package/build-module/navigation/edit/placeholder/placeholder-preview.js +8 -13
  257. package/build-module/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
  258. package/build-module/paragraph/index.js +5 -1
  259. package/build-module/paragraph/index.js.map +1 -1
  260. package/build-module/paragraph/transforms.js +5 -1
  261. package/build-module/paragraph/transforms.js.map +1 -1
  262. package/build-module/post-author/index.js +5 -1
  263. package/build-module/post-author/index.js.map +1 -1
  264. package/build-module/post-author-biography/edit.js +64 -0
  265. package/build-module/post-author-biography/edit.js.map +1 -0
  266. package/build-module/post-author-biography/index.js +59 -0
  267. package/build-module/post-author-biography/index.js.map +1 -0
  268. package/build-module/post-author-name/index.js +6 -1
  269. package/build-module/post-author-name/index.js.map +1 -1
  270. package/build-module/post-comments/index.js +5 -1
  271. package/build-module/post-comments/index.js.map +1 -1
  272. package/build-module/post-comments-count/index.js +5 -1
  273. package/build-module/post-comments-count/index.js.map +1 -1
  274. package/build-module/post-comments-form/index.js +5 -1
  275. package/build-module/post-comments-form/index.js.map +1 -1
  276. package/build-module/post-comments-link/index.js +5 -1
  277. package/build-module/post-comments-link/index.js.map +1 -1
  278. package/build-module/post-content/edit.js +6 -4
  279. package/build-module/post-content/edit.js.map +1 -1
  280. package/build-module/post-date/index.js +6 -1
  281. package/build-module/post-date/index.js.map +1 -1
  282. package/build-module/post-excerpt/index.js +6 -1
  283. package/build-module/post-excerpt/index.js.map +1 -1
  284. package/build-module/post-terms/index.js +12 -1
  285. package/build-module/post-terms/index.js.map +1 -1
  286. package/build-module/post-title/edit.js +10 -8
  287. package/build-module/post-title/edit.js.map +1 -1
  288. package/build-module/post-title/index.js +6 -1
  289. package/build-module/post-title/index.js.map +1 -1
  290. package/build-module/preformatted/index.js +5 -1
  291. package/build-module/preformatted/index.js.map +1 -1
  292. package/build-module/pullquote/index.js +5 -1
  293. package/build-module/pullquote/index.js.map +1 -1
  294. package/build-module/query/index.js +5 -1
  295. package/build-module/query/index.js.map +1 -1
  296. package/build-module/query-pagination/index.js +6 -1
  297. package/build-module/query-pagination/index.js.map +1 -1
  298. package/build-module/query-pagination-next/index.js +4 -1
  299. package/build-module/query-pagination-next/index.js.map +1 -1
  300. package/build-module/query-pagination-previous/index.js +4 -1
  301. package/build-module/query-pagination-previous/index.js.map +1 -1
  302. package/build-module/query-title/index.js +11 -1
  303. package/build-module/query-title/index.js.map +1 -1
  304. package/build-module/quote/index.js +1 -5
  305. package/build-module/quote/index.js.map +1 -1
  306. package/build-module/read-more/edit.js +41 -0
  307. package/build-module/read-more/edit.js.map +1 -0
  308. package/build-module/read-more/index.js +74 -0
  309. package/build-module/read-more/index.js.map +1 -0
  310. package/build-module/search/edit.js +1 -1
  311. package/build-module/search/edit.js.map +1 -1
  312. package/build-module/search/index.js +5 -1
  313. package/build-module/search/index.js.map +1 -1
  314. package/build-module/site-logo/edit.js +4 -8
  315. package/build-module/site-logo/edit.js.map +1 -1
  316. package/build-module/site-tagline/edit.js +6 -2
  317. package/build-module/site-tagline/edit.js.map +1 -1
  318. package/build-module/site-tagline/index.js +5 -1
  319. package/build-module/site-tagline/index.js.map +1 -1
  320. package/build-module/site-title/index.js +6 -1
  321. package/build-module/site-title/index.js.map +1 -1
  322. package/build-module/social-link/edit.js +8 -1
  323. package/build-module/social-link/edit.js.map +1 -1
  324. package/build-module/social-link/index.js +1 -1
  325. package/build-module/social-links/edit.js +7 -2
  326. package/build-module/social-links/edit.js.map +1 -1
  327. package/build-module/social-links/index.js +5 -0
  328. package/build-module/social-links/index.js.map +1 -1
  329. package/build-module/social-links/save.js +2 -0
  330. package/build-module/social-links/save.js.map +1 -1
  331. package/build-module/table/index.js +5 -1
  332. package/build-module/table/index.js.map +1 -1
  333. package/build-module/tag-cloud/index.js +11 -1
  334. package/build-module/tag-cloud/index.js.map +1 -1
  335. package/build-module/tag-cloud/transforms.js +18 -0
  336. package/build-module/tag-cloud/transforms.js.map +1 -0
  337. package/build-module/term-description/index.js +5 -1
  338. package/build-module/term-description/index.js.map +1 -1
  339. package/build-module/verse/index.js +5 -1
  340. package/build-module/verse/index.js.map +1 -1
  341. package/build-style/common-rtl.css +8 -0
  342. package/build-style/common.css +8 -0
  343. package/build-style/cover/style-rtl.css +115 -11
  344. package/build-style/cover/style.css +115 -11
  345. package/build-style/editor-rtl.css +77 -67
  346. package/build-style/editor.css +77 -67
  347. package/build-style/gallery/style-rtl.css +2 -1
  348. package/build-style/gallery/style.css +2 -1
  349. package/build-style/image/style-rtl.css +0 -2
  350. package/build-style/image/style.css +0 -2
  351. package/build-style/navigation/editor-rtl.css +77 -67
  352. package/build-style/navigation/editor.css +77 -67
  353. package/build-style/quote/style-rtl.css +5 -5
  354. package/build-style/quote/style.css +5 -5
  355. package/build-style/read-more/style-rtl.css +87 -0
  356. package/build-style/read-more/style.css +87 -0
  357. package/build-style/separator/style-rtl.css +0 -3
  358. package/build-style/separator/style.css +0 -3
  359. package/build-style/social-links/style-rtl.css +7 -1
  360. package/build-style/social-links/style.css +7 -1
  361. package/build-style/style-rtl.css +149 -23
  362. package/build-style/style.css +149 -23
  363. package/package.json +28 -30
  364. package/src/audio/edit.js +1 -1
  365. package/src/block/test/edit.native.js +7 -3
  366. package/src/button/block.json +5 -1
  367. package/src/buttons/test/edit.native.js +2 -2
  368. package/src/calendar/index.js +2 -0
  369. package/src/calendar/transforms.js +23 -0
  370. package/src/code/block.json +5 -1
  371. package/src/code/transforms.js +1 -1
  372. package/src/column/block.json +5 -1
  373. package/src/columns/block.json +5 -1
  374. package/src/comment-author-avatar/block.json +4 -1
  375. package/src/comment-author-name/block.json +6 -1
  376. package/src/comment-content/block.json +5 -1
  377. package/src/comment-date/block.json +6 -1
  378. package/src/comment-date/index.php +1 -1
  379. package/src/comment-edit-link/block.json +5 -1
  380. package/src/comment-reply-link/block.json +5 -1
  381. package/src/comment-template/edit.js +59 -14
  382. package/src/comments-pagination/block.json +6 -1
  383. package/src/comments-pagination-next/block.json +4 -1
  384. package/src/comments-pagination-previous/block.json +4 -1
  385. package/src/comments-query-loop/block.json +6 -1
  386. package/src/common.scss +9 -0
  387. package/src/cover/deprecated.js +211 -1
  388. package/src/cover/edit.js +8 -4
  389. package/src/cover/save.js +10 -4
  390. package/src/cover/style.scss +20 -2
  391. package/src/cover/test/__snapshots__/edit.native.js.snap +4 -4
  392. package/src/cover/test/edit.native.js +8 -4
  393. package/src/embed/test/index.native.js +6 -6
  394. package/src/gallery/constants.js +2 -0
  395. package/src/gallery/edit.js +31 -13
  396. package/src/gallery/shared.js +1 -1
  397. package/src/gallery/style.scss +4 -1
  398. package/src/gallery/test/__snapshots__/index.native.js.snap +7 -0
  399. package/src/gallery/test/index.native.js +128 -0
  400. package/src/gallery/transforms.js +7 -1
  401. package/src/gallery/utils.js +7 -3
  402. package/src/group/block.json +5 -1
  403. package/src/group/variations.js +11 -1
  404. package/src/heading/block.json +5 -1
  405. package/src/heading/transforms.js +2 -5
  406. package/src/image/edit.native.js +65 -15
  407. package/src/image/index.php +1 -1
  408. package/src/image/style.scss +0 -2
  409. package/src/image/test/edit.native.js +157 -8
  410. package/src/index.js +35 -31
  411. package/src/latest-comments/index.php +4 -4
  412. package/src/latest-posts/edit.js +51 -63
  413. package/src/latest-posts/index.php +3 -3
  414. package/src/list/block.json +5 -1
  415. package/src/media-text/block.json +5 -1
  416. package/src/missing/test/edit-integration.native.js +2 -2
  417. package/src/navigation/edit/existing-menus-options.js +70 -0
  418. package/src/navigation/edit/index.js +4 -3
  419. package/src/navigation/edit/inner-blocks.js +16 -3
  420. package/src/navigation/edit/navigation-menu-selector.js +38 -62
  421. package/src/navigation/edit/overlay-menu-icon.js +0 -1
  422. package/src/navigation/edit/placeholder/index.js +39 -108
  423. package/src/navigation/edit/placeholder/placeholder-preview.js +8 -10
  424. package/src/navigation/editor.scss +119 -100
  425. package/src/navigation/index.php +3 -3
  426. package/src/navigation-link/index.php +1 -1
  427. package/src/navigation-submenu/index.php +1 -1
  428. package/src/page-list/index.php +5 -5
  429. package/src/paragraph/block.json +5 -1
  430. package/src/post-author/block.json +5 -1
  431. package/src/post-author-biography/block.json +41 -0
  432. package/src/post-author-biography/edit.js +63 -0
  433. package/src/post-author-biography/index.js +18 -0
  434. package/src/post-author-biography/index.php +48 -0
  435. package/src/post-author-name/block.json +6 -1
  436. package/src/post-comments/block.json +5 -1
  437. package/src/post-comments-count/block.json +5 -1
  438. package/src/post-comments-form/block.json +5 -1
  439. package/src/post-comments-link/block.json +5 -1
  440. package/src/post-comments-link/index.php +2 -2
  441. package/src/post-content/edit.js +4 -4
  442. package/src/post-date/block.json +6 -1
  443. package/src/post-date/index.php +1 -1
  444. package/src/post-excerpt/block.json +6 -1
  445. package/src/post-excerpt/index.php +1 -1
  446. package/src/post-terms/block.json +6 -1
  447. package/src/post-terms/index.js +6 -0
  448. package/src/post-title/block.json +6 -1
  449. package/src/post-title/edit.js +8 -7
  450. package/src/post-title/index.php +1 -1
  451. package/src/preformatted/block.json +5 -1
  452. package/src/pullquote/block.json +5 -1
  453. package/src/query/block.json +5 -1
  454. package/src/query-pagination/block.json +6 -1
  455. package/src/query-pagination-next/block.json +4 -1
  456. package/src/query-pagination-next/index.php +2 -2
  457. package/src/query-pagination-previous/block.json +4 -1
  458. package/src/query-pagination-previous/index.php +2 -2
  459. package/src/query-title/block.json +5 -1
  460. package/src/query-title/index.js +6 -0
  461. package/src/quote/block.json +1 -2
  462. package/src/quote/index.js +0 -1
  463. package/src/quote/style.scss +3 -3
  464. package/src/quote/theme.scss +1 -1
  465. package/src/read-more/block.json +56 -0
  466. package/src/read-more/edit.js +50 -0
  467. package/src/read-more/index.js +18 -0
  468. package/src/read-more/index.php +45 -0
  469. package/src/read-more/style.scss +12 -0
  470. package/src/search/block.json +5 -1
  471. package/src/search/edit.js +2 -1
  472. package/src/search/index.php +5 -3
  473. package/src/separator/style.scss +0 -5
  474. package/src/site-logo/edit.js +4 -8
  475. package/src/site-tagline/block.json +5 -1
  476. package/src/site-tagline/edit.js +10 -1
  477. package/src/site-tagline/index.php +1 -1
  478. package/src/site-title/block.json +6 -1
  479. package/src/site-title/index.php +2 -2
  480. package/src/social-link/block.json +1 -0
  481. package/src/social-link/edit.js +14 -2
  482. package/src/social-link/index.php +55 -52
  483. package/src/social-links/block.json +5 -0
  484. package/src/social-links/edit.js +8 -1
  485. package/src/social-links/save.js +7 -1
  486. package/src/social-links/style.scss +8 -1
  487. package/src/style.scss +1 -0
  488. package/src/table/block.json +5 -1
  489. package/src/tag-cloud/block.json +4 -0
  490. package/src/tag-cloud/index.js +2 -0
  491. package/src/tag-cloud/index.php +0 -9
  492. package/src/tag-cloud/transforms.js +23 -0
  493. package/src/term-description/block.json +5 -1
  494. package/src/verse/block.json +5 -1
@@ -38,7 +38,11 @@ const metadata = {
38
38
  html: false,
39
39
  color: {
40
40
  gradients: true,
41
- link: true
41
+ link: true,
42
+ __experimentalDefaultControls: {
43
+ background: true,
44
+ text: true
45
+ }
42
46
  },
43
47
  spacing: {
44
48
  padding: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/column/index.js"],"names":["column","icon","deprecated","edit","save","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,IAAIC,IAAnB,QAA+B,kBAA/B;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,IAAP,MAAiB,QAAjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AAEA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBN,EAAAA,IADuB;AAEvBE,EAAAA,IAFuB;AAGvBC,EAAAA,IAHuB;AAIvBF,EAAAA;AAJuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { column as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/column/index.js"],"names":["column","icon","deprecated","edit","save","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,IAAIC,IAAnB,QAA+B,kBAA/B;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,IAAP,MAAiB,QAAjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AAEA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBN,EAAAA,IADuB;AAEvBE,EAAAA,IAFuB;AAGvBC,EAAAA,IAHuB;AAIvBF,EAAAA;AAJuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { column as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n"]}
@@ -32,7 +32,11 @@ const metadata = {
32
32
  html: false,
33
33
  color: {
34
34
  gradients: true,
35
- link: true
35
+ link: true,
36
+ __experimentalDefaultControls: {
37
+ background: true,
38
+ text: true
39
+ }
36
40
  },
37
41
  spacing: {
38
42
  blockGap: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/columns/index.js"],"names":["__","columns","icon","deprecated","edit","save","variations","transforms","name","metadata","settings","example","viewportWidth","innerBlocks","attributes","content","url"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,OAAO,IAAIC,IAApB,QAAgC,kBAAhC;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,cAAv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AAA,UA7DuB;AA8DvBC,EAAAA,IA9DuB;AA+DvBC,EAAAA,IA/DuB;AAgEvBE,EAAAA;AAhEuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { columns as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport variations from './variations';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tvariations,\n\texample: {\n\t\tviewportWidth: 600, // Columns collapse \"@media (max-width: 599px)\".\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/column',\n\t\t\t\tinnerBlocks: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'core/paragraph',\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t/* translators: example text. */\n\t\t\t\t\t\t\tcontent: __(\n\t\t\t\t\t\t\t\t'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'core/image',\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\turl:\n\t\t\t\t\t\t\t\t'https://s.w.org/images/core/5.3/Windbuchencom.jpg',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'core/paragraph',\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t/* translators: example text. */\n\t\t\t\t\t\t\tcontent: __(\n\t\t\t\t\t\t\t\t'Suspendisse commodo neque lacus, a dictum orci interdum et.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/column',\n\t\t\t\tinnerBlocks: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'core/paragraph',\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t/* translators: example text. */\n\t\t\t\t\t\t\tcontent: __(\n\t\t\t\t\t\t\t\t'Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'core/paragraph',\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t/* translators: example text. */\n\t\t\t\t\t\t\tcontent: __(\n\t\t\t\t\t\t\t\t'Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n\tdeprecated,\n\tedit,\n\tsave,\n\ttransforms,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/columns/index.js"],"names":["__","columns","icon","deprecated","edit","save","variations","transforms","name","metadata","settings","example","viewportWidth","innerBlocks","attributes","content","url"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,OAAO,IAAIC,IAApB,QAAgC,kBAAhC;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,IAAP,MAAiB,QAAjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AAEA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBR,EAAAA,IADuB;AAEvBI,EAAAA,UAFuB;AAGvBK,EAAAA,OAAO,EAAE;AACRC,IAAAA,aAAa,EAAE,GADP;AACY;AACpBC,IAAAA,WAAW,EAAE,CACZ;AACCL,MAAAA,IAAI,EAAE,aADP;AAECK,MAAAA,WAAW,EAAE,CACZ;AACCL,QAAAA,IAAI,EAAE,gBADP;AAECM,QAAAA,UAAU,EAAE;AACX;AACAC,UAAAA,OAAO,EAAEf,EAAE,CACV,qFADU;AAFA;AAFb,OADY,EAUZ;AACCQ,QAAAA,IAAI,EAAE,YADP;AAECM,QAAAA,UAAU,EAAE;AACXE,UAAAA,GAAG,EACF;AAFU;AAFb,OAVY,EAiBZ;AACCR,QAAAA,IAAI,EAAE,gBADP;AAECM,QAAAA,UAAU,EAAE;AACX;AACAC,UAAAA,OAAO,EAAEf,EAAE,CACV,6DADU;AAFA;AAFb,OAjBY;AAFd,KADY,EA+BZ;AACCQ,MAAAA,IAAI,EAAE,aADP;AAECK,MAAAA,WAAW,EAAE,CACZ;AACCL,QAAAA,IAAI,EAAE,gBADP;AAECM,QAAAA,UAAU,EAAE;AACX;AACAC,UAAAA,OAAO,EAAEf,EAAE,CACV,+JADU;AAFA;AAFb,OADY,EAUZ;AACCQ,QAAAA,IAAI,EAAE,gBADP;AAECM,QAAAA,UAAU,EAAE;AACX;AACAC,UAAAA,OAAO,EAAEf,EAAE,CACV,yGADU;AAFA;AAFb,OAVY;AAFd,KA/BY;AAFL,GAHc;AA6DvBG,EAAAA,UA7DuB;AA8DvBC,EAAAA,IA9DuB;AA+DvBC,EAAAA,IA/DuB;AAgEvBE,EAAAA;AAhEuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { columns as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport variations from './variations';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tvariations,\n\texample: {\n\t\tviewportWidth: 600, // Columns collapse \"@media (max-width: 599px)\".\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/column',\n\t\t\t\tinnerBlocks: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'core/paragraph',\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t/* translators: example text. */\n\t\t\t\t\t\t\tcontent: __(\n\t\t\t\t\t\t\t\t'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'core/image',\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\turl:\n\t\t\t\t\t\t\t\t'https://s.w.org/images/core/5.3/Windbuchencom.jpg',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'core/paragraph',\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t/* translators: example text. */\n\t\t\t\t\t\t\tcontent: __(\n\t\t\t\t\t\t\t\t'Suspendisse commodo neque lacus, a dictum orci interdum et.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/column',\n\t\t\t\tinnerBlocks: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'core/paragraph',\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t/* translators: example text. */\n\t\t\t\t\t\t\tcontent: __(\n\t\t\t\t\t\t\t\t'Etiam et egestas lorem. Vivamus sagittis sit amet dolor quis lobortis. Integer sed fermentum arcu, id vulputate lacus. Etiam fermentum sem eu quam hendrerit.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'core/paragraph',\n\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t/* translators: example text. */\n\t\t\t\t\t\t\tcontent: __(\n\t\t\t\t\t\t\t\t'Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n\tdeprecated,\n\tedit,\n\tsave,\n\ttransforms,\n};\n"]}
@@ -36,7 +36,10 @@ const metadata = {
36
36
  },
37
37
  color: {
38
38
  background: true,
39
- text: false
39
+ text: false,
40
+ __experimentalDefaultControls: {
41
+ background: true
42
+ }
40
43
  },
41
44
  spacing: {
42
45
  __experimentalSkipSerialization: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-author-avatar/index.js"],"names":["commentAuthorAvatar","icon","edit","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,mBAAmB,IAAIC,IAAhC,QAA4C,kBAA5C;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBJ,EAAAA,IADuB;AAEvBC,EAAAA;AAFuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentAuthorAvatar as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comment-author-avatar/index.js"],"names":["commentAuthorAvatar","icon","edit","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,mBAAmB,IAAIC,IAAhC,QAA4C,kBAA5C;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBJ,EAAAA,IADuB;AAEvBC,EAAAA;AAFuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentAuthorAvatar as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n"]}
@@ -37,7 +37,12 @@ const metadata = {
37
37
  },
38
38
  color: {
39
39
  gradients: true,
40
- link: true
40
+ link: true,
41
+ __experimentalDefaultControls: {
42
+ background: true,
43
+ text: true,
44
+ link: true
45
+ }
41
46
  },
42
47
  typography: {
43
48
  fontSize: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-author-name/index.js"],"names":["commentAuthorName","icon","edit","deprecated","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,iBAAiB,IAAIC,IAA9B,QAA0C,kBAA1C;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBL,EAAAA,IADuB;AAEvBC,EAAAA,IAFuB;AAGvBC,EAAAA;AAHuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentAuthorName as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tdeprecated,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comment-author-name/index.js"],"names":["commentAuthorName","icon","edit","deprecated","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,iBAAiB,IAAIC,IAA9B,QAA0C,kBAA1C;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBL,EAAAA,IADuB;AAEvBC,EAAAA,IAFuB;AAGvBC,EAAAA;AAHuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentAuthorName as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tdeprecated,\n};\n"]}
@@ -24,7 +24,11 @@ const metadata = {
24
24
  supports: {
25
25
  color: {
26
26
  gradients: true,
27
- link: true
27
+ link: true,
28
+ __experimentalDefaultControls: {
29
+ background: true,
30
+ text: true
31
+ }
28
32
  },
29
33
  typography: {
30
34
  fontSize: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-content/index.js"],"names":["commentContent","icon","edit","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,cAAc,IAAIC,IAA3B,QAAuC,kBAAvC;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBJ,EAAAA,IADuB;AAEvBC,EAAAA;AAFuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentContent as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comment-content/index.js"],"names":["commentContent","icon","edit","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,cAAc,IAAIC,IAA3B,QAAuC,kBAAvC;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBJ,EAAAA,IADuB;AAEvBC,EAAAA;AAFuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentContent as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n"]}
@@ -29,7 +29,12 @@ const metadata = {
29
29
  html: false,
30
30
  color: {
31
31
  gradients: true,
32
- link: true
32
+ link: true,
33
+ __experimentalDefaultControls: {
34
+ background: true,
35
+ text: true,
36
+ link: true
37
+ }
33
38
  },
34
39
  typography: {
35
40
  fontSize: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-date/index.js"],"names":["postDate","icon","edit","deprecated","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,IAAIC,IAArB,QAAiC,kBAAjC;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBL,EAAAA,IADuB;AAEvBC,EAAAA,IAFuB;AAGvBC,EAAAA;AAHuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postDate as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tdeprecated,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comment-date/index.js"],"names":["postDate","icon","edit","deprecated","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAQ,IAAIC,IAArB,QAAiC,kBAAjC;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBL,EAAAA,IADuB;AAEvBC,EAAAA,IAFuB;AAGvBC,EAAAA;AAHuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postDate as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tdeprecated,\n};\n"]}
@@ -30,7 +30,11 @@ const metadata = {
30
30
  color: {
31
31
  link: true,
32
32
  gradients: true,
33
- text: false
33
+ text: false,
34
+ __experimentalDefaultControls: {
35
+ background: true,
36
+ link: true
37
+ }
34
38
  },
35
39
  typography: {
36
40
  fontSize: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-edit-link/index.js"],"names":["commentEditLink","icon","edit","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,IAAIC,IAA5B,QAAwC,kBAAxC;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBJ,EAAAA,IADuB;AAEvBC,EAAAA;AAFuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentEditLink as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comment-edit-link/index.js"],"names":["commentEditLink","icon","edit","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,IAAIC,IAA5B,QAAwC,kBAAxC;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBJ,EAAAA,IADuB;AAEvBC,EAAAA;AAFuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentEditLink as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n"]}
@@ -25,7 +25,11 @@ const metadata = {
25
25
  color: {
26
26
  gradients: true,
27
27
  link: true,
28
- text: false
28
+ text: false,
29
+ __experimentalDefaultControls: {
30
+ background: true,
31
+ link: true
32
+ }
29
33
  },
30
34
  typography: {
31
35
  fontSize: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-reply-link/index.js"],"names":["commentReplyLink","icon","edit","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAgB,IAAIC,IAA7B,QAAyC,kBAAzC;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBH,EAAAA,IADuB;AAEvBD,EAAAA;AAFuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentReplyLink as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\tedit,\n\ticon,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comment-reply-link/index.js"],"names":["commentReplyLink","icon","edit","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAgB,IAAIC,IAA7B,QAAyC,kBAAzC;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBH,EAAAA,IADuB;AAEvBD,EAAAA;AAFuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentReplyLink as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\tedit,\n\ticon,\n};\n"]}
@@ -1,12 +1,13 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
1
2
  import { createElement } from "@wordpress/element";
2
3
 
3
4
  /**
4
5
  * WordPress dependencies
5
6
  */
6
- import { useState, useMemo } from '@wordpress/element';
7
+ import { useState, useMemo, memo } from '@wordpress/element';
7
8
  import { useSelect } from '@wordpress/data';
8
9
  import { __ } from '@wordpress/i18n';
9
- import { BlockContextProvider, BlockPreview, useBlockProps, useInnerBlocksProps, store as blockEditorStore } from '@wordpress/block-editor';
10
+ import { BlockContextProvider, useBlockProps, useInnerBlocksProps, store as blockEditorStore, __experimentalUseBlockPreview as useBlockPreview } from '@wordpress/block-editor';
10
11
  import { Spinner } from '@wordpress/components';
11
12
  import { store as coreStore } from '@wordpress/core-data';
12
13
  /**
@@ -22,7 +23,7 @@ const TEMPLATE = [['core/comment-author-avatar'], ['core/comment-author-name'],
22
23
  * @param {Array} [props.comment] - A comment object.
23
24
  * @param {Array} [props.activeComment] - The block that is currently active.
24
25
  * @param {Array} [props.setActiveComment] - The setter for activeComment.
25
- * @param {Array} [props.firstBlock] - First comment in the array.
26
+ * @param {Array} [props.firstComment] - First comment in the array.
26
27
  * @param {Array} [props.blocks] - Array of blocks returned from
27
28
  * getBlocks() in parent .
28
29
  * @return {WPElement} Inner blocks of the Comment Template
@@ -35,7 +36,7 @@ function CommentTemplateInnerBlocks(_ref) {
35
36
  comment,
36
37
  activeComment,
37
38
  setActiveComment,
38
- firstBlock,
39
+ firstComment,
39
40
  blocks
40
41
  } = _ref;
41
42
  const {
@@ -44,10 +45,11 @@ function CommentTemplateInnerBlocks(_ref) {
44
45
  } = useInnerBlocksProps({}, {
45
46
  template: TEMPLATE
46
47
  });
47
- return createElement("li", innerBlocksProps, comment === (activeComment || firstBlock) ? children : createElement(BlockPreview, {
48
+ return createElement("li", innerBlocksProps, comment === (activeComment || firstComment) ? children : null, createElement(MemoizedCommentTemplatePreview, {
48
49
  blocks: blocks,
49
- __experimentalLive: true,
50
- __experimentalOnClick: () => setActiveComment(comment)
50
+ comment: comment,
51
+ setActiveComment: setActiveComment,
52
+ isHidden: comment === (activeComment || firstComment)
51
53
  }), (comment === null || comment === void 0 ? void 0 : (_comment$children = comment.children) === null || _comment$children === void 0 ? void 0 : _comment$children.length) > 0 ? createElement(CommentsList, {
52
54
  comments: comment.children,
53
55
  activeComment: activeComment,
@@ -55,6 +57,40 @@ function CommentTemplateInnerBlocks(_ref) {
55
57
  blocks: blocks
56
58
  }) : null);
57
59
  }
60
+
61
+ const CommentTemplatePreview = _ref2 => {
62
+ let {
63
+ blocks,
64
+ comment,
65
+ setActiveComment,
66
+ isHidden
67
+ } = _ref2;
68
+ const blockPreviewProps = useBlockPreview({
69
+ blocks
70
+ });
71
+
72
+ const handleOnClick = () => {
73
+ setActiveComment(comment);
74
+ }; // We have to hide the preview block if the `comment` props points to
75
+ // the curently active block!
76
+ // Or, to put it differently, every preview block is visible unless it is the
77
+ // currently active block - in this case we render its inner blocks.
78
+
79
+
80
+ const style = {
81
+ display: isHidden ? 'none' : undefined
82
+ };
83
+ return createElement("div", _extends({}, blockPreviewProps, {
84
+ tabIndex: 0,
85
+ role: "button",
86
+ style: style // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role
87
+ ,
88
+ onClick: handleOnClick,
89
+ onKeyPress: handleOnClick
90
+ }));
91
+ };
92
+
93
+ const MemoizedCommentTemplatePreview = memo(CommentTemplatePreview);
58
94
  /**
59
95
  * Component that renders a list of (nested) comments. It is called recursively.
60
96
  *
@@ -68,15 +104,14 @@ function CommentTemplateInnerBlocks(_ref) {
68
104
  * @return {WPElement} List of comments.
69
105
  */
70
106
 
71
-
72
- const CommentsList = _ref2 => {
107
+ const CommentsList = _ref3 => {
73
108
  let {
74
109
  comments,
75
110
  blockProps,
76
111
  activeComment,
77
112
  setActiveComment,
78
113
  blocks
79
- } = _ref2;
114
+ } = _ref3;
80
115
  return createElement("ol", blockProps, comments && comments.map(comment => createElement(BlockContextProvider, {
81
116
  key: comment.commentId,
82
117
  value: comment
@@ -85,11 +120,11 @@ const CommentsList = _ref2 => {
85
120
  activeComment: activeComment,
86
121
  setActiveComment: setActiveComment,
87
122
  blocks: blocks,
88
- firstBlock: comments[0]
123
+ firstComment: comments[0]
89
124
  }))));
90
125
  };
91
126
 
92
- export default function CommentTemplateEdit(_ref3) {
127
+ export default function CommentTemplateEdit(_ref4) {
93
128
  let {
94
129
  clientId,
95
130
  context: {
@@ -97,7 +132,7 @@ export default function CommentTemplateEdit(_ref3) {
97
132
  'comments/perPage': perPage,
98
133
  'comments/order': order
99
134
  }
100
- } = _ref3;
135
+ } = _ref4;
101
136
  const blockProps = useBlockProps();
102
137
  const [activeComment, setActiveComment] = useState();
103
138
  const {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-template/edit.js"],"names":["useState","useMemo","useSelect","__","BlockContextProvider","BlockPreview","useBlockProps","useInnerBlocksProps","store","blockEditorStore","Spinner","coreStore","convertToTree","TEMPLATE","CommentTemplateInnerBlocks","comment","activeComment","setActiveComment","firstBlock","blocks","children","innerBlocksProps","template","length","CommentsList","comments","blockProps","map","commentId","CommentTemplateEdit","clientId","context","postId","perPage","order","commentOrder","commentsPerPage","select","getSettings","__experimentalDiscussionSettings","rawComments","getEntityRecords","getBlocks","commentQuery","post","status","slice"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,OAAnB,QAAkC,oBAAlC;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,EAAT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,EAAGC,UAFd;AAGC,IAAA,MAAM,EAAGP,MAHV;AAIC,IAAA,aAAa,EAAGH,aAJjB;AAKC,IAAA,gBAAgB,EAAGC;AALpB,IADD;AASA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tBlockContextProvider,\n\tBlockPreview,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { Spinner } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { convertToTree } from './util';\n\nconst TEMPLATE = [\n\t[ 'core/comment-author-avatar' ],\n\t[ 'core/comment-author-name' ],\n\t[ 'core/comment-date' ],\n\t[ 'core/comment-content' ],\n\t[ 'core/comment-reply-link' ],\n\t[ 'core/comment-edit-link' ],\n];\n\n/**\n * Component which renders the inner blocks of the Comment Template.\n *\n * @param {Object} props Component props.\n * @param {Array} [props.comment] - A comment object.\n * @param {Array} [props.activeComment] - The block that is currently active.\n * @param {Array} [props.setActiveComment] - The setter for activeComment.\n * @param {Array} [props.firstBlock] - First comment in the array.\n * @param {Array} [props.blocks] - Array of blocks returned from\n * getBlocks() in parent .\n * @return {WPElement} \t\tInner blocks of the Comment Template\n */\nfunction CommentTemplateInnerBlocks( {\n\tcomment,\n\tactiveComment,\n\tsetActiveComment,\n\tfirstBlock,\n\tblocks,\n} ) {\n\tconst { children, ...innerBlocksProps } = useInnerBlocksProps(\n\t\t{},\n\t\t{ template: TEMPLATE }\n\t);\n\treturn (\n\t\t<li { ...innerBlocksProps }>\n\t\t\t{ comment === ( activeComment || firstBlock ) ? (\n\t\t\t\tchildren\n\t\t\t) : (\n\t\t\t\t<BlockPreview\n\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t__experimentalLive\n\t\t\t\t\t__experimentalOnClick={ () => setActiveComment( comment ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ comment?.children?.length > 0 ? (\n\t\t\t\t<CommentsList\n\t\t\t\t\tcomments={ comment.children }\n\t\t\t\t\tactiveComment={ activeComment }\n\t\t\t\t\tsetActiveComment={ setActiveComment }\n\t\t\t\t\tblocks={ blocks }\n\t\t\t\t/>\n\t\t\t) : null }\n\t\t</li>\n\t);\n}\n\n/**\n * Component that renders a list of (nested) comments. It is called recursively.\n *\n * @param {Object} props Component props.\n * @param {Array} [props.comments] - Array of comment objects.\n * @param {Array} [props.blockProps] - Props from parent's `useBlockProps()`.\n * @param {Array} [props.activeComment] - The block that is currently active.\n * @param {Array} [props.setActiveComment] - The setter for activeComment.\n * @param {Array} [props.blocks] - Array of blocks returned from\n * getBlocks() in parent .\n * @return {WPElement} \t\tList of comments.\n */\nconst CommentsList = ( {\n\tcomments,\n\tblockProps,\n\tactiveComment,\n\tsetActiveComment,\n\tblocks,\n} ) => (\n\t<ol { ...blockProps }>\n\t\t{ comments &&\n\t\t\tcomments.map( ( comment ) => (\n\t\t\t\t<BlockContextProvider\n\t\t\t\t\tkey={ comment.commentId }\n\t\t\t\t\tvalue={ comment }\n\t\t\t\t>\n\t\t\t\t\t<CommentTemplateInnerBlocks\n\t\t\t\t\t\tcomment={ comment }\n\t\t\t\t\t\tactiveComment={ activeComment }\n\t\t\t\t\t\tsetActiveComment={ setActiveComment }\n\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\tfirstBlock={ comments[ 0 ] }\n\t\t\t\t\t/>\n\t\t\t\t</BlockContextProvider>\n\t\t\t) ) }\n\t</ol>\n);\n\nexport default function CommentTemplateEdit( {\n\tclientId,\n\tcontext: { postId, 'comments/perPage': perPage, 'comments/order': order },\n} ) {\n\tconst blockProps = useBlockProps();\n\n\tconst [ activeComment, setActiveComment ] = useState();\n\tconst { commentOrder, commentsPerPage } = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn getSettings().__experimentalDiscussionSettings;\n\t} );\n\tconst { rawComments, blocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecords } = select( coreStore );\n\t\t\tconst { getBlocks } = select( blockEditorStore );\n\n\t\t\tconst commentQuery = {\n\t\t\t\tpost: postId,\n\t\t\t\tstatus: 'approve',\n\t\t\t\tcontext: 'embed',\n\t\t\t\torder: order || commentOrder,\n\t\t\t};\n\n\t\t\tif ( order ) {\n\t\t\t\tcommentQuery.order = order;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\trawComments: getEntityRecords(\n\t\t\t\t\t'root',\n\t\t\t\t\t'comment',\n\t\t\t\t\tcommentQuery\n\t\t\t\t),\n\t\t\t\tblocks: getBlocks( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ postId, clientId, order ]\n\t);\n\n\t// TODO: Replicate the logic used on the server.\n\tperPage = perPage || commentsPerPage;\n\t// We convert the flat list of comments to tree.\n\t// Then, we show only a maximum of `perPage` number of comments.\n\t// This is because passing `per_page` to `getEntityRecords()` does not\n\t// take into account nested comments.\n\tconst comments = useMemo(\n\t\t() => convertToTree( rawComments ).slice( 0, perPage ),\n\t\t[ rawComments, perPage ]\n\t);\n\n\tif ( ! rawComments ) {\n\t\treturn (\n\t\t\t<p { ...blockProps }>\n\t\t\t\t<Spinner />\n\t\t\t</p>\n\t\t);\n\t}\n\n\tif ( ! comments.length ) {\n\t\treturn <p { ...blockProps }> { __( 'No results found.' ) }</p>;\n\t}\n\n\treturn (\n\t\t<CommentsList\n\t\t\tcomments={ comments }\n\t\t\tblockProps={ blockProps }\n\t\t\tblocks={ blocks }\n\t\t\tactiveComment={ activeComment }\n\t\t\tsetActiveComment={ setActiveComment }\n\t\t/>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comment-template/edit.js"],"names":["useState","useMemo","memo","useSelect","__","BlockContextProvider","useBlockProps","useInnerBlocksProps","store","blockEditorStore","__experimentalUseBlockPreview","useBlockPreview","Spinner","coreStore","convertToTree","TEMPLATE","CommentTemplateInnerBlocks","comment","activeComment","setActiveComment","firstComment","blocks","children","innerBlocksProps","template","length","CommentTemplatePreview","isHidden","blockPreviewProps","handleOnClick","style","display","undefined","MemoizedCommentTemplatePreview","CommentsList","comments","blockProps","map","commentId","CommentTemplateEdit","clientId","context","postId","perPage","order","commentOrder","commentsPerPage","select","getSettings","__experimentalDiscussionSettings","rawComments","getEntityRecords","getBlocks","commentQuery","post","status","slice"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,OAAnB,EAA4BC,IAA5B,QAAwC,oBAAxC;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SACCC,oBADD,EAECC,aAFD,EAGCC,mBAHD,EAICC,KAAK,IAAIC,gBAJV,EAKCC,6BAA6B,IAAIC,eALlC,QAMO,yBANP;AAOA,SAASC,OAAT,QAAwB,uBAAxB;AACA,SAASJ,KAAK,IAAIK,SAAlB,QAAmC,sBAAnC;AAEA;AACA;AACA;;AACA,SAASC,aAAT,QAA8B,QAA9B;AAEA,MAAMC,QAAQ,GAAG,CAChB,CAAE,4BAAF,CADgB,EAEhB,CAAE,0BAAF,CAFgB,EAGhB,CAAE,mBAAF,CAHgB,EAIhB,CAAE,sBAAF,CAJgB,EAKhB,CAAE,yBAAF,CALgB,EAMhB,CAAE,wBAAF,CANgB,CAAjB;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,0BAAT,OAMI;AAAA;;AAAA,MANiC;AACpCC,IAAAA,OADoC;AAEpCC,IAAAA,aAFoC;AAGpCC,IAAAA,gBAHoC;AAIpCC,IAAAA,YAJoC;AAKpCC,IAAAA;AALoC,GAMjC;AACH,QAAM;AAAEC,IAAAA,QAAF;AAAY,OAAGC;AAAf,MAAoChB,mBAAmB,CAC5D,EAD4D,EAE5D;AAAEiB,IAAAA,QAAQ,EAAET;AAAZ,GAF4D,CAA7D;AAIA,SACC,oBAAS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EAAGf,MAHV;AAIC,IAAA,aAAa,EAAGH,aAJjB;AAKC,IAAA,gBAAgB,EAAGC;AALpB,IADD;AASA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useMemo, memo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tBlockContextProvider,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n\t__experimentalUseBlockPreview as useBlockPreview,\n} from '@wordpress/block-editor';\nimport { Spinner } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { convertToTree } from './util';\n\nconst TEMPLATE = [\n\t[ 'core/comment-author-avatar' ],\n\t[ 'core/comment-author-name' ],\n\t[ 'core/comment-date' ],\n\t[ 'core/comment-content' ],\n\t[ 'core/comment-reply-link' ],\n\t[ 'core/comment-edit-link' ],\n];\n\n/**\n * Component which renders the inner blocks of the Comment Template.\n *\n * @param {Object} props Component props.\n * @param {Array} [props.comment] - A comment object.\n * @param {Array} [props.activeComment] - The block that is currently active.\n * @param {Array} [props.setActiveComment] - The setter for activeComment.\n * @param {Array} [props.firstComment] - First comment in the array.\n * @param {Array} [props.blocks] - Array of blocks returned from\n * getBlocks() in parent .\n * @return {WPElement} \t\tInner blocks of the Comment Template\n */\nfunction CommentTemplateInnerBlocks( {\n\tcomment,\n\tactiveComment,\n\tsetActiveComment,\n\tfirstComment,\n\tblocks,\n} ) {\n\tconst { children, ...innerBlocksProps } = useInnerBlocksProps(\n\t\t{},\n\t\t{ template: TEMPLATE }\n\t);\n\treturn (\n\t\t<li { ...innerBlocksProps }>\n\t\t\t{ comment === ( activeComment || firstComment ) ? children : null }\n\n\t\t\t{ /* To avoid flicker when switching active block contexts, a preview\n\t\t\tis ALWAYS rendered and the preview for the active block is hidden. \n\t\t\tThis ensures that when switching the active block, the component is not \n\t\t\tmounted again but rather it only toggles the `isHidden` prop.\n\t\t\t\n\t\t\tThe same strategy is used for preventing the flicker in the Post Template\n\t\t\tblock. */ }\n\t\t\t<MemoizedCommentTemplatePreview\n\t\t\t\tblocks={ blocks }\n\t\t\t\tcomment={ comment }\n\t\t\t\tsetActiveComment={ setActiveComment }\n\t\t\t\tisHidden={ comment === ( activeComment || firstComment ) }\n\t\t\t/>\n\n\t\t\t{ comment?.children?.length > 0 ? (\n\t\t\t\t<CommentsList\n\t\t\t\t\tcomments={ comment.children }\n\t\t\t\t\tactiveComment={ activeComment }\n\t\t\t\t\tsetActiveComment={ setActiveComment }\n\t\t\t\t\tblocks={ blocks }\n\t\t\t\t/>\n\t\t\t) : null }\n\t\t</li>\n\t);\n}\n\nconst CommentTemplatePreview = ( {\n\tblocks,\n\tcomment,\n\tsetActiveComment,\n\tisHidden,\n} ) => {\n\tconst blockPreviewProps = useBlockPreview( {\n\t\tblocks,\n\t} );\n\n\tconst handleOnClick = () => {\n\t\tsetActiveComment( comment );\n\t};\n\n\t// We have to hide the preview block if the `comment` props points to\n\t// the curently active block!\n\n\t// Or, to put it differently, every preview block is visible unless it is the\n\t// currently active block - in this case we render its inner blocks.\n\tconst style = {\n\t\tdisplay: isHidden ? 'none' : undefined,\n\t};\n\n\treturn (\n\t\t<div\n\t\t\t{ ...blockPreviewProps }\n\t\t\ttabIndex={ 0 }\n\t\t\trole=\"button\"\n\t\t\tstyle={ style }\n\t\t\t// eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role\n\t\t\tonClick={ handleOnClick }\n\t\t\tonKeyPress={ handleOnClick }\n\t\t/>\n\t);\n};\n\nconst MemoizedCommentTemplatePreview = memo( CommentTemplatePreview );\n\n/**\n * Component that renders a list of (nested) comments. It is called recursively.\n *\n * @param {Object} props Component props.\n * @param {Array} [props.comments] - Array of comment objects.\n * @param {Array} [props.blockProps] - Props from parent's `useBlockProps()`.\n * @param {Array} [props.activeComment] - The block that is currently active.\n * @param {Array} [props.setActiveComment] - The setter for activeComment.\n * @param {Array} [props.blocks] - Array of blocks returned from\n * getBlocks() in parent .\n * @return {WPElement} \t\tList of comments.\n */\nconst CommentsList = ( {\n\tcomments,\n\tblockProps,\n\tactiveComment,\n\tsetActiveComment,\n\tblocks,\n} ) => (\n\t<ol { ...blockProps }>\n\t\t{ comments &&\n\t\t\tcomments.map( ( comment ) => (\n\t\t\t\t<BlockContextProvider\n\t\t\t\t\tkey={ comment.commentId }\n\t\t\t\t\tvalue={ comment }\n\t\t\t\t>\n\t\t\t\t\t<CommentTemplateInnerBlocks\n\t\t\t\t\t\tcomment={ comment }\n\t\t\t\t\t\tactiveComment={ activeComment }\n\t\t\t\t\t\tsetActiveComment={ setActiveComment }\n\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\tfirstComment={ comments[ 0 ] }\n\t\t\t\t\t/>\n\t\t\t\t</BlockContextProvider>\n\t\t\t) ) }\n\t</ol>\n);\n\nexport default function CommentTemplateEdit( {\n\tclientId,\n\tcontext: { postId, 'comments/perPage': perPage, 'comments/order': order },\n} ) {\n\tconst blockProps = useBlockProps();\n\n\tconst [ activeComment, setActiveComment ] = useState();\n\tconst { commentOrder, commentsPerPage } = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn getSettings().__experimentalDiscussionSettings;\n\t} );\n\tconst { rawComments, blocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecords } = select( coreStore );\n\t\t\tconst { getBlocks } = select( blockEditorStore );\n\n\t\t\tconst commentQuery = {\n\t\t\t\tpost: postId,\n\t\t\t\tstatus: 'approve',\n\t\t\t\tcontext: 'embed',\n\t\t\t\torder: order || commentOrder,\n\t\t\t};\n\n\t\t\tif ( order ) {\n\t\t\t\tcommentQuery.order = order;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\trawComments: getEntityRecords(\n\t\t\t\t\t'root',\n\t\t\t\t\t'comment',\n\t\t\t\t\tcommentQuery\n\t\t\t\t),\n\t\t\t\tblocks: getBlocks( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ postId, clientId, order ]\n\t);\n\n\t// TODO: Replicate the logic used on the server.\n\tperPage = perPage || commentsPerPage;\n\t// We convert the flat list of comments to tree.\n\t// Then, we show only a maximum of `perPage` number of comments.\n\t// This is because passing `per_page` to `getEntityRecords()` does not\n\t// take into account nested comments.\n\tconst comments = useMemo(\n\t\t() => convertToTree( rawComments ).slice( 0, perPage ),\n\t\t[ rawComments, perPage ]\n\t);\n\n\tif ( ! rawComments ) {\n\t\treturn (\n\t\t\t<p { ...blockProps }>\n\t\t\t\t<Spinner />\n\t\t\t</p>\n\t\t);\n\t}\n\n\tif ( ! comments.length ) {\n\t\treturn <p { ...blockProps }> { __( 'No results found.' ) }</p>;\n\t}\n\n\treturn (\n\t\t<CommentsList\n\t\t\tcomments={ comments }\n\t\t\tblockProps={ blockProps }\n\t\t\tblocks={ blocks }\n\t\t\tactiveComment={ activeComment }\n\t\t\tsetActiveComment={ setActiveComment }\n\t\t/>\n\t);\n}\n"]}
@@ -30,7 +30,12 @@ const metadata = {
30
30
  html: false,
31
31
  color: {
32
32
  gradients: true,
33
- link: true
33
+ link: true,
34
+ __experimentalDefaultControls: {
35
+ background: true,
36
+ text: true,
37
+ link: true
38
+ }
34
39
  },
35
40
  __experimentalLayout: {
36
41
  allowSwitching: false,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments-pagination/index.js"],"names":["queryPagination","icon","edit","save","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,IAAIC,IAA5B,QAAwC,kBAAxC;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBL,EAAAA,IADuB;AAEvBC,EAAAA,IAFuB;AAGvBC,EAAAA;AAHuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { queryPagination as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-pagination/index.js"],"names":["queryPagination","icon","edit","save","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,IAAIC,IAA5B,QAAwC,kBAAxC;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBL,EAAAA,IADuB;AAEvBC,EAAAA,IAFuB;AAGvBC,EAAAA;AAHuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { queryPagination as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n"]}
@@ -26,7 +26,10 @@ const metadata = {
26
26
  html: false,
27
27
  color: {
28
28
  gradients: true,
29
- text: false
29
+ text: false,
30
+ __experimentalDefaultControls: {
31
+ background: true
32
+ }
30
33
  },
31
34
  typography: {
32
35
  fontSize: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments-pagination-next/index.js"],"names":["queryPaginationNext","icon","edit","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,mBAAmB,IAAIC,IAAhC,QAA4C,kBAA5C;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBJ,EAAAA,IADuB;AAEvBC,EAAAA;AAFuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { queryPaginationNext as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-pagination-next/index.js"],"names":["queryPaginationNext","icon","edit","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,mBAAmB,IAAIC,IAAhC,QAA4C,kBAA5C;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBJ,EAAAA,IADuB;AAEvBC,EAAAA;AAFuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { queryPaginationNext as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n"]}
@@ -26,7 +26,10 @@ const metadata = {
26
26
  html: false,
27
27
  color: {
28
28
  gradients: true,
29
- text: false
29
+ text: false,
30
+ __experimentalDefaultControls: {
31
+ background: true
32
+ }
30
33
  },
31
34
  typography: {
32
35
  fontSize: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments-pagination-previous/index.js"],"names":["queryPaginationPrevious","icon","edit","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,uBAAuB,IAAIC,IAApC,QAAgD,kBAAhD;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBJ,EAAAA,IADuB;AAEvBC,EAAAA;AAFuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { queryPaginationPrevious as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-pagination-previous/index.js"],"names":["queryPaginationPrevious","icon","edit","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,uBAAuB,IAAIC,IAApC,QAAgD,kBAAhD;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBJ,EAAAA,IADuB;AAEvBC,EAAAA;AAFuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { queryPaginationPrevious as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n"]}
@@ -42,7 +42,12 @@ const metadata = {
42
42
  html: false,
43
43
  color: {
44
44
  gradients: true,
45
- link: true
45
+ link: true,
46
+ __experimentalDefaultControls: {
47
+ background: true,
48
+ text: true,
49
+ link: true
50
+ }
46
51
  }
47
52
  },
48
53
  editorStyle: "wp-block-comments-editor"
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments-query-loop/index.js"],"names":["postComments","icon","edit","save","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,IAAIC,IAAzB,QAAqC,kBAArC;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBL,EAAAA,IADuB;AAEvBC,EAAAA,IAFuB;AAGvBC,EAAAA;AAHuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postComments as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-query-loop/index.js"],"names":["postComments","icon","edit","save","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,IAAIC,IAAzB,QAAqC,kBAArC;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBL,EAAAA,IADuB;AAEvBC,EAAAA,IAFuB;AAGvBC,EAAAA;AAHuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postComments as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n"]}