@wordpress/block-library 7.12.0 → 7.12.2-next.d6164808d3.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 (626) 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/comment-author-name/index.js +5 -1
  26. package/build/comment-author-name/index.js.map +1 -1
  27. package/build/comment-content/index.js +5 -1
  28. package/build/comment-content/index.js.map +1 -1
  29. package/build/comment-date/index.js +1 -0
  30. package/build/comment-date/index.js.map +1 -1
  31. package/build/comment-edit-link/index.js +5 -1
  32. package/build/comment-edit-link/index.js.map +1 -1
  33. package/build/comment-reply-link/index.js +5 -1
  34. package/build/comment-reply-link/index.js.map +1 -1
  35. package/build/comment-template/index.js +14 -1
  36. package/build/comment-template/index.js.map +1 -1
  37. package/build/comments/index.js +13 -0
  38. package/build/comments/index.js.map +1 -1
  39. package/build/comments-pagination/index.js +13 -0
  40. package/build/comments-pagination/index.js.map +1 -1
  41. package/build/comments-pagination-next/index.js +4 -2
  42. package/build/comments-pagination-next/index.js.map +1 -1
  43. package/build/comments-pagination-numbers/edit.js +5 -1
  44. package/build/comments-pagination-numbers/edit.js.map +1 -1
  45. package/build/comments-pagination-numbers/index.js +14 -1
  46. package/build/comments-pagination-numbers/index.js.map +1 -1
  47. package/build/comments-pagination-previous/index.js +4 -2
  48. package/build/comments-pagination-previous/index.js.map +1 -1
  49. package/build/comments-title/deprecated.js +4 -2
  50. package/build/comments-title/deprecated.js.map +1 -1
  51. package/build/comments-title/index.js +4 -2
  52. package/build/comments-title/index.js.map +1 -1
  53. package/build/cover/deprecated.js +20 -5
  54. package/build/cover/deprecated.js.map +1 -1
  55. package/build/cover/index.js +13 -0
  56. package/build/cover/index.js.map +1 -1
  57. package/build/cover/shared.js +1 -1
  58. package/build/cover/shared.js.map +1 -1
  59. package/build/embed/icons.js +1 -1
  60. package/build/embed/icons.js.map +1 -1
  61. package/build/gallery/deprecated.js +6 -1
  62. package/build/gallery/deprecated.js.map +1 -1
  63. package/build/gallery/edit.js +15 -2
  64. package/build/gallery/edit.js.map +1 -1
  65. package/build/gallery/index.js +5 -0
  66. package/build/gallery/index.js.map +1 -1
  67. package/build/gallery/transforms.js +20 -7
  68. package/build/gallery/transforms.js.map +1 -1
  69. package/build/gallery/utils.js +7 -6
  70. package/build/gallery/utils.js.map +1 -1
  71. package/build/group/deprecated.js +108 -12
  72. package/build/group/deprecated.js.map +1 -1
  73. package/build/group/edit.js +23 -1
  74. package/build/group/edit.js.map +1 -1
  75. package/build/group/index.js +10 -2
  76. package/build/group/index.js.map +1 -1
  77. package/build/group/variations.js +8 -8
  78. package/build/group/variations.js.map +1 -1
  79. package/build/heading/deprecated.js +5 -3
  80. package/build/heading/deprecated.js.map +1 -1
  81. package/build/heading/index.js +3 -1
  82. package/build/heading/index.js.map +1 -1
  83. package/build/heading/transforms.js +3 -1
  84. package/build/heading/transforms.js.map +1 -1
  85. package/build/home-link/edit.js +8 -4
  86. package/build/home-link/edit.js.map +1 -1
  87. package/build/image/edit.js +13 -1
  88. package/build/image/edit.js.map +1 -1
  89. package/build/image/index.js +13 -7
  90. package/build/image/index.js.map +1 -1
  91. package/build/index.native.js +6 -3
  92. package/build/index.native.js.map +1 -1
  93. package/build/list-item/edit.js +3 -1
  94. package/build/list-item/edit.js.map +1 -1
  95. package/build/list-item/hooks/index.js +8 -0
  96. package/build/list-item/hooks/index.js.map +1 -1
  97. package/build/list-item/hooks/use-copy.js +42 -0
  98. package/build/list-item/hooks/use-copy.js.map +1 -0
  99. package/build/list-item/list-style-type.native.js +4 -1
  100. package/build/list-item/list-style-type.native.js.map +1 -1
  101. package/build/media-text/deprecated.js +5 -1
  102. package/build/media-text/deprecated.js.map +1 -1
  103. package/build/media-text/index.js +13 -0
  104. package/build/media-text/index.js.map +1 -1
  105. package/build/navigation/deprecated.js +6 -1
  106. package/build/navigation/deprecated.js.map +1 -1
  107. package/build/navigation/edit/index.js +119 -38
  108. package/build/navigation/edit/index.js.map +1 -1
  109. package/build/navigation/edit/unsaved-inner-blocks.js +2 -1
  110. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  111. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -7
  112. package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  113. package/build/navigation/menu-items-to-blocks.js +1 -7
  114. package/build/navigation/menu-items-to-blocks.js.map +1 -1
  115. package/build/navigation/use-navigation-menu.js +8 -7
  116. package/build/navigation/use-navigation-menu.js.map +1 -1
  117. package/build/navigation-link/edit.js +6 -8
  118. package/build/navigation-link/edit.js.map +1 -1
  119. package/build/navigation-submenu/edit.js +4 -6
  120. package/build/navigation-submenu/edit.js.map +1 -1
  121. package/build/page-list/edit.js +7 -3
  122. package/build/page-list/edit.js.map +1 -1
  123. package/build/paragraph/deprecated.js +18 -10
  124. package/build/paragraph/deprecated.js.map +1 -1
  125. package/build/paragraph/edit.js +1 -0
  126. package/build/paragraph/edit.js.map +1 -1
  127. package/build/paragraph/index.js +5 -0
  128. package/build/paragraph/index.js.map +1 -1
  129. package/build/paragraph/transforms.js +5 -0
  130. package/build/paragraph/transforms.js.map +1 -1
  131. package/build/post-author/index.js +4 -2
  132. package/build/post-author/index.js.map +1 -1
  133. package/build/post-author-biography/index.js +1 -0
  134. package/build/post-author-biography/index.js.map +1 -1
  135. package/build/post-author-name/index.js +5 -1
  136. package/build/post-author-name/index.js.map +1 -1
  137. package/build/post-comments-count/edit.js +11 -1
  138. package/build/post-comments-count/edit.js.map +1 -1
  139. package/build/post-comments-count/index.js +4 -1
  140. package/build/post-comments-count/index.js.map +1 -1
  141. package/build/post-comments-link/index.js +4 -2
  142. package/build/post-comments-link/index.js.map +1 -1
  143. package/build/post-date/edit.js +9 -2
  144. package/build/post-date/edit.js.map +1 -1
  145. package/build/post-date/index.js +9 -0
  146. package/build/post-date/index.js.map +1 -1
  147. package/build/post-featured-image/edit.js +27 -12
  148. package/build/post-featured-image/edit.js.map +1 -1
  149. package/build/post-featured-image/index.js +12 -0
  150. package/build/post-featured-image/index.js.map +1 -1
  151. package/build/post-navigation-link/index.js +3 -2
  152. package/build/post-navigation-link/index.js.map +1 -1
  153. package/build/post-template/edit.js +8 -4
  154. package/build/post-template/edit.js.map +1 -1
  155. package/build/post-template/index.js +14 -1
  156. package/build/post-template/index.js.map +1 -1
  157. package/build/post-terms/index.js +5 -3
  158. package/build/post-terms/index.js.map +1 -1
  159. package/build/post-title/index.js +2 -1
  160. package/build/post-title/index.js.map +1 -1
  161. package/build/preformatted/index.js +4 -2
  162. package/build/preformatted/index.js.map +1 -1
  163. package/build/pullquote/deprecated.js +135 -25
  164. package/build/pullquote/deprecated.js.map +1 -1
  165. package/build/pullquote/edit.js +1 -1
  166. package/build/pullquote/edit.js.map +1 -1
  167. package/build/pullquote/edit.native.js +0 -1
  168. package/build/pullquote/edit.native.js.map +1 -1
  169. package/build/pullquote/index.js +13 -6
  170. package/build/pullquote/index.js.map +1 -1
  171. package/build/pullquote/save.js +2 -2
  172. package/build/pullquote/save.js.map +1 -1
  173. package/build/pullquote/transforms.js +14 -33
  174. package/build/pullquote/transforms.js.map +1 -1
  175. package/build/query/deprecated.js +10 -9
  176. package/build/query/deprecated.js.map +1 -1
  177. package/build/query/edit/index.js +19 -8
  178. package/build/query/edit/index.js.map +1 -1
  179. package/build/query/edit/inspector-controls/taxonomy-controls.js +1 -0
  180. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  181. package/build/query/edit/query-placeholder.js +6 -1
  182. package/build/query/edit/query-placeholder.js.map +1 -1
  183. package/build/query/utils.js +35 -9
  184. package/build/query/utils.js.map +1 -1
  185. package/build/query-no-results/edit.js +1 -1
  186. package/build/query-no-results/edit.js.map +1 -1
  187. package/build/query-title/edit.js +10 -1
  188. package/build/query-title/edit.js.map +1 -1
  189. package/build/query-title/index.js +7 -2
  190. package/build/query-title/index.js.map +1 -1
  191. package/build/quote/deprecated.js +13 -6
  192. package/build/quote/deprecated.js.map +1 -1
  193. package/build/quote/transforms.js +22 -37
  194. package/build/quote/transforms.js.map +1 -1
  195. package/build/separator/deprecated.js +3 -4
  196. package/build/separator/deprecated.js.map +1 -1
  197. package/build/separator/index.js +1 -0
  198. package/build/separator/index.js.map +1 -1
  199. package/build/social-link/icons/reddit.js +1 -1
  200. package/build/social-link/icons/reddit.js.map +1 -1
  201. package/build/social-links/edit.js +2 -1
  202. package/build/social-links/edit.js.map +1 -1
  203. package/build/spacer/index.js +7 -1
  204. package/build/spacer/index.js.map +1 -1
  205. package/build/table/index.js +4 -0
  206. package/build/table/index.js.map +1 -1
  207. package/build/table/state.js +9 -3
  208. package/build/table/state.js.map +1 -1
  209. package/build/table-of-contents/index.js +11 -1
  210. package/build/table-of-contents/index.js.map +1 -1
  211. package/build/tag-cloud/index.js +5 -1
  212. package/build/tag-cloud/index.js.map +1 -1
  213. package/build/template-part/index.js +2 -2
  214. package/build/template-part/index.js.map +1 -1
  215. package/build/term-description/index.js +4 -0
  216. package/build/term-description/index.js.map +1 -1
  217. package/build/text-columns/edit.js +3 -1
  218. package/build/text-columns/edit.js.map +1 -1
  219. package/build/text-columns/save.js +3 -1
  220. package/build/text-columns/save.js.map +1 -1
  221. package/build/verse/index.js +1 -0
  222. package/build/verse/index.js.map +1 -1
  223. package/build/video/index.js +4 -0
  224. package/build/video/index.js.map +1 -1
  225. package/build-module/archives/index.js +5 -1
  226. package/build-module/archives/index.js.map +1 -1
  227. package/build-module/audio/index.js +4 -0
  228. package/build-module/audio/index.js.map +1 -1
  229. package/build-module/button/deprecated.js +14 -4
  230. package/build-module/button/deprecated.js.map +1 -1
  231. package/build-module/button/index.js +1 -1
  232. package/build-module/categories/edit.js +4 -2
  233. package/build-module/categories/edit.js.map +1 -1
  234. package/build-module/categories/index.js +14 -1
  235. package/build-module/categories/index.js.map +1 -1
  236. package/build-module/code/index.js +4 -2
  237. package/build-module/code/index.js.map +1 -1
  238. package/build-module/column/index.js +13 -0
  239. package/build-module/column/index.js.map +1 -1
  240. package/build-module/columns/deprecated.js +16 -4
  241. package/build-module/columns/deprecated.js.map +1 -1
  242. package/build-module/columns/edit.js +7 -3
  243. package/build-module/columns/edit.js.map +1 -1
  244. package/build-module/columns/edit.native.js +7 -3
  245. package/build-module/columns/edit.native.js.map +1 -1
  246. package/build-module/columns/index.js +13 -0
  247. package/build-module/columns/index.js.map +1 -1
  248. package/build-module/comment-author-name/index.js +5 -1
  249. package/build-module/comment-author-name/index.js.map +1 -1
  250. package/build-module/comment-content/index.js +5 -1
  251. package/build-module/comment-content/index.js.map +1 -1
  252. package/build-module/comment-date/index.js +1 -0
  253. package/build-module/comment-date/index.js.map +1 -1
  254. package/build-module/comment-edit-link/index.js +5 -1
  255. package/build-module/comment-edit-link/index.js.map +1 -1
  256. package/build-module/comment-reply-link/index.js +5 -1
  257. package/build-module/comment-reply-link/index.js.map +1 -1
  258. package/build-module/comment-template/index.js +14 -1
  259. package/build-module/comment-template/index.js.map +1 -1
  260. package/build-module/comments/index.js +13 -0
  261. package/build-module/comments/index.js.map +1 -1
  262. package/build-module/comments-pagination/index.js +13 -0
  263. package/build-module/comments-pagination/index.js.map +1 -1
  264. package/build-module/comments-pagination-next/index.js +4 -2
  265. package/build-module/comments-pagination-next/index.js.map +1 -1
  266. package/build-module/comments-pagination-numbers/edit.js +5 -1
  267. package/build-module/comments-pagination-numbers/edit.js.map +1 -1
  268. package/build-module/comments-pagination-numbers/index.js +14 -1
  269. package/build-module/comments-pagination-numbers/index.js.map +1 -1
  270. package/build-module/comments-pagination-previous/index.js +4 -2
  271. package/build-module/comments-pagination-previous/index.js.map +1 -1
  272. package/build-module/comments-title/deprecated.js +4 -2
  273. package/build-module/comments-title/deprecated.js.map +1 -1
  274. package/build-module/comments-title/index.js +4 -2
  275. package/build-module/comments-title/index.js.map +1 -1
  276. package/build-module/cover/deprecated.js +20 -4
  277. package/build-module/cover/deprecated.js.map +1 -1
  278. package/build-module/cover/index.js +13 -0
  279. package/build-module/cover/index.js.map +1 -1
  280. package/build-module/cover/shared.js +1 -1
  281. package/build-module/cover/shared.js.map +1 -1
  282. package/build-module/embed/icons.js +1 -1
  283. package/build-module/embed/icons.js.map +1 -1
  284. package/build-module/gallery/deprecated.js +7 -2
  285. package/build-module/gallery/deprecated.js.map +1 -1
  286. package/build-module/gallery/edit.js +15 -2
  287. package/build-module/gallery/edit.js.map +1 -1
  288. package/build-module/gallery/index.js +5 -0
  289. package/build-module/gallery/index.js.map +1 -1
  290. package/build-module/gallery/transforms.js +20 -7
  291. package/build-module/gallery/transforms.js.map +1 -1
  292. package/build-module/gallery/utils.js +7 -6
  293. package/build-module/gallery/utils.js.map +1 -1
  294. package/build-module/group/deprecated.js +109 -12
  295. package/build-module/group/deprecated.js.map +1 -1
  296. package/build-module/group/edit.js +25 -2
  297. package/build-module/group/edit.js.map +1 -1
  298. package/build-module/group/index.js +10 -2
  299. package/build-module/group/index.js.map +1 -1
  300. package/build-module/group/variations.js +8 -8
  301. package/build-module/group/variations.js.map +1 -1
  302. package/build-module/heading/deprecated.js +5 -2
  303. package/build-module/heading/deprecated.js.map +1 -1
  304. package/build-module/heading/index.js +3 -1
  305. package/build-module/heading/index.js.map +1 -1
  306. package/build-module/heading/transforms.js +3 -1
  307. package/build-module/heading/transforms.js.map +1 -1
  308. package/build-module/home-link/edit.js +10 -6
  309. package/build-module/home-link/edit.js.map +1 -1
  310. package/build-module/image/edit.js +14 -2
  311. package/build-module/image/edit.js.map +1 -1
  312. package/build-module/image/index.js +13 -7
  313. package/build-module/image/index.js.map +1 -1
  314. package/build-module/index.native.js +6 -2
  315. package/build-module/index.native.js.map +1 -1
  316. package/build-module/list-item/edit.js +4 -2
  317. package/build-module/list-item/edit.js.map +1 -1
  318. package/build-module/list-item/hooks/index.js +1 -0
  319. package/build-module/list-item/hooks/index.js.map +1 -1
  320. package/build-module/list-item/hooks/use-copy.js +32 -0
  321. package/build-module/list-item/hooks/use-copy.js.map +1 -0
  322. package/build-module/list-item/list-style-type.native.js +3 -1
  323. package/build-module/list-item/list-style-type.native.js.map +1 -1
  324. package/build-module/media-text/deprecated.js +6 -2
  325. package/build-module/media-text/deprecated.js.map +1 -1
  326. package/build-module/media-text/index.js +13 -0
  327. package/build-module/media-text/index.js.map +1 -1
  328. package/build-module/navigation/deprecated.js +7 -2
  329. package/build-module/navigation/deprecated.js.map +1 -1
  330. package/build-module/navigation/edit/index.js +120 -40
  331. package/build-module/navigation/edit/index.js.map +1 -1
  332. package/build-module/navigation/edit/unsaved-inner-blocks.js +2 -1
  333. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  334. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -7
  335. package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
  336. package/build-module/navigation/menu-items-to-blocks.js +1 -6
  337. package/build-module/navigation/menu-items-to-blocks.js.map +1 -1
  338. package/build-module/navigation/use-navigation-menu.js +8 -7
  339. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  340. package/build-module/navigation-link/edit.js +7 -9
  341. package/build-module/navigation-link/edit.js.map +1 -1
  342. package/build-module/navigation-submenu/edit.js +5 -7
  343. package/build-module/navigation-submenu/edit.js.map +1 -1
  344. package/build-module/page-list/edit.js +7 -2
  345. package/build-module/page-list/edit.js.map +1 -1
  346. package/build-module/paragraph/deprecated.js +18 -9
  347. package/build-module/paragraph/deprecated.js.map +1 -1
  348. package/build-module/paragraph/edit.js +1 -0
  349. package/build-module/paragraph/edit.js.map +1 -1
  350. package/build-module/paragraph/index.js +5 -0
  351. package/build-module/paragraph/index.js.map +1 -1
  352. package/build-module/paragraph/transforms.js +5 -0
  353. package/build-module/paragraph/transforms.js.map +1 -1
  354. package/build-module/post-author/index.js +4 -2
  355. package/build-module/post-author/index.js.map +1 -1
  356. package/build-module/post-author-biography/index.js +1 -0
  357. package/build-module/post-author-biography/index.js.map +1 -1
  358. package/build-module/post-author-name/index.js +5 -1
  359. package/build-module/post-author-name/index.js.map +1 -1
  360. package/build-module/post-comments-count/edit.js +10 -1
  361. package/build-module/post-comments-count/edit.js.map +1 -1
  362. package/build-module/post-comments-count/index.js +4 -1
  363. package/build-module/post-comments-count/index.js.map +1 -1
  364. package/build-module/post-comments-link/index.js +4 -2
  365. package/build-module/post-comments-link/index.js.map +1 -1
  366. package/build-module/post-date/edit.js +9 -2
  367. package/build-module/post-date/edit.js.map +1 -1
  368. package/build-module/post-date/index.js +9 -0
  369. package/build-module/post-date/index.js.map +1 -1
  370. package/build-module/post-featured-image/edit.js +28 -13
  371. package/build-module/post-featured-image/edit.js.map +1 -1
  372. package/build-module/post-featured-image/index.js +12 -0
  373. package/build-module/post-featured-image/index.js.map +1 -1
  374. package/build-module/post-navigation-link/index.js +3 -2
  375. package/build-module/post-navigation-link/index.js.map +1 -1
  376. package/build-module/post-template/edit.js +8 -4
  377. package/build-module/post-template/edit.js.map +1 -1
  378. package/build-module/post-template/index.js +14 -1
  379. package/build-module/post-template/index.js.map +1 -1
  380. package/build-module/post-terms/index.js +5 -3
  381. package/build-module/post-terms/index.js.map +1 -1
  382. package/build-module/post-title/index.js +2 -1
  383. package/build-module/post-title/index.js.map +1 -1
  384. package/build-module/preformatted/index.js +4 -2
  385. package/build-module/preformatted/index.js.map +1 -1
  386. package/build-module/pullquote/deprecated.js +134 -25
  387. package/build-module/pullquote/deprecated.js.map +1 -1
  388. package/build-module/pullquote/edit.js +1 -1
  389. package/build-module/pullquote/edit.js.map +1 -1
  390. package/build-module/pullquote/edit.native.js +0 -1
  391. package/build-module/pullquote/edit.native.js.map +1 -1
  392. package/build-module/pullquote/index.js +13 -6
  393. package/build-module/pullquote/index.js.map +1 -1
  394. package/build-module/pullquote/save.js +2 -2
  395. package/build-module/pullquote/save.js.map +1 -1
  396. package/build-module/pullquote/transforms.js +15 -34
  397. package/build-module/pullquote/transforms.js.map +1 -1
  398. package/build-module/query/deprecated.js +10 -8
  399. package/build-module/query/deprecated.js.map +1 -1
  400. package/build-module/query/edit/index.js +23 -12
  401. package/build-module/query/edit/index.js.map +1 -1
  402. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +1 -0
  403. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  404. package/build-module/query/edit/query-placeholder.js +6 -1
  405. package/build-module/query/edit/query-placeholder.js.map +1 -1
  406. package/build-module/query/utils.js +32 -7
  407. package/build-module/query/utils.js.map +1 -1
  408. package/build-module/query-no-results/edit.js +1 -1
  409. package/build-module/query-no-results/edit.js.map +1 -1
  410. package/build-module/query-title/edit.js +10 -1
  411. package/build-module/query-title/edit.js.map +1 -1
  412. package/build-module/query-title/index.js +7 -2
  413. package/build-module/query-title/index.js.map +1 -1
  414. package/build-module/quote/deprecated.js +13 -5
  415. package/build-module/quote/deprecated.js.map +1 -1
  416. package/build-module/quote/transforms.js +23 -38
  417. package/build-module/quote/transforms.js.map +1 -1
  418. package/build-module/separator/deprecated.js +3 -3
  419. package/build-module/separator/deprecated.js.map +1 -1
  420. package/build-module/separator/index.js +1 -0
  421. package/build-module/separator/index.js.map +1 -1
  422. package/build-module/social-link/icons/reddit.js +1 -1
  423. package/build-module/social-link/icons/reddit.js.map +1 -1
  424. package/build-module/social-links/edit.js +2 -1
  425. package/build-module/social-links/edit.js.map +1 -1
  426. package/build-module/spacer/index.js +7 -1
  427. package/build-module/spacer/index.js.map +1 -1
  428. package/build-module/table/index.js +4 -0
  429. package/build-module/table/index.js.map +1 -1
  430. package/build-module/table/state.js +10 -4
  431. package/build-module/table/state.js.map +1 -1
  432. package/build-module/table-of-contents/index.js +11 -1
  433. package/build-module/table-of-contents/index.js.map +1 -1
  434. package/build-module/tag-cloud/index.js +5 -1
  435. package/build-module/tag-cloud/index.js.map +1 -1
  436. package/build-module/template-part/index.js +2 -2
  437. package/build-module/template-part/index.js.map +1 -1
  438. package/build-module/term-description/index.js +4 -0
  439. package/build-module/term-description/index.js.map +1 -1
  440. package/build-module/text-columns/edit.js +4 -2
  441. package/build-module/text-columns/edit.js.map +1 -1
  442. package/build-module/text-columns/save.js +4 -2
  443. package/build-module/text-columns/save.js.map +1 -1
  444. package/build-module/verse/index.js +1 -0
  445. package/build-module/verse/index.js.map +1 -1
  446. package/build-module/video/index.js +4 -0
  447. package/build-module/video/index.js.map +1 -1
  448. package/build-style/audio/style-rtl.css +3 -0
  449. package/build-style/audio/style.css +3 -0
  450. package/build-style/button/style-rtl.css +6 -6
  451. package/build-style/button/style.css +6 -6
  452. package/build-style/editor-rtl.css +105 -122
  453. package/build-style/editor.css +105 -122
  454. package/build-style/group/editor-rtl.css +27 -8
  455. package/build-style/group/editor.css +27 -8
  456. package/build-style/image/editor-rtl.css +21 -2
  457. package/build-style/image/editor.css +21 -2
  458. package/build-style/navigation/editor-rtl.css +8 -4
  459. package/build-style/navigation/editor.css +8 -4
  460. package/build-style/navigation/style-rtl.css +2 -2
  461. package/build-style/navigation/style.css +2 -2
  462. package/build-style/paragraph/editor-rtl.css +1 -1
  463. package/build-style/paragraph/editor.css +1 -1
  464. package/build-style/post-date/style-rtl.css +79 -0
  465. package/build-style/post-date/style.css +79 -0
  466. package/build-style/post-featured-image/editor-rtl.css +45 -43
  467. package/build-style/post-featured-image/editor.css +45 -43
  468. package/build-style/post-featured-image/style-rtl.css +1 -0
  469. package/build-style/post-featured-image/style.css +1 -0
  470. package/build-style/post-title/style-rtl.css +1 -0
  471. package/build-style/post-title/style.css +1 -0
  472. package/build-style/pullquote/editor-rtl.css +0 -12
  473. package/build-style/pullquote/editor.css +0 -12
  474. package/build-style/pullquote/style-rtl.css +1 -8
  475. package/build-style/pullquote/style.css +1 -8
  476. package/build-style/query-title/style-rtl.css +79 -0
  477. package/build-style/query-title/style.css +79 -0
  478. package/build-style/site-logo/editor-rtl.css +3 -52
  479. package/build-style/site-logo/editor.css +3 -52
  480. package/build-style/social-links/style-rtl.css +2 -2
  481. package/build-style/social-links/style.css +2 -2
  482. package/build-style/style-rtl.css +27 -18
  483. package/build-style/style.css +27 -18
  484. package/build-style/video/style-rtl.css +3 -0
  485. package/build-style/video/style.css +3 -0
  486. package/package.json +30 -29
  487. package/src/archives/block.json +5 -1
  488. package/src/audio/block.json +4 -0
  489. package/src/audio/style.scss +2 -0
  490. package/src/button/block.json +1 -1
  491. package/src/button/deprecated.js +21 -22
  492. package/src/button/style.scss +6 -6
  493. package/src/calendar/index.php +2 -2
  494. package/src/categories/block.json +14 -1
  495. package/src/categories/edit.js +2 -2
  496. package/src/code/block.json +4 -2
  497. package/src/column/block.json +13 -0
  498. package/src/columns/block.json +13 -0
  499. package/src/columns/deprecated.js +10 -4
  500. package/src/columns/edit.js +7 -3
  501. package/src/columns/edit.native.js +7 -3
  502. package/src/comment-author-name/block.json +5 -1
  503. package/src/comment-content/block.json +5 -1
  504. package/src/comment-date/block.json +1 -0
  505. package/src/comment-edit-link/block.json +5 -1
  506. package/src/comment-reply-link/block.json +5 -1
  507. package/src/comment-template/block.json +14 -1
  508. package/src/comments/block.json +13 -0
  509. package/src/comments/index.php +6 -5
  510. package/src/comments-pagination/block.json +13 -0
  511. package/src/comments-pagination-next/block.json +4 -2
  512. package/src/comments-pagination-numbers/block.json +14 -1
  513. package/src/comments-pagination-numbers/edit.js +12 -3
  514. package/src/comments-pagination-previous/block.json +4 -2
  515. package/src/comments-title/block.json +4 -2
  516. package/src/cover/block.json +13 -0
  517. package/src/cover/deprecated.js +11 -4
  518. package/src/cover/shared.js +2 -1
  519. package/src/embed/icons.js +1 -1
  520. package/src/gallery/block.json +5 -0
  521. package/src/gallery/deprecated.js +4 -2
  522. package/src/gallery/edit.js +22 -2
  523. package/src/gallery/transforms.js +18 -5
  524. package/src/gallery/utils.js +11 -7
  525. package/src/group/block.json +10 -2
  526. package/src/group/deprecated.js +89 -2
  527. package/src/group/edit.js +15 -2
  528. package/src/group/editor.scss +28 -3
  529. package/src/group/variations.js +4 -3
  530. package/src/heading/block.json +3 -1
  531. package/src/heading/deprecated.js +4 -2
  532. package/src/home-link/edit.js +19 -20
  533. package/src/image/block.json +13 -7
  534. package/src/image/edit.js +19 -1
  535. package/src/image/editor.scss +39 -3
  536. package/src/image/index.php +1 -1
  537. package/src/index.native.js +15 -10
  538. package/src/list-item/edit.js +2 -1
  539. package/src/list-item/hooks/index.js +1 -0
  540. package/src/list-item/hooks/use-copy.js +36 -0
  541. package/src/list-item/list-style-type.native.js +8 -1
  542. package/src/list-item/style.native.scss +4 -0
  543. package/src/media-text/block.json +13 -0
  544. package/src/media-text/deprecated.js +3 -2
  545. package/src/navigation/deprecated.js +4 -2
  546. package/src/navigation/edit/index.js +159 -81
  547. package/src/navigation/edit/unsaved-inner-blocks.js +3 -1
  548. package/src/navigation/edit/use-convert-classic-menu-to-block-menu.js +31 -37
  549. package/src/navigation/editor.scss +3 -2
  550. package/src/navigation/index.php +11 -16
  551. package/src/navigation/menu-items-to-blocks.js +3 -6
  552. package/src/navigation/style.scss +3 -2
  553. package/src/navigation/use-navigation-menu.js +11 -8
  554. package/src/navigation-link/edit.js +9 -13
  555. package/src/navigation-submenu/edit.js +9 -13
  556. package/src/page-list/edit.js +6 -2
  557. package/src/paragraph/block.json +5 -0
  558. package/src/paragraph/deprecated.js +33 -35
  559. package/src/paragraph/edit.js +1 -0
  560. package/src/paragraph/editor.scss +5 -3
  561. package/src/post-author/block.json +4 -2
  562. package/src/post-author-biography/block.json +1 -0
  563. package/src/post-author-name/block.json +5 -1
  564. package/src/post-comments-count/block.json +4 -1
  565. package/src/post-comments-count/edit.js +10 -2
  566. package/src/post-comments-link/block.json +4 -2
  567. package/src/post-date/block.json +9 -0
  568. package/src/post-date/edit.js +12 -2
  569. package/src/post-date/index.php +10 -2
  570. package/src/post-date/style.scss +4 -0
  571. package/src/post-featured-image/block.json +12 -0
  572. package/src/post-featured-image/edit.js +43 -13
  573. package/src/post-featured-image/editor.scss +44 -53
  574. package/src/post-featured-image/index.php +61 -4
  575. package/src/post-featured-image/style.scss +1 -0
  576. package/src/post-navigation-link/block.json +3 -2
  577. package/src/post-template/block.json +15 -1
  578. package/src/post-template/edit.js +6 -1
  579. package/src/post-template/index.php +7 -4
  580. package/src/post-terms/block.json +5 -3
  581. package/src/post-title/block.json +2 -1
  582. package/src/post-title/style.scss +2 -0
  583. package/src/preformatted/block.json +4 -2
  584. package/src/pullquote/block.json +11 -4
  585. package/src/pullquote/deprecated.js +490 -412
  586. package/src/pullquote/edit.js +1 -1
  587. package/src/pullquote/edit.native.js +0 -1
  588. package/src/pullquote/editor.scss +0 -16
  589. package/src/pullquote/index.js +1 -3
  590. package/src/pullquote/save.js +1 -1
  591. package/src/pullquote/style.scss +0 -11
  592. package/src/pullquote/transforms.js +17 -33
  593. package/src/query/deprecated.js +4 -9
  594. package/src/query/edit/index.js +28 -15
  595. package/src/query/edit/inspector-controls/taxonomy-controls.js +1 -1
  596. package/src/query/edit/query-placeholder.js +17 -2
  597. package/src/query/utils.js +29 -7
  598. package/src/query-no-results/edit.js +1 -1
  599. package/src/query-title/block.json +7 -2
  600. package/src/query-title/edit.js +19 -2
  601. package/src/query-title/index.php +11 -1
  602. package/src/query-title/style.scss +4 -0
  603. package/src/quote/deprecated.js +6 -5
  604. package/src/quote/transforms.js +4 -18
  605. package/src/search/index.php +1 -1
  606. package/src/separator/block.json +1 -0
  607. package/src/separator/deprecated.js +2 -3
  608. package/src/site-logo/editor.scss +8 -66
  609. package/src/social-link/icons/reddit.js +1 -1
  610. package/src/social-link/index.php +1 -1
  611. package/src/social-link/socials-with-bg.scss +1 -1
  612. package/src/social-link/socials-without-bg.scss +1 -1
  613. package/src/social-links/edit.js +1 -0
  614. package/src/spacer/block.json +7 -1
  615. package/src/style.scss +2 -0
  616. package/src/table/block.json +4 -0
  617. package/src/table/state.js +21 -19
  618. package/src/table-of-contents/block.json +11 -1
  619. package/src/tag-cloud/block.json +5 -1
  620. package/src/template-part/index.js +3 -2
  621. package/src/term-description/block.json +4 -0
  622. package/src/text-columns/edit.js +2 -2
  623. package/src/text-columns/save.js +2 -2
  624. package/src/verse/block.json +1 -0
  625. package/src/video/block.json +4 -0
  626. package/src/video/style.scss +2 -0
