@wordpress/block-library 8.11.0 → 8.12.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 (1872) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/archives/edit.js +4 -5
  3. package/build/archives/edit.js.map +1 -1
  4. package/build/archives/index.js +1 -1
  5. package/build/audio/deprecated.js +3 -4
  6. package/build/audio/deprecated.js.map +1 -1
  7. package/build/audio/edit.js +9 -13
  8. package/build/audio/edit.js.map +1 -1
  9. package/build/audio/edit.native.js +22 -26
  10. package/build/audio/edit.native.js.map +1 -1
  11. package/build/audio/index.js +1 -1
  12. package/build/audio/save.js +3 -4
  13. package/build/audio/save.js.map +1 -1
  14. package/build/audio/transforms.js +25 -29
  15. package/build/audio/transforms.js.map +1 -1
  16. package/build/avatar/edit.js +62 -70
  17. package/build/avatar/edit.js.map +1 -1
  18. package/build/avatar/hooks.js +12 -16
  19. package/build/avatar/hooks.js.map +1 -1
  20. package/build/avatar/index.js +1 -1
  21. package/build/avatar/user-control.js +4 -5
  22. package/build/avatar/user-control.js.map +1 -1
  23. package/build/block/edit-title.native.js +4 -5
  24. package/build/block/edit-title.native.js.map +1 -1
  25. package/build/block/edit.js +7 -8
  26. package/build/block/edit.js.map +1 -1
  27. package/build/block/edit.native.js +7 -8
  28. package/build/block/edit.native.js.map +1 -1
  29. package/build/block/index.js +1 -1
  30. package/build/button/color-background.native.js +5 -6
  31. package/build/button/color-background.native.js.map +1 -1
  32. package/build/button/deprecated.js +55 -80
  33. package/build/button/deprecated.js.map +1 -1
  34. package/build/button/edit.js +12 -23
  35. package/build/button/edit.js.map +1 -1
  36. package/build/button/edit.native.js +38 -41
  37. package/build/button/edit.native.js.map +1 -1
  38. package/build/button/index.js +6 -9
  39. package/build/button/index.js.map +1 -1
  40. package/build/button/save.js +6 -9
  41. package/build/button/save.js.map +1 -1
  42. package/build/buttons/deprecated.js +13 -18
  43. package/build/buttons/deprecated.js.map +1 -1
  44. package/build/buttons/edit.js +6 -11
  45. package/build/buttons/edit.js.map +1 -1
  46. package/build/buttons/edit.native.js +13 -16
  47. package/build/buttons/edit.native.js.map +1 -1
  48. package/build/buttons/index.js +1 -1
  49. package/build/buttons/save.js +5 -8
  50. package/build/buttons/save.js.map +1 -1
  51. package/build/buttons/transforms.js +2 -2
  52. package/build/buttons/transforms.js.map +1 -1
  53. package/build/calendar/edit.js +4 -5
  54. package/build/calendar/edit.js.map +1 -1
  55. package/build/calendar/index.js +1 -1
  56. package/build/categories/edit.js +19 -23
  57. package/build/categories/edit.js.map +1 -1
  58. package/build/categories/index.js +1 -1
  59. package/build/code/edit.js +5 -6
  60. package/build/code/edit.js.map +1 -1
  61. package/build/code/edit.native.js +1 -1
  62. package/build/code/edit.native.js.map +1 -1
  63. package/build/code/index.js +1 -1
  64. package/build/code/save.js +3 -4
  65. package/build/code/save.js.map +1 -1
  66. package/build/code/transforms.js +6 -8
  67. package/build/code/transforms.js.map +1 -1
  68. package/build/column/column-preview.native.js +9 -11
  69. package/build/column/column-preview.native.js.map +1 -1
  70. package/build/column/deprecated.js +6 -8
  71. package/build/column/deprecated.js.map +1 -1
  72. package/build/column/edit.js +10 -11
  73. package/build/column/edit.js.map +1 -1
  74. package/build/column/edit.native.js +18 -23
  75. package/build/column/edit.native.js.map +1 -1
  76. package/build/column/index.js +1 -1
  77. package/build/column/save.js +4 -5
  78. package/build/column/save.js.map +1 -1
  79. package/build/columns/columnCalculations.native.js +13 -8
  80. package/build/columns/columnCalculations.native.js.map +1 -1
  81. package/build/columns/deprecated.js +9 -12
  82. package/build/columns/deprecated.js.map +1 -1
  83. package/build/columns/edit.js +15 -21
  84. package/build/columns/edit.js.map +1 -1
  85. package/build/columns/edit.native.js +12 -15
  86. package/build/columns/edit.native.js.map +1 -1
  87. package/build/columns/index.js +1 -1
  88. package/build/columns/save.js +3 -4
  89. package/build/columns/save.js.map +1 -1
  90. package/build/columns/transforms.js +11 -16
  91. package/build/columns/transforms.js.map +1 -1
  92. package/build/columns/utils.js +6 -13
  93. package/build/columns/utils.js.map +1 -1
  94. package/build/comment-author-avatar/edit.js +8 -9
  95. package/build/comment-author-avatar/edit.js.map +1 -1
  96. package/build/comment-author-avatar/index.js +1 -1
  97. package/build/comment-author-name/deprecated.js +4 -7
  98. package/build/comment-author-name/deprecated.js.map +1 -1
  99. package/build/comment-author-name/edit.js +13 -14
  100. package/build/comment-author-name/edit.js.map +1 -1
  101. package/build/comment-author-name/index.js +1 -1
  102. package/build/comment-content/edit.js +9 -10
  103. package/build/comment-content/edit.js.map +1 -1
  104. package/build/comment-content/index.js +1 -1
  105. package/build/comment-date/deprecated.js +4 -7
  106. package/build/comment-date/deprecated.js.map +1 -1
  107. package/build/comment-date/edit.js +10 -11
  108. package/build/comment-date/edit.js.map +1 -1
  109. package/build/comment-date/index.js +1 -1
  110. package/build/comment-edit-link/edit.js +7 -8
  111. package/build/comment-edit-link/edit.js.map +1 -1
  112. package/build/comment-edit-link/index.js +1 -1
  113. package/build/comment-reply-link/edit.js +6 -7
  114. package/build/comment-reply-link/edit.js.map +1 -1
  115. package/build/comment-reply-link/index.js +1 -1
  116. package/build/comment-template/edit.js +58 -72
  117. package/build/comment-template/edit.js.map +1 -1
  118. package/build/comment-template/hooks.js +14 -17
  119. package/build/comment-template/hooks.js.map +1 -1
  120. package/build/comment-template/index.js +1 -1
  121. package/build/comment-template/util.js +1 -3
  122. package/build/comment-template/util.js.map +1 -1
  123. package/build/comments/deprecated.js +8 -10
  124. package/build/comments/deprecated.js.map +1 -1
  125. package/build/comments/edit/comments-inspector-controls.js +6 -7
  126. package/build/comments/edit/comments-inspector-controls.js.map +1 -1
  127. package/build/comments/edit/comments-legacy.js +8 -9
  128. package/build/comments/edit/comments-legacy.js.map +1 -1
  129. package/build/comments/edit/placeholder.js +4 -5
  130. package/build/comments/edit/placeholder.js.map +1 -1
  131. package/build/comments/index.js +1 -1
  132. package/build/comments/save.js +6 -8
  133. package/build/comments/save.js.map +1 -1
  134. package/build/comments-pagination/comments-pagination-arrow-controls.js +4 -5
  135. package/build/comments-pagination/comments-pagination-arrow-controls.js.map +1 -1
  136. package/build/comments-pagination/edit.js +9 -10
  137. package/build/comments-pagination/edit.js.map +1 -1
  138. package/build/comments-pagination/index.js +1 -1
  139. package/build/comments-pagination-next/edit.js +9 -10
  140. package/build/comments-pagination-next/edit.js.map +1 -1
  141. package/build/comments-pagination-next/index.js +1 -1
  142. package/build/comments-pagination-numbers/edit.js +11 -14
  143. package/build/comments-pagination-numbers/edit.js.map +1 -1
  144. package/build/comments-pagination-numbers/index.js +1 -1
  145. package/build/comments-pagination-previous/edit.js +9 -10
  146. package/build/comments-pagination-previous/edit.js.map +1 -1
  147. package/build/comments-pagination-previous/index.js +1 -1
  148. package/build/comments-title/deprecated.js +5 -8
  149. package/build/comments-title/deprecated.js.map +1 -1
  150. package/build/comments-title/edit.js +13 -14
  151. package/build/comments-title/edit.js.map +1 -1
  152. package/build/comments-title/index.js +1 -1
  153. package/build/cover/controls.native.js +92 -101
  154. package/build/cover/controls.native.js.map +1 -1
  155. package/build/cover/deprecated.js +33 -44
  156. package/build/cover/deprecated.js.map +1 -1
  157. package/build/cover/edit/block-controls.js +7 -8
  158. package/build/cover/edit/block-controls.js.map +1 -1
  159. package/build/cover/edit/cover-placeholder.js +8 -9
  160. package/build/cover/edit/cover-placeholder.js.map +1 -1
  161. package/build/cover/edit/index.js +16 -19
  162. package/build/cover/edit/index.js.map +1 -1
  163. package/build/cover/edit/inspector-controls.js +14 -16
  164. package/build/cover/edit/inspector-controls.js.map +1 -1
  165. package/build/cover/edit/resizable-cover-popover.js +12 -13
  166. package/build/cover/edit/resizable-cover-popover.js.map +1 -1
  167. package/build/cover/edit/use-cover-is-dark.js +1 -3
  168. package/build/cover/edit/use-cover-is-dark.js.map +1 -1
  169. package/build/cover/edit.native.js +122 -145
  170. package/build/cover/edit.native.js.map +1 -1
  171. package/build/cover/focal-point-settings-button.native.js +6 -7
  172. package/build/cover/focal-point-settings-button.native.js.map +1 -1
  173. package/build/cover/index.js +1 -1
  174. package/build/cover/overlay-color-settings.native.js +8 -9
  175. package/build/cover/overlay-color-settings.native.js.map +1 -1
  176. package/build/cover/save.js +3 -4
  177. package/build/cover/save.js.map +1 -1
  178. package/build/cover/shared.js +5 -6
  179. package/build/cover/shared.js.map +1 -1
  180. package/build/cover/transforms.js +115 -145
  181. package/build/cover/transforms.js.map +1 -1
  182. package/build/cover/use-cover-is-dark.native.js +1 -5
  183. package/build/cover/use-cover-is-dark.native.js.map +1 -1
  184. package/build/details/edit.js +5 -6
  185. package/build/details/edit.js.map +1 -1
  186. package/build/details/index.js +1 -2
  187. package/build/details/index.js.map +1 -1
  188. package/build/details/save.js +3 -4
  189. package/build/details/save.js.map +1 -1
  190. package/build/embed/deprecated.js +12 -15
  191. package/build/embed/deprecated.js.map +1 -1
  192. package/build/embed/edit.js +4 -6
  193. package/build/embed/edit.js.map +1 -1
  194. package/build/embed/edit.native.js +4 -4
  195. package/build/embed/edit.native.js.map +1 -1
  196. package/build/embed/embed-controls.js +22 -25
  197. package/build/embed/embed-controls.js.map +1 -1
  198. package/build/embed/embed-controls.native.js +9 -10
  199. package/build/embed/embed-controls.native.js.map +1 -1
  200. package/build/embed/embed-link-settings.native.js +9 -10
  201. package/build/embed/embed-link-settings.native.js.map +1 -1
  202. package/build/embed/embed-no-preview.native.js +8 -9
  203. package/build/embed/embed-no-preview.native.js.map +1 -1
  204. package/build/embed/embed-placeholder.js +10 -11
  205. package/build/embed/embed-placeholder.js.map +1 -1
  206. package/build/embed/embed-placeholder.native.js +11 -14
  207. package/build/embed/embed-placeholder.native.js.map +1 -1
  208. package/build/embed/embed-preview.native.js +16 -17
  209. package/build/embed/embed-preview.native.js.map +1 -1
  210. package/build/embed/index.js +1 -1
  211. package/build/embed/save.js +3 -4
  212. package/build/embed/save.js.map +1 -1
  213. package/build/embed/transforms.js +10 -18
  214. package/build/embed/transforms.js.map +1 -1
  215. package/build/embed/util.js +20 -51
  216. package/build/embed/util.js.map +1 -1
  217. package/build/embed/wp-embed-preview.js +14 -18
  218. package/build/embed/wp-embed-preview.js.map +1 -1
  219. package/build/embed/wp-embed-preview.native.js +4 -5
  220. package/build/embed/wp-embed-preview.native.js.map +1 -1
  221. package/build/file/deprecated.js +9 -12
  222. package/build/file/deprecated.js.map +1 -1
  223. package/build/file/edit.js +11 -16
  224. package/build/file/edit.js.map +1 -1
  225. package/build/file/edit.native.js +20 -25
  226. package/build/file/edit.native.js.map +1 -1
  227. package/build/file/index.js +2 -2
  228. package/build/file/inspector.js +12 -13
  229. package/build/file/inspector.js.map +1 -1
  230. package/build/file/save.js +3 -4
  231. package/build/file/save.js.map +1 -1
  232. package/build/file/transforms.js +9 -15
  233. package/build/file/transforms.js.map +1 -1
  234. package/build/freeform/convert-to-blocks-button.js +3 -4
  235. package/build/freeform/convert-to-blocks-button.js.map +1 -1
  236. package/build/freeform/edit.js +10 -13
  237. package/build/freeform/edit.js.map +1 -1
  238. package/build/freeform/index.js +2 -2
  239. package/build/freeform/modal.js +3 -4
  240. package/build/freeform/modal.js.map +1 -1
  241. package/build/freeform/save.js +3 -4
  242. package/build/freeform/save.js.map +1 -1
  243. package/build/gallery/deprecated.js +40 -54
  244. package/build/gallery/deprecated.js.map +1 -1
  245. package/build/gallery/edit.js +25 -53
  246. package/build/gallery/edit.js.map +1 -1
  247. package/build/gallery/gap-styles.js +6 -7
  248. package/build/gallery/gap-styles.js.map +1 -1
  249. package/build/gallery/index.js +1 -1
  250. package/build/gallery/save.js +3 -5
  251. package/build/gallery/save.js.map +1 -1
  252. package/build/gallery/shared-icon.native.js +3 -4
  253. package/build/gallery/shared-icon.native.js.map +1 -1
  254. package/build/gallery/shared.js +4 -10
  255. package/build/gallery/shared.js.map +1 -1
  256. package/build/gallery/transforms.js +103 -142
  257. package/build/gallery/transforms.js.map +1 -1
  258. package/build/gallery/use-get-media.native.js +8 -15
  259. package/build/gallery/use-get-media.native.js.map +1 -1
  260. package/build/gallery/use-get-new-images.js +2 -2
  261. package/build/gallery/use-get-new-images.js.map +1 -1
  262. package/build/gallery/use-image-sizes.js +11 -19
  263. package/build/gallery/use-image-sizes.js.map +1 -1
  264. package/build/gallery/utils.js +2 -2
  265. package/build/gallery/utils.js.map +1 -1
  266. package/build/gallery/v1/edit.js +30 -60
  267. package/build/gallery/v1/edit.js.map +1 -1
  268. package/build/gallery/v1/gallery.js +4 -5
  269. package/build/gallery/v1/gallery.js.map +1 -1
  270. package/build/gallery/v1/save.js +4 -5
  271. package/build/gallery/v1/save.js.map +1 -1
  272. package/build/gallery/v1/shared.js +4 -10
  273. package/build/gallery/v1/shared.js.map +1 -1
  274. package/build/group/deprecated.js +20 -28
  275. package/build/group/deprecated.js.map +1 -1
  276. package/build/group/edit.js +14 -18
  277. package/build/group/edit.js.map +1 -1
  278. package/build/group/edit.native.js +14 -18
  279. package/build/group/edit.native.js.map +1 -1
  280. package/build/group/index.js +1 -1
  281. package/build/group/placeholder.js +16 -19
  282. package/build/group/placeholder.js.map +1 -1
  283. package/build/group/save.js +5 -6
  284. package/build/group/save.js.map +1 -1
  285. package/build/group/variations.js +8 -23
  286. package/build/group/variations.js.map +1 -1
  287. package/build/heading/deprecated.js +18 -26
  288. package/build/heading/deprecated.js.map +1 -1
  289. package/build/heading/edit.js +8 -9
  290. package/build/heading/edit.js.map +1 -1
  291. package/build/heading/heading-level-dropdown.js +4 -5
  292. package/build/heading/heading-level-dropdown.js.map +1 -1
  293. package/build/heading/heading-level-dropdown.native.js +4 -6
  294. package/build/heading/heading-level-dropdown.native.js.map +1 -1
  295. package/build/heading/heading-level-icon.js +4 -5
  296. package/build/heading/heading-level-icon.js.map +1 -1
  297. package/build/heading/index.js +4 -5
  298. package/build/heading/index.js.map +1 -1
  299. package/build/heading/save.js +3 -4
  300. package/build/heading/save.js.map +1 -1
  301. package/build/heading/transforms.js +21 -28
  302. package/build/heading/transforms.js.map +1 -1
  303. package/build/home-link/edit.js +10 -15
  304. package/build/home-link/edit.js.map +1 -1
  305. package/build/home-link/index.js +1 -1
  306. package/build/html/edit.js +5 -6
  307. package/build/html/edit.js.map +1 -1
  308. package/build/html/index.js +1 -1
  309. package/build/html/preview.js +5 -8
  310. package/build/html/preview.js.map +1 -1
  311. package/build/html/save.js +3 -4
  312. package/build/html/save.js.map +1 -1
  313. package/build/html/transforms.js +3 -4
  314. package/build/html/transforms.js.map +1 -1
  315. package/build/image/deprecated.js +15 -20
  316. package/build/image/deprecated.js.map +1 -1
  317. package/build/image/edit.js +16 -25
  318. package/build/image/edit.js.map +1 -1
  319. package/build/image/edit.native.js +40 -55
  320. package/build/image/edit.native.js.map +1 -1
  321. package/build/image/image.js +32 -50
  322. package/build/image/image.js.map +1 -1
  323. package/build/image/index.js +7 -9
  324. package/build/image/index.js.map +1 -1
  325. package/build/image/interactivity.js +24 -27
  326. package/build/image/interactivity.js.map +1 -1
  327. package/build/image/save.js +3 -4
  328. package/build/image/save.js.map +1 -1
  329. package/build/image/transforms.js +36 -46
  330. package/build/image/transforms.js.map +1 -1
  331. package/build/image/use-client-width.js +1 -3
  332. package/build/image/use-client-width.js.map +1 -1
  333. package/build/image/utils.js +4 -7
  334. package/build/image/utils.js.map +1 -1
  335. package/build/index.js +20 -44
  336. package/build/index.js.map +1 -1
  337. package/build/index.native.js +3 -6
  338. package/build/index.native.js.map +1 -1
  339. package/build/latest-comments/edit.js +5 -6
  340. package/build/latest-comments/edit.js.map +1 -1
  341. package/build/latest-comments/index.js +1 -1
  342. package/build/latest-posts/deprecated.js +4 -7
  343. package/build/latest-posts/deprecated.js.map +1 -1
  344. package/build/latest-posts/edit.js +24 -34
  345. package/build/latest-posts/edit.js.map +1 -1
  346. package/build/latest-posts/edit.native.js +4 -5
  347. package/build/latest-posts/edit.native.js.map +1 -1
  348. package/build/latest-posts/index.js +1 -1
  349. package/build/list/deprecated.js +10 -15
  350. package/build/list/deprecated.js.map +1 -1
  351. package/build/list/edit.js +9 -11
  352. package/build/list/edit.js.map +1 -1
  353. package/build/list/index.js +1 -1
  354. package/build/list/ordered-list-settings.js +31 -34
  355. package/build/list/ordered-list-settings.js.map +1 -1
  356. package/build/list/save.js +3 -4
  357. package/build/list/save.js.map +1 -1
  358. package/build/list/transforms.js +11 -15
  359. package/build/list/transforms.js.map +1 -1
  360. package/build/list/utils.js +1 -1
  361. package/build/list/utils.js.map +1 -1
  362. package/build/list-item/edit.js +11 -17
  363. package/build/list-item/edit.js.map +1 -1
  364. package/build/list-item/edit.native.js +15 -23
  365. package/build/list-item/edit.native.js.map +1 -1
  366. package/build/list-item/hooks/use-enter.js +1 -3
  367. package/build/list-item/hooks/use-enter.js.map +1 -1
  368. package/build/list-item/hooks/use-enter.native.js +1 -3
  369. package/build/list-item/hooks/use-enter.native.js.map +1 -1
  370. package/build/list-item/hooks/use-indent-list-item.js +1 -3
  371. package/build/list-item/hooks/use-indent-list-item.js.map +1 -1
  372. package/build/list-item/hooks/use-merge.js +1 -1
  373. package/build/list-item/hooks/use-outdent-list-item.js +2 -4
  374. package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
  375. package/build/list-item/index.js +1 -1
  376. package/build/list-item/list-style-type.native.js +29 -34
  377. package/build/list-item/list-style-type.native.js.map +1 -1
  378. package/build/list-item/save.js +3 -4
  379. package/build/list-item/save.js.map +1 -1
  380. package/build/list-item/transforms.js +1 -4
  381. package/build/list-item/transforms.js.map +1 -1
  382. package/build/list-item/utils.js +4 -4
  383. package/build/list-item/utils.js.map +1 -1
  384. package/build/loginout/edit.js +4 -5
  385. package/build/loginout/edit.js.map +1 -1
  386. package/build/loginout/index.js +1 -1
  387. package/build/media-text/deprecated.js +22 -31
  388. package/build/media-text/deprecated.js.map +1 -1
  389. package/build/media-text/edit.js +25 -39
  390. package/build/media-text/edit.js.map +1 -1
  391. package/build/media-text/edit.native.js +9 -13
  392. package/build/media-text/edit.native.js.map +1 -1
  393. package/build/media-text/index.js +1 -1
  394. package/build/media-text/media-container.js +15 -18
  395. package/build/media-text/media-container.js.map +1 -1
  396. package/build/media-text/media-container.native.js +4 -5
  397. package/build/media-text/media-container.native.js.map +1 -1
  398. package/build/media-text/save.js +3 -4
  399. package/build/media-text/save.js.map +1 -1
  400. package/build/media-text/transforms.js +73 -91
  401. package/build/media-text/transforms.js.map +1 -1
  402. package/build/missing/edit.js +9 -11
  403. package/build/missing/edit.js.map +1 -1
  404. package/build/missing/edit.native.js +7 -8
  405. package/build/missing/edit.native.js.map +1 -1
  406. package/build/missing/index.js +4 -6
  407. package/build/missing/index.js.map +1 -1
  408. package/build/missing/save.js +3 -4
  409. package/build/missing/save.js.map +1 -1
  410. package/build/more/edit.js +11 -15
  411. package/build/more/edit.js.map +1 -1
  412. package/build/more/edit.native.js +4 -10
  413. package/build/more/edit.native.js.map +1 -1
  414. package/build/more/index.js +4 -6
  415. package/build/more/index.js.map +1 -1
  416. package/build/more/save.js +6 -7
  417. package/build/more/save.js.map +1 -1
  418. package/build/navigation/deprecated.js +16 -27
  419. package/build/navigation/deprecated.js.map +1 -1
  420. package/build/navigation/edit/are-blocks-dirty.js +1 -1
  421. package/build/navigation/edit/are-blocks-dirty.js.map +1 -1
  422. package/build/navigation/edit/deleted-navigation-warning.js +3 -4
  423. package/build/navigation/edit/deleted-navigation-warning.js.map +1 -1
  424. package/build/navigation/edit/index.js +33 -40
  425. package/build/navigation/edit/index.js.map +1 -1
  426. package/build/navigation/edit/inner-blocks.js +10 -14
  427. package/build/navigation/edit/inner-blocks.js.map +1 -1
  428. package/build/navigation/edit/leaf-more-menu.js +34 -38
  429. package/build/navigation/edit/leaf-more-menu.js.map +1 -1
  430. package/build/navigation/edit/manage-menus-button.js +5 -6
  431. package/build/navigation/edit/manage-menus-button.js.map +1 -1
  432. package/build/navigation/edit/menu-inspector-controls.js +47 -43
  433. package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
  434. package/build/navigation/edit/navigation-menu-delete-control.js +3 -4
  435. package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  436. package/build/navigation/edit/navigation-menu-selector.js +50 -56
  437. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  438. package/build/navigation/edit/overlay-menu-icon.js +3 -5
  439. package/build/navigation/edit/overlay-menu-icon.js.map +1 -1
  440. package/build/navigation/edit/overlay-menu-preview.js +5 -6
  441. package/build/navigation/edit/overlay-menu-preview.js.map +1 -1
  442. package/build/navigation/edit/placeholder/index.js +10 -11
  443. package/build/navigation/edit/placeholder/index.js.map +1 -1
  444. package/build/navigation/edit/placeholder/placeholder-preview.js +3 -4
  445. package/build/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
  446. package/build/navigation/edit/responsive-wrapper.js +18 -20
  447. package/build/navigation/edit/responsive-wrapper.js.map +1 -1
  448. package/build/navigation/edit/unsaved-inner-blocks.js +10 -14
  449. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  450. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js +2 -3
  451. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  452. package/build/navigation/edit/use-create-navigation-menu.js +3 -7
  453. package/build/navigation/edit/use-create-navigation-menu.js.map +1 -1
  454. package/build/navigation/edit/use-generate-default-navigation-title.js +1 -5
  455. package/build/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
  456. package/build/navigation/edit/use-inner-blocks.js +1 -1
  457. package/build/navigation/edit/use-inner-blocks.js.map +1 -1
  458. package/build/navigation/edit/use-navigation-notice.js +4 -5
  459. package/build/navigation/edit/use-navigation-notice.js.map +1 -1
  460. package/build/navigation/edit/utils.js +2 -4
  461. package/build/navigation/edit/utils.js.map +1 -1
  462. package/build/navigation/index.js +2 -2
  463. package/build/navigation/interactivity.js +97 -87
  464. package/build/navigation/interactivity.js.map +1 -1
  465. package/build/navigation/menu-items-to-blocks.js +25 -34
  466. package/build/navigation/menu-items-to-blocks.js.map +1 -1
  467. package/build/navigation/save.js +3 -5
  468. package/build/navigation/save.js.map +1 -1
  469. package/build/navigation/use-navigation-entities.js +2 -2
  470. package/build/navigation/use-navigation-entities.js.map +1 -1
  471. package/build/navigation/use-navigation-menu.js +1 -1
  472. package/build/navigation/use-navigation-menu.js.map +1 -1
  473. package/build/navigation/use-template-part-area-label.js +3 -5
  474. package/build/navigation/use-template-part-area-label.js.map +1 -1
  475. package/build/navigation-link/edit.js +14 -21
  476. package/build/navigation-link/edit.js.map +1 -1
  477. package/build/navigation-link/hooks.js +1 -1
  478. package/build/navigation-link/hooks.js.map +1 -1
  479. package/build/navigation-link/index.js +11 -16
  480. package/build/navigation-link/index.js.map +1 -1
  481. package/build/navigation-link/link-ui.js +9 -8
  482. package/build/navigation-link/link-ui.js.map +1 -1
  483. package/build/navigation-link/update-attributes.js +1 -4
  484. package/build/navigation-link/update-attributes.js.map +1 -1
  485. package/build/navigation-submenu/edit.js +13 -16
  486. package/build/navigation-submenu/edit.js.map +1 -1
  487. package/build/navigation-submenu/index.js +7 -12
  488. package/build/navigation-submenu/index.js.map +1 -1
  489. package/build/navigation-submenu/transforms.js +6 -30
  490. package/build/navigation-submenu/transforms.js.map +1 -1
  491. package/build/nextpage/edit.native.js +9 -10
  492. package/build/nextpage/edit.native.js.map +1 -1
  493. package/build/nextpage/index.js +1 -1
  494. package/build/page-list/convert-to-links-modal.js +5 -6
  495. package/build/page-list/convert-to-links-modal.js.map +1 -1
  496. package/build/page-list/edit.js +23 -35
  497. package/build/page-list/edit.js.map +1 -1
  498. package/build/page-list/index.js +1 -1
  499. package/build/page-list/use-convert-to-navigation-links.js +16 -21
  500. package/build/page-list/use-convert-to-navigation-links.js.map +1 -1
  501. package/build/page-list-item/edit.js +5 -6
  502. package/build/page-list-item/edit.js.map +1 -1
  503. package/build/page-list-item/index.js +4 -7
  504. package/build/page-list-item/index.js.map +1 -1
  505. package/build/paragraph/deprecated.js +18 -24
  506. package/build/paragraph/deprecated.js.map +1 -1
  507. package/build/paragraph/edit.js +12 -14
  508. package/build/paragraph/edit.js.map +1 -1
  509. package/build/paragraph/edit.native.js +13 -16
  510. package/build/paragraph/edit.native.js.map +1 -1
  511. package/build/paragraph/index.js +4 -6
  512. package/build/paragraph/index.js.map +1 -1
  513. package/build/paragraph/save.js +3 -4
  514. package/build/paragraph/save.js.map +1 -1
  515. package/build/paragraph/transforms.js +10 -13
  516. package/build/paragraph/transforms.js.map +1 -1
  517. package/build/pattern/edit.js +8 -11
  518. package/build/pattern/edit.js.map +1 -1
  519. package/build/pattern/index.js +5 -4
  520. package/build/pattern/index.js.map +1 -1
  521. package/build/pattern/v1/edit.js +6 -7
  522. package/build/pattern/v1/edit.js.map +1 -1
  523. package/build/post-author/edit.js +19 -23
  524. package/build/post-author/edit.js.map +1 -1
  525. package/build/post-author/index.js +1 -1
  526. package/build/post-author-biography/edit.js +12 -15
  527. package/build/post-author-biography/edit.js.map +1 -1
  528. package/build/post-author-biography/index.js +1 -1
  529. package/build/post-author-name/edit.js +14 -17
  530. package/build/post-author-name/edit.js.map +1 -1
  531. package/build/post-author-name/index.js +1 -1
  532. package/build/post-author-name/transforms.js +10 -16
  533. package/build/post-author-name/transforms.js.map +1 -1
  534. package/build/post-comment/edit.js +6 -7
  535. package/build/post-comment/edit.js.map +1 -1
  536. package/build/post-comment/index.js +1 -1
  537. package/build/post-comments-count/edit.js +6 -9
  538. package/build/post-comments-count/edit.js.map +1 -1
  539. package/build/post-comments-count/index.js +1 -1
  540. package/build/post-comments-form/edit.js +5 -6
  541. package/build/post-comments-form/edit.js.map +1 -1
  542. package/build/post-comments-form/form.js +5 -10
  543. package/build/post-comments-form/form.js.map +1 -1
  544. package/build/post-comments-form/index.js +1 -1
  545. package/build/post-comments-link/edit.js +5 -6
  546. package/build/post-comments-link/edit.js.map +1 -1
  547. package/build/post-comments-link/index.js +1 -1
  548. package/build/post-content/edit.js +27 -23
  549. package/build/post-content/edit.js.map +1 -1
  550. package/build/post-content/index.js +1 -1
  551. package/build/post-date/deprecated.js +4 -7
  552. package/build/post-date/deprecated.js.map +1 -1
  553. package/build/post-date/edit.js +27 -33
  554. package/build/post-date/edit.js.map +1 -1
  555. package/build/post-date/index.js +1 -1
  556. package/build/post-excerpt/edit.js +21 -24
  557. package/build/post-excerpt/edit.js.map +1 -1
  558. package/build/post-excerpt/index.js +3 -3
  559. package/build/post-featured-image/dimension-controls.js +12 -13
  560. package/build/post-featured-image/dimension-controls.js.map +1 -1
  561. package/build/post-featured-image/edit.js +27 -37
  562. package/build/post-featured-image/edit.js.map +1 -1
  563. package/build/post-featured-image/index.js +1 -1
  564. package/build/post-featured-image/overlay.js +7 -8
  565. package/build/post-featured-image/overlay.js.map +1 -1
  566. package/build/post-navigation-link/edit.js +11 -12
  567. package/build/post-navigation-link/edit.js.map +1 -1
  568. package/build/post-navigation-link/index.js +1 -1
  569. package/build/post-template/edit.js +97 -83
  570. package/build/post-template/edit.js.map +1 -1
  571. package/build/post-template/index.js +10 -4
  572. package/build/post-template/index.js.map +1 -1
  573. package/build/post-terms/edit.js +10 -15
  574. package/build/post-terms/edit.js.map +1 -1
  575. package/build/post-terms/index.js +1 -1
  576. package/build/post-terms/use-post-terms.js +7 -12
  577. package/build/post-terms/use-post-terms.js.map +1 -1
  578. package/build/post-time-to-read/edit.js +5 -6
  579. package/build/post-time-to-read/edit.js.map +1 -1
  580. package/build/post-time-to-read/index.js +1 -1
  581. package/build/post-title/deprecated.js +4 -7
  582. package/build/post-title/deprecated.js.map +1 -1
  583. package/build/post-title/edit.js +27 -21
  584. package/build/post-title/edit.js.map +1 -1
  585. package/build/post-title/index.js +2 -2
  586. package/build/preformatted/edit.js +7 -8
  587. package/build/preformatted/edit.js.map +1 -1
  588. package/build/preformatted/edit.native.js +5 -7
  589. package/build/preformatted/edit.native.js.map +1 -1
  590. package/build/preformatted/index.js +1 -1
  591. package/build/preformatted/save.js +3 -4
  592. package/build/preformatted/save.js.map +1 -1
  593. package/build/preformatted/transforms.js +14 -20
  594. package/build/preformatted/transforms.js.map +1 -1
  595. package/build/pullquote/deprecated.js +61 -73
  596. package/build/pullquote/deprecated.js.map +1 -1
  597. package/build/pullquote/edit.js +6 -7
  598. package/build/pullquote/edit.js.map +1 -1
  599. package/build/pullquote/edit.native.js +13 -21
  600. package/build/pullquote/edit.native.js.map +1 -1
  601. package/build/pullquote/figure.native.js +5 -6
  602. package/build/pullquote/figure.native.js.map +1 -1
  603. package/build/pullquote/index.js +1 -1
  604. package/build/pullquote/save.js +3 -4
  605. package/build/pullquote/save.js.map +1 -1
  606. package/build/pullquote/transforms.js +17 -24
  607. package/build/pullquote/transforms.js.map +1 -1
  608. package/build/query/deprecated.js +197 -79
  609. package/build/query/deprecated.js.map +1 -1
  610. package/build/query/edit/inspector-controls/author-control.js +5 -8
  611. package/build/query/edit/inspector-controls/author-control.js.map +1 -1
  612. package/build/query/edit/inspector-controls/create-new-post-link.js +6 -7
  613. package/build/query/edit/inspector-controls/create-new-post-link.js.map +1 -1
  614. package/build/query/edit/inspector-controls/index.js +4 -6
  615. package/build/query/edit/inspector-controls/index.js.map +1 -1
  616. package/build/query/edit/inspector-controls/order-control.js +5 -6
  617. package/build/query/edit/inspector-controls/order-control.js.map +1 -1
  618. package/build/query/edit/inspector-controls/parent-control.js +10 -13
  619. package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
  620. package/build/query/edit/inspector-controls/sticky-control.js +4 -5
  621. package/build/query/edit/inspector-controls/sticky-control.js.map +1 -1
  622. package/build/query/edit/inspector-controls/taxonomy-controls.js +15 -19
  623. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  624. package/build/query/edit/pattern-selection-modal.js +5 -6
  625. package/build/query/edit/pattern-selection-modal.js.map +1 -1
  626. package/build/query/edit/query-content.js +7 -9
  627. package/build/query/edit/query-content.js.map +1 -1
  628. package/build/query/edit/query-placeholder.js +16 -20
  629. package/build/query/edit/query-placeholder.js.map +1 -1
  630. package/build/query/edit/query-toolbar.js +17 -41
  631. package/build/query/edit/query-toolbar.js.map +1 -1
  632. package/build/query/index.js +1 -7
  633. package/build/query/index.js.map +1 -1
  634. package/build/query/save.js +5 -7
  635. package/build/query/save.js.map +1 -1
  636. package/build/query/utils.js +24 -60
  637. package/build/query/utils.js.map +1 -1
  638. package/build/query-no-results/index.js +1 -1
  639. package/build/query-pagination/edit.js +28 -11
  640. package/build/query-pagination/edit.js.map +1 -1
  641. package/build/query-pagination/index.js +7 -2
  642. package/build/query-pagination/index.js.map +1 -1
  643. package/build/query-pagination/query-pagination-arrow-controls.js +4 -5
  644. package/build/query-pagination/query-pagination-arrow-controls.js.map +1 -1
  645. package/build/query-pagination/query-pagination-label-control.js +29 -0
  646. package/build/query-pagination/query-pagination-label-control.js.map +1 -0
  647. package/build/query-pagination-next/edit.js +11 -11
  648. package/build/query-pagination-next/edit.js.map +1 -1
  649. package/build/query-pagination-next/index.js +2 -2
  650. package/build/query-pagination-numbers/edit.js +3 -7
  651. package/build/query-pagination-numbers/edit.js.map +1 -1
  652. package/build/query-pagination-numbers/index.js +1 -1
  653. package/build/query-pagination-previous/edit.js +11 -11
  654. package/build/query-pagination-previous/edit.js.map +1 -1
  655. package/build/query-pagination-previous/index.js +2 -2
  656. package/build/query-title/deprecated.js +4 -7
  657. package/build/query-title/deprecated.js.map +1 -1
  658. package/build/query-title/edit.js +10 -11
  659. package/build/query-title/edit.js.map +1 -1
  660. package/build/query-title/index.js +1 -1
  661. package/build/quote/deprecated.js +17 -24
  662. package/build/quote/deprecated.js.map +1 -1
  663. package/build/quote/edit.js +8 -9
  664. package/build/quote/edit.js.map +1 -1
  665. package/build/quote/index.js +1 -1
  666. package/build/quote/save.js +3 -4
  667. package/build/quote/save.js.map +1 -1
  668. package/build/quote/transforms.js +37 -57
  669. package/build/quote/transforms.js.map +1 -1
  670. package/build/read-more/edit.js +8 -9
  671. package/build/read-more/edit.js.map +1 -1
  672. package/build/read-more/index.js +1 -1
  673. package/build/rss/edit.js +4 -5
  674. package/build/rss/edit.js.map +1 -1
  675. package/build/rss/index.js +1 -1
  676. package/build/search/edit.js +74 -32
  677. package/build/search/edit.js.map +1 -1
  678. package/build/search/edit.native.js +39 -35
  679. package/build/search/edit.native.js.map +1 -1
  680. package/build/search/index.js +9 -1
  681. package/build/search/index.js.map +1 -1
  682. package/build/search/view.js +67 -0
  683. package/build/search/view.js.map +1 -0
  684. package/build/separator/deprecated.js +3 -4
  685. package/build/separator/deprecated.js.map +1 -1
  686. package/build/separator/edit.js +6 -9
  687. package/build/separator/edit.js.map +1 -1
  688. package/build/separator/index.js +1 -1
  689. package/build/separator/save.js +5 -8
  690. package/build/separator/save.js.map +1 -1
  691. package/build/shortcode/edit.js +4 -5
  692. package/build/shortcode/edit.js.map +1 -1
  693. package/build/shortcode/index.js +2 -2
  694. package/build/shortcode/save.js +3 -4
  695. package/build/shortcode/save.js.map +1 -1
  696. package/build/shortcode/transforms.js +3 -4
  697. package/build/shortcode/transforms.js.map +1 -1
  698. package/build/site-logo/edit.js +58 -74
  699. package/build/site-logo/edit.js.map +1 -1
  700. package/build/site-logo/index.js +1 -1
  701. package/build/site-logo/transforms.js +4 -5
  702. package/build/site-logo/transforms.js.map +1 -1
  703. package/build/site-tagline/deprecated.js +4 -7
  704. package/build/site-tagline/deprecated.js.map +1 -1
  705. package/build/site-tagline/edit.js +6 -7
  706. package/build/site-tagline/edit.js.map +1 -1
  707. package/build/site-tagline/index.js +1 -1
  708. package/build/site-title/deprecated.js +4 -7
  709. package/build/site-title/deprecated.js.map +1 -1
  710. package/build/site-title/edit/index.js +6 -7
  711. package/build/site-title/edit/index.js.map +1 -1
  712. package/build/site-title/edit/level-icon.js +4 -5
  713. package/build/site-title/edit/level-icon.js.map +1 -1
  714. package/build/site-title/edit/level-toolbar.js +4 -5
  715. package/build/site-title/edit/level-toolbar.js.map +1 -1
  716. package/build/site-title/index.js +1 -1
  717. package/build/site-title/transforms.js +4 -5
  718. package/build/site-title/transforms.js.map +1 -1
  719. package/build/social-link/edit.js +19 -17
  720. package/build/social-link/edit.js.map +1 -1
  721. package/build/social-link/edit.native.js +11 -13
  722. package/build/social-link/edit.native.js.map +1 -1
  723. package/build/social-link/index.js +2 -2
  724. package/build/social-links/deprecated.js +2 -4
  725. package/build/social-links/deprecated.js.map +1 -1
  726. package/build/social-links/edit.js +36 -42
  727. package/build/social-links/edit.js.map +1 -1
  728. package/build/social-links/edit.native.js +18 -25
  729. package/build/social-links/edit.native.js.map +1 -1
  730. package/build/social-links/index.js +3 -1
  731. package/build/social-links/index.js.map +1 -1
  732. package/build/spacer/controls.js +18 -21
  733. package/build/spacer/controls.js.map +1 -1
  734. package/build/spacer/controls.native.js +7 -8
  735. package/build/spacer/controls.native.js.map +1 -1
  736. package/build/spacer/deprecated.js +3 -4
  737. package/build/spacer/deprecated.js.map +1 -1
  738. package/build/spacer/edit.js +20 -23
  739. package/build/spacer/edit.js.map +1 -1
  740. package/build/spacer/edit.native.js +7 -8
  741. package/build/spacer/edit.native.js.map +1 -1
  742. package/build/spacer/index.js +1 -1
  743. package/build/spacer/save.js +6 -7
  744. package/build/spacer/save.js.map +1 -1
  745. package/build/spacer/save.native.js +6 -7
  746. package/build/spacer/save.native.js.map +1 -1
  747. package/build/table/deprecated.js +79 -102
  748. package/build/table/deprecated.js.map +1 -1
  749. package/build/table/edit.js +45 -59
  750. package/build/table/edit.js.map +1 -1
  751. package/build/table/index.js +1 -1
  752. package/build/table/save.js +33 -40
  753. package/build/table/save.js.map +1 -1
  754. package/build/table/state.js +32 -59
  755. package/build/table/state.js.map +1 -1
  756. package/build/table/transforms.js +17 -20
  757. package/build/table/transforms.js.map +1 -1
  758. package/build/table-of-contents/edit.js +9 -10
  759. package/build/table-of-contents/edit.js.map +1 -1
  760. package/build/table-of-contents/index.js +1 -1
  761. package/build/table-of-contents/list.js +3 -4
  762. package/build/table-of-contents/list.js.map +1 -1
  763. package/build/table-of-contents/save.js +5 -7
  764. package/build/table-of-contents/save.js.map +1 -1
  765. package/build/table-of-contents/utils.js +1 -3
  766. package/build/table-of-contents/utils.js.map +1 -1
  767. package/build/tag-cloud/edit.js +6 -8
  768. package/build/tag-cloud/edit.js.map +1 -1
  769. package/build/tag-cloud/index.js +1 -1
  770. package/build/template-part/edit/advanced-controls.js +15 -19
  771. package/build/template-part/edit/advanced-controls.js.map +1 -1
  772. package/build/template-part/edit/import-controls.js +7 -11
  773. package/build/template-part/edit/import-controls.js.map +1 -1
  774. package/build/template-part/edit/index.js +7 -8
  775. package/build/template-part/edit/index.js.map +1 -1
  776. package/build/template-part/edit/inner-blocks.js +8 -11
  777. package/build/template-part/edit/inner-blocks.js.map +1 -1
  778. package/build/template-part/edit/placeholder.js +7 -8
  779. package/build/template-part/edit/placeholder.js.map +1 -1
  780. package/build/template-part/edit/selection-modal.js +8 -11
  781. package/build/template-part/edit/selection-modal.js.map +1 -1
  782. package/build/template-part/edit/title-modal.js +5 -6
  783. package/build/template-part/edit/title-modal.js.map +1 -1
  784. package/build/template-part/edit/utils/hooks.js +4 -6
  785. package/build/template-part/edit/utils/hooks.js.map +1 -1
  786. package/build/template-part/edit/utils/transformers.js +3 -6
  787. package/build/template-part/edit/utils/transformers.js.map +1 -1
  788. package/build/template-part/index.js +11 -19
  789. package/build/template-part/index.js.map +1 -1
  790. package/build/template-part/variations.js +2 -2
  791. package/build/template-part/variations.js.map +1 -1
  792. package/build/term-description/edit.js +5 -6
  793. package/build/term-description/edit.js.map +1 -1
  794. package/build/term-description/index.js +1 -1
  795. package/build/text-columns/edit.js +5 -8
  796. package/build/text-columns/edit.js.map +1 -1
  797. package/build/text-columns/index.js +1 -1
  798. package/build/text-columns/save.js +10 -15
  799. package/build/text-columns/save.js.map +1 -1
  800. package/build/text-columns/transforms.js +14 -20
  801. package/build/text-columns/transforms.js.map +1 -1
  802. package/build/utils/init-block.native.js +1 -3
  803. package/build/utils/init-block.native.js.map +1 -1
  804. package/build/utils/interactivity/constants.js +1 -1
  805. package/build/utils/interactivity/constants.js.map +1 -1
  806. package/build/utils/interactivity/directives.js +75 -86
  807. package/build/utils/interactivity/directives.js.map +1 -1
  808. package/build/utils/interactivity/hooks.js +29 -46
  809. package/build/utils/interactivity/hooks.js.map +1 -1
  810. package/build/utils/interactivity/hydration.js +1 -1
  811. package/build/utils/interactivity/hydration.js.map +1 -1
  812. package/build/utils/interactivity/store.js +4 -5
  813. package/build/utils/interactivity/store.js.map +1 -1
  814. package/build/utils/interactivity/vdom.js +14 -4
  815. package/build/utils/interactivity/vdom.js.map +1 -1
  816. package/build/utils/migrate-font-family.js +1 -3
  817. package/build/utils/migrate-font-family.js.map +1 -1
  818. package/build/utils/search-patterns.js +5 -19
  819. package/build/utils/search-patterns.js.map +1 -1
  820. package/build/utils/transformation-categories.native.js +1 -4
  821. package/build/utils/transformation-categories.native.js.map +1 -1
  822. package/build/verse/deprecated.js +10 -15
  823. package/build/verse/deprecated.js.map +1 -1
  824. package/build/verse/edit.js +7 -8
  825. package/build/verse/edit.js.map +1 -1
  826. package/build/verse/index.js +1 -1
  827. package/build/verse/save.js +3 -4
  828. package/build/verse/save.js.map +1 -1
  829. package/build/video/deprecated.js +4 -5
  830. package/build/video/deprecated.js.map +1 -1
  831. package/build/video/edit-common-settings.js +4 -5
  832. package/build/video/edit-common-settings.js.map +1 -1
  833. package/build/video/edit.js +18 -27
  834. package/build/video/edit.js.map +1 -1
  835. package/build/video/edit.native.js +18 -24
  836. package/build/video/edit.native.js.map +1 -1
  837. package/build/video/index.js +1 -1
  838. package/build/video/save.js +3 -4
  839. package/build/video/save.js.map +1 -1
  840. package/build/video/tracks-editor.js +39 -51
  841. package/build/video/tracks-editor.js.map +1 -1
  842. package/build/video/tracks.js +3 -4
  843. package/build/video/tracks.js.map +1 -1
  844. package/build/video/transforms.js +30 -35
  845. package/build/video/transforms.js.map +1 -1
  846. package/build-module/archives/edit.js +4 -5
  847. package/build-module/archives/edit.js.map +1 -1
  848. package/build-module/archives/index.js +1 -1
  849. package/build-module/audio/deprecated.js +3 -4
  850. package/build-module/audio/deprecated.js.map +1 -1
  851. package/build-module/audio/edit.js +9 -13
  852. package/build-module/audio/edit.js.map +1 -1
  853. package/build-module/audio/edit.native.js +22 -26
  854. package/build-module/audio/edit.native.js.map +1 -1
  855. package/build-module/audio/index.js +1 -1
  856. package/build-module/audio/save.js +3 -4
  857. package/build-module/audio/save.js.map +1 -1
  858. package/build-module/audio/transforms.js +25 -29
  859. package/build-module/audio/transforms.js.map +1 -1
  860. package/build-module/avatar/edit.js +61 -69
  861. package/build-module/avatar/edit.js.map +1 -1
  862. package/build-module/avatar/hooks.js +12 -16
  863. package/build-module/avatar/hooks.js.map +1 -1
  864. package/build-module/avatar/index.js +1 -1
  865. package/build-module/avatar/user-control.js +4 -5
  866. package/build-module/avatar/user-control.js.map +1 -1
  867. package/build-module/block/edit-title.native.js +4 -5
  868. package/build-module/block/edit-title.native.js.map +1 -1
  869. package/build-module/block/edit.js +7 -8
  870. package/build-module/block/edit.js.map +1 -1
  871. package/build-module/block/edit.native.js +7 -8
  872. package/build-module/block/edit.native.js.map +1 -1
  873. package/build-module/block/index.js +1 -1
  874. package/build-module/button/color-background.native.js +5 -6
  875. package/build-module/button/color-background.native.js.map +1 -1
  876. package/build-module/button/deprecated.js +55 -80
  877. package/build-module/button/deprecated.js.map +1 -1
  878. package/build-module/button/edit.js +12 -23
  879. package/build-module/button/edit.js.map +1 -1
  880. package/build-module/button/edit.native.js +26 -41
  881. package/build-module/button/edit.native.js.map +1 -1
  882. package/build-module/button/index.js +6 -9
  883. package/build-module/button/index.js.map +1 -1
  884. package/build-module/button/save.js +6 -9
  885. package/build-module/button/save.js.map +1 -1
  886. package/build-module/buttons/deprecated.js +13 -18
  887. package/build-module/buttons/deprecated.js.map +1 -1
  888. package/build-module/buttons/edit.js +6 -11
  889. package/build-module/buttons/edit.js.map +1 -1
  890. package/build-module/buttons/edit.native.js +13 -16
  891. package/build-module/buttons/edit.native.js.map +1 -1
  892. package/build-module/buttons/index.js +1 -1
  893. package/build-module/buttons/save.js +5 -8
  894. package/build-module/buttons/save.js.map +1 -1
  895. package/build-module/buttons/transforms.js +2 -2
  896. package/build-module/buttons/transforms.js.map +1 -1
  897. package/build-module/calendar/edit.js +4 -5
  898. package/build-module/calendar/edit.js.map +1 -1
  899. package/build-module/calendar/index.js +1 -1
  900. package/build-module/categories/edit.js +19 -23
  901. package/build-module/categories/edit.js.map +1 -1
  902. package/build-module/categories/index.js +1 -1
  903. package/build-module/code/edit.js +5 -6
  904. package/build-module/code/edit.js.map +1 -1
  905. package/build-module/code/edit.native.js +1 -1
  906. package/build-module/code/edit.native.js.map +1 -1
  907. package/build-module/code/index.js +1 -1
  908. package/build-module/code/save.js +3 -4
  909. package/build-module/code/save.js.map +1 -1
  910. package/build-module/code/transforms.js +6 -8
  911. package/build-module/code/transforms.js.map +1 -1
  912. package/build-module/column/column-preview.native.js +9 -11
  913. package/build-module/column/column-preview.native.js.map +1 -1
  914. package/build-module/column/deprecated.js +6 -8
  915. package/build-module/column/deprecated.js.map +1 -1
  916. package/build-module/column/edit.js +10 -11
  917. package/build-module/column/edit.js.map +1 -1
  918. package/build-module/column/edit.native.js +18 -23
  919. package/build-module/column/edit.native.js.map +1 -1
  920. package/build-module/column/index.js +1 -1
  921. package/build-module/column/save.js +4 -5
  922. package/build-module/column/save.js.map +1 -1
  923. package/build-module/columns/columnCalculations.native.js +6 -9
  924. package/build-module/columns/columnCalculations.native.js.map +1 -1
  925. package/build-module/columns/deprecated.js +9 -12
  926. package/build-module/columns/deprecated.js.map +1 -1
  927. package/build-module/columns/edit.js +15 -21
  928. package/build-module/columns/edit.js.map +1 -1
  929. package/build-module/columns/edit.native.js +12 -15
  930. package/build-module/columns/edit.native.js.map +1 -1
  931. package/build-module/columns/index.js +1 -1
  932. package/build-module/columns/save.js +3 -4
  933. package/build-module/columns/save.js.map +1 -1
  934. package/build-module/columns/transforms.js +11 -16
  935. package/build-module/columns/transforms.js.map +1 -1
  936. package/build-module/columns/utils.js +6 -13
  937. package/build-module/columns/utils.js.map +1 -1
  938. package/build-module/comment-author-avatar/edit.js +8 -9
  939. package/build-module/comment-author-avatar/edit.js.map +1 -1
  940. package/build-module/comment-author-avatar/index.js +1 -1
  941. package/build-module/comment-author-name/deprecated.js +4 -7
  942. package/build-module/comment-author-name/deprecated.js.map +1 -1
  943. package/build-module/comment-author-name/edit.js +13 -14
  944. package/build-module/comment-author-name/edit.js.map +1 -1
  945. package/build-module/comment-author-name/index.js +1 -1
  946. package/build-module/comment-content/edit.js +9 -10
  947. package/build-module/comment-content/edit.js.map +1 -1
  948. package/build-module/comment-content/index.js +1 -1
  949. package/build-module/comment-date/deprecated.js +4 -7
  950. package/build-module/comment-date/deprecated.js.map +1 -1
  951. package/build-module/comment-date/edit.js +10 -11
  952. package/build-module/comment-date/edit.js.map +1 -1
  953. package/build-module/comment-date/index.js +1 -1
  954. package/build-module/comment-edit-link/edit.js +7 -8
  955. package/build-module/comment-edit-link/edit.js.map +1 -1
  956. package/build-module/comment-edit-link/index.js +1 -1
  957. package/build-module/comment-reply-link/edit.js +6 -7
  958. package/build-module/comment-reply-link/edit.js.map +1 -1
  959. package/build-module/comment-reply-link/index.js +1 -1
  960. package/build-module/comment-template/edit.js +57 -71
  961. package/build-module/comment-template/edit.js.map +1 -1
  962. package/build-module/comment-template/hooks.js +14 -17
  963. package/build-module/comment-template/hooks.js.map +1 -1
  964. package/build-module/comment-template/index.js +1 -1
  965. package/build-module/comment-template/util.js +1 -3
  966. package/build-module/comment-template/util.js.map +1 -1
  967. package/build-module/comments/deprecated.js +8 -9
  968. package/build-module/comments/deprecated.js.map +1 -1
  969. package/build-module/comments/edit/comments-inspector-controls.js +6 -7
  970. package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
  971. package/build-module/comments/edit/comments-legacy.js +8 -9
  972. package/build-module/comments/edit/comments-legacy.js.map +1 -1
  973. package/build-module/comments/edit/placeholder.js +4 -5
  974. package/build-module/comments/edit/placeholder.js.map +1 -1
  975. package/build-module/comments/index.js +1 -1
  976. package/build-module/comments/save.js +6 -7
  977. package/build-module/comments/save.js.map +1 -1
  978. package/build-module/comments-pagination/comments-pagination-arrow-controls.js +4 -5
  979. package/build-module/comments-pagination/comments-pagination-arrow-controls.js.map +1 -1
  980. package/build-module/comments-pagination/edit.js +9 -10
  981. package/build-module/comments-pagination/edit.js.map +1 -1
  982. package/build-module/comments-pagination/index.js +1 -1
  983. package/build-module/comments-pagination-next/edit.js +9 -10
  984. package/build-module/comments-pagination-next/edit.js.map +1 -1
  985. package/build-module/comments-pagination-next/index.js +1 -1
  986. package/build-module/comments-pagination-numbers/edit.js +11 -14
  987. package/build-module/comments-pagination-numbers/edit.js.map +1 -1
  988. package/build-module/comments-pagination-numbers/index.js +1 -1
  989. package/build-module/comments-pagination-previous/edit.js +9 -10
  990. package/build-module/comments-pagination-previous/edit.js.map +1 -1
  991. package/build-module/comments-pagination-previous/index.js +1 -1
  992. package/build-module/comments-title/deprecated.js +5 -8
  993. package/build-module/comments-title/deprecated.js.map +1 -1
  994. package/build-module/comments-title/edit.js +13 -14
  995. package/build-module/comments-title/edit.js.map +1 -1
  996. package/build-module/comments-title/index.js +1 -1
  997. package/build-module/cover/controls.native.js +92 -101
  998. package/build-module/cover/controls.native.js.map +1 -1
  999. package/build-module/cover/deprecated.js +33 -44
  1000. package/build-module/cover/deprecated.js.map +1 -1
  1001. package/build-module/cover/edit/block-controls.js +7 -8
  1002. package/build-module/cover/edit/block-controls.js.map +1 -1
  1003. package/build-module/cover/edit/cover-placeholder.js +8 -9
  1004. package/build-module/cover/edit/cover-placeholder.js.map +1 -1
  1005. package/build-module/cover/edit/index.js +16 -19
  1006. package/build-module/cover/edit/index.js.map +1 -1
  1007. package/build-module/cover/edit/inspector-controls.js +14 -16
  1008. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  1009. package/build-module/cover/edit/resizable-cover-popover.js +12 -13
  1010. package/build-module/cover/edit/resizable-cover-popover.js.map +1 -1
  1011. package/build-module/cover/edit/use-cover-is-dark.js +1 -3
  1012. package/build-module/cover/edit/use-cover-is-dark.js.map +1 -1
  1013. package/build-module/cover/edit.native.js +122 -145
  1014. package/build-module/cover/edit.native.js.map +1 -1
  1015. package/build-module/cover/focal-point-settings-button.native.js +6 -7
  1016. package/build-module/cover/focal-point-settings-button.native.js.map +1 -1
  1017. package/build-module/cover/index.js +1 -1
  1018. package/build-module/cover/overlay-color-settings.native.js +8 -9
  1019. package/build-module/cover/overlay-color-settings.native.js.map +1 -1
  1020. package/build-module/cover/save.js +3 -4
  1021. package/build-module/cover/save.js.map +1 -1
  1022. package/build-module/cover/shared.js +5 -6
  1023. package/build-module/cover/shared.js.map +1 -1
  1024. package/build-module/cover/transforms.js +115 -145
  1025. package/build-module/cover/transforms.js.map +1 -1
  1026. package/build-module/cover/use-cover-is-dark.native.js +1 -5
  1027. package/build-module/cover/use-cover-is-dark.native.js.map +1 -1
  1028. package/build-module/details/edit.js +5 -6
  1029. package/build-module/details/edit.js.map +1 -1
  1030. package/build-module/details/index.js +1 -2
  1031. package/build-module/details/index.js.map +1 -1
  1032. package/build-module/details/save.js +3 -4
  1033. package/build-module/details/save.js.map +1 -1
  1034. package/build-module/embed/deprecated.js +12 -15
  1035. package/build-module/embed/deprecated.js.map +1 -1
  1036. package/build-module/embed/edit.js +4 -6
  1037. package/build-module/embed/edit.js.map +1 -1
  1038. package/build-module/embed/edit.native.js +4 -4
  1039. package/build-module/embed/edit.native.js.map +1 -1
  1040. package/build-module/embed/embed-controls.js +22 -25
  1041. package/build-module/embed/embed-controls.js.map +1 -1
  1042. package/build-module/embed/embed-controls.native.js +9 -10
  1043. package/build-module/embed/embed-controls.native.js.map +1 -1
  1044. package/build-module/embed/embed-link-settings.native.js +9 -10
  1045. package/build-module/embed/embed-link-settings.native.js.map +1 -1
  1046. package/build-module/embed/embed-no-preview.native.js +8 -9
  1047. package/build-module/embed/embed-no-preview.native.js.map +1 -1
  1048. package/build-module/embed/embed-placeholder.js +10 -11
  1049. package/build-module/embed/embed-placeholder.js.map +1 -1
  1050. package/build-module/embed/embed-placeholder.native.js +11 -14
  1051. package/build-module/embed/embed-placeholder.native.js.map +1 -1
  1052. package/build-module/embed/embed-preview.native.js +16 -17
  1053. package/build-module/embed/embed-preview.native.js.map +1 -1
  1054. package/build-module/embed/index.js +1 -1
  1055. package/build-module/embed/save.js +3 -4
  1056. package/build-module/embed/save.js.map +1 -1
  1057. package/build-module/embed/transforms.js +10 -18
  1058. package/build-module/embed/transforms.js.map +1 -1
  1059. package/build-module/embed/util.js +20 -51
  1060. package/build-module/embed/util.js.map +1 -1
  1061. package/build-module/embed/wp-embed-preview.js +14 -18
  1062. package/build-module/embed/wp-embed-preview.js.map +1 -1
  1063. package/build-module/embed/wp-embed-preview.native.js +4 -5
  1064. package/build-module/embed/wp-embed-preview.native.js.map +1 -1
  1065. package/build-module/file/deprecated.js +9 -12
  1066. package/build-module/file/deprecated.js.map +1 -1
  1067. package/build-module/file/edit.js +11 -16
  1068. package/build-module/file/edit.js.map +1 -1
  1069. package/build-module/file/edit.native.js +20 -25
  1070. package/build-module/file/edit.native.js.map +1 -1
  1071. package/build-module/file/index.js +2 -2
  1072. package/build-module/file/inspector.js +12 -13
  1073. package/build-module/file/inspector.js.map +1 -1
  1074. package/build-module/file/save.js +3 -4
  1075. package/build-module/file/save.js.map +1 -1
  1076. package/build-module/file/transforms.js +9 -15
  1077. package/build-module/file/transforms.js.map +1 -1
  1078. package/build-module/freeform/convert-to-blocks-button.js +3 -4
  1079. package/build-module/freeform/convert-to-blocks-button.js.map +1 -1
  1080. package/build-module/freeform/edit.js +10 -13
  1081. package/build-module/freeform/edit.js.map +1 -1
  1082. package/build-module/freeform/index.js +2 -2
  1083. package/build-module/freeform/modal.js +3 -4
  1084. package/build-module/freeform/modal.js.map +1 -1
  1085. package/build-module/freeform/save.js +3 -4
  1086. package/build-module/freeform/save.js.map +1 -1
  1087. package/build-module/gallery/deprecated.js +40 -54
  1088. package/build-module/gallery/deprecated.js.map +1 -1
  1089. package/build-module/gallery/edit.js +25 -53
  1090. package/build-module/gallery/edit.js.map +1 -1
  1091. package/build-module/gallery/gap-styles.js +6 -7
  1092. package/build-module/gallery/gap-styles.js.map +1 -1
  1093. package/build-module/gallery/index.js +1 -1
  1094. package/build-module/gallery/save.js +3 -5
  1095. package/build-module/gallery/save.js.map +1 -1
  1096. package/build-module/gallery/shared-icon.native.js +3 -4
  1097. package/build-module/gallery/shared-icon.native.js.map +1 -1
  1098. package/build-module/gallery/shared.js +4 -10
  1099. package/build-module/gallery/shared.js.map +1 -1
  1100. package/build-module/gallery/transforms.js +103 -142
  1101. package/build-module/gallery/transforms.js.map +1 -1
  1102. package/build-module/gallery/use-get-media.native.js +8 -15
  1103. package/build-module/gallery/use-get-media.native.js.map +1 -1
  1104. package/build-module/gallery/use-get-new-images.js +2 -2
  1105. package/build-module/gallery/use-get-new-images.js.map +1 -1
  1106. package/build-module/gallery/use-image-sizes.js +11 -19
  1107. package/build-module/gallery/use-image-sizes.js.map +1 -1
  1108. package/build-module/gallery/utils.js +2 -2
  1109. package/build-module/gallery/utils.js.map +1 -1
  1110. package/build-module/gallery/v1/edit.js +30 -60
  1111. package/build-module/gallery/v1/edit.js.map +1 -1
  1112. package/build-module/gallery/v1/gallery.js +4 -5
  1113. package/build-module/gallery/v1/gallery.js.map +1 -1
  1114. package/build-module/gallery/v1/save.js +4 -5
  1115. package/build-module/gallery/v1/save.js.map +1 -1
  1116. package/build-module/gallery/v1/shared.js +4 -10
  1117. package/build-module/gallery/v1/shared.js.map +1 -1
  1118. package/build-module/group/deprecated.js +20 -28
  1119. package/build-module/group/deprecated.js.map +1 -1
  1120. package/build-module/group/edit.js +14 -18
  1121. package/build-module/group/edit.js.map +1 -1
  1122. package/build-module/group/edit.native.js +14 -18
  1123. package/build-module/group/edit.native.js.map +1 -1
  1124. package/build-module/group/index.js +1 -1
  1125. package/build-module/group/placeholder.js +16 -19
  1126. package/build-module/group/placeholder.js.map +1 -1
  1127. package/build-module/group/save.js +5 -6
  1128. package/build-module/group/save.js.map +1 -1
  1129. package/build-module/group/variations.js +5 -23
  1130. package/build-module/group/variations.js.map +1 -1
  1131. package/build-module/heading/deprecated.js +18 -26
  1132. package/build-module/heading/deprecated.js.map +1 -1
  1133. package/build-module/heading/edit.js +8 -9
  1134. package/build-module/heading/edit.js.map +1 -1
  1135. package/build-module/heading/heading-level-dropdown.js +4 -5
  1136. package/build-module/heading/heading-level-dropdown.js.map +1 -1
  1137. package/build-module/heading/heading-level-dropdown.native.js +4 -6
  1138. package/build-module/heading/heading-level-dropdown.native.js.map +1 -1
  1139. package/build-module/heading/heading-level-icon.js +4 -5
  1140. package/build-module/heading/heading-level-icon.js.map +1 -1
  1141. package/build-module/heading/index.js +4 -5
  1142. package/build-module/heading/index.js.map +1 -1
  1143. package/build-module/heading/save.js +3 -4
  1144. package/build-module/heading/save.js.map +1 -1
  1145. package/build-module/heading/transforms.js +21 -28
  1146. package/build-module/heading/transforms.js.map +1 -1
  1147. package/build-module/home-link/edit.js +10 -15
  1148. package/build-module/home-link/edit.js.map +1 -1
  1149. package/build-module/home-link/index.js +1 -1
  1150. package/build-module/html/edit.js +5 -6
  1151. package/build-module/html/edit.js.map +1 -1
  1152. package/build-module/html/index.js +1 -1
  1153. package/build-module/html/preview.js +5 -8
  1154. package/build-module/html/preview.js.map +1 -1
  1155. package/build-module/html/save.js +3 -4
  1156. package/build-module/html/save.js.map +1 -1
  1157. package/build-module/html/transforms.js +3 -4
  1158. package/build-module/html/transforms.js.map +1 -1
  1159. package/build-module/image/deprecated.js +15 -20
  1160. package/build-module/image/deprecated.js.map +1 -1
  1161. package/build-module/image/edit.js +16 -25
  1162. package/build-module/image/edit.js.map +1 -1
  1163. package/build-module/image/edit.native.js +40 -55
  1164. package/build-module/image/edit.native.js.map +1 -1
  1165. package/build-module/image/image.js +32 -50
  1166. package/build-module/image/image.js.map +1 -1
  1167. package/build-module/image/index.js +7 -9
  1168. package/build-module/image/index.js.map +1 -1
  1169. package/build-module/image/interactivity.js +24 -27
  1170. package/build-module/image/interactivity.js.map +1 -1
  1171. package/build-module/image/save.js +3 -4
  1172. package/build-module/image/save.js.map +1 -1
  1173. package/build-module/image/transforms.js +36 -46
  1174. package/build-module/image/transforms.js.map +1 -1
  1175. package/build-module/image/use-client-width.js +1 -3
  1176. package/build-module/image/use-client-width.js.map +1 -1
  1177. package/build-module/image/utils.js +4 -7
  1178. package/build-module/image/utils.js.map +1 -1
  1179. package/build-module/index.js +20 -44
  1180. package/build-module/index.js.map +1 -1
  1181. package/build-module/index.native.js +3 -6
  1182. package/build-module/index.native.js.map +1 -1
  1183. package/build-module/latest-comments/edit.js +5 -6
  1184. package/build-module/latest-comments/edit.js.map +1 -1
  1185. package/build-module/latest-comments/index.js +1 -1
  1186. package/build-module/latest-posts/deprecated.js +4 -7
  1187. package/build-module/latest-posts/deprecated.js.map +1 -1
  1188. package/build-module/latest-posts/edit.js +24 -34
  1189. package/build-module/latest-posts/edit.js.map +1 -1
  1190. package/build-module/latest-posts/edit.native.js +4 -5
  1191. package/build-module/latest-posts/edit.native.js.map +1 -1
  1192. package/build-module/latest-posts/index.js +1 -1
  1193. package/build-module/list/deprecated.js +10 -15
  1194. package/build-module/list/deprecated.js.map +1 -1
  1195. package/build-module/list/edit.js +9 -11
  1196. package/build-module/list/edit.js.map +1 -1
  1197. package/build-module/list/index.js +1 -1
  1198. package/build-module/list/ordered-list-settings.js +31 -34
  1199. package/build-module/list/ordered-list-settings.js.map +1 -1
  1200. package/build-module/list/save.js +3 -4
  1201. package/build-module/list/save.js.map +1 -1
  1202. package/build-module/list/transforms.js +11 -15
  1203. package/build-module/list/transforms.js.map +1 -1
  1204. package/build-module/list/utils.js +1 -1
  1205. package/build-module/list/utils.js.map +1 -1
  1206. package/build-module/list-item/edit.js +11 -17
  1207. package/build-module/list-item/edit.js.map +1 -1
  1208. package/build-module/list-item/edit.native.js +15 -23
  1209. package/build-module/list-item/edit.native.js.map +1 -1
  1210. package/build-module/list-item/hooks/use-enter.js +1 -3
  1211. package/build-module/list-item/hooks/use-enter.js.map +1 -1
  1212. package/build-module/list-item/hooks/use-enter.native.js +1 -3
  1213. package/build-module/list-item/hooks/use-enter.native.js.map +1 -1
  1214. package/build-module/list-item/hooks/use-indent-list-item.js +1 -3
  1215. package/build-module/list-item/hooks/use-indent-list-item.js.map +1 -1
  1216. package/build-module/list-item/hooks/use-merge.js +1 -1
  1217. package/build-module/list-item/hooks/use-outdent-list-item.js +2 -4
  1218. package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
  1219. package/build-module/list-item/index.js +1 -1
  1220. package/build-module/list-item/list-style-type.native.js +29 -34
  1221. package/build-module/list-item/list-style-type.native.js.map +1 -1
  1222. package/build-module/list-item/save.js +3 -4
  1223. package/build-module/list-item/save.js.map +1 -1
  1224. package/build-module/list-item/transforms.js +1 -4
  1225. package/build-module/list-item/transforms.js.map +1 -1
  1226. package/build-module/list-item/utils.js +4 -4
  1227. package/build-module/list-item/utils.js.map +1 -1
  1228. package/build-module/loginout/edit.js +4 -5
  1229. package/build-module/loginout/edit.js.map +1 -1
  1230. package/build-module/loginout/index.js +1 -1
  1231. package/build-module/media-text/deprecated.js +22 -31
  1232. package/build-module/media-text/deprecated.js.map +1 -1
  1233. package/build-module/media-text/edit.js +25 -39
  1234. package/build-module/media-text/edit.js.map +1 -1
  1235. package/build-module/media-text/edit.native.js +9 -13
  1236. package/build-module/media-text/edit.native.js.map +1 -1
  1237. package/build-module/media-text/index.js +1 -1
  1238. package/build-module/media-text/media-container.js +15 -18
  1239. package/build-module/media-text/media-container.js.map +1 -1
  1240. package/build-module/media-text/media-container.native.js +4 -5
  1241. package/build-module/media-text/media-container.native.js.map +1 -1
  1242. package/build-module/media-text/save.js +3 -4
  1243. package/build-module/media-text/save.js.map +1 -1
  1244. package/build-module/media-text/transforms.js +73 -91
  1245. package/build-module/media-text/transforms.js.map +1 -1
  1246. package/build-module/missing/edit.js +9 -11
  1247. package/build-module/missing/edit.js.map +1 -1
  1248. package/build-module/missing/edit.native.js +7 -8
  1249. package/build-module/missing/edit.native.js.map +1 -1
  1250. package/build-module/missing/index.js +4 -6
  1251. package/build-module/missing/index.js.map +1 -1
  1252. package/build-module/missing/save.js +3 -4
  1253. package/build-module/missing/save.js.map +1 -1
  1254. package/build-module/more/edit.js +11 -15
  1255. package/build-module/more/edit.js.map +1 -1
  1256. package/build-module/more/edit.native.js +3 -8
  1257. package/build-module/more/edit.native.js.map +1 -1
  1258. package/build-module/more/index.js +4 -6
  1259. package/build-module/more/index.js.map +1 -1
  1260. package/build-module/more/save.js +6 -7
  1261. package/build-module/more/save.js.map +1 -1
  1262. package/build-module/navigation/deprecated.js +16 -27
  1263. package/build-module/navigation/deprecated.js.map +1 -1
  1264. package/build-module/navigation/edit/are-blocks-dirty.js +1 -1
  1265. package/build-module/navigation/edit/are-blocks-dirty.js.map +1 -1
  1266. package/build-module/navigation/edit/deleted-navigation-warning.js +3 -4
  1267. package/build-module/navigation/edit/deleted-navigation-warning.js.map +1 -1
  1268. package/build-module/navigation/edit/index.js +33 -40
  1269. package/build-module/navigation/edit/index.js.map +1 -1
  1270. package/build-module/navigation/edit/inner-blocks.js +10 -14
  1271. package/build-module/navigation/edit/inner-blocks.js.map +1 -1
  1272. package/build-module/navigation/edit/leaf-more-menu.js +34 -38
  1273. package/build-module/navigation/edit/leaf-more-menu.js.map +1 -1
  1274. package/build-module/navigation/edit/manage-menus-button.js +5 -6
  1275. package/build-module/navigation/edit/manage-menus-button.js.map +1 -1
  1276. package/build-module/navigation/edit/menu-inspector-controls.js +46 -42
  1277. package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
  1278. package/build-module/navigation/edit/navigation-menu-delete-control.js +3 -4
  1279. package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  1280. package/build-module/navigation/edit/navigation-menu-selector.js +50 -56
  1281. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  1282. package/build-module/navigation/edit/overlay-menu-icon.js +3 -5
  1283. package/build-module/navigation/edit/overlay-menu-icon.js.map +1 -1
  1284. package/build-module/navigation/edit/overlay-menu-preview.js +5 -6
  1285. package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
  1286. package/build-module/navigation/edit/placeholder/index.js +10 -11
  1287. package/build-module/navigation/edit/placeholder/index.js.map +1 -1
  1288. package/build-module/navigation/edit/placeholder/placeholder-preview.js +3 -4
  1289. package/build-module/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
  1290. package/build-module/navigation/edit/responsive-wrapper.js +18 -20
  1291. package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
  1292. package/build-module/navigation/edit/unsaved-inner-blocks.js +10 -14
  1293. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  1294. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js +2 -3
  1295. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  1296. package/build-module/navigation/edit/use-create-navigation-menu.js +3 -7
  1297. package/build-module/navigation/edit/use-create-navigation-menu.js.map +1 -1
  1298. package/build-module/navigation/edit/use-generate-default-navigation-title.js +1 -5
  1299. package/build-module/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
  1300. package/build-module/navigation/edit/use-inner-blocks.js +1 -1
  1301. package/build-module/navigation/edit/use-inner-blocks.js.map +1 -1
  1302. package/build-module/navigation/edit/use-navigation-notice.js +4 -5
  1303. package/build-module/navigation/edit/use-navigation-notice.js.map +1 -1
  1304. package/build-module/navigation/edit/utils.js +2 -4
  1305. package/build-module/navigation/edit/utils.js.map +1 -1
  1306. package/build-module/navigation/index.js +2 -2
  1307. package/build-module/navigation/interactivity.js +97 -87
  1308. package/build-module/navigation/interactivity.js.map +1 -1
  1309. package/build-module/navigation/menu-items-to-blocks.js +25 -34
  1310. package/build-module/navigation/menu-items-to-blocks.js.map +1 -1
  1311. package/build-module/navigation/save.js +3 -5
  1312. package/build-module/navigation/save.js.map +1 -1
  1313. package/build-module/navigation/use-navigation-entities.js +2 -2
  1314. package/build-module/navigation/use-navigation-entities.js.map +1 -1
  1315. package/build-module/navigation/use-navigation-menu.js +1 -1
  1316. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  1317. package/build-module/navigation/use-template-part-area-label.js +3 -5
  1318. package/build-module/navigation/use-template-part-area-label.js.map +1 -1
  1319. package/build-module/navigation-link/edit.js +15 -22
  1320. package/build-module/navigation-link/edit.js.map +1 -1
  1321. package/build-module/navigation-link/hooks.js +2 -2
  1322. package/build-module/navigation-link/hooks.js.map +1 -1
  1323. package/build-module/navigation-link/index.js +11 -16
  1324. package/build-module/navigation-link/index.js.map +1 -1
  1325. package/build-module/navigation-link/link-ui.js +10 -9
  1326. package/build-module/navigation-link/link-ui.js.map +1 -1
  1327. package/build-module/navigation-link/update-attributes.js +1 -4
  1328. package/build-module/navigation-link/update-attributes.js.map +1 -1
  1329. package/build-module/navigation-submenu/edit.js +13 -16
  1330. package/build-module/navigation-submenu/edit.js.map +1 -1
  1331. package/build-module/navigation-submenu/index.js +7 -12
  1332. package/build-module/navigation-submenu/index.js.map +1 -1
  1333. package/build-module/navigation-submenu/transforms.js +6 -30
  1334. package/build-module/navigation-submenu/transforms.js.map +1 -1
  1335. package/build-module/nextpage/edit.native.js +8 -9
  1336. package/build-module/nextpage/edit.native.js.map +1 -1
  1337. package/build-module/nextpage/index.js +1 -1
  1338. package/build-module/page-list/convert-to-links-modal.js +5 -6
  1339. package/build-module/page-list/convert-to-links-modal.js.map +1 -1
  1340. package/build-module/page-list/edit.js +23 -35
  1341. package/build-module/page-list/edit.js.map +1 -1
  1342. package/build-module/page-list/index.js +1 -1
  1343. package/build-module/page-list/use-convert-to-navigation-links.js +16 -21
  1344. package/build-module/page-list/use-convert-to-navigation-links.js.map +1 -1
  1345. package/build-module/page-list-item/edit.js +5 -6
  1346. package/build-module/page-list-item/edit.js.map +1 -1
  1347. package/build-module/page-list-item/index.js +4 -7
  1348. package/build-module/page-list-item/index.js.map +1 -1
  1349. package/build-module/paragraph/deprecated.js +18 -24
  1350. package/build-module/paragraph/deprecated.js.map +1 -1
  1351. package/build-module/paragraph/edit.js +12 -14
  1352. package/build-module/paragraph/edit.js.map +1 -1
  1353. package/build-module/paragraph/edit.native.js +13 -16
  1354. package/build-module/paragraph/edit.native.js.map +1 -1
  1355. package/build-module/paragraph/index.js +4 -6
  1356. package/build-module/paragraph/index.js.map +1 -1
  1357. package/build-module/paragraph/save.js +3 -4
  1358. package/build-module/paragraph/save.js.map +1 -1
  1359. package/build-module/paragraph/transforms.js +10 -13
  1360. package/build-module/paragraph/transforms.js.map +1 -1
  1361. package/build-module/pattern/edit.js +8 -11
  1362. package/build-module/pattern/edit.js.map +1 -1
  1363. package/build-module/pattern/index.js +2 -4
  1364. package/build-module/pattern/index.js.map +1 -1
  1365. package/build-module/pattern/v1/edit.js +6 -7
  1366. package/build-module/pattern/v1/edit.js.map +1 -1
  1367. package/build-module/post-author/edit.js +19 -23
  1368. package/build-module/post-author/edit.js.map +1 -1
  1369. package/build-module/post-author/index.js +1 -1
  1370. package/build-module/post-author-biography/edit.js +12 -15
  1371. package/build-module/post-author-biography/edit.js.map +1 -1
  1372. package/build-module/post-author-biography/index.js +1 -1
  1373. package/build-module/post-author-name/edit.js +14 -17
  1374. package/build-module/post-author-name/edit.js.map +1 -1
  1375. package/build-module/post-author-name/index.js +1 -1
  1376. package/build-module/post-author-name/transforms.js +10 -16
  1377. package/build-module/post-author-name/transforms.js.map +1 -1
  1378. package/build-module/post-comment/edit.js +6 -7
  1379. package/build-module/post-comment/edit.js.map +1 -1
  1380. package/build-module/post-comment/index.js +1 -1
  1381. package/build-module/post-comments-count/edit.js +6 -9
  1382. package/build-module/post-comments-count/edit.js.map +1 -1
  1383. package/build-module/post-comments-count/index.js +1 -1
  1384. package/build-module/post-comments-form/edit.js +5 -6
  1385. package/build-module/post-comments-form/edit.js.map +1 -1
  1386. package/build-module/post-comments-form/form.js +5 -10
  1387. package/build-module/post-comments-form/form.js.map +1 -1
  1388. package/build-module/post-comments-form/index.js +1 -1
  1389. package/build-module/post-comments-link/edit.js +5 -6
  1390. package/build-module/post-comments-link/edit.js.map +1 -1
  1391. package/build-module/post-comments-link/index.js +1 -1
  1392. package/build-module/post-content/edit.js +27 -24
  1393. package/build-module/post-content/edit.js.map +1 -1
  1394. package/build-module/post-content/index.js +1 -1
  1395. package/build-module/post-date/deprecated.js +4 -7
  1396. package/build-module/post-date/deprecated.js.map +1 -1
  1397. package/build-module/post-date/edit.js +27 -33
  1398. package/build-module/post-date/edit.js.map +1 -1
  1399. package/build-module/post-date/index.js +1 -1
  1400. package/build-module/post-excerpt/edit.js +21 -24
  1401. package/build-module/post-excerpt/edit.js.map +1 -1
  1402. package/build-module/post-excerpt/index.js +3 -3
  1403. package/build-module/post-featured-image/dimension-controls.js +12 -13
  1404. package/build-module/post-featured-image/dimension-controls.js.map +1 -1
  1405. package/build-module/post-featured-image/edit.js +27 -37
  1406. package/build-module/post-featured-image/edit.js.map +1 -1
  1407. package/build-module/post-featured-image/index.js +1 -1
  1408. package/build-module/post-featured-image/overlay.js +7 -8
  1409. package/build-module/post-featured-image/overlay.js.map +1 -1
  1410. package/build-module/post-navigation-link/edit.js +11 -12
  1411. package/build-module/post-navigation-link/edit.js.map +1 -1
  1412. package/build-module/post-navigation-link/index.js +1 -1
  1413. package/build-module/post-template/edit.js +99 -86
  1414. package/build-module/post-template/edit.js.map +1 -1
  1415. package/build-module/post-template/index.js +10 -4
  1416. package/build-module/post-template/index.js.map +1 -1
  1417. package/build-module/post-terms/edit.js +10 -15
  1418. package/build-module/post-terms/edit.js.map +1 -1
  1419. package/build-module/post-terms/index.js +1 -1
  1420. package/build-module/post-terms/use-post-terms.js +7 -12
  1421. package/build-module/post-terms/use-post-terms.js.map +1 -1
  1422. package/build-module/post-time-to-read/edit.js +5 -6
  1423. package/build-module/post-time-to-read/edit.js.map +1 -1
  1424. package/build-module/post-time-to-read/index.js +1 -1
  1425. package/build-module/post-title/deprecated.js +4 -7
  1426. package/build-module/post-title/deprecated.js.map +1 -1
  1427. package/build-module/post-title/edit.js +26 -22
  1428. package/build-module/post-title/edit.js.map +1 -1
  1429. package/build-module/post-title/index.js +2 -2
  1430. package/build-module/preformatted/edit.js +7 -8
  1431. package/build-module/preformatted/edit.js.map +1 -1
  1432. package/build-module/preformatted/edit.native.js +5 -7
  1433. package/build-module/preformatted/edit.native.js.map +1 -1
  1434. package/build-module/preformatted/index.js +1 -1
  1435. package/build-module/preformatted/save.js +3 -4
  1436. package/build-module/preformatted/save.js.map +1 -1
  1437. package/build-module/preformatted/transforms.js +14 -20
  1438. package/build-module/preformatted/transforms.js.map +1 -1
  1439. package/build-module/pullquote/deprecated.js +61 -73
  1440. package/build-module/pullquote/deprecated.js.map +1 -1
  1441. package/build-module/pullquote/edit.js +6 -7
  1442. package/build-module/pullquote/edit.js.map +1 -1
  1443. package/build-module/pullquote/edit.native.js +13 -21
  1444. package/build-module/pullquote/edit.native.js.map +1 -1
  1445. package/build-module/pullquote/figure.native.js +5 -6
  1446. package/build-module/pullquote/figure.native.js.map +1 -1
  1447. package/build-module/pullquote/index.js +1 -1
  1448. package/build-module/pullquote/save.js +3 -4
  1449. package/build-module/pullquote/save.js.map +1 -1
  1450. package/build-module/pullquote/transforms.js +17 -24
  1451. package/build-module/pullquote/transforms.js.map +1 -1
  1452. package/build-module/query/deprecated.js +195 -76
  1453. package/build-module/query/deprecated.js.map +1 -1
  1454. package/build-module/query/edit/inspector-controls/author-control.js +5 -8
  1455. package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
  1456. package/build-module/query/edit/inspector-controls/create-new-post-link.js +6 -7
  1457. package/build-module/query/edit/inspector-controls/create-new-post-link.js.map +1 -1
  1458. package/build-module/query/edit/inspector-controls/index.js +4 -6
  1459. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  1460. package/build-module/query/edit/inspector-controls/order-control.js +5 -6
  1461. package/build-module/query/edit/inspector-controls/order-control.js.map +1 -1
  1462. package/build-module/query/edit/inspector-controls/parent-control.js +10 -13
  1463. package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
  1464. package/build-module/query/edit/inspector-controls/sticky-control.js +4 -5
  1465. package/build-module/query/edit/inspector-controls/sticky-control.js.map +1 -1
  1466. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +15 -19
  1467. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  1468. package/build-module/query/edit/pattern-selection-modal.js +5 -6
  1469. package/build-module/query/edit/pattern-selection-modal.js.map +1 -1
  1470. package/build-module/query/edit/query-content.js +7 -9
  1471. package/build-module/query/edit/query-content.js.map +1 -1
  1472. package/build-module/query/edit/query-placeholder.js +16 -20
  1473. package/build-module/query/edit/query-placeholder.js.map +1 -1
  1474. package/build-module/query/edit/query-toolbar.js +18 -42
  1475. package/build-module/query/edit/query-toolbar.js.map +1 -1
  1476. package/build-module/query/index.js +1 -7
  1477. package/build-module/query/index.js.map +1 -1
  1478. package/build-module/query/save.js +5 -6
  1479. package/build-module/query/save.js.map +1 -1
  1480. package/build-module/query/utils.js +24 -60
  1481. package/build-module/query/utils.js.map +1 -1
  1482. package/build-module/query-no-results/index.js +1 -1
  1483. package/build-module/query-pagination/edit.js +28 -11
  1484. package/build-module/query-pagination/edit.js.map +1 -1
  1485. package/build-module/query-pagination/index.js +7 -2
  1486. package/build-module/query-pagination/index.js.map +1 -1
  1487. package/build-module/query-pagination/query-pagination-arrow-controls.js +4 -5
  1488. package/build-module/query-pagination/query-pagination-arrow-controls.js.map +1 -1
  1489. package/build-module/query-pagination/query-pagination-label-control.js +20 -0
  1490. package/build-module/query-pagination/query-pagination-label-control.js.map +1 -0
  1491. package/build-module/query-pagination-next/edit.js +11 -11
  1492. package/build-module/query-pagination-next/edit.js.map +1 -1
  1493. package/build-module/query-pagination-next/index.js +2 -2
  1494. package/build-module/query-pagination-numbers/edit.js +3 -7
  1495. package/build-module/query-pagination-numbers/edit.js.map +1 -1
  1496. package/build-module/query-pagination-numbers/index.js +1 -1
  1497. package/build-module/query-pagination-previous/edit.js +11 -11
  1498. package/build-module/query-pagination-previous/edit.js.map +1 -1
  1499. package/build-module/query-pagination-previous/index.js +2 -2
  1500. package/build-module/query-title/deprecated.js +4 -7
  1501. package/build-module/query-title/deprecated.js.map +1 -1
  1502. package/build-module/query-title/edit.js +10 -11
  1503. package/build-module/query-title/edit.js.map +1 -1
  1504. package/build-module/query-title/index.js +1 -1
  1505. package/build-module/quote/deprecated.js +17 -24
  1506. package/build-module/quote/deprecated.js.map +1 -1
  1507. package/build-module/quote/edit.js +8 -9
  1508. package/build-module/quote/edit.js.map +1 -1
  1509. package/build-module/quote/index.js +1 -1
  1510. package/build-module/quote/save.js +3 -4
  1511. package/build-module/quote/save.js.map +1 -1
  1512. package/build-module/quote/transforms.js +37 -57
  1513. package/build-module/quote/transforms.js.map +1 -1
  1514. package/build-module/read-more/edit.js +8 -9
  1515. package/build-module/read-more/edit.js.map +1 -1
  1516. package/build-module/read-more/index.js +1 -1
  1517. package/build-module/rss/edit.js +4 -5
  1518. package/build-module/rss/edit.js.map +1 -1
  1519. package/build-module/rss/index.js +1 -1
  1520. package/build-module/search/edit.js +74 -32
  1521. package/build-module/search/edit.js.map +1 -1
  1522. package/build-module/search/edit.native.js +28 -37
  1523. package/build-module/search/edit.native.js.map +1 -1
  1524. package/build-module/search/index.js +9 -1
  1525. package/build-module/search/index.js.map +1 -1
  1526. package/build-module/search/view.js +65 -0
  1527. package/build-module/search/view.js.map +1 -0
  1528. package/build-module/separator/deprecated.js +3 -4
  1529. package/build-module/separator/deprecated.js.map +1 -1
  1530. package/build-module/separator/edit.js +6 -9
  1531. package/build-module/separator/edit.js.map +1 -1
  1532. package/build-module/separator/index.js +1 -1
  1533. package/build-module/separator/save.js +5 -8
  1534. package/build-module/separator/save.js.map +1 -1
  1535. package/build-module/shortcode/edit.js +4 -5
  1536. package/build-module/shortcode/edit.js.map +1 -1
  1537. package/build-module/shortcode/index.js +2 -2
  1538. package/build-module/shortcode/save.js +3 -4
  1539. package/build-module/shortcode/save.js.map +1 -1
  1540. package/build-module/shortcode/transforms.js +3 -4
  1541. package/build-module/shortcode/transforms.js.map +1 -1
  1542. package/build-module/site-logo/edit.js +58 -74
  1543. package/build-module/site-logo/edit.js.map +1 -1
  1544. package/build-module/site-logo/index.js +1 -1
  1545. package/build-module/site-logo/transforms.js +4 -5
  1546. package/build-module/site-logo/transforms.js.map +1 -1
  1547. package/build-module/site-tagline/deprecated.js +4 -7
  1548. package/build-module/site-tagline/deprecated.js.map +1 -1
  1549. package/build-module/site-tagline/edit.js +6 -7
  1550. package/build-module/site-tagline/edit.js.map +1 -1
  1551. package/build-module/site-tagline/index.js +1 -1
  1552. package/build-module/site-title/deprecated.js +4 -7
  1553. package/build-module/site-title/deprecated.js.map +1 -1
  1554. package/build-module/site-title/edit/index.js +6 -7
  1555. package/build-module/site-title/edit/index.js.map +1 -1
  1556. package/build-module/site-title/edit/level-icon.js +4 -5
  1557. package/build-module/site-title/edit/level-icon.js.map +1 -1
  1558. package/build-module/site-title/edit/level-toolbar.js +4 -5
  1559. package/build-module/site-title/edit/level-toolbar.js.map +1 -1
  1560. package/build-module/site-title/index.js +1 -1
  1561. package/build-module/site-title/transforms.js +4 -5
  1562. package/build-module/site-title/transforms.js.map +1 -1
  1563. package/build-module/social-link/edit.js +19 -17
  1564. package/build-module/social-link/edit.js.map +1 -1
  1565. package/build-module/social-link/edit.native.js +11 -13
  1566. package/build-module/social-link/edit.native.js.map +1 -1
  1567. package/build-module/social-link/index.js +2 -2
  1568. package/build-module/social-links/deprecated.js +2 -4
  1569. package/build-module/social-links/deprecated.js.map +1 -1
  1570. package/build-module/social-links/edit.js +36 -42
  1571. package/build-module/social-links/edit.js.map +1 -1
  1572. package/build-module/social-links/edit.native.js +18 -25
  1573. package/build-module/social-links/edit.native.js.map +1 -1
  1574. package/build-module/social-links/index.js +3 -1
  1575. package/build-module/social-links/index.js.map +1 -1
  1576. package/build-module/spacer/controls.js +18 -21
  1577. package/build-module/spacer/controls.js.map +1 -1
  1578. package/build-module/spacer/controls.native.js +7 -8
  1579. package/build-module/spacer/controls.native.js.map +1 -1
  1580. package/build-module/spacer/deprecated.js +3 -4
  1581. package/build-module/spacer/deprecated.js.map +1 -1
  1582. package/build-module/spacer/edit.js +20 -23
  1583. package/build-module/spacer/edit.js.map +1 -1
  1584. package/build-module/spacer/edit.native.js +7 -8
  1585. package/build-module/spacer/edit.native.js.map +1 -1
  1586. package/build-module/spacer/index.js +1 -1
  1587. package/build-module/spacer/save.js +6 -7
  1588. package/build-module/spacer/save.js.map +1 -1
  1589. package/build-module/spacer/save.native.js +6 -7
  1590. package/build-module/spacer/save.native.js.map +1 -1
  1591. package/build-module/table/deprecated.js +79 -102
  1592. package/build-module/table/deprecated.js.map +1 -1
  1593. package/build-module/table/edit.js +45 -59
  1594. package/build-module/table/edit.js.map +1 -1
  1595. package/build-module/table/index.js +1 -1
  1596. package/build-module/table/save.js +33 -40
  1597. package/build-module/table/save.js.map +1 -1
  1598. package/build-module/table/state.js +32 -59
  1599. package/build-module/table/state.js.map +1 -1
  1600. package/build-module/table/transforms.js +17 -20
  1601. package/build-module/table/transforms.js.map +1 -1
  1602. package/build-module/table-of-contents/edit.js +9 -10
  1603. package/build-module/table-of-contents/edit.js.map +1 -1
  1604. package/build-module/table-of-contents/index.js +1 -1
  1605. package/build-module/table-of-contents/list.js +3 -4
  1606. package/build-module/table-of-contents/list.js.map +1 -1
  1607. package/build-module/table-of-contents/save.js +5 -7
  1608. package/build-module/table-of-contents/save.js.map +1 -1
  1609. package/build-module/table-of-contents/utils.js +1 -3
  1610. package/build-module/table-of-contents/utils.js.map +1 -1
  1611. package/build-module/tag-cloud/edit.js +6 -8
  1612. package/build-module/tag-cloud/edit.js.map +1 -1
  1613. package/build-module/tag-cloud/index.js +1 -1
  1614. package/build-module/template-part/edit/advanced-controls.js +15 -19
  1615. package/build-module/template-part/edit/advanced-controls.js.map +1 -1
  1616. package/build-module/template-part/edit/import-controls.js +7 -11
  1617. package/build-module/template-part/edit/import-controls.js.map +1 -1
  1618. package/build-module/template-part/edit/index.js +7 -8
  1619. package/build-module/template-part/edit/index.js.map +1 -1
  1620. package/build-module/template-part/edit/inner-blocks.js +8 -11
  1621. package/build-module/template-part/edit/inner-blocks.js.map +1 -1
  1622. package/build-module/template-part/edit/placeholder.js +7 -8
  1623. package/build-module/template-part/edit/placeholder.js.map +1 -1
  1624. package/build-module/template-part/edit/selection-modal.js +8 -11
  1625. package/build-module/template-part/edit/selection-modal.js.map +1 -1
  1626. package/build-module/template-part/edit/title-modal.js +5 -6
  1627. package/build-module/template-part/edit/title-modal.js.map +1 -1
  1628. package/build-module/template-part/edit/utils/hooks.js +4 -6
  1629. package/build-module/template-part/edit/utils/hooks.js.map +1 -1
  1630. package/build-module/template-part/edit/utils/transformers.js +3 -6
  1631. package/build-module/template-part/edit/utils/transformers.js.map +1 -1
  1632. package/build-module/template-part/index.js +11 -19
  1633. package/build-module/template-part/index.js.map +1 -1
  1634. package/build-module/template-part/variations.js +2 -2
  1635. package/build-module/template-part/variations.js.map +1 -1
  1636. package/build-module/term-description/edit.js +5 -6
  1637. package/build-module/term-description/edit.js.map +1 -1
  1638. package/build-module/term-description/index.js +1 -1
  1639. package/build-module/text-columns/edit.js +5 -8
  1640. package/build-module/text-columns/edit.js.map +1 -1
  1641. package/build-module/text-columns/index.js +1 -1
  1642. package/build-module/text-columns/save.js +10 -15
  1643. package/build-module/text-columns/save.js.map +1 -1
  1644. package/build-module/text-columns/transforms.js +14 -20
  1645. package/build-module/text-columns/transforms.js.map +1 -1
  1646. package/build-module/utils/init-block.native.js +1 -3
  1647. package/build-module/utils/init-block.native.js.map +1 -1
  1648. package/build-module/utils/interactivity/constants.js +1 -1
  1649. package/build-module/utils/interactivity/constants.js.map +1 -1
  1650. package/build-module/utils/interactivity/directives.js +70 -81
  1651. package/build-module/utils/interactivity/directives.js.map +1 -1
  1652. package/build-module/utils/interactivity/hooks.js +29 -46
  1653. package/build-module/utils/interactivity/hooks.js.map +1 -1
  1654. package/build-module/utils/interactivity/hydration.js +1 -1
  1655. package/build-module/utils/interactivity/hydration.js.map +1 -1
  1656. package/build-module/utils/interactivity/store.js +4 -5
  1657. package/build-module/utils/interactivity/store.js.map +1 -1
  1658. package/build-module/utils/interactivity/vdom.js +14 -4
  1659. package/build-module/utils/interactivity/vdom.js.map +1 -1
  1660. package/build-module/utils/migrate-font-family.js +1 -3
  1661. package/build-module/utils/migrate-font-family.js.map +1 -1
  1662. package/build-module/utils/search-patterns.js +5 -19
  1663. package/build-module/utils/search-patterns.js.map +1 -1
  1664. package/build-module/utils/transformation-categories.native.js +1 -4
  1665. package/build-module/utils/transformation-categories.native.js.map +1 -1
  1666. package/build-module/verse/deprecated.js +10 -15
  1667. package/build-module/verse/deprecated.js.map +1 -1
  1668. package/build-module/verse/edit.js +7 -8
  1669. package/build-module/verse/edit.js.map +1 -1
  1670. package/build-module/verse/index.js +1 -1
  1671. package/build-module/verse/save.js +3 -4
  1672. package/build-module/verse/save.js.map +1 -1
  1673. package/build-module/video/deprecated.js +4 -5
  1674. package/build-module/video/deprecated.js.map +1 -1
  1675. package/build-module/video/edit-common-settings.js +4 -5
  1676. package/build-module/video/edit-common-settings.js.map +1 -1
  1677. package/build-module/video/edit.js +18 -27
  1678. package/build-module/video/edit.js.map +1 -1
  1679. package/build-module/video/edit.native.js +18 -24
  1680. package/build-module/video/edit.native.js.map +1 -1
  1681. package/build-module/video/index.js +1 -1
  1682. package/build-module/video/save.js +3 -4
  1683. package/build-module/video/save.js.map +1 -1
  1684. package/build-module/video/tracks-editor.js +39 -51
  1685. package/build-module/video/tracks-editor.js.map +1 -1
  1686. package/build-module/video/tracks.js +3 -4
  1687. package/build-module/video/tracks.js.map +1 -1
  1688. package/build-module/video/transforms.js +30 -35
  1689. package/build-module/video/transforms.js.map +1 -1
  1690. package/build-style/editor-rtl.css +8 -8
  1691. package/build-style/editor.css +8 -8
  1692. package/build-style/image/style-rtl.css +17 -7
  1693. package/build-style/image/style.css +17 -7
  1694. package/build-style/navigation/editor-rtl.css +8 -8
  1695. package/build-style/navigation/editor.css +8 -8
  1696. package/build-style/post-template/style-rtl.css +6 -0
  1697. package/build-style/post-template/style.css +6 -0
  1698. package/build-style/search/style-rtl.css +30 -0
  1699. package/build-style/search/style.css +30 -0
  1700. package/build-style/social-links/style-rtl.css +4 -0
  1701. package/build-style/social-links/style.css +4 -0
  1702. package/build-style/style-rtl.css +66 -7
  1703. package/build-style/style.css +66 -7
  1704. package/build-style/term-description/style-rtl.css +97 -0
  1705. package/build-style/term-description/style.css +97 -0
  1706. package/package.json +31 -31
  1707. package/src/archives/block.json +1 -1
  1708. package/src/audio/block.json +1 -1
  1709. package/src/avatar/block.json +1 -1
  1710. package/src/block/block.json +1 -1
  1711. package/src/button/block.json +1 -1
  1712. package/src/buttons/block.json +1 -1
  1713. package/src/calendar/block.json +1 -1
  1714. package/src/categories/block.json +1 -1
  1715. package/src/code/block.json +1 -1
  1716. package/src/column/block.json +1 -1
  1717. package/src/columns/block.json +1 -1
  1718. package/src/columns/test/__snapshots__/edit.native.js.snap +72 -0
  1719. package/src/columns/test/edit.native.js +25 -0
  1720. package/src/comment-author-avatar/block.json +1 -1
  1721. package/src/comment-author-name/block.json +1 -1
  1722. package/src/comment-content/block.json +1 -1
  1723. package/src/comment-date/block.json +1 -1
  1724. package/src/comment-edit-link/block.json +1 -1
  1725. package/src/comment-reply-link/block.json +1 -1
  1726. package/src/comment-template/block.json +1 -1
  1727. package/src/comment-template/index.php +13 -1
  1728. package/src/comments/block.json +1 -1
  1729. package/src/comments/deprecated.js +1 -1
  1730. package/src/comments-pagination/block.json +1 -1
  1731. package/src/comments-pagination-next/block.json +1 -1
  1732. package/src/comments-pagination-next/index.php +1 -1
  1733. package/src/comments-pagination-numbers/block.json +1 -1
  1734. package/src/comments-pagination-previous/block.json +1 -1
  1735. package/src/comments-pagination-previous/index.php +1 -1
  1736. package/src/comments-title/block.json +1 -1
  1737. package/src/cover/block.json +1 -1
  1738. package/src/details/block.json +1 -2
  1739. package/src/embed/block.json +1 -1
  1740. package/src/file/block.json +2 -2
  1741. package/src/file/index.php +30 -7
  1742. package/src/freeform/block.json +2 -2
  1743. package/src/gallery/block.json +1 -1
  1744. package/src/gallery/v1/save.js +1 -1
  1745. package/src/group/block.json +1 -1
  1746. package/src/heading/block.json +1 -1
  1747. package/src/home-link/block.json +1 -1
  1748. package/src/html/block.json +1 -1
  1749. package/src/image/block.json +4 -4
  1750. package/src/image/index.php +0 -72
  1751. package/src/image/interactivity.js +5 -0
  1752. package/src/image/style.scss +19 -7
  1753. package/src/index.js +1 -3
  1754. package/src/latest-comments/block.json +1 -1
  1755. package/src/latest-posts/block.json +1 -1
  1756. package/src/list/block.json +1 -1
  1757. package/src/list-item/block.json +1 -1
  1758. package/src/loginout/block.json +1 -1
  1759. package/src/media-text/block.json +1 -1
  1760. package/src/missing/block.json +1 -1
  1761. package/src/more/block.json +1 -1
  1762. package/src/more/edit.native.js +8 -15
  1763. package/src/navigation/block.json +2 -2
  1764. package/src/navigation/edit/menu-inspector-controls.js +43 -50
  1765. package/src/navigation/editor.scss +14 -12
  1766. package/src/navigation/index.php +169 -33
  1767. package/src/navigation/interactivity.js +75 -57
  1768. package/src/navigation-link/block.json +1 -1
  1769. package/src/navigation-link/edit.js +1 -9
  1770. package/src/navigation-link/hooks.js +2 -2
  1771. package/src/navigation-link/link-ui.js +12 -6
  1772. package/src/navigation-link/test/__snapshots__/hooks.js.snap +2 -2
  1773. package/src/navigation-submenu/block.json +1 -1
  1774. package/src/nextpage/block.json +1 -1
  1775. package/src/nextpage/edit.native.js +2 -2
  1776. package/src/page-list/block.json +1 -1
  1777. package/src/page-list-item/block.json +1 -1
  1778. package/src/page-list-item/index.php +14 -0
  1779. package/src/paragraph/block.json +1 -1
  1780. package/src/pattern/block.json +1 -1
  1781. package/src/post-author/block.json +1 -1
  1782. package/src/post-author-biography/block.json +1 -1
  1783. package/src/post-author-name/block.json +1 -1
  1784. package/src/post-comment/block.json +1 -1
  1785. package/src/post-comments-count/block.json +1 -1
  1786. package/src/post-comments-form/block.json +1 -1
  1787. package/src/post-comments-link/block.json +1 -1
  1788. package/src/post-content/block.json +1 -1
  1789. package/src/post-content/edit.js +22 -2
  1790. package/src/post-date/block.json +1 -1
  1791. package/src/post-excerpt/block.json +3 -3
  1792. package/src/post-excerpt/edit.js +5 -14
  1793. package/src/post-excerpt/index.php +2 -2
  1794. package/src/post-featured-image/block.json +1 -1
  1795. package/src/post-navigation-link/block.json +1 -1
  1796. package/src/post-template/block.json +10 -4
  1797. package/src/post-template/edit.js +66 -32
  1798. package/src/post-template/index.php +10 -9
  1799. package/src/post-template/style.scss +8 -1
  1800. package/src/post-terms/block.json +1 -1
  1801. package/src/post-time-to-read/block.json +1 -1
  1802. package/src/post-title/block.json +2 -2
  1803. package/src/post-title/edit.js +22 -17
  1804. package/src/preformatted/block.json +1 -1
  1805. package/src/pullquote/block.json +1 -1
  1806. package/src/query/block.json +1 -7
  1807. package/src/query/deprecated.js +167 -22
  1808. package/src/query/edit/inspector-controls/index.js +4 -2
  1809. package/src/query/edit/query-content.js +0 -1
  1810. package/src/query/edit/query-toolbar.js +3 -22
  1811. package/src/query-no-results/block.json +1 -1
  1812. package/src/query-pagination/block.json +7 -2
  1813. package/src/query-pagination/edit.js +18 -2
  1814. package/src/query-pagination/query-pagination-label-control.js +19 -0
  1815. package/src/query-pagination-next/block.json +2 -2
  1816. package/src/query-pagination-next/edit.js +13 -11
  1817. package/src/query-pagination-next/index.php +7 -2
  1818. package/src/query-pagination-numbers/block.json +1 -1
  1819. package/src/query-pagination-previous/block.json +2 -2
  1820. package/src/query-pagination-previous/edit.js +13 -11
  1821. package/src/query-pagination-previous/index.php +7 -2
  1822. package/src/query-title/block.json +1 -1
  1823. package/src/quote/block.json +1 -1
  1824. package/src/read-more/block.json +1 -1
  1825. package/src/rss/block.json +1 -1
  1826. package/src/search/block.json +9 -1
  1827. package/src/search/edit.js +61 -3
  1828. package/src/search/index.php +50 -51
  1829. package/src/search/style.scss +39 -0
  1830. package/src/search/view.js +68 -0
  1831. package/src/separator/block.json +1 -1
  1832. package/src/shortcode/block.json +2 -2
  1833. package/src/site-logo/block.json +1 -1
  1834. package/src/site-logo/index.php +1 -1
  1835. package/src/site-tagline/block.json +1 -1
  1836. package/src/site-title/block.json +1 -1
  1837. package/src/social-link/block.json +3 -1
  1838. package/src/social-link/edit.js +10 -1
  1839. package/src/social-link/index.php +22 -1
  1840. package/src/social-links/block.json +3 -1
  1841. package/src/social-links/style.scss +10 -0
  1842. package/src/spacer/block.json +1 -1
  1843. package/src/spacer/controls.js +1 -0
  1844. package/src/style.scss +1 -0
  1845. package/src/table/block.json +1 -1
  1846. package/src/table-of-contents/block.json +1 -1
  1847. package/src/tag-cloud/block.json +1 -1
  1848. package/src/template-part/block.json +1 -1
  1849. package/src/term-description/block.json +1 -1
  1850. package/src/term-description/style.scss +11 -0
  1851. package/src/text-columns/block.json +1 -1
  1852. package/src/utils/interactivity/constants.js +1 -1
  1853. package/src/utils/interactivity/directives.js +5 -5
  1854. package/src/utils/interactivity/hydration.js +1 -1
  1855. package/src/utils/interactivity/vdom.js +21 -4
  1856. package/src/verse/block.json +1 -1
  1857. package/src/video/block.json +1 -1
  1858. package/build/file/view.js +0 -9
  1859. package/build/file/view.js.map +0 -1
  1860. package/build/navigation/view-modal.js +0 -66
  1861. package/build/navigation/view-modal.js.map +0 -1
  1862. package/build/navigation/view.js +0 -61
  1863. package/build/navigation/view.js.map +0 -1
  1864. package/build-module/file/view.js +0 -6
  1865. package/build-module/file/view.js.map +0 -1
  1866. package/build-module/navigation/view-modal.js +0 -60
  1867. package/build-module/navigation/view-modal.js.map +0 -1
  1868. package/build-module/navigation/view.js +0 -59
  1869. package/build-module/navigation/view.js.map +0 -1
  1870. package/src/file/view.js +0 -9
  1871. package/src/navigation/view-modal.js +0 -78
  1872. package/src/navigation/view.js +0 -74
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-template/edit.js"],"names":["TEMPLATE","getCommentsPlaceholder","perPage","pageComments","threadComments","threadCommentsDepth","commentsDepth","Math","min","buildChildrenComment","commentsLevel","nextLevel","commentId","children","placeholderComments","push","CommentTemplateInnerBlocks","comment","activeCommentId","setActiveCommentId","firstCommentId","blocks","innerBlocksProps","template","length","CommentTemplatePreview","isHidden","blockPreviewProps","handleOnClick","style","display","undefined","MemoizedCommentTemplatePreview","CommentsList","comments","blockProps","map","index","CommentTemplateEdit","clientId","context","postId","commentOrder","commentsPerPage","select","getSettings","blockEditorStore","__experimentalDiscussionSettings","commentQuery","topLevelComments","getEntityRecords","coreStore","getBlocks","commentTree","reverse"],"mappings":";;;;;;;;;AAGA;;;;AACA;;AACA;;AACA;;AAOA;;AACA;;AAKA;;AAnBA;AACA;AACA;;AAcA;AACA;AACA;AAGA,MAAMA,QAAQ,GAAG,CAChB,CAAE,aAAF,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;AACA;AACA;AACA;;AACA,MAAMC,sBAAsB,GAAG,QAKxB;AAAA,MAL0B;AAChCC,IAAAA,OADgC;AAEhCC,IAAAA,YAFgC;AAGhCC,IAAAA,cAHgC;AAIhCC,IAAAA;AAJgC,GAK1B;AACN;AACA,QAAMC,aAAa,GAAG,CAAEF,cAAF,GACnB,CADmB,GAEnBG,IAAI,CAACC,GAAL,CAAUH,mBAAV,EAA+B,CAA/B,CAFH;;AAIA,QAAMI,oBAAoB,GAAKC,aAAF,IAAqB;AACjD;AACA,QAAKA,aAAa,GAAGJ,aAArB,EAAqC;AACpC,YAAMK,SAAS,GAAGD,aAAa,GAAG,CAAlC;AAEA,aAAO,CACN;AACCE,QAAAA,SAAS,EAAE,EAAGF,aAAa,GAAG,CAAnB,CADZ;AAECG,QAAAA,QAAQ,EAAEJ,oBAAoB,CAAEE,SAAF;AAF/B,OADM,CAAP;AA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,IAAA,UAAU,EAAGlB,UAFd;AAGC,IAAA,MAAM,EAAGd,MAHV;AAIC,IAAA,eAAe,EAAGH,eAJnB;AAKC,IAAA,kBAAkB,EAAGC,kBALtB;AAMC,IAAA,cAAc,mBAAGkC,WAAW,CAAE,CAAF,CAAd,kDAAG,cAAkBzC;AANpC,IADD;AAUA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, 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 { useCommentQueryArgs, useCommentTree } from './hooks';\n\nconst TEMPLATE = [\n\t[ 'core/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 * Function that returns a comment structure that will be rendered with default placehoders.\n *\n * Each comment has a `commentId` property that is always a negative number in\n * case of the placeholders. This is to ensure that the comment does not\n * conflict with the actual (real) comments.\n *\n * @param {Object} settings Discussion Settings.\n * @param {number} [settings.perPage] - Comments per page setting or block attribute.\n * @param {boolean} [settings.pageComments] - Enable break comments into pages setting.\n * @param {boolean} [settings.threadComments] - Enable threaded (nested) comments setting.\n * @param {number} [settings.threadCommentsDepth] - Level deep of threaded comments.\n *\n * @typedef {{id: null, children: EmptyComment[]}} EmptyComment\n * @return {EmptyComment[]} \t\tInner blocks of the Comment Template\n */\nconst getCommentsPlaceholder = ( {\n\tperPage,\n\tpageComments,\n\tthreadComments,\n\tthreadCommentsDepth,\n} ) => {\n\t// Limit commentsDepth to 3\n\tconst commentsDepth = ! threadComments\n\t\t? 1\n\t\t: Math.min( threadCommentsDepth, 3 );\n\n\tconst buildChildrenComment = ( commentsLevel ) => {\n\t\t// Render children comments until commentsDepth is reached\n\t\tif ( commentsLevel < commentsDepth ) {\n\t\t\tconst nextLevel = commentsLevel + 1;\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tcommentId: -( commentsLevel + 3 ),\n\t\t\t\t\tchildren: buildChildrenComment( nextLevel ),\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\t\treturn [];\n\t};\n\n\t// Add the first comment and its children\n\tconst placeholderComments = [\n\t\t{ commentId: -1, children: buildChildrenComment( 1 ) },\n\t];\n\n\t// Add a second comment unless the break comments setting is active and set to less than 2, and there is one nested comment max\n\tif ( ( ! pageComments || perPage >= 2 ) && commentsDepth < 3 ) {\n\t\tplaceholderComments.push( {\n\t\t\tcommentId: -2,\n\t\t\tchildren: [],\n\t\t} );\n\t}\n\n\t// Add a third comment unless the break comments setting is active and set to less than 3, and there aren't nested comments\n\tif ( ( ! pageComments || perPage >= 3 ) && commentsDepth < 2 ) {\n\t\tplaceholderComments.push( {\n\t\t\tcommentId: -3,\n\t\t\tchildren: [],\n\t\t} );\n\t}\n\n\t// In case that the value is set but larger than 3 we truncate it to 3.\n\treturn placeholderComments;\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.activeCommentId] - The ID of the comment that is currently active.\n * @param {Array} [props.setActiveCommentId] - The setter for activeCommentId.\n * @param {Array} [props.firstCommentId] - ID of the 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\tactiveCommentId,\n\tsetActiveCommentId,\n\tfirstCommentId,\n\tblocks,\n} ) {\n\tconst { children, ...innerBlocksProps } = useInnerBlocksProps(\n\t\t{},\n\t\t{ template: TEMPLATE }\n\t);\n\n\treturn (\n\t\t<li { ...innerBlocksProps }>\n\t\t\t{ comment.commentId === ( activeCommentId || firstCommentId )\n\t\t\t\t? children\n\t\t\t\t: null }\n\n\t\t\t{ /* To avoid flicker when switching active block contexts, a preview\n\t\t\t is ALWAYS rendered and the preview for the active block is hidden.\n\t\t\t This ensures that when switching the active block, the component is not\n\t\t\t mounted again but rather it only toggles the `isHidden` prop.\n\t\t\t The same strategy is used for preventing the flicker in the Post Template\n\t\t\t block. */ }\n\t\t\t<MemoizedCommentTemplatePreview\n\t\t\t\tblocks={ blocks }\n\t\t\t\tcommentId={ comment.commentId }\n\t\t\t\tsetActiveCommentId={ setActiveCommentId }\n\t\t\t\tisHidden={\n\t\t\t\t\tcomment.commentId === ( activeCommentId || firstCommentId )\n\t\t\t\t}\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\tactiveCommentId={ activeCommentId }\n\t\t\t\t\tsetActiveCommentId={ setActiveCommentId }\n\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\tfirstCommentId={ firstCommentId }\n\t\t\t\t/>\n\t\t\t) : null }\n\t\t</li>\n\t);\n}\n\nconst CommentTemplatePreview = ( {\n\tblocks,\n\tcommentId,\n\tsetActiveCommentId,\n\tisHidden,\n} ) => {\n\tconst blockPreviewProps = useBlockPreview( {\n\t\tblocks,\n\t} );\n\n\tconst handleOnClick = () => {\n\t\tsetActiveCommentId( commentId );\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.activeCommentId] - The ID of the comment that is currently active.\n * @param {Array} [props.setActiveCommentId] - The setter for activeCommentId.\n * @param {Array} [props.blocks] - Array of blocks returned from getBlocks() in parent.\n * @param {Object} [props.firstCommentId] - The ID of the first comment in the array of\n * comment objects.\n * @return {WPElement} \t\tList of comments.\n */\nconst CommentsList = ( {\n\tcomments,\n\tblockProps,\n\tactiveCommentId,\n\tsetActiveCommentId,\n\tblocks,\n\tfirstCommentId,\n} ) => (\n\t<ol { ...blockProps }>\n\t\t{ comments &&\n\t\t\tcomments.map( ( { commentId, ...comment }, index ) => (\n\t\t\t\t<BlockContextProvider\n\t\t\t\t\tkey={ comment.commentId || index }\n\t\t\t\t\tvalue={ {\n\t\t\t\t\t\t// If the commentId is negative it means that this comment is a\n\t\t\t\t\t\t// \"placeholder\" and that the block is most likely being used in the\n\t\t\t\t\t\t// site editor. In this case, we have to set the commentId to `null`\n\t\t\t\t\t\t// because otherwise the (non-existent) comment with a negative ID\n\t\t\t\t\t\t// would be reqested from the REST API.\n\t\t\t\t\t\tcommentId: commentId < 0 ? null : commentId,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<CommentTemplateInnerBlocks\n\t\t\t\t\t\tcomment={ { commentId, ...comment } }\n\t\t\t\t\t\tactiveCommentId={ activeCommentId }\n\t\t\t\t\t\tsetActiveCommentId={ setActiveCommentId }\n\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\tfirstCommentId={ firstCommentId }\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 },\n} ) {\n\tconst blockProps = useBlockProps();\n\n\tconst [ activeCommentId, setActiveCommentId ] = useState();\n\tconst {\n\t\tcommentOrder,\n\t\tthreadCommentsDepth,\n\t\tthreadComments,\n\t\tcommentsPerPage,\n\t\tpageComments,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn getSettings().__experimentalDiscussionSettings;\n\t} );\n\n\tconst commentQuery = useCommentQueryArgs( {\n\t\tpostId,\n\t} );\n\n\tconst { topLevelComments, blocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecords } = select( coreStore );\n\t\t\tconst { getBlocks } = select( blockEditorStore );\n\t\t\treturn {\n\t\t\t\t// Request only top-level comments. Replies are embedded.\n\t\t\t\ttopLevelComments: commentQuery\n\t\t\t\t\t? getEntityRecords( 'root', 'comment', commentQuery )\n\t\t\t\t\t: null,\n\t\t\t\tblocks: getBlocks( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId, commentQuery ]\n\t);\n\n\t// Generate a tree structure of comment IDs.\n\tlet commentTree = useCommentTree(\n\t\t// Reverse the order of top comments if needed.\n\t\tcommentOrder === 'desc' && topLevelComments\n\t\t\t? [ ...topLevelComments ].reverse()\n\t\t\t: topLevelComments\n\t);\n\n\tif ( ! topLevelComments ) {\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 ( ! postId ) {\n\t\tcommentTree = getCommentsPlaceholder( {\n\t\t\tperPage: commentsPerPage,\n\t\t\tpageComments,\n\t\t\tthreadComments,\n\t\t\tthreadCommentsDepth,\n\t\t} );\n\t}\n\n\tif ( ! commentTree.length ) {\n\t\treturn <p { ...blockProps }>{ __( 'No results found.' ) }</p>;\n\t}\n\n\treturn (\n\t\t<CommentsList\n\t\t\tcomments={ commentTree }\n\t\t\tblockProps={ blockProps }\n\t\t\tblocks={ blocks }\n\t\t\tactiveCommentId={ activeCommentId }\n\t\t\tsetActiveCommentId={ setActiveCommentId }\n\t\t\tfirstCommentId={ commentTree[ 0 ]?.commentId }\n\t\t/>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comment-template/edit.js"],"names":["TEMPLATE","getCommentsPlaceholder","perPage","pageComments","threadComments","threadCommentsDepth","commentsDepth","Math","min","buildChildrenComment","commentsLevel","nextLevel","commentId","children","placeholderComments","push","CommentTemplateInnerBlocks","comment","activeCommentId","setActiveCommentId","firstCommentId","blocks","innerBlocksProps","template","length","CommentTemplatePreview","isHidden","blockPreviewProps","handleOnClick","style","display","undefined","MemoizedCommentTemplatePreview","CommentsList","comments","blockProps","map","index","CommentTemplateEdit","clientId","context","postId","commentOrder","commentsPerPage","select","getSettings","blockEditorStore","__experimentalDiscussionSettings","commentQuery","topLevelComments","getEntityRecords","coreStore","getBlocks","commentTree","reverse"],"mappings":";;;;;;;;;AAGA;;;;AACA;;AACA;;AACA;;AAOA;;AACA;;AAKA;;AAnBA;AACA;AACA;;AAcA;AACA;AACA;AAGA,MAAMA,QAAQ,GAAG,CAChB,CAAE,aAAF,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;AACA;AACA;AACA;;AACA,MAAMC,sBAAsB,GAAG,CAAE;AAChCC,EAAAA,OADgC;AAEhCC,EAAAA,YAFgC;AAGhCC,EAAAA,cAHgC;AAIhCC,EAAAA;AAJgC,CAAF,KAKxB;AACN;AACA,QAAMC,aAAa,GAAG,CAAEF,cAAF,GACnB,CADmB,GAEnBG,IAAI,CAACC,GAAL,CAAUH,mBAAV,EAA+B,CAA/B,CAFH;;AAIA,QAAMI,o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AA4B;AAC3B,WAAO,iCAAQW,UAAR,EAAuB,cAAI,mBAAJ,CAAvB,CAAP;AACA;;AAED,SACC,4BAAC,YAAD;AACC,IAAA,QAAQ,EAAGkB,WADZ;AAEC,IAAA,UAAU,EAAGlB,UAFd;AAGC,IAAA,MAAM,EAAGd,MAHV;AAIC,IAAA,eAAe,EAAGH,eAJnB;AAKC,IAAA,kBAAkB,EAAGC,kBALtB;AAMC,IAAA,cAAc,EAAGkC,WAAW,CAAE,CAAF,CAAX,EAAkBzC;AANpC,IADD;AAUA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, 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 { useCommentQueryArgs, useCommentTree } from './hooks';\n\nconst TEMPLATE = [\n\t[ 'core/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 * Function that returns a comment structure that will be rendered with default placehoders.\n *\n * Each comment has a `commentId` property that is always a negative number in\n * case of the placeholders. This is to ensure that the comment does not\n * conflict with the actual (real) comments.\n *\n * @param {Object} settings Discussion Settings.\n * @param {number} [settings.perPage] - Comments per page setting or block attribute.\n * @param {boolean} [settings.pageComments] - Enable break comments into pages setting.\n * @param {boolean} [settings.threadComments] - Enable threaded (nested) comments setting.\n * @param {number} [settings.threadCommentsDepth] - Level deep of threaded comments.\n *\n * @typedef {{id: null, children: EmptyComment[]}} EmptyComment\n * @return {EmptyComment[]} \t\tInner blocks of the Comment Template\n */\nconst getCommentsPlaceholder = ( {\n\tperPage,\n\tpageComments,\n\tthreadComments,\n\tthreadCommentsDepth,\n} ) => {\n\t// Limit commentsDepth to 3\n\tconst commentsDepth = ! threadComments\n\t\t? 1\n\t\t: Math.min( threadCommentsDepth, 3 );\n\n\tconst buildChildrenComment = ( commentsLevel ) => {\n\t\t// Render children comments until commentsDepth is reached\n\t\tif ( commentsLevel < commentsDepth ) {\n\t\t\tconst nextLevel = commentsLevel + 1;\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tcommentId: -( commentsLevel + 3 ),\n\t\t\t\t\tchildren: buildChildrenComment( nextLevel ),\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\t\treturn [];\n\t};\n\n\t// Add the first comment and its children\n\tconst placeholderComments = [\n\t\t{ commentId: -1, children: buildChildrenComment( 1 ) },\n\t];\n\n\t// Add a second comment unless the break comments setting is active and set to less than 2, and there is one nested comment max\n\tif ( ( ! pageComments || perPage >= 2 ) && commentsDepth < 3 ) {\n\t\tplaceholderComments.push( {\n\t\t\tcommentId: -2,\n\t\t\tchildren: [],\n\t\t} );\n\t}\n\n\t// Add a third comment unless the break comments setting is active and set to less than 3, and there aren't nested comments\n\tif ( ( ! pageComments || perPage >= 3 ) && commentsDepth < 2 ) {\n\t\tplaceholderComments.push( {\n\t\t\tcommentId: -3,\n\t\t\tchildren: [],\n\t\t} );\n\t}\n\n\t// In case that the value is set but larger than 3 we truncate it to 3.\n\treturn placeholderComments;\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.activeCommentId] - The ID of the comment that is currently active.\n * @param {Array} [props.setActiveCommentId] - The setter for activeCommentId.\n * @param {Array} [props.firstCommentId] - ID of the 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\tactiveCommentId,\n\tsetActiveCommentId,\n\tfirstCommentId,\n\tblocks,\n} ) {\n\tconst { children, ...innerBlocksProps } = useInnerBlocksProps(\n\t\t{},\n\t\t{ template: TEMPLATE }\n\t);\n\n\treturn (\n\t\t<li { ...innerBlocksProps }>\n\t\t\t{ comment.commentId === ( activeCommentId || firstCommentId )\n\t\t\t\t? children\n\t\t\t\t: null }\n\n\t\t\t{ /* To avoid flicker when switching active block contexts, a preview\n\t\t\t is ALWAYS rendered and the preview for the active block is hidden.\n\t\t\t This ensures that when switching the active block, the component is not\n\t\t\t mounted again but rather it only toggles the `isHidden` prop.\n\t\t\t The same strategy is used for preventing the flicker in the Post Template\n\t\t\t block. */ }\n\t\t\t<MemoizedCommentTemplatePreview\n\t\t\t\tblocks={ blocks }\n\t\t\t\tcommentId={ comment.commentId }\n\t\t\t\tsetActiveCommentId={ setActiveCommentId }\n\t\t\t\tisHidden={\n\t\t\t\t\tcomment.commentId === ( activeCommentId || firstCommentId )\n\t\t\t\t}\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\tactiveCommentId={ activeCommentId }\n\t\t\t\t\tsetActiveCommentId={ setActiveCommentId }\n\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\tfirstCommentId={ firstCommentId }\n\t\t\t\t/>\n\t\t\t) : null }\n\t\t</li>\n\t);\n}\n\nconst CommentTemplatePreview = ( {\n\tblocks,\n\tcommentId,\n\tsetActiveCommentId,\n\tisHidden,\n} ) => {\n\tconst blockPreviewProps = useBlockPreview( {\n\t\tblocks,\n\t} );\n\n\tconst handleOnClick = () => {\n\t\tsetActiveCommentId( commentId );\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.activeCommentId] - The ID of the comment that is currently active.\n * @param {Array} [props.setActiveCommentId] - The setter for activeCommentId.\n * @param {Array} [props.blocks] - Array of blocks returned from getBlocks() in parent.\n * @param {Object} [props.firstCommentId] - The ID of the first comment in the array of\n * comment objects.\n * @return {WPElement} \t\tList of comments.\n */\nconst CommentsList = ( {\n\tcomments,\n\tblockProps,\n\tactiveCommentId,\n\tsetActiveCommentId,\n\tblocks,\n\tfirstCommentId,\n} ) => (\n\t<ol { ...blockProps }>\n\t\t{ comments &&\n\t\t\tcomments.map( ( { commentId, ...comment }, index ) => (\n\t\t\t\t<BlockContextProvider\n\t\t\t\t\tkey={ comment.commentId || index }\n\t\t\t\t\tvalue={ {\n\t\t\t\t\t\t// If the commentId is negative it means that this comment is a\n\t\t\t\t\t\t// \"placeholder\" and that the block is most likely being used in the\n\t\t\t\t\t\t// site editor. In this case, we have to set the commentId to `null`\n\t\t\t\t\t\t// because otherwise the (non-existent) comment with a negative ID\n\t\t\t\t\t\t// would be reqested from the REST API.\n\t\t\t\t\t\tcommentId: commentId < 0 ? null : commentId,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<CommentTemplateInnerBlocks\n\t\t\t\t\t\tcomment={ { commentId, ...comment } }\n\t\t\t\t\t\tactiveCommentId={ activeCommentId }\n\t\t\t\t\t\tsetActiveCommentId={ setActiveCommentId }\n\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\tfirstCommentId={ firstCommentId }\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 },\n} ) {\n\tconst blockProps = useBlockProps();\n\n\tconst [ activeCommentId, setActiveCommentId ] = useState();\n\tconst {\n\t\tcommentOrder,\n\t\tthreadCommentsDepth,\n\t\tthreadComments,\n\t\tcommentsPerPage,\n\t\tpageComments,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn getSettings().__experimentalDiscussionSettings;\n\t} );\n\n\tconst commentQuery = useCommentQueryArgs( {\n\t\tpostId,\n\t} );\n\n\tconst { topLevelComments, blocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecords } = select( coreStore );\n\t\t\tconst { getBlocks } = select( blockEditorStore );\n\t\t\treturn {\n\t\t\t\t// Request only top-level comments. Replies are embedded.\n\t\t\t\ttopLevelComments: commentQuery\n\t\t\t\t\t? getEntityRecords( 'root', 'comment', commentQuery )\n\t\t\t\t\t: null,\n\t\t\t\tblocks: getBlocks( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId, commentQuery ]\n\t);\n\n\t// Generate a tree structure of comment IDs.\n\tlet commentTree = useCommentTree(\n\t\t// Reverse the order of top comments if needed.\n\t\tcommentOrder === 'desc' && topLevelComments\n\t\t\t? [ ...topLevelComments ].reverse()\n\t\t\t: topLevelComments\n\t);\n\n\tif ( ! topLevelComments ) {\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 ( ! postId ) {\n\t\tcommentTree = getCommentsPlaceholder( {\n\t\t\tperPage: commentsPerPage,\n\t\t\tpageComments,\n\t\t\tthreadComments,\n\t\t\tthreadCommentsDepth,\n\t\t} );\n\t}\n\n\tif ( ! commentTree.length ) {\n\t\treturn <p { ...blockProps }>{ __( 'No results found.' ) }</p>;\n\t}\n\n\treturn (\n\t\t<CommentsList\n\t\t\tcomments={ commentTree }\n\t\t\tblockProps={ blockProps }\n\t\t\tblocks={ blocks }\n\t\t\tactiveCommentId={ activeCommentId }\n\t\t\tsetActiveCommentId={ setActiveCommentId }\n\t\t\tfirstCommentId={ commentTree[ 0 ]?.commentId }\n\t\t/>\n\t);\n}\n"]}
@@ -33,10 +33,9 @@ const MAX_COMMENTS_PER_PAGE = 100;
33
33
  * @return {Object} Query args to retrieve the comments.
34
34
  */
35
35
 
36
- const useCommentQueryArgs = _ref => {
37
- let {
38
- postId
39
- } = _ref;
36
+ const useCommentQueryArgs = ({
37
+ postId
38
+ }) => {
40
39
  // Initialize the query args that are not going to change.
41
40
  const queryArgs = {
42
41
  status: 'approve',
@@ -99,13 +98,12 @@ const useCommentQueryArgs = _ref => {
99
98
 
100
99
  exports.useCommentQueryArgs = useCommentQueryArgs;
101
100
 
102
- const useDefaultPageIndex = _ref2 => {
103
- let {
104
- defaultPage,
105
- postId,
106
- perPage,
107
- queryArgs
108
- } = _ref2;
101
+ const useDefaultPageIndex = ({
102
+ defaultPage,
103
+ postId,
104
+ perPage,
105
+ queryArgs
106
+ }) => {
109
107
  // Store the default page indices.
110
108
  const [defaultPages, setDefaultPages] = (0, _element.useState)({});
111
109
  const key = `${postId}_${perPage}`;
@@ -149,12 +147,11 @@ const useDefaultPageIndex = _ref2 => {
149
147
 
150
148
 
151
149
  const useCommentTree = topLevelComments => {
152
- const commentTree = (0, _element.useMemo)(() => topLevelComments === null || topLevelComments === void 0 ? void 0 : topLevelComments.map(_ref3 => {
153
- let {
154
- id,
155
- _embedded
156
- } = _ref3;
157
- const [children] = (_embedded === null || _embedded === void 0 ? void 0 : _embedded.children) || [[]];
150
+ const commentTree = (0, _element.useMemo)(() => topLevelComments?.map(({
151
+ id,
152
+ _embedded
153
+ }) => {
154
+ const [children] = _embedded?.children || [[]];
158
155
  return {
159
156
  commentId: id,
160
157
  children: children.map(child => ({
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-template/hooks.js"],"names":["MAX_COMMENTS_PER_PAGE","useCommentQueryArgs","postId","queryArgs","status","order","context","parent","_embed","pageComments","commentsPerPage","defaultCommentsPage","defaultPage","select","getSettings","blockEditorStore","__experimentalDiscussionSettings","perPage","Math","min","page","useDefaultPageIndex","post","per_page","defaultPages","setDefaultPages","key","path","_fields","method","parse","then","res","pages","parseInt","headers","get","useCommentTree","topLevelComments","commentTree","map","id","_embedded","children","commentId","child"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AACA;;AAPA;AACA;AACA;AAOA;AACA,MAAMA,qBAAqB,GAAG,GAA9B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACO,MAAMC,mBAAmB,GAAG,QAAkB;AAAA,MAAhB;AAAEC,IAAAA;AAAF,GAAgB;AACpD;AACA,QAAMC,SAAS,GAAG;AACjBC,IAAAA,MAAM,EAAE,SADS;AAEjBC,IAAAA,KAAK,EAAE,KAFU;AAGjBC,IAAAA,OAAO,EAAE,OAHQ;AAIjBC,IAAAA,MAAM,EAAE,CAJS;AAKjBC,IAAAA,MAAM,EAAE;AALS,GAAlB,CAFoD,CAUpD;;AACA,QAAM;AACLC,IAAAA,YADK;AAELC,IAAAA,eAFK;AAGLC,IAAAA,mBAAmB,EAAEC;AAHhB,MAIF,qBAAaC,MAAF,IAAc;AAC5B,UAAM;AAAEC,MAAAA;AAAF,QAAkBD,MAAM,CAAEE,kBAAF,CAA9B;AACA,UAAM;AAAEC,MAAAA;AAAF,QAAuCF,WAAW,EAAxD;AACA,WAAOE,gCAAP;AACA,GAJG,CAJJ,CAXoD,CAqBpD;AACA;AACA;AACA;;AACA,QAAMC,OAAO,GAAGR,YAAY,GACzBS,IAAI,CAACC,GAAL,CAAUT,eAAV,EAA2BV,qBAA3B,CADyB,GAEzBA,qBAFH,CAzBoD,CA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IC,IATJ,CASYC,GAAF,IAAW;AACpB,YAAMC,KAAK,GAAGC,QAAQ,CAAEF,GAAG,CAACG,OAAJ,CAAYC,GAAZ,CAAiB,iBAAjB,CAAF,CAAtB;AACAX,MAAAA,eAAe,CAAE,EAChB,GAAGD,YADa;AAEhB,SAAEE,GAAF,GAASO,KAAK,IAAI,CAAT,GAAa,CAAb,GAAiBA,KAFV,CAEiB;;AAFjB,OAAF,CAAf;AAIA,KAfD;AAgBA,GAvBD,EAuBG,CAAErB,WAAF,EAAeV,MAAf,EAAuBe,OAAvB,EAAgCQ,eAAhC,CAvBH,EAN8E,CA+B9E;;AACA,SAAOb,WAAW,KAAK,QAAhB,GAA2BQ,IAA3B,GAAkC,CAAzC;AACA,CAjCD;AAmCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAMiB,cAAc,GAAKC,gBAAF,IAAwB;AACrD,QAAMC,WAAW,GAAG,sBACnB,MACCD,gBADD,aACCA,gBADD,uBACCA,gBAAgB,CAAEE,GAAlB,CAAuB,SAAyB;AAAA,QAAvB;AAAEC,MAAAA,EAAF;AAAMC,MAAAA;AAAN,KAAuB;AAC/C,UAAM,CAAEC,QAAF,IAAe,CAAAD,SAAS,SAAT,IAAAA,SAAS,WAAT,YAAAA,SAAS,CAAEC,QAAX,KAAuB,CAAE,EAAF,CAA5C;AACA,WAAO;AACNC,MAAAA,SAAS,EAAEH,EADL;AAENE,MAAAA,QAAQ,EAAEA,QAAQ,CAACH,GAAT,CAAgBK,KAAF,KAAe;AACtCD,QAAAA,SAAS,EAAEC,KAAK,CAACJ;AADqB,OAAf,CAAd;AAFJ,KAAP;AAMA,GARD,CAFkB,EAWnB,CAAEH,gBAAF,CAXmB,CAApB;AAcA,SAAOC,WAAP;AACA,CAhBM","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useEffect, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { addQueryArgs } from '@wordpress/url';\nimport apiFetch from '@wordpress/api-fetch';\n\n// This is limited by WP REST API\nconst MAX_COMMENTS_PER_PAGE = 100;\n\n/**\n * Return an object with the query args needed to fetch the default page of\n * comments.\n *\n * @param {Object} props Hook props.\n * @param {number} props.postId ID of the post that contains the comments.\n * discussion settings.\n *\n * @return {Object} Query args to retrieve the comments.\n */\nexport const useCommentQueryArgs = ( { postId } ) => {\n\t// Initialize the query args that are not going to change.\n\tconst queryArgs = {\n\t\tstatus: 'approve',\n\t\torder: 'asc',\n\t\tcontext: 'embed',\n\t\tparent: 0,\n\t\t_embed: 'children',\n\t};\n\n\t// Get the Discussion settings that may be needed to query the comments.\n\tconst {\n\t\tpageComments,\n\t\tcommentsPerPage,\n\t\tdefaultCommentsPage: defaultPage,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { __experimentalDiscussionSettings } = getSettings();\n\t\treturn __experimentalDiscussionSettings;\n\t} );\n\n\t// WP REST API doesn't allow fetching more than max items limit set per single page of data.\n\t// As for the editor performance is more important than completeness of data and fetching only the\n\t// max allowed for single page should be enough for the purpose of design and laying out the page.\n\t// Fetching over the limit would return an error here but would work with backend query.\n\tconst perPage = pageComments\n\t\t? Math.min( commentsPerPage, MAX_COMMENTS_PER_PAGE )\n\t\t: MAX_COMMENTS_PER_PAGE;\n\n\t// Get the number of the default page.\n\tconst page = useDefaultPageIndex( {\n\t\tdefaultPage,\n\t\tpostId,\n\t\tperPage,\n\t\tqueryArgs,\n\t} );\n\n\t// Merge, memoize and return all query arguments, unless the default page's\n\t// number is not known yet.\n\treturn useMemo( () => {\n\t\treturn page\n\t\t\t? {\n\t\t\t\t\t...queryArgs,\n\t\t\t\t\tpost: postId,\n\t\t\t\t\tper_page: perPage,\n\t\t\t\t\tpage,\n\t\t\t }\n\t\t\t: null;\n\t}, [ postId, perPage, page ] );\n};\n\n/**\n * Return the index of the default page, depending on whether `defaultPage` is\n * `newest` or `oldest`. In the first case, the only way to know the page's\n * index is by using the `X-WP-TotalPages` header, which forces to make an\n * additional request.\n *\n * @param {Object} props Hook props.\n * @param {string} props.defaultPage Page shown by default (newest/oldest).\n * @param {number} props.postId ID of the post that contains the comments.\n * @param {number} props.perPage The number of comments included per page.\n * @param {Object} props.queryArgs Other query args.\n *\n * @return {number} Index of the default comments page.\n */\nconst useDefaultPageIndex = ( { defaultPage, postId, perPage, queryArgs } ) => {\n\t// Store the default page indices.\n\tconst [ defaultPages, setDefaultPages ] = useState( {} );\n\tconst key = `${ postId }_${ perPage }`;\n\tconst page = defaultPages[ key ] || 0;\n\n\tuseEffect( () => {\n\t\t// Do nothing if the page is already known or not the newest page.\n\t\tif ( page || defaultPage !== 'newest' ) {\n\t\t\treturn;\n\t\t}\n\t\t// We need to fetch comments to know the index. Use HEAD and limit\n\t\t// fields just to ID, to make this call as light as possible.\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\t...queryArgs,\n\t\t\t\tpost: postId,\n\t\t\t\tper_page: perPage,\n\t\t\t\t_fields: 'id',\n\t\t\t} ),\n\t\t\tmethod: 'HEAD',\n\t\t\tparse: false,\n\t\t} ).then( ( res ) => {\n\t\t\tconst pages = parseInt( res.headers.get( 'X-WP-TotalPages' ) );\n\t\t\tsetDefaultPages( {\n\t\t\t\t...defaultPages,\n\t\t\t\t[ key ]: pages <= 1 ? 1 : pages, // If there are 0 pages, it means that there are no comments, but there is no 0th page.\n\t\t\t} );\n\t\t} );\n\t}, [ defaultPage, postId, perPage, setDefaultPages ] );\n\n\t// The oldest one is always the first one.\n\treturn defaultPage === 'newest' ? page : 1;\n};\n\n/**\n * Generate a tree structure of comment IDs from a list of comment entities. The\n * children of each comment are obtained from `_embedded`.\n *\n * @typedef {{ commentId: number, children: CommentNode }} CommentNode\n *\n * @param {Object[]} topLevelComments List of comment entities.\n * @return {{ commentTree: CommentNode[]}} Tree of comment IDs.\n */\nexport const useCommentTree = ( topLevelComments ) => {\n\tconst commentTree = useMemo(\n\t\t() =>\n\t\t\ttopLevelComments?.map( ( { id, _embedded } ) => {\n\t\t\t\tconst [ children ] = _embedded?.children || [ [] ];\n\t\t\t\treturn {\n\t\t\t\t\tcommentId: id,\n\t\t\t\t\tchildren: children.map( ( child ) => ( {\n\t\t\t\t\t\tcommentId: child.id,\n\t\t\t\t\t} ) ),\n\t\t\t\t};\n\t\t\t} ),\n\t\t[ topLevelComments ]\n\t);\n\n\treturn commentTree;\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comment-template/hooks.js"],"names":["MAX_COMMENTS_PER_PAGE","useCommentQueryArgs","postId","queryArgs","status","order","context","parent","_embed","pageComments","commentsPerPage","defaultCommentsPage","defaultPage","select","getSettings","blockEditorStore","__experimentalDiscussionSettings","perPage","Math","min","page","useDefaultPageIndex","post","per_page","defaultPages","setDefaultPages","key","path","_fields","method","parse","then","res","pages","parseInt","headers","get","useCommentTree","topLevelComments","commentTree","map","id","_embedded","children","commentId","child"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AACA;;AAPA;AACA;AACA;AAOA;AACA,MAAMA,qBAAqB,GAAG,GAA9B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACO,MAAMC,mBAAmB,GAAG,CAAE;AAAEC,EAAAA;AAAF,CAAF,KAAkB;AACpD;AACA,QAAMC,SAAS,GAAG;AACjBC,IAAAA,MAAM,EAAE,SADS;AAEjBC,IAAAA,KAAK,EAAE,KAFU;AAGjBC,IAAAA,OAAO,EAAE,OAHQ;AAIjBC,IAAAA,MAAM,EAAE,CAJS;AAKjBC,IAAAA,MAAM,EAAE;AALS,GAAlB,CAFoD,CAUpD;;AACA,QAAM;AACLC,IAAAA,YADK;AAELC,IAAAA,eAFK;AAGLC,IAAAA,mBAAmB,EAAEC;AAHhB,MAIF,qBAAaC,MAAF,IAAc;AAC5B,UAAM;AAAEC,MAAAA;AAAF,QAAkBD,MAAM,CAAEE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AXmB,CAApB;AAcA,SAAOC,WAAP;AACA,CAhBM","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useEffect, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { addQueryArgs } from '@wordpress/url';\nimport apiFetch from '@wordpress/api-fetch';\n\n// This is limited by WP REST API\nconst MAX_COMMENTS_PER_PAGE = 100;\n\n/**\n * Return an object with the query args needed to fetch the default page of\n * comments.\n *\n * @param {Object} props Hook props.\n * @param {number} props.postId ID of the post that contains the comments.\n * discussion settings.\n *\n * @return {Object} Query args to retrieve the comments.\n */\nexport const useCommentQueryArgs = ( { postId } ) => {\n\t// Initialize the query args that are not going to change.\n\tconst queryArgs = {\n\t\tstatus: 'approve',\n\t\torder: 'asc',\n\t\tcontext: 'embed',\n\t\tparent: 0,\n\t\t_embed: 'children',\n\t};\n\n\t// Get the Discussion settings that may be needed to query the comments.\n\tconst {\n\t\tpageComments,\n\t\tcommentsPerPage,\n\t\tdefaultCommentsPage: defaultPage,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { __experimentalDiscussionSettings } = getSettings();\n\t\treturn __experimentalDiscussionSettings;\n\t} );\n\n\t// WP REST API doesn't allow fetching more than max items limit set per single page of data.\n\t// As for the editor performance is more important than completeness of data and fetching only the\n\t// max allowed for single page should be enough for the purpose of design and laying out the page.\n\t// Fetching over the limit would return an error here but would work with backend query.\n\tconst perPage = pageComments\n\t\t? Math.min( commentsPerPage, MAX_COMMENTS_PER_PAGE )\n\t\t: MAX_COMMENTS_PER_PAGE;\n\n\t// Get the number of the default page.\n\tconst page = useDefaultPageIndex( {\n\t\tdefaultPage,\n\t\tpostId,\n\t\tperPage,\n\t\tqueryArgs,\n\t} );\n\n\t// Merge, memoize and return all query arguments, unless the default page's\n\t// number is not known yet.\n\treturn useMemo( () => {\n\t\treturn page\n\t\t\t? {\n\t\t\t\t\t...queryArgs,\n\t\t\t\t\tpost: postId,\n\t\t\t\t\tper_page: perPage,\n\t\t\t\t\tpage,\n\t\t\t }\n\t\t\t: null;\n\t}, [ postId, perPage, page ] );\n};\n\n/**\n * Return the index of the default page, depending on whether `defaultPage` is\n * `newest` or `oldest`. In the first case, the only way to know the page's\n * index is by using the `X-WP-TotalPages` header, which forces to make an\n * additional request.\n *\n * @param {Object} props Hook props.\n * @param {string} props.defaultPage Page shown by default (newest/oldest).\n * @param {number} props.postId ID of the post that contains the comments.\n * @param {number} props.perPage The number of comments included per page.\n * @param {Object} props.queryArgs Other query args.\n *\n * @return {number} Index of the default comments page.\n */\nconst useDefaultPageIndex = ( { defaultPage, postId, perPage, queryArgs } ) => {\n\t// Store the default page indices.\n\tconst [ defaultPages, setDefaultPages ] = useState( {} );\n\tconst key = `${ postId }_${ perPage }`;\n\tconst page = defaultPages[ key ] || 0;\n\n\tuseEffect( () => {\n\t\t// Do nothing if the page is already known or not the newest page.\n\t\tif ( page || defaultPage !== 'newest' ) {\n\t\t\treturn;\n\t\t}\n\t\t// We need to fetch comments to know the index. Use HEAD and limit\n\t\t// fields just to ID, to make this call as light as possible.\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\t...queryArgs,\n\t\t\t\tpost: postId,\n\t\t\t\tper_page: perPage,\n\t\t\t\t_fields: 'id',\n\t\t\t} ),\n\t\t\tmethod: 'HEAD',\n\t\t\tparse: false,\n\t\t} ).then( ( res ) => {\n\t\t\tconst pages = parseInt( res.headers.get( 'X-WP-TotalPages' ) );\n\t\t\tsetDefaultPages( {\n\t\t\t\t...defaultPages,\n\t\t\t\t[ key ]: pages <= 1 ? 1 : pages, // If there are 0 pages, it means that there are no comments, but there is no 0th page.\n\t\t\t} );\n\t\t} );\n\t}, [ defaultPage, postId, perPage, setDefaultPages ] );\n\n\t// The oldest one is always the first one.\n\treturn defaultPage === 'newest' ? page : 1;\n};\n\n/**\n * Generate a tree structure of comment IDs from a list of comment entities. The\n * children of each comment are obtained from `_embedded`.\n *\n * @typedef {{ commentId: number, children: CommentNode }} CommentNode\n *\n * @param {Object[]} topLevelComments List of comment entities.\n * @return {{ commentTree: CommentNode[]}} Tree of comment IDs.\n */\nexport const useCommentTree = ( topLevelComments ) => {\n\tconst commentTree = useMemo(\n\t\t() =>\n\t\t\ttopLevelComments?.map( ( { id, _embedded } ) => {\n\t\t\t\tconst [ children ] = _embedded?.children || [ [] ];\n\t\t\t\treturn {\n\t\t\t\t\tcommentId: id,\n\t\t\t\t\tchildren: children.map( ( child ) => ( {\n\t\t\t\t\t\tcommentId: child.id,\n\t\t\t\t\t} ) ),\n\t\t\t\t};\n\t\t\t} ),\n\t\t[ topLevelComments ]\n\t);\n\n\treturn commentTree;\n};\n"]}
@@ -24,7 +24,7 @@ var _save = _interopRequireDefault(require("./save"));
24
24
  */
25
25
  const metadata = {
26
26
  $schema: "https://schemas.wp.org/trunk/block.json",
27
- apiVersion: 2,
27
+ apiVersion: 3,
28
28
  name: "core/comment-template",
29
29
  title: "Comment Template",
30
30
  category: "design",
@@ -48,12 +48,10 @@ const convertToTree = data => {
48
48
 
49
49
  data.forEach(item => {
50
50
  if (item.parent) {
51
- var _table$item$parent;
52
-
53
51
  // If the comment has a "parent", then find that parent in the table that
54
52
  // we have created above and push the current comment to the array of its
55
53
  // children.
56
- (_table$item$parent = table[item.parent]) === null || _table$item$parent === void 0 ? void 0 : _table$item$parent.children.push(table[item.id]);
54
+ table[item.parent]?.children.push(table[item.id]);
57
55
  } else {
58
56
  // Otherwise, if the comment has no parent (also works if parent is 0)
59
57
  // that means that it's a top-level comment so we can find it in the table
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-template/util.js"],"names":["convertToTree","data","table","forEach","item","id","commentId","children","tree","parent","push"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,aAAa,GAAKC,IAAF,IAAY;AACxC,QAAMC,KAAK,GAAG,EAAd;AAEA,MAAK,CAAED,IAAP,EAAc,OAAO,EAAP,CAH0B,CAKxC;;AACAA,EAAAA,IAAI,CAACE,OAAL,CAAgBC,IAAF,IAAY;AACzBF,IAAAA,KAAK,CAAEE,IAAI,CAACC,EAAP,CAAL,GAAmB;AAAEC,MAAAA,SAAS,EAAEF,IAAI,CAACC,EAAlB;AAAsBE,MAAAA,QAAQ,EAAE;AAAhC,KAAnB;AACA,GAFD;AAIA,QAAMC,IAAI,GAAG,EAAb,CAVwC,CAYxC;;AACAP,EAAAA,IAAI,CAACE,OAAL,CAAgBC,IAAF,IAAY;AACzB,QAAKA,IAAI,CAACK,MAAV,EAAmB;AAAA;;AAClB;AACA;AACA;AACA,4BAAAP,KAAK,CAAEE,IAAI,CAACK,MAAP,CAAL,0EAAsBF,QAAtB,CAA+BG,IAA/B,CAAqCR,KAAK,CAAEE,IAAI,CAACC,EAAP,CAA1C;AACA,KALD,MAKO;AACN;AACA;AACA;AACAG,MAAAA,IAAI,CAACE,IAAL,CAAWR,KAAK,CAAEE,IAAI,CAACC,EAAP,CAAhB;AACA;AACD,GAZD;AAaA,SAAOG,IAAP;AACA,CA3BM","sourcesContent":["/**\n *\n * This function converts a flat list of comment objects with a `parent` property\n * to a nested list of comment objects with a `children` property. The `children`\n * property is itself a list of comment objects.\n *\n * @example\n * ```\n * const comments = [\n * \t{ id: 1, parent: 0 },\n * \t{ id: 2, parent: 1 },\n * \t{ id: 3, parent: 2 },\n * \t{ id: 4, parent: 1 },\n * ];\n * expect( convertToTree( comments ) ).toEqual( [\n * \t{\n * \t\tcommentId: 1,\n * \t\tchildren: [\n * \t\t\t{ commentId: 2, children: [ { commentId: 3, children: [] } ] },\n * \t\t\t{ commentId: 4, children: [] },\n * \t\t],\n * \t},\n * ] );\n * ```\n * @typedef {{id: number, parent: number}} Comment\n * @param {Comment[]} data - List of comment objects.\n *\n * @return {Object[]} Nested list of comment objects with a `children` property.\n */\nexport const convertToTree = ( data ) => {\n\tconst table = {};\n\n\tif ( ! data ) return [];\n\n\t// First create a hash table of { [id]: { ...comment, children: [] }}\n\tdata.forEach( ( item ) => {\n\t\ttable[ item.id ] = { commentId: item.id, children: [] };\n\t} );\n\n\tconst tree = [];\n\n\t// Iterate over the original comments again\n\tdata.forEach( ( item ) => {\n\t\tif ( item.parent ) {\n\t\t\t// If the comment has a \"parent\", then find that parent in the table that\n\t\t\t// we have created above and push the current comment to the array of its\n\t\t\t// children.\n\t\t\ttable[ item.parent ]?.children.push( table[ item.id ] );\n\t\t} else {\n\t\t\t// Otherwise, if the comment has no parent (also works if parent is 0)\n\t\t\t// that means that it's a top-level comment so we can find it in the table\n\t\t\t// and push it to the final tree.\n\t\t\ttree.push( table[ item.id ] );\n\t\t}\n\t} );\n\treturn tree;\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comment-template/util.js"],"names":["convertToTree","data","table","forEach","item","id","commentId","children","tree","parent","push"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,aAAa,GAAKC,IAAF,IAAY;AACxC,QAAMC,KAAK,GAAG,EAAd;AAEA,MAAK,CAAED,IAAP,EAAc,OAAO,EAAP,CAH0B,CAKxC;;AACAA,EAAAA,IAAI,CAACE,OAAL,CAAgBC,IAAF,IAAY;AACzBF,IAAAA,KAAK,CAAEE,IAAI,CAACC,EAAP,CAAL,GAAmB;AAAEC,MAAAA,SAAS,EAAEF,IAAI,CAACC,EAAlB;AAAsBE,MAAAA,QAAQ,EAAE;AAAhC,KAAnB;AACA,GAFD;AAIA,QAAMC,IAAI,GAAG,EAAb,CAVwC,CAYxC;;AACAP,EAAAA,IAAI,CAACE,OAAL,CAAgBC,IAAF,IAAY;AACzB,QAAKA,IAAI,CAACK,MAAV,EAAmB;AAClB;AACA;AACA;AACAP,MAAAA,KAAK,CAAEE,IAAI,CAACK,MAAP,CAAL,EAAsBF,QAAtB,CAA+BG,IAA/B,CAAqCR,KAAK,CAAEE,IAAI,CAACC,EAAP,CAA1C;AACA,KALD,MAKO;AACN;AACA;AACA;AACAG,MAAAA,IAAI,CAACE,IAAL,CAAWR,KAAK,CAAEE,IAAI,CAACC,EAAP,CAAhB;AACA;AACD,GAZD;AAaA,SAAOG,IAAP;AACA,CA3BM","sourcesContent":["/**\n *\n * This function converts a flat list of comment objects with a `parent` property\n * to a nested list of comment objects with a `children` property. The `children`\n * property is itself a list of comment objects.\n *\n * @example\n * ```\n * const comments = [\n * \t{ id: 1, parent: 0 },\n * \t{ id: 2, parent: 1 },\n * \t{ id: 3, parent: 2 },\n * \t{ id: 4, parent: 1 },\n * ];\n * expect( convertToTree( comments ) ).toEqual( [\n * \t{\n * \t\tcommentId: 1,\n * \t\tchildren: [\n * \t\t\t{ commentId: 2, children: [ { commentId: 3, children: [] } ] },\n * \t\t\t{ commentId: 4, children: [] },\n * \t\t],\n * \t},\n * ] );\n * ```\n * @typedef {{id: number, parent: number}} Comment\n * @param {Comment[]} data - List of comment objects.\n *\n * @return {Object[]} Nested list of comment objects with a `children` property.\n */\nexport const convertToTree = ( data ) => {\n\tconst table = {};\n\n\tif ( ! data ) return [];\n\n\t// First create a hash table of { [id]: { ...comment, children: [] }}\n\tdata.forEach( ( item ) => {\n\t\ttable[ item.id ] = { commentId: item.id, children: [] };\n\t} );\n\n\tconst tree = [];\n\n\t// Iterate over the original comments again\n\tdata.forEach( ( item ) => {\n\t\tif ( item.parent ) {\n\t\t\t// If the comment has a \"parent\", then find that parent in the table that\n\t\t\t// we have created above and push the current comment to the array of its\n\t\t\t// children.\n\t\t\ttable[ item.parent ]?.children.push( table[ item.id ] );\n\t\t} else {\n\t\t\t// Otherwise, if the comment has no parent (also works if parent is 0)\n\t\t\t// that means that it's a top-level comment so we can find it in the table\n\t\t\t// and push it to the final tree.\n\t\t\ttree.push( table[ item.id ] );\n\t\t}\n\t} );\n\treturn tree;\n};\n"]}
@@ -21,7 +21,7 @@ const v1 = {
21
21
  default: 'div'
22
22
  }
23
23
  },
24
- apiVersion: 2,
24
+ apiVersion: 3,
25
25
  supports: {
26
26
  align: ['wide', 'full'],
27
27
  html: false,
@@ -36,23 +36,21 @@ const v1 = {
36
36
  }
37
37
  },
38
38
 
39
- save(_ref) {
40
- let {
41
- attributes: {
42
- tagName: Tag
43
- }
44
- } = _ref;
45
-
39
+ save({
40
+ attributes: {
41
+ tagName: Tag
42
+ }
43
+ }) {
46
44
  const blockProps = _blockEditor.useBlockProps.save();
47
45
 
48
46
  const {
49
47
  className
50
48
  } = blockProps;
51
- const classes = (className === null || className === void 0 ? void 0 : className.split(' ')) || []; // The ID of the previous version of the block
49
+ const classes = className?.split(' ') || []; // The ID of the previous version of the block
52
50
  // didn't have the `wp-block-comments` class,
53
51
  // so we need to remove it here in order to mimic it.
54
52
 
55
- const newClasses = classes === null || classes === void 0 ? void 0 : classes.filter(cls => cls !== 'wp-block-comments');
53
+ const newClasses = classes?.filter(cls => cls !== 'wp-block-comments');
56
54
  const newBlockProps = { ...blockProps,
57
55
  className: newClasses.join(' ')
58
56
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments/deprecated.js"],"names":["v1","attributes","tagName","type","default","apiVersion","supports","align","html","color","gradients","link","__experimentalDefaultControls","background","text","save","Tag","blockProps","useBlockProps","className","classes","split","newClasses","filter","cls","newBlockProps","join"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;AAGA;AACA;AACA,MAAMA,EAAE,GAAG;AACVC,EAAAA,UAAU,EAAE;AACXC,IAAAA,OAAO,EAAE;AACRC,MAAAA,IAAI,EAAE,QADE;AAERC,MAAAA,OAAO,EAAE;AAFD;AADE,GADF;AAOVC,EAAAA,UAAU,EAAE,CAPF;AAQVC,EAAAA,QAAQ,EAAE;AACTC,IAAAA,KAAK,EAAE,CAAE,MAAF,EAAU,MAAV,CADE;AAETC,IAAAA,IAAI,EAAE,KAFG;AAGTC,IAAAA,KAAK,EAAE;AACNC,MAAAA,SAAS,EAAE,IADL;AAENC,MAAAA,IAAI,EAAE,IAFA;AAGNC,MAAAA,6BAA6B,EAAE;AAC9BC,QAAAA,UAAU,EAAE,IADkB;AAE9BC,QAAAA,IAAI,EAAE,IAFwB;AAG9BH,QAAAA,IAAI,EAAE;AAHwB;AAHzB;AAHE,GARA;;AAqBVI,EAAAA,IAAI,OAAqC;AAAA,QAAnC;AAAEd,MAAAA,UAAU,EAAE;AAAEC,QAAAA,OAAO,EAAEc;AAAX;AAAd,KAAmC;;AACxC,UAAMC,UAAU,GAAGC,2BAAcH,IAAd,EAAnB;;AACA,UAAM;AAAEI,MAAAA;AAAF,QAAgBF,UAAtB;AACA,UAAMG,OAAO,GAAG,CAAAD,SAAS,SAAT,IAAAA,SAAS,WAAT,YAAAA,SAAS,CAAEE,KAAX,CAAkB,GAAlB,MAA2B,EAA3C,CAHwC,CAKxC;AACA;AACA;;AACA,UAAMC,UAAU,GAAGF,OAAH,aAAGA,OAAH,uBAAGA,OAAO,CAAEG,MAAT,CAChBC,GAAF,IAAWA,GAAG,KAAK,mBADD,CAAnB;AAGA,UAAMC,aAAa,GAAG,EACrB,GAAGR,UADkB;AAErBE,MAAAA,SAAS,EAAEG,UAAU,CAACI,IAAX,CAAiB,GAAjB;AAFU,KAAtB;AAKA,WACC,4BAAC,GAAD,EAAUD,aAAV,EACC,4BAAC,wBAAD,CAAa,OAAb,OADD,CADD;AAKA;;AA1CS,CAAX;eA6Ce,CAAEzB,EAAF,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { InnerBlocks, useBlockProps } from '@wordpress/block-editor';\n\n// v1: Deprecate the initial version of the block which was called \"Comments\n// Query Loop\" instead of \"Comments\".\nconst v1 = {\n\tattributes: {\n\t\ttagName: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'div',\n\t\t},\n\t},\n\tapiVersion: 2,\n\tsupports: {\n\t\talign: [ 'wide', 'full' ],\n\t\thtml: false,\n\t\tcolor: {\n\t\t\tgradients: true,\n\t\t\tlink: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tbackground: true,\n\t\t\t\ttext: true,\n\t\t\t\tlink: true,\n\t\t\t},\n\t\t},\n\t},\n\tsave( { attributes: { tagName: Tag } } ) {\n\t\tconst blockProps = useBlockProps.save();\n\t\tconst { className } = blockProps;\n\t\tconst classes = className?.split( ' ' ) || [];\n\n\t\t// The ID of the previous version of the block\n\t\t// didn't have the `wp-block-comments` class,\n\t\t// so we need to remove it here in order to mimic it.\n\t\tconst newClasses = classes?.filter(\n\t\t\t( cls ) => cls !== 'wp-block-comments'\n\t\t);\n\t\tconst newBlockProps = {\n\t\t\t...blockProps,\n\t\t\tclassName: newClasses.join( ' ' ),\n\t\t};\n\n\t\treturn (\n\t\t\t<Tag { ...newBlockProps }>\n\t\t\t\t<InnerBlocks.Content />\n\t\t\t</Tag>\n\t\t);\n\t},\n};\n\nexport default [ v1 ];\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments/deprecated.js"],"names":["v1","attributes","tagName","type","default","apiVersion","supports","align","html","color","gradients","link","__experimentalDefaultControls","background","text","save","Tag","blockProps","useBlockProps","className","classes","split","newClasses","filter","cls","newBlockProps","join"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;AAGA;AACA;AACA,MAAMA,EAAE,GAAG;AACVC,EAAAA,UAAU,EAAE;AACXC,IAAAA,OAAO,EAAE;AACRC,MAAAA,IAAI,EAAE,QADE;AAERC,MAAAA,OAAO,EAAE;AAFD;AADE,GADF;AAOVC,EAAAA,UAAU,EAAE,CAPF;AAQVC,EAAAA,QAAQ,EAAE;AACTC,IAAAA,KAAK,EAAE,CAAE,MAAF,EAAU,MAAV,CADE;AAETC,IAAAA,IAAI,EAAE,KAFG;AAGTC,IAAAA,KAAK,EAAE;AACNC,MAAAA,SAAS,EAAE,IADL;AAENC,MAAAA,IAAI,EAAE,IAFA;AAGNC,MAAAA,6BAA6B,EAAE;AAC9BC,QAAAA,UAAU,EAAE,IADkB;AAE9BC,QAAAA,IAAI,EAAE,IAFwB;AAG9BH,QAAAA,IAAI,EAAE;AAHwB;AAHzB;AAHE,GARA;;AAqBVI,EAAAA,IAAI,CAAE;AAAEd,IAAAA,UAAU,EAAE;AAAEC,MAAAA,OAAO,EAAEc;AAAX;AAAd,GAAF,EAAqC;AACxC,UAAMC,UAAU,GAAGC,2BAAcH,IAAd,EAAnB;;AACA,UAAM;AAAEI,MAAAA;AAAF,QAAgBF,UAAtB;AACA,UAAMG,OAAO,GAAGD,SAAS,EAAEE,KAAX,CAAkB,GAAlB,KAA2B,EAA3C,CAHwC,CAKxC;AACA;AACA;;AACA,UAAMC,UAAU,GAAGF,OAAO,EAAEG,MAAT,CAChBC,GAAF,IAAWA,GAAG,KAAK,mBADD,CAAnB;AAGA,UAAMC,aAAa,GAAG,EACrB,GAAGR,UADkB;AAErBE,MAAAA,SAAS,EAAEG,UAAU,CAACI,IAAX,CAAiB,GAAjB;AAFU,KAAtB;AAKA,WACC,4BAAC,GAAD,EAAUD,aAAV,EACC,4BAAC,wBAAD,CAAa,OAAb,OADD,CADD;AAKA;;AA1CS,CAAX;eA6Ce,CAAEzB,EAAF,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { InnerBlocks, useBlockProps } from '@wordpress/block-editor';\n\n// v1: Deprecate the initial version of the block which was called \"Comments\n// Query Loop\" instead of \"Comments\".\nconst v1 = {\n\tattributes: {\n\t\ttagName: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'div',\n\t\t},\n\t},\n\tapiVersion: 3,\n\tsupports: {\n\t\talign: [ 'wide', 'full' ],\n\t\thtml: false,\n\t\tcolor: {\n\t\t\tgradients: true,\n\t\t\tlink: true,\n\t\t\t__experimentalDefaultControls: {\n\t\t\t\tbackground: true,\n\t\t\t\ttext: true,\n\t\t\t\tlink: true,\n\t\t\t},\n\t\t},\n\t},\n\tsave( { attributes: { tagName: Tag } } ) {\n\t\tconst blockProps = useBlockProps.save();\n\t\tconst { className } = blockProps;\n\t\tconst classes = className?.split( ' ' ) || [];\n\n\t\t// The ID of the previous version of the block\n\t\t// didn't have the `wp-block-comments` class,\n\t\t// so we need to remove it here in order to mimic it.\n\t\tconst newClasses = classes?.filter(\n\t\t\t( cls ) => cls !== 'wp-block-comments'\n\t\t);\n\t\tconst newBlockProps = {\n\t\t\t...blockProps,\n\t\t\tclassName: newClasses.join( ' ' ),\n\t\t};\n\n\t\treturn (\n\t\t\t<Tag { ...newBlockProps }>\n\t\t\t\t<InnerBlocks.Content />\n\t\t\t</Tag>\n\t\t);\n\t},\n};\n\nexport default [ v1 ];\n"]}
@@ -16,13 +16,12 @@ var _blockEditor = require("@wordpress/block-editor");
16
16
  /**
17
17
  * WordPress dependencies
18
18
  */
19
- function CommentsInspectorControls(_ref) {
20
- let {
21
- attributes: {
22
- tagName
23
- },
24
- setAttributes
25
- } = _ref;
19
+ function CommentsInspectorControls({
20
+ attributes: {
21
+ tagName
22
+ },
23
+ setAttributes
24
+ }) {
26
25
  const htmlElementMessages = {
27
26
  section: (0, _i18n.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element."),
28
27
  aside: (0, _i18n.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.")
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments/edit/comments-inspector-controls.js"],"names":["CommentsInspectorControls","attributes","tagName","setAttributes","htmlElementMessages","section","aside","label","value"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AALA;AACA;AACA;AAKe,SAASA,yBAAT,OAGX;AAAA,MAH+C;AAClDC,IAAAA,UAAU,EAAE;AAAEC,MAAAA;AAAF,KADsC;AAElDC,IAAAA;AAFkD,GAG/C;AACH,QAAMC,mBAAmB,GAAG;AAC3BC,IAAAA,OAAO,EAAE,cACR,kIADQ,CADkB;AAI3BC,IAAAA,KAAK,EAAE,cACN,uIADM;AAJoB,GAA5B;AAQA,SACC,4BAAC,8BAAD,QACC,4BAAC,8BAAD;AAAmB,IAAA,KAAK,EAAC;AAAzB,KACC,4BAAC,yBAAD;AACC,IAAA,uBAAuB,MADxB;AAEC,IAAA,KAAK,EAAG,cAAI,cAAJ,CAFT;AAGC,IAAA,OAAO,EAAG,CACT;AAAEC,MAAAA,KAAK,EAAE,cAAI,iBAAJ,CAAT;AAAkCC,MAAAA,KAAK,EAAE;AAAzC,KADS,EAET;AAAED,MAAAA,KAAK,EAAE,WAAT;AAAsBC,MAAAA,KAAK,EAAE;AAA7B,KAFS,EAGT;AAAED,MAAAA,KAAK,EAAE,SAAT;AAAoBC,MAAAA,KAAK,EAAE;AAA3B,KAHS,CAHX;AAQC,IAAA,KAAK,EAAGN,OART;AASC,IAAA,QAAQ,EAAKM,KAAF,IACVL,aAAa,CAAE;AAAED,MAAAA,OAAO,EAAEM;AAAX,KAAF,CAVf;AAYC,IAAA,IAAI,EAAGJ,mBAAmB,CAAEF,OAAF;AAZ3B,IADD,CADD,CADD;AAoBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { SelectControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { InspectorControls } from '@wordpress/block-editor';\n\nexport default function CommentsInspectorControls( {\n\tattributes: { tagName },\n\tsetAttributes,\n} ) {\n\tconst htmlElementMessages = {\n\t\tsection: __(\n\t\t\t\"The <section> element should represent a standalone portion of the document that can't be better represented by another element.\"\n\t\t),\n\t\taside: __(\n\t\t\t\"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.\"\n\t\t),\n\t};\n\treturn (\n\t\t<InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'HTML element' ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<div>)' ), value: 'div' },\n\t\t\t\t\t\t{ label: '<section>', value: 'section' },\n\t\t\t\t\t\t{ label: '<aside>', value: 'aside' },\n\t\t\t\t\t] }\n\t\t\t\t\tvalue={ tagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ htmlElementMessages[ tagName ] }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t</InspectorControls>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments/edit/comments-inspector-controls.js"],"names":["CommentsInspectorControls","attributes","tagName","setAttributes","htmlElementMessages","section","aside","label","value"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AALA;AACA;AACA;AAKe,SAASA,yBAAT,CAAoC;AAClDC,EAAAA,UAAU,EAAE;AAAEC,IAAAA;AAAF,GADsC;AAElDC,EAAAA;AAFkD,CAApC,EAGX;AACH,QAAMC,mBAAmB,GAAG;AAC3BC,IAAAA,OAAO,EAAE,cACR,kIADQ,CADkB;AAI3BC,IAAAA,KAAK,EAAE,cACN,uIADM;AAJoB,GAA5B;AAQA,SACC,4BAAC,8BAAD,QACC,4BAAC,8BAAD;AAAmB,IAAA,KAAK,EAAC;AAAzB,KACC,4BAAC,yBAAD;AACC,IAAA,uBAAuB,MADxB;AAEC,IAAA,KAAK,EAAG,cAAI,cAAJ,CAFT;AAGC,IAAA,OAAO,EAAG,CACT;AAAEC,MAAAA,KAAK,EAAE,cAAI,iBAAJ,CAAT;AAAkCC,MAAAA,KAAK,EAAE;AAAzC,KADS,EAET;AAAED,MAAAA,KAAK,EAAE,WAAT;AAAsBC,MAAAA,KAAK,EAAE;AAA7B,KAFS,EAGT;AAAED,MAAAA,KAAK,EAAE,SAAT;AAAoBC,MAAAA,KAAK,EAAE;AAA3B,KAHS,CAHX;AAQC,IAAA,KAAK,EAAGN,OART;AASC,IAAA,QAAQ,EAAKM,KAAF,IACVL,aAAa,CAAE;AAAED,MAAAA,OAAO,EAAEM;AAAX,KAAF,CAVf;AAYC,IAAA,IAAI,EAAGJ,mBAAmB,CAAEF,OAAF;AAZ3B,IADD,CADD,CADD;AAoBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { SelectControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { InspectorControls } from '@wordpress/block-editor';\n\nexport default function CommentsInspectorControls( {\n\tattributes: { tagName },\n\tsetAttributes,\n} ) {\n\tconst htmlElementMessages = {\n\t\tsection: __(\n\t\t\t\"The <section> element should represent a standalone portion of the document that can't be better represented by another element.\"\n\t\t),\n\t\taside: __(\n\t\t\t\"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.\"\n\t\t),\n\t};\n\treturn (\n\t\t<InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'HTML element' ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<div>)' ), value: 'div' },\n\t\t\t\t\t\t{ label: '<section>', value: 'section' },\n\t\t\t\t\t\t{ label: '<aside>', value: 'aside' },\n\t\t\t\t\t] }\n\t\t\t\t\tvalue={ tagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ htmlElementMessages[ tagName ] }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t</InspectorControls>\n\t);\n}\n"]}
@@ -30,15 +30,14 @@ var _placeholder = _interopRequireDefault(require("./placeholder"));
30
30
  /**
31
31
  * Internal dependencies
32
32
  */
33
- function CommentsLegacy(_ref) {
34
- let {
35
- attributes,
36
- setAttributes,
37
- context: {
38
- postType,
39
- postId
40
- }
41
- } = _ref;
33
+ function CommentsLegacy({
34
+ attributes,
35
+ setAttributes,
36
+ context: {
37
+ postType,
38
+ postId
39
+ }
40
+ }) {
42
41
  const {
43
42
  textAlign
44
43
  } = attributes;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments/edit/comments-legacy.js"],"names":["CommentsLegacy","attributes","setAttributes","context","postType","postId","textAlign","actions","legacy","blockProps","className","nextAlign"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AAMA;;AACA;;AAKA;;AApBA;AACA;AACA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;AAGe,SAASA,cAAT,OAIX;AAAA,MAJoC;AACvCC,IAAAA,UADuC;AAEvCC,IAAAA,aAFuC;AAGvCC,IAAAA,OAAO,EAAE;AAAEC,MAAAA,QAAF;AAAYC,MAAAA;AAAZ;AAH8B,GAIpC;AACH,QAAM;AAAEC,IAAAA;AAAF,MAAgBL,UAAtB;AAEA,QAAMM,OAAO,GAAG,CACf,4BAAC,kBAAD;AACC,IAAA,GAAG,EAAC,SADL;AAEC,IAAA,OAAO,EAAG,MAAM,KAAKL,aAAa,CAAE;AAAEM,MAAAA,MAAM,EAAE;AAAV,KAAF,CAFnC;AAGC,IAAA,OAAO,EAAC;AAHT,KAKG,cAAI,yBAAJ,CALH,CADe,CAAhB;AAUA,QAAMC,UAAU,GAAG,gCAAe;AACjCC,IAAAA,SAAS,EAAE,yBAAY;AACtB,OAAG,kBAAkBJ,SAAW,EAAhC,GAAqCA;AADf,KAAZ;AADsB,GAAf,CAAnB;AAMA,SACC,qDACC,4BAAC,0BAAD;AAAe,IAAA,KAAK,EAAC;AAArB,KACC,4BAAC,6BAAD;AACC,IAAA,KAAK,EAAGA,SADT;AAEC,IAAA,QAAQ,EAAKK,SAAF,IAAiB;AAC3BT,MAAAA,aAAa,CAAE;AAAEI,QAAAA,SAAS,EAAEK;AAAb,OAAF,CAAb;AACA;AAJF,IADD,CADD,EAUC,mCAAUF,UAAV,EACC,4BAAC,oBAAD;AAAS,IAAA,OAAO,EAAGF;AAAnB,KACG,cACD,6EACC,sFADD,GAEC,8DAFD,GAGC,wCAJA,CADH,CADD,EASC,4BAAC,oBAAD;AAAa,IAAA,MAAM,EAAGF,MAAtB;AAA+B,IAAA,QAAQ,EAAGD;AAA1C,IATD,CAVD,CADD;AAwBA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tWarning,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport Placeholder from './placeholder';\n\nexport default function CommentsLegacy( {\n\tattributes,\n\tsetAttributes,\n\tcontext: { postType, postId },\n} ) {\n\tconst { textAlign } = attributes;\n\n\tconst actions = [\n\t\t<Button\n\t\t\tkey=\"convert\"\n\t\t\tonClick={ () => void setAttributes( { legacy: false } ) }\n\t\t\tvariant=\"primary\"\n\t\t>\n\t\t\t{ __( 'Switch to editable mode' ) }\n\t\t</Button>,\n\t];\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classnames( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<Warning actions={ actions }>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Comments block: You’re currently using the legacy version of the block. ' +\n\t\t\t\t\t\t\t'The following is just a placeholder - the final styling will likely look different. ' +\n\t\t\t\t\t\t\t'For a better representation and more customization options, ' +\n\t\t\t\t\t\t\t'switch the block to its editable mode.'\n\t\t\t\t\t) }\n\t\t\t\t</Warning>\n\t\t\t\t<Placeholder postId={ postId } postType={ postType } />\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments/edit/comments-legacy.js"],"names":["CommentsLegacy","attributes","setAttributes","context","postType","postId","textAlign","actions","legacy","blockProps","className","nextAlign"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AAMA;;AACA;;AAKA;;AApBA;AACA;AACA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;AAGe,SAASA,cAAT,CAAyB;AACvCC,EAAAA,UADuC;AAEvCC,EAAAA,aAFuC;AAGvCC,EAAAA,OAAO,EAAE;AAAEC,IAAAA,QAAF;AAAYC,IAAAA;AAAZ;AAH8B,CAAzB,EAIX;AACH,QAAM;AAAEC,IAAAA;AAAF,MAAgBL,UAAtB;AAEA,QAAMM,OAAO,GAAG,CACf,4BAAC,kBAAD;AACC,IAAA,GAAG,EAAC,SADL;AAEC,IAAA,OAAO,EAAG,MAAM,KAAKL,aAAa,CAAE;AAAEM,MAAAA,MAAM,EAAE;AAAV,KAAF,CAFnC;AAGC,IAAA,OAAO,EAAC;AAHT,KAKG,cAAI,yBAAJ,CALH,CADe,CAAhB;AAUA,QAAMC,UAAU,GAAG,gCAAe;AACjCC,IAAAA,SAAS,EAAE,yBAAY;AACtB,OAAG,kBAAkBJ,SAAW,EAAhC,GAAqCA;AADf,KAAZ;AADsB,GAAf,CAAnB;AAMA,SACC,qDACC,4BAAC,0BAAD;AAAe,IAAA,KAAK,EAAC;AAArB,KACC,4BAAC,6BAAD;AACC,IAAA,KAAK,EAAGA,SADT;AAEC,IAAA,QAAQ,EAAKK,SAAF,IAAiB;AAC3BT,MAAAA,aAAa,CAAE;AAAEI,QAAAA,SAAS,EAAEK;AAAb,OAAF,CAAb;AACA;AAJF,IADD,CADD,EAUC,mCAAUF,UAAV,EACC,4BAAC,oBAAD;AAAS,IAAA,OAAO,EAAGF;AAAnB,KACG,cACD,6EACC,sFADD,GAEC,8DAFD,GAGC,wCAJA,CADH,CADD,EASC,4BAAC,oBAAD;AAAa,IAAA,MAAM,EAAGF,MAAtB;AAA+B,IAAA,QAAQ,EAAGD;AAA1C,IATD,CAVD,CADD;AAwBA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tWarning,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport Placeholder from './placeholder';\n\nexport default function CommentsLegacy( {\n\tattributes,\n\tsetAttributes,\n\tcontext: { postType, postId },\n} ) {\n\tconst { textAlign } = attributes;\n\n\tconst actions = [\n\t\t<Button\n\t\t\tkey=\"convert\"\n\t\t\tonClick={ () => void setAttributes( { legacy: false } ) }\n\t\t\tvariant=\"primary\"\n\t\t>\n\t\t\t{ __( 'Switch to editable mode' ) }\n\t\t</Button>,\n\t];\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classnames( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<Warning actions={ actions }>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Comments block: You’re currently using the legacy version of the block. ' +\n\t\t\t\t\t\t\t'The following is just a placeholder - the final styling will likely look different. ' +\n\t\t\t\t\t\t\t'For a better representation and more customization options, ' +\n\t\t\t\t\t\t\t'switch the block to its editable mode.'\n\t\t\t\t\t) }\n\t\t\t\t</Warning>\n\t\t\t\t<Placeholder postId={ postId } postType={ postType } />\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"]}
@@ -26,11 +26,10 @@ var _form = _interopRequireDefault(require("../../post-comments-form/form"));
26
26
  /**
27
27
  * Internal dependencies
28
28
  */
29
- function PostCommentsPlaceholder(_ref) {
30
- let {
31
- postType,
32
- postId
33
- } = _ref;
29
+ function PostCommentsPlaceholder({
30
+ postType,
31
+ postId
32
+ }) {
34
33
  let [postTitle] = (0, _coreData.useEntityProp)('postType', postType, 'title', postId);
35
34
  postTitle = postTitle || (0, _i18n.__)('Post Title');
36
35
  const {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments/edit/placeholder.js"],"names":["PostCommentsPlaceholder","postType","postId","postTitle","avatarURL","select","blockEditorStore","getSettings","__experimentalDiscussionSettings","a"],"mappings":";;;;;;;;;AAOA;;AAJA;;AACA;;AACA;;AACA;;AAMA;;AAZA;AACA;AACA;;AAOA;AACA;AACA;AAGe,SAASA,uBAAT,OAAyD;AAAA,MAAvB;AAAEC,IAAAA,QAAF;AAAYC,IAAAA;AAAZ,GAAuB;AACvE,MAAI,CAAEC,SAAF,IAAgB,6BAAe,UAAf,EAA2BF,QAA3B,EAAqC,OAArC,EAA8CC,MAA9C,CAApB;AACAC,EAAAA,SAAS,GAAGA,SAAS,IAAI,cAAI,YAAJ,CAAzB;AAEA,QAAM;AAAEC,IAAAA;AAAF,MAAgB,qBACnBC,MAAF,IACCA,MAAM,CAAEC,kBAAF,CAAN,CAA2BC,WAA3B,GACEC,gCAHkB,CAAtB;AAMA,SACC;AAAK,IAAA,SAAS,EAAC,uCAAf;AAAuD,IAAA,KAAK,EAAC;AAA7D,KACC;AAEE;AACA,qBAAS,cAAI,oBAAJ,CAAT,EAAqCL,SAArC,CAHF,CADD,EAQC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAG,IAAA,IAAI,EAAC;AAAR,cAAmB,cAAI,gBAA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AAI,EAAC;AAAR;AAHF,GAJC,CAPH,CADD,CApCD,EA0DC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AACC,IAAA,SAAS,EAAC,oBADX;AAEC,IAAA,IAAI,EAAC,MAFN;AAGC,kBAAa,cACZ,gCADY;AAHd,KAOG,cAAI,OAAJ,CAPH,CADD,CA1DD,CADD,CADD,CAjBD,EA4FC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAG,IAAA,IAAI,EAAC;AAAR,cAAmB,cAAI,gBAAJ,CAAnB,CADD,CADD,EAIC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAG,IAAA,IAAI,EAAC;AAAR,KAAiB,cAAI,gBAAJ,CAAjB,UADD,CAJD,CA5FD,EAqGC,4BAAC,aAAD;AAAc,IAAA,MAAM,EAAGP,MAAvB;AAAgC,IAAA,QAAQ,EAAGD;AAA3C,IArGD,CADD;AAyGA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { useEntityProp } from '@wordpress/core-data';\nimport { createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport CommentsForm from '../../post-comments-form/form';\n\nexport default function PostCommentsPlaceholder( { postType, postId } ) {\n\tlet [ postTitle ] = useEntityProp( 'postType', postType, 'title', postId );\n\tpostTitle = postTitle || __( 'Post Title' );\n\n\tconst { avatarURL } = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getSettings()\n\t\t\t\t.__experimentalDiscussionSettings\n\t);\n\n\treturn (\n\t\t<div className=\"wp-block-comments__legacy-placeholder\" inert=\"true\">\n\t\t\t<h3>\n\t\t\t\t{\n\t\t\t\t\t/* translators: %s: Post title. */\n\t\t\t\t\tsprintf( __( 'One response to %s' ), postTitle )\n\t\t\t\t}\n\t\t\t</h3>\n\n\t\t\t<div className=\"navigation\">\n\t\t\t\t<div className=\"alignleft\">\n\t\t\t\t\t<a href=\"#top\">« { __( 'Older Comments' ) }</a>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"alignright\">\n\t\t\t\t\t<a href=\"#top\">{ __( 'Newer Comments' ) } »</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<ol className=\"commentlist\">\n\t\t\t\t<li className=\"comment even thread-even depth-1\">\n\t\t\t\t\t<article className=\"comment-body\">\n\t\t\t\t\t\t<footer className=\"comment-meta\">\n\t\t\t\t\t\t\t<div className=\"comment-author vcard\">\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\talt={ __( 'Commenter Avatar' ) }\n\t\t\t\t\t\t\t\t\tsrc={ avatarURL }\n\t\t\t\t\t\t\t\t\tclassName=\"avatar avatar-32 photo\"\n\t\t\t\t\t\t\t\t\theight=\"32\"\n\t\t\t\t\t\t\t\t\twidth=\"32\"\n\t\t\t\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<b className=\"fn\">\n\t\t\t\t\t\t\t\t\t<a href=\"#top\" className=\"url\">\n\t\t\t\t\t\t\t\t\t\t{ __( 'A WordPress Commenter' ) }\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</b>{ ' ' }\n\t\t\t\t\t\t\t\t<span className=\"says\">{ __( 'says' ) }:</span>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"comment-metadata\">\n\t\t\t\t\t\t\t\t<a href=\"#top\">\n\t\t\t\t\t\t\t\t\t<time dateTime=\"2000-01-01T00:00:00+00:00\">\n\t\t\t\t\t\t\t\t\t\t{ __( 'January 1, 2000 at 00:00 am' ) }\n\t\t\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t\t\t</a>{ ' ' }\n\t\t\t\t\t\t\t\t<span className=\"edit-link\">\n\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\tclassName=\"comment-edit-link\"\n\t\t\t\t\t\t\t\t\t\thref=\"#top\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Edit' ) }\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</footer>\n\n\t\t\t\t\t\t<div className=\"comment-content\">\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t{ __( 'Hi, this is a comment.' ) }\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'Commenter avatars come from <a>Gravatar</a>.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"https://gravatar.com/\" />\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div className=\"reply\">\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\tclassName=\"comment-reply-link\"\n\t\t\t\t\t\t\t\thref=\"#top\"\n\t\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t\t'Reply to A WordPress Commenter'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reply' ) }\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</article>\n\t\t\t\t</li>\n\t\t\t</ol>\n\n\t\t\t<div className=\"navigation\">\n\t\t\t\t<div className=\"alignleft\">\n\t\t\t\t\t<a href=\"#top\">« { __( 'Older Comments' ) }</a>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"alignright\">\n\t\t\t\t\t<a href=\"#top\">{ __( 'Newer Comments' ) } »</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<CommentsForm postId={ postId } postType={ postType } />\n\t\t</div>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments/edit/placeholder.js"],"names":["PostCommentsPlaceholder","postType","postId","postTitle","avatarURL","select","blockEditorStore","getSettings","__experimentalDiscussionSettings","a"],"mappings":";;;;;;;;;AAOA;;AAJA;;AACA;;AACA;;AACA;;AAMA;;AAZA;AACA;AACA;;AAOA;AACA;AACA;AAGe,SAASA,uBAAT,CAAkC;AAAEC,EAAAA,QAAF;AAAYC,EAAAA;AAAZ,CAAlC,EAAyD;AACvE,MAAI,CAAEC,SAAF,IAAgB,6BAAe,UAAf,EAA2BF,QAA3B,EAAqC,OAArC,EAA8CC,MAA9C,CAApB;AACAC,EAAAA,SAAS,GAAGA,SAAS,IAAI,cAAI,YAAJ,CAAzB;AAEA,QAAM;AAAEC,IAAAA;AAAF,MAAgB,qBACnBC,MAAF,IACCA,MAAM,CAAEC,kBAAF,CAAN,CAA2BC,WAA3B,GACEC,gCAHkB,CAAtB;AAMA,SACC;AAAK,IAAA,SAAS,EAAC,uCAAf;AAAuD,IAAA,KAAK,EAAC;AAA7D,KACC;AAEE;AACA,qBAAS,cAAI,oBAAJ,CAAT,EAAqCL,SAArC,CAHF,CADD,EAQC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAG,IAAA,IAAI,EAAC;AAAR,cAAmB,cAAI,gBAAJ,CAAnB,CADD,CADD,E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,GAJC,CAPH,CADD,CApCD,EA0DC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AACC,IAAA,SAAS,EAAC,oBADX;AAEC,IAAA,IAAI,EAAC,MAFN;AAGC,kBAAa,cACZ,gCADY;AAHd,KAOG,cAAI,OAAJ,CAPH,CADD,CA1DD,CADD,CADD,CAjBD,EA4FC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAG,IAAA,IAAI,EAAC;AAAR,cAAmB,cAAI,gBAAJ,CAAnB,CADD,CADD,EAIC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC;AAAG,IAAA,IAAI,EAAC;AAAR,KAAiB,cAAI,gBAAJ,CAAjB,UADD,CAJD,CA5FD,EAqGC,4BAAC,aAAD;AAAc,IAAA,MAAM,EAAGP,MAAvB;AAAgC,IAAA,QAAQ,EAAGD;AAA3C,IArGD,CADD;AAyGA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { useEntityProp } from '@wordpress/core-data';\nimport { createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport CommentsForm from '../../post-comments-form/form';\n\nexport default function PostCommentsPlaceholder( { postType, postId } ) {\n\tlet [ postTitle ] = useEntityProp( 'postType', postType, 'title', postId );\n\tpostTitle = postTitle || __( 'Post Title' );\n\n\tconst { avatarURL } = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getSettings()\n\t\t\t\t.__experimentalDiscussionSettings\n\t);\n\n\treturn (\n\t\t<div className=\"wp-block-comments__legacy-placeholder\" inert=\"true\">\n\t\t\t<h3>\n\t\t\t\t{\n\t\t\t\t\t/* translators: %s: Post title. */\n\t\t\t\t\tsprintf( __( 'One response to %s' ), postTitle )\n\t\t\t\t}\n\t\t\t</h3>\n\n\t\t\t<div className=\"navigation\">\n\t\t\t\t<div className=\"alignleft\">\n\t\t\t\t\t<a href=\"#top\">« { __( 'Older Comments' ) }</a>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"alignright\">\n\t\t\t\t\t<a href=\"#top\">{ __( 'Newer Comments' ) } »</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<ol className=\"commentlist\">\n\t\t\t\t<li className=\"comment even thread-even depth-1\">\n\t\t\t\t\t<article className=\"comment-body\">\n\t\t\t\t\t\t<footer className=\"comment-meta\">\n\t\t\t\t\t\t\t<div className=\"comment-author vcard\">\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\talt={ __( 'Commenter Avatar' ) }\n\t\t\t\t\t\t\t\t\tsrc={ avatarURL }\n\t\t\t\t\t\t\t\t\tclassName=\"avatar avatar-32 photo\"\n\t\t\t\t\t\t\t\t\theight=\"32\"\n\t\t\t\t\t\t\t\t\twidth=\"32\"\n\t\t\t\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<b className=\"fn\">\n\t\t\t\t\t\t\t\t\t<a href=\"#top\" className=\"url\">\n\t\t\t\t\t\t\t\t\t\t{ __( 'A WordPress Commenter' ) }\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</b>{ ' ' }\n\t\t\t\t\t\t\t\t<span className=\"says\">{ __( 'says' ) }:</span>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"comment-metadata\">\n\t\t\t\t\t\t\t\t<a href=\"#top\">\n\t\t\t\t\t\t\t\t\t<time dateTime=\"2000-01-01T00:00:00+00:00\">\n\t\t\t\t\t\t\t\t\t\t{ __( 'January 1, 2000 at 00:00 am' ) }\n\t\t\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t\t\t</a>{ ' ' }\n\t\t\t\t\t\t\t\t<span className=\"edit-link\">\n\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\tclassName=\"comment-edit-link\"\n\t\t\t\t\t\t\t\t\t\thref=\"#top\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Edit' ) }\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</footer>\n\n\t\t\t\t\t\t<div className=\"comment-content\">\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t{ __( 'Hi, this is a comment.' ) }\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'Commenter avatars come from <a>Gravatar</a>.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"https://gravatar.com/\" />\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div className=\"reply\">\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\tclassName=\"comment-reply-link\"\n\t\t\t\t\t\t\t\thref=\"#top\"\n\t\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t\t'Reply to A WordPress Commenter'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reply' ) }\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</article>\n\t\t\t\t</li>\n\t\t\t</ol>\n\n\t\t\t<div className=\"navigation\">\n\t\t\t\t<div className=\"alignleft\">\n\t\t\t\t\t<a href=\"#top\">« { __( 'Older Comments' ) }</a>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"alignright\">\n\t\t\t\t\t<a href=\"#top\">{ __( 'Newer Comments' ) } »</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<CommentsForm postId={ postId } postType={ postType } />\n\t\t</div>\n\t);\n}\n"]}
@@ -26,7 +26,7 @@ var _save = _interopRequireDefault(require("./save"));
26
26
  */
27
27
  const metadata = {
28
28
  $schema: "https://schemas.wp.org/trunk/block.json",
29
- apiVersion: 2,
29
+ apiVersion: 3,
30
30
  name: "core/comments",
31
31
  title: "Comments",
32
32
  category: "theme",
@@ -12,14 +12,12 @@ var _blockEditor = require("@wordpress/block-editor");
12
12
  /**
13
13
  * WordPress dependencies
14
14
  */
15
- function save(_ref) {
16
- let {
17
- attributes: {
18
- tagName: Tag,
19
- legacy
20
- }
21
- } = _ref;
22
-
15
+ function save({
16
+ attributes: {
17
+ tagName: Tag,
18
+ legacy
19
+ }
20
+ }) {
23
21
  const blockProps = _blockEditor.useBlockProps.save();
24
22
 
25
23
  const innerBlocksProps = _blockEditor.useInnerBlocksProps.save(blockProps); // The legacy version is dynamic (i.e. PHP rendered) and doesn't allow inner
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments/save.js"],"names":["save","attributes","tagName","Tag","legacy","blockProps","useBlockProps","innerBlocksProps","useInnerBlocksProps"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;AAGe,SAASA,IAAT,OAA0D;AAAA,MAA3C;AAAEC,IAAAA,UAAU,EAAE;AAAEC,MAAAA,OAAO,EAAEC,GAAX;AAAgBC,MAAAA;AAAhB;AAAd,GAA2C;;AACxE,QAAMC,UAAU,GAAGC,2BAAcN,IAAd,EAAnB;;AACA,QAAMO,gBAAgB,GAAGC,iCAAoBR,IAApB,CAA0BK,UAA1B,CAAzB,CAFwE,CAIxE;AACA;;;AACA,SAAOD,MAAM,GAAG,IAAH,GAAU,4BAAC,GAAD,EAAUG,gBAAV,CAAvB;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useInnerBlocksProps, useBlockProps } from '@wordpress/block-editor';\n\nexport default function save( { attributes: { tagName: Tag, legacy } } ) {\n\tconst blockProps = useBlockProps.save();\n\tconst innerBlocksProps = useInnerBlocksProps.save( blockProps );\n\n\t// The legacy version is dynamic (i.e. PHP rendered) and doesn't allow inner\n\t// blocks, so nothing is saved in that case.\n\treturn legacy ? null : <Tag { ...innerBlocksProps } />;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments/save.js"],"names":["save","attributes","tagName","Tag","legacy","blockProps","useBlockProps","innerBlocksProps","useInnerBlocksProps"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;AAGe,SAASA,IAAT,CAAe;AAAEC,EAAAA,UAAU,EAAE;AAAEC,IAAAA,OAAO,EAAEC,GAAX;AAAgBC,IAAAA;AAAhB;AAAd,CAAf,EAA0D;AACxE,QAAMC,UAAU,GAAGC,2BAAcN,IAAd,EAAnB;;AACA,QAAMO,gBAAgB,GAAGC,iCAAoBR,IAApB,CAA0BK,UAA1B,CAAzB,CAFwE,CAIxE;AACA;;;AACA,SAAOD,MAAM,GAAG,IAAH,GAAU,4BAAC,GAAD,EAAUG,gBAAV,CAAvB;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useInnerBlocksProps, useBlockProps } from '@wordpress/block-editor';\n\nexport default function save( { attributes: { tagName: Tag, legacy } } ) {\n\tconst blockProps = useBlockProps.save();\n\tconst innerBlocksProps = useInnerBlocksProps.save( blockProps );\n\n\t// The legacy version is dynamic (i.e. PHP rendered) and doesn't allow inner\n\t// blocks, so nothing is saved in that case.\n\treturn legacy ? null : <Tag { ...innerBlocksProps } />;\n}\n"]}
@@ -14,11 +14,10 @@ var _components = require("@wordpress/components");
14
14
  /**
15
15
  * WordPress dependencies
16
16
  */
17
- function CommentsPaginationArrowControls(_ref) {
18
- let {
19
- value,
20
- onChange
21
- } = _ref;
17
+ function CommentsPaginationArrowControls({
18
+ value,
19
+ onChange
20
+ }) {
22
21
  return (0, _element.createElement)(_components.__experimentalToggleGroupControl, {
23
22
  __nextHasNoMarginBottom: true,
24
23
  label: (0, _i18n.__)('Arrow'),
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments-pagination/comments-pagination-arrow-controls.js"],"names":["CommentsPaginationArrowControls","value","onChange"],"mappings":";;;;;;;;;AAGA;;AACA;;AAJA;AACA;AACA;AAOO,SAASA,+BAAT,OAAgE;AAAA,MAAtB;AAAEC,IAAAA,KAAF;AAASC,IAAAA;AAAT,GAAsB;AACtE,SACC,4BAAC,4CAAD;AACC,IAAA,uBAAuB,MADxB;AAEC,IAAA,KAAK,EAAG,cAAI,OAAJ,CAFT;AAGC,IAAA,KAAK,EAAGD,KAHT;AAIC,IAAA,QAAQ,EAAGC,QAJZ;AAKC,IAAA,IAAI,EAAG,cACN,qEADM,CALR;AAQC,IAAA,OAAO;AARR,KAUC,4BAAC,kDAAD;AACC,IAAA,KAAK,EAAC,MADP;AAEC,IAAA,KAAK,EAAG,cACP,MADO,EAEP,2DAFO;AAFT,IAVD,EAiBC,4BAAC,kDAAD;AACC,IAAA,KAAK,EAAC,OADP;AAEC,IAAA,KAAK,EAAG,cACP,OADO,EAEP,2DAFO;AAFT,IAjBD,EAwBC,4BAAC,kDAAD;AACC,IAAA,KAAK,EAAC,SADP;AAEC,IAAA,KAAK,EAAG,cACP,SADO,EAEP,2DAFO;AAFT,IAxBD,CADD;AAkCA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from '@wordpress/components';\n\nexport function CommentsPaginationArrowControls( { value, onChange } ) {\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Arrow' ) }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\thelp={ __(\n\t\t\t\t'A decorative arrow appended to the next and previous comments link.'\n\t\t\t) }\n\t\t\tisBlock\n\t\t>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"none\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'None',\n\t\t\t\t\t'Arrow option for Comments Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"arrow\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Arrow',\n\t\t\t\t\t'Arrow option for Comments Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"chevron\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Chevron',\n\t\t\t\t\t'Arrow option for Comments Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t</ToggleGroupControl>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-pagination/comments-pagination-arrow-controls.js"],"names":["CommentsPaginationArrowControls","value","onChange"],"mappings":";;;;;;;;;AAGA;;AACA;;AAJA;AACA;AACA;AAOO,SAASA,+BAAT,CAA0C;AAAEC,EAAAA,KAAF;AAASC,EAAAA;AAAT,CAA1C,EAAgE;AACtE,SACC,4BAAC,4CAAD;AACC,IAAA,uBAAuB,MADxB;AAEC,IAAA,KAAK,EAAG,cAAI,OAAJ,CAFT;AAGC,IAAA,KAAK,EAAGD,KAHT;AAIC,IAAA,QAAQ,EAAGC,QAJZ;AAKC,IAAA,IAAI,EAAG,cACN,qEADM,CALR;AAQC,IAAA,OAAO;AARR,KAUC,4BAAC,kDAAD;AACC,IAAA,KAAK,EAAC,MADP;AAEC,IAAA,KAAK,EAAG,cACP,MADO,EAEP,2DAFO;AAFT,IAVD,EAiBC,4BAAC,kDAAD;AACC,IAAA,KAAK,EAAC,OADP;AAEC,IAAA,KAAK,EAAG,cACP,OADO,EAEP,2DAFO;AAFT,IAjBD,EAwBC,4BAAC,kDAAD;AACC,IAAA,KAAK,EAAC,SADP;AAEC,IAAA,KAAK,EAAG,cACP,SADO,EAEP,2DAFO;AAFT,IAxBD,CADD;AAkCA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from '@wordpress/components';\n\nexport function CommentsPaginationArrowControls( { value, onChange } ) {\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Arrow' ) }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\thelp={ __(\n\t\t\t\t'A decorative arrow appended to the next and previous comments link.'\n\t\t\t) }\n\t\t\tisBlock\n\t\t>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"none\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'None',\n\t\t\t\t\t'Arrow option for Comments Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"arrow\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Arrow',\n\t\t\t\t\t'Arrow option for Comments Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"chevron\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Chevron',\n\t\t\t\t\t'Arrow option for Comments Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t</ToggleGroupControl>\n\t);\n}\n"]}
@@ -27,14 +27,13 @@ var _commentsPaginationArrowControls = require("./comments-pagination-arrow-cont
27
27
  const TEMPLATE = [['core/comments-pagination-previous'], ['core/comments-pagination-numbers'], ['core/comments-pagination-next']];
28
28
  const ALLOWED_BLOCKS = ['core/comments-pagination-previous', 'core/comments-pagination-numbers', 'core/comments-pagination-next'];
29
29
 
30
- function QueryPaginationEdit(_ref) {
31
- let {
32
- attributes: {
33
- paginationArrow
34
- },
35
- setAttributes,
36
- clientId
37
- } = _ref;
30
+ function QueryPaginationEdit({
31
+ attributes: {
32
+ paginationArrow
33
+ },
34
+ setAttributes,
35
+ clientId
36
+ }) {
38
37
  const hasNextPreviousBlocks = (0, _data.useSelect)(select => {
39
38
  const {
40
39
  getBlocks
@@ -46,7 +45,7 @@ function QueryPaginationEdit(_ref) {
46
45
  * block exists.
47
46
  */
48
47
 
49
- return innerBlocks === null || innerBlocks === void 0 ? void 0 : innerBlocks.find(innerBlock => {
48
+ return innerBlocks?.find(innerBlock => {
50
49
  return ['core/comments-pagination-previous', 'core/comments-pagination-next'].includes(innerBlock.name);
51
50
  });
52
51
  }, []);
@@ -63,7 +62,7 @@ function QueryPaginationEdit(_ref) {
63
62
  const {
64
63
  __experimentalDiscussionSettings
65
64
  } = getSettings();
66
- return __experimentalDiscussionSettings === null || __experimentalDiscussionSettings === void 0 ? void 0 : __experimentalDiscussionSettings.pageComments;
65
+ return __experimentalDiscussionSettings?.pageComments;
67
66
  }, []); // If paging comments is not enabled in the Discussion Settings then hide the pagination
68
67
  // controls. We don't want to remove them from the template so that when the user enables
69
68
  // paging comments, the controls will be visible.
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments-pagination/edit.js"],"names":["TEMPLATE","ALLOWED_BLOCKS","QueryPaginationEdit","attributes","paginationArrow","setAttributes","clientId","hasNextPreviousBlocks","select","getBlocks","blockEditorStore","innerBlocks","find","innerBlock","includes","name","blockProps","innerBlocksProps","template","allowedBlocks","pageComments","getSettings","__experimentalDiscussionSettings","value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gCAAgC,CAAEF,YAAzC;AACA,GAJoB,EAIlB,EAJkB,CAArB,CAxBG,CA8BH;AACA;AACA;;AACA,MAAK,CAAEA,YAAP,EAAsB;AACrB,WACC,4BAAC,oBAAD,QACG,cACD,mFADC,CADH,CADD;AAOA;;AAED,SACC,qDACGb,qBAAqB,IACtB,4BAAC,8BAAD,QACC,4BAAC,qBAAD;AAAW,IAAA,KAAK,EAAG,cAAI,UAAJ;AAAnB,KACC,4BAAC,gEAAD;AACC,IAAA,KAAK,EAAGH,eADT;AAEC,IAAA,QAAQ,EAAKmB,KAAF,IAAa;AACvBlB,MAAAA,aAAa,CAAE;AAAED,QAAAA,eAAe,EAAEmB;AAAnB,OAAF,CAAb;AACA;AAJF,IADD,CADD,CAFF,EAaC,mCAAUN,gBAAV,CAbD,CADD;AAiBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInspectorControls,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n\tWarning,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { CommentsPaginationArrowControls } from './comments-pagination-arrow-controls';\n\nconst TEMPLATE = [\n\t[ 'core/comments-pagination-previous' ],\n\t[ 'core/comments-pagination-numbers' ],\n\t[ 'core/comments-pagination-next' ],\n];\nconst ALLOWED_BLOCKS = [\n\t'core/comments-pagination-previous',\n\t'core/comments-pagination-numbers',\n\t'core/comments-pagination-next',\n];\n\nexport default function QueryPaginationEdit( {\n\tattributes: { paginationArrow },\n\tsetAttributes,\n\tclientId,\n} ) {\n\tconst hasNextPreviousBlocks = useSelect( ( select ) => {\n\t\tconst { getBlocks } = select( blockEditorStore );\n\t\tconst innerBlocks = getBlocks( clientId );\n\t\t/**\n\t\t * Show the `paginationArrow` control only if a\n\t\t * Comments Pagination Next or Comments Pagination Previous\n\t\t * block exists.\n\t\t */\n\t\treturn innerBlocks?.find( ( innerBlock ) => {\n\t\t\treturn [\n\t\t\t\t'core/comments-pagination-previous',\n\t\t\t\t'core/comments-pagination-next',\n\t\t\t].includes( innerBlock.name );\n\t\t} );\n\t}, [] );\n\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t\tallowedBlocks: ALLOWED_BLOCKS,\n\t} );\n\n\t// Get the Discussion settings\n\tconst pageComments = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { __experimentalDiscussionSettings } = getSettings();\n\t\treturn __experimentalDiscussionSettings?.pageComments;\n\t}, [] );\n\n\t// If paging comments is not enabled in the Discussion Settings then hide the pagination\n\t// controls. We don't want to remove them from the template so that when the user enables\n\t// paging comments, the controls will be visible.\n\tif ( ! pageComments ) {\n\t\treturn (\n\t\t\t<Warning>\n\t\t\t\t{ __(\n\t\t\t\t\t'Comments Pagination block: paging comments is disabled in the Discussion Settings'\n\t\t\t\t) }\n\t\t\t</Warning>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ hasNextPreviousBlocks && (\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t\t<CommentsPaginationArrowControls\n\t\t\t\t\t\t\tvalue={ paginationArrow }\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tsetAttributes( { paginationArrow: value } );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<div { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-pagination/edit.js"],"names":["TEMPLATE","ALLOWED_BLOCKS","QueryPaginationEdit","attributes","paginationArrow","setAttributes","clientId","hasNextPreviousBlocks","select","getBlocks","blockEditorStore","innerBlocks","find","innerBlock","includes","name","blockProps","innerBlocksProps","template","allowedBlocks","pageComments","getSettings","__experimentalDiscussionSettings","value"],"mappings":";;;;;;;;;AAGA;;AACA;;AAOA;;AACA;;AAKA;;AAjBA;AACA;AACA;;AAYA;AACA;AACA;AAGA,MAAMA,QAAQ,GAAG,CAChB,CAAE,mCAAF,CADgB,EAEhB,CAAE,kCAAF,CAFgB,EAGhB,CAAE,+BAAF,CAHgB,CAAjB;AAKA,MAAMC,cAAc,GAAG,CACtB,mCADsB,EAEtB,kCAFsB,EAGtB,+BAHsB,CAAvB;;AAMe,SAASC,mBAAT,CAA8B;AAC5CC,EAAAA,UAAU,EAAE;AAAEC,IAAAA;AAAF,GADgC;AAE5CC,EAAAA,aAF4C;AAG5CC,EAAAA;AAH4C,CAA9B,EAIX;AACH,QAAMC,qBAAqB,GAAG,qBAAaC,MAAF,IAAc;AACtD,UAAM;AAAEC,MAAAA;AAAF,QAAgBD,MAAM,CAAEE,kBAAF,CAA5B;AACA,UAAMC,WAAW,GAAGF,SAAS,CAAEH,QAAF,CAA7B;AACA;AACF;AACA;AACA;AACA;;AACE,WAAOK,WAAW,EAAEC,IAAb,CAAqBC,UAAF,IAAkB;AAC3C,aAAO,CACN,mCADM,EAEN,+BAFM,EAGLC,QAHK,CAGKD,UAAU,CAACE,IAHhB,CAAP;AAIA,KALM,CAAP;AAMA,GAd6B,EAc3B,EAd2B,CAA9B;AAgBA,QAAMC,UAAU,GAAG,iCAAnB;AACA,QAAMC,gBAAgB,GAAG,sCAAqBD,UAArB,EAAiC;AACzDE,IAAAA,QAAQ,EAAElB,QAD+C;AAEzDmB,IAAAA,aAAa,EAAElB;AAF0C,GAAjC,CAAzB,CAlBG,CAuBH;;AACA,QAAMmB,YAAY,GAAG,qBAAaZ,MAAF,IAAc;AAC7C,UAAM;AAAEa,MAAAA;AAAF,QAAkBb,MAAM,CAAEE,kBAAF,CAA9B;AACA,UAAM;AAAEY,MAAAA;AAAF,QAAuCD,WAAW,EAAxD;AACA,WAAOC,gCAAgC,EAAEF,YAAzC;AACA,GAJoB,EAIlB,EAJkB,CAArB,CAxBG,CA8BH;AACA;AACA;;AACA,MAAK,CAAEA,YAAP,EAAsB;AACrB,WACC,4BAAC,oBAAD,QACG,cACD,mFADC,CADH,CADD;AAOA;;AAED,SACC,qDACGb,qBAAqB,IACtB,4BAAC,8BAAD,QACC,4BAAC,qBAAD;AAAW,IAAA,KAAK,EAAG,cAAI,UAAJ;AAAnB,KACC,4BAAC,gEAAD;AACC,IAAA,KAAK,EAAGH,eADT;AAEC,IAAA,QAAQ,EAAKmB,KAAF,IAAa;AACvBlB,MAAAA,aAAa,CAAE;AAAED,QAAAA,eAAe,EAAEmB;AAAnB,OAAF,CAAb;AACA;AAJF,IADD,CADD,CAFF,EAaC,mCAAUN,gBAAV,CAbD,CADD;AAiBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInspectorControls,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n\tWarning,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { CommentsPaginationArrowControls } from './comments-pagination-arrow-controls';\n\nconst TEMPLATE = [\n\t[ 'core/comments-pagination-previous' ],\n\t[ 'core/comments-pagination-numbers' ],\n\t[ 'core/comments-pagination-next' ],\n];\nconst ALLOWED_BLOCKS = [\n\t'core/comments-pagination-previous',\n\t'core/comments-pagination-numbers',\n\t'core/comments-pagination-next',\n];\n\nexport default function QueryPaginationEdit( {\n\tattributes: { paginationArrow },\n\tsetAttributes,\n\tclientId,\n} ) {\n\tconst hasNextPreviousBlocks = useSelect( ( select ) => {\n\t\tconst { getBlocks } = select( blockEditorStore );\n\t\tconst innerBlocks = getBlocks( clientId );\n\t\t/**\n\t\t * Show the `paginationArrow` control only if a\n\t\t * Comments Pagination Next or Comments Pagination Previous\n\t\t * block exists.\n\t\t */\n\t\treturn innerBlocks?.find( ( innerBlock ) => {\n\t\t\treturn [\n\t\t\t\t'core/comments-pagination-previous',\n\t\t\t\t'core/comments-pagination-next',\n\t\t\t].includes( innerBlock.name );\n\t\t} );\n\t}, [] );\n\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t\tallowedBlocks: ALLOWED_BLOCKS,\n\t} );\n\n\t// Get the Discussion settings\n\tconst pageComments = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { __experimentalDiscussionSettings } = getSettings();\n\t\treturn __experimentalDiscussionSettings?.pageComments;\n\t}, [] );\n\n\t// If paging comments is not enabled in the Discussion Settings then hide the pagination\n\t// controls. We don't want to remove them from the template so that when the user enables\n\t// paging comments, the controls will be visible.\n\tif ( ! pageComments ) {\n\t\treturn (\n\t\t\t<Warning>\n\t\t\t\t{ __(\n\t\t\t\t\t'Comments Pagination block: paging comments is disabled in the Discussion Settings'\n\t\t\t\t) }\n\t\t\t</Warning>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ hasNextPreviousBlocks && (\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t\t<CommentsPaginationArrowControls\n\t\t\t\t\t\t\tvalue={ paginationArrow }\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tsetAttributes( { paginationArrow: value } );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<div { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n"]}
@@ -24,7 +24,7 @@ var _save = _interopRequireDefault(require("./save"));
24
24
  */
25
25
  const metadata = {
26
26
  $schema: "https://schemas.wp.org/trunk/block.json",
27
- apiVersion: 2,
27
+ apiVersion: 3,
28
28
  name: "core/comments-pagination",
29
29
  title: "Comments Pagination",
30
30
  category: "theme",
@@ -24,16 +24,15 @@ const arrowMap = {
24
24
  chevron: '»'
25
25
  };
26
26
 
27
- function CommentsPaginationNextEdit(_ref) {
28
- let {
29
- attributes: {
30
- label
31
- },
32
- setAttributes,
33
- context: {
34
- 'comments/paginationArrow': paginationArrow
35
- }
36
- } = _ref;
27
+ function CommentsPaginationNextEdit({
28
+ attributes: {
29
+ label
30
+ },
31
+ setAttributes,
32
+ context: {
33
+ 'comments/paginationArrow': paginationArrow
34
+ }
35
+ }) {
37
36
  const displayArrow = arrowMap[paginationArrow];
38
37
  return (0, _element.createElement)("a", (0, _extends2.default)({
39
38
  href: "#comments-pagination-next-pseudo-link",