@wordpress/block-library 9.2.0 → 9.4.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 (623) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/audio/edit.js +20 -8
  3. package/build/audio/edit.js.map +1 -1
  4. package/build/audio/index.js +4 -0
  5. package/build/audio/index.js.map +1 -1
  6. package/build/audio/transforms.js +1 -1
  7. package/build/audio/transforms.js.map +1 -1
  8. package/build/block/edit.js +38 -24
  9. package/build/block/edit.js.map +1 -1
  10. package/build/block/index.js +5 -1
  11. package/build/block/index.js.map +1 -1
  12. package/build/button/edit.js +1 -1
  13. package/build/button/edit.js.map +1 -1
  14. package/build/buttons/index.js +26 -0
  15. package/build/buttons/index.js.map +1 -1
  16. package/build/categories/edit.js +20 -3
  17. package/build/categories/edit.js.map +1 -1
  18. package/build/categories/index.js +8 -0
  19. package/build/categories/index.js.map +1 -1
  20. package/build/columns/index.js +2 -2
  21. package/build/columns/index.js.map +1 -1
  22. package/build/cover/edit/inspector-controls.js +2 -1
  23. package/build/cover/edit/inspector-controls.js.map +1 -1
  24. package/build/embed/embed-preview.js +4 -4
  25. package/build/embed/embed-preview.js.map +1 -1
  26. package/build/embed/variations.js +39 -34
  27. package/build/embed/variations.js.map +1 -1
  28. package/build/file/edit.js +14 -6
  29. package/build/file/edit.js.map +1 -1
  30. package/build/file/index.js +4 -0
  31. package/build/file/index.js.map +1 -1
  32. package/build/file/transforms.js +2 -3
  33. package/build/file/transforms.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-input/edit.js +2 -0
  37. package/build/form-input/edit.js.map +1 -1
  38. package/build/gallery/deprecated.js +6 -54
  39. package/build/gallery/deprecated.js.map +1 -1
  40. package/build/gallery/edit.js +9 -8
  41. package/build/gallery/edit.js.map +1 -1
  42. package/build/gallery/index.js +12 -2
  43. package/build/gallery/index.js.map +1 -1
  44. package/build/gallery/save.js +0 -11
  45. package/build/gallery/save.js.map +1 -1
  46. package/build/gallery/shared.js +0 -27
  47. package/build/gallery/shared.js.map +1 -1
  48. package/build/gallery/transforms.js +29 -80
  49. package/build/gallery/transforms.js.map +1 -1
  50. package/build/group/deprecated.js +2 -5
  51. package/build/group/deprecated.js.map +1 -1
  52. package/build/group/index.js +1 -0
  53. package/build/group/index.js.map +1 -1
  54. package/build/group/placeholder.js +5 -0
  55. package/build/group/placeholder.js.map +1 -1
  56. package/build/heading/index.js +14 -1
  57. package/build/heading/index.js.map +1 -1
  58. package/build/image/edit.js +14 -22
  59. package/build/image/edit.js.map +1 -1
  60. package/build/image/image.js +54 -28
  61. package/build/image/image.js.map +1 -1
  62. package/build/image/index.js +7 -0
  63. package/build/image/index.js.map +1 -1
  64. package/build/image/transforms.js +1 -1
  65. package/build/image/transforms.js.map +1 -1
  66. package/build/image/view.js +65 -49
  67. package/build/image/view.js.map +1 -1
  68. package/build/latest-comments/index.js +9 -0
  69. package/build/latest-comments/index.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-item/edit.js +3 -3
  73. package/build/list-item/edit.js.map +1 -1
  74. package/build/list-item/hooks/index.js +0 -7
  75. package/build/list-item/hooks/index.js.map +1 -1
  76. package/build/list-item/hooks/use-merge.js +8 -1
  77. package/build/list-item/hooks/use-merge.js.map +1 -1
  78. package/build/list-item/index.js +11 -1
  79. package/build/list-item/index.js.map +1 -1
  80. package/build/loginout/index.js +3 -0
  81. package/build/loginout/index.js.map +1 -1
  82. package/build/media-text/edit.js +3 -2
  83. package/build/media-text/edit.js.map +1 -1
  84. package/build/media-text/index.js +12 -0
  85. package/build/media-text/index.js.map +1 -1
  86. package/build/navigation/edit/navigation-menu-delete-control.js +1 -0
  87. package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  88. package/build/navigation/use-navigation-menu.js +5 -1
  89. package/build/navigation/use-navigation-menu.js.map +1 -1
  90. package/build/navigation-link/link-ui.js +13 -17
  91. package/build/navigation-link/link-ui.js.map +1 -1
  92. package/build/navigation-submenu/edit.js +1 -12
  93. package/build/navigation-submenu/edit.js.map +1 -1
  94. package/build/page-list/convert-to-links-modal.js +1 -1
  95. package/build/page-list/convert-to-links-modal.js.map +1 -1
  96. package/build/page-list/edit.js +2 -1
  97. package/build/page-list/edit.js.map +1 -1
  98. package/build/page-list-item/edit.js +4 -1
  99. package/build/page-list-item/edit.js.map +1 -1
  100. package/build/paragraph/index.js +6 -0
  101. package/build/paragraph/index.js.map +1 -1
  102. package/build/paragraph/transforms.js +6 -0
  103. package/build/paragraph/transforms.js.map +1 -1
  104. package/build/post-author/index.js +8 -0
  105. package/build/post-author/index.js.map +1 -1
  106. package/build/post-author-biography/index.js +3 -0
  107. package/build/post-author-biography/index.js.map +1 -1
  108. package/build/post-author-name/index.js +3 -0
  109. package/build/post-author-name/index.js.map +1 -1
  110. package/build/post-content/index.js +3 -0
  111. package/build/post-content/index.js.map +1 -1
  112. package/build/post-date/edit.js +3 -1
  113. package/build/post-date/edit.js.map +1 -1
  114. package/build/post-date/index.js +3 -0
  115. package/build/post-date/index.js.map +1 -1
  116. package/build/post-excerpt/edit.js +1 -0
  117. package/build/post-excerpt/edit.js.map +1 -1
  118. package/build/post-excerpt/index.js +3 -0
  119. package/build/post-excerpt/index.js.map +1 -1
  120. package/build/post-featured-image/index.js +3 -0
  121. package/build/post-featured-image/index.js.map +1 -1
  122. package/build/post-terms/index.js +3 -0
  123. package/build/post-terms/index.js.map +1 -1
  124. package/build/post-title/edit.js +5 -1
  125. package/build/post-title/edit.js.map +1 -1
  126. package/build/post-title/index.js +3 -0
  127. package/build/post-title/index.js.map +1 -1
  128. package/build/query/edit/inspector-controls/author-control.js +3 -1
  129. package/build/query/edit/inspector-controls/author-control.js.map +1 -1
  130. package/build/query/edit/inspector-controls/index.js +27 -8
  131. package/build/query/edit/inspector-controls/index.js.map +1 -1
  132. package/build/query/edit/inspector-controls/order-control.js +1 -0
  133. package/build/query/edit/inspector-controls/order-control.js.map +1 -1
  134. package/build/query/edit/inspector-controls/parent-control.js +2 -1
  135. package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
  136. package/build/query/edit/inspector-controls/sticky-control.js +1 -0
  137. package/build/query/edit/inspector-controls/sticky-control.js.map +1 -1
  138. package/build/query/edit/inspector-controls/taxonomy-controls.js +5 -2
  139. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  140. package/build/query/edit/query-content.js +11 -2
  141. package/build/query/edit/query-content.js.map +1 -1
  142. package/build/query/edit/query-placeholder.js +1 -14
  143. package/build/query/edit/query-placeholder.js.map +1 -1
  144. package/build/query/edit/query-toolbar.js +54 -61
  145. package/build/query/edit/query-toolbar.js.map +1 -1
  146. package/build/query/index.js +34 -0
  147. package/build/query/index.js.map +1 -1
  148. package/build/query/utils.js +5 -1
  149. package/build/query/utils.js.map +1 -1
  150. package/build/query/variations.js +9 -55
  151. package/build/query/variations.js.map +1 -1
  152. package/build/query-pagination-numbers/edit.js +1 -0
  153. package/build/query-pagination-numbers/edit.js.map +1 -1
  154. package/build/query-title/edit.js +11 -19
  155. package/build/query-title/edit.js.map +1 -1
  156. package/build/query-title/use-archive-label.js +95 -0
  157. package/build/query-title/use-archive-label.js.map +1 -0
  158. package/build/quote/index.js +15 -1
  159. package/build/quote/index.js.map +1 -1
  160. package/build/search/index.js +3 -0
  161. package/build/search/index.js.map +1 -1
  162. package/build/site-logo/edit.js +4 -1
  163. package/build/site-logo/edit.js.map +1 -1
  164. package/build/site-tagline/edit.js +5 -2
  165. package/build/site-tagline/edit.js.map +1 -1
  166. package/build/site-tagline/index.js +6 -1
  167. package/build/site-tagline/index.js.map +1 -1
  168. package/build/site-title/edit.js +4 -1
  169. package/build/site-title/edit.js.map +1 -1
  170. package/build/site-title/index.js +6 -1
  171. package/build/site-title/index.js.map +1 -1
  172. package/build/social-link/edit.js +27 -7
  173. package/build/social-link/edit.js.map +1 -1
  174. package/build/social-link/icons/soundcloud.js +1 -1
  175. package/build/social-link/icons/soundcloud.js.map +1 -1
  176. package/build/social-links/index.js +12 -0
  177. package/build/social-links/index.js.map +1 -1
  178. package/build/table/edit.js +8 -17
  179. package/build/table/edit.js.map +1 -1
  180. package/build/tag-cloud/edit.js +4 -1
  181. package/build/tag-cloud/edit.js.map +1 -1
  182. package/build/template-part/edit/index.js +5 -3
  183. package/build/template-part/edit/index.js.map +1 -1
  184. package/build/template-part/edit/inner-blocks.js +8 -3
  185. package/build/template-part/edit/inner-blocks.js.map +1 -1
  186. package/build/template-part/edit/placeholder.js +23 -3
  187. package/build/template-part/edit/placeholder.js.map +1 -1
  188. package/build/template-part/edit/title-modal.js +21 -9
  189. package/build/template-part/edit/title-modal.js.map +1 -1
  190. package/build/term-description/index.js +12 -0
  191. package/build/term-description/index.js.map +1 -1
  192. package/build/utils/hooks.js +17 -1
  193. package/build/utils/hooks.js.map +1 -1
  194. package/build/video/deprecated.js +4 -0
  195. package/build/video/deprecated.js.map +1 -1
  196. package/build/video/edit.js +17 -7
  197. package/build/video/edit.js.map +1 -1
  198. package/build/video/index.js +4 -0
  199. package/build/video/index.js.map +1 -1
  200. package/build/video/transforms.js +1 -1
  201. package/build/video/transforms.js.map +1 -1
  202. package/build-module/audio/edit.js +20 -8
  203. package/build-module/audio/edit.js.map +1 -1
  204. package/build-module/audio/index.js +4 -0
  205. package/build-module/audio/index.js.map +1 -1
  206. package/build-module/audio/transforms.js +1 -1
  207. package/build-module/audio/transforms.js.map +1 -1
  208. package/build-module/block/edit.js +38 -24
  209. package/build-module/block/edit.js.map +1 -1
  210. package/build-module/block/index.js +5 -1
  211. package/build-module/block/index.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 +8 -0
  219. package/build-module/categories/index.js.map +1 -1
  220. package/build-module/columns/index.js +2 -2
  221. package/build-module/columns/index.js.map +1 -1
  222. package/build-module/cover/edit/inspector-controls.js +2 -1
  223. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  224. package/build-module/embed/embed-preview.js +4 -4
  225. package/build-module/embed/embed-preview.js.map +1 -1
  226. package/build-module/embed/variations.js +40 -35
  227. package/build-module/embed/variations.js.map +1 -1
  228. package/build-module/file/edit.js +15 -7
  229. package/build-module/file/edit.js.map +1 -1
  230. package/build-module/file/index.js +4 -0
  231. package/build-module/file/index.js.map +1 -1
  232. package/build-module/file/transforms.js +2 -3
  233. package/build-module/file/transforms.js.map +1 -1
  234. package/build-module/footnotes/index.js +1 -1
  235. package/build-module/footnotes/index.js.map +1 -1
  236. package/build-module/form-input/edit.js +2 -0
  237. package/build-module/form-input/edit.js.map +1 -1
  238. package/build-module/gallery/deprecated.js +6 -54
  239. package/build-module/gallery/deprecated.js.map +1 -1
  240. package/build-module/gallery/edit.js +10 -9
  241. package/build-module/gallery/edit.js.map +1 -1
  242. package/build-module/gallery/index.js +11 -1
  243. package/build-module/gallery/index.js.map +1 -1
  244. package/build-module/gallery/save.js +0 -11
  245. package/build-module/gallery/save.js.map +1 -1
  246. package/build-module/gallery/shared.js +0 -25
  247. package/build-module/gallery/shared.js.map +1 -1
  248. package/build-module/gallery/transforms.js +29 -80
  249. package/build-module/gallery/transforms.js.map +1 -1
  250. package/build-module/group/deprecated.js +2 -5
  251. package/build-module/group/deprecated.js.map +1 -1
  252. package/build-module/group/index.js +1 -0
  253. package/build-module/group/index.js.map +1 -1
  254. package/build-module/group/placeholder.js +5 -0
  255. package/build-module/group/placeholder.js.map +1 -1
  256. package/build-module/heading/index.js +14 -1
  257. package/build-module/heading/index.js.map +1 -1
  258. package/build-module/image/edit.js +13 -21
  259. package/build-module/image/edit.js.map +1 -1
  260. package/build-module/image/image.js +50 -24
  261. package/build-module/image/image.js.map +1 -1
  262. package/build-module/image/index.js +7 -0
  263. package/build-module/image/index.js.map +1 -1
  264. package/build-module/image/transforms.js +1 -1
  265. package/build-module/image/transforms.js.map +1 -1
  266. package/build-module/image/view.js +65 -49
  267. package/build-module/image/view.js.map +1 -1
  268. package/build-module/latest-comments/index.js +9 -0
  269. package/build-module/latest-comments/index.js.map +1 -1
  270. package/build-module/list/edit.js +3 -3
  271. package/build-module/list/edit.js.map +1 -1
  272. package/build-module/list-item/edit.js +3 -3
  273. package/build-module/list-item/edit.js.map +1 -1
  274. package/build-module/list-item/hooks/index.js +0 -1
  275. package/build-module/list-item/hooks/index.js.map +1 -1
  276. package/build-module/list-item/hooks/use-merge.js +8 -1
  277. package/build-module/list-item/hooks/use-merge.js.map +1 -1
  278. package/build-module/list-item/index.js +11 -1
  279. package/build-module/list-item/index.js.map +1 -1
  280. package/build-module/loginout/index.js +3 -0
  281. package/build-module/loginout/index.js.map +1 -1
  282. package/build-module/media-text/edit.js +3 -2
  283. package/build-module/media-text/edit.js.map +1 -1
  284. package/build-module/media-text/index.js +12 -0
  285. package/build-module/media-text/index.js.map +1 -1
  286. package/build-module/navigation/edit/navigation-menu-delete-control.js +1 -0
  287. package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  288. package/build-module/navigation/use-navigation-menu.js +5 -1
  289. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  290. package/build-module/navigation-link/link-ui.js +13 -17
  291. package/build-module/navigation-link/link-ui.js.map +1 -1
  292. package/build-module/navigation-submenu/edit.js +1 -12
  293. package/build-module/navigation-submenu/edit.js.map +1 -1
  294. package/build-module/page-list/convert-to-links-modal.js +1 -1
  295. package/build-module/page-list/convert-to-links-modal.js.map +1 -1
  296. package/build-module/page-list/edit.js +2 -1
  297. package/build-module/page-list/edit.js.map +1 -1
  298. package/build-module/page-list-item/edit.js +4 -1
  299. package/build-module/page-list-item/edit.js.map +1 -1
  300. package/build-module/paragraph/index.js +6 -0
  301. package/build-module/paragraph/index.js.map +1 -1
  302. package/build-module/paragraph/transforms.js +6 -0
  303. package/build-module/paragraph/transforms.js.map +1 -1
  304. package/build-module/post-author/index.js +8 -0
  305. package/build-module/post-author/index.js.map +1 -1
  306. package/build-module/post-author-biography/index.js +3 -0
  307. package/build-module/post-author-biography/index.js.map +1 -1
  308. package/build-module/post-author-name/index.js +3 -0
  309. package/build-module/post-author-name/index.js.map +1 -1
  310. package/build-module/post-content/index.js +3 -0
  311. package/build-module/post-content/index.js.map +1 -1
  312. package/build-module/post-date/edit.js +4 -2
  313. package/build-module/post-date/edit.js.map +1 -1
  314. package/build-module/post-date/index.js +3 -0
  315. package/build-module/post-date/index.js.map +1 -1
  316. package/build-module/post-excerpt/edit.js +1 -0
  317. package/build-module/post-excerpt/edit.js.map +1 -1
  318. package/build-module/post-excerpt/index.js +3 -0
  319. package/build-module/post-excerpt/index.js.map +1 -1
  320. package/build-module/post-featured-image/index.js +3 -0
  321. package/build-module/post-featured-image/index.js.map +1 -1
  322. package/build-module/post-terms/index.js +3 -0
  323. package/build-module/post-terms/index.js.map +1 -1
  324. package/build-module/post-title/edit.js +5 -1
  325. package/build-module/post-title/edit.js.map +1 -1
  326. package/build-module/post-title/index.js +3 -0
  327. package/build-module/post-title/index.js.map +1 -1
  328. package/build-module/query/edit/inspector-controls/author-control.js +3 -1
  329. package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
  330. package/build-module/query/edit/inspector-controls/index.js +28 -9
  331. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  332. package/build-module/query/edit/inspector-controls/order-control.js +1 -0
  333. package/build-module/query/edit/inspector-controls/order-control.js.map +1 -1
  334. package/build-module/query/edit/inspector-controls/parent-control.js +2 -1
  335. package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
  336. package/build-module/query/edit/inspector-controls/sticky-control.js +1 -0
  337. package/build-module/query/edit/inspector-controls/sticky-control.js.map +1 -1
  338. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +6 -4
  339. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  340. package/build-module/query/edit/query-content.js +11 -2
  341. package/build-module/query/edit/query-content.js.map +1 -1
  342. package/build-module/query/edit/query-placeholder.js +1 -14
  343. package/build-module/query/edit/query-placeholder.js.map +1 -1
  344. package/build-module/query/edit/query-toolbar.js +55 -62
  345. package/build-module/query/edit/query-toolbar.js.map +1 -1
  346. package/build-module/query/index.js +34 -0
  347. package/build-module/query/index.js.map +1 -1
  348. package/build-module/query/utils.js +5 -1
  349. package/build-module/query/utils.js.map +1 -1
  350. package/build-module/query/variations.js +4 -50
  351. package/build-module/query/variations.js.map +1 -1
  352. package/build-module/query-pagination-numbers/edit.js +1 -0
  353. package/build-module/query-pagination-numbers/edit.js.map +1 -1
  354. package/build-module/query-title/edit.js +12 -20
  355. package/build-module/query-title/edit.js.map +1 -1
  356. package/build-module/query-title/use-archive-label.js +88 -0
  357. package/build-module/query-title/use-archive-label.js.map +1 -0
  358. package/build-module/quote/index.js +15 -1
  359. package/build-module/quote/index.js.map +1 -1
  360. package/build-module/search/index.js +3 -0
  361. package/build-module/search/index.js.map +1 -1
  362. package/build-module/site-logo/edit.js +4 -1
  363. package/build-module/site-logo/edit.js.map +1 -1
  364. package/build-module/site-tagline/edit.js +5 -2
  365. package/build-module/site-tagline/edit.js.map +1 -1
  366. package/build-module/site-tagline/index.js +6 -1
  367. package/build-module/site-tagline/index.js.map +1 -1
  368. package/build-module/site-title/edit.js +4 -1
  369. package/build-module/site-title/edit.js.map +1 -1
  370. package/build-module/site-title/index.js +6 -1
  371. package/build-module/site-title/index.js.map +1 -1
  372. package/build-module/social-link/edit.js +28 -8
  373. package/build-module/social-link/edit.js.map +1 -1
  374. package/build-module/social-link/icons/soundcloud.js +1 -1
  375. package/build-module/social-link/icons/soundcloud.js.map +1 -1
  376. package/build-module/social-links/index.js +12 -0
  377. package/build-module/social-links/index.js.map +1 -1
  378. package/build-module/table/edit.js +9 -18
  379. package/build-module/table/edit.js.map +1 -1
  380. package/build-module/tag-cloud/edit.js +4 -1
  381. package/build-module/tag-cloud/edit.js.map +1 -1
  382. package/build-module/template-part/edit/index.js +5 -3
  383. package/build-module/template-part/edit/index.js.map +1 -1
  384. package/build-module/template-part/edit/inner-blocks.js +8 -3
  385. package/build-module/template-part/edit/inner-blocks.js.map +1 -1
  386. package/build-module/template-part/edit/placeholder.js +23 -3
  387. package/build-module/template-part/edit/placeholder.js.map +1 -1
  388. package/build-module/template-part/edit/title-modal.js +21 -9
  389. package/build-module/template-part/edit/title-modal.js.map +1 -1
  390. package/build-module/term-description/index.js +12 -0
  391. package/build-module/term-description/index.js.map +1 -1
  392. package/build-module/utils/hooks.js +16 -1
  393. package/build-module/utils/hooks.js.map +1 -1
  394. package/build-module/video/deprecated.js +4 -0
  395. package/build-module/video/deprecated.js.map +1 -1
  396. package/build-module/video/edit.js +18 -8
  397. package/build-module/video/edit.js.map +1 -1
  398. package/build-module/video/index.js +4 -0
  399. package/build-module/video/index.js.map +1 -1
  400. package/build-module/video/transforms.js +1 -1
  401. package/build-module/video/transforms.js.map +1 -1
  402. package/build-style/categories/editor-rtl.css +4 -0
  403. package/build-style/categories/editor.css +4 -0
  404. package/build-style/categories/style-rtl.css +4 -0
  405. package/build-style/categories/style.css +4 -0
  406. package/build-style/editor-rtl.css +16 -12
  407. package/build-style/editor.css +16 -12
  408. package/build-style/image/editor-rtl.css +8 -4
  409. package/build-style/image/editor.css +8 -4
  410. package/build-style/image/style-rtl.css +19 -0
  411. package/build-style/image/style.css +19 -0
  412. package/build-style/list/style-rtl.css +1 -1
  413. package/build-style/list/style.css +1 -1
  414. package/build-style/navigation/style-rtl.css +1 -4
  415. package/build-style/navigation/style.css +1 -4
  416. package/build-style/post-comments-form/style-rtl.css +12 -11
  417. package/build-style/post-comments-form/style.css +12 -11
  418. package/build-style/query/editor-rtl.css +3 -7
  419. package/build-style/query/editor.css +3 -7
  420. package/build-style/search/editor-rtl.css +1 -1
  421. package/build-style/search/editor.css +1 -1
  422. package/build-style/social-links/style-rtl.css +93 -93
  423. package/build-style/social-links/style.css +93 -93
  424. package/build-style/style-rtl.css +131 -109
  425. package/build-style/style.css +131 -109
  426. package/build-style/term-description/style-rtl.css +1 -0
  427. package/build-style/term-description/style.css +1 -0
  428. package/package.json +35 -35
  429. package/src/audio/block.json +4 -0
  430. package/src/audio/edit.js +19 -7
  431. package/src/audio/transforms.js +1 -1
  432. package/src/block/block.json +5 -1
  433. package/src/block/edit.js +58 -28
  434. package/src/block/test/edit.native.js +6 -2
  435. package/src/button/edit.js +1 -1
  436. package/src/button/index.php +14 -1
  437. package/src/buttons/block.json +20 -0
  438. package/src/buttons/index.js +6 -0
  439. package/src/categories/block.json +8 -0
  440. package/src/categories/edit.js +32 -4
  441. package/src/categories/editor.scss +4 -0
  442. package/src/categories/index.php +4 -1
  443. package/src/categories/style.scss +4 -0
  444. package/src/columns/index.js +1 -1
  445. package/src/cover/edit/inspector-controls.js +1 -0
  446. package/src/embed/embed-preview.js +4 -6
  447. package/src/embed/test/__snapshots__/index.native.js.snap +8 -8
  448. package/src/embed/test/index.js +1 -1
  449. package/src/embed/test/index.native.js +24 -23
  450. package/src/embed/variations.js +43 -35
  451. package/src/file/block.json +4 -0
  452. package/src/file/edit.js +19 -6
  453. package/src/file/transforms.js +1 -2
  454. package/src/footnotes/index.js +1 -2
  455. package/src/form-input/edit.js +2 -0
  456. package/src/gallery/block.json +10 -0
  457. package/src/gallery/deprecated.js +6 -55
  458. package/src/gallery/edit.js +13 -10
  459. package/src/gallery/gallery-styles.native.scss +0 -2
  460. package/src/gallery/index.js +1 -1
  461. package/src/gallery/save.js +0 -10
  462. package/src/gallery/shared.js +0 -28
  463. package/src/gallery/transforms.js +56 -99
  464. package/src/group/block.json +1 -0
  465. package/src/group/deprecated.js +3 -7
  466. package/src/group/placeholder.js +7 -0
  467. package/src/heading/block.json +12 -0
  468. package/src/heading/index.js +1 -0
  469. package/src/image/block.json +7 -0
  470. package/src/image/edit.js +11 -20
  471. package/src/image/editor.scss +6 -1
  472. package/src/image/image.js +91 -49
  473. package/src/image/index.php +58 -20
  474. package/src/image/style.scss +22 -0
  475. package/src/image/test/edit.native.js +1 -0
  476. package/src/image/transforms.js +1 -1
  477. package/src/image/view.js +69 -49
  478. package/src/latest-comments/block.json +9 -0
  479. package/src/list/edit.js +3 -3
  480. package/src/list/style.scss +1 -1
  481. package/src/list-item/block.json +11 -1
  482. package/src/list-item/edit.js +3 -3
  483. package/src/list-item/hooks/index.js +0 -1
  484. package/src/list-item/hooks/use-merge.js +19 -5
  485. package/src/loginout/block.json +3 -0
  486. package/src/media-text/block.json +12 -0
  487. package/src/media-text/edit.js +3 -2
  488. package/src/navigation/edit/navigation-menu-delete-control.js +1 -0
  489. package/src/navigation/index.php +1 -1
  490. package/src/navigation/style.scss +4 -9
  491. package/src/navigation/test/use-navigation-menu.js +54 -15
  492. package/src/navigation/use-navigation-menu.js +5 -1
  493. package/src/navigation-link/link-ui.js +8 -14
  494. package/src/navigation-submenu/edit.js +2 -14
  495. package/src/page-list/convert-to-links-modal.js +1 -1
  496. package/src/page-list/edit.js +2 -1
  497. package/src/page-list-item/edit.js +4 -4
  498. package/src/paragraph/block.json +6 -0
  499. package/src/post-author/index.js +8 -0
  500. package/src/post-author-biography/block.json +3 -0
  501. package/src/post-author-name/block.json +3 -0
  502. package/src/post-comments-form/style.scss +16 -13
  503. package/src/post-content/block.json +3 -0
  504. package/src/post-date/block.json +3 -0
  505. package/src/post-date/edit.js +5 -1
  506. package/src/post-date/index.php +8 -2
  507. package/src/post-excerpt/block.json +3 -0
  508. package/src/post-excerpt/edit.js +1 -0
  509. package/src/post-featured-image/block.json +3 -0
  510. package/src/post-terms/block.json +3 -0
  511. package/src/post-title/block.json +3 -0
  512. package/src/post-title/edit.js +5 -5
  513. package/src/query/edit/inspector-controls/author-control.js +2 -0
  514. package/src/query/edit/inspector-controls/index.js +44 -16
  515. package/src/query/edit/inspector-controls/order-control.js +1 -0
  516. package/src/query/edit/inspector-controls/parent-control.js +1 -0
  517. package/src/query/edit/inspector-controls/sticky-control.js +1 -0
  518. package/src/query/edit/inspector-controls/taxonomy-controls.js +8 -3
  519. package/src/query/edit/query-content.js +17 -3
  520. package/src/query/edit/query-placeholder.js +1 -21
  521. package/src/query/edit/query-toolbar.js +60 -72
  522. package/src/query/editor.scss +4 -9
  523. package/src/query/index.js +40 -0
  524. package/src/query/utils.js +4 -0
  525. package/src/query/variations.js +4 -46
  526. package/src/query-pagination-numbers/edit.js +1 -0
  527. package/src/query-title/edit.js +10 -17
  528. package/src/query-title/use-archive-label.js +99 -0
  529. package/src/quote/block.json +15 -1
  530. package/src/search/block.json +3 -0
  531. package/src/search/editor.scss +1 -1
  532. package/src/site-logo/edit.js +4 -1
  533. package/src/site-tagline/block.json +6 -1
  534. package/src/site-tagline/edit.js +5 -2
  535. package/src/site-title/edit.js +4 -1
  536. package/src/site-title/index.js +6 -1
  537. package/src/social-link/edit.js +29 -3
  538. package/src/social-link/icons/soundcloud.js +1 -1
  539. package/src/social-link/socials-with-bg.scss +1 -1
  540. package/src/social-link/socials-without-bg.scss +1 -1
  541. package/src/social-links/block.json +12 -0
  542. package/src/social-links/style.scss +2 -2
  543. package/src/table/edit.js +11 -24
  544. package/src/tag-cloud/edit.js +7 -1
  545. package/src/template-part/edit/index.js +5 -3
  546. package/src/template-part/edit/inner-blocks.js +8 -5
  547. package/src/template-part/edit/placeholder.js +31 -6
  548. package/src/template-part/edit/title-modal.js +19 -5
  549. package/src/term-description/block.json +12 -0
  550. package/src/term-description/style.scss +2 -0
  551. package/src/utils/hooks.js +19 -2
  552. package/src/video/block.json +4 -0
  553. package/src/video/edit.js +23 -8
  554. package/src/video/transforms.js +1 -1
  555. package/tsconfig.tsbuildinfo +1 -1
  556. package/build/gallery/edit-wrapper.js +0 -37
  557. package/build/gallery/edit-wrapper.js.map +0 -1
  558. package/build/gallery/v1/constants.js +0 -10
  559. package/build/gallery/v1/constants.js.map +0 -1
  560. package/build/gallery/v1/edit.js +0 -399
  561. package/build/gallery/v1/edit.js.map +0 -1
  562. package/build/gallery/v1/gallery-button.native.js +0 -55
  563. package/build/gallery/v1/gallery-button.native.js.map +0 -1
  564. package/build/gallery/v1/gallery-image.js +0 -285
  565. package/build/gallery/v1/gallery-image.js.map +0 -1
  566. package/build/gallery/v1/gallery-image.native.js +0 -297
  567. package/build/gallery/v1/gallery-image.native.js.map +0 -1
  568. package/build/gallery/v1/gallery.js +0 -112
  569. package/build/gallery/v1/gallery.js.map +0 -1
  570. package/build/gallery/v1/gallery.native.js +0 -139
  571. package/build/gallery/v1/gallery.native.js.map +0 -1
  572. package/build/gallery/v1/save.js +0 -81
  573. package/build/gallery/v1/save.js.map +0 -1
  574. package/build/gallery/v1/shared.js +0 -17
  575. package/build/gallery/v1/shared.js.map +0 -1
  576. package/build/gallery/v1/tiles.native.js +0 -83
  577. package/build/gallery/v1/tiles.native.js.map +0 -1
  578. package/build/list-item/hooks/use-split.js +0 -39
  579. package/build/list-item/hooks/use-split.js.map +0 -1
  580. package/build/utils/constants.js +0 -15
  581. package/build/utils/constants.js.map +0 -1
  582. package/build-module/gallery/edit-wrapper.js +0 -31
  583. package/build-module/gallery/edit-wrapper.js.map +0 -1
  584. package/build-module/gallery/v1/constants.js +0 -4
  585. package/build-module/gallery/v1/constants.js.map +0 -1
  586. package/build-module/gallery/v1/edit.js +0 -393
  587. package/build-module/gallery/v1/edit.js.map +0 -1
  588. package/build-module/gallery/v1/gallery-button.native.js +0 -46
  589. package/build-module/gallery/v1/gallery-button.native.js.map +0 -1
  590. package/build-module/gallery/v1/gallery-image.js +0 -279
  591. package/build-module/gallery/v1/gallery-image.js.map +0 -1
  592. package/build-module/gallery/v1/gallery-image.native.js +0 -291
  593. package/build-module/gallery/v1/gallery-image.native.js.map +0 -1
  594. package/build-module/gallery/v1/gallery.js +0 -104
  595. package/build-module/gallery/v1/gallery.js.map +0 -1
  596. package/build-module/gallery/v1/gallery.native.js +0 -131
  597. package/build-module/gallery/v1/gallery.native.js.map +0 -1
  598. package/build-module/gallery/v1/save.js +0 -74
  599. package/build-module/gallery/v1/save.js.map +0 -1
  600. package/build-module/gallery/v1/shared.js +0 -10
  601. package/build-module/gallery/v1/shared.js.map +0 -1
  602. package/build-module/gallery/v1/tiles.native.js +0 -75
  603. package/build-module/gallery/v1/tiles.native.js.map +0 -1
  604. package/build-module/list-item/hooks/use-split.js +0 -32
  605. package/build-module/list-item/hooks/use-split.js.map +0 -1
  606. package/build-module/utils/constants.js +0 -9
  607. package/build-module/utils/constants.js.map +0 -1
  608. package/src/gallery/edit-wrapper.js +0 -27
  609. package/src/gallery/v1/constants.js +0 -3
  610. package/src/gallery/v1/edit.js +0 -450
  611. package/src/gallery/v1/gallery-button.native.js +0 -47
  612. package/src/gallery/v1/gallery-image-style.native.scss +0 -109
  613. package/src/gallery/v1/gallery-image.js +0 -293
  614. package/src/gallery/v1/gallery-image.native.js +0 -348
  615. package/src/gallery/v1/gallery-styles.native.scss +0 -8
  616. package/src/gallery/v1/gallery.js +0 -125
  617. package/src/gallery/v1/gallery.native.js +0 -162
  618. package/src/gallery/v1/save.js +0 -98
  619. package/src/gallery/v1/shared.js +0 -19
  620. package/src/gallery/v1/tiles-styles.native.scss +0 -11
  621. package/src/gallery/v1/tiles.native.js +0 -79
  622. package/src/list-item/hooks/use-split.js +0 -33
  623. package/src/utils/constants.js +0 -8
