@wordpress/block-library 8.24.1 → 8.25.1-next.79a6196f.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 (509) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/LICENSE.md +1 -1
  3. package/build/audio/edit.js +15 -62
  4. package/build/audio/edit.js.map +1 -1
  5. package/build/audio/edit.native.js +1 -1
  6. package/build/audio/edit.native.js.map +1 -1
  7. package/build/audio/index.js +2 -2
  8. package/build/block/edit.js +157 -19
  9. package/build/block/edit.js.map +1 -1
  10. package/build/block/index.js +3 -2
  11. package/build/block/index.js.map +1 -1
  12. package/build/block/v1/edit.js +116 -0
  13. package/build/block/v1/edit.js.map +1 -0
  14. package/build/block/{edit.native.js → v1/edit.native.js} +2 -2
  15. package/build/block/v1/edit.native.js.map +1 -0
  16. package/build/button/index.js +2 -2
  17. package/build/button/save.js +1 -1
  18. package/build/button/save.js.map +1 -1
  19. package/build/code/edit.native.js +13 -14
  20. package/build/code/edit.native.js.map +1 -1
  21. package/build/code/index.js +2 -2
  22. package/build/code/save.js +6 -2
  23. package/build/code/save.js.map +1 -1
  24. package/build/comments-title/deprecated.js +1 -1
  25. package/build/comments-title/index.js +1 -1
  26. package/build/cover/edit/inspector-controls.js +1 -1
  27. package/build/cover/edit/inspector-controls.js.map +1 -1
  28. package/build/cover/edit.native.js +1 -0
  29. package/build/cover/edit.native.js.map +1 -1
  30. package/build/details/index.js +2 -2
  31. package/build/embed/deprecated.js +2 -2
  32. package/build/embed/embed-preview.native.js +1 -1
  33. package/build/embed/embed-preview.native.js.map +1 -1
  34. package/build/embed/icons.js +1 -1
  35. package/build/embed/icons.js.map +1 -1
  36. package/build/embed/index.js +2 -2
  37. package/build/embed/transforms.js +2 -2
  38. package/build/embed/util.js +6 -6
  39. package/build/embed/util.js.map +1 -1
  40. package/build/file/edit.js +20 -28
  41. package/build/file/edit.js.map +1 -1
  42. package/build/file/edit.native.js +1 -1
  43. package/build/file/edit.native.js.map +1 -1
  44. package/build/file/index.js +4 -4
  45. package/build/file/save.js +4 -1
  46. package/build/file/save.js.map +1 -1
  47. package/build/form-input/deprecated.js +147 -0
  48. package/build/form-input/deprecated.js.map +1 -0
  49. package/build/form-input/edit.js +1 -1
  50. package/build/form-input/edit.js.map +1 -1
  51. package/build/form-input/index.js +4 -2
  52. package/build/form-input/index.js.map +1 -1
  53. package/build/form-input/save.js +7 -9
  54. package/build/form-input/save.js.map +1 -1
  55. package/build/gallery/edit.js +38 -58
  56. package/build/gallery/edit.js.map +1 -1
  57. package/build/gallery/gallery.js +19 -24
  58. package/build/gallery/gallery.js.map +1 -1
  59. package/build/gallery/gallery.native.js +1 -1
  60. package/build/gallery/gallery.native.js.map +1 -1
  61. package/build/gallery/index.js +8 -4
  62. package/build/gallery/index.js.map +1 -1
  63. package/build/gallery/transforms.js +4 -68
  64. package/build/gallery/transforms.js.map +1 -1
  65. package/build/gallery/v1/gallery.native.js +1 -1
  66. package/build/gallery/v1/gallery.native.js.map +1 -1
  67. package/build/group/edit.js +6 -1
  68. package/build/group/edit.js.map +1 -1
  69. package/build/group/index.js +5 -1
  70. package/build/group/index.js.map +1 -1
  71. package/build/heading/index.js +3 -6
  72. package/build/heading/index.js.map +1 -1
  73. package/build/image/deprecated.js +11 -0
  74. package/build/image/deprecated.js.map +1 -1
  75. package/build/image/edit.native.js +4 -1
  76. package/build/image/edit.native.js.map +1 -1
  77. package/build/image/image.js +35 -71
  78. package/build/image/image.js.map +1 -1
  79. package/build/image/index.js +2 -2
  80. package/build/image/save.js +3 -1
  81. package/build/image/save.js.map +1 -1
  82. package/build/image/view.js +7 -1
  83. package/build/image/view.js.map +1 -1
  84. package/build/list/edit.js +10 -15
  85. package/build/list/edit.js.map +1 -1
  86. package/build/list-item/edit.js +17 -2
  87. package/build/list-item/edit.js.map +1 -1
  88. package/build/list-item/hooks/use-enter.js +5 -3
  89. package/build/list-item/hooks/use-enter.js.map +1 -1
  90. package/build/list-item/hooks/use-enter.native.js +4 -3
  91. package/build/list-item/hooks/use-enter.native.js.map +1 -1
  92. package/build/list-item/hooks/use-indent-list-item.js +2 -3
  93. package/build/list-item/hooks/use-indent-list-item.js.map +1 -1
  94. package/build/list-item/hooks/use-merge.js +1 -1
  95. package/build/list-item/hooks/use-merge.js.map +1 -1
  96. package/build/list-item/hooks/use-outdent-list-item.js +3 -17
  97. package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
  98. package/build/list-item/hooks/use-space.js +8 -4
  99. package/build/list-item/hooks/use-space.js.map +1 -1
  100. package/build/list-item/index.js +10 -3
  101. package/build/list-item/index.js.map +1 -1
  102. package/build/media-text/media-container.native.js +3 -0
  103. package/build/media-text/media-container.native.js.map +1 -1
  104. package/build/navigation/constants.js +3 -1
  105. package/build/navigation/constants.js.map +1 -1
  106. package/build/navigation/edit/index.js +5 -1
  107. package/build/navigation/edit/index.js.map +1 -1
  108. package/build/navigation/view.js +25 -1
  109. package/build/navigation/view.js.map +1 -1
  110. package/build/page-list/convert-to-links-modal.js +2 -2
  111. package/build/page-list/convert-to-links-modal.js.map +1 -1
  112. package/build/paragraph/edit.js +54 -32
  113. package/build/paragraph/edit.js.map +1 -1
  114. package/build/paragraph/index.js +2 -4
  115. package/build/paragraph/index.js.map +1 -1
  116. package/build/paragraph/transforms.js +2 -4
  117. package/build/paragraph/transforms.js.map +1 -1
  118. package/build/pattern/edit.js +24 -2
  119. package/build/pattern/edit.js.map +1 -1
  120. package/build/pattern/recursion-detector.js +147 -0
  121. package/build/pattern/recursion-detector.js.map +1 -0
  122. package/build/post-featured-image/edit.js +19 -2
  123. package/build/post-featured-image/edit.js.map +1 -1
  124. package/build/post-featured-image/index.js +4 -0
  125. package/build/post-featured-image/index.js.map +1 -1
  126. package/build/post-title/index.js +1 -3
  127. package/build/post-title/index.js.map +1 -1
  128. package/build/preformatted/index.js +2 -3
  129. package/build/preformatted/index.js.map +1 -1
  130. package/build/pullquote/index.js +5 -7
  131. package/build/pullquote/index.js.map +1 -1
  132. package/build/query/edit/inspector-controls/index.js +3 -1
  133. package/build/query/edit/inspector-controls/index.js.map +1 -1
  134. package/build/query/edit/inspector-controls/taxonomy-controls.js +2 -0
  135. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  136. package/build/query-pagination-numbers/index.js +1 -1
  137. package/build/query-title/index.js +1 -3
  138. package/build/query-title/index.js.map +1 -1
  139. package/build/quote/index.js +3 -5
  140. package/build/quote/index.js.map +1 -1
  141. package/build/quote/transforms.js +7 -6
  142. package/build/quote/transforms.js.map +1 -1
  143. package/build/search/edit.js +3 -5
  144. package/build/search/edit.js.map +1 -1
  145. package/build/search/index.js +0 -4
  146. package/build/search/index.js.map +1 -1
  147. package/build/site-logo/edit.js +7 -6
  148. package/build/site-logo/edit.js.map +1 -1
  149. package/build/site-title/index.js +1 -5
  150. package/build/site-title/index.js.map +1 -1
  151. package/build/social-link/icons/gravatar.js +22 -0
  152. package/build/social-link/icons/gravatar.js.map +1 -0
  153. package/build/social-link/icons/index.js +11 -0
  154. package/build/social-link/icons/index.js.map +1 -1
  155. package/build/social-link/variations.js +7 -0
  156. package/build/social-link/variations.js.map +1 -1
  157. package/build/spacer/edit.native.js +2 -2
  158. package/build/spacer/edit.native.js.map +1 -1
  159. package/build/table/edit.js +3 -1
  160. package/build/table/edit.js.map +1 -1
  161. package/build/table/index.js +9 -10
  162. package/build/table/index.js.map +1 -1
  163. package/build/table-of-contents/edit.js +2 -2
  164. package/build/table-of-contents/edit.js.map +1 -1
  165. package/build/table-of-contents/index.js +5 -2
  166. package/build/table-of-contents/index.js.map +1 -1
  167. package/build/tag-cloud/edit.js +5 -9
  168. package/build/tag-cloud/edit.js.map +1 -1
  169. package/build/utils/caption.js +90 -0
  170. package/build/utils/caption.js.map +1 -0
  171. package/build/utils/constants.js +16 -0
  172. package/build/utils/constants.js.map +1 -0
  173. package/build/utils/remove-anchor-tag.js +2 -1
  174. package/build/utils/remove-anchor-tag.js.map +1 -1
  175. package/build/verse/index.js +3 -5
  176. package/build/verse/index.js.map +1 -1
  177. package/build/video/deprecated.js +2 -2
  178. package/build/video/edit.js +16 -57
  179. package/build/video/edit.js.map +1 -1
  180. package/build/video/edit.native.js +1 -1
  181. package/build/video/edit.native.js.map +1 -1
  182. package/build/video/index.js +2 -2
  183. package/build-module/audio/edit.js +19 -66
  184. package/build-module/audio/edit.js.map +1 -1
  185. package/build-module/audio/edit.native.js +2 -2
  186. package/build-module/audio/edit.native.js.map +1 -1
  187. package/build-module/audio/index.js +2 -2
  188. package/build-module/block/edit.js +160 -22
  189. package/build-module/block/edit.js.map +1 -1
  190. package/build-module/block/index.js +3 -2
  191. package/build-module/block/index.js.map +1 -1
  192. package/build-module/block/v1/edit.js +108 -0
  193. package/build-module/block/v1/edit.js.map +1 -0
  194. package/build-module/block/{edit.native.js → v1/edit.native.js} +2 -2
  195. package/build-module/block/v1/edit.native.js.map +1 -0
  196. package/build-module/button/index.js +2 -2
  197. package/build-module/button/save.js +1 -1
  198. package/build-module/button/save.js.map +1 -1
  199. package/build-module/code/edit.native.js +14 -16
  200. package/build-module/code/edit.native.js.map +1 -1
  201. package/build-module/code/index.js +2 -2
  202. package/build-module/code/save.js +6 -2
  203. package/build-module/code/save.js.map +1 -1
  204. package/build-module/comments-title/deprecated.js +1 -1
  205. package/build-module/comments-title/index.js +1 -1
  206. package/build-module/cover/edit/inspector-controls.js +1 -1
  207. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  208. package/build-module/cover/edit.native.js +1 -0
  209. package/build-module/cover/edit.native.js.map +1 -1
  210. package/build-module/details/index.js +2 -2
  211. package/build-module/embed/deprecated.js +2 -2
  212. package/build-module/embed/embed-preview.native.js +2 -2
  213. package/build-module/embed/embed-preview.native.js.map +1 -1
  214. package/build-module/embed/icons.js +1 -1
  215. package/build-module/embed/icons.js.map +1 -1
  216. package/build-module/embed/index.js +2 -2
  217. package/build-module/embed/transforms.js +2 -2
  218. package/build-module/embed/util.js +6 -6
  219. package/build-module/embed/util.js.map +1 -1
  220. package/build-module/file/edit.js +20 -28
  221. package/build-module/file/edit.js.map +1 -1
  222. package/build-module/file/edit.native.js +1 -1
  223. package/build-module/file/edit.native.js.map +1 -1
  224. package/build-module/file/index.js +4 -4
  225. package/build-module/file/save.js +4 -1
  226. package/build-module/file/save.js.map +1 -1
  227. package/build-module/form-input/deprecated.js +138 -0
  228. package/build-module/form-input/deprecated.js.map +1 -0
  229. package/build-module/form-input/edit.js +1 -1
  230. package/build-module/form-input/edit.js.map +1 -1
  231. package/build-module/form-input/index.js +4 -2
  232. package/build-module/form-input/index.js.map +1 -1
  233. package/build-module/form-input/save.js +8 -10
  234. package/build-module/form-input/save.js.map +1 -1
  235. package/build-module/gallery/edit.js +41 -61
  236. package/build-module/gallery/edit.js.map +1 -1
  237. package/build-module/gallery/gallery.js +18 -21
  238. package/build-module/gallery/gallery.js.map +1 -1
  239. package/build-module/gallery/gallery.native.js +2 -2
  240. package/build-module/gallery/gallery.native.js.map +1 -1
  241. package/build-module/gallery/index.js +8 -4
  242. package/build-module/gallery/index.js.map +1 -1
  243. package/build-module/gallery/transforms.js +4 -68
  244. package/build-module/gallery/transforms.js.map +1 -1
  245. package/build-module/gallery/v1/gallery.native.js +2 -2
  246. package/build-module/gallery/v1/gallery.native.js.map +1 -1
  247. package/build-module/group/edit.js +6 -1
  248. package/build-module/group/edit.js.map +1 -1
  249. package/build-module/group/index.js +5 -1
  250. package/build-module/group/index.js.map +1 -1
  251. package/build-module/heading/index.js +3 -6
  252. package/build-module/heading/index.js.map +1 -1
  253. package/build-module/image/deprecated.js +11 -0
  254. package/build-module/image/deprecated.js.map +1 -1
  255. package/build-module/image/edit.native.js +5 -2
  256. package/build-module/image/edit.native.js.map +1 -1
  257. package/build-module/image/image.js +35 -71
  258. package/build-module/image/image.js.map +1 -1
  259. package/build-module/image/index.js +2 -2
  260. package/build-module/image/save.js +3 -1
  261. package/build-module/image/save.js.map +1 -1
  262. package/build-module/image/view.js +7 -1
  263. package/build-module/image/view.js.map +1 -1
  264. package/build-module/list/edit.js +10 -15
  265. package/build-module/list/edit.js.map +1 -1
  266. package/build-module/list-item/edit.js +18 -3
  267. package/build-module/list-item/edit.js.map +1 -1
  268. package/build-module/list-item/hooks/use-enter.js +5 -3
  269. package/build-module/list-item/hooks/use-enter.js.map +1 -1
  270. package/build-module/list-item/hooks/use-enter.native.js +4 -3
  271. package/build-module/list-item/hooks/use-enter.native.js.map +1 -1
  272. package/build-module/list-item/hooks/use-indent-list-item.js +2 -3
  273. package/build-module/list-item/hooks/use-indent-list-item.js.map +1 -1
  274. package/build-module/list-item/hooks/use-merge.js +1 -1
  275. package/build-module/list-item/hooks/use-merge.js.map +1 -1
  276. package/build-module/list-item/hooks/use-outdent-list-item.js +3 -17
  277. package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
  278. package/build-module/list-item/hooks/use-space.js +8 -4
  279. package/build-module/list-item/hooks/use-space.js.map +1 -1
  280. package/build-module/list-item/index.js +10 -3
  281. package/build-module/list-item/index.js.map +1 -1
  282. package/build-module/media-text/media-container.native.js +3 -0
  283. package/build-module/media-text/media-container.native.js.map +1 -1
  284. package/build-module/navigation/constants.js +1 -0
  285. package/build-module/navigation/constants.js.map +1 -1
  286. package/build-module/navigation/edit/index.js +7 -3
  287. package/build-module/navigation/edit/index.js.map +1 -1
  288. package/build-module/navigation/view.js +25 -1
  289. package/build-module/navigation/view.js.map +1 -1
  290. package/build-module/page-list/convert-to-links-modal.js +2 -2
  291. package/build-module/page-list/convert-to-links-modal.js.map +1 -1
  292. package/build-module/paragraph/edit.js +54 -32
  293. package/build-module/paragraph/edit.js.map +1 -1
  294. package/build-module/paragraph/index.js +2 -4
  295. package/build-module/paragraph/index.js.map +1 -1
  296. package/build-module/paragraph/transforms.js +2 -4
  297. package/build-module/paragraph/transforms.js.map +1 -1
  298. package/build-module/pattern/edit.js +26 -4
  299. package/build-module/pattern/edit.js.map +1 -1
  300. package/build-module/pattern/recursion-detector.js +139 -0
  301. package/build-module/pattern/recursion-detector.js.map +1 -0
  302. package/build-module/post-featured-image/edit.js +19 -2
  303. package/build-module/post-featured-image/edit.js.map +1 -1
  304. package/build-module/post-featured-image/index.js +4 -0
  305. package/build-module/post-featured-image/index.js.map +1 -1
  306. package/build-module/post-title/index.js +1 -3
  307. package/build-module/post-title/index.js.map +1 -1
  308. package/build-module/preformatted/index.js +2 -3
  309. package/build-module/preformatted/index.js.map +1 -1
  310. package/build-module/pullquote/index.js +5 -7
  311. package/build-module/pullquote/index.js.map +1 -1
  312. package/build-module/query/edit/inspector-controls/index.js +3 -1
  313. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  314. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +2 -0
  315. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  316. package/build-module/query-pagination-numbers/index.js +1 -1
  317. package/build-module/query-title/index.js +1 -3
  318. package/build-module/query-title/index.js.map +1 -1
  319. package/build-module/quote/index.js +3 -5
  320. package/build-module/quote/index.js.map +1 -1
  321. package/build-module/quote/transforms.js +7 -6
  322. package/build-module/quote/transforms.js.map +1 -1
  323. package/build-module/search/edit.js +3 -5
  324. package/build-module/search/edit.js.map +1 -1
  325. package/build-module/search/index.js +0 -4
  326. package/build-module/search/index.js.map +1 -1
  327. package/build-module/site-logo/edit.js +7 -6
  328. package/build-module/site-logo/edit.js.map +1 -1
  329. package/build-module/site-title/index.js +1 -5
  330. package/build-module/site-title/index.js.map +1 -1
  331. package/build-module/social-link/icons/gravatar.js +14 -0
  332. package/build-module/social-link/icons/gravatar.js.map +1 -0
  333. package/build-module/social-link/icons/index.js +1 -0
  334. package/build-module/social-link/icons/index.js.map +1 -1
  335. package/build-module/social-link/variations.js +8 -1
  336. package/build-module/social-link/variations.js.map +1 -1
  337. package/build-module/spacer/edit.native.js +2 -2
  338. package/build-module/spacer/edit.native.js.map +1 -1
  339. package/build-module/table/edit.js +3 -1
  340. package/build-module/table/edit.js.map +1 -1
  341. package/build-module/table/index.js +9 -10
  342. package/build-module/table/index.js.map +1 -1
  343. package/build-module/table-of-contents/edit.js +1 -1
  344. package/build-module/table-of-contents/edit.js.map +1 -1
  345. package/build-module/table-of-contents/index.js +5 -1
  346. package/build-module/table-of-contents/index.js.map +1 -1
  347. package/build-module/tag-cloud/edit.js +6 -10
  348. package/build-module/tag-cloud/edit.js.map +1 -1
  349. package/build-module/utils/caption.js +82 -0
  350. package/build-module/utils/caption.js.map +1 -0
  351. package/build-module/utils/constants.js +9 -0
  352. package/build-module/utils/constants.js.map +1 -0
  353. package/build-module/utils/remove-anchor-tag.js +2 -1
  354. package/build-module/utils/remove-anchor-tag.js.map +1 -1
  355. package/build-module/verse/index.js +3 -5
  356. package/build-module/verse/index.js.map +1 -1
  357. package/build-module/video/deprecated.js +2 -2
  358. package/build-module/video/edit.js +21 -62
  359. package/build-module/video/edit.js.map +1 -1
  360. package/build-module/video/edit.native.js +2 -2
  361. package/build-module/video/edit.native.js.map +1 -1
  362. package/build-module/video/index.js +2 -2
  363. package/build-style/button/editor-rtl.css +0 -37
  364. package/build-style/button/editor.css +0 -37
  365. package/build-style/button/style-rtl.css +6 -6
  366. package/build-style/button/style.css +6 -6
  367. package/build-style/editor-rtl.css +3 -55
  368. package/build-style/editor.css +3 -55
  369. package/build-style/navigation/editor-rtl.css +2 -4
  370. package/build-style/navigation/editor.css +2 -4
  371. package/build-style/navigation/style-rtl.css +14 -18
  372. package/build-style/navigation/style.css +14 -18
  373. package/build-style/search/style-rtl.css +26 -27
  374. package/build-style/search/style.css +26 -27
  375. package/build-style/social-links/style-rtl.css +14 -2
  376. package/build-style/social-links/style.css +14 -2
  377. package/build-style/style-rtl.css +60 -53
  378. package/build-style/style.css +60 -53
  379. package/build-style/table/editor-rtl.css +1 -14
  380. package/build-style/table/editor.css +1 -14
  381. package/package.json +32 -32
  382. package/src/audio/block.json +2 -2
  383. package/src/audio/edit.js +29 -92
  384. package/src/audio/edit.native.js +2 -1
  385. package/src/audio/test/__snapshots__/edit.native.js.snap +12 -0
  386. package/src/audio/test/edit.native.js +29 -0
  387. package/src/block/edit.js +218 -37
  388. package/src/block/index.js +3 -2
  389. package/src/block/index.php +48 -0
  390. package/src/block/v1/edit.js +163 -0
  391. package/src/block/{edit.native.js → v1/edit.native.js} +2 -2
  392. package/src/button/block.json +2 -2
  393. package/src/button/editor.scss +0 -43
  394. package/src/button/save.js +1 -1
  395. package/src/button/style.scss +6 -6
  396. package/src/buttons/test/__snapshots__/edit.native.js.snap +6 -0
  397. package/src/buttons/test/edit.native.js +49 -0
  398. package/src/code/block.json +2 -2
  399. package/src/code/edit.native.js +11 -13
  400. package/src/code/save.js +4 -1
  401. package/src/code/test/edit.native.js +2 -2
  402. package/src/comments-title/block.json +1 -1
  403. package/src/cover/edit/inspector-controls.js +1 -1
  404. package/src/cover/edit.native.js +1 -0
  405. package/src/cover/test/edit.native.js +7 -1
  406. package/src/details/block.json +2 -2
  407. package/src/embed/block.json +2 -2
  408. package/src/embed/embed-preview.native.js +2 -1
  409. package/src/embed/icons.js +1 -1
  410. package/src/embed/util.js +2 -2
  411. package/src/file/block.json +4 -4
  412. package/src/file/edit.js +18 -25
  413. package/src/file/edit.native.js +1 -1
  414. package/src/file/save.js +5 -1
  415. package/src/form-input/block.json +2 -2
  416. package/src/form-input/deprecated.js +142 -0
  417. package/src/form-input/edit.js +1 -1
  418. package/src/form-input/index.js +2 -0
  419. package/src/form-input/save.js +27 -24
  420. package/src/gallery/block.json +8 -4
  421. package/src/gallery/edit.js +70 -98
  422. package/src/gallery/gallery.js +22 -36
  423. package/src/gallery/gallery.native.js +6 -2
  424. package/src/gallery/index.php +15 -0
  425. package/src/gallery/transforms.js +2 -55
  426. package/src/gallery/v1/gallery.native.js +2 -1
  427. package/src/group/block.json +5 -1
  428. package/src/group/edit.js +4 -1
  429. package/src/heading/block.json +3 -6
  430. package/src/image/block.json +2 -2
  431. package/src/image/deprecated.js +8 -0
  432. package/src/image/edit.native.js +5 -3
  433. package/src/image/image.js +77 -127
  434. package/src/image/index.php +1 -6
  435. package/src/image/save.js +3 -1
  436. package/src/image/view.js +5 -2
  437. package/src/list/edit.js +27 -35
  438. package/src/list-item/block.json +10 -3
  439. package/src/list-item/edit.js +18 -2
  440. package/src/list-item/hooks/use-enter.js +63 -62
  441. package/src/list-item/hooks/use-enter.native.js +9 -5
  442. package/src/list-item/hooks/use-indent-list-item.js +43 -53
  443. package/src/list-item/hooks/use-merge.js +1 -1
  444. package/src/list-item/hooks/use-outdent-list-item.js +50 -69
  445. package/src/list-item/hooks/use-space.js +7 -4
  446. package/src/media-text/media-container.native.js +3 -1
  447. package/src/navigation/constants.js +2 -0
  448. package/src/navigation/edit/index.js +18 -3
  449. package/src/navigation/editor.scss +1 -1
  450. package/src/navigation/index.php +1 -1
  451. package/src/navigation/style.scss +18 -16
  452. package/src/navigation/view.js +29 -3
  453. package/src/navigation-link/test/__snapshots__/hooks.js.snap +6 -3
  454. package/src/page-list/convert-to-links-modal.js +2 -2
  455. package/src/paragraph/block.json +2 -4
  456. package/src/paragraph/edit.js +53 -40
  457. package/src/paragraph/test/__snapshots__/edit.native.js.snap +12 -0
  458. package/src/paragraph/test/edit.native.js +114 -0
  459. package/src/pattern/edit.js +35 -3
  460. package/src/pattern/index.php +16 -0
  461. package/src/pattern/recursion-detector.js +145 -0
  462. package/src/pattern/test/index.js +74 -0
  463. package/src/post-featured-image/block.json +4 -0
  464. package/src/post-featured-image/edit.js +32 -1
  465. package/src/post-featured-image/index.php +31 -0
  466. package/src/post-title/block.json +1 -3
  467. package/src/preformatted/block.json +2 -3
  468. package/src/pullquote/block.json +5 -7
  469. package/src/query/edit/inspector-controls/index.js +2 -0
  470. package/src/query/edit/inspector-controls/taxonomy-controls.js +2 -0
  471. package/src/query-pagination-numbers/block.json +1 -1
  472. package/src/query-title/block.json +1 -3
  473. package/src/quote/block.json +3 -5
  474. package/src/quote/transforms.js +12 -11
  475. package/src/search/block.json +0 -4
  476. package/src/search/edit.js +2 -8
  477. package/src/search/index.php +3 -7
  478. package/src/search/style.scss +27 -29
  479. package/src/site-logo/edit.js +3 -4
  480. package/src/site-title/block.json +1 -5
  481. package/src/social-link/icons/gravatar.js +10 -0
  482. package/src/social-link/icons/index.js +1 -0
  483. package/src/social-link/index.php +5 -1
  484. package/src/social-link/socials-with-bg.scss +5 -0
  485. package/src/social-link/socials-without-bg.scss +4 -0
  486. package/src/social-link/variations.js +7 -0
  487. package/src/social-links/style.scss +14 -8
  488. package/src/spacer/edit.native.js +4 -2
  489. package/src/table/block.json +9 -10
  490. package/src/table/edit.js +3 -1
  491. package/src/table/editor.scss +1 -17
  492. package/src/table-of-contents/edit.js +1 -1
  493. package/src/table-of-contents/index.js +5 -1
  494. package/src/tag-cloud/edit.js +7 -7
  495. package/src/template-part/index.php +6 -0
  496. package/src/utils/caption.js +108 -0
  497. package/src/utils/constants.js +8 -0
  498. package/src/utils/remove-anchor-tag.js +2 -1
  499. package/src/verse/block.json +3 -5
  500. package/src/video/block.json +2 -2
  501. package/src/video/edit.js +40 -100
  502. package/src/video/edit.native.js +2 -1
  503. package/build/block/edit.native.js.map +0 -1
  504. package/build/table-of-contents/icon.js +0 -22
  505. package/build/table-of-contents/icon.js.map +0 -1
  506. package/build-module/block/edit.native.js.map +0 -1
  507. package/build-module/table-of-contents/icon.js +0 -15
  508. package/build-module/table-of-contents/icon.js.map +0 -1
  509. package/src/table-of-contents/icon.js +0 -18
