@wordpress/block-library 8.12.0 → 8.12.2

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 (1318) hide show
  1. package/build/archives/edit.js +2 -1
  2. package/build/archives/edit.js.map +1 -1
  3. package/build/archives/index.js +0 -1
  4. package/build/archives/index.js.map +1 -1
  5. package/build/audio/edit.js +4 -2
  6. package/build/audio/edit.js.map +1 -1
  7. package/build/audio/save.js +2 -1
  8. package/build/audio/save.js.map +1 -1
  9. package/build/avatar/edit.js +6 -3
  10. package/build/avatar/edit.js.map +1 -1
  11. package/build/avatar/index.js +1 -2
  12. package/build/avatar/index.js.map +1 -1
  13. package/build/block/edit.js +8 -4
  14. package/build/block/edit.js.map +1 -1
  15. package/build/block/index.js +1 -1
  16. package/build/button/deprecated.js +20 -15
  17. package/build/button/deprecated.js.map +1 -1
  18. package/build/button/edit.js +2 -4
  19. package/build/button/edit.js.map +1 -1
  20. package/build/button/save.js +4 -3
  21. package/build/button/save.js.map +1 -1
  22. package/build/buttons/deprecated.js +6 -5
  23. package/build/buttons/deprecated.js.map +1 -1
  24. package/build/buttons/edit.js +7 -2
  25. package/build/buttons/edit.js.map +1 -1
  26. package/build/buttons/edit.native.js +6 -6
  27. package/build/buttons/edit.native.js.map +1 -1
  28. package/build/buttons/index.js +1 -1
  29. package/build/buttons/save.js +2 -1
  30. package/build/buttons/save.js.map +1 -1
  31. package/build/buttons/transforms.js +1 -1
  32. package/build/calendar/edit.js +4 -2
  33. package/build/calendar/edit.js.map +1 -1
  34. package/build/calendar/index.js +0 -1
  35. package/build/calendar/index.js.map +1 -1
  36. package/build/categories/edit.js +2 -1
  37. package/build/categories/edit.js.map +1 -1
  38. package/build/categories/index.js +0 -1
  39. package/build/categories/index.js.map +1 -1
  40. package/build/code/edit.js +2 -1
  41. package/build/code/edit.js.map +1 -1
  42. package/build/code/save.js +2 -1
  43. package/build/code/save.js.map +1 -1
  44. package/build/column/edit.js +2 -1
  45. package/build/column/edit.js.map +1 -1
  46. package/build/column/edit.native.js +2 -1
  47. package/build/column/edit.native.js.map +1 -1
  48. package/build/column/index.js +1 -1
  49. package/build/column/save.js +2 -1
  50. package/build/column/save.js.map +1 -1
  51. package/build/columns/edit.js +6 -3
  52. package/build/columns/edit.js.map +1 -1
  53. package/build/columns/edit.native.js +4 -5
  54. package/build/columns/edit.native.js.map +1 -1
  55. package/build/columns/index.js +1 -1
  56. package/build/columns/save.js +2 -1
  57. package/build/columns/save.js.map +1 -1
  58. package/build/comment-author-avatar/edit.js +6 -8
  59. package/build/comment-author-avatar/edit.js.map +1 -1
  60. package/build/comment-author-avatar/index.js +0 -1
  61. package/build/comment-author-avatar/index.js.map +1 -1
  62. package/build/comment-author-name/edit.js +2 -1
  63. package/build/comment-author-name/edit.js.map +1 -1
  64. package/build/comment-author-name/index.js +0 -1
  65. package/build/comment-author-name/index.js.map +1 -1
  66. package/build/comment-content/edit.js +4 -2
  67. package/build/comment-content/edit.js.map +1 -1
  68. package/build/comment-content/index.js +0 -1
  69. package/build/comment-content/index.js.map +1 -1
  70. package/build/comment-date/edit.js +2 -1
  71. package/build/comment-date/edit.js.map +1 -1
  72. package/build/comment-date/index.js +0 -1
  73. package/build/comment-date/index.js.map +1 -1
  74. package/build/comment-edit-link/edit.js +2 -1
  75. package/build/comment-edit-link/edit.js.map +1 -1
  76. package/build/comment-edit-link/index.js +0 -1
  77. package/build/comment-edit-link/index.js.map +1 -1
  78. package/build/comment-reply-link/edit.js +2 -1
  79. package/build/comment-reply-link/edit.js.map +1 -1
  80. package/build/comment-reply-link/index.js +0 -1
  81. package/build/comment-reply-link/index.js.map +1 -1
  82. package/build/comment-template/edit.js +10 -10
  83. package/build/comment-template/edit.js.map +1 -1
  84. package/build/comment-template/index.js +0 -1
  85. package/build/comment-template/index.js.map +1 -1
  86. package/build/comments/deprecated.js +2 -1
  87. package/build/comments/deprecated.js.map +1 -1
  88. package/build/comments/edit/comments-legacy.js +2 -1
  89. package/build/comments/edit/comments-legacy.js.map +1 -1
  90. package/build/comments/edit/index.js +4 -2
  91. package/build/comments/edit/index.js.map +1 -1
  92. package/build/comments/index.js +0 -1
  93. package/build/comments/index.js.map +1 -1
  94. package/build/comments/save.js +2 -1
  95. package/build/comments/save.js.map +1 -1
  96. package/build/comments-pagination/edit.js +2 -1
  97. package/build/comments-pagination/edit.js.map +1 -1
  98. package/build/comments-pagination/index.js +1 -2
  99. package/build/comments-pagination/index.js.map +1 -1
  100. package/build/comments-pagination-next/edit.js +4 -7
  101. package/build/comments-pagination-next/edit.js.map +1 -1
  102. package/build/comments-pagination-next/index.js +0 -1
  103. package/build/comments-pagination-next/index.js.map +1 -1
  104. package/build/comments-pagination-numbers/edit.js +2 -1
  105. package/build/comments-pagination-numbers/edit.js.map +1 -1
  106. package/build/comments-pagination-numbers/index.js +0 -1
  107. package/build/comments-pagination-numbers/index.js.map +1 -1
  108. package/build/comments-pagination-previous/edit.js +4 -7
  109. package/build/comments-pagination-previous/edit.js.map +1 -1
  110. package/build/comments-pagination-previous/index.js +0 -1
  111. package/build/comments-pagination-previous/index.js.map +1 -1
  112. package/build/comments-title/edit.js +4 -9
  113. package/build/comments-title/edit.js.map +1 -1
  114. package/build/cover/deprecated.js +46 -36
  115. package/build/cover/deprecated.js.map +1 -1
  116. package/build/cover/edit/index.js +8 -7
  117. package/build/cover/edit/index.js.map +1 -1
  118. package/build/cover/edit/inspector-controls.js +4 -7
  119. package/build/cover/edit/inspector-controls.js.map +1 -1
  120. package/build/cover/edit/resizable-cover-popover.js +6 -7
  121. package/build/cover/edit/resizable-cover-popover.js.map +1 -1
  122. package/build/cover/edit.native.js +12 -11
  123. package/build/cover/edit.native.js.map +1 -1
  124. package/build/cover/index.js +1 -1
  125. package/build/cover/save.js +9 -7
  126. package/build/cover/save.js.map +1 -1
  127. package/build/cover/transforms.js +2 -2
  128. package/build/cover/transforms.js.map +1 -1
  129. package/build/details/edit.js +3 -7
  130. package/build/details/edit.js.map +1 -1
  131. package/build/details/index.js +1 -1
  132. package/build/details/init.js +16 -0
  133. package/build/details/init.js.map +1 -0
  134. package/build/details/save.js +2 -6
  135. package/build/details/save.js.map +1 -1
  136. package/build/embed/deprecated.js +4 -3
  137. package/build/embed/deprecated.js.map +1 -1
  138. package/build/embed/edit.js +6 -3
  139. package/build/embed/edit.js.map +1 -1
  140. package/build/embed/edit.native.js +6 -3
  141. package/build/embed/edit.native.js.map +1 -1
  142. package/build/embed/save.js +4 -3
  143. package/build/embed/save.js.map +1 -1
  144. package/build/embed/wp-embed-preview.js +4 -7
  145. package/build/embed/wp-embed-preview.js.map +1 -1
  146. package/build/embed/wp-embed-preview.native.js +4 -7
  147. package/build/embed/wp-embed-preview.native.js.map +1 -1
  148. package/build/file/deprecated.js +6 -3
  149. package/build/file/deprecated.js.map +1 -1
  150. package/build/file/edit.js +4 -2
  151. package/build/file/edit.js.map +1 -1
  152. package/build/file/index.js +1 -1
  153. package/build/file/save.js +2 -1
  154. package/build/file/save.js.map +1 -1
  155. package/build/file/view.js +9 -0
  156. package/build/file/view.js.map +1 -0
  157. package/build/footnotes/edit.js +57 -0
  158. package/build/footnotes/edit.js.map +1 -0
  159. package/build/footnotes/format.js +142 -0
  160. package/build/footnotes/format.js.map +1 -0
  161. package/build/footnotes/index.js +67 -0
  162. package/build/footnotes/index.js.map +1 -0
  163. package/build/freeform/edit.js +6 -3
  164. package/build/freeform/edit.js.map +1 -1
  165. package/build/freeform/edit.native.js +2 -4
  166. package/build/freeform/edit.native.js.map +1 -1
  167. package/build/freeform/modal.js +2 -1
  168. package/build/freeform/modal.js.map +1 -1
  169. package/build/gallery/deprecated.js +6 -4
  170. package/build/gallery/deprecated.js.map +1 -1
  171. package/build/gallery/edit-wrapper.js +4 -2
  172. package/build/gallery/edit-wrapper.js.map +1 -1
  173. package/build/gallery/edit.js +16 -13
  174. package/build/gallery/edit.js.map +1 -1
  175. package/build/gallery/gallery.js +2 -4
  176. package/build/gallery/gallery.js.map +1 -1
  177. package/build/gallery/gallery.native.js +3 -2
  178. package/build/gallery/gallery.native.js.map +1 -1
  179. package/build/gallery/index.js +1 -1
  180. package/build/gallery/save.js +2 -1
  181. package/build/gallery/save.js.map +1 -1
  182. package/build/gallery/shared-icon.native.js +4 -5
  183. package/build/gallery/shared-icon.native.js.map +1 -1
  184. package/build/gallery/v1/edit.js +8 -9
  185. package/build/gallery/v1/edit.js.map +1 -1
  186. package/build/gallery/v1/gallery.js +7 -7
  187. package/build/gallery/v1/gallery.js.map +1 -1
  188. package/build/gallery/v1/save.js +4 -3
  189. package/build/gallery/v1/save.js.map +1 -1
  190. package/build/group/deprecated.js +5 -3
  191. package/build/group/deprecated.js.map +1 -1
  192. package/build/group/edit.js +4 -1
  193. package/build/group/edit.js.map +1 -1
  194. package/build/group/index.js +1 -1
  195. package/build/group/placeholder.js +2 -1
  196. package/build/group/placeholder.js.map +1 -1
  197. package/build/group/save.js +2 -1
  198. package/build/group/save.js.map +1 -1
  199. package/build/heading/deprecated.js +8 -6
  200. package/build/heading/deprecated.js.map +1 -1
  201. package/build/heading/edit.js +9 -11
  202. package/build/heading/edit.js.map +1 -1
  203. package/build/heading/save.js +4 -3
  204. package/build/heading/save.js.map +1 -1
  205. package/build/home-link/edit.js +2 -1
  206. package/build/home-link/edit.js.map +1 -1
  207. package/build/home-link/index.js +0 -1
  208. package/build/home-link/index.js.map +1 -1
  209. package/build/html/edit.js +4 -3
  210. package/build/html/edit.js.map +1 -1
  211. package/build/image/deprecated.js +14 -12
  212. package/build/image/deprecated.js.map +1 -1
  213. package/build/image/edit.js +4 -7
  214. package/build/image/edit.js.map +1 -1
  215. package/build/image/edit.native.js +8 -8
  216. package/build/image/edit.native.js.map +1 -1
  217. package/build/image/image.js +109 -49
  218. package/build/image/image.js.map +1 -1
  219. package/build/image/index.js +6 -0
  220. package/build/image/index.js.map +1 -1
  221. package/build/image/interactivity.js +119 -6
  222. package/build/image/interactivity.js.map +1 -1
  223. package/build/image/save.js +10 -4
  224. package/build/image/save.js.map +1 -1
  225. package/build/image/utils.js +18 -0
  226. package/build/image/utils.js.map +1 -1
  227. package/build/index.js +3 -1
  228. package/build/index.js.map +1 -1
  229. package/build/latest-comments/edit.js +2 -1
  230. package/build/latest-comments/edit.js.map +1 -1
  231. package/build/latest-comments/index.js +0 -1
  232. package/build/latest-comments/index.js.map +1 -1
  233. package/build/latest-posts/deprecated.js +0 -1
  234. package/build/latest-posts/deprecated.js.map +1 -1
  235. package/build/latest-posts/edit.js +14 -7
  236. package/build/latest-posts/edit.js.map +1 -1
  237. package/build/latest-posts/edit.native.js +4 -5
  238. package/build/latest-posts/edit.native.js.map +1 -1
  239. package/build/latest-posts/index.js +0 -1
  240. package/build/latest-posts/index.js.map +1 -1
  241. package/build/list/deprecated.js +12 -10
  242. package/build/list/deprecated.js.map +1 -1
  243. package/build/list/edit.js +4 -5
  244. package/build/list/edit.js.map +1 -1
  245. package/build/list/ordered-list-settings.js +25 -1
  246. package/build/list/ordered-list-settings.js.map +1 -1
  247. package/build/list/save.js +6 -5
  248. package/build/list/save.js.map +1 -1
  249. package/build/list/tag-name.js +4 -7
  250. package/build/list/tag-name.js.map +1 -1
  251. package/build/list/tag-name.native.js +4 -7
  252. package/build/list/tag-name.native.js.map +1 -1
  253. package/build/list-item/edit.js +2 -1
  254. package/build/list-item/edit.js.map +1 -1
  255. package/build/list-item/edit.native.js +2 -1
  256. package/build/list-item/edit.native.js.map +1 -1
  257. package/build/list-item/save.js +2 -1
  258. package/build/list-item/save.js.map +1 -1
  259. package/build/{private-apis.js → lock-unlock.js} +1 -1
  260. package/build/lock-unlock.js.map +1 -0
  261. package/build/loginout/edit.js +4 -3
  262. package/build/loginout/edit.js.map +1 -1
  263. package/build/loginout/index.js +0 -1
  264. package/build/loginout/index.js.map +1 -1
  265. package/build/media-text/deprecated.js +43 -33
  266. package/build/media-text/deprecated.js.map +1 -1
  267. package/build/media-text/edit.js +7 -4
  268. package/build/media-text/edit.js.map +1 -1
  269. package/build/media-text/media-container.js +8 -7
  270. package/build/media-text/media-container.js.map +1 -1
  271. package/build/media-text/media-container.native.js +8 -8
  272. package/build/media-text/media-container.native.js.map +1 -1
  273. package/build/media-text/save.js +17 -13
  274. package/build/media-text/save.js.map +1 -1
  275. package/build/missing/edit.js +4 -3
  276. package/build/missing/edit.js.map +1 -1
  277. package/build/more/edit.js +2 -1
  278. package/build/more/edit.js.map +1 -1
  279. package/build/navigation/constants.js +8 -1
  280. package/build/navigation/constants.js.map +1 -1
  281. package/build/navigation/deprecated.js +1 -1
  282. package/build/navigation/deprecated.js.map +1 -1
  283. package/build/navigation/edit/index.js +35 -21
  284. package/build/navigation/edit/index.js.map +1 -1
  285. package/build/navigation/edit/inner-blocks.js +2 -1
  286. package/build/navigation/edit/inner-blocks.js.map +1 -1
  287. package/build/navigation/edit/leaf-more-menu.js +5 -9
  288. package/build/navigation/edit/leaf-more-menu.js.map +1 -1
  289. package/build/navigation/edit/menu-inspector-controls.js +12 -16
  290. package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
  291. package/build/navigation/edit/navigation-menu-selector.js +15 -7
  292. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  293. package/build/navigation/edit/responsive-wrapper.js +2 -1
  294. package/build/navigation/edit/responsive-wrapper.js.map +1 -1
  295. package/build/navigation/edit/unsaved-inner-blocks.js +3 -5
  296. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  297. package/build/navigation/index.js +2 -3
  298. package/build/navigation/index.js.map +1 -1
  299. package/build/navigation/use-navigation-menu.js +9 -7
  300. package/build/navigation/use-navigation-menu.js.map +1 -1
  301. package/build/navigation/view-modal.js +64 -0
  302. package/build/navigation/view-modal.js.map +1 -0
  303. package/build/navigation/view.js +61 -0
  304. package/build/navigation/view.js.map +1 -0
  305. package/build/navigation-link/edit.js +4 -2
  306. package/build/navigation-link/edit.js.map +1 -1
  307. package/build/navigation-submenu/edit.js +4 -2
  308. package/build/navigation-submenu/edit.js.map +1 -1
  309. package/build/nextpage/edit.js +2 -1
  310. package/build/nextpage/edit.js.map +1 -1
  311. package/build/page-list/edit.js +12 -6
  312. package/build/page-list/edit.js.map +1 -1
  313. package/build/page-list/index.js +0 -1
  314. package/build/page-list/index.js.map +1 -1
  315. package/build/page-list-item/edit.js +2 -1
  316. package/build/page-list-item/edit.js.map +1 -1
  317. package/build/paragraph/deprecated.js +5 -4
  318. package/build/paragraph/deprecated.js.map +1 -1
  319. package/build/paragraph/edit.js +4 -6
  320. package/build/paragraph/edit.js.map +1 -1
  321. package/build/paragraph/save.js +5 -4
  322. package/build/paragraph/save.js.map +1 -1
  323. package/build/pattern/edit.js +7 -32
  324. package/build/pattern/edit.js.map +1 -1
  325. package/build/pattern/index.js +3 -11
  326. package/build/pattern/index.js.map +1 -1
  327. package/build/post-author/edit.js +4 -2
  328. package/build/post-author/edit.js.map +1 -1
  329. package/build/post-author/index.js +0 -1
  330. package/build/post-author/index.js.map +1 -1
  331. package/build/post-author-biography/edit.js +2 -4
  332. package/build/post-author-biography/edit.js.map +1 -1
  333. package/build/post-author-biography/index.js +0 -1
  334. package/build/post-author-biography/index.js.map +1 -1
  335. package/build/post-author-name/edit.js +2 -1
  336. package/build/post-author-name/edit.js.map +1 -1
  337. package/build/post-author-name/index.js +0 -1
  338. package/build/post-author-name/index.js.map +1 -1
  339. package/build/post-comment/edit.js +4 -2
  340. package/build/post-comment/edit.js.map +1 -1
  341. package/build/post-comment/save.js +2 -1
  342. package/build/post-comment/save.js.map +1 -1
  343. package/build/post-comments-count/edit.js +2 -4
  344. package/build/post-comments-count/edit.js.map +1 -1
  345. package/build/post-comments-count/index.js +0 -1
  346. package/build/post-comments-count/index.js.map +1 -1
  347. package/build/post-comments-form/edit.js +2 -1
  348. package/build/post-comments-form/edit.js.map +1 -1
  349. package/build/post-comments-form/index.js +0 -1
  350. package/build/post-comments-form/index.js.map +1 -1
  351. package/build/post-comments-link/edit.js +2 -1
  352. package/build/post-comments-link/edit.js.map +1 -1
  353. package/build/post-comments-link/index.js +0 -1
  354. package/build/post-comments-link/index.js.map +1 -1
  355. package/build/post-content/edit.js +11 -10
  356. package/build/post-content/edit.js.map +1 -1
  357. package/build/post-content/index.js +1 -2
  358. package/build/post-content/index.js.map +1 -1
  359. package/build/post-date/edit.js +2 -1
  360. package/build/post-date/edit.js.map +1 -1
  361. package/build/post-date/index.js +0 -1
  362. package/build/post-date/index.js.map +1 -1
  363. package/build/post-excerpt/edit.js +6 -3
  364. package/build/post-excerpt/edit.js.map +1 -1
  365. package/build/post-excerpt/index.js +0 -1
  366. package/build/post-excerpt/index.js.map +1 -1
  367. package/build/post-featured-image/edit.js +4 -2
  368. package/build/post-featured-image/edit.js.map +1 -1
  369. package/build/post-featured-image/index.js +0 -1
  370. package/build/post-featured-image/index.js.map +1 -1
  371. package/build/post-featured-image/overlay.js +4 -5
  372. package/build/post-featured-image/overlay.js.map +1 -1
  373. package/build/post-navigation-link/edit.js +2 -1
  374. package/build/post-navigation-link/edit.js.map +1 -1
  375. package/build/post-navigation-link/index.js +0 -1
  376. package/build/post-navigation-link/index.js.map +1 -1
  377. package/build/post-template/edit.js +14 -9
  378. package/build/post-template/edit.js.map +1 -1
  379. package/build/post-template/index.js +1 -2
  380. package/build/post-template/index.js.map +1 -1
  381. package/build/post-terms/edit.js +4 -8
  382. package/build/post-terms/edit.js.map +1 -1
  383. package/build/post-terms/hooks.js +9 -5
  384. package/build/post-terms/hooks.js.map +1 -1
  385. package/build/post-terms/index.js +0 -1
  386. package/build/post-terms/index.js.map +1 -1
  387. package/build/post-time-to-read/edit.js +2 -1
  388. package/build/post-time-to-read/edit.js.map +1 -1
  389. package/build/post-time-to-read/init.js +16 -0
  390. package/build/post-time-to-read/init.js.map +1 -0
  391. package/build/post-title/edit.js +16 -16
  392. package/build/post-title/edit.js.map +1 -1
  393. package/build/post-title/index.js +0 -1
  394. package/build/post-title/index.js.map +1 -1
  395. package/build/preformatted/edit.js +4 -8
  396. package/build/preformatted/edit.js.map +1 -1
  397. package/build/preformatted/edit.native.js +2 -1
  398. package/build/preformatted/edit.native.js.map +1 -1
  399. package/build/preformatted/save.js +2 -1
  400. package/build/preformatted/save.js.map +1 -1
  401. package/build/pullquote/deprecated.js +10 -8
  402. package/build/pullquote/deprecated.js.map +1 -1
  403. package/build/pullquote/edit.js +2 -1
  404. package/build/pullquote/edit.js.map +1 -1
  405. package/build/pullquote/edit.native.js +2 -1
  406. package/build/pullquote/edit.native.js.map +1 -1
  407. package/build/pullquote/save.js +5 -4
  408. package/build/pullquote/save.js.map +1 -1
  409. package/build/query/deprecated.js +16 -10
  410. package/build/query/deprecated.js.map +1 -1
  411. package/build/query/edit/index.js +2 -4
  412. package/build/query/edit/index.js.map +1 -1
  413. package/build/query/edit/inspector-controls/index.js +4 -3
  414. package/build/query/edit/inspector-controls/index.js.map +1 -1
  415. package/build/query/edit/query-content.js +20 -6
  416. package/build/query/edit/query-content.js.map +1 -1
  417. package/build/query/edit/query-placeholder.js +4 -2
  418. package/build/query/edit/query-placeholder.js.map +1 -1
  419. package/build/query/index.js +1 -2
  420. package/build/query/index.js.map +1 -1
  421. package/build/query/save.js +2 -1
  422. package/build/query/save.js.map +1 -1
  423. package/build/query/utils.js +1 -2
  424. package/build/query/utils.js.map +1 -1
  425. package/build/query-no-results/edit.js +2 -1
  426. package/build/query-no-results/edit.js.map +1 -1
  427. package/build/query-no-results/index.js +0 -1
  428. package/build/query-no-results/index.js.map +1 -1
  429. package/build/query-pagination/deprecated.js +2 -1
  430. package/build/query-pagination/deprecated.js.map +1 -1
  431. package/build/query-pagination/edit.js +2 -1
  432. package/build/query-pagination/edit.js.map +1 -1
  433. package/build/query-pagination/index.js +1 -2
  434. package/build/query-pagination/index.js.map +1 -1
  435. package/build/query-pagination-next/edit.js +4 -7
  436. package/build/query-pagination-next/edit.js.map +1 -1
  437. package/build/query-pagination-next/index.js +0 -1
  438. package/build/query-pagination-next/index.js.map +1 -1
  439. package/build/query-pagination-numbers/edit.js +2 -1
  440. package/build/query-pagination-numbers/edit.js.map +1 -1
  441. package/build/query-pagination-numbers/index.js +1 -2
  442. package/build/query-pagination-numbers/index.js.map +1 -1
  443. package/build/query-pagination-previous/edit.js +4 -7
  444. package/build/query-pagination-previous/edit.js.map +1 -1
  445. package/build/query-pagination-previous/index.js +0 -1
  446. package/build/query-pagination-previous/index.js.map +1 -1
  447. package/build/query-title/edit.js +8 -11
  448. package/build/query-title/edit.js.map +1 -1
  449. package/build/query-title/index.js +0 -1
  450. package/build/query-title/index.js.map +1 -1
  451. package/build/quote/deprecated.js +4 -3
  452. package/build/quote/deprecated.js.map +1 -1
  453. package/build/quote/edit.js +7 -7
  454. package/build/quote/edit.js.map +1 -1
  455. package/build/quote/save.js +4 -3
  456. package/build/quote/save.js.map +1 -1
  457. package/build/read-more/edit.js +4 -7
  458. package/build/read-more/edit.js.map +1 -1
  459. package/build/read-more/index.js +0 -1
  460. package/build/read-more/index.js.map +1 -1
  461. package/build/rss/edit.js +4 -2
  462. package/build/rss/edit.js.map +1 -1
  463. package/build/rss/index.js +0 -1
  464. package/build/rss/index.js.map +1 -1
  465. package/build/search/edit.js +4 -3
  466. package/build/search/edit.js.map +1 -1
  467. package/build/search/edit.native.js +6 -8
  468. package/build/search/edit.native.js.map +1 -1
  469. package/build/search/index.js +0 -1
  470. package/build/search/index.js.map +1 -1
  471. package/build/separator/deprecated.js +5 -4
  472. package/build/separator/deprecated.js.map +1 -1
  473. package/build/separator/edit.js +5 -4
  474. package/build/separator/edit.js.map +1 -1
  475. package/build/separator/save.js +5 -4
  476. package/build/separator/save.js.map +1 -1
  477. package/build/shortcode/edit.js +4 -3
  478. package/build/shortcode/edit.js.map +1 -1
  479. package/build/site-logo/edit.js +10 -10
  480. package/build/site-logo/edit.js.map +1 -1
  481. package/build/site-logo/index.js +0 -1
  482. package/build/site-logo/index.js.map +1 -1
  483. package/build/site-tagline/edit.js +5 -5
  484. package/build/site-tagline/edit.js.map +1 -1
  485. package/build/site-tagline/icon.js +1 -4
  486. package/build/site-tagline/icon.js.map +1 -1
  487. package/build/site-tagline/index.js +0 -1
  488. package/build/site-tagline/index.js.map +1 -1
  489. package/build/site-title/edit/index.js +8 -9
  490. package/build/site-title/edit/index.js.map +1 -1
  491. package/build/site-title/index.js +0 -1
  492. package/build/site-title/index.js.map +1 -1
  493. package/build/social-link/edit.js +2 -1
  494. package/build/social-link/edit.js.map +1 -1
  495. package/build/social-link/index.js +0 -1
  496. package/build/social-link/index.js.map +1 -1
  497. package/build/social-links/deprecated.js +5 -4
  498. package/build/social-links/deprecated.js.map +1 -1
  499. package/build/social-links/edit.js +6 -6
  500. package/build/social-links/edit.js.map +1 -1
  501. package/build/social-links/index.js +1 -1
  502. package/build/social-links/save.js +2 -1
  503. package/build/social-links/save.js.map +1 -1
  504. package/build/spacer/deprecated.js +8 -7
  505. package/build/spacer/deprecated.js.map +1 -1
  506. package/build/spacer/edit.js +10 -10
  507. package/build/spacer/edit.js.map +1 -1
  508. package/build/spacer/edit.native.js +4 -5
  509. package/build/spacer/edit.native.js.map +1 -1
  510. package/build/spacer/save.js +21 -11
  511. package/build/spacer/save.js.map +1 -1
  512. package/build/spacer/save.native.js +8 -7
  513. package/build/spacer/save.native.js.map +1 -1
  514. package/build/table/deprecated.js +4 -2
  515. package/build/table/deprecated.js.map +1 -1
  516. package/build/table/edit.js +6 -4
  517. package/build/table/edit.js.map +1 -1
  518. package/build/table/save.js +2 -1
  519. package/build/table/save.js.map +1 -1
  520. package/build/table-of-contents/edit.js +4 -2
  521. package/build/table-of-contents/edit.js.map +1 -1
  522. package/build/table-of-contents/save.js +2 -1
  523. package/build/table-of-contents/save.js.map +1 -1
  524. package/build/tag-cloud/edit.js +2 -1
  525. package/build/tag-cloud/edit.js.map +1 -1
  526. package/build/tag-cloud/index.js +0 -1
  527. package/build/tag-cloud/index.js.map +1 -1
  528. package/build/template-part/edit/index.js +8 -4
  529. package/build/template-part/edit/index.js.map +1 -1
  530. package/build/template-part/edit/inner-blocks.js +3 -2
  531. package/build/template-part/edit/inner-blocks.js.map +1 -1
  532. package/build/template-part/index.js +0 -1
  533. package/build/template-part/index.js.map +1 -1
  534. package/build/term-description/edit.js +2 -1
  535. package/build/term-description/edit.js.map +1 -1
  536. package/build/term-description/index.js +0 -1
  537. package/build/term-description/index.js.map +1 -1
  538. package/build/text-columns/edit.js +4 -3
  539. package/build/text-columns/edit.js.map +1 -1
  540. package/build/text-columns/save.js +4 -3
  541. package/build/text-columns/save.js.map +1 -1
  542. package/build/utils/interactivity/directives.js +4 -7
  543. package/build/utils/interactivity/directives.js.map +1 -1
  544. package/build/utils/interactivity/index.js +1 -3
  545. package/build/utils/interactivity/index.js.map +1 -1
  546. package/build/utils/migrate-font-family.js +2 -2
  547. package/build/utils/migrate-font-family.js.map +1 -1
  548. package/build/verse/deprecated.js +4 -3
  549. package/build/verse/deprecated.js.map +1 -1
  550. package/build/verse/edit.js +4 -6
  551. package/build/verse/edit.js.map +1 -1
  552. package/build/verse/save.js +4 -3
  553. package/build/verse/save.js.map +1 -1
  554. package/build/video/deprecated.js +2 -1
  555. package/build/video/deprecated.js.map +1 -1
  556. package/build/video/edit.js +4 -2
  557. package/build/video/edit.js.map +1 -1
  558. package/build/video/edit.native.js +8 -8
  559. package/build/video/edit.native.js.map +1 -1
  560. package/build/video/save.js +2 -1
  561. package/build/video/save.js.map +1 -1
  562. package/build/video/tracks.js +4 -7
  563. package/build/video/tracks.js.map +1 -1
  564. package/build-module/archives/edit.js +2 -1
  565. package/build-module/archives/edit.js.map +1 -1
  566. package/build-module/archives/index.js +0 -1
  567. package/build-module/archives/index.js.map +1 -1
  568. package/build-module/audio/edit.js +4 -2
  569. package/build-module/audio/edit.js.map +1 -1
  570. package/build-module/audio/save.js +2 -1
  571. package/build-module/audio/save.js.map +1 -1
  572. package/build-module/avatar/edit.js +6 -3
  573. package/build-module/avatar/edit.js.map +1 -1
  574. package/build-module/avatar/index.js +1 -2
  575. package/build-module/avatar/index.js.map +1 -1
  576. package/build-module/block/edit.js +8 -4
  577. package/build-module/block/edit.js.map +1 -1
  578. package/build-module/block/index.js +1 -1
  579. package/build-module/button/deprecated.js +20 -15
  580. package/build-module/button/deprecated.js.map +1 -1
  581. package/build-module/button/edit.js +2 -3
  582. package/build-module/button/edit.js.map +1 -1
  583. package/build-module/button/save.js +4 -3
  584. package/build-module/button/save.js.map +1 -1
  585. package/build-module/buttons/deprecated.js +6 -5
  586. package/build-module/buttons/deprecated.js.map +1 -1
  587. package/build-module/buttons/edit.js +7 -2
  588. package/build-module/buttons/edit.js.map +1 -1
  589. package/build-module/buttons/edit.native.js +6 -6
  590. package/build-module/buttons/edit.native.js.map +1 -1
  591. package/build-module/buttons/index.js +1 -1
  592. package/build-module/buttons/save.js +2 -1
  593. package/build-module/buttons/save.js.map +1 -1
  594. package/build-module/buttons/transforms.js +1 -1
  595. package/build-module/calendar/edit.js +4 -2
  596. package/build-module/calendar/edit.js.map +1 -1
  597. package/build-module/calendar/index.js +0 -1
  598. package/build-module/calendar/index.js.map +1 -1
  599. package/build-module/categories/edit.js +2 -1
  600. package/build-module/categories/edit.js.map +1 -1
  601. package/build-module/categories/index.js +0 -1
  602. package/build-module/categories/index.js.map +1 -1
  603. package/build-module/code/edit.js +2 -1
  604. package/build-module/code/edit.js.map +1 -1
  605. package/build-module/code/save.js +2 -1
  606. package/build-module/code/save.js.map +1 -1
  607. package/build-module/column/edit.js +2 -1
  608. package/build-module/column/edit.js.map +1 -1
  609. package/build-module/column/edit.native.js +2 -1
  610. package/build-module/column/edit.native.js.map +1 -1
  611. package/build-module/column/index.js +1 -1
  612. package/build-module/column/save.js +2 -1
  613. package/build-module/column/save.js.map +1 -1
  614. package/build-module/columns/edit.js +6 -3
  615. package/build-module/columns/edit.js.map +1 -1
  616. package/build-module/columns/edit.native.js +4 -4
  617. package/build-module/columns/edit.native.js.map +1 -1
  618. package/build-module/columns/index.js +1 -1
  619. package/build-module/columns/save.js +2 -1
  620. package/build-module/columns/save.js.map +1 -1
  621. package/build-module/comment-author-avatar/edit.js +6 -5
  622. package/build-module/comment-author-avatar/edit.js.map +1 -1
  623. package/build-module/comment-author-avatar/index.js +0 -1
  624. package/build-module/comment-author-avatar/index.js.map +1 -1
  625. package/build-module/comment-author-name/edit.js +2 -1
  626. package/build-module/comment-author-name/edit.js.map +1 -1
  627. package/build-module/comment-author-name/index.js +0 -1
  628. package/build-module/comment-author-name/index.js.map +1 -1
  629. package/build-module/comment-content/edit.js +4 -2
  630. package/build-module/comment-content/edit.js.map +1 -1
  631. package/build-module/comment-content/index.js +0 -1
  632. package/build-module/comment-content/index.js.map +1 -1
  633. package/build-module/comment-date/edit.js +2 -1
  634. package/build-module/comment-date/edit.js.map +1 -1
  635. package/build-module/comment-date/index.js +0 -1
  636. package/build-module/comment-date/index.js.map +1 -1
  637. package/build-module/comment-edit-link/edit.js +2 -1
  638. package/build-module/comment-edit-link/edit.js.map +1 -1
  639. package/build-module/comment-edit-link/index.js +0 -1
  640. package/build-module/comment-edit-link/index.js.map +1 -1
  641. package/build-module/comment-reply-link/edit.js +2 -1
  642. package/build-module/comment-reply-link/edit.js.map +1 -1
  643. package/build-module/comment-reply-link/index.js +0 -1
  644. package/build-module/comment-reply-link/index.js.map +1 -1
  645. package/build-module/comment-template/edit.js +10 -7
  646. package/build-module/comment-template/edit.js.map +1 -1
  647. package/build-module/comment-template/index.js +0 -1
  648. package/build-module/comment-template/index.js.map +1 -1
  649. package/build-module/comments/deprecated.js +2 -1
  650. package/build-module/comments/deprecated.js.map +1 -1
  651. package/build-module/comments/edit/comments-legacy.js +2 -1
  652. package/build-module/comments/edit/comments-legacy.js.map +1 -1
  653. package/build-module/comments/edit/index.js +4 -2
  654. package/build-module/comments/edit/index.js.map +1 -1
  655. package/build-module/comments/index.js +0 -1
  656. package/build-module/comments/index.js.map +1 -1
  657. package/build-module/comments/save.js +2 -1
  658. package/build-module/comments/save.js.map +1 -1
  659. package/build-module/comments-pagination/edit.js +2 -1
  660. package/build-module/comments-pagination/edit.js.map +1 -1
  661. package/build-module/comments-pagination/index.js +1 -2
  662. package/build-module/comments-pagination/index.js.map +1 -1
  663. package/build-module/comments-pagination-next/edit.js +4 -4
  664. package/build-module/comments-pagination-next/edit.js.map +1 -1
  665. package/build-module/comments-pagination-next/index.js +0 -1
  666. package/build-module/comments-pagination-next/index.js.map +1 -1
  667. package/build-module/comments-pagination-numbers/edit.js +2 -1
  668. package/build-module/comments-pagination-numbers/edit.js.map +1 -1
  669. package/build-module/comments-pagination-numbers/index.js +0 -1
  670. package/build-module/comments-pagination-numbers/index.js.map +1 -1
  671. package/build-module/comments-pagination-previous/edit.js +4 -4
  672. package/build-module/comments-pagination-previous/edit.js.map +1 -1
  673. package/build-module/comments-pagination-previous/index.js +0 -1
  674. package/build-module/comments-pagination-previous/index.js.map +1 -1
  675. package/build-module/comments-title/edit.js +4 -8
  676. package/build-module/comments-title/edit.js.map +1 -1
  677. package/build-module/cover/deprecated.js +46 -36
  678. package/build-module/cover/deprecated.js.map +1 -1
  679. package/build-module/cover/edit/index.js +8 -6
  680. package/build-module/cover/edit/index.js.map +1 -1
  681. package/build-module/cover/edit/inspector-controls.js +4 -4
  682. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  683. package/build-module/cover/edit/resizable-cover-popover.js +5 -5
  684. package/build-module/cover/edit/resizable-cover-popover.js.map +1 -1
  685. package/build-module/cover/edit.native.js +12 -10
  686. package/build-module/cover/edit.native.js.map +1 -1
  687. package/build-module/cover/index.js +1 -1
  688. package/build-module/cover/save.js +9 -7
  689. package/build-module/cover/save.js.map +1 -1
  690. package/build-module/cover/transforms.js +1 -1
  691. package/build-module/cover/transforms.js.map +1 -1
  692. package/build-module/details/edit.js +3 -4
  693. package/build-module/details/edit.js.map +1 -1
  694. package/build-module/details/index.js +1 -1
  695. package/build-module/details/init.js +6 -0
  696. package/build-module/details/init.js.map +1 -0
  697. package/build-module/details/save.js +2 -3
  698. package/build-module/details/save.js.map +1 -1
  699. package/build-module/embed/deprecated.js +4 -3
  700. package/build-module/embed/deprecated.js.map +1 -1
  701. package/build-module/embed/edit.js +6 -3
  702. package/build-module/embed/edit.js.map +1 -1
  703. package/build-module/embed/edit.native.js +6 -3
  704. package/build-module/embed/edit.native.js.map +1 -1
  705. package/build-module/embed/save.js +4 -3
  706. package/build-module/embed/save.js.map +1 -1
  707. package/build-module/embed/wp-embed-preview.js +4 -4
  708. package/build-module/embed/wp-embed-preview.js.map +1 -1
  709. package/build-module/embed/wp-embed-preview.native.js +4 -4
  710. package/build-module/embed/wp-embed-preview.native.js.map +1 -1
  711. package/build-module/file/deprecated.js +6 -3
  712. package/build-module/file/deprecated.js.map +1 -1
  713. package/build-module/file/edit.js +4 -2
  714. package/build-module/file/edit.js.map +1 -1
  715. package/build-module/file/index.js +1 -1
  716. package/build-module/file/save.js +2 -1
  717. package/build-module/file/save.js.map +1 -1
  718. package/build-module/file/view.js +6 -0
  719. package/build-module/file/view.js.map +1 -0
  720. package/build-module/footnotes/edit.js +48 -0
  721. package/build-module/footnotes/edit.js.map +1 -0
  722. package/build-module/footnotes/format.js +126 -0
  723. package/build-module/footnotes/format.js.map +1 -0
  724. package/build-module/footnotes/index.js +48 -0
  725. package/build-module/footnotes/index.js.map +1 -0
  726. package/build-module/freeform/edit.js +6 -3
  727. package/build-module/freeform/edit.js.map +1 -1
  728. package/build-module/freeform/edit.native.js +2 -3
  729. package/build-module/freeform/edit.native.js.map +1 -1
  730. package/build-module/freeform/modal.js +2 -1
  731. package/build-module/freeform/modal.js.map +1 -1
  732. package/build-module/gallery/deprecated.js +6 -4
  733. package/build-module/gallery/deprecated.js.map +1 -1
  734. package/build-module/gallery/edit-wrapper.js +4 -2
  735. package/build-module/gallery/edit-wrapper.js.map +1 -1
  736. package/build-module/gallery/edit.js +16 -12
  737. package/build-module/gallery/edit.js.map +1 -1
  738. package/build-module/gallery/gallery.js +2 -3
  739. package/build-module/gallery/gallery.js.map +1 -1
  740. package/build-module/gallery/gallery.native.js +3 -2
  741. package/build-module/gallery/gallery.native.js.map +1 -1
  742. package/build-module/gallery/index.js +1 -1
  743. package/build-module/gallery/save.js +2 -1
  744. package/build-module/gallery/save.js.map +1 -1
  745. package/build-module/gallery/shared-icon.native.js +4 -4
  746. package/build-module/gallery/shared-icon.native.js.map +1 -1
  747. package/build-module/gallery/v1/edit.js +8 -8
  748. package/build-module/gallery/v1/edit.js.map +1 -1
  749. package/build-module/gallery/v1/gallery.js +7 -6
  750. package/build-module/gallery/v1/gallery.js.map +1 -1
  751. package/build-module/gallery/v1/save.js +4 -3
  752. package/build-module/gallery/v1/save.js.map +1 -1
  753. package/build-module/group/deprecated.js +5 -3
  754. package/build-module/group/deprecated.js.map +1 -1
  755. package/build-module/group/edit.js +4 -1
  756. package/build-module/group/edit.js.map +1 -1
  757. package/build-module/group/index.js +1 -1
  758. package/build-module/group/placeholder.js +2 -1
  759. package/build-module/group/placeholder.js.map +1 -1
  760. package/build-module/group/save.js +2 -1
  761. package/build-module/group/save.js.map +1 -1
  762. package/build-module/heading/deprecated.js +8 -6
  763. package/build-module/heading/deprecated.js.map +1 -1
  764. package/build-module/heading/edit.js +9 -9
  765. package/build-module/heading/edit.js.map +1 -1
  766. package/build-module/heading/save.js +4 -3
  767. package/build-module/heading/save.js.map +1 -1
  768. package/build-module/home-link/edit.js +2 -1
  769. package/build-module/home-link/edit.js.map +1 -1
  770. package/build-module/home-link/index.js +0 -1
  771. package/build-module/home-link/index.js.map +1 -1
  772. package/build-module/html/edit.js +4 -3
  773. package/build-module/html/edit.js.map +1 -1
  774. package/build-module/image/deprecated.js +14 -11
  775. package/build-module/image/deprecated.js.map +1 -1
  776. package/build-module/image/edit.js +3 -6
  777. package/build-module/image/edit.js.map +1 -1
  778. package/build-module/image/edit.native.js +8 -7
  779. package/build-module/image/edit.native.js.map +1 -1
  780. package/build-module/image/image.js +109 -52
  781. package/build-module/image/image.js.map +1 -1
  782. package/build-module/image/index.js +6 -0
  783. package/build-module/image/index.js.map +1 -1
  784. package/build-module/image/interactivity.js +119 -6
  785. package/build-module/image/interactivity.js.map +1 -1
  786. package/build-module/image/save.js +10 -4
  787. package/build-module/image/save.js.map +1 -1
  788. package/build-module/image/utils.js +16 -0
  789. package/build-module/image/utils.js.map +1 -1
  790. package/build-module/index.js +2 -1
  791. package/build-module/index.js.map +1 -1
  792. package/build-module/latest-comments/edit.js +2 -1
  793. package/build-module/latest-comments/edit.js.map +1 -1
  794. package/build-module/latest-comments/index.js +0 -1
  795. package/build-module/latest-comments/index.js.map +1 -1
  796. package/build-module/latest-posts/deprecated.js +0 -1
  797. package/build-module/latest-posts/deprecated.js.map +1 -1
  798. package/build-module/latest-posts/edit.js +15 -7
  799. package/build-module/latest-posts/edit.js.map +1 -1
  800. package/build-module/latest-posts/edit.native.js +4 -4
  801. package/build-module/latest-posts/edit.native.js.map +1 -1
  802. package/build-module/latest-posts/index.js +0 -1
  803. package/build-module/latest-posts/index.js.map +1 -1
  804. package/build-module/list/deprecated.js +12 -10
  805. package/build-module/list/deprecated.js.map +1 -1
  806. package/build-module/list/edit.js +4 -4
  807. package/build-module/list/edit.js.map +1 -1
  808. package/build-module/list/ordered-list-settings.js +26 -2
  809. package/build-module/list/ordered-list-settings.js.map +1 -1
  810. package/build-module/list/save.js +6 -5
  811. package/build-module/list/save.js.map +1 -1
  812. package/build-module/list/tag-name.js +4 -4
  813. package/build-module/list/tag-name.js.map +1 -1
  814. package/build-module/list/tag-name.native.js +4 -4
  815. package/build-module/list/tag-name.native.js.map +1 -1
  816. package/build-module/list-item/edit.js +2 -1
  817. package/build-module/list-item/edit.js.map +1 -1
  818. package/build-module/list-item/edit.native.js +2 -1
  819. package/build-module/list-item/edit.native.js.map +1 -1
  820. package/build-module/list-item/save.js +2 -1
  821. package/build-module/list-item/save.js.map +1 -1
  822. package/build-module/{private-apis.js → lock-unlock.js} +1 -1
  823. package/build-module/lock-unlock.js.map +1 -0
  824. package/build-module/loginout/edit.js +4 -3
  825. package/build-module/loginout/edit.js.map +1 -1
  826. package/build-module/loginout/index.js +0 -1
  827. package/build-module/loginout/index.js.map +1 -1
  828. package/build-module/media-text/deprecated.js +43 -33
  829. package/build-module/media-text/deprecated.js.map +1 -1
  830. package/build-module/media-text/edit.js +6 -3
  831. package/build-module/media-text/edit.js.map +1 -1
  832. package/build-module/media-text/media-container.js +8 -6
  833. package/build-module/media-text/media-container.js.map +1 -1
  834. package/build-module/media-text/media-container.native.js +8 -7
  835. package/build-module/media-text/media-container.native.js.map +1 -1
  836. package/build-module/media-text/save.js +17 -13
  837. package/build-module/media-text/save.js.map +1 -1
  838. package/build-module/missing/edit.js +4 -3
  839. package/build-module/missing/edit.js.map +1 -1
  840. package/build-module/more/edit.js +2 -1
  841. package/build-module/more/edit.js.map +1 -1
  842. package/build-module/navigation/constants.js +6 -0
  843. package/build-module/navigation/constants.js.map +1 -1
  844. package/build-module/navigation/deprecated.js +1 -1
  845. package/build-module/navigation/deprecated.js.map +1 -1
  846. package/build-module/navigation/edit/index.js +34 -21
  847. package/build-module/navigation/edit/index.js.map +1 -1
  848. package/build-module/navigation/edit/inner-blocks.js +2 -1
  849. package/build-module/navigation/edit/inner-blocks.js.map +1 -1
  850. package/build-module/navigation/edit/leaf-more-menu.js +5 -6
  851. package/build-module/navigation/edit/leaf-more-menu.js.map +1 -1
  852. package/build-module/navigation/edit/menu-inspector-controls.js +12 -16
  853. package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
  854. package/build-module/navigation/edit/navigation-menu-selector.js +15 -7
  855. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  856. package/build-module/navigation/edit/responsive-wrapper.js +2 -1
  857. package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
  858. package/build-module/navigation/edit/unsaved-inner-blocks.js +4 -6
  859. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  860. package/build-module/navigation/index.js +2 -3
  861. package/build-module/navigation/index.js.map +1 -1
  862. package/build-module/navigation/use-navigation-menu.js +8 -7
  863. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  864. package/build-module/navigation/view-modal.js +58 -0
  865. package/build-module/navigation/view-modal.js.map +1 -0
  866. package/build-module/navigation/view.js +59 -0
  867. package/build-module/navigation/view.js.map +1 -0
  868. package/build-module/navigation-link/edit.js +4 -2
  869. package/build-module/navigation-link/edit.js.map +1 -1
  870. package/build-module/navigation-submenu/edit.js +4 -2
  871. package/build-module/navigation-submenu/edit.js.map +1 -1
  872. package/build-module/nextpage/edit.js +2 -1
  873. package/build-module/nextpage/edit.js.map +1 -1
  874. package/build-module/page-list/edit.js +12 -6
  875. package/build-module/page-list/edit.js.map +1 -1
  876. package/build-module/page-list/index.js +0 -1
  877. package/build-module/page-list/index.js.map +1 -1
  878. package/build-module/page-list-item/edit.js +2 -1
  879. package/build-module/page-list-item/edit.js.map +1 -1
  880. package/build-module/paragraph/deprecated.js +5 -4
  881. package/build-module/paragraph/deprecated.js.map +1 -1
  882. package/build-module/paragraph/edit.js +4 -5
  883. package/build-module/paragraph/edit.js.map +1 -1
  884. package/build-module/paragraph/save.js +5 -4
  885. package/build-module/paragraph/save.js.map +1 -1
  886. package/build-module/pattern/edit.js +8 -33
  887. package/build-module/pattern/edit.js.map +1 -1
  888. package/build-module/pattern/index.js +4 -11
  889. package/build-module/pattern/index.js.map +1 -1
  890. package/build-module/post-author/edit.js +4 -2
  891. package/build-module/post-author/edit.js.map +1 -1
  892. package/build-module/post-author/index.js +0 -1
  893. package/build-module/post-author/index.js.map +1 -1
  894. package/build-module/post-author-biography/edit.js +2 -3
  895. package/build-module/post-author-biography/edit.js.map +1 -1
  896. package/build-module/post-author-biography/index.js +0 -1
  897. package/build-module/post-author-biography/index.js.map +1 -1
  898. package/build-module/post-author-name/edit.js +2 -1
  899. package/build-module/post-author-name/edit.js.map +1 -1
  900. package/build-module/post-author-name/index.js +0 -1
  901. package/build-module/post-author-name/index.js.map +1 -1
  902. package/build-module/post-comment/edit.js +4 -2
  903. package/build-module/post-comment/edit.js.map +1 -1
  904. package/build-module/post-comment/save.js +2 -1
  905. package/build-module/post-comment/save.js.map +1 -1
  906. package/build-module/post-comments-count/edit.js +2 -3
  907. package/build-module/post-comments-count/edit.js.map +1 -1
  908. package/build-module/post-comments-count/index.js +0 -1
  909. package/build-module/post-comments-count/index.js.map +1 -1
  910. package/build-module/post-comments-form/edit.js +2 -1
  911. package/build-module/post-comments-form/edit.js.map +1 -1
  912. package/build-module/post-comments-form/index.js +0 -1
  913. package/build-module/post-comments-form/index.js.map +1 -1
  914. package/build-module/post-comments-link/edit.js +2 -1
  915. package/build-module/post-comments-link/edit.js.map +1 -1
  916. package/build-module/post-comments-link/index.js +0 -1
  917. package/build-module/post-comments-link/index.js.map +1 -1
  918. package/build-module/post-content/edit.js +11 -7
  919. package/build-module/post-content/edit.js.map +1 -1
  920. package/build-module/post-content/index.js +1 -2
  921. package/build-module/post-content/index.js.map +1 -1
  922. package/build-module/post-date/edit.js +2 -1
  923. package/build-module/post-date/edit.js.map +1 -1
  924. package/build-module/post-date/index.js +0 -1
  925. package/build-module/post-date/index.js.map +1 -1
  926. package/build-module/post-excerpt/edit.js +6 -3
  927. package/build-module/post-excerpt/edit.js.map +1 -1
  928. package/build-module/post-excerpt/index.js +0 -1
  929. package/build-module/post-excerpt/index.js.map +1 -1
  930. package/build-module/post-featured-image/edit.js +4 -2
  931. package/build-module/post-featured-image/edit.js.map +1 -1
  932. package/build-module/post-featured-image/index.js +0 -1
  933. package/build-module/post-featured-image/index.js.map +1 -1
  934. package/build-module/post-featured-image/overlay.js +4 -4
  935. package/build-module/post-featured-image/overlay.js.map +1 -1
  936. package/build-module/post-navigation-link/edit.js +2 -1
  937. package/build-module/post-navigation-link/edit.js.map +1 -1
  938. package/build-module/post-navigation-link/index.js +0 -1
  939. package/build-module/post-navigation-link/index.js.map +1 -1
  940. package/build-module/post-template/edit.js +14 -8
  941. package/build-module/post-template/edit.js.map +1 -1
  942. package/build-module/post-template/index.js +1 -2
  943. package/build-module/post-template/index.js.map +1 -1
  944. package/build-module/post-terms/edit.js +4 -8
  945. package/build-module/post-terms/edit.js.map +1 -1
  946. package/build-module/post-terms/hooks.js +9 -5
  947. package/build-module/post-terms/hooks.js.map +1 -1
  948. package/build-module/post-terms/index.js +0 -1
  949. package/build-module/post-terms/index.js.map +1 -1
  950. package/build-module/post-time-to-read/edit.js +2 -1
  951. package/build-module/post-time-to-read/edit.js.map +1 -1
  952. package/build-module/post-time-to-read/init.js +6 -0
  953. package/build-module/post-time-to-read/init.js.map +1 -0
  954. package/build-module/post-title/edit.js +15 -13
  955. package/build-module/post-title/edit.js.map +1 -1
  956. package/build-module/post-title/index.js +0 -1
  957. package/build-module/post-title/index.js.map +1 -1
  958. package/build-module/preformatted/edit.js +4 -5
  959. package/build-module/preformatted/edit.js.map +1 -1
  960. package/build-module/preformatted/edit.native.js +2 -1
  961. package/build-module/preformatted/edit.native.js.map +1 -1
  962. package/build-module/preformatted/save.js +2 -1
  963. package/build-module/preformatted/save.js.map +1 -1
  964. package/build-module/pullquote/deprecated.js +10 -8
  965. package/build-module/pullquote/deprecated.js.map +1 -1
  966. package/build-module/pullquote/edit.js +2 -1
  967. package/build-module/pullquote/edit.js.map +1 -1
  968. package/build-module/pullquote/edit.native.js +2 -1
  969. package/build-module/pullquote/edit.native.js.map +1 -1
  970. package/build-module/pullquote/save.js +5 -4
  971. package/build-module/pullquote/save.js.map +1 -1
  972. package/build-module/query/deprecated.js +15 -9
  973. package/build-module/query/deprecated.js.map +1 -1
  974. package/build-module/query/edit/index.js +2 -3
  975. package/build-module/query/edit/index.js.map +1 -1
  976. package/build-module/query/edit/inspector-controls/index.js +3 -2
  977. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  978. package/build-module/query/edit/query-content.js +19 -6
  979. package/build-module/query/edit/query-content.js.map +1 -1
  980. package/build-module/query/edit/query-placeholder.js +4 -2
  981. package/build-module/query/edit/query-placeholder.js.map +1 -1
  982. package/build-module/query/index.js +1 -2
  983. package/build-module/query/index.js.map +1 -1
  984. package/build-module/query/save.js +2 -1
  985. package/build-module/query/save.js.map +1 -1
  986. package/build-module/query/utils.js +1 -2
  987. package/build-module/query/utils.js.map +1 -1
  988. package/build-module/query-no-results/edit.js +2 -1
  989. package/build-module/query-no-results/edit.js.map +1 -1
  990. package/build-module/query-no-results/index.js +0 -1
  991. package/build-module/query-no-results/index.js.map +1 -1
  992. package/build-module/query-pagination/deprecated.js +2 -1
  993. package/build-module/query-pagination/deprecated.js.map +1 -1
  994. package/build-module/query-pagination/edit.js +2 -1
  995. package/build-module/query-pagination/edit.js.map +1 -1
  996. package/build-module/query-pagination/index.js +1 -2
  997. package/build-module/query-pagination/index.js.map +1 -1
  998. package/build-module/query-pagination-next/edit.js +4 -4
  999. package/build-module/query-pagination-next/edit.js.map +1 -1
  1000. package/build-module/query-pagination-next/index.js +0 -1
  1001. package/build-module/query-pagination-next/index.js.map +1 -1
  1002. package/build-module/query-pagination-numbers/edit.js +2 -1
  1003. package/build-module/query-pagination-numbers/edit.js.map +1 -1
  1004. package/build-module/query-pagination-numbers/index.js +1 -2
  1005. package/build-module/query-pagination-numbers/index.js.map +1 -1
  1006. package/build-module/query-pagination-previous/edit.js +4 -4
  1007. package/build-module/query-pagination-previous/edit.js.map +1 -1
  1008. package/build-module/query-pagination-previous/index.js +0 -1
  1009. package/build-module/query-pagination-previous/index.js.map +1 -1
  1010. package/build-module/query-title/edit.js +8 -10
  1011. package/build-module/query-title/edit.js.map +1 -1
  1012. package/build-module/query-title/index.js +0 -1
  1013. package/build-module/query-title/index.js.map +1 -1
  1014. package/build-module/quote/deprecated.js +4 -3
  1015. package/build-module/quote/deprecated.js.map +1 -1
  1016. package/build-module/quote/edit.js +7 -6
  1017. package/build-module/quote/edit.js.map +1 -1
  1018. package/build-module/quote/save.js +4 -3
  1019. package/build-module/quote/save.js.map +1 -1
  1020. package/build-module/read-more/edit.js +4 -4
  1021. package/build-module/read-more/edit.js.map +1 -1
  1022. package/build-module/read-more/index.js +0 -1
  1023. package/build-module/read-more/index.js.map +1 -1
  1024. package/build-module/rss/edit.js +4 -2
  1025. package/build-module/rss/edit.js.map +1 -1
  1026. package/build-module/rss/index.js +0 -1
  1027. package/build-module/rss/index.js.map +1 -1
  1028. package/build-module/search/edit.js +4 -3
  1029. package/build-module/search/edit.js.map +1 -1
  1030. package/build-module/search/edit.native.js +6 -7
  1031. package/build-module/search/edit.native.js.map +1 -1
  1032. package/build-module/search/index.js +0 -1
  1033. package/build-module/search/index.js.map +1 -1
  1034. package/build-module/separator/deprecated.js +5 -4
  1035. package/build-module/separator/deprecated.js.map +1 -1
  1036. package/build-module/separator/edit.js +5 -4
  1037. package/build-module/separator/edit.js.map +1 -1
  1038. package/build-module/separator/save.js +5 -4
  1039. package/build-module/separator/save.js.map +1 -1
  1040. package/build-module/shortcode/edit.js +4 -3
  1041. package/build-module/shortcode/edit.js.map +1 -1
  1042. package/build-module/site-logo/edit.js +10 -9
  1043. package/build-module/site-logo/edit.js.map +1 -1
  1044. package/build-module/site-logo/index.js +0 -1
  1045. package/build-module/site-logo/index.js.map +1 -1
  1046. package/build-module/site-tagline/edit.js +5 -4
  1047. package/build-module/site-tagline/edit.js.map +1 -1
  1048. package/build-module/site-tagline/icon.js +1 -4
  1049. package/build-module/site-tagline/icon.js.map +1 -1
  1050. package/build-module/site-tagline/index.js +0 -1
  1051. package/build-module/site-tagline/index.js.map +1 -1
  1052. package/build-module/site-title/edit/index.js +9 -10
  1053. package/build-module/site-title/edit/index.js.map +1 -1
  1054. package/build-module/site-title/index.js +0 -1
  1055. package/build-module/site-title/index.js.map +1 -1
  1056. package/build-module/social-link/edit.js +2 -1
  1057. package/build-module/social-link/edit.js.map +1 -1
  1058. package/build-module/social-link/index.js +0 -1
  1059. package/build-module/social-link/index.js.map +1 -1
  1060. package/build-module/social-links/deprecated.js +5 -4
  1061. package/build-module/social-links/deprecated.js.map +1 -1
  1062. package/build-module/social-links/edit.js +6 -5
  1063. package/build-module/social-links/edit.js.map +1 -1
  1064. package/build-module/social-links/index.js +1 -1
  1065. package/build-module/social-links/save.js +2 -1
  1066. package/build-module/social-links/save.js.map +1 -1
  1067. package/build-module/spacer/deprecated.js +8 -7
  1068. package/build-module/spacer/deprecated.js.map +1 -1
  1069. package/build-module/spacer/edit.js +10 -9
  1070. package/build-module/spacer/edit.js.map +1 -1
  1071. package/build-module/spacer/edit.native.js +4 -4
  1072. package/build-module/spacer/edit.native.js.map +1 -1
  1073. package/build-module/spacer/save.js +21 -11
  1074. package/build-module/spacer/save.js.map +1 -1
  1075. package/build-module/spacer/save.native.js +8 -7
  1076. package/build-module/spacer/save.native.js.map +1 -1
  1077. package/build-module/table/deprecated.js +4 -2
  1078. package/build-module/table/deprecated.js.map +1 -1
  1079. package/build-module/table/edit.js +6 -4
  1080. package/build-module/table/edit.js.map +1 -1
  1081. package/build-module/table/save.js +2 -1
  1082. package/build-module/table/save.js.map +1 -1
  1083. package/build-module/table-of-contents/edit.js +4 -2
  1084. package/build-module/table-of-contents/edit.js.map +1 -1
  1085. package/build-module/table-of-contents/save.js +2 -1
  1086. package/build-module/table-of-contents/save.js.map +1 -1
  1087. package/build-module/tag-cloud/edit.js +2 -1
  1088. package/build-module/tag-cloud/edit.js.map +1 -1
  1089. package/build-module/tag-cloud/index.js +0 -1
  1090. package/build-module/tag-cloud/index.js.map +1 -1
  1091. package/build-module/template-part/edit/index.js +8 -4
  1092. package/build-module/template-part/edit/index.js.map +1 -1
  1093. package/build-module/template-part/edit/inner-blocks.js +3 -2
  1094. package/build-module/template-part/edit/inner-blocks.js.map +1 -1
  1095. package/build-module/template-part/index.js +0 -1
  1096. package/build-module/template-part/index.js.map +1 -1
  1097. package/build-module/term-description/edit.js +2 -1
  1098. package/build-module/term-description/edit.js.map +1 -1
  1099. package/build-module/term-description/index.js +0 -1
  1100. package/build-module/term-description/index.js.map +1 -1
  1101. package/build-module/text-columns/edit.js +4 -3
  1102. package/build-module/text-columns/edit.js.map +1 -1
  1103. package/build-module/text-columns/save.js +4 -3
  1104. package/build-module/text-columns/save.js.map +1 -1
  1105. package/build-module/utils/interactivity/directives.js +4 -4
  1106. package/build-module/utils/interactivity/directives.js.map +1 -1
  1107. package/build-module/utils/interactivity/index.js +1 -3
  1108. package/build-module/utils/interactivity/index.js.map +1 -1
  1109. package/build-module/utils/migrate-font-family.js +1 -1
  1110. package/build-module/utils/migrate-font-family.js.map +1 -1
  1111. package/build-module/verse/deprecated.js +4 -3
  1112. package/build-module/verse/deprecated.js.map +1 -1
  1113. package/build-module/verse/edit.js +4 -5
  1114. package/build-module/verse/edit.js.map +1 -1
  1115. package/build-module/verse/save.js +4 -3
  1116. package/build-module/verse/save.js.map +1 -1
  1117. package/build-module/video/deprecated.js +2 -1
  1118. package/build-module/video/deprecated.js.map +1 -1
  1119. package/build-module/video/edit.js +4 -2
  1120. package/build-module/video/edit.js.map +1 -1
  1121. package/build-module/video/edit.native.js +8 -7
  1122. package/build-module/video/edit.native.js.map +1 -1
  1123. package/build-module/video/save.js +2 -1
  1124. package/build-module/video/save.js.map +1 -1
  1125. package/build-module/video/tracks.js +4 -4
  1126. package/build-module/video/tracks.js.map +1 -1
  1127. package/build-style/avatar/style-rtl.css +1 -0
  1128. package/build-style/avatar/style.css +1 -0
  1129. package/build-style/editor-rtl.css +0 -17
  1130. package/build-style/editor.css +0 -17
  1131. package/build-style/footnotes/style-rtl.css +106 -0
  1132. package/build-style/footnotes/style.css +106 -0
  1133. package/build-style/image/style-rtl.css +71 -11
  1134. package/build-style/image/style.css +71 -11
  1135. package/build-style/navigation/editor-rtl.css +0 -17
  1136. package/build-style/navigation/editor.css +0 -17
  1137. package/build-style/style-rtl.css +91 -12
  1138. package/build-style/style.css +91 -12
  1139. package/package.json +33 -32
  1140. package/src/archives/block.json +0 -1
  1141. package/src/avatar/block.json +1 -2
  1142. package/src/avatar/style.scss +1 -0
  1143. package/src/block/block.json +1 -1
  1144. package/src/block/edit.js +1 -0
  1145. package/src/block/test/__snapshots__/transforms.native.js.snap +2 -2
  1146. package/src/block/test/edit.native.js +5 -7
  1147. package/src/block/test/transforms.native.js +1 -1
  1148. package/src/buttons/block.json +1 -1
  1149. package/src/buttons/edit.js +2 -2
  1150. package/src/buttons/edit.native.js +7 -6
  1151. package/src/buttons/test/__snapshots__/edit.native.js.snap +6 -0
  1152. package/src/buttons/test/edit.native.js +30 -2
  1153. package/src/calendar/block.json +0 -1
  1154. package/src/categories/block.json +0 -1
  1155. package/src/column/block.json +1 -1
  1156. package/src/columns/block.json +1 -1
  1157. package/src/columns/test/edit.native.js +36 -32
  1158. package/src/comment-author-avatar/block.json +0 -1
  1159. package/src/comment-author-name/block.json +0 -1
  1160. package/src/comment-content/block.json +0 -1
  1161. package/src/comment-date/block.json +0 -1
  1162. package/src/comment-edit-link/block.json +0 -1
  1163. package/src/comment-reply-link/block.json +0 -1
  1164. package/src/comment-template/block.json +0 -1
  1165. package/src/comments/block.json +0 -1
  1166. package/src/comments-pagination/block.json +1 -2
  1167. package/src/comments-pagination-next/block.json +0 -1
  1168. package/src/comments-pagination-numbers/block.json +0 -1
  1169. package/src/comments-pagination-previous/block.json +0 -1
  1170. package/src/comments-title/edit.js +2 -6
  1171. package/src/cover/block.json +1 -1
  1172. package/src/cover/edit/resizable-cover-popover.js +1 -1
  1173. package/src/cover/test/edit.native.js +45 -31
  1174. package/src/cover/transforms.js +1 -1
  1175. package/src/details/block.json +1 -1
  1176. package/src/details/edit.js +12 -9
  1177. package/src/details/init.js +6 -0
  1178. package/src/embed/test/index.native.js +38 -44
  1179. package/src/file/block.json +1 -1
  1180. package/src/file/index.php +18 -1
  1181. package/src/file/view.js +9 -0
  1182. package/src/footnotes/block.json +18 -0
  1183. package/src/footnotes/edit.js +52 -0
  1184. package/src/footnotes/format.js +112 -0
  1185. package/src/footnotes/index.js +29 -0
  1186. package/src/footnotes/index.php +78 -0
  1187. package/src/footnotes/style.scss +18 -0
  1188. package/src/gallery/block.json +1 -1
  1189. package/src/gallery/edit.js +4 -1
  1190. package/src/gallery/gallery.native.js +1 -1
  1191. package/src/gallery/test/__snapshots__/index.native.js.snap +6 -0
  1192. package/src/gallery/test/index.native.js +23 -1
  1193. package/src/group/block.json +1 -1
  1194. package/src/group/deprecated.js +1 -1
  1195. package/src/group/test/edit.native.js +2 -4
  1196. package/src/heading/edit.js +2 -2
  1197. package/src/home-link/block.json +0 -1
  1198. package/src/image/block.json +6 -0
  1199. package/src/image/edit.js +1 -5
  1200. package/src/image/image.js +152 -72
  1201. package/src/image/interactivity.js +155 -13
  1202. package/src/image/save.js +7 -1
  1203. package/src/image/style.scss +79 -9
  1204. package/src/image/test/edit.native.js +3 -13
  1205. package/src/image/utils.js +16 -0
  1206. package/src/index.js +2 -0
  1207. package/src/latest-comments/block.json +0 -1
  1208. package/src/latest-posts/block.json +0 -1
  1209. package/src/latest-posts/edit.js +17 -9
  1210. package/src/latest-posts/index.php +8 -0
  1211. package/src/list/ordered-list-settings.js +20 -2
  1212. package/src/list/test/edit.native.js +5 -0
  1213. package/src/loginout/block.json +0 -1
  1214. package/src/media-text/edit.js +1 -1
  1215. package/src/navigation/block.json +2 -3
  1216. package/src/navigation/constants.js +11 -0
  1217. package/src/navigation/deprecated.js +1 -1
  1218. package/src/navigation/edit/index.js +15 -6
  1219. package/src/navigation/edit/leaf-more-menu.js +1 -2
  1220. package/src/navigation/edit/menu-inspector-controls.js +24 -26
  1221. package/src/navigation/edit/navigation-menu-selector.js +17 -7
  1222. package/src/navigation/edit/unsaved-inner-blocks.js +6 -6
  1223. package/src/navigation/editor.scss +0 -24
  1224. package/src/navigation/index.php +85 -70
  1225. package/src/navigation/test/use-navigation-menu.js +15 -3
  1226. package/src/navigation/use-navigation-menu.js +11 -8
  1227. package/src/navigation/view-modal.js +78 -0
  1228. package/src/navigation/view.js +74 -0
  1229. package/src/page-list/block.json +0 -1
  1230. package/src/paragraph/test/__snapshots__/edit.native.js.snap +39 -0
  1231. package/src/paragraph/test/edit.native.js +3 -3
  1232. package/src/pattern/block.json +1 -5
  1233. package/src/pattern/edit.js +14 -40
  1234. package/src/pattern/index.js +4 -5
  1235. package/src/pattern/index.php +1 -13
  1236. package/src/post-author/block.json +0 -1
  1237. package/src/post-author/edit.js +3 -3
  1238. package/src/post-author-biography/block.json +0 -1
  1239. package/src/post-author-name/block.json +0 -1
  1240. package/src/post-comments-count/block.json +0 -1
  1241. package/src/post-comments-form/block.json +0 -1
  1242. package/src/post-comments-link/block.json +0 -1
  1243. package/src/post-content/block.json +1 -2
  1244. package/src/post-date/block.json +0 -1
  1245. package/src/post-excerpt/block.json +0 -1
  1246. package/src/post-featured-image/block.json +0 -1
  1247. package/src/post-navigation-link/block.json +0 -1
  1248. package/src/post-template/block.json +1 -2
  1249. package/src/post-template/edit.js +4 -1
  1250. package/src/post-template/index.php +5 -0
  1251. package/src/post-terms/block.json +0 -1
  1252. package/src/post-terms/edit.js +8 -7
  1253. package/src/post-terms/hooks.js +3 -3
  1254. package/src/post-time-to-read/init.js +6 -0
  1255. package/src/post-title/block.json +0 -1
  1256. package/src/post-title/edit.js +4 -4
  1257. package/src/post-title/index.php +1 -1
  1258. package/src/preformatted/test/edit.native.js +1 -13
  1259. package/src/query/block.json +1 -2
  1260. package/src/query/deprecated.js +7 -5
  1261. package/src/query/edit/inspector-controls/index.js +1 -1
  1262. package/src/query/edit/query-content.js +13 -4
  1263. package/src/query-no-results/block.json +0 -1
  1264. package/src/query-pagination/block.json +1 -2
  1265. package/src/query-pagination-next/block.json +0 -1
  1266. package/src/query-pagination-numbers/block.json +1 -2
  1267. package/src/query-pagination-previous/block.json +0 -1
  1268. package/src/query-title/block.json +0 -1
  1269. package/src/query-title/edit.js +2 -6
  1270. package/src/read-more/block.json +0 -1
  1271. package/src/rss/block.json +0 -1
  1272. package/src/search/block.json +0 -1
  1273. package/src/search/edit.js +3 -3
  1274. package/src/site-logo/block.json +0 -1
  1275. package/src/site-tagline/block.json +0 -1
  1276. package/src/site-tagline/icon.js +1 -2
  1277. package/src/site-title/block.json +0 -1
  1278. package/src/site-title/edit/index.js +5 -6
  1279. package/src/social-link/block.json +0 -1
  1280. package/src/social-links/block.json +1 -1
  1281. package/src/spacer/save.js +7 -2
  1282. package/src/spacer/test/index.native.js +33 -29
  1283. package/src/style.scss +1 -0
  1284. package/src/tag-cloud/block.json +0 -1
  1285. package/src/template-part/block.json +0 -1
  1286. package/src/template-part/edit/inner-blocks.js +1 -1
  1287. package/src/template-part/index.php +18 -11
  1288. package/src/term-description/block.json +0 -1
  1289. package/src/utils/interactivity/index.js +0 -2
  1290. package/src/utils/migrate-font-family.js +1 -1
  1291. package/build/heading/heading-level-dropdown.js +0 -81
  1292. package/build/heading/heading-level-dropdown.js.map +0 -1
  1293. package/build/heading/heading-level-dropdown.native.js +0 -72
  1294. package/build/heading/heading-level-dropdown.native.js.map +0 -1
  1295. package/build/pattern/v1/edit.js +0 -56
  1296. package/build/pattern/v1/edit.js.map +0 -1
  1297. package/build/private-apis.js.map +0 -1
  1298. package/build/site-title/edit/level-icon.js +0 -40
  1299. package/build/site-title/edit/level-icon.js.map +0 -1
  1300. package/build/site-title/edit/level-toolbar.js +0 -51
  1301. package/build/site-title/edit/level-toolbar.js.map +0 -1
  1302. package/build-module/heading/heading-level-dropdown.js +0 -69
  1303. package/build-module/heading/heading-level-dropdown.js.map +0 -1
  1304. package/build-module/heading/heading-level-dropdown.native.js +0 -60
  1305. package/build-module/heading/heading-level-dropdown.native.js.map +0 -1
  1306. package/build-module/pattern/v1/edit.js +0 -47
  1307. package/build-module/pattern/v1/edit.js.map +0 -1
  1308. package/build-module/private-apis.js.map +0 -1
  1309. package/build-module/site-title/edit/level-icon.js +0 -31
  1310. package/build-module/site-title/edit/level-icon.js.map +0 -1
  1311. package/build-module/site-title/edit/level-toolbar.js +0 -39
  1312. package/build-module/site-title/edit/level-toolbar.js.map +0 -1
  1313. package/src/heading/heading-level-dropdown.js +0 -69
  1314. package/src/heading/heading-level-dropdown.native.js +0 -63
  1315. package/src/pattern/v1/edit.js +0 -57
  1316. package/src/site-title/edit/level-icon.js +0 -28
  1317. package/src/site-title/edit/level-toolbar.js +0 -34
  1318. /package/src/{private-apis.js → lock-unlock.js} +0 -0
