@wordpress/block-library 9.3.0 → 9.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (853) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/build/avatar/edit.js +1 -0
  3. package/build/avatar/edit.js.map +1 -1
  4. package/build/block/edit.js +38 -23
  5. package/build/block/edit.js.map +1 -1
  6. package/build/button/edit.js +1 -1
  7. package/build/button/edit.js.map +1 -1
  8. package/build/buttons/index.js +26 -0
  9. package/build/buttons/index.js.map +1 -1
  10. package/build/categories/edit.js +20 -3
  11. package/build/categories/edit.js.map +1 -1
  12. package/build/categories/index.js +20 -0
  13. package/build/categories/index.js.map +1 -1
  14. package/build/column/edit.js +2 -2
  15. package/build/column/edit.js.map +1 -1
  16. package/build/column/index.js +2 -0
  17. package/build/column/index.js.map +1 -1
  18. package/build/columns/index.js +2 -2
  19. package/build/columns/index.js.map +1 -1
  20. package/build/comment-template/index.js +12 -0
  21. package/build/comment-template/index.js.map +1 -1
  22. package/build/comments-title/deprecated.js +3 -0
  23. package/build/comments-title/deprecated.js.map +1 -1
  24. package/build/comments-title/edit.js +3 -1
  25. package/build/comments-title/edit.js.map +1 -1
  26. package/build/comments-title/index.js +3 -0
  27. package/build/comments-title/index.js.map +1 -1
  28. package/build/cover/edit/inspector-controls.js +2 -1
  29. package/build/cover/edit/inspector-controls.js.map +1 -1
  30. package/build/details/edit.js +1 -0
  31. package/build/details/edit.js.map +1 -1
  32. package/build/embed/variations.js +39 -34
  33. package/build/embed/variations.js.map +1 -1
  34. package/build/footnotes/index.js +1 -1
  35. package/build/footnotes/index.js.map +1 -1
  36. package/build/form/edit.js +4 -4
  37. package/build/form/edit.js.map +1 -1
  38. package/build/form-input/edit.js +3 -0
  39. package/build/form-input/edit.js.map +1 -1
  40. package/build/gallery/edit.js +42 -8
  41. package/build/gallery/edit.js.map +1 -1
  42. package/build/gallery/gap-styles.js +1 -9
  43. package/build/gallery/gap-styles.js.map +1 -1
  44. package/build/gallery/index.js +10 -0
  45. package/build/gallery/index.js.map +1 -1
  46. package/build/gallery/use-image-sizes.js +2 -2
  47. package/build/gallery/use-image-sizes.js.map +1 -1
  48. package/build/group/deprecated.js +2 -5
  49. package/build/group/deprecated.js.map +1 -1
  50. package/build/group/index.js +27 -30
  51. package/build/group/index.js.map +1 -1
  52. package/build/group/variations.js +51 -3
  53. package/build/group/variations.js.map +1 -1
  54. package/build/heading/edit.js +2 -0
  55. package/build/heading/edit.js.map +1 -1
  56. package/build/heading/index.js +17 -1
  57. package/build/heading/index.js.map +1 -1
  58. package/build/image/edit.js +1 -1
  59. package/build/image/edit.js.map +1 -1
  60. package/build/image/image.js +24 -11
  61. package/build/image/image.js.map +1 -1
  62. package/build/image/index.js +3 -0
  63. package/build/image/index.js.map +1 -1
  64. package/build/image/view.js +65 -49
  65. package/build/image/view.js.map +1 -1
  66. package/build/latest-comments/index.js +9 -0
  67. package/build/latest-comments/index.js.map +1 -1
  68. package/build/latest-posts/edit.js +1 -0
  69. package/build/latest-posts/edit.js.map +1 -1
  70. package/build/list/edit.js +3 -3
  71. package/build/list/edit.js.map +1 -1
  72. package/build/list/index.js +1 -1
  73. package/build/list/ordered-list-settings.js +19 -17
  74. package/build/list/ordered-list-settings.js.map +1 -1
  75. package/build/list-item/edit.js +2 -2
  76. package/build/list-item/edit.js.map +1 -1
  77. package/build/list-item/hooks/index.js +0 -7
  78. package/build/list-item/hooks/index.js.map +1 -1
  79. package/build/list-item/index.js +3 -2
  80. package/build/list-item/index.js.map +1 -1
  81. package/build/loginout/index.js +14 -1
  82. package/build/loginout/index.js.map +1 -1
  83. package/build/media-text/index.js +12 -0
  84. package/build/media-text/index.js.map +1 -1
  85. package/build/navigation/edit/index.js +5 -4
  86. package/build/navigation/edit/index.js.map +1 -1
  87. package/build/navigation/edit/navigation-menu-delete-control.js +1 -0
  88. package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  89. package/build/navigation/use-navigation-menu.js +5 -1
  90. package/build/navigation/use-navigation-menu.js.map +1 -1
  91. package/build/navigation-link/link-ui.js +13 -17
  92. package/build/navigation-link/link-ui.js.map +1 -1
  93. package/build/navigation-submenu/edit.js +0 -11
  94. package/build/navigation-submenu/edit.js.map +1 -1
  95. package/build/page-list/edit.js +1 -0
  96. package/build/page-list/edit.js.map +1 -1
  97. package/build/page-list-item/edit.js +4 -1
  98. package/build/page-list-item/edit.js.map +1 -1
  99. package/build/paragraph/index.js +6 -0
  100. package/build/paragraph/index.js.map +1 -1
  101. package/build/paragraph/transforms.js +6 -0
  102. package/build/paragraph/transforms.js.map +1 -1
  103. package/build/post-author/index.js +8 -0
  104. package/build/post-author/index.js.map +1 -1
  105. package/build/post-author-biography/index.js +3 -0
  106. package/build/post-author-biography/index.js.map +1 -1
  107. package/build/post-author-name/index.js +3 -0
  108. package/build/post-author-name/index.js.map +1 -1
  109. package/build/post-comments-form/index.js +12 -0
  110. package/build/post-comments-form/index.js.map +1 -1
  111. package/build/post-content/index.js +1 -0
  112. package/build/post-content/index.js.map +1 -1
  113. package/build/post-date/index.js +15 -0
  114. package/build/post-date/index.js.map +1 -1
  115. package/build/post-excerpt/edit.js +1 -0
  116. package/build/post-excerpt/edit.js.map +1 -1
  117. package/build/post-excerpt/index.js +12 -0
  118. package/build/post-excerpt/index.js.map +1 -1
  119. package/build/post-featured-image/index.js +3 -0
  120. package/build/post-featured-image/index.js.map +1 -1
  121. package/build/post-navigation-link/edit.js +2 -0
  122. package/build/post-navigation-link/edit.js.map +1 -1
  123. package/build/post-terms/index.js +15 -0
  124. package/build/post-terms/index.js.map +1 -1
  125. package/build/post-time-to-read/index.js +6 -0
  126. package/build/post-time-to-read/index.js.map +1 -1
  127. package/build/post-title/edit.js +9 -3
  128. package/build/post-title/edit.js.map +1 -1
  129. package/build/post-title/index.js +15 -0
  130. package/build/post-title/index.js.map +1 -1
  131. package/build/query/edit/inspector-controls/author-control.js +3 -1
  132. package/build/query/edit/inspector-controls/author-control.js.map +1 -1
  133. package/build/query/edit/inspector-controls/enhanced-pagination-control.js +1 -0
  134. package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  135. package/build/query/edit/inspector-controls/index.js +90 -12
  136. package/build/query/edit/inspector-controls/index.js.map +1 -1
  137. package/build/query/edit/inspector-controls/offset-controls.js +37 -0
  138. package/build/query/edit/inspector-controls/offset-controls.js.map +1 -0
  139. package/build/query/edit/inspector-controls/order-control.js +1 -0
  140. package/build/query/edit/inspector-controls/order-control.js.map +1 -1
  141. package/build/query/edit/inspector-controls/pages-control.js +36 -0
  142. package/build/query/edit/inspector-controls/pages-control.js.map +1 -0
  143. package/build/query/edit/inspector-controls/parent-control.js +2 -1
  144. package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
  145. package/build/query/edit/inspector-controls/per-page-control.js +40 -0
  146. package/build/query/edit/inspector-controls/per-page-control.js.map +1 -0
  147. package/build/query/edit/inspector-controls/sticky-control.js +2 -1
  148. package/build/query/edit/inspector-controls/sticky-control.js.map +1 -1
  149. package/build/query/edit/inspector-controls/taxonomy-controls.js +5 -2
  150. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  151. package/build/query/edit/query-content.js +11 -2
  152. package/build/query/edit/query-content.js.map +1 -1
  153. package/build/query/edit/query-placeholder.js +1 -14
  154. package/build/query/edit/query-placeholder.js.map +1 -1
  155. package/build/query/edit/query-toolbar.js +3 -76
  156. package/build/query/edit/query-toolbar.js.map +1 -1
  157. package/build/query/utils.js +15 -6
  158. package/build/query/utils.js.map +1 -1
  159. package/build/query/variations.js +9 -55
  160. package/build/query/variations.js.map +1 -1
  161. package/build/query-pagination-numbers/edit.js +1 -0
  162. package/build/query-pagination-numbers/edit.js.map +1 -1
  163. package/build/query-title/edit.js +13 -19
  164. package/build/query-title/edit.js.map +1 -1
  165. package/build/query-title/index.js +3 -0
  166. package/build/query-title/index.js.map +1 -1
  167. package/build/query-title/use-archive-label.js +95 -0
  168. package/build/query-title/use-archive-label.js.map +1 -0
  169. package/build/quote/index.js +15 -1
  170. package/build/quote/index.js.map +1 -1
  171. package/build/search/index.js +3 -0
  172. package/build/search/index.js.map +1 -1
  173. package/build/site-logo/edit.js +19 -9
  174. package/build/site-logo/edit.js.map +1 -1
  175. package/build/site-tagline/edit.js +8 -5
  176. package/build/site-tagline/edit.js.map +1 -1
  177. package/build/site-tagline/index.js +18 -2
  178. package/build/site-tagline/index.js.map +1 -1
  179. package/build/site-title/edit.js +6 -3
  180. package/build/site-title/edit.js.map +1 -1
  181. package/build/site-title/index.js +16 -1
  182. package/build/site-title/index.js.map +1 -1
  183. package/build/social-link/edit.js +0 -1
  184. package/build/social-link/edit.js.map +1 -1
  185. package/build/social-link/icons/soundcloud.js +1 -1
  186. package/build/social-link/icons/soundcloud.js.map +1 -1
  187. package/build/social-links/index.js +12 -0
  188. package/build/social-links/index.js.map +1 -1
  189. package/build/spacer/controls.js +8 -13
  190. package/build/spacer/controls.js.map +1 -1
  191. package/build/table-of-contents/index.js +14 -1
  192. package/build/table-of-contents/index.js.map +1 -1
  193. package/build/tag-cloud/edit.js +42 -33
  194. package/build/tag-cloud/edit.js.map +1 -1
  195. package/build/tag-cloud/index.js +1 -1
  196. package/build/template-part/edit/index.js +8 -5
  197. package/build/template-part/edit/index.js.map +1 -1
  198. package/build/template-part/edit/inner-blocks.js +11 -4
  199. package/build/template-part/edit/inner-blocks.js.map +1 -1
  200. package/build/template-part/edit/placeholder.js +23 -3
  201. package/build/template-part/edit/placeholder.js.map +1 -1
  202. package/build/template-part/edit/title-modal.js +20 -8
  203. package/build/template-part/edit/title-modal.js.map +1 -1
  204. package/build/term-description/index.js +12 -0
  205. package/build/term-description/index.js.map +1 -1
  206. package/build/utils/hooks.js +5 -1
  207. package/build/utils/hooks.js.map +1 -1
  208. package/build-module/avatar/edit.js +1 -0
  209. package/build-module/avatar/edit.js.map +1 -1
  210. package/build-module/block/edit.js +38 -23
  211. package/build-module/block/edit.js.map +1 -1
  212. package/build-module/button/edit.js +1 -1
  213. package/build-module/button/edit.js.map +1 -1
  214. package/build-module/buttons/index.js +26 -0
  215. package/build-module/buttons/index.js.map +1 -1
  216. package/build-module/categories/edit.js +21 -4
  217. package/build-module/categories/edit.js.map +1 -1
  218. package/build-module/categories/index.js +20 -0
  219. package/build-module/categories/index.js.map +1 -1
  220. package/build-module/column/edit.js +2 -2
  221. package/build-module/column/edit.js.map +1 -1
  222. package/build-module/column/index.js +2 -0
  223. package/build-module/column/index.js.map +1 -1
  224. package/build-module/columns/index.js +2 -2
  225. package/build-module/columns/index.js.map +1 -1
  226. package/build-module/comment-template/index.js +12 -0
  227. package/build-module/comment-template/index.js.map +1 -1
  228. package/build-module/comments-title/deprecated.js +3 -0
  229. package/build-module/comments-title/deprecated.js.map +1 -1
  230. package/build-module/comments-title/edit.js +3 -1
  231. package/build-module/comments-title/edit.js.map +1 -1
  232. package/build-module/comments-title/index.js +3 -0
  233. package/build-module/comments-title/index.js.map +1 -1
  234. package/build-module/cover/edit/inspector-controls.js +2 -1
  235. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  236. package/build-module/details/edit.js +1 -0
  237. package/build-module/details/edit.js.map +1 -1
  238. package/build-module/embed/variations.js +40 -35
  239. package/build-module/embed/variations.js.map +1 -1
  240. package/build-module/footnotes/index.js +1 -1
  241. package/build-module/footnotes/index.js.map +1 -1
  242. package/build-module/form/edit.js +4 -4
  243. package/build-module/form/edit.js.map +1 -1
  244. package/build-module/form-input/edit.js +3 -0
  245. package/build-module/form-input/edit.js.map +1 -1
  246. package/build-module/gallery/edit.js +43 -9
  247. package/build-module/gallery/edit.js.map +1 -1
  248. package/build-module/gallery/gap-styles.js +1 -9
  249. package/build-module/gallery/gap-styles.js.map +1 -1
  250. package/build-module/gallery/index.js +10 -0
  251. package/build-module/gallery/index.js.map +1 -1
  252. package/build-module/gallery/use-image-sizes.js +2 -2
  253. package/build-module/gallery/use-image-sizes.js.map +1 -1
  254. package/build-module/group/deprecated.js +2 -5
  255. package/build-module/group/deprecated.js.map +1 -1
  256. package/build-module/group/index.js +27 -30
  257. package/build-module/group/index.js.map +1 -1
  258. package/build-module/group/variations.js +51 -3
  259. package/build-module/group/variations.js.map +1 -1
  260. package/build-module/heading/edit.js +2 -0
  261. package/build-module/heading/edit.js.map +1 -1
  262. package/build-module/heading/index.js +17 -1
  263. package/build-module/heading/index.js.map +1 -1
  264. package/build-module/image/edit.js +1 -1
  265. package/build-module/image/edit.js.map +1 -1
  266. package/build-module/image/image.js +25 -12
  267. package/build-module/image/image.js.map +1 -1
  268. package/build-module/image/index.js +3 -0
  269. package/build-module/image/index.js.map +1 -1
  270. package/build-module/image/view.js +65 -49
  271. package/build-module/image/view.js.map +1 -1
  272. package/build-module/latest-comments/index.js +9 -0
  273. package/build-module/latest-comments/index.js.map +1 -1
  274. package/build-module/latest-posts/edit.js +1 -0
  275. package/build-module/latest-posts/edit.js.map +1 -1
  276. package/build-module/list/edit.js +3 -3
  277. package/build-module/list/edit.js.map +1 -1
  278. package/build-module/list/index.js +1 -1
  279. package/build-module/list/ordered-list-settings.js +19 -17
  280. package/build-module/list/ordered-list-settings.js.map +1 -1
  281. package/build-module/list-item/edit.js +2 -2
  282. package/build-module/list-item/edit.js.map +1 -1
  283. package/build-module/list-item/hooks/index.js +0 -1
  284. package/build-module/list-item/hooks/index.js.map +1 -1
  285. package/build-module/list-item/index.js +3 -2
  286. package/build-module/list-item/index.js.map +1 -1
  287. package/build-module/loginout/index.js +14 -1
  288. package/build-module/loginout/index.js.map +1 -1
  289. package/build-module/media-text/index.js +12 -0
  290. package/build-module/media-text/index.js.map +1 -1
  291. package/build-module/navigation/edit/index.js +5 -4
  292. package/build-module/navigation/edit/index.js.map +1 -1
  293. package/build-module/navigation/edit/navigation-menu-delete-control.js +1 -0
  294. package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  295. package/build-module/navigation/use-navigation-menu.js +5 -1
  296. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  297. package/build-module/navigation-link/link-ui.js +13 -17
  298. package/build-module/navigation-link/link-ui.js.map +1 -1
  299. package/build-module/navigation-submenu/edit.js +0 -11
  300. package/build-module/navigation-submenu/edit.js.map +1 -1
  301. package/build-module/page-list/edit.js +1 -0
  302. package/build-module/page-list/edit.js.map +1 -1
  303. package/build-module/page-list-item/edit.js +4 -1
  304. package/build-module/page-list-item/edit.js.map +1 -1
  305. package/build-module/paragraph/index.js +6 -0
  306. package/build-module/paragraph/index.js.map +1 -1
  307. package/build-module/paragraph/transforms.js +6 -0
  308. package/build-module/paragraph/transforms.js.map +1 -1
  309. package/build-module/post-author/index.js +8 -0
  310. package/build-module/post-author/index.js.map +1 -1
  311. package/build-module/post-author-biography/index.js +3 -0
  312. package/build-module/post-author-biography/index.js.map +1 -1
  313. package/build-module/post-author-name/index.js +3 -0
  314. package/build-module/post-author-name/index.js.map +1 -1
  315. package/build-module/post-comments-form/index.js +12 -0
  316. package/build-module/post-comments-form/index.js.map +1 -1
  317. package/build-module/post-content/index.js +1 -0
  318. package/build-module/post-content/index.js.map +1 -1
  319. package/build-module/post-date/index.js +15 -0
  320. package/build-module/post-date/index.js.map +1 -1
  321. package/build-module/post-excerpt/edit.js +1 -0
  322. package/build-module/post-excerpt/edit.js.map +1 -1
  323. package/build-module/post-excerpt/index.js +12 -0
  324. package/build-module/post-excerpt/index.js.map +1 -1
  325. package/build-module/post-featured-image/index.js +3 -0
  326. package/build-module/post-featured-image/index.js.map +1 -1
  327. package/build-module/post-navigation-link/edit.js +2 -0
  328. package/build-module/post-navigation-link/edit.js.map +1 -1
  329. package/build-module/post-terms/index.js +15 -0
  330. package/build-module/post-terms/index.js.map +1 -1
  331. package/build-module/post-time-to-read/index.js +6 -0
  332. package/build-module/post-time-to-read/index.js.map +1 -1
  333. package/build-module/post-title/edit.js +9 -3
  334. package/build-module/post-title/edit.js.map +1 -1
  335. package/build-module/post-title/index.js +15 -0
  336. package/build-module/post-title/index.js.map +1 -1
  337. package/build-module/query/edit/inspector-controls/author-control.js +3 -1
  338. package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
  339. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +1 -0
  340. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  341. package/build-module/query/edit/inspector-controls/index.js +92 -14
  342. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  343. package/build-module/query/edit/inspector-controls/offset-controls.js +29 -0
  344. package/build-module/query/edit/inspector-controls/offset-controls.js.map +1 -0
  345. package/build-module/query/edit/inspector-controls/order-control.js +1 -0
  346. package/build-module/query/edit/inspector-controls/order-control.js.map +1 -1
  347. package/build-module/query/edit/inspector-controls/pages-control.js +28 -0
  348. package/build-module/query/edit/inspector-controls/pages-control.js.map +1 -0
  349. package/build-module/query/edit/inspector-controls/parent-control.js +2 -1
  350. package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
  351. package/build-module/query/edit/inspector-controls/per-page-control.js +33 -0
  352. package/build-module/query/edit/inspector-controls/per-page-control.js.map +1 -0
  353. package/build-module/query/edit/inspector-controls/sticky-control.js +2 -1
  354. package/build-module/query/edit/inspector-controls/sticky-control.js.map +1 -1
  355. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +6 -4
  356. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  357. package/build-module/query/edit/query-content.js +11 -2
  358. package/build-module/query/edit/query-content.js.map +1 -1
  359. package/build-module/query/edit/query-placeholder.js +1 -14
  360. package/build-module/query/edit/query-placeholder.js.map +1 -1
  361. package/build-module/query/edit/query-toolbar.js +4 -78
  362. package/build-module/query/edit/query-toolbar.js.map +1 -1
  363. package/build-module/query/utils.js +15 -6
  364. package/build-module/query/utils.js.map +1 -1
  365. package/build-module/query/variations.js +4 -50
  366. package/build-module/query/variations.js.map +1 -1
  367. package/build-module/query-pagination-numbers/edit.js +1 -0
  368. package/build-module/query-pagination-numbers/edit.js.map +1 -1
  369. package/build-module/query-title/edit.js +14 -20
  370. package/build-module/query-title/edit.js.map +1 -1
  371. package/build-module/query-title/index.js +3 -0
  372. package/build-module/query-title/index.js.map +1 -1
  373. package/build-module/query-title/use-archive-label.js +88 -0
  374. package/build-module/query-title/use-archive-label.js.map +1 -0
  375. package/build-module/quote/index.js +15 -1
  376. package/build-module/quote/index.js.map +1 -1
  377. package/build-module/search/index.js +3 -0
  378. package/build-module/search/index.js.map +1 -1
  379. package/build-module/site-logo/edit.js +19 -9
  380. package/build-module/site-logo/edit.js.map +1 -1
  381. package/build-module/site-tagline/edit.js +8 -5
  382. package/build-module/site-tagline/edit.js.map +1 -1
  383. package/build-module/site-tagline/index.js +18 -2
  384. package/build-module/site-tagline/index.js.map +1 -1
  385. package/build-module/site-title/edit.js +6 -3
  386. package/build-module/site-title/edit.js.map +1 -1
  387. package/build-module/site-title/index.js +16 -1
  388. package/build-module/site-title/index.js.map +1 -1
  389. package/build-module/social-link/edit.js +0 -1
  390. package/build-module/social-link/edit.js.map +1 -1
  391. package/build-module/social-link/icons/soundcloud.js +1 -1
  392. package/build-module/social-link/icons/soundcloud.js.map +1 -1
  393. package/build-module/social-links/index.js +12 -0
  394. package/build-module/social-links/index.js.map +1 -1
  395. package/build-module/spacer/controls.js +9 -14
  396. package/build-module/spacer/controls.js.map +1 -1
  397. package/build-module/table-of-contents/index.js +14 -1
  398. package/build-module/table-of-contents/index.js.map +1 -1
  399. package/build-module/tag-cloud/edit.js +43 -34
  400. package/build-module/tag-cloud/edit.js.map +1 -1
  401. package/build-module/tag-cloud/index.js +1 -1
  402. package/build-module/template-part/edit/index.js +8 -5
  403. package/build-module/template-part/edit/index.js.map +1 -1
  404. package/build-module/template-part/edit/inner-blocks.js +11 -4
  405. package/build-module/template-part/edit/inner-blocks.js.map +1 -1
  406. package/build-module/template-part/edit/placeholder.js +23 -3
  407. package/build-module/template-part/edit/placeholder.js.map +1 -1
  408. package/build-module/template-part/edit/title-modal.js +20 -8
  409. package/build-module/template-part/edit/title-modal.js.map +1 -1
  410. package/build-module/term-description/index.js +12 -0
  411. package/build-module/term-description/index.js.map +1 -1
  412. package/build-module/utils/hooks.js +5 -1
  413. package/build-module/utils/hooks.js.map +1 -1
  414. package/build-style/archives/editor-rtl.css +3 -0
  415. package/build-style/archives/editor.css +3 -0
  416. package/build-style/archives/style-rtl.css +3 -0
  417. package/build-style/archives/style.css +3 -0
  418. package/build-style/audio/editor-rtl.css +3 -0
  419. package/build-style/audio/editor.css +3 -0
  420. package/build-style/audio/style-rtl.css +3 -0
  421. package/build-style/audio/style.css +3 -0
  422. package/build-style/audio/theme-rtl.css +3 -0
  423. package/build-style/audio/theme.css +3 -0
  424. package/build-style/avatar/editor-rtl.css +3 -0
  425. package/build-style/avatar/editor.css +3 -0
  426. package/build-style/avatar/style-rtl.css +3 -0
  427. package/build-style/avatar/style.css +3 -0
  428. package/build-style/button/editor-rtl.css +3 -0
  429. package/build-style/button/editor.css +3 -0
  430. package/build-style/button/style-rtl.css +3 -0
  431. package/build-style/button/style.css +3 -0
  432. package/build-style/buttons/editor-rtl.css +3 -0
  433. package/build-style/buttons/editor.css +3 -0
  434. package/build-style/buttons/style-rtl.css +3 -0
  435. package/build-style/buttons/style.css +3 -0
  436. package/build-style/calendar/style-rtl.css +3 -0
  437. package/build-style/calendar/style.css +3 -0
  438. package/build-style/categories/editor-rtl.css +7 -0
  439. package/build-style/categories/editor.css +7 -0
  440. package/build-style/categories/style-rtl.css +7 -0
  441. package/build-style/categories/style.css +7 -0
  442. package/build-style/classic-rtl.css +3 -0
  443. package/build-style/classic.css +3 -0
  444. package/build-style/code/editor-rtl.css +3 -0
  445. package/build-style/code/editor.css +3 -0
  446. package/build-style/code/style-rtl.css +3 -0
  447. package/build-style/code/style.css +3 -0
  448. package/build-style/code/theme-rtl.css +3 -0
  449. package/build-style/code/theme.css +3 -0
  450. package/build-style/columns/editor-rtl.css +3 -0
  451. package/build-style/columns/editor.css +3 -0
  452. package/build-style/columns/style-rtl.css +3 -0
  453. package/build-style/columns/style.css +3 -0
  454. package/build-style/comment-author-avatar/editor-rtl.css +3 -0
  455. package/build-style/comment-author-avatar/editor.css +3 -0
  456. package/build-style/comment-content/style-rtl.css +3 -0
  457. package/build-style/comment-content/style.css +3 -0
  458. package/build-style/comment-template/style-rtl.css +3 -0
  459. package/build-style/comment-template/style.css +3 -0
  460. package/build-style/comments/editor-rtl.css +3 -0
  461. package/build-style/comments/editor.css +3 -0
  462. package/build-style/comments/style-rtl.css +3 -0
  463. package/build-style/comments/style.css +3 -0
  464. package/build-style/comments-pagination/editor-rtl.css +3 -0
  465. package/build-style/comments-pagination/editor.css +3 -0
  466. package/build-style/comments-pagination/style-rtl.css +3 -0
  467. package/build-style/comments-pagination/style.css +3 -0
  468. package/build-style/comments-pagination-numbers/editor-rtl.css +3 -0
  469. package/build-style/comments-pagination-numbers/editor.css +3 -0
  470. package/build-style/comments-title/editor-rtl.css +3 -0
  471. package/build-style/comments-title/editor.css +3 -0
  472. package/build-style/common-rtl.css +3 -0
  473. package/build-style/common.css +3 -0
  474. package/build-style/cover/editor-rtl.css +3 -0
  475. package/build-style/cover/editor.css +3 -0
  476. package/build-style/cover/style-rtl.css +3 -0
  477. package/build-style/cover/style.css +3 -0
  478. package/build-style/details/editor-rtl.css +3 -0
  479. package/build-style/details/editor.css +3 -0
  480. package/build-style/details/style-rtl.css +3 -0
  481. package/build-style/details/style.css +3 -0
  482. package/build-style/editor-elements-rtl.css +3 -0
  483. package/build-style/editor-elements.css +3 -0
  484. package/build-style/editor-rtl.css +29 -42
  485. package/build-style/editor.css +29 -42
  486. package/build-style/elements-rtl.css +3 -0
  487. package/build-style/elements.css +3 -0
  488. package/build-style/embed/editor-rtl.css +3 -0
  489. package/build-style/embed/editor.css +3 -0
  490. package/build-style/embed/style-rtl.css +3 -0
  491. package/build-style/embed/style.css +3 -0
  492. package/build-style/embed/theme-rtl.css +3 -0
  493. package/build-style/embed/theme.css +3 -0
  494. package/build-style/file/editor-rtl.css +3 -0
  495. package/build-style/file/editor.css +3 -0
  496. package/build-style/file/style-rtl.css +3 -0
  497. package/build-style/file/style.css +3 -0
  498. package/build-style/footnotes/style-rtl.css +3 -0
  499. package/build-style/footnotes/style.css +3 -0
  500. package/build-style/form-input/editor-rtl.css +3 -0
  501. package/build-style/form-input/editor.css +3 -0
  502. package/build-style/form-input/style-rtl.css +4 -0
  503. package/build-style/form-input/style.css +4 -0
  504. package/build-style/form-submission-notification/editor-rtl.css +3 -0
  505. package/build-style/form-submission-notification/editor.css +3 -0
  506. package/build-style/form-submit-button/style-rtl.css +3 -0
  507. package/build-style/form-submit-button/style.css +3 -0
  508. package/build-style/freeform/editor-rtl.css +3 -0
  509. package/build-style/freeform/editor.css +3 -0
  510. package/build-style/gallery/editor-rtl.css +3 -1
  511. package/build-style/gallery/editor.css +3 -1
  512. package/build-style/gallery/style-rtl.css +3 -0
  513. package/build-style/gallery/style.css +3 -0
  514. package/build-style/gallery/theme-rtl.css +3 -0
  515. package/build-style/gallery/theme.css +3 -0
  516. package/build-style/group/editor-rtl.css +3 -11
  517. package/build-style/group/editor.css +3 -11
  518. package/build-style/group/style-rtl.css +3 -0
  519. package/build-style/group/style.css +3 -0
  520. package/build-style/group/theme-rtl.css +3 -0
  521. package/build-style/group/theme.css +3 -0
  522. package/build-style/heading/style-rtl.css +3 -0
  523. package/build-style/heading/style.css +3 -0
  524. package/build-style/html/editor-rtl.css +3 -0
  525. package/build-style/html/editor.css +3 -0
  526. package/build-style/image/editor-rtl.css +19 -4
  527. package/build-style/image/editor.css +19 -4
  528. package/build-style/image/style-rtl.css +22 -0
  529. package/build-style/image/style.css +22 -0
  530. package/build-style/image/theme-rtl.css +3 -0
  531. package/build-style/image/theme.css +3 -0
  532. package/build-style/latest-comments/style-rtl.css +3 -0
  533. package/build-style/latest-comments/style.css +3 -0
  534. package/build-style/latest-posts/editor-rtl.css +3 -3
  535. package/build-style/latest-posts/editor.css +3 -3
  536. package/build-style/latest-posts/style-rtl.css +3 -0
  537. package/build-style/latest-posts/style.css +3 -0
  538. package/build-style/list/style-rtl.css +4 -1
  539. package/build-style/list/style.css +4 -1
  540. package/build-style/loginout/style-rtl.css +94 -0
  541. package/build-style/loginout/style.css +94 -0
  542. package/build-style/media-text/editor-rtl.css +3 -0
  543. package/build-style/media-text/editor.css +3 -0
  544. package/build-style/media-text/style-rtl.css +3 -0
  545. package/build-style/media-text/style.css +3 -0
  546. package/build-style/more/editor-rtl.css +3 -0
  547. package/build-style/more/editor.css +3 -0
  548. package/build-style/navigation/editor-rtl.css +3 -12
  549. package/build-style/navigation/editor.css +3 -12
  550. package/build-style/navigation/style-rtl.css +4 -4
  551. package/build-style/navigation/style.css +4 -4
  552. package/build-style/navigation-link/editor-rtl.css +3 -0
  553. package/build-style/navigation-link/editor.css +3 -0
  554. package/build-style/navigation-link/style-rtl.css +3 -0
  555. package/build-style/navigation-link/style.css +3 -0
  556. package/build-style/navigation-submenu/editor-rtl.css +3 -0
  557. package/build-style/navigation-submenu/editor.css +3 -0
  558. package/build-style/nextpage/editor-rtl.css +3 -0
  559. package/build-style/nextpage/editor.css +3 -0
  560. package/build-style/page-list/editor-rtl.css +3 -0
  561. package/build-style/page-list/editor.css +3 -0
  562. package/build-style/page-list/style-rtl.css +3 -0
  563. package/build-style/page-list/style.css +3 -0
  564. package/build-style/paragraph/editor-rtl.css +3 -0
  565. package/build-style/paragraph/editor.css +3 -0
  566. package/build-style/paragraph/style-rtl.css +3 -0
  567. package/build-style/paragraph/style.css +3 -0
  568. package/build-style/post-author/style-rtl.css +3 -0
  569. package/build-style/post-author/style.css +3 -0
  570. package/build-style/post-comments-form/editor-rtl.css +3 -0
  571. package/build-style/post-comments-form/editor.css +3 -0
  572. package/build-style/post-comments-form/style-rtl.css +4 -1
  573. package/build-style/post-comments-form/style.css +4 -1
  574. package/build-style/post-content/editor-rtl.css +3 -0
  575. package/build-style/post-content/editor.css +3 -0
  576. package/build-style/post-content/style-rtl.css +96 -0
  577. package/build-style/post-content/style.css +96 -0
  578. package/build-style/post-date/style-rtl.css +3 -0
  579. package/build-style/post-date/style.css +3 -0
  580. package/build-style/post-excerpt/editor-rtl.css +3 -0
  581. package/build-style/post-excerpt/editor.css +3 -0
  582. package/build-style/post-excerpt/style-rtl.css +4 -0
  583. package/build-style/post-excerpt/style.css +4 -0
  584. package/build-style/post-featured-image/editor-rtl.css +3 -0
  585. package/build-style/post-featured-image/editor.css +3 -0
  586. package/build-style/post-featured-image/style-rtl.css +3 -0
  587. package/build-style/post-featured-image/style.css +3 -0
  588. package/build-style/post-navigation-link/style-rtl.css +3 -0
  589. package/build-style/post-navigation-link/style.css +3 -0
  590. package/build-style/post-template/editor-rtl.css +3 -0
  591. package/build-style/post-template/editor.css +3 -0
  592. package/build-style/post-template/style-rtl.css +3 -0
  593. package/build-style/post-template/style.css +3 -0
  594. package/build-style/post-terms/style-rtl.css +3 -0
  595. package/build-style/post-terms/style.css +3 -0
  596. package/build-style/post-time-to-read/style-rtl.css +3 -0
  597. package/build-style/post-time-to-read/style.css +3 -0
  598. package/build-style/post-title/style-rtl.css +3 -0
  599. package/build-style/post-title/style.css +3 -0
  600. package/build-style/preformatted/style-rtl.css +3 -0
  601. package/build-style/preformatted/style.css +3 -0
  602. package/build-style/pullquote/editor-rtl.css +3 -0
  603. package/build-style/pullquote/editor.css +3 -0
  604. package/build-style/pullquote/style-rtl.css +3 -0
  605. package/build-style/pullquote/style.css +3 -0
  606. package/build-style/pullquote/theme-rtl.css +3 -0
  607. package/build-style/pullquote/theme.css +3 -0
  608. package/build-style/query/editor-rtl.css +3 -7
  609. package/build-style/query/editor.css +3 -7
  610. package/build-style/query-pagination/editor-rtl.css +3 -0
  611. package/build-style/query-pagination/editor.css +3 -0
  612. package/build-style/query-pagination/style-rtl.css +3 -0
  613. package/build-style/query-pagination/style.css +3 -0
  614. package/build-style/query-pagination-numbers/editor-rtl.css +3 -0
  615. package/build-style/query-pagination-numbers/editor.css +3 -0
  616. package/build-style/query-title/style-rtl.css +3 -0
  617. package/build-style/query-title/style.css +3 -0
  618. package/build-style/quote/style-rtl.css +3 -0
  619. package/build-style/quote/style.css +3 -0
  620. package/build-style/quote/theme-rtl.css +6 -3
  621. package/build-style/quote/theme.css +6 -3
  622. package/build-style/read-more/style-rtl.css +3 -0
  623. package/build-style/read-more/style.css +3 -0
  624. package/build-style/reset-rtl.css +3 -0
  625. package/build-style/reset.css +3 -0
  626. package/build-style/rss/editor-rtl.css +3 -0
  627. package/build-style/rss/editor.css +3 -0
  628. package/build-style/rss/style-rtl.css +3 -0
  629. package/build-style/rss/style.css +3 -0
  630. package/build-style/search/editor-rtl.css +4 -1
  631. package/build-style/search/editor.css +4 -1
  632. package/build-style/search/style-rtl.css +3 -0
  633. package/build-style/search/style.css +3 -0
  634. package/build-style/search/theme-rtl.css +3 -0
  635. package/build-style/search/theme.css +3 -0
  636. package/build-style/separator/editor-rtl.css +3 -0
  637. package/build-style/separator/editor.css +3 -0
  638. package/build-style/separator/style-rtl.css +3 -0
  639. package/build-style/separator/style.css +3 -0
  640. package/build-style/separator/theme-rtl.css +3 -0
  641. package/build-style/separator/theme.css +3 -0
  642. package/build-style/shortcode/editor-rtl.css +3 -0
  643. package/build-style/shortcode/editor.css +3 -0
  644. package/build-style/site-logo/editor-rtl.css +3 -0
  645. package/build-style/site-logo/editor.css +3 -0
  646. package/build-style/site-logo/style-rtl.css +3 -0
  647. package/build-style/site-logo/style.css +3 -0
  648. package/build-style/site-tagline/editor-rtl.css +3 -0
  649. package/build-style/site-tagline/editor.css +3 -0
  650. package/build-style/site-tagline/style-rtl.css +94 -0
  651. package/build-style/site-tagline/style.css +94 -0
  652. package/build-style/site-title/editor-rtl.css +3 -0
  653. package/build-style/site-title/editor.css +3 -0
  654. package/build-style/site-title/style-rtl.css +7 -1
  655. package/build-style/site-title/style.css +7 -1
  656. package/build-style/social-link/editor-rtl.css +3 -0
  657. package/build-style/social-link/editor.css +3 -0
  658. package/build-style/social-links/editor-rtl.css +3 -0
  659. package/build-style/social-links/editor.css +3 -0
  660. package/build-style/social-links/style-rtl.css +5 -2
  661. package/build-style/social-links/style.css +5 -2
  662. package/build-style/spacer/editor-rtl.css +3 -0
  663. package/build-style/spacer/editor.css +3 -0
  664. package/build-style/spacer/style-rtl.css +3 -0
  665. package/build-style/spacer/style.css +3 -0
  666. package/build-style/style-rtl.css +56 -9
  667. package/build-style/style.css +56 -9
  668. package/build-style/table/editor-rtl.css +3 -0
  669. package/build-style/table/editor.css +3 -0
  670. package/build-style/table/style-rtl.css +3 -0
  671. package/build-style/table/style.css +3 -0
  672. package/build-style/table/theme-rtl.css +3 -0
  673. package/build-style/table/theme.css +3 -0
  674. package/build-style/table-of-contents/style-rtl.css +94 -0
  675. package/build-style/table-of-contents/style.css +94 -0
  676. package/build-style/tag-cloud/editor-rtl.css +95 -0
  677. package/build-style/tag-cloud/editor.css +95 -0
  678. package/build-style/tag-cloud/style-rtl.css +3 -0
  679. package/build-style/tag-cloud/style.css +3 -0
  680. package/build-style/template-part/editor-rtl.css +3 -0
  681. package/build-style/template-part/editor.css +3 -0
  682. package/build-style/template-part/theme-rtl.css +3 -0
  683. package/build-style/template-part/theme.css +3 -0
  684. package/build-style/term-description/style-rtl.css +4 -0
  685. package/build-style/term-description/style.css +4 -0
  686. package/build-style/text-columns/editor-rtl.css +3 -0
  687. package/build-style/text-columns/editor.css +3 -0
  688. package/build-style/text-columns/style-rtl.css +3 -0
  689. package/build-style/text-columns/style.css +3 -0
  690. package/build-style/theme-rtl.css +6 -3
  691. package/build-style/theme.css +6 -3
  692. package/build-style/verse/style-rtl.css +3 -0
  693. package/build-style/verse/style.css +3 -0
  694. package/build-style/video/editor-rtl.css +3 -3
  695. package/build-style/video/editor.css +3 -3
  696. package/build-style/video/style-rtl.css +3 -0
  697. package/build-style/video/style.css +3 -0
  698. package/build-style/video/theme-rtl.css +3 -0
  699. package/build-style/video/theme.css +3 -0
  700. package/package.json +35 -35
  701. package/src/avatar/edit.js +1 -0
  702. package/src/block/edit.js +58 -27
  703. package/src/block/test/edit.native.js +6 -2
  704. package/src/button/edit.js +1 -1
  705. package/src/button/index.php +1 -14
  706. package/src/buttons/block.json +20 -0
  707. package/src/buttons/index.js +6 -0
  708. package/src/categories/block.json +20 -0
  709. package/src/categories/edit.js +32 -4
  710. package/src/categories/editor.scss +4 -0
  711. package/src/categories/index.php +4 -1
  712. package/src/categories/style.scss +4 -0
  713. package/src/column/block.json +2 -0
  714. package/src/column/edit.js +2 -2
  715. package/src/columns/index.js +1 -1
  716. package/src/comment-template/block.json +12 -0
  717. package/src/comments-title/block.json +3 -0
  718. package/src/comments-title/edit.js +8 -1
  719. package/src/cover/edit/inspector-controls.js +1 -0
  720. package/src/details/edit.js +1 -0
  721. package/src/editor.scss +1 -0
  722. package/src/embed/test/__snapshots__/index.native.js.snap +8 -8
  723. package/src/embed/test/index.js +1 -1
  724. package/src/embed/test/index.native.js +24 -23
  725. package/src/embed/variations.js +43 -35
  726. package/src/footnotes/index.js +1 -2
  727. package/src/form/edit.js +3 -2
  728. package/src/form-input/edit.js +3 -0
  729. package/src/form-input/style.scss +1 -0
  730. package/src/gallery/block.json +10 -0
  731. package/src/gallery/edit.js +75 -13
  732. package/src/gallery/editor.scss +0 -1
  733. package/src/gallery/gap-styles.js +1 -8
  734. package/src/gallery/test/__snapshots__/index.native.js.snap +1 -1
  735. package/src/gallery/test/index.native.js +5 -5
  736. package/src/gallery/use-image-sizes.js +2 -2
  737. package/src/group/deprecated.js +3 -7
  738. package/src/group/editor.scss +1 -1
  739. package/src/group/index.js +26 -29
  740. package/src/group/variations.js +56 -0
  741. package/src/heading/block.json +15 -0
  742. package/src/heading/edit.js +3 -1
  743. package/src/heading/index.js +1 -0
  744. package/src/image/block.json +3 -0
  745. package/src/image/edit.js +1 -1
  746. package/src/image/editor.scss +18 -1
  747. package/src/image/image.js +55 -35
  748. package/src/image/index.php +32 -15
  749. package/src/image/style.scss +22 -0
  750. package/src/image/test/edit.native.js +1 -0
  751. package/src/image/view.js +69 -49
  752. package/src/latest-comments/block.json +9 -0
  753. package/src/latest-posts/edit.js +1 -0
  754. package/src/latest-posts/editor.scss +0 -4
  755. package/src/list/block.json +1 -1
  756. package/src/list/edit.js +3 -3
  757. package/src/list/ordered-list-settings.js +20 -18
  758. package/src/list/style.scss +1 -1
  759. package/src/list/test/edit.native.js +1 -3
  760. package/src/list-item/block.json +3 -2
  761. package/src/list-item/edit.js +2 -2
  762. package/src/list-item/hooks/index.js +0 -1
  763. package/src/loginout/block.json +14 -1
  764. package/src/loginout/style.scss +4 -0
  765. package/src/media-text/block.json +12 -0
  766. package/src/media-text/style.native.scss +2 -0
  767. package/src/navigation/edit/index.js +5 -5
  768. package/src/navigation/edit/navigation-menu-delete-control.js +1 -0
  769. package/src/navigation/editor.scss +0 -1
  770. package/src/navigation/index.php +1 -1
  771. package/src/navigation/style.scss +4 -9
  772. package/src/navigation/test/use-navigation-menu.js +54 -15
  773. package/src/navigation/use-navigation-menu.js +5 -1
  774. package/src/navigation-link/link-ui.js +8 -14
  775. package/src/navigation-submenu/edit.js +1 -13
  776. package/src/page-list/edit.js +1 -0
  777. package/src/page-list-item/edit.js +4 -4
  778. package/src/paragraph/block.json +6 -0
  779. package/src/post-author/index.js +8 -0
  780. package/src/post-author-biography/block.json +3 -0
  781. package/src/post-author-name/block.json +3 -0
  782. package/src/post-comments-form/block.json +12 -0
  783. package/src/post-comments-form/style.scss +1 -1
  784. package/src/post-content/block.json +1 -0
  785. package/src/post-content/style.scss +5 -0
  786. package/src/post-date/block.json +15 -0
  787. package/src/post-excerpt/block.json +12 -0
  788. package/src/post-excerpt/edit.js +1 -0
  789. package/src/post-excerpt/style.scss +3 -0
  790. package/src/post-featured-image/block.json +3 -0
  791. package/src/post-navigation-link/edit.js +2 -0
  792. package/src/post-terms/block.json +15 -0
  793. package/src/post-time-to-read/block.json +6 -0
  794. package/src/post-title/block.json +15 -0
  795. package/src/post-title/edit.js +9 -8
  796. package/src/query/edit/inspector-controls/author-control.js +2 -0
  797. package/src/query/edit/inspector-controls/enhanced-pagination-control.js +1 -0
  798. package/src/query/edit/inspector-controls/index.js +123 -23
  799. package/src/query/edit/inspector-controls/offset-controls.js +31 -0
  800. package/src/query/edit/inspector-controls/order-control.js +1 -0
  801. package/src/query/edit/inspector-controls/pages-control.js +27 -0
  802. package/src/query/edit/inspector-controls/parent-control.js +1 -0
  803. package/src/query/edit/inspector-controls/per-page-control.js +33 -0
  804. package/src/query/edit/inspector-controls/sticky-control.js +2 -1
  805. package/src/query/edit/inspector-controls/taxonomy-controls.js +8 -3
  806. package/src/query/edit/query-content.js +17 -3
  807. package/src/query/edit/query-placeholder.js +1 -21
  808. package/src/query/edit/query-toolbar.js +1 -90
  809. package/src/query/editor.scss +0 -9
  810. package/src/query/utils.js +13 -5
  811. package/src/query/variations.js +4 -46
  812. package/src/query-pagination-numbers/edit.js +1 -0
  813. package/src/query-title/block.json +3 -0
  814. package/src/query-title/edit.js +19 -18
  815. package/src/query-title/use-archive-label.js +99 -0
  816. package/src/quote/block.json +15 -1
  817. package/src/quote/theme.scss +5 -3
  818. package/src/search/block.json +3 -0
  819. package/src/search/editor.scss +1 -1
  820. package/src/site-logo/edit.js +27 -10
  821. package/src/site-tagline/block.json +18 -2
  822. package/src/site-tagline/edit.js +7 -6
  823. package/src/site-tagline/style.scss +4 -0
  824. package/src/site-title/block.json +10 -0
  825. package/src/site-title/edit.js +6 -5
  826. package/src/site-title/index.js +6 -1
  827. package/src/site-title/style.scss +7 -2
  828. package/src/social-link/edit.js +0 -1
  829. package/src/social-link/icons/soundcloud.js +1 -1
  830. package/src/social-link/socials-with-bg.scss +1 -1
  831. package/src/social-link/socials-without-bg.scss +1 -1
  832. package/src/social-links/block.json +12 -0
  833. package/src/spacer/controls.js +10 -13
  834. package/src/style.scss +4 -0
  835. package/src/table-of-contents/block.json +14 -1
  836. package/src/table-of-contents/style.scss +4 -0
  837. package/src/tag-cloud/block.json +1 -1
  838. package/src/tag-cloud/edit.js +53 -35
  839. package/src/tag-cloud/editor.scss +9 -0
  840. package/src/template-part/edit/index.js +10 -5
  841. package/src/template-part/edit/inner-blocks.js +11 -6
  842. package/src/template-part/edit/placeholder.js +31 -6
  843. package/src/template-part/edit/title-modal.js +18 -4
  844. package/src/term-description/block.json +12 -0
  845. package/src/term-description/style.scss +2 -0
  846. package/src/utils/hooks.js +5 -1
  847. package/src/video/editor.scss +0 -4
  848. package/tsconfig.tsbuildinfo +1 -1
  849. package/build/list-item/hooks/use-split.js +0 -39
  850. package/build/list-item/hooks/use-split.js.map +0 -1
  851. package/build-module/list-item/hooks/use-split.js +0 -32
  852. package/build-module/list-item/hooks/use-split.js.map +0 -1
  853. package/src/list-item/hooks/use-split.js +0 -33
