@wordpress/block-library 8.11.0 → 8.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2129) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/archives/edit.js +6 -6
  3. package/build/archives/edit.js.map +1 -1
  4. package/build/archives/index.js +1 -2
  5. package/build/archives/index.js.map +1 -1
  6. package/build/audio/deprecated.js +3 -4
  7. package/build/audio/deprecated.js.map +1 -1
  8. package/build/audio/edit.js +13 -15
  9. package/build/audio/edit.js.map +1 -1
  10. package/build/audio/edit.native.js +22 -26
  11. package/build/audio/edit.native.js.map +1 -1
  12. package/build/audio/index.js +1 -1
  13. package/build/audio/save.js +5 -5
  14. package/build/audio/save.js.map +1 -1
  15. package/build/audio/transforms.js +25 -29
  16. package/build/audio/transforms.js.map +1 -1
  17. package/build/avatar/edit.js +68 -73
  18. package/build/avatar/edit.js.map +1 -1
  19. package/build/avatar/hooks.js +12 -16
  20. package/build/avatar/hooks.js.map +1 -1
  21. package/build/avatar/index.js +1 -2
  22. package/build/avatar/index.js.map +1 -1
  23. package/build/avatar/user-control.js +4 -5
  24. package/build/avatar/user-control.js.map +1 -1
  25. package/build/block/edit-title.native.js +4 -5
  26. package/build/block/edit-title.native.js.map +1 -1
  27. package/build/block/edit.js +15 -12
  28. package/build/block/edit.js.map +1 -1
  29. package/build/block/edit.native.js +7 -8
  30. package/build/block/edit.native.js.map +1 -1
  31. package/build/block/index.js +2 -2
  32. package/build/button/color-background.native.js +5 -6
  33. package/build/button/color-background.native.js.map +1 -1
  34. package/build/button/deprecated.js +75 -95
  35. package/build/button/deprecated.js.map +1 -1
  36. package/build/button/edit.js +14 -27
  37. package/build/button/edit.js.map +1 -1
  38. package/build/button/edit.native.js +38 -41
  39. package/build/button/edit.native.js.map +1 -1
  40. package/build/button/index.js +6 -9
  41. package/build/button/index.js.map +1 -1
  42. package/build/button/save.js +10 -12
  43. package/build/button/save.js.map +1 -1
  44. package/build/buttons/deprecated.js +19 -23
  45. package/build/buttons/deprecated.js.map +1 -1
  46. package/build/buttons/edit.js +8 -12
  47. package/build/buttons/edit.js.map +1 -1
  48. package/build/buttons/edit.native.js +19 -22
  49. package/build/buttons/edit.native.js.map +1 -1
  50. package/build/buttons/index.js +2 -2
  51. package/build/buttons/save.js +7 -9
  52. package/build/buttons/save.js.map +1 -1
  53. package/build/buttons/transforms.js +3 -3
  54. package/build/buttons/transforms.js.map +1 -1
  55. package/build/calendar/edit.js +8 -7
  56. package/build/calendar/edit.js.map +1 -1
  57. package/build/calendar/index.js +1 -2
  58. package/build/calendar/index.js.map +1 -1
  59. package/build/categories/edit.js +21 -24
  60. package/build/categories/edit.js.map +1 -1
  61. package/build/categories/index.js +1 -2
  62. package/build/categories/index.js.map +1 -1
  63. package/build/code/edit.js +7 -7
  64. package/build/code/edit.js.map +1 -1
  65. package/build/code/edit.native.js +1 -1
  66. package/build/code/edit.native.js.map +1 -1
  67. package/build/code/index.js +1 -1
  68. package/build/code/save.js +5 -5
  69. package/build/code/save.js.map +1 -1
  70. package/build/code/transforms.js +6 -8
  71. package/build/code/transforms.js.map +1 -1
  72. package/build/column/column-preview.native.js +9 -11
  73. package/build/column/column-preview.native.js.map +1 -1
  74. package/build/column/deprecated.js +6 -8
  75. package/build/column/deprecated.js.map +1 -1
  76. package/build/column/edit.js +12 -12
  77. package/build/column/edit.js.map +1 -1
  78. package/build/column/edit.native.js +20 -24
  79. package/build/column/edit.native.js.map +1 -1
  80. package/build/column/index.js +2 -2
  81. package/build/column/save.js +6 -6
  82. package/build/column/save.js.map +1 -1
  83. package/build/columns/columnCalculations.native.js +13 -8
  84. package/build/columns/columnCalculations.native.js.map +1 -1
  85. package/build/columns/deprecated.js +9 -12
  86. package/build/columns/deprecated.js.map +1 -1
  87. package/build/columns/edit.js +21 -24
  88. package/build/columns/edit.js.map +1 -1
  89. package/build/columns/edit.native.js +16 -20
  90. package/build/columns/edit.native.js.map +1 -1
  91. package/build/columns/index.js +2 -2
  92. package/build/columns/save.js +5 -5
  93. package/build/columns/save.js.map +1 -1
  94. package/build/columns/transforms.js +11 -16
  95. package/build/columns/transforms.js.map +1 -1
  96. package/build/columns/utils.js +6 -13
  97. package/build/columns/utils.js.map +1 -1
  98. package/build/comment-author-avatar/edit.js +14 -17
  99. package/build/comment-author-avatar/edit.js.map +1 -1
  100. package/build/comment-author-avatar/index.js +1 -2
  101. package/build/comment-author-avatar/index.js.map +1 -1
  102. package/build/comment-author-name/deprecated.js +4 -7
  103. package/build/comment-author-name/deprecated.js.map +1 -1
  104. package/build/comment-author-name/edit.js +15 -15
  105. package/build/comment-author-name/edit.js.map +1 -1
  106. package/build/comment-author-name/index.js +1 -2
  107. package/build/comment-author-name/index.js.map +1 -1
  108. package/build/comment-content/edit.js +13 -12
  109. package/build/comment-content/edit.js.map +1 -1
  110. package/build/comment-content/index.js +1 -2
  111. package/build/comment-content/index.js.map +1 -1
  112. package/build/comment-date/deprecated.js +4 -7
  113. package/build/comment-date/deprecated.js.map +1 -1
  114. package/build/comment-date/edit.js +12 -12
  115. package/build/comment-date/edit.js.map +1 -1
  116. package/build/comment-date/index.js +1 -2
  117. package/build/comment-date/index.js.map +1 -1
  118. package/build/comment-edit-link/edit.js +9 -9
  119. package/build/comment-edit-link/edit.js.map +1 -1
  120. package/build/comment-edit-link/index.js +1 -2
  121. package/build/comment-edit-link/index.js.map +1 -1
  122. package/build/comment-reply-link/edit.js +8 -8
  123. package/build/comment-reply-link/edit.js.map +1 -1
  124. package/build/comment-reply-link/index.js +1 -2
  125. package/build/comment-reply-link/index.js.map +1 -1
  126. package/build/comment-template/edit.js +67 -81
  127. package/build/comment-template/edit.js.map +1 -1
  128. package/build/comment-template/hooks.js +14 -17
  129. package/build/comment-template/hooks.js.map +1 -1
  130. package/build/comment-template/index.js +1 -2
  131. package/build/comment-template/index.js.map +1 -1
  132. package/build/comment-template/util.js +1 -3
  133. package/build/comment-template/util.js.map +1 -1
  134. package/build/comments/deprecated.js +10 -11
  135. package/build/comments/deprecated.js.map +1 -1
  136. package/build/comments/edit/comments-inspector-controls.js +6 -7
  137. package/build/comments/edit/comments-inspector-controls.js.map +1 -1
  138. package/build/comments/edit/comments-legacy.js +10 -10
  139. package/build/comments/edit/comments-legacy.js.map +1 -1
  140. package/build/comments/edit/index.js +4 -2
  141. package/build/comments/edit/index.js.map +1 -1
  142. package/build/comments/edit/placeholder.js +4 -5
  143. package/build/comments/edit/placeholder.js.map +1 -1
  144. package/build/comments/index.js +1 -2
  145. package/build/comments/index.js.map +1 -1
  146. package/build/comments/save.js +8 -9
  147. package/build/comments/save.js.map +1 -1
  148. package/build/comments-pagination/comments-pagination-arrow-controls.js +4 -5
  149. package/build/comments-pagination/comments-pagination-arrow-controls.js.map +1 -1
  150. package/build/comments-pagination/edit.js +11 -11
  151. package/build/comments-pagination/edit.js.map +1 -1
  152. package/build/comments-pagination/index.js +2 -3
  153. package/build/comments-pagination/index.js.map +1 -1
  154. package/build/comments-pagination-next/edit.js +13 -17
  155. package/build/comments-pagination-next/edit.js.map +1 -1
  156. package/build/comments-pagination-next/index.js +1 -2
  157. package/build/comments-pagination-next/index.js.map +1 -1
  158. package/build/comments-pagination-numbers/edit.js +13 -15
  159. package/build/comments-pagination-numbers/edit.js.map +1 -1
  160. package/build/comments-pagination-numbers/index.js +1 -2
  161. package/build/comments-pagination-numbers/index.js.map +1 -1
  162. package/build/comments-pagination-previous/edit.js +13 -17
  163. package/build/comments-pagination-previous/edit.js.map +1 -1
  164. package/build/comments-pagination-previous/index.js +1 -2
  165. package/build/comments-pagination-previous/index.js.map +1 -1
  166. package/build/comments-title/deprecated.js +5 -8
  167. package/build/comments-title/deprecated.js.map +1 -1
  168. package/build/comments-title/edit.js +17 -23
  169. package/build/comments-title/edit.js.map +1 -1
  170. package/build/comments-title/index.js +1 -1
  171. package/build/cover/controls.native.js +92 -101
  172. package/build/cover/controls.native.js.map +1 -1
  173. package/build/cover/deprecated.js +79 -80
  174. package/build/cover/deprecated.js.map +1 -1
  175. package/build/cover/edit/block-controls.js +7 -8
  176. package/build/cover/edit/block-controls.js.map +1 -1
  177. package/build/cover/edit/cover-placeholder.js +8 -9
  178. package/build/cover/edit/cover-placeholder.js.map +1 -1
  179. package/build/cover/edit/index.js +24 -26
  180. package/build/cover/edit/index.js.map +1 -1
  181. package/build/cover/edit/inspector-controls.js +18 -23
  182. package/build/cover/edit/inspector-controls.js.map +1 -1
  183. package/build/cover/edit/resizable-cover-popover.js +18 -20
  184. package/build/cover/edit/resizable-cover-popover.js.map +1 -1
  185. package/build/cover/edit/use-cover-is-dark.js +1 -3
  186. package/build/cover/edit/use-cover-is-dark.js.map +1 -1
  187. package/build/cover/edit.native.js +134 -156
  188. package/build/cover/edit.native.js.map +1 -1
  189. package/build/cover/focal-point-settings-button.native.js +6 -7
  190. package/build/cover/focal-point-settings-button.native.js.map +1 -1
  191. package/build/cover/index.js +2 -2
  192. package/build/cover/overlay-color-settings.native.js +8 -9
  193. package/build/cover/overlay-color-settings.native.js.map +1 -1
  194. package/build/cover/save.js +12 -11
  195. package/build/cover/save.js.map +1 -1
  196. package/build/cover/shared.js +5 -6
  197. package/build/cover/shared.js.map +1 -1
  198. package/build/cover/transforms.js +117 -147
  199. package/build/cover/transforms.js.map +1 -1
  200. package/build/cover/use-cover-is-dark.native.js +1 -5
  201. package/build/cover/use-cover-is-dark.native.js.map +1 -1
  202. package/build/details/edit.js +8 -13
  203. package/build/details/edit.js.map +1 -1
  204. package/build/details/index.js +2 -3
  205. package/build/details/index.js.map +1 -1
  206. package/build/details/init.js +16 -0
  207. package/build/details/init.js.map +1 -0
  208. package/build/details/save.js +5 -10
  209. package/build/details/save.js.map +1 -1
  210. package/build/embed/deprecated.js +16 -18
  211. package/build/embed/deprecated.js.map +1 -1
  212. package/build/embed/edit.js +10 -9
  213. package/build/embed/edit.js.map +1 -1
  214. package/build/embed/edit.native.js +10 -7
  215. package/build/embed/edit.native.js.map +1 -1
  216. package/build/embed/embed-controls.js +22 -25
  217. package/build/embed/embed-controls.js.map +1 -1
  218. package/build/embed/embed-controls.native.js +9 -10
  219. package/build/embed/embed-controls.native.js.map +1 -1
  220. package/build/embed/embed-link-settings.native.js +9 -10
  221. package/build/embed/embed-link-settings.native.js.map +1 -1
  222. package/build/embed/embed-no-preview.native.js +8 -9
  223. package/build/embed/embed-no-preview.native.js.map +1 -1
  224. package/build/embed/embed-placeholder.js +10 -11
  225. package/build/embed/embed-placeholder.js.map +1 -1
  226. package/build/embed/embed-placeholder.native.js +11 -14
  227. package/build/embed/embed-placeholder.native.js.map +1 -1
  228. package/build/embed/embed-preview.native.js +16 -17
  229. package/build/embed/embed-preview.native.js.map +1 -1
  230. package/build/embed/index.js +1 -1
  231. package/build/embed/save.js +7 -7
  232. package/build/embed/save.js.map +1 -1
  233. package/build/embed/transforms.js +10 -18
  234. package/build/embed/transforms.js.map +1 -1
  235. package/build/embed/util.js +20 -51
  236. package/build/embed/util.js.map +1 -1
  237. package/build/embed/wp-embed-preview.js +18 -25
  238. package/build/embed/wp-embed-preview.js.map +1 -1
  239. package/build/embed/wp-embed-preview.native.js +8 -12
  240. package/build/embed/wp-embed-preview.native.js.map +1 -1
  241. package/build/file/deprecated.js +15 -15
  242. package/build/file/deprecated.js.map +1 -1
  243. package/build/file/edit.js +15 -18
  244. package/build/file/edit.js.map +1 -1
  245. package/build/file/edit.native.js +20 -25
  246. package/build/file/edit.native.js.map +1 -1
  247. package/build/file/index.js +1 -1
  248. package/build/file/inspector.js +12 -13
  249. package/build/file/inspector.js.map +1 -1
  250. package/build/file/save.js +5 -5
  251. package/build/file/save.js.map +1 -1
  252. package/build/file/transforms.js +9 -15
  253. package/build/file/transforms.js.map +1 -1
  254. package/build/footnotes/edit.js +57 -0
  255. package/build/footnotes/edit.js.map +1 -0
  256. package/build/footnotes/format.js +142 -0
  257. package/build/footnotes/format.js.map +1 -0
  258. package/build/footnotes/index.js +67 -0
  259. package/build/footnotes/index.js.map +1 -0
  260. package/build/freeform/convert-to-blocks-button.js +3 -4
  261. package/build/freeform/convert-to-blocks-button.js.map +1 -1
  262. package/build/freeform/edit.js +16 -16
  263. package/build/freeform/edit.js.map +1 -1
  264. package/build/freeform/edit.native.js +2 -4
  265. package/build/freeform/edit.native.js.map +1 -1
  266. package/build/freeform/index.js +2 -2
  267. package/build/freeform/modal.js +5 -5
  268. package/build/freeform/modal.js.map +1 -1
  269. package/build/freeform/save.js +3 -4
  270. package/build/freeform/save.js.map +1 -1
  271. package/build/gallery/deprecated.js +46 -58
  272. package/build/gallery/deprecated.js.map +1 -1
  273. package/build/gallery/edit-wrapper.js +4 -2
  274. package/build/gallery/edit-wrapper.js.map +1 -1
  275. package/build/gallery/edit.js +39 -64
  276. package/build/gallery/edit.js.map +1 -1
  277. package/build/gallery/gallery.js +2 -4
  278. package/build/gallery/gallery.js.map +1 -1
  279. package/build/gallery/gallery.native.js +3 -2
  280. package/build/gallery/gallery.native.js.map +1 -1
  281. package/build/gallery/gap-styles.js +6 -7
  282. package/build/gallery/gap-styles.js.map +1 -1
  283. package/build/gallery/index.js +2 -2
  284. package/build/gallery/save.js +5 -6
  285. package/build/gallery/save.js.map +1 -1
  286. package/build/gallery/shared-icon.native.js +7 -9
  287. package/build/gallery/shared-icon.native.js.map +1 -1
  288. package/build/gallery/shared.js +4 -10
  289. package/build/gallery/shared.js.map +1 -1
  290. package/build/gallery/transforms.js +103 -142
  291. package/build/gallery/transforms.js.map +1 -1
  292. package/build/gallery/use-get-media.native.js +8 -15
  293. package/build/gallery/use-get-media.native.js.map +1 -1
  294. package/build/gallery/use-get-new-images.js +2 -2
  295. package/build/gallery/use-get-new-images.js.map +1 -1
  296. package/build/gallery/use-image-sizes.js +11 -19
  297. package/build/gallery/use-image-sizes.js.map +1 -1
  298. package/build/gallery/utils.js +2 -2
  299. package/build/gallery/utils.js.map +1 -1
  300. package/build/gallery/v1/edit.js +38 -69
  301. package/build/gallery/v1/edit.js.map +1 -1
  302. package/build/gallery/v1/gallery.js +10 -11
  303. package/build/gallery/v1/gallery.js.map +1 -1
  304. package/build/gallery/v1/save.js +8 -8
  305. package/build/gallery/v1/save.js.map +1 -1
  306. package/build/gallery/v1/shared.js +4 -10
  307. package/build/gallery/v1/shared.js.map +1 -1
  308. package/build/group/deprecated.js +25 -31
  309. package/build/group/deprecated.js.map +1 -1
  310. package/build/group/edit.js +18 -19
  311. package/build/group/edit.js.map +1 -1
  312. package/build/group/edit.native.js +14 -18
  313. package/build/group/edit.native.js.map +1 -1
  314. package/build/group/index.js +2 -2
  315. package/build/group/placeholder.js +18 -20
  316. package/build/group/placeholder.js.map +1 -1
  317. package/build/group/save.js +7 -7
  318. package/build/group/save.js.map +1 -1
  319. package/build/group/variations.js +8 -23
  320. package/build/group/variations.js.map +1 -1
  321. package/build/heading/deprecated.js +26 -32
  322. package/build/heading/deprecated.js.map +1 -1
  323. package/build/heading/edit.js +17 -20
  324. package/build/heading/edit.js.map +1 -1
  325. package/build/heading/heading-level-icon.js +4 -5
  326. package/build/heading/heading-level-icon.js.map +1 -1
  327. package/build/heading/index.js +4 -5
  328. package/build/heading/index.js.map +1 -1
  329. package/build/heading/save.js +7 -7
  330. package/build/heading/save.js.map +1 -1
  331. package/build/heading/transforms.js +21 -28
  332. package/build/heading/transforms.js.map +1 -1
  333. package/build/home-link/edit.js +12 -16
  334. package/build/home-link/edit.js.map +1 -1
  335. package/build/home-link/index.js +1 -2
  336. package/build/home-link/index.js.map +1 -1
  337. package/build/html/edit.js +9 -9
  338. package/build/html/edit.js.map +1 -1
  339. package/build/html/index.js +1 -1
  340. package/build/html/preview.js +5 -8
  341. package/build/html/preview.js.map +1 -1
  342. package/build/html/save.js +3 -4
  343. package/build/html/save.js.map +1 -1
  344. package/build/html/transforms.js +3 -4
  345. package/build/html/transforms.js.map +1 -1
  346. package/build/image/deprecated.js +29 -32
  347. package/build/image/deprecated.js.map +1 -1
  348. package/build/image/edit.js +20 -28
  349. package/build/image/edit.js.map +1 -1
  350. package/build/image/edit.native.js +48 -63
  351. package/build/image/edit.native.js.map +1 -1
  352. package/build/image/image.js +48 -59
  353. package/build/image/image.js.map +1 -1
  354. package/build/image/index.js +7 -9
  355. package/build/image/index.js.map +1 -1
  356. package/build/image/interactivity.js +140 -30
  357. package/build/image/interactivity.js.map +1 -1
  358. package/build/image/save.js +7 -7
  359. package/build/image/save.js.map +1 -1
  360. package/build/image/transforms.js +36 -46
  361. package/build/image/transforms.js.map +1 -1
  362. package/build/image/use-client-width.js +1 -3
  363. package/build/image/use-client-width.js.map +1 -1
  364. package/build/image/utils.js +4 -7
  365. package/build/image/utils.js.map +1 -1
  366. package/build/index.js +22 -44
  367. package/build/index.js.map +1 -1
  368. package/build/index.native.js +3 -6
  369. package/build/index.native.js.map +1 -1
  370. package/build/latest-comments/edit.js +7 -7
  371. package/build/latest-comments/edit.js.map +1 -1
  372. package/build/latest-comments/index.js +1 -2
  373. package/build/latest-comments/index.js.map +1 -1
  374. package/build/latest-posts/deprecated.js +4 -8
  375. package/build/latest-posts/deprecated.js.map +1 -1
  376. package/build/latest-posts/edit.js +38 -41
  377. package/build/latest-posts/edit.js.map +1 -1
  378. package/build/latest-posts/edit.native.js +8 -10
  379. package/build/latest-posts/edit.native.js.map +1 -1
  380. package/build/latest-posts/index.js +1 -2
  381. package/build/latest-posts/index.js.map +1 -1
  382. package/build/list/deprecated.js +22 -25
  383. package/build/list/deprecated.js.map +1 -1
  384. package/build/list/edit.js +13 -16
  385. package/build/list/edit.js.map +1 -1
  386. package/build/list/index.js +1 -1
  387. package/build/list/ordered-list-settings.js +55 -34
  388. package/build/list/ordered-list-settings.js.map +1 -1
  389. package/build/list/save.js +9 -9
  390. package/build/list/save.js.map +1 -1
  391. package/build/list/tag-name.js +4 -7
  392. package/build/list/tag-name.js.map +1 -1
  393. package/build/list/tag-name.native.js +4 -7
  394. package/build/list/tag-name.native.js.map +1 -1
  395. package/build/list/transforms.js +11 -15
  396. package/build/list/transforms.js.map +1 -1
  397. package/build/list/utils.js +1 -1
  398. package/build/list/utils.js.map +1 -1
  399. package/build/list-item/edit.js +13 -18
  400. package/build/list-item/edit.js.map +1 -1
  401. package/build/list-item/edit.native.js +17 -24
  402. package/build/list-item/edit.native.js.map +1 -1
  403. package/build/list-item/hooks/use-enter.js +1 -3
  404. package/build/list-item/hooks/use-enter.js.map +1 -1
  405. package/build/list-item/hooks/use-enter.native.js +1 -3
  406. package/build/list-item/hooks/use-enter.native.js.map +1 -1
  407. package/build/list-item/hooks/use-indent-list-item.js +1 -3
  408. package/build/list-item/hooks/use-indent-list-item.js.map +1 -1
  409. package/build/list-item/hooks/use-merge.js +1 -1
  410. package/build/list-item/hooks/use-outdent-list-item.js +2 -4
  411. package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
  412. package/build/list-item/index.js +1 -1
  413. package/build/list-item/list-style-type.native.js +29 -34
  414. package/build/list-item/list-style-type.native.js.map +1 -1
  415. package/build/list-item/save.js +5 -5
  416. package/build/list-item/save.js.map +1 -1
  417. package/build/list-item/transforms.js +1 -4
  418. package/build/list-item/transforms.js.map +1 -1
  419. package/build/list-item/utils.js +4 -4
  420. package/build/list-item/utils.js.map +1 -1
  421. package/build/{private-apis.js → lock-unlock.js} +1 -1
  422. package/build/lock-unlock.js.map +1 -0
  423. package/build/loginout/edit.js +8 -8
  424. package/build/loginout/edit.js.map +1 -1
  425. package/build/loginout/index.js +1 -2
  426. package/build/loginout/index.js.map +1 -1
  427. package/build/media-text/deprecated.js +65 -64
  428. package/build/media-text/deprecated.js.map +1 -1
  429. package/build/media-text/edit.js +32 -43
  430. package/build/media-text/edit.js.map +1 -1
  431. package/build/media-text/edit.native.js +9 -13
  432. package/build/media-text/edit.native.js.map +1 -1
  433. package/build/media-text/index.js +1 -1
  434. package/build/media-text/media-container.js +23 -25
  435. package/build/media-text/media-container.js.map +1 -1
  436. package/build/media-text/media-container.native.js +12 -13
  437. package/build/media-text/media-container.native.js.map +1 -1
  438. package/build/media-text/save.js +20 -17
  439. package/build/media-text/save.js.map +1 -1
  440. package/build/media-text/transforms.js +73 -91
  441. package/build/media-text/transforms.js.map +1 -1
  442. package/build/missing/edit.js +13 -14
  443. package/build/missing/edit.js.map +1 -1
  444. package/build/missing/edit.native.js +7 -8
  445. package/build/missing/edit.native.js.map +1 -1
  446. package/build/missing/index.js +4 -6
  447. package/build/missing/index.js.map +1 -1
  448. package/build/missing/save.js +3 -4
  449. package/build/missing/save.js.map +1 -1
  450. package/build/more/edit.js +13 -16
  451. package/build/more/edit.js.map +1 -1
  452. package/build/more/edit.native.js +4 -10
  453. package/build/more/edit.native.js.map +1 -1
  454. package/build/more/index.js +4 -6
  455. package/build/more/index.js.map +1 -1
  456. package/build/more/save.js +6 -7
  457. package/build/more/save.js.map +1 -1
  458. package/build/navigation/constants.js +8 -1
  459. package/build/navigation/constants.js.map +1 -1
  460. package/build/navigation/deprecated.js +17 -28
  461. package/build/navigation/deprecated.js.map +1 -1
  462. package/build/navigation/edit/are-blocks-dirty.js +1 -1
  463. package/build/navigation/edit/are-blocks-dirty.js.map +1 -1
  464. package/build/navigation/edit/deleted-navigation-warning.js +3 -4
  465. package/build/navigation/edit/deleted-navigation-warning.js.map +1 -1
  466. package/build/navigation/edit/index.js +68 -61
  467. package/build/navigation/edit/index.js.map +1 -1
  468. package/build/navigation/edit/inner-blocks.js +12 -15
  469. package/build/navigation/edit/inner-blocks.js.map +1 -1
  470. package/build/navigation/edit/leaf-more-menu.js +38 -46
  471. package/build/navigation/edit/leaf-more-menu.js.map +1 -1
  472. package/build/navigation/edit/manage-menus-button.js +5 -6
  473. package/build/navigation/edit/manage-menus-button.js.map +1 -1
  474. package/build/navigation/edit/menu-inspector-controls.js +52 -52
  475. package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
  476. package/build/navigation/edit/navigation-menu-delete-control.js +3 -4
  477. package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  478. package/build/navigation/edit/navigation-menu-selector.js +63 -61
  479. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  480. package/build/navigation/edit/overlay-menu-icon.js +3 -5
  481. package/build/navigation/edit/overlay-menu-icon.js.map +1 -1
  482. package/build/navigation/edit/overlay-menu-preview.js +5 -6
  483. package/build/navigation/edit/overlay-menu-preview.js.map +1 -1
  484. package/build/navigation/edit/placeholder/index.js +10 -11
  485. package/build/navigation/edit/placeholder/index.js.map +1 -1
  486. package/build/navigation/edit/placeholder/placeholder-preview.js +3 -4
  487. package/build/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
  488. package/build/navigation/edit/responsive-wrapper.js +20 -21
  489. package/build/navigation/edit/responsive-wrapper.js.map +1 -1
  490. package/build/navigation/edit/unsaved-inner-blocks.js +13 -19
  491. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  492. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js +2 -3
  493. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  494. package/build/navigation/edit/use-create-navigation-menu.js +3 -7
  495. package/build/navigation/edit/use-create-navigation-menu.js.map +1 -1
  496. package/build/navigation/edit/use-generate-default-navigation-title.js +1 -5
  497. package/build/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
  498. package/build/navigation/edit/use-inner-blocks.js +1 -1
  499. package/build/navigation/edit/use-inner-blocks.js.map +1 -1
  500. package/build/navigation/edit/use-navigation-notice.js +4 -5
  501. package/build/navigation/edit/use-navigation-notice.js.map +1 -1
  502. package/build/navigation/edit/utils.js +2 -4
  503. package/build/navigation/edit/utils.js.map +1 -1
  504. package/build/navigation/index.js +2 -3
  505. package/build/navigation/index.js.map +1 -1
  506. package/build/navigation/interactivity.js +97 -87
  507. package/build/navigation/interactivity.js.map +1 -1
  508. package/build/navigation/menu-items-to-blocks.js +25 -34
  509. package/build/navigation/menu-items-to-blocks.js.map +1 -1
  510. package/build/navigation/save.js +3 -5
  511. package/build/navigation/save.js.map +1 -1
  512. package/build/navigation/use-navigation-entities.js +2 -2
  513. package/build/navigation/use-navigation-entities.js.map +1 -1
  514. package/build/navigation/use-navigation-menu.js +10 -8
  515. package/build/navigation/use-navigation-menu.js.map +1 -1
  516. package/build/navigation/use-template-part-area-label.js +3 -5
  517. package/build/navigation/use-template-part-area-label.js.map +1 -1
  518. package/build/navigation/view-modal.js +2 -4
  519. package/build/navigation/view-modal.js.map +1 -1
  520. package/build/navigation/view.js +1 -1
  521. package/build/navigation/view.js.map +1 -1
  522. package/build/navigation-link/edit.js +18 -23
  523. package/build/navigation-link/edit.js.map +1 -1
  524. package/build/navigation-link/hooks.js +1 -1
  525. package/build/navigation-link/hooks.js.map +1 -1
  526. package/build/navigation-link/index.js +11 -16
  527. package/build/navigation-link/index.js.map +1 -1
  528. package/build/navigation-link/link-ui.js +9 -8
  529. package/build/navigation-link/link-ui.js.map +1 -1
  530. package/build/navigation-link/update-attributes.js +1 -4
  531. package/build/navigation-link/update-attributes.js.map +1 -1
  532. package/build/navigation-submenu/edit.js +17 -18
  533. package/build/navigation-submenu/edit.js.map +1 -1
  534. package/build/navigation-submenu/index.js +7 -12
  535. package/build/navigation-submenu/index.js.map +1 -1
  536. package/build/navigation-submenu/transforms.js +6 -30
  537. package/build/navigation-submenu/transforms.js.map +1 -1
  538. package/build/nextpage/edit.js +2 -1
  539. package/build/nextpage/edit.js.map +1 -1
  540. package/build/nextpage/edit.native.js +9 -10
  541. package/build/nextpage/edit.native.js.map +1 -1
  542. package/build/nextpage/index.js +1 -1
  543. package/build/page-list/convert-to-links-modal.js +5 -6
  544. package/build/page-list/convert-to-links-modal.js.map +1 -1
  545. package/build/page-list/edit.js +35 -41
  546. package/build/page-list/edit.js.map +1 -1
  547. package/build/page-list/index.js +1 -2
  548. package/build/page-list/index.js.map +1 -1
  549. package/build/page-list/use-convert-to-navigation-links.js +16 -21
  550. package/build/page-list/use-convert-to-navigation-links.js.map +1 -1
  551. package/build/page-list-item/edit.js +7 -7
  552. package/build/page-list-item/edit.js.map +1 -1
  553. package/build/page-list-item/index.js +4 -7
  554. package/build/page-list-item/index.js.map +1 -1
  555. package/build/paragraph/deprecated.js +23 -28
  556. package/build/paragraph/deprecated.js.map +1 -1
  557. package/build/paragraph/edit.js +16 -20
  558. package/build/paragraph/edit.js.map +1 -1
  559. package/build/paragraph/edit.native.js +13 -16
  560. package/build/paragraph/edit.native.js.map +1 -1
  561. package/build/paragraph/index.js +4 -6
  562. package/build/paragraph/index.js.map +1 -1
  563. package/build/paragraph/save.js +8 -8
  564. package/build/paragraph/save.js.map +1 -1
  565. package/build/paragraph/transforms.js +10 -13
  566. package/build/paragraph/transforms.js.map +1 -1
  567. package/build/pattern/edit.js +11 -39
  568. package/build/pattern/edit.js.map +1 -1
  569. package/build/pattern/index.js +7 -14
  570. package/build/pattern/index.js.map +1 -1
  571. package/build/post-author/edit.js +22 -24
  572. package/build/post-author/edit.js.map +1 -1
  573. package/build/post-author/index.js +1 -2
  574. package/build/post-author/index.js.map +1 -1
  575. package/build/post-author-biography/edit.js +14 -19
  576. package/build/post-author-biography/edit.js.map +1 -1
  577. package/build/post-author-biography/index.js +1 -2
  578. package/build/post-author-biography/index.js.map +1 -1
  579. package/build/post-author-name/edit.js +16 -18
  580. package/build/post-author-name/edit.js.map +1 -1
  581. package/build/post-author-name/index.js +1 -2
  582. package/build/post-author-name/index.js.map +1 -1
  583. package/build/post-author-name/transforms.js +10 -16
  584. package/build/post-author-name/transforms.js.map +1 -1
  585. package/build/post-comment/edit.js +10 -9
  586. package/build/post-comment/edit.js.map +1 -1
  587. package/build/post-comment/index.js +1 -1
  588. package/build/post-comment/save.js +2 -1
  589. package/build/post-comment/save.js.map +1 -1
  590. package/build/post-comments-count/edit.js +8 -13
  591. package/build/post-comments-count/edit.js.map +1 -1
  592. package/build/post-comments-count/index.js +1 -2
  593. package/build/post-comments-count/index.js.map +1 -1
  594. package/build/post-comments-form/edit.js +7 -7
  595. package/build/post-comments-form/edit.js.map +1 -1
  596. package/build/post-comments-form/form.js +5 -10
  597. package/build/post-comments-form/form.js.map +1 -1
  598. package/build/post-comments-form/index.js +1 -2
  599. package/build/post-comments-form/index.js.map +1 -1
  600. package/build/post-comments-link/edit.js +7 -7
  601. package/build/post-comments-link/edit.js.map +1 -1
  602. package/build/post-comments-link/index.js +1 -2
  603. package/build/post-comments-link/index.js.map +1 -1
  604. package/build/post-content/edit.js +37 -32
  605. package/build/post-content/edit.js.map +1 -1
  606. package/build/post-content/index.js +2 -3
  607. package/build/post-content/index.js.map +1 -1
  608. package/build/post-date/deprecated.js +4 -7
  609. package/build/post-date/deprecated.js.map +1 -1
  610. package/build/post-date/edit.js +29 -34
  611. package/build/post-date/edit.js.map +1 -1
  612. package/build/post-date/index.js +1 -2
  613. package/build/post-date/index.js.map +1 -1
  614. package/build/post-excerpt/edit.js +25 -25
  615. package/build/post-excerpt/edit.js.map +1 -1
  616. package/build/post-excerpt/index.js +3 -4
  617. package/build/post-excerpt/index.js.map +1 -1
  618. package/build/post-featured-image/dimension-controls.js +12 -13
  619. package/build/post-featured-image/dimension-controls.js.map +1 -1
  620. package/build/post-featured-image/edit.js +31 -39
  621. package/build/post-featured-image/edit.js.map +1 -1
  622. package/build/post-featured-image/index.js +1 -2
  623. package/build/post-featured-image/index.js.map +1 -1
  624. package/build/post-featured-image/overlay.js +11 -13
  625. package/build/post-featured-image/overlay.js.map +1 -1
  626. package/build/post-navigation-link/edit.js +13 -13
  627. package/build/post-navigation-link/edit.js.map +1 -1
  628. package/build/post-navigation-link/index.js +1 -2
  629. package/build/post-navigation-link/index.js.map +1 -1
  630. package/build/post-template/edit.js +107 -88
  631. package/build/post-template/edit.js.map +1 -1
  632. package/build/post-template/index.js +10 -5
  633. package/build/post-template/index.js.map +1 -1
  634. package/build/post-terms/edit.js +13 -22
  635. package/build/post-terms/edit.js.map +1 -1
  636. package/build/post-terms/hooks.js +9 -5
  637. package/build/post-terms/hooks.js.map +1 -1
  638. package/build/post-terms/index.js +1 -2
  639. package/build/post-terms/index.js.map +1 -1
  640. package/build/post-terms/use-post-terms.js +7 -12
  641. package/build/post-terms/use-post-terms.js.map +1 -1
  642. package/build/post-time-to-read/edit.js +7 -7
  643. package/build/post-time-to-read/edit.js.map +1 -1
  644. package/build/post-time-to-read/index.js +1 -1
  645. package/build/post-time-to-read/init.js +16 -0
  646. package/build/post-time-to-read/init.js.map +1 -0
  647. package/build/post-title/deprecated.js +4 -7
  648. package/build/post-title/deprecated.js.map +1 -1
  649. package/build/post-title/edit.js +40 -34
  650. package/build/post-title/edit.js.map +1 -1
  651. package/build/post-title/index.js +2 -3
  652. package/build/post-title/index.js.map +1 -1
  653. package/build/preformatted/edit.js +11 -16
  654. package/build/preformatted/edit.js.map +1 -1
  655. package/build/preformatted/edit.native.js +7 -8
  656. package/build/preformatted/edit.native.js.map +1 -1
  657. package/build/preformatted/index.js +1 -1
  658. package/build/preformatted/save.js +5 -5
  659. package/build/preformatted/save.js.map +1 -1
  660. package/build/preformatted/transforms.js +14 -20
  661. package/build/preformatted/transforms.js.map +1 -1
  662. package/build/pullquote/deprecated.js +71 -81
  663. package/build/pullquote/deprecated.js.map +1 -1
  664. package/build/pullquote/edit.js +8 -8
  665. package/build/pullquote/edit.js.map +1 -1
  666. package/build/pullquote/edit.native.js +15 -22
  667. package/build/pullquote/edit.native.js.map +1 -1
  668. package/build/pullquote/figure.native.js +5 -6
  669. package/build/pullquote/figure.native.js.map +1 -1
  670. package/build/pullquote/index.js +1 -1
  671. package/build/pullquote/save.js +8 -8
  672. package/build/pullquote/save.js.map +1 -1
  673. package/build/pullquote/transforms.js +17 -24
  674. package/build/pullquote/transforms.js.map +1 -1
  675. package/build/query/deprecated.js +211 -87
  676. package/build/query/deprecated.js.map +1 -1
  677. package/build/query/edit/index.js +2 -4
  678. package/build/query/edit/index.js.map +1 -1
  679. package/build/query/edit/inspector-controls/author-control.js +5 -8
  680. package/build/query/edit/inspector-controls/author-control.js.map +1 -1
  681. package/build/query/edit/inspector-controls/create-new-post-link.js +6 -7
  682. package/build/query/edit/inspector-controls/create-new-post-link.js.map +1 -1
  683. package/build/query/edit/inspector-controls/index.js +8 -9
  684. package/build/query/edit/inspector-controls/index.js.map +1 -1
  685. package/build/query/edit/inspector-controls/order-control.js +5 -6
  686. package/build/query/edit/inspector-controls/order-control.js.map +1 -1
  687. package/build/query/edit/inspector-controls/parent-control.js +10 -13
  688. package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
  689. package/build/query/edit/inspector-controls/sticky-control.js +4 -5
  690. package/build/query/edit/inspector-controls/sticky-control.js.map +1 -1
  691. package/build/query/edit/inspector-controls/taxonomy-controls.js +15 -19
  692. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  693. package/build/query/edit/pattern-selection-modal.js +5 -6
  694. package/build/query/edit/pattern-selection-modal.js.map +1 -1
  695. package/build/query/edit/query-content.js +27 -15
  696. package/build/query/edit/query-content.js.map +1 -1
  697. package/build/query/edit/query-placeholder.js +20 -22
  698. package/build/query/edit/query-placeholder.js.map +1 -1
  699. package/build/query/edit/query-toolbar.js +17 -41
  700. package/build/query/edit/query-toolbar.js.map +1 -1
  701. package/build/query/index.js +2 -9
  702. package/build/query/index.js.map +1 -1
  703. package/build/query/save.js +7 -8
  704. package/build/query/save.js.map +1 -1
  705. package/build/query/utils.js +25 -62
  706. package/build/query/utils.js.map +1 -1
  707. package/build/query-no-results/edit.js +2 -1
  708. package/build/query-no-results/edit.js.map +1 -1
  709. package/build/query-no-results/index.js +1 -2
  710. package/build/query-no-results/index.js.map +1 -1
  711. package/build/query-pagination/deprecated.js +2 -1
  712. package/build/query-pagination/deprecated.js.map +1 -1
  713. package/build/query-pagination/edit.js +30 -12
  714. package/build/query-pagination/edit.js.map +1 -1
  715. package/build/query-pagination/index.js +8 -4
  716. package/build/query-pagination/index.js.map +1 -1
  717. package/build/query-pagination/query-pagination-arrow-controls.js +4 -5
  718. package/build/query-pagination/query-pagination-arrow-controls.js.map +1 -1
  719. package/build/query-pagination/query-pagination-label-control.js +29 -0
  720. package/build/query-pagination/query-pagination-label-control.js.map +1 -0
  721. package/build/query-pagination-next/edit.js +14 -17
  722. package/build/query-pagination-next/edit.js.map +1 -1
  723. package/build/query-pagination-next/index.js +2 -3
  724. package/build/query-pagination-next/index.js.map +1 -1
  725. package/build/query-pagination-numbers/edit.js +5 -8
  726. package/build/query-pagination-numbers/edit.js.map +1 -1
  727. package/build/query-pagination-numbers/index.js +1 -2
  728. package/build/query-pagination-numbers/index.js.map +1 -1
  729. package/build/query-pagination-previous/edit.js +15 -18
  730. package/build/query-pagination-previous/edit.js.map +1 -1
  731. package/build/query-pagination-previous/index.js +2 -3
  732. package/build/query-pagination-previous/index.js.map +1 -1
  733. package/build/query-title/deprecated.js +4 -7
  734. package/build/query-title/deprecated.js.map +1 -1
  735. package/build/query-title/edit.js +18 -22
  736. package/build/query-title/edit.js.map +1 -1
  737. package/build/query-title/index.js +1 -2
  738. package/build/query-title/index.js.map +1 -1
  739. package/build/quote/deprecated.js +21 -27
  740. package/build/quote/deprecated.js.map +1 -1
  741. package/build/quote/edit.js +15 -16
  742. package/build/quote/edit.js.map +1 -1
  743. package/build/quote/index.js +1 -1
  744. package/build/quote/save.js +7 -7
  745. package/build/quote/save.js.map +1 -1
  746. package/build/quote/transforms.js +37 -57
  747. package/build/quote/transforms.js.map +1 -1
  748. package/build/read-more/edit.js +12 -16
  749. package/build/read-more/edit.js.map +1 -1
  750. package/build/read-more/index.js +1 -2
  751. package/build/read-more/index.js.map +1 -1
  752. package/build/rss/edit.js +8 -7
  753. package/build/rss/edit.js.map +1 -1
  754. package/build/rss/index.js +1 -2
  755. package/build/rss/index.js.map +1 -1
  756. package/build/search/edit.js +77 -34
  757. package/build/search/edit.js.map +1 -1
  758. package/build/search/edit.native.js +45 -43
  759. package/build/search/edit.native.js.map +1 -1
  760. package/build/search/index.js +9 -2
  761. package/build/search/index.js.map +1 -1
  762. package/build/search/view.js +67 -0
  763. package/build/search/view.js.map +1 -0
  764. package/build/separator/deprecated.js +8 -8
  765. package/build/separator/deprecated.js.map +1 -1
  766. package/build/separator/edit.js +11 -13
  767. package/build/separator/edit.js.map +1 -1
  768. package/build/separator/index.js +1 -1
  769. package/build/separator/save.js +10 -12
  770. package/build/separator/save.js.map +1 -1
  771. package/build/shortcode/edit.js +8 -8
  772. package/build/shortcode/edit.js.map +1 -1
  773. package/build/shortcode/index.js +2 -2
  774. package/build/shortcode/save.js +3 -4
  775. package/build/shortcode/save.js.map +1 -1
  776. package/build/shortcode/transforms.js +3 -4
  777. package/build/shortcode/transforms.js.map +1 -1
  778. package/build/site-logo/edit.js +68 -84
  779. package/build/site-logo/edit.js.map +1 -1
  780. package/build/site-logo/index.js +1 -2
  781. package/build/site-logo/index.js.map +1 -1
  782. package/build/site-logo/transforms.js +4 -5
  783. package/build/site-logo/transforms.js.map +1 -1
  784. package/build/site-tagline/deprecated.js +4 -7
  785. package/build/site-tagline/deprecated.js.map +1 -1
  786. package/build/site-tagline/edit.js +11 -12
  787. package/build/site-tagline/edit.js.map +1 -1
  788. package/build/site-tagline/icon.js +0 -3
  789. package/build/site-tagline/icon.js.map +1 -1
  790. package/build/site-tagline/index.js +1 -2
  791. package/build/site-tagline/index.js.map +1 -1
  792. package/build/site-title/deprecated.js +4 -7
  793. package/build/site-title/deprecated.js.map +1 -1
  794. package/build/site-title/edit/index.js +14 -16
  795. package/build/site-title/edit/index.js.map +1 -1
  796. package/build/site-title/index.js +1 -2
  797. package/build/site-title/index.js.map +1 -1
  798. package/build/site-title/transforms.js +4 -5
  799. package/build/site-title/transforms.js.map +1 -1
  800. package/build/social-link/edit.js +21 -18
  801. package/build/social-link/edit.js.map +1 -1
  802. package/build/social-link/edit.native.js +11 -13
  803. package/build/social-link/edit.native.js.map +1 -1
  804. package/build/social-link/index.js +2 -3
  805. package/build/social-link/index.js.map +1 -1
  806. package/build/social-links/deprecated.js +7 -8
  807. package/build/social-links/deprecated.js.map +1 -1
  808. package/build/social-links/edit.js +39 -45
  809. package/build/social-links/edit.js.map +1 -1
  810. package/build/social-links/edit.native.js +18 -25
  811. package/build/social-links/edit.native.js.map +1 -1
  812. package/build/social-links/index.js +4 -2
  813. package/build/social-links/index.js.map +1 -1
  814. package/build/social-links/save.js +2 -1
  815. package/build/social-links/save.js.map +1 -1
  816. package/build/spacer/controls.js +18 -21
  817. package/build/spacer/controls.js.map +1 -1
  818. package/build/spacer/controls.native.js +7 -8
  819. package/build/spacer/controls.native.js.map +1 -1
  820. package/build/spacer/deprecated.js +11 -11
  821. package/build/spacer/deprecated.js.map +1 -1
  822. package/build/spacer/edit.js +30 -33
  823. package/build/spacer/edit.js.map +1 -1
  824. package/build/spacer/edit.native.js +11 -13
  825. package/build/spacer/edit.native.js.map +1 -1
  826. package/build/spacer/index.js +1 -1
  827. package/build/spacer/save.js +23 -14
  828. package/build/spacer/save.js.map +1 -1
  829. package/build/spacer/save.native.js +14 -14
  830. package/build/spacer/save.native.js.map +1 -1
  831. package/build/table/deprecated.js +83 -104
  832. package/build/table/deprecated.js.map +1 -1
  833. package/build/table/edit.js +51 -63
  834. package/build/table/edit.js.map +1 -1
  835. package/build/table/index.js +1 -1
  836. package/build/table/save.js +35 -41
  837. package/build/table/save.js.map +1 -1
  838. package/build/table/state.js +32 -59
  839. package/build/table/state.js.map +1 -1
  840. package/build/table/transforms.js +17 -20
  841. package/build/table/transforms.js.map +1 -1
  842. package/build/table-of-contents/edit.js +13 -12
  843. package/build/table-of-contents/edit.js.map +1 -1
  844. package/build/table-of-contents/index.js +1 -1
  845. package/build/table-of-contents/list.js +3 -4
  846. package/build/table-of-contents/list.js.map +1 -1
  847. package/build/table-of-contents/save.js +7 -8
  848. package/build/table-of-contents/save.js.map +1 -1
  849. package/build/table-of-contents/utils.js +1 -3
  850. package/build/table-of-contents/utils.js.map +1 -1
  851. package/build/tag-cloud/edit.js +8 -9
  852. package/build/tag-cloud/edit.js.map +1 -1
  853. package/build/tag-cloud/index.js +1 -2
  854. package/build/tag-cloud/index.js.map +1 -1
  855. package/build/template-part/edit/advanced-controls.js +15 -19
  856. package/build/template-part/edit/advanced-controls.js.map +1 -1
  857. package/build/template-part/edit/import-controls.js +7 -11
  858. package/build/template-part/edit/import-controls.js.map +1 -1
  859. package/build/template-part/edit/index.js +15 -12
  860. package/build/template-part/edit/index.js.map +1 -1
  861. package/build/template-part/edit/inner-blocks.js +11 -13
  862. package/build/template-part/edit/inner-blocks.js.map +1 -1
  863. package/build/template-part/edit/placeholder.js +7 -8
  864. package/build/template-part/edit/placeholder.js.map +1 -1
  865. package/build/template-part/edit/selection-modal.js +8 -11
  866. package/build/template-part/edit/selection-modal.js.map +1 -1
  867. package/build/template-part/edit/title-modal.js +5 -6
  868. package/build/template-part/edit/title-modal.js.map +1 -1
  869. package/build/template-part/edit/utils/hooks.js +4 -6
  870. package/build/template-part/edit/utils/hooks.js.map +1 -1
  871. package/build/template-part/edit/utils/transformers.js +3 -6
  872. package/build/template-part/edit/utils/transformers.js.map +1 -1
  873. package/build/template-part/index.js +11 -20
  874. package/build/template-part/index.js.map +1 -1
  875. package/build/template-part/variations.js +2 -2
  876. package/build/template-part/variations.js.map +1 -1
  877. package/build/term-description/edit.js +7 -7
  878. package/build/term-description/edit.js.map +1 -1
  879. package/build/term-description/index.js +1 -2
  880. package/build/term-description/index.js.map +1 -1
  881. package/build/text-columns/edit.js +9 -11
  882. package/build/text-columns/edit.js.map +1 -1
  883. package/build/text-columns/index.js +1 -1
  884. package/build/text-columns/save.js +14 -18
  885. package/build/text-columns/save.js.map +1 -1
  886. package/build/text-columns/transforms.js +14 -20
  887. package/build/text-columns/transforms.js.map +1 -1
  888. package/build/utils/init-block.native.js +1 -3
  889. package/build/utils/init-block.native.js.map +1 -1
  890. package/build/utils/interactivity/constants.js +1 -1
  891. package/build/utils/interactivity/constants.js.map +1 -1
  892. package/build/utils/interactivity/directives.js +79 -93
  893. package/build/utils/interactivity/directives.js.map +1 -1
  894. package/build/utils/interactivity/hooks.js +29 -46
  895. package/build/utils/interactivity/hooks.js.map +1 -1
  896. package/build/utils/interactivity/hydration.js +1 -1
  897. package/build/utils/interactivity/hydration.js.map +1 -1
  898. package/build/utils/interactivity/index.js +1 -3
  899. package/build/utils/interactivity/index.js.map +1 -1
  900. package/build/utils/interactivity/store.js +4 -5
  901. package/build/utils/interactivity/store.js.map +1 -1
  902. package/build/utils/interactivity/vdom.js +14 -4
  903. package/build/utils/interactivity/vdom.js.map +1 -1
  904. package/build/utils/migrate-font-family.js +3 -5
  905. package/build/utils/migrate-font-family.js.map +1 -1
  906. package/build/utils/search-patterns.js +5 -19
  907. package/build/utils/search-patterns.js.map +1 -1
  908. package/build/utils/transformation-categories.native.js +1 -4
  909. package/build/utils/transformation-categories.native.js.map +1 -1
  910. package/build/verse/deprecated.js +14 -18
  911. package/build/verse/deprecated.js.map +1 -1
  912. package/build/verse/edit.js +11 -14
  913. package/build/verse/edit.js.map +1 -1
  914. package/build/verse/index.js +1 -1
  915. package/build/verse/save.js +7 -7
  916. package/build/verse/save.js.map +1 -1
  917. package/build/video/deprecated.js +6 -6
  918. package/build/video/deprecated.js.map +1 -1
  919. package/build/video/edit-common-settings.js +4 -5
  920. package/build/video/edit-common-settings.js.map +1 -1
  921. package/build/video/edit.js +22 -29
  922. package/build/video/edit.js.map +1 -1
  923. package/build/video/edit.native.js +26 -32
  924. package/build/video/edit.native.js.map +1 -1
  925. package/build/video/index.js +1 -1
  926. package/build/video/save.js +5 -5
  927. package/build/video/save.js.map +1 -1
  928. package/build/video/tracks-editor.js +39 -51
  929. package/build/video/tracks-editor.js.map +1 -1
  930. package/build/video/tracks.js +7 -11
  931. package/build/video/tracks.js.map +1 -1
  932. package/build/video/transforms.js +30 -35
  933. package/build/video/transforms.js.map +1 -1
  934. package/build-module/archives/edit.js +6 -6
  935. package/build-module/archives/edit.js.map +1 -1
  936. package/build-module/archives/index.js +1 -2
  937. package/build-module/archives/index.js.map +1 -1
  938. package/build-module/audio/deprecated.js +3 -4
  939. package/build-module/audio/deprecated.js.map +1 -1
  940. package/build-module/audio/edit.js +13 -15
  941. package/build-module/audio/edit.js.map +1 -1
  942. package/build-module/audio/edit.native.js +22 -26
  943. package/build-module/audio/edit.native.js.map +1 -1
  944. package/build-module/audio/index.js +1 -1
  945. package/build-module/audio/save.js +5 -5
  946. package/build-module/audio/save.js.map +1 -1
  947. package/build-module/audio/transforms.js +25 -29
  948. package/build-module/audio/transforms.js.map +1 -1
  949. package/build-module/avatar/edit.js +67 -72
  950. package/build-module/avatar/edit.js.map +1 -1
  951. package/build-module/avatar/hooks.js +12 -16
  952. package/build-module/avatar/hooks.js.map +1 -1
  953. package/build-module/avatar/index.js +1 -2
  954. package/build-module/avatar/index.js.map +1 -1
  955. package/build-module/avatar/user-control.js +4 -5
  956. package/build-module/avatar/user-control.js.map +1 -1
  957. package/build-module/block/edit-title.native.js +4 -5
  958. package/build-module/block/edit-title.native.js.map +1 -1
  959. package/build-module/block/edit.js +15 -12
  960. package/build-module/block/edit.js.map +1 -1
  961. package/build-module/block/edit.native.js +7 -8
  962. package/build-module/block/edit.native.js.map +1 -1
  963. package/build-module/block/index.js +2 -2
  964. package/build-module/button/color-background.native.js +5 -6
  965. package/build-module/button/color-background.native.js.map +1 -1
  966. package/build-module/button/deprecated.js +75 -95
  967. package/build-module/button/deprecated.js.map +1 -1
  968. package/build-module/button/edit.js +14 -26
  969. package/build-module/button/edit.js.map +1 -1
  970. package/build-module/button/edit.native.js +26 -41
  971. package/build-module/button/edit.native.js.map +1 -1
  972. package/build-module/button/index.js +6 -9
  973. package/build-module/button/index.js.map +1 -1
  974. package/build-module/button/save.js +10 -12
  975. package/build-module/button/save.js.map +1 -1
  976. package/build-module/buttons/deprecated.js +19 -23
  977. package/build-module/buttons/deprecated.js.map +1 -1
  978. package/build-module/buttons/edit.js +8 -12
  979. package/build-module/buttons/edit.js.map +1 -1
  980. package/build-module/buttons/edit.native.js +19 -22
  981. package/build-module/buttons/edit.native.js.map +1 -1
  982. package/build-module/buttons/index.js +2 -2
  983. package/build-module/buttons/save.js +7 -9
  984. package/build-module/buttons/save.js.map +1 -1
  985. package/build-module/buttons/transforms.js +3 -3
  986. package/build-module/buttons/transforms.js.map +1 -1
  987. package/build-module/calendar/edit.js +8 -7
  988. package/build-module/calendar/edit.js.map +1 -1
  989. package/build-module/calendar/index.js +1 -2
  990. package/build-module/calendar/index.js.map +1 -1
  991. package/build-module/categories/edit.js +21 -24
  992. package/build-module/categories/edit.js.map +1 -1
  993. package/build-module/categories/index.js +1 -2
  994. package/build-module/categories/index.js.map +1 -1
  995. package/build-module/code/edit.js +7 -7
  996. package/build-module/code/edit.js.map +1 -1
  997. package/build-module/code/edit.native.js +1 -1
  998. package/build-module/code/edit.native.js.map +1 -1
  999. package/build-module/code/index.js +1 -1
  1000. package/build-module/code/save.js +5 -5
  1001. package/build-module/code/save.js.map +1 -1
  1002. package/build-module/code/transforms.js +6 -8
  1003. package/build-module/code/transforms.js.map +1 -1
  1004. package/build-module/column/column-preview.native.js +9 -11
  1005. package/build-module/column/column-preview.native.js.map +1 -1
  1006. package/build-module/column/deprecated.js +6 -8
  1007. package/build-module/column/deprecated.js.map +1 -1
  1008. package/build-module/column/edit.js +12 -12
  1009. package/build-module/column/edit.js.map +1 -1
  1010. package/build-module/column/edit.native.js +20 -24
  1011. package/build-module/column/edit.native.js.map +1 -1
  1012. package/build-module/column/index.js +2 -2
  1013. package/build-module/column/save.js +6 -6
  1014. package/build-module/column/save.js.map +1 -1
  1015. package/build-module/columns/columnCalculations.native.js +6 -9
  1016. package/build-module/columns/columnCalculations.native.js.map +1 -1
  1017. package/build-module/columns/deprecated.js +9 -12
  1018. package/build-module/columns/deprecated.js.map +1 -1
  1019. package/build-module/columns/edit.js +21 -24
  1020. package/build-module/columns/edit.js.map +1 -1
  1021. package/build-module/columns/edit.native.js +16 -19
  1022. package/build-module/columns/edit.native.js.map +1 -1
  1023. package/build-module/columns/index.js +2 -2
  1024. package/build-module/columns/save.js +5 -5
  1025. package/build-module/columns/save.js.map +1 -1
  1026. package/build-module/columns/transforms.js +11 -16
  1027. package/build-module/columns/transforms.js.map +1 -1
  1028. package/build-module/columns/utils.js +6 -13
  1029. package/build-module/columns/utils.js.map +1 -1
  1030. package/build-module/comment-author-avatar/edit.js +14 -14
  1031. package/build-module/comment-author-avatar/edit.js.map +1 -1
  1032. package/build-module/comment-author-avatar/index.js +1 -2
  1033. package/build-module/comment-author-avatar/index.js.map +1 -1
  1034. package/build-module/comment-author-name/deprecated.js +4 -7
  1035. package/build-module/comment-author-name/deprecated.js.map +1 -1
  1036. package/build-module/comment-author-name/edit.js +15 -15
  1037. package/build-module/comment-author-name/edit.js.map +1 -1
  1038. package/build-module/comment-author-name/index.js +1 -2
  1039. package/build-module/comment-author-name/index.js.map +1 -1
  1040. package/build-module/comment-content/edit.js +13 -12
  1041. package/build-module/comment-content/edit.js.map +1 -1
  1042. package/build-module/comment-content/index.js +1 -2
  1043. package/build-module/comment-content/index.js.map +1 -1
  1044. package/build-module/comment-date/deprecated.js +4 -7
  1045. package/build-module/comment-date/deprecated.js.map +1 -1
  1046. package/build-module/comment-date/edit.js +12 -12
  1047. package/build-module/comment-date/edit.js.map +1 -1
  1048. package/build-module/comment-date/index.js +1 -2
  1049. package/build-module/comment-date/index.js.map +1 -1
  1050. package/build-module/comment-edit-link/edit.js +9 -9
  1051. package/build-module/comment-edit-link/edit.js.map +1 -1
  1052. package/build-module/comment-edit-link/index.js +1 -2
  1053. package/build-module/comment-edit-link/index.js.map +1 -1
  1054. package/build-module/comment-reply-link/edit.js +8 -8
  1055. package/build-module/comment-reply-link/edit.js.map +1 -1
  1056. package/build-module/comment-reply-link/index.js +1 -2
  1057. package/build-module/comment-reply-link/index.js.map +1 -1
  1058. package/build-module/comment-template/edit.js +66 -77
  1059. package/build-module/comment-template/edit.js.map +1 -1
  1060. package/build-module/comment-template/hooks.js +14 -17
  1061. package/build-module/comment-template/hooks.js.map +1 -1
  1062. package/build-module/comment-template/index.js +1 -2
  1063. package/build-module/comment-template/index.js.map +1 -1
  1064. package/build-module/comment-template/util.js +1 -3
  1065. package/build-module/comment-template/util.js.map +1 -1
  1066. package/build-module/comments/deprecated.js +10 -10
  1067. package/build-module/comments/deprecated.js.map +1 -1
  1068. package/build-module/comments/edit/comments-inspector-controls.js +6 -7
  1069. package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
  1070. package/build-module/comments/edit/comments-legacy.js +10 -10
  1071. package/build-module/comments/edit/comments-legacy.js.map +1 -1
  1072. package/build-module/comments/edit/index.js +4 -2
  1073. package/build-module/comments/edit/index.js.map +1 -1
  1074. package/build-module/comments/edit/placeholder.js +4 -5
  1075. package/build-module/comments/edit/placeholder.js.map +1 -1
  1076. package/build-module/comments/index.js +1 -2
  1077. package/build-module/comments/index.js.map +1 -1
  1078. package/build-module/comments/save.js +8 -8
  1079. package/build-module/comments/save.js.map +1 -1
  1080. package/build-module/comments-pagination/comments-pagination-arrow-controls.js +4 -5
  1081. package/build-module/comments-pagination/comments-pagination-arrow-controls.js.map +1 -1
  1082. package/build-module/comments-pagination/edit.js +11 -11
  1083. package/build-module/comments-pagination/edit.js.map +1 -1
  1084. package/build-module/comments-pagination/index.js +2 -3
  1085. package/build-module/comments-pagination/index.js.map +1 -1
  1086. package/build-module/comments-pagination-next/edit.js +13 -14
  1087. package/build-module/comments-pagination-next/edit.js.map +1 -1
  1088. package/build-module/comments-pagination-next/index.js +1 -2
  1089. package/build-module/comments-pagination-next/index.js.map +1 -1
  1090. package/build-module/comments-pagination-numbers/edit.js +13 -15
  1091. package/build-module/comments-pagination-numbers/edit.js.map +1 -1
  1092. package/build-module/comments-pagination-numbers/index.js +1 -2
  1093. package/build-module/comments-pagination-numbers/index.js.map +1 -1
  1094. package/build-module/comments-pagination-previous/edit.js +13 -14
  1095. package/build-module/comments-pagination-previous/edit.js.map +1 -1
  1096. package/build-module/comments-pagination-previous/index.js +1 -2
  1097. package/build-module/comments-pagination-previous/index.js.map +1 -1
  1098. package/build-module/comments-title/deprecated.js +5 -8
  1099. package/build-module/comments-title/deprecated.js.map +1 -1
  1100. package/build-module/comments-title/edit.js +17 -22
  1101. package/build-module/comments-title/edit.js.map +1 -1
  1102. package/build-module/comments-title/index.js +1 -1
  1103. package/build-module/cover/controls.native.js +92 -101
  1104. package/build-module/cover/controls.native.js.map +1 -1
  1105. package/build-module/cover/deprecated.js +79 -80
  1106. package/build-module/cover/deprecated.js.map +1 -1
  1107. package/build-module/cover/edit/block-controls.js +7 -8
  1108. package/build-module/cover/edit/block-controls.js.map +1 -1
  1109. package/build-module/cover/edit/cover-placeholder.js +8 -9
  1110. package/build-module/cover/edit/cover-placeholder.js.map +1 -1
  1111. package/build-module/cover/edit/index.js +24 -25
  1112. package/build-module/cover/edit/index.js.map +1 -1
  1113. package/build-module/cover/edit/inspector-controls.js +18 -20
  1114. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  1115. package/build-module/cover/edit/resizable-cover-popover.js +17 -18
  1116. package/build-module/cover/edit/resizable-cover-popover.js.map +1 -1
  1117. package/build-module/cover/edit/use-cover-is-dark.js +1 -3
  1118. package/build-module/cover/edit/use-cover-is-dark.js.map +1 -1
  1119. package/build-module/cover/edit.native.js +134 -155
  1120. package/build-module/cover/edit.native.js.map +1 -1
  1121. package/build-module/cover/focal-point-settings-button.native.js +6 -7
  1122. package/build-module/cover/focal-point-settings-button.native.js.map +1 -1
  1123. package/build-module/cover/index.js +2 -2
  1124. package/build-module/cover/overlay-color-settings.native.js +8 -9
  1125. package/build-module/cover/overlay-color-settings.native.js.map +1 -1
  1126. package/build-module/cover/save.js +12 -11
  1127. package/build-module/cover/save.js.map +1 -1
  1128. package/build-module/cover/shared.js +5 -6
  1129. package/build-module/cover/shared.js.map +1 -1
  1130. package/build-module/cover/transforms.js +116 -146
  1131. package/build-module/cover/transforms.js.map +1 -1
  1132. package/build-module/cover/use-cover-is-dark.native.js +1 -5
  1133. package/build-module/cover/use-cover-is-dark.native.js.map +1 -1
  1134. package/build-module/details/edit.js +8 -10
  1135. package/build-module/details/edit.js.map +1 -1
  1136. package/build-module/details/index.js +2 -3
  1137. package/build-module/details/index.js.map +1 -1
  1138. package/build-module/details/init.js +6 -0
  1139. package/build-module/details/init.js.map +1 -0
  1140. package/build-module/details/save.js +5 -7
  1141. package/build-module/details/save.js.map +1 -1
  1142. package/build-module/embed/deprecated.js +16 -18
  1143. package/build-module/embed/deprecated.js.map +1 -1
  1144. package/build-module/embed/edit.js +10 -9
  1145. package/build-module/embed/edit.js.map +1 -1
  1146. package/build-module/embed/edit.native.js +10 -7
  1147. package/build-module/embed/edit.native.js.map +1 -1
  1148. package/build-module/embed/embed-controls.js +22 -25
  1149. package/build-module/embed/embed-controls.js.map +1 -1
  1150. package/build-module/embed/embed-controls.native.js +9 -10
  1151. package/build-module/embed/embed-controls.native.js.map +1 -1
  1152. package/build-module/embed/embed-link-settings.native.js +9 -10
  1153. package/build-module/embed/embed-link-settings.native.js.map +1 -1
  1154. package/build-module/embed/embed-no-preview.native.js +8 -9
  1155. package/build-module/embed/embed-no-preview.native.js.map +1 -1
  1156. package/build-module/embed/embed-placeholder.js +10 -11
  1157. package/build-module/embed/embed-placeholder.js.map +1 -1
  1158. package/build-module/embed/embed-placeholder.native.js +11 -14
  1159. package/build-module/embed/embed-placeholder.native.js.map +1 -1
  1160. package/build-module/embed/embed-preview.native.js +16 -17
  1161. package/build-module/embed/embed-preview.native.js.map +1 -1
  1162. package/build-module/embed/index.js +1 -1
  1163. package/build-module/embed/save.js +7 -7
  1164. package/build-module/embed/save.js.map +1 -1
  1165. package/build-module/embed/transforms.js +10 -18
  1166. package/build-module/embed/transforms.js.map +1 -1
  1167. package/build-module/embed/util.js +20 -51
  1168. package/build-module/embed/util.js.map +1 -1
  1169. package/build-module/embed/wp-embed-preview.js +18 -22
  1170. package/build-module/embed/wp-embed-preview.js.map +1 -1
  1171. package/build-module/embed/wp-embed-preview.native.js +8 -9
  1172. package/build-module/embed/wp-embed-preview.native.js.map +1 -1
  1173. package/build-module/file/deprecated.js +15 -15
  1174. package/build-module/file/deprecated.js.map +1 -1
  1175. package/build-module/file/edit.js +15 -18
  1176. package/build-module/file/edit.js.map +1 -1
  1177. package/build-module/file/edit.native.js +20 -25
  1178. package/build-module/file/edit.native.js.map +1 -1
  1179. package/build-module/file/index.js +1 -1
  1180. package/build-module/file/inspector.js +12 -13
  1181. package/build-module/file/inspector.js.map +1 -1
  1182. package/build-module/file/save.js +5 -5
  1183. package/build-module/file/save.js.map +1 -1
  1184. package/build-module/file/transforms.js +9 -15
  1185. package/build-module/file/transforms.js.map +1 -1
  1186. package/build-module/footnotes/edit.js +48 -0
  1187. package/build-module/footnotes/edit.js.map +1 -0
  1188. package/build-module/footnotes/format.js +126 -0
  1189. package/build-module/footnotes/format.js.map +1 -0
  1190. package/build-module/footnotes/index.js +48 -0
  1191. package/build-module/footnotes/index.js.map +1 -0
  1192. package/build-module/freeform/convert-to-blocks-button.js +3 -4
  1193. package/build-module/freeform/convert-to-blocks-button.js.map +1 -1
  1194. package/build-module/freeform/edit.js +16 -16
  1195. package/build-module/freeform/edit.js.map +1 -1
  1196. package/build-module/freeform/edit.native.js +2 -3
  1197. package/build-module/freeform/edit.native.js.map +1 -1
  1198. package/build-module/freeform/index.js +2 -2
  1199. package/build-module/freeform/modal.js +5 -5
  1200. package/build-module/freeform/modal.js.map +1 -1
  1201. package/build-module/freeform/save.js +3 -4
  1202. package/build-module/freeform/save.js.map +1 -1
  1203. package/build-module/gallery/deprecated.js +46 -58
  1204. package/build-module/gallery/deprecated.js.map +1 -1
  1205. package/build-module/gallery/edit-wrapper.js +4 -2
  1206. package/build-module/gallery/edit-wrapper.js.map +1 -1
  1207. package/build-module/gallery/edit.js +39 -63
  1208. package/build-module/gallery/edit.js.map +1 -1
  1209. package/build-module/gallery/gallery.js +2 -3
  1210. package/build-module/gallery/gallery.js.map +1 -1
  1211. package/build-module/gallery/gallery.native.js +3 -2
  1212. package/build-module/gallery/gallery.native.js.map +1 -1
  1213. package/build-module/gallery/gap-styles.js +6 -7
  1214. package/build-module/gallery/gap-styles.js.map +1 -1
  1215. package/build-module/gallery/index.js +2 -2
  1216. package/build-module/gallery/save.js +5 -6
  1217. package/build-module/gallery/save.js.map +1 -1
  1218. package/build-module/gallery/shared-icon.native.js +7 -8
  1219. package/build-module/gallery/shared-icon.native.js.map +1 -1
  1220. package/build-module/gallery/shared.js +4 -10
  1221. package/build-module/gallery/shared.js.map +1 -1
  1222. package/build-module/gallery/transforms.js +103 -142
  1223. package/build-module/gallery/transforms.js.map +1 -1
  1224. package/build-module/gallery/use-get-media.native.js +8 -15
  1225. package/build-module/gallery/use-get-media.native.js.map +1 -1
  1226. package/build-module/gallery/use-get-new-images.js +2 -2
  1227. package/build-module/gallery/use-get-new-images.js.map +1 -1
  1228. package/build-module/gallery/use-image-sizes.js +11 -19
  1229. package/build-module/gallery/use-image-sizes.js.map +1 -1
  1230. package/build-module/gallery/utils.js +2 -2
  1231. package/build-module/gallery/utils.js.map +1 -1
  1232. package/build-module/gallery/v1/edit.js +38 -68
  1233. package/build-module/gallery/v1/edit.js.map +1 -1
  1234. package/build-module/gallery/v1/gallery.js +10 -10
  1235. package/build-module/gallery/v1/gallery.js.map +1 -1
  1236. package/build-module/gallery/v1/save.js +8 -8
  1237. package/build-module/gallery/v1/save.js.map +1 -1
  1238. package/build-module/gallery/v1/shared.js +4 -10
  1239. package/build-module/gallery/v1/shared.js.map +1 -1
  1240. package/build-module/group/deprecated.js +25 -31
  1241. package/build-module/group/deprecated.js.map +1 -1
  1242. package/build-module/group/edit.js +18 -19
  1243. package/build-module/group/edit.js.map +1 -1
  1244. package/build-module/group/edit.native.js +14 -18
  1245. package/build-module/group/edit.native.js.map +1 -1
  1246. package/build-module/group/index.js +2 -2
  1247. package/build-module/group/placeholder.js +18 -20
  1248. package/build-module/group/placeholder.js.map +1 -1
  1249. package/build-module/group/save.js +7 -7
  1250. package/build-module/group/save.js.map +1 -1
  1251. package/build-module/group/variations.js +5 -23
  1252. package/build-module/group/variations.js.map +1 -1
  1253. package/build-module/heading/deprecated.js +26 -32
  1254. package/build-module/heading/deprecated.js.map +1 -1
  1255. package/build-module/heading/edit.js +17 -18
  1256. package/build-module/heading/edit.js.map +1 -1
  1257. package/build-module/heading/heading-level-icon.js +4 -5
  1258. package/build-module/heading/heading-level-icon.js.map +1 -1
  1259. package/build-module/heading/index.js +4 -5
  1260. package/build-module/heading/index.js.map +1 -1
  1261. package/build-module/heading/save.js +7 -7
  1262. package/build-module/heading/save.js.map +1 -1
  1263. package/build-module/heading/transforms.js +21 -28
  1264. package/build-module/heading/transforms.js.map +1 -1
  1265. package/build-module/home-link/edit.js +12 -16
  1266. package/build-module/home-link/edit.js.map +1 -1
  1267. package/build-module/home-link/index.js +1 -2
  1268. package/build-module/home-link/index.js.map +1 -1
  1269. package/build-module/html/edit.js +9 -9
  1270. package/build-module/html/edit.js.map +1 -1
  1271. package/build-module/html/index.js +1 -1
  1272. package/build-module/html/preview.js +5 -8
  1273. package/build-module/html/preview.js.map +1 -1
  1274. package/build-module/html/save.js +3 -4
  1275. package/build-module/html/save.js.map +1 -1
  1276. package/build-module/html/transforms.js +3 -4
  1277. package/build-module/html/transforms.js.map +1 -1
  1278. package/build-module/image/deprecated.js +29 -31
  1279. package/build-module/image/deprecated.js.map +1 -1
  1280. package/build-module/image/edit.js +19 -27
  1281. package/build-module/image/edit.js.map +1 -1
  1282. package/build-module/image/edit.native.js +48 -62
  1283. package/build-module/image/edit.native.js.map +1 -1
  1284. package/build-module/image/image.js +49 -60
  1285. package/build-module/image/image.js.map +1 -1
  1286. package/build-module/image/index.js +7 -9
  1287. package/build-module/image/index.js.map +1 -1
  1288. package/build-module/image/interactivity.js +140 -30
  1289. package/build-module/image/interactivity.js.map +1 -1
  1290. package/build-module/image/save.js +7 -7
  1291. package/build-module/image/save.js.map +1 -1
  1292. package/build-module/image/transforms.js +36 -46
  1293. package/build-module/image/transforms.js.map +1 -1
  1294. package/build-module/image/use-client-width.js +1 -3
  1295. package/build-module/image/use-client-width.js.map +1 -1
  1296. package/build-module/image/utils.js +4 -7
  1297. package/build-module/image/utils.js.map +1 -1
  1298. package/build-module/index.js +21 -44
  1299. package/build-module/index.js.map +1 -1
  1300. package/build-module/index.native.js +3 -6
  1301. package/build-module/index.native.js.map +1 -1
  1302. package/build-module/latest-comments/edit.js +7 -7
  1303. package/build-module/latest-comments/edit.js.map +1 -1
  1304. package/build-module/latest-comments/index.js +1 -2
  1305. package/build-module/latest-comments/index.js.map +1 -1
  1306. package/build-module/latest-posts/deprecated.js +4 -8
  1307. package/build-module/latest-posts/deprecated.js.map +1 -1
  1308. package/build-module/latest-posts/edit.js +39 -41
  1309. package/build-module/latest-posts/edit.js.map +1 -1
  1310. package/build-module/latest-posts/edit.native.js +8 -9
  1311. package/build-module/latest-posts/edit.native.js.map +1 -1
  1312. package/build-module/latest-posts/index.js +1 -2
  1313. package/build-module/latest-posts/index.js.map +1 -1
  1314. package/build-module/list/deprecated.js +22 -25
  1315. package/build-module/list/deprecated.js.map +1 -1
  1316. package/build-module/list/edit.js +13 -15
  1317. package/build-module/list/edit.js.map +1 -1
  1318. package/build-module/list/index.js +1 -1
  1319. package/build-module/list/ordered-list-settings.js +56 -35
  1320. package/build-module/list/ordered-list-settings.js.map +1 -1
  1321. package/build-module/list/save.js +9 -9
  1322. package/build-module/list/save.js.map +1 -1
  1323. package/build-module/list/tag-name.js +4 -4
  1324. package/build-module/list/tag-name.js.map +1 -1
  1325. package/build-module/list/tag-name.native.js +4 -4
  1326. package/build-module/list/tag-name.native.js.map +1 -1
  1327. package/build-module/list/transforms.js +11 -15
  1328. package/build-module/list/transforms.js.map +1 -1
  1329. package/build-module/list/utils.js +1 -1
  1330. package/build-module/list/utils.js.map +1 -1
  1331. package/build-module/list-item/edit.js +13 -18
  1332. package/build-module/list-item/edit.js.map +1 -1
  1333. package/build-module/list-item/edit.native.js +17 -24
  1334. package/build-module/list-item/edit.native.js.map +1 -1
  1335. package/build-module/list-item/hooks/use-enter.js +1 -3
  1336. package/build-module/list-item/hooks/use-enter.js.map +1 -1
  1337. package/build-module/list-item/hooks/use-enter.native.js +1 -3
  1338. package/build-module/list-item/hooks/use-enter.native.js.map +1 -1
  1339. package/build-module/list-item/hooks/use-indent-list-item.js +1 -3
  1340. package/build-module/list-item/hooks/use-indent-list-item.js.map +1 -1
  1341. package/build-module/list-item/hooks/use-merge.js +1 -1
  1342. package/build-module/list-item/hooks/use-outdent-list-item.js +2 -4
  1343. package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
  1344. package/build-module/list-item/index.js +1 -1
  1345. package/build-module/list-item/list-style-type.native.js +29 -34
  1346. package/build-module/list-item/list-style-type.native.js.map +1 -1
  1347. package/build-module/list-item/save.js +5 -5
  1348. package/build-module/list-item/save.js.map +1 -1
  1349. package/build-module/list-item/transforms.js +1 -4
  1350. package/build-module/list-item/transforms.js.map +1 -1
  1351. package/build-module/list-item/utils.js +4 -4
  1352. package/build-module/list-item/utils.js.map +1 -1
  1353. package/build-module/{private-apis.js → lock-unlock.js} +1 -1
  1354. package/build-module/lock-unlock.js.map +1 -0
  1355. package/build-module/loginout/edit.js +8 -8
  1356. package/build-module/loginout/edit.js.map +1 -1
  1357. package/build-module/loginout/index.js +1 -2
  1358. package/build-module/loginout/index.js.map +1 -1
  1359. package/build-module/media-text/deprecated.js +65 -64
  1360. package/build-module/media-text/deprecated.js.map +1 -1
  1361. package/build-module/media-text/edit.js +31 -42
  1362. package/build-module/media-text/edit.js.map +1 -1
  1363. package/build-module/media-text/edit.native.js +9 -13
  1364. package/build-module/media-text/edit.native.js.map +1 -1
  1365. package/build-module/media-text/index.js +1 -1
  1366. package/build-module/media-text/media-container.js +23 -24
  1367. package/build-module/media-text/media-container.js.map +1 -1
  1368. package/build-module/media-text/media-container.native.js +12 -12
  1369. package/build-module/media-text/media-container.native.js.map +1 -1
  1370. package/build-module/media-text/save.js +20 -17
  1371. package/build-module/media-text/save.js.map +1 -1
  1372. package/build-module/media-text/transforms.js +73 -91
  1373. package/build-module/media-text/transforms.js.map +1 -1
  1374. package/build-module/missing/edit.js +13 -14
  1375. package/build-module/missing/edit.js.map +1 -1
  1376. package/build-module/missing/edit.native.js +7 -8
  1377. package/build-module/missing/edit.native.js.map +1 -1
  1378. package/build-module/missing/index.js +4 -6
  1379. package/build-module/missing/index.js.map +1 -1
  1380. package/build-module/missing/save.js +3 -4
  1381. package/build-module/missing/save.js.map +1 -1
  1382. package/build-module/more/edit.js +13 -16
  1383. package/build-module/more/edit.js.map +1 -1
  1384. package/build-module/more/edit.native.js +3 -8
  1385. package/build-module/more/edit.native.js.map +1 -1
  1386. package/build-module/more/index.js +4 -6
  1387. package/build-module/more/index.js.map +1 -1
  1388. package/build-module/more/save.js +6 -7
  1389. package/build-module/more/save.js.map +1 -1
  1390. package/build-module/navigation/constants.js +6 -0
  1391. package/build-module/navigation/constants.js.map +1 -1
  1392. package/build-module/navigation/deprecated.js +17 -28
  1393. package/build-module/navigation/deprecated.js.map +1 -1
  1394. package/build-module/navigation/edit/are-blocks-dirty.js +1 -1
  1395. package/build-module/navigation/edit/are-blocks-dirty.js.map +1 -1
  1396. package/build-module/navigation/edit/deleted-navigation-warning.js +3 -4
  1397. package/build-module/navigation/edit/deleted-navigation-warning.js.map +1 -1
  1398. package/build-module/navigation/edit/index.js +68 -62
  1399. package/build-module/navigation/edit/index.js.map +1 -1
  1400. package/build-module/navigation/edit/inner-blocks.js +12 -15
  1401. package/build-module/navigation/edit/inner-blocks.js.map +1 -1
  1402. package/build-module/navigation/edit/leaf-more-menu.js +38 -43
  1403. package/build-module/navigation/edit/leaf-more-menu.js.map +1 -1
  1404. package/build-module/navigation/edit/manage-menus-button.js +5 -6
  1405. package/build-module/navigation/edit/manage-menus-button.js.map +1 -1
  1406. package/build-module/navigation/edit/menu-inspector-controls.js +52 -52
  1407. package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
  1408. package/build-module/navigation/edit/navigation-menu-delete-control.js +3 -4
  1409. package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  1410. package/build-module/navigation/edit/navigation-menu-selector.js +63 -61
  1411. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  1412. package/build-module/navigation/edit/overlay-menu-icon.js +3 -5
  1413. package/build-module/navigation/edit/overlay-menu-icon.js.map +1 -1
  1414. package/build-module/navigation/edit/overlay-menu-preview.js +5 -6
  1415. package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
  1416. package/build-module/navigation/edit/placeholder/index.js +10 -11
  1417. package/build-module/navigation/edit/placeholder/index.js.map +1 -1
  1418. package/build-module/navigation/edit/placeholder/placeholder-preview.js +3 -4
  1419. package/build-module/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
  1420. package/build-module/navigation/edit/responsive-wrapper.js +20 -21
  1421. package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
  1422. package/build-module/navigation/edit/unsaved-inner-blocks.js +14 -20
  1423. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  1424. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js +2 -3
  1425. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  1426. package/build-module/navigation/edit/use-create-navigation-menu.js +3 -7
  1427. package/build-module/navigation/edit/use-create-navigation-menu.js.map +1 -1
  1428. package/build-module/navigation/edit/use-generate-default-navigation-title.js +1 -5
  1429. package/build-module/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
  1430. package/build-module/navigation/edit/use-inner-blocks.js +1 -1
  1431. package/build-module/navigation/edit/use-inner-blocks.js.map +1 -1
  1432. package/build-module/navigation/edit/use-navigation-notice.js +4 -5
  1433. package/build-module/navigation/edit/use-navigation-notice.js.map +1 -1
  1434. package/build-module/navigation/edit/utils.js +2 -4
  1435. package/build-module/navigation/edit/utils.js.map +1 -1
  1436. package/build-module/navigation/index.js +2 -3
  1437. package/build-module/navigation/index.js.map +1 -1
  1438. package/build-module/navigation/interactivity.js +97 -87
  1439. package/build-module/navigation/interactivity.js.map +1 -1
  1440. package/build-module/navigation/menu-items-to-blocks.js +25 -34
  1441. package/build-module/navigation/menu-items-to-blocks.js.map +1 -1
  1442. package/build-module/navigation/save.js +3 -5
  1443. package/build-module/navigation/save.js.map +1 -1
  1444. package/build-module/navigation/use-navigation-entities.js +2 -2
  1445. package/build-module/navigation/use-navigation-entities.js.map +1 -1
  1446. package/build-module/navigation/use-navigation-menu.js +9 -8
  1447. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  1448. package/build-module/navigation/use-template-part-area-label.js +3 -5
  1449. package/build-module/navigation/use-template-part-area-label.js.map +1 -1
  1450. package/build-module/navigation/view-modal.js +2 -4
  1451. package/build-module/navigation/view-modal.js.map +1 -1
  1452. package/build-module/navigation/view.js +1 -1
  1453. package/build-module/navigation/view.js.map +1 -1
  1454. package/build-module/navigation-link/edit.js +19 -24
  1455. package/build-module/navigation-link/edit.js.map +1 -1
  1456. package/build-module/navigation-link/hooks.js +2 -2
  1457. package/build-module/navigation-link/hooks.js.map +1 -1
  1458. package/build-module/navigation-link/index.js +11 -16
  1459. package/build-module/navigation-link/index.js.map +1 -1
  1460. package/build-module/navigation-link/link-ui.js +10 -9
  1461. package/build-module/navigation-link/link-ui.js.map +1 -1
  1462. package/build-module/navigation-link/update-attributes.js +1 -4
  1463. package/build-module/navigation-link/update-attributes.js.map +1 -1
  1464. package/build-module/navigation-submenu/edit.js +17 -18
  1465. package/build-module/navigation-submenu/edit.js.map +1 -1
  1466. package/build-module/navigation-submenu/index.js +7 -12
  1467. package/build-module/navigation-submenu/index.js.map +1 -1
  1468. package/build-module/navigation-submenu/transforms.js +6 -30
  1469. package/build-module/navigation-submenu/transforms.js.map +1 -1
  1470. package/build-module/nextpage/edit.js +2 -1
  1471. package/build-module/nextpage/edit.js.map +1 -1
  1472. package/build-module/nextpage/edit.native.js +8 -9
  1473. package/build-module/nextpage/edit.native.js.map +1 -1
  1474. package/build-module/nextpage/index.js +1 -1
  1475. package/build-module/page-list/convert-to-links-modal.js +5 -6
  1476. package/build-module/page-list/convert-to-links-modal.js.map +1 -1
  1477. package/build-module/page-list/edit.js +35 -41
  1478. package/build-module/page-list/edit.js.map +1 -1
  1479. package/build-module/page-list/index.js +1 -2
  1480. package/build-module/page-list/index.js.map +1 -1
  1481. package/build-module/page-list/use-convert-to-navigation-links.js +16 -21
  1482. package/build-module/page-list/use-convert-to-navigation-links.js.map +1 -1
  1483. package/build-module/page-list-item/edit.js +7 -7
  1484. package/build-module/page-list-item/edit.js.map +1 -1
  1485. package/build-module/page-list-item/index.js +4 -7
  1486. package/build-module/page-list-item/index.js.map +1 -1
  1487. package/build-module/paragraph/deprecated.js +23 -28
  1488. package/build-module/paragraph/deprecated.js.map +1 -1
  1489. package/build-module/paragraph/edit.js +16 -19
  1490. package/build-module/paragraph/edit.js.map +1 -1
  1491. package/build-module/paragraph/edit.native.js +13 -16
  1492. package/build-module/paragraph/edit.native.js.map +1 -1
  1493. package/build-module/paragraph/index.js +4 -6
  1494. package/build-module/paragraph/index.js.map +1 -1
  1495. package/build-module/paragraph/save.js +8 -8
  1496. package/build-module/paragraph/save.js.map +1 -1
  1497. package/build-module/paragraph/transforms.js +10 -13
  1498. package/build-module/paragraph/transforms.js.map +1 -1
  1499. package/build-module/pattern/edit.js +12 -40
  1500. package/build-module/pattern/edit.js.map +1 -1
  1501. package/build-module/pattern/index.js +5 -14
  1502. package/build-module/pattern/index.js.map +1 -1
  1503. package/build-module/post-author/edit.js +22 -24
  1504. package/build-module/post-author/edit.js.map +1 -1
  1505. package/build-module/post-author/index.js +1 -2
  1506. package/build-module/post-author/index.js.map +1 -1
  1507. package/build-module/post-author-biography/edit.js +14 -18
  1508. package/build-module/post-author-biography/edit.js.map +1 -1
  1509. package/build-module/post-author-biography/index.js +1 -2
  1510. package/build-module/post-author-biography/index.js.map +1 -1
  1511. package/build-module/post-author-name/edit.js +16 -18
  1512. package/build-module/post-author-name/edit.js.map +1 -1
  1513. package/build-module/post-author-name/index.js +1 -2
  1514. package/build-module/post-author-name/index.js.map +1 -1
  1515. package/build-module/post-author-name/transforms.js +10 -16
  1516. package/build-module/post-author-name/transforms.js.map +1 -1
  1517. package/build-module/post-comment/edit.js +10 -9
  1518. package/build-module/post-comment/edit.js.map +1 -1
  1519. package/build-module/post-comment/index.js +1 -1
  1520. package/build-module/post-comment/save.js +2 -1
  1521. package/build-module/post-comment/save.js.map +1 -1
  1522. package/build-module/post-comments-count/edit.js +8 -12
  1523. package/build-module/post-comments-count/edit.js.map +1 -1
  1524. package/build-module/post-comments-count/index.js +1 -2
  1525. package/build-module/post-comments-count/index.js.map +1 -1
  1526. package/build-module/post-comments-form/edit.js +7 -7
  1527. package/build-module/post-comments-form/edit.js.map +1 -1
  1528. package/build-module/post-comments-form/form.js +5 -10
  1529. package/build-module/post-comments-form/form.js.map +1 -1
  1530. package/build-module/post-comments-form/index.js +1 -2
  1531. package/build-module/post-comments-form/index.js.map +1 -1
  1532. package/build-module/post-comments-link/edit.js +7 -7
  1533. package/build-module/post-comments-link/edit.js.map +1 -1
  1534. package/build-module/post-comments-link/index.js +1 -2
  1535. package/build-module/post-comments-link/index.js.map +1 -1
  1536. package/build-module/post-content/edit.js +37 -30
  1537. package/build-module/post-content/edit.js.map +1 -1
  1538. package/build-module/post-content/index.js +2 -3
  1539. package/build-module/post-content/index.js.map +1 -1
  1540. package/build-module/post-date/deprecated.js +4 -7
  1541. package/build-module/post-date/deprecated.js.map +1 -1
  1542. package/build-module/post-date/edit.js +29 -34
  1543. package/build-module/post-date/edit.js.map +1 -1
  1544. package/build-module/post-date/index.js +1 -2
  1545. package/build-module/post-date/index.js.map +1 -1
  1546. package/build-module/post-excerpt/edit.js +25 -25
  1547. package/build-module/post-excerpt/edit.js.map +1 -1
  1548. package/build-module/post-excerpt/index.js +3 -4
  1549. package/build-module/post-excerpt/index.js.map +1 -1
  1550. package/build-module/post-featured-image/dimension-controls.js +12 -13
  1551. package/build-module/post-featured-image/dimension-controls.js.map +1 -1
  1552. package/build-module/post-featured-image/edit.js +31 -39
  1553. package/build-module/post-featured-image/edit.js.map +1 -1
  1554. package/build-module/post-featured-image/index.js +1 -2
  1555. package/build-module/post-featured-image/index.js.map +1 -1
  1556. package/build-module/post-featured-image/overlay.js +11 -12
  1557. package/build-module/post-featured-image/overlay.js.map +1 -1
  1558. package/build-module/post-navigation-link/edit.js +13 -13
  1559. package/build-module/post-navigation-link/edit.js.map +1 -1
  1560. package/build-module/post-navigation-link/index.js +1 -2
  1561. package/build-module/post-navigation-link/index.js.map +1 -1
  1562. package/build-module/post-template/edit.js +109 -90
  1563. package/build-module/post-template/edit.js.map +1 -1
  1564. package/build-module/post-template/index.js +10 -5
  1565. package/build-module/post-template/index.js.map +1 -1
  1566. package/build-module/post-terms/edit.js +13 -22
  1567. package/build-module/post-terms/edit.js.map +1 -1
  1568. package/build-module/post-terms/hooks.js +9 -5
  1569. package/build-module/post-terms/hooks.js.map +1 -1
  1570. package/build-module/post-terms/index.js +1 -2
  1571. package/build-module/post-terms/index.js.map +1 -1
  1572. package/build-module/post-terms/use-post-terms.js +7 -12
  1573. package/build-module/post-terms/use-post-terms.js.map +1 -1
  1574. package/build-module/post-time-to-read/edit.js +7 -7
  1575. package/build-module/post-time-to-read/edit.js.map +1 -1
  1576. package/build-module/post-time-to-read/index.js +1 -1
  1577. package/build-module/post-time-to-read/init.js +6 -0
  1578. package/build-module/post-time-to-read/init.js.map +1 -0
  1579. package/build-module/post-title/deprecated.js +4 -7
  1580. package/build-module/post-title/deprecated.js.map +1 -1
  1581. package/build-module/post-title/edit.js +38 -32
  1582. package/build-module/post-title/edit.js.map +1 -1
  1583. package/build-module/post-title/index.js +2 -3
  1584. package/build-module/post-title/index.js.map +1 -1
  1585. package/build-module/preformatted/edit.js +11 -13
  1586. package/build-module/preformatted/edit.js.map +1 -1
  1587. package/build-module/preformatted/edit.native.js +7 -8
  1588. package/build-module/preformatted/edit.native.js.map +1 -1
  1589. package/build-module/preformatted/index.js +1 -1
  1590. package/build-module/preformatted/save.js +5 -5
  1591. package/build-module/preformatted/save.js.map +1 -1
  1592. package/build-module/preformatted/transforms.js +14 -20
  1593. package/build-module/preformatted/transforms.js.map +1 -1
  1594. package/build-module/pullquote/deprecated.js +71 -81
  1595. package/build-module/pullquote/deprecated.js.map +1 -1
  1596. package/build-module/pullquote/edit.js +8 -8
  1597. package/build-module/pullquote/edit.js.map +1 -1
  1598. package/build-module/pullquote/edit.native.js +15 -22
  1599. package/build-module/pullquote/edit.native.js.map +1 -1
  1600. package/build-module/pullquote/figure.native.js +5 -6
  1601. package/build-module/pullquote/figure.native.js.map +1 -1
  1602. package/build-module/pullquote/index.js +1 -1
  1603. package/build-module/pullquote/save.js +8 -8
  1604. package/build-module/pullquote/save.js.map +1 -1
  1605. package/build-module/pullquote/transforms.js +17 -24
  1606. package/build-module/pullquote/transforms.js.map +1 -1
  1607. package/build-module/query/deprecated.js +208 -83
  1608. package/build-module/query/deprecated.js.map +1 -1
  1609. package/build-module/query/edit/index.js +2 -3
  1610. package/build-module/query/edit/index.js.map +1 -1
  1611. package/build-module/query/edit/inspector-controls/author-control.js +5 -8
  1612. package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
  1613. package/build-module/query/edit/inspector-controls/create-new-post-link.js +6 -7
  1614. package/build-module/query/edit/inspector-controls/create-new-post-link.js.map +1 -1
  1615. package/build-module/query/edit/inspector-controls/index.js +7 -8
  1616. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  1617. package/build-module/query/edit/inspector-controls/order-control.js +5 -6
  1618. package/build-module/query/edit/inspector-controls/order-control.js.map +1 -1
  1619. package/build-module/query/edit/inspector-controls/parent-control.js +10 -13
  1620. package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
  1621. package/build-module/query/edit/inspector-controls/sticky-control.js +4 -5
  1622. package/build-module/query/edit/inspector-controls/sticky-control.js.map +1 -1
  1623. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +15 -19
  1624. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  1625. package/build-module/query/edit/pattern-selection-modal.js +5 -6
  1626. package/build-module/query/edit/pattern-selection-modal.js.map +1 -1
  1627. package/build-module/query/edit/query-content.js +26 -15
  1628. package/build-module/query/edit/query-content.js.map +1 -1
  1629. package/build-module/query/edit/query-placeholder.js +20 -22
  1630. package/build-module/query/edit/query-placeholder.js.map +1 -1
  1631. package/build-module/query/edit/query-toolbar.js +18 -42
  1632. package/build-module/query/edit/query-toolbar.js.map +1 -1
  1633. package/build-module/query/index.js +2 -9
  1634. package/build-module/query/index.js.map +1 -1
  1635. package/build-module/query/save.js +7 -7
  1636. package/build-module/query/save.js.map +1 -1
  1637. package/build-module/query/utils.js +25 -62
  1638. package/build-module/query/utils.js.map +1 -1
  1639. package/build-module/query-no-results/edit.js +2 -1
  1640. package/build-module/query-no-results/edit.js.map +1 -1
  1641. package/build-module/query-no-results/index.js +1 -2
  1642. package/build-module/query-no-results/index.js.map +1 -1
  1643. package/build-module/query-pagination/deprecated.js +2 -1
  1644. package/build-module/query-pagination/deprecated.js.map +1 -1
  1645. package/build-module/query-pagination/edit.js +30 -12
  1646. package/build-module/query-pagination/edit.js.map +1 -1
  1647. package/build-module/query-pagination/index.js +8 -4
  1648. package/build-module/query-pagination/index.js.map +1 -1
  1649. package/build-module/query-pagination/query-pagination-arrow-controls.js +4 -5
  1650. package/build-module/query-pagination/query-pagination-arrow-controls.js.map +1 -1
  1651. package/build-module/query-pagination/query-pagination-label-control.js +20 -0
  1652. package/build-module/query-pagination/query-pagination-label-control.js.map +1 -0
  1653. package/build-module/query-pagination-next/edit.js +14 -14
  1654. package/build-module/query-pagination-next/edit.js.map +1 -1
  1655. package/build-module/query-pagination-next/index.js +2 -3
  1656. package/build-module/query-pagination-next/index.js.map +1 -1
  1657. package/build-module/query-pagination-numbers/edit.js +5 -8
  1658. package/build-module/query-pagination-numbers/edit.js.map +1 -1
  1659. package/build-module/query-pagination-numbers/index.js +1 -2
  1660. package/build-module/query-pagination-numbers/index.js.map +1 -1
  1661. package/build-module/query-pagination-previous/edit.js +15 -15
  1662. package/build-module/query-pagination-previous/edit.js.map +1 -1
  1663. package/build-module/query-pagination-previous/index.js +2 -3
  1664. package/build-module/query-pagination-previous/index.js.map +1 -1
  1665. package/build-module/query-title/deprecated.js +4 -7
  1666. package/build-module/query-title/deprecated.js.map +1 -1
  1667. package/build-module/query-title/edit.js +18 -21
  1668. package/build-module/query-title/edit.js.map +1 -1
  1669. package/build-module/query-title/index.js +1 -2
  1670. package/build-module/query-title/index.js.map +1 -1
  1671. package/build-module/quote/deprecated.js +21 -27
  1672. package/build-module/quote/deprecated.js.map +1 -1
  1673. package/build-module/quote/edit.js +15 -15
  1674. package/build-module/quote/edit.js.map +1 -1
  1675. package/build-module/quote/index.js +1 -1
  1676. package/build-module/quote/save.js +7 -7
  1677. package/build-module/quote/save.js.map +1 -1
  1678. package/build-module/quote/transforms.js +37 -57
  1679. package/build-module/quote/transforms.js.map +1 -1
  1680. package/build-module/read-more/edit.js +12 -13
  1681. package/build-module/read-more/edit.js.map +1 -1
  1682. package/build-module/read-more/index.js +1 -2
  1683. package/build-module/read-more/index.js.map +1 -1
  1684. package/build-module/rss/edit.js +8 -7
  1685. package/build-module/rss/edit.js.map +1 -1
  1686. package/build-module/rss/index.js +1 -2
  1687. package/build-module/rss/index.js.map +1 -1
  1688. package/build-module/search/edit.js +77 -34
  1689. package/build-module/search/edit.js.map +1 -1
  1690. package/build-module/search/edit.native.js +34 -44
  1691. package/build-module/search/edit.native.js.map +1 -1
  1692. package/build-module/search/index.js +9 -2
  1693. package/build-module/search/index.js.map +1 -1
  1694. package/build-module/search/view.js +65 -0
  1695. package/build-module/search/view.js.map +1 -0
  1696. package/build-module/separator/deprecated.js +8 -8
  1697. package/build-module/separator/deprecated.js.map +1 -1
  1698. package/build-module/separator/edit.js +11 -13
  1699. package/build-module/separator/edit.js.map +1 -1
  1700. package/build-module/separator/index.js +1 -1
  1701. package/build-module/separator/save.js +10 -12
  1702. package/build-module/separator/save.js.map +1 -1
  1703. package/build-module/shortcode/edit.js +8 -8
  1704. package/build-module/shortcode/edit.js.map +1 -1
  1705. package/build-module/shortcode/index.js +2 -2
  1706. package/build-module/shortcode/save.js +3 -4
  1707. package/build-module/shortcode/save.js.map +1 -1
  1708. package/build-module/shortcode/transforms.js +3 -4
  1709. package/build-module/shortcode/transforms.js.map +1 -1
  1710. package/build-module/site-logo/edit.js +68 -83
  1711. package/build-module/site-logo/edit.js.map +1 -1
  1712. package/build-module/site-logo/index.js +1 -2
  1713. package/build-module/site-logo/index.js.map +1 -1
  1714. package/build-module/site-logo/transforms.js +4 -5
  1715. package/build-module/site-logo/transforms.js.map +1 -1
  1716. package/build-module/site-tagline/deprecated.js +4 -7
  1717. package/build-module/site-tagline/deprecated.js.map +1 -1
  1718. package/build-module/site-tagline/edit.js +11 -11
  1719. package/build-module/site-tagline/edit.js.map +1 -1
  1720. package/build-module/site-tagline/icon.js +0 -3
  1721. package/build-module/site-tagline/icon.js.map +1 -1
  1722. package/build-module/site-tagline/index.js +1 -2
  1723. package/build-module/site-tagline/index.js.map +1 -1
  1724. package/build-module/site-title/deprecated.js +4 -7
  1725. package/build-module/site-title/deprecated.js.map +1 -1
  1726. package/build-module/site-title/edit/index.js +15 -17
  1727. package/build-module/site-title/edit/index.js.map +1 -1
  1728. package/build-module/site-title/index.js +1 -2
  1729. package/build-module/site-title/index.js.map +1 -1
  1730. package/build-module/site-title/transforms.js +4 -5
  1731. package/build-module/site-title/transforms.js.map +1 -1
  1732. package/build-module/social-link/edit.js +21 -18
  1733. package/build-module/social-link/edit.js.map +1 -1
  1734. package/build-module/social-link/edit.native.js +11 -13
  1735. package/build-module/social-link/edit.native.js.map +1 -1
  1736. package/build-module/social-link/index.js +2 -3
  1737. package/build-module/social-link/index.js.map +1 -1
  1738. package/build-module/social-links/deprecated.js +7 -8
  1739. package/build-module/social-links/deprecated.js.map +1 -1
  1740. package/build-module/social-links/edit.js +39 -44
  1741. package/build-module/social-links/edit.js.map +1 -1
  1742. package/build-module/social-links/edit.native.js +18 -25
  1743. package/build-module/social-links/edit.native.js.map +1 -1
  1744. package/build-module/social-links/index.js +4 -2
  1745. package/build-module/social-links/index.js.map +1 -1
  1746. package/build-module/social-links/save.js +2 -1
  1747. package/build-module/social-links/save.js.map +1 -1
  1748. package/build-module/spacer/controls.js +18 -21
  1749. package/build-module/spacer/controls.js.map +1 -1
  1750. package/build-module/spacer/controls.native.js +7 -8
  1751. package/build-module/spacer/controls.native.js.map +1 -1
  1752. package/build-module/spacer/deprecated.js +11 -11
  1753. package/build-module/spacer/deprecated.js.map +1 -1
  1754. package/build-module/spacer/edit.js +30 -32
  1755. package/build-module/spacer/edit.js.map +1 -1
  1756. package/build-module/spacer/edit.native.js +11 -12
  1757. package/build-module/spacer/edit.native.js.map +1 -1
  1758. package/build-module/spacer/index.js +1 -1
  1759. package/build-module/spacer/save.js +23 -14
  1760. package/build-module/spacer/save.js.map +1 -1
  1761. package/build-module/spacer/save.native.js +14 -14
  1762. package/build-module/spacer/save.native.js.map +1 -1
  1763. package/build-module/table/deprecated.js +83 -104
  1764. package/build-module/table/deprecated.js.map +1 -1
  1765. package/build-module/table/edit.js +51 -63
  1766. package/build-module/table/edit.js.map +1 -1
  1767. package/build-module/table/index.js +1 -1
  1768. package/build-module/table/save.js +35 -41
  1769. package/build-module/table/save.js.map +1 -1
  1770. package/build-module/table/state.js +32 -59
  1771. package/build-module/table/state.js.map +1 -1
  1772. package/build-module/table/transforms.js +17 -20
  1773. package/build-module/table/transforms.js.map +1 -1
  1774. package/build-module/table-of-contents/edit.js +13 -12
  1775. package/build-module/table-of-contents/edit.js.map +1 -1
  1776. package/build-module/table-of-contents/index.js +1 -1
  1777. package/build-module/table-of-contents/list.js +3 -4
  1778. package/build-module/table-of-contents/list.js.map +1 -1
  1779. package/build-module/table-of-contents/save.js +7 -8
  1780. package/build-module/table-of-contents/save.js.map +1 -1
  1781. package/build-module/table-of-contents/utils.js +1 -3
  1782. package/build-module/table-of-contents/utils.js.map +1 -1
  1783. package/build-module/tag-cloud/edit.js +8 -9
  1784. package/build-module/tag-cloud/edit.js.map +1 -1
  1785. package/build-module/tag-cloud/index.js +1 -2
  1786. package/build-module/tag-cloud/index.js.map +1 -1
  1787. package/build-module/template-part/edit/advanced-controls.js +15 -19
  1788. package/build-module/template-part/edit/advanced-controls.js.map +1 -1
  1789. package/build-module/template-part/edit/import-controls.js +7 -11
  1790. package/build-module/template-part/edit/import-controls.js.map +1 -1
  1791. package/build-module/template-part/edit/index.js +15 -12
  1792. package/build-module/template-part/edit/index.js.map +1 -1
  1793. package/build-module/template-part/edit/inner-blocks.js +11 -13
  1794. package/build-module/template-part/edit/inner-blocks.js.map +1 -1
  1795. package/build-module/template-part/edit/placeholder.js +7 -8
  1796. package/build-module/template-part/edit/placeholder.js.map +1 -1
  1797. package/build-module/template-part/edit/selection-modal.js +8 -11
  1798. package/build-module/template-part/edit/selection-modal.js.map +1 -1
  1799. package/build-module/template-part/edit/title-modal.js +5 -6
  1800. package/build-module/template-part/edit/title-modal.js.map +1 -1
  1801. package/build-module/template-part/edit/utils/hooks.js +4 -6
  1802. package/build-module/template-part/edit/utils/hooks.js.map +1 -1
  1803. package/build-module/template-part/edit/utils/transformers.js +3 -6
  1804. package/build-module/template-part/edit/utils/transformers.js.map +1 -1
  1805. package/build-module/template-part/index.js +11 -20
  1806. package/build-module/template-part/index.js.map +1 -1
  1807. package/build-module/template-part/variations.js +2 -2
  1808. package/build-module/template-part/variations.js.map +1 -1
  1809. package/build-module/term-description/edit.js +7 -7
  1810. package/build-module/term-description/edit.js.map +1 -1
  1811. package/build-module/term-description/index.js +1 -2
  1812. package/build-module/term-description/index.js.map +1 -1
  1813. package/build-module/text-columns/edit.js +9 -11
  1814. package/build-module/text-columns/edit.js.map +1 -1
  1815. package/build-module/text-columns/index.js +1 -1
  1816. package/build-module/text-columns/save.js +14 -18
  1817. package/build-module/text-columns/save.js.map +1 -1
  1818. package/build-module/text-columns/transforms.js +14 -20
  1819. package/build-module/text-columns/transforms.js.map +1 -1
  1820. package/build-module/utils/init-block.native.js +1 -3
  1821. package/build-module/utils/init-block.native.js.map +1 -1
  1822. package/build-module/utils/interactivity/constants.js +1 -1
  1823. package/build-module/utils/interactivity/constants.js.map +1 -1
  1824. package/build-module/utils/interactivity/directives.js +74 -85
  1825. package/build-module/utils/interactivity/directives.js.map +1 -1
  1826. package/build-module/utils/interactivity/hooks.js +29 -46
  1827. package/build-module/utils/interactivity/hooks.js.map +1 -1
  1828. package/build-module/utils/interactivity/hydration.js +1 -1
  1829. package/build-module/utils/interactivity/hydration.js.map +1 -1
  1830. package/build-module/utils/interactivity/index.js +1 -3
  1831. package/build-module/utils/interactivity/index.js.map +1 -1
  1832. package/build-module/utils/interactivity/store.js +4 -5
  1833. package/build-module/utils/interactivity/store.js.map +1 -1
  1834. package/build-module/utils/interactivity/vdom.js +14 -4
  1835. package/build-module/utils/interactivity/vdom.js.map +1 -1
  1836. package/build-module/utils/migrate-font-family.js +2 -4
  1837. package/build-module/utils/migrate-font-family.js.map +1 -1
  1838. package/build-module/utils/search-patterns.js +5 -19
  1839. package/build-module/utils/search-patterns.js.map +1 -1
  1840. package/build-module/utils/transformation-categories.native.js +1 -4
  1841. package/build-module/utils/transformation-categories.native.js.map +1 -1
  1842. package/build-module/verse/deprecated.js +14 -18
  1843. package/build-module/verse/deprecated.js.map +1 -1
  1844. package/build-module/verse/edit.js +11 -13
  1845. package/build-module/verse/edit.js.map +1 -1
  1846. package/build-module/verse/index.js +1 -1
  1847. package/build-module/verse/save.js +7 -7
  1848. package/build-module/verse/save.js.map +1 -1
  1849. package/build-module/video/deprecated.js +6 -6
  1850. package/build-module/video/deprecated.js.map +1 -1
  1851. package/build-module/video/edit-common-settings.js +4 -5
  1852. package/build-module/video/edit-common-settings.js.map +1 -1
  1853. package/build-module/video/edit.js +22 -29
  1854. package/build-module/video/edit.js.map +1 -1
  1855. package/build-module/video/edit.native.js +26 -31
  1856. package/build-module/video/edit.native.js.map +1 -1
  1857. package/build-module/video/index.js +1 -1
  1858. package/build-module/video/save.js +5 -5
  1859. package/build-module/video/save.js.map +1 -1
  1860. package/build-module/video/tracks-editor.js +39 -51
  1861. package/build-module/video/tracks-editor.js.map +1 -1
  1862. package/build-module/video/tracks.js +7 -8
  1863. package/build-module/video/tracks.js.map +1 -1
  1864. package/build-module/video/transforms.js +30 -35
  1865. package/build-module/video/transforms.js.map +1 -1
  1866. package/build-style/avatar/style-rtl.css +1 -0
  1867. package/build-style/avatar/style.css +1 -0
  1868. package/build-style/editor-rtl.css +0 -17
  1869. package/build-style/editor.css +0 -17
  1870. package/build-style/footnotes/style-rtl.css +106 -0
  1871. package/build-style/footnotes/style.css +106 -0
  1872. package/build-style/image/style-rtl.css +87 -17
  1873. package/build-style/image/style.css +87 -17
  1874. package/build-style/navigation/editor-rtl.css +0 -17
  1875. package/build-style/navigation/editor.css +0 -17
  1876. package/build-style/post-template/style-rtl.css +6 -0
  1877. package/build-style/post-template/style.css +6 -0
  1878. package/build-style/search/style-rtl.css +30 -0
  1879. package/build-style/search/style.css +30 -0
  1880. package/build-style/social-links/style-rtl.css +4 -0
  1881. package/build-style/social-links/style.css +4 -0
  1882. package/build-style/style-rtl.css +156 -18
  1883. package/build-style/style.css +156 -18
  1884. package/build-style/term-description/style-rtl.css +97 -0
  1885. package/build-style/term-description/style.css +97 -0
  1886. package/package.json +33 -32
  1887. package/src/archives/block.json +1 -2
  1888. package/src/audio/block.json +1 -1
  1889. package/src/avatar/block.json +1 -2
  1890. package/src/avatar/style.scss +1 -0
  1891. package/src/block/block.json +2 -2
  1892. package/src/block/edit.js +1 -0
  1893. package/src/block/test/__snapshots__/transforms.native.js.snap +2 -2
  1894. package/src/block/test/edit.native.js +5 -7
  1895. package/src/block/test/transforms.native.js +1 -1
  1896. package/src/button/block.json +1 -1
  1897. package/src/buttons/block.json +2 -2
  1898. package/src/buttons/edit.native.js +7 -6
  1899. package/src/buttons/test/__snapshots__/edit.native.js.snap +6 -0
  1900. package/src/buttons/test/edit.native.js +30 -2
  1901. package/src/calendar/block.json +1 -2
  1902. package/src/categories/block.json +1 -2
  1903. package/src/code/block.json +1 -1
  1904. package/src/column/block.json +2 -2
  1905. package/src/columns/block.json +2 -2
  1906. package/src/columns/test/__snapshots__/edit.native.js.snap +72 -0
  1907. package/src/columns/test/edit.native.js +61 -32
  1908. package/src/comment-author-avatar/block.json +1 -2
  1909. package/src/comment-author-name/block.json +1 -2
  1910. package/src/comment-content/block.json +1 -2
  1911. package/src/comment-date/block.json +1 -2
  1912. package/src/comment-edit-link/block.json +1 -2
  1913. package/src/comment-reply-link/block.json +1 -2
  1914. package/src/comment-template/block.json +1 -2
  1915. package/src/comment-template/index.php +13 -1
  1916. package/src/comments/block.json +1 -2
  1917. package/src/comments/deprecated.js +1 -1
  1918. package/src/comments-pagination/block.json +2 -3
  1919. package/src/comments-pagination-next/block.json +1 -2
  1920. package/src/comments-pagination-next/index.php +1 -1
  1921. package/src/comments-pagination-numbers/block.json +1 -2
  1922. package/src/comments-pagination-previous/block.json +1 -2
  1923. package/src/comments-pagination-previous/index.php +1 -1
  1924. package/src/comments-title/block.json +1 -1
  1925. package/src/comments-title/edit.js +2 -6
  1926. package/src/cover/block.json +2 -2
  1927. package/src/cover/edit/resizable-cover-popover.js +1 -1
  1928. package/src/cover/test/edit.native.js +45 -31
  1929. package/src/cover/transforms.js +1 -1
  1930. package/src/details/block.json +2 -3
  1931. package/src/details/edit.js +12 -9
  1932. package/src/details/init.js +6 -0
  1933. package/src/embed/block.json +1 -1
  1934. package/src/embed/test/index.native.js +38 -44
  1935. package/src/file/block.json +1 -1
  1936. package/src/file/index.php +47 -7
  1937. package/src/footnotes/block.json +18 -0
  1938. package/src/footnotes/edit.js +52 -0
  1939. package/src/footnotes/format.js +112 -0
  1940. package/src/footnotes/index.js +29 -0
  1941. package/src/footnotes/index.php +78 -0
  1942. package/src/footnotes/style.scss +18 -0
  1943. package/src/freeform/block.json +2 -2
  1944. package/src/gallery/block.json +2 -2
  1945. package/src/gallery/edit.js +4 -1
  1946. package/src/gallery/gallery.native.js +1 -1
  1947. package/src/gallery/test/__snapshots__/index.native.js.snap +6 -0
  1948. package/src/gallery/test/index.native.js +23 -1
  1949. package/src/gallery/v1/save.js +1 -1
  1950. package/src/group/block.json +2 -2
  1951. package/src/group/deprecated.js +1 -1
  1952. package/src/group/test/edit.native.js +2 -4
  1953. package/src/heading/block.json +1 -1
  1954. package/src/heading/edit.js +2 -2
  1955. package/src/home-link/block.json +1 -2
  1956. package/src/html/block.json +1 -1
  1957. package/src/image/block.json +4 -4
  1958. package/src/image/edit.js +1 -1
  1959. package/src/image/image.js +23 -11
  1960. package/src/image/index.php +0 -72
  1961. package/src/image/interactivity.js +160 -13
  1962. package/src/image/style.scss +97 -15
  1963. package/src/image/test/edit.native.js +3 -13
  1964. package/src/index.js +3 -3
  1965. package/src/latest-comments/block.json +1 -2
  1966. package/src/latest-posts/block.json +1 -2
  1967. package/src/latest-posts/edit.js +17 -9
  1968. package/src/latest-posts/index.php +8 -0
  1969. package/src/list/block.json +1 -1
  1970. package/src/list/ordered-list-settings.js +20 -2
  1971. package/src/list/test/edit.native.js +5 -0
  1972. package/src/list-item/block.json +1 -1
  1973. package/src/loginout/block.json +1 -2
  1974. package/src/media-text/block.json +1 -1
  1975. package/src/media-text/edit.js +1 -1
  1976. package/src/missing/block.json +1 -1
  1977. package/src/more/block.json +1 -1
  1978. package/src/more/edit.native.js +8 -15
  1979. package/src/navigation/block.json +2 -3
  1980. package/src/navigation/constants.js +11 -0
  1981. package/src/navigation/deprecated.js +1 -1
  1982. package/src/navigation/edit/index.js +15 -6
  1983. package/src/navigation/edit/leaf-more-menu.js +1 -2
  1984. package/src/navigation/edit/menu-inspector-controls.js +67 -76
  1985. package/src/navigation/edit/navigation-menu-selector.js +17 -7
  1986. package/src/navigation/edit/unsaved-inner-blocks.js +6 -6
  1987. package/src/navigation/editor.scss +0 -22
  1988. package/src/navigation/index.php +183 -32
  1989. package/src/navigation/interactivity.js +75 -57
  1990. package/src/navigation/test/use-navigation-menu.js +15 -3
  1991. package/src/navigation/use-navigation-menu.js +11 -8
  1992. package/src/navigation-link/block.json +1 -1
  1993. package/src/navigation-link/edit.js +1 -9
  1994. package/src/navigation-link/hooks.js +2 -2
  1995. package/src/navigation-link/link-ui.js +12 -6
  1996. package/src/navigation-link/test/__snapshots__/hooks.js.snap +2 -2
  1997. package/src/navigation-submenu/block.json +1 -1
  1998. package/src/nextpage/block.json +1 -1
  1999. package/src/nextpage/edit.native.js +2 -2
  2000. package/src/page-list/block.json +1 -2
  2001. package/src/page-list-item/block.json +1 -1
  2002. package/src/page-list-item/index.php +14 -0
  2003. package/src/paragraph/block.json +1 -1
  2004. package/src/paragraph/test/__snapshots__/edit.native.js.snap +39 -0
  2005. package/src/paragraph/test/edit.native.js +3 -3
  2006. package/src/pattern/block.json +2 -6
  2007. package/src/pattern/edit.js +14 -40
  2008. package/src/pattern/index.js +4 -5
  2009. package/src/pattern/index.php +1 -13
  2010. package/src/post-author/block.json +1 -2
  2011. package/src/post-author/edit.js +3 -3
  2012. package/src/post-author-biography/block.json +1 -2
  2013. package/src/post-author-name/block.json +1 -2
  2014. package/src/post-comment/block.json +1 -1
  2015. package/src/post-comments-count/block.json +1 -2
  2016. package/src/post-comments-form/block.json +1 -2
  2017. package/src/post-comments-link/block.json +1 -2
  2018. package/src/post-content/block.json +2 -3
  2019. package/src/post-content/edit.js +22 -2
  2020. package/src/post-date/block.json +1 -2
  2021. package/src/post-excerpt/block.json +3 -4
  2022. package/src/post-excerpt/edit.js +5 -14
  2023. package/src/post-excerpt/index.php +2 -2
  2024. package/src/post-featured-image/block.json +1 -2
  2025. package/src/post-navigation-link/block.json +1 -2
  2026. package/src/post-template/block.json +10 -5
  2027. package/src/post-template/edit.js +67 -30
  2028. package/src/post-template/index.php +15 -9
  2029. package/src/post-template/style.scss +8 -1
  2030. package/src/post-terms/block.json +1 -2
  2031. package/src/post-terms/edit.js +8 -7
  2032. package/src/post-terms/hooks.js +3 -3
  2033. package/src/post-time-to-read/block.json +1 -1
  2034. package/src/post-time-to-read/init.js +6 -0
  2035. package/src/post-title/block.json +2 -3
  2036. package/src/post-title/edit.js +24 -19
  2037. package/src/post-title/index.php +1 -1
  2038. package/src/preformatted/block.json +1 -1
  2039. package/src/preformatted/test/edit.native.js +1 -13
  2040. package/src/pullquote/block.json +1 -1
  2041. package/src/query/block.json +2 -9
  2042. package/src/query/deprecated.js +173 -26
  2043. package/src/query/edit/inspector-controls/index.js +5 -3
  2044. package/src/query/edit/query-content.js +13 -5
  2045. package/src/query/edit/query-toolbar.js +3 -22
  2046. package/src/query-no-results/block.json +1 -2
  2047. package/src/query-pagination/block.json +8 -4
  2048. package/src/query-pagination/edit.js +18 -2
  2049. package/src/query-pagination/query-pagination-label-control.js +19 -0
  2050. package/src/query-pagination-next/block.json +2 -3
  2051. package/src/query-pagination-next/edit.js +13 -11
  2052. package/src/query-pagination-next/index.php +7 -2
  2053. package/src/query-pagination-numbers/block.json +1 -2
  2054. package/src/query-pagination-previous/block.json +2 -3
  2055. package/src/query-pagination-previous/edit.js +13 -11
  2056. package/src/query-pagination-previous/index.php +7 -2
  2057. package/src/query-title/block.json +1 -2
  2058. package/src/query-title/edit.js +2 -6
  2059. package/src/quote/block.json +1 -1
  2060. package/src/read-more/block.json +1 -2
  2061. package/src/rss/block.json +1 -2
  2062. package/src/search/block.json +9 -2
  2063. package/src/search/edit.js +63 -5
  2064. package/src/search/index.php +50 -51
  2065. package/src/search/style.scss +39 -0
  2066. package/src/search/view.js +68 -0
  2067. package/src/separator/block.json +1 -1
  2068. package/src/shortcode/block.json +2 -2
  2069. package/src/site-logo/block.json +1 -2
  2070. package/src/site-logo/index.php +1 -1
  2071. package/src/site-tagline/block.json +1 -2
  2072. package/src/site-tagline/icon.js +0 -1
  2073. package/src/site-title/block.json +1 -2
  2074. package/src/site-title/edit/index.js +5 -6
  2075. package/src/social-link/block.json +3 -2
  2076. package/src/social-link/edit.js +10 -1
  2077. package/src/social-link/index.php +22 -1
  2078. package/src/social-links/block.json +4 -2
  2079. package/src/social-links/style.scss +10 -0
  2080. package/src/spacer/block.json +1 -1
  2081. package/src/spacer/controls.js +1 -0
  2082. package/src/spacer/save.js +7 -2
  2083. package/src/spacer/test/index.native.js +33 -29
  2084. package/src/style.scss +2 -0
  2085. package/src/table/block.json +1 -1
  2086. package/src/table-of-contents/block.json +1 -1
  2087. package/src/tag-cloud/block.json +1 -2
  2088. package/src/template-part/block.json +1 -2
  2089. package/src/template-part/edit/inner-blocks.js +1 -1
  2090. package/src/template-part/index.php +18 -11
  2091. package/src/term-description/block.json +1 -2
  2092. package/src/term-description/style.scss +11 -0
  2093. package/src/text-columns/block.json +1 -1
  2094. package/src/utils/interactivity/constants.js +1 -1
  2095. package/src/utils/interactivity/directives.js +5 -5
  2096. package/src/utils/interactivity/hydration.js +1 -1
  2097. package/src/utils/interactivity/index.js +0 -2
  2098. package/src/utils/interactivity/vdom.js +21 -4
  2099. package/src/utils/migrate-font-family.js +1 -1
  2100. package/src/verse/block.json +1 -1
  2101. package/src/video/block.json +1 -1
  2102. package/build/heading/heading-level-dropdown.js +0 -82
  2103. package/build/heading/heading-level-dropdown.js.map +0 -1
  2104. package/build/heading/heading-level-dropdown.native.js +0 -74
  2105. package/build/heading/heading-level-dropdown.native.js.map +0 -1
  2106. package/build/pattern/v1/edit.js +0 -57
  2107. package/build/pattern/v1/edit.js.map +0 -1
  2108. package/build/private-apis.js.map +0 -1
  2109. package/build/site-title/edit/level-icon.js +0 -41
  2110. package/build/site-title/edit/level-icon.js.map +0 -1
  2111. package/build/site-title/edit/level-toolbar.js +0 -52
  2112. package/build/site-title/edit/level-toolbar.js.map +0 -1
  2113. package/build-module/heading/heading-level-dropdown.js +0 -70
  2114. package/build-module/heading/heading-level-dropdown.js.map +0 -1
  2115. package/build-module/heading/heading-level-dropdown.native.js +0 -62
  2116. package/build-module/heading/heading-level-dropdown.native.js.map +0 -1
  2117. package/build-module/pattern/v1/edit.js +0 -48
  2118. package/build-module/pattern/v1/edit.js.map +0 -1
  2119. package/build-module/private-apis.js.map +0 -1
  2120. package/build-module/site-title/edit/level-icon.js +0 -32
  2121. package/build-module/site-title/edit/level-icon.js.map +0 -1
  2122. package/build-module/site-title/edit/level-toolbar.js +0 -40
  2123. package/build-module/site-title/edit/level-toolbar.js.map +0 -1
  2124. package/src/heading/heading-level-dropdown.js +0 -69
  2125. package/src/heading/heading-level-dropdown.native.js +0 -63
  2126. package/src/pattern/v1/edit.js +0 -57
  2127. package/src/site-title/edit/level-icon.js +0 -28
  2128. package/src/site-title/edit/level-toolbar.js +0 -34
  2129. /package/src/{private-apis.js → lock-unlock.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-edit-link/edit.js"],"names":["classnames","AlignmentControl","BlockControls","InspectorControls","useBlockProps","PanelBody","ToggleControl","__","Edit","attributes","linkTarget","textAlign","setAttributes","blockProps","className","blockControls","newAlign","inspectorControls","value","event","preventDefault"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SACCC,gBADD,EAECC,aAFD,EAGCC,iBAHD,EAICC,aAJD,QAKO,yBALP;AAMA,SAASC,SAAT,EAAoBC,aAApB,QAAyC,uBAAzC;AACA,SAASC,EAAT,QAAmB,iBAAnB;AAEA,eAAe,SAASC,IAAT,OAGX;AAAA,MAH0B;AAC7BC,IAAAA,UAAU,EAAE;AAAEC,MAAAA,UAAF;AAAcC,MAAAA;AAAd,KADiB;AAE7BC,IAAAA;AAF6B,GAG1B;AACH,QAAMC,UAAU,GAAGT,aAAa,CAAE;AACjCU,IAAAA,SAAS,EAAEd,UAAU,CAAE;AACtB,OAAG,kBAAkBW,SAAW,EAAhC,GAAqCA;AADf,KAAF;AADY,GAAF,CAAhC;AAMA,QAAMI,aAAa,GAClB,cAAC,aAAD;AAAe,IAAA,KAAK,EAAC;AAArB,KACC,cAAC,gBAAD;AACC,IAAA,KAAK,EAAGJ,SADT;AAEC,IAAA,QAAQ,EAAKK,QAAF,IACVJ,aAAa,CAAE;AAAED,MAAAA,SAAS,EAAEK;AAAb,KAAF;AAHf,IADD,CADD;AAUA,QAAMC,iBAAiB,GACtB,cAAC,iBAAD,QACC,cAAC,SAAD;AAAW,IAAA,KAAK,EAAGV,EAAE,CAAE,UAAF;AAArB,KACC,cAAC,aAAD;AACC,IAAA,uBAAuB,MADxB;AAEC,IAAA,KAAK,EAAGA,EAAE,CAAE,iBAAF,CAFX;AAGC,IAAA,QAAQ,EAAKW,KAAF,IACVN,aAAa,CAAE;AACdF,MAAAA,UAAU,EAAEQ,KAAK,GAAG,QAAH,GAAc;AADjB,KAAF,CAJf;AAQC,IAAA,OAAO,EAAGR,UAAU,KAAK;AAR1B,IADD,CADD,CADD;AAiBA,SACC,8BACGK,aADH,EAEGE,iBAFH,EAGC,qBAAUJ,UAAV,EACC;AACC,IAAA,IAAI,EAAC,2BADN;AAEC,IAAA,OAAO,EAAKM,KAAF,IAAaA,KAAK,CAACC,cAAN;AAFxB,KAIGb,EAAE,CAAE,MAAF,CAJL,CADD,CAHD,CADD;AAcA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function Edit( {\n\tattributes: { linkTarget, textAlign },\n\tsetAttributes,\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\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</BlockControls>\n\t);\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={ __( 'Open in new tab' ) }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tlinkTarget: value ? '_blank' : '_self',\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tchecked={ linkTarget === '_blank' }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<a\n\t\t\t\t\thref=\"#edit-comment-pseudo-link\"\n\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Edit' ) }\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comment-edit-link/edit.js"],"names":["classnames","AlignmentControl","BlockControls","InspectorControls","useBlockProps","PanelBody","ToggleControl","__","Edit","attributes","linkTarget","textAlign","setAttributes","blockProps","className","blockControls","newAlign","inspectorControls","value","event","preventDefault"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SACCC,gBADD,EAECC,aAFD,EAGCC,iBAHD,EAICC,aAJD,QAKO,yBALP;AAMA,SAASC,SAAT,EAAoBC,aAApB,QAAyC,uBAAzC;AACA,SAASC,EAAT,QAAmB,iBAAnB;AAEA,eAAe,SAASC,IAAT,CAAe;AAC7BC,EAAAA,UAAU,EAAE;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,GADiB;AAE7BC,EAAAA;AAF6B,CAAf,EAGX;AACH,QAAMC,UAAU,GAAGT,aAAa,CAAE;AACjCU,IAAAA,SAAS,EAAEd,UAAU,CAAE;AACtB,OAAG,kBAAkBW,SAAW,EAAhC,GAAqCA;AADf,KAAF;AADY,GAAF,CAAhC;AAMA,QAAMI,aAAa,GAClB,cAAC,aAAD;AAAe,IAAA,KAAK,EAAC;AAArB,KACC,cAAC,gBAAD;AACC,IAAA,KAAK,EAAGJ,SADT;AAEC,IAAA,QAAQ,EAAKK,QAAF,IACVJ,aAAa,CAAE;AAAED,MAAAA,SAAS,EAAEK;AAAb,KAAF;AAHf,IADD,CADD;AAUA,QAAMC,iBAAiB,GACtB,cAAC,iBAAD,QACC,cAAC,SAAD;AAAW,IAAA,KAAK,EAAGV,EAAE,CAAE,UAAF;AAArB,KACC,cAAC,aAAD;AACC,IAAA,uBAAuB,MADxB;AAEC,IAAA,KAAK,EAAGA,EAAE,CAAE,iBAAF,CAFX;AAGC,IAAA,QAAQ,EAAKW,KAAF,IACVN,aAAa,CAAE;AACdF,MAAAA,UAAU,EAAEQ,KAAK,GAAG,QAAH,GAAc;AADjB,KAAF,CAJf;AAQC,IAAA,OAAO,EAAGR,UAAU,KAAK;AAR1B,IADD,CADD,CADD;AAiBA,SACC,8BACGK,aADH,EAEGE,iBAFH,EAGC,0BAAUJ;AAAV,KACC;AACC,IAAA,IAAI,EAAC,2BADN;AAEC,IAAA,OAAO,EAAKM,KAAF,IAAaA,KAAK,CAACC,cAAN;AAFxB,KAIGb,EAAE,CAAE,MAAF,CAJL,CADD,CAHD,CADD;AAcA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tInspectorControls,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function Edit( {\n\tattributes: { linkTarget, textAlign },\n\tsetAttributes,\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\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</BlockControls>\n\t);\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={ __( 'Open in new tab' ) }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tlinkTarget: value ? '_blank' : '_self',\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tchecked={ linkTarget === '_blank' }\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<a\n\t\t\t\t\thref=\"#edit-comment-pseudo-link\"\n\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Edit' ) }\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"]}