@@ -1,104 +0,0 @@
1
- /**
2
- * External dependencies
3
- */
4
- import clsx from 'clsx';
5
-
6
- /**
7
- * WordPress dependencies
8
- */
9
- import { RichText, __experimentalGetElementClassName } from '@wordpress/block-editor';
10
- import { VisuallyHidden } from '@wordpress/components';
11
- import { __, sprintf } from '@wordpress/i18n';
12
- import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
13
-
14
- /**
15
- * Internal dependencies
16
- */
17
- import GalleryImage from './gallery-image';
18
- import { defaultColumnsNumberV1 } from '../deprecated';
19
- import { jsx as _jsx } from "react/jsx-runtime";
20
- import { jsxs as _jsxs } from "react/jsx-runtime";
21
- export const Gallery = props => {
22
- const {
23
- attributes,
24
- isSelected,
25
- setAttributes,
26
- selectedImage,
27
- mediaPlaceholder,
28
- onMoveBackward,
29
- onMoveForward,
30
- onRemoveImage,
31
- onSelectImage,
32
- onDeselectImage,
33
- onSetImageAttributes,
34
- insertBlocksAfter,
35
- blockProps
36
- } = props;
37
- const {
38
- align,
39
- columns = defaultColumnsNumberV1(attributes),
40
- caption,
41
- imageCrop,
42
- images
43
- } = attributes;
44
- return /*#__PURE__*/_jsxs("figure", {
45
- ...blockProps,
46
- className: clsx(blockProps.className, {
47
- [`align${align}`]: align,
48
- [`columns-${columns}`]: columns,
49
- 'is-cropped': imageCrop
50
- }),
51
- children: [/*#__PURE__*/_jsx("ul", {
52
- className: "blocks-gallery-grid",
53
- children: images.map((img, index) => {
54
- const ariaLabel = sprintf( /* translators: 1: the order number of the image. 2: the total number of images. */
55
- __('image %1$d of %2$d in gallery'), index + 1, images.length);
56
- return /*#__PURE__*/_jsx("li", {
57
- className: "blocks-gallery-item",
58
- children: /*#__PURE__*/_jsx(GalleryImage, {
59
- url: img.url,
60
- alt: img.alt,
61
- id: img.id,
62
- isFirstItem: index === 0,
63
- isLastItem: index + 1 === images.length,
64
- isSelected: isSelected && selectedImage === index,
65
- onMoveBackward: onMoveBackward(index),
66
- onMoveForward: onMoveForward(index),
67
- onRemove: onRemoveImage(index),
68
- onSelect: onSelectImage(index),
69
- onDeselect: onDeselectImage(index),
70
- setAttributes: attrs => onSetImageAttributes(index, attrs),
71
- caption: img.caption,
72
- "aria-label": ariaLabel,
73
- sizeSlug: attributes.sizeSlug
74
- })
75
- }, img.id ? `${img.id}-${index}` : img.url);
76
- })
77
- }), mediaPlaceholder, /*#__PURE__*/_jsx(RichTextVisibilityHelper, {
78
- isHidden: !isSelected && RichText.isEmpty(caption),
79
- tagName: "figcaption",
80
- className: clsx('blocks-gallery-caption', __experimentalGetElementClassName('caption')),
81
- "aria-label": __('Gallery caption text'),
82
- placeholder: __('Write gallery caption…'),
83
- value: caption,
84
- onChange: value => setAttributes({
85
- caption: value
86
- }),
87
- inlineToolbar: true,
88
- __unstableOnSplitAtEnd: () => insertBlocksAfter(createBlock(getDefaultBlockName()))
89
- })]
90
- });
91
- };
92
- function RichTextVisibilityHelper({
93
- isHidden,
94
- ...richTextProps
95
- }) {
96
- return isHidden ? /*#__PURE__*/_jsx(VisuallyHidden, {
97
- as: RichText,
98
- ...richTextProps
99
- }) : /*#__PURE__*/_jsx(RichText, {
100
- ...richTextProps
101
- });
102
- }
103
- export default Gallery;
104
- //# sourceMappingURL=gallery.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["clsx","RichText","__experimentalGetElementClassName","VisuallyHidden","__","sprintf","createBlock","getDefaultBlockName","GalleryImage","defaultColumnsNumberV1","jsx","_jsx","jsxs","_jsxs","Gallery","props","attributes","isSelected","setAttributes","selectedImage","mediaPlaceholder","onMoveBackward","onMoveForward","onRemoveImage","onSelectImage","onDeselectImage","onSetImageAttributes","insertBlocksAfter","blockProps","align","columns","caption","imageCrop","images","className","children","map","img","index","ariaLabel","length","url","alt","id","isFirstItem","isLastItem","onRemove","onSelect","onDeselect","attrs","sizeSlug","RichTextVisibilityHelper","isHidden","isEmpty","tagName","placeholder","value","onChange","inlineToolbar","__unstableOnSplitAtEnd","richTextProps","as"],"sources":["@wordpress/block-library/src/gallery/v1/gallery.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tRichText,\n\t__experimentalGetElementClassName,\n} from '@wordpress/block-editor';\nimport { VisuallyHidden } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport GalleryImage from './gallery-image';\nimport { defaultColumnsNumberV1 } from '../deprecated';\n\nexport const Gallery = ( props ) => {\n\tconst {\n\t\tattributes,\n\t\tisSelected,\n\t\tsetAttributes,\n\t\tselectedImage,\n\t\tmediaPlaceholder,\n\t\tonMoveBackward,\n\t\tonMoveForward,\n\t\tonRemoveImage,\n\t\tonSelectImage,\n\t\tonDeselectImage,\n\t\tonSetImageAttributes,\n\t\tinsertBlocksAfter,\n\t\tblockProps,\n\t} = props;\n\n\tconst {\n\t\talign,\n\t\tcolumns = defaultColumnsNumberV1( attributes ),\n\t\tcaption,\n\t\timageCrop,\n\t\timages,\n\t} = attributes;\n\n\treturn (\n\t\t<figure\n\t\t\t{ ...blockProps }\n\t\t\tclassName={ clsx( blockProps.className, {\n\t\t\t\t[ `align${ align }` ]: align,\n\t\t\t\t[ `columns-${ columns }` ]: columns,\n\t\t\t\t'is-cropped': imageCrop,\n\t\t\t} ) }\n\t\t>\n\t\t\t<ul className=\"blocks-gallery-grid\">\n\t\t\t\t{ images.map( ( img, index ) => {\n\t\t\t\t\tconst ariaLabel = sprintf(\n\t\t\t\t\t\t/* translators: 1: the order number of the image. 2: the total number of images. */\n\t\t\t\t\t\t__( 'image %1$d of %2$d in gallery' ),\n\t\t\t\t\t\tindex + 1,\n\t\t\t\t\t\timages.length\n\t\t\t\t\t);\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<li\n\t\t\t\t\t\t\tclassName=\"blocks-gallery-item\"\n\t\t\t\t\t\t\tkey={ img.id ? `${ img.id }-${ index }` : img.url }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<GalleryImage\n\t\t\t\t\t\t\t\turl={ img.url }\n\t\t\t\t\t\t\t\talt={ img.alt }\n\t\t\t\t\t\t\t\tid={ img.id }\n\t\t\t\t\t\t\t\tisFirstItem={ index === 0 }\n\t\t\t\t\t\t\t\tisLastItem={ index + 1 === images.length }\n\t\t\t\t\t\t\t\tisSelected={\n\t\t\t\t\t\t\t\t\tisSelected && selectedImage === index\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonMoveBackward={ onMoveBackward( index ) }\n\t\t\t\t\t\t\t\tonMoveForward={ onMoveForward( index ) }\n\t\t\t\t\t\t\t\tonRemove={ onRemoveImage( index ) }\n\t\t\t\t\t\t\t\tonSelect={ onSelectImage( index ) }\n\t\t\t\t\t\t\t\tonDeselect={ onDeselectImage( index ) }\n\t\t\t\t\t\t\t\tsetAttributes={ ( attrs ) =>\n\t\t\t\t\t\t\t\t\tonSetImageAttributes( index, attrs )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcaption={ img.caption }\n\t\t\t\t\t\t\t\taria-label={ ariaLabel }\n\t\t\t\t\t\t\t\tsizeSlug={ attributes.sizeSlug }\n\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\t{ mediaPlaceholder }\n\t\t\t<RichTextVisibilityHelper\n\t\t\t\tisHidden={ ! isSelected && RichText.isEmpty( caption ) }\n\t\t\t\ttagName=\"figcaption\"\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'blocks-gallery-caption',\n\t\t\t\t\t__experimentalGetElementClassName( 'caption' )\n\t\t\t\t) }\n\t\t\t\taria-label={ __( 'Gallery caption text' ) }\n\t\t\t\tplaceholder={ __( 'Write gallery caption…' ) }\n\t\t\t\tvalue={ caption }\n\t\t\t\tonChange={ ( value ) => setAttributes( { caption: value } ) }\n\t\t\t\tinlineToolbar\n\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\tinsertBlocksAfter( createBlock( getDefaultBlockName() ) )\n\t\t\t\t}\n\t\t\t/>\n\t\t</figure>\n\t);\n};\n\nfunction RichTextVisibilityHelper( { isHidden, ...richTextProps } ) {\n\treturn isHidden ? (\n\t\t<VisuallyHidden as={ RichText } { ...richTextProps } />\n\t) : (\n\t\t<RichText { ...richTextProps } />\n\t);\n}\n\nexport default Gallery;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,QAAQ,EACRC,iCAAiC,QAC3B,yBAAyB;AAChC,SA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,CAAE;QAAEa,OAAO,EAAEyB;MAAM,CAAE,CAAG;MAC7DE,aAAa;MACbC,sBAAsB,EAAGA,CAAA,KACxBhC,iBAAiB,CAAErB,WAAW,CAAEC,mBAAmB,CAAC,CAAE,CAAE;IACxD,CACD,CAAC;EAAA,CACK,CAAC;AAEX,CAAC;AAED,SAAS4C,wBAAwBA,CAAE;EAAEC,QAAQ;EAAE,GAAGQ;AAAc,CAAC,EAAG;EACnE,OAAOR,QAAQ,gBACdzC,IAAA,CAACR,cAAc;IAAC0D,EAAE,EAAG5D,QAAU;IAAA,GAAM2D;EAAa,CAAI,CAAC,gBAEvDjD,IAAA,CAACV,QAAQ;IAAA,GAAM2D;EAAa,CAAI,CAChC;AACF;AAEA,eAAe9C,OAAO","ignoreList":[]}
@@ -1,131 +0,0 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { View } from 'react-native';
5
-
6
- /**
7
- * Internal dependencies
8
- */
9
- import GalleryImage from './gallery-image';
10
- import { defaultColumnsNumberV1 } from '../deprecated';
11
- import styles from './gallery-styles.scss';
12
- import Tiles from './tiles';
13
-
14
- /**
15
- * WordPress dependencies
16
- */
17
- import { __, sprintf } from '@wordpress/i18n';
18
- import { BlockCaption, RichText, store as blockEditorStore } from '@wordpress/block-editor';
19
- import { useState, useEffect } from '@wordpress/element';
20
- import { mediaUploadSync } from '@wordpress/react-native-bridge';
21
- import { useSelect } from '@wordpress/data';
22
- import { alignmentHelpers } from '@wordpress/components';
23
- import { jsx as _jsx } from "react/jsx-runtime";
24
- import { jsxs as _jsxs } from "react/jsx-runtime";
25
- const TILE_SPACING = 15;
26
-
27
- // we must limit displayed columns since readable content max-width is 580px
28
- const MAX_DISPLAYED_COLUMNS = 4;
29
- const MAX_DISPLAYED_COLUMNS_NARROW = 2;
30
- const {
31
- isFullWidth
32
- } = alignmentHelpers;
33
- export const Gallery = props => {
34
- const [isCaptionSelected, setIsCaptionSelected] = useState(false);
35
- useEffect(mediaUploadSync, []);
36
- const isRTL = useSelect(select => {
37
- return !!select(blockEditorStore).getSettings().isRTL;
38
- }, []);
39
- const {
40
- clientId,
41
- selectedImage,
42
- mediaPlaceholder,
43
- onBlur,
44
- onMoveBackward,
45
- onMoveForward,
46
- onRemoveImage,
47
- onSelectImage,
48
- onSetImageAttributes,
49
- onFocusGalleryCaption,
50
- attributes,
51
- isSelected,
52
- isNarrow,
53
- onFocus,
54
- insertBlocksAfter
55
- } = props;
56
- const {
57
- align,
58
- columns = defaultColumnsNumberV1(attributes),
59
- imageCrop,
60
- images
61
- } = attributes;
62
-
63
- // limit displayed columns when isNarrow is true (i.e. when viewport width is
64
- // less than "small", where small = 600)
65
- const displayedColumns = isNarrow ? Math.min(columns, MAX_DISPLAYED_COLUMNS_NARROW) : Math.min(columns, MAX_DISPLAYED_COLUMNS);
66
- const selectImage = index => {
67
- return () => {
68
- if (isCaptionSelected) {
69
- setIsCaptionSelected(false);
70
- }
71
- // We need to fully invoke the curried function here.
72
- onSelectImage(index)();
73
- };
74
- };
75
- const focusGalleryCaption = () => {
76
- if (!isCaptionSelected) {
77
- setIsCaptionSelected(true);
78
- }
79
- onFocusGalleryCaption();
80
- };
81
- return /*#__PURE__*/_jsxs(View, {
82
- style: {
83
- flex: 1
84
- },
85
- children: [/*#__PURE__*/_jsx(Tiles, {
86
- columns: displayedColumns,
87
- spacing: TILE_SPACING,
88
- style: isSelected ? styles.galleryTilesContainerSelected : undefined,
89
- children: images.map((img, index) => {
90
- const ariaLabel = sprintf( /* translators: 1: the order number of the image. 2: the total number of images. */
91
- __('image %1$d of %2$d in gallery'), index + 1, images.length);
92
- return /*#__PURE__*/_jsx(GalleryImage, {
93
- url: img.url,
94
- alt: img.alt,
95
- id: parseInt(img.id, 10) // make id an integer explicitly
96
- ,
97
- isCropped: imageCrop,
98
- isFirstItem: index === 0,
99
- isLastItem: index + 1 === images.length,
100
- isSelected: isSelected && selectedImage === index,
101
- isBlockSelected: isSelected,
102
- onMoveBackward: onMoveBackward(index),
103
- onMoveForward: onMoveForward(index),
104
- onRemove: onRemoveImage(index),
105
- onSelect: selectImage(index),
106
- onSelectBlock: onFocus,
107
- setAttributes: attrs => onSetImageAttributes(index, attrs),
108
- caption: img.caption,
109
- "aria-label": ariaLabel,
110
- isRTL: isRTL
111
- }, img.id ? `${img.id}-${index}` : img.url);
112
- })
113
- }), /*#__PURE__*/_jsx(View, {
114
- style: isFullWidth(align) && styles.fullWidth,
115
- children: mediaPlaceholder
116
- }), /*#__PURE__*/_jsx(BlockCaption, {
117
- clientId: clientId,
118
- isSelected: isCaptionSelected,
119
- accessible: true,
120
- accessibilityLabelCreator: caption => RichText.isEmpty(caption) ? /* translators: accessibility text. Empty gallery caption. */
121
- 'Gallery caption. Empty' : sprintf( /* translators: accessibility text. %s: gallery caption. */
122
- __('Gallery caption. %s'), caption),
123
- onFocus: focusGalleryCaption,
124
- onBlur: onBlur // Always assign onBlur as props.
125
- ,
126
- insertBlocksAfter: insertBlocksAfter
127
- })]
128
- });
129
- };
130
- export default Gallery;
131
- //# sourceMappingURL=gallery.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["View","GalleryImage","defaultColumnsNumberV1","styles","Tiles","__","sprintf","BlockCaption","RichText","store","blockEditorStore","useState","useEffect","mediaUploadSync","useSelect","alignmentHelpers","jsx","_jsx","jsxs","_jsxs","TILE_SPACING","MAX_DISPLAYED_COLUMNS","MAX_DISPLAYED_COLUMNS_NARROW","isFullWidth","Gallery","props","isCaptionSelected","setIsCaptionSelected","isRTL","select","getSettings","clientId","selectedImage","mediaPlaceholder","onBlur","onMoveBackward","onMoveForward","onRemoveImage","onSelectImage","onSetImageAttributes","onFocusGalleryCaption","attributes","isSelected","isNarrow","onFocus","insertBlocksAfter","align","columns","imageCrop","images","displayedColumns","Math","min","selectImage","index","focusGalleryCaption","style","flex","children","spacing","galleryTilesContainerSelected","undefined","map","img","ariaLabel","length","url","alt","id","parseInt","isCropped","isFirstItem","isLastItem","isBlockSelected","onRemove","onSelect","onSelectBlock","setAttributes","attrs","caption","fullWidth","accessible","accessibilityLabelCreator","isEmpty"],"sources":["@wordpress/block-library/src/gallery/v1/gallery.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * Internal dependencies\n */\nimport GalleryImage from './gallery-image';\nimport { defaultColumnsNumberV1 } from '../deprecated';\nimport styles from './gallery-styles.scss';\nimport Tiles from './tiles';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tBlockCaption,\n\tRichText,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useState, useEffect } from '@wordpress/element';\nimport { mediaUploadSync } from '@wordpress/react-native-bridge';\nimport { useSelect } from '@wordpress/data';\nimport { alignmentHelpers } from '@wordpress/components';\n\nconst TILE_SPACING = 15;\n\n// we must limit displayed columns since readable content max-width is 580px\nconst MAX_DISPLAYED_COLUMNS = 4;\nconst MAX_DISPLAYED_COLUMNS_NARROW = 2;\n\nconst { isFullWidth } = alignmentHelpers;\n\nexport const Gallery = ( props ) => {\n\tconst [ isCaptionSelected, setIsCaptionSelected ] = useState( false );\n\tuseEffect( mediaUploadSync, [] );\n\n\tconst isRTL = useSelect( ( select ) => {\n\t\treturn !! select( blockEditorStore ).getSettings().isRTL;\n\t}, [] );\n\n\tconst {\n\t\tclientId,\n\t\tselectedImage,\n\t\tmediaPlaceholder,\n\t\tonBlur,\n\t\tonMoveBackward,\n\t\tonMoveForward,\n\t\tonRemoveImage,\n\t\tonSelectImage,\n\t\tonSetImageAttributes,\n\t\tonFocusGalleryCaption,\n\t\tattributes,\n\t\tisSelected,\n\t\tisNarrow,\n\t\tonFocus,\n\t\tinsertBlocksAfter,\n\t} = props;\n\n\tconst {\n\t\talign,\n\t\tcolumns = defaultColumnsNumberV1( attributes ),\n\t\timageCrop,\n\t\timages,\n\t} = attributes;\n\n\t// limit displayed columns when isNarrow is true (i.e. when viewport width is\n\t// less than \"small\", where small = 600)\n\tconst displayedColumns = isNarrow\n\t\t? Math.min( columns, MAX_DISPLAYED_COLUMNS_NARROW )\n\t\t: Math.min( columns, MAX_DISPLAYED_COLUMNS );\n\n\tconst selectImage = ( index ) => {\n\t\treturn () => {\n\t\t\tif ( isCaptionSelected ) {\n\t\t\t\tsetIsCaptionSelected( false );\n\t\t\t}\n\t\t\t// We need to fully invoke the curried function here.\n\t\t\tonSelectImage( index )();\n\t\t};\n\t};\n\n\tconst focusGalleryCaption = () => {\n\t\tif ( ! isCaptionSelected ) {\n\t\t\tsetIsCaptionSelected( true );\n\t\t}\n\t\tonFocusGalleryCaption();\n\t};\n\n\treturn (\n\t\t<View style={ { flex: 1 } }>\n\t\t\t<Tiles\n\t\t\t\tcolumns={ displayedColumns }\n\t\t\t\tspacing={ TILE_SPACING }\n\t\t\t\tstyle={\n\t\t\t\t\tisSelected\n\t\t\t\t\t\t? styles.galleryTilesContainerSelected\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{ images.map( ( img, index ) => {\n\t\t\t\t\tconst ariaLabel = sprintf(\n\t\t\t\t\t\t/* translators: 1: the order number of the image. 2: the total number of images. */\n\t\t\t\t\t\t__( 'image %1$d of %2$d in gallery' ),\n\t\t\t\t\t\tindex + 1,\n\t\t\t\t\t\timages.length\n\t\t\t\t\t);\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<GalleryImage\n\t\t\t\t\t\t\tkey={ img.id ? `${ img.id }-${ index }` : img.url }\n\t\t\t\t\t\t\turl={ img.url }\n\t\t\t\t\t\t\talt={ img.alt }\n\t\t\t\t\t\t\tid={ parseInt( img.id, 10 ) } // make id an integer explicitly\n\t\t\t\t\t\t\tisCropped={ imageCrop }\n\t\t\t\t\t\t\tisFirstItem={ index === 0 }\n\t\t\t\t\t\t\tisLastItem={ index + 1 === images.length }\n\t\t\t\t\t\t\tisSelected={ isSelected && selectedImage === index }\n\t\t\t\t\t\t\tisBlockSelected={ isSelected }\n\t\t\t\t\t\t\tonMoveBackward={ onMoveBackward( index ) }\n\t\t\t\t\t\t\tonMoveForward={ onMoveForward( index ) }\n\t\t\t\t\t\t\tonRemove={ onRemoveImage( index ) }\n\t\t\t\t\t\t\tonSelect={ selectImage( index ) }\n\t\t\t\t\t\t\tonSelectBlock={ onFocus }\n\t\t\t\t\t\t\tsetAttributes={ ( attrs ) =>\n\t\t\t\t\t\t\t\tonSetImageAttributes( index, attrs )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcaption={ img.caption }\n\t\t\t\t\t\t\taria-label={ ariaLabel }\n\t\t\t\t\t\t\tisRTL={ isRTL }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</Tiles>\n\t\t\t<View style={ isFullWidth( align ) && styles.fullWidth }>\n\t\t\t\t{ mediaPlaceholder }\n\t\t\t</View>\n\t\t\t<BlockCaption\n\t\t\t\tclientId={ clientId }\n\t\t\t\tisSelected={ isCaptionSelected }\n\t\t\t\taccessible\n\t\t\t\taccessibilityLabelCreator={ ( caption ) =>\n\t\t\t\t\tRichText.isEmpty( caption )\n\t\t\t\t\t\t? /* translators: accessibility text. Empty gallery caption. */\n\t\t\t\t\t\t 'Gallery caption. Empty'\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t/* translators: accessibility text. %s: gallery caption. */\n\t\t\t\t\t\t\t\t__( 'Gallery caption. %s' ),\n\t\t\t\t\t\t\t\tcaption\n\t\t\t\t\t\t )\n\t\t\t\t}\n\t\t\t\tonFocus={ focusGalleryCaption }\n\t\t\t\tonBlur={ onBlur } // Always assign onBlur as props.\n\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t/>\n\t\t</View>\n\t);\n};\n\nexport default Gallery;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;;AAEnC;AACA;AACA;AACA,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,SAASC,sBAAsB,QAAQ,eAAe;AACtD,OAAOC,MA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,CACvC,CAAC;EAAA,CACG,CAAC;AAET,CAAC;AAED,eAAerB,OAAO","ignoreList":[]}
@@ -1,74 +0,0 @@
1
- /**
2
- * External dependencies
3
- */
4
- import clsx from 'clsx';
5
-
6
- /**
7
- * WordPress dependencies
8
- */
9
- import { RichText, useBlockProps, __experimentalGetElementClassName } from '@wordpress/block-editor';
10
-
11
- /**
12
- * Internal dependencies
13
- */
14
- import { defaultColumnsNumberV1 } from '../deprecated';
15
- import { LINK_DESTINATION_ATTACHMENT, LINK_DESTINATION_MEDIA } from './constants';
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { jsxs as _jsxs } from "react/jsx-runtime";
18
- export default function saveV1({
19
- attributes
20
- }) {
21
- const {
22
- images,
23
- columns = defaultColumnsNumberV1(attributes),
24
- imageCrop,
25
- caption,
26
- linkTo
27
- } = attributes;
28
- const className = `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`;
29
- return /*#__PURE__*/_jsxs("figure", {
30
- ...useBlockProps.save({
31
- className
32
- }),
33
- children: [/*#__PURE__*/_jsx("ul", {
34
- className: "blocks-gallery-grid",
35
- children: images.map(image => {
36
- let href;
37
- switch (linkTo) {
38
- case LINK_DESTINATION_MEDIA:
39
- href = image.fullUrl || image.url;
40
- break;
41
- case LINK_DESTINATION_ATTACHMENT:
42
- href = image.link;
43
- break;
44
- }
45
- const img = /*#__PURE__*/_jsx("img", {
46
- src: image.url,
47
- alt: image.alt,
48
- "data-id": image.id,
49
- "data-full-url": image.fullUrl,
50
- "data-link": image.link,
51
- className: image.id ? `wp-image-${image.id}` : null
52
- });
53
- return /*#__PURE__*/_jsx("li", {
54
- className: "blocks-gallery-item",
55
- children: /*#__PURE__*/_jsxs("figure", {
56
- children: [href ? /*#__PURE__*/_jsx("a", {
57
- href: href,
58
- children: img
59
- }) : img, !RichText.isEmpty(image.caption) && /*#__PURE__*/_jsx(RichText.Content, {
60
- tagName: "figcaption",
61
- className: clsx('blocks-gallery-item__caption', __experimentalGetElementClassName('caption')),
62
- value: image.caption
63
- })]
64
- })
65
- }, image.id || image.url);
66
- })
67
- }), !RichText.isEmpty(caption) && /*#__PURE__*/_jsx(RichText.Content, {
68
- tagName: "figcaption",
69
- className: clsx('blocks-gallery-caption', __experimentalGetElementClassName('caption')),
70
- value: caption
71
- })]
72
- });
73
- }
74
- //# sourceMappingURL=save.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["clsx","RichText","useBlockProps","__experimentalGetElementClassName","defaultColumnsNumberV1","LINK_DESTINATION_ATTACHMENT","LINK_DESTINATION_MEDIA","jsx","_jsx","jsxs","_jsxs","saveV1","attributes","images","columns","imageCrop","caption","linkTo","className","save","children","map","image","href","fullUrl","url","link","img","src","alt","id","isEmpty","Content","tagName","value"],"sources":["@wordpress/block-library/src/gallery/v1/save.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tRichText,\n\tuseBlockProps,\n\t__experimentalGetElementClassName,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { defaultColumnsNumberV1 } from '../deprecated';\nimport {\n\tLINK_DESTINATION_ATTACHMENT,\n\tLINK_DESTINATION_MEDIA,\n} from './constants';\n\nexport default function saveV1( { attributes } ) {\n\tconst {\n\t\timages,\n\t\tcolumns = defaultColumnsNumberV1( attributes ),\n\t\timageCrop,\n\t\tcaption,\n\t\tlinkTo,\n\t} = attributes;\n\tconst className = `columns-${ columns } ${ imageCrop ? 'is-cropped' : '' }`;\n\n\treturn (\n\t\t<figure { ...useBlockProps.save( { className } ) }>\n\t\t\t<ul className=\"blocks-gallery-grid\">\n\t\t\t\t{ images.map( ( image ) => {\n\t\t\t\t\tlet href;\n\n\t\t\t\t\tswitch ( linkTo ) {\n\t\t\t\t\t\tcase LINK_DESTINATION_MEDIA:\n\t\t\t\t\t\t\thref = image.fullUrl || image.url;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase LINK_DESTINATION_ATTACHMENT:\n\t\t\t\t\t\t\thref = image.link;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst img = (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={ image.url }\n\t\t\t\t\t\t\talt={ image.alt }\n\t\t\t\t\t\t\tdata-id={ image.id }\n\t\t\t\t\t\t\tdata-full-url={ image.fullUrl }\n\t\t\t\t\t\t\tdata-link={ image.link }\n\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\timage.id ? `wp-image-${ image.id }` : null\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\treturn (\n\t\t\t\t\t\t<li\n\t\t\t\t\t\t\tkey={ image.id || image.url }\n\t\t\t\t\t\t\tclassName=\"blocks-gallery-item\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<figure>\n\t\t\t\t\t\t\t\t{ href ? <a href={ href }>{ img }</a> : img }\n\t\t\t\t\t\t\t\t{ ! RichText.isEmpty( image.caption ) && (\n\t\t\t\t\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\t\t\t\t\ttagName=\"figcaption\"\n\t\t\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t\t\t'blocks-gallery-item__caption',\n\t\t\t\t\t\t\t\t\t\t\t__experimentalGetElementClassName(\n\t\t\t\t\t\t\t\t\t\t\t\t'caption'\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\tvalue={ image.caption }\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</figure>\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\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t<RichText.Content\n\t\t\t\t\ttagName=\"figcaption\"\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'blocks-gallery-caption',\n\t\t\t\t\t\t__experimentalGetElementClassName( 'caption' )\n\t\t\t\t\t) }\n\t\t\t\t\tvalue={ caption }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</figure>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,QAAQ,EACRC,aAAa,EACbC,iCAAiC,QAC3B,yBAAyB;;AAEhC;AACA;AACA;AACA,SAASC,sBAAsB,QAAQ,eAAe;AACtD,SACCC,2BAA2B,EAC3BC,sBAAsB,QAChB,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAErB,eAAe,SAASC,MAAMA,CAAE;EAAEC;AAAW,CAAC,EAAG;EAChD,MAAM;IACLC,MAAM;IACNC,OAAO,GAAGV,sBAAsB,CAAEQ,UAAW,CAAC;IAC9CG,SAAS;IACTC,OAAO;IACPC;EACD,CAAC,GAAGL,UAAU;EACd,MAAMM,SAAS,GAAI,WAAWJ,OAAS,IAAIC,SAAS,GAAG,YAAY,GAAG,EAAI,EAAC;EAE3E,oBACCL,KAAA;IAAA,GAAaR,aAAa,CAACiB,IAAI,CAAE;MAAED;IAAU,CAAE,CAAC;IAAAE,QAAA,gBAC/CZ,IAAA;MAAIU,SAAS,EAAC,qBAAqB;MAAAE,QAAA,EAChCP,MAAM,CAACQ,GAAG,CAAIC,KAAK,IAAM;QAC1B,IAAIC,IAAI;QAER,QAASN,MAAM;UACd,KAAKX,sBAAsB;YAC1BiB,IAAI,GAAGD,KAAK,CAACE,OAAO,IAAIF,KAAK,CAACG,GAAG;YACjC;UACD,KAAKpB,2BAA2B;YAC/BkB,IAAI,GAAGD,KAAK,CAACI,IAAI;YACjB;QACF;QAEA,MAAMC,GAAG,gBACRnB,IAAA;UACCoB,GAAG,EAAGN,KAAK,CAACG,GAAK;UACjBI,GAAG,EAAGP,KAAK,CAACO,GAAK;UACjB,WAAUP,KAAK,CAACQ,EAAI;UACpB,iBAAgBR,KAAK,CAACE,OAAS;UAC/B,aAAYF,KAAK,CAACI,IAAM;UACxBR,SAAS,EACRI,KAAK,CAACQ,EAAE,GAAI,YAAYR,KAAK,CAACQ,EAAI,EAAC,GAAG;QACtC,CACD,CACD;QAED,oBACCtB,IAAA;UAECU,SAAS,EAAC,qBAAqB;UAAAE,QAAA,eAE/BV,KAAA;YAAAU,QAAA,GACGG,IAAI,gBAAGf,IAAA;cAAGe,IAAI,EAAGA,IAAM;cAAAH,QAAA,EAAGO;YAAG,CAAK,CAAC,GAAGA,GAAG,EACzC,CAAE1B,QAAQ,CAAC8B,OAAO,CAAET,KAAK,CAACN,OAAQ,CAAC,iBACpCR,IAAA,CAACP,QAAQ,CAAC+B,OAAO;cAChBC,OAAO,EAAC,YAAY;cACpBf,SAAS,EAAGlB,IAAI,CACf,8BAA8B,EAC9BG,iCAAiC,CAChC,SACD,CACD,CAAG;cACH+B,KAAK,EAAGZ,KAAK,CAACN;YAAS,CACvB,CACD;UAAA,CACM;QAAC,GAjBHM,KAAK,CAACQ,EAAE,IAAIR,KAAK,CAACG,GAkBrB,CAAC;MAEP,CAAE;IAAC,CACA,CAAC,EACH,CAAExB,QAAQ,CAAC8B,OAAO,CAAEf,OAAQ,CAAC,iBAC9BR,IAAA,CAACP,QAAQ,CAAC+B,OAAO;MAChBC,OAAO,EAAC,YAAY;MACpBf,SAAS,EAAGlB,IAAI,CACf,wBAAwB,EACxBG,iCAAiC,CAAE,SAAU,CAC9C,CAAG;MACH+B,KAAK,EAAGlB;IAAS,CACjB,CACD;EAAA,CACM,CAAC;AAEX","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- export const pickRelevantMediaFiles = (image, sizeSlug = 'large') => {
2
- const imageProps = Object.fromEntries(Object.entries(image !== null && image !== void 0 ? image : {}).filter(([key]) => ['alt', 'id', 'link', 'caption'].includes(key)));
3
- imageProps.url = image?.sizes?.[sizeSlug]?.url || image?.media_details?.sizes?.[sizeSlug]?.source_url || image?.url;
4
- const fullUrl = image?.sizes?.full?.url || image?.media_details?.sizes?.full?.source_url;
5
- if (fullUrl) {
6
- imageProps.fullUrl = fullUrl;
7
- }
8
- return imageProps;
9
- };
10
- //# sourceMappingURL=shared.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["pickRelevantMediaFiles","image","sizeSlug","imageProps","Object","fromEntries","entries","filter","key","includes","url","sizes","media_details","source_url","fullUrl","full"],"sources":["@wordpress/block-library/src/gallery/v1/shared.js"],"sourcesContent":["export const pickRelevantMediaFiles = ( image, sizeSlug = 'large' ) => {\n\tconst imageProps = Object.fromEntries(\n\t\tObject.entries( image ?? {} ).filter( ( [ key ] ) =>\n\t\t\t[ 'alt', 'id', 'link', 'caption' ].includes( key )\n\t\t)\n\t);\n\n\timageProps.url =\n\t\timage?.sizes?.[ sizeSlug ]?.url ||\n\t\timage?.media_details?.sizes?.[ sizeSlug ]?.source_url ||\n\t\timage?.url;\n\tconst fullUrl =\n\t\timage?.sizes?.full?.url ||\n\t\timage?.media_details?.sizes?.full?.source_url;\n\tif ( fullUrl ) {\n\t\timageProps.fullUrl = fullUrl;\n\t}\n\treturn imageProps;\n};\n"],"mappings":"AAAA,OAAO,MAAMA,sBAAsB,GAAGA,CAAEC,KAAK,EAAEC,QAAQ,GAAG,OAAO,KAAM;EACtE,MAAMC,UAAU,GAAGC,MAAM,CAACC,WAAW,CACpCD,MAAM,CAACE,OAAO,CAAEL,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,CAAC,CAAE,CAAC,CAACM,MAAM,CAAE,CAAE,CAAEC,GAAG,CAAE,KAC9C,CAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,CAAE,CAACC,QAAQ,CAAED,GAAI,CAClD,CACD,CAAC;EAEDL,UAAU,CAACO,GAAG,GACbT,KAAK,EAAEU,KAAK,GAAIT,QAAQ,CAAE,EAAEQ,GAAG,IAC/BT,KAAK,EAAEW,aAAa,EAAED,KAAK,GAAIT,QAAQ,CAAE,EAAEW,UAAU,IACrDZ,KAAK,EAAES,GAAG;EACX,MAAMI,OAAO,GACZb,KAAK,EAAEU,KAAK,EAAEI,IAAI,EAAEL,GAAG,IACvBT,KAAK,EAAEW,aAAa,EAAED,KAAK,EAAEI,IAAI,EAAEF,UAAU;EAC9C,IAAKC,OAAO,EAAG;IACdX,UAAU,CAACW,OAAO,GAAGA,OAAO;EAC7B;EACA,OAAOX,UAAU;AAClB,CAAC","ignoreList":[]}
@@ -1,75 +0,0 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { View, StyleSheet } from 'react-native';
5
-
6
- /**
7
- * WordPress dependencies
8
- */
9
- import { Children } from '@wordpress/element';
10
-
11
- /**
12
- * Internal dependencies
13
- */
14
- import styles from './tiles-styles.scss';
15
- import { jsx as _jsx } from "react/jsx-runtime";
16
- function Tiles(props) {
17
- const {
18
- columns,
19
- children,
20
- spacing = 10,
21
- style
22
- } = props;
23
- const {
24
- compose
25
- } = StyleSheet;
26
- const tileCount = Children.count(children);
27
- const lastTile = tileCount - 1;
28
- const lastRow = Math.floor(lastTile / columns);
29
- const wrappedChildren = Children.map(children, (child, index) => {
30
- /**
31
- * Since we don't have `calc()`, we must calculate our spacings here in
32
- * order to preserve even spacing between tiles and equal width for tiles
33
- * in a given row.
34
- *
35
- * In order to ensure equal sizing of tile contents, we distribute the
36
- * spacing such that each tile has an equal "share" of the fixed spacing. To
37
- * keep the tiles properly aligned within their rows, we calculate the left
38
- * and right paddings based on the tile's relative position within the row.
39
- *
40
- * Note: we use padding instead of margins so that the fixed spacing is
41
- * included within the relative spacing (i.e. width percentage), and
42
- * wrapping behavior is preserved.
43
- *
44
- * - The left most tile in a row must have left padding of zero.
45
- * - The right most tile in a row must have a right padding of zero.
46
- *
47
- * The values of these left and right paddings are interpolated for tiles in
48
- * between. The right padding is complementary with the left padding of the
49
- * next tile (i.e. the right padding of [tile n] + the left padding of
50
- * [tile n + 1] will be equal for all tiles except the last one in a given
51
- * row).
52
- */
53
-
54
- const row = Math.floor(index / columns);
55
- const rowLength = row === lastRow ? lastTile % columns + 1 : columns;
56
- const indexInRow = index % columns;
57
- return /*#__PURE__*/_jsx(View, {
58
- style: [styles.tileStyle, {
59
- width: `${100 / rowLength}%`,
60
- paddingLeft: spacing * (indexInRow / rowLength),
61
- paddingRight: spacing * (1 - (indexInRow + 1) / rowLength),
62
- paddingTop: row === 0 ? 0 : spacing / 2,
63
- paddingBottom: row === lastRow ? 0 : spacing / 2
64
- }],
65
- children: child
66
- });
67
- });
68
- const containerStyle = compose(styles.containerStyle, style);
69
- return /*#__PURE__*/_jsx(View, {
70
- style: containerStyle,
71
- children: wrappedChildren
72
- });
73
- }
74
- export default Tiles;
75
- //# sourceMappingURL=tiles.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["View","StyleSheet","Children","styles","jsx","_jsx","Tiles","props","columns","children","spacing","style","compose","tileCount","count","lastTile","lastRow","Math","floor","wrappedChildren","map","child","index","row","rowLength","indexInRow","tileStyle","width","paddingLeft","paddingRight","paddingTop","paddingBottom","containerStyle"],"sources":["@wordpress/block-library/src/gallery/v1/tiles.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, StyleSheet } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { Children } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport styles from './tiles-styles.scss';\n\nfunction Tiles( props ) {\n\tconst { columns, children, spacing = 10, style } = props;\n\n\tconst { compose } = StyleSheet;\n\n\tconst tileCount = Children.count( children );\n\tconst lastTile = tileCount - 1;\n\tconst lastRow = Math.floor( lastTile / columns );\n\n\tconst wrappedChildren = Children.map( children, ( child, index ) => {\n\t\t/**\n\t\t * Since we don't have `calc()`, we must calculate our spacings here in\n\t\t * order to preserve even spacing between tiles and equal width for tiles\n\t\t * in a given row.\n\t\t *\n\t\t * In order to ensure equal sizing of tile contents, we distribute the\n\t\t * spacing such that each tile has an equal \"share\" of the fixed spacing. To\n\t\t * keep the tiles properly aligned within their rows, we calculate the left\n\t\t * and right paddings based on the tile's relative position within the row.\n\t\t *\n\t\t * Note: we use padding instead of margins so that the fixed spacing is\n\t\t * included within the relative spacing (i.e. width percentage), and\n\t\t * wrapping behavior is preserved.\n\t\t *\n\t\t * - The left most tile in a row must have left padding of zero.\n\t\t * - The right most tile in a row must have a right padding of zero.\n\t\t *\n\t\t * The values of these left and right paddings are interpolated for tiles in\n\t\t * between. The right padding is complementary with the left padding of the\n\t\t * next tile (i.e. the right padding of [tile n] + the left padding of\n\t\t * [tile n + 1] will be equal for all tiles except the last one in a given\n\t\t * row).\n\t\t */\n\n\t\tconst row = Math.floor( index / columns );\n\t\tconst rowLength =\n\t\t\trow === lastRow ? ( lastTile % columns ) + 1 : columns;\n\t\tconst indexInRow = index % columns;\n\n\t\treturn (\n\t\t\t<View\n\t\t\t\tstyle={ [\n\t\t\t\t\tstyles.tileStyle,\n\t\t\t\t\t{\n\t\t\t\t\t\twidth: `${ 100 / rowLength }%`,\n\t\t\t\t\t\tpaddingLeft: spacing * ( indexInRow / rowLength ),\n\t\t\t\t\t\tpaddingRight:\n\t\t\t\t\t\t\tspacing * ( 1 - ( indexInRow + 1 ) / rowLength ),\n\t\t\t\t\t\tpaddingTop: row === 0 ? 0 : spacing / 2,\n\t\t\t\t\t\tpaddingBottom: row === lastRow ? 0 : spacing / 2,\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t>\n\t\t\t\t{ child }\n\t\t\t</View>\n\t\t);\n\t} );\n\n\tconst containerStyle = compose( styles.containerStyle, style );\n\n\treturn <View style={ containerStyle }>{ wrappedChildren }</View>;\n}\n\nexport default Tiles;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,UAAU,QAAQ,cAAc;;AAE/C;AACA;AACA;AACA,SAASC,QAAQ,QAAQ,oBAAoB;;AAE7C;AACA;AACA;AACA,OAAOC,MAAM,MAAM,qBAAqB;AAAC,SAA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O,GAAG,CAAC,GAAGN,OAAO,GAAG;MAChD,CAAC,CACC;MAAAD,QAAA,EAEDY;IAAK,CACF,CAAC;EAET,CAAE,CAAC;EAEH,MAAMW,cAAc,GAAGpB,OAAO,CAAET,MAAM,CAAC6B,cAAc,EAAErB,KAAM,CAAC;EAE9D,oBAAON,IAAA,CAACL,IAAI;IAACW,KAAK,EAAGqB,cAAgB;IAAAvB,QAAA,EAAGU;EAAe,CAAQ,CAAC;AACjE;AAEA,eAAeb,KAAK","ignoreList":[]}
@@ -1,32 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { useCallback, useRef } from '@wordpress/element';
5
- import { useSelect } from '@wordpress/data';
6
- import { store as blockEditorStore } from '@wordpress/block-editor';
7
- import { cloneBlock, createBlock } from '@wordpress/blocks';
8
- export default function useSplit(clientId) {
9
- // We can not rely on the isAfterOriginal parameter of the callback,
10
- // because if the value after the split is empty isAfterOriginal is false
11
- // while the value is in fact after the original. So to avoid that issue we use
12
- // a flag where the first execution of the callback is false (it is the before value)
13
- // and the second execution is true, it is the after value.
14
- const isAfter = useRef(false);
15
- const {
16
- getBlock
17
- } = useSelect(blockEditorStore);
18
- return useCallback(value => {
19
- const block = getBlock(clientId);
20
- if (isAfter.current) {
21
- return cloneBlock(block, {
22
- content: value
23
- });
24
- }
25
- isAfter.current = true;
26
- return createBlock(block.name, {
27
- ...block.attributes,
28
- content: value
29
- });
30
- }, [clientId, getBlock]);
31
- }
32
- //# sourceMappingURL=use-split.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useCallback","useRef","useSelect","store","blockEditorStore","cloneBlock","createBlock","useSplit","clientId","isAfter","getBlock","value","block","current","content","name","attributes"],"sources":["@wordpress/block-library/src/list-item/hooks/use-split.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useCallback, useRef } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { cloneBlock, createBlock } from '@wordpress/blocks';\n\nexport default function useSplit( clientId ) {\n\t// We can not rely on the isAfterOriginal parameter of the callback,\n\t// because if the value after the split is empty isAfterOriginal is false\n\t// while the value is in fact after the original. So to avoid that issue we use\n\t// a flag where the first execution of the callback is false (it is the before value)\n\t// and the second execution is true, it is the after value.\n\tconst isAfter = useRef( false );\n\tconst { getBlock } = useSelect( blockEditorStore );\n\treturn useCallback(\n\t\t( value ) => {\n\t\t\tconst block = getBlock( clientId );\n\t\t\tif ( isAfter.current ) {\n\t\t\t\treturn cloneBlock( block, {\n\t\t\t\t\tcontent: value,\n\t\t\t\t} );\n\t\t\t}\n\t\t\tisAfter.current = true;\n\t\t\treturn createBlock( block.name, {\n\t\t\t\t...block.attributes,\n\t\t\t\tcontent: value,\n\t\t\t} );\n\t\t},\n\t\t[ clientId, getBlock ]\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,MAAM,QAAQ,oBAAoB;AACxD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;AACnE,SAASC,UAAU,EAAEC,WAAW,QAAQ,mBAAmB;AAE3D,eAAe,SAASC,QAAQA,CAAEC,QAAQ,EAAG;EAC5C;EACA;EACA;EACA;EACA;EACA,MAAMC,OAAO,GAAGR,MAAM,CAAE,KAAM,CAAC;EAC/B,MAAM;IAAES;EAAS,CAAC,GAAGR,SAAS,CAAEE,gBAAiB,CAAC;EAClD,OAAOJ,WAAW,CACfW,KAAK,IAAM;IACZ,MAAMC,KAAK,GAAGF,QAAQ,CAAEF,QAAS,CAAC;IAClC,IAAKC,OAAO,CAACI,OAAO,EAAG;MACtB,OAAOR,UAAU,CAAEO,KAAK,EAAE;QACzBE,OAAO,EAAEH;MACV,CAAE,CAAC;IACJ;IACAF,OAAO,CAACI,OAAO,GAAG,IAAI;IACtB,OAAOP,WAAW,CAAEM,KAAK,CAACG,IAAI,EAAE;MAC/B,GAAGH,KAAK,CAACI,UAAU;MACnBF,OAAO,EAAEH;IACV,CAAE,CAAC;EACJ,CAAC,EACD,CAAEH,QAAQ,EAAEE,QAAQ,CACrB,CAAC;AACF","ignoreList":[]}
@@ -1,9 +0,0 @@
1
- // The following dropdown menu props aim to provide a consistent offset and
2
- // placement for ToolsPanel menus for block controls to match color popovers.
3
- export const TOOLSPANEL_DROPDOWNMENU_PROPS = {
4
- popoverProps: {
5
- placement: 'left-start',
6
- offset: 259 // Inner sidebar width (248px) - button width (24px) - border (1px) + padding (16px) + spacing (20px)
7
- }
8
- };
9
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["TOOLSPANEL_DROPDOWNMENU_PROPS","popoverProps","placement","offset"],"sources":["@wordpress/block-library/src/utils/constants.js"],"sourcesContent":["// The following dropdown menu props aim to provide a consistent offset and\n// placement for ToolsPanel menus for block controls to match color popovers.\nexport const TOOLSPANEL_DROPDOWNMENU_PROPS = {\n\tpopoverProps: {\n\t\tplacement: 'left-start',\n\t\toffset: 259, // Inner sidebar width (248px) - button width (24px) - border (1px) + padding (16px) + spacing (20px)\n\t},\n};\n"],"mappings":"AAAA;AACA;AACA,OAAO,MAAMA,6BAA6B,GAAG;EAC5CC,YAAY,EAAE;IACbC,SAAS,EAAE,YAAY;IACvBC,MAAM,EAAE,GAAG,CAAE;EACd;AACD,CAAC","ignoreList":[]}
@@ -1,27 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { compose } from '@wordpress/compose';
5
- import { withNotices } from '@wordpress/components';
6
-
7
- /**
8
- * Internal dependencies
9
- */
10
- import EditWithInnerBlocks from './edit';
11
- import EditWithoutInnerBlocks from './v1/edit';
12
- import { isGalleryV2Enabled } from './shared';
13
-
14
- /*
15
- * Using a wrapper around the logic to load the edit for v1 of Gallery block
16
- * or the refactored version with InnerBlocks. This is to prevent conditional
17
- * use of hooks lint errors if adding this logic to the top of the edit component.
18
- */
19
- function GalleryEditWrapper( props ) {
20
- if ( ! isGalleryV2Enabled() ) {
21
- return <EditWithoutInnerBlocks { ...props } />;
22
- }
23
-
24
- return <EditWithInnerBlocks { ...props } />;
25
- }
26
-
27
- export default compose( [ withNotices ] )( GalleryEditWrapper );
@@ -1,3 +0,0 @@
1
- export const LINK_DESTINATION_NONE = 'none';
2
- export const LINK_DESTINATION_MEDIA = 'file';
3
- export const LINK_DESTINATION_ATTACHMENT = 'post';