@@ -1 +1 @@
1
- {"version":3,"names":["_interactivity","require","isTouching","lastTouchTime","imageRef","buttonRef","state","actions","callbacks","store","currentImage","overlayOpened","currentSrc","roleAttribute","ariaModal","enlargedSrc","uploadedSrc","imgStyles","replace","showLightbox","ctx","getContext","complete","scrollTopReset","document","documentElement","scrollTop","scrollLeftReset","scrollLeft","overlayEnabled","setOverlayStyles","hideLightbox","setTimeout","focus","preventScroll","showClosingAnimation","handleKeydown","event","key","preventDefault","ref","getElement","querySelector","handleTouchMove","handleTouchStart","handleTouchEnd","Date","now","handleScroll","window","scrollTo","naturalWidth","naturalHeight","offsetWidth","originalWidth","offsetHeight","originalHeight","x","screenPosX","y","screenPosY","getBoundingClientRect","naturalRatio","originalRatio","scaleAttr","heightWithoutSpace","widthWithoutSpace","imgMaxWidth","parseFloat","targetWidth","imgMaxHeight","targetHeight","imgRatio","containerMaxWidth","containerMaxHeight","containerWidth","containerHeight","toFixed","reducedHeight","reducedWidth","horizontalPadding","innerWidth","verticalPadding","targetMaxWidth","Math","min","targetMaxHeight","innerHeight","targetContainerRatio","containerScale","lightboxImgWidth","lightboxImgHeight","overlayStyles","clientWidth","setButtonStyles","figure","parentElement","figureWidth","figureHeight","clientHeight","caption","captionComputedStyle","getComputedStyle","includes","position","marginTop","marginBottom","buttonOffsetTop","buttonOffsetRight","offsetRatio","referenceHeight","imageButtonTop","imageButtonRight","referenceWidth","setOverlayFocus","initTriggerButton","lock"],"sources":["@wordpress/block-library/src/image/view.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store, getContext, getElement } from '@wordpress/interactivity';\n\n/**\n * Tracks whether user is touching screen; used to differentiate behavior for\n * touch and mouse input.\n *\n * @type {boolean}\n */\nlet isTouching = false;\n\n/**\n * Tracks the last time the screen was touched; used to differentiate behavior\n * for touch and mouse input.\n *\n * @type {number}\n */\nlet lastTouchTime = 0;\n\n/**\n * Stores the image reference of the currently opened lightbox.\n *\n * @type {HTMLElement}\n */\nlet imageRef;\n\n/**\n * Stores the button reference of the currently opened lightbox.\n *\n * @type {HTMLElement}\n */\nlet buttonRef;\n\nconst { state, actions, callbacks } = store(\n\t'core/image',\n\t{\n\t\tstate: {\n\t\t\tcurrentImage: {},\n\t\t\tget overlayOpened() {\n\t\t\t\treturn state.currentImage.currentSrc;\n\t\t\t},\n\t\t\tget roleAttribute() {\n\t\t\t\treturn state.overlayOpened ? 'dialog' : null;\n\t\t\t},\n\t\t\tget ariaModal() {\n\t\t\t\treturn state.overlayOpened ? 'true' : null;\n\t\t\t},\n\t\t\tget enlargedSrc() {\n\t\t\t\treturn (\n\t\t\t\t\tstate.currentImage.uploadedSrc ||\n\t\t\t\t\t'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs='\n\t\t\t\t);\n\t\t\t},\n\t\t\tget imgStyles() {\n\t\t\t\treturn (\n\t\t\t\t\tstate.overlayOpened &&\n\t\t\t\t\t`${ state.currentImage.imgStyles?.replace(\n\t\t\t\t\t\t/;$/,\n\t\t\t\t\t\t''\n\t\t\t\t\t) }; object-fit:cover;`\n\t\t\t\t);\n\t\t\t},\n\t\t},\n\t\tactions: {\n\t\t\tshowLightbox() {\n\t\t\t\tconst ctx = getContext();\n\n\t\t\t\t// Bails out if the image has not loaded yet.\n\t\t\t\tif ( ! ctx.imageRef?.complete ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Stores the positons of the scroll to fix it until the overlay is\n\t\t\t\t// closed.\n\t\t\t\tstate.scrollTopReset = document.documentElement.scrollTop;\n\t\t\t\tstate.scrollLeftReset = document.documentElement.scrollLeft;\n\n\t\t\t\t// Moves the information of the expaned image to the state.\n\t\t\t\tctx.currentSrc = ctx.imageRef.currentSrc;\n\t\t\t\timageRef = ctx.imageRef;\n\t\t\t\tbuttonRef = ctx.buttonRef;\n\t\t\t\tstate.currentImage = ctx;\n\t\t\t\tstate.overlayEnabled = true;\n\n\t\t\t\t// Computes the styles of the overlay for the animation.\n\t\t\t\tcallbacks.setOverlayStyles();\n\t\t\t},\n\t\t\thideLightbox() {\n\t\t\t\tif ( state.overlayEnabled ) {\n\t\t\t\t\t// Waits until the close animation has completed before allowing a\n\t\t\t\t\t// user to scroll again. The duration of this animation is defined in\n\t\t\t\t\t// the `styles.scss` file, but in any case we should wait a few\n\t\t\t\t\t// milliseconds longer than the duration, otherwise a user may scroll\n\t\t\t\t\t// too soon and cause the animation to look sloppy.\n\t\t\t\t\tsetTimeout( function () {\n\t\t\t\t\t\t// Delays before changing the focus. Otherwise the focus ring will\n\t\t\t\t\t\t// appear on Firefox before the image has finished animating, which\n\t\t\t\t\t\t// looks broken.\n\t\t\t\t\t\tbuttonRef.focus( {\n\t\t\t\t\t\t\tpreventScroll: true,\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t// Resets the current image to mark the overlay as closed.\n\t\t\t\t\t\tstate.currentImage = {};\n\t\t\t\t\t\timageRef = null;\n\t\t\t\t\t\tbuttonRef = null;\n\t\t\t\t\t}, 450 );\n\n\t\t\t\t\t// Starts the overlay closing animation. The showClosingAnimation\n\t\t\t\t\t// class is used to avoid showing it on page load.\n\t\t\t\t\tstate.showClosingAnimation = true;\n\t\t\t\t\tstate.overlayEnabled = false;\n\t\t\t\t}\n\t\t\t},\n\t\t\thandleKeydown( event ) {\n\t\t\t\tif ( state.overlayEnabled ) {\n\t\t\t\t\t// Focuses the close button when the user presses the tab key.\n\t\t\t\t\tif ( event.key === 'Tab' ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tconst { ref } = getElement();\n\t\t\t\t\t\tref.querySelector( 'button' ).focus();\n\t\t\t\t\t}\n\t\t\t\t\t// Closes the lightbox when the user presses the escape key.\n\t\t\t\t\tif ( event.key === 'Escape' ) {\n\t\t\t\t\t\tactions.hideLightbox();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\thandleTouchMove( event ) {\n\t\t\t\t// On mobile devices, prevents triggering the scroll event because\n\t\t\t\t// otherwise the page jumps around when it resets the scroll position.\n\t\t\t\t// This also means that closing the lightbox requires that a user\n\t\t\t\t// perform a simple tap. This may be changed in the future if there is a\n\t\t\t\t// better alternative to override or reset the scroll position during\n\t\t\t\t// swipe actions.\n\t\t\t\tif ( state.overlayEnabled ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t},\n\t\t\thandleTouchStart() {\n\t\t\t\tisTouching = true;\n\t\t\t},\n\t\t\thandleTouchEnd() {\n\t\t\t\t// Waits a few milliseconds before resetting to ensure that pinch to\n\t\t\t\t// zoom works consistently on mobile devices when the lightbox is open.\n\t\t\t\tlastTouchTime = Date.now();\n\t\t\t\tisTouching = false;\n\t\t\t},\n\t\t\thandleScroll() {\n\t\t\t\t// Prevents scrolling behaviors that trigger content shift while the\n\t\t\t\t// lightbox is open. It would be better to accomplish through CSS alone,\n\t\t\t\t// but using overflow: hidden is currently the only way to do so and\n\t\t\t\t// that causes a layout to shift and prevents the zoom animation from\n\t\t\t\t// working in some cases because it's not possible to account for the\n\t\t\t\t// layout shift when doing the animation calculations. Instead, it uses\n\t\t\t\t// JavaScript to prevent and reset the scrolling behavior.\n\t\t\t\tif ( state.overlayOpened ) {\n\t\t\t\t\t// Avoids overriding the scroll behavior on mobile devices because\n\t\t\t\t\t// doing so breaks the pinch to zoom functionality, and users should\n\t\t\t\t\t// be able to zoom in further on the high-res image.\n\t\t\t\t\tif ( ! isTouching && Date.now() - lastTouchTime > 450 ) {\n\t\t\t\t\t\t// It doesn't rely on `event.preventDefault()` to prevent scrolling\n\t\t\t\t\t\t// because the scroll event can't be canceled, so it resets the\n\t\t\t\t\t\t// position instead.\n\t\t\t\t\t\twindow.scrollTo(\n\t\t\t\t\t\t\tstate.scrollLeftReset,\n\t\t\t\t\t\t\tstate.scrollTopReset\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\tcallbacks: {\n\t\t\tsetOverlayStyles() {\n\t\t\t\tif ( ! imageRef ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet {\n\t\t\t\t\tnaturalWidth,\n\t\t\t\t\tnaturalHeight,\n\t\t\t\t\toffsetWidth: originalWidth,\n\t\t\t\t\toffsetHeight: originalHeight,\n\t\t\t\t} = imageRef;\n\t\t\t\tlet { x: screenPosX, y: screenPosY } =\n\t\t\t\t\timageRef.getBoundingClientRect();\n\n\t\t\t\t// Natural ratio of the image clicked to open the lightbox.\n\t\t\t\tconst naturalRatio = naturalWidth / naturalHeight;\n\t\t\t\t// Original ratio of the image clicked to open the lightbox.\n\t\t\t\tlet originalRatio = originalWidth / originalHeight;\n\n\t\t\t\t// If it has object-fit: contain, recalculates the original sizes\n\t\t\t\t// and the screen position without the blank spaces.\n\t\t\t\tif ( state.currentImage.scaleAttr === 'contain' ) {\n\t\t\t\t\tif ( naturalRatio > originalRatio ) {\n\t\t\t\t\t\tconst heightWithoutSpace = originalWidth / naturalRatio;\n\t\t\t\t\t\t// Recalculates screen position without the top space.\n\t\t\t\t\t\tscreenPosY +=\n\t\t\t\t\t\t\t( originalHeight - heightWithoutSpace ) / 2;\n\t\t\t\t\t\toriginalHeight = heightWithoutSpace;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst widthWithoutSpace = originalHeight * naturalRatio;\n\t\t\t\t\t\t// Recalculates screen position without the left space.\n\t\t\t\t\t\tscreenPosX += ( originalWidth - widthWithoutSpace ) / 2;\n\t\t\t\t\t\toriginalWidth = widthWithoutSpace;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toriginalRatio = originalWidth / originalHeight;\n\n\t\t\t\t// Typically, it uses the image's full-sized dimensions. If those\n\t\t\t\t// dimensions have not been set (i.e. an external image with only one\n\t\t\t\t// size), the image's dimensions in the lightbox are the same\n\t\t\t\t// as those of the image in the content.\n\t\t\t\tlet imgMaxWidth = parseFloat(\n\t\t\t\t\tstate.currentImage.targetWidth !== 'none'\n\t\t\t\t\t\t? state.currentImage.targetWidth\n\t\t\t\t\t\t: naturalWidth\n\t\t\t\t);\n\t\t\t\tlet imgMaxHeight = parseFloat(\n\t\t\t\t\tstate.currentImage.targetHeight !== 'none'\n\t\t\t\t\t\t? state.currentImage.targetHeight\n\t\t\t\t\t\t: naturalHeight\n\t\t\t\t);\n\n\t\t\t\t// Ratio of the biggest image stored in the database.\n\t\t\t\tlet imgRatio = imgMaxWidth / imgMaxHeight;\n\t\t\t\tlet containerMaxWidth = imgMaxWidth;\n\t\t\t\tlet containerMaxHeight = imgMaxHeight;\n\t\t\t\tlet containerWidth = imgMaxWidth;\n\t\t\t\tlet containerHeight = imgMaxHeight;\n\t\t\t\t// Checks if the target image has a different ratio than the original\n\t\t\t\t// one (thumbnail). Recalculates the width and height.\n\t\t\t\tif ( naturalRatio.toFixed( 2 ) !== imgRatio.toFixed( 2 ) ) {\n\t\t\t\t\tif ( naturalRatio > imgRatio ) {\n\t\t\t\t\t\t// If the width is reached before the height, it keeps the maxWidth\n\t\t\t\t\t\t// and recalculates the height unless the difference between the\n\t\t\t\t\t\t// maxHeight and the reducedHeight is higher than the maxWidth,\n\t\t\t\t\t\t// where it keeps the reducedHeight and recalculate the width.\n\t\t\t\t\t\tconst reducedHeight = imgMaxWidth / naturalRatio;\n\t\t\t\t\t\tif ( imgMaxHeight - reducedHeight > imgMaxWidth ) {\n\t\t\t\t\t\t\timgMaxHeight = reducedHeight;\n\t\t\t\t\t\t\timgMaxWidth = reducedHeight * naturalRatio;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\timgMaxHeight = imgMaxWidth / naturalRatio;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If the height is reached before the width, it keeps the maxHeight\n\t\t\t\t\t\t// and recalculate the width unlesss the difference between the\n\t\t\t\t\t\t// maxWidth and the reducedWidth is higher than the maxHeight, where\n\t\t\t\t\t\t// it keeps the reducedWidth and recalculate the height.\n\t\t\t\t\t\tconst reducedWidth = imgMaxHeight * naturalRatio;\n\t\t\t\t\t\tif ( imgMaxWidth - reducedWidth > imgMaxHeight ) {\n\t\t\t\t\t\t\timgMaxWidth = reducedWidth;\n\t\t\t\t\t\t\timgMaxHeight = reducedWidth / naturalRatio;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\timgMaxWidth = imgMaxHeight * naturalRatio;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcontainerWidth = imgMaxWidth;\n\t\t\t\t\tcontainerHeight = imgMaxHeight;\n\t\t\t\t\timgRatio = imgMaxWidth / imgMaxHeight;\n\n\t\t\t\t\t// Calculates the max size of the container.\n\t\t\t\t\tif ( originalRatio > imgRatio ) {\n\t\t\t\t\t\tcontainerMaxWidth = imgMaxWidth;\n\t\t\t\t\t\tcontainerMaxHeight = containerMaxWidth / originalRatio;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontainerMaxHeight = imgMaxHeight;\n\t\t\t\t\t\tcontainerMaxWidth = containerMaxHeight * originalRatio;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If the image has been pixelated on purpose, it keeps that size.\n\t\t\t\tif (\n\t\t\t\t\toriginalWidth > containerWidth ||\n\t\t\t\t\toriginalHeight > containerHeight\n\t\t\t\t) {\n\t\t\t\t\tcontainerWidth = originalWidth;\n\t\t\t\t\tcontainerHeight = originalHeight;\n\t\t\t\t}\n\n\t\t\t\t// Calculates the final lightbox image size and the scale factor.\n\t\t\t\t// MaxWidth is either the window container (accounting for padding) or\n\t\t\t\t// the image resolution.\n\t\t\t\tlet horizontalPadding = 0;\n\t\t\t\tif ( window.innerWidth > 480 ) {\n\t\t\t\t\thorizontalPadding = 80;\n\t\t\t\t} else if ( window.innerWidth > 1920 ) {\n\t\t\t\t\thorizontalPadding = 160;\n\t\t\t\t}\n\t\t\t\tconst verticalPadding = 80;\n\n\t\t\t\tconst targetMaxWidth = Math.min(\n\t\t\t\t\twindow.innerWidth - horizontalPadding,\n\t\t\t\t\tcontainerWidth\n\t\t\t\t);\n\t\t\t\tconst targetMaxHeight = Math.min(\n\t\t\t\t\twindow.innerHeight - verticalPadding,\n\t\t\t\t\tcontainerHeight\n\t\t\t\t);\n\t\t\t\tconst targetContainerRatio = targetMaxWidth / targetMaxHeight;\n\n\t\t\t\tif ( originalRatio > targetContainerRatio ) {\n\t\t\t\t\t// If targetMaxWidth is reached before targetMaxHeight.\n\t\t\t\t\tcontainerWidth = targetMaxWidth;\n\t\t\t\t\tcontainerHeight = containerWidth / originalRatio;\n\t\t\t\t} else {\n\t\t\t\t\t// If targetMaxHeight is reached before targetMaxWidth.\n\t\t\t\t\tcontainerHeight = targetMaxHeight;\n\t\t\t\t\tcontainerWidth = containerHeight * originalRatio;\n\t\t\t\t}\n\n\t\t\t\tconst containerScale = originalWidth / containerWidth;\n\t\t\t\tconst lightboxImgWidth =\n\t\t\t\t\timgMaxWidth * ( containerWidth / containerMaxWidth );\n\t\t\t\tconst lightboxImgHeight =\n\t\t\t\t\timgMaxHeight * ( containerHeight / containerMaxHeight );\n\n\t\t\t\t// As of this writing, using the calculations above will render the\n\t\t\t\t// lightbox with a small, erroneous whitespace on the left side of the\n\t\t\t\t// image in iOS Safari, perhaps due to an inconsistency in how browsers\n\t\t\t\t// handle absolute positioning and CSS transformation. In any case,\n\t\t\t\t// adding 1 pixel to the container width and height solves the problem,\n\t\t\t\t// though this can be removed if the issue is fixed in the future.\n\t\t\t\tstate.overlayStyles = `\n\t\t\t\t:root {\n\t\t\t\t\t--wp--lightbox-initial-top-position: ${ screenPosY }px;\n\t\t\t\t\t--wp--lightbox-initial-left-position: ${ screenPosX }px;\n\t\t\t\t\t--wp--lightbox-container-width: ${ containerWidth + 1 }px;\n\t\t\t\t\t--wp--lightbox-container-height: ${ containerHeight + 1 }px;\n\t\t\t\t\t--wp--lightbox-image-width: ${ lightboxImgWidth }px;\n\t\t\t\t\t--wp--lightbox-image-height: ${ lightboxImgHeight }px;\n\t\t\t\t\t--wp--lightbox-scale: ${ containerScale };\n\t\t\t\t\t--wp--lightbox-scrollbar-width: ${\n\t\t\t\t\t\twindow.innerWidth - document.documentElement.clientWidth\n\t\t\t\t\t}px;\n\t\t\t\t}\n\t\t\t`;\n\t\t\t},\n\t\t\tsetButtonStyles() {\n\t\t\t\tconst ctx = getContext();\n\t\t\t\tconst { ref } = getElement();\n\t\t\t\tctx.imageRef = ref;\n\n\t\t\t\tconst {\n\t\t\t\t\tnaturalWidth,\n\t\t\t\t\tnaturalHeight,\n\t\t\t\t\toffsetWidth,\n\t\t\t\t\toffsetHeight,\n\t\t\t\t} = ref;\n\n\t\t\t\t// If the image isn't loaded yet, it can't calculate where the button\n\t\t\t\t// should be.\n\t\t\t\tif ( naturalWidth === 0 || naturalHeight === 0 ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst figure = ref.parentElement;\n\t\t\t\tconst figureWidth = ref.parentElement.clientWidth;\n\n\t\t\t\t// It needs special handling for the height because a caption will cause\n\t\t\t\t// the figure to be taller than the image, which means it needs to\n\t\t\t\t// account for that when calculating the placement of the button in the\n\t\t\t\t// top right corner of the image.\n\t\t\t\tlet figureHeight = ref.parentElement.clientHeight;\n\t\t\t\tconst caption = figure.querySelector( 'figcaption' );\n\t\t\t\tif ( caption ) {\n\t\t\t\t\tconst captionComputedStyle =\n\t\t\t\t\t\twindow.getComputedStyle( caption );\n\t\t\t\t\tif (\n\t\t\t\t\t\t! [ 'absolute', 'fixed' ].includes(\n\t\t\t\t\t\t\tcaptionComputedStyle.position\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\tfigureHeight =\n\t\t\t\t\t\t\tfigureHeight -\n\t\t\t\t\t\t\tcaption.offsetHeight -\n\t\t\t\t\t\t\tparseFloat( captionComputedStyle.marginTop ) -\n\t\t\t\t\t\t\tparseFloat( captionComputedStyle.marginBottom );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst buttonOffsetTop = figureHeight - offsetHeight;\n\t\t\t\tconst buttonOffsetRight = figureWidth - offsetWidth;\n\n\t\t\t\t// In the case of an image with object-fit: contain, the size of the\n\t\t\t\t// <img> element can be larger than the image itself, so it needs to\n\t\t\t\t// calculate where to place the button.\n\t\t\t\tif ( ctx.scaleAttr === 'contain' ) {\n\t\t\t\t\t// Natural ratio of the image.\n\t\t\t\t\tconst naturalRatio = naturalWidth / naturalHeight;\n\t\t\t\t\t// Offset ratio of the image.\n\t\t\t\t\tconst offsetRatio = offsetWidth / offsetHeight;\n\n\t\t\t\t\tif ( naturalRatio >= offsetRatio ) {\n\t\t\t\t\t\t// If it reaches the width first, it keeps the width and compute the\n\t\t\t\t\t\t// height.\n\t\t\t\t\t\tconst referenceHeight = offsetWidth / naturalRatio;\n\t\t\t\t\t\tctx.imageButtonTop =\n\t\t\t\t\t\t\t( offsetHeight - referenceHeight ) / 2 +\n\t\t\t\t\t\t\tbuttonOffsetTop +\n\t\t\t\t\t\t\t16;\n\t\t\t\t\t\tctx.imageButtonRight = buttonOffsetRight + 16;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If it reaches the height first, it keeps the height and compute\n\t\t\t\t\t\t// the width.\n\t\t\t\t\t\tconst referenceWidth = offsetHeight * naturalRatio;\n\t\t\t\t\t\tctx.imageButtonTop = buttonOffsetTop + 16;\n\t\t\t\t\t\tctx.imageButtonRight =\n\t\t\t\t\t\t\t( offsetWidth - referenceWidth ) / 2 +\n\t\t\t\t\t\t\tbuttonOffsetRight +\n\t\t\t\t\t\t\t16;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tctx.imageButtonTop = buttonOffsetTop + 16;\n\t\t\t\t\tctx.imageButtonRight = buttonOffsetRight + 16;\n\t\t\t\t}\n\t\t\t},\n\t\t\tsetOverlayFocus() {\n\t\t\t\tif ( state.overlayEnabled ) {\n\t\t\t\t\t// Moves the focus to the dialog when it opens.\n\t\t\t\t\tconst { ref } = getElement();\n\t\t\t\t\tref.focus();\n\t\t\t\t}\n\t\t\t},\n\t\t\tinitTriggerButton() {\n\t\t\t\tconst ctx = getContext();\n\t\t\t\tconst { ref } = getElement();\n\t\t\t\tctx.buttonRef = ref;\n\t\t\t},\n\t\t},\n\t},\n\t{ lock: true }\n);\n"],"mappings":";;AAGA,IAAAA,cAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,UAAU,GAAG,KAAK;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,aAAa,GAAG,CAAC;;AAErB;AACA;AACA;AACA;AACA;AACA,IAAIC,QAAQ;;AAEZ;AACA;AACA;AACA;AACA;AACA,IAAIC,SAAS;AAEb,MAAM;EAAEC,KAAK;EAAEC,OAAO;EAAEC;AAAU,CAAC,GAAG,IAAAC,oBAAK,EAC1C,YAAY,EACZ;EACCH,KAAK,EAAE;IACNI,YAAY,EAAE,CAAC,CAAC;IAChB,IAAIC,aAAaA,CAAA,EAAG;MACnB,OAAOL,KAAK,CAACI,YAAY,CAACE,UAAU;IACrC,CAAC;IACD,IAAIC,aAAaA,CAAA,EAAG;MACnB,OAAOP,KAAK,CAACK,aAAa,GAAG,QAAQ,GAAG,IAAI;IAC7C,CAAC;IACD,IAAIG,SAASA,CAAA,EAAG;MACf,OAAOR,KAAK,CAACK,aAAa,GAAG,MAAM,GAAG,IAAI;IAC3C,CAAC;IAC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AY,GAAGX,YAAY,GAAGC,aAAa;QACjD;QACA,MAAMyD,WAAW,GAAGxD,WAAW,GAAGE,YAAY;QAE9C,IAAKO,YAAY,IAAI+C,WAAW,EAAG;UAClC;UACA;UACA,MAAMC,eAAe,GAAGzD,WAAW,GAAGS,YAAY;UAClD1C,GAAG,CAAC2F,cAAc,GACjB,CAAExD,YAAY,GAAGuD,eAAe,IAAK,CAAC,GACtCH,eAAe,GACf,EAAE;UACHvF,GAAG,CAAC4F,gBAAgB,GAAGJ,iBAAiB,GAAG,EAAE;QAC9C,CAAC,MAAM;UACN;UACA;UACA,MAAMK,cAAc,GAAG1D,YAAY,GAAGO,YAAY;UAClD1C,GAAG,CAAC2F,cAAc,GAAGJ,eAAe,GAAG,EAAE;UACzCvF,GAAG,CAAC4F,gBAAgB,GACnB,CAAE3D,WAAW,GAAG4D,cAAc,IAAK,CAAC,GACpCL,iBAAiB,GACjB,EAAE;QACJ;MACD,CAAC,MAAM;QACNxF,GAAG,CAAC2F,cAAc,GAAGJ,eAAe,GAAG,EAAE;QACzCvF,GAAG,CAAC4F,gBAAgB,GAAGJ,iBAAiB,GAAG,EAAE;MAC9C;IACD,CAAC;IACDM,eAAeA,CAAA,EAAG;MACjB,IAAK5G,KAAK,CAACuB,cAAc,EAAG;QAC3B;QACA,MAAM;UAAEW;QAAI,CAAC,GAAG,IAAAC,yBAAU,EAAC,CAAC;QAC5BD,GAAG,CAACP,KAAK,CAAC,CAAC;MACZ;IACD,CAAC;IACDkF,iBAAiBA,CAAA,EAAG;MACnB,MAAM/F,GAAG,GAAG,IAAAC,yBAAU,EAAC,CAAC;MACxB,MAAM;QAAEmB;MAAI,CAAC,GAAG,IAAAC,yBAAU,EAAC,CAAC;MAC5BrB,GAAG,CAACf,SAAS,GAAGmC,GAAG;IACpB;EACD;AACD,CAAC,EACD;EAAE4E,IAAI,EAAE;AAAK,CACd,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_interactivity","require","isTouching","lastTouchTime","state","actions","callbacks","store","currentImageId","currentImage","metadata","overlayOpened","roleAttribute","ariaModal","enlargedSrc","uploadedSrc","figureStyles","replace","imgStyles","imageButtonRight","imageId","getContext","imageButtonTop","isContentHidden","ctx","overlayEnabled","isContentVisible","showLightbox","imageRef","complete","scrollTopReset","document","documentElement","scrollTop","scrollLeftReset","scrollLeft","setOverlayStyles","hideLightbox","showClosingAnimation","setTimeout","buttonRef","focus","preventScroll","handleKeydown","event","key","preventDefault","ref","getElement","querySelector","handleTouchMove","handleTouchStart","handleTouchEnd","Date","now","handleScroll","window","scrollTo","naturalWidth","naturalHeight","offsetWidth","originalWidth","offsetHeight","originalHeight","x","screenPosX","y","screenPosY","getBoundingClientRect","naturalRatio","originalRatio","scaleAttr","heightWithoutSpace","widthWithoutSpace","imgMaxWidth","parseFloat","targetWidth","imgMaxHeight","targetHeight","imgRatio","containerMaxWidth","containerMaxHeight","containerWidth","containerHeight","toFixed","reducedHeight","reducedWidth","horizontalPadding","innerWidth","verticalPadding","targetMaxWidth","Math","min","targetMaxHeight","innerHeight","targetContainerRatio","containerScale","lightboxImgWidth","lightboxImgHeight","overlayStyles","clientWidth","setButtonStyles","currentSrc","figure","parentElement","figureWidth","figureHeight","clientHeight","caption","captionComputedStyle","getComputedStyle","includes","position","marginTop","marginBottom","buttonOffsetTop","buttonOffsetRight","offsetRatio","referenceHeight","referenceWidth","setOverlayFocus","initTriggerButton","lock"],"sources":["@wordpress/block-library/src/image/view.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store, getContext, getElement } from '@wordpress/interactivity';\n\n/**\n * Tracks whether user is touching screen; used to differentiate behavior for\n * touch and mouse input.\n *\n * @type {boolean}\n */\nlet isTouching = false;\n\n/**\n * Tracks the last time the screen was touched; used to differentiate behavior\n * for touch and mouse input.\n *\n * @type {number}\n */\nlet lastTouchTime = 0;\n\nconst { state, actions, callbacks } = store(\n\t'core/image',\n\t{\n\t\tstate: {\n\t\t\tcurrentImageId: null,\n\t\t\tget currentImage() {\n\t\t\t\treturn state.metadata[ state.currentImageId ];\n\t\t\t},\n\t\t\tget overlayOpened() {\n\t\t\t\treturn state.currentImageId !== null;\n\t\t\t},\n\t\t\tget roleAttribute() {\n\t\t\t\treturn state.overlayOpened ? 'dialog' : null;\n\t\t\t},\n\t\t\tget ariaModal() {\n\t\t\t\treturn state.overlayOpened ? 'true' : null;\n\t\t\t},\n\t\t\tget enlargedSrc() {\n\t\t\t\treturn (\n\t\t\t\t\tstate.currentImage.uploadedSrc ||\n\t\t\t\t\t'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs='\n\t\t\t\t);\n\t\t\t},\n\t\t\tget figureStyles() {\n\t\t\t\treturn (\n\t\t\t\t\tstate.overlayOpened &&\n\t\t\t\t\t`${ state.currentImage.figureStyles?.replace(\n\t\t\t\t\t\t/margin[^;]*;?/g,\n\t\t\t\t\t\t''\n\t\t\t\t\t) };`\n\t\t\t\t);\n\t\t\t},\n\t\t\tget imgStyles() {\n\t\t\t\treturn (\n\t\t\t\t\tstate.overlayOpened &&\n\t\t\t\t\t`${ state.currentImage.imgStyles?.replace(\n\t\t\t\t\t\t/;$/,\n\t\t\t\t\t\t''\n\t\t\t\t\t) }; object-fit:cover;`\n\t\t\t\t);\n\t\t\t},\n\t\t\tget imageButtonRight() {\n\t\t\t\tconst { imageId } = getContext();\n\t\t\t\treturn state.metadata[ imageId ].imageButtonRight;\n\t\t\t},\n\t\t\tget imageButtonTop() {\n\t\t\t\tconst { imageId } = getContext();\n\t\t\t\treturn state.metadata[ imageId ].imageButtonTop;\n\t\t\t},\n\t\t\tget isContentHidden() {\n\t\t\t\tconst ctx = getContext();\n\t\t\t\treturn (\n\t\t\t\t\tstate.overlayEnabled && state.currentImageId === ctx.imageId\n\t\t\t\t);\n\t\t\t},\n\t\t\tget isContentVisible() {\n\t\t\t\tconst ctx = getContext();\n\t\t\t\treturn (\n\t\t\t\t\t! state.overlayEnabled &&\n\t\t\t\t\tstate.currentImageId === ctx.imageId\n\t\t\t\t);\n\t\t\t},\n\t\t},\n\t\tactions: {\n\t\t\tshowLightbox() {\n\t\t\t\tconst { imageId } = getContext();\n\n\t\t\t\t// Bails out if the image has not loaded yet.\n\t\t\t\tif ( ! state.metadata[ imageId ].imageRef?.complete ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Stores the positions of the scroll to fix it until the overlay is\n\t\t\t\t// closed.\n\t\t\t\tstate.scrollTopReset = document.documentElement.scrollTop;\n\t\t\t\tstate.scrollLeftReset = document.documentElement.scrollLeft;\n\n\t\t\t\t// Sets the current expanded image in the state and enables the overlay.\n\t\t\t\tstate.overlayEnabled = true;\n\t\t\t\tstate.currentImageId = imageId;\n\n\t\t\t\t// Computes the styles of the overlay for the animation.\n\t\t\t\tcallbacks.setOverlayStyles();\n\t\t\t},\n\t\t\thideLightbox() {\n\t\t\t\tif ( state.overlayEnabled ) {\n\t\t\t\t\t// Starts the overlay closing animation. The showClosingAnimation\n\t\t\t\t\t// class is used to avoid showing it on page load.\n\t\t\t\t\tstate.showClosingAnimation = true;\n\t\t\t\t\tstate.overlayEnabled = false;\n\n\t\t\t\t\t// Waits until the close animation has completed before allowing a\n\t\t\t\t\t// user to scroll again. The duration of this animation is defined in\n\t\t\t\t\t// the `styles.scss` file, but in any case we should wait a few\n\t\t\t\t\t// milliseconds longer than the duration, otherwise a user may scroll\n\t\t\t\t\t// too soon and cause the animation to look sloppy.\n\t\t\t\t\tsetTimeout( function () {\n\t\t\t\t\t\t// Delays before changing the focus. Otherwise the focus ring will\n\t\t\t\t\t\t// appear on Firefox before the image has finished animating, which\n\t\t\t\t\t\t// looks broken.\n\t\t\t\t\t\tstate.currentImage.buttonRef.focus( {\n\t\t\t\t\t\t\tpreventScroll: true,\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t// Resets the current image id to mark the overlay as closed.\n\t\t\t\t\t\tstate.currentImageId = null;\n\t\t\t\t\t}, 450 );\n\t\t\t\t}\n\t\t\t},\n\t\t\thandleKeydown( event ) {\n\t\t\t\tif ( state.overlayEnabled ) {\n\t\t\t\t\t// Focuses the close button when the user presses the tab key.\n\t\t\t\t\tif ( event.key === 'Tab' ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tconst { ref } = getElement();\n\t\t\t\t\t\tref.querySelector( 'button' ).focus();\n\t\t\t\t\t}\n\t\t\t\t\t// Closes the lightbox when the user presses the escape key.\n\t\t\t\t\tif ( event.key === 'Escape' ) {\n\t\t\t\t\t\tactions.hideLightbox();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\thandleTouchMove( event ) {\n\t\t\t\t// On mobile devices, prevents triggering the scroll event because\n\t\t\t\t// otherwise the page jumps around when it resets the scroll position.\n\t\t\t\t// This also means that closing the lightbox requires that a user\n\t\t\t\t// perform a simple tap. This may be changed in the future if there is a\n\t\t\t\t// better alternative to override or reset the scroll position during\n\t\t\t\t// swipe actions.\n\t\t\t\tif ( state.overlayEnabled ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t},\n\t\t\thandleTouchStart() {\n\t\t\t\tisTouching = true;\n\t\t\t},\n\t\t\thandleTouchEnd() {\n\t\t\t\t// Waits a few milliseconds before resetting to ensure that pinch to\n\t\t\t\t// zoom works consistently on mobile devices when the lightbox is open.\n\t\t\t\tlastTouchTime = Date.now();\n\t\t\t\tisTouching = false;\n\t\t\t},\n\t\t\thandleScroll() {\n\t\t\t\t// Prevents scrolling behaviors that trigger content shift while the\n\t\t\t\t// lightbox is open. It would be better to accomplish through CSS alone,\n\t\t\t\t// but using overflow: hidden is currently the only way to do so and\n\t\t\t\t// that causes a layout to shift and prevents the zoom animation from\n\t\t\t\t// working in some cases because it's not possible to account for the\n\t\t\t\t// layout shift when doing the animation calculations. Instead, it uses\n\t\t\t\t// JavaScript to prevent and reset the scrolling behavior.\n\t\t\t\tif ( state.overlayOpened ) {\n\t\t\t\t\t// Avoids overriding the scroll behavior on mobile devices because\n\t\t\t\t\t// doing so breaks the pinch to zoom functionality, and users should\n\t\t\t\t\t// be able to zoom in further on the high-res image.\n\t\t\t\t\tif ( ! isTouching && Date.now() - lastTouchTime > 450 ) {\n\t\t\t\t\t\t// It doesn't rely on `event.preventDefault()` to prevent scrolling\n\t\t\t\t\t\t// because the scroll event can't be canceled, so it resets the\n\t\t\t\t\t\t// position instead.\n\t\t\t\t\t\twindow.scrollTo(\n\t\t\t\t\t\t\tstate.scrollLeftReset,\n\t\t\t\t\t\t\tstate.scrollTopReset\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t\tcallbacks: {\n\t\t\tsetOverlayStyles() {\n\t\t\t\tif ( ! state.overlayEnabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet {\n\t\t\t\t\tnaturalWidth,\n\t\t\t\t\tnaturalHeight,\n\t\t\t\t\toffsetWidth: originalWidth,\n\t\t\t\t\toffsetHeight: originalHeight,\n\t\t\t\t} = state.currentImage.imageRef;\n\t\t\t\tlet { x: screenPosX, y: screenPosY } =\n\t\t\t\t\tstate.currentImage.imageRef.getBoundingClientRect();\n\n\t\t\t\t// Natural ratio of the image clicked to open the lightbox.\n\t\t\t\tconst naturalRatio = naturalWidth / naturalHeight;\n\t\t\t\t// Original ratio of the image clicked to open the lightbox.\n\t\t\t\tlet originalRatio = originalWidth / originalHeight;\n\n\t\t\t\t// If it has object-fit: contain, recalculates the original sizes\n\t\t\t\t// and the screen position without the blank spaces.\n\t\t\t\tif ( state.currentImage.scaleAttr === 'contain' ) {\n\t\t\t\t\tif ( naturalRatio > originalRatio ) {\n\t\t\t\t\t\tconst heightWithoutSpace = originalWidth / naturalRatio;\n\t\t\t\t\t\t// Recalculates screen position without the top space.\n\t\t\t\t\t\tscreenPosY +=\n\t\t\t\t\t\t\t( originalHeight - heightWithoutSpace ) / 2;\n\t\t\t\t\t\toriginalHeight = heightWithoutSpace;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst widthWithoutSpace = originalHeight * naturalRatio;\n\t\t\t\t\t\t// Recalculates screen position without the left space.\n\t\t\t\t\t\tscreenPosX += ( originalWidth - widthWithoutSpace ) / 2;\n\t\t\t\t\t\toriginalWidth = widthWithoutSpace;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\toriginalRatio = originalWidth / originalHeight;\n\n\t\t\t\t// Typically, it uses the image's full-sized dimensions. If those\n\t\t\t\t// dimensions have not been set (i.e. an external image with only one\n\t\t\t\t// size), the image's dimensions in the lightbox are the same\n\t\t\t\t// as those of the image in the content.\n\t\t\t\tlet imgMaxWidth = parseFloat(\n\t\t\t\t\tstate.currentImage.targetWidth !== 'none'\n\t\t\t\t\t\t? state.currentImage.targetWidth\n\t\t\t\t\t\t: naturalWidth\n\t\t\t\t);\n\t\t\t\tlet imgMaxHeight = parseFloat(\n\t\t\t\t\tstate.currentImage.targetHeight !== 'none'\n\t\t\t\t\t\t? state.currentImage.targetHeight\n\t\t\t\t\t\t: naturalHeight\n\t\t\t\t);\n\n\t\t\t\t// Ratio of the biggest image stored in the database.\n\t\t\t\tlet imgRatio = imgMaxWidth / imgMaxHeight;\n\t\t\t\tlet containerMaxWidth = imgMaxWidth;\n\t\t\t\tlet containerMaxHeight = imgMaxHeight;\n\t\t\t\tlet containerWidth = imgMaxWidth;\n\t\t\t\tlet containerHeight = imgMaxHeight;\n\n\t\t\t\t// Checks if the target image has a different ratio than the original\n\t\t\t\t// one (thumbnail). Recalculates the width and height.\n\t\t\t\tif ( naturalRatio.toFixed( 2 ) !== imgRatio.toFixed( 2 ) ) {\n\t\t\t\t\tif ( naturalRatio > imgRatio ) {\n\t\t\t\t\t\t// If the width is reached before the height, it keeps the maxWidth\n\t\t\t\t\t\t// and recalculates the height unless the difference between the\n\t\t\t\t\t\t// maxHeight and the reducedHeight is higher than the maxWidth,\n\t\t\t\t\t\t// where it keeps the reducedHeight and recalculate the width.\n\t\t\t\t\t\tconst reducedHeight = imgMaxWidth / naturalRatio;\n\t\t\t\t\t\tif ( imgMaxHeight - reducedHeight > imgMaxWidth ) {\n\t\t\t\t\t\t\timgMaxHeight = reducedHeight;\n\t\t\t\t\t\t\timgMaxWidth = reducedHeight * naturalRatio;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\timgMaxHeight = imgMaxWidth / naturalRatio;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If the height is reached before the width, it keeps the maxHeight\n\t\t\t\t\t\t// and recalculate the width unlesss the difference between the\n\t\t\t\t\t\t// maxWidth and the reducedWidth is higher than the maxHeight, where\n\t\t\t\t\t\t// it keeps the reducedWidth and recalculate the height.\n\t\t\t\t\t\tconst reducedWidth = imgMaxHeight * naturalRatio;\n\t\t\t\t\t\tif ( imgMaxWidth - reducedWidth > imgMaxHeight ) {\n\t\t\t\t\t\t\timgMaxWidth = reducedWidth;\n\t\t\t\t\t\t\timgMaxHeight = reducedWidth / naturalRatio;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\timgMaxWidth = imgMaxHeight * naturalRatio;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcontainerWidth = imgMaxWidth;\n\t\t\t\t\tcontainerHeight = imgMaxHeight;\n\t\t\t\t\timgRatio = imgMaxWidth / imgMaxHeight;\n\n\t\t\t\t\t// Calculates the max size of the container.\n\t\t\t\t\tif ( originalRatio > imgRatio ) {\n\t\t\t\t\t\tcontainerMaxWidth = imgMaxWidth;\n\t\t\t\t\t\tcontainerMaxHeight = containerMaxWidth / originalRatio;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontainerMaxHeight = imgMaxHeight;\n\t\t\t\t\t\tcontainerMaxWidth = containerMaxHeight * originalRatio;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If the image has been pixelated on purpose, it keeps that size.\n\t\t\t\tif (\n\t\t\t\t\toriginalWidth > containerWidth ||\n\t\t\t\t\toriginalHeight > containerHeight\n\t\t\t\t) {\n\t\t\t\t\tcontainerWidth = originalWidth;\n\t\t\t\t\tcontainerHeight = originalHeight;\n\t\t\t\t}\n\n\t\t\t\t// Calculates the final lightbox image size and the scale factor.\n\t\t\t\t// MaxWidth is either the window container (accounting for padding) or\n\t\t\t\t// the image resolution.\n\t\t\t\tlet horizontalPadding = 0;\n\t\t\t\tif ( window.innerWidth > 480 ) {\n\t\t\t\t\thorizontalPadding = 80;\n\t\t\t\t} else if ( window.innerWidth > 1920 ) {\n\t\t\t\t\thorizontalPadding = 160;\n\t\t\t\t}\n\t\t\t\tconst verticalPadding = 80;\n\n\t\t\t\tconst targetMaxWidth = Math.min(\n\t\t\t\t\twindow.innerWidth - horizontalPadding,\n\t\t\t\t\tcontainerWidth\n\t\t\t\t);\n\t\t\t\tconst targetMaxHeight = Math.min(\n\t\t\t\t\twindow.innerHeight - verticalPadding,\n\t\t\t\t\tcontainerHeight\n\t\t\t\t);\n\t\t\t\tconst targetContainerRatio = targetMaxWidth / targetMaxHeight;\n\n\t\t\t\tif ( originalRatio > targetContainerRatio ) {\n\t\t\t\t\t// If targetMaxWidth is reached before targetMaxHeight.\n\t\t\t\t\tcontainerWidth = targetMaxWidth;\n\t\t\t\t\tcontainerHeight = containerWidth / originalRatio;\n\t\t\t\t} else {\n\t\t\t\t\t// If targetMaxHeight is reached before targetMaxWidth.\n\t\t\t\t\tcontainerHeight = targetMaxHeight;\n\t\t\t\t\tcontainerWidth = containerHeight * originalRatio;\n\t\t\t\t}\n\n\t\t\t\tconst containerScale = originalWidth / containerWidth;\n\t\t\t\tconst lightboxImgWidth =\n\t\t\t\t\timgMaxWidth * ( containerWidth / containerMaxWidth );\n\t\t\t\tconst lightboxImgHeight =\n\t\t\t\t\timgMaxHeight * ( containerHeight / containerMaxHeight );\n\n\t\t\t\t// As of this writing, using the calculations above will render the\n\t\t\t\t// lightbox with a small, erroneous whitespace on the left side of the\n\t\t\t\t// image in iOS Safari, perhaps due to an inconsistency in how browsers\n\t\t\t\t// handle absolute positioning and CSS transformation. In any case,\n\t\t\t\t// adding 1 pixel to the container width and height solves the problem,\n\t\t\t\t// though this can be removed if the issue is fixed in the future.\n\t\t\t\tstate.overlayStyles = `\n\t\t\t\t:root {\n\t\t\t\t\t--wp--lightbox-initial-top-position: ${ screenPosY }px;\n\t\t\t\t\t--wp--lightbox-initial-left-position: ${ screenPosX }px;\n\t\t\t\t\t--wp--lightbox-container-width: ${ containerWidth + 1 }px;\n\t\t\t\t\t--wp--lightbox-container-height: ${ containerHeight + 1 }px;\n\t\t\t\t\t--wp--lightbox-image-width: ${ lightboxImgWidth }px;\n\t\t\t\t\t--wp--lightbox-image-height: ${ lightboxImgHeight }px;\n\t\t\t\t\t--wp--lightbox-scale: ${ containerScale };\n\t\t\t\t\t--wp--lightbox-scrollbar-width: ${\n\t\t\t\t\t\twindow.innerWidth - document.documentElement.clientWidth\n\t\t\t\t\t}px;\n\t\t\t\t}\n\t\t\t`;\n\t\t\t},\n\t\t\tsetButtonStyles() {\n\t\t\t\tconst { imageId } = getContext();\n\t\t\t\tconst { ref } = getElement();\n\n\t\t\t\tstate.metadata[ imageId ].imageRef = ref;\n\t\t\t\tstate.metadata[ imageId ].currentSrc = ref.currentSrc;\n\n\t\t\t\tconst {\n\t\t\t\t\tnaturalWidth,\n\t\t\t\t\tnaturalHeight,\n\t\t\t\t\toffsetWidth,\n\t\t\t\t\toffsetHeight,\n\t\t\t\t} = ref;\n\n\t\t\t\t// If the image isn't loaded yet, it can't calculate where the button\n\t\t\t\t// should be.\n\t\t\t\tif ( naturalWidth === 0 || naturalHeight === 0 ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst figure = ref.parentElement;\n\t\t\t\tconst figureWidth = ref.parentElement.clientWidth;\n\n\t\t\t\t// It needs special handling for the height because a caption will cause\n\t\t\t\t// the figure to be taller than the image, which means it needs to\n\t\t\t\t// account for that when calculating the placement of the button in the\n\t\t\t\t// top right corner of the image.\n\t\t\t\tlet figureHeight = ref.parentElement.clientHeight;\n\t\t\t\tconst caption = figure.querySelector( 'figcaption' );\n\t\t\t\tif ( caption ) {\n\t\t\t\t\tconst captionComputedStyle =\n\t\t\t\t\t\twindow.getComputedStyle( caption );\n\t\t\t\t\tif (\n\t\t\t\t\t\t! [ 'absolute', 'fixed' ].includes(\n\t\t\t\t\t\t\tcaptionComputedStyle.position\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\tfigureHeight =\n\t\t\t\t\t\t\tfigureHeight -\n\t\t\t\t\t\t\tcaption.offsetHeight -\n\t\t\t\t\t\t\tparseFloat( captionComputedStyle.marginTop ) -\n\t\t\t\t\t\t\tparseFloat( captionComputedStyle.marginBottom );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst buttonOffsetTop = figureHeight - offsetHeight;\n\t\t\t\tconst buttonOffsetRight = figureWidth - offsetWidth;\n\n\t\t\t\tlet imageButtonTop = buttonOffsetTop + 16;\n\t\t\t\tlet imageButtonRight = buttonOffsetRight + 16;\n\n\t\t\t\t// In the case of an image with object-fit: contain, the size of the\n\t\t\t\t// <img> element can be larger than the image itself, so it needs to\n\t\t\t\t// calculate where to place the button.\n\t\t\t\tif ( state.metadata[ imageId ].scaleAttr === 'contain' ) {\n\t\t\t\t\t// Natural ratio of the image.\n\t\t\t\t\tconst naturalRatio = naturalWidth / naturalHeight;\n\t\t\t\t\t// Offset ratio of the image.\n\t\t\t\t\tconst offsetRatio = offsetWidth / offsetHeight;\n\n\t\t\t\t\tif ( naturalRatio >= offsetRatio ) {\n\t\t\t\t\t\t// If it reaches the width first, it keeps the width and compute the\n\t\t\t\t\t\t// height.\n\t\t\t\t\t\tconst referenceHeight = offsetWidth / naturalRatio;\n\t\t\t\t\t\timageButtonTop =\n\t\t\t\t\t\t\t( offsetHeight - referenceHeight ) / 2 +\n\t\t\t\t\t\t\tbuttonOffsetTop +\n\t\t\t\t\t\t\t16;\n\t\t\t\t\t\timageButtonRight = buttonOffsetRight + 16;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If it reaches the height first, it keeps the height and compute\n\t\t\t\t\t\t// the width.\n\t\t\t\t\t\tconst referenceWidth = offsetHeight * naturalRatio;\n\t\t\t\t\t\timageButtonTop = buttonOffsetTop + 16;\n\t\t\t\t\t\timageButtonRight =\n\t\t\t\t\t\t\t( offsetWidth - referenceWidth ) / 2 +\n\t\t\t\t\t\t\tbuttonOffsetRight +\n\t\t\t\t\t\t\t16;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tstate.metadata[ imageId ].imageButtonTop = imageButtonTop;\n\t\t\t\tstate.metadata[ imageId ].imageButtonRight = imageButtonRight;\n\t\t\t},\n\t\t\tsetOverlayFocus() {\n\t\t\t\tif ( state.overlayEnabled ) {\n\t\t\t\t\t// Moves the focus to the dialog when it opens.\n\t\t\t\t\tconst { ref } = getElement();\n\t\t\t\t\tref.focus();\n\t\t\t\t}\n\t\t\t},\n\t\t\tinitTriggerButton() {\n\t\t\t\tconst { imageId } = getContext();\n\t\t\t\tconst { ref } = getElement();\n\t\t\t\tstate.metadata[ imageId ].buttonRef = ref;\n\t\t\t},\n\t\t},\n\t},\n\t{ lock: true }\n);\n"],"mappings":";;AAGA,IAAAA,cAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,UAAU,GAAG,KAAK;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,aAAa,GAAG,CAAC;AAErB,MAAM;EAAEC,KAAK;EAAEC,OAAO;EAAEC;AAAU,CAAC,GAAG,IAAAC,oBAAK,EAC1C,YAAY,EACZ;EACCH,KAAK,EAAE;IACNI,cAAc,EAAE,IAAI;IACpB,IAAIC,YAAYA,CAAA,EAAG;MAClB,OAAOL,KAAK,CAACM,QAAQ,CAAEN,KAAK,CAACI,cAAc,CAAE;IAC9C,CAAC;IACD,IAAIG,aAAaA,CAAA,EAAG;MACnB,OAAOP,KAAK,CAAC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CAAC,EACD;EAAE2E,IAAI,EAAE;AAAK,CACd,CAAC","ignoreList":[]}
@@ -45,6 +45,15 @@ const metadata = exports.metadata = {
45
45
  },