@@ -15,13 +15,26 @@ const metadata = {
15
15
  parent: ["core/query"],
16
16
  description: "Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.",
17
17
  textdomain: "default",
18
- usesContext: ["queryId", "query", "queryContext", "displayLayout", "templateSlug"],
18
+ usesContext: ["queryId", "query", "queryContext", "displayLayout", "templateSlug", "previewPostType"],
19
19
  supports: {
20
20
  reusable: false,
21
21
  html: false,
22
22
  align: true,
23
23
  __experimentalLayout: {
24
24
  allowEditing: false
25
+ },
26
+ typography: {
27
+ fontSize: true,
28
+ lineHeight: true,
29
+ __experimentalFontFamily: true,
30
+ __experimentalFontWeight: true,
31
+ __experimentalFontStyle: true,
32
+ __experimentalTextTransform: true,
33
+ __experimentalTextDecoration: true,
34
+ __experimentalLetterSpacing: true,
35
+ __experimentalDefaultControls: {
36
+ fontSize: true
37
+ }
25
38
  }
26
39
  },
27
40
  style: "wp-block-post-template",
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/post-template/index.js"],"names":["layout","edit","save","name","metadata","settings","icon"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAT,QAAuB,kBAAvB;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAEN,MADiB;AAEvBC,EAAAA,IAFuB;AAGvBC,EAAAA;AAHuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { layout } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon: layout,\n\tedit,\n\tsave,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/post-template/index.js"],"names":["layout","edit","save","name","metadata","settings","icon"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAT,QAAuB,kBAAvB;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAEN,MADiB;AAEvBC,EAAAA,IAFuB;AAGvBC,EAAAA;AAHuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { layout } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon: layout,\n\tedit,\n\tsave,\n};\n"]}
@@ -48,12 +48,14 @@ const metadata = {
48
48
  }