@@ -54,9 +54,40 @@ function render_block_core_post_featured_image( $attributes, $content, $block )
54
54
  }
55
55
 
56
56
  $featured_image = get_the_post_thumbnail( $post_ID, $size_slug, $attr );
57
+
58
+ // Get the first image from the post.
59
+ if ( $attributes['useFirstImageFromPost'] && ! $featured_image ) {
60
+ $content_post = get_post( $post_ID );
61
+ $content = $content_post->post_content;
62
+ $processor = new WP_HTML_Tag_Processor( $content );
63
+
64
+ /*
65
+ * Transfer the image tag from the post into a new text snippet.
66
+ * Because the HTML API doesn't currently expose a way to extract
67
+ * HTML substrings this is necessary as a workaround. Of note, this
68
+ * is different than directly extracting the IMG tag:
69
+ * - If there are duplicate attributes in the source there will only be one in the output.
70
+ * - If there are single-quoted or unquoted attributes they will be double-quoted in the output.
71
+ * - If there are named character references in the attribute values they may be replaced with their direct code points. E.g. `…` becomes `…`.
72
+ * In the future there will likely be a mechanism to copy snippets of HTML from
73
+ * one document into another, via the HTML Processor's `get_outer_html()` or
74
+ * equivalent. When that happens it would be appropriate to replace this custom
75
+ * code with that canonical code.
76
+ */
77
+ if ( $processor->next_tag( 'img' ) ) {
78
+ $tag_html = new WP_HTML_Tag_Processor( '<img>' );
79
+ $tag_html->next_tag();
80
+ foreach ( $processor->get_attribute_names_with_prefix( '' ) as $name ) {
81
+ $tag_html->set_attribute( $name, $processor->get_attribute( $name ) );
82
+ }
83
+ $featured_image = $tag_html->get_updated_html();
84
+ }
85
+ }
86
+
57
87
  if ( ! $featured_image ) {
58
88
  return '';
59
89
  }
