@wordpress/block-library 7.12.0 → 7.13.1-next.957ca95e4c.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 (824) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/build/archives/index.js +5 -1
  3. package/build/archives/index.js.map +1 -1
  4. package/build/audio/index.js +4 -0
  5. package/build/audio/index.js.map +1 -1
  6. package/build/button/deprecated.js +14 -5
  7. package/build/button/deprecated.js.map +1 -1
  8. package/build/button/index.js +1 -1
  9. package/build/categories/edit.js +3 -1
  10. package/build/categories/edit.js.map +1 -1
  11. package/build/categories/index.js +14 -1
  12. package/build/categories/index.js.map +1 -1
  13. package/build/code/index.js +4 -2
  14. package/build/code/index.js.map +1 -1
  15. package/build/column/index.js +13 -0
  16. package/build/column/index.js.map +1 -1
  17. package/build/columns/deprecated.js +16 -5
  18. package/build/columns/deprecated.js.map +1 -1
  19. package/build/columns/edit.js +6 -2
  20. package/build/columns/edit.js.map +1 -1
  21. package/build/columns/edit.native.js +6 -2
  22. package/build/columns/edit.native.js.map +1 -1
  23. package/build/columns/index.js +13 -0
  24. package/build/columns/index.js.map +1 -1
  25. package/build/columns/transforms.js +10 -1
  26. package/build/columns/transforms.js.map +1 -1
  27. package/build/comment-author-name/index.js +5 -1
  28. package/build/comment-author-name/index.js.map +1 -1
  29. package/build/comment-content/index.js +5 -1
  30. package/build/comment-content/index.js.map +1 -1
  31. package/build/comment-date/index.js +1 -0
  32. package/build/comment-date/index.js.map +1 -1
  33. package/build/comment-edit-link/index.js +5 -1
  34. package/build/comment-edit-link/index.js.map +1 -1
  35. package/build/comment-reply-link/index.js +5 -1
  36. package/build/comment-reply-link/index.js.map +1 -1
  37. package/build/comment-template/index.js +14 -1
  38. package/build/comment-template/index.js.map +1 -1
  39. package/build/comments/index.js +13 -0
  40. package/build/comments/index.js.map +1 -1
  41. package/build/comments-pagination/index.js +13 -0
  42. package/build/comments-pagination/index.js.map +1 -1
  43. package/build/comments-pagination-next/index.js +4 -2
  44. package/build/comments-pagination-next/index.js.map +1 -1
  45. package/build/comments-pagination-numbers/edit.js +5 -1
  46. package/build/comments-pagination-numbers/edit.js.map +1 -1
  47. package/build/comments-pagination-numbers/index.js +14 -1
  48. package/build/comments-pagination-numbers/index.js.map +1 -1
  49. package/build/comments-pagination-previous/index.js +4 -2
  50. package/build/comments-pagination-previous/index.js.map +1 -1
  51. package/build/comments-title/deprecated.js +4 -2
  52. package/build/comments-title/deprecated.js.map +1 -1
  53. package/build/comments-title/index.js +4 -2
  54. package/build/comments-title/index.js.map +1 -1
  55. package/build/cover/deprecated.js +20 -5
  56. package/build/cover/deprecated.js.map +1 -1
  57. package/build/cover/edit/block-controls.js +9 -2
  58. package/build/cover/edit/block-controls.js.map +1 -1
  59. package/build/cover/index.js +13 -0
  60. package/build/cover/index.js.map +1 -1
  61. package/build/cover/shared.js +1 -1
  62. package/build/cover/shared.js.map +1 -1
  63. package/build/embed/icons.js +1 -1
  64. package/build/embed/icons.js.map +1 -1
  65. package/build/gallery/deprecated.js +6 -1
  66. package/build/gallery/deprecated.js.map +1 -1
  67. package/build/gallery/edit.js +15 -2
  68. package/build/gallery/edit.js.map +1 -1
  69. package/build/gallery/gap-styles.js +5 -4
  70. package/build/gallery/gap-styles.js.map +1 -1
  71. package/build/gallery/index.js +5 -0
  72. package/build/gallery/index.js.map +1 -1
  73. package/build/gallery/transforms.js +20 -7
  74. package/build/gallery/transforms.js.map +1 -1
  75. package/build/gallery/utils.js +7 -6
  76. package/build/gallery/utils.js.map +1 -1
  77. package/build/group/deprecated.js +108 -12
  78. package/build/group/deprecated.js.map +1 -1
  79. package/build/group/edit.js +23 -1
  80. package/build/group/edit.js.map +1 -1
  81. package/build/group/index.js +10 -2
  82. package/build/group/index.js.map +1 -1
  83. package/build/group/variations.js +8 -8
  84. package/build/group/variations.js.map +1 -1
  85. package/build/heading/deprecated.js +5 -3
  86. package/build/heading/deprecated.js.map +1 -1
  87. package/build/heading/index.js +3 -1
  88. package/build/heading/index.js.map +1 -1
  89. package/build/heading/transforms.js +3 -1
  90. package/build/heading/transforms.js.map +1 -1
  91. package/build/home-link/edit.js +8 -4
  92. package/build/home-link/edit.js.map +1 -1
  93. package/build/home-link/index.js +14 -1
  94. package/build/home-link/index.js.map +1 -1
  95. package/build/image/edit.js +16 -2
  96. package/build/image/edit.js.map +1 -1
  97. package/build/image/index.js +13 -7
  98. package/build/image/index.js.map +1 -1
  99. package/build/image/use-client-width.js +3 -1
  100. package/build/image/use-client-width.js.map +1 -1
  101. package/build/index.js +1 -1
  102. package/build/index.js.map +1 -1
  103. package/build/index.native.js +9 -18
  104. package/build/index.native.js.map +1 -1
  105. package/build/latest-posts/deprecated.js +14 -1
  106. package/build/latest-posts/deprecated.js.map +1 -1
  107. package/build/latest-posts/index.js +14 -1
  108. package/build/latest-posts/index.js.map +1 -1
  109. package/build/list/deprecated.js +84 -1
  110. package/build/list/deprecated.js.map +1 -1
  111. package/build/list/edit.js +153 -134
  112. package/build/list/edit.js.map +1 -1
  113. package/build/list/index.js +33 -34
  114. package/build/list/index.js.map +1 -1
  115. package/build/list/save.js +1 -5
  116. package/build/list/save.js.map +1 -1
  117. package/build/list/{v2/tag-name.js → tag-name.js} +0 -0
  118. package/build/list/tag-name.js.map +1 -0
  119. package/build/list/{v2/tag-name.native.js → tag-name.native.js} +0 -0
  120. package/build/list/tag-name.native.js.map +1 -0
  121. package/build/list/transforms.js +61 -95
  122. package/build/list/transforms.js.map +1 -1
  123. package/build/list/{v2/migrate.js → utils.js} +3 -2
  124. package/build/list/utils.js.map +1 -0
  125. package/build/list-item/edit.js +3 -1
  126. package/build/list-item/edit.js.map +1 -1
  127. package/build/list-item/edit.native.js +21 -3
  128. package/build/list-item/edit.native.js.map +1 -1
  129. package/build/list-item/hooks/index.js +8 -0
  130. package/build/list-item/hooks/index.js.map +1 -1
  131. package/build/list-item/hooks/use-copy.js +44 -0
  132. package/build/list-item/hooks/use-copy.js.map +1 -0
  133. package/build/list-item/hooks/use-merge.js +0 -1
  134. package/build/list-item/hooks/use-merge.js.map +1 -1
  135. package/build/list-item/hooks/use-outdent-list-item.js +0 -1
  136. package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
  137. package/build/list-item/hooks/use-space.js +10 -1
  138. package/build/list-item/hooks/use-space.js.map +1 -1
  139. package/build/list-item/index.js +0 -1
  140. package/build/list-item/index.js.map +1 -1
  141. package/build/list-item/list-style-type.native.js +4 -1
  142. package/build/list-item/list-style-type.native.js.map +1 -1
  143. package/build/list-item/utils.js +4 -1
  144. package/build/list-item/utils.js.map +1 -1
  145. package/build/media-text/deprecated.js +5 -1
  146. package/build/media-text/deprecated.js.map +1 -1
  147. package/build/media-text/index.js +17 -0
  148. package/build/media-text/index.js.map +1 -1
  149. package/build/navigation/deprecated.js +6 -1
  150. package/build/navigation/deprecated.js.map +1 -1
  151. package/build/navigation/edit/index.js +125 -41
  152. package/build/navigation/edit/index.js.map +1 -1
  153. package/build/navigation/edit/responsive-wrapper.js +6 -4
  154. package/build/navigation/edit/responsive-wrapper.js.map +1 -1
  155. package/build/navigation/edit/unsaved-inner-blocks.js +6 -16
  156. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  157. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -7
  158. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  159. package/build/navigation/index.js +1 -0
  160. package/build/navigation/index.js.map +1 -1
  161. package/build/navigation/menu-items-to-blocks.js +1 -7
  162. package/build/navigation/menu-items-to-blocks.js.map +1 -1
  163. package/build/navigation/use-navigation-menu.js +8 -7
  164. package/build/navigation/use-navigation-menu.js.map +1 -1
  165. package/build/navigation-link/edit.js +6 -8
  166. package/build/navigation-link/edit.js.map +1 -1
  167. package/build/navigation-submenu/edit.js +4 -6
  168. package/build/navigation-submenu/edit.js.map +1 -1
  169. package/build/page-list/edit.js +7 -3
  170. package/build/page-list/edit.js.map +1 -1
  171. package/build/paragraph/deprecated.js +18 -10
  172. package/build/paragraph/deprecated.js.map +1 -1
  173. package/build/paragraph/edit.js +1 -0
  174. package/build/paragraph/edit.js.map +1 -1
  175. package/build/paragraph/index.js +7 -0
  176. package/build/paragraph/index.js.map +1 -1
  177. package/build/paragraph/transforms.js +7 -0
  178. package/build/paragraph/transforms.js.map +1 -1
  179. package/build/post-author/index.js +4 -2
  180. package/build/post-author/index.js.map +1 -1
  181. package/build/post-author-biography/index.js +1 -0
  182. package/build/post-author-biography/index.js.map +1 -1
  183. package/build/post-author-name/index.js +5 -1
  184. package/build/post-author-name/index.js.map +1 -1
  185. package/build/post-comments-count/edit.js +11 -1
  186. package/build/post-comments-count/edit.js.map +1 -1
  187. package/build/post-comments-count/index.js +4 -1
  188. package/build/post-comments-count/index.js.map +1 -1
  189. package/build/post-comments-link/index.js +4 -2
  190. package/build/post-comments-link/index.js.map +1 -1
  191. package/build/post-date/edit.js +9 -2
  192. package/build/post-date/edit.js.map +1 -1
  193. package/build/post-date/index.js +9 -0
  194. package/build/post-date/index.js.map +1 -1
  195. package/build/post-excerpt/index.js +4 -2
  196. package/build/post-excerpt/index.js.map +1 -1
  197. package/build/post-featured-image/edit.js +27 -12
  198. package/build/post-featured-image/edit.js.map +1 -1
  199. package/build/post-featured-image/index.js +12 -0
  200. package/build/post-featured-image/index.js.map +1 -1
  201. package/build/post-navigation-link/index.js +3 -2
  202. package/build/post-navigation-link/index.js.map +1 -1
  203. package/build/post-template/edit.js +8 -4
  204. package/build/post-template/edit.js.map +1 -1
  205. package/build/post-template/index.js +14 -1
  206. package/build/post-template/index.js.map +1 -1
  207. package/build/post-terms/edit.js +0 -1
  208. package/build/post-terms/edit.js.map +1 -1
  209. package/build/post-terms/index.js +5 -3
  210. package/build/post-terms/index.js.map +1 -1
  211. package/build/post-terms/use-post-terms.js +4 -24
  212. package/build/post-terms/use-post-terms.js.map +1 -1
  213. package/build/post-title/index.js +2 -1
  214. package/build/post-title/index.js.map +1 -1
  215. package/build/preformatted/index.js +4 -2
  216. package/build/preformatted/index.js.map +1 -1
  217. package/build/pullquote/deprecated.js +135 -25
  218. package/build/pullquote/deprecated.js.map +1 -1
  219. package/build/pullquote/edit.js +1 -1
  220. package/build/pullquote/edit.js.map +1 -1
  221. package/build/pullquote/edit.native.js +0 -1
  222. package/build/pullquote/edit.native.js.map +1 -1
  223. package/build/pullquote/index.js +13 -6
  224. package/build/pullquote/index.js.map +1 -1
  225. package/build/pullquote/save.js +2 -2
  226. package/build/pullquote/save.js.map +1 -1
  227. package/build/pullquote/transforms.js +14 -33
  228. package/build/pullquote/transforms.js.map +1 -1
  229. package/build/query/deprecated.js +10 -9
  230. package/build/query/deprecated.js.map +1 -1
  231. package/build/query/edit/index.js +19 -8
  232. package/build/query/edit/index.js.map +1 -1
  233. package/build/query/edit/inspector-controls/taxonomy-controls.js +1 -0
  234. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  235. package/build/query/edit/query-placeholder.js +6 -1
  236. package/build/query/edit/query-placeholder.js.map +1 -1
  237. package/build/query/utils.js +35 -9
  238. package/build/query/utils.js.map +1 -1
  239. package/build/query-no-results/edit.js +1 -1
  240. package/build/query-no-results/edit.js.map +1 -1
  241. package/build/query-no-results/index.js +13 -0
  242. package/build/query-no-results/index.js.map +1 -1
  243. package/build/query-pagination-numbers/index.js +4 -2
  244. package/build/query-pagination-numbers/index.js.map +1 -1
  245. package/build/query-title/edit.js +10 -1
  246. package/build/query-title/edit.js.map +1 -1
  247. package/build/query-title/index.js +8 -2
  248. package/build/query-title/index.js.map +1 -1
  249. package/build/quote/deprecated.js +13 -6
  250. package/build/quote/deprecated.js.map +1 -1
  251. package/build/quote/index.js +4 -2
  252. package/build/quote/index.js.map +1 -1
  253. package/build/quote/transforms.js +22 -37
  254. package/build/quote/transforms.js.map +1 -1
  255. package/build/separator/deprecated.js +3 -4
  256. package/build/separator/deprecated.js.map +1 -1
  257. package/build/separator/index.js +1 -0
  258. package/build/separator/index.js.map +1 -1
  259. package/build/social-link/icons/reddit.js +1 -1
  260. package/build/social-link/icons/reddit.js.map +1 -1
  261. package/build/social-links/edit.js +43 -9
  262. package/build/social-links/edit.js.map +1 -1
  263. package/build/social-links/index.js +9 -0
  264. package/build/social-links/index.js.map +1 -1
  265. package/build/spacer/index.js +7 -1
  266. package/build/spacer/index.js.map +1 -1
  267. package/build/table/index.js +4 -0
  268. package/build/table/index.js.map +1 -1
  269. package/build/table/state.js +9 -3
  270. package/build/table/state.js.map +1 -1
  271. package/build/table-of-contents/index.js +24 -1
  272. package/build/table-of-contents/index.js.map +1 -1
  273. package/build/tag-cloud/index.js +5 -1
  274. package/build/tag-cloud/index.js.map +1 -1
  275. package/build/template-part/index.js +2 -2
  276. package/build/template-part/index.js.map +1 -1
  277. package/build/term-description/index.js +10 -0
  278. package/build/term-description/index.js.map +1 -1
  279. package/build/text-columns/edit.js +3 -1
  280. package/build/text-columns/edit.js.map +1 -1
  281. package/build/text-columns/save.js +3 -1
  282. package/build/text-columns/save.js.map +1 -1
  283. package/build/verse/index.js +2 -0
  284. package/build/verse/index.js.map +1 -1
  285. package/build/video/index.js +4 -0
  286. package/build/video/index.js.map +1 -1
  287. package/build-module/archives/index.js +5 -1
  288. package/build-module/archives/index.js.map +1 -1
  289. package/build-module/audio/index.js +4 -0
  290. package/build-module/audio/index.js.map +1 -1
  291. package/build-module/button/deprecated.js +14 -4
  292. package/build-module/button/deprecated.js.map +1 -1
  293. package/build-module/button/index.js +1 -1
  294. package/build-module/categories/edit.js +4 -2
  295. package/build-module/categories/edit.js.map +1 -1
  296. package/build-module/categories/index.js +14 -1
  297. package/build-module/categories/index.js.map +1 -1
  298. package/build-module/code/index.js +4 -2
  299. package/build-module/code/index.js.map +1 -1
  300. package/build-module/column/index.js +13 -0
  301. package/build-module/column/index.js.map +1 -1
  302. package/build-module/columns/deprecated.js +16 -4
  303. package/build-module/columns/deprecated.js.map +1 -1
  304. package/build-module/columns/edit.js +7 -3
  305. package/build-module/columns/edit.js.map +1 -1
  306. package/build-module/columns/edit.native.js +7 -3
  307. package/build-module/columns/edit.native.js.map +1 -1
  308. package/build-module/columns/index.js +13 -0
  309. package/build-module/columns/index.js.map +1 -1
  310. package/build-module/columns/transforms.js +10 -1
  311. package/build-module/columns/transforms.js.map +1 -1
  312. package/build-module/comment-author-name/index.js +5 -1
  313. package/build-module/comment-author-name/index.js.map +1 -1
  314. package/build-module/comment-content/index.js +5 -1
  315. package/build-module/comment-content/index.js.map +1 -1
  316. package/build-module/comment-date/index.js +1 -0
  317. package/build-module/comment-date/index.js.map +1 -1
  318. package/build-module/comment-edit-link/index.js +5 -1
  319. package/build-module/comment-edit-link/index.js.map +1 -1
  320. package/build-module/comment-reply-link/index.js +5 -1
  321. package/build-module/comment-reply-link/index.js.map +1 -1
  322. package/build-module/comment-template/index.js +14 -1
  323. package/build-module/comment-template/index.js.map +1 -1
  324. package/build-module/comments/index.js +13 -0
  325. package/build-module/comments/index.js.map +1 -1
  326. package/build-module/comments-pagination/index.js +13 -0
  327. package/build-module/comments-pagination/index.js.map +1 -1
  328. package/build-module/comments-pagination-next/index.js +4 -2
  329. package/build-module/comments-pagination-next/index.js.map +1 -1
  330. package/build-module/comments-pagination-numbers/edit.js +5 -1
  331. package/build-module/comments-pagination-numbers/edit.js.map +1 -1
  332. package/build-module/comments-pagination-numbers/index.js +14 -1
  333. package/build-module/comments-pagination-numbers/index.js.map +1 -1
  334. package/build-module/comments-pagination-previous/index.js +4 -2
  335. package/build-module/comments-pagination-previous/index.js.map +1 -1
  336. package/build-module/comments-title/deprecated.js +4 -2
  337. package/build-module/comments-title/deprecated.js.map +1 -1
  338. package/build-module/comments-title/index.js +4 -2
  339. package/build-module/comments-title/index.js.map +1 -1
  340. package/build-module/cover/deprecated.js +20 -4
  341. package/build-module/cover/deprecated.js.map +1 -1
  342. package/build-module/cover/edit/block-controls.js +10 -3
  343. package/build-module/cover/edit/block-controls.js.map +1 -1
  344. package/build-module/cover/index.js +13 -0
  345. package/build-module/cover/index.js.map +1 -1
  346. package/build-module/cover/shared.js +1 -1
  347. package/build-module/cover/shared.js.map +1 -1
  348. package/build-module/embed/icons.js +1 -1
  349. package/build-module/embed/icons.js.map +1 -1
  350. package/build-module/gallery/deprecated.js +7 -2
  351. package/build-module/gallery/deprecated.js.map +1 -1
  352. package/build-module/gallery/edit.js +15 -2
  353. package/build-module/gallery/edit.js.map +1 -1
  354. package/build-module/gallery/gap-styles.js +6 -5
  355. package/build-module/gallery/gap-styles.js.map +1 -1
  356. package/build-module/gallery/index.js +5 -0
  357. package/build-module/gallery/index.js.map +1 -1
  358. package/build-module/gallery/transforms.js +20 -7
  359. package/build-module/gallery/transforms.js.map +1 -1
  360. package/build-module/gallery/utils.js +7 -6
  361. package/build-module/gallery/utils.js.map +1 -1
  362. package/build-module/group/deprecated.js +109 -12
  363. package/build-module/group/deprecated.js.map +1 -1
  364. package/build-module/group/edit.js +25 -2
  365. package/build-module/group/edit.js.map +1 -1
  366. package/build-module/group/index.js +10 -2
  367. package/build-module/group/index.js.map +1 -1
  368. package/build-module/group/variations.js +8 -8
  369. package/build-module/group/variations.js.map +1 -1
  370. package/build-module/heading/deprecated.js +5 -2
  371. package/build-module/heading/deprecated.js.map +1 -1
  372. package/build-module/heading/index.js +3 -1
  373. package/build-module/heading/index.js.map +1 -1
  374. package/build-module/heading/transforms.js +3 -1
  375. package/build-module/heading/transforms.js.map +1 -1
  376. package/build-module/home-link/edit.js +10 -6
  377. package/build-module/home-link/edit.js.map +1 -1
  378. package/build-module/home-link/index.js +14 -1
  379. package/build-module/home-link/index.js.map +1 -1
  380. package/build-module/image/edit.js +18 -4
  381. package/build-module/image/edit.js.map +1 -1
  382. package/build-module/image/index.js +13 -7
  383. package/build-module/image/index.js.map +1 -1
  384. package/build-module/image/use-client-width.js +3 -1
  385. package/build-module/image/use-client-width.js.map +1 -1
  386. package/build-module/index.js +1 -1
  387. package/build-module/index.js.map +1 -1
  388. package/build-module/index.native.js +9 -17
  389. package/build-module/index.native.js.map +1 -1
  390. package/build-module/latest-posts/deprecated.js +14 -1
  391. package/build-module/latest-posts/deprecated.js.map +1 -1
  392. package/build-module/latest-posts/index.js +14 -1
  393. package/build-module/latest-posts/index.js.map +1 -1
  394. package/build-module/list/deprecated.js +83 -1
  395. package/build-module/list/deprecated.js.map +1 -1
  396. package/build-module/list/edit.js +151 -134
  397. package/build-module/list/edit.js.map +1 -1
  398. package/build-module/list/index.js +33 -29
  399. package/build-module/list/index.js.map +1 -1
  400. package/build-module/list/save.js +2 -6
  401. package/build-module/list/save.js.map +1 -1
  402. package/build-module/list/{v2/tag-name.js → tag-name.js} +0 -0
  403. package/build-module/list/tag-name.js.map +1 -0
  404. package/build-module/list/{v2/tag-name.native.js → tag-name.native.js} +0 -0
  405. package/build-module/list/tag-name.native.js.map +1 -0
  406. package/build-module/list/transforms.js +62 -97
  407. package/build-module/list/transforms.js.map +1 -1
  408. package/build-module/list/{v2/migrate.js → utils.js} +3 -2
  409. package/build-module/list/utils.js.map +1 -0
  410. package/build-module/list-item/edit.js +4 -2
  411. package/build-module/list-item/edit.js.map +1 -1
  412. package/build-module/list-item/edit.native.js +19 -3
  413. package/build-module/list-item/edit.native.js.map +1 -1
  414. package/build-module/list-item/hooks/index.js +1 -0
  415. package/build-module/list-item/hooks/index.js.map +1 -1
  416. package/build-module/list-item/hooks/use-copy.js +34 -0
  417. package/build-module/list-item/hooks/use-copy.js.map +1 -0
  418. package/build-module/list-item/hooks/use-merge.js +0 -1
  419. package/build-module/list-item/hooks/use-merge.js.map +1 -1
  420. package/build-module/list-item/hooks/use-outdent-list-item.js +0 -1
  421. package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
  422. package/build-module/list-item/hooks/use-space.js +10 -1
  423. package/build-module/list-item/hooks/use-space.js.map +1 -1
  424. package/build-module/list-item/index.js +0 -1
  425. package/build-module/list-item/index.js.map +1 -1
  426. package/build-module/list-item/list-style-type.native.js +3 -1
  427. package/build-module/list-item/list-style-type.native.js.map +1 -1
  428. package/build-module/list-item/utils.js +4 -1
  429. package/build-module/list-item/utils.js.map +1 -1
  430. package/build-module/media-text/deprecated.js +6 -2
  431. package/build-module/media-text/deprecated.js.map +1 -1
  432. package/build-module/media-text/index.js +17 -0
  433. package/build-module/media-text/index.js.map +1 -1
  434. package/build-module/navigation/deprecated.js +7 -2
  435. package/build-module/navigation/deprecated.js.map +1 -1
  436. package/build-module/navigation/edit/index.js +125 -43
  437. package/build-module/navigation/edit/index.js.map +1 -1
  438. package/build-module/navigation/edit/responsive-wrapper.js +6 -4
  439. package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
  440. package/build-module/navigation/edit/unsaved-inner-blocks.js +7 -16
  441. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  442. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -7
  443. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  444. package/build-module/navigation/index.js +1 -0
  445. package/build-module/navigation/index.js.map +1 -1
  446. package/build-module/navigation/menu-items-to-blocks.js +1 -6
  447. package/build-module/navigation/menu-items-to-blocks.js.map +1 -1
  448. package/build-module/navigation/use-navigation-menu.js +8 -7
  449. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  450. package/build-module/navigation-link/edit.js +7 -9
  451. package/build-module/navigation-link/edit.js.map +1 -1
  452. package/build-module/navigation-submenu/edit.js +5 -7
  453. package/build-module/navigation-submenu/edit.js.map +1 -1
  454. package/build-module/page-list/edit.js +7 -2
  455. package/build-module/page-list/edit.js.map +1 -1
  456. package/build-module/paragraph/deprecated.js +18 -9
  457. package/build-module/paragraph/deprecated.js.map +1 -1
  458. package/build-module/paragraph/edit.js +1 -0
  459. package/build-module/paragraph/edit.js.map +1 -1
  460. package/build-module/paragraph/index.js +7 -0
  461. package/build-module/paragraph/index.js.map +1 -1
  462. package/build-module/paragraph/transforms.js +7 -0
  463. package/build-module/paragraph/transforms.js.map +1 -1
  464. package/build-module/post-author/index.js +4 -2
  465. package/build-module/post-author/index.js.map +1 -1
  466. package/build-module/post-author-biography/index.js +1 -0
  467. package/build-module/post-author-biography/index.js.map +1 -1
  468. package/build-module/post-author-name/index.js +5 -1
  469. package/build-module/post-author-name/index.js.map +1 -1
  470. package/build-module/post-comments-count/edit.js +10 -1
  471. package/build-module/post-comments-count/edit.js.map +1 -1
  472. package/build-module/post-comments-count/index.js +4 -1
  473. package/build-module/post-comments-count/index.js.map +1 -1
  474. package/build-module/post-comments-link/index.js +4 -2
  475. package/build-module/post-comments-link/index.js.map +1 -1
  476. package/build-module/post-date/edit.js +9 -2
  477. package/build-module/post-date/edit.js.map +1 -1
  478. package/build-module/post-date/index.js +9 -0
  479. package/build-module/post-date/index.js.map +1 -1
  480. package/build-module/post-excerpt/index.js +4 -2
  481. package/build-module/post-excerpt/index.js.map +1 -1
  482. package/build-module/post-featured-image/edit.js +28 -13
  483. package/build-module/post-featured-image/edit.js.map +1 -1
  484. package/build-module/post-featured-image/index.js +12 -0
  485. package/build-module/post-featured-image/index.js.map +1 -1
  486. package/build-module/post-navigation-link/index.js +3 -2
  487. package/build-module/post-navigation-link/index.js.map +1 -1
  488. package/build-module/post-template/edit.js +8 -4
  489. package/build-module/post-template/edit.js.map +1 -1
  490. package/build-module/post-template/index.js +14 -1
  491. package/build-module/post-template/index.js.map +1 -1
  492. package/build-module/post-terms/edit.js +0 -1
  493. package/build-module/post-terms/edit.js.map +1 -1
  494. package/build-module/post-terms/index.js +5 -3
  495. package/build-module/post-terms/index.js.map +1 -1
  496. package/build-module/post-terms/use-post-terms.js +5 -25
  497. package/build-module/post-terms/use-post-terms.js.map +1 -1
  498. package/build-module/post-title/index.js +2 -1
  499. package/build-module/post-title/index.js.map +1 -1
  500. package/build-module/preformatted/index.js +4 -2
  501. package/build-module/preformatted/index.js.map +1 -1
  502. package/build-module/pullquote/deprecated.js +134 -25
  503. package/build-module/pullquote/deprecated.js.map +1 -1
  504. package/build-module/pullquote/edit.js +1 -1
  505. package/build-module/pullquote/edit.js.map +1 -1
  506. package/build-module/pullquote/edit.native.js +0 -1
  507. package/build-module/pullquote/edit.native.js.map +1 -1
  508. package/build-module/pullquote/index.js +13 -6
  509. package/build-module/pullquote/index.js.map +1 -1
  510. package/build-module/pullquote/save.js +2 -2
  511. package/build-module/pullquote/save.js.map +1 -1
  512. package/build-module/pullquote/transforms.js +15 -34
  513. package/build-module/pullquote/transforms.js.map +1 -1
  514. package/build-module/query/deprecated.js +10 -8
  515. package/build-module/query/deprecated.js.map +1 -1
  516. package/build-module/query/edit/index.js +23 -12
  517. package/build-module/query/edit/index.js.map +1 -1
  518. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +1 -0
  519. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  520. package/build-module/query/edit/query-placeholder.js +6 -1
  521. package/build-module/query/edit/query-placeholder.js.map +1 -1
  522. package/build-module/query/utils.js +32 -7
  523. package/build-module/query/utils.js.map +1 -1
  524. package/build-module/query-no-results/edit.js +1 -1
  525. package/build-module/query-no-results/edit.js.map +1 -1
  526. package/build-module/query-no-results/index.js +13 -0
  527. package/build-module/query-no-results/index.js.map +1 -1
  528. package/build-module/query-pagination-numbers/index.js +4 -2
  529. package/build-module/query-pagination-numbers/index.js.map +1 -1
  530. package/build-module/query-title/edit.js +10 -1
  531. package/build-module/query-title/edit.js.map +1 -1
  532. package/build-module/query-title/index.js +8 -2
  533. package/build-module/query-title/index.js.map +1 -1
  534. package/build-module/quote/deprecated.js +13 -5
  535. package/build-module/quote/deprecated.js.map +1 -1
  536. package/build-module/quote/index.js +4 -2
  537. package/build-module/quote/index.js.map +1 -1
  538. package/build-module/quote/transforms.js +23 -38
  539. package/build-module/quote/transforms.js.map +1 -1
  540. package/build-module/separator/deprecated.js +3 -3
  541. package/build-module/separator/deprecated.js.map +1 -1
  542. package/build-module/separator/index.js +1 -0
  543. package/build-module/separator/index.js.map +1 -1
  544. package/build-module/social-link/icons/reddit.js +1 -1
  545. package/build-module/social-link/icons/reddit.js.map +1 -1
  546. package/build-module/social-links/edit.js +45 -12
  547. package/build-module/social-links/edit.js.map +1 -1
  548. package/build-module/social-links/index.js +9 -0
  549. package/build-module/social-links/index.js.map +1 -1
  550. package/build-module/spacer/index.js +7 -1
  551. package/build-module/spacer/index.js.map +1 -1
  552. package/build-module/table/index.js +4 -0
  553. package/build-module/table/index.js.map +1 -1
  554. package/build-module/table/state.js +10 -4
  555. package/build-module/table/state.js.map +1 -1
  556. package/build-module/table-of-contents/index.js +24 -1
  557. package/build-module/table-of-contents/index.js.map +1 -1
  558. package/build-module/tag-cloud/index.js +5 -1
  559. package/build-module/tag-cloud/index.js.map +1 -1
  560. package/build-module/template-part/index.js +2 -2
  561. package/build-module/template-part/index.js.map +1 -1
  562. package/build-module/term-description/index.js +10 -0
  563. package/build-module/term-description/index.js.map +1 -1
  564. package/build-module/text-columns/edit.js +4 -2
  565. package/build-module/text-columns/edit.js.map +1 -1
  566. package/build-module/text-columns/save.js +4 -2
  567. package/build-module/text-columns/save.js.map +1 -1
  568. package/build-module/verse/index.js +2 -0
  569. package/build-module/verse/index.js.map +1 -1
  570. package/build-module/video/index.js +4 -0
  571. package/build-module/video/index.js.map +1 -1
  572. package/build-style/audio/style-rtl.css +3 -0
  573. package/build-style/audio/style.css +3 -0
  574. package/build-style/button/style-rtl.css +7 -10
  575. package/build-style/button/style.css +7 -10
  576. package/build-style/code/editor-rtl.css +79 -0
  577. package/build-style/code/editor.css +79 -0
  578. package/build-style/cover/editor-rtl.css +0 -3
  579. package/build-style/cover/editor.css +0 -3
  580. package/build-style/editor-rtl.css +94 -146
  581. package/build-style/editor.css +94 -146
  582. package/build-style/group/editor-rtl.css +9 -10
  583. package/build-style/group/editor.css +9 -10
  584. package/build-style/image/editor-rtl.css +21 -2
  585. package/build-style/image/editor.css +21 -2
  586. package/build-style/media-text/style-rtl.css +1 -0
  587. package/build-style/media-text/style.css +1 -0
  588. package/build-style/navigation/editor-rtl.css +11 -23
  589. package/build-style/navigation/editor.css +11 -23
  590. package/build-style/navigation/style-rtl.css +10 -3
  591. package/build-style/navigation/style.css +10 -3
  592. package/build-style/paragraph/editor-rtl.css +1 -1
  593. package/build-style/paragraph/editor.css +1 -1
  594. package/build-style/post-date/style-rtl.css +79 -0
  595. package/build-style/post-date/style.css +79 -0
  596. package/build-style/post-featured-image/editor-rtl.css +45 -43
  597. package/build-style/post-featured-image/editor.css +45 -43
  598. package/build-style/post-featured-image/style-rtl.css +1 -0
  599. package/build-style/post-featured-image/style.css +1 -0
  600. package/build-style/post-title/style-rtl.css +1 -0
  601. package/build-style/post-title/style.css +1 -0
  602. package/build-style/pullquote/editor-rtl.css +0 -12
  603. package/build-style/pullquote/editor.css +0 -12
  604. package/build-style/pullquote/style-rtl.css +1 -8
  605. package/build-style/pullquote/style.css +1 -8
  606. package/build-style/query-title/style-rtl.css +79 -0
  607. package/build-style/query-title/style.css +79 -0
  608. package/build-style/site-logo/editor-rtl.css +3 -52
  609. package/build-style/site-logo/editor.css +3 -52
  610. package/build-style/social-links/style-rtl.css +2 -2
  611. package/build-style/social-links/style.css +2 -2
  612. package/build-style/style-rtl.css +37 -23
  613. package/build-style/style.css +37 -23
  614. package/build-style/video/style-rtl.css +3 -0
  615. package/build-style/video/style.css +3 -0
  616. package/package.json +30 -29
  617. package/src/archives/block.json +5 -1
  618. package/src/audio/block.json +4 -0
  619. package/src/audio/style.scss +2 -0
  620. package/src/button/block.json +1 -1
  621. package/src/button/deprecated.js +21 -22
  622. package/src/button/style.scss +7 -14
  623. package/src/calendar/index.php +2 -2
  624. package/src/categories/block.json +14 -1
  625. package/src/categories/edit.js +2 -2
  626. package/src/code/block.json +4 -2
  627. package/src/code/editor.scss +3 -0
  628. package/src/column/block.json +13 -0
  629. package/src/columns/block.json +13 -0
  630. package/src/columns/deprecated.js +10 -4
  631. package/src/columns/edit.js +7 -3
  632. package/src/columns/edit.native.js +7 -3
  633. package/src/columns/transforms.js +17 -3
  634. package/src/comment-author-name/block.json +5 -1
  635. package/src/comment-content/block.json +5 -1
  636. package/src/comment-date/block.json +1 -0
  637. package/src/comment-edit-link/block.json +5 -1
  638. package/src/comment-reply-link/block.json +5 -1
  639. package/src/comment-template/block.json +14 -1
  640. package/src/comments/block.json +13 -0
  641. package/src/comments/index.php +6 -5
  642. package/src/comments-pagination/block.json +13 -0
  643. package/src/comments-pagination-next/block.json +4 -2
  644. package/src/comments-pagination-numbers/block.json +14 -1
  645. package/src/comments-pagination-numbers/edit.js +12 -3
  646. package/src/comments-pagination-previous/block.json +4 -2
  647. package/src/comments-title/block.json +4 -2
  648. package/src/cover/block.json +13 -0
  649. package/src/cover/deprecated.js +11 -4
  650. package/src/cover/edit/block-controls.js +15 -3
  651. package/src/cover/editor.scss +0 -4
  652. package/src/cover/shared.js +2 -1
  653. package/src/editor.scss +1 -0
  654. package/src/embed/icons.js +1 -1
  655. package/src/gallery/block.json +5 -0
  656. package/src/gallery/deprecated.js +4 -2
  657. package/src/gallery/edit.js +22 -2
  658. package/src/gallery/gap-styles.js +10 -6
  659. package/src/gallery/index.php +23 -2
  660. package/src/gallery/transforms.js +18 -5
  661. package/src/gallery/utils.js +11 -7
  662. package/src/group/block.json +10 -2
  663. package/src/group/deprecated.js +89 -2
  664. package/src/group/edit.js +15 -2
  665. package/src/group/editor.scss +4 -6
  666. package/src/group/variations.js +4 -3
  667. package/src/heading/block.json +3 -1
  668. package/src/heading/deprecated.js +4 -2
  669. package/src/home-link/block.json +14 -1
  670. package/src/home-link/edit.js +19 -20
  671. package/src/image/block.json +13 -7
  672. package/src/image/edit.js +22 -4
  673. package/src/image/editor.scss +39 -3
  674. package/src/image/index.php +1 -1
  675. package/src/image/use-client-width.js +1 -1
  676. package/src/index.js +1 -4
  677. package/src/index.native.js +17 -23
  678. package/src/latest-posts/block.json +14 -1
  679. package/src/list/block.json +4 -0
  680. package/src/list/deprecated.js +71 -1
  681. package/src/list/edit.js +146 -133
  682. package/src/list/index.js +25 -24
  683. package/src/list/save.js +3 -4
  684. package/src/list/{v2/tag-name.js → tag-name.js} +0 -0
  685. package/src/list/{v2/tag-name.native.js → tag-name.native.js} +0 -0
  686. package/src/list/test/__snapshots__/edit.native.js.snap +14 -2
  687. package/src/list/test/edit.native.js +0 -154
  688. package/src/list/transforms.js +57 -111
  689. package/src/list/{v2/migrate.js → utils.js} +2 -2
  690. package/src/list-item/block.json +0 -1
  691. package/src/list-item/edit.js +2 -1
  692. package/src/list-item/edit.native.js +32 -2
  693. package/src/list-item/hooks/index.js +1 -0
  694. package/src/list-item/hooks/use-copy.js +38 -0
  695. package/src/list-item/hooks/use-space.js +10 -2
  696. package/src/list-item/list-style-type.native.js +8 -1
  697. package/src/list-item/style.native.scss +12 -0
  698. package/src/media-text/block.json +17 -0
  699. package/src/media-text/deprecated.js +3 -2
  700. package/src/media-text/style.scss +2 -0
  701. package/src/navigation/block.json +1 -0
  702. package/src/navigation/deprecated.js +4 -2
  703. package/src/navigation/edit/index.js +173 -85
  704. package/src/navigation/edit/responsive-wrapper.js +8 -3
  705. package/src/navigation/edit/unsaved-inner-blocks.js +17 -25
  706. package/src/navigation/edit/use-convert-classic-menu-to-block-menu.js +31 -37
  707. package/src/navigation/editor.scss +5 -25
  708. package/src/navigation/index.php +24 -24
  709. package/src/navigation/menu-items-to-blocks.js +3 -6
  710. package/src/navigation/style.scss +14 -4
  711. package/src/navigation/test/use-navigation-menu.js +18 -1
  712. package/src/navigation/use-navigation-menu.js +11 -8
  713. package/src/navigation-link/edit.js +9 -13
  714. package/src/navigation-submenu/edit.js +9 -13
  715. package/src/page-list/edit.js +6 -2
  716. package/src/paragraph/block.json +7 -0
  717. package/src/paragraph/deprecated.js +33 -35
  718. package/src/paragraph/edit.js +1 -0
  719. package/src/paragraph/editor.scss +5 -3
  720. package/src/post-author/block.json +4 -2
  721. package/src/post-author-biography/block.json +1 -0
  722. package/src/post-author-name/block.json +5 -1
  723. package/src/post-comments-count/block.json +4 -1
  724. package/src/post-comments-count/edit.js +10 -2
  725. package/src/post-comments-link/block.json +4 -2
  726. package/src/post-date/block.json +9 -0
  727. package/src/post-date/edit.js +12 -2
  728. package/src/post-date/index.php +10 -2
  729. package/src/post-date/style.scss +4 -0
  730. package/src/post-excerpt/block.json +4 -2
  731. package/src/post-featured-image/block.json +12 -0
  732. package/src/post-featured-image/edit.js +43 -13
  733. package/src/post-featured-image/editor.scss +44 -53
  734. package/src/post-featured-image/index.php +61 -4
  735. package/src/post-featured-image/style.scss +1 -0
  736. package/src/post-navigation-link/block.json +3 -2
  737. package/src/post-template/block.json +15 -1
  738. package/src/post-template/edit.js +6 -1
  739. package/src/post-template/index.php +7 -4
  740. package/src/post-terms/block.json +5 -3
  741. package/src/post-terms/edit.js +0 -1
  742. package/src/post-terms/use-post-terms.js +10 -15
  743. package/src/post-title/block.json +2 -1
  744. package/src/post-title/style.scss +2 -0
  745. package/src/preformatted/block.json +4 -2
  746. package/src/pullquote/block.json +11 -4
  747. package/src/pullquote/deprecated.js +490 -412
  748. package/src/pullquote/edit.js +1 -1
  749. package/src/pullquote/edit.native.js +0 -1
  750. package/src/pullquote/editor.scss +0 -16
  751. package/src/pullquote/index.js +1 -3
  752. package/src/pullquote/save.js +1 -1
  753. package/src/pullquote/style.scss +0 -11
  754. package/src/pullquote/transforms.js +17 -33
  755. package/src/query/deprecated.js +4 -9
  756. package/src/query/edit/index.js +28 -15
  757. package/src/query/edit/inspector-controls/taxonomy-controls.js +1 -1
  758. package/src/query/edit/query-placeholder.js +17 -2
  759. package/src/query/utils.js +29 -7
  760. package/src/query-no-results/block.json +13 -0
  761. package/src/query-no-results/edit.js +1 -1
  762. package/src/query-pagination-numbers/block.json +4 -2
  763. package/src/query-title/block.json +8 -2
  764. package/src/query-title/edit.js +19 -2
  765. package/src/query-title/index.php +11 -1
  766. package/src/query-title/style.scss +4 -0
  767. package/src/quote/block.json +4 -2
  768. package/src/quote/deprecated.js +6 -5
  769. package/src/quote/transforms.js +4 -18
  770. package/src/search/index.php +1 -1
  771. package/src/separator/block.json +1 -0
  772. package/src/separator/deprecated.js +2 -3
  773. package/src/site-logo/editor.scss +8 -66
  774. package/src/social-link/icons/reddit.js +1 -1
  775. package/src/social-link/index.php +1 -1
  776. package/src/social-link/socials-with-bg.scss +1 -1
  777. package/src/social-link/socials-without-bg.scss +1 -1
  778. package/src/social-links/block.json +9 -0
  779. package/src/social-links/edit.js +47 -19
  780. package/src/spacer/block.json +7 -1
  781. package/src/style.scss +2 -0
  782. package/src/table/block.json +4 -0
  783. package/src/table/state.js +21 -19
  784. package/src/table-of-contents/block.json +24 -1
  785. package/src/tag-cloud/block.json +5 -1
  786. package/src/template-part/index.js +3 -2
  787. package/src/term-description/block.json +10 -0
  788. package/src/text-columns/edit.js +2 -2
  789. package/src/text-columns/save.js +2 -2
  790. package/src/verse/block.json +2 -0
  791. package/src/video/block.json +4 -0
  792. package/src/video/style.scss +2 -0
  793. package/build/list/v2/deprecated.js +0 -117
  794. package/build/list/v2/deprecated.js.map +0 -1
  795. package/build/list/v2/edit.js +0 -200
  796. package/build/list/v2/edit.js.map +0 -1
  797. package/build/list/v2/index.js +0 -36
  798. package/build/list/v2/index.js.map +0 -1
  799. package/build/list/v2/migrate.js.map +0 -1
  800. package/build/list/v2/save.js +0 -34
  801. package/build/list/v2/save.js.map +0 -1
  802. package/build/list/v2/tag-name.js.map +0 -1
  803. package/build/list/v2/tag-name.native.js.map +0 -1
  804. package/build/list/v2/transforms.js +0 -137
  805. package/build/list/v2/transforms.js.map +0 -1
  806. package/build-module/list/v2/deprecated.js +0 -104
  807. package/build-module/list/v2/deprecated.js.map +0 -1
  808. package/build-module/list/v2/edit.js +0 -179
  809. package/build-module/list/v2/edit.js.map +0 -1
  810. package/build-module/list/v2/index.js +0 -21
  811. package/build-module/list/v2/index.js.map +0 -1
  812. package/build-module/list/v2/migrate.js.map +0 -1
  813. package/build-module/list/v2/save.js +0 -23
  814. package/build-module/list/v2/save.js.map +0 -1
  815. package/build-module/list/v2/tag-name.js.map +0 -1
  816. package/build-module/list/v2/tag-name.native.js.map +0 -1
  817. package/build-module/list/v2/transforms.js +0 -127
  818. package/build-module/list/v2/transforms.js.map +0 -1
  819. package/src/list/test/migrate.js +0 -158
  820. package/src/list/v2/deprecated.js +0 -89
  821. package/src/list/v2/edit.js +0 -192
  822. package/src/list/v2/index.js +0 -22
  823. package/src/list/v2/save.js +0 -18
  824. package/src/list/v2/transforms.js +0 -120
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/social-links/edit.js"],"names":["ALLOWED_BLOCKS","sizeOptions","name","value","getDefaultBlockLayout","blockTypeOrName","layoutBlockSupportConfig","default","SocialLinksEdit","props","attributes","iconBackgroundColor","iconColor","isSelected","setAttributes","setIconBackgroundColor","setIconColor","iconBackgroundColorValue","customIconBackgroundColor","iconColorValue","openInNewTab","showLabels","size","layout","usedLayout","logosOnly","className","includes","backgroundBackup","current","undefined","SocialPlaceholder","SelectedSocialPlaceholder","color","blockProps","innerBlocksProps","allowedBlocks","placeholder","templateLock","__experimentalAppenderTagName","__experimentalLayout","POPOVER_PROPS","position","colorSettings","onChange","colorValue","label","push","onClose","map","entry","check","textColor","backgroundColor","iconColorAttributes"],"mappings":";;;;;;;;;;AASA;;AANA;;AAKA;;AAEA;;AASA;;AAOA;;AACA;;AA3BA;AACA;AACA;;AAGA;AACA;AACA;AAsBA,MAAMA,cAAc,GAAG,CAAE,kBAAF,CAAvB;AAEA,MAAMC,WAAW,GAAG,CACnB;AAAEC,EAAAA,IAAI,EAAE,cAAI,OAAJ,CAAR;AAAuBC,EAAAA,KAAK,EAAE;AAA9B,CADmB,EAEnB;AAAED,EAAAA,IAAI,EAAE,cAAI,QAAJ,CAAR;AAAwBC,EAAAA,KAAK,EAAE;AAA/B,CAFmB,EAGnB;AAAED,EAAAA,IAAI,EAAE,cAAI,OAAJ,CAAR;AAAuBC,EAAAA,KAAK,EAAE;AAA9B,CAHmB,EAInB;AAAED,EAAAA,IAAI,EAAE,cAAI,MAAJ,CAAR;AAAsBC,EAAAA,KAAK,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GA,SAdF;AAeC,QAAA,OAAO,EAAG6C,OAfX;AAgBC,QAAA,IAAI,EAAC;AAhBN,SAkBGE,KAAK,CAAChD,IAlBT,CADD;AAsBA,KAvBC,CADH,CADC;AAAA,GANH,CADD,CADD,EAsCC,4BAAC,8BAAD,QACC,4BAAC,qBAAD;AAAW,IAAA,KAAK,EAAG,cAAI,eAAJ;AAAnB,KACC,4BAAC,yBAAD;AACC,IAAA,KAAK,EAAG,cAAI,uBAAJ,CADT;AAEC,IAAA,OAAO,EAAGkB,YAFX;AAGC,IAAA,QAAQ,EAAG,MACVN,aAAa,CAAE;AAAEM,MAAAA,YAAY,EAAE,CAAEA;AAAlB,KAAF;AAJf,IADD,EAQC,4BAAC,yBAAD;AACC,IAAA,KAAK,EAAG,cAAI,aAAJ,CADT;AAEC,IAAA,OAAO,EAAGC,UAFX;AAGC,IAAA,QAAQ,EAAG,MACVP,aAAa,CAAE;AAAEO,MAAAA,UAAU,EAAE,CAAEA;AAAhB,KAAF;AAJf,IARD,CADD,EAiBC,4BAAC,+BAAD;AACC,IAAA,gCAAgC,MADjC;AAEC,IAAA,iCAAiC,MAFlC;AAGC,IAAA,KAAK,EAAG,cAAI,OAAJ,CAHT;AAIC,IAAA,aAAa,EAAGsB;AAJjB,KAMG,CAAElB,SAAF,IACD,4BAAC,4BAAD;AAEE2B,IAAAA,SAAS,EAAEjC,cAFb;AAGEkC,IAAAA,eAAe,EAAEpC,wBAHnB;AAKC,IAAA,WAAW,EAAG;AALf,IAPF,CAjBD,CAtCD,EAwEC,kCAASkB,gBAAT,CAxED,CADD;AA4EA;;AAED,MAAMmB,mBAAmB,GAAG;AAC3B1C,EAAAA,SAAS,EAAE,YADgB;AAE3BD,EAAAA,mBAAmB,EAAE;AAFM,CAA5B;;eAKe,6BAAY2C,mBAAZ,EAAmC9C,eAAnC,C","sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { getBlockSupport } from '@wordpress/blocks';\nimport { Fragment, useEffect, useRef } from '@wordpress/element';\nimport {\n\tBlockControls,\n\tuseInnerBlocksProps,\n\tuseBlockProps,\n\tInspectorControls,\n\tContrastChecker,\n\tPanelColorSettings,\n\twithColors,\n} from '@wordpress/block-editor';\nimport {\n\tMenuGroup,\n\tMenuItem,\n\tPanelBody,\n\tToggleControl,\n\tToolbarDropdownMenu,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { check } from '@wordpress/icons';\n\nconst ALLOWED_BLOCKS = [ 'core/social-link' ];\n\nconst sizeOptions = [\n\t{ name: __( 'Small' ), value: 'has-small-icon-size' },\n\t{ name: __( 'Normal' ), value: 'has-normal-icon-size' },\n\t{ name: __( 'Large' ), value: 'has-large-icon-size' },\n\t{ name: __( 'Huge' ), value: 'has-huge-icon-size' },\n];\n\nconst getDefaultBlockLayout = ( blockTypeOrName ) => {\n\tconst layoutBlockSupportConfig = getBlockSupport(\n\t\tblockTypeOrName,\n\t\t'__experimentalLayout'\n\t);\n\treturn layoutBlockSupportConfig?.default;\n};\n\nexport function SocialLinksEdit( props ) {\n\tconst {\n\t\tname,\n\t\tattributes,\n\t\ticonBackgroundColor,\n\t\ticonColor,\n\t\tisSelected,\n\t\tsetAttributes,\n\t\tsetIconBackgroundColor,\n\t\tsetIconColor,\n\t} = props;\n\n\tconst {\n\t\ticonBackgroundColorValue,\n\t\tcustomIconBackgroundColor,\n\t\ticonColorValue,\n\t\topenInNewTab,\n\t\tshowLabels,\n\t\tsize,\n\t\tlayout,\n\t} = attributes;\n\tconst usedLayout = layout || getDefaultBlockLayout( name );\n\n\tconst logosOnly = attributes.className?.includes( 'is-style-logos-only' );\n\n\t// Remove icon background color when logos only style is selected or\n\t// restore it when any other style is selected.\n\tconst backgroundBackup = useRef( {} );\n\tuseEffect( () => {\n\t\tif ( logosOnly ) {\n\t\t\tbackgroundBackup.current = {\n\t\t\t\ticonBackgroundColor,\n\t\t\t\ticonBackgroundColorValue,\n\t\t\t\tcustomIconBackgroundColor,\n\t\t\t};\n\t\t\tsetAttributes( {\n\t\t\t\ticonBackgroundColor: undefined,\n\t\t\t\tcustomIconBackgroundColor: undefined,\n\t\t\t\ticonBackgroundColorValue: undefined,\n\t\t\t} );\n\t\t} else {\n\t\t\tsetAttributes( { ...backgroundBackup.current } );\n\t\t}\n\t}, [ logosOnly ] );\n\n\tconst SocialPlaceholder = (\n\t\t<li className=\"wp-block-social-links__social-placeholder\">\n\t\t\t<div className=\"wp-block-social-links__social-placeholder-icons\">\n\t\t\t\t<div className=\"wp-social-link wp-social-link-twitter\"></div>\n\t\t\t\t<div className=\"wp-social-link wp-social-link-facebook\"></div>\n\t\t\t\t<div className=\"wp-social-link wp-social-link-instagram\"></div>\n\t\t\t</div>\n\t\t</li>\n\t);\n\n\tconst SelectedSocialPlaceholder = (\n\t\t<li className=\"wp-block-social-links__social-prompt\">\n\t\t\t{ __( 'Click plus to add' ) }\n\t\t</li>\n\t);\n\n\t// Fallback color values are used maintain selections in case switching\n\t// themes and named colors in palette do not match.\n\tconst className = classNames( size, {\n\t\t'has-visible-labels': showLabels,\n\t\t'has-icon-color': iconColor.color || iconColorValue,\n\t\t'has-icon-background-color':\n\t\t\ticonBackgroundColor.color || iconBackgroundColorValue,\n\t} );\n\n\tconst blockProps = useBlockProps( { className } );\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\tallowedBlocks: ALLOWED_BLOCKS,\n\t\tplaceholder: isSelected ? SelectedSocialPlaceholder : SocialPlaceholder,\n\t\ttemplateLock: false,\n\t\t__experimentalAppenderTagName: 'li',\n\t\t__experimentalLayout: usedLayout,\n\t} );\n\n\tconst POPOVER_PROPS = {\n\t\tposition: 'bottom right',\n\t};\n\n\tconst colorSettings = [\n\t\t{\n\t\t\t// Use custom attribute as fallback to prevent loss of named color selection when\n\t\t\t// switching themes to a new theme that does not have a matching named color.\n\t\t\tvalue: iconColor.color || iconColorValue,\n\t\t\tonChange: ( colorValue ) => {\n\t\t\t\tsetIconColor( colorValue );\n\t\t\t\tsetAttributes( { iconColorValue: colorValue } );\n\t\t\t},\n\t\t\tlabel: __( 'Icon color' ),\n\t\t},\n\t];\n\n\tif ( ! logosOnly ) {\n\t\tcolorSettings.push( {\n\t\t\t// Use custom attribute as fallback to prevent loss of named color selection when\n\t\t\t// switching themes to a new theme that does not have a matching named color.\n\t\t\tvalue: iconBackgroundColor.color || iconBackgroundColorValue,\n\t\t\tonChange: ( colorValue ) => {\n\t\t\t\tsetIconBackgroundColor( colorValue );\n\t\t\t\tsetAttributes( {\n\t\t\t\t\ticonBackgroundColorValue: colorValue,\n\t\t\t\t} );\n\t\t\t},\n\t\t\tlabel: __( 'Icon background' ),\n\t\t} );\n\t}\n\n\treturn (\n\t\t<Fragment>\n\t\t\t<BlockControls group=\"other\">\n\t\t\t\t<ToolbarDropdownMenu\n\t\t\t\t\tlabel={ __( 'Size' ) }\n\t\t\t\t\ttext={ __( 'Size' ) }\n\t\t\t\t\ticon={ null }\n\t\t\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\t\t>\n\t\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ sizeOptions.map( ( entry ) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\t( size === entry.value ||\n\t\t\t\t\t\t\t\t\t\t\t\t( ! size &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tentry.value ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'has-normal-icon-size' ) ) &&\n\t\t\t\t\t\t\t\t\t\t\tcheck\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tisSelected={ size === entry.value }\n\t\t\t\t\t\t\t\t\t\tkey={ entry.value }\n\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\t\t\tsize: entry.value,\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\tonClose={ onClose }\n\t\t\t\t\t\t\t\t\t\trole=\"menuitemradio\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ entry.name }\n\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t) }\n\t\t\t\t</ToolbarDropdownMenu>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Link settings' ) }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Open links in new tab' ) }\n\t\t\t\t\t\tchecked={ openInNewTab }\n\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\tsetAttributes( { openInNewTab: ! openInNewTab } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Show labels' ) }\n\t\t\t\t\t\tchecked={ showLabels }\n\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\tsetAttributes( { showLabels: ! showLabels } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t\t<PanelColorSettings\n\t\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\ttitle={ __( 'Color' ) }\n\t\t\t\t\tcolorSettings={ colorSettings }\n\t\t\t\t>\n\t\t\t\t\t{ ! logosOnly && (\n\t\t\t\t\t\t<ContrastChecker\n\t\t\t\t\t\t\t{ ...{\n\t\t\t\t\t\t\t\ttextColor: iconColorValue,\n\t\t\t\t\t\t\t\tbackgroundColor: iconBackgroundColorValue,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tisLargeText={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PanelColorSettings>\n\t\t\t</InspectorControls>\n\t\t\t<ul { ...innerBlocksProps } />\n\t\t</Fragment>\n\t);\n}\n\nconst iconColorAttributes = {\n\ticonColor: 'icon-color',\n\ticonBackgroundColor: 'icon-background-color',\n};\n\nexport default withColors( iconColorAttributes )( SocialLinksEdit );\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/social-links/edit.js"],"names":["ALLOWED_BLOCKS","sizeOptions","name","value","getDefaultBlockLayout","blockTypeOrName","layoutBlockSupportConfig","default","SocialLinksEdit","props","clientId","attributes","iconBackgroundColor","iconColor","isSelected","setAttributes","setIconBackgroundColor","setIconColor","iconBackgroundColorValue","customIconBackgroundColor","iconColorValue","openInNewTab","showLabels","size","layout","usedLayout","logosOnly","className","includes","backgroundBackup","current","undefined","SocialPlaceholder","SelectedSocialPlaceholder","color","blockProps","innerBlocksProps","allowedBlocks","placeholder","templateLock","__experimentalAppenderTagName","__experimentalLayout","POPOVER_PROPS","position","colorSettings","onChange","colorValue","label","resetAllFilter","push","colorGradientSettings","onClose","map","entry","check","onColorChange","isShownByDefault","enableAlpha","textColor","backgroundColor","iconColorAttributes"],"mappings":";;;;;;;;;;AASA;;;;AANA;;AAKA;;AAEA;;AAUA;;AAOA;;AACA;;AA5BA;AACA;AACA;;AAGA;AACA;AACA;AAuBA,MAAMA,cAAc,GAAG,CAAE,kBAAF,CAAvB;AAEA,MAAMC,WAAW,GAAG,CACnB;AAAEC,EAAAA,IAAI,EAAE,cAAI,OAAJ,CAAR;AAAuBC,EAAAA,KAAK,EAAE;AAA9B,CADmB,EAEnB;AAAED,EAAAA,IAAI,EAAE,cAAI,QAAJ,CAAR;AAAwBC,EAAAA,KAAK,EAAE;AAA/B,CAFmB,EAGnB;AAAED,EAAAA,IAAI,EAAE,cAAI,OAAJ,CAAR;AAAuBC,EAAAA,KAAK,EAAE;AA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C,MAAAA,KAAnB;AAA0B6C,MAAAA;AAA1B,KAAF;AAAA,WACC,4BAAC,wDAAD;AACC,MAAA,GAAG,EAAI,sBAAsBD,KAAO,EADrC;AAEC,MAAA,gCAAgC,MAFjC;AAGC,MAAA,iCAAiC,MAHlC;AAIC,MAAA,QAAQ,EAAG,CACV;AACCD,QAAAA,UAAU,EAAE3C,KADb;AAEC4C,QAAAA,KAFD;AAGCQ,QAAAA,aAAa,EAAEV,QAHhB;AAICW,QAAAA,gBAAgB,EAAE,IAJnB;AAKCR,QAAAA,cALD;AAMCS,QAAAA,WAAW,EAAE;AANd,OADU,CAJZ;AAcC,MAAA,OAAO,EAAG/C;AAdX,OAeMwC,qBAfN,EADD;AAAA,GADC,CADH,EAsBG,CAAExB,SAAF,IACD,4BAAC,4BAAD;AAEEgC,IAAAA,SAAS,EAAEtC,cAFb;AAGEuC,IAAAA,eAAe,EAAEzC,wBAHnB;AAKC,IAAA,WAAW,EAAG;AALf,IAvBF,CAxDD,EAwFC,kCAASkB,gBAAT,CAxFD,CADD;AA4FA;;AAED,MAAMwB,mBAAmB,GAAG;AAC3B/C,EAAAA,SAAS,EAAE,YADgB;AAE3BD,EAAAA,mBAAmB,EAAE;AAFM,CAA5B;;eAKe,6BAAYgD,mBAAZ,EAAmCpD,eAAnC,C","sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { getBlockSupport } from '@wordpress/blocks';\nimport { useEffect, useRef } from '@wordpress/element';\nimport {\n\tBlockControls,\n\tuseInnerBlocksProps,\n\tuseBlockProps,\n\tInspectorControls,\n\tContrastChecker,\n\twithColors,\n\t__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n} from '@wordpress/block-editor';\nimport {\n\tMenuGroup,\n\tMenuItem,\n\tPanelBody,\n\tToggleControl,\n\tToolbarDropdownMenu,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { check } from '@wordpress/icons';\n\nconst ALLOWED_BLOCKS = [ 'core/social-link' ];\n\nconst sizeOptions = [\n\t{ name: __( 'Small' ), value: 'has-small-icon-size' },\n\t{ name: __( 'Normal' ), value: 'has-normal-icon-size' },\n\t{ name: __( 'Large' ), value: 'has-large-icon-size' },\n\t{ name: __( 'Huge' ), value: 'has-huge-icon-size' },\n];\n\nconst getDefaultBlockLayout = ( blockTypeOrName ) => {\n\tconst layoutBlockSupportConfig = getBlockSupport(\n\t\tblockTypeOrName,\n\t\t'__experimentalLayout'\n\t);\n\treturn layoutBlockSupportConfig?.default;\n};\n\nexport function SocialLinksEdit( props ) {\n\tconst {\n\t\tclientId,\n\t\tname,\n\t\tattributes,\n\t\ticonBackgroundColor,\n\t\ticonColor,\n\t\tisSelected,\n\t\tsetAttributes,\n\t\tsetIconBackgroundColor,\n\t\tsetIconColor,\n\t} = props;\n\n\tconst {\n\t\ticonBackgroundColorValue,\n\t\tcustomIconBackgroundColor,\n\t\ticonColorValue,\n\t\topenInNewTab,\n\t\tshowLabels,\n\t\tsize,\n\t\tlayout,\n\t} = attributes;\n\tconst usedLayout = layout || getDefaultBlockLayout( name );\n\n\tconst logosOnly = attributes.className?.includes( 'is-style-logos-only' );\n\n\t// Remove icon background color when logos only style is selected or\n\t// restore it when any other style is selected.\n\tconst backgroundBackup = useRef( {} );\n\tuseEffect( () => {\n\t\tif ( logosOnly ) {\n\t\t\tbackgroundBackup.current = {\n\t\t\t\ticonBackgroundColor,\n\t\t\t\ticonBackgroundColorValue,\n\t\t\t\tcustomIconBackgroundColor,\n\t\t\t};\n\t\t\tsetAttributes( {\n\t\t\t\ticonBackgroundColor: undefined,\n\t\t\t\tcustomIconBackgroundColor: undefined,\n\t\t\t\ticonBackgroundColorValue: undefined,\n\t\t\t} );\n\t\t} else {\n\t\t\tsetAttributes( { ...backgroundBackup.current } );\n\t\t}\n\t}, [ logosOnly ] );\n\n\tconst SocialPlaceholder = (\n\t\t<li className=\"wp-block-social-links__social-placeholder\">\n\t\t\t<div className=\"wp-block-social-links__social-placeholder-icons\">\n\t\t\t\t<div className=\"wp-social-link wp-social-link-twitter\"></div>\n\t\t\t\t<div className=\"wp-social-link wp-social-link-facebook\"></div>\n\t\t\t\t<div className=\"wp-social-link wp-social-link-instagram\"></div>\n\t\t\t</div>\n\t\t</li>\n\t);\n\n\tconst SelectedSocialPlaceholder = (\n\t\t<li className=\"wp-block-social-links__social-prompt\">\n\t\t\t{ __( 'Click plus to add' ) }\n\t\t</li>\n\t);\n\n\t// Fallback color values are used maintain selections in case switching\n\t// themes and named colors in palette do not match.\n\tconst className = classNames( size, {\n\t\t'has-visible-labels': showLabels,\n\t\t'has-icon-color': iconColor.color || iconColorValue,\n\t\t'has-icon-background-color':\n\t\t\ticonBackgroundColor.color || iconBackgroundColorValue,\n\t} );\n\n\tconst blockProps = useBlockProps( { className } );\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\tallowedBlocks: ALLOWED_BLOCKS,\n\t\tplaceholder: isSelected ? SelectedSocialPlaceholder : SocialPlaceholder,\n\t\ttemplateLock: false,\n\t\t__experimentalAppenderTagName: 'li',\n\t\t__experimentalLayout: usedLayout,\n\t} );\n\n\tconst POPOVER_PROPS = {\n\t\tposition: 'bottom right',\n\t};\n\n\tconst colorSettings = [\n\t\t{\n\t\t\t// Use custom attribute as fallback to prevent loss of named color selection when\n\t\t\t// switching themes to a new theme that does not have a matching named color.\n\t\t\tvalue: iconColor.color || iconColorValue,\n\t\t\tonChange: ( colorValue ) => {\n\t\t\t\tsetIconColor( colorValue );\n\t\t\t\tsetAttributes( { iconColorValue: colorValue } );\n\t\t\t},\n\t\t\tlabel: __( 'Icon color' ),\n\t\t\tresetAllFilter: () => {\n\t\t\t\tsetIconColor( undefined );\n\t\t\t\tsetAttributes( { iconColorValue: undefined } );\n\t\t\t},\n\t\t},\n\t];\n\n\tif ( ! logosOnly ) {\n\t\tcolorSettings.push( {\n\t\t\t// Use custom attribute as fallback to prevent loss of named color selection when\n\t\t\t// switching themes to a new theme that does not have a matching named color.\n\t\t\tvalue: iconBackgroundColor.color || iconBackgroundColorValue,\n\t\t\tonChange: ( colorValue ) => {\n\t\t\t\tsetIconBackgroundColor( colorValue );\n\t\t\t\tsetAttributes( {\n\t\t\t\t\ticonBackgroundColorValue: colorValue,\n\t\t\t\t} );\n\t\t\t},\n\t\t\tlabel: __( 'Icon background' ),\n\t\t\tresetAllFilter: () => {\n\t\t\t\tsetIconBackgroundColor( undefined );\n\t\t\t\tsetAttributes( { iconBackgroundColorValue: undefined } );\n\t\t\t},\n\t\t} );\n\t}\n\n\tconst colorGradientSettings = useMultipleOriginColorsAndGradients();\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"other\">\n\t\t\t\t<ToolbarDropdownMenu\n\t\t\t\t\tlabel={ __( 'Size' ) }\n\t\t\t\t\ttext={ __( 'Size' ) }\n\t\t\t\t\ticon={ null }\n\t\t\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\t\t>\n\t\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ sizeOptions.map( ( entry ) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\t( size === entry.value ||\n\t\t\t\t\t\t\t\t\t\t\t\t( ! size &&\n\t\t\t\t\t\t\t\t\t\t\t\t\tentry.value ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'has-normal-icon-size' ) ) &&\n\t\t\t\t\t\t\t\t\t\t\tcheck\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tisSelected={ size === entry.value }\n\t\t\t\t\t\t\t\t\t\tkey={ entry.value }\n\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\t\t\tsize: entry.value,\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\tonClose={ onClose }\n\t\t\t\t\t\t\t\t\t\trole=\"menuitemradio\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ entry.name }\n\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t) }\n\t\t\t\t</ToolbarDropdownMenu>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Link settings' ) }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Open links in new tab' ) }\n\t\t\t\t\t\tchecked={ openInNewTab }\n\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\tsetAttributes( { openInNewTab: ! openInNewTab } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Show labels' ) }\n\t\t\t\t\t\tchecked={ showLabels }\n\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\tsetAttributes( { showLabels: ! showLabels } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls __experimentalGroup=\"color\">\n\t\t\t\t{ colorSettings.map(\n\t\t\t\t\t( { onChange, label, value, resetAllFilter } ) => (\n\t\t\t\t\t\t<ColorGradientSettingsDropdown\n\t\t\t\t\t\t\tkey={ `social-links-color-${ label }` }\n\t\t\t\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t\tsettings={ [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcolorValue: value,\n\t\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t\t\tonColorChange: onChange,\n\t\t\t\t\t\t\t\t\tisShownByDefault: true,\n\t\t\t\t\t\t\t\t\tresetAllFilter,\n\t\t\t\t\t\t\t\t\tenableAlpha: true,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t\t\t{ ...colorGradientSettings }\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t) }\n\t\t\t\t{ ! logosOnly && (\n\t\t\t\t\t<ContrastChecker\n\t\t\t\t\t\t{ ...{\n\t\t\t\t\t\t\ttextColor: iconColorValue,\n\t\t\t\t\t\t\tbackgroundColor: iconBackgroundColorValue,\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisLargeText={ false }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</InspectorControls>\n\t\t\t<ul { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n\nconst iconColorAttributes = {\n\ticonColor: 'icon-color',\n\ticonBackgroundColor: 'icon-background-color',\n};\n\nexport default withColors( iconColorAttributes )( SocialLinksEdit );\n"]}
@@ -80,6 +80,15 @@ const metadata = {
80
80
  type: "flex"
81
81
  }
82
82
  },
83
+ color: {
84
+ enableContrastChecker: false,
85
+ background: true,
86
+ gradients: true,
87
+ text: false,
88
+ __experimentalDefaultControls: {
89
+ background: false
90
+ }
91
+ },
83
92
  spacing: {
84
93
  blockGap: ["horizontal", "vertical"],
85
94
  margin: ["top", "bottom"],
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/social-links/index.js"],"names":["name","metadata","settings","example","innerBlocks","attributes","service","url","icon","edit","save","deprecated"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AAEA;;AAXA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,OAAO,EAAE;AACRC,IAAAA,WAAW,EAAE,CACZ;AACCJ,MAAAA,IAAI,EAAE,kBADP;AAECK,MAAAA,UAAU,EAAE;AACXC,QAAAA,OAAO,EAAE,WADE;AAEXC,QAAAA,GAAG,EAAE;AAFM;AAFb,KADY,EAQZ;AACCP,MAAAA,IAAI,EAAE,kBADP;AAECK,MAAAA,UAAU,EAAE;AACXC,QAAAA,OAAO,EAAE,UADE;AAEXC,QAAAA,GAAG,EAAE;AAFM;AAFb,KARY,EAeZ;AACCP,MAAAA,IAAI,EAAE,kBADP;AAECK,MAAAA,UAAU,EAAE;AACXC,QAAAA,OAAO,EAAE,SADE;AAEXC,QAAAA,GAAG,EAAE;AAFM;AAFb,KAfY;AADL,GADc;AA0BvBC,EAAAA,IAAI,EAAJA,YA1BuB;AA2BvBC,EAAAA,IAAI,EAAJA,aA3BuB;AA4BvBC,EAAAA,IAAI,EAAJA,aA5BuB;AA6BvBC,EAAAA,UAAU,EAAVA;AA7BuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { share as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\texample: {\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/social-link',\n\t\t\t\tattributes: {\n\t\t\t\t\tservice: 'wordpress',\n\t\t\t\t\turl: 'https://wordpress.org',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/social-link',\n\t\t\t\tattributes: {\n\t\t\t\t\tservice: 'facebook',\n\t\t\t\t\turl: 'https://www.facebook.com/WordPress/',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/social-link',\n\t\t\t\tattributes: {\n\t\t\t\t\tservice: 'twitter',\n\t\t\t\t\turl: 'https://twitter.com/WordPress',\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\ticon,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/social-links/index.js"],"names":["name","metadata","settings","example","innerBlocks","attributes","service","url","icon","edit","save","deprecated"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AAEA;;AAXA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,OAAO,EAAE;AACRC,IAAAA,WAAW,EAAE,CACZ;AACCJ,MAAAA,IAAI,EAAE,kBADP;AAECK,MAAAA,UAAU,EAAE;AACXC,QAAAA,OAAO,EAAE,WADE;AAEXC,QAAAA,GAAG,EAAE;AAFM;AAFb,KADY,EAQZ;AACCP,MAAAA,IAAI,EAAE,kBADP;AAECK,MAAAA,UAAU,EAAE;AACXC,QAAAA,OAAO,EAAE,UADE;AAEXC,QAAAA,GAAG,EAAE;AAFM;AAFb,KARY,EAeZ;AACCP,MAAAA,IAAI,EAAE,kBADP;AAECK,MAAAA,UAAU,EAAE;AACXC,QAAAA,OAAO,EAAE,SADE;AAEXC,QAAAA,GAAG,EAAE;AAFM;AAFb,KAfY;AADL,GADc;AA0BvBC,EAAAA,IAAI,EAAJA,YA1BuB;AA2BvBC,EAAAA,IAAI,EAAJA,aA3BuB;AA4BvBC,EAAAA,IAAI,EAAJA,aA5BuB;AA6BvBC,EAAAA,UAAU,EAAVA;AA7BuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { share as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\texample: {\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/social-link',\n\t\t\t\tattributes: {\n\t\t\t\t\tservice: 'wordpress',\n\t\t\t\t\turl: 'https://wordpress.org',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/social-link',\n\t\t\t\tattributes: {\n\t\t\t\t\tservice: 'facebook',\n\t\t\t\t\turl: 'https://www.facebook.com/WordPress/',\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/social-link',\n\t\t\t\tattributes: {\n\t\t\t\t\tservice: 'twitter',\n\t\t\t\t\turl: 'https://twitter.com/WordPress',\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\ticon,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n"]}
@@ -41,7 +41,13 @@ const metadata = {
41
41
  },
42
42
  usesContext: ["orientation"],
43
43
  supports: {
44
- anchor: true
44
+ anchor: true,
45
+ spacing: {
46
+ margin: ["top", "bottom"],
47
+ __experimentalDefaultControls: {
48
+ margin: true
49
+ }
50
+ }
45
51
  },
46
52
  editorStyle: "wp-block-spacer-editor",
47
53
  style: "wp-block-spacer"
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/spacer/index.js"],"names":["name","metadata","settings","icon","edit","save","deprecated"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AAEA;;AAXA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,qBADuB;AAEvBC,EAAAA,IAAI,EAAJA,aAFuB;AAGvBC,EAAAA,IAAI,EAAJA,aAHuB;AAIvBC,EAAAA,UAAU,EAAVA;AAJuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { resizeCornerNE as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/spacer/index.js"],"names":["name","metadata","settings","icon","edit","save","deprecated"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AAEA;;AAXA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,qBADuB;AAEvBC,EAAAA,IAAI,EAAJA,aAFuB;AAGvBC,EAAAA,IAAI,EAAJA,aAHuB;AAIvBC,EAAAA,UAAU,EAAVA;AAJuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { resizeCornerNE as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n"]}
@@ -162,6 +162,10 @@ const metadata = {
162
162
  text: true
163
163
  }
164
164
  },
165
+ spacing: {
166
+ margin: true,
167
+ padding: true
168
+ },
165
169
  typography: {
166
170
  fontSize: true,
167
171
  lineHeight: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/table/index.js"],"names":["name","metadata","settings","icon","example","attributes","head","cells","content","tag","body","transforms","edit","save","deprecated"],"mappings":";;;;;;;;;AAGA;;AACA;;AAK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ACCD,UAAAA,OAAO,EAAE,cAAI,mBAAJ,CADV;AAECC,UAAAA,GAAG,EAAE;AAFN,SATM;AADR,OAjBK,EAiCL;AACCF,QAAAA,KAAK,EAAE,CACN;AACCC,UAAAA,OAAO,EAAE,KADV;AAECC,UAAAA,GAAG,EAAE;AAFN,SADM,EAKN;AACCD,UAAAA,OAAO,EAAE,aADV;AAECC,UAAAA,GAAG,EAAE;AAFN,SALM,EASN;AACCD,UAAAA,OAAO,EAAE,cAAI,kBAAJ,CADV;AAECC,UAAAA,GAAG,EAAE;AAFN,SATM;AADR,OAjCK;AAnBK;AADJ,GAFc;AA0EvBE,EAAAA,UAAU,EAAVA,mBA1EuB;AA2EvBC,EAAAA,IAAI,EAAJA,aA3EuB;AA4EvBC,EAAAA,IAAI,EAAJA,aA5EuB;AA6EvBC,EAAAA,UAAU,EAAVA;AA7EuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { blockTable as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\thead: [\n\t\t\t\t{\n\t\t\t\t\tcells: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: __( 'Version' ),\n\t\t\t\t\t\t\ttag: 'th',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: __( 'Jazz Musician' ),\n\t\t\t\t\t\t\ttag: 'th',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: __( 'Release Date' ),\n\t\t\t\t\t\t\ttag: 'th',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t\tbody: [\n\t\t\t\t{\n\t\t\t\t\tcells: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: '5.2',\n\t\t\t\t\t\t\ttag: 'td',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: 'Jaco Pastorius',\n\t\t\t\t\t\t\ttag: 'td',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: __( 'May 7, 2019' ),\n\t\t\t\t\t\t\ttag: 'td',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcells: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: '5.1',\n\t\t\t\t\t\t\ttag: 'td',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: 'Betty Carter',\n\t\t\t\t\t\t\ttag: 'td',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: __( 'February 21, 2019' ),\n\t\t\t\t\t\t\ttag: 'td',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcells: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: '5.0',\n\t\t\t\t\t\t\ttag: 'td',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: 'Bebo Valdés',\n\t\t\t\t\t\t\ttag: 'td',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: __( 'December 6, 2018' ),\n\t\t\t\t\t\t\ttag: 'td',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/table/index.js"],"names":["name","metadata","settings","icon","example","attributes","head","cells","content","tag","body","transforms","edit","save","deprecated"],"m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UAAAA,GAAG,EAAE;AAFN,SALM,EASN;AACCD,UAAAA,OAAO,EAAE,cAAI,mBAAJ,CADV;AAECC,UAAAA,GAAG,EAAE;AAFN,SATM;AADR,OAjBK,EAiCL;AACCF,QAAAA,KAAK,EAAE,CACN;AACCC,UAAAA,OAAO,EAAE,KADV;AAECC,UAAAA,GAAG,EAAE;AAFN,SADM,EAKN;AACCD,UAAAA,OAAO,EAAE,aADV;AAECC,UAAAA,GAAG,EAAE;AAFN,SALM,EASN;AACCD,UAAAA,OAAO,EAAE,cAAI,kBAAJ,CADV;AAECC,UAAAA,GAAG,EAAE;AAFN,SATM;AADR,OAjCK;AAnBK;AADJ,GAFc;AA0EvBE,EAAAA,UAAU,EAAVA,mBA1EuB;AA2EvBC,EAAAA,IAAI,EAAJA,aA3EuB;AA4EvBC,EAAAA,IAAI,EAAJA,aA5EuB;AA6EvBC,EAAAA,UAAU,EAAVA;AA7EuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { blockTable as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\thead: [\n\t\t\t\t{\n\t\t\t\t\tcells: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: __( 'Version' ),\n\t\t\t\t\t\t\ttag: 'th',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: __( 'Jazz Musician' ),\n\t\t\t\t\t\t\ttag: 'th',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: __( 'Release Date' ),\n\t\t\t\t\t\t\ttag: 'th',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t\tbody: [\n\t\t\t\t{\n\t\t\t\t\tcells: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: '5.2',\n\t\t\t\t\t\t\ttag: 'td',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: 'Jaco Pastorius',\n\t\t\t\t\t\t\ttag: 'td',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: __( 'May 7, 2019' ),\n\t\t\t\t\t\t\ttag: 'td',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcells: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: '5.1',\n\t\t\t\t\t\t\ttag: 'td',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: 'Betty Carter',\n\t\t\t\t\t\t\ttag: 'td',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: __( 'February 21, 2019' ),\n\t\t\t\t\t\t\ttag: 'td',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcells: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: '5.0',\n\t\t\t\t\t\t\ttag: 'td',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: 'Bebo Valdés',\n\t\t\t\t\t\t\ttag: 'td',\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontent: __( 'December 6, 2018' ),\n\t\t\t\t\t\t\ttag: 'td',\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n"]}
@@ -38,8 +38,12 @@ function createTable(_ref) {
38
38
  columnCount
39
39
  } = _ref;
40
40
  return {
41
- body: (0, _lodash.times)(rowCount, () => ({
42
- cells: (0, _lodash.times)(columnCount, () => ({
41
+ body: Array.from({
42
+ length: rowCount
43
+ }).map(() => ({
44
+ cells: Array.from({
45
+ length: columnCount
46
+ }).map(() => ({
43
47
  content: '',
44
48
  tag: 'td'
45
49
  }))
@@ -187,7 +191,9 @@ function insertRow(state, _ref2) {
187
191
 
188
192
  return {
189
193
  [sectionName]: [...state[sectionName].slice(0, rowIndex), {
190
- cells: (0, _lodash.times)(cellCount, index => {
194
+ cells: Array.from({
195
+ length: cellCount
196
+ }).map((_, index) => {
191
197
  const firstCellInColumn = (0, _lodash.get)(firstRow, ['cells', index], {});
192
198
  const inheritedAttributes = (0, _lodash.pick)(firstCellInColumn, INHERITED_COLUMN_ATTRIBUTES);
193
199
  return { ...inheritedAttributes,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/table/state.js"],"names":["INHERITED_COLUMN_ATTRIBUTES","createTable","rowCount","columnCount","body","cells","content","tag","getFirstRow","state","isEmptyTableSection","head","foot","getCellAttribute","cellLocation","attributeName","sectionName","rowIndex","columnIndex","updateSelectedCell","selection","updateCell","tableSections","selectionSectionName","selectionRowIndex","section","map","row","cellAttributes","isCellSelected","type","insertRow","firstRow","cellCount","undefined","slice","index","firstCellInColumn","inheritedAttributes","deleteRow","filter","insertColumn","isEmptyRow","length","deleteColumn","cell","toggleSection"],"mappings":";;;;;;;;;;;;;;;;;;AAGA;;AAHA;AACA;AACA;AAGA,MAAMA,2BAA2B,GAAG,CAAE,OAAF,CAApC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACO,SAASC,WAAT,OAAkD;AAAA,MAA5B;AAAEC,IAAAA,QAAF;AAAYC,IAAAA;AAAZ,GAA4B;AACxD,SAAO;AACNC,IAAAA,IAAI,EAAE,mBAAOF,QAAP,EAAiB,OAAQ;AAC9BG,MAAAA,KAAK,EAAE,mBAAOF,WAAP,EAAoB,OAAQ;AAClCG,QAAA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C;AAC9C,SAAO,CAAEA,OAAF,IAAa,CAAEA,OAAO,CAACkB,MAAvB,IAAiC,mBAAOlB,OAAP,EAAgBiB,UAAhB,CAAxC;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASA,UAAT,CAAqBf,GAArB,EAA2B;AACjC,SAAO,EAAIA,GAAG,CAACtB,KAAJ,IAAasB,GAAG,CAACtB,KAAJ,CAAUsC,MAA3B,CAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { times, get, mapValues, every, pick } from 'lodash';\n\nconst INHERITED_COLUMN_ATTRIBUTES = [ 'align' ];\n\n/**\n * Creates a table state.\n *\n * @param {Object} options\n * @param {number} options.rowCount Row count for the table to create.\n * @param {number} options.columnCount Column count for the table to create.\n *\n * @return {Object} New table state.\n */\nexport function createTable( { rowCount, columnCount } ) {\n\treturn {\n\t\tbody: times( rowCount, () => ( {\n\t\t\tcells: times( columnCount, () => ( {\n\t\t\t\tcontent: '',\n\t\t\t\ttag: 'td',\n\t\t\t} ) ),\n\t\t} ) ),\n\t};\n}\n\n/**\n * Returns the first row in the table.\n *\n * @param {Object} state Current table state.\n *\n * @return {Object} The first table row.\n */\nexport function getFirstRow( state ) {\n\tif ( ! isEmptyTableSection( state.head ) ) {\n\t\treturn state.head[ 0 ];\n\t}\n\tif ( ! isEmptyTableSection( state.body ) ) {\n\t\treturn state.body[ 0 ];\n\t}\n\tif ( ! isEmptyTableSection( state.foot ) ) {\n\t\treturn state.foot[ 0 ];\n\t}\n}\n\n/**\n * Gets an attribute for a cell.\n *\n * @param {Object} state Current table state.\n * @param {Object} cellLocation The location of the cell\n * @param {string} attributeName The name of the attribute to get the value of.\n *\n * @return {*} The attribute value.\n */\nexport function getCellAttribute( state, cellLocation, attributeName ) {\n\tconst { sectionName, rowIndex, columnIndex } = cellLocation;\n\treturn get( state, [\n\t\tsectionName,\n\t\trowIndex,\n\t\t'cells',\n\t\tcolumnIndex,\n\t\tattributeName,\n\t] );\n}\n\n/**\n * Returns updated cell attributes after applying the `updateCell` function to the selection.\n *\n * @param {Object} state The block attributes.\n * @param {Object} selection The selection of cells to update.\n * @param {Function} updateCell A function to update the selected cell attributes.\n *\n * @return {Object} New table state including the updated cells.\n */\nexport function updateSelectedCell( state, selection, updateCell ) {\n\tif ( ! selection ) {\n\t\treturn state;\n\t}\n\n\tconst tableSections = pick( state, [ 'head', 'body', 'foot' ] );\n\tconst { sectionName: selectionSectionName, rowIndex: selectionRowIndex } =\n\t\tselection;\n\n\treturn mapValues( tableSections, ( section, sectionName ) => {\n\t\tif ( selectionSectionName && selectionSectionName !== sectionName ) {\n\t\t\treturn section;\n\t\t}\n\n\t\treturn section.map( ( row, rowIndex ) => {\n\t\t\tif ( selectionRowIndex && selectionRowIndex !== rowIndex ) {\n\t\t\t\treturn row;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tcells: row.cells.map( ( cellAttributes, columnIndex ) => {\n\t\t\t\t\tconst cellLocation = {\n\t\t\t\t\t\tsectionName,\n\t\t\t\t\t\tcolumnIndex,\n\t\t\t\t\t\trowIndex,\n\t\t\t\t\t};\n\n\t\t\t\t\tif ( ! isCellSelected( cellLocation, selection ) ) {\n\t\t\t\t\t\treturn cellAttributes;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn updateCell( cellAttributes );\n\t\t\t\t} ),\n\t\t\t};\n\t\t} );\n\t} );\n}\n\n/**\n * Returns whether the cell at `cellLocation` is included in the selection `selection`.\n *\n * @param {Object} cellLocation An object containing cell location properties.\n * @param {Object} selection An object containing selection properties.\n *\n * @return {boolean} True if the cell is selected, false otherwise.\n */\nexport function isCellSelected( cellLocation, selection ) {\n\tif ( ! cellLocation || ! selection ) {\n\t\treturn false;\n\t}\n\n\tswitch ( selection.type ) {\n\t\tcase 'column':\n\t\t\treturn (\n\t\t\t\tselection.type === 'column' &&\n\t\t\t\tcellLocation.columnIndex === selection.columnIndex\n\t\t\t);\n\t\tcase 'cell':\n\t\t\treturn (\n\t\t\t\tselection.type === 'cell' &&\n\t\t\t\tcellLocation.sectionName === selection.sectionName &&\n\t\t\t\tcellLocation.columnIndex === selection.columnIndex &&\n\t\t\t\tcellLocation.rowIndex === selection.rowIndex\n\t\t\t);\n\t}\n}\n\n/**\n * Inserts a row in the table state.\n *\n * @param {Object} state Current table state.\n * @param {Object} options\n * @param {string} options.sectionName Section in which to insert the row.\n * @param {number} options.rowIndex Row index at which to insert the row.\n * @param {number} options.columnCount Column count for the table to create.\n *\n * @return {Object} New table state.\n */\nexport function insertRow( state, { sectionName, rowIndex, columnCount } ) {\n\tconst firstRow = getFirstRow( state );\n\tconst cellCount =\n\t\tcolumnCount === undefined\n\t\t\t? get( firstRow, [ 'cells', 'length' ] )\n\t\t\t: columnCount;\n\n\t// Bail early if the function cannot determine how many cells to add.\n\tif ( ! cellCount ) {\n\t\treturn state;\n\t}\n\n\treturn {\n\t\t[ sectionName ]: [\n\t\t\t...state[ sectionName ].slice( 0, rowIndex ),\n\t\t\t{\n\t\t\t\tcells: times( cellCount, ( index ) => {\n\t\t\t\t\tconst firstCellInColumn = get(\n\t\t\t\t\t\tfirstRow,\n\t\t\t\t\t\t[ 'cells', index ],\n\t\t\t\t\t\t{}\n\t\t\t\t\t);\n\t\t\t\t\tconst inheritedAttributes = pick(\n\t\t\t\t\t\tfirstCellInColumn,\n\t\t\t\t\t\tINHERITED_COLUMN_ATTRIBUTES\n\t\t\t\t\t);\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...inheritedAttributes,\n\t\t\t\t\t\tcontent: '',\n\t\t\t\t\t\ttag: sectionName === 'head' ? 'th' : 'td',\n\t\t\t\t\t};\n\t\t\t\t} ),\n\t\t\t},\n\t\t\t...state[ sectionName ].slice( rowIndex ),\n\t\t],\n\t};\n}\n\n/**\n * Deletes a row from the table state.\n *\n * @param {Object} state Current table state.\n * @param {Object} options\n * @param {string} options.sectionName Section in which to delete the row.\n * @param {number} options.rowIndex Row index to delete.\n *\n * @return {Object} New table state.\n */\nexport function deleteRow( state, { sectionName, rowIndex } ) {\n\treturn {\n\t\t[ sectionName ]: state[ sectionName ].filter(\n\t\t\t( row, index ) => index !== rowIndex\n\t\t),\n\t};\n}\n\n/**\n * Inserts a column in the table state.\n *\n * @param {Object} state Current table state.\n * @param {Object} options\n * @param {number} options.columnIndex Column index at which to insert the column.\n *\n * @return {Object} New table state.\n */\nexport function insertColumn( state, { columnIndex } ) {\n\tconst tableSections = pick( state, [ 'head', 'body', 'foot' ] );\n\n\treturn mapValues( tableSections, ( section, sectionName ) => {\n\t\t// Bail early if the table section is empty.\n\t\tif ( isEmptyTableSection( section ) ) {\n\t\t\treturn section;\n\t\t}\n\n\t\treturn section.map( ( row ) => {\n\t\t\t// Bail early if the row is empty or it's an attempt to insert past\n\t\t\t// the last possible index of the array.\n\t\t\tif ( isEmptyRow( row ) || row.cells.length < columnIndex ) {\n\t\t\t\treturn row;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tcells: [\n\t\t\t\t\t...row.cells.slice( 0, columnIndex ),\n\t\t\t\t\t{\n\t\t\t\t\t\tcontent: '',\n\t\t\t\t\t\ttag: sectionName === 'head' ? 'th' : 'td',\n\t\t\t\t\t},\n\t\t\t\t\t...row.cells.slice( columnIndex ),\n\t\t\t\t],\n\t\t\t};\n\t\t} );\n\t} );\n}\n\n/**\n * Deletes a column from the table state.\n *\n * @param {Object} state Current table state.\n * @param {Object} options\n * @param {number} options.columnIndex Column index to delete.\n *\n * @return {Object} New table state.\n */\nexport function deleteColumn( state, { columnIndex } ) {\n\tconst tableSections = pick( state, [ 'head', 'body', 'foot' ] );\n\n\treturn mapValues( tableSections, ( section ) => {\n\t\t// Bail early if the table section is empty.\n\t\tif ( isEmptyTableSection( section ) ) {\n\t\t\treturn section;\n\t\t}\n\n\t\treturn section\n\t\t\t.map( ( row ) => ( {\n\t\t\t\tcells:\n\t\t\t\t\trow.cells.length >= columnIndex\n\t\t\t\t\t\t? row.cells.filter(\n\t\t\t\t\t\t\t\t( cell, index ) => index !== columnIndex\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: row.cells,\n\t\t\t} ) )\n\t\t\t.filter( ( row ) => row.cells.length );\n\t} );\n}\n\n/**\n * Toggles the existance of a section.\n *\n * @param {Object} state Current table state.\n * @param {string} sectionName Name of the section to toggle.\n *\n * @return {Object} New table state.\n */\nexport function toggleSection( state, sectionName ) {\n\t// Section exists, replace it with an empty row to remove it.\n\tif ( ! isEmptyTableSection( state[ sectionName ] ) ) {\n\t\treturn { [ sectionName ]: [] };\n\t}\n\n\t// Get the length of the first row of the body to use when creating the header.\n\tconst columnCount = get( state, [ 'body', 0, 'cells', 'length' ], 1 );\n\n\t// Section doesn't exist, insert an empty row to create the section.\n\treturn insertRow( state, { sectionName, rowIndex: 0, columnCount } );\n}\n\n/**\n * Determines whether a table section is empty.\n *\n * @param {Object} section Table section state.\n *\n * @return {boolean} True if the table section is empty, false otherwise.\n */\nexport function isEmptyTableSection( section ) {\n\treturn ! section || ! section.length || every( section, isEmptyRow );\n}\n\n/**\n * Determines whether a table row is empty.\n *\n * @param {Object} row Table row state.\n *\n * @return {boolean} True if the table section is empty, false otherwise.\n */\nexport function isEmptyRow( row ) {\n\treturn ! ( row.cells && row.cells.length );\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/table/state.js"],"names":["INHERITED_COLUMN_ATTRIBUTES","createTable","rowCount","columnCount","body","Array","from","length","map","cells","content","tag","getFirstRow","state","isEmptyTableSection","head","foot","getCellAttribute","cellLocation","attributeName","sectionName","rowIndex","columnIndex","updateSelectedCell","selection","updateCell","tableSections","selectionSectionName","selectionRowIndex","section","row","cellAttributes","isCellSelected","type","insertRow","firstRow","cellCount","undefined","slice","_","index","firstCellInColumn","inheritedAttributes","deleteRow","filter","insertColumn","isEmptyRow","deleteColumn","cell","toggleSection"],"mappings":";;;;;;;;;;;;;;;;;;AAGA;;AAHA;AACA;AACA;AAGA,MAAMA,2BAA2B,GAAG,CAAE,OAAF,CAApC;AAEA;AACA;AAC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,CAAEN,mBAAmB,CAAED,KAAK,CAAEO,WAAF,CAAP,CAA1B,EAAqD;AACpD,WAAO;AAAE,OAAEA,WAAF,GAAiB;AAAnB,KAAP;AACA,GAJkD,CAMnD;;;AACA,QAAMjB,WAAW,GAAG,iBAAKU,KAAL,EAAY,CAAE,MAAF,EAAU,CAAV,EAAa,OAAb,EAAsB,QAAtB,CAAZ,EAA8C,CAA9C,CAApB,CAPmD,CASnD;;AACA,SAAOqB,SAAS,CAAErB,KAAF,EAAS;AAAEO,IAAAA,WAAF;AAAeC,IAAAA,QAAQ,EAAE,CAAzB;AAA4BlB,IAAAA;AAA5B,GAAT,CAAhB;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASW,mBAAT,CAA8Be,OAA9B,EAAwC;AAC9C,SAAO,CAAEA,OAAF,IAAa,CAAEA,OAAO,CAACtB,MAAvB,IAAiC,mBAAOsB,OAAP,EAAgBiB,UAAhB,CAAxC;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASA,UAAT,CAAqBhB,GAArB,EAA2B;AACjC,SAAO,EAAIA,GAAG,CAACrB,KAAJ,IAAaqB,GAAG,CAACrB,KAAJ,CAAUF,MAA3B,CAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport { get, mapValues, every, pick } from 'lodash';\n\nconst INHERITED_COLUMN_ATTRIBUTES = [ 'align' ];\n\n/**\n * Creates a table state.\n *\n * @param {Object} options\n * @param {number} options.rowCount Row count for the table to create.\n * @param {number} options.columnCount Column count for the table to create.\n *\n * @return {Object} New table state.\n */\nexport function createTable( { rowCount, columnCount } ) {\n\treturn {\n\t\tbody: Array.from( { length: rowCount } ).map( () => ( {\n\t\t\tcells: Array.from( { length: columnCount } ).map( () => ( {\n\t\t\t\tcontent: '',\n\t\t\t\ttag: 'td',\n\t\t\t} ) ),\n\t\t} ) ),\n\t};\n}\n\n/**\n * Returns the first row in the table.\n *\n * @param {Object} state Current table state.\n *\n * @return {Object} The first table row.\n */\nexport function getFirstRow( state ) {\n\tif ( ! isEmptyTableSection( state.head ) ) {\n\t\treturn state.head[ 0 ];\n\t}\n\tif ( ! isEmptyTableSection( state.body ) ) {\n\t\treturn state.body[ 0 ];\n\t}\n\tif ( ! isEmptyTableSection( state.foot ) ) {\n\t\treturn state.foot[ 0 ];\n\t}\n}\n\n/**\n * Gets an attribute for a cell.\n *\n * @param {Object} state Current table state.\n * @param {Object} cellLocation The location of the cell\n * @param {string} attributeName The name of the attribute to get the value of.\n *\n * @return {*} The attribute value.\n */\nexport function getCellAttribute( state, cellLocation, attributeName ) {\n\tconst { sectionName, rowIndex, columnIndex } = cellLocation;\n\treturn get( state, [\n\t\tsectionName,\n\t\trowIndex,\n\t\t'cells',\n\t\tcolumnIndex,\n\t\tattributeName,\n\t] );\n}\n\n/**\n * Returns updated cell attributes after applying the `updateCell` function to the selection.\n *\n * @param {Object} state The block attributes.\n * @param {Object} selection The selection of cells to update.\n * @param {Function} updateCell A function to update the selected cell attributes.\n *\n * @return {Object} New table state including the updated cells.\n */\nexport function updateSelectedCell( state, selection, updateCell ) {\n\tif ( ! selection ) {\n\t\treturn state;\n\t}\n\n\tconst tableSections = pick( state, [ 'head', 'body', 'foot' ] );\n\tconst { sectionName: selectionSectionName, rowIndex: selectionRowIndex } =\n\t\tselection;\n\n\treturn mapValues( tableSections, ( section, sectionName ) => {\n\t\tif ( selectionSectionName && selectionSectionName !== sectionName ) {\n\t\t\treturn section;\n\t\t}\n\n\t\treturn section.map( ( row, rowIndex ) => {\n\t\t\tif ( selectionRowIndex && selectionRowIndex !== rowIndex ) {\n\t\t\t\treturn row;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tcells: row.cells.map( ( cellAttributes, columnIndex ) => {\n\t\t\t\t\tconst cellLocation = {\n\t\t\t\t\t\tsectionName,\n\t\t\t\t\t\tcolumnIndex,\n\t\t\t\t\t\trowIndex,\n\t\t\t\t\t};\n\n\t\t\t\t\tif ( ! isCellSelected( cellLocation, selection ) ) {\n\t\t\t\t\t\treturn cellAttributes;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn updateCell( cellAttributes );\n\t\t\t\t} ),\n\t\t\t};\n\t\t} );\n\t} );\n}\n\n/**\n * Returns whether the cell at `cellLocation` is included in the selection `selection`.\n *\n * @param {Object} cellLocation An object containing cell location properties.\n * @param {Object} selection An object containing selection properties.\n *\n * @return {boolean} True if the cell is selected, false otherwise.\n */\nexport function isCellSelected( cellLocation, selection ) {\n\tif ( ! cellLocation || ! selection ) {\n\t\treturn false;\n\t}\n\n\tswitch ( selection.type ) {\n\t\tcase 'column':\n\t\t\treturn (\n\t\t\t\tselection.type === 'column' &&\n\t\t\t\tcellLocation.columnIndex === selection.columnIndex\n\t\t\t);\n\t\tcase 'cell':\n\t\t\treturn (\n\t\t\t\tselection.type === 'cell' &&\n\t\t\t\tcellLocation.sectionName === selection.sectionName &&\n\t\t\t\tcellLocation.columnIndex === selection.columnIndex &&\n\t\t\t\tcellLocation.rowIndex === selection.rowIndex\n\t\t\t);\n\t}\n}\n\n/**\n * Inserts a row in the table state.\n *\n * @param {Object} state Current table state.\n * @param {Object} options\n * @param {string} options.sectionName Section in which to insert the row.\n * @param {number} options.rowIndex Row index at which to insert the row.\n * @param {number} options.columnCount Column count for the table to create.\n *\n * @return {Object} New table state.\n */\nexport function insertRow( state, { sectionName, rowIndex, columnCount } ) {\n\tconst firstRow = getFirstRow( state );\n\tconst cellCount =\n\t\tcolumnCount === undefined\n\t\t\t? get( firstRow, [ 'cells', 'length' ] )\n\t\t\t: columnCount;\n\n\t// Bail early if the function cannot determine how many cells to add.\n\tif ( ! cellCount ) {\n\t\treturn state;\n\t}\n\n\treturn {\n\t\t[ sectionName ]: [\n\t\t\t...state[ sectionName ].slice( 0, rowIndex ),\n\t\t\t{\n\t\t\t\tcells: Array.from( { length: cellCount } ).map(\n\t\t\t\t\t( _, index ) => {\n\t\t\t\t\t\tconst firstCellInColumn = get(\n\t\t\t\t\t\t\tfirstRow,\n\t\t\t\t\t\t\t[ 'cells', index ],\n\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst inheritedAttributes = pick(\n\t\t\t\t\t\t\tfirstCellInColumn,\n\t\t\t\t\t\t\tINHERITED_COLUMN_ATTRIBUTES\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...inheritedAttributes,\n\t\t\t\t\t\t\tcontent: '',\n\t\t\t\t\t\t\ttag: sectionName === 'head' ? 'th' : 'td',\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t),\n\t\t\t},\n\t\t\t...state[ sectionName ].slice( rowIndex ),\n\t\t],\n\t};\n}\n\n/**\n * Deletes a row from the table state.\n *\n * @param {Object} state Current table state.\n * @param {Object} options\n * @param {string} options.sectionName Section in which to delete the row.\n * @param {number} options.rowIndex Row index to delete.\n *\n * @return {Object} New table state.\n */\nexport function deleteRow( state, { sectionName, rowIndex } ) {\n\treturn {\n\t\t[ sectionName ]: state[ sectionName ].filter(\n\t\t\t( row, index ) => index !== rowIndex\n\t\t),\n\t};\n}\n\n/**\n * Inserts a column in the table state.\n *\n * @param {Object} state Current table state.\n * @param {Object} options\n * @param {number} options.columnIndex Column index at which to insert the column.\n *\n * @return {Object} New table state.\n */\nexport function insertColumn( state, { columnIndex } ) {\n\tconst tableSections = pick( state, [ 'head', 'body', 'foot' ] );\n\n\treturn mapValues( tableSections, ( section, sectionName ) => {\n\t\t// Bail early if the table section is empty.\n\t\tif ( isEmptyTableSection( section ) ) {\n\t\t\treturn section;\n\t\t}\n\n\t\treturn section.map( ( row ) => {\n\t\t\t// Bail early if the row is empty or it's an attempt to insert past\n\t\t\t// the last possible index of the array.\n\t\t\tif ( isEmptyRow( row ) || row.cells.length < columnIndex ) {\n\t\t\t\treturn row;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tcells: [\n\t\t\t\t\t...row.cells.slice( 0, columnIndex ),\n\t\t\t\t\t{\n\t\t\t\t\t\tcontent: '',\n\t\t\t\t\t\ttag: sectionName === 'head' ? 'th' : 'td',\n\t\t\t\t\t},\n\t\t\t\t\t...row.cells.slice( columnIndex ),\n\t\t\t\t],\n\t\t\t};\n\t\t} );\n\t} );\n}\n\n/**\n * Deletes a column from the table state.\n *\n * @param {Object} state Current table state.\n * @param {Object} options\n * @param {number} options.columnIndex Column index to delete.\n *\n * @return {Object} New table state.\n */\nexport function deleteColumn( state, { columnIndex } ) {\n\tconst tableSections = pick( state, [ 'head', 'body', 'foot' ] );\n\n\treturn mapValues( tableSections, ( section ) => {\n\t\t// Bail early if the table section is empty.\n\t\tif ( isEmptyTableSection( section ) ) {\n\t\t\treturn section;\n\t\t}\n\n\t\treturn section\n\t\t\t.map( ( row ) => ( {\n\t\t\t\tcells:\n\t\t\t\t\trow.cells.length >= columnIndex\n\t\t\t\t\t\t? row.cells.filter(\n\t\t\t\t\t\t\t\t( cell, index ) => index !== columnIndex\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: row.cells,\n\t\t\t} ) )\n\t\t\t.filter( ( row ) => row.cells.length );\n\t} );\n}\n\n/**\n * Toggles the existance of a section.\n *\n * @param {Object} state Current table state.\n * @param {string} sectionName Name of the section to toggle.\n *\n * @return {Object} New table state.\n */\nexport function toggleSection( state, sectionName ) {\n\t// Section exists, replace it with an empty row to remove it.\n\tif ( ! isEmptyTableSection( state[ sectionName ] ) ) {\n\t\treturn { [ sectionName ]: [] };\n\t}\n\n\t// Get the length of the first row of the body to use when creating the header.\n\tconst columnCount = get( state, [ 'body', 0, 'cells', 'length' ], 1 );\n\n\t// Section doesn't exist, insert an empty row to create the section.\n\treturn insertRow( state, { sectionName, rowIndex: 0, columnCount } );\n}\n\n/**\n * Determines whether a table section is empty.\n *\n * @param {Object} section Table section state.\n *\n * @return {boolean} True if the table section is empty, false otherwise.\n */\nexport function isEmptyTableSection( section ) {\n\treturn ! section || ! section.length || every( section, isEmptyRow );\n}\n\n/**\n * Determines whether a table row is empty.\n *\n * @param {Object} row Table row state.\n *\n * @return {boolean} True if the table section is empty, false otherwise.\n */\nexport function isEmptyRow( row ) {\n\treturn ! ( row.cells && row.cells.length );\n}\n"]}
@@ -39,7 +39,30 @@ const metadata = {
39
39
  }
40
40
  },
41
41
  supports: {
42
- html: false
42
+ html: false,
43
+ color: {
44
+ text: true,
45
+ background: true,
46
+ gradients: true,
47
+ link: true
48
+ },
49
+ spacing: {
50
+ margin: true,
51
+ padding: true
52
+ },
53
+ typography: {
54
+ fontSize: true,
55
+ lineHeight: true,
56
+ __experimentalFontFamily: true,
57
+ __experimentalFontWeight: true,
58
+ __experimentalFontStyle: true,
59
+ __experimentalTextTransform: true,
60
+ __experimentalTextDecoration: true,
61
+ __experimentalLetterSpacing: true,
62
+ __experimentalDefaultControls: {
63
+ fontSize: true
64
+ }
65
+ }
43
66
  },
44
67
  example: {}
45
68
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/table-of-contents/index.js"],"names":["name","metadata","settings","icon","edit","save"],"mappings":";;;;;;;;;AAIA;;AACA;;AACA;;AANA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,aADuB;AAEvBC,EAAAA,IAAI,EAAJA,aAFuB;AAGvBC,EAAAA,IAAI,EAAJA;AAHuB,CAAjB","sourcesContent":["/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport icon from './icon';\nimport save from './save';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/table-of-contents/index.js"],"names":["name","metadata","settings","icon","edit","save"],"mappings":";;;;;;;;;AAIA;;AACA;;AACA;;AANA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,aADuB;AAEvBC,EAAAA,IAAI,EAAJA,aAFuB;AAGvBC,EAAAA,IAAI,EAAJA;AAHuB,CAAjB","sourcesContent":["/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport icon from './icon';\nimport save from './save';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n"]}
@@ -62,7 +62,11 @@ const metadata = {
62
62
  }],
63
63
  supports: {
64
64
  html: false,
65
- align: true
65
+ align: true,
66
+ spacing: {
67
+ margin: true,
68
+ padding: true
69
+ }
66
70
  },
67
71
  editorStyle: "wp-block-tag-cloud-editor"
68
72
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/tag-cloud/index.js"],"names":["name","metadata","settings","icon","example","edit","transforms"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAEA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,UADuB;AAEvBC,EAAAA,OAAO,EAAE,EAFc;AAGvBC,EAAAA,IAAI,EAAJA,aAHuB;AAIvBC,EAAAA,UAAU,EAAVA;AAJuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { tag as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport transforms from './transforms';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\tedit,\n\ttransforms,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/tag-cloud/index.js"],"names":["name","metadata","settings","icon","example","edit","transforms"],"mappings":";;;;;;;;;AAGA;;AAKA;;AAEA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,UADuB;AAEvBC,EAAAA,OAAO,EAAE,EAFc;AAGvBC,EAAAA,IAAI,EAAJA,aAHuB;AAIvBC,EAAAA,UAAU,EAAVA;AAJuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { tag as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport transforms from './transforms';\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\tedit,\n\ttransforms,\n};\n"]}
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.settings = exports.name = exports.metadata = void 0;
9
9
 
10
- var _lodash = require("lodash");
10
+ var _changeCase = require("change-case");
11
11
 
12
12
  var _coreData = require("@wordpress/core-data");
13
13
 
@@ -90,7 +90,7 @@ const settings = {
90
90
  return;
91
91
  }
92
92
 
93
- return (0, _htmlEntities.decodeEntities)((_entity$title = entity.title) === null || _entity$title === void 0 ? void 0 : _entity$title.rendered) || (0, _lodash.startCase)(entity.slug);
93
+ return (0, _htmlEntities.decodeEntities)((_entity$title = entity.title) === null || _entity$title === void 0 ? void 0 : _entity$title.rendered) || (0, _changeCase.capitalCase)(entity.slug);
94
94
  },
95
95
  edit: _edit.default
96
96
  }; // Importing this file includes side effects. This is added in block-library/package.json under sideEffects
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/template-part/index.js"],"names":["name","metadata","settings","icon","symbolFilled","__experimentalLabel","slug","theme","entity","coreDataStore","getEntityRecord","title","rendered","edit","enhanceTemplatePartVariations","DISALLOWED_PARENTS","can","blockType","rootClientId","getBlock","getBlockParentsByBlockName","disallowedParentType","hasDisallowedParent","length"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAMA;;AACA;;AAnBA;AACA;AACA;;AAGA;AACA;AACA;;AAOA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAEC,mBADiB;AAEvBC,EAAAA,mBAAmB,EAAE,QAAuB;AAAA;;AAAA,QAArB;AAAEC,MAAAA,IAAF;AAAQC,MAAAA;AAAR,KAAqB;;AAC3C;AACA;AACA,QAAK,CAAED,IAAP,EAAc;AACb;AACA;;AAED,UAAME,MAAM,GAAG,kBAAQC,eAAR,EAAwBC,eAAxB,CACd,UADc,EAEd,kBAFc,EAGdH,KAAK,GAAG,IAAR,GAAeD,IAHD,CAAf;;AAKA,QAAK,CAAEE,MAAP,EAAgB;AACf;AACA;;AAED,WACC,mDAAgBA,MAAM,CAACG,KAAvB,kDAAgB,cAAcC,QAA9B,KAA4C,uBAAWJ,MAAM,CAACF,IAAlB,CAD7C;AAGA,GArBsB;AAsBvBO,EAAAA,IAAI,EAAJA;AAtBuB,CAAjB,C,CAyBP;;;AACA,sBACC,0BADD,EAEC,oBAFD,EAGCC,yCAHD,E,CAMA;;AACA,MAAMC,kBAAkB,GAAG,CAAE,oBAAF,EAAwB,mBAAxB,CAA3B;AACA,sBACC,0CADD,EAEC,sCAFD,EAGC,CACCC,GADD,EAECC,SAFD,EAGCC,YAHD,YAKK;AAAA,MADJ;AAAEC,IAAAA,QAAF;AAAYC,IAAAA;AAAZ,GACI;;AACJ,MAAKH,SAAS,CAACjB,IAAV,KAAmB,oBAAxB,EAA+C;AAC9C,WAAOgB,GAAP;AACA;;AAED,OAAM,MAAMK,oBAAZ,IAAoCN,kBAApC,EAAyD;AAAA;;AACxD,UAAMO,mBAAmB,GACxB,cAAAH,QAAQ,CAAED,YAAF,CAAR,wDAA0BlB,IAA1B,MAAmCqB,oBAAnC,IACAD,0BAA0B,CAAEF,YAAF,EAAgBG,oBAAhB,CAA1B,CACEE,MAHH;;AAIA,QAAKD,mBAAL,EAA2B;AAC1B,aAAO,KAAP;AACA;AACD;;AACD,SAAO,IAAP;AACA,CAvBF","sourcesContent":["/**\n * External dependencies\n */\nimport { startCase } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { select } from '@wordpress/data';\nimport { symbolFilled } from '@wordpress/icons';\nimport { addFilter } from '@wordpress/hooks';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport { enhanceTemplatePartVariations } from './variations';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon: symbolFilled,\n\t__experimentalLabel: ( { slug, theme } ) => {\n\t\t// Attempt to find entity title if block is a template part.\n\t\t// Require slug to request, otherwise entity is uncreated and will throw 404.\n\t\tif ( ! slug ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst entity = select( coreDataStore ).getEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template_part',\n\t\t\ttheme + '//' + slug\n\t\t);\n\t\tif ( ! entity ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn (\n\t\t\tdecodeEntities( entity.title?.rendered ) || startCase( entity.slug )\n\t\t);\n\t},\n\tedit,\n};\n\n// Importing this file includes side effects. This is added in block-library/package.json under sideEffects\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/template-part',\n\tenhanceTemplatePartVariations\n);\n\n// Prevent adding template parts inside post templates.\nconst DISALLOWED_PARENTS = [ 'core/post-template', 'core/post-content' ];\naddFilter(\n\t'blockEditor.__unstableCanInsertBlockType',\n\t'removeTemplatePartsFromPostTemplates',\n\t(\n\t\tcan,\n\t\tblockType,\n\t\trootClientId,\n\t\t{ getBlock, getBlockParentsByBlockName }\n\t) => {\n\t\tif ( blockType.name !== 'core/template-part' ) {\n\t\t\treturn can;\n\t\t}\n\n\t\tfor ( const disallowedParentType of DISALLOWED_PARENTS ) {\n\t\t\tconst hasDisallowedParent =\n\t\t\t\tgetBlock( rootClientId )?.name === disallowedParentType ||\n\t\t\t\tgetBlockParentsByBlockName( rootClientId, disallowedParentType )\n\t\t\t\t\t.length;\n\t\t\tif ( hasDisallowedParent ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n);\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/template-part/index.js"],"names":["name","metadata","settings","icon","symbolFilled","__experimentalLabel","slug","theme","entity","coreDataStore","getEntityRecord","title","rendered","edit","enhanceTemplatePartVariations","DISALLOWED_PARENTS","can","blockType","rootClientId","getBlock","getBlockParentsByBlockName","disallowedParentType","hasDisallowedParent","length"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAMA;;AACA;;AAnBA;AACA;AACA;;AAGA;AACA;AACA;;AAOA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAEC,mBADiB;AAEvBC,EAAAA,mBAAmB,EAAE,QAAuB;AAAA;;AAAA,QAArB;AAAEC,MAAAA,IAAF;AAAQC,MAAAA;AAAR,KAAqB;;AAC3C;AACA;AACA,QAAK,CAAED,IAAP,EAAc;AACb;AACA;;AAED,UAAME,MAAM,GAAG,kBAAQC,eAAR,EAAwBC,eAAxB,CACd,UADc,EAEd,kBAFc,EAGdH,KAAK,GAAG,IAAR,GAAeD,IAHD,CAAf;;AAKA,QAAK,CAAEE,MAAP,EAAgB;AACf;AACA;;AAED,WACC,mDAAgBA,MAAM,CAACG,KAAvB,kDAAgB,cAAcC,QAA9B,KACA,6BAAaJ,MAAM,CAACF,IAApB,CAFD;AAIA,GAtBsB;AAuBvBO,EAAAA,IAAI,EAAJA;AAvBuB,CAAjB,C,CA0BP;;;AACA,sBACC,0BADD,EAEC,oBAFD,EAGCC,yCAHD,E,CAMA;;AACA,MAAMC,kBAAkB,GAAG,CAAE,oBAAF,EAAwB,mBAAxB,CAA3B;AACA,sBACC,0CADD,EAEC,sCAFD,EAGC,CACCC,GADD,EAECC,SAFD,EAGCC,YAHD,YAKK;AAAA,MADJ;AAAEC,IAAAA,QAAF;AAAYC,IAAAA;AAAZ,GACI;;AACJ,MAAKH,SAAS,CAACjB,IAAV,KAAmB,oBAAxB,EAA+C;AAC9C,WAAOgB,GAAP;AACA;;AAED,OAAM,MAAMK,oBAAZ,IAAoCN,kBAApC,EAAyD;AAAA;;AACxD,UAAMO,mBAAmB,GACxB,cAAAH,QAAQ,CAAED,YAAF,CAAR,wDAA0BlB,IAA1B,MAAmCqB,oBAAnC,IACAD,0BAA0B,CAAEF,YAAF,EAAgBG,oBAAhB,CAA1B,CACEE,MAHH;;AAIA,QAAKD,mBAAL,EAA2B;AAC1B,aAAO,KAAP;AACA;AACD;;AACD,SAAO,IAAP;AACA,CAvBF","sourcesContent":["/**\n * External dependencies\n */\nimport { capitalCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { select } from '@wordpress/data';\nimport { symbolFilled } from '@wordpress/icons';\nimport { addFilter } from '@wordpress/hooks';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport { enhanceTemplatePartVariations } from './variations';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon: symbolFilled,\n\t__experimentalLabel: ( { slug, theme } ) => {\n\t\t// Attempt to find entity title if block is a template part.\n\t\t// Require slug to request, otherwise entity is uncreated and will throw 404.\n\t\tif ( ! slug ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst entity = select( coreDataStore ).getEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template_part',\n\t\t\ttheme + '//' + slug\n\t\t);\n\t\tif ( ! entity ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn (\n\t\t\tdecodeEntities( entity.title?.rendered ) ||\n\t\t\tcapitalCase( entity.slug )\n\t\t);\n\t},\n\tedit,\n};\n\n// Importing this file includes side effects. This is added in block-library/package.json under sideEffects\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/template-part',\n\tenhanceTemplatePartVariations\n);\n\n// Prevent adding template parts inside post templates.\nconst DISALLOWED_PARENTS = [ 'core/post-template', 'core/post-content' ];\naddFilter(\n\t'blockEditor.__unstableCanInsertBlockType',\n\t'removeTemplatePartsFromPostTemplates',\n\t(\n\t\tcan,\n\t\tblockType,\n\t\trootClientId,\n\t\t{ getBlock, getBlockParentsByBlockName }\n\t) => {\n\t\tif ( blockType.name !== 'core/template-part' ) {\n\t\t\treturn can;\n\t\t}\n\n\t\tfor ( const disallowedParentType of DISALLOWED_PARENTS ) {\n\t\t\tconst hasDisallowedParent =\n\t\t\t\tgetBlock( rootClientId )?.name === disallowedParentType ||\n\t\t\t\tgetBlockParentsByBlockName( rootClientId, disallowedParentType )\n\t\t\t\t\t.length;\n\t\t\tif ( hasDisallowedParent ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n);\n"]}
@@ -41,9 +41,19 @@ const metadata = {
41
41
  text: true
42
42
  }
43
43
  },
44
+ spacing: {
45
+ padding: true,
46
+ margin: true
47
+ },
44
48
  typography: {
45
49
  fontSize: true,
46
50
  lineHeight: true,
51
+ __experimentalFontFamily: true,
52
+ __experimentalFontWeight: true,
53
+ __experimentalFontStyle: true,
54
+ __experimentalTextTransform: true,
55
+ __experimentalTextDecoration: true,
56
+ __experimentalLetterSpacing: true,
47
57
  __experimentalDefaultControls: {
48
58
  fontSize: true
49
59
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/term-description/index.js"],"names":["name","metadata","settings","icon","edit"],"mappings":";;;;;;;;;AAGA;;AAMA;;AATA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,sBADuB;AAEvBC,EAAAA,IAAI,EAAJA;AAFuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { termDescription as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/term-description/index.js"],"names":["name","metadata","settings","icon","edit"],"mappings":";;;;;;;;;AAGA;;AAMA;;AATA;AACA;AACA;;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAGO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,sBADuB;AAEvBC,EAAAA,IAAI,EAAJA;AAFuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { termDescription as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n"]}
@@ -57,7 +57,9 @@ function TextColumnsEdit(_ref) {
57
57
  required: true
58
58
  }))), (0, _element.createElement)("div", (0, _blockEditor.useBlockProps)({
59
59
  className: `align${width} columns-${columns}`
60
- }), (0, _lodash.times)(columns, index => {
60
+ }), Array.from({
61
+ length: columns
62
+ }).map((_, index) => {
61
63
  return (0, _element.createElement)("div", {
62
64
  className: "wp-block-column",
63
65
  key: `column-${index}`
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/text-columns/edit.js"],"names":["TextColumnsEdit","attributes","setAttributes","width","content","columns","since","alternative","nextWidth","value","className","index","nextContent","slice","children"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AAOA;;AAjBA;AACA;AACA;;AAGA;AACA;AACA;AAYe,SAASA,eAAT,OAA0D;AAAA,MAAhC;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,GAAgC;AACxE,QAAM;AAAEC,IAAAA,KAAF;AAASC,IAAAA,OAAT;AAAkBC,IAAAA;AAAlB,MAA8BJ,UAApC;AAEA,2BAAY,wBAAZ,EAAsC;AACrCK,IAAAA,KAAK,EAAE,KAD8B;AAErCC,IAAAA,WAAW,EAAE;AAFwB,GAAtC;AAKA,SACC,qDACC,4BAAC,0BAAD,QACC,4BAAC,kCAAD;AACC,IAAA,KAAK,EAAGJ,KADT;AAEC,IAAA,QAAQ,EAAKK,SAAF,IACVN,aAAa,CAAE;AAAEC,MAAAA,KAAK,EAAEK;AAAT,KAAF,CAHf;AAKC,IAAA,QAAQ,EAAG,CAAE,QAAF,EAAY,MAAZ,EAAoB,MAApB;AALZ,IADD,CADD,EAUC,4BAAC,8BAAD,QACC,4BAAC,qBAAD,QACC,4BAAC,wBAAD;AACC,IAAA,KAAK,EAAG,cAAI,SAAJ,CADT;AAEC,IAAA,KAAK,EAAGH,OAFT;AAGC,IAAA,QAAQ,EAAKI,KAAF,IACVP,aAAa,CAAE;AAAEG,MAAAA,OAAO,EAAEI;AAAX,KAAF,CAJf;AAMC,IAAA,GAAG,EAAG,CANP;AAOC,IAAA,GAAG,EAAG,CAPP;AAQC,IAAA,QAAQ;AART,IADD,CADD,CAVD,EAwBC,mCACM,gCAAe;AACnBC,IAAAA,SAAS,EAAG,QAAQP,KAAO,YAAYE,OAAS;AAD7B,GAAf,CADN,EAKG,mBAAOA,OAAP,EAAkBM,KAAF,IAAa;AAC9B,WACC;AACC,MAAA,SAAS,EAAC,iBADX;AAEC,MAAA,GAAG,EAAI,UAAUA,KAAO;AAFzB,OAIC,4BAAC,qBAAD;AACC,MAAA,OAAO,EAAC,GADT;AAEC,MAAA,KAAK,EAAG,iBAAKP,OAAL,EAAc,CAAEO,KAAF,EAAS,UAAT,CAAd,CAFT;AAGC,MAAA,QAAQ,EAAKC,WAAF,IAAmB;AAC7BV,QAAAA,aAAa,CAAE;AACdE,UAAAA,OAAO,EAAE,CACR,GAAGA,OAAO,CAACS,KAAR,CAAe,CAAf,EAAkBF,KAAlB,CADK,EAER;AAAEG,YAAAA,QAAQ,EAAEF;AAAZ,WAFQ,EAGR,GAAGR,OAAO,CAACS,KAAR,CAAeF,KAAK,GAAG,CAAvB,CAHK;AADK,SAAF,CAAb;AAOA,OAXF;AAYC,oBAAa,oBACZ;AACA,oBAAI,gBAAJ,CAFY,EAGZA,KAAK,GAAG,CAHI,CAZd;AAiBC,MAAA,WAAW,EAAG,cAAI,YAAJ;AAjBf,MAJD,CADD;AA0BA,GA3BC,CALH,CAxBD,CADD;AA6DA","sourcesContent":["/**\n * External dependencies\n */\nimport { get, times } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { PanelBody, RangeControl } from '@wordpress/components';\nimport {\n\tBlockControls,\n\tBlockAlignmentToolbar,\n\tInspectorControls,\n\tRichText,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport deprecated from '@wordpress/deprecated';\n\nexport default function TextColumnsEdit( { attributes, setAttributes } ) {\n\tconst { width, content, columns } = attributes;\n\n\tdeprecated( 'The Text Columns block', {\n\t\tsince: '5.3',\n\t\talternative: 'the Columns block',\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<BlockAlignmentToolbar\n\t\t\t\t\tvalue={ width }\n\t\t\t\t\tonChange={ ( nextWidth ) =>\n\t\t\t\t\t\tsetAttributes( { width: nextWidth } )\n\t\t\t\t\t}\n\t\t\t\t\tcontrols={ [ 'center', 'wide', 'full' ] }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\tlabel={ __( 'Columns' ) }\n\t\t\t\t\t\tvalue={ columns }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { columns: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmin={ 2 }\n\t\t\t\t\t\tmax={ 4 }\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<div\n\t\t\t\t{ ...useBlockProps( {\n\t\t\t\t\tclassName: `align${ width } columns-${ columns }`,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t{ times( columns, ( index ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"wp-block-column\"\n\t\t\t\t\t\t\tkey={ `column-${ index }` }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\t\t\t\tvalue={ get( content, [ index, 'children' ] ) }\n\t\t\t\t\t\t\t\tonChange={ ( nextContent ) => {\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t\t\t\t\t...content.slice( 0, index ),\n\t\t\t\t\t\t\t\t\t\t\t{ children: nextContent },\n\t\t\t\t\t\t\t\t\t\t\t...content.slice( index + 1 ),\n\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t\t\t// translators: %d: column index (starting with 1)\n\t\t\t\t\t\t\t\t\t__( 'Column %d text' ),\n\t\t\t\t\t\t\t\t\tindex + 1\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tplaceholder={ __( 'New Column' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/text-columns/edit.js"],"names":["TextColumnsEdit","attributes","setAttributes","width","content","columns","since","alternative","nextWidth","value","className","Array","from","length","map","_","index","nextContent","slice","children"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AAOA;;AAjBA;AACA;AACA;;AAGA;AACA;AACA;AAYe,SAASA,eAAT,OAA0D;AAAA,MAAhC;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,GAAgC;AACxE,QAAM;AAAEC,IAAAA,KAAF;AAASC,IAAAA,OAAT;AAAkBC,IAAAA;AAAlB,MAA8BJ,UAApC;AAEA,2BAAY,wBAAZ,EAAsC;AACrCK,IAAAA,KAAK,EAAE,KAD8B;AAErCC,IAAAA,WAAW,EAAE;AAFwB,GAAtC;AAKA,SACC,qDACC,4BAAC,0BAAD,QACC,4BAAC,kCAAD;AACC,IAAA,KAAK,EAAGJ,KADT;AAEC,IAAA,QAAQ,EAAKK,SAAF,IACVN,aAAa,CAAE;AAAEC,MAAAA,KAAK,EAAEK;AAAT,KAAF,CAHf;AAKC,IAAA,QAAQ,EAAG,CAAE,QAAF,EAAY,MAAZ,EAAoB,MAApB;AALZ,IADD,CADD,EAUC,4BAAC,8BAAD,QACC,4BAAC,qBAAD,QACC,4BAAC,wBAAD;AACC,IAAA,KAAK,EAAG,cAAI,SAAJ,CADT;AAEC,IAAA,KAAK,EAAGH,OAFT;AAGC,IAAA,QAAQ,EAAKI,KAAF,IACVP,aAAa,CAAE;AAAEG,MAAAA,OAAO,EAAEI;AAAX,KAAF,CAJf;AAMC,IAAA,GAAG,EAAG,CANP;AAOC,IAAA,GAAG,EAAG,CAPP;AAQC,IAAA,QAAQ;AART,IADD,CADD,CAVD,EAwBC,mCACM,gCAAe;AACnBC,IAAAA,SAAS,EAAG,QAAQP,KAAO,YAAYE,OAAS;AAD7B,GAAf,CADN,EAKGM,KAAK,CAACC,IAAN,CAAY;AAAEC,IAAAA,MAAM,EAAER;AAAV,GAAZ,EAAkCS,GAAlC,CAAuC,CAAEC,CAAF,EAAKC,KAAL,KAAgB;AACxD,WACC;AACC,MAAA,SAAS,EAAC,iBADX;AAEC,MAAA,GAAG,EAAI,UAAUA,KAAO;AAFzB,OAIC,4BAAC,qBAAD;AACC,MAAA,OAAO,EAAC,GADT;AAEC,MAAA,KAAK,EAAG,iBAAKZ,OAAL,EAAc,CAAEY,KAAF,EAAS,UAAT,CAAd,CAFT;AAGC,MAAA,QAAQ,EAAKC,WAAF,IAAmB;AAC7Bf,QAAAA,aAAa,CAAE;AACdE,UAAAA,OAAO,EAAE,CACR,GAAGA,OAAO,CAACc,KAAR,CAAe,CAAf,EAAkBF,KAAlB,CADK,EAER;AAAEG,YAAAA,QAAQ,EAAEF;AAAZ,WAFQ,EAGR,GAAGb,OAAO,CAACc,KAAR,CAAeF,KAAK,GAAG,CAAvB,CAHK;AADK,SAAF,CAAb;AAOA,OAXF;AAYC,oBAAa,oBACZ;AACA,oBAAI,gBAAJ,CAFY,EAGZA,KAAK,GAAG,CAHI,CAZd;AAiBC,MAAA,WAAW,EAAG,cAAI,YAAJ;AAjBf,MAJD,CADD;AA0BA,GA3BC,CALH,CAxBD,CADD;AA6DA","sourcesContent":["/**\n * External dependencies\n */\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { PanelBody, RangeControl } from '@wordpress/components';\nimport {\n\tBlockControls,\n\tBlockAlignmentToolbar,\n\tInspectorControls,\n\tRichText,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport deprecated from '@wordpress/deprecated';\n\nexport default function TextColumnsEdit( { attributes, setAttributes } ) {\n\tconst { width, content, columns } = attributes;\n\n\tdeprecated( 'The Text Columns block', {\n\t\tsince: '5.3',\n\t\talternative: 'the Columns block',\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<BlockAlignmentToolbar\n\t\t\t\t\tvalue={ width }\n\t\t\t\t\tonChange={ ( nextWidth ) =>\n\t\t\t\t\t\tsetAttributes( { width: nextWidth } )\n\t\t\t\t\t}\n\t\t\t\t\tcontrols={ [ 'center', 'wide', 'full' ] }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\tlabel={ __( 'Columns' ) }\n\t\t\t\t\t\tvalue={ columns }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { columns: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmin={ 2 }\n\t\t\t\t\t\tmax={ 4 }\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<div\n\t\t\t\t{ ...useBlockProps( {\n\t\t\t\t\tclassName: `align${ width } columns-${ columns }`,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t{ Array.from( { length: columns } ).map( ( _, index ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"wp-block-column\"\n\t\t\t\t\t\t\tkey={ `column-${ index }` }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\t\t\t\tvalue={ get( content, [ index, 'children' ] ) }\n\t\t\t\t\t\t\t\tonChange={ ( nextContent ) => {\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t\t\t\t\t...content.slice( 0, index ),\n\t\t\t\t\t\t\t\t\t\t\t{ children: nextContent },\n\t\t\t\t\t\t\t\t\t\t\t...content.slice( index + 1 ),\n\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t\t\t// translators: %d: column index (starting with 1)\n\t\t\t\t\t\t\t\t\t__( 'Column %d text' ),\n\t\t\t\t\t\t\t\t\tindex + 1\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tplaceholder={ __( 'New Column' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n"]}
@@ -29,7 +29,9 @@ function save(_ref) {
29
29
  } = attributes;
30
30
  return (0, _element.createElement)("div", _blockEditor.useBlockProps.save({
31
31
  className: `align${width} columns-${columns}`
32
- }), (0, _lodash.times)(columns, index => (0, _element.createElement)("div", {
32
+ }), Array.from({
33
+ length: columns
34
+ }).map((_, index) => (0, _element.createElement)("div", {
33
35
  className: "wp-block-column",
34
36
  key: `column-${index}`
35
37
  }, (0, _element.createElement)(_blockEditor.RichText.Content, {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/text-columns/save.js"],"names":["save","attributes","width","content","columns","useBlockProps","className","index"],"mappings":";;;;;;;;;AAGA;;AAKA;;AARA;AACA;AACA;;AAGA;AACA;AACA;AAGe,SAASA,IAAT,OAAgC;AAAA,MAAjB;AAAEC,IAAAA;AAAF,GAAiB;AAC9C,QAAM;AAAEC,IAAAA,KAAF;AAASC,IAAAA,OAAT;AAAkBC,IAAAA;AAAlB,MAA8BH,UAApC;AACA,SACC,mCACMI,2BAAcL,IAAd,CAAoB;AACxBM,IAAAA,SAAS,EAAG,QAAQJ,KAAO,YAAYE,OAAS;AADxB,GAApB,CADN,EAKG,mBAAOA,OAAP,EAAkBG,KAAF,IACjB;AAAK,IAAA,SAAS,EAAC,iBAAf;AAAiC,IAAA,GAAG,EAAI,UAAUA,KAAO;AAAzD,KACC,4BAAC,qBAAD,CAAU,OAAV;AACC,IAAA,OAAO,EAAC,GADT;AAEC,IAAA,KAAK,EAAG,iBAAKJ,OAAL,EAAc,CAAEI,KAAF,EAAS,UAAT,CAAd;AAFT,IADD,CADC,CALH,CADD;AAgBA","sourcesContent":["/**\n * External dependencies\n */\nimport { get, times } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { RichText, useBlockProps } from '@wordpress/block-editor';\n\nexport default function save( { attributes } ) {\n\tconst { width, content, columns } = attributes;\n\treturn (\n\t\t<div\n\t\t\t{ ...useBlockProps.save( {\n\t\t\t\tclassName: `align${ width } columns-${ columns }`,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ times( columns, ( index ) => (\n\t\t\t\t<div className=\"wp-block-column\" key={ `column-${ index }` }>\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\t\tvalue={ get( content, [ index, 'children' ] ) }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) ) }\n\t\t</div>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/text-columns/save.js"],"names":["save","attributes","width","content","columns","useBlockProps","className","Array","from","length","map","_","index"],"mappings":";;;;;;;;;AAGA;;AAKA;;AARA;AACA;AACA;;AAGA;AACA;AACA;AAGe,SAASA,IAAT,OAAgC;AAAA,MAAjB;AAAEC,IAAAA;AAAF,GAAiB;AAC9C,QAAM;AAAEC,IAAAA,KAAF;AAASC,IAAAA,OAAT;AAAkBC,IAAAA;AAAlB,MAA8BH,UAApC;AACA,SACC,mCACMI,2BAAcL,IAAd,CAAoB;AACxBM,IAAAA,SAAS,EAAG,QAAQJ,KAAO,YAAYE,OAAS;AADxB,GAApB,CADN,EAKGG,KAAK,CAACC,IAAN,CAAY;AAAEC,IAAAA,MAAM,EAAEL;AAAV,GAAZ,EAAkCM,GAAlC,CAAuC,CAAEC,CAAF,EAAKC,KAAL,KACxC;AAAK,IAAA,SAAS,EAAC,iBAAf;AAAiC,IAAA,GAAG,EAAI,UAAUA,KAAO;AAAzD,KACC,4BAAC,qBAAD,CAAU,OAAV;AACC,IAAA,OAAO,EAAC,GADT;AAEC,IAAA,KAAK,EAAG,iBAAKT,OAAL,EAAc,CAAES,KAAF,EAAS,UAAT,CAAd;AAFT,IADD,CADC,CALH,CADD;AAgBA","sourcesContent":["/**\n * External dependencies\n */\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { RichText, useBlockProps } from '@wordpress/block-editor';\n\nexport default function save( { attributes } ) {\n\tconst { width, content, columns } = attributes;\n\treturn (\n\t\t<div\n\t\t\t{ ...useBlockProps.save( {\n\t\t\t\tclassName: `align${ width } columns-${ columns }`,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ Array.from( { length: columns } ).map( ( _, index ) => (\n\t\t\t\t<div className=\"wp-block-column\" key={ `column-${ index }` }>\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\t\tvalue={ get( content, [ index, 'children' ] ) }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) ) }\n\t\t</div>\n\t);\n}\n"]}
@@ -66,12 +66,14 @@ const metadata = {
66
66
  __experimentalFontWeight: true,
67
67
  __experimentalLetterSpacing: true,
68
68
  __experimentalTextTransform: true,
69
+ __experimentalTextDecoration: true,
69
70
  __experimentalDefaultControls: {
70
71
  fontSize: true,
71
72
  fontAppearance: true
72
73
  }
73
74
  },
74
75
  spacing: {
76
+ margin: true,
75
77
  padding: true
76
78
  }
77
79
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/verse/index.js"],"names":["name","metadata","settings","icon","example","attributes","content","transforms","deprecated","merge","attributesToMerge","edit","save"],"mappings":";;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AAEA;;AACA;;AAbA;AACA;AACA;;AAIA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,YADuB;AAEvBC,EAAAA,OAAO,EAAE;AACRC,IAAAA,UAAU,EAAE;AACX;AACA;AACAC,MAAAA,OAAO,EAAE,cACR,yOADQ;AAGT;;AANW;AADJ,GAFc;AAYvBC,EAAAA,UAAU,EAAVA,mBAZuB;AAavBC,EAAAA,UAAU,EAAVA,mBAbuB;;AAcvBC,EAAAA,KAAK,CAAEJ,UAAF,EAAcK,iBAAd,EAAkC;AACtC,WAAO;AACNJ,MAAAA,OAAO,EAAED,UAAU,CAACC,OAAX,GAAqBI,iBAAiB,CAACJ;AAD1C,KAAP;AAGA,GAlBsB;;AAmBvBK,EAAAA,IAAI,EAAJA,aAnBuB;AAoBvBC,EAAAA,IAAI,EAAJA;AApBuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { verse as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\t/* eslint-disable @wordpress/i18n-no-collapsible-whitespace */\n\t\t\t// translators: Sample content for the Verse block. Can be replaced with a more locale-adequate work.\n\t\t\tcontent: __(\n\t\t\t\t'WHAT was he doing, the great god Pan,\\n\tDown in the reeds by the river?\\nSpreading ruin and scattering ban,\\nSplashing and paddling with hoofs of a goat,\\nAnd breaking the golden lilies afloat\\n With the dragon-fly on the river.'\n\t\t\t),\n\t\t\t/* eslint-enable @wordpress/i18n-no-collapsible-whitespace */\n\t\t},\n\t},\n\ttransforms,\n\tdeprecated,\n\tmerge( attributes, attributesToMerge ) {\n\t\treturn {\n\t\t\tcontent: attributes.content + attributesToMerge.content,\n\t\t};\n\t},\n\tedit,\n\tsave,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/verse/index.js"],"names":["name","metadata","settings","icon","example","attributes","content","transforms","deprecated","merge","attributesToMerge","edit","save"],"mappings":";;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AAEA;;AACA;;AAbA;AACA;AACA;;AAIA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,YADuB;AAEvBC,EAAAA,OAAO,EAAE;AACRC,IAAAA,UAAU,EAAE;AACX;AACA;AACAC,MAAAA,OAAO,EAAE,cACR,yOADQ;AAGT;;AANW;AADJ,GAFc;AAYvBC,EAAAA,UAAU,EAAVA,mBAZuB;AAavBC,EAAAA,UAAU,EAAVA,mBAbuB;;AAcvBC,EAAAA,KAAK,CAAEJ,UAAF,EAAcK,iBAAd,EAAkC;AACtC,WAAO;AACNJ,MAAAA,OAAO,EAAED,UAAU,CAACC,OAAX,GAAqBI,iBAAiB,CAACJ;AAD1C,KAAP;AAGA,GAlBsB;;AAmBvBK,EAAAA,IAAI,EAAJA,aAnBuB;AAoBvBC,EAAAA,IAAI,EAAJA;AApBuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { verse as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\t/* eslint-disable @wordpress/i18n-no-collapsible-whitespace */\n\t\t\t// translators: Sample content for the Verse block. Can be replaced with a more locale-adequate work.\n\t\t\tcontent: __(\n\t\t\t\t'WHAT was he doing, the great god Pan,\\n\tDown in the reeds by the river?\\nSpreading ruin and scattering ban,\\nSplashing and paddling with hoofs of a goat,\\nAnd breaking the golden lilies afloat\\n With the dragon-fly on the river.'\n\t\t\t),\n\t\t\t/* eslint-enable @wordpress/i18n-no-collapsible-whitespace */\n\t\t},\n\t},\n\ttransforms,\n\tdeprecated,\n\tmerge( attributes, attributesToMerge ) {\n\t\treturn {\n\t\t\tcontent: attributes.content + attributesToMerge.content,\n\t\t};\n\t},\n\tedit,\n\tsave,\n};\n"]}
@@ -103,6 +103,10 @@ const metadata = {
103
103
  supports: {
104
104
  anchor: true,
105
105
  align: true,
106
+ spacing: {
107
+ margin: true,
108
+ padding: true
109
+ },
106
110
  __experimentalStyle: {
107
111
  spacing: {
108
112
  margin: "0 0 1em 0"
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/video/index.js"],"names":["name","metadata","settings","icon","example","attributes","src","caption","transforms","edit","save"],"mappings":";;;;;;;;;AAGA;;AACA;;AAKA;;AAEA;;AACA;;AAZA;AACA;AACA;;AAIA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,YADuB;AAEvBC,EAAAA,OAAO,EAAE;AACRC,IAAAA,UAAU,EAAE;AACXC,MAAAA,GAAG,EAAE,+GADM;AAEX;AACAC,MAAAA,OAAO,EAAE,cAAI,2CAAJ;AAHE;AADJ,GAFc;AASvBC,EAAAA,UAAU,EAAVA,mBATuB;AAUvBC,EAAAA,IAAI,EAAJA,aAVuB;AAWvBC,EAAAA,IAAI,EAAJA;AAXuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { video as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tsrc: 'https://upload.wikimedia.org/wikipedia/commons/c/ca/Wood_thrush_in_Central_Park_switch_sides_%2816510%29.webm',\n\t\t\t// translators: Caption accompanying a video of the wood thrush singing, which serves as an example for the Video block.\n\t\t\tcaption: __( 'Wood thrush singing in Central Park, NYC.' ),\n\t\t},\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/video/index.js"],"names":["name","metadata","settings","icon","example","attributes","src","caption","transforms","edit","save"],"mappings":";;;;;;;;;AAGA;;AACA;;AAKA;;AAEA;;AACA;;AAZA;AACA;AACA;;AAIA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,QAAjB;;AAIO,MAAMC,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAJA,YADuB;AAEvBC,EAAAA,OAAO,EAAE;AACRC,IAAAA,UAAU,EAAE;AACXC,MAAAA,GAAG,EAAE,+GADM;AAEX;AACAC,MAAAA,OAAO,EAAE,cAAI,2CAAJ;AAHE;AADJ,GAFc;AASvBC,EAAAA,UAAU,EAAVA,mBATuB;AAUvBC,EAAAA,IAAI,EAAJA,aAVuB;AAWvBC,EAAAA,IAAI,EAAJA;AAXuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { video as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tsrc: 'https://upload.wikimedia.org/wikipedia/commons/c/ca/Wood_thrush_in_Central_Park_switch_sides_%2816510%29.webm',\n\t\t\t// translators: Caption accompanying a video of the wood thrush singing, which serves as an example for the Video block.\n\t\t\tcaption: __( 'Wood thrush singing in Central Park, NYC.' ),\n\t\t},\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n};\n"]}
@@ -34,7 +34,11 @@ const metadata = {
34
34
  },
35
35
  supports: {
36
36
  align: true,
37
- html: false
37
+ html: false,
38
+ spacing: {
39
+ margin: true,
40
+ padding: true
41
+ }
38
42
  },
39
43
  editorStyle: "wp-block-archives-editor"
40
44
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/archives/index.js"],"names":["archive","icon","edit","name","metadata","settings","example"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,IAApB,QAAgC,kBAAhC;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AAEA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBJ,EAAAA,IADuB;AAEvBK,EAAAA,OAAO,EAAE,EAFc;AAGvBJ,EAAAA;AAHuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { archive as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\tedit,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/archives/index.js"],"names":["archive","icon","edit","name","metadata","settings","example"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,IAApB,QAAgC,kBAAhC;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AAEA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBJ,EAAAA,IADuB;AAEvBK,EAAAA,OAAO,EAAE,EAFc;AAGvBJ,EAAAA;AAHuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { archive as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\tedit,\n};\n"]}
@@ -58,6 +58,10 @@ const metadata = {
58
58
  spacing: {
59
59
  margin: "0 0 1em 0"
60
60
  }
61
+ },
62
+ spacing: {
63
+ margin: true,
64
+ padding: true
61
65
  }
62
66
  },
63
67
  editorStyle: "wp-block-audio-editor",
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/audio/index.js"],"names":["audio","icon","deprecated","edit","save","transforms","name","metadata","settings","example","attributes","src"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,IAAlB,QAA8B,kBAA9B;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,IAAP,MAAiB,QAAjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AAEA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBP,EAAAA,IADuB;AAEvBQ,EAAAA,OAAO,EAAE;AACRC,IAAAA,UAAU,EAAE;AACXC,MAAAA,GAAG,EAAE;AADM;AADJ,GAFc;AAOvBN,EAAAA,UAPuB;AAQvBH,EAAAA,UARuB;AASvBC,EAAAA,IATuB;AAUvBC,EAAAA;AAVuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { audio as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tsrc: 'https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg',\n\t\t},\n\t},\n\ttransforms,\n\tdeprecated,\n\tedit,\n\tsave,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/audio/index.js"],"names":["audio","icon","deprecated","edit","save","transforms","name","metadata","settings","example","attributes","src"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,IAAlB,QAA8B,kBAA9B;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,IAAP,MAAiB,QAAjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AAEA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBP,EAAAA,IADuB;AAEvBQ,EAAAA,OAAO,EAAE;AACRC,IAAAA,UAAU,EAAE;AACXC,MAAAA,GAAG,EAAE;AADM;AADJ,GAFc;AAOvBN,EAAAA,UAPuB;AAQvBH,EAAAA,UARuB;AASvBC,EAAAA,IATuB;AAUvBC,EAAAA;AAVuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { audio as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tsrc: 'https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg',\n\t\t},\n\t},\n\ttransforms,\n\tdeprecated,\n\tedit,\n\tsave,\n};\n"]}
@@ -3,7 +3,6 @@ import { createElement } from "@wordpress/element";
3
3
  /**
4
4
  * External dependencies
5
5
  */
6
- import { omit } from 'lodash';
7
6
  import classnames from 'classnames';
8
7
  /**
9
8
  * WordPress dependencies
@@ -64,16 +63,27 @@ const migrateCustomColorsAndGradients = attributes => {
64
63
  style.color.gradient = attributes.customGradient;
65
64
  }
66
65
 
67
- return { ...omit(attributes, ['customTextColor', 'customBackgroundColor', 'customGradient']),
66
+ const {
67
+ customTextColor,
68
+ customBackgroundColor,
69
+ customGradient,
70
+ ...restAttributes
71
+ } = attributes;
72
+ return { ...restAttributes,
68
73
  style
69
74
  };
70
75
  };
71
76
 
72
77
  const oldColorsMigration = attributes => {
73
- return migrateCustomColorsAndGradients(omit({ ...attributes,
78
+ const {
79
+ color,
80
+ textColor,
81
+ ...restAttributes
82
+ } = { ...attributes,
74
83
  customTextColor: attributes.textColor && '#' === attributes.textColor[0] ? attributes.textColor : undefined,
75
84
  customBackgroundColor: attributes.color && '#' === attributes.color[0] ? attributes.color : undefined
76
- }, ['color', 'textColor']));
85
+ };
86
+ return migrateCustomColorsAndGradients(restAttributes);
77
87
  };
78
88
 
79
89
  const blockAttributes = {