49
49
  },
50
50
  typography: {
51
- lineHeight: true,
52
51
  fontSize: true,
53
- __experimentalFontStyle: true,
52
+ lineHeight: true,
53
+ __experimentalFontFamily: true,
54
54
  __experimentalFontWeight: true,
55
- __experimentalLetterSpacing: true,
55
+ __experimentalFontStyle: true,
56
56
  __experimentalTextTransform: true,
57
+ __experimentalTextDecoration: true,
58
+ __experimentalLetterSpacing: true,
57
59
  __experimentalDefaultControls: {
58
60
  fontSize: true
59
61
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/post-terms/index.js"],"names":["postCategories","icon","addFilter","edit","enhanceVariations","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,cAAc,IAAIC,IAA3B,QAAuC,kBAAvC;AACA,SAASC,SAAT,QAA0B,kBAA1B;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,iBAAP,MAA8B,SAA9B;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBN,EAAAA,IADuB;AAEvBE,EAAAA;AAFuB,CAAjB,C,CAKP;;AACAD,SAAS,CACR,0BADQ,EAER,oBAFQ,EAGRE,iBAHQ,CAAT","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postCategories as icon } from '@wordpress/icons';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport enhanceVariations from './hooks';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\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\tenhanceVariations\n);\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/post-terms/index.js"],"names":["postCategories","icon","addFilter","edit","enhanceVariations","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,cAAc,IAAIC,IAA3B,QAAuC,kBAAvC;AACA,SAASC,SAAT,QAA0B,kBAA1B;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,iBAAP,MAA8B,SAA9B;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBN,EAAAA,IADuB;AAEvBE,EAAAA;AAFuB,CAAjB,C,CAKP;;AACAD,SAAS,CACR,0BADQ,EAER,oBAFQ,EAGRE,iBAHQ,CAAT","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postCategories as icon } from '@wordpress/icons';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport enhanceVariations from './hooks';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\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\tenhanceVariations\n);\n"]}
@@ -50,7 +50,8 @@ const metadata = {
50
50
  }
51
51
  },
52
52
  spacing: {
53
- margin: true
53
+ margin: true,
54
+ padding: true
54
55
  },
