@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,112 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = exports.Gallery = void 0;
8
- var _clsx = _interopRequireDefault(require("clsx"));
9
- var _blockEditor = require("@wordpress/block-editor");
10
- var _components = require("@wordpress/components");
11
- var _i18n = require("@wordpress/i18n");
12
- var _blocks = require("@wordpress/blocks");
13
- var _galleryImage = _interopRequireDefault(require("./gallery-image"));
14
- var _deprecated = require("../deprecated");
15
- var _jsxRuntime = require("react/jsx-runtime");
16
- /**
17
- * External dependencies
18
- */
19
-
20
- /**
21
- * WordPress dependencies
22
- */
23
-
24
- /**
25
- * Internal dependencies
26
- */
27
-
28
- const Gallery = props => {
29
- const {
30
- attributes,
31
- isSelected,
32
- setAttributes,
33
- selectedImage,
34
- mediaPlaceholder,
35
- onMoveBackward,
36
- onMoveForward,
37
- onRemoveImage,
38
- onSelectImage,
39
- onDeselectImage,
40
- onSetImageAttributes,
41
- insertBlocksAfter,
42
- blockProps
43
- } = props;
44
- const {
45
- align,
46
- columns = (0, _deprecated.defaultColumnsNumberV1)(attributes),
47
- caption,
48
- imageCrop,
49
- images
50
- } = attributes;
51
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("figure", {
52
- ...blockProps,
53
- className: (0, _clsx.default)(blockProps.className, {
54
- [`align${align}`]: align,
55
- [`columns-${columns}`]: columns,
56
- 'is-cropped': imageCrop
57
- }),
58
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
59
- className: "blocks-gallery-grid",
60
- children: images.map((img, index) => {
61
- const ariaLabel = (0, _i18n.sprintf)( /* translators: 1: the order number of the image. 2: the total number of images. */
62
- (0, _i18n.__)('image %1$d of %2$d in gallery'), index + 1, images.length);
63
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
64
- className: "blocks-gallery-item",
65
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_galleryImage.default, {
66
- url: img.url,
67
- alt: img.alt,
68
- id: img.id,
69
- isFirstItem: index === 0,
70
- isLastItem: index + 1 === images.length,
71
- isSelected: isSelected && selectedImage === index,
72
- onMoveBackward: onMoveBackward(index),
73
- onMoveForward: onMoveForward(index),
74
- onRemove: onRemoveImage(index),
75
- onSelect: onSelectImage(index),
76
- onDeselect: onDeselectImage(index),
77
- setAttributes: attrs => onSetImageAttributes(index, attrs),
78
- caption: img.caption,
79
- "aria-label": ariaLabel,
80
- sizeSlug: attributes.sizeSlug
81
- })
82
- }, img.id ? `${img.id}-${index}` : img.url);
83
- })
84
- }), mediaPlaceholder, /*#__PURE__*/(0, _jsxRuntime.jsx)(RichTextVisibilityHelper, {
85
- isHidden: !isSelected && _blockEditor.RichText.isEmpty(caption),
86
- tagName: "figcaption",
87
- className: (0, _clsx.default)('blocks-gallery-caption', (0, _blockEditor.__experimentalGetElementClassName)('caption')),
88
- "aria-label": (0, _i18n.__)('Gallery caption text'),
89
- placeholder: (0, _i18n.__)('Write gallery caption…'),
90
- value: caption,
91
- onChange: value => setAttributes({
92
- caption: value
93
- }),
94
- inlineToolbar: true,
95
- __unstableOnSplitAtEnd: () => insertBlocksAfter((0, _blocks.createBlock)((0, _blocks.getDefaultBlockName)()))
96
- })]
97
- });
98
- };
99
- exports.Gallery = Gallery;
100
- function RichTextVisibilityHelper({
101
- isHidden,
102
- ...richTextProps
103
- }) {
104
- return isHidden ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.VisuallyHidden, {
105
- as: _blockEditor.RichText,
106
- ...richTextProps
107
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.RichText, {
108
- ...richTextProps
109
- });
110
- }
111
- var _default = exports.default = Gallery;
112
- //# sourceMappingURL=gallery.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_components","_i18n","_blocks","_galleryImage","_deprecated","_jsxRuntime","Gallery","props","attributes","isSelected","setAttributes","selectedImage","mediaPlaceholder","onMoveBackward","onMoveForward","onRemoveImage","onSelectImage","onDeselectImage","onSetImageAttributes","insertBlocksAfter","blockProps","align","columns","defaultColumnsNumberV1","caption","imageCrop","images","jsxs","className","clsx","children","jsx","map","img","index","ariaLabel","sprintf","__","length","default","url","alt","id","isFirstItem","isLastItem","onRemove","onSelect","onDeselect","attrs","sizeSlug","RichTextVisibilityHelper","isHidden","RichText","isEmpty","tagName","__experimentalGetElementClassName","placeholder","value","onChange","inlineToolbar","__unstableOnSplitAtEnd","createBlock","getDefaultBlockName","exports","richTextProps","VisuallyHidden","as","_default"],"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":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAIA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAKA,IAAAK,aAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAAuD,IAAAO,WAAA,GAAAP,OAAA;AApBvD;AACA;AACA;;AAGA;AACA;AACA;;AASA;AACA;AACA;;AAIO,MAAMQ,OAAO,GAAKC,KAAK,IAAM;EACnC,MAAM;IACLC,UAAU;IACVC,UAAU;IACVC,aAAa;IACbC,aAAa;IACbC,gBAAgB;IAChBC,cAAc;IACdC,aAAa;IACbC,aAAa;IACbC,aAAa;IACbC,eAAe;IACfC,oBAAoB;IACpBC,iBAAiB;IACjBC;EACD,CAAC,GAAGb,KAAK;EAET,MAAM;IACLc,KAAK;IACLC,OAAO,GAAG,IAAAC,kCAAsB,EAAEf,UAAW,CAAC;IAC9CgB,OAAO;IACPC,SAAS;IACTC;EACD,CAAC,GAAGlB,UAAU;EAEd,oBACC,IAAAH,WAAA,CAAAsB,IAAA;IAAA,GACMP,UAAU;IACfQ,SAAS,EAAG,IAAAC,aAAI,EAAET,UAAU,CAACQ,SAAS,EAAE;MACvC,CAAG,QAAQP,KAAO,EAAC,GAAIA,KAAK;MAC5B,CAAG,WAAWC,OAAS,EAAC,GAAIA,OAAO;MACnC,YAAY,EAAEG;IAC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RequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = exports.Gallery = void 0;
8
- var _reactNative = require("react-native");
9
- var _galleryImage = _interopRequireDefault(require("./gallery-image"));
10
- var _deprecated = require("../deprecated");
11
- var _galleryStyles = _interopRequireDefault(require("./gallery-styles.scss"));
12
- var _tiles = _interopRequireDefault(require("./tiles"));
13
- var _i18n = require("@wordpress/i18n");
14
- var _blockEditor = require("@wordpress/block-editor");
15
- var _element = require("@wordpress/element");
16
- var _reactNativeBridge = require("@wordpress/react-native-bridge");
17
- var _data = require("@wordpress/data");
18
- var _components = require("@wordpress/components");
19
- var _jsxRuntime = require("react/jsx-runtime");
20
- /**
21
- * External dependencies
22
- */
23
-
24
- /**
25
- * Internal dependencies
26
- */
27
-
28
- /**
29
- * WordPress dependencies
30
- */
31
-
32
- const TILE_SPACING = 15;
33
-
34
- // we must limit displayed columns since readable content max-width is 580px
35
- const MAX_DISPLAYED_COLUMNS = 4;
36
- const MAX_DISPLAYED_COLUMNS_NARROW = 2;
37
- const {
38
- isFullWidth
39
- } = _components.alignmentHelpers;
40
- const Gallery = props => {
41
- const [isCaptionSelected, setIsCaptionSelected] = (0, _element.useState)(false);
42
- (0, _element.useEffect)(_reactNativeBridge.mediaUploadSync, []);
43
- const isRTL = (0, _data.useSelect)(select => {
44
- return !!select(_blockEditor.store).getSettings().isRTL;
45
- }, []);
46
- const {
47
- clientId,
48
- selectedImage,
49
- mediaPlaceholder,
50
- onBlur,
51
- onMoveBackward,
52
- onMoveForward,
53
- onRemoveImage,
54
- onSelectImage,
55
- onSetImageAttributes,
56
- onFocusGalleryCaption,
57
- attributes,
58
- isSelected,
59
- isNarrow,
60
- onFocus,
61
- insertBlocksAfter
62
- } = props;
63
- const {
64
- align,
65
- columns = (0, _deprecated.defaultColumnsNumberV1)(attributes),
66
- imageCrop,
67
- images
68
- } = attributes;
69
-
70
- // limit displayed columns when isNarrow is true (i.e. when viewport width is
71
- // less than "small", where small = 600)
72
- const displayedColumns = isNarrow ? Math.min(columns, MAX_DISPLAYED_COLUMNS_NARROW) : Math.min(columns, MAX_DISPLAYED_COLUMNS);
73
- const selectImage = index => {
74
- return () => {
75
- if (isCaptionSelected) {
76
- setIsCaptionSelected(false);
77
- }
78
- // We need to fully invoke the curried function here.
79
- onSelectImage(index)();
80
- };
81
- };
82
- const focusGalleryCaption = () => {
83
- if (!isCaptionSelected) {
84
- setIsCaptionSelected(true);
85
- }
86
- onFocusGalleryCaption();
87
- };
88
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
89
- style: {
90
- flex: 1
91
- },
92
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_tiles.default, {
93
- columns: displayedColumns,
94
- spacing: TILE_SPACING,
95
- style: isSelected ? _galleryStyles.default.galleryTilesContainerSelected : undefined,
96
- children: images.map((img, index) => {
97
- const ariaLabel = (0, _i18n.sprintf)( /* translators: 1: the order number of the image. 2: the total number of images. */
98
- (0, _i18n.__)('image %1$d of %2$d in gallery'), index + 1, images.length);
99
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_galleryImage.default, {
100
- url: img.url,
101
- alt: img.alt,
102
- id: parseInt(img.id, 10) // make id an integer explicitly
103
- ,
104
- isCropped: imageCrop,
105
- isFirstItem: index === 0,
106
- isLastItem: index + 1 === images.length,
107
- isSelected: isSelected && selectedImage === index,
108
- isBlockSelected: isSelected,
109
- onMoveBackward: onMoveBackward(index),
110
- onMoveForward: onMoveForward(index),
111
- onRemove: onRemoveImage(index),
112
- onSelect: selectImage(index),
113
- onSelectBlock: onFocus,
114
- setAttributes: attrs => onSetImageAttributes(index, attrs),
115
- caption: img.caption,
116
- "aria-label": ariaLabel,
117
- isRTL: isRTL
118
- }, img.id ? `${img.id}-${index}` : img.url);
119
- })
120
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
121
- style: isFullWidth(align) && _galleryStyles.default.fullWidth,
122
- children: mediaPlaceholder
123
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.BlockCaption, {
124
- clientId: clientId,
125
- isSelected: isCaptionSelected,
126
- accessible: true,
127
- accessibilityLabelCreator: caption => _blockEditor.RichText.isEmpty(caption) ? /* translators: accessibility text. Empty gallery caption. */
128
- 'Gallery caption. Empty' : (0, _i18n.sprintf)( /* translators: accessibility text. %s: gallery caption. */
129
- (0, _i18n.__)('Gallery caption. %s'), caption),
130
- onFocus: focusGalleryCaption,
131
- onBlur: onBlur // Always assign onBlur as props.
132
- ,
133
- insertBlocksAfter: insertBlocksAfter
134
- })]
135
- });
136
- };
137
- exports.Gallery = Gallery;
138
- var _default = exports.default = Gallery;
139
- //# sourceMappingURL=gallery.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_galleryImage","_interopRequireDefault","_deprecated","_galleryStyles","_tiles","_i18n","_blockEditor","_element","_reactNativeBridge","_data","_components","_jsxRuntime","TILE_SPACING","MAX_DISPLAYED_COLUMNS","MAX_DISPLAYED_COLUMNS_NARROW","isFullWidth","alignmentHelpers","Gallery","props","isCaptionSelected","setIsCaptionSelected","useState","useEffect","mediaUploadSync","isRTL","useSelect","select","blockEditorStore","getSettings","clientId","selectedImage","mediaPlaceholder","onBlur","onMoveBackward","onMoveForward","onRemoveImage","onSelectImage","onSetImageAttributes","onFocusGalleryCaption","attributes","isSelected","isNarrow","onFocus","insertBlocksAfter","align","columns","defaultColumnsNumberV1","imageCrop","images","displayedColumns","Math","min","selectImage","index","focusGalleryCaption","jsxs","View","style","flex","children","jsx","default","spacing","styles","galleryTilesContainerSelected","undefined","map","img","ariaLabel","sprintf","__","length","url","alt","id","parseInt","isCropped","isFirstItem","isLastItem","isBlockSelected","onRemove","onSelect","onSelectBlock","setAttributes","attrs","caption","fullWidth","BlockCaption","accessible","accessibilityLabelCreator","RichText","isEmpty","exports","_default"],"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":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAH,sBAAA,CAAAF,OAAA;AAKA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,O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AAA;MAClBW,iBAAiB,EAAGA;IAAmB,CACvC,CAAC;EAAA,CACG,CAAC;AAET,CAAC;AAACiD,OAAA,CAAA3E,OAAA,GAAAA,OAAA;AAAA,IAAA4E,QAAA,GAAAD,OAAA,CAAA/B,OAAA,GAEa5C,OAAO","ignoreList":[]}
@@ -1,81 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = saveV1;
8
- var _clsx = _interopRequireDefault(require("clsx"));
9
- var _blockEditor = require("@wordpress/block-editor");
10
- var _deprecated = require("../deprecated");
11
- var _constants = require("./constants");
12
- var _jsxRuntime = require("react/jsx-runtime");
13
- /**
14
- * External dependencies
15
- */
16
-
17
- /**
18
- * WordPress dependencies
19
- */
20
-
21
- /**
22
- * Internal dependencies
23
- */
24
-
25
- function saveV1({
26
- attributes
27
- }) {
28
- const {
29
- images,
30
- columns = (0, _deprecated.defaultColumnsNumberV1)(attributes),
31
- imageCrop,
32
- caption,
33
- linkTo
34
- } = attributes;
35
- const className = `columns-${columns} ${imageCrop ? 'is-cropped' : ''}`;
36
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("figure", {
37
- ..._blockEditor.useBlockProps.save({
38
- className
39
- }),
40
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
41
- className: "blocks-gallery-grid",
42
- children: images.map(image => {
43
- let href;
44
- switch (linkTo) {
45
- case _constants.LINK_DESTINATION_MEDIA:
46
- href = image.fullUrl || image.url;
47
- break;
48
- case _constants.LINK_DESTINATION_ATTACHMENT:
49
- href = image.link;
50
- break;
51
- }
52
- const img = /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
53
- src: image.url,
54
- alt: image.alt,
55
- "data-id": image.id,
56
- "data-full-url": image.fullUrl,
57
- "data-link": image.link,
58
- className: image.id ? `wp-image-${image.id}` : null
59
- });
60
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
61
- className: "blocks-gallery-item",
62
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("figure", {
63
- children: [href ? /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
64
- href: href,
65
- children: img
66
- }) : img, !_blockEditor.RichText.isEmpty(image.caption) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.RichText.Content, {
67
- tagName: "figcaption",
68
- className: (0, _clsx.default)('blocks-gallery-item__caption', (0, _blockEditor.__experimentalGetElementClassName)('caption')),
69
- value: image.caption
70
- })]
71
- })
72
- }, image.id || image.url);
73
- })
74
- }), !_blockEditor.RichText.isEmpty(caption) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.RichText.Content, {
75
- tagName: "figcaption",
76
- className: (0, _clsx.default)('blocks-gallery-caption', (0, _blockEditor.__experimentalGetElementClassName)('caption')),
77
- value: caption
78
- })]
79
- });
80
- }
81
- //# sourceMappingURL=save.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_deprecated","_constants","_jsxRuntime","saveV1","attributes","images","columns","defaultColumnsNumberV1","imageCrop","caption","linkTo","className","jsxs","useBlockProps","save","children","jsx","map","image","href","LINK_DESTINATION_MEDIA","fullUrl","url","LINK_DESTINATION_ATTACHMENT","link","img","src","alt","id","RichText","isEmpty","Content","tagName","clsx","__experimentalGetElementClassName","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":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAGqB,IAAAI,WAAA,GAAAJ,OAAA;AArBrB;AACA;AACA;;AAGA;AACA;AACA;;AAOA;AACA;AACA;;AAOe,SAASK,MAAMA,CAAE;EAAEC;AAAW,CAAC,EAAG;EAChD,MAAM;IACLC,MAAM;IACNC,OAAO,GAAG,IAAAC,kCAAsB,EAAEH,UAAW,CAAC;IAC9CI,SAAS;IACTC,OAAO;IACPC;EACD,CAAC,GAAGN,UAAU;EACd,MAAMO,SAAS,GAAI,WAAWL,OAAS,IAAIE,SAAS,GAAG,YAAY,GAAG,EAAI,EAAC;EAE3E,oBACC,IAAAN,WAAA,CAAAU,IAAA;IAAA,GAAaC,0BAAa,CAACC,IAAI,CAAE;MAAEH;IAAU,CAAE,CAAC;IAAAI,QAAA,gBAC/C,IAAAb,WAAA,CAAAc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,CAACI,GAkBrB,CAAC;MAEP,CAAE;IAAC,CACA,CAAC,EACH,CAAEO,qBAAQ,CAACC,OAAO,CAAErB,OAAQ,CAAC,iBAC9B,IAAAP,WAAA,CAAAc,GAAA,EAACjB,YAAA,CAAA8B,QAAQ,CAACE,OAAO;MAChBC,OAAO,EAAC,YAAY;MACpBrB,SAAS,EAAG,IAAAsB,aAAI,EACf,wBAAwB,EACxB,IAAAC,8CAAiC,EAAE,SAAU,CAC9C,CAAG;MACHC,KAAK,EAAG1B;IAAS,CACjB,CACD;EAAA,CACM,CAAC;AAEX","ignoreList":[]}
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.pickRelevantMediaFiles = void 0;
7
- const pickRelevantMediaFiles = (image, sizeSlug = 'large') => {
8
- const imageProps = Object.fromEntries(Object.entries(image !== null && image !== void 0 ? image : {}).filter(([key]) => ['alt', 'id', 'link', 'caption'].includes(key)));
9
- imageProps.url = image?.sizes?.[sizeSlug]?.url || image?.media_details?.sizes?.[sizeSlug]?.source_url || image?.url;
10
- const fullUrl = image?.sizes?.full?.url || image?.media_details?.sizes?.full?.source_url;
11
- if (fullUrl) {
12
- imageProps.fullUrl = fullUrl;
13
- }
14
- return imageProps;
15
- };
16
- exports.pickRelevantMediaFiles = pickRelevantMediaFiles;
17
- //# 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","exports"],"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":";;;;;;AAAO,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;AAACa,OAAA,CAAAhB,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -1,83 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _reactNative = require("react-native");
9
- var _element = require("@wordpress/element");
10
- var _tilesStyles = _interopRequireDefault(require("./tiles-styles.scss"));
11
- var _jsxRuntime = require("react/jsx-runtime");
12
- /**
13
- * External dependencies
14
- */
15
-
16
- /**
17
- * WordPress dependencies
18
- */
19
-
20
- /**
21
- * Internal dependencies
22
- */
23
-
24
- function Tiles(props) {
25
- const {
26
- columns,
27
- children,
28
- spacing = 10,
29
- style
30
- } = props;
31
- const {
32
- compose
33
- } = _reactNative.StyleSheet;
34
- const tileCount = _element.Children.count(children);
35
- const lastTile = tileCount - 1;
36
- const lastRow = Math.floor(lastTile / columns);
37
- const wrappedChildren = _element.Children.map(children, (child, index) => {
38
- /**
39
- * Since we don't have `calc()`, we must calculate our spacings here in
40
- * order to preserve even spacing between tiles and equal width for tiles
41
- * in a given row.
42
- *
43
- * In order to ensure equal sizing of tile contents, we distribute the
44
- * spacing such that each tile has an equal "share" of the fixed spacing. To
45
- * keep the tiles properly aligned within their rows, we calculate the left
46
- * and right paddings based on the tile's relative position within the row.
47
- *
48
- * Note: we use padding instead of margins so that the fixed spacing is
49
- * included within the relative spacing (i.e. width percentage), and
50
- * wrapping behavior is preserved.
51
- *
52
- * - The left most tile in a row must have left padding of zero.
53
- * - The right most tile in a row must have a right padding of zero.
54
- *
55
- * The values of these left and right paddings are interpolated for tiles in
56
- * between. The right padding is complementary with the left padding of the
57
- * next tile (i.e. the right padding of [tile n] + the left padding of
58
- * [tile n + 1] will be equal for all tiles except the last one in a given
59
- * row).
60
- */
61
-
62
- const row = Math.floor(index / columns);
63
- const rowLength = row === lastRow ? lastTile % columns + 1 : columns;
64
- const indexInRow = index % columns;
65
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
66
- style: [_tilesStyles.default.tileStyle, {
67
- width: `${100 / rowLength}%`,
68
- paddingLeft: spacing * (indexInRow / rowLength),
69
- paddingRight: spacing * (1 - (indexInRow + 1) / rowLength),
70
- paddingTop: row === 0 ? 0 : spacing / 2,
71
- paddingBottom: row === lastRow ? 0 : spacing / 2
72
- }],
73
- children: child
74
- });
75
- });
76
- const containerStyle = compose(_tilesStyles.default.containerStyle, style);
77
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
78
- style: containerStyle,
79
- children: wrappedChildren
80
- });
81
- }
82
- var _default = exports.default = Tiles;
83
- //# sourceMappingURL=tiles.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_element","_tilesStyles","_interopRequireDefault","_jsxRuntime","Tiles","props","columns","children","spacing","style","compose","StyleSheet","tileCount","Children","count","lastTile","lastRow","Math","floor","wrappedChildren","map","child","index","row","rowLength","indexInRow","jsx","View","styles","tileStyle","width","paddingLeft","paddingRight","paddingTop","paddingBottom","containerStyle","_default","exports","default"],"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":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,YAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAyC,IAAAI,WAAA,GAAAJ,OAAA;AAbzC;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,SAASK,KAAKA,CAAEC,KAAK,EAAG;EACvB,MAAM;IAAEC,OAAO;IAAEC,QAAQ;IAAEC,OAAO,GAAG,EAAE;IAAEC;EAAM,CAAC,GAAGJ,KAAK;EAExD,MAAM;IAAEK;EAAQ,CAAC,GAAGC,uBAAU;EAE9B,MAAMC,SAAS,GA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CAAC;EAE9D,oBAAO,IAAAN,WAAA,CAAAuB,GAAA,EAAC5B,YAAA,CAAA6B,IAAI;IAAClB,KAAK,EAAG0B,cAAgB;IAAA5B,QAAA,EAAGY;EAAe,CAAQ,CAAC;AACjE;AAAC,IAAAiB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEclC,KAAK","ignoreList":[]}
@@ -1,39 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = useSplit;
7
- var _element = require("@wordpress/element");
8
- var _data = require("@wordpress/data");
9
- var _blockEditor = require("@wordpress/block-editor");
10
- var _blocks = require("@wordpress/blocks");
11
- /**
12
- * WordPress dependencies
13
- */
14
-
15
- function useSplit(clientId) {
16
- // We can not rely on the isAfterOriginal parameter of the callback,
17
- // because if the value after the split is empty isAfterOriginal is false
18
- // while the value is in fact after the original. So to avoid that issue we use
19
- // a flag where the first execution of the callback is false (it is the before value)
20
- // and the second execution is true, it is the after value.
21
- const isAfter = (0, _element.useRef)(false);
22
- const {
23
- getBlock
24
- } = (0, _data.useSelect)(_blockEditor.store);
25
- return (0, _element.useCallback)(value => {
26
- const block = getBlock(clientId);
27
- if (isAfter.current) {
28
- return (0, _blocks.cloneBlock)(block, {
29
- content: value
30
- });
31
- }
32
- isAfter.current = true;
33
- return (0, _blocks.createBlock)(block.name, {
34
- ...block.attributes,
35
- content: value
36
- });
37
- }, [clientId, getBlock]);
38
- }
39
- //# sourceMappingURL=use-split.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_element","require","_data","_blockEditor","_blocks","useSplit","clientId","isAfter","useRef","getBlock","useSelect","blockEditorStore","useCallback","value","block","current","cloneBlock","content","createBlock","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":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AANA;AACA;AACA;;AAMe,SAASI,QAAQA,CAAEC,QAAQ,EAAG;EAC5C;EACA;EACA;EACA;EACA;EACA,MAAMC,OAAO,GAAG,IAAAC,eAAM,EAAE,KAAM,CAAC;EAC/B,MAAM;IAAEC;EAAS,CAAC,GAAG,IAAAC,eAAS,EAAEC,kBAAiB,CAAC;EAClD,OAAO,IAAAC,oBAAW,EACfC,KAAK,IAAM;IACZ,MAAMC,KAAK,GAAGL,QAAQ,CAAEH,QAAS,CAAC;IAClC,IAAKC,OAAO,CAACQ,OAAO,EAAG;MACtB,OAAO,IAAAC,kBAAU,EAAEF,KAAK,EAAE;QACzBG,OAAO,EAAEJ;MACV,CAAE,CAAC;IACJ;IACAN,OAAO,CAACQ,OAAO,GAAG,IAAI;IACtB,OAAO,IAAAG,mBAAW,EAAEJ,KAAK,CAACK,IAAI,EAAE;MAC/B,GAAGL,KAAK,CAACM,UAAU;MACnBH,OAAO,EAAEJ;IACV,CAAE,CAAC;EACJ,CAAC,EACD,CAAEP,QAAQ,EAAEG,QAAQ,CACrB,CAAC;AACF","ignoreList":[]}
@@ -1,15 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.TOOLSPANEL_DROPDOWNMENU_PROPS = void 0;
7
- // The following dropdown menu props aim to provide a consistent offset and
8
- // placement for ToolsPanel menus for block controls to match color popovers.
9
- const TOOLSPANEL_DROPDOWNMENU_PROPS = exports.TOOLSPANEL_DROPDOWNMENU_PROPS = {
10
- popoverProps: {
11
- placement: 'left-start',
12
- offset: 259 // Inner sidebar width (248px) - button width (24px) - border (1px) + padding (16px) + spacing (20px)
13
- }
14
- };
15
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["TOOLSPANEL_DROPDOWNMENU_PROPS","exports","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;AACO,MAAMA,6BAA6B,GAAAC,OAAA,CAAAD,6BAAA,GAAG;EAC5CE,YAAY,EAAE;IACbC,SAAS,EAAE,YAAY;IACvBC,MAAM,EAAE,GAAG,CAAE;EACd;AACD,CAAC","ignoreList":[]}
@@ -1,31 +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
- import { jsx as _jsx } from "react/jsx-runtime";
20
- function GalleryEditWrapper(props) {
21
- if (!isGalleryV2Enabled()) {
22
- return /*#__PURE__*/_jsx(EditWithoutInnerBlocks, {
23
- ...props
24
- });
25
- }
26
- return /*#__PURE__*/_jsx(EditWithInnerBlocks, {
27
- ...props
28
- });
29
- }
30
- export default compose([withNotices])(GalleryEditWrapper);
31
- //# sourceMappingURL=edit-wrapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["compose","withNotices","EditWithInnerBlocks","EditWithoutInnerBlocks","isGalleryV2Enabled","jsx","_jsx","GalleryEditWrapper","props"],"sources":["@wordpress/block-library/src/gallery/edit-wrapper.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { withNotices } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport EditWithInnerBlocks from './edit';\nimport EditWithoutInnerBlocks from './v1/edit';\nimport { isGalleryV2Enabled } from './shared';\n\n/*\n * Using a wrapper around the logic to load the edit for v1 of Gallery block\n * or the refactored version with InnerBlocks. This is to prevent conditional\n * use of hooks lint errors if adding this logic to the top of the edit component.\n */\nfunction GalleryEditWrapper( props ) {\n\tif ( ! isGalleryV2Enabled() ) {\n\t\treturn <EditWithoutInnerBlocks { ...props } />;\n\t}\n\n\treturn <EditWithInnerBlocks { ...props } />;\n}\n\nexport default compose( [ withNotices ] )( GalleryEditWrapper );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,WAAW,QAAQ,uBAAuB;;AAEnD;AACA;AACA;AACA,OAAOC,mBAAmB,MAAM,QAAQ;AACxC,OAAOC,sBAAsB,MAAM,WAAW;AAC9C,SAASC,kBAAkB,QAAQ,UAAU;;AAE7C;AACA;AACA;AACA;AACA;AAJA,SAAAC,GAAA,IAAAC,IAAA;AAKA,SAASC,kBAAkBA,CAAEC,KAAK,EAAG;EACpC,IAAK,CAAEJ,kBAAkB,CAAC,CAAC,EAAG;IAC7B,oBAAOE,IAAA,CAACH,sBAAsB;MAAA,GAAMK;IAAK,CAAI,CAAC;EAC/C;EAEA,oBAAOF,IAAA,CAACJ,mBAAmB;IAAA,GAAMM;EAAK,CAAI,CAAC;AAC5C;AAEA,eAAeR,OAAO,CAAE,CAAEC,WAAW,CAAG,CAAC,CAAEM,kBAAmB,CAAC","ignoreList":[]}
@@ -1,4 +0,0 @@
1
- export const LINK_DESTINATION_NONE = 'none';
2
- export const LINK_DESTINATION_MEDIA = 'file';
3
- export const LINK_DESTINATION_ATTACHMENT = 'post';
4
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["LINK_DESTINATION_NONE","LINK_DESTINATION_MEDIA","LINK_DESTINATION_ATTACHMENT"],"sources":["@wordpress/block-library/src/gallery/v1/constants.js"],"sourcesContent":["export const LINK_DESTINATION_NONE = 'none';\nexport const LINK_DESTINATION_MEDIA = 'file';\nexport const LINK_DESTINATION_ATTACHMENT = 'post';\n"],"mappings":"AAAA,OAAO,MAAMA,qBAAqB,GAAG,MAAM;AAC3C,OAAO,MAAMC,sBAAsB,GAAG,MAAM;AAC5C,OAAO,MAAMC,2BAA2B,GAAG,MAAM","ignoreList":[]}