90
+
60
91
  if ( $is_link ) {
61
92
  $link_target = $attributes['linkTarget'];
62
93
  $rel = ! empty( $attributes['rel'] ) ? 'rel="' . esc_attr( $attributes['rel'] ) . '"' : '';
@@ -55,9 +55,7 @@
55
55
  "__experimentalTextDecoration": true,
56
56
  "__experimentalLetterSpacing": true,
57
57
  "__experimentalDefaultControls": {
58
- "fontSize": true,
59
- "fontAppearance": true,
60
- "textTransform": true
58
+ "fontSize": true
61
59
  }
62
60
  }
63
61
  },
@@ -8,10 +8,9 @@
8
8
  "textdomain": "default",
9
9
  "attributes": {
10
10
  "content": {
11
- "type": "string",
12
- "source": "html",
11
+ "type": "rich-text",
12
+ "source": "rich-text",
13
13
  "selector": "pre",
14
- "default": "",
15
14
  "__unstablePreserveWhiteSpace": true,
16
15
  "__experimentalRole": "content"
17
16
  }
@@ -8,16 +8,15 @@
8
8
  "textdomain": "default",
9
9
  "attributes": {
10
10
  "value": {
11
- "type": "string",
12
- "source": "html",
11
+ "type": "rich-text",
12
+ "source": "rich-text",
13
13
  "selector": "p",
14
14
  "__experimentalRole": "content"
15
15
  },
16
16
  "citation": {
17
- "type": "string",
18
- "source": "html",
17
+ "type": "rich-text",
18
+ "source": "rich-text",
19
19
  "selector": "cite",
20
- "default": "",
21
20
  "__experimentalRole": "content"
22
21
  },
23
22
  "textAlign": {
@@ -46,8 +45,7 @@
46
45
  "__experimentalTextDecoration": true,
47
46
  "__experimentalLetterSpacing": true,
48
47
  "__experimentalDefaultControls": {
49
- "fontSize": true,
50
- "fontAppearance": true
48
+ "fontSize": true
51
49
  }
52
50
  },
53
51
  "__experimentalBorder": {
@@ -37,6 +37,7 @@ import {
37
37
  isControlAllowed,
38
38
  useTaxonomies,
39
39
  } from '../../utils';
40
+ import { TOOLSPANEL_DROPDOWNMENU_PROPS } from '../../../utils/constants';
40
41
 
41
42
  const { BlockInfo } = unlock( blockEditorPrivateApis );
42
43
 
@@ -226,6 +227,7 @@ export default function QueryInspectorControls( props ) {
226
227
  } );
227
228
  setQuerySearch( '' );
228
229
  } }