@@ -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,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,oBAAoB,GAAKC,aAAF,IAAqB;AACjD;AACA,QAAKA,aAAa,GAAGJ,aAArB,EAAqC;AACpC,YAAMK,SAAS,GAAG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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"]}
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/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WAAW,CAAC7B,MAAnB,EAA4B;AAC3B,WAAO,sCAAQW;AAAR,OAAuB,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"]}
@@ -34,7 +34,6 @@ const metadata = {
34
34
  usesContext: ["postId"],
35
35
  supports: {
36
36
  align: true,
37
- anchor: true,
38
37
  html: false,
39
38
  reusable: false,
40
39
  spacing: {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-template/index.js"],"names":["name","metadata","settings","icon","edit","save","init"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAEA;;AACA;;AAXA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,aADuB;AAEvBC,EAAAA,IAAI,EAAJA,aAFuB;AAGvBC,EAAAA,IAAI,EAAJA;AAHuB,CAAjB;;;AAMA,MAAMC,IAAI,GAAG,MAAM,wBAAW;AAAEN,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAX,CAAnB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { layout as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comment-template/index.js"],"names":["name","metadata","settings","icon","edit","save","init"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAEA;;AACA;;AAXA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,aADuB;AAEvBC,EAAAA,IAAI,EAAJA,aAFuB;AAGvBC,EAAAA,IAAI,EAAJA;AAHuB,CAAjB;;;AAMA,MAAMC,IAAI,GAAG,MAAM,wBAAW;AAAEN,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAX,CAAnB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { layout as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
@@ -54,7 +54,8 @@ const v1 = {
54
54
  const newBlockProps = { ...blockProps,
55
55
  className: newClasses.join(' ')
56
56
  };
57
- return (0, _element.createElement)(Tag, newBlockProps, (0, _element.createElement)(_blockEditor.InnerBlocks.Content, null));
57
+ return (0, _element.createElement)(Tag, { ...newBlockProps
58
+ }, (0, _element.createElement)(_blockEditor.InnerBlocks.Content, null));
58
59
  }
59
60
 
60
61
  };
@@ -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,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"]}
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,OAAUD;AAAV,OACC,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"]}
@@ -62,7 +62,8 @@ function CommentsLegacy({
62
62
  textAlign: nextAlign
63
63
  });
64
64
  }
65
- })), (0, _element.createElement)("div", blockProps, (0, _element.createElement)(_blockEditor.Warning, {
65
+ })), (0, _element.createElement)("div", { ...blockProps
66
+ }, (0, _element.createElement)(_blockEditor.Warning, {
66
67
  actions: actions
67
68
  }, (0, _i18n.__)('Comments block: You’re currently using the legacy version of the block. ' + 'The following is just a placeholder - the final styling will likely look different. ' + 'For a better representation and more customization options, ' + 'switch the block to its editable mode.')), (0, _element.createElement)(_placeholder.default, {
68
69
  postId: postId,
@@ -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,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"]}
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,wCAAUF;AAAV,KACC,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"]}
@@ -39,12 +39,14 @@ function CommentsEdit(props) {
39
39
  });
40
40
 
41
41
  if (legacy) {
42
- return (0, _element.createElement)(_commentsLegacy.default, props);
42
+ return (0, _element.createElement)(_commentsLegacy.default, { ...props
43
+ });
43
44
  }
44
45
 
45
46
  return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_commentsInspectorControls.default, {
46
47
  attributes: attributes,
47
48
  setAttributes: setAttributes
48
- }), (0, _element.createElement)(TagName, innerBlocksProps));
49
+ }), (0, _element.createElement)(TagName, { ...innerBlocksProps
50
+ }));
49
51
  }