@@ -9,7 +9,7 @@ import { commentEditLink as icon } from '@wordpress/icons';
9
9
  import initBlock from '../utils/init-block';
10
10
  const metadata = {
11
11
  $schema: "https://schemas.wp.org/trunk/block.json",
12
- apiVersion: 2,
12
+ apiVersion: 3,
13
13
  name: "core/comment-edit-link",
14
14
  title: "Comment Edit Link",
15
15
  category: "theme",
@@ -27,7 +27,6 @@ const metadata = {
27
27
  }
28
28
  },
29
29
  supports: {
30
- anchor: true,
31
30
  html: false,
32
31
  color: {
33
32
  link: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-edit-link/index.js"],"names":["commentEditLink","icon","initBlock","edit","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,IAAIC,IAA5B,QAAwC,kBAAxC;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBL,EAAAA,IADuB;AAEvBE,EAAAA;AAFuB,CAAjB;AAKP,OAAO,MAAMI,IAAI,GAAG,MAAML,SAAS,CAAE;AAAEE,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentEditLink 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/comment-edit-link/index.js"],"names":["commentEditLink","icon","initBlock","edit","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,eAAe,IAAIC,IAA5B,QAAwC,kBAAxC;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBL,EAAAA,IADuB;AAEvBE,EAAAA;AAFuB,CAAjB;AAKP,OAAO,MAAMI,IAAI,GAAG,MAAML,SAAS,CAAE;AAAEE,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentEditLink 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"]}
@@ -21,13 +21,12 @@ import { AlignmentControl, BlockControls, useBlockProps } from '@wordpress/block
21
21
  * @return {JSX.Element} React element.
22
22
  */
23
23
 
24
- function Edit(_ref) {
25
- let {
26
- setAttributes,
27
- attributes: {
28
- textAlign
29
- }
30
- } = _ref;
24
+ function Edit({
25
+ setAttributes,
26
+ attributes: {
27
+ textAlign
28
+ }
29
+ }) {
31
30
  const blockProps = useBlockProps({
32
31
  className: classnames({
33
32
  [`has-text-align-${textAlign}`]: textAlign
@@ -41,7 +40,8 @@ function Edit(_ref) {
41
40
  textAlign: newAlign
42
41
  })
43
42
  }));
44
- return createElement(Fragment, null, blockControls, createElement("div", blockProps, createElement("a", {
43
+ return createElement(Fragment, null, blockControls, createElement("div", { ...blockProps
44
+ }, createElement("a", {
45
45
  href: "#comment-reply-pseudo-link",
46
46
  onClick: event => event.preventDefault()
47
47
  }, __('Reply'))));
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-reply-link/edit.js"],"names":["classnames","__","AlignmentControl","BlockControls","useBlockProps","Edit","setAttributes","attributes","textAlign","blockProps","className","blockControls","newAlign","event","preventDefault"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SACCC,gBADD,EAECC,aAFD,EAGCC,aAHD,QAIO,yBAJP;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,IAAT,OAA8D;AAAA,MAA/C;AAAEC,IAAAA,aAAF;AAAiBC,IAAAA,UAAU,EAAE;AAAEC,MAAAA;AAAF;AAA7B,GAA+C;AAC7D,QAAMC,UAAU,GAAGL,aAAa,CAAE;AACjCM,IAAAA,SAAS,EAAEV,UAAU,CAAE;AACtB,OAAG,kBAAkBQ,SAAW,EAAhC,GAAqCA;AADf,KAAF;AADY,GAAF,CAAhC;AAMA,QAAMG,aAAa,GAClB,cAAC,aAAD;AAAe,IAAA,KAAK,EAAC;AAArB,KACC,cAAC,gBAAD;AACC,IAAA,KAAK,EAAGH,SADT;AAEC,IAAA,QAAQ,EAAKI,QAAF,IACVN,aAAa,CAAE;AAAEE,MAAAA,SAAS,EAAEI;AAAb,KAAF;AAHf,IADD,CADD;AAWA,SACC,8BACGD,aADH,EAEC,qBAAUF,UAAV,EACC;AACC,IAAA,IAAI,EAAC,4BADN;AAEC,IAAA,OAAO,EAAKI,KAAF,IAAaA,KAAK,CAACC,cAAN;AAFxB,KAIGb,EAAE,CAAE,OAAF,CAJL,CADD,CAFD,CADD;AAaA;;AAED,eAAeI,IAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\n\n/**\n * Renders the `core/comment-reply-link` block on the editor.\n *\n * @param {Object} props React props.\n * @param {Object} props.setAttributes Callback for updating block attributes.\n * @param {Object} props.attributes Block attributes.\n * @param {string} props.attributes.textAlign The `textAlign` attribute.\n *\n * @return {JSX.Element} React element.\n */\nfunction Edit( { setAttributes, attributes: { textAlign } } ) {\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 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</BlockControls>\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<a\n\t\t\t\t\thref=\"#comment-reply-pseudo-link\"\n\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Reply' ) }\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Edit;\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comment-reply-link/edit.js"],"names":["classnames","__","AlignmentControl","BlockControls","useBlockProps","Edit","setAttributes","attributes","textAlign","blockProps","className","blockControls","newAlign","event","preventDefault"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SACCC,gBADD,EAECC,aAFD,EAGCC,aAHD,QAIO,yBAJP;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,IAAT,CAAe;AAAEC,EAAAA,aAAF;AAAiBC,EAAAA,UAAU,EAAE;AAAEC,IAAAA;AAAF;AAA7B,CAAf,EAA8D;AAC7D,QAAMC,UAAU,GAAGL,aAAa,CAAE;AACjCM,IAAAA,SAAS,EAAEV,UAAU,CAAE;AACtB,OAAG,kBAAkBQ,SAAW,EAAhC,GAAqCA;AADf,KAAF;AADY,GAAF,CAAhC;AAMA,QAAMG,aAAa,GAClB,cAAC,aAAD;AAAe,IAAA,KAAK,EAAC;AAArB,KACC,cAAC,gBAAD;AACC,IAAA,KAAK,EAAGH,SADT;AAEC,IAAA,QAAQ,EAAKI,QAAF,IACVN,aAAa,CAAE;AAAEE,MAAAA,SAAS,EAAEI;AAAb,KAAF;AAHf,IADD,CADD;AAWA,SACC,8BACGD,aADH,EAEC,0BAAUF;AAAV,KACC;AACC,IAAA,IAAI,EAAC,4BADN;AAEC,IAAA,OAAO,EAAKI,KAAF,IAAaA,KAAK,CAACC,cAAN;AAFxB,KAIGb,EAAE,CAAE,OAAF,CAJL,CADD,CAFD,CADD;AAaA;;AAED,eAAeI,IAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\n\n/**\n * Renders the `core/comment-reply-link` block on the editor.\n *\n * @param {Object} props React props.\n * @param {Object} props.setAttributes Callback for updating block attributes.\n * @param {Object} props.attributes Block attributes.\n * @param {string} props.attributes.textAlign The `textAlign` attribute.\n *\n * @return {JSX.Element} React element.\n */\nfunction Edit( { setAttributes, attributes: { textAlign } } ) {\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 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</BlockControls>\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t<div { ...blockProps }>\n\t\t\t\t<a\n\t\t\t\t\thref=\"#comment-reply-pseudo-link\"\n\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Reply' ) }\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Edit;\n"]}
@@ -9,7 +9,7 @@ import { commentReplyLink as icon } from '@wordpress/icons';
9
9
  import initBlock from '../utils/init-block';
10
10
  const metadata = {
11
11
  $schema: "https://schemas.wp.org/trunk/block.json",
12
- apiVersion: 2,
12
+ apiVersion: 3,
13
13
  name: "core/comment-reply-link",
14
14
  title: "Comment Reply Link",
15
15
  category: "theme",
@@ -23,7 +23,6 @@ const metadata = {
23
23
  }
24
24
  },
25
25
  supports: {
26
- anchor: true,
27
26
  color: {
28
27
  gradients: true,
29
28
  link: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-reply-link/index.js"],"names":["commentReplyLink","icon","initBlock","edit","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAgB,IAAIC,IAA7B,QAAyC,kBAAzC;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBH,EAAAA,IADuB;AAEvBF,EAAAA;AAFuB,CAAjB;AAKP,OAAO,MAAMM,IAAI,GAAG,MAAML,SAAS,CAAE;AAAEE,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentReplyLink 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\tedit,\n\ticon,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comment-reply-link/index.js"],"names":["commentReplyLink","icon","initBlock","edit","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAgB,IAAIC,IAA7B,QAAyC,kBAAzC;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBH,EAAAA,IADuB;AAEvBF,EAAAA;AAFuB,CAAjB;AAKP,OAAO,MAAMM,IAAI,GAAG,MAAML,SAAS,CAAE;AAAEE,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentReplyLink 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\tedit,\n\ticon,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"]}
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
3
  /**
@@ -33,13 +32,12 @@ const TEMPLATE = [['core/avatar'], ['core/comment-author-name'], ['core/comment-
33
32
  * @return {EmptyComment[]} Inner blocks of the Comment Template
34
33
  */
35
34
 
36
- const getCommentsPlaceholder = _ref => {
37
- let {
38
- perPage,
39
- pageComments,
40
- threadComments,
41
- threadCommentsDepth
42
- } = _ref;
35
+ const getCommentsPlaceholder = ({
36
+ perPage,
37
+ pageComments,
38
+ threadComments,
39
+ threadCommentsDepth
40
+ }) => {
43
41
  // Limit commentsDepth to 3
44
42
  const commentsDepth = !threadComments ? 1 : Math.min(threadCommentsDepth, 3);
45
43
 
@@ -94,28 +92,26 @@ const getCommentsPlaceholder = _ref => {
94
92
  */
95
93
 
96
94
 
97
- function CommentTemplateInnerBlocks(_ref2) {
98
- var _comment$children;
99
-
100
- let {
101
- comment,
102
- activeCommentId,
103
- setActiveCommentId,
104
- firstCommentId,
105
- blocks
106
- } = _ref2;
95
+ function CommentTemplateInnerBlocks({
96
+ comment,
97
+ activeCommentId,
98
+ setActiveCommentId,
99
+ firstCommentId,
100
+ blocks
101
+ }) {
107
102
  const {
108
103
  children,
109
104
  ...innerBlocksProps
110
105
  } = useInnerBlocksProps({}, {
111
106
  template: TEMPLATE
112
107
  });
113
- return createElement("li", innerBlocksProps, comment.commentId === (activeCommentId || firstCommentId) ? children : null, createElement(MemoizedCommentTemplatePreview, {
108
+ return createElement("li", { ...innerBlocksProps
109
+ }, comment.commentId === (activeCommentId || firstCommentId) ? children : null, createElement(MemoizedCommentTemplatePreview, {
114
110
  blocks: blocks,
115
111
  commentId: comment.commentId,
116
112
  setActiveCommentId: setActiveCommentId,
117
113
  isHidden: comment.commentId === (activeCommentId || firstCommentId)
118
- }), (comment === null || comment === void 0 ? void 0 : (_comment$children = comment.children) === null || _comment$children === void 0 ? void 0 : _comment$children.length) > 0 ? createElement(CommentsList, {
114
+ }), comment?.children?.length > 0 ? createElement(CommentsList, {
119
115
  comments: comment.children,
120
116
  activeCommentId: activeCommentId,
121
117
  setActiveCommentId: setActiveCommentId,
@@ -124,13 +120,12 @@ function CommentTemplateInnerBlocks(_ref2) {
124
120
  }) : null);
125
121
  }
126
122
 
127
- const CommentTemplatePreview = _ref3 => {
128
- let {
129
- blocks,
130
- commentId,
131
- setActiveCommentId,
132
- isHidden
133
- } = _ref3;
123
+ const CommentTemplatePreview = ({
124
+ blocks,
125
+ commentId,
126
+ setActiveCommentId,
127
+ isHidden
128
+ }) => {
134
129
  const blockPreviewProps = useBlockPreview({
135
130
  blocks
136
131
  });
@@ -146,14 +141,14 @@ const CommentTemplatePreview = _ref3 => {
146
141
  const style = {
147
142
  display: isHidden ? 'none' : undefined
148
143
  };
149
- return createElement("div", _extends({}, blockPreviewProps, {
144
+ return createElement("div", { ...blockPreviewProps,
150
145
  tabIndex: 0,
151
146
  role: "button",
152
147
  style: style // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role
153
148
  ,
154
149
  onClick: handleOnClick,
155
150
  onKeyPress: handleOnClick
156
- }));
151
+ });
157
152
  };
158
153
 
159
154
  const MemoizedCommentTemplatePreview = memo(CommentTemplatePreview);
@@ -171,52 +166,44 @@ const MemoizedCommentTemplatePreview = memo(CommentTemplatePreview);
171
166
  * @return {WPElement} List of comments.
172
167
  */
173
168
 
174
- const CommentsList = _ref4 => {
175
- let {
176
- comments,
177
- blockProps,
178
- activeCommentId,
179
- setActiveCommentId,
180
- blocks,
181
- firstCommentId
182
- } = _ref4;
183
- return createElement("ol", blockProps, comments && comments.map((_ref5, index) => {
184
- let {
185
- commentId,
186
- ...comment
187
- } = _ref5;
188
- return createElement(BlockContextProvider, {
189
- key: comment.commentId || index,
190
- value: {
191
- // If the commentId is negative it means that this comment is a
192
- // "placeholder" and that the block is most likely being used in the
193
- // site editor. In this case, we have to set the commentId to `null`
194
- // because otherwise the (non-existent) comment with a negative ID
195
- // would be reqested from the REST API.
196
- commentId: commentId < 0 ? null : commentId
197
- }
198
- }, createElement(CommentTemplateInnerBlocks, {
199
- comment: {
200
- commentId,
201
- ...comment
202
- },
203
- activeCommentId: activeCommentId,
204
- setActiveCommentId: setActiveCommentId,
205
- blocks: blocks,
206
- firstCommentId: firstCommentId
207
- }));
208
- }));
209
- };
210
-
211
- export default function CommentTemplateEdit(_ref6) {
212
- var _commentTree$;
169
+ const CommentsList = ({
170
+ comments,
171
+ blockProps,
172
+ activeCommentId,
173
+ setActiveCommentId,
174
+ blocks,
175
+ firstCommentId
176
+ }) => createElement("ol", { ...blockProps
177
+ }, comments && comments.map(({
178
+ commentId,
179
+ ...comment
180
+ }, index) => createElement(BlockContextProvider, {
181
+ key: comment.commentId || index,
182
+ value: {
183
+ // If the commentId is negative it means that this comment is a
184
+ // "placeholder" and that the block is most likely being used in the
185
+ // site editor. In this case, we have to set the commentId to `null`
186
+ // because otherwise the (non-existent) comment with a negative ID
187
+ // would be reqested from the REST API.
188
+ commentId: commentId < 0 ? null : commentId
189
+ }
190
+ }, createElement(CommentTemplateInnerBlocks, {
191
+ comment: {
192
+ commentId,
193
+ ...comment
194
+ },
195
+ activeCommentId: activeCommentId,
196
+ setActiveCommentId: setActiveCommentId,
197
+ blocks: blocks,
198
+ firstCommentId: firstCommentId
199
+ }))));
213
200
 
214
- let {
215
- clientId,
216
- context: {
217
- postId
218
- }
219
- } = _ref6;
201
+ export default function CommentTemplateEdit({
202
+ clientId,
203
+ context: {
204
+ postId
205
+ }
206
+ }) {
220
207
  const blockProps = useBlockProps();
221
208
  const [activeCommentId, setActiveCommentId] = useState();
222
209
  const {
@@ -255,7 +242,8 @@ export default function CommentTemplateEdit(_ref6) {
255
242
  commentOrder === 'desc' && topLevelComments ? [...topLevelComments].reverse() : topLevelComments);
256
243
 
257
244
  if (!topLevelComments) {
258
- return createElement("p", blockProps, createElement(Spinner, null));
245
+ return createElement("p", { ...blockProps
246
+ }, createElement(Spinner, null));
259
247
  }
260
248
 
261
249
  if (!postId) {
@@ -268,7 +256,8 @@ export default function CommentTemplateEdit(_ref6) {
268
256
  }
269
257
 
270
258
  if (!commentTree.length) {
271
- return createElement("p", blockProps, __('No results found.'));
259
+ return createElement("p", { ...blockProps
260
+ }, __('No results found.'));
272
261
  }
273
262
 
274
263
  return createElement(CommentsList, {
@@ -277,7 +266,7 @@ export default function CommentTemplateEdit(_ref6) {
277
266
  blocks: blocks,
278
267
  activeCommentId: activeCommentId,
279
268
  setActiveCommentId: setActiveCommentId,
280
- firstCommentId: (_commentTree$ = commentTree[0]) === null || _commentTree$ === void 0 ? void 0 : _commentTree$.commentId
269
+ firstCommentId: commentTree[0]?.commentId
281
270
  });
282
271
  }
283
272
  //# sourceMappingURL=edit.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-template/edit.js"],"names":["useState","memo","useSelect","__","BlockContextProvider","useBlockProps","useInnerBlocksProps","store","blockEditorStore","__experimentalUseBlockPreview","useBlockPreview","Spinner","coreStore","useCommentQueryArgs","useCommentTree","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","__experimentalDiscussionSettings","commentQuery","topLevelComments","getEntityRecords","getBlocks","commentTree","reverse"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,IAAnB,QAA+B,oBAA/B;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SACCC,oBADD,EAECC,aAFD,EAGCC,mBAHD,EAICC,KAAK,IAAIC,gBAJV,EAKCC,6BAA6B,IAAIC,eALlC,QAMO,yBANP;AAOA,SAASC,OAAT,QAAwB,uBAAxB;AACA,SAASJ,KAAK,IAAIK,SAAlB,QAAmC,sBAAnC;AAEA;AACA;AACA;;AACA,SAASC,mBAAT,EAA8BC,cAA9B,QAAoD,SAApD;AAEA,MAAMC,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;AAC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,CAA9C,CAnBG,CAkCH;;AACA,MAAII,WAAW,GAAGpD,cAAc,EAC/B;AACA2C,EAAAA,YAAY,KAAK,MAAjB,IAA2BM,gBAA3B,GACG,CAAE,GAAGA,gBAAL,EAAwBI,OAAxB,EADH,GAEGJ,gBAJ4B,CAAhC;;AAOA,MAAK,CAAEA,gBAAP,EAA0B;AACzB,WACC,mBAAQb,UAAR,EACC,cAAC,OAAD,OADD,CADD;AAKA;;AAED,MAAK,CAAEM,MAAP,EAAgB;AACfU,IAAAA,WAAW,GAAGlD,sBAAsB,CAAE;AACrCC,MAAAA,OAAO,EAAEyC,eAD4B;AAErCxC,MAAAA,YAFqC;AAGrCC,MAAAA,cAHqC;AAIrCC,MAAAA;AAJqC,KAAF,CAApC;AAMA;;AAED,MAAK,CAAE8C,WAAW,CAAC3B,MAAnB,EAA4B;AAC3B,WAAO,mBAAQW,UAAR,EAAuB/C,EAAE,CAAE,mBAAF,CAAzB,CAAP;AACA;;AAED,SACC,cAAC,YAAD;AACC,IAAA,QAAQ,EAAG+D,WADZ;AAEC,IAAA,UAAU,EAAGhB,UAFd;AAGC,IAAA,MAAM,EAAGd,MAHV;AAIC,IAAA,eAAe,EAAGH,eAJnB;AAKC,IAAA,kBAAkB,EAAGC,kBALtB;AAMC,IAAA,cAAc,mBAAGgC,WAAW,CAAE,CAAF,CAAd,kDAAG,cAAkBvC;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":["useState","memo","useSelect","__","BlockContextProvider","useBlockProps","useInnerBlocksProps","store","blockEditorStore","__experimentalUseBlockPreview","useBlockPreview","Spinner","coreStore","useCommentQueryArgs","useCommentTree","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","__experimentalDiscussionSettings","commentQuery","topLevelComments","getEntityRecords","getBlocks","commentTree","reverse"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,IAAnB,QAA+B,oBAA/B;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SACCC,oBADD,EAECC,aAFD,EAGCC,mBAHD,EAICC,KAAK,IAAIC,gBAJV,EAKCC,6BAA6B,IAAIC,eALlC,QAMO,yBANP;AAOA,SAASC,OAAT,QAAwB,uBAAxB;AACA,SAASJ,KAAK,IAAIK,SAAlB,QAAmC,sBAAnC;AAEA;AACA;AACA;;AACA,SAASC,mBAAT,EAA8BC,cAA9B,QAAoD,SAApD;AAEA,MAAMC,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,GAAGD,aAAa,GAAG,CAAlC;AAEA,aAAO,CACN;AACCE,QAAAA,SAAS,EAAE,EAAGF,aAAa,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,SACC,cAAC,YAAD;AACC,IAAA,QAAQ,EAAG+D,WADZ;AAEC,IAAA,UAAU,EAAGhB,UAFd;AAGC,IAAA,MAAM,EAAGd,MAHV;AAIC,IAAA,eAAe,EAAGH,eAJnB;AAKC,IAAA,kBAAkB,EAAGC,kBALtB;AAMC,IAAA,cAAc,EAAGgC,WAAW,CAAE,CAAF,CAAX,EAAkBvC;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"]}
@@ -19,10 +19,9 @@ const MAX_COMMENTS_PER_PAGE = 100;
19
19
  * @return {Object} Query args to retrieve the comments.
20
20
  */
21
21
 
22
- export const useCommentQueryArgs = _ref => {
23
- let {
24
- postId
25
- } = _ref;
22
+ export const useCommentQueryArgs = ({
23
+ postId
24
+ }) => {
26
25
  // Initialize the query args that are not going to change.
27
26
  const queryArgs = {
28
27
  status: 'approve',
@@ -82,13 +81,12 @@ export const useCommentQueryArgs = _ref => {
82
81
  * @return {number} Index of the default comments page.
83
82
  */
84
83
 
85
- const useDefaultPageIndex = _ref2 => {
86
- let {
87
- defaultPage,
88
- postId,
89
- perPage,
90
- queryArgs
91
- } = _ref2;
84
+ const useDefaultPageIndex = ({
85
+ defaultPage,
86
+ postId,
87
+ perPage,
88
+ queryArgs
89
+ }) => {
92
90
  // Store the default page indices.
93
91
  const [defaultPages, setDefaultPages] = useState({});
94
92
  const key = `${postId}_${perPage}`;
@@ -132,12 +130,11 @@ const useDefaultPageIndex = _ref2 => {
132
130
 
133
131
 
134
132
  export const useCommentTree = topLevelComments => {
135
- const commentTree = useMemo(() => topLevelComments === null || topLevelComments === void 0 ? void 0 : topLevelComments.map(_ref3 => {
136
- let {
137
- id,
138
- _embedded
139
- } = _ref3;
140
- const [children] = (_embedded === null || _embedded === void 0 ? void 0 : _embedded.children) || [[]];
133
+ const commentTree = useMemo(() => topLevelComments?.map(({
134
+ id,
135
+ _embedded
136
+ }) => {
137
+ const [children] = _embedded?.children || [[]];
141
138
  return {
142
139
  commentId: id,
143
140
  children: children.map(child => ({
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-template/hooks.js"],"names":["useState","useEffect","useMemo","useSelect","store","blockEditorStore","addQueryArgs","apiFetch","MAX_COMMENTS_PER_PAGE","useCommentQueryArgs","postId","queryArgs","status","order","context","parent","_embed","pageComments","commentsPerPage","defaultCommentsPage","defaultPage","select","getSettings","__experimentalDiscussionSettings","perPage","Math","min","page","useDefaultPageIndex","post","per_page","defaultPages","setDefaultPages","key","path","_fields","method","parse","then","res","pages","parseInt","headers","get","useCommentTree","topLevelComments","commentTree","map","id","_embedded","children","commentId","child"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,SAAnB,EAA8BC,OAA9B,QAA6C,oBAA7C;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,KAAK,IAAIC,gBAAlB,QAA0C,yBAA1C;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA,OAAOC,QAAP,MAAqB,sBAArB,C,CAEA;;AACA,MAAMC,qBAAqB,GAAG,GAA9B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,mBAAmB,GAAG,QAAkB;AAAA,MAAhB;AAAEC,IAAAA;AAAF,GAAgB;AACpD;AACA,QAAMC,SAAS,GAAG;AACjBC,IAAAA,MAAM,EAAE,SADS;AAEjBC,IAAAA,KAAK,EAAE,KAFU;AAGjBC,IAAAA,OAAO,EAAE,OAHQ;AAIjBC,IAAAA,MAAM,EAAE,CAJS;AAKjBC,IAAAA,MAAM,EAAE;AALS,GAAlB,CAFoD,CAUpD;;AACA,QAAM;AACLC,IAAAA,YADK;AAELC,IAAAA,eAFK;AAGLC,IAAAA,mBAAmB,EAAEC;AAHhB,MAIFjB,SAAS,CAAIkB,MAAF,IAAc;AAC5B,UAAM;AAAEC,MAAAA;AAAF,QAAkBD,MAAM,CAAEhB,gBAAF,CAA9B;AACA,UAAM;AAAEkB,MAAAA;AAAF,QAAuCD,WAAW,EAAxD;AACA,WAAOC,gCAAP;AACA,GAJY,CAJb,CAXoD,CAqBpD;AACA;AACA;AACA;;A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yB,EAW1B,CAAEH,gBAAF,CAX0B,CAA3B;AAcA,SAAOC,WAAP;AACA,CAhBM","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useEffect, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { addQueryArgs } from '@wordpress/url';\nimport apiFetch from '@wordpress/api-fetch';\n\n// This is limited by WP REST API\nconst MAX_COMMENTS_PER_PAGE = 100;\n\n/**\n * Return an object with the query args needed to fetch the default page of\n * comments.\n *\n * @param {Object} props Hook props.\n * @param {number} props.postId ID of the post that contains the comments.\n * discussion settings.\n *\n * @return {Object} Query args to retrieve the comments.\n */\nexport const useCommentQueryArgs = ( { postId } ) => {\n\t// Initialize the query args that are not going to change.\n\tconst queryArgs = {\n\t\tstatus: 'approve',\n\t\torder: 'asc',\n\t\tcontext: 'embed',\n\t\tparent: 0,\n\t\t_embed: 'children',\n\t};\n\n\t// Get the Discussion settings that may be needed to query the comments.\n\tconst {\n\t\tpageComments,\n\t\tcommentsPerPage,\n\t\tdefaultCommentsPage: defaultPage,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { __experimentalDiscussionSettings } = getSettings();\n\t\treturn __experimentalDiscussionSettings;\n\t} );\n\n\t// WP REST API doesn't allow fetching more than max items limit set per single page of data.\n\t// As for the editor performance is more important than completeness of data and fetching only the\n\t// max allowed for single page should be enough for the purpose of design and laying out the page.\n\t// Fetching over the limit would return an error here but would work with backend query.\n\tconst perPage = pageComments\n\t\t? Math.min( commentsPerPage, MAX_COMMENTS_PER_PAGE )\n\t\t: MAX_COMMENTS_PER_PAGE;\n\n\t// Get the number of the default page.\n\tconst page = useDefaultPageIndex( {\n\t\tdefaultPage,\n\t\tpostId,\n\t\tperPage,\n\t\tqueryArgs,\n\t} );\n\n\t// Merge, memoize and return all query arguments, unless the default page's\n\t// number is not known yet.\n\treturn useMemo( () => {\n\t\treturn page\n\t\t\t? {\n\t\t\t\t\t...queryArgs,\n\t\t\t\t\tpost: postId,\n\t\t\t\t\tper_page: perPage,\n\t\t\t\t\tpage,\n\t\t\t }\n\t\t\t: null;\n\t}, [ postId, perPage, page ] );\n};\n\n/**\n * Return the index of the default page, depending on whether `defaultPage` is\n * `newest` or `oldest`. In the first case, the only way to know the page's\n * index is by using the `X-WP-TotalPages` header, which forces to make an\n * additional request.\n *\n * @param {Object} props Hook props.\n * @param {string} props.defaultPage Page shown by default (newest/oldest).\n * @param {number} props.postId ID of the post that contains the comments.\n * @param {number} props.perPage The number of comments included per page.\n * @param {Object} props.queryArgs Other query args.\n *\n * @return {number} Index of the default comments page.\n */\nconst useDefaultPageIndex = ( { defaultPage, postId, perPage, queryArgs } ) => {\n\t// Store the default page indices.\n\tconst [ defaultPages, setDefaultPages ] = useState( {} );\n\tconst key = `${ postId }_${ perPage }`;\n\tconst page = defaultPages[ key ] || 0;\n\n\tuseEffect( () => {\n\t\t// Do nothing if the page is already known or not the newest page.\n\t\tif ( page || defaultPage !== 'newest' ) {\n\t\t\treturn;\n\t\t}\n\t\t// We need to fetch comments to know the index. Use HEAD and limit\n\t\t// fields just to ID, to make this call as light as possible.\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\t...queryArgs,\n\t\t\t\tpost: postId,\n\t\t\t\tper_page: perPage,\n\t\t\t\t_fields: 'id',\n\t\t\t} ),\n\t\t\tmethod: 'HEAD',\n\t\t\tparse: false,\n\t\t} ).then( ( res ) => {\n\t\t\tconst pages = parseInt( res.headers.get( 'X-WP-TotalPages' ) );\n\t\t\tsetDefaultPages( {\n\t\t\t\t...defaultPages,\n\t\t\t\t[ key ]: pages <= 1 ? 1 : pages, // If there are 0 pages, it means that there are no comments, but there is no 0th page.\n\t\t\t} );\n\t\t} );\n\t}, [ defaultPage, postId, perPage, setDefaultPages ] );\n\n\t// The oldest one is always the first one.\n\treturn defaultPage === 'newest' ? page : 1;\n};\n\n/**\n * Generate a tree structure of comment IDs from a list of comment entities. The\n * children of each comment are obtained from `_embedded`.\n *\n * @typedef {{ commentId: number, children: CommentNode }} CommentNode\n *\n * @param {Object[]} topLevelComments List of comment entities.\n * @return {{ commentTree: CommentNode[]}} Tree of comment IDs.\n */\nexport const useCommentTree = ( topLevelComments ) => {\n\tconst commentTree = useMemo(\n\t\t() =>\n\t\t\ttopLevelComments?.map( ( { id, _embedded } ) => {\n\t\t\t\tconst [ children ] = _embedded?.children || [ [] ];\n\t\t\t\treturn {\n\t\t\t\t\tcommentId: id,\n\t\t\t\t\tchildren: children.map( ( child ) => ( {\n\t\t\t\t\t\tcommentId: child.id,\n\t\t\t\t\t} ) ),\n\t\t\t\t};\n\t\t\t} ),\n\t\t[ topLevelComments ]\n\t);\n\n\treturn commentTree;\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comment-template/hooks.js"],"names":["useState","useEffect","useMemo","useSelect","store","blockEditorStore","addQueryArgs","apiFetch","MAX_COMMENTS_PER_PAGE","useCommentQueryArgs","postId","queryArgs","status","order","context","parent","_embed","pageComments","commentsPerPage","defaultCommentsPage","defaultPage","select","getSettings","__experimentalDiscussionSettings","perPage","Math","min","page","useDefaultPageIndex","post","per_page","defaultPages","setDefaultPages","key","path","_fields","method","parse","then","res","pages","parseInt","headers","get","useCommentTree","topLevelComments","commentTree","map","id","_embedded","children","commentId","child"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,QAAT,EAAmBC,SAAnB,EAA8BC,OAA9B,QAA6C,oBAA7C;AACA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,KAAK,IAAIC,gBAAlB,QAA0C,yBAA1C;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA,OAAOC,QAAP,MAAqB,sBAArB,C,CAEA;;AACA,MAAMC,qBAAqB,GAAG,GAA9B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,mBAAmB,GAAG,CAAE;AA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AACA;AACA;AACA;;;AACA,OAAO,MAAMiB,cAAc,GAAKC,gBAAF,IAAwB;AACrD,QAAMC,WAAW,GAAG5C,OAAO,CAC1B,MACC2C,gBAAgB,EAAEE,GAAlB,CAAuB,CAAE;AAAEC,IAAAA,EAAF;AAAMC,IAAAA;AAAN,GAAF,KAAyB;AAC/C,UAAM,CAAEC,QAAF,IAAeD,SAAS,EAAEC,QAAX,IAAuB,CAAE,EAAF,CAA5C;AACA,WAAO;AACNC,MAAAA,SAAS,EAAEH,EADL;AAENE,MAAAA,QAAQ,EAAEA,QAAQ,CAACH,GAAT,CAAgBK,KAAF,KAAe;AACtCD,QAAAA,SAAS,EAAEC,KAAK,CAACJ;AADqB,OAAf,CAAd;AAFJ,KAAP;AAMA,GARD,CAFyB,EAW1B,CAAEH,gBAAF,CAX0B,CAA3B;AAcA,SAAOC,WAAP;AACA,CAhBM","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useEffect, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { addQueryArgs } from '@wordpress/url';\nimport apiFetch from '@wordpress/api-fetch';\n\n// This is limited by WP REST API\nconst MAX_COMMENTS_PER_PAGE = 100;\n\n/**\n * Return an object with the query args needed to fetch the default page of\n * comments.\n *\n * @param {Object} props Hook props.\n * @param {number} props.postId ID of the post that contains the comments.\n * discussion settings.\n *\n * @return {Object} Query args to retrieve the comments.\n */\nexport const useCommentQueryArgs = ( { postId } ) => {\n\t// Initialize the query args that are not going to change.\n\tconst queryArgs = {\n\t\tstatus: 'approve',\n\t\torder: 'asc',\n\t\tcontext: 'embed',\n\t\tparent: 0,\n\t\t_embed: 'children',\n\t};\n\n\t// Get the Discussion settings that may be needed to query the comments.\n\tconst {\n\t\tpageComments,\n\t\tcommentsPerPage,\n\t\tdefaultCommentsPage: defaultPage,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { __experimentalDiscussionSettings } = getSettings();\n\t\treturn __experimentalDiscussionSettings;\n\t} );\n\n\t// WP REST API doesn't allow fetching more than max items limit set per single page of data.\n\t// As for the editor performance is more important than completeness of data and fetching only the\n\t// max allowed for single page should be enough for the purpose of design and laying out the page.\n\t// Fetching over the limit would return an error here but would work with backend query.\n\tconst perPage = pageComments\n\t\t? Math.min( commentsPerPage, MAX_COMMENTS_PER_PAGE )\n\t\t: MAX_COMMENTS_PER_PAGE;\n\n\t// Get the number of the default page.\n\tconst page = useDefaultPageIndex( {\n\t\tdefaultPage,\n\t\tpostId,\n\t\tperPage,\n\t\tqueryArgs,\n\t} );\n\n\t// Merge, memoize and return all query arguments, unless the default page's\n\t// number is not known yet.\n\treturn useMemo( () => {\n\t\treturn page\n\t\t\t? {\n\t\t\t\t\t...queryArgs,\n\t\t\t\t\tpost: postId,\n\t\t\t\t\tper_page: perPage,\n\t\t\t\t\tpage,\n\t\t\t }\n\t\t\t: null;\n\t}, [ postId, perPage, page ] );\n};\n\n/**\n * Return the index of the default page, depending on whether `defaultPage` is\n * `newest` or `oldest`. In the first case, the only way to know the page's\n * index is by using the `X-WP-TotalPages` header, which forces to make an\n * additional request.\n *\n * @param {Object} props Hook props.\n * @param {string} props.defaultPage Page shown by default (newest/oldest).\n * @param {number} props.postId ID of the post that contains the comments.\n * @param {number} props.perPage The number of comments included per page.\n * @param {Object} props.queryArgs Other query args.\n *\n * @return {number} Index of the default comments page.\n */\nconst useDefaultPageIndex = ( { defaultPage, postId, perPage, queryArgs } ) => {\n\t// Store the default page indices.\n\tconst [ defaultPages, setDefaultPages ] = useState( {} );\n\tconst key = `${ postId }_${ perPage }`;\n\tconst page = defaultPages[ key ] || 0;\n\n\tuseEffect( () => {\n\t\t// Do nothing if the page is already known or not the newest page.\n\t\tif ( page || defaultPage !== 'newest' ) {\n\t\t\treturn;\n\t\t}\n\t\t// We need to fetch comments to know the index. Use HEAD and limit\n\t\t// fields just to ID, to make this call as light as possible.\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\t...queryArgs,\n\t\t\t\tpost: postId,\n\t\t\t\tper_page: perPage,\n\t\t\t\t_fields: 'id',\n\t\t\t} ),\n\t\t\tmethod: 'HEAD',\n\t\t\tparse: false,\n\t\t} ).then( ( res ) => {\n\t\t\tconst pages = parseInt( res.headers.get( 'X-WP-TotalPages' ) );\n\t\t\tsetDefaultPages( {\n\t\t\t\t...defaultPages,\n\t\t\t\t[ key ]: pages <= 1 ? 1 : pages, // If there are 0 pages, it means that there are no comments, but there is no 0th page.\n\t\t\t} );\n\t\t} );\n\t}, [ defaultPage, postId, perPage, setDefaultPages ] );\n\n\t// The oldest one is always the first one.\n\treturn defaultPage === 'newest' ? page : 1;\n};\n\n/**\n * Generate a tree structure of comment IDs from a list of comment entities. The\n * children of each comment are obtained from `_embedded`.\n *\n * @typedef {{ commentId: number, children: CommentNode }} CommentNode\n *\n * @param {Object[]} topLevelComments List of comment entities.\n * @return {{ commentTree: CommentNode[]}} Tree of comment IDs.\n */\nexport const useCommentTree = ( topLevelComments ) => {\n\tconst commentTree = useMemo(\n\t\t() =>\n\t\t\ttopLevelComments?.map( ( { id, _embedded } ) => {\n\t\t\t\tconst [ children ] = _embedded?.children || [ [] ];\n\t\t\t\treturn {\n\t\t\t\t\tcommentId: id,\n\t\t\t\t\tchildren: children.map( ( child ) => ( {\n\t\t\t\t\t\tcommentId: child.id,\n\t\t\t\t\t} ) ),\n\t\t\t\t};\n\t\t\t} ),\n\t\t[ topLevelComments ]\n\t);\n\n\treturn commentTree;\n};\n"]}
@@ -9,7 +9,7 @@ import { layout as icon } from '@wordpress/icons';
9
9
  import initBlock from '../utils/init-block';
10
10
  const metadata = {
11
11
  $schema: "https://schemas.wp.org/trunk/block.json",
12
- apiVersion: 2,
12
+ apiVersion: 3,
13
13
  name: "core/comment-template",
14
14
  title: "Comment Template",
15
15
  category: "design",
@@ -19,7 +19,6 @@ const metadata = {
19
19
  usesContext: ["postId"],
20
20
  supports: {
21
21
  align: true,
22
- anchor: true,
23
22
  html: false,
24
23
  reusable: false,
25
24
  spacing: {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-template/index.js"],"names":["layout","icon","initBlock","edit","save","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,IAAIC,IAAnB,QAA+B,kBAA/B;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBN,EAAAA,IADuB;AAEvBE,EAAAA,IAFuB;AAGvBC,EAAAA;AAHuB,CAAjB;AAMP,OAAO,MAAMI,IAAI,GAAG,MAAMN,SAAS,CAAE;AAAEG,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","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":["layout","icon","initBlock","edit","save","name","metadata","settings","init"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,IAAIC,IAAnB,QAA+B,kBAA/B;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,qBAAtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBN,EAAAA,IADuB;AAEvBE,EAAAA,IAFuB;AAGvBC,EAAAA;AAHuB,CAAjB;AAMP,OAAO,MAAMI,IAAI,GAAG,MAAMN,SAAS,CAAE;AAAEG,EAAAA,IAAF;AAAQC,EAAAA,QAAR;AAAkBC,EAAAA;AAAlB,CAAF,CAA5B","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"]}
@@ -41,12 +41,10 @@ export const convertToTree = data => {
41
41
 
42
42
  data.forEach(item => {
43
43
  if (item.parent) {
44
- var _table$item$parent;
45
-
46
44
  // If the comment has a "parent", then find that parent in the table that
47
45
  // we have created above and push the current comment to the array of its
48
46
  // children.
49
- (_table$item$parent = table[item.parent]) === null || _table$item$parent === void 0 ? void 0 : _table$item$parent.children.push(table[item.id]);
47
+ table[item.parent]?.children.push(table[item.id]);
50
48
  } else {
51
49
  // Otherwise, if the comment has no parent (also works if parent is 0)
52
50
  // that means that it's a top-level comment so we can find it in the table
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comment-template/util.js"],"names":["convertToTree","data","table","forEach","item","id","commentId","children","tree","parent","push"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,aAAa,GAAKC,IAAF,IAAY;AACxC,QAAMC,KAAK,GAAG,EAAd;AAEA,MAAK,CAAED,IAAP,EAAc,OAAO,EAAP,CAH0B,CAKxC;;AACAA,EAAAA,IAAI,CAACE,OAAL,CAAgBC,IAAF,IAAY;AACzBF,IAAAA,KAAK,CAAEE,IAAI,CAACC,EAAP,CAAL,GAAmB;AAAEC,MAAAA,SAAS,EAAEF,IAAI,CAACC,EAAlB;AAAsBE,MAAAA,QAAQ,EAAE;AAAhC,KAAnB;AACA,GAFD;AAIA,QAAMC,IAAI,GAAG,EAAb,CAVwC,CAYxC;;AACAP,EAAAA,IAAI,CAACE,OAAL,CAAgBC,IAAF,IAAY;AACzB,QAAKA,IAAI,CAACK,MAAV,EAAmB;AAAA;;AAClB;AACA;AACA;AACA,4BAAAP,KAAK,CAAEE,IAAI,CAACK,MAAP,CAAL,0EAAsBF,QAAtB,CAA+BG,IAA/B,CAAqCR,KAAK,CAAEE,IAAI,CAACC,EAAP,CAA1C;AACA,KALD,MAKO;AACN;AACA;AACA;AACAG,MAAAA,IAAI,CAACE,IAAL,CAAWR,KAAK,CAAEE,IAAI,CAACC,EAAP,CAAhB;AACA;AACD,GAZD;AAaA,SAAOG,IAAP;AACA,CA3BM","sourcesContent":["/**\n *\n * This function converts a flat list of comment objects with a `parent` property\n * to a nested list of comment objects with a `children` property. The `children`\n * property is itself a list of comment objects.\n *\n * @example\n * ```\n * const comments = [\n * \t{ id: 1, parent: 0 },\n * \t{ id: 2, parent: 1 },\n * \t{ id: 3, parent: 2 },\n * \t{ id: 4, parent: 1 },\n * ];\n * expect( convertToTree( comments ) ).toEqual( [\n * \t{\n * \t\tcommentId: 1,\n * \t\tchildren: [\n * \t\t\t{ commentId: 2, children: [ { commentId: 3, children: [] } ] },\n * \t\t\t{ commentId: 4, children: [] },\n * \t\t],\n * \t},\n * ] );\n * ```\n * @typedef {{id: number, parent: number}} Comment\n * @param {Comment[]} data - List of comment objects.\n *\n * @return {Object[]} Nested list of comment objects with a `children` property.\n */\nexport const convertToTree = ( data ) => {\n\tconst table = {};\n\n\tif ( ! data ) return [];\n\n\t// First create a hash table of { [id]: { ...comment, children: [] }}\n\tdata.forEach( ( item ) => {\n\t\ttable[ item.id ] = { commentId: item.id, children: [] };\n\t} );\n\n\tconst tree = [];\n\n\t// Iterate over the original comments again\n\tdata.forEach( ( item ) => {\n\t\tif ( item.parent ) {\n\t\t\t// If the comment has a \"parent\", then find that parent in the table that\n\t\t\t// we have created above and push the current comment to the array of its\n\t\t\t// children.\n\t\t\ttable[ item.parent ]?.children.push( table[ item.id ] );\n\t\t} else {\n\t\t\t// Otherwise, if the comment has no parent (also works if parent is 0)\n\t\t\t// that means that it's a top-level comment so we can find it in the table\n\t\t\t// and push it to the final tree.\n\t\t\ttree.push( table[ item.id ] );\n\t\t}\n\t} );\n\treturn tree;\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comment-template/util.js"],"names":["convertToTree","data","table","forEach","item","id","commentId","children","tree","parent","push"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,aAAa,GAAKC,IAAF,IAAY;AACxC,QAAMC,KAAK,GAAG,EAAd;AAEA,MAAK,CAAED,IAAP,EAAc,OAAO,EAAP,CAH0B,CAKxC;;AACAA,EAAAA,IAAI,CAACE,OAAL,CAAgBC,IAAF,IAAY;AACzBF,IAAAA,KAAK,CAAEE,IAAI,CAACC,EAAP,CAAL,GAAmB;AAAEC,MAAAA,SAAS,EAAEF,IAAI,CAACC,EAAlB;AAAsBE,MAAAA,QAAQ,EAAE;AAAhC,KAAnB;AACA,GAFD;AAIA,QAAMC,IAAI,GAAG,EAAb,CAVwC,CAYxC;;AACAP,EAAAA,IAAI,CAACE,OAAL,CAAgBC,IAAF,IAAY;AACzB,QAAKA,IAAI,CAACK,MAAV,EAAmB;AAClB;AACA;AACA;AACAP,MAAAA,KAAK,CAAEE,IAAI,CAACK,MAAP,CAAL,EAAsBF,QAAtB,CAA+BG,IAA/B,CAAqCR,KAAK,CAAEE,IAAI,CAACC,EAAP,CAA1C;AACA,KALD,MAKO;AACN;AACA;AACA;AACAG,MAAAA,IAAI,CAACE,IAAL,CAAWR,KAAK,CAAEE,IAAI,CAACC,EAAP,CAAhB;AACA;AACD,GAZD;AAaA,SAAOG,IAAP;AACA,CA3BM","sourcesContent":["/**\n *\n * This function converts a flat list of comment objects with a `parent` property\n * to a nested list of comment objects with a `children` property. The `children`\n * property is itself a list of comment objects.\n *\n * @example\n * ```\n * const comments = [\n * \t{ id: 1, parent: 0 },\n * \t{ id: 2, parent: 1 },\n * \t{ id: 3, parent: 2 },\n * \t{ id: 4, parent: 1 },\n * ];\n * expect( convertToTree( comments ) ).toEqual( [\n * \t{\n * \t\tcommentId: 1,\n * \t\tchildren: [\n * \t\t\t{ commentId: 2, children: [ { commentId: 3, children: [] } ] },\n * \t\t\t{ commentId: 4, children: [] },\n * \t\t],\n * \t},\n * ] );\n * ```\n * @typedef {{id: number, parent: number}} Comment\n * @param {Comment[]} data - List of comment objects.\n *\n * @return {Object[]} Nested list of comment objects with a `children` property.\n */\nexport const convertToTree = ( data ) => {\n\tconst table = {};\n\n\tif ( ! data ) return [];\n\n\t// First create a hash table of { [id]: { ...comment, children: [] }}\n\tdata.forEach( ( item ) => {\n\t\ttable[ item.id ] = { commentId: item.id, children: [] };\n\t} );\n\n\tconst tree = [];\n\n\t// Iterate over the original comments again\n\tdata.forEach( ( item ) => {\n\t\tif ( item.parent ) {\n\t\t\t// If the comment has a \"parent\", then find that parent in the table that\n\t\t\t// we have created above and push the current comment to the array of its\n\t\t\t// children.\n\t\t\ttable[ item.parent ]?.children.push( table[ item.id ] );\n\t\t} else {\n\t\t\t// Otherwise, if the comment has no parent (also works if parent is 0)\n\t\t\t// that means that it's a top-level comment so we can find it in the table\n\t\t\t// and push it to the final tree.\n\t\t\ttree.push( table[ item.id ] );\n\t\t}\n\t} );\n\treturn tree;\n};\n"]}
@@ -13,7 +13,7 @@ const v1 = {
13
13
  default: 'div'
14
14
  }
15
15
  },
16
- apiVersion: 2,
16
+ apiVersion: 3,
17
17
  supports: {
18
18
  align: ['wide', 'full'],
19
19
  html: false,
@@ -28,25 +28,25 @@ const v1 = {
28
28
  }
29
29
  },
30
30
 
31
- save(_ref) {
32
- let {
33
- attributes: {
34
- tagName: Tag
35
- }
36
- } = _ref;
31
+ save({
32
+ attributes: {
33
+ tagName: Tag
34
+ }
35
+ }) {
37
36
  const blockProps = useBlockProps.save();
38
37
  const {
39
38
  className
40
39
  } = blockProps;
41
- const classes = (className === null || className === void 0 ? void 0 : className.split(' ')) || []; // The ID of the previous version of the block
40
+ const classes = className?.split(' ') || []; // The ID of the previous version of the block
42
41
  // didn't have the `wp-block-comments` class,
43
42
  // so we need to remove it here in order to mimic it.
44
43
 
45
- const newClasses = classes === null || classes === void 0 ? void 0 : classes.filter(cls => cls !== 'wp-block-comments');
44
+ const newClasses = classes?.filter(cls => cls !== 'wp-block-comments');
46
45
  const newBlockProps = { ...blockProps,
47
46
  className: newClasses.join(' ')
48
47
  };
49
- return createElement(Tag, newBlockProps, createElement(InnerBlocks.Content, null));
48
+ return createElement(Tag, { ...newBlockProps
49
+ }, createElement(InnerBlocks.Content, null));
50
50
  }
51
51
 
52
52
  };