230
+ dropdownMenuProps={ TOOLSPANEL_DROPDOWNMENU_PROPS }
229
231
  >
230
232
  { showTaxControl && (
231
233
  <ToolsPanelItem
@@ -6,6 +6,7 @@ import { useSelect } from '@wordpress/data';
6
6
  import { store as coreStore } from '@wordpress/core-data';
7
7
  import { useState, useEffect } from '@wordpress/element';
8
8
  import { useDebounce } from '@wordpress/compose';
9
+ import { decodeEntities } from '@wordpress/html-entities';
9
10
 
10
11
  /**
11
12
  * Internal dependencies
@@ -177,6 +178,7 @@ function TaxonomyItem( { taxonomy, termIds, onChange } ) {
177
178
  value={ value }
178
179
  onInputChange={ debouncedSearch }
179
180
  suggestions={ suggestions }
181
+ displayTransform={ decodeEntities }
180
182
  onChange={ onTermsChange }
181
183
  __experimentalShowHowTo={ false }
182
184
  />
@@ -5,7 +5,7 @@
5
5
  "title": "Page Numbers",
6
6
  "category": "theme",
7
7
  "parent": [ "core/query-pagination" ],
8
- "description": "Displays a list of page numbers for pagination",
8
+ "description": "Displays a list of page numbers for pagination.",
9
9
  "textdomain": "default",
10
10
  "attributes": {
11
11
  "midSize": {
@@ -50,9 +50,7 @@
50
50
  "__experimentalTextTransform": true,
51
51
  "__experimentalTextDecoration": true,
52
52
  "__experimentalDefaultControls": {
53
- "fontSize": true,
54
- "fontAppearance": true,
55
- "textTransform": true
53
+ "fontSize": true
56
54
  }
57
55
  }
58
56
  },
@@ -17,10 +17,9 @@
17
17
  "__experimentalRole": "content"
18
18
  },
19
19
  "citation": {
20
- "type": "string",
21
- "source": "html",
20
+ "type": "rich-text",
21
+ "source": "rich-text",
22
22
  "selector": "cite",
23
- "default": "",
24
23
  "__experimentalRole": "content"
25
24
  },
26
25
  "align": {
@@ -42,8 +41,7 @@
42
41
  "__experimentalTextDecoration": true,
43
42
  "__experimentalLetterSpacing": true,
44
43
  "__experimentalDefaultControls": {
45
- "fontSize": true,
46
- "fontAppearance": true
44
+ "fontSize": true
47
45
  }
48
46
  },
49
47
  "color": {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
+ import { RichText } from '@wordpress/block-editor';
4
5
  import { createBlock } from '@wordpress/blocks';
5
6
 
6
7
  const transforms = {
@@ -113,14 +114,14 @@ const transforms = {
113
114
  type: 'block',
114
115
  blocks: [ 'core/paragraph' ],
115
116
  transform: ( { citation }, innerBlocks ) =>
116
- citation
117
- ? [
117
+ RichText.isEmpty( citation )
118
+ ? innerBlocks
119
+ : [
118
120
  ...innerBlocks,
119
121
  createBlock( 'core/paragraph', {
120
122
  content: citation,
121
123
  } ),
122
- ]
123
- : innerBlocks,
124
+ ],
124
125
  },
125
126
  {
126
127
  type: 'block',
@@ -129,26 +130,26 @@ const transforms = {
129
130
  createBlock(
130
131
  'core/group',
131
132
  { anchor },
132
- citation
133
- ? [
133
+ RichText.isEmpty( citation )
134
+ ? innerBlocks
135
+ : [
134
136
  ...innerBlocks,
135
137
  createBlock( 'core/paragraph', {
136
138
  content: citation,
137
139
  } ),
138
140
  ]
139
- : innerBlocks
140
141
  ),
141
142
  },
142
143
  ],
143
144
  ungroup: ( { citation }, innerBlocks ) =>
144
- citation
145
- ? [
145
+ RichText.isEmpty( citation )
146
+ ? innerBlocks
147
+ : [
146
148
  ...innerBlocks,
147
149
  createBlock( 'core/paragraph', {
148
150
  content: citation,
149
151
  } ),
150
- ]
151
- : innerBlocks,
152
+ ],
152
153
  };
153
154
 
154
155
  export default transforms;
@@ -43,10 +43,6 @@
43
43
  "type": "object",
44
44
  "default": {}
45
45
  },
46
- "buttonBehavior": {
47
- "type": "string",
48
- "default": "expand-searchfield"
49
- },
50
46
  "isSearchFieldHidden": {
51
47
  "type": "boolean",
52
48
  "default": false
@@ -59,8 +59,6 @@ import {
59
59
  // button is placed inside wrapper.
60
60
  const DEFAULT_INNER_PADDING = '4px';
61
61
 
62
- const BUTTON_BEHAVIOR_EXPAND = 'expand-searchfield';
63
-
64
62
  export default function SearchEdit( {
65
63
  className,
66
64
  attributes,
@@ -79,7 +77,6 @@ export default function SearchEdit( {
79
77
  buttonText,
80
78
  buttonPosition,
81
79
  buttonUseIcon,
82
- buttonBehavior,
83
80
  isSearchFieldHidden,
84
81
  style,
85
82
  } = attributes;
@@ -187,9 +184,6 @@ export default function SearchEdit( {
187
184
  buttonUseIcon && ! hasNoButton
188
185
  ? 'wp-block-search__icon-button'
189
186
  : undefined,
190
- hasOnlyButton && BUTTON_BEHAVIOR_EXPAND === buttonBehavior
191
- ? 'wp-block-search__button-behavior-expand'
192
- : undefined,
193
187
  hasOnlyButton && isSearchFieldHidden
194
188
  ? 'wp-block-search__searchfield-hidden'
195
189
  : undefined
@@ -325,7 +319,7 @@ export default function SearchEdit( {
325
319
  : borderProps.style ),
326
320
  };
327
321
  const handleButtonClick = () => {
328
- if ( hasOnlyButton && BUTTON_BEHAVIOR_EXPAND === buttonBehavior ) {
322
+ if ( hasOnlyButton ) {
329
323
  setAttributes( {
330
324
  isSearchFieldHidden: ! isSearchFieldHidden,
331
325
  } );
@@ -453,7 +447,7 @@ export default function SearchEdit( {
453
447
  return (
454
448
  <Button
455
449
  key={ widthValue }
456
- isSmall
450
+ size="small"
457
451
  variant={
458
452
  widthValue === width &&
459
453
  widthUnit === '%'
@@ -36,7 +36,6 @@ function render_block_core_search( $attributes, $content, $block ) {
36
36
  $show_button = ( ! empty( $attributes['buttonPosition'] ) && 'no-button' === $attributes['buttonPosition'] ) ? false : true;
37
37
  $button_position = $show_button ? $attributes['buttonPosition'] : null;
38
38
  $query_params = ( ! empty( $attributes['query'] ) ) ? $attributes['query'] : array();
39
- $button_behavior = ( ! empty( $attributes['buttonBehavior'] ) ) ? $attributes['buttonBehavior'] : 'default';
40
39
  $button = '';
41
40
  $query_params_markup = '';
42
41
  $inline_styles = styles_for_block_core_search( $attributes );
@@ -78,7 +77,7 @@ function render_block_core_search( $attributes, $content, $block ) {
78
77
  $input->set_attribute( 'value', get_search_query() );
79
78
  $input->set_attribute( 'placeholder', $attributes['placeholder'] );
80
79
 
81
- $is_expandable_searchfield = 'button-only' === $button_position && 'expand-searchfield' === $button_behavior;
80
+ $is_expandable_searchfield = 'button-only' === $button_position;
82
81
  if ( $is_expandable_searchfield ) {
83
82
  $input->set_attribute( 'data-wp-bind--aria-hidden', '!context.isSearchInputVisible' );
84
83
  $input->set_attribute( 'data-wp-bind--tabindex', 'state.tabindex' );
@@ -154,7 +153,7 @@ function render_block_core_search( $attributes, $content, $block ) {
154
153
 
155
154
  if ( $button->next_tag() ) {
156
155
  $button->add_class( implode( ' ', $button_classes ) );
157
- if ( 'expand-searchfield' === $attributes['buttonBehavior'] && 'button-only' === $attributes['buttonPosition'] ) {
156
+ if ( 'button-only' === $attributes['buttonPosition'] ) {
158
157
  $button->set_attribute( 'data-wp-bind--aria-label', 'state.ariaLabel' );
159
158
  $button->set_attribute( 'data-wp-bind--aria-controls', 'state.ariaControls' );
160
159
  $button->set_attribute( 'data-wp-bind--aria-expanded', 'context.isSearchInputVisible' );
@@ -249,10 +248,7 @@ function classnames_for_block_core_search( $attributes ) {
249
248
  }
250
249
 
251
250
  if ( 'button-only' === $attributes['buttonPosition'] ) {
252
- $classnames[] = 'wp-block-search__button-only';
253
- if ( ! empty( $attributes['buttonBehavior'] ) && 'expand-searchfield' === $attributes['buttonBehavior'] ) {
254
- $classnames[] = 'wp-block-search__button-behavior-expand wp-block-search__searchfield-hidden';
255
- }
251
+ $classnames[] = 'wp-block-search__button-only wp-block-search__searchfield-hidden';
256
252
  }
257
253
  }
258
254
 
@@ -62,35 +62,7 @@ $button-spacing-y: math.div($grid-unit-15, 2); // 6px
62
62
  .wp-block-search__button[aria-expanded="true"] {
63
63
  max-width: calc(100% - 100px);
64
64
  }
65
- }
66
-
67
- // We are lowering the specificity so that the button element can override the rule for the button inside the search block.
68
- :where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) {
69
- padding: $grid-unit-05;
70
- border: 1px solid $gray-600;
71
- box-sizing: border-box;
72
-
73
- .wp-block-search__input {
74
- border-radius: 0;
75
- border: none;
76
- padding: 0 $grid-unit-05;
77
-
78
- &:focus {
79
- outline: none;
80
- }
81
- }
82
-
83
- // For lower specificity.
84
- :where(.wp-block-search__button) {
85
- padding: $grid-unit-05 $grid-unit-10;
86
- }
87
- }
88
-
89
- .wp-block-search.aligncenter .wp-block-search__inside-wrapper {
90
- margin: auto;
91
- }
92
65
 
93
- .wp-block-search__button-behavior-expand {
94
66
  .wp-block-search__inside-wrapper {
95
67
  transition-property: width;
96
68
  min-width: 0 !important;
@@ -123,7 +95,33 @@ $button-spacing-y: math.div($grid-unit-15, 2); // 6px
123
95
  }
124
96
  }
125
97
 
126
- .wp-block[data-align="right"] .wp-block-search__button-behavior-expand {
98
+ // We are lowering the specificity so that the button element can override the rule for the button inside the search block.
99
+ :where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) {
100
+ padding: $grid-unit-05;
101
+ border: 1px solid $gray-600;
102
+ box-sizing: border-box;
103
+
104
+ .wp-block-search__input {
105
+ border-radius: 0;
106
+ border: none;
107
+ padding: 0 $grid-unit-05;
108
+
109
+ &:focus {
110
+ outline: none;
111
+ }
112
+ }
113
+
114
+ // For lower specificity.
115
+ :where(.wp-block-search__button) {
116
+ padding: $grid-unit-05 $grid-unit-10;
117
+ }
118
+ }
119
+
120
+ .wp-block-search.aligncenter .wp-block-search__inside-wrapper {
121
+ margin: auto;
122
+ }
123
+
124
+ .wp-block[data-align="right"] .wp-block-search.wp-block-search__button-only {
127
125
  .wp-block-search__inside-wrapper {
128
126
  float: right;
129
127
  }
@@ -412,7 +412,6 @@ export default function LogoEdit( {
412
412
  siteIconId,
413
413
  mediaItemData,
414
414
  isRequestingMediaItem,
415
- mediaUpload,
416
415
  } = useSelect( ( select ) => {
417
416
  const { canUser, getEntityRecord, getEditedEntityRecord } =
418
417
  select( coreStore );
@@ -444,9 +443,9 @@ export default function LogoEdit( {
444
443
  mediaItemData: mediaItem,
445
444
  isRequestingMediaItem: _isRequestingMediaItem,
446
445
  siteIconId: _siteIconId,
447
- mediaUpload: select( blockEditorStore ).getSettings().mediaUpload,
448
446
  };
449
447
  }, [] );
448
+ const { getSettings } = useSelect( blockEditorStore );
450
449
 
451
450
  const { editEntityRecord } = useDispatch( coreStore );
452
451
 
@@ -511,8 +510,8 @@ export default function LogoEdit( {
511
510
  };
512
511
 
513
512
  const onFilesDrop = ( filesList ) => {
514
- mediaUpload( {
515
- allowedTypes: [ 'image' ],
513
+ getSettings().mediaUpload( {
514
+ allowedTypes: ALLOWED_MEDIA_TYPES,
516
515
  filesList,
517
516
  onFileChange( [ image ] ) {
518
517
  if ( isBlobURL( image?.url ) ) {
@@ -56,11 +56,7 @@
56
56
  "__experimentalFontWeight": true,
57
57
  "__experimentalLetterSpacing": true,
58
58
  "__experimentalDefaultControls": {
59
- "fontSize": true,
60
- "lineHeight": true,
61
- "fontAppearance": true,
62
- "letterSpacing": true,
63
- "textTransform": true
59
+ "fontSize": true
64
60
  }
65
61
  }
66
62
  },
@@ -0,0 +1,10 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { Path, SVG } from '@wordpress/primitives';
5
+
6
+ export const GravatarIcon = () => (
7
+ <SVG width="24" height="24" viewBox="0 0 24 24" version="1.1">
8
+ <Path d="M10.8001 4.69937V10.6494C10.8001 11.1001 10.9791 11.5323 11.2978 11.851C11.6165 12.1697 12.0487 12.3487 12.4994 12.3487C12.9501 12.3487 13.3824 12.1697 13.7011 11.851C14.0198 11.5323 14.1988 11.1001 14.1988 10.6494V6.69089C15.2418 7.05861 16.1371 7.75537 16.7496 8.67617C17.3622 9.59698 17.6589 10.6919 17.595 11.796C17.5311 12.9001 17.1101 13.9535 16.3954 14.7975C15.6807 15.6415 14.711 16.2303 13.6325 16.4753C12.5541 16.7202 11.4252 16.608 10.4161 16.1555C9.40691 15.703 8.57217 14.9348 8.03763 13.9667C7.50308 12.9985 7.29769 11.8828 7.45242 10.7877C7.60714 9.69266 8.11359 8.67755 8.89545 7.89537C9.20904 7.57521 9.38364 7.14426 9.38132 6.69611C9.37899 6.24797 9.19994 5.81884 8.88305 5.50195C8.56616 5.18506 8.13704 5.00601 7.68889 5.00369C7.24075 5.00137 6.80979 5.17597 6.48964 5.48956C5.09907 6.8801 4.23369 8.7098 4.04094 10.6669C3.84819 12.624 4.34 14.5873 5.43257 16.2224C6.52515 17.8575 8.15088 19.0632 10.0328 19.634C11.9146 20.2049 13.9362 20.1055 15.753 19.3529C17.5699 18.6003 19.0695 17.241 19.9965 15.5066C20.9234 13.7722 21.2203 11.7701 20.8366 9.84133C20.4528 7.91259 19.4122 6.17658 17.892 4.92911C16.3717 3.68163 14.466 2.99987 12.4994 3C12.0487 3 11.6165 3.17904 11.2978 3.49773C10.9791 3.81643 10.8001 4.24867 10.8001 4.69937Z" />
9
+ </SVG>
10
+ );
@@ -15,6 +15,7 @@ export * from './foursquare';
15
15
  export * from './goodreads';
16
16
  export * from './google';
17
17
  export * from './github';
18
+ export * from './gravatar';
18
19
  export * from './instagram';
19
20
  export * from './lastfm';
20
21
  export * from './linkedin';
@@ -33,7 +33,7 @@ function render_block_core_social_link( $attributes, $content, $block ) {
33
33
  * The `is_email` returns false for emails with schema.
34
34
  */
35
35
  if ( is_email( $url ) ) {
36
- $url = 'mailto:' . $url;
36
+ $url = 'mailto:' . antispambot( $url );
37
37
  }
38
38
 
39
39
  /**
@@ -194,6 +194,10 @@ function block_core_social_link_services( $service = '', $field = '' ) {
194
194
  'name' => 'GitHub',
195
195
  'icon' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"></path></svg>',
196
196
  ),
197
+ 'gravatar' => array(
198
+ 'name' => 'Gravatar',
199
+ 'icon' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M10.8001 4.69937V10.6494C10.8001 11.1001 10.9791 11.5323 11.2978 11.851C11.6165 12.1697 12.0487 12.3487 12.4994 12.3487C12.9501 12.3487 13.3824 12.1697 13.7011 11.851C14.0198 11.5323 14.1988 11.1001 14.1988 10.6494V6.69089C15.2418 7.05861 16.1371 7.75537 16.7496 8.67617C17.3622 9.59698 17.6589 10.6919 17.595 11.796C17.5311 12.9001 17.1101 13.9535 16.3954 14.7975C15.6807 15.6415 14.711 16.2303 13.6325 16.4753C12.5541 16.7202 11.4252 16.608 10.4161 16.1555C9.40691 15.703 8.57217 14.9348 8.03763 13.9667C7.50308 12.9985 7.29769 11.8828 7.45242 10.7877C7.60714 9.69266 8.11359 8.67755 8.89545 7.89537C9.20904 7.57521 9.38364 7.14426 9.38132 6.69611C9.37899 6.24797 9.19994 5.81884 8.88305 5.50195C8.56616 5.18506 8.13704 5.00601 7.68889 5.00369C7.24075 5.00137 6.80979 5.17597 6.48964 5.48956C5.09907 6.8801 4.23369 8.7098 4.04094 10.6669C3.84819 12.624 4.34 14.5873 5.43257 16.2224C6.52515 17.8575 8.15088 19.0632 10.0328 19.634C11.9146 20.2049 13.9362 20.1055 15.753 19.3529C17.5699 18.6003 19.0695 17.241 19.9965 15.5066C20.9234 13.7722 21.2203 11.7701 20.8366 9.84133C20.4528 7.91259 19.4122 6.17658 17.892 4.92911C16.3717 3.68163 14.466 2.99987 12.4994 3C12.0487 3 11.6165 3.17904 11.2978 3.49773C10.9791 3.81643 10.8001 4.24867 10.8001 4.69937Z" /></svg>',
200
+ ),
197
201
  'instagram' => array(
198
202
  'name' => 'Instagram',
199
203
  'icon' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z"></path></svg>',
@@ -78,6 +78,11 @@
78
78
  color: #fff;
79
79
  }
80
80
 
81
+ .wp-social-link-gravatar {
82
+ background-color: #1d4fc4;
83
+ color: #fff;
84
+ }
85
+
81
86
  .wp-social-link-instagram {
82
87
  background-color: #f00075;
83
88
  color: #fff;
@@ -58,6 +58,10 @@
58
58
  color: #ea4434;
59
59
  }
60
60
 
61
+ .wp-social-link-gravatar {
62
+ color: #1d4fc4;
63
+ }
64
+
61
65
  .wp-social-link-instagram {
62
66
  color: #f00075;
63
67
  }
@@ -19,6 +19,7 @@ import {
19
19
  GoodreadsIcon,
20
20
  GoogleIcon,
21
21
  GitHubIcon,
22
+ GravatarIcon,
22
23
  InstagramIcon,
23
24
  LastfmIcon,
24
25
  LinkedInIcon,
@@ -160,6 +161,12 @@ const variations = [
160
161
  title: 'GitHub',
161
162
  icon: GitHubIcon,
162
163
  },
164
+ {
165
+ name: 'gravatar',
166
+ attributes: { service: 'gravatar' },
167
+ title: 'Gravatar',
168
+ icon: GravatarIcon,
169
+ },
163
170
  {
164
171
  name: 'instagram',
165
172
  attributes: { service: 'instagram' },
@@ -95,14 +95,20 @@
95
95
  }
96
96
 
97
97
  // This needs specificity because themes usually override it with things like .widget-area a.
98
- .wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor {
99
- &,
100
- &:hover,
101
- &:active,
102
- &:visited,
103
- svg {
104
- color: currentColor;
105
- fill: currentColor;
98
+ .wp-block-social-links .wp-block-social-link.wp-social-link {
99
+ display: inline-block;
100
+ margin: 0;
101
+ padding: 0;
102
+
103
+ .wp-block-social-link-anchor {
104
+ &,
105
+ &:hover,
106
+ &:active,
107
+ &:visited,
108
+ svg {
109
+ color: currentColor;
110
+ fill: currentColor;
111
+ }
106
112
  }
107
113
  }
108
114
 
@@ -6,14 +6,16 @@ import { View, useWindowDimensions } from 'react-native';
6
6
  /**
7
7
  * WordPress dependencies
8
8
  */
9
- import { useConvertUnitToMobile } from '@wordpress/components';
9
+ import {
10
+ useConvertUnitToMobile,
11
+ getPxFromCssUnit,
12
+ } from '@wordpress/components';
10
13
  import { withPreferredColorScheme } from '@wordpress/compose';
11
14
  import {
12
15
  InspectorControls,
13
16
  isValueSpacingPreset,
14
17
  useSettings,
15
18
  getCustomValueFromPreset,
16
- getPxFromCssUnit,
17
19
  } from '@wordpress/block-editor';
18
20
  import { useEffect } from '@wordpress/element';
19
21
 
@@ -12,10 +12,9 @@
12
12
  "default": false
13
13
  },
14
14
  "caption": {
15
- "type": "string",
16
- "source": "html",
17
- "selector": "figcaption",
18
- "default": ""
15
+ "type": "rich-text",
16
+ "source": "rich-text",
17
+ "selector": "figcaption"
19
18
  },
20
19
  "head": {
21
20
  "type": "array",
@@ -30,8 +29,8 @@
30
29
  "selector": "td,th",
31
30
  "query": {
32
31
  "content": {
33
- "type": "string",
34
- "source": "html"
32
+ "type": "rich-text",
33
+ "source": "rich-text"
35
34
  },
36
35
  "tag": {
37
36
  "type": "string",
@@ -75,8 +74,8 @@
75
74
  "selector": "td,th",
76
75
  "query": {
77
76
  "content": {
78
- "type": "string",
79
- "source": "html"
77
+ "type": "rich-text",
78
+ "source": "rich-text"
80
79
  },
81
80
  "tag": {
82
81
  "type": "string",
@@ -120,8 +119,8 @@
120
119
  "selector": "td,th",
121
120
  "query": {
122
121
  "content": {
123
- "type": "string",
124
- "source": "html"
122
+ "type": "rich-text",
123
+ "source": "rich-text"
125
124
  },
126
125
  "tag": {
127
126
  "type": "string",
package/src/table/edit.js CHANGED
@@ -555,6 +555,7 @@ function TableEdit( {
555
555
  >
556
556
  <TextControl
557
557
  __nextHasNoMarginBottom
558
+ __next40pxDefaultSize
558
559
  type="number"
559
560
  label={ __( 'Column count' ) }
560
561
  value={ initialColumnCount }
@@ -564,6 +565,7 @@ function TableEdit( {
564
565
  />
565
566
  <TextControl
566
567
  __nextHasNoMarginBottom
568
+ __next40pxDefaultSize
567
569
  type="number"
568
570
  label={ __( 'Row count' ) }
569
571
  value={ initialRowCount }
@@ -572,7 +574,7 @@ function TableEdit( {
572
574
  className="blocks-table__placeholder-input"
573
575
  />
574
576
  <Button
575
- className="blocks-table__placeholder-button"
577
+ __next40pxDefaultSize
576
578
  variant="primary"
577
579
  type="submit"
578
580
  >