55
56
  typography: {
56
57
  fontSize: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/post-title/index.js"],"names":["title","icon","edit","deprecated","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,IAAlB,QAA8B,kBAA9B;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBL,EAAAA,IADuB;AAEvBC,EAAAA,IAFuB;AAGvBC,EAAAA;AAHuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { title as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tdeprecated,\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/post-title/index.js"],"names":["title","icon","edit","deprecated","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,IAAlB,QAA8B,kBAA9B;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBL,EAAAA,IADuB;AAEvBC,EAAAA,IAFuB;AAGvBC,EAAAA;AAHuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { title as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tdeprecated,\n};\n"]}
@@ -38,10 +38,12 @@ const metadata = {
38
38
  typography: {
39
39
  fontSize: true,
40
40
  lineHeight: true,
41
- __experimentalFontStyle: true,
41
+ __experimentalFontFamily: true,
42
42
  __experimentalFontWeight: true,
43
- __experimentalLetterSpacing: true,
43
+ __experimentalFontStyle: true,
44
44
  __experimentalTextTransform: true,
45
+ __experimentalTextDecoration: true,
46
+ __experimentalLetterSpacing: true,
45
47
  __experimentalDefaultControls: {
46
48
  fontSize: true
47
49
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/preformatted/index.js"],"names":["__","preformatted","icon","edit","save","transforms","name","metadata","settings","example","attributes","content","merge","attributesToMerge"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,YAAY,IAAIC,IAAzB,QAAqC,kBAArC;AAEA;AACA;AACA;;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;AACvBN,EAAAA,IADuB;AAEvBO,EAAAA,OAAO,EAAE;AACRC,IAAAA,UAAU,EAAE;AACX;AACA;AACAC,MAAAA,OAAO,EAAEX,EAAE,CACV,wQADU;AAGX;;AANW;AADJ,GAFc;AAYvBK,EAAAA,UAZuB;AAavBF,EAAAA,IAbuB;AAcvBC,EAAAA,IAduB;;AAevBQ,EAAAA,KAAK,CAAEF,UAAF,EAAcG,iBAAd,EAAkC;AACtC,WAAO;AACNF,MAAAA,OAAO,EAAED,UAAU,CAACC,OAAX,GAAqBE,iBAAiB,CAACF;AAD1C,KAAP;AAGA;;AAnBsB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { preformatted 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\t/* eslint-disable @wordpress/i18n-no-collapsible-whitespace */\n\t\t\t// translators: Sample content for the Preformatted block. Can be replaced with a more locale-adequate work.\n\t\t\tcontent: __(\n\t\t\t\t'EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\\nWindow, very small in the distance, illuminated.\\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;'\n\t\t\t),\n\t\t\t/* eslint-enable @wordpress/i18n-no-collapsible-whitespace */\n\t\t},\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tmerge( attributes, attributesToMerge ) {\n\t\treturn {\n\t\t\tcontent: attributes.content + attributesToMerge.content,\n\t\t};\n\t},\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/preformatted/index.js"],"names":["__","preformatted","icon","edit","save","transforms","name","metadata","settings","example","attributes","content","merge","attributesToMerge"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,YAAY,IAAIC,IAAzB,QAAqC,kBAArC;AAEA;AACA;AACA;;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;AACvBN,EAAAA,IADuB;AAEvBO,EAAAA,OAAO,EAAE;AACRC,IAAAA,UAAU,EAAE;AACX;AACA;AACAC,MAAAA,OAAO,EAAEX,EAAE,CACV,wQADU;AAGX;;AANW;AADJ,GAFc;AAYvBK,EAAAA,UAZuB;AAavBF,EAAAA,IAbuB;AAcvBC,EAAAA,IAduB;;AAevBQ,EAAAA,KAAK,CAAEF,UAAF,EAAcG,iBAAd,EAAkC;AACtC,WAAO;AACNF,MAAAA,OAAO,EAAED,UAAU,CAACC,OAAX,GAAqBE,iBAAiB,CAACF;AAD1C,KAAP;AAGA;;AAnBsB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { preformatted 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\t/* eslint-disable @wordpress/i18n-no-collapsible-whitespace */\n\t\t\t// translators: Sample content for the Preformatted block. Can be replaced with a more locale-adequate work.\n\t\t\tcontent: __(\n\t\t\t\t'EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\\nWindow, very small in the distance, illuminated.\\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;'\n\t\t\t),\n\t\t\t/* eslint-enable @wordpress/i18n-no-collapsible-whitespace */\n\t\t},\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tmerge( attributes, attributesToMerge ) {\n\t\treturn {\n\t\t\tcontent: attributes.content + attributesToMerge.content,\n\t\t};\n\t},\n};\n"]}
@@ -11,6 +11,7 @@ import { get, includes } from 'lodash';
11
11
 
12
12
  import { getColorClassName, getColorObjectByAttributeValues, RichText, store as blockEditorStore, useBlockProps } from '@wordpress/block-editor';
13
13
  import { select } from '@wordpress/data';
14
+ import { create, replace, toHTMLString, __UNSTABLE_LINE_SEPARATOR } from '@wordpress/rich-text';
14
15
  /**
15
16
  * Internal dependencies
16
17
  */
@@ -53,17 +54,82 @@ function parseBorderColor(styleString) {
53
54
  if (matches && matches[1]) {
54
55
  return matches[1];
55
56
  }
56
- } // TODO: this is ripe for a bit of a clean up according to the example in https://developer.wordpress.org/block-editor/reference-guides/block-api/block-deprecation/#example
57
+ }
58
+
59
+ function multilineToInline(value) {
60
+ return toHTMLString({
61
+ value: replace(create({
62
+ html: value,
63
+ multilineTag: 'p'
64
+ }), new RegExp(__UNSTABLE_LINE_SEPARATOR, 'g'), '\n')
65
+ });
66
+ }
67
+
68
+ const v5 = {
69
+ attributes: {
70
+ value: {
71
+ type: 'string',
72
+ source: 'html',
73
+ selector: 'blockquote',
74
+ multiline: 'p',
75
+ __experimentalRole: 'content'
76
+ },
77
+ citation: {
78
+ type: 'string',
79
+ source: 'html',
80
+ selector: 'cite',
81
+ default: '',
82
+ __experimentalRole: 'content'
83
+ },
84
+ textAlign: {
85
+ type: 'string'
86
+ }
87
+ },
88
+
89
+ save(_ref) {
90
+ let {
91
+ attributes
92
+ } = _ref;
93
+ const {
94
+ textAlign,
95
+ citation,
96
+ value
97
+ } = attributes;
98
+ const shouldShowCitation = !RichText.isEmpty(citation);
99
+ return createElement("figure", useBlockProps.save({
100
+ className: classnames({
101
+ [`has-text-align-${textAlign}`]: textAlign
102
+ })
103
+ }), createElement("blockquote", null, createElement(RichText.Content, {
104
+ value: value,
105
+ multiline: true
106
+ }), shouldShowCitation && createElement(RichText.Content, {
107
+ tagName: "cite",
108
+ value: citation
109
+ })));
110
+ },
111
+
112
+ migrate(_ref2) {
113
+ let {
114
+ value,
115
+ ...attributes
116
+ } = _ref2;
117
+ return {
118
+ value: multilineToInline(value),
119
+ ...attributes
120
+ };
121
+ }
57
122
 
123
+ }; // TODO: this is ripe for a bit of a clean up according to the example in https://developer.wordpress.org/block-editor/reference-guides/block-api/block-deprecation/#example
58
124
 
59
- const deprecated = [{
125
+ const v4 = {
60
126
  attributes: { ...blockAttributes
61
127
  },
62
128
 
63
- save(_ref) {
129
+ save(_ref3) {
64
130
  let {
65
131
  attributes
66
- } = _ref;
132
+ } = _ref3;
67
133
  const {
68
134
  mainColor,
69
135
  customMainColor,
@@ -114,14 +180,15 @@ const deprecated = [{
114
180
  })));
115
181
  },
116
182
 
117
- migrate(_ref2) {
183
+ migrate(_ref4) {
118
184
  let {
185
+ value,
119
186
  className,
120
187
  mainColor,
121
188
  customMainColor,
122
189
  customTextColor,
123
190
  ...attributes
124
- } = _ref2;
191
+ } = _ref4;
125
192
  const isSolidColorStyle = includes(className, SOLID_COLOR_CLASS);
126
193
  let style;
127
194
 
@@ -151,6 +218,7 @@ const deprecated = [{
151
218
  }
152
219
 
153
220
  return {
221
+ value: multilineToInline(value),
154
222
  className,
155
223
  backgroundColor: isSolidColorStyle ? mainColor : undefined,
156
224
  borderColor: isSolidColorStyle ? undefined : mainColor,
@@ -160,7 +228,8 @@ const deprecated = [{
160
228
  };
161
229
  }
162
230
 
163
- }, {
231
+ };
232
+ const v3 = {
164
233
  attributes: { ...blockAttributes,
165
234
  // figureStyle is an attribute that never existed.
166
235
  // We are using it as a way to access the styles previously applied to the figure.
@@ -171,10 +240,10 @@ const deprecated = [{
171
240
  }
172
241
  },
173
242
 
174
- save(_ref3) {
243
+ save(_ref5) {
175
244
  let {
176
245
  attributes
177
- } = _ref3;
246
+ } = _ref5;
178
247
  const {
179
248
  mainColor,
180
249
  customMainColor,
@@ -236,15 +305,16 @@ const deprecated = [{
236
305
  })));
237
306
  },
238
307
 
239
- migrate(_ref4) {
308
+ migrate(_ref6) {
240
309
  let {
310
+ value,
241
311
  className,
242
312
  figureStyle,
243
313
  mainColor,
244
314
  customMainColor,
245
315
  customTextColor,
246
316
  ...attributes
247
- } = _ref4;
317
+ } = _ref6;
248
318
  const isSolidColorStyle = includes(className, SOLID_COLOR_CLASS);
249
319
  let style;
250
320
 
@@ -280,7 +350,9 @@ const deprecated = [{
280
350
  const borderColor = parseBorderColor(figureStyle);
281
351
 
282
352
  if (borderColor) {
283
- return { ...attributes,
353
+ return {
354
+ value: multilineToInline(value),
355
+ ...attributes,
284
356
  className,
285
357
  // Block supports: Set style.border.color if a deprecated block has `mainColor`, inline border CSS and is not a solid color style.
286
358
  style: {
@@ -293,6 +365,7 @@ const deprecated = [{
293
365
  }
294
366
 
295
367
  return {
368
+ value: multilineToInline(value),
296
369
  className,
297
370
  backgroundColor: isSolidColorStyle ? mainColor : undefined,
298
371
  borderColor: isSolidColorStyle ? undefined : mainColor,
@@ -302,13 +375,14 @@ const deprecated = [{
302
375
  };
303
376
  }
304
377
 
305
- }, {
378
+ };
379
+ const v2 = {
306
380
  attributes: blockAttributes,
307
381
 
308
- save(_ref5) {
382
+ save(_ref7) {
309
383
  let {
310
384
  attributes
311
- } = _ref5;
385
+ } = _ref7;
312
386
  const {
313
387
  mainColor,
314
388
  customMainColor,
@@ -365,14 +439,15 @@ const deprecated = [{
365
439
  })));
366
440
  },
367
441
 
368
- migrate(_ref6) {
442
+ migrate(_ref8) {
369
443
  let {
444
+ value,
370
445
  className,
371
446
  mainColor,
372
447
  customMainColor,
373
448
  customTextColor,
374
449
  ...attributes
375
- } = _ref6;
450
+ } = _ref8;
376
451
  const isSolidColorStyle = includes(className, SOLID_COLOR_CLASS);
377
452
  let style = {};
378
453
 
@@ -402,6 +477,7 @@ const deprecated = [{
402
477
  }
403
478
 
404
479
  return {
480
+ value: multilineToInline(value),
405
481
  className,
406
482
  backgroundColor: isSolidColorStyle ? mainColor : undefined,
407
483
  borderColor: isSolidColorStyle ? undefined : mainColor,
@@ -411,14 +487,15 @@ const deprecated = [{
411
487
  };
412
488
  }
413
489
 
414
- }, {
490
+ };
491
+ const v1 = {
415
492
  attributes: { ...blockAttributes
416
493
  },
417
494
 
418
- save(_ref7) {
495
+ save(_ref9) {
419
496
  let {
420
497
  attributes
421
- } = _ref7;
498
+ } = _ref9;
422
499
  const {
423
500
  value,
424
501
  citation
@@ -430,9 +507,21 @@ const deprecated = [{
430
507
  tagName: "cite",
431
508
  value: citation
432
509
  }));
510
+ },
511
+
512
+ migrate(_ref10) {
513
+ let {
514
+ value,
515
+ ...attributes
516
+ } = _ref10;
517
+ return {
518
+ value: multilineToInline(value),
519
+ ...attributes
520
+ };
433
521
  }
434
522
 
435
- }, {
523
+ };
524
+ const v0 = {
436
525
  attributes: { ...blockAttributes,
437
526
  citation: {
438
527
  type: 'string',
@@ -445,10 +534,10 @@ const deprecated = [{
445
534
  }
446
535
  },
447
536
 
448
- save(_ref8) {
537
+ save(_ref11) {
449
538
  let {
450
539
  attributes
451
- } = _ref8;
540
+ } = _ref11;
452
541
  const {
453
542
  value,
454
543
  citation,
@@ -463,8 +552,28 @@ const deprecated = [{
463
552
  tagName: "footer",
464
553
  value: citation
465
554
  }));
555
+ },
556
+
557
+ migrate(_ref12) {
558
+ let {
559
+ value,
560
+ ...attributes
561
+ } = _ref12;
562
+ return {
563
+ value: multilineToInline(value),
564
+ ...attributes
565
+ };
466
566
  }
467
567
 
468
- }];
469
- export default deprecated;
568
+ };
569
+ /**
570
+ * New deprecations need to be placed first
571
+ * for them to have higher priority.
572
+ *
573
+ * Old deprecations may need to be updated as well.
574
+ *
575
+ * See block-deprecation.md
576
+ */
577
+
578
+ export default [v5, v4, v3, v2, v1, v0];
470
579
  //# sourceMappingURL=deprecated.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/pullquote/deprecated.js"],"names":["classnames","get","includes","getColorClassName","getColorObjectByAttributeValues","RichText","store","blockEditorStore","useBlockProps","select","SOLID_COLOR_CLASS","blockAttributes","value","type","source","selector","multiline","citation","default","mainColor","customMainColor","textColor","customTextColor","parseBorderColor","styleString","matches","match","deprecated","attributes","save","className","isSolidColorStyle","figureClasses","figureStyles","backgroundClass","backgroundColor","undefined","borderColor","blockquoteTextColorClass","blockquoteClasses","blockquoteStyles","color","style","isEmpty","migrate","border","background","text","textAlign","figureStyle","attribute","figureClass","colors","getSettings","colorObject","blockquoteStyle","align"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AACA,SAASC,GAAT,EAAcC,QAAd,QAA8B,QAA9B;AAEA;AACA;AACA;;AACA,S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CAAnB;AAqcA,eAAeU,UAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { get, includes } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tgetColorClassName,\n\tgetColorObjectByAttributeValues,\n\tRichText,\n\tstore as blockEditorStore,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { select } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { SOLID_COLOR_CLASS } from './shared';\n\nconst blockAttributes = {\n\tvalue: {\n\t\ttype: 'string',\n\t\tsource: 'html',\n\t\tselector: 'blockquote',\n\t\tmultiline: 'p',\n\t},\n\tcitation: {\n\t\ttype: 'string',\n\t\tsource: 'html',\n\t\tselector: 'cite',\n\t\tdefault: '',\n\t},\n\tmainColor: {\n\t\ttype: 'string',\n\t},\n\tcustomMainColor: {\n\t\ttype: 'string',\n\t},\n\ttextColor: {\n\t\ttype: 'string',\n\t},\n\tcustomTextColor: {\n\t\ttype: 'string',\n\t},\n};\n\nfunction parseBorderColor( styleString ) {\n\tif ( ! styleString ) {\n\t\treturn;\n\t}\n\tconst matches = styleString.match( /border-color:([^;]+)[;]?/ );\n\tif ( matches && matches[ 1 ] ) {\n\t\treturn matches[ 1 ];\n\t}\n}\n\n// TODO: this is ripe for a bit of a clean up according to the example in https://developer.wordpress.org/block-editor/reference-guides/block-api/block-deprecation/#example\nconst deprecated = [\n\t{\n\t\tattributes: {\n\t\t\t...blockAttributes,\n\t\t},\n\t\tsave( { attributes } ) {\n\t\t\tconst {\n\t\t\t\tmainColor,\n\t\t\t\tcustomMainColor,\n\t\t\t\tcustomTextColor,\n\t\t\t\ttextColor,\n\t\t\t\tvalue,\n\t\t\t\tcitation,\n\t\t\t\tclassName,\n\t\t\t} = attributes;\n\n\t\t\tconst isSolidColorStyle = includes( className, SOLID_COLOR_CLASS );\n\n\t\t\tlet figureClasses, figureStyles;\n\n\t\t\t// Is solid color style\n\t\t\tif ( isSolidColorStyle ) {\n\t\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t\t'background-color',\n\t\t\t\t\tmainColor\n\t\t\t\t);\n\n\t\t\t\tfigureClasses = classnames( {\n\t\t\t\t\t'has-background': backgroundClass || customMainColor,\n\t\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t\t} );\n\n\t\t\t\tfigureStyles = {\n\t\t\t\t\tbackgroundColor: backgroundClass\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: customMainColor,\n\t\t\t\t};\n\t\t\t\t// Is normal style and a custom color is being used ( we can set a style directly with its value)\n\t\t\t} else if ( customMainColor ) {\n\t\t\t\tfigureStyles = {\n\t\t\t\t\tborderColor: customMainColor,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst blockquoteTextColorClass = getColorClassName(\n\t\t\t\t'color',\n\t\t\t\ttextColor\n\t\t\t);\n\t\t\tconst blockquoteClasses = classnames( {\n\t\t\t\t'has-text-color': textColor || customTextColor,\n\t\t\t\t[ blockquoteTextColorClass ]: blockquoteTextColorClass,\n\t\t\t} );\n\n\t\t\tconst blockquoteStyles = blockquoteTextColorClass\n\t\t\t\t? undefined\n\t\t\t\t: { color: customTextColor };\n\n\t\t\treturn (\n\t\t\t\t<figure\n\t\t\t\t\t{ ...useBlockProps.save( {\n\t\t\t\t\t\tclassName: figureClasses,\n\t\t\t\t\t\tstyle: figureStyles,\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t<blockquote\n\t\t\t\t\t\tclassName={ blockquoteClasses }\n\t\t\t\t\t\tstyle={ blockquoteStyles }\n\t\t\t\t\t>\n\t\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\t\t\ttagName=\"cite\"\n\t\t\t\t\t\t\t\tvalue={ citation }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</blockquote>\n\t\t\t\t</figure>\n\t\t\t);\n\t\t},\n\t\tmigrate( {\n\t\t\tclassName,\n\t\t\tmainColor,\n\t\t\tcustomMainColor,\n\t\t\tcustomTextColor,\n\t\t\t...attributes\n\t\t} ) {\n\t\t\tconst isSolidColorStyle = includes( className, SOLID_COLOR_CLASS );\n\t\t\tlet style;\n\n\t\t\tif ( customMainColor ) {\n\t\t\t\tif ( ! isSolidColorStyle ) {\n\t\t\t\t\t// Block supports: Set style.border.color if a deprecated block has a default style and a `customMainColor` attribute.\n\t\t\t\t\tstyle = {\n\t\t\t\t\t\tborder: {\n\t\t\t\t\t\t\tcolor: customMainColor,\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\t// Block supports: Set style.color.background if a deprecated block has a solid style and a `customMainColor` attribute.\n\t\t\t\t\tstyle = {\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\tbackground: customMainColor,\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Block supports: Set style.color.text if a deprecated block has a `customTextColor` attribute.\n\t\t\tif ( customTextColor && style ) {\n\t\t\t\tstyle.color = {\n\t\t\t\t\t...style.color,\n\t\t\t\t\ttext: customTextColor,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tclassName,\n\t\t\t\tbackgroundColor: isSolidColorStyle ? mainColor : undefined,\n\t\t\t\tborderColor: isSolidColorStyle ? undefined : mainColor,\n\t\t\t\ttextAlign: isSolidColorStyle ? 'left' : undefined,\n\t\t\t\tstyle,\n\t\t\t\t...attributes,\n\t\t\t};\n\t\t},\n\t},\n\t{\n\t\tattributes: {\n\t\t\t...blockAttributes,\n\t\t\t// figureStyle is an attribute that never existed.\n\t\t\t// We are using it as a way to access the styles previously applied to the figure.\n\t\t\tfigureStyle: {\n\t\t\t\tsource: 'attribute',\n\t\t\t\tselector: 'figure',\n\t\t\t\tattribute: 'style',\n\t\t\t},\n\t\t},\n\t\tsave( { attributes } ) {\n\t\t\tconst {\n\t\t\t\tmainColor,\n\t\t\t\tcustomMainColor,\n\t\t\t\ttextColor,\n\t\t\t\tcustomTextColor,\n\t\t\t\tvalue,\n\t\t\t\tcitation,\n\t\t\t\tclassName,\n\t\t\t\tfigureStyle,\n\t\t\t} = attributes;\n\n\t\t\tconst isSolidColorStyle = includes( className, SOLID_COLOR_CLASS );\n\n\t\t\tlet figureClasses, figureStyles;\n\n\t\t\t// Is solid color style\n\t\t\tif ( isSolidColorStyle ) {\n\t\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t\t'background-color',\n\t\t\t\t\tmainColor\n\t\t\t\t);\n\n\t\t\t\tfigureClasses = classnames( {\n\t\t\t\t\t'has-background': backgroundClass || customMainColor,\n\t\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t\t} );\n\n\t\t\t\tfigureStyles = {\n\t\t\t\t\tbackgroundColor: backgroundClass\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: customMainColor,\n\t\t\t\t};\n\t\t\t\t// Is normal style and a custom color is being used ( we can set a style directly with its value)\n\t\t\t} else if ( customMainColor ) {\n\t\t\t\tfigureStyles = {\n\t\t\t\t\tborderColor: customMainColor,\n\t\t\t\t};\n\t\t\t\t// If normal style and a named color are being used, we need to retrieve the color value to set the style,\n\t\t\t\t// as there is no expectation that themes create classes that set border colors.\n\t\t\t} else if ( mainColor ) {\n\t\t\t\t// Previously here we queried the color settings to know the color value\n\t\t\t\t// of a named color. This made the save function impure and the block was refactored,\n\t\t\t\t// because meanwhile a change in the editor made it impossible to query color settings in the save function.\n\t\t\t\t// Here instead of querying the color settings to know the color value, we retrieve the value\n\t\t\t\t// directly from the style previously serialized.\n\t\t\t\tconst borderColor = parseBorderColor( figureStyle );\n\t\t\t\tfigureStyles = {\n\t\t\t\t\tborderColor,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst blockquoteTextColorClass = getColorClassName(\n\t\t\t\t'color',\n\t\t\t\ttextColor\n\t\t\t);\n\t\t\tconst blockquoteClasses =\n\t\t\t\t( textColor || customTextColor ) &&\n\t\t\t\tclassnames( 'has-text-color', {\n\t\t\t\t\t[ blockquoteTextColorClass ]: blockquoteTextColorClass,\n\t\t\t\t} );\n\n\t\t\tconst blockquoteStyles = blockquoteTextColorClass\n\t\t\t\t? undefined\n\t\t\t\t: { color: customTextColor };\n\n\t\t\treturn (\n\t\t\t\t<figure className={ figureClasses } style={ figureStyles }>\n\t\t\t\t\t<blockquote\n\t\t\t\t\t\tclassName={ blockquoteClasses }\n\t\t\t\t\t\tstyle={ blockquoteStyles }\n\t\t\t\t\t>\n\t\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\t\t\ttagName=\"cite\"\n\t\t\t\t\t\t\t\tvalue={ citation }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</blockquote>\n\t\t\t\t</figure>\n\t\t\t);\n\t\t},\n\t\tmigrate( {\n\t\t\tclassName,\n\t\t\tfigureStyle,\n\t\t\tmainColor,\n\t\t\tcustomMainColor,\n\t\t\tcustomTextColor,\n\t\t\t...attributes\n\t\t} ) {\n\t\t\tconst isSolidColorStyle = includes( className, SOLID_COLOR_CLASS );\n\t\t\tlet style;\n\n\t\t\tif ( customMainColor ) {\n\t\t\t\tif ( ! isSolidColorStyle ) {\n\t\t\t\t\t// Block supports: Set style.border.color if a deprecated block has a default style and a `customMainColor` attribute.\n\t\t\t\t\tstyle = {\n\t\t\t\t\t\tborder: {\n\t\t\t\t\t\t\tcolor: customMainColor,\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\t// Block supports: Set style.color.background if a deprecated block has a solid style and a `customMainColor` attribute.\n\t\t\t\t\tstyle = {\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\tbackground: customMainColor,\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Block supports: Set style.color.text if a deprecated block has a `customTextColor` attribute.\n\t\t\tif ( customTextColor && style ) {\n\t\t\t\tstyle.color = {\n\t\t\t\t\t...style.color,\n\t\t\t\t\ttext: customTextColor,\n\t\t\t\t};\n\t\t\t}\n\t\t\t// If is the default style, and a main color is set,\n\t\t\t// migrate the main color value into a custom border color.\n\t\t\t// The custom border color value is retrieved by parsing the figure styles.\n\t\t\tif ( ! isSolidColorStyle && mainColor && figureStyle ) {\n\t\t\t\tconst borderColor = parseBorderColor( figureStyle );\n\t\t\t\tif ( borderColor ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...attributes,\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t// Block supports: Set style.border.color if a deprecated block has `mainColor`, inline border CSS and is not a solid color style.\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tborder: {\n\t\t\t\t\t\t\t\tcolor: borderColor,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tclassName,\n\t\t\t\tbackgroundColor: isSolidColorStyle ? mainColor : undefined,\n\t\t\t\tborderColor: isSolidColorStyle ? undefined : mainColor,\n\t\t\t\ttextAlign: isSolidColorStyle ? 'left' : undefined,\n\t\t\t\tstyle,\n\t\t\t\t...attributes,\n\t\t\t};\n\t\t},\n\t},\n\t{\n\t\tattributes: blockAttributes,\n\t\tsave( { attributes } ) {\n\t\t\tconst {\n\t\t\t\tmainColor,\n\t\t\t\tcustomMainColor,\n\t\t\t\ttextColor,\n\t\t\t\tcustomTextColor,\n\t\t\t\tvalue,\n\t\t\t\tcitation,\n\t\t\t\tclassName,\n\t\t\t} = attributes;\n\t\t\tconst isSolidColorStyle = includes( className, SOLID_COLOR_CLASS );\n\n\t\t\tlet figureClass, figureStyles;\n\t\t\t// Is solid color style\n\t\t\tif ( isSolidColorStyle ) {\n\t\t\t\tfigureClass = getColorClassName(\n\t\t\t\t\t'background-color',\n\t\t\t\t\tmainColor\n\t\t\t\t);\n\t\t\t\tif ( ! figureClass ) {\n\t\t\t\t\tfigureStyles = {\n\t\t\t\t\t\tbackgroundColor: customMainColor,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\t// Is normal style and a custom color is being used ( we can set a style directly with its value)\n\t\t\t} else if ( customMainColor ) {\n\t\t\t\tfigureStyles = {\n\t\t\t\t\tborderColor: customMainColor,\n\t\t\t\t};\n\t\t\t\t// Is normal style and a named color is being used, we need to retrieve the color value to set the style,\n\t\t\t\t// as there is no expectation that themes create classes that set border colors.\n\t\t\t} else if ( mainColor ) {\n\t\t\t\tconst colors = get(\n\t\t\t\t\tselect( blockEditorStore ).getSettings(),\n\t\t\t\t\t[ 'colors' ],\n\t\t\t\t\t[]\n\t\t\t\t);\n\t\t\t\tconst colorObject = getColorObjectByAttributeValues(\n\t\t\t\t\tcolors,\n\t\t\t\t\tmainColor\n\t\t\t\t);\n\t\t\t\tfigureStyles = {\n\t\t\t\t\tborderColor: colorObject.color,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst blockquoteTextColorClass = getColorClassName(\n\t\t\t\t'color',\n\t\t\t\ttextColor\n\t\t\t);\n\t\t\tconst blockquoteClasses =\n\t\t\t\ttextColor || customTextColor\n\t\t\t\t\t? classnames( 'has-text-color', {\n\t\t\t\t\t\t\t[ blockquoteTextColorClass ]:\n\t\t\t\t\t\t\t\tblockquoteTextColorClass,\n\t\t\t\t\t } )\n\t\t\t\t\t: undefined;\n\t\t\tconst blockquoteStyle = blockquoteTextColorClass\n\t\t\t\t? undefined\n\t\t\t\t: { color: customTextColor };\n\t\t\treturn (\n\t\t\t\t<figure className={ figureClass } style={ figureStyles }>\n\t\t\t\t\t<blockquote\n\t\t\t\t\t\tclassName={ blockquoteClasses }\n\t\t\t\t\t\tstyle={ blockquoteStyle }\n\t\t\t\t\t>\n\t\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\t\t\ttagName=\"cite\"\n\t\t\t\t\t\t\t\tvalue={ citation }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</blockquote>\n\t\t\t\t</figure>\n\t\t\t);\n\t\t},\n\t\tmigrate( {\n\t\t\tclassName,\n\t\t\tmainColor,\n\t\t\tcustomMainColor,\n\t\t\tcustomTextColor,\n\t\t\t...attributes\n\t\t} ) {\n\t\t\tconst isSolidColorStyle = includes( className, SOLID_COLOR_CLASS );\n\t\t\tlet style = {};\n\n\t\t\tif ( customMainColor ) {\n\t\t\t\tif ( ! isSolidColorStyle ) {\n\t\t\t\t\t// Block supports: Set style.border.color if a deprecated block has a default style and a `customMainColor` attribute.\n\t\t\t\t\tstyle = {\n\t\t\t\t\t\tborder: {\n\t\t\t\t\t\t\tcolor: customMainColor,\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\t// Block supports: Set style.color.background if a deprecated block has a solid style and a `customMainColor` attribute.\n\t\t\t\t\tstyle = {\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\tbackground: customMainColor,\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Block supports: Set style.color.text if a deprecated block has a `customTextColor` attribute.\n\t\t\tif ( customTextColor && style ) {\n\t\t\t\tstyle.color = {\n\t\t\t\t\t...style.color,\n\t\t\t\t\ttext: customTextColor,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tclassName,\n\t\t\t\tbackgroundColor: isSolidColorStyle ? mainColor : undefined,\n\t\t\t\tborderColor: isSolidColorStyle ? undefined : mainColor,\n\t\t\t\ttextAlign: isSolidColorStyle ? 'left' : undefined,\n\t\t\t\tstyle,\n\t\t\t\t...attributes,\n\t\t\t};\n\t\t},\n\t},\n\t{\n\t\tattributes: {\n\t\t\t...blockAttributes,\n\t\t},\n\t\tsave( { attributes } ) {\n\t\t\tconst { value, citation } = attributes;\n\t\t\treturn (\n\t\t\t\t<blockquote>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t);\n\t\t},\n\t},\n\t{\n\t\tattributes: {\n\t\t\t...blockAttributes,\n\t\t\tcitation: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'html',\n\t\t\t\tselector: 'footer',\n\t\t\t},\n\t\t\talign: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: 'none',\n\t\t\t},\n\t\t},\n\n\t\tsave( { attributes } ) {\n\t\t\tconst { value, citation, align } = attributes;\n\n\t\t\treturn (\n\t\t\t\t<blockquote className={ `align${ align }` }>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t<RichText.Content tagName=\"footer\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t);\n\t\t},\n\t},\n];\n\nexport default deprecated;\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/pullquote/deprecated.js"],"names":["classnames","get","includes","getColorClassName","getColorObjectByAttributeValues","RichText","store","blockEditorStore","useBlockProps","select","create","replace","toHTMLString","__UNSTABLE_LINE_SEPARATOR","SOLID_COLOR_CLASS","blockAttributes","value","type","source","selector","multiline","citation","default","mainColor","customMainColor","textColor","customTextColor","parseBorderColor","styleString","matches","match","multilineToInline","html","multilineTag","RegExp","v5","attributes","__experimentalRole","textAlign","save","shouldShowCitation","isEmpty","className","migrate","v4","isSolidColorStyle","figureClasses","figureStyles","backgroundClass","backgroundColor","undefined","borderColor","blockquoteTextColorClass","blockquoteClasses","blockquoteStyles","color","style","border","background","text","v3","figureStyle","attribute","v2","figureClass","colors","getSettings","colorObject","blockquoteStyle","v1","v0","align"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AACA,SAASC,GAAT,EAAcC,QAAd,QAA8B,QAA9B;AAEA;AACA;AACA;;AACA,SACCC,iBADD,EAECC,+BAFD,EAGCC,QAHD,EAICC,KAAK,IAAIC,gBAJV,EAKCC,aALD,QAMO,yBANP;AAOA,SAASC,MAAT,QAAuB,iBAAvB;AACA,SACCC,MADD,EAECC,OAFD,EAGCC,YAHD,EAICC,yBAJD,QAKO,sBALP;AAOA;AACA;AACA;;AACA,SAASC,iBAAT,QAAkC,UAAlC;AAEA,MAAMC,eAAe,GAAG;AACvBC,EAAAA,KAAK,EAAE;AACNC,IAAAA,IAAI,EAAE,QADA;AAENC,IAAAA,MAAM,EAAE,MAFF;AAGNC,IAAAA,QAAQ,EAAE,YAHJ;AAINC,IAAAA,SAAS,EAAE;AAJL,GADgB;AAOvBC,EAAAA,QAAQ,EAAE;AACTJ,IAAAA,IAAI,EAAE,QADG;AAETC,IAAAA,MAAM,EAAE,MAFC;AAGTC,IAAAA,QAAQ,EAAE,MAHD;AAITG,IAAAA,OAAO,EAAE;AAJA,GAPa;AAavBC,EAAAA,SAAS,EAAE;AACVN,IAAAA,IAAI,EAAE;AADI,GAbY;AAgBvBO,EAAAA,eAAe,EAAE;AAChBP,IAAAA,IAAI,EAAE;AADU,GAhBM;AAmBvBQ,EAAAA,SAAS,EAAE;AACVR,IAAAA,IAAI,EAAE;AADI,GAnBY;AAsBvBS,EAAAA,eAAe,EAAE;AAChBT,IAAAA,IAAI,EAAE;AADU;AAtBM,CAAxB;;AA2BA,SAASU,gBAAT,CAA2BC,WAA3B,EAAyC;AACxC,MAAK,CAAEA,WAAP,EAAqB;AACpB;AACA;;AACD,QAAMC,OAAO,GAAGD,WAAW,CAACE,KAAZ,CAAmB,0BAAnB,CAA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AAkB,MAAA,OAAO,EAAC,QAA1B;AAAmC,MAAA,KAAK,EAAGA;AAA3C,MAHF,CADD;AAQA,GAzBS;;AA0BVsB,EAAAA,OAAO,SAA6B;AAAA,QAA3B;AAAE3B,MAAAA,KAAF;AAAS,SAAGoB;AAAZ,KAA2B;AACnC,WAAO;AACNpB,MAAAA,KAAK,EAAEe,iBAAiB,CAAEf,KAAF,CADlB;AAEN,SAAGoB;AAFG,KAAP;AAIA;;AA/BS,CAAX;AAkCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAe,CAAED,EAAF,EAAMS,EAAN,EAAUgB,EAAV,EAAcG,EAAd,EAAkBM,EAAlB,EAAsBC,EAAtB,CAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { get, includes } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tgetColorClassName,\n\tgetColorObjectByAttributeValues,\n\tRichText,\n\tstore as blockEditorStore,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { select } from '@wordpress/data';\nimport {\n\tcreate,\n\treplace,\n\ttoHTMLString,\n\t__UNSTABLE_LINE_SEPARATOR,\n} from '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport { SOLID_COLOR_CLASS } from './shared';\n\nconst blockAttributes = {\n\tvalue: {\n\t\ttype: 'string',\n\t\tsource: 'html',\n\t\tselector: 'blockquote',\n\t\tmultiline: 'p',\n\t},\n\tcitation: {\n\t\ttype: 'string',\n\t\tsource: 'html',\n\t\tselector: 'cite',\n\t\tdefault: '',\n\t},\n\tmainColor: {\n\t\ttype: 'string',\n\t},\n\tcustomMainColor: {\n\t\ttype: 'string',\n\t},\n\ttextColor: {\n\t\ttype: 'string',\n\t},\n\tcustomTextColor: {\n\t\ttype: 'string',\n\t},\n};\n\nfunction parseBorderColor( styleString ) {\n\tif ( ! styleString ) {\n\t\treturn;\n\t}\n\tconst matches = styleString.match( /border-color:([^;]+)[;]?/ );\n\tif ( matches && matches[ 1 ] ) {\n\t\treturn matches[ 1 ];\n\t}\n}\n\nfunction multilineToInline( value ) {\n\treturn toHTMLString( {\n\t\tvalue: replace(\n\t\t\tcreate( { html: value, multilineTag: 'p' } ),\n\t\t\tnew RegExp( __UNSTABLE_LINE_SEPARATOR, 'g' ),\n\t\t\t'\\n'\n\t\t),\n\t} );\n}\n\nconst v5 = {\n\tattributes: {\n\t\tvalue: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'blockquote',\n\t\t\tmultiline: 'p',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'cite',\n\t\t\tdefault: '',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\ttextAlign: {\n\t\t\ttype: 'string',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst { textAlign, citation, value } = attributes;\n\t\tconst shouldShowCitation = ! RichText.isEmpty( citation );\n\n\t\treturn (\n\t\t\t<figure\n\t\t\t\t{ ...useBlockProps.save( {\n\t\t\t\t\tclassName: classnames( {\n\t\t\t\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t\t\t\t} ),\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<blockquote>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ shouldShowCitation && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( { value, ...attributes } ) {\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\n// TODO: this is ripe for a bit of a clean up according to the example in https://developer.wordpress.org/block-editor/reference-guides/block-api/block-deprecation/#example\n\nconst v4 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\tmainColor,\n\t\t\tcustomMainColor,\n\t\t\tcustomTextColor,\n\t\t\ttextColor,\n\t\t\tvalue,\n\t\t\tcitation,\n\t\t\tclassName,\n\t\t} = attributes;\n\n\t\tconst isSolidColorStyle = includes( className, SOLID_COLOR_CLASS );\n\n\t\tlet figureClasses, figureStyles;\n\n\t\t// Is solid color style\n\t\tif ( isSolidColorStyle ) {\n\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tmainColor\n\t\t\t);\n\n\t\t\tfigureClasses = classnames( {\n\t\t\t\t'has-background': backgroundClass || customMainColor,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t} );\n\n\t\t\tfigureStyles = {\n\t\t\t\tbackgroundColor: backgroundClass ? undefined : customMainColor,\n\t\t\t};\n\t\t\t// Is normal style and a custom color is being used ( we can set a style directly with its value)\n\t\t} else if ( customMainColor ) {\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: customMainColor,\n\t\t\t};\n\t\t}\n\n\t\tconst blockquoteTextColorClass = getColorClassName(\n\t\t\t'color',\n\t\t\ttextColor\n\t\t);\n\t\tconst blockquoteClasses = classnames( {\n\t\t\t'has-text-color': textColor || customTextColor,\n\t\t\t[ blockquoteTextColorClass ]: blockquoteTextColorClass,\n\t\t} );\n\n\t\tconst blockquoteStyles = blockquoteTextColorClass\n\t\t\t? undefined\n\t\t\t: { color: customTextColor };\n\n\t\treturn (\n\t\t\t<figure\n\t\t\t\t{ ...useBlockProps.save( {\n\t\t\t\t\tclassName: figureClasses,\n\t\t\t\t\tstyle: figureStyles,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<blockquote\n\t\t\t\t\tclassName={ blockquoteClasses }\n\t\t\t\t\tstyle={ blockquoteStyles }\n\t\t\t\t>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( {\n\t\tvalue,\n\t\tclassName,\n\t\tmainColor,\n\t\tcustomMainColor,\n\t\tcustomTextColor,\n\t\t...attributes\n\t} ) {\n\t\tconst isSolidColorStyle = includes( className, SOLID_COLOR_CLASS );\n\t\tlet style;\n\n\t\tif ( customMainColor ) {\n\t\t\tif ( ! isSolidColorStyle ) {\n\t\t\t\t// Block supports: Set style.border.color if a deprecated block has a default style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tborder: {\n\t\t\t\t\t\tcolor: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// Block supports: Set style.color.background if a deprecated block has a solid style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tcolor: {\n\t\t\t\t\t\tbackground: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Block supports: Set style.color.text if a deprecated block has a `customTextColor` attribute.\n\t\tif ( customTextColor && style ) {\n\t\t\tstyle.color = {\n\t\t\t\t...style.color,\n\t\t\t\ttext: customTextColor,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\tclassName,\n\t\t\tbackgroundColor: isSolidColorStyle ? mainColor : undefined,\n\t\t\tborderColor: isSolidColorStyle ? undefined : mainColor,\n\t\t\ttextAlign: isSolidColorStyle ? 'left' : undefined,\n\t\t\tstyle,\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v3 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t\t// figureStyle is an attribute that never existed.\n\t\t// We are using it as a way to access the styles previously applied to the figure.\n\t\tfigureStyle: {\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure',\n\t\t\tattribute: 'style',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\tmainColor,\n\t\t\tcustomMainColor,\n\t\t\ttextColor,\n\t\t\tcustomTextColor,\n\t\t\tvalue,\n\t\t\tcitation,\n\t\t\tclassName,\n\t\t\tfigureStyle,\n\t\t} = attributes;\n\n\t\tconst isSolidColorStyle = includes( className, SOLID_COLOR_CLASS );\n\n\t\tlet figureClasses, figureStyles;\n\n\t\t// Is solid color style\n\t\tif ( isSolidColorStyle ) {\n\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tmainColor\n\t\t\t);\n\n\t\t\tfigureClasses = classnames( {\n\t\t\t\t'has-background': backgroundClass || customMainColor,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t} );\n\n\t\t\tfigureStyles = {\n\t\t\t\tbackgroundColor: backgroundClass ? undefined : customMainColor,\n\t\t\t};\n\t\t\t// Is normal style and a custom color is being used ( we can set a style directly with its value)\n\t\t} else if ( customMainColor ) {\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: customMainColor,\n\t\t\t};\n\t\t\t// If normal style and a named color are being used, we need to retrieve the color value to set the style,\n\t\t\t// as there is no expectation that themes create classes that set border colors.\n\t\t} else if ( mainColor ) {\n\t\t\t// Previously here we queried the color settings to know the color value\n\t\t\t// of a named color. This made the save function impure and the block was refactored,\n\t\t\t// because meanwhile a change in the editor made it impossible to query color settings in the save function.\n\t\t\t// Here instead of querying the color settings to know the color value, we retrieve the value\n\t\t\t// directly from the style previously serialized.\n\t\t\tconst borderColor = parseBorderColor( figureStyle );\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor,\n\t\t\t};\n\t\t}\n\n\t\tconst blockquoteTextColorClass = getColorClassName(\n\t\t\t'color',\n\t\t\ttextColor\n\t\t);\n\t\tconst blockquoteClasses =\n\t\t\t( textColor || customTextColor ) &&\n\t\t\tclassnames( 'has-text-color', {\n\t\t\t\t[ blockquoteTextColorClass ]: blockquoteTextColorClass,\n\t\t\t} );\n\n\t\tconst blockquoteStyles = blockquoteTextColorClass\n\t\t\t? undefined\n\t\t\t: { color: customTextColor };\n\n\t\treturn (\n\t\t\t<figure className={ figureClasses } style={ figureStyles }>\n\t\t\t\t<blockquote\n\t\t\t\t\tclassName={ blockquoteClasses }\n\t\t\t\t\tstyle={ blockquoteStyles }\n\t\t\t\t>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( {\n\t\tvalue,\n\t\tclassName,\n\t\tfigureStyle,\n\t\tmainColor,\n\t\tcustomMainColor,\n\t\tcustomTextColor,\n\t\t...attributes\n\t} ) {\n\t\tconst isSolidColorStyle = includes( className, SOLID_COLOR_CLASS );\n\t\tlet style;\n\n\t\tif ( customMainColor ) {\n\t\t\tif ( ! isSolidColorStyle ) {\n\t\t\t\t// Block supports: Set style.border.color if a deprecated block has a default style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tborder: {\n\t\t\t\t\t\tcolor: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// Block supports: Set style.color.background if a deprecated block has a solid style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tcolor: {\n\t\t\t\t\t\tbackground: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Block supports: Set style.color.text if a deprecated block has a `customTextColor` attribute.\n\t\tif ( customTextColor && style ) {\n\t\t\tstyle.color = {\n\t\t\t\t...style.color,\n\t\t\t\ttext: customTextColor,\n\t\t\t};\n\t\t}\n\t\t// If is the default style, and a main color is set,\n\t\t// migrate the main color value into a custom border color.\n\t\t// The custom border color value is retrieved by parsing the figure styles.\n\t\tif ( ! isSolidColorStyle && mainColor && figureStyle ) {\n\t\t\tconst borderColor = parseBorderColor( figureStyle );\n\t\t\tif ( borderColor ) {\n\t\t\t\treturn {\n\t\t\t\t\tvalue: multilineToInline( value ),\n\t\t\t\t\t...attributes,\n\t\t\t\t\tclassName,\n\t\t\t\t\t// Block supports: Set style.border.color if a deprecated block has `mainColor`, inline border CSS and is not a solid color style.\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tborder: {\n\t\t\t\t\t\t\tcolor: borderColor,\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\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\tclassName,\n\t\t\tbackgroundColor: isSolidColorStyle ? mainColor : undefined,\n\t\t\tborderColor: isSolidColorStyle ? undefined : mainColor,\n\t\t\ttextAlign: isSolidColorStyle ? 'left' : undefined,\n\t\t\tstyle,\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v2 = {\n\tattributes: blockAttributes,\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\tmainColor,\n\t\t\tcustomMainColor,\n\t\t\ttextColor,\n\t\t\tcustomTextColor,\n\t\t\tvalue,\n\t\t\tcitation,\n\t\t\tclassName,\n\t\t} = attributes;\n\t\tconst isSolidColorStyle = includes( className, SOLID_COLOR_CLASS );\n\n\t\tlet figureClass, figureStyles;\n\t\t// Is solid color style\n\t\tif ( isSolidColorStyle ) {\n\t\t\tfigureClass = getColorClassName( 'background-color', mainColor );\n\t\t\tif ( ! figureClass ) {\n\t\t\t\tfigureStyles = {\n\t\t\t\t\tbackgroundColor: customMainColor,\n\t\t\t\t};\n\t\t\t}\n\t\t\t// Is normal style and a custom color is being used ( we can set a style directly with its value)\n\t\t} else if ( customMainColor ) {\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: customMainColor,\n\t\t\t};\n\t\t\t// Is normal style and a named color is being used, we need to retrieve the color value to set the style,\n\t\t\t// as there is no expectation that themes create classes that set border colors.\n\t\t} else if ( mainColor ) {\n\t\t\tconst colors = get(\n\t\t\t\tselect( blockEditorStore ).getSettings(),\n\t\t\t\t[ 'colors' ],\n\t\t\t\t[]\n\t\t\t);\n\t\t\tconst colorObject = getColorObjectByAttributeValues(\n\t\t\t\tcolors,\n\t\t\t\tmainColor\n\t\t\t);\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: colorObject.color,\n\t\t\t};\n\t\t}\n\n\t\tconst blockquoteTextColorClass = getColorClassName(\n\t\t\t'color',\n\t\t\ttextColor\n\t\t);\n\t\tconst blockquoteClasses =\n\t\t\ttextColor || customTextColor\n\t\t\t\t? classnames( 'has-text-color', {\n\t\t\t\t\t\t[ blockquoteTextColorClass ]: blockquoteTextColorClass,\n\t\t\t\t } )\n\t\t\t\t: undefined;\n\t\tconst blockquoteStyle = blockquoteTextColorClass\n\t\t\t? undefined\n\t\t\t: { color: customTextColor };\n\t\treturn (\n\t\t\t<figure className={ figureClass } style={ figureStyles }>\n\t\t\t\t<blockquote\n\t\t\t\t\tclassName={ blockquoteClasses }\n\t\t\t\t\tstyle={ blockquoteStyle }\n\t\t\t\t>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( {\n\t\tvalue,\n\t\tclassName,\n\t\tmainColor,\n\t\tcustomMainColor,\n\t\tcustomTextColor,\n\t\t...attributes\n\t} ) {\n\t\tconst isSolidColorStyle = includes( className, SOLID_COLOR_CLASS );\n\t\tlet style = {};\n\n\t\tif ( customMainColor ) {\n\t\t\tif ( ! isSolidColorStyle ) {\n\t\t\t\t// Block supports: Set style.border.color if a deprecated block has a default style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tborder: {\n\t\t\t\t\t\tcolor: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// Block supports: Set style.color.background if a deprecated block has a solid style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tcolor: {\n\t\t\t\t\t\tbackground: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Block supports: Set style.color.text if a deprecated block has a `customTextColor` attribute.\n\t\tif ( customTextColor && style ) {\n\t\t\tstyle.color = {\n\t\t\t\t...style.color,\n\t\t\t\ttext: customTextColor,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\tclassName,\n\t\t\tbackgroundColor: isSolidColorStyle ? mainColor : undefined,\n\t\t\tborderColor: isSolidColorStyle ? undefined : mainColor,\n\t\t\ttextAlign: isSolidColorStyle ? 'left' : undefined,\n\t\t\tstyle,\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v1 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t},\n\tsave( { attributes } ) {\n\t\tconst { value, citation } = attributes;\n\t\treturn (\n\t\t\t<blockquote>\n\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t);\n\t},\n\tmigrate( { value, ...attributes } ) {\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v0 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'footer',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'none',\n\t\t},\n\t},\n\n\tsave( { attributes } ) {\n\t\tconst { value, citation, align } = attributes;\n\n\t\treturn (\n\t\t\t<blockquote className={ `align${ align }` }>\n\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t<RichText.Content tagName=\"footer\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t);\n\t},\n\tmigrate( { value, ...attributes } ) {\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\n/**\n * New deprecations need to be placed first\n * for them to have higher priority.\n *\n * Old deprecations may need to be updated as well.\n *\n * See block-deprecation.md\n */\nexport default [ v5, v4, v3, v2, v1, v0 ];\n"]}
@@ -49,7 +49,7 @@ function PullQuoteEdit(_ref) {
49
49
  }
50
50
  })), createElement(Figure, blockProps, createElement(BlockQuote, null, createElement(RichText, {
51
51
  identifier: "value",
52
- multiline: true,
52
+ tagName: "p",
53
53
  value: value,
54
54
  onChange: nextValue => setAttributes({
55
55
  value: nextValue
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/pullquote/edit.js"],"names":["classnames","__","AlignmentControl","BlockControls","RichText","useBlockProps","createBlock","getDefaultBlockName","Platform","Figure","BlockQuote","isWebPlatform","OS","PullQuoteEdit","attributes","setAttributes","isSelected","insertBlocksAfter","textAlign","citation","value","blockProps","className","shouldShowCitation","isEmpty","nextAlign","nextValue","undefined","display","nextCitation"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SACCC,gBADD,EAECC,aAFD,EAGCC,QAHD,EAICC,aAJD,QAKO,yBALP;AAMA,SAASC,WAAT,EAAsBC,mBAAtB,QAAiD,mBAAjD;AACA,SAASC,QAAT,QAAyB,oBAAzB;AAEA;AACA;AACA;;AACA,SAASC,MAAT,QAAuB,UAAvB;AACA,SAASC,UAAT,QAA2B,cAA3B;AAEA,MAAMC,aAAa,GAAGH,QAAQ,CAACI,EAAT,KAAgB,KAAtC;;AAEA,SAASC,aAAT,OAKI;AAAA,MALoB;AACvBC,IAAAA,UADuB;AAEvBC,IAAAA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T;AAKC,kBAAalB,EAAE,CAAE,yBAAF,CALhB;AAMC,IAAA,WAAW,EACV;AACAA,IAAAA,EAAE,CAAE,cAAF,CARJ;AAUC,IAAA,QAAQ,EAAK4B,YAAF,IACVd,aAAa,CAAE;AACdI,MAAAA,QAAQ,EAAEU;AADI,KAAF,CAXf;AAeC,IAAA,SAAS,EAAC,8BAfX;AAgBC,IAAA,8BAA8B,MAhB/B;AAiBC,IAAA,SAAS,EAAC,QAjBX;AAkBC,IAAA,sBAAsB,EAAG,MACxBZ,iBAAiB,CAChBX,WAAW,CAAEC,mBAAmB,EAArB,CADK;AAnBnB,IAlBF,CADD,CATD,CADD;AA0DA;;AAED,eAAeM,aAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tRichText,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\nimport { Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { Figure } from './figure';\nimport { BlockQuote } from './blockquote';\n\nconst isWebPlatform = Platform.OS === 'web';\n\nfunction PullQuoteEdit( {\n\tattributes,\n\tsetAttributes,\n\tisSelected,\n\tinsertBlocksAfter,\n} ) {\n\tconst { textAlign, citation, value } = attributes;\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classnames( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\tconst shouldShowCitation = ! RichText.isEmpty( citation ) || isSelected;\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<Figure { ...blockProps }>\n\t\t\t\t<BlockQuote>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"value\"\n\t\t\t\t\t\tmultiline\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ ( nextValue ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tvalue: nextValue,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ __( 'Pullquote text' ) }\n\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t// translators: placeholder text used for the quote\n\t\t\t\t\t\t\t__( 'Add quote' )\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttextAlign=\"center\"\n\t\t\t\t\t/>\n\t\t\t\t\t{ shouldShowCitation && (\n\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\tidentifier=\"citation\"\n\t\t\t\t\t\t\ttagName={ isWebPlatform ? 'cite' : undefined }\n\t\t\t\t\t\t\tstyle={ { display: 'block' } }\n\t\t\t\t\t\t\tvalue={ citation }\n\t\t\t\t\t\t\taria-label={ __( 'Pullquote citation text' ) }\n\t\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t\t// translators: placeholder text used for the citation\n\t\t\t\t\t\t\t\t__( 'Add citation' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonChange={ ( nextCitation ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tcitation: nextCitation,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tclassName=\"wp-block-pullquote__citation\"\n\t\t\t\t\t\t\t__unstableMobileNoFocusOnMount\n\t\t\t\t\t\t\ttextAlign=\"center\"\n\t\t\t\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\t\tcreateBlock( getDefaultBlockName() )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockQuote>\n\t\t\t</Figure>\n\t\t</>\n\t);\n}\n\nexport default PullQuoteEdit;\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/pullquote/edit.js"],"names":["classnames","__","AlignmentControl","BlockControls","RichText","useBlockProps","createBlock","getDefaultBlockName","Platform","Figure","BlockQuote","isWebPlatform","OS","PullQuoteEdit","attributes","setAttributes","isSelected","insertBlocksAfter","textAlign","citation","value","blockProps","className","shouldShowCitation","isEmpty","nextAlign","nextValue","undefined","display","nextCitation"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SACCC,gBADD,EAECC,aAFD,EAGCC,QAHD,EAICC,aAJD,QAKO,yBALP;AAMA,SAASC,WAAT,EAAsBC,mBAAtB,QAAiD,mBAAjD;AACA,SAASC,QAAT,QAAyB,oBAAzB;AAEA;AACA;AACA;;AACA,SAASC,MAAT,QAAuB,UAAvB;AACA,SAASC,UAAT,QAA2B,cAA3B;AAEA,MAAMC,aAAa,GAAGH,QAAQ,CAACI,EAAT,KAAgB,KAAtC;;AAEA,SAASC,aAAT,OAKI;AAAA,MALoB;AACvBC,IAAAA,UADuB;AAEvBC,IAAAA,aAFuB;AAGvBC,IAAAA,UAHuB;AAIvBC,IAAAA;AAJuB,GAKpB;AACH,QAAM;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,QAAb;AAAuBC,IAAAA;AAAvB,MAAiCN,UAAvC;AACA,QAAMO,UAAU,GAAGhB,aAAa,CAAE;AACjCiB,IAAAA,SAAS,EAAEtB,UAAU,CAAE;AACtB,OAAG,kBAAkBkB,SAAW,EAAhC,GAAqCA;AADf,KAAF;AADY,GAAF,CAAhC;AAKA,QAAMK,kBAAkB,GAAG,CAAEnB,QAAQ,CAACoB,OAAT,CAAkBL,QAAlB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,CADK;AAnBnB,IAlBF,CADD,CATD,CADD;AA0DA;;AAED,eAAeM,aAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tRichText,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\nimport { Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { Figure } from './figure';\nimport { BlockQuote } from './blockquote';\n\nconst isWebPlatform = Platform.OS === 'web';\n\nfunction PullQuoteEdit( {\n\tattributes,\n\tsetAttributes,\n\tisSelected,\n\tinsertBlocksAfter,\n} ) {\n\tconst { textAlign, citation, value } = attributes;\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classnames( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\tconst shouldShowCitation = ! RichText.isEmpty( citation ) || isSelected;\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<Figure { ...blockProps }>\n\t\t\t\t<BlockQuote>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"value\"\n\t\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ ( nextValue ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tvalue: nextValue,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ __( 'Pullquote text' ) }\n\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t// translators: placeholder text used for the quote\n\t\t\t\t\t\t\t__( 'Add quote' )\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttextAlign=\"center\"\n\t\t\t\t\t/>\n\t\t\t\t\t{ shouldShowCitation && (\n\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\tidentifier=\"citation\"\n\t\t\t\t\t\t\ttagName={ isWebPlatform ? 'cite' : undefined }\n\t\t\t\t\t\t\tstyle={ { display: 'block' } }\n\t\t\t\t\t\t\tvalue={ citation }\n\t\t\t\t\t\t\taria-label={ __( 'Pullquote citation text' ) }\n\t\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t\t// translators: placeholder text used for the citation\n\t\t\t\t\t\t\t\t__( 'Add citation' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonChange={ ( nextCitation ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tcitation: nextCitation,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tclassName=\"wp-block-pullquote__citation\"\n\t\t\t\t\t\t\t__unstableMobileNoFocusOnMount\n\t\t\t\t\t\t\ttextAlign=\"center\"\n\t\t\t\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\t\tcreateBlock( getDefaultBlockName() )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockQuote>\n\t\t\t</Figure>\n\t\t</>\n\t);\n}\n\nexport default PullQuoteEdit;\n"]}
@@ -86,7 +86,6 @@ function PullQuoteEdit(props) {
86
86
  textColor: getTextColor(props)
87
87
  }, createElement(RichText, {
88
88
  identifier: "value",
89
- multiline: true,
90
89
  value: value,
91
90
  onChange: nextValue => setAttributes({
92
91
  value: nextValue
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/pullquote/edit.native.js"],"names":["__","AlignmentControl","BlockControls","RichText","useBlockProps","getColorObjectByAttributeValues","__experimentalGetColorClassesAndStyles","getColorClassesAndStyles","createBlock","getDefaultBlockName","Figure","BlockQuote","getBackgroundColor","attributes","colors","style","backgroundColor","colorProps","colorObject","color","background","getTextColor","textColor","baseColors","text","getBorderColor","props","wrapperProps","defaultColor","borderColor","PullQuoteEdit","setAttributes","isSelected","insertBlocksAfter","textAlign","citation","value","blockProps","shouldShowCitation","isEmpty","nextAlign","nextValue","nextCitation"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SACCC,gBADD,EAECC,aAFD,EAGCC,QAHD,EAICC,aAJD,EAKCC,+BALD,EAMCC,sCAAsC,IAAIC,wBAN3C,QAOO,yBAPP;AAQA,SAASC,WAAT,EAAsBC,mBAAtB,QAAiD,mBAAjD;AAEA;AACA;AACA;;AACA,SAASC,MAAT,QAAuB,UAAvB;AACA,SAASC,UAAT,QAA2B,cAA3B;;AAEA,MAAMC,kBAAkB,GAAG,QAAqC;AAAA;;AAAA,MAAnC;AAAEC,IAAAA,UAAF;AAAcC,IAAAA,MAAd;AAAsBC,IAAAA;AAAtB,GAAmC;AAC/D,QAAM;AAAEC,IAAAA;AAAF,MAAsBH,UAA5B;AAEA,QAAMI,UAAU,GAAGV,wBAAwB,CAAEM,UAAF,CAA3C;AACA,QAAMK,WAAW,GAAGb,+BAA+B,CAClDS,MADkD,EAElDE,eAFkD,CAAnD;AAKA,SACC,CAAAE,WAAW,SAAX,IAAAA,WAAW,WAAX,YAAAA,WAAW,CAAEC,KAAb,2BACAF,UAAU,CAACF,KADX,sDACA,kBAAkBC,eADlB,4BAEAC,UAAU,CAACF,KAFX,uDAEA,mBAAkBK,UAFlB,MAGAL,KAHA,aAGAA,KAHA,uBAGAA,KAAK,CAAEC,eAHP,CADD;AAMA,CAfD;;AAiBA,MAAMK,YAAY,GAAG,SAAqC;AAAA;;AAAA,MAAnC;AAAER,IAAAA,UAAF;A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AAhBnB,IAlBF,CADD,CATD,CADD;AAuDA;;AAED,eAAeqB,aAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tRichText,\n\tuseBlockProps,\n\tgetColorObjectByAttributeValues,\n\t__experimentalGetColorClassesAndStyles as getColorClassesAndStyles,\n} from '@wordpress/block-editor';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { Figure } from './figure';\nimport { BlockQuote } from './blockquote';\n\nconst getBackgroundColor = ( { attributes, colors, style } ) => {\n\tconst { backgroundColor } = attributes;\n\n\tconst colorProps = getColorClassesAndStyles( attributes );\n\tconst colorObject = getColorObjectByAttributeValues(\n\t\tcolors,\n\t\tbackgroundColor\n\t);\n\n\treturn (\n\t\tcolorObject?.color ||\n\t\tcolorProps.style?.backgroundColor ||\n\t\tcolorProps.style?.background ||\n\t\tstyle?.backgroundColor\n\t);\n};\n\nconst getTextColor = ( { attributes, colors, style } ) => {\n\tconst colorProps = getColorClassesAndStyles( attributes );\n\tconst colorObject = getColorObjectByAttributeValues(\n\t\tcolors,\n\t\tattributes.textColor\n\t);\n\treturn (\n\t\tcolorObject?.color ||\n\t\tcolorProps.style?.color ||\n\t\tstyle?.color ||\n\t\tstyle?.baseColors?.color?.text\n\t);\n};\nconst getBorderColor = ( props ) => {\n\tconst { wrapperProps } = props;\n\tconst defaultColor = getTextColor( props );\n\n\treturn wrapperProps?.style?.borderColor || defaultColor;\n};\n/**\n * Internal dependencies\n */\n\nfunction PullQuoteEdit( props ) {\n\tconst { attributes, setAttributes, isSelected, insertBlocksAfter } = props;\n\tconst { textAlign, citation, value } = attributes;\n\n\tconst blockProps = useBlockProps( {\n\t\tbackgroundColor: getBackgroundColor( props ),\n\t\tborderColor: getBorderColor( props ),\n\t} );\n\n\tconst shouldShowCitation = ! RichText.isEmpty( citation ) || isSelected;\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<Figure { ...blockProps }>\n\t\t\t\t<BlockQuote textColor={ getTextColor( props ) }>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"value\"\n\t\t\t\t\t\tmultiline\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ ( nextValue ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tvalue: nextValue,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ __( 'Pullquote text' ) }\n\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t// translators: placeholder text used for the quote\n\t\t\t\t\t\t\t__( 'Add quote' )\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttextAlign={ textAlign ?? 'center' }\n\t\t\t\t\t/>\n\t\t\t\t\t{ shouldShowCitation && (\n\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\tidentifier=\"citation\"\n\t\t\t\t\t\t\tvalue={ citation }\n\t\t\t\t\t\t\taria-label={ __( 'Pullquote citation text' ) }\n\t\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t\t// translators: placeholder text used for the citation\n\t\t\t\t\t\t\t\t__( 'Add citation' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonChange={ ( nextCitation ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tcitation: nextCitation,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t__unstableMobileNoFocusOnMount\n\t\t\t\t\t\t\ttextAlign={ textAlign ?? 'center' }\n\t\t\t\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\t\tcreateBlock( getDefaultBlockName() )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockQuote>\n\t\t\t</Figure>\n\t\t</>\n\t);\n}\n\nexport default PullQuoteEdit;\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/pullquote/edit.native.js"],"names":["__","AlignmentControl","BlockControls","RichText","useBlockProps","getColorObjectByAttributeValues","__experimentalGetColorClassesAndStyles","getColorClassesAndStyles","createBlock","getDefaultBlockName","Figure","BlockQuote","getBackgroundColor","attributes","colors","style","backgroundColor","colorProps","colorObject","color","background","getTextColor","textColor","baseColors","text","getBorderColor","props","wrapperProps","defaultColor","borderColor","PullQuoteEdit","setAttributes","isSelected","insertBlocksAfter","textAlign","citation","value","blockProps","shouldShowCitation","isEmpty","nextAlign","nextValue","nextCitation"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SACCC,gBADD,EAECC,aAFD,EAGCC,QAHD,EAICC,aAJD,EAKCC,+BALD,EAMCC,sCAAsC,IAAIC,wBAN3C,QAOO,yBAPP;AAQA,SAASC,WAAT,EAAsBC,mBAAtB,QAAiD,mBAAjD;AAEA;AACA;AACA;;AACA,SAASC,MAAT,QAAuB,UAAvB;AACA,SAASC,UAAT,QAA2B,cAA3B;;AAEA,MAAMC,kBAAkB,GAAG,QAAqC;AAAA;;AAAA,MAAnC;AAAEC,IAAAA,UAAF;AAAcC,IAAAA,MAAd;AAAsBC,IAAAA;AAAtB,GAAmC;AAC/D,QAAM;AAAEC,IAAAA;AAAF,MAAsBH,UAA5B;AAEA,QAAMI,UAAU,GAAGV,wBAAwB,CAAEM,UAAF,CAA3C;AACA,QAAMK,WAAW,GAAGb,+BAA+B,CAClDS,MADkD,EAElDE,eAFkD,CAAnD;AAKA,SACC,CA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ANJ;AAQC,IAAA,QAAQ,EAAK0C,YAAF,IACVX,aAAa,CAAE;AACdI,MAAAA,QAAQ,EAAEO;AADI,KAAF,CATf;AAaC,IAAA,8BAA8B,MAb/B;AAcC,IAAA,SAAS,EAAGR,SAAH,aAAGA,SAAH,cAAGA,SAAH,GAAgB,QAd1B;AAeC,IAAA,sBAAsB,EAAG,MACxBD,iBAAiB,CAChBzB,WAAW,CAAEC,mBAAmB,EAArB,CADK;AAhBnB,IAjBF,CADD,CATD,CADD;AAsDA;;AAED,eAAeqB,aAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tRichText,\n\tuseBlockProps,\n\tgetColorObjectByAttributeValues,\n\t__experimentalGetColorClassesAndStyles as getColorClassesAndStyles,\n} from '@wordpress/block-editor';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { Figure } from './figure';\nimport { BlockQuote } from './blockquote';\n\nconst getBackgroundColor = ( { attributes, colors, style } ) => {\n\tconst { backgroundColor } = attributes;\n\n\tconst colorProps = getColorClassesAndStyles( attributes );\n\tconst colorObject = getColorObjectByAttributeValues(\n\t\tcolors,\n\t\tbackgroundColor\n\t);\n\n\treturn (\n\t\tcolorObject?.color ||\n\t\tcolorProps.style?.backgroundColor ||\n\t\tcolorProps.style?.background ||\n\t\tstyle?.backgroundColor\n\t);\n};\n\nconst getTextColor = ( { attributes, colors, style } ) => {\n\tconst colorProps = getColorClassesAndStyles( attributes );\n\tconst colorObject = getColorObjectByAttributeValues(\n\t\tcolors,\n\t\tattributes.textColor\n\t);\n\treturn (\n\t\tcolorObject?.color ||\n\t\tcolorProps.style?.color ||\n\t\tstyle?.color ||\n\t\tstyle?.baseColors?.color?.text\n\t);\n};\nconst getBorderColor = ( props ) => {\n\tconst { wrapperProps } = props;\n\tconst defaultColor = getTextColor( props );\n\n\treturn wrapperProps?.style?.borderColor || defaultColor;\n};\n/**\n * Internal dependencies\n */\n\nfunction PullQuoteEdit( props ) {\n\tconst { attributes, setAttributes, isSelected, insertBlocksAfter } = props;\n\tconst { textAlign, citation, value } = attributes;\n\n\tconst blockProps = useBlockProps( {\n\t\tbackgroundColor: getBackgroundColor( props ),\n\t\tborderColor: getBorderColor( props ),\n\t} );\n\n\tconst shouldShowCitation = ! RichText.isEmpty( citation ) || isSelected;\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<Figure { ...blockProps }>\n\t\t\t\t<BlockQuote textColor={ getTextColor( props ) }>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"value\"\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ ( nextValue ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tvalue: nextValue,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ __( 'Pullquote text' ) }\n\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t// translators: placeholder text used for the quote\n\t\t\t\t\t\t\t__( 'Add quote' )\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttextAlign={ textAlign ?? 'center' }\n\t\t\t\t\t/>\n\t\t\t\t\t{ shouldShowCitation && (\n\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\tidentifier=\"citation\"\n\t\t\t\t\t\t\tvalue={ citation }\n\t\t\t\t\t\t\taria-label={ __( 'Pullquote citation text' ) }\n\t\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t\t// translators: placeholder text used for the citation\n\t\t\t\t\t\t\t\t__( 'Add citation' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonChange={ ( nextCitation ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tcitation: nextCitation,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t__unstableMobileNoFocusOnMount\n\t\t\t\t\t\t\ttextAlign={ textAlign ?? 'center' }\n\t\t\t\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\t\tcreateBlock( getDefaultBlockName() )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockQuote>\n\t\t\t</Figure>\n\t\t</>\n\t);\n}\n\nexport default PullQuoteEdit;\n"]}