46
46
  supports: {
47
47
  align: true,
48
+ color: {
49
+ gradients: true,
50
+ link: true,
51
+ __experimentalDefaultControls: {
52
+ background: true,
53
+ text: true,
54
+ link: true
55
+ }
56
+ },
48
57
  html: false,
49
58
  spacing: {
50
59
  margin: true,
@@ -1 +1 @@
1
- {"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","metadata","exports","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","commentsToShow","type","minimum","maximum","displayAvatar","displayDate","displayExcerpt","supports","align","html","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","__experimentalDefaultControls","interactivity","clientNavigation","editorStyle","style","settings","icon","example","edit","init","initBlock"],"sources":["@wordpress/block-library/src/latest-comments/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { comment 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;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AAVA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAI,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,QAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,cAAA;MAAAC,IAAA;MAAA;MAAAC,OAAA;MAAAC,OAAA;IAAA;IAAAC,aAAA;MAAAH,IAAA;MAAA;IAAA;IAAAI,WAAA;MAAAJ,IAAA;MAAA;IAAA;IAAAK,cAAA;MAAAL,IAAA;MAAA;IAAA;EAAA;EAAAM,QAAA;IAAAC,KAAA;IAAAC,IAAA;IAAAC,OAAA;MAAAC,MAAA;MAAAC,OAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAC,6BAAA;QAAAR,QAAA;MAAA;IAAA;IAAAS,aAAA;MAAAC,gBAAA;IAAA;EAAA;EAAAC,WAAA;EAAAC,KAAA;AAAA;AAOA,MAAM;EAAEjC;AAAK,CAAC,GAAGJ,QAAQ;AAACC,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAInB,MAAMkC,QAAQ,GAAArC,OAAA,CAAAqC,QAAA,GAAG;EACvBC,IAAI,EAAJA,cAAI;EACJC,OAAO,EAAE,CAAC,CAAC;EACXC,IAAI,EAAJA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAEvC,IAAI;EAAEJ,QAAQ;EAAEsC;AAAS,CAAE,CAAC;AAACrC,OAAA,CAAAyC,IAAA,GAAAA,IAAA","ignoreList":[]}
1
+ {"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","metadata","exports","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","commentsToShow","type","minimum","maximum","displayAvatar","displayDate","displayExcerpt","supports","align","color","gradients","link","__experimentalDefaultControls","background","text","html","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","editorStyle","style","settings","icon","example","edit","init","initBlock"],"sources":["@wordpress/block-library/src/latest-comments/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { comment 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;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AAVA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAI,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,QAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,cAAA;MAAAC,IAAA;MAAA;MAAAC,OAAA;MAAAC,OAAA;IAAA;IAAAC,aAAA;MAAAH,IAAA;MAAA;IAAA;IAAAI,WAAA;MAAAJ,IAAA;MAAA;IAAA;IAAAK,cAAA;MAAAL,IAAA;MAAA;IAAA;EAAA;EAAAM,QAAA;IAAAC,KAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,IAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;QAAAH,IAAA;MAAA;IAAA;IAAAI,IAAA;IAAAC,OAAA;MAAAC,MAAA;MAAAC,OAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAf,6BAAA;QAAAQ,QAAA;MAAA;IAAA;IAAAQ,aAAA;MAAAC,gBAAA;IAAA;EAAA;EAAAC,WAAA;EAAAC,KAAA;AAAA;AAOA,MAAM;EAAEtC;AAAK,CAAC,GAAGJ,QAAQ;AAACC,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAInB,MAAMuC,QAAQ,GAAA1C,OAAA,CAAA0C,QAAA,GAAG;EACvBC,IAAI,EAAJA,cAAI;EACJC,OAAO,EAAE,CAAC,CAAC;EACXC,IAAI,EAAJA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAE5C,IAAI;EAAEJ,QAAQ;EAAE2C;AAAS,CAAE,CAAC;AAAC1C,OAAA,CAAA8C,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -161,6 +161,7 @@ function LatestPostsEdit({
161
161
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.PanelBody, {
162
162
  title: (0, _i18n.__)('Post content'),
163
163
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToggleControl, {
164
+ __nextHasNoMarginBottom: true,
164
165
  label: (0, _i18n.__)('Post content'),
165
166
  checked: displayPostContent,
166
167
  onChange: value => setAttributes({
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_i18n","_date","_blockEditor","_data","_icons","_coreData","_notices","_compose","_element","_constants","_jsxRuntime","CATEGORIES_LIST_QUERY","per_page","context","USERS_LIST_QUERY","has_published_posts","getFeaturedImageDetails","post","size","_image$media_details$","image","_embedded","url","media_details","sizes","source_url","alt","alt_text","LatestPostsEdit","attributes","setAttributes","_categoriesList$reduc","instanceId","useInstanceId","postsToShow","order","orderBy","categories","selectedAuthor","displayFeaturedImage","displayPostContentRadio","displayPostContent","displayPostDate","displayAuthor","postLayout","columns","excerptLength","featuredImageAlign","featuredImageSizeSlug","featuredImageSizeWidth","featuredImageSizeHeight","addLinkToFeaturedImage","imageSizes","latestPosts","defaultImageWidth","defaultImageHeight","categoriesList","authorList","useSelect","select","_settings$imageDimens","_settings$imageDimens2","getEntityRecords","getUsers","coreStore","settings","blockEditorStore","getSettings","catIds","length","map","cat","id","latestPostsQuery","Object","fromEntries","entries","author","orderby","_embed","filter","value","imageDimensions","width","height","createWarningNotice","removeNotice","useDispatch","noticeStore","noticeId","showRedirectionPreventedNotice","event","preventDefault","__","type","imageSizeOptions","slug","name","label","categorySuggestions","reduce","accumulator","category","selectCategories","tokens","hasNoSuggestion","some","token","allCategories","includes","hasPosts","inspectorControls","jsxs","InspectorControls","children","PanelBody","title","jsx","ToggleControl","checked","onChange","RadioControl","selected","options","RangeControl","__nextHasNoMarginBottom","__next40pxDefaultSize","min","MIN_EXCERPT_LENGTH","max","MAX_EXCERPT_LENGTH","Fragment","__experimentalImageSizeControl","newAttrs","hasOwnProperty","imageWidth","imageHeight","imageSizeHelp","onChangeImage","undefined","BaseControl","className","VisualLabel","BlockAlignmentToolbar","controls","isCollapsed","QueryControls","numberOfItems","onOrderChange","onOrderByChange","onNumberOfItemsChange","onCategoryChange","selectedCategories","onAuthorChange","Number","selectedAuthorId","MAX_POSTS_COLUMNS","Math","required","blockProps","useBlockProps","clsx","Placeholder","icon","pin","Array","isArray","Spinner","displayPosts","slice","layoutControls","list","_x","onClick","isActive","grid","dateFormat","formats","date","BlockControls","ToolbarGroup","titleTrimmed","rendered","trim","excerpt","currentAuthor","find","excerptElement","document","createElement","innerHTML","textContent","innerText","imageSourceUrl","featuredImageAlt","imageClasses","renderFeaturedImage","featuredImage","src","style","maxWidth","maxHeight","needsReadMore","split","raw","postExcerpt","join","createInterpolateElement","sprintf","a","href","link","rel","span","dangerouslySetInnerHTML","__html","date_gmt","dateTime","format","dateI18n","content"],"sources":["@wordpress/block-library/src/latest-posts/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBaseControl,\n\tPanelBody,\n\tPlaceholder,\n\tQueryControls,\n\tRadioControl,\n\tRangeControl,\n\tSpinner,\n\tToggleControl,\n\tToolbarGroup,\n} from '@wordpress/components';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { dateI18n, format, getSettings } from '@wordpress/date';\nimport {\n\tInspectorControls,\n\tBlockAlignmentToolbar,\n\tBlockControls,\n\t__experimentalImageSizeControl as ImageSizeControl,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { pin, list, grid } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticeStore } from '@wordpress/notices';\nimport { useInstanceId } from '@wordpress/compose';\nimport { createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tMIN_EXCERPT_LENGTH,\n\tMAX_EXCERPT_LENGTH,\n\tMAX_POSTS_COLUMNS,\n} from './constants';\n\n/**\n * Module Constants\n */\nconst CATEGORIES_LIST_QUERY = {\n\tper_page: -1,\n\tcontext: 'view',\n};\nconst USERS_LIST_QUERY = {\n\tper_page: -1,\n\thas_published_posts: [ 'post' ],\n\tcontext: 'view',\n};\n\nfunction getFeaturedImageDetails( post, size ) {\n\tconst image = post._embedded?.[ 'wp:featuredmedia' ]?.[ '0' ];\n\n\treturn {\n\t\turl:\n\t\t\timage?.media_details?.sizes?.[ size ]?.source_url ??\n\t\t\timage?.source_url,\n\t\talt: image?.alt_text,\n\t};\n}\n\nexport default function LatestPostsEdit( { attributes, setAttributes } ) {\n\tconst instanceId = useInstanceId( LatestPostsEdit );\n\tconst {\n\t\tpostsToShow,\n\t\torder,\n\t\torderBy,\n\t\tcategories,\n\t\tselectedAuthor,\n\t\tdisplayFeaturedImage,\n\t\tdisplayPostContentRadio,\n\t\tdisplayPostContent,\n\t\tdisplayPostDate,\n\t\tdisplayAuthor,\n\t\tpostLayout,\n\t\tcolumns,\n\t\texcerptLength,\n\t\tfeaturedImageAlign,\n\t\tfeaturedImageSizeSlug,\n\t\tfeaturedImageSizeWidth,\n\t\tfeaturedImageSizeHeight,\n\t\taddLinkToFeaturedImage,\n\t} = attributes;\n\tconst {\n\t\timageSizes,\n\t\tlatestPosts,\n\t\tdefaultImageWidth,\n\t\tdefaultImageHeight,\n\t\tcategoriesList,\n\t\tauthorList,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecords, getUsers } = select( coreStore );\n\t\t\tconst settings = select( blockEditorStore ).getSettings();\n\t\t\tconst catIds =\n\t\t\t\tcategories && categories.length > 0\n\t\t\t\t\t? categories.map( ( cat ) => cat.id )\n\t\t\t\t\t: [];\n\t\t\tconst latestPostsQuery = Object.fromEntries(\n\t\t\t\tObject.entries( {\n\t\t\t\t\tcategories: catIds,\n\t\t\t\t\tauthor: selectedAuthor,\n\t\t\t\t\torder,\n\t\t\t\t\torderby: orderBy,\n\t\t\t\t\tper_page: postsToShow,\n\t\t\t\t\t_embed: 'wp:featuredmedia',\n\t\t\t\t} ).filter( ( [ , value ] ) => typeof value !== 'undefined' )\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tdefaultImageWidth:\n\t\t\t\t\tsettings.imageDimensions?.[ featuredImageSizeSlug ]\n\t\t\t\t\t\t?.width ?? 0,\n\t\t\t\tdefaultImageHeight:\n\t\t\t\t\tsettings.imageDimensions?.[ featuredImageSizeSlug ]\n\t\t\t\t\t\t?.height ?? 0,\n\t\t\t\timageSizes: settings.imageSizes,\n\t\t\t\tlatestPosts: getEntityRecords(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'post',\n\t\t\t\t\tlatestPostsQuery\n\t\t\t\t),\n\t\t\t\tcategoriesList: getEntityRecords(\n\t\t\t\t\t'taxonomy',\n\t\t\t\t\t'category',\n\t\t\t\t\tCATEGORIES_LIST_QUERY\n\t\t\t\t),\n\t\t\t\tauthorList: getUsers( USERS_LIST_QUERY ),\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tfeaturedImageSizeSlug,\n\t\t\tpostsToShow,\n\t\t\torder,\n\t\t\torderBy,\n\t\t\tcategories,\n\t\t\tselectedAuthor,\n\t\t]\n\t);\n\n\t// If a user clicks to a link prevent redirection and show a warning.\n\tconst { createWarningNotice, removeNotice } = useDispatch( noticeStore );\n\tlet noticeId;\n\tconst showRedirectionPreventedNotice = ( event ) => {\n\t\tevent.preventDefault();\n\t\t// Remove previous warning if any, to show one at a time per block.\n\t\tremoveNotice( noticeId );\n\t\tnoticeId = `block-library/core/latest-posts/redirection-prevented/${ instanceId }`;\n\t\tcreateWarningNotice( __( 'Links are disabled in the editor.' ), {\n\t\t\tid: noticeId,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t};\n\n\tconst imageSizeOptions = imageSizes\n\t\t.filter( ( { slug } ) => slug !== 'full' )\n\t\t.map( ( { name, slug } ) => ( {\n\t\t\tvalue: slug,\n\t\t\tlabel: name,\n\t\t} ) );\n\tconst categorySuggestions =\n\t\tcategoriesList?.reduce(\n\t\t\t( accumulator, category ) => ( {\n\t\t\t\t...accumulator,\n\t\t\t\t[ category.name ]: category,\n\t\t\t} ),\n\t\t\t{}\n\t\t) ?? {};\n\tconst selectCategories = ( tokens ) => {\n\t\tconst hasNoSuggestion = tokens.some(\n\t\t\t( token ) =>\n\t\t\t\ttypeof token === 'string' && ! categorySuggestions[ token ]\n\t\t);\n\t\tif ( hasNoSuggestion ) {\n\t\t\treturn;\n\t\t}\n\t\t// Categories that are already will be objects, while new additions will be strings (the name).\n\t\t// allCategories nomalizes the array so that they are all objects.\n\t\tconst allCategories = tokens.map( ( token ) => {\n\t\t\treturn typeof token === 'string'\n\t\t\t\t? categorySuggestions[ token ]\n\t\t\t\t: token;\n\t\t} );\n\t\t// We do nothing if the category is not selected\n\t\t// from suggestions.\n\t\tif ( allCategories.includes( null ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tsetAttributes( { categories: allCategories } );\n\t};\n\n\tconst hasPosts = !! latestPosts?.length;\n\tconst inspectorControls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Post content' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'Post content' ) }\n\t\t\t\t\tchecked={ displayPostContent }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { displayPostContent: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t{ displayPostContent && (\n\t\t\t\t\t<RadioControl\n\t\t\t\t\t\tlabel={ __( 'Show:' ) }\n\t\t\t\t\t\tselected={ displayPostContentRadio }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t{ label: __( 'Excerpt' ), value: 'excerpt' },\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Full post' ),\n\t\t\t\t\t\t\t\tvalue: 'full_post',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tdisplayPostContentRadio: value,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ displayPostContent &&\n\t\t\t\t\tdisplayPostContentRadio === 'excerpt' && (\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tlabel={ __( 'Max number of words' ) }\n\t\t\t\t\t\t\tvalue={ excerptLength }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { excerptLength: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmin={ MIN_EXCERPT_LENGTH }\n\t\t\t\t\t\t\tmax={ MAX_EXCERPT_LENGTH }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t</PanelBody>\n\n\t\t\t<PanelBody title={ __( 'Post meta' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Display author name' ) }\n\t\t\t\t\tchecked={ displayAuthor }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { displayAuthor: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Display post date' ) }\n\t\t\t\t\tchecked={ displayPostDate }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { displayPostDate: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\n\t\t\t<PanelBody title={ __( 'Featured image' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Display featured image' ) }\n\t\t\t\t\tchecked={ displayFeaturedImage }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { displayFeaturedImage: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t{ displayFeaturedImage && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<ImageSizeControl\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tconst newAttrs = {};\n\t\t\t\t\t\t\t\tif ( value.hasOwnProperty( 'width' ) ) {\n\t\t\t\t\t\t\t\t\tnewAttrs.featuredImageSizeWidth =\n\t\t\t\t\t\t\t\t\t\tvalue.width;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( value.hasOwnProperty( 'height' ) ) {\n\t\t\t\t\t\t\t\t\tnewAttrs.featuredImageSizeHeight =\n\t\t\t\t\t\t\t\t\t\tvalue.height;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsetAttributes( newAttrs );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tslug={ featuredImageSizeSlug }\n\t\t\t\t\t\t\twidth={ featuredImageSizeWidth }\n\t\t\t\t\t\t\theight={ featuredImageSizeHeight }\n\t\t\t\t\t\t\timageWidth={ defaultImageWidth }\n\t\t\t\t\t\t\timageHeight={ defaultImageHeight }\n\t\t\t\t\t\t\timageSizeOptions={ imageSizeOptions }\n\t\t\t\t\t\t\timageSizeHelp={ __(\n\t\t\t\t\t\t\t\t'Select the size of the source image.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonChangeImage={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tfeaturedImageSizeSlug: value,\n\t\t\t\t\t\t\t\t\tfeaturedImageSizeWidth: undefined,\n\t\t\t\t\t\t\t\t\tfeaturedImageSizeHeight: undefined,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<BaseControl className=\"editor-latest-posts-image-alignment-control\">\n\t\t\t\t\t\t\t<BaseControl.VisualLabel>\n\t\t\t\t\t\t\t\t{ __( 'Image alignment' ) }\n\t\t\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t\t\t\t<BlockAlignmentToolbar\n\t\t\t\t\t\t\t\tvalue={ featuredImageAlign }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tfeaturedImageAlign: value,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcontrols={ [ 'left', 'center', 'right' ] }\n\t\t\t\t\t\t\t\tisCollapsed={ false }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</BaseControl>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Add link to featured image' ) }\n\t\t\t\t\t\t\tchecked={ addLinkToFeaturedImage }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\taddLinkToFeaturedImage: value,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</PanelBody>\n\n\t\t\t<PanelBody title={ __( 'Sorting and filtering' ) }>\n\t\t\t\t<QueryControls\n\t\t\t\t\t{ ...{ order, orderBy } }\n\t\t\t\t\tnumberOfItems={ postsToShow }\n\t\t\t\t\tonOrderChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { order: value } )\n\t\t\t\t\t}\n\t\t\t\t\tonOrderByChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { orderBy: value } )\n\t\t\t\t\t}\n\t\t\t\t\tonNumberOfItemsChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { postsToShow: value } )\n\t\t\t\t\t}\n\t\t\t\t\tcategorySuggestions={ categorySuggestions }\n\t\t\t\t\tonCategoryChange={ selectCategories }\n\t\t\t\t\tselectedCategories={ categories }\n\t\t\t\t\tonAuthorChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tselectedAuthor:\n\t\t\t\t\t\t\t\t'' !== value ? Number( value ) : undefined,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tauthorList={ authorList ?? [] }\n\t\t\t\t\tselectedAuthorId={ selectedAuthor }\n\t\t\t\t/>\n\n\t\t\t\t{ postLayout === 'grid' && (\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ __( 'Columns' ) }\n\t\t\t\t\t\tvalue={ columns }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { columns: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmin={ 2 }\n\t\t\t\t\t\tmax={\n\t\t\t\t\t\t\t! hasPosts\n\t\t\t\t\t\t\t\t? MAX_POSTS_COLUMNS\n\t\t\t\t\t\t\t\t: Math.min(\n\t\t\t\t\t\t\t\t\t\tMAX_POSTS_COLUMNS,\n\t\t\t\t\t\t\t\t\t\tlatestPosts.length\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t}\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t'wp-block-latest-posts__list': true,\n\t\t\t'is-grid': postLayout === 'grid',\n\t\t\t'has-dates': displayPostDate,\n\t\t\t'has-author': displayAuthor,\n\t\t\t[ `columns-${ columns }` ]: postLayout === 'grid',\n\t\t} ),\n\t} );\n\n\tif ( ! hasPosts ) {\n\t\treturn (\n\t\t\t<div { ...blockProps }>\n\t\t\t\t{ inspectorControls }\n\t\t\t\t<Placeholder icon={ pin } label={ __( 'Latest Posts' ) }>\n\t\t\t\t\t{ ! Array.isArray( latestPosts ) ? (\n\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t__( 'No posts found.' )\n\t\t\t\t\t) }\n\t\t\t\t</Placeholder>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Removing posts from display should be instant.\n\tconst displayPosts =\n\t\tlatestPosts.length > postsToShow\n\t\t\t? latestPosts.slice( 0, postsToShow )\n\t\t\t: latestPosts;\n\n\tconst layoutControls = [\n\t\t{\n\t\t\ticon: list,\n\t\t\ttitle: _x( 'List view', 'Latest posts block display setting' ),\n\t\t\tonClick: () => setAttributes( { postLayout: 'list' } ),\n\t\t\tisActive: postLayout === 'list',\n\t\t},\n\t\t{\n\t\t\ticon: grid,\n\t\t\ttitle: _x( 'Grid view', 'Latest posts block display setting' ),\n\t\t\tonClick: () => setAttributes( { postLayout: 'grid' } ),\n\t\t\tisActive: postLayout === 'grid',\n\t\t},\n\t];\n\n\tconst dateFormat = getSettings().formats.date;\n\n\treturn (\n\t\t<>\n\t\t\t{ inspectorControls }\n\t\t\t<BlockControls>\n\t\t\t\t<ToolbarGroup controls={ layoutControls } />\n\t\t\t</BlockControls>\n\t\t\t<ul { ...blockProps }>\n\t\t\t\t{ displayPosts.map( ( post ) => {\n\t\t\t\t\tconst titleTrimmed = post.title.rendered.trim();\n\t\t\t\t\tlet excerpt = post.excerpt.rendered;\n\t\t\t\t\tconst currentAuthor = authorList?.find(\n\t\t\t\t\t\t( author ) => author.id === post.author\n\t\t\t\t\t);\n\n\t\t\t\t\tconst excerptElement = document.createElement( 'div' );\n\t\t\t\t\texcerptElement.innerHTML = excerpt;\n\n\t\t\t\t\texcerpt =\n\t\t\t\t\t\texcerptElement.textContent ||\n\t\t\t\t\t\texcerptElement.innerText ||\n\t\t\t\t\t\t'';\n\n\t\t\t\t\tconst { url: imageSourceUrl, alt: featuredImageAlt } =\n\t\t\t\t\t\tgetFeaturedImageDetails( post, featuredImageSizeSlug );\n\t\t\t\t\tconst imageClasses = clsx( {\n\t\t\t\t\t\t'wp-block-latest-posts__featured-image': true,\n\t\t\t\t\t\t[ `align${ featuredImageAlign }` ]:\n\t\t\t\t\t\t\t!! featuredImageAlign,\n\t\t\t\t\t} );\n\t\t\t\t\tconst renderFeaturedImage =\n\t\t\t\t\t\tdisplayFeaturedImage && imageSourceUrl;\n\t\t\t\t\tconst featuredImage = renderFeaturedImage && (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={ imageSourceUrl }\n\t\t\t\t\t\t\talt={ featuredImageAlt }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\tmaxWidth: featuredImageSizeWidth,\n\t\t\t\t\t\t\t\tmaxHeight: featuredImageSizeHeight,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\n\t\t\t\t\tconst needsReadMore =\n\t\t\t\t\t\texcerptLength < excerpt.trim().split( ' ' ).length &&\n\t\t\t\t\t\tpost.excerpt.raw === '';\n\n\t\t\t\t\tconst postExcerpt = needsReadMore ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ excerpt\n\t\t\t\t\t\t\t\t.trim()\n\t\t\t\t\t\t\t\t.split( ' ', excerptLength )\n\t\t\t\t\t\t\t\t.join( ' ' ) }\n\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t/* translators: 1: Hidden accessibility text: Post title */\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'… <a>Read more<span>: %1$s</span></a>'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\ttitleTrimmed || __( '(no title)' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"wp-block-latest-posts__read-more\"\n\t\t\t\t\t\t\t\t\t\t\thref={ post.link }\n\t\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\t\t\t\t\tshowRedirectionPreventedNotice\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tspan: (\n\t\t\t\t\t\t\t\t\t\t<span className=\"screen-reader-text\" />\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</>\n\t\t\t\t\t) : (\n\t\t\t\t\t\texcerpt\n\t\t\t\t\t);\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<li key={ post.id }>\n\t\t\t\t\t\t\t{ renderFeaturedImage && (\n\t\t\t\t\t\t\t\t<div className={ imageClasses }>\n\t\t\t\t\t\t\t\t\t{ addLinkToFeaturedImage ? (\n\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\thref={ post.link }\n\t\t\t\t\t\t\t\t\t\t\trel=\"noreferrer noopener\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\t\t\t\t\tshowRedirectionPreventedNotice\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ featuredImage }\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\tfeaturedImage\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\tclassName=\"wp-block-latest-posts__post-title\"\n\t\t\t\t\t\t\t\thref={ post.link }\n\t\t\t\t\t\t\t\trel=\"noreferrer noopener\"\n\t\t\t\t\t\t\t\tdangerouslySetInnerHTML={\n\t\t\t\t\t\t\t\t\t!! titleTrimmed\n\t\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t\t__html: titleTrimmed,\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonClick={ showRedirectionPreventedNotice }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ ! titleTrimmed ? __( '(no title)' ) : null }\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t{ displayAuthor && currentAuthor && (\n\t\t\t\t\t\t\t\t<div className=\"wp-block-latest-posts__post-author\">\n\t\t\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: byline. %s: current author. */\n\t\t\t\t\t\t\t\t\t\t__( 'by %s' ),\n\t\t\t\t\t\t\t\t\t\tcurrentAuthor.name\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ displayPostDate && post.date_gmt && (\n\t\t\t\t\t\t\t\t<time\n\t\t\t\t\t\t\t\t\tdateTime={ format( 'c', post.date_gmt ) }\n\t\t\t\t\t\t\t\t\tclassName=\"wp-block-latest-posts__post-date\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ dateI18n( dateFormat, post.date_gmt ) }\n\t\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ displayPostContent &&\n\t\t\t\t\t\t\t\tdisplayPostContentRadio === 'excerpt' && (\n\t\t\t\t\t\t\t\t\t<div className=\"wp-block-latest-posts__post-excerpt\">\n\t\t\t\t\t\t\t\t\t\t{ postExcerpt }\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ displayPostContent &&\n\t\t\t\t\t\t\t\tdisplayPostContentRadio === 'full_post' && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tclassName=\"wp-block-latest-posts__post-full-content\"\n\t\t\t\t\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t\t\t\t\t__html: post.content.raw.trim(),\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</ul>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAWA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAQA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAA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AAC,CAClC,CACN,EACC/K,kBAAkB,IACnBD,uBAAuB,KAAK,SAAS,iBACpC,IAAA9B,WAAA,CAAA2G,GAAA;YAAKwB,SAAS,EAAC,qCAAqC;YAAA3B,QAAA,EACjD2F;UAAW,CACT,CACL,EACApK,kBAAkB,IACnBD,uBAAuB,KAAK,WAAW,iBACtC,IAAA9B,WAAA,CAAA2G,GAAA;YACCwB,SAAS,EAAC,0CAA0C;YACpDyE,uBAAuB,EAAG;cACzBC,MAAM,EAAEtM,IAAI,CAAC2M,OAAO,CAAChB,GAAG,CAACrB,IAAI,CAAC;YAC/B;UAAG,CACH,CACD;QAAA,GAhEOtK,IAAI,CAACuD,EAiEX,CAAC;MAEP,CAAE;IAAC,CACA,CAAC;EAAA,CACJ,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_components","_i18n","_date","_blockEditor","_data","_icons","_coreData","_notices","_compose","_element","_constants","_jsxRuntime","CATEGORIES_LIST_QUERY","per_page","context","USERS_LIST_QUERY","has_published_posts","getFeaturedImageDetails","post","size","_image$media_details$","image","_embedded","url","media_details","sizes","source_url","alt","alt_text","LatestPostsEdit","attributes","setAttributes","_categoriesList$reduc","instanceId","useInstanceId","postsToShow","order","orderBy","categories","selectedAuthor","displayFeaturedImage","displayPostContentRadio","displayPostContent","displayPostDate","displayAuthor","postLayout","columns","excerptLength","featuredImageAlign","featuredImageSizeSlug","featuredImageSizeWidth","featuredImageSizeHeight","addLinkToFeaturedImage","imageSizes","latestPosts","defaultImageWidth","defaultImageHeight","categoriesList","authorList","useSelect","select","_settings$imageDimens","_settings$imageDimens2","getEntityRecords","getUsers","coreStore","settings","blockEditorStore","getSettings","catIds","length","map","cat","id","latestPostsQuery","Object","fromEntries","entries","author","orderby","_embed","filter","value","imageDimensions","width","height","createWarningNotice","removeNotice","useDispatch","noticeStore","noticeId","showRedirectionPreventedNotice","event","preventDefault","__","type","imageSizeOptions","slug","name","label","categorySuggestions","reduce","accumulator","category","selectCategories","tokens","hasNoSuggestion","some","token","allCategories","includes","hasPosts","inspectorControls","jsxs","InspectorControls","children","PanelBody","title","jsx","ToggleControl","__nextHasNoMarginBottom","checked","onChange","RadioControl","selected","options","RangeControl","__next40pxDefaultSize","min","MIN_EXCERPT_LENGTH","max","MAX_EXCERPT_LENGTH","Fragment","__experimentalImageSizeControl","newAttrs","hasOwnProperty","imageWidth","imageHeight","imageSizeHelp","onChangeImage","undefined","BaseControl","className","VisualLabel","BlockAlignmentToolbar","controls","isCollapsed","QueryControls","numberOfItems","onOrderChange","onOrderByChange","onNumberOfItemsChange","onCategoryChange","selectedCategories","onAuthorChange","Number","selectedAuthorId","MAX_POSTS_COLUMNS","Math","required","blockProps","useBlockProps","clsx","Placeholder","icon","pin","Array","isArray","Spinner","displayPosts","slice","layoutControls","list","_x","onClick","isActive","grid","dateFormat","formats","date","BlockControls","ToolbarGroup","titleTrimmed","rendered","trim","excerpt","currentAuthor","find","excerptElement","document","createElement","innerHTML","textContent","innerText","imageSourceUrl","featuredImageAlt","imageClasses","renderFeaturedImage","featuredImage","src","style","maxWidth","maxHeight","needsReadMore","split","raw","postExcerpt","join","createInterpolateElement","sprintf","a","href","link","rel","span","dangerouslySetInnerHTML","__html","date_gmt","dateTime","format","dateI18n","content"],"sources":["@wordpress/block-library/src/latest-posts/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBaseControl,\n\tPanelBody,\n\tPlaceholder,\n\tQueryControls,\n\tRadioControl,\n\tRangeControl,\n\tSpinner,\n\tToggleControl,\n\tToolbarGroup,\n} from '@wordpress/components';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { dateI18n, format, getSettings } from '@wordpress/date';\nimport {\n\tInspectorControls,\n\tBlockAlignmentToolbar,\n\tBlockControls,\n\t__experimentalImageSizeControl as ImageSizeControl,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { pin, list, grid } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticeStore } from '@wordpress/notices';\nimport { useInstanceId } from '@wordpress/compose';\nimport { createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tMIN_EXCERPT_LENGTH,\n\tMAX_EXCERPT_LENGTH,\n\tMAX_POSTS_COLUMNS,\n} from './constants';\n\n/**\n * Module Constants\n */\nconst CATEGORIES_LIST_QUERY = {\n\tper_page: -1,\n\tcontext: 'view',\n};\nconst USERS_LIST_QUERY = {\n\tper_page: -1,\n\thas_published_posts: [ 'post' ],\n\tcontext: 'view',\n};\n\nfunction getFeaturedImageDetails( post, size ) {\n\tconst image = post._embedded?.[ 'wp:featuredmedia' ]?.[ '0' ];\n\n\treturn {\n\t\turl:\n\t\t\timage?.media_details?.sizes?.[ size ]?.source_url ??\n\t\t\timage?.source_url,\n\t\talt: image?.alt_text,\n\t};\n}\n\nexport default function LatestPostsEdit( { attributes, setAttributes } ) {\n\tconst instanceId = useInstanceId( LatestPostsEdit );\n\tconst {\n\t\tpostsToShow,\n\t\torder,\n\t\torderBy,\n\t\tcategories,\n\t\tselectedAuthor,\n\t\tdisplayFeaturedImage,\n\t\tdisplayPostContentRadio,\n\t\tdisplayPostContent,\n\t\tdisplayPostDate,\n\t\tdisplayAuthor,\n\t\tpostLayout,\n\t\tcolumns,\n\t\texcerptLength,\n\t\tfeaturedImageAlign,\n\t\tfeaturedImageSizeSlug,\n\t\tfeaturedImageSizeWidth,\n\t\tfeaturedImageSizeHeight,\n\t\taddLinkToFeaturedImage,\n\t} = attributes;\n\tconst {\n\t\timageSizes,\n\t\tlatestPosts,\n\t\tdefaultImageWidth,\n\t\tdefaultImageHeight,\n\t\tcategoriesList,\n\t\tauthorList,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecords, getUsers } = select( coreStore );\n\t\t\tconst settings = select( blockEditorStore ).getSettings();\n\t\t\tconst catIds =\n\t\t\t\tcategories && categories.length > 0\n\t\t\t\t\t? categories.map( ( cat ) => cat.id )\n\t\t\t\t\t: [];\n\t\t\tconst latestPostsQuery = Object.fromEntries(\n\t\t\t\tObject.entries( {\n\t\t\t\t\tcategories: catIds,\n\t\t\t\t\tauthor: selectedAuthor,\n\t\t\t\t\torder,\n\t\t\t\t\torderby: orderBy,\n\t\t\t\t\tper_page: postsToShow,\n\t\t\t\t\t_embed: 'wp:featuredmedia',\n\t\t\t\t} ).filter( ( [ , value ] ) => typeof value !== 'undefined' )\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tdefaultImageWidth:\n\t\t\t\t\tsettings.imageDimensions?.[ featuredImageSizeSlug ]\n\t\t\t\t\t\t?.width ?? 0,\n\t\t\t\tdefaultImageHeight:\n\t\t\t\t\tsettings.imageDimensions?.[ featuredImageSizeSlug ]\n\t\t\t\t\t\t?.height ?? 0,\n\t\t\t\timageSizes: settings.imageSizes,\n\t\t\t\tlatestPosts: getEntityRecords(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'post',\n\t\t\t\t\tlatestPostsQuery\n\t\t\t\t),\n\t\t\t\tcategoriesList: getEntityRecords(\n\t\t\t\t\t'taxonomy',\n\t\t\t\t\t'category',\n\t\t\t\t\tCATEGORIES_LIST_QUERY\n\t\t\t\t),\n\t\t\t\tauthorList: getUsers( USERS_LIST_QUERY ),\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tfeaturedImageSizeSlug,\n\t\t\tpostsToShow,\n\t\t\torder,\n\t\t\torderBy,\n\t\t\tcategories,\n\t\t\tselectedAuthor,\n\t\t]\n\t);\n\n\t// If a user clicks to a link prevent redirection and show a warning.\n\tconst { createWarningNotice, removeNotice } = useDispatch( noticeStore );\n\tlet noticeId;\n\tconst showRedirectionPreventedNotice = ( event ) => {\n\t\tevent.preventDefault();\n\t\t// Remove previous warning if any, to show one at a time per block.\n\t\tremoveNotice( noticeId );\n\t\tnoticeId = `block-library/core/latest-posts/redirection-prevented/${ instanceId }`;\n\t\tcreateWarningNotice( __( 'Links are disabled in the editor.' ), {\n\t\t\tid: noticeId,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t};\n\n\tconst imageSizeOptions = imageSizes\n\t\t.filter( ( { slug } ) => slug !== 'full' )\n\t\t.map( ( { name, slug } ) => ( {\n\t\t\tvalue: slug,\n\t\t\tlabel: name,\n\t\t} ) );\n\tconst categorySuggestions =\n\t\tcategoriesList?.reduce(\n\t\t\t( accumulator, category ) => ( {\n\t\t\t\t...accumulator,\n\t\t\t\t[ category.name ]: category,\n\t\t\t} ),\n\t\t\t{}\n\t\t) ?? {};\n\tconst selectCategories = ( tokens ) => {\n\t\tconst hasNoSuggestion = tokens.some(\n\t\t\t( token ) =>\n\t\t\t\ttypeof token === 'string' && ! categorySuggestions[ token ]\n\t\t);\n\t\tif ( hasNoSuggestion ) {\n\t\t\treturn;\n\t\t}\n\t\t// Categories that are already will be objects, while new additions will be strings (the name).\n\t\t// allCategories nomalizes the array so that they are all objects.\n\t\tconst allCategories = tokens.map( ( token ) => {\n\t\t\treturn typeof token === 'string'\n\t\t\t\t? categorySuggestions[ token ]\n\t\t\t\t: token;\n\t\t} );\n\t\t// We do nothing if the category is not selected\n\t\t// from suggestions.\n\t\tif ( allCategories.includes( null ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tsetAttributes( { categories: allCategories } );\n\t};\n\n\tconst hasPosts = !! latestPosts?.length;\n\tconst inspectorControls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Post content' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Post content' ) }\n\t\t\t\t\tchecked={ displayPostContent }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { displayPostContent: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t{ displayPostContent && (\n\t\t\t\t\t<RadioControl\n\t\t\t\t\t\tlabel={ __( 'Show:' ) }\n\t\t\t\t\t\tselected={ displayPostContentRadio }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t{ label: __( 'Excerpt' ), value: 'excerpt' },\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Full post' ),\n\t\t\t\t\t\t\t\tvalue: 'full_post',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tdisplayPostContentRadio: value,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ displayPostContent &&\n\t\t\t\t\tdisplayPostContentRadio === 'excerpt' && (\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tlabel={ __( 'Max number of words' ) }\n\t\t\t\t\t\t\tvalue={ excerptLength }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { excerptLength: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmin={ MIN_EXCERPT_LENGTH }\n\t\t\t\t\t\t\tmax={ MAX_EXCERPT_LENGTH }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t</PanelBody>\n\n\t\t\t<PanelBody title={ __( 'Post meta' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Display author name' ) }\n\t\t\t\t\tchecked={ displayAuthor }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { displayAuthor: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Display post date' ) }\n\t\t\t\t\tchecked={ displayPostDate }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { displayPostDate: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\n\t\t\t<PanelBody title={ __( 'Featured image' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Display featured image' ) }\n\t\t\t\t\tchecked={ displayFeaturedImage }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { displayFeaturedImage: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t{ displayFeaturedImage && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<ImageSizeControl\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tconst newAttrs = {};\n\t\t\t\t\t\t\t\tif ( value.hasOwnProperty( 'width' ) ) {\n\t\t\t\t\t\t\t\t\tnewAttrs.featuredImageSizeWidth =\n\t\t\t\t\t\t\t\t\t\tvalue.width;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( value.hasOwnProperty( 'height' ) ) {\n\t\t\t\t\t\t\t\t\tnewAttrs.featuredImageSizeHeight =\n\t\t\t\t\t\t\t\t\t\tvalue.height;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsetAttributes( newAttrs );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tslug={ featuredImageSizeSlug }\n\t\t\t\t\t\t\twidth={ featuredImageSizeWidth }\n\t\t\t\t\t\t\theight={ featuredImageSizeHeight }\n\t\t\t\t\t\t\timageWidth={ defaultImageWidth }\n\t\t\t\t\t\t\timageHeight={ defaultImageHeight }\n\t\t\t\t\t\t\timageSizeOptions={ imageSizeOptions }\n\t\t\t\t\t\t\timageSizeHelp={ __(\n\t\t\t\t\t\t\t\t'Select the size of the source image.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonChangeImage={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tfeaturedImageSizeSlug: value,\n\t\t\t\t\t\t\t\t\tfeaturedImageSizeWidth: undefined,\n\t\t\t\t\t\t\t\t\tfeaturedImageSizeHeight: undefined,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<BaseControl className=\"editor-latest-posts-image-alignment-control\">\n\t\t\t\t\t\t\t<BaseControl.VisualLabel>\n\t\t\t\t\t\t\t\t{ __( 'Image alignment' ) }\n\t\t\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t\t\t\t<BlockAlignmentToolbar\n\t\t\t\t\t\t\t\tvalue={ featuredImageAlign }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tfeaturedImageAlign: value,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcontrols={ [ 'left', 'center', 'right' ] }\n\t\t\t\t\t\t\t\tisCollapsed={ false }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</BaseControl>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Add link to featured image' ) }\n\t\t\t\t\t\t\tchecked={ addLinkToFeaturedImage }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\taddLinkToFeaturedImage: value,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</PanelBody>\n\n\t\t\t<PanelBody title={ __( 'Sorting and filtering' ) }>\n\t\t\t\t<QueryControls\n\t\t\t\t\t{ ...{ order, orderBy } }\n\t\t\t\t\tnumberOfItems={ postsToShow }\n\t\t\t\t\tonOrderChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { order: value } )\n\t\t\t\t\t}\n\t\t\t\t\tonOrderByChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { orderBy: value } )\n\t\t\t\t\t}\n\t\t\t\t\tonNumberOfItemsChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { postsToShow: value } )\n\t\t\t\t\t}\n\t\t\t\t\tcategorySuggestions={ categorySuggestions }\n\t\t\t\t\tonCategoryChange={ selectCategories }\n\t\t\t\t\tselectedCategories={ categories }\n\t\t\t\t\tonAuthorChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tselectedAuthor:\n\t\t\t\t\t\t\t\t'' !== value ? Number( value ) : undefined,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tauthorList={ authorList ?? [] }\n\t\t\t\t\tselectedAuthorId={ selectedAuthor }\n\t\t\t\t/>\n\n\t\t\t\t{ postLayout === 'grid' && (\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ __( 'Columns' ) }\n\t\t\t\t\t\tvalue={ columns }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { columns: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmin={ 2 }\n\t\t\t\t\t\tmax={\n\t\t\t\t\t\t\t! hasPosts\n\t\t\t\t\t\t\t\t? MAX_POSTS_COLUMNS\n\t\t\t\t\t\t\t\t: Math.min(\n\t\t\t\t\t\t\t\t\t\tMAX_POSTS_COLUMNS,\n\t\t\t\t\t\t\t\t\t\tlatestPosts.length\n\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t}\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t'wp-block-latest-posts__list': true,\n\t\t\t'is-grid': postLayout === 'grid',\n\t\t\t'has-dates': displayPostDate,\n\t\t\t'has-author': displayAuthor,\n\t\t\t[ `columns-${ columns }` ]: postLayout === 'grid',\n\t\t} ),\n\t} );\n\n\tif ( ! hasPosts ) {\n\t\treturn (\n\t\t\t<div { ...blockProps }>\n\t\t\t\t{ inspectorControls }\n\t\t\t\t<Placeholder icon={ pin } label={ __( 'Latest Posts' ) }>\n\t\t\t\t\t{ ! Array.isArray( latestPosts ) ? (\n\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t__( 'No posts found.' )\n\t\t\t\t\t) }\n\t\t\t\t</Placeholder>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Removing posts from display should be instant.\n\tconst displayPosts =\n\t\tlatestPosts.length > postsToShow\n\t\t\t? latestPosts.slice( 0, postsToShow )\n\t\t\t: latestPosts;\n\n\tconst layoutControls = [\n\t\t{\n\t\t\ticon: list,\n\t\t\ttitle: _x( 'List view', 'Latest posts block display setting' ),\n\t\t\tonClick: () => setAttributes( { postLayout: 'list' } ),\n\t\t\tisActive: postLayout === 'list',\n\t\t},\n\t\t{\n\t\t\ticon: grid,\n\t\t\ttitle: _x( 'Grid view', 'Latest posts block display setting' ),\n\t\t\tonClick: () => setAttributes( { postLayout: 'grid' } ),\n\t\t\tisActive: postLayout === 'grid',\n\t\t},\n\t];\n\n\tconst dateFormat = getSettings().formats.date;\n\n\treturn (\n\t\t<>\n\t\t\t{ inspectorControls }\n\t\t\t<BlockControls>\n\t\t\t\t<ToolbarGroup controls={ layoutControls } />\n\t\t\t</BlockControls>\n\t\t\t<ul { ...blockProps }>\n\t\t\t\t{ displayPosts.map( ( post ) => {\n\t\t\t\t\tconst titleTrimmed = post.title.rendered.trim();\n\t\t\t\t\tlet excerpt = post.excerpt.rendered;\n\t\t\t\t\tconst currentAuthor = authorList?.find(\n\t\t\t\t\t\t( author ) => author.id === post.author\n\t\t\t\t\t);\n\n\t\t\t\t\tconst excerptElement = document.createElement( 'div' );\n\t\t\t\t\texcerptElement.innerHTML = excerpt;\n\n\t\t\t\t\texcerpt =\n\t\t\t\t\t\texcerptElement.textContent ||\n\t\t\t\t\t\texcerptElement.innerText ||\n\t\t\t\t\t\t'';\n\n\t\t\t\t\tconst { url: imageSourceUrl, alt: featuredImageAlt } =\n\t\t\t\t\t\tgetFeaturedImageDetails( post, featuredImageSizeSlug );\n\t\t\t\t\tconst imageClasses = clsx( {\n\t\t\t\t\t\t'wp-block-latest-posts__featured-image': true,\n\t\t\t\t\t\t[ `align${ featuredImageAlign }` ]:\n\t\t\t\t\t\t\t!! featuredImageAlign,\n\t\t\t\t\t} );\n\t\t\t\t\tconst renderFeaturedImage =\n\t\t\t\t\t\tdisplayFeaturedImage && imageSourceUrl;\n\t\t\t\t\tconst featuredImage = renderFeaturedImage && (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={ imageSourceUrl }\n\t\t\t\t\t\t\talt={ featuredImageAlt }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\tmaxWidth: featuredImageSizeWidth,\n\t\t\t\t\t\t\t\tmaxHeight: featuredImageSizeHeight,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\n\t\t\t\t\tconst needsReadMore =\n\t\t\t\t\t\texcerptLength < excerpt.trim().split( ' ' ).length &&\n\t\t\t\t\t\tpost.excerpt.raw === '';\n\n\t\t\t\t\tconst postExcerpt = needsReadMore ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ excerpt\n\t\t\t\t\t\t\t\t.trim()\n\t\t\t\t\t\t\t\t.split( ' ', excerptLength )\n\t\t\t\t\t\t\t\t.join( ' ' ) }\n\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t/* translators: 1: Hidden accessibility text: Post title */\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'… <a>Read more<span>: %1$s</span></a>'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\ttitleTrimmed || __( '(no title)' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"wp-block-latest-posts__read-more\"\n\t\t\t\t\t\t\t\t\t\t\thref={ post.link }\n\t\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\t\t\t\t\tshowRedirectionPreventedNotice\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tspan: (\n\t\t\t\t\t\t\t\t\t\t<span className=\"screen-reader-text\" />\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</>\n\t\t\t\t\t) : (\n\t\t\t\t\t\texcerpt\n\t\t\t\t\t);\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<li key={ post.id }>\n\t\t\t\t\t\t\t{ renderFeaturedImage && (\n\t\t\t\t\t\t\t\t<div className={ imageClasses }>\n\t\t\t\t\t\t\t\t\t{ addLinkToFeaturedImage ? (\n\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\thref={ post.link }\n\t\t\t\t\t\t\t\t\t\t\trel=\"noreferrer noopener\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\t\t\t\t\tshowRedirectionPreventedNotice\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ featuredImage }\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\tfeaturedImage\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\tclassName=\"wp-block-latest-posts__post-title\"\n\t\t\t\t\t\t\t\thref={ post.link }\n\t\t\t\t\t\t\t\trel=\"noreferrer noopener\"\n\t\t\t\t\t\t\t\tdangerouslySetInnerHTML={\n\t\t\t\t\t\t\t\t\t!! titleTrimmed\n\t\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t\t__html: titleTrimmed,\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonClick={ showRedirectionPreventedNotice }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ ! titleTrimmed ? __( '(no title)' ) : null }\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t{ displayAuthor && currentAuthor && (\n\t\t\t\t\t\t\t\t<div className=\"wp-block-latest-posts__post-author\">\n\t\t\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: byline. %s: current author. */\n\t\t\t\t\t\t\t\t\t\t__( 'by %s' ),\n\t\t\t\t\t\t\t\t\t\tcurrentAuthor.name\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ displayPostDate && post.date_gmt && (\n\t\t\t\t\t\t\t\t<time\n\t\t\t\t\t\t\t\t\tdateTime={ format( 'c', post.date_gmt ) }\n\t\t\t\t\t\t\t\t\tclassName=\"wp-block-latest-posts__post-date\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ dateI18n( dateFormat, post.date_gmt ) }\n\t\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ displayPostContent &&\n\t\t\t\t\t\t\t\tdisplayPostContentRadio === 'excerpt' && (\n\t\t\t\t\t\t\t\t\t<div className=\"wp-block-latest-posts__post-excerpt\">\n\t\t\t\t\t\t\t\t\t\t{ postExcerpt }\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ displayPostContent &&\n\t\t\t\t\t\t\t\tdisplayPostContentRadio === 'full_post' && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tclassName=\"wp-block-latest-posts__post-full-content\"\n\t\t\t\t\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t\t\t\t\t__html: post.content.raw.trim(),\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</li>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</ul>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAWA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAQA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AAKA,IAAAW,UAA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EACjD2F;UAAW,CACT,CACL,EACApK,kBAAkB,IACnBD,uBAAuB,KAAK,WAAW,iBACtC,IAAA9B,WAAA,CAAA2G,GAAA;YACCwB,SAAS,EAAC,0CAA0C;YACpDyE,uBAAuB,EAAG;cACzBC,MAAM,EAAEtM,IAAI,CAAC2M,OAAO,CAAChB,GAAG,CAACrB,IAAI,CAAC;YAC/B;UAAG,CACH,CACD;QAAA,GAhEOtK,IAAI,CAACuD,EAiEX,CAAC;MAEP,CAAE;IAAC,CACA,CAAC;EAAA,CACJ,CAAC;AAEL","ignoreList":[]}
@@ -103,7 +103,7 @@ function IndentUI({
103
103
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToolbarButton, {
104
104
  icon: (0, _i18n.isRTL)() ? _icons.formatOutdentRTL : _icons.formatOutdent,
105
105
  title: (0, _i18n.__)('Outdent'),
106
- describedBy: (0, _i18n.__)('Outdent list item'),
106
+ description: (0, _i18n.__)('Outdent list item'),
107
107
  disabled: !canOutdent,
108
108
  onClick: outdentList
109
109
  })
@@ -146,7 +146,7 @@ function Edit({
146
146
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToolbarButton, {
147
147
  icon: (0, _i18n.isRTL)() ? _icons.formatListBulletsRTL : _icons.formatListBullets,
148
148
  title: (0, _i18n.__)('Unordered'),
149
- describedBy: (0, _i18n.__)('Convert to unordered list'),
149
+ description: (0, _i18n.__)('Convert to unordered list'),
150
150
  isActive: ordered === false,
151
151
  onClick: () => {
152
152
  setAttributes({
@@ -156,7 +156,7 @@ function Edit({
156
156
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToolbarButton, {
157
157
  icon: (0, _i18n.isRTL)() ? _icons.formatListNumberedRTL : _icons.formatListNumbered,
158
158
  title: (0, _i18n.__)('Ordered'),
159
- describedBy: (0, _i18n.__)('Convert to ordered list'),
159
+ description: (0, _i18n.__)('Convert to ordered list'),
160
160
  isActive: ordered === true,
161
161
  onClick: () => {
162
162
  setAttributes({
@@ -1 +1 @@
1
- {"version":3,"names":["_blockEditor","require","_components","_data","_i18n","_icons","_blocks","_element","_deprecated","_interopRequireDefault","_orderedListSettings","_utils","_tagName","_jsxRuntime","DEFAULT_BLOCK","name","TEMPLATE","NATIVE_MARGIN_SPACING","useMigrateOnLoad","attributes","clientId","registry","useRegistry","updateBlockAttributes","replaceInnerBlocks","useDispatch","blockEditorStore","useEffect","values","newAttributes","newInnerBlocks","migrateToListV2","deprecated","since","version","alternative","batch","useOutdentList","replaceBlocks","selectionChange","getBlockRootClientId","getBlockAttributes","getBlock","useSelect","useCallback","parentBlockId","parentBlockAttributes","newParentBlock","createBlock","innerBlocks","length","IndentUI","outdentList","canOutdent","select","getBlockName","jsx","Fragment","children","ToolbarButton","icon","isRTL","formatOutdentRTL","formatOutdent","title","__","describedBy","disabled","onClick","Edit","setAttributes","style","ordered","type","reversed","start","blockProps","useBlockProps","Platform","isNative","listStyleType","undefined","innerBlocksProps","useInnerBlocksProps","defaultBlock","directInsert","template","templateLock","templateInsertUpdatesSelection","marginVertical","marginHorizontal","renderAppender","__experimentalCaptureToolbars","controls","jsxs","BlockControls","group","formatListBulletsRTL","formatListBullets","isActive","formatListNumberedRTL","formatListNumbered","default"],"sources":["@wordpress/block-library/src/list/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBlockControls,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { ToolbarButton } from '@wordpress/components';\nimport { useDispatch, useSelect, useRegistry } from '@wordpress/data';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport {\n\tformatListBullets,\n\tformatListBulletsRTL,\n\tformatListNumbered,\n\tformatListNumberedRTL,\n\tformatOutdent,\n\tformatOutdentRTL,\n} from '@wordpress/icons';\nimport { createBlock } from '@wordpress/blocks';\nimport { useCallback, useEffect, Platform } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport OrderedListSettings from './ordered-list-settings';\nimport { migrateToListV2 } from './utils';\nimport TagName from './tag-name';\n\nconst DEFAULT_BLOCK = {\n\tname: 'core/list-item',\n};\nconst TEMPLATE = [ [ 'core/list-item' ] ];\nconst NATIVE_MARGIN_SPACING = 8;\n\n/**\n * At the moment, deprecations don't handle create blocks from attributes\n * (like when using CPT templates). For this reason, this hook is necessary\n * to avoid breaking templates using the old list block format.\n *\n * @param {Object} attributes Block attributes.\n * @param {string} clientId Block client ID.\n */\nfunction useMigrateOnLoad( attributes, clientId ) {\n\tconst registry = useRegistry();\n\tconst { updateBlockAttributes, replaceInnerBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\n\tuseEffect( () => {\n\t\t// As soon as the block is loaded, migrate it to the new version.\n\n\t\tif ( ! attributes.values ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst [ newAttributes, newInnerBlocks ] = migrateToListV2( attributes );\n\n\t\tdeprecated( 'Value attribute on the list block', {\n\t\t\tsince: '6.0',\n\t\t\tversion: '6.5',\n\t\t\talternative: 'inner blocks',\n\t\t} );\n\n\t\tregistry.batch( () => {\n\t\t\tupdateBlockAttributes( clientId, newAttributes );\n\t\t\treplaceInnerBlocks( clientId, newInnerBlocks );\n\t\t} );\n\t}, [ attributes.values ] );\n}\n\nfunction useOutdentList( clientId ) {\n\tconst { replaceBlocks, selectionChange } = useDispatch( blockEditorStore );\n\tconst { getBlockRootClientId, getBlockAttributes, getBlock } =\n\t\tuseSelect( blockEditorStore );\n\n\treturn useCallback( () => {\n\t\tconst parentBlockId = getBlockRootClientId( clientId );\n\t\tconst parentBlockAttributes = getBlockAttributes( parentBlockId );\n\t\t// Create a new parent block without the inner blocks.\n\t\tconst newParentBlock = createBlock(\n\t\t\t'core/list-item',\n\t\t\tparentBlockAttributes\n\t\t);\n\t\tconst { innerBlocks } = getBlock( clientId );\n\t\t// Replace the parent block with a new parent block without inner blocks,\n\t\t// and make the inner blocks siblings of the parent.\n\t\treplaceBlocks( [ parentBlockId ], [ newParentBlock, ...innerBlocks ] );\n\t\t// Select the last child of the list being outdent.\n\t\tselectionChange( innerBlocks[ innerBlocks.length - 1 ].clientId );\n\t}, [ clientId ] );\n}\n\nfunction IndentUI( { clientId } ) {\n\tconst outdentList = useOutdentList( clientId );\n\tconst canOutdent = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn (\n\t\t\t\tgetBlockName( getBlockRootClientId( clientId ) ) ===\n\t\t\t\t'core/list-item'\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\treturn (\n\t\t<>\n\t\t\t<ToolbarButton\n\t\t\t\ticon={ isRTL() ? formatOutdentRTL : formatOutdent }\n\t\t\t\ttitle={ __( 'Outdent' ) }\n\t\t\t\tdescribedBy={ __( 'Outdent list item' ) }\n\t\t\t\tdisabled={ ! canOutdent }\n\t\t\t\tonClick={ outdentList }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default function Edit( { attributes, setAttributes, clientId, style } ) {\n\tconst { ordered, type, reversed, start } = attributes;\n\tconst blockProps = useBlockProps( {\n\t\tstyle: {\n\t\t\t...( Platform.isNative && style ),\n\t\t\tlistStyleType: ordered && type !== 'decimal' ? type : undefined,\n\t\t},\n\t} );\n\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\tdefaultBlock: DEFAULT_BLOCK,\n\t\tdirectInsert: true,\n\t\ttemplate: TEMPLATE,\n\t\ttemplateLock: false,\n\t\ttemplateInsertUpdatesSelection: true,\n\t\t...( Platform.isNative && {\n\t\t\tmarginVertical: NATIVE_MARGIN_SPACING,\n\t\t\tmarginHorizontal: NATIVE_MARGIN_SPACING,\n\t\t\trenderAppender: false,\n\t\t} ),\n\t\t__experimentalCaptureToolbars: true,\n\t} );\n\tuseMigrateOnLoad( attributes, clientId );\n\n\tconst controls = (\n\t\t<BlockControls group=\"block\">\n\t\t\t<ToolbarButton\n\t\t\t\ticon={ isRTL() ? formatListBulletsRTL : formatListBullets }\n\t\t\t\ttitle={ __( 'Unordered' ) }\n\t\t\t\tdescribedBy={ __( 'Convert to unordered list' ) }\n\t\t\t\tisActive={ ordered === false }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetAttributes( { ordered: false } );\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<ToolbarButton\n\t\t\t\ticon={ isRTL() ? formatListNumberedRTL : formatListNumbered }\n\t\t\t\ttitle={ __( 'Ordered' ) }\n\t\t\t\tdescribedBy={ __( 'Convert to ordered list' ) }\n\t\t\t\tisActive={ ordered === true }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetAttributes( { ordered: true } );\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<IndentUI clientId={ clientId } />\n\t\t</BlockControls>\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<TagName\n\t\t\t\tordered={ ordered }\n\t\t\t\treversed={ reversed }\n\t\t\t\tstart={ start }\n\t\t\t\t{ ...innerBlocksProps }\n\t\t\t/>\n\t\t\t{ controls }\n\t\t\t{ ordered && (\n\t\t\t\t<OrderedListSettings\n\t\t\t\t\t{ ...{\n\t\t\t\t\t\tsetAttributes,\n\t\t\t\t\t\treversed,\n\t\t\t\t\t\tstart,\n\t\t\t\t\t\ttype,\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAMA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAQA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAC,sBAAA,CAAAR,OAAA;AAKA,IAAAS,oBAAA,GAAAD,sBAAA,CAAAR,OAAA;AACA,IAAAU,MAAA,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blockEditor","require","_components","_data","_i18n","_icons","_blocks","_element","_deprecated","_interopRequireDefault","_orderedListSettings","_utils","_tagName","_jsxRuntime","DEFAULT_BLOCK","name","TEMPLATE","NATIVE_MARGIN_SPACING","useMigrateOnLoad","attributes","clientId","registry","useRegistry","updateBlockAttributes","replaceInnerBlocks","useDispatch","blockEditorStore","useEffect","values","newAttributes","newInnerBlocks","migrateToListV2","deprecated","since","version","alternative","batch","useOutdentList","replaceBlocks","selectionChange","getBlockRootClientId","getBlockAttributes","getBlock","useSelect","useCallback","parentBlockId","parentBlockAttributes","newParentBlock","createBlock","innerBlocks","length","IndentUI","outdentList","canOutdent","select","getBlockName","jsx","Fragment","children","ToolbarButton","icon","isRTL","formatOutdentRTL","formatOutdent","title","__","description","disabled","onClick","Edit","setAttributes","style","ordered","type","reversed","start","blockProps","useBlockProps","Platform","isNative","listStyleType","undefined","innerBlocksProps","useInnerBlocksProps","defaultBlock","directInsert","template","templateLock","templateInsertUpdatesSelection","marginVertical","marginHorizontal","renderAppender","__experimentalCaptureToolbars","controls","jsxs","BlockControls","group","formatListBulletsRTL","formatListBullets","isActive","formatListNumberedRTL","formatListNumbered","default"],"sources":["@wordpress/block-library/src/list/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tBlockControls,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { ToolbarButton } from '@wordpress/components';\nimport { useDispatch, useSelect, useRegistry } from '@wordpress/data';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport {\n\tformatListBullets,\n\tformatListBulletsRTL,\n\tformatListNumbered,\n\tformatListNumberedRTL,\n\tformatOutdent,\n\tformatOutdentRTL,\n} from '@wordpress/icons';\nimport { createBlock } from '@wordpress/blocks';\nimport { useCallback, useEffect, Platform } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport OrderedListSettings from './ordered-list-settings';\nimport { migrateToListV2 } from './utils';\nimport TagName from './tag-name';\n\nconst DEFAULT_BLOCK = {\n\tname: 'core/list-item',\n};\nconst TEMPLATE = [ [ 'core/list-item' ] ];\nconst NATIVE_MARGIN_SPACING = 8;\n\n/**\n * At the moment, deprecations don't handle create blocks from attributes\n * (like when using CPT templates). For this reason, this hook is necessary\n * to avoid breaking templates using the old list block format.\n *\n * @param {Object} attributes Block attributes.\n * @param {string} clientId Block client ID.\n */\nfunction useMigrateOnLoad( attributes, clientId ) {\n\tconst registry = useRegistry();\n\tconst { updateBlockAttributes, replaceInnerBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\n\tuseEffect( () => {\n\t\t// As soon as the block is loaded, migrate it to the new version.\n\n\t\tif ( ! attributes.values ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst [ newAttributes, newInnerBlocks ] = migrateToListV2( attributes );\n\n\t\tdeprecated( 'Value attribute on the list block', {\n\t\t\tsince: '6.0',\n\t\t\tversion: '6.5',\n\t\t\talternative: 'inner blocks',\n\t\t} );\n\n\t\tregistry.batch( () => {\n\t\t\tupdateBlockAttributes( clientId, newAttributes );\n\t\t\treplaceInnerBlocks( clientId, newInnerBlocks );\n\t\t} );\n\t}, [ attributes.values ] );\n}\n\nfunction useOutdentList( clientId ) {\n\tconst { replaceBlocks, selectionChange } = useDispatch( blockEditorStore );\n\tconst { getBlockRootClientId, getBlockAttributes, getBlock } =\n\t\tuseSelect( blockEditorStore );\n\n\treturn useCallback( () => {\n\t\tconst parentBlockId = getBlockRootClientId( clientId );\n\t\tconst parentBlockAttributes = getBlockAttributes( parentBlockId );\n\t\t// Create a new parent block without the inner blocks.\n\t\tconst newParentBlock = createBlock(\n\t\t\t'core/list-item',\n\t\t\tparentBlockAttributes\n\t\t);\n\t\tconst { innerBlocks } = getBlock( clientId );\n\t\t// Replace the parent block with a new parent block without inner blocks,\n\t\t// and make the inner blocks siblings of the parent.\n\t\treplaceBlocks( [ parentBlockId ], [ newParentBlock, ...innerBlocks ] );\n\t\t// Select the last child of the list being outdent.\n\t\tselectionChange( innerBlocks[ innerBlocks.length - 1 ].clientId );\n\t}, [ clientId ] );\n}\n\nfunction IndentUI( { clientId } ) {\n\tconst outdentList = useOutdentList( clientId );\n\tconst canOutdent = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn (\n\t\t\t\tgetBlockName( getBlockRootClientId( clientId ) ) ===\n\t\t\t\t'core/list-item'\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\treturn (\n\t\t<>\n\t\t\t<ToolbarButton\n\t\t\t\ticon={ isRTL() ? formatOutdentRTL : formatOutdent }\n\t\t\t\ttitle={ __( 'Outdent' ) }\n\t\t\t\tdescription={ __( 'Outdent list item' ) }\n\t\t\t\tdisabled={ ! canOutdent }\n\t\t\t\tonClick={ outdentList }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default function Edit( { attributes, setAttributes, clientId, style } ) {\n\tconst { ordered, type, reversed, start } = attributes;\n\tconst blockProps = useBlockProps( {\n\t\tstyle: {\n\t\t\t...( Platform.isNative && style ),\n\t\t\tlistStyleType: ordered && type !== 'decimal' ? type : undefined,\n\t\t},\n\t} );\n\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\tdefaultBlock: DEFAULT_BLOCK,\n\t\tdirectInsert: true,\n\t\ttemplate: TEMPLATE,\n\t\ttemplateLock: false,\n\t\ttemplateInsertUpdatesSelection: true,\n\t\t...( Platform.isNative && {\n\t\t\tmarginVertical: NATIVE_MARGIN_SPACING,\n\t\t\tmarginHorizontal: NATIVE_MARGIN_SPACING,\n\t\t\trenderAppender: false,\n\t\t} ),\n\t\t__experimentalCaptureToolbars: true,\n\t} );\n\tuseMigrateOnLoad( attributes, clientId );\n\n\tconst controls = (\n\t\t<BlockControls group=\"block\">\n\t\t\t<ToolbarButton\n\t\t\t\ticon={ isRTL() ? formatListBulletsRTL : formatListBullets }\n\t\t\t\ttitle={ __( 'Unordered' ) }\n\t\t\t\tdescription={ __( 'Convert to unordered list' ) }\n\t\t\t\tisActive={ ordered === false }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetAttributes( { ordered: false } );\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<ToolbarButton\n\t\t\t\ticon={ isRTL() ? formatListNumberedRTL : formatListNumbered }\n\t\t\t\ttitle={ __( 'Ordered' ) }\n\t\t\t\tdescription={ __( 'Convert to ordered list' ) }\n\t\t\t\tisActive={ ordered === true }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetAttributes( { ordered: true } );\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<IndentUI clientId={ clientId } />\n\t\t</BlockControls>\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<TagName\n\t\t\t\tordered={ ordered }\n\t\t\t\treversed={ reversed }\n\t\t\t\tstart={ start }\n\t\t\t\t{ ...innerBlocksProps }\n\t\t\t/>\n\t\t\t{ controls }\n\t\t\t{ ordered && (\n\t\t\t\t<OrderedListSettings\n\t\t\t\t\t{ ...{\n\t\t\t\t\t\tsetAttributes,\n\t\t\t\t\t\treversed,\n\t\t\t\t\t\tstart,\n\t\t\t\t\t\ttype,\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAMA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAQA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAC,sBAAA,CAAAR,OAAA;AAKA,IAAAS,oBAAA,GAAAD,sBAAA,CAAAR,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,QAAA,GAAAH,sBAAA,C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27
  allowedBlocks: ["core/list-item"],
28
- description: "Create a bulleted or numbered list.",
28
+ description: "An organized collection of items displayed in a specific order.",
29
29
  keywords: ["bullet list", "ordered list", "numbered list"],
30
30
  textdomain: "default",
31
31
  attributes: {
@@ -20,23 +20,10 @@ const OrderedListSettings = ({
20
20
  }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.InspectorControls, {
21
21
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.PanelBody, {
22
22
  title: (0, _i18n.__)('Settings'),
23
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.TextControl, {
23
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SelectControl, {
24
+ __next40pxDefaultSize: true,
24
25
  __nextHasNoMarginBottom: true,
25
- label: (0, _i18n.__)('Start value'),
26
- type: "number",
27
- onChange: value => {
28
- const int = parseInt(value, 10);
29
- setAttributes({
30
- // It should be possible to unset the value,
31
- // e.g. with an empty string.
32
- start: isNaN(int) ? undefined : int
33
- });
34
- },
35
- value: Number.isInteger(start) ? start.toString(10) : '',
36
- step: "1"
37
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SelectControl, {
38
- __nextHasNoMarginBottom: true,
39
- label: (0, _i18n.__)('Numbering style'),
26
+ label: (0, _i18n.__)('List style'),
40
27
  options: [{
41
28
  label: (0, _i18n.__)('Numbers'),
42
29
  value: 'decimal'
@@ -57,9 +44,24 @@ const OrderedListSettings = ({
57
44
  onChange: newValue => setAttributes({
58
45
  type: newValue
59
46
  })
47
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.TextControl, {
48
+ __next40pxDefaultSize: true,
49
+ __nextHasNoMarginBottom: true,
50
+ label: (0, _i18n.__)('Start value'),
51
+ type: "number",
52
+ onChange: value => {
53
+ const int = parseInt(value, 10);
54
+ setAttributes({
55
+ // It should be possible to unset the value,
56
+ // e.g. with an empty string.
57
+ start: isNaN(int) ? undefined : int
58
+ });
59
+ },
60
+ value: Number.isInteger(start) ? start.toString(10) : '',
61
+ step: "1"
60
62
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToggleControl, {
61
63
  __nextHasNoMarginBottom: true,
62
- label: (0, _i18n.__)('Reverse list numbering'),
64
+ label: (0, _i18n.__)('Reverse order'),
63
65
  checked: reversed || false,
64
66
  onChange: value => {
65
67
  setAttributes({
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_blockEditor","_components","_jsxRuntime","OrderedListSettings","setAttributes","reversed","start","type","jsx","InspectorControls","children","jsxs","PanelBody","title","__","TextControl","__nextHasNoMarginBottom","label","onChange","value","int","parseInt","isNaN","undefined","Number","isInteger","toString","step","SelectControl","options","newValue","ToggleControl","checked","_default","exports","default"],"sources":["@wordpress/block-library/src/list/ordered-list-settings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { InspectorControls } from '@wordpress/block-editor';\nimport {\n\tTextControl,\n\tPanelBody,\n\tToggleControl,\n\tSelectControl,\n} from '@wordpress/components';\n\nconst OrderedListSettings = ( { setAttributes, reversed, start, type } ) => (\n\t<InspectorControls>\n\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t<TextControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Start value' ) }\n\t\t\t\ttype=\"number\"\n\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\tconst int = parseInt( value, 10 );\n\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t// It should be possible to unset the value,\n\t\t\t\t\t\t// e.g. with an empty string.\n\t\t\t\t\t\tstart: isNaN( int ) ? undefined : int,\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t\tvalue={ Number.isInteger( start ) ? start.toString( 10 ) : '' }\n\t\t\t\tstep=\"1\"\n\t\t\t/>\n\t\t\t<SelectControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Numbering style' ) }\n\t\t\t\toptions={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Numbers' ),\n\t\t\t\t\t\tvalue: 'decimal',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Uppercase letters' ),\n\t\t\t\t\t\tvalue: 'upper-alpha',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Lowercase letters' ),\n\t\t\t\t\t\tvalue: 'lower-alpha',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Uppercase Roman numerals' ),\n\t\t\t\t\t\tvalue: 'upper-roman',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Lowercase Roman numerals' ),\n\t\t\t\t\t\tvalue: 'lower-roman',\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t\tvalue={ type }\n\t\t\t\tonChange={ ( newValue ) => setAttributes( { type: newValue } ) }\n\t\t\t/>\n\t\t\t<ToggleControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Reverse list numbering' ) }\n\t\t\t\tchecked={ reversed || false }\n\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t// Unset the attribute if not reversed.\n\t\t\t\t\t\treversed: value || undefined,\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t/>\n\t\t</PanelBody>\n\t</InspectorControls>\n);\n\nexport default OrderedListSettings;\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAK+B,IAAAG,WAAA,GAAAH,OAAA;AAV/B;AACA;AACA;;AAUA,MAAMI,mBAAmB,GAAGA,CAAE;EAAEC,aAAa;EAAEC,QAAQ;EAAEC,KAAK;EAAEC;AAAK,CAAC,kBACrE,IAAAL,WAAA,CAAAM,GAAA,EAACR,YAAA,CAAA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AK,EAAE;MACR,CAAC,CACC;MACHA,KAAK,EAAGZ,IAAM;MACdW,QAAQ,EAAKY,QAAQ,IAAM1B,aAAa,CAAE;QAAEG,IAAI,EAAEuB;MAAS,CAAE;IAAG,CAChE,CAAC,eACF,IAAA5B,WAAA,CAAAM,GAAA,EAACP,WAAA,CAAA8B,aAAa;MACbf,uBAAuB;MACvBC,KAAK,EAAG,IAAAH,QAAE,EAAE,wBAAyB,CAAG;MACxCkB,OAAO,EAAG3B,QAAQ,IAAI,KAAO;MAC7Ba,QAAQ,EAAKC,KAAK,IAAM;QACvBf,aAAa,CAAE;UACd;UACAC,QAAQ,EAAEc,KAAK,IAAII;QACpB,CAAE,CAAC;MACJ;IAAG,CACH,CAAC;EAAA,CACQ;AAAC,CACM,CACnB;AAAC,IAAAU,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEahC,mBAAmB","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_blockEditor","_components","_jsxRuntime","OrderedListSettings","setAttributes","reversed","start","type","jsx","InspectorControls","children","jsxs","PanelBody","title","__","SelectControl","__next40pxDefaultSize","__nextHasNoMarginBottom","label","options","value","onChange","newValue","TextControl","int","parseInt","isNaN","undefined","Number","isInteger","toString","step","ToggleControl","checked","_default","exports","default"],"sources":["@wordpress/block-library/src/list/ordered-list-settings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { InspectorControls } from '@wordpress/block-editor';\nimport {\n\tTextControl,\n\tPanelBody,\n\tToggleControl,\n\tSelectControl,\n} from '@wordpress/components';\n\nconst OrderedListSettings = ( { setAttributes, reversed, start, type } ) => (\n\t<InspectorControls>\n\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t<SelectControl\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'List style' ) }\n\t\t\t\toptions={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Numbers' ),\n\t\t\t\t\t\tvalue: 'decimal',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Uppercase letters' ),\n\t\t\t\t\t\tvalue: 'upper-alpha',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Lowercase letters' ),\n\t\t\t\t\t\tvalue: 'lower-alpha',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Uppercase Roman numerals' ),\n\t\t\t\t\t\tvalue: 'upper-roman',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Lowercase Roman numerals' ),\n\t\t\t\t\t\tvalue: 'lower-roman',\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t\tvalue={ type }\n\t\t\t\tonChange={ ( newValue ) => setAttributes( { type: newValue } ) }\n\t\t\t/>\n\t\t\t<TextControl\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Start value' ) }\n\t\t\t\ttype=\"number\"\n\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\tconst int = parseInt( value, 10 );\n\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t// It should be possible to unset the value,\n\t\t\t\t\t\t// e.g. with an empty string.\n\t\t\t\t\t\tstart: isNaN( int ) ? undefined : int,\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t\tvalue={ Number.isInteger( start ) ? start.toString( 10 ) : '' }\n\t\t\t\tstep=\"1\"\n\t\t\t/>\n\t\t\t<ToggleControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Reverse order' ) }\n\t\t\t\tchecked={ reversed || false }\n\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t// Unset the attribute if not reversed.\n\t\t\t\t\t\treversed: value || undefined,\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t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AChE,CAAC,eACF,IAAApB,WAAA,CAAAM,GAAA,EAACP,WAAA,CAAAsB,WAAW;MACXP,qBAAqB;MACrBC,uBAAuB;MACvBC,KAAK,EAAG,IAAAJ,QAAE,EAAE,aAAc,CAAG;MAC7BP,IAAI,EAAC,QAAQ;MACbc,QAAQ,EAAKD,KAAK,IAAM;QACvB,MAAMI,GAAG,GAAGC,QAAQ,CAAEL,KAAK,EAAE,EAAG,CAAC;QAEjChB,aAAa,CAAE;UACd;UACA;UACAE,KAAK,EAAEoB,KAAK,CAAEF,GAAI,CAAC,GAAGG,SAAS,GAAGH;QACnC,CAAE,CAAC;MACJ,CAAG;MACHJ,KAAK,EAAGQ,MAAM,CAACC,SAAS,CAAEvB,KAAM,CAAC,GAAGA,KAAK,CAACwB,QAAQ,CAAE,EAAG,CAAC,GAAG,EAAI;MAC/DC,IAAI,EAAC;IAAG,CACR,CAAC,eACF,IAAA7B,WAAA,CAAAM,GAAA,EAACP,WAAA,CAAA+B,aAAa;MACbf,uBAAuB;MACvBC,KAAK,EAAG,IAAAJ,QAAE,EAAE,eAAgB,CAAG;MAC/BmB,OAAO,EAAG5B,QAAQ,IAAI,KAAO;MAC7BgB,QAAQ,EAAKD,KAAK,IAAM;QACvBhB,aAAa,CAAE;UACd;UACAC,QAAQ,EAAEe,KAAK,IAAIO;QACpB,CAAE,CAAC;MACJ;IAAG,CACH,CAAC;EAAA,CACQ;AAAC,CACM,CACnB;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEajC,mBAAmB","ignoreList":[]}
@@ -44,13 +44,13 @@ function IndentUI({
44
44
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToolbarButton, {
45
45
  icon: (0, _i18n.isRTL)() ? _icons.formatOutdentRTL : _icons.formatOutdent,
46
46
  title: (0, _i18n.__)('Outdent'),
47
- describedBy: (0, _i18n.__)('Outdent list item'),
47
+ description: (0, _i18n.__)('Outdent list item'),
48
48
  disabled: !canOutdent,
49
49
  onClick: () => outdentListItem()
50
50
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToolbarButton, {
51
51
  icon: (0, _i18n.isRTL)() ? _icons.formatIndentRTL : _icons.formatIndent,
52
52
  title: (0, _i18n.__)('Indent'),
53
- describedBy: (0, _i18n.__)('Indent list item'),
53
+ description: (0, _i18n.__)('Indent list item'),
54
54
  disabled: !canIndent,
55
55
  onClick: () => indentListItem()
56
56
  })]