@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":["store","getContext","getElement","isTouching","lastTouchTime","imageRef","buttonRef","state","actions","callbacks","currentImage","overlayOpened","currentSrc","roleAttribute","ariaModal","enlargedSrc","uploadedSrc","imgStyles","replace","showLightbox","ctx","complete","scrollTopReset","document","documentElement","scrollTop","scrollLeftReset","scrollLeft","overlayEnabled","setOverlayStyles","hideLightbox","setTimeout","focus","preventScroll","showClosingAnimation","handleKeydown","event","key","preventDefault","ref","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":"AAAA;AACA;AACA;AACA,SAASA,KAAK,EAAEC,UAAU,EAAEC,UAAU,QAAQ,0BAA0B;;AAExE;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,GAAGT,KAAK,CAC1C,YAAY,EACZ;EACCO,KAAK,EAAE;IACNG,YAAY,EAAE,CAAC,CAAC;IAChB,IAAIC,aAAaA,CAAA,EAAG;MACnB,OAAOJ,KAAK,CAACG,YAAY,CAACE,UAAU;IACrC,CAAC;IACD,IAAIC,aAAaA,CAAA,EAAG;MACnB,OAAON,KAAK,CAACI,aAAa,GAAG,QAAQ,GAAG,IAAI;IAC7C,CAAC;IACD,IAAIG,SAASA,CAAA,EAAG;MACf,OAAOP,KAAK,CAACI,aAAa,GAAG,MAAM,GAAG,IAAI;IAC3C,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,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;UAClDxC,GAAG,CAACyF,cAAc,GACjB,CAAExD,YAAY,GAAGuD,eAAe,IAAK,CAAC,GACtCH,eAAe,GACf,EAAE;UACHrF,GAAG,CAAC0F,gBAAgB,GAAGJ,iBAAiB,GAAG,EAAE;QAC9C,CAAC,MAAM;UACN;UACA;UACA,MAAMK,cAAc,GAAG1D,YAAY,GAAGO,YAAY;UAClDxC,GAAG,CAACyF,cAAc,GAAGJ,eAAe,GAAG,EAAE;UACzCrF,GAAG,CAAC0F,gBAAgB,GACnB,CAAE3D,WAAW,GAAG4D,cAAc,IAAK,CAAC,GACpCL,iBAAiB,GACjB,EAAE;QACJ;MACD,CAAC,MAAM;QACNtF,GAAG,CAACyF,cAAc,GAAGJ,eAAe,GAAG,EAAE;QACzCrF,GAAG,CAAC0F,gBAAgB,GAAGJ,iBAAiB,GAAG,EAAE;MAC9C;IACD,CAAC;IACDM,eAAeA,CAAA,EAAG;MACjB,IAAKzG,KAAK,CAACqB,cAAc,EAAG;QAC3B;QACA,MAAM;UAAEW;QAAI,CAAC,GAAGrC,UAAU,CAAC,CAAC;QAC5BqC,GAAG,CAACP,KAAK,CAAC,CAAC;MACZ;IACD,CAAC;IACDiF,iBAAiBA,CAAA,EAAG;MACnB,MAAM7F,GAAG,GAAGnB,UAAU,CAAC,CAAC;MACxB,MAAM;QAAEsC;MAAI,CAAC,GAAGrC,UAAU,CAAC,CAAC;MAC5BkB,GAAG,CAACd,SAAS,GAAGiC,GAAG;IACpB;EACD;AACD,CAAC,EACD;EAAE2E,IAAI,EAAE;AAAK,CACd,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["store","getContext","getElement","isTouching","lastTouchTime","state","actions","callbacks","currentImageId","currentImage","metadata","overlayOpened","roleAttribute","ariaModal","enlargedSrc","uploadedSrc","figureStyles","replace","imgStyles","imageButtonRight","imageId","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","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":"AAAA;AACA;AACA;AACA,SAASA,KAAK,EAAEC,UAAU,EAAEC,UAAU,QAAQ,0BAA0B;;AAExE;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,GAAGP,KAAK,CAC1C,YAAY,EACZ;EACCK,KAAK,EAAE;IACNG,cAAc,EAAE,IAAI;IACpB,IAAIC,YAAYA,CAAA,EAAG;MAClB,OAAOJ,KAAK,CAACK,QAAQ,CAAEL,KAAK,CAACG,cAAc,CAAE;IAC9C,CAAC;IACD,IAAIG,aAAaA,CAAA,EAAG;MACnB,OAAON,KAAK,CAACG,cAAc,KAAK,IAAI;IACrC,CAAC;IAC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align: true,
41
+ color: {
42
+ gradients: true,
43
+ link: true,
44
+ __experimentalDefaultControls: {
45
+ background: true,
46
+ text: true,
47
+ link: true
48
+ }
49
+ },
41
50
  html: false,
42
51
  spacing: {
43
52
  margin: true,
@@ -1 +1 @@
1
- {"version":3,"names":["comment","icon","initBlock","metadata","$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","edit","settings","example","init"],"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":"AAAA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,IAAI,QAAQ,kBAAkB;;AAElD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAAC,MAAAC,QAAA;EAAAC,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;AAE5C,OAAOC,IAAI,MAAM,QAAQ;AAEzB,MAAM;EAAElC;AAAK,CAAC,GAAGH,QAAQ;AAEzB,SAASA,QAAQ,EAAEG,IAAI;AAEvB,OAAO,MAAMmC,QAAQ,GAAG;EACvBxC,IAAI;EACJyC,OAAO,EAAE,CAAC,CAAC;EACXF;AACD,CAAC;AAED,OAAO,MAAMG,IAAI,GAAGA,CAAA,KAAMzC,SAAS,CAAE;EAAEI,IAAI;EAAEH,QAAQ;EAAEsC;AAAS,CAAE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["comment","icon","initBlock","metadata","$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","edit","settings","example","init"],"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":"AAAA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,IAAI,QAA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158
158
  title: __('Post content'),
159
159
  children: [/*#__PURE__*/_jsx(ToggleControl, {
160
+ __nextHasNoMarginBottom: true,
160
161
  label: __('Post content'),
161
162
  checked: displayPostContent,
162
163
  onChange: value => setAttributes({
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","BaseControl","PanelBody","Placeholder","QueryControls","RadioControl","RangeControl","Spinner","ToggleControl","ToolbarGroup","__","_x","sprintf","dateI18n","format","getSettings","InspectorControls","BlockAlignmentToolbar","BlockControls","__experimentalImageSizeControl","ImageSizeControl","useBlockProps","store","blockEditorStore","useSelect","useDispatch","pin","list","grid","coreStore","noticeStore","useInstanceId","createInterpolateElement","MIN_EXCERPT_LENGTH","MAX_EXCERPT_LENGTH","MAX_POSTS_COLUMNS","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","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","postsToShow","order","orderBy","categories","selectedAuthor","displayFeaturedImage","displayPostContentRadio","displayPostContent","displayPostDate","displayAuthor","postLayout","columns","excerptLength","featuredImageAlign","featuredImageSizeSlug","featuredImageSizeWidth","featuredImageSizeHeight","addLinkToFeaturedImage","imageSizes","latestPosts","defaultImageWidth","defaultImageHeight","categoriesList","authorList","select","_settings$imageDimens","_settings$imageDimens2","getEntityRecords","getUsers","settings","catIds","length","map","cat","id","latestPostsQuery","Object","fromEntries","entries","author","orderby","_embed","filter","value","imageDimensions","width","height","createWarningNotice","removeNotice","noticeId","showRedirectionPreventedNotice","event","preventDefault","type","imageSizeOptions","slug","name","label","categorySuggestions","reduce","accumulator","category","selectCategories","tokens","hasNoSuggestion","some","token","allCategories","includes","hasPosts","inspectorControls","children","title","checked","onChange","selected","options","__nextHasNoMarginBottom","__next40pxDefaultSize","min","max","newAttrs","hasOwnProperty","imageWidth","imageHeight","imageSizeHelp","onChangeImage","undefined","className","VisualLabel","controls","isCollapsed","numberOfItems","onOrderChange","onOrderByChange","onNumberOfItemsChange","onCategoryChange","selectedCategories","onAuthorChange","Number","selectedAuthorId","Math","required","blockProps","icon","Array","isArray","displayPosts","slice","layoutControls","onClick","isActive","dateFormat","formats","date","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","a","href","link","rel","span","dangerouslySetInnerHTML","__html","date_gmt","dateTime","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":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,WAAW,EACXC,SAAS,EACTC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,YAAY,EACZC,OAAO,EACPC,aAAa,EACbC,YAAY,QACN,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,WAAW,QAAQ,iBAAiB;AAC/D,SACCC,iBAAiB,EACjBC,qBAAqB,EACrBC,aAAa,EACbC,8BAA8B,IAAIC,gBAAgB,EAClDC,aAAa,EACbC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,GAAG,EAAEC,IAAI,EAAEC,IAAI,QAAQ,kBAAkB;AAClD,SAASN,KAAK,IAAIO,SAAS,QAAQ,sBAAsB;AACzD,SAASP,KAAK,IAAIQ,WAAW,QAAQ,oBAAoB;AACzD,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,wBAAwB,QAAQ,oBAAoB;;AAE7D;AACA;AACA;AACA,SACCC,kBAAkB,EAClBC,kBAAkB,EAClBC,iBAAiB,QACX,aAAa;;AAEpB;AACA;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mH,SAAS,EAAC,0CAA0C;YACpD0D,uBAAuB,EAAG;cACzBC,MAAM,EAAEnK,IAAI,CAACsK,OAAO,CAACZ,GAAG,CAACrB,IAAI,CAAC;YAC/B;UAAG,CACH,CACD;QAAA,GAhEOrI,IAAI,CAACkD,EAiEX,CAAC;MAEP,CAAE;IAAC,CACA,CAAC;EAAA,CACJ,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["clsx","BaseControl","PanelBody","Placeholder","QueryControls","RadioControl","RangeControl","Spinner","ToggleControl","ToolbarGroup","__","_x","sprintf","dateI18n","format","getSettings","InspectorControls","BlockAlignmentToolbar","BlockControls","__experimentalImageSizeControl","ImageSizeControl","useBlockProps","store","blockEditorStore","useSelect","useDispatch","pin","list","grid","coreStore","noticeStore","useInstanceId","createInterpolateElement","MIN_EXCERPT_LENGTH","MAX_EXCERPT_LENGTH","MAX_POSTS_COLUMNS","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","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","postsToShow","order","orderBy","categories","selectedAuthor","displayFeaturedImage","displayPostContentRadio","displayPostContent","displayPostDate","displayAuthor","postLayout","columns","excerptLength","featuredImageAlign","featuredImageSizeSlug","featuredImageSizeWidth","featuredImageSizeHeight","addLinkToFeaturedImage","imageSizes","latestPosts","defaultImageWidth","defaultImageHeight","categoriesList","authorList","select","_settings$imageDimens","_settings$imageDimens2","getEntityRecords","getUsers","settings","catIds","length","map","cat","id","latestPostsQuery","Object","fromEntries","entries","author","orderby","_embed","filter","value","imageDimensions","width","height","createWarningNotice","removeNotice","noticeId","showRedirectionPreventedNotice","event","preventDefault","type","imageSizeOptions","slug","name","label","categorySuggestions","reduce","accumulator","category","selectCategories","tokens","hasNoSuggestion","some","token","allCategories","includes","hasPosts","inspectorControls","children","title","__nextHasNoMarginBottom","checked","onChange","selected","options","__next40pxDefaultSize","min","max","newAttrs","hasOwnProperty","imageWidth","imageHeight","imageSizeHelp","onChangeImage","undefined","className","VisualLabel","controls","isCollapsed","numberOfItems","onOrderChange","onOrderByChange","onNumberOfItemsChange","onCategoryChange","selectedCategories","onAuthorChange","Number","selectedAuthorId","Math","required","blockProps","icon","Array","isArray","displayPosts","slice","layoutControls","onClick","isActive","dateFormat","formats","date","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","a","href","link","rel","span","dangerouslySetInnerHTML","__html","date_gmt","dateTime","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":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,WAAW,EACXC,SAAS,EACTC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,YAAY,EACZC,OAAO,EACPC,aAAa,EACbC,YAAY,QACN,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,WAAW,QAAQ,iBAAiB;AAC/D,SACCC,iBAAiB,EACjBC,qBAAqB,EACrBC,aAAa,EACbC,8BAA8B,IAAIC,gBAAgB,EAClDC,aAAa,EACbC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,GAAG,EAAEC,IAAI,EAAEC,IAAI,QAAQ,kBAAkB;AAClD,SAASN,KAAK,IAAIO,SAAS,QAAQ,sBAAsB;AACzD,SAASP,KAAK,IAAIQ,WAAW,QAAQ,oBAAoB;AACzD,SAASC,aAAa,QAAQ,oBAAoB;AA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BACpCjC,IAAA;YAAKmH,SAAS,EAAC,qCAAqC;YAAAjB,QAAA,EACjDoE;UAAW,CACT,CACL,EACApI,kBAAkB,IACnBD,uBAAuB,KAAK,WAAW,iBACtCjC,IAAA;YACCmH,SAAS,EAAC,0CAA0C;YACpD0D,uBAAuB,EAAG;cACzBC,MAAM,EAAEnK,IAAI,CAACsK,OAAO,CAACZ,GAAG,CAACrB,IAAI,CAAC;YAC/B;UAAG,CACH,CACD;QAAA,GAhEOrI,IAAI,CAACkD,EAiEX,CAAC;MAEP,CAAE;IAAC,CACA,CAAC;EAAA,CACJ,CAAC;AAEL","ignoreList":[]}
@@ -97,7 +97,7 @@ function IndentUI({
97
97
  children: /*#__PURE__*/_jsx(ToolbarButton, {
98
98
  icon: isRTL() ? formatOutdentRTL : formatOutdent,
99
99
  title: __('Outdent'),
100
- describedBy: __('Outdent list item'),
100
+ description: __('Outdent list item'),
101
101
  disabled: !canOutdent,
102
102
  onClick: outdentList
103
103
  })
@@ -140,7 +140,7 @@ export default function Edit({
140
140
  children: [/*#__PURE__*/_jsx(ToolbarButton, {
141
141
  icon: isRTL() ? formatListBulletsRTL : formatListBullets,
142
142
  title: __('Unordered'),
143
- describedBy: __('Convert to unordered list'),
143
+ description: __('Convert to unordered list'),
144
144
  isActive: ordered === false,
145
145
  onClick: () => {
146
146
  setAttributes({
@@ -150,7 +150,7 @@ export default function Edit({
150
150
  }), /*#__PURE__*/_jsx(ToolbarButton, {
151
151
  icon: isRTL() ? formatListNumberedRTL : formatListNumbered,
152
152
  title: __('Ordered'),
153
- describedBy: __('Convert to ordered list'),
153
+ description: __('Convert to ordered list'),
154
154
  isActive: ordered === true,
155
155
  onClick: () => {
156
156
  setAttributes({
@@ -1 +1 @@
1
- {"version":3,"names":["BlockControls","useBlockProps","useInnerBlocksProps","store","blockEditorStore","ToolbarButton","useDispatch","useSelect","useRegistry","isRTL","__","formatListBullets","formatListBulletsRTL","formatListNumbered","formatListNumberedRTL","formatOutdent","formatOutdentRTL","createBlock","useCallback","useEffect","Platform","deprecated","OrderedListSettings","migrateToListV2","TagName","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","DEFAULT_BLOCK","name","TEMPLATE","NATIVE_MARGIN_SPACING","useMigrateOnLoad","attributes","clientId","registry","updateBlockAttributes","replaceInnerBlocks","values","newAttributes","newInnerBlocks","since","version","alternative","batch","useOutdentList","replaceBlocks","selectionChange","getBlockRootClientId","getBlockAttributes","getBlock","parentBlockId","parentBlockAttributes","newParentBlock","innerBlocks","length","IndentUI","outdentList","canOutdent","select","getBlockName","children","icon","title","describedBy","disabled","onClick","Edit","setAttributes","style","ordered","type","reversed","start","blockProps","isNative","listStyleType","undefined","innerBlocksProps","defaultBlock","directInsert","template","templateLock","templateInsertUpdatesSelection","marginVertical","marginHorizontal","renderAppender","__experimentalCaptureToolbars","controls","group","isActive"],"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":"AAAA;AACA;AACA;AACA,SACCA,aAAa,EACbC,aAAa,EACbC,mBAAmB,EACnBC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,aAAa,QAAQ,uBAAuB;AACrD,SAASC,WAAW,EAAEC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACrE,SAASC,KAAK,EAAEC,EAAE,QAAQ,iBAAiB;AAC3C,SACCC,iBAAiB,EACjBC,oBAAoB,EACpBC,kBAAkB,EAClBC,qBAAqB,EACrBC,aAAa,EACbC,gBAAgB,QACV,kBAAkB;AACzB,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,oBAAoB;AACrE,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,OAAOC,mBAAmB,MAAM,yBAAyB;AACzD,SAASC,eAAe,QAAQ,SAAS;AAC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,CAAE,CAAC;MACpC;IAAG,CACH,CAAC,eACF/C,IAAA,CAACrB,aAAa;MACb4D,IAAI,EAAGxD,KAAK,CAAC,CAAC,GAAGK,qBAAqB,GAAGD,kBAAoB;MAC7DqD,KAAK,EAAGxD,EAAE,CAAE,SAAU,CAAG;MACzByD,WAAW,EAAGzD,EAAE,CAAE,yBAA0B,CAAG;MAC/CmF,QAAQ,EAAGpB,OAAO,KAAK,IAAM;MAC7BJ,OAAO,EAAGA,CAAA,KAAM;QACfE,aAAa,CAAE;UAAEE,OAAO,EAAE;QAAK,CAAE,CAAC;MACnC;IAAG,CACH,CAAC,eACF/C,IAAA,CAACiC,QAAQ;MAACtB,QAAQ,EAAGA;IAAU,CAAE,CAAC;EAAA,CACpB,CACf;EAED,oBACCP,KAAA,CAAAF,SAAA;IAAAoC,QAAA,gBACCtC,IAAA,CAACF,OAAO;MACPiD,OAAO,EAAGA,OAAS;MACnBE,QAAQ,EAAGA,QAAU;MACrBC,KAAK,EAAGA,KAAO;MAAA,GACVK;IAAgB,CACrB,CAAC,EACAU,QAAQ,EACRlB,OAAO,iBACR/C,IAAA,CAACJ,mBAAmB;MAElBiD,aAAa;MACbI,QAAQ;MACRC,KAAK;MACLF;IAAI,CAEL,CACD;EAAA,CACA,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["BlockControls","useBlockProps","useInnerBlocksProps","store","blockEditorStore","ToolbarButton","useDispatch","useSelect","useRegistry","isRTL","__","formatListBullets","formatListBulletsRTL","formatListNumbered","formatListNumberedRTL","formatOutdent","formatOutdentRTL","createBlock","useCallback","useEffect","Platform","deprecated","OrderedListSettings","migrateToListV2","TagName","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","DEFAULT_BLOCK","name","TEMPLATE","NATIVE_MARGIN_SPACING","useMigrateOnLoad","attributes","clientId","registry","updateBlockAttributes","replaceInnerBlocks","values","newAttributes","newInnerBlocks","since","version","alternative","batch","useOutdentList","replaceBlocks","selectionChange","getBlockRootClientId","getBlockAttributes","getBlock","parentBlockId","parentBlockAttributes","newParentBlock","innerBlocks","length","IndentUI","outdentList","canOutdent","select","getBlockName","children","icon","title","description","disabled","onClick","Edit","setAttributes","style","ordered","type","reversed","start","blockProps","isNative","listStyleType","undefined","innerBlocksProps","defaultBlock","directInsert","template","templateLock","templateInsertUpdatesSelection","marginVertical","marginHorizontal","renderAppender","__experimentalCaptureToolbars","controls","group","isActive"],"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":"AAAA;AACA;AACA;AACA,SACCA,aAAa,EACbC,aAAa,EACbC,mBAAmB,EACnBC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,aAAa,QAAQ,uBAAuB;AACrD,SAASC,WAAW,EAAEC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACrE,SAASC,KAAK,EAAEC,EAAE,QAAQ,iBAAiB;AAC3C,SACCC,iBAAiB,EACjBC,oBAAoB,EACpBC,kBAAkB,EAClBC,qBAAqB,EACrBC,aAAa,EACbC,gBAAgB,QACV,kBAAkB;AACzB,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,oBAAoB;AACrE,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;AACA,OAAOC,mBAAmB,MAAM,yBAAyB;AACzD,SAASC,eAAe,QAAQ,SAAS;AACzC,OAAOC,OAAO,MAAM,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEjC,MAAMC,aAAa,GAAG;EACrBC,IAAI,EAAE;AACP,CAAC;AACD,MAAMC,QAAQ,GAAG,CAAE,CAAE,gBAAgB,CAAE,CAAE;AACzC,MAAMC,qBAAqB,GAAG,CAAC;;AAE/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,OAAO,EAAGA,CAAA,KAAM;QACfE,aAAa,CAAE;UAAEE,OAAO,EAAE;QAAK,CAAE,CAAC;MACnC;IAAG,CACH,CAAC,eACF/C,IAAA,CAACiC,QAAQ;MAACtB,QAAQ,EAAGA;IAAU,CAAE,CAAC;EAAA,CACpB,CACf;EAED,oBACCP,KAAA,CAAAF,SAAA;IAAAoC,QAAA,gBACCtC,IAAA,CAACF,OAAO;MACPiD,OAAO,EAAGA,OAAS;MACnBE,QAAQ,EAAGA,QAAU;MACrBC,KAAK,EAAGA,KAAO;MAAA,GACVK;IAAgB,CACrB,CAAC,EACAU,QAAQ,EACRlB,OAAO,iBACR/C,IAAA,CAACJ,mBAAmB;MAElBiD,aAAa;MACbI,QAAQ;MACRC,KAAK;MACLF;IAAI,CAEL,CACD;EAAA,CACA,CAAC;AAEL","ignoreList":[]}
@@ -17,7 +17,7 @@ const metadata = {
17
17
  title: "List",
18
18
  category: "text",
19
19
  allowedBlocks: ["core/list-item"],
20
- description: "Create a bulleted or numbered list.",
20
+ description: "An organized collection of items displayed in a specific order.",
21
21
  keywords: ["bullet list", "ordered list", "numbered list"],
22
22
  textdomain: "default",
23
23
  attributes: {
@@ -14,23 +14,10 @@ const OrderedListSettings = ({
14
14
  }) => /*#__PURE__*/_jsx(InspectorControls, {
15
15
  children: /*#__PURE__*/_jsxs(PanelBody, {
16
16
  title: __('Settings'),
17
- children: [/*#__PURE__*/_jsx(TextControl, {
17
+ children: [/*#__PURE__*/_jsx(SelectControl, {
18
+ __next40pxDefaultSize: true,
18
19
  __nextHasNoMarginBottom: true,
19
- label: __('Start value'),
20
- type: "number",
21
- onChange: value => {
22
- const int = parseInt(value, 10);
23
- setAttributes({
24
- // It should be possible to unset the value,
25
- // e.g. with an empty string.
26
- start: isNaN(int) ? undefined : int
27
- });
28
- },
29
- value: Number.isInteger(start) ? start.toString(10) : '',
30
- step: "1"
31
- }), /*#__PURE__*/_jsx(SelectControl, {
32
- __nextHasNoMarginBottom: true,
33
- label: __('Numbering style'),
20
+ label: __('List style'),
34
21
  options: [{
35
22
  label: __('Numbers'),
36
23
  value: 'decimal'
@@ -51,9 +38,24 @@ const OrderedListSettings = ({
51
38
  onChange: newValue => setAttributes({
52
39
  type: newValue
53
40
  })
41
+ }), /*#__PURE__*/_jsx(TextControl, {
42
+ __next40pxDefaultSize: true,
43
+ __nextHasNoMarginBottom: true,
44
+ label: __('Start value'),
45
+ type: "number",
46
+ onChange: value => {
47
+ const int = parseInt(value, 10);
48
+ setAttributes({
49
+ // It should be possible to unset the value,
50
+ // e.g. with an empty string.
51
+ start: isNaN(int) ? undefined : int
52
+ });
53
+ },
54
+ value: Number.isInteger(start) ? start.toString(10) : '',
55
+ step: "1"
54
56
  }), /*#__PURE__*/_jsx(ToggleControl, {
55
57
  __nextHasNoMarginBottom: true,
56
- label: __('Reverse list numbering'),
58
+ label: __('Reverse order'),
57
59
  checked: reversed || false,
58
60
  onChange: value => {
59
61
  setAttributes({
@@ -1 +1 @@
1
- {"version":3,"names":["__","InspectorControls","TextControl","PanelBody","ToggleControl","SelectControl","jsx","_jsx","jsxs","_jsxs","OrderedListSettings","setAttributes","reversed","start","type","children","title","__nextHasNoMarginBottom","label","onChange","value","int","parseInt","isNaN","undefined","Number","isInteger","toString","step","options","newValue","checked"],"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</Insp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CAAC,EACD;QACCF,KAAK,EAAElB,EAAE,CAAE,mBAAoB,CAAC;QAChCoB,KAAK,EAAE;MACR,CAAC,EACD;QACCF,KAAK,EAAElB,EAAE,CAAE,0BAA2B,CAAC;QACvCoB,KAAK,EAAE;MACR,CAAC,EACD;QACCF,KAAK,EAAElB,EAAE,CAAE,0BAA2B,CAAC;QACvCoB,KAAK,EAAE;MACR,CAAC,CACC;MACHA,KAAK,EAAGN,IAAM;MACdK,QAAQ,EAAKW,QAAQ,IAAMnB,aAAa,CAAE;QAAEG,IAAI,EAAEgB;MAAS,CAAE;IAAG,CAChE,CAAC,eACFvB,IAAA,CAACH,aAAa;MACba,uBAAuB;MACvBC,KAAK,EAAGlB,EAAE,CAAE,wBAAyB,CAAG;MACxC+B,OAAO,EAAGnB,QAAQ,IAAI,KAAO;MAC7BO,QAAQ,EAAKC,KAAK,IAAM;QACvBT,aAAa,CAAE;UACd;UACAC,QAAQ,EAAEQ,KAAK,IAAII;QACpB,CAAE,CAAC;MACJ;IAAG,CACH,CAAC;EAAA,CACQ;AAAC,CACM,CACnB;AAED,eAAed,mBAAmB","ignoreList":[]}
1
+ {"version":3,"names":["__","InspectorControls","TextControl","PanelBody","ToggleControl","SelectControl","jsx","_jsx","jsxs","_jsxs","OrderedListSettings","setAttributes","reversed","start","type","children","title","__next40pxDefaultSize","__nextHasNoMarginBottom","label","options","value","onChange","newValue","int","parseInt","isNaN","undefined","Number","isInteger","toString","step","checked"],"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\t\t/>\n\t\t</PanelBody>\n\t</InspectorControls>\n);\n\nexport default OrderedListSettings;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,iBAAiB,QAAQ,yBAAyB;AAC3D,SACCC,WAAW,EACXC,SAAS,EACTC,aAAa,EACbC,aAAa,QACP,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE/B,MAAMC,mBAAmB,GAAGA,CAAE;EAAEC,aAAa;EAAEC,QAAQ;EAAEC,KAAK;EAAEC;AAAK,CAAC,kBACrEP,IAAA,CAACN,iBAAiB;EAAAc,QAAA,eACjBN,KAAA,CAACN,SAAS;IAACa,KAAK,EAAGhB,EAAE,CAAE,UAAW,CAAG;IAAAe,QAAA,gBACpCR,IAAA,CAACF,aAAa;MACbY,qBAAqB;MACrBC,uBAAuB;MACvBC,KAAK,EAAGnB,EAAE,CAAE,YAAa,CAAG;MAC5BoB,OAAO,EAAG,CACT;QACCD,KAAK,EAAEnB,EAAE,CAAE,SAAU,CAAC;QACtBqB,KAAK,EAAE;MACR,CAAC,EACD;QACCF,KAAK,EAAEnB,EAAE,CAAE,mBAAoB,CAAC;QAChCqB,KAAK,EAAE;MACR,CAAC,EACD;QACCF,KAAK,EAAEnB,EAAE,CAAE,mBAAoB,CAAC;QAChCqB,KAAK,EAAE;MACR,CAAC,EACD;QACCF,KAAK,EAAEnB,EAAE,CAAE,0BAA2B,CAAC;QACvCqB,KAAK,EAAE;MACR,CAAC,EACD;QACCF,KAAK,EAAEnB,EAAE,CAAE,0BAA2B,CAAC;QACvCqB,KAAK,EAAE;MACR,CAAC,CACC;MACHA,KAAK,EAAGP,IAAM;MACdQ,QAAQ,EAAKC,QAAQ,IAAMZ,aAAa,CAAE;QAAEG,IAAI,EAAES;MAAS,CAAE;IAAG,CAChE,CAAC,eACFhB,IAAA,CAACL,WAAW;MACXe,qBAAqB;MACrBC,uBAAuB;MACvBC,KAAK,EAAGnB,EAAE,CAAE,aAAc,CAAG;MAC7Bc,IAAI,EAAC,QAAQ;MACbQ,QAAQ,EAAKD,KAAK,IAAM;QACvB,MAAMG,GAAG,GAAGC,QAAQ,CAAEJ,KAAK,EAAE,EAAG,CAAC;QAEjCV,aAAa,CAAE;UACd;UACA;UACAE,KAAK,EAAEa,KAAK,CAAEF,GAAI,CAAC,GAAGG,SAAS,GAAGH;QACnC,CAAE,CAAC;MACJ,CAAG;MACHH,KAAK,EAAGO,MAAM,CAACC,SAAS,CAAEhB,KAAM,CAAC,GAAGA,KAAK,CAACiB,QAAQ,CAAE,EAAG,CAAC,GAAG,EAAI;MAC/DC,IAAI,EAAC;IAAG,CACR,CAAC,eACFxB,IAAA,CAACH,aAAa;MACbc,uBAAuB;MACvBC,KAAK,EAAGnB,EAAE,CAAE,eAAgB,CAAG;MAC/BgC,OAAO,EAAGpB,QAAQ,IAAI,KAAO;MAC7BU,QAAQ,EAAKD,KAAK,IAAM;QACvBV,aAAa,CAAE;UACd;UACAC,QAAQ,EAAES,KAAK,IAAIM;QACpB,CAAE,CAAC;MACJ;IAAG,CACH,CAAC;EAAA,CACQ;AAAC,CACM,CACnB;AAED,eAAejB,mBAAmB","ignoreList":[]}
@@ -38,13 +38,13 @@ export function IndentUI({
38
38
  children: [/*#__PURE__*/_jsx(ToolbarButton, {
39
39
  icon: isRTL() ? formatOutdentRTL : formatOutdent,
40
40
  title: __('Outdent'),
41
- describedBy: __('Outdent list item'),
41
+ description: __('Outdent list item'),
42
42
  disabled: !canOutdent,
43
43
  onClick: () => outdentListItem()
44
44
  }), /*#__PURE__*/_jsx(ToolbarButton, {
45
45
  icon: isRTL() ? formatIndentRTL : formatIndent,
46
46
  title: __('Indent'),
47
- describedBy: __('Indent list item'),
47
+ description: __('Indent list item'),
48
48
  disabled: !canIndent,
49
49
  onClick: () => indentListItem()
50
50
  })]