50
52
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments/edit/index.js"],"names":["CommentsEdit","props","attributes","setAttributes","tagName","TagName","legacy","blockProps","innerBlocksProps","template","TEMPLATE"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAKe,SAASA,YAAT,CAAuBC,KAAvB,EAA+B;AAC7C,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAAgCF,KAAtC;AACA,QAAM;AAAEG,IAAAA,OAAO,EAAEC,OAAX;AAAoBC,IAAAA;AAApB,MAA+BJ,UAArC;AAEA,QAAMK,UAAU,GAAG,iCAAnB;AACA,QAAMC,gBAAgB,GAAG,sCAAqBD,UAArB,EAAiC;AACzDE,IAAAA,QAAQ,EAAEC;AAD+C,GAAjC,CAAzB;;AAIA,MAAKJ,MAAL,EAAc;AACb,WAAO,4BAAC,uBAAD,EAAqBL,KAArB,CAAP;AACA;;AAED,SACC,qDACC,4BAAC,kCAAD;AACC,IAAA,UAAU,EAAGC,UADd;AAEC,IAAA,aAAa,EAAGC;AAFjB,IADD,EAKC,4BAAC,OAAD,EAAcK,gBAAd,CALD,CADD;AASA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport CommentsInspectorControls from './comments-inspector-controls';\nimport CommentsLegacy from './comments-legacy';\nimport TEMPLATE from './template';\n\nexport default function CommentsEdit( props ) {\n\tconst { attributes, setAttributes } = props;\n\tconst { tagName: TagName, legacy } = attributes;\n\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t} );\n\n\tif ( legacy ) {\n\t\treturn <CommentsLegacy { ...props } />;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<CommentsInspectorControls\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t/>\n\t\t\t<TagName { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments/edit/index.js"],"names":["CommentsEdit","props","attributes","setAttributes","tagName","TagName","legacy","blockProps","innerBlocksProps","template","TEMPLATE"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAKe,SAASA,YAAT,CAAuBC,KAAvB,EAA+B;AAC7C,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAAgCF,KAAtC;AACA,QAAM;AAAEG,IAAAA,OAAO,EAAEC,OAAX;AAAoBC,IAAAA;AAApB,MAA+BJ,UAArC;AAEA,QAAMK,UAAU,GAAG,iCAAnB;AACA,QAAMC,gBAAgB,GAAG,sCAAqBD,UAArB,EAAiC;AACzDE,IAAAA,QAAQ,EAAEC;AAD+C,GAAjC,CAAzB;;AAIA,MAAKJ,MAAL,EAAc;AACb,WAAO,4BAAC,uBAAD,OAAqBL;AAArB,MAAP;AACA;;AAED,SACC,qDACC,4BAAC,kCAAD;AACC,IAAA,UAAU,EAAGC,UADd;AAEC,IAAA,aAAa,EAAGC;AAFjB,IADD,EAKC,4BAAC,OAAD,OAAcK;AAAd,IALD,CADD;AASA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport CommentsInspectorControls from './comments-inspector-controls';\nimport CommentsLegacy from './comments-legacy';\nimport TEMPLATE from './template';\n\nexport default function CommentsEdit( props ) {\n\tconst { attributes, setAttributes } = props;\n\tconst { tagName: TagName, legacy } = attributes;\n\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t} );\n\n\tif ( legacy ) {\n\t\treturn <CommentsLegacy { ...props } />;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<CommentsInspectorControls\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t/>\n\t\t\t<TagName { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n"]}
@@ -44,7 +44,6 @@ const metadata = {
44
44
  },
45
45
  supports: {
46
46
  align: ["wide", "full"],
47
- anchor: true,
48
47
  html: false,
49
48
  color: {
50
49
  gradients: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments/index.js"],"names":["name","metadata","settings","icon","edit","save","deprecated","init"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAEA;;AACA;;AACA;;AAZA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,mBADuB;AAEvBC,EAAAA,IAAI,EAAJA,aAFuB;AAGvBC,EAAAA,IAAI,EAAJA,aAHuB;AAIvBC,EAAAA,UAAU,EAAVA;AAJuB,CAAjB;;;AAOA,MAAMC,IAAI,GAAG,MAAM,wBAAW;AAAEP,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAX,CAAnB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postComments as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments/index.js"],"names":["name","metadata","settings","icon","edit","save","deprecated","init"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAEA;;AACA;;AACA;;AAZA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,mBADuB;AAEvBC,EAAAA,IAAI,EAAJA,aAFuB;AAGvBC,EAAAA,IAAI,EAAJA,aAHuB;AAIvBC,EAAAA,UAAU,EAAVA;AAJuB,CAAjB;;;AAOA,MAAMC,IAAI,GAAG,MAAM,wBAAW;AAAEP,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAX,CAAnB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postComments as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
@@ -24,6 +24,7 @@ function save({
24
24
  // blocks, so nothing is saved in that case.
25
25
 
26
26
 
27
- return legacy ? null : (0, _element.createElement)(Tag, innerBlocksProps);
27
+ return legacy ? null : (0, _element.createElement)(Tag, { ...innerBlocksProps
28
+ });
28
29
  }
29
30
  //# sourceMappingURL=save.js.map
@@ -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,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"]}
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,OAAUG;AAAV,IAAvB;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"]}
@@ -80,6 +80,7 @@ function QueryPaginationEdit({
80
80
  paginationArrow: value
81
81
  });
82
82
  }
83
- }))), (0, _element.createElement)("div", innerBlocksProps));
83
+ }))), (0, _element.createElement)("div", { ...innerBlocksProps
84
+ }));
84
85
  }
85
86
  //# sourceMappingURL=edit.js.map
@@ -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"],"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"]}
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,wCAAUN;AAAV,IAbD,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"]}
@@ -41,7 +41,6 @@ const metadata = {
41
41
  "comments/paginationArrow": "paginationArrow"
42
42
  },
43
43
  supports: {
44
- anchor: true,
45
44
  align: true,
46
45
  reusable: false,
47
46
  html: false,
@@ -54,7 +53,7 @@ const metadata = {
54
53
  link: true
55
54
  }
56
55
  },
57
- __experimentalLayout: {
56
+ layout: {
58
57
  allowSwitching: false,
59
58
  allowInheriting: false,
60
59
  "default": {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments-pagination/index.js"],"names":["name","metadata","settings","icon","edit","save","init"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAEA;;AACA;;AAXA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,sBADuB;AAEvBC,EAAAA,IAAI,EAAJA,aAFuB;AAGvBC,EAAAA,IAAI,EAAJA;AAHuB,CAAjB;;;AAMA,MAAMC,IAAI,GAAG,MAAM,wBAAW;AAAEN,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAX,CAAnB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { queryPagination as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-pagination/index.js"],"names":["name","metadata","settings","icon","edit","save","init"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAEA;;AACA;;AAXA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,sBADuB;AAEvBC,EAAAA,IAAI,EAAJA,aAFuB;AAGvBC,EAAAA,IAAI,EAAJA;AAHuB,CAAjB;;;AAMA,MAAMC,IAAI,GAAG,MAAM,wBAAW;AAAEN,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAX,CAAnB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { queryPagination as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -9,8 +7,6 @@ exports.default = CommentsPaginationNextEdit;
9
7
 
10
8
  var _element = require("@wordpress/element");
11
9
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
10
  var _i18n = require("@wordpress/i18n");
15
11
 
16
12
  var _blockEditor = require("@wordpress/block-editor");
@@ -34,10 +30,11 @@ function CommentsPaginationNextEdit({
34
30
  }
35
31
  }) {
36
32
  const displayArrow = arrowMap[paginationArrow];
37
- return (0, _element.createElement)("a", (0, _extends2.default)({
33
+ return (0, _element.createElement)("a", {
38
34
  href: "#comments-pagination-next-pseudo-link",
39
- onClick: event => event.preventDefault()
40
- }, (0, _blockEditor.useBlockProps)()), (0, _element.createElement)(_blockEditor.PlainText, {
35
+ onClick: event => event.preventDefault(),
36
+ ...(0, _blockEditor.useBlockProps)()
37
+ }, (0, _element.createElement)(_blockEditor.PlainText, {
41
38
  __experimentalVersion: 2,
42
39
  tagName: "span",
43
40
  "aria-label": (0, _i18n.__)('Newer comments page link'),
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments-pagination-next/edit.js"],"names":["arrowMap","none","arrow","chevron","CommentsPaginationNextEdit","attributes","label","setAttributes","context","paginationArrow","displayArrow","event","preventDefault","newLabel"],"mappings":";;;;;;;;;;;;;AAGA;;AACA;;AAJA;AACA;AACA;AAIA,MAAMA,QAAQ,GAAG;AAChBC,EAAAA,IAAI,EAAE,EADU;AAEhBC,EAAAA,KAAK,EAAE,GAFS;AAGhBC,EAAAA,OAAO,EAAE;AAHO,CAAjB;;AAMe,SAASC,0BAAT,CAAqC;AACnDC,EAAAA,UAAU,EAAE;AAAEC,IAAAA;AAAF,GADuC;AAEnDC,EAAAA,aAFmD;AAGnDC,EAAAA,OAAO,EAAE;AAAE,gCAA4BC;AAA9B;AAH0C,CAArC,EAIX;AACH,QAAMC,YAAY,GAAGV,QAAQ,CAAES,eAAF,CAA7B;AACA,SACC;AACC,IAAA,IAAI,EAAC,uCADN;AAEC,IAAA,OAAO,EAAKE,KAAF,IAAaA,KAAK,CAACC,cAAN;AAFxB,KAGM,iCAHN,GAKC,4BAAC,sBAAD;AACC,IAAA,qBAAqB,EAAG,CADzB;AAEC,IAAA,OAAO,EAAC,MAFT;AAGC,kBAAa,cAAI,0BAAJ,CAHd;AAIC,IAAA,WAAW,EAAG,cAAI,gBAAJ,CAJf;AAKC,IAAA,KAAK,EAAGN,KALT;AAMC,IAAA,QAAQ,EAAKO,QAAF,IACVN,aAAa,CAAE;AAAED,MAAAA,KAAK,EAAEO;AAAT,KAAF;AAPf,IALD,EAeGH,YAAY,IACb;AACC,IAAA,SAAS,EAAI,oDAAoDD,eAAiB;AADnF,KAGGC,YAHH,CAhBF,CADD;AAyBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useBlockProps, PlainText } from '@wordpress/block-editor';\n\nconst arrowMap = {\n\tnone: '',\n\tarrow: '→',\n\tchevron: '»',\n};\n\nexport default function CommentsPaginationNextEdit( {\n\tattributes: { label },\n\tsetAttributes,\n\tcontext: { 'comments/paginationArrow': paginationArrow },\n} ) {\n\tconst displayArrow = arrowMap[ paginationArrow ];\n\treturn (\n\t\t<a\n\t\t\thref=\"#comments-pagination-next-pseudo-link\"\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t{ ...useBlockProps() }\n\t\t>\n\t\t\t<PlainText\n\t\t\t\t__experimentalVersion={ 2 }\n\t\t\t\ttagName=\"span\"\n\t\t\t\taria-label={ __( 'Newer comments page link' ) }\n\t\t\t\tplaceholder={ __( 'Newer Comments' ) }\n\t\t\t\tvalue={ label }\n\t\t\t\tonChange={ ( newLabel ) =>\n\t\t\t\t\tsetAttributes( { label: newLabel } )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ displayArrow && (\n\t\t\t\t<span\n\t\t\t\t\tclassName={ `wp-block-comments-pagination-next-arrow is-arrow-${ paginationArrow }` }\n\t\t\t\t>\n\t\t\t\t\t{ displayArrow }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t</a>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-pagination-next/edit.js"],"names":["arrowMap","none","arrow","chevron","CommentsPaginationNextEdit","attributes","label","setAttributes","context","paginationArrow","displayArrow","event","preventDefault","newLabel"],"mappings":";;;;;;;;;AAGA;;AACA;;AAJA;AACA;AACA;AAIA,MAAMA,QAAQ,GAAG;AAChBC,EAAAA,IAAI,EAAE,EADU;AAEhBC,EAAAA,KAAK,EAAE,GAFS;AAGhBC,EAAAA,OAAO,EAAE;AAHO,CAAjB;;AAMe,SAASC,0BAAT,CAAqC;AACnDC,EAAAA,UAAU,EAAE;AAAEC,IAAAA;AAAF,GADuC;AAEnDC,EAAAA,aAFmD;AAGnDC,EAAAA,OAAO,EAAE;AAAE,gCAA4BC;AAA9B;AAH0C,CAArC,EAIX;AACH,QAAMC,YAAY,GAAGV,QAAQ,CAAES,eAAF,CAA7B;AACA,SACC;AACC,IAAA,IAAI,EAAC,uCADN;AAEC,IAAA,OAAO,EAAKE,KAAF,IAAaA,KAAK,CAACC,cAAN,EAFxB;AAAA,OAGM;AAHN,KAKC,4BAAC,sBAAD;AACC,IAAA,qBAAqB,EAAG,CADzB;AAEC,IAAA,OAAO,EAAC,MAFT;AAGC,kBAAa,cAAI,0BAAJ,CAHd;AAIC,IAAA,WAAW,EAAG,cAAI,gBAAJ,CAJf;AAKC,IAAA,KAAK,EAAGN,KALT;AAMC,IAAA,QAAQ,EAAKO,QAAF,IACVN,aAAa,CAAE;AAAED,MAAAA,KAAK,EAAEO;AAAT,KAAF;AAPf,IALD,EAeGH,YAAY,IACb;AACC,IAAA,SAAS,EAAI,oDAAoDD,eAAiB;AADnF,KAGGC,YAHH,CAhBF,CADD;AAyBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useBlockProps, PlainText } from '@wordpress/block-editor';\n\nconst arrowMap = {\n\tnone: '',\n\tarrow: '→',\n\tchevron: '»',\n};\n\nexport default function CommentsPaginationNextEdit( {\n\tattributes: { label },\n\tsetAttributes,\n\tcontext: { 'comments/paginationArrow': paginationArrow },\n} ) {\n\tconst displayArrow = arrowMap[ paginationArrow ];\n\treturn (\n\t\t<a\n\t\t\thref=\"#comments-pagination-next-pseudo-link\"\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t{ ...useBlockProps() }\n\t\t>\n\t\t\t<PlainText\n\t\t\t\t__experimentalVersion={ 2 }\n\t\t\t\ttagName=\"span\"\n\t\t\t\taria-label={ __( 'Newer comments page link' ) }\n\t\t\t\tplaceholder={ __( 'Newer Comments' ) }\n\t\t\t\tvalue={ label }\n\t\t\t\tonChange={ ( newLabel ) =>\n\t\t\t\t\tsetAttributes( { label: newLabel } )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ displayArrow && (\n\t\t\t\t<span\n\t\t\t\t\tclassName={ `wp-block-comments-pagination-next-arrow is-arrow-${ paginationArrow }` }\n\t\t\t\t>\n\t\t\t\t\t{ displayArrow }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t</a>\n\t);\n}\n"]}
@@ -36,7 +36,6 @@ const metadata = {
36
36
  },
37
37
  usesContext: ["postId", "comments/paginationArrow"],
38
38
  supports: {
39
- anchor: true,
40
39
  reusable: false,
41
40
  html: false,
42
41
  color: {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments-pagination-next/index.js"],"names":["name","metadata","settings","icon","edit","init"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAEA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,0BADuB;AAEvBC,EAAAA,IAAI,EAAJA;AAFuB,CAAjB;;;AAKA,MAAMC,IAAI,GAAG,MAAM,wBAAW;AAAEL,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAX,CAAnB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { queryPaginationNext as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-pagination-next/index.js"],"names":["name","metadata","settings","icon","edit","init"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAEA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,0BADuB;AAEvBC,EAAAA,IAAI,EAAJA;AAFuB,CAAjB;;;AAKA,MAAMC,IAAI,GAAG,MAAM,wBAAW;AAAEL,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAX,CAAnB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { queryPaginationNext as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
@@ -25,7 +25,8 @@ const PaginationItem = ({
25
25
  }, content);
26
26
 
27
27
  function CommentsPaginationNumbersEdit() {
28
- return (0, _element.createElement)("div", (0, _blockEditor.useBlockProps)(), (0, _element.createElement)(PaginationItem, {
28
+ return (0, _element.createElement)("div", { ...(0, _blockEditor.useBlockProps)()
29
+ }, (0, _element.createElement)(PaginationItem, {
29
30
  content: "1"
30
31
  }), (0, _element.createElement)(PaginationItem, {
31
32
  content: "2"
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments-pagination-numbers/edit.js"],"names":["PaginationItem","content","tag","Tag","extraClass","event","preventDefault","CommentsPaginationNumbersEdit"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;AAGA,MAAMA,cAAc,GAAG,CAAE;AAAEC,EAAAA,OAAF;AAAWC,EAAAA,GAAG,EAAEC,GAAG,GAAG,GAAtB;AAA2BC,EAAAA,UAAU,GAAG;AAAxC,CAAF,KACtBD,GAAG,KAAK,GAAR,GACC,4BAAC,GAAD;AACC,EAAA,SAAS,EAAI,gBAAgBC,UAAY,EAD1C;AAEC,EAAA,IAAI,EAAC,0CAFN;AAGC,EAAA,OAAO,EAAKC,KAAF,IAAaA,KAAK,CAACC,cAAN;AAHxB,GAKGL,OALH,CADD,GASC,4BAAC,GAAD;AAAK,EAAA,SAAS,EAAI,gBAAgBG,UAAY;AAA9C,GAAoDH,OAApD,CAVF;;AAae,SAASM,6BAAT,GAAyC;AACvD,SACC,mCAAU,iCAAV,EACC,4BAAC,cAAD;AAAgB,IAAA,OAAO,EAAC;AAAxB,IADD,EAEC,4BAAC,cAAD;AAAgB,IAAA,OAAO,EAAC;AAAxB,IAFD,EAGC,4BAAC,cAAD;AAAgB,IAAA,OAAO,EAAC,GAAxB;AAA4B,IAAA,GAAG,EAAC,MAAhC;AAAuC,IAAA,UAAU,EAAC;AAAlD,IAHD,EAIC,4BAAC,cAAD;AAAgB,IAAA,OAAO,EAAC;AAAxB,IAJD,EAKC,4BAAC,cAAD;AAAgB,IAAA,OAAO,EAAC;AAAxB,IALD,EAMC,4BAAC,cAAD;AAAgB,IAAA,OAAO,EAAC,KAAxB;AAA8B,IAAA,GAAG,EAAC,MAAlC;AAAyC,IAAA,UAAU,EAAC;AAApD,IAND,EAOC,4BAAC,cAAD;AAAgB,IAAA,OAAO,EAAC;AAAxB,IAPD,CADD;AAWA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useBlockProps } from '@wordpress/block-editor';\n\nconst PaginationItem = ( { content, tag: Tag = 'a', extraClass = '' } ) =>\n\tTag === 'a' ? (\n\t\t<Tag\n\t\t\tclassName={ `page-numbers ${ extraClass }` }\n\t\t\thref=\"#comments-pagination-numbers-pseudo-link\"\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t>\n\t\t\t{ content }\n\t\t</Tag>\n\t) : (\n\t\t<Tag className={ `page-numbers ${ extraClass }` }>{ content }</Tag>\n\t);\n\nexport default function CommentsPaginationNumbersEdit() {\n\treturn (\n\t\t<div { ...useBlockProps() }>\n\t\t\t<PaginationItem content=\"1\" />\n\t\t\t<PaginationItem content=\"2\" />\n\t\t\t<PaginationItem content=\"3\" tag=\"span\" extraClass=\"current\" />\n\t\t\t<PaginationItem content=\"4\" />\n\t\t\t<PaginationItem content=\"5\" />\n\t\t\t<PaginationItem content=\"...\" tag=\"span\" extraClass=\"dots\" />\n\t\t\t<PaginationItem content=\"8\" />\n\t\t</div>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-pagination-numbers/edit.js"],"names":["PaginationItem","content","tag","Tag","extraClass","event","preventDefault","CommentsPaginationNumbersEdit"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;AAGA,MAAMA,cAAc,GAAG,CAAE;AAAEC,EAAAA,OAAF;AAAWC,EAAAA,GAAG,EAAEC,GAAG,GAAG,GAAtB;AAA2BC,EAAAA,UAAU,GAAG;AAAxC,CAAF,KACtBD,GAAG,KAAK,GAAR,GACC,4BAAC,GAAD;AACC,EAAA,SAAS,EAAI,gBAAgBC,UAAY,EAD1C;AAEC,EAAA,IAAI,EAAC,0CAFN;AAGC,EAAA,OAAO,EAAKC,KAAF,IAAaA,KAAK,CAACC,cAAN;AAHxB,GAKGL,OALH,CADD,GASC,4BAAC,GAAD;AAAK,EAAA,SAAS,EAAI,gBAAgBG,UAAY;AAA9C,GAAoDH,OAApD,CAVF;;AAae,SAASM,6BAAT,GAAyC;AACvD,SACC,wCAAU;AAAV,KACC,4BAAC,cAAD;AAAgB,IAAA,OAAO,EAAC;AAAxB,IADD,EAEC,4BAAC,cAAD;AAAgB,IAAA,OAAO,EAAC;AAAxB,IAFD,EAGC,4BAAC,cAAD;AAAgB,IAAA,OAAO,EAAC,GAAxB;AAA4B,IAAA,GAAG,EAAC,MAAhC;AAAuC,IAAA,UAAU,EAAC;AAAlD,IAHD,EAIC,4BAAC,cAAD;AAAgB,IAAA,OAAO,EAAC;AAAxB,IAJD,EAKC,4BAAC,cAAD;AAAgB,IAAA,OAAO,EAAC;AAAxB,IALD,EAMC,4BAAC,cAAD;AAAgB,IAAA,OAAO,EAAC,KAAxB;AAA8B,IAAA,GAAG,EAAC,MAAlC;AAAyC,IAAA,UAAU,EAAC;AAApD,IAND,EAOC,4BAAC,cAAD;AAAgB,IAAA,OAAO,EAAC;AAAxB,IAPD,CADD;AAWA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useBlockProps } from '@wordpress/block-editor';\n\nconst PaginationItem = ( { content, tag: Tag = 'a', extraClass = '' } ) =>\n\tTag === 'a' ? (\n\t\t<Tag\n\t\t\tclassName={ `page-numbers ${ extraClass }` }\n\t\t\thref=\"#comments-pagination-numbers-pseudo-link\"\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t>\n\t\t\t{ content }\n\t\t</Tag>\n\t) : (\n\t\t<Tag className={ `page-numbers ${ extraClass }` }>{ content }</Tag>\n\t);\n\nexport default function CommentsPaginationNumbersEdit() {\n\treturn (\n\t\t<div { ...useBlockProps() }>\n\t\t\t<PaginationItem content=\"1\" />\n\t\t\t<PaginationItem content=\"2\" />\n\t\t\t<PaginationItem content=\"3\" tag=\"span\" extraClass=\"current\" />\n\t\t\t<PaginationItem content=\"4\" />\n\t\t\t<PaginationItem content=\"5\" />\n\t\t\t<PaginationItem content=\"...\" tag=\"span\" extraClass=\"dots\" />\n\t\t\t<PaginationItem content=\"8\" />\n\t\t</div>\n\t);\n}\n"]}
@@ -31,7 +31,6 @@ const metadata = {
31
31
  textdomain: "default",
32
32
  usesContext: ["postId"],
33
33
  supports: {
34
- anchor: true,
35
34
  reusable: false,
36
35
  html: false,
37
36
  color: {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments-pagination-numbers/index.js"],"names":["name","metadata","settings","icon","edit","init"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAEA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,6BADuB;AAEvBC,EAAAA,IAAI,EAAJA;AAFuB,CAAjB;;;AAKA,MAAMC,IAAI,GAAG,MAAM,wBAAW;AAAEL,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAX,CAAnB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { queryPaginationNumbers as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-pagination-numbers/index.js"],"names":["name","metadata","settings","icon","edit","init"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAEA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,6BADuB;AAEvBC,EAAAA,IAAI,EAAJA;AAFuB,CAAjB;;;AAKA,MAAMC,IAAI,GAAG,MAAM,wBAAW;AAAEL,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAX,CAAnB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { queryPaginationNumbers as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -9,8 +7,6 @@ exports.default = CommentsPaginationPreviousEdit;
9
7
 
10
8
  var _element = require("@wordpress/element");
11
9
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
10
  var _i18n = require("@wordpress/i18n");
15
11
 
16
12
  var _blockEditor = require("@wordpress/block-editor");
@@ -34,10 +30,11 @@ function CommentsPaginationPreviousEdit({
34
30
  }
35
31
  }) {
36
32
  const displayArrow = arrowMap[paginationArrow];
37
- return (0, _element.createElement)("a", (0, _extends2.default)({
33
+ return (0, _element.createElement)("a", {
38
34
  href: "#comments-pagination-previous-pseudo-link",
39
- onClick: event => event.preventDefault()
40
- }, (0, _blockEditor.useBlockProps)()), displayArrow && (0, _element.createElement)("span", {
35
+ onClick: event => event.preventDefault(),
36
+ ...(0, _blockEditor.useBlockProps)()
37
+ }, displayArrow && (0, _element.createElement)("span", {
41
38
  className: `wp-block-comments-pagination-previous-arrow is-arrow-${paginationArrow}`
42
39
  }, displayArrow), (0, _element.createElement)(_blockEditor.PlainText, {
43
40
  __experimentalVersion: 2,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments-pagination-previous/edit.js"],"names":["arrowMap","none","arrow","chevron","CommentsPaginationPreviousEdit","attributes","label","setAttributes","context","paginationArrow","displayArrow","event","preventDefault","newLabel"],"mappings":";;;;;;;;;;;;;AAGA;;AACA;;AAJA;AACA;AACA;AAIA,MAAMA,QAAQ,GAAG;AAChBC,EAAAA,IAAI,EAAE,EADU;AAEhBC,EAAAA,KAAK,EAAE,GAFS;AAGhBC,EAAAA,OAAO,EAAE;AAHO,CAAjB;;AAMe,SAASC,8BAAT,CAAyC;AACvDC,EAAAA,UAAU,EAAE;AAAEC,IAAAA;AAAF,GAD2C;AAEvDC,EAAAA,aAFuD;AAGvDC,EAAAA,OAAO,EAAE;AAAE,gCAA4BC;AAA9B;AAH8C,CAAzC,EAIX;AACH,QAAMC,YAAY,GAAGV,QAAQ,CAAES,eAAF,CAA7B;AACA,SACC;AACC,IAAA,IAAI,EAAC,2CADN;AAEC,IAAA,OAAO,EAAKE,KAAF,IAAaA,KAAK,CAACC,cAAN;AAFxB,KAGM,iCAHN,GAKGF,YAAY,IACb;AACC,IAAA,SAAS,EAAI,wDAAwDD,eAAiB;AADvF,KAGGC,YAHH,CANF,EAYC,4BAAC,sBAAD;AACC,IAAA,qBAAqB,EAAG,CADzB;AAEC,IAAA,OAAO,EAAC,MAFT;AAGC,kBAAa,cAAI,0BAAJ,CAHd;AAIC,IAAA,WAAW,EAAG,cAAI,gBAAJ,CAJf;AAKC,IAAA,KAAK,EAAGJ,KALT;AAMC,IAAA,QAAQ,EAAKO,QAAF,IACVN,aAAa,CAAE;AAAED,MAAAA,KAAK,EAAEO;AAAT,KAAF;AAPf,IAZD,CADD;AAyBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useBlockProps, PlainText } from '@wordpress/block-editor';\n\nconst arrowMap = {\n\tnone: '',\n\tarrow: '←',\n\tchevron: '«',\n};\n\nexport default function CommentsPaginationPreviousEdit( {\n\tattributes: { label },\n\tsetAttributes,\n\tcontext: { 'comments/paginationArrow': paginationArrow },\n} ) {\n\tconst displayArrow = arrowMap[ paginationArrow ];\n\treturn (\n\t\t<a\n\t\t\thref=\"#comments-pagination-previous-pseudo-link\"\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t{ ...useBlockProps() }\n\t\t>\n\t\t\t{ displayArrow && (\n\t\t\t\t<span\n\t\t\t\t\tclassName={ `wp-block-comments-pagination-previous-arrow is-arrow-${ paginationArrow }` }\n\t\t\t\t>\n\t\t\t\t\t{ displayArrow }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t\t<PlainText\n\t\t\t\t__experimentalVersion={ 2 }\n\t\t\t\ttagName=\"span\"\n\t\t\t\taria-label={ __( 'Older comments page link' ) }\n\t\t\t\tplaceholder={ __( 'Older Comments' ) }\n\t\t\t\tvalue={ label }\n\t\t\t\tonChange={ ( newLabel ) =>\n\t\t\t\t\tsetAttributes( { label: newLabel } )\n\t\t\t\t}\n\t\t\t/>\n\t\t</a>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-pagination-previous/edit.js"],"names":["arrowMap","none","arrow","chevron","CommentsPaginationPreviousEdit","attributes","label","setAttributes","context","paginationArrow","displayArrow","event","preventDefault","newLabel"],"mappings":";;;;;;;;;AAGA;;AACA;;AAJA;AACA;AACA;AAIA,MAAMA,QAAQ,GAAG;AAChBC,EAAAA,IAAI,EAAE,EADU;AAEhBC,EAAAA,KAAK,EAAE,GAFS;AAGhBC,EAAAA,OAAO,EAAE;AAHO,CAAjB;;AAMe,SAASC,8BAAT,CAAyC;AACvDC,EAAAA,UAAU,EAAE;AAAEC,IAAAA;AAAF,GAD2C;AAEvDC,EAAAA,aAFuD;AAGvDC,EAAAA,OAAO,EAAE;AAAE,gCAA4BC;AAA9B;AAH8C,CAAzC,EAIX;AACH,QAAMC,YAAY,GAAGV,QAAQ,CAAES,eAAF,CAA7B;AACA,SACC;AACC,IAAA,IAAI,EAAC,2CADN;AAEC,IAAA,OAAO,EAAKE,KAAF,IAAaA,KAAK,CAACC,cAAN,EAFxB;AAAA,OAGM;AAHN,KAKGF,YAAY,IACb;AACC,IAAA,SAAS,EAAI,wDAAwDD,eAAiB;AADvF,KAGGC,YAHH,CANF,EAYC,4BAAC,sBAAD;AACC,IAAA,qBAAqB,EAAG,CADzB;AAEC,IAAA,OAAO,EAAC,MAFT;AAGC,kBAAa,cAAI,0BAAJ,CAHd;AAIC,IAAA,WAAW,EAAG,cAAI,gBAAJ,CAJf;AAKC,IAAA,KAAK,EAAGJ,KALT;AAMC,IAAA,QAAQ,EAAKO,QAAF,IACVN,aAAa,CAAE;AAAED,MAAAA,KAAK,EAAEO;AAAT,KAAF;AAPf,IAZD,CADD;AAyBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useBlockProps, PlainText } from '@wordpress/block-editor';\n\nconst arrowMap = {\n\tnone: '',\n\tarrow: '←',\n\tchevron: '«',\n};\n\nexport default function CommentsPaginationPreviousEdit( {\n\tattributes: { label },\n\tsetAttributes,\n\tcontext: { 'comments/paginationArrow': paginationArrow },\n} ) {\n\tconst displayArrow = arrowMap[ paginationArrow ];\n\treturn (\n\t\t<a\n\t\t\thref=\"#comments-pagination-previous-pseudo-link\"\n\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t{ ...useBlockProps() }\n\t\t>\n\t\t\t{ displayArrow && (\n\t\t\t\t<span\n\t\t\t\t\tclassName={ `wp-block-comments-pagination-previous-arrow is-arrow-${ paginationArrow }` }\n\t\t\t\t>\n\t\t\t\t\t{ displayArrow }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t\t<PlainText\n\t\t\t\t__experimentalVersion={ 2 }\n\t\t\t\ttagName=\"span\"\n\t\t\t\taria-label={ __( 'Older comments page link' ) }\n\t\t\t\tplaceholder={ __( 'Older Comments' ) }\n\t\t\t\tvalue={ label }\n\t\t\t\tonChange={ ( newLabel ) =>\n\t\t\t\t\tsetAttributes( { label: newLabel } )\n\t\t\t\t}\n\t\t\t/>\n\t\t</a>\n\t);\n}\n"]}
@@ -36,7 +36,6 @@ const metadata = {
36
36
  },
37
37
  usesContext: ["postId", "comments/paginationArrow"],
38
38
  supports: {
39
- anchor: true,
40
39
  reusable: false,
41
40
  html: false,
42
41
  color: {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments-pagination-previous/index.js"],"names":["name","metadata","settings","icon","edit","init"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAEA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,8BADuB;AAEvBC,EAAAA,IAAI,EAAJA;AAFuB,CAAjB;;;AAKA,MAAMC,IAAI,GAAG,MAAM,wBAAW;AAAEL,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAX,CAAnB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { queryPaginationPrevious as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-pagination-previous/index.js"],"names":["name","metadata","settings","icon","edit","init"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAEA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,8BADuB;AAEvBC,EAAAA,IAAI,EAAJA;AAFuB,CAAjB;;;AAKA,MAAMC,IAAI,GAAG,MAAM,wBAAW;AAAEL,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAX,CAAnB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { queryPaginationPrevious as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
@@ -25,8 +25,6 @@ var _apiFetch = _interopRequireDefault(require("@wordpress/api-fetch"));
25
25
 
26
26
  var _url = require("@wordpress/url");
27
27
 
28
- var _headingLevelDropdown = _interopRequireDefault(require("../heading/heading-level-dropdown"));
29
-
30
28
  /**
31
29
  * External dependencies
32
30
  */
@@ -34,10 +32,6 @@ var _headingLevelDropdown = _interopRequireDefault(require("../heading/heading-l
34
32
  /**
35
33
  * WordPress dependencies
36
34
  */
37
-
38
- /**
39
- * Internal dependencies
40
- */
41
35
  function Edit({
42
36
  attributes: {
43
37
  textAlign,
@@ -105,8 +99,8 @@ function Edit({
105
99
  onChange: newAlign => setAttributes({
106
100
  textAlign: newAlign
107
101
  })
108
- }), (0, _element.createElement)(_headingLevelDropdown.default, {
109
- selectedLevel: level,
102
+ }), (0, _element.createElement)(_blockEditor.HeadingLevelDropdown, {
103
+ value: level,
110
104
  onChange: newLevel => setAttributes({
111
105
  level: newLevel
112
106
  })
@@ -162,6 +156,7 @@ function Edit({
162
156
  placeholder = (0, _i18n.__)('Responses');
163
157
  }
164
158
 
165
- return (0, _element.createElement)(_element.Fragment, null, blockControls, inspectorControls, (0, _element.createElement)(TagName, blockProps, placeholder));
159
+ return (0, _element.createElement)(_element.Fragment, null, blockControls, inspectorControls, (0, _element.createElement)(TagName, { ...blockProps
160
+ }, placeholder));
166
161
  }
167
162
  //# sourceMappingURL=edit.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments-title/edit.js"],"names":["Edit","attributes","textAlign","showPostTitle","showCommentsCount","level","setAttributes","context","postType","postId","TagName","commentsCount","setCommentsCount","rawTitle","isSiteEditor","blockProps","className","threadCommentsDepth","threadComments","commentsPerPage","pageComments","select","getSettings","blockEditorStore","__experimentalDiscussionSettings","nestedCommentsNumber","Math","min","topLevelCommentsNumber","commentsNumber","parseInt","currentPostId","path","post","_fields","method","parse","then","res","headers","get","catch","blockControls","newAlign","newLevel","inspectorControls","value","postTitle","placeholder","undefined"],"mappings":";;;;;;;;;AAkBA;;AAfA;;AAKA;;AAOA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAKA;;AA1BA;AACA;AACA;;AAGA;AACA;AACA;;AAgBA;AACA;AACA;AAGe,SAASA,IAAT,CAAe;AAC7BC,EAAAA,UAAU,EAAE;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,aAAb;AAA4BC,IAAAA,iBAA5B;AAA+CC,IAAAA;AAA/C,GADiB;AAE7BC,EAAAA,aAF6B;AAG7BC,EAAAA,OAAO,EAAE;AAAEC,IAAAA,QAAF;AAAYC,IAAAA;AAAZ;AAHoB,CAAf,EAIX;AACH,QAAMC,OAAO,GAAG,MAAML,KAAtB;AACA,QAAM,CAAEM,aAAF,EAAiBC,gBAAjB,IAAsC,wBAA5C;AACA,QAAM,CAAEC,QAAF,IAAe,6BAAe,UAAf,EAA2BL,QAA3B,EAAqC,OAArC,EAA8CC,MAA9C,CAArB;AACA,QAAMK,YAAY,GAAG,OAAOL,MAAP,KAAkB,WAAvC;AACA,QAAMM,UAAU,GAAG,gCAAe;AACjCC,IAAAA,SAAS,EAAE,yBAAY;AACtB,OAAG,kBAAkBd,SAAW,EAAhC,GAAqCA;AADf,KAAZ;AADsB,GAAf,CAAnB;AAMA,QAAM;AACLe,IAAAA,mBADK;AAELC,IAAAA,cAFK;AAGLC,IAAAA,eAHK;AAILC,IAAAA;AAJK,MAKF,qBAAaC,MAAF,IAAc;AAC5B,UAAM;AAAEC,MAAAA;AAAF,QAAkBD,MAAM,CAAEE,kBAAF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KAhBD,MAgBO,IAAKpC,aAAa,KAAK,CAAvB,EAA2B;AACjCqC,MAAAA,WAAW,GAAG,cAAI,cAAJ,CAAd;AACA,KAFM,MAEA;AACNA,MAAAA,WAAW,GAAG;AACb;AACA,oBAAI,aAAJ,EAAmB,cAAnB,EAAmCrC,aAAnC,CAFa,EAGbA,aAHa,CAAd;AAKA;AACD,GA1BD,MA0BO,IAAKR,aAAL,EAAqB;AAC3B,QAAKQ,aAAa,KAAK,CAAvB,EAA2B;AAC1B;AACAqC,MAAAA,WAAW,GAAG,mBAAS,cAAI,gBAAJ,CAAT,EAAiCD,SAAjC,CAAd;AACA,KAHD,MAGO;AACN;AACAC,MAAAA,WAAW,GAAG,mBAAS,cAAI,iBAAJ,CAAT,EAAkCD,SAAlC,CAAd;AACA;AACD,GARM,MAQA,IAAKpC,aAAa,KAAK,CAAvB,EAA2B;AACjCqC,IAAAA,WAAW,GAAG,cAAI,UAAJ,CAAd;AACA,GAFM,MAEA;AACNA,IAAAA,WAAW,GAAG,cAAI,WAAJ,CAAd;AACA;;AAED,SACC,qDACGN,aADH,EAEGG,iBAFH,EAGC,4BAAC,OAAD,EAAc9B,UAAd,EAA6BiC,WAA7B,CAHD,CADD;AAOA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tuseBlockProps,\n\tInspectorControls,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useEntityProp } from '@wordpress/core-data';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport HeadingLevelDropdown from '../heading/heading-level-dropdown';\n\nexport default function Edit( {\n\tattributes: { textAlign, showPostTitle, showCommentsCount, level },\n\tsetAttributes,\n\tcontext: { postType, postId },\n} ) {\n\tconst TagName = 'h' + level;\n\tconst [ commentsCount, setCommentsCount ] = useState();\n\tconst [ rawTitle ] = useEntityProp( 'postType', postType, 'title', postId );\n\tconst isSiteEditor = typeof postId === 'undefined';\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classnames( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tconst {\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\tuseEffect( () => {\n\t\tif ( isSiteEditor ) {\n\t\t\t// Match the number of comments that will be shown in the comment-template/edit.js placeholder\n\n\t\t\tconst nestedCommentsNumber = threadComments\n\t\t\t\t? Math.min( threadCommentsDepth, 3 ) - 1\n\t\t\t\t: 0;\n\t\t\tconst topLevelCommentsNumber = pageComments ? commentsPerPage : 3;\n\n\t\t\tconst commentsNumber =\n\t\t\t\tparseInt( nestedCommentsNumber ) +\n\t\t\t\tparseInt( topLevelCommentsNumber );\n\n\t\t\tsetCommentsCount( Math.min( commentsNumber, 3 ) );\n\t\t\treturn;\n\t\t}\n\t\tconst currentPostId = postId;\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\tpost: postId,\n\t\t\t\t_fields: 'id',\n\t\t\t} ),\n\t\t\tmethod: 'HEAD',\n\t\t\tparse: false,\n\t\t} )\n\t\t\t.then( ( res ) => {\n\t\t\t\t// Stale requests will have the `currentPostId` of an older closure.\n\t\t\t\tif ( currentPostId === postId ) {\n\t\t\t\t\tsetCommentsCount(\n\t\t\t\t\t\tparseInt( res.headers.get( 'X-WP-Total' ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( () => {\n\t\t\t\tsetCommentsCount( 0 );\n\t\t\t} );\n\t}, [ postId ] );\n\n\tconst blockControls = (\n\t\t<BlockControls group=\"block\">\n\t\t\t<AlignmentControl\n\t\t\t\tvalue={ textAlign }\n\t\t\t\tonChange={ ( newAlign ) =>\n\t\t\t\t\tsetAttributes( { textAlign: newAlign } )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<HeadingLevelDropdown\n\t\t\t\tselectedLevel={ level }\n\t\t\t\tonChange={ ( newLevel ) =>\n\t\t\t\t\tsetAttributes( { level: newLevel } )\n\t\t\t\t}\n\t\t\t/>\n\t\t</BlockControls>\n\t);\n\n\tconst inspectorControls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Show post title' ) }\n\t\t\t\t\tchecked={ showPostTitle }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { showPostTitle: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Show comments count' ) }\n\t\t\t\t\tchecked={ showCommentsCount }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { showCommentsCount: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\tconst postTitle = isSiteEditor ? __( '“Post Title”' ) : `\"${ rawTitle }\"`;\n\n\tlet placeholder;\n\tif ( showCommentsCount && commentsCount !== undefined ) {\n\t\tif ( showPostTitle ) {\n\t\t\tif ( commentsCount === 1 ) {\n\t\t\t\t/* translators: %s: Post title. */\n\t\t\t\tplaceholder = sprintf( __( 'One response to %s' ), postTitle );\n\t\t\t} else {\n\t\t\t\tplaceholder = sprintf(\n\t\t\t\t\t/* translators: 1: Number of comments, 2: Post title. */\n\t\t\t\t\t_n(\n\t\t\t\t\t\t'%1$s response to %2$s',\n\t\t\t\t\t\t'%1$s responses to %2$s',\n\t\t\t\t\t\tcommentsCount\n\t\t\t\t\t),\n\t\t\t\t\tcommentsCount,\n\t\t\t\t\tpostTitle\n\t\t\t\t);\n\t\t\t}\n\t\t} else if ( commentsCount === 1 ) {\n\t\t\tplaceholder = __( 'One response' );\n\t\t} else {\n\t\t\tplaceholder = sprintf(\n\t\t\t\t/* translators: %s: Number of comments. */\n\t\t\t\t_n( '%s response', '%s responses', commentsCount ),\n\t\t\t\tcommentsCount\n\t\t\t);\n\t\t}\n\t} else if ( showPostTitle ) {\n\t\tif ( commentsCount === 1 ) {\n\t\t\t/* translators: %s: Post title. */\n\t\t\tplaceholder = sprintf( __( 'Response to %s' ), postTitle );\n\t\t} else {\n\t\t\t/* translators: %s: Post title. */\n\t\t\tplaceholder = sprintf( __( 'Responses to %s' ), postTitle );\n\t\t}\n\t} else if ( commentsCount === 1 ) {\n\t\tplaceholder = __( 'Response' );\n\t} else {\n\t\tplaceholder = __( 'Responses' );\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<TagName { ...blockProps }>{ placeholder }</TagName>\n\t\t</>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-title/edit.js"],"names":["Edit","attributes","textAlign","showPostTitle","showCommentsCount","level","setAttributes","context","postType","postId","TagName","commentsCount","setCommentsCount","rawTitle","isSiteEditor","blockProps","className","threadCommentsDepth","threadComments","commentsPerPage","pageComments","select","getSettings","blockEditorStore","__experimentalDiscussionSettings","nestedCommentsNumber","Math","min","topLevelCommentsNumber","commentsNumber","parseInt","currentPostId","path","post","_fields","method","parse","then","res","headers","get","catch","blockControls","newAlign","newLevel","inspectorControls","value","postTitle","placeholder","undefined"],"mappings":";;;;;;;;;AAmBA;;AAhBA;;AAKA;;AAQA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAtBA;AAC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,KAHD,MAGO;AACN;AACAC,MAAAA,WAAW,GAAG,mBAAS,cAAI,iBAAJ,CAAT,EAAkCD,SAAlC,CAAd;AACA;AACD,GARM,MAQA,IAAKpC,aAAa,KAAK,CAAvB,EAA2B;AACjCqC,IAAAA,WAAW,GAAG,cAAI,UAAJ,CAAd;AACA,GAFM,MAEA;AACNA,IAAAA,WAAW,GAAG,cAAI,WAAJ,CAAd;AACA;;AAED,SACC,qDACGN,aADH,EAEGG,iBAFH,EAGC,4BAAC,OAAD,OAAc9B;AAAd,KAA6BiC,WAA7B,CAHD,CADD;AAOA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tuseBlockProps,\n\tInspectorControls,\n\tstore as blockEditorStore,\n\tHeadingLevelDropdown,\n} from '@wordpress/block-editor';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useEntityProp } from '@wordpress/core-data';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\n\nexport default function Edit( {\n\tattributes: { textAlign, showPostTitle, showCommentsCount, level },\n\tsetAttributes,\n\tcontext: { postType, postId },\n} ) {\n\tconst TagName = 'h' + level;\n\tconst [ commentsCount, setCommentsCount ] = useState();\n\tconst [ rawTitle ] = useEntityProp( 'postType', postType, 'title', postId );\n\tconst isSiteEditor = typeof postId === 'undefined';\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classnames( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tconst {\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\tuseEffect( () => {\n\t\tif ( isSiteEditor ) {\n\t\t\t// Match the number of comments that will be shown in the comment-template/edit.js placeholder\n\n\t\t\tconst nestedCommentsNumber = threadComments\n\t\t\t\t? Math.min( threadCommentsDepth, 3 ) - 1\n\t\t\t\t: 0;\n\t\t\tconst topLevelCommentsNumber = pageComments ? commentsPerPage : 3;\n\n\t\t\tconst commentsNumber =\n\t\t\t\tparseInt( nestedCommentsNumber ) +\n\t\t\t\tparseInt( topLevelCommentsNumber );\n\n\t\t\tsetCommentsCount( Math.min( commentsNumber, 3 ) );\n\t\t\treturn;\n\t\t}\n\t\tconst currentPostId = postId;\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\tpost: postId,\n\t\t\t\t_fields: 'id',\n\t\t\t} ),\n\t\t\tmethod: 'HEAD',\n\t\t\tparse: false,\n\t\t} )\n\t\t\t.then( ( res ) => {\n\t\t\t\t// Stale requests will have the `currentPostId` of an older closure.\n\t\t\t\tif ( currentPostId === postId ) {\n\t\t\t\t\tsetCommentsCount(\n\t\t\t\t\t\tparseInt( res.headers.get( 'X-WP-Total' ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( () => {\n\t\t\t\tsetCommentsCount( 0 );\n\t\t\t} );\n\t}, [ postId ] );\n\n\tconst blockControls = (\n\t\t<BlockControls group=\"block\">\n\t\t\t<AlignmentControl\n\t\t\t\tvalue={ textAlign }\n\t\t\t\tonChange={ ( newAlign ) =>\n\t\t\t\t\tsetAttributes( { textAlign: newAlign } )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<HeadingLevelDropdown\n\t\t\t\tvalue={ level }\n\t\t\t\tonChange={ ( newLevel ) =>\n\t\t\t\t\tsetAttributes( { level: newLevel } )\n\t\t\t\t}\n\t\t\t/>\n\t\t</BlockControls>\n\t);\n\n\tconst inspectorControls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Show post title' ) }\n\t\t\t\t\tchecked={ showPostTitle }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { showPostTitle: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Show comments count' ) }\n\t\t\t\t\tchecked={ showCommentsCount }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { showCommentsCount: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\tconst postTitle = isSiteEditor ? __( '“Post Title”' ) : `\"${ rawTitle }\"`;\n\n\tlet placeholder;\n\tif ( showCommentsCount && commentsCount !== undefined ) {\n\t\tif ( showPostTitle ) {\n\t\t\tif ( commentsCount === 1 ) {\n\t\t\t\t/* translators: %s: Post title. */\n\t\t\t\tplaceholder = sprintf( __( 'One response to %s' ), postTitle );\n\t\t\t} else {\n\t\t\t\tplaceholder = sprintf(\n\t\t\t\t\t/* translators: 1: Number of comments, 2: Post title. */\n\t\t\t\t\t_n(\n\t\t\t\t\t\t'%1$s response to %2$s',\n\t\t\t\t\t\t'%1$s responses to %2$s',\n\t\t\t\t\t\tcommentsCount\n\t\t\t\t\t),\n\t\t\t\t\tcommentsCount,\n\t\t\t\t\tpostTitle\n\t\t\t\t);\n\t\t\t}\n\t\t} else if ( commentsCount === 1 ) {\n\t\t\tplaceholder = __( 'One response' );\n\t\t} else {\n\t\t\tplaceholder = sprintf(\n\t\t\t\t/* translators: %s: Number of comments. */\n\t\t\t\t_n( '%s response', '%s responses', commentsCount ),\n\t\t\t\tcommentsCount\n\t\t\t);\n\t\t}\n\t} else if ( showPostTitle ) {\n\t\tif ( commentsCount === 1 ) {\n\t\t\t/* translators: %s: Post title. */\n\t\t\tplaceholder = sprintf( __( 'Response to %s' ), postTitle );\n\t\t} else {\n\t\t\t/* translators: %s: Post title. */\n\t\t\tplaceholder = sprintf( __( 'Responses to %s' ), postTitle );\n\t\t}\n\t} else if ( commentsCount === 1 ) {\n\t\tplaceholder = __( 'Response' );\n\t} else {\n\t\tplaceholder = __( 'Responses' );\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<TagName { ...blockProps }>{ placeholder }</TagName>\n\t\t</>\n\t);\n}\n"]}