@wordpress/block-library 8.33.0 → 8.35.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 (900) hide show
  1. package/CHANGELOG.md +10 -3
  2. package/build/audio/edit.js +2 -2
  3. package/build/audio/edit.js.map +1 -1
  4. package/build/avatar/edit.js +2 -2
  5. package/build/avatar/edit.js.map +1 -1
  6. package/build/block/edit.js +25 -160
  7. package/build/block/edit.js.map +1 -1
  8. package/build/block-keyboard-shortcuts/index.js +95 -0
  9. package/build/block-keyboard-shortcuts/index.js.map +1 -0
  10. package/build/button/deprecated.js +16 -16
  11. package/build/button/deprecated.js.map +1 -1
  12. package/build/button/edit.js +3 -7
  13. package/build/button/edit.js.map +1 -1
  14. package/build/button/index.js +1 -0
  15. package/build/button/index.js.map +1 -1
  16. package/build/button/save.js +3 -3
  17. package/build/button/save.js.map +1 -1
  18. package/build/buttons/deprecated.js +2 -2
  19. package/build/buttons/deprecated.js.map +1 -1
  20. package/build/buttons/edit.js +2 -2
  21. package/build/buttons/edit.js.map +1 -1
  22. package/build/buttons/save.js +2 -2
  23. package/build/buttons/save.js.map +1 -1
  24. package/build/categories/edit.js +2 -2
  25. package/build/categories/edit.js.map +1 -1
  26. package/build/column/deprecated.js +2 -2
  27. package/build/column/deprecated.js.map +1 -1
  28. package/build/column/edit.js +30 -21
  29. package/build/column/edit.js.map +1 -1
  30. package/build/column/edit.native.js +3 -1
  31. package/build/column/edit.native.js.map +1 -1
  32. package/build/column/save.js +2 -2
  33. package/build/column/save.js.map +1 -1
  34. package/build/columns/deprecated.js +3 -3
  35. package/build/columns/deprecated.js.map +1 -1
  36. package/build/columns/edit.js +70 -54
  37. package/build/columns/edit.js.map +1 -1
  38. package/build/columns/save.js +2 -2
  39. package/build/columns/save.js.map +1 -1
  40. package/build/columns/variations.js +18 -28
  41. package/build/columns/variations.js.map +1 -1
  42. package/build/comment-author-name/edit.js +2 -2
  43. package/build/comment-author-name/edit.js.map +1 -1
  44. package/build/comment-content/edit.js +2 -2
  45. package/build/comment-content/edit.js.map +1 -1
  46. package/build/comment-edit-link/edit.js +2 -2
  47. package/build/comment-edit-link/edit.js.map +1 -1
  48. package/build/comment-reply-link/edit.js +2 -2
  49. package/build/comment-reply-link/edit.js.map +1 -1
  50. package/build/comment-template/util.js +3 -1
  51. package/build/comment-template/util.js.map +1 -1
  52. package/build/comments/edit/comments-legacy.js +2 -2
  53. package/build/comments/edit/comments-legacy.js.map +1 -1
  54. package/build/comments-title/edit.js +2 -2
  55. package/build/comments-title/edit.js.map +1 -1
  56. package/build/cover/deprecated.js +38 -38
  57. package/build/cover/deprecated.js.map +1 -1
  58. package/build/cover/edit/index.js +6 -6
  59. package/build/cover/edit/index.js.map +1 -1
  60. package/build/cover/edit/resizable-cover-popover.js +2 -2
  61. package/build/cover/edit/resizable-cover-popover.js.map +1 -1
  62. package/build/cover/edit.native.js +2 -2
  63. package/build/cover/edit.native.js.map +1 -1
  64. package/build/cover/save.js +5 -5
  65. package/build/cover/save.js.map +1 -1
  66. package/build/cover/shared.js +3 -1
  67. package/build/cover/shared.js.map +1 -1
  68. package/build/embed/deprecated.js +3 -3
  69. package/build/embed/deprecated.js.map +1 -1
  70. package/build/embed/edit.js +2 -2
  71. package/build/embed/edit.js.map +1 -1
  72. package/build/embed/edit.native.js +2 -2
  73. package/build/embed/edit.native.js.map +1 -1
  74. package/build/embed/embed-placeholder.js +8 -3
  75. package/build/embed/embed-placeholder.js.map +1 -1
  76. package/build/embed/embed-preview.js +3 -3
  77. package/build/embed/embed-preview.js.map +1 -1
  78. package/build/embed/embed-preview.native.js +2 -2
  79. package/build/embed/embed-preview.native.js.map +1 -1
  80. package/build/embed/icons.js +7 -1
  81. package/build/embed/icons.js.map +1 -1
  82. package/build/embed/save.js +2 -2
  83. package/build/embed/save.js.map +1 -1
  84. package/build/embed/util.js +13 -9
  85. package/build/embed/util.js.map +1 -1
  86. package/build/embed/variations.js +12 -1
  87. package/build/embed/variations.js.map +1 -1
  88. package/build/embed/wp-embed-preview.js +6 -2
  89. package/build/embed/wp-embed-preview.js.map +1 -1
  90. package/build/file/deprecated.js +2 -2
  91. package/build/file/deprecated.js.map +1 -1
  92. package/build/file/edit.js +3 -3
  93. package/build/file/edit.js.map +1 -1
  94. package/build/file/save.js +2 -2
  95. package/build/file/save.js.map +1 -1
  96. package/build/form-input/deprecated.js +3 -3
  97. package/build/form-input/deprecated.js.map +1 -1
  98. package/build/form-input/edit.js +4 -4
  99. package/build/form-input/edit.js.map +1 -1
  100. package/build/form-input/save.js +3 -3
  101. package/build/form-input/save.js.map +1 -1
  102. package/build/form-submission-notification/edit.js +2 -2
  103. package/build/form-submission-notification/edit.js.map +1 -1
  104. package/build/form-submission-notification/save.js +2 -2
  105. package/build/form-submission-notification/save.js.map +1 -1
  106. package/build/gallery/deprecated.js +3 -3
  107. package/build/gallery/deprecated.js.map +1 -1
  108. package/build/gallery/edit.js +2 -2
  109. package/build/gallery/edit.js.map +1 -1
  110. package/build/gallery/gallery.js +2 -2
  111. package/build/gallery/gallery.js.map +1 -1
  112. package/build/gallery/save.js +3 -3
  113. package/build/gallery/save.js.map +1 -1
  114. package/build/gallery/v1/gallery-image.js +2 -2
  115. package/build/gallery/v1/gallery-image.js.map +1 -1
  116. package/build/gallery/v1/gallery.js +3 -3
  117. package/build/gallery/v1/gallery.js.map +1 -1
  118. package/build/gallery/v1/save.js +3 -3
  119. package/build/gallery/v1/save.js.map +1 -1
  120. package/build/group/deprecated.js +4 -4
  121. package/build/group/deprecated.js.map +1 -1
  122. package/build/group/index.js +0 -8
  123. package/build/group/index.js.map +1 -1
  124. package/build/group/placeholder.js +18 -19
  125. package/build/group/placeholder.js.map +1 -1
  126. package/build/heading/deprecated.js +6 -6
  127. package/build/heading/deprecated.js.map +1 -1
  128. package/build/heading/edit.js +2 -19
  129. package/build/heading/edit.js.map +1 -1
  130. package/build/heading/edit.native.js +2 -2
  131. package/build/heading/edit.native.js.map +1 -1
  132. package/build/heading/index.js +1 -0
  133. package/build/heading/index.js.map +1 -1
  134. package/build/heading/save.js +2 -2
  135. package/build/heading/save.js.map +1 -1
  136. package/build/home-link/edit.js +2 -2
  137. package/build/home-link/edit.js.map +1 -1
  138. package/build/html/edit.js +0 -2
  139. package/build/html/edit.js.map +1 -1
  140. package/build/image/deprecated.js +10 -10
  141. package/build/image/deprecated.js.map +1 -1
  142. package/build/image/edit.js +7 -5
  143. package/build/image/edit.js.map +1 -1
  144. package/build/image/image.js +8 -4
  145. package/build/image/image.js.map +1 -1
  146. package/build/image/save.js +3 -3
  147. package/build/image/save.js.map +1 -1
  148. package/build/image/view.js +3 -1
  149. package/build/image/view.js.map +1 -1
  150. package/build/index.js +9 -1
  151. package/build/index.js.map +1 -1
  152. package/build/latest-posts/edit.js +5 -5
  153. package/build/latest-posts/edit.js.map +1 -1
  154. package/build/list/deprecated.js +90 -1
  155. package/build/list/deprecated.js.map +1 -1
  156. package/build/list/index.js +0 -2
  157. package/build/list/index.js.map +1 -1
  158. package/build/list-item/edit.js +1 -8
  159. package/build/list-item/edit.js.map +1 -1
  160. package/build/list-item/hooks/use-merge.js +12 -4
  161. package/build/list-item/hooks/use-merge.js.map +1 -1
  162. package/build/list-item/hooks/use-outdent-list-item.js +15 -5
  163. package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
  164. package/build/list-item/index.js +2 -1
  165. package/build/list-item/index.js.map +1 -1
  166. package/build/media-text/deprecated.js +10 -10
  167. package/build/media-text/deprecated.js.map +1 -1
  168. package/build/media-text/edit.js +2 -2
  169. package/build/media-text/edit.js.map +1 -1
  170. package/build/media-text/media-container.js +2 -2
  171. package/build/media-text/media-container.js.map +1 -1
  172. package/build/media-text/save.js +3 -3
  173. package/build/media-text/save.js.map +1 -1
  174. package/build/navigation/edit/are-blocks-dirty.js +9 -3
  175. package/build/navigation/edit/are-blocks-dirty.js.map +1 -1
  176. package/build/navigation/edit/deleted-navigation-warning.js +1 -1
  177. package/build/navigation/edit/deleted-navigation-warning.js.map +1 -1
  178. package/build/navigation/edit/index.js +3 -3
  179. package/build/navigation/edit/index.js.map +1 -1
  180. package/build/navigation/edit/menu-inspector-controls.js +3 -1
  181. package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
  182. package/build/navigation/edit/navigation-menu-selector.js +1 -1
  183. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  184. package/build/navigation/edit/responsive-wrapper.js +3 -3
  185. package/build/navigation/edit/responsive-wrapper.js.map +1 -1
  186. package/build/navigation/edit/utils.js +2 -2
  187. package/build/navigation/edit/utils.js.map +1 -1
  188. package/build/navigation/index.js +0 -9
  189. package/build/navigation/index.js.map +1 -1
  190. package/build/navigation/view.js +3 -1
  191. package/build/navigation/view.js.map +1 -1
  192. package/build/navigation-link/edit.js +97 -88
  193. package/build/navigation-link/edit.js.map +1 -1
  194. package/build/navigation-link/link-ui.js +2 -7
  195. package/build/navigation-link/link-ui.js.map +1 -1
  196. package/build/navigation-submenu/edit.js +2 -2
  197. package/build/navigation-submenu/edit.js.map +1 -1
  198. package/build/page-list/edit.js +2 -2
  199. package/build/page-list/edit.js.map +1 -1
  200. package/build/page-list-item/edit.js +3 -3
  201. package/build/page-list-item/edit.js.map +1 -1
  202. package/build/paragraph/deprecated.js +6 -6
  203. package/build/paragraph/deprecated.js.map +1 -1
  204. package/build/paragraph/edit.js +2 -18
  205. package/build/paragraph/edit.js.map +1 -1
  206. package/build/paragraph/index.js +1 -1
  207. package/build/paragraph/index.js.map +1 -1
  208. package/build/paragraph/save.js +2 -2
  209. package/build/paragraph/save.js.map +1 -1
  210. package/build/paragraph/transforms.js +1 -1
  211. package/build/paragraph/transforms.js.map +1 -1
  212. package/build/pattern/edit.js +1 -1
  213. package/build/pattern/edit.js.map +1 -1
  214. package/build/post-author/edit.js +2 -2
  215. package/build/post-author/edit.js.map +1 -1
  216. package/build/post-author-biography/edit.js +2 -2
  217. package/build/post-author-biography/edit.js.map +1 -1
  218. package/build/post-author-name/edit.js +2 -2
  219. package/build/post-author-name/edit.js.map +1 -1
  220. package/build/post-comments-count/edit.js +2 -2
  221. package/build/post-comments-count/edit.js.map +1 -1
  222. package/build/post-comments-form/edit.js +2 -2
  223. package/build/post-comments-form/edit.js.map +1 -1
  224. package/build/post-comments-form/form.js +2 -2
  225. package/build/post-comments-form/form.js.map +1 -1
  226. package/build/post-comments-link/edit.js +2 -2
  227. package/build/post-comments-link/edit.js.map +1 -1
  228. package/build/post-date/edit.js +2 -2
  229. package/build/post-date/edit.js.map +1 -1
  230. package/build/post-excerpt/edit.js +6 -4
  231. package/build/post-excerpt/edit.js.map +1 -1
  232. package/build/post-featured-image/dimension-controls.js +23 -29
  233. package/build/post-featured-image/dimension-controls.js.map +1 -1
  234. package/build/post-featured-image/edit.js +3 -3
  235. package/build/post-featured-image/edit.js.map +1 -1
  236. package/build/post-featured-image/overlay.js +2 -2
  237. package/build/post-featured-image/overlay.js.map +1 -1
  238. package/build/post-navigation-link/edit.js +2 -2
  239. package/build/post-navigation-link/edit.js.map +1 -1
  240. package/build/post-navigation-link/variations.js +3 -1
  241. package/build/post-navigation-link/variations.js.map +1 -1
  242. package/build/post-template/edit.js +22 -12
  243. package/build/post-template/edit.js.map +1 -1
  244. package/build/post-terms/edit.js +5 -3
  245. package/build/post-terms/edit.js.map +1 -1
  246. package/build/post-time-to-read/edit.js +3 -3
  247. package/build/post-time-to-read/edit.js.map +1 -1
  248. package/build/post-title/edit.js +2 -2
  249. package/build/post-title/edit.js.map +1 -1
  250. package/build/private-apis.js +21 -0
  251. package/build/private-apis.js.map +1 -0
  252. package/build/pullquote/deprecated.js +7 -7
  253. package/build/pullquote/deprecated.js.map +1 -1
  254. package/build/pullquote/edit.js +2 -2
  255. package/build/pullquote/edit.js.map +1 -1
  256. package/build/pullquote/save.js +2 -2
  257. package/build/pullquote/save.js.map +1 -1
  258. package/build/query/edit/enhanced-pagination-modal.js +1 -1
  259. package/build/query/edit/enhanced-pagination-modal.js.map +1 -1
  260. package/build/query/edit/inspector-controls/author-control.js +6 -2
  261. package/build/query/edit/inspector-controls/author-control.js.map +1 -1
  262. package/build/query/edit/inspector-controls/create-new-post-link.js +3 -1
  263. package/build/query/edit/inspector-controls/create-new-post-link.js.map +1 -1
  264. package/build/query/edit/inspector-controls/enhanced-pagination-control.js +6 -3
  265. package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  266. package/build/query/edit/inspector-controls/parent-control.js +18 -6
  267. package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
  268. package/build/query/edit/inspector-controls/taxonomy-controls.js +9 -3
  269. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  270. package/build/query/utils.js +3 -1
  271. package/build/query/utils.js.map +1 -1
  272. package/build/query-title/edit.js +2 -2
  273. package/build/query-title/edit.js.map +1 -1
  274. package/build/query-title/variations.js +3 -1
  275. package/build/query-title/variations.js.map +1 -1
  276. package/build/quote/deprecated.js +3 -3
  277. package/build/quote/deprecated.js.map +1 -1
  278. package/build/quote/edit.js +2 -2
  279. package/build/quote/edit.js.map +1 -1
  280. package/build/quote/save.js +2 -2
  281. package/build/quote/save.js.map +1 -1
  282. package/build/rss/edit.js +8 -6
  283. package/build/rss/edit.js.map +1 -1
  284. package/build/search/edit.js +6 -6
  285. package/build/search/edit.js.map +1 -1
  286. package/build/search/edit.native.js +2 -2
  287. package/build/search/edit.native.js.map +1 -1
  288. package/build/separator/deprecated.js +2 -2
  289. package/build/separator/deprecated.js.map +1 -1
  290. package/build/separator/edit.js +2 -2
  291. package/build/separator/edit.js.map +1 -1
  292. package/build/separator/save.js +2 -2
  293. package/build/separator/save.js.map +1 -1
  294. package/build/shortcode/edit.js +7 -10
  295. package/build/shortcode/edit.js.map +1 -1
  296. package/build/site-logo/edit.js +4 -4
  297. package/build/site-logo/edit.js.map +1 -1
  298. package/build/site-tagline/edit.js +2 -2
  299. package/build/site-tagline/edit.js.map +1 -1
  300. package/build/site-title/edit.js +2 -2
  301. package/build/site-title/edit.js.map +1 -1
  302. package/build/social-link/edit.js +4 -4
  303. package/build/social-link/edit.js.map +1 -1
  304. package/build/social-link/variations.js +3 -1
  305. package/build/social-link/variations.js.map +1 -1
  306. package/build/social-links/deprecated.js +2 -2
  307. package/build/social-links/deprecated.js.map +1 -1
  308. package/build/social-links/edit.js +2 -2
  309. package/build/social-links/edit.js.map +1 -1
  310. package/build/social-links/save.js +2 -2
  311. package/build/social-links/save.js.map +1 -1
  312. package/build/spacer/edit.js +3 -3
  313. package/build/spacer/edit.js.map +1 -1
  314. package/build/table/deprecated.js +8 -8
  315. package/build/table/deprecated.js.map +1 -1
  316. package/build/table/edit.js +3 -3
  317. package/build/table/edit.js.map +1 -1
  318. package/build/table/save.js +3 -3
  319. package/build/table/save.js.map +1 -1
  320. package/build/template-part/variations.js +6 -2
  321. package/build/template-part/variations.js.map +1 -1
  322. package/build/term-description/edit.js +2 -2
  323. package/build/term-description/edit.js.map +1 -1
  324. package/build/utils/caption.js +2 -2
  325. package/build/utils/caption.js.map +1 -1
  326. package/build/verse/deprecated.js +2 -2
  327. package/build/verse/deprecated.js.map +1 -1
  328. package/build/verse/edit.js +2 -2
  329. package/build/verse/edit.js.map +1 -1
  330. package/build/verse/save.js +2 -2
  331. package/build/verse/save.js.map +1 -1
  332. package/build/video/edit.js +2 -2
  333. package/build/video/edit.js.map +1 -1
  334. package/build-module/audio/edit.js +2 -2
  335. package/build-module/audio/edit.js.map +1 -1
  336. package/build-module/avatar/edit.js +2 -2
  337. package/build-module/avatar/edit.js.map +1 -1
  338. package/build-module/block/edit.js +29 -164
  339. package/build-module/block/edit.js.map +1 -1
  340. package/build-module/block-keyboard-shortcuts/index.js +88 -0
  341. package/build-module/block-keyboard-shortcuts/index.js.map +1 -0
  342. package/build-module/button/deprecated.js +16 -16
  343. package/build-module/button/deprecated.js.map +1 -1
  344. package/build-module/button/edit.js +3 -7
  345. package/build-module/button/edit.js.map +1 -1
  346. package/build-module/button/index.js +1 -0
  347. package/build-module/button/index.js.map +1 -1
  348. package/build-module/button/save.js +3 -3
  349. package/build-module/button/save.js.map +1 -1
  350. package/build-module/buttons/deprecated.js +2 -2
  351. package/build-module/buttons/deprecated.js.map +1 -1
  352. package/build-module/buttons/edit.js +2 -2
  353. package/build-module/buttons/edit.js.map +1 -1
  354. package/build-module/buttons/save.js +2 -2
  355. package/build-module/buttons/save.js.map +1 -1
  356. package/build-module/categories/edit.js +2 -2
  357. package/build-module/categories/edit.js.map +1 -1
  358. package/build-module/column/deprecated.js +2 -2
  359. package/build-module/column/deprecated.js.map +1 -1
  360. package/build-module/column/edit.js +30 -21
  361. package/build-module/column/edit.js.map +1 -1
  362. package/build-module/column/edit.native.js +3 -1
  363. package/build-module/column/edit.native.js.map +1 -1
  364. package/build-module/column/save.js +2 -2
  365. package/build-module/column/save.js.map +1 -1
  366. package/build-module/columns/deprecated.js +3 -3
  367. package/build-module/columns/deprecated.js.map +1 -1
  368. package/build-module/columns/edit.js +70 -54
  369. package/build-module/columns/edit.js.map +1 -1
  370. package/build-module/columns/save.js +2 -2
  371. package/build-module/columns/save.js.map +1 -1
  372. package/build-module/columns/variations.js +18 -28
  373. package/build-module/columns/variations.js.map +1 -1
  374. package/build-module/comment-author-name/edit.js +2 -2
  375. package/build-module/comment-author-name/edit.js.map +1 -1
  376. package/build-module/comment-content/edit.js +2 -2
  377. package/build-module/comment-content/edit.js.map +1 -1
  378. package/build-module/comment-edit-link/edit.js +2 -2
  379. package/build-module/comment-edit-link/edit.js.map +1 -1
  380. package/build-module/comment-reply-link/edit.js +2 -2
  381. package/build-module/comment-reply-link/edit.js.map +1 -1
  382. package/build-module/comment-template/util.js +3 -1
  383. package/build-module/comment-template/util.js.map +1 -1
  384. package/build-module/comments/edit/comments-legacy.js +2 -2
  385. package/build-module/comments/edit/comments-legacy.js.map +1 -1
  386. package/build-module/comments-title/edit.js +2 -2
  387. package/build-module/comments-title/edit.js.map +1 -1
  388. package/build-module/cover/deprecated.js +38 -38
  389. package/build-module/cover/deprecated.js.map +1 -1
  390. package/build-module/cover/edit/index.js +6 -6
  391. package/build-module/cover/edit/index.js.map +1 -1
  392. package/build-module/cover/edit/resizable-cover-popover.js +2 -2
  393. package/build-module/cover/edit/resizable-cover-popover.js.map +1 -1
  394. package/build-module/cover/edit.native.js +2 -2
  395. package/build-module/cover/edit.native.js.map +1 -1
  396. package/build-module/cover/save.js +5 -5
  397. package/build-module/cover/save.js.map +1 -1
  398. package/build-module/cover/shared.js +3 -1
  399. package/build-module/cover/shared.js.map +1 -1
  400. package/build-module/embed/deprecated.js +3 -3
  401. package/build-module/embed/deprecated.js.map +1 -1
  402. package/build-module/embed/edit.js +2 -2
  403. package/build-module/embed/edit.js.map +1 -1
  404. package/build-module/embed/edit.native.js +2 -2
  405. package/build-module/embed/edit.native.js.map +1 -1
  406. package/build-module/embed/embed-placeholder.js +9 -4
  407. package/build-module/embed/embed-placeholder.js.map +1 -1
  408. package/build-module/embed/embed-preview.js +3 -3
  409. package/build-module/embed/embed-preview.js.map +1 -1
  410. package/build-module/embed/embed-preview.native.js +2 -2
  411. package/build-module/embed/embed-preview.native.js.map +1 -1
  412. package/build-module/embed/icons.js +6 -0
  413. package/build-module/embed/icons.js.map +1 -1
  414. package/build-module/embed/save.js +2 -2
  415. package/build-module/embed/save.js.map +1 -1
  416. package/build-module/embed/util.js +13 -9
  417. package/build-module/embed/util.js.map +1 -1
  418. package/build-module/embed/variations.js +13 -2
  419. package/build-module/embed/variations.js.map +1 -1
  420. package/build-module/embed/wp-embed-preview.js +6 -2
  421. package/build-module/embed/wp-embed-preview.js.map +1 -1
  422. package/build-module/file/deprecated.js +2 -2
  423. package/build-module/file/deprecated.js.map +1 -1
  424. package/build-module/file/edit.js +3 -3
  425. package/build-module/file/edit.js.map +1 -1
  426. package/build-module/file/save.js +2 -2
  427. package/build-module/file/save.js.map +1 -1
  428. package/build-module/form-input/deprecated.js +3 -3
  429. package/build-module/form-input/deprecated.js.map +1 -1
  430. package/build-module/form-input/edit.js +4 -4
  431. package/build-module/form-input/edit.js.map +1 -1
  432. package/build-module/form-input/save.js +3 -3
  433. package/build-module/form-input/save.js.map +1 -1
  434. package/build-module/form-submission-notification/edit.js +2 -2
  435. package/build-module/form-submission-notification/edit.js.map +1 -1
  436. package/build-module/form-submission-notification/save.js +2 -2
  437. package/build-module/form-submission-notification/save.js.map +1 -1
  438. package/build-module/gallery/deprecated.js +3 -3
  439. package/build-module/gallery/deprecated.js.map +1 -1
  440. package/build-module/gallery/edit.js +2 -2
  441. package/build-module/gallery/edit.js.map +1 -1
  442. package/build-module/gallery/gallery.js +2 -2
  443. package/build-module/gallery/gallery.js.map +1 -1
  444. package/build-module/gallery/save.js +3 -3
  445. package/build-module/gallery/save.js.map +1 -1
  446. package/build-module/gallery/v1/gallery-image.js +2 -2
  447. package/build-module/gallery/v1/gallery-image.js.map +1 -1
  448. package/build-module/gallery/v1/gallery.js +3 -3
  449. package/build-module/gallery/v1/gallery.js.map +1 -1
  450. package/build-module/gallery/v1/save.js +3 -3
  451. package/build-module/gallery/v1/save.js.map +1 -1
  452. package/build-module/group/deprecated.js +4 -4
  453. package/build-module/group/deprecated.js.map +1 -1
  454. package/build-module/group/index.js +0 -8
  455. package/build-module/group/index.js.map +1 -1
  456. package/build-module/group/placeholder.js +18 -19
  457. package/build-module/group/placeholder.js.map +1 -1
  458. package/build-module/heading/deprecated.js +6 -6
  459. package/build-module/heading/deprecated.js.map +1 -1
  460. package/build-module/heading/edit.js +2 -19
  461. package/build-module/heading/edit.js.map +1 -1
  462. package/build-module/heading/edit.native.js +2 -2
  463. package/build-module/heading/edit.native.js.map +1 -1
  464. package/build-module/heading/index.js +1 -0
  465. package/build-module/heading/index.js.map +1 -1
  466. package/build-module/heading/save.js +2 -2
  467. package/build-module/heading/save.js.map +1 -1
  468. package/build-module/home-link/edit.js +2 -2
  469. package/build-module/home-link/edit.js.map +1 -1
  470. package/build-module/html/edit.js +0 -2
  471. package/build-module/html/edit.js.map +1 -1
  472. package/build-module/image/deprecated.js +10 -10
  473. package/build-module/image/deprecated.js.map +1 -1
  474. package/build-module/image/edit.js +7 -5
  475. package/build-module/image/edit.js.map +1 -1
  476. package/build-module/image/image.js +8 -4
  477. package/build-module/image/image.js.map +1 -1
  478. package/build-module/image/save.js +3 -3
  479. package/build-module/image/save.js.map +1 -1
  480. package/build-module/image/view.js +3 -1
  481. package/build-module/image/view.js.map +1 -1
  482. package/build-module/index.js +1 -0
  483. package/build-module/index.js.map +1 -1
  484. package/build-module/latest-posts/edit.js +6 -6
  485. package/build-module/latest-posts/edit.js.map +1 -1
  486. package/build-module/list/deprecated.js +90 -1
  487. package/build-module/list/deprecated.js.map +1 -1
  488. package/build-module/list/index.js +0 -2
  489. package/build-module/list/index.js.map +1 -1
  490. package/build-module/list-item/edit.js +2 -9
  491. package/build-module/list-item/edit.js.map +1 -1
  492. package/build-module/list-item/hooks/use-merge.js +12 -4
  493. package/build-module/list-item/hooks/use-merge.js.map +1 -1
  494. package/build-module/list-item/hooks/use-outdent-list-item.js +15 -5
  495. package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
  496. package/build-module/list-item/index.js +2 -1
  497. package/build-module/list-item/index.js.map +1 -1
  498. package/build-module/media-text/deprecated.js +10 -10
  499. package/build-module/media-text/deprecated.js.map +1 -1
  500. package/build-module/media-text/edit.js +2 -2
  501. package/build-module/media-text/edit.js.map +1 -1
  502. package/build-module/media-text/media-container.js +2 -2
  503. package/build-module/media-text/media-container.js.map +1 -1
  504. package/build-module/media-text/save.js +3 -3
  505. package/build-module/media-text/save.js.map +1 -1
  506. package/build-module/navigation/edit/are-blocks-dirty.js +9 -3
  507. package/build-module/navigation/edit/are-blocks-dirty.js.map +1 -1
  508. package/build-module/navigation/edit/deleted-navigation-warning.js +1 -1
  509. package/build-module/navigation/edit/deleted-navigation-warning.js.map +1 -1
  510. package/build-module/navigation/edit/index.js +3 -3
  511. package/build-module/navigation/edit/index.js.map +1 -1
  512. package/build-module/navigation/edit/menu-inspector-controls.js +3 -1
  513. package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
  514. package/build-module/navigation/edit/navigation-menu-selector.js +1 -1
  515. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  516. package/build-module/navigation/edit/responsive-wrapper.js +3 -3
  517. package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
  518. package/build-module/navigation/edit/utils.js +2 -2
  519. package/build-module/navigation/edit/utils.js.map +1 -1
  520. package/build-module/navigation/index.js +0 -9
  521. package/build-module/navigation/index.js.map +1 -1
  522. package/build-module/navigation/view.js +3 -1
  523. package/build-module/navigation/view.js.map +1 -1
  524. package/build-module/navigation-link/edit.js +97 -88
  525. package/build-module/navigation-link/edit.js.map +1 -1
  526. package/build-module/navigation-link/link-ui.js +3 -8
  527. package/build-module/navigation-link/link-ui.js.map +1 -1
  528. package/build-module/navigation-submenu/edit.js +2 -2
  529. package/build-module/navigation-submenu/edit.js.map +1 -1
  530. package/build-module/page-list/edit.js +2 -2
  531. package/build-module/page-list/edit.js.map +1 -1
  532. package/build-module/page-list-item/edit.js +3 -3
  533. package/build-module/page-list-item/edit.js.map +1 -1
  534. package/build-module/paragraph/deprecated.js +6 -6
  535. package/build-module/paragraph/deprecated.js.map +1 -1
  536. package/build-module/paragraph/edit.js +2 -18
  537. package/build-module/paragraph/edit.js.map +1 -1
  538. package/build-module/paragraph/index.js +1 -1
  539. package/build-module/paragraph/index.js.map +1 -1
  540. package/build-module/paragraph/save.js +2 -2
  541. package/build-module/paragraph/save.js.map +1 -1
  542. package/build-module/paragraph/transforms.js +1 -1
  543. package/build-module/paragraph/transforms.js.map +1 -1
  544. package/build-module/pattern/edit.js +1 -1
  545. package/build-module/pattern/edit.js.map +1 -1
  546. package/build-module/post-author/edit.js +2 -2
  547. package/build-module/post-author/edit.js.map +1 -1
  548. package/build-module/post-author-biography/edit.js +2 -2
  549. package/build-module/post-author-biography/edit.js.map +1 -1
  550. package/build-module/post-author-name/edit.js +2 -2
  551. package/build-module/post-author-name/edit.js.map +1 -1
  552. package/build-module/post-comments-count/edit.js +2 -2
  553. package/build-module/post-comments-count/edit.js.map +1 -1
  554. package/build-module/post-comments-form/edit.js +2 -2
  555. package/build-module/post-comments-form/edit.js.map +1 -1
  556. package/build-module/post-comments-form/form.js +2 -2
  557. package/build-module/post-comments-form/form.js.map +1 -1
  558. package/build-module/post-comments-link/edit.js +2 -2
  559. package/build-module/post-comments-link/edit.js.map +1 -1
  560. package/build-module/post-date/edit.js +2 -2
  561. package/build-module/post-date/edit.js.map +1 -1
  562. package/build-module/post-excerpt/edit.js +6 -4
  563. package/build-module/post-excerpt/edit.js.map +1 -1
  564. package/build-module/post-featured-image/dimension-controls.js +23 -29
  565. package/build-module/post-featured-image/dimension-controls.js.map +1 -1
  566. package/build-module/post-featured-image/edit.js +3 -3
  567. package/build-module/post-featured-image/edit.js.map +1 -1
  568. package/build-module/post-featured-image/overlay.js +2 -2
  569. package/build-module/post-featured-image/overlay.js.map +1 -1
  570. package/build-module/post-navigation-link/edit.js +2 -2
  571. package/build-module/post-navigation-link/edit.js.map +1 -1
  572. package/build-module/post-navigation-link/variations.js +3 -1
  573. package/build-module/post-navigation-link/variations.js.map +1 -1
  574. package/build-module/post-template/edit.js +23 -13
  575. package/build-module/post-template/edit.js.map +1 -1
  576. package/build-module/post-terms/edit.js +5 -3
  577. package/build-module/post-terms/edit.js.map +1 -1
  578. package/build-module/post-time-to-read/edit.js +3 -3
  579. package/build-module/post-time-to-read/edit.js.map +1 -1
  580. package/build-module/post-title/edit.js +2 -2
  581. package/build-module/post-title/edit.js.map +1 -1
  582. package/build-module/private-apis.js +14 -0
  583. package/build-module/private-apis.js.map +1 -0
  584. package/build-module/pullquote/deprecated.js +7 -7
  585. package/build-module/pullquote/deprecated.js.map +1 -1
  586. package/build-module/pullquote/edit.js +2 -2
  587. package/build-module/pullquote/edit.js.map +1 -1
  588. package/build-module/pullquote/save.js +2 -2
  589. package/build-module/pullquote/save.js.map +1 -1
  590. package/build-module/query/edit/enhanced-pagination-modal.js +1 -1
  591. package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -1
  592. package/build-module/query/edit/inspector-controls/author-control.js +6 -2
  593. package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
  594. package/build-module/query/edit/inspector-controls/create-new-post-link.js +3 -1
  595. package/build-module/query/edit/inspector-controls/create-new-post-link.js.map +1 -1
  596. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +6 -3
  597. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  598. package/build-module/query/edit/inspector-controls/parent-control.js +18 -6
  599. package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
  600. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +9 -3
  601. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  602. package/build-module/query/utils.js +3 -1
  603. package/build-module/query/utils.js.map +1 -1
  604. package/build-module/query-title/edit.js +2 -2
  605. package/build-module/query-title/edit.js.map +1 -1
  606. package/build-module/query-title/variations.js +3 -1
  607. package/build-module/query-title/variations.js.map +1 -1
  608. package/build-module/quote/deprecated.js +3 -3
  609. package/build-module/quote/deprecated.js.map +1 -1
  610. package/build-module/quote/edit.js +2 -2
  611. package/build-module/quote/edit.js.map +1 -1
  612. package/build-module/quote/save.js +2 -2
  613. package/build-module/quote/save.js.map +1 -1
  614. package/build-module/rss/edit.js +10 -8
  615. package/build-module/rss/edit.js.map +1 -1
  616. package/build-module/search/edit.js +6 -6
  617. package/build-module/search/edit.js.map +1 -1
  618. package/build-module/search/edit.native.js +2 -2
  619. package/build-module/search/edit.native.js.map +1 -1
  620. package/build-module/separator/deprecated.js +2 -2
  621. package/build-module/separator/deprecated.js.map +1 -1
  622. package/build-module/separator/edit.js +2 -2
  623. package/build-module/separator/edit.js.map +1 -1
  624. package/build-module/separator/save.js +2 -2
  625. package/build-module/separator/save.js.map +1 -1
  626. package/build-module/shortcode/edit.js +8 -11
  627. package/build-module/shortcode/edit.js.map +1 -1
  628. package/build-module/site-logo/edit.js +4 -4
  629. package/build-module/site-logo/edit.js.map +1 -1
  630. package/build-module/site-tagline/edit.js +2 -2
  631. package/build-module/site-tagline/edit.js.map +1 -1
  632. package/build-module/site-title/edit.js +2 -2
  633. package/build-module/site-title/edit.js.map +1 -1
  634. package/build-module/social-link/edit.js +4 -4
  635. package/build-module/social-link/edit.js.map +1 -1
  636. package/build-module/social-link/variations.js +3 -1
  637. package/build-module/social-link/variations.js.map +1 -1
  638. package/build-module/social-links/deprecated.js +2 -2
  639. package/build-module/social-links/deprecated.js.map +1 -1
  640. package/build-module/social-links/edit.js +2 -2
  641. package/build-module/social-links/edit.js.map +1 -1
  642. package/build-module/social-links/save.js +2 -2
  643. package/build-module/social-links/save.js.map +1 -1
  644. package/build-module/spacer/edit.js +3 -3
  645. package/build-module/spacer/edit.js.map +1 -1
  646. package/build-module/table/deprecated.js +8 -8
  647. package/build-module/table/deprecated.js.map +1 -1
  648. package/build-module/table/edit.js +3 -3
  649. package/build-module/table/edit.js.map +1 -1
  650. package/build-module/table/save.js +3 -3
  651. package/build-module/table/save.js.map +1 -1
  652. package/build-module/template-part/variations.js +6 -2
  653. package/build-module/template-part/variations.js.map +1 -1
  654. package/build-module/term-description/edit.js +2 -2
  655. package/build-module/term-description/edit.js.map +1 -1
  656. package/build-module/utils/caption.js +2 -2
  657. package/build-module/utils/caption.js.map +1 -1
  658. package/build-module/verse/deprecated.js +2 -2
  659. package/build-module/verse/deprecated.js.map +1 -1
  660. package/build-module/verse/edit.js +2 -2
  661. package/build-module/verse/edit.js.map +1 -1
  662. package/build-module/verse/save.js +2 -2
  663. package/build-module/verse/save.js.map +1 -1
  664. package/build-module/video/edit.js +2 -2
  665. package/build-module/video/edit.js.map +1 -1
  666. package/build-style/block/editor-rtl.css +4 -4
  667. package/build-style/block/editor.css +4 -4
  668. package/build-style/buttons/editor-rtl.css +1 -1
  669. package/build-style/buttons/editor.css +1 -1
  670. package/build-style/buttons/style-rtl.css +1 -1
  671. package/build-style/buttons/style.css +1 -1
  672. package/build-style/common-rtl.css +3 -7
  673. package/build-style/common.css +3 -7
  674. package/build-style/editor-rtl.css +30 -81
  675. package/build-style/editor.css +30 -81
  676. package/build-style/embed/editor-rtl.css +0 -3
  677. package/build-style/embed/editor.css +0 -3
  678. package/build-style/group/editor-rtl.css +2 -45
  679. package/build-style/group/editor.css +2 -45
  680. package/build-style/group/style-rtl.css +4 -0
  681. package/build-style/group/style.css +4 -0
  682. package/build-style/image/editor-rtl.css +3 -0
  683. package/build-style/image/editor.css +3 -0
  684. package/build-style/image/style-rtl.css +1 -2
  685. package/build-style/image/style.css +1 -2
  686. package/build-style/navigation-link/style-rtl.css +0 -8
  687. package/build-style/navigation-link/style.css +0 -8
  688. package/build-style/post-featured-image/editor-rtl.css +1 -0
  689. package/build-style/post-featured-image/editor.css +1 -0
  690. package/build-style/post-template/style-rtl.css +0 -3
  691. package/build-style/post-template/style.css +0 -3
  692. package/build-style/rss/editor-rtl.css +1 -10
  693. package/build-style/rss/editor.css +1 -10
  694. package/build-style/shortcode/editor-rtl.css +0 -4
  695. package/build-style/shortcode/editor.css +0 -4
  696. package/build-style/site-logo/editor-rtl.css +1 -0
  697. package/build-style/site-logo/editor.css +1 -0
  698. package/build-style/social-link/editor-rtl.css +13 -2
  699. package/build-style/social-link/editor.css +13 -2
  700. package/build-style/style-rtl.css +9 -21
  701. package/build-style/style.css +9 -21
  702. package/build-style/template-part/editor-rtl.css +3 -7
  703. package/build-style/template-part/editor.css +3 -7
  704. package/package.json +36 -35
  705. package/src/audio/edit.js +2 -2
  706. package/src/avatar/edit.js +2 -2
  707. package/src/block/edit.js +32 -240
  708. package/src/block/editor.scss +7 -5
  709. package/src/block-keyboard-shortcuts/index.js +113 -0
  710. package/src/button/block.json +1 -0
  711. package/src/button/deprecated.js +16 -16
  712. package/src/button/edit.js +3 -9
  713. package/src/button/save.js +3 -3
  714. package/src/buttons/deprecated.js +2 -2
  715. package/src/buttons/edit.js +2 -2
  716. package/src/buttons/editor.scss +1 -3
  717. package/src/buttons/save.js +2 -2
  718. package/src/buttons/style.scss +1 -3
  719. package/src/categories/edit.js +2 -2
  720. package/src/code/theme.native.scss +1 -1
  721. package/src/column/deprecated.js +2 -2
  722. package/src/column/edit.js +28 -22
  723. package/src/column/edit.native.js +3 -1
  724. package/src/column/save.js +2 -2
  725. package/src/columns/deprecated.js +3 -3
  726. package/src/columns/edit.js +94 -84
  727. package/src/columns/save.js +2 -2
  728. package/src/columns/variations.js +12 -34
  729. package/src/comment-author-name/edit.js +2 -2
  730. package/src/comment-content/edit.js +2 -2
  731. package/src/comment-edit-link/edit.js +2 -2
  732. package/src/comment-reply-link/edit.js +2 -2
  733. package/src/comment-template/util.js +3 -1
  734. package/src/comments/edit/comments-legacy.js +2 -2
  735. package/src/comments-title/edit.js +2 -2
  736. package/src/common.scss +4 -4
  737. package/src/cover/deprecated.js +38 -38
  738. package/src/cover/edit/index.js +6 -9
  739. package/src/cover/edit/resizable-cover-popover.js +2 -2
  740. package/src/cover/edit.native.js +2 -2
  741. package/src/cover/save.js +5 -5
  742. package/src/cover/shared.js +3 -1
  743. package/src/embed/deprecated.js +3 -3
  744. package/src/embed/edit.js +2 -2
  745. package/src/embed/edit.native.js +2 -2
  746. package/src/embed/editor.scss +0 -2
  747. package/src/embed/embed-placeholder.js +21 -9
  748. package/src/embed/embed-preview.js +3 -3
  749. package/src/embed/embed-preview.native.js +2 -2
  750. package/src/embed/icons.js +9 -0
  751. package/src/embed/save.js +2 -2
  752. package/src/embed/util.js +13 -7
  753. package/src/embed/variations.js +12 -1
  754. package/src/embed/wp-embed-preview.js +6 -2
  755. package/src/file/deprecated.js +2 -2
  756. package/src/file/edit.js +3 -3
  757. package/src/file/save.js +2 -2
  758. package/src/form-input/deprecated.js +3 -3
  759. package/src/form-input/edit.js +4 -4
  760. package/src/form-input/save.js +3 -3
  761. package/src/form-submission-notification/edit.js +2 -2
  762. package/src/form-submission-notification/save.js +4 -7
  763. package/src/gallery/deprecated.js +3 -3
  764. package/src/gallery/edit.js +2 -2
  765. package/src/gallery/gallery.js +2 -2
  766. package/src/gallery/save.js +3 -3
  767. package/src/gallery/v1/gallery-image.js +2 -2
  768. package/src/gallery/v1/gallery.js +3 -3
  769. package/src/gallery/v1/save.js +3 -3
  770. package/src/group/deprecated.js +4 -4
  771. package/src/group/editor.scss +2 -48
  772. package/src/group/index.js +0 -8
  773. package/src/group/placeholder.js +18 -18
  774. package/src/group/style.scss +5 -0
  775. package/src/heading/block.json +1 -0
  776. package/src/heading/deprecated.js +6 -6
  777. package/src/heading/edit.js +2 -23
  778. package/src/heading/edit.native.js +2 -2
  779. package/src/heading/save.js +2 -2
  780. package/src/heading/test/__snapshots__/transforms.native.js.snap +1 -1
  781. package/src/home-link/edit.js +2 -2
  782. package/src/html/edit.js +0 -2
  783. package/src/image/deprecated.js +10 -10
  784. package/src/image/edit.js +5 -3
  785. package/src/image/editor.scss +13 -7
  786. package/src/image/image.js +8 -3
  787. package/src/image/save.js +3 -3
  788. package/src/image/style.scss +1 -3
  789. package/src/image/view.js +3 -1
  790. package/src/index.js +2 -0
  791. package/src/latest-posts/edit.js +6 -6
  792. package/src/latest-posts/index.php +1 -0
  793. package/src/list/block.json +0 -2
  794. package/src/list/deprecated.js +88 -1
  795. package/src/list/index.php +54 -0
  796. package/src/list/test/__snapshots__/edit.native.js.snap +11 -11
  797. package/src/list/test/__snapshots__/transforms.native.js.snap +3 -3
  798. package/src/list/test/edit.native.js +24 -24
  799. package/src/list/test/transforms.native.js +1 -1
  800. package/src/list-item/block.json +2 -1
  801. package/src/list-item/edit.js +0 -15
  802. package/src/list-item/hooks/use-merge.js +12 -4
  803. package/src/list-item/hooks/use-outdent-list-item.js +15 -5
  804. package/src/media-text/deprecated.js +10 -10
  805. package/src/media-text/edit.js +2 -2
  806. package/src/media-text/media-container.js +2 -2
  807. package/src/media-text/save.js +3 -3
  808. package/src/navigation/block.json +0 -9
  809. package/src/navigation/edit/are-blocks-dirty.js +8 -3
  810. package/src/navigation/edit/deleted-navigation-warning.js +1 -1
  811. package/src/navigation/edit/index.js +3 -3
  812. package/src/navigation/edit/menu-inspector-controls.js +3 -1
  813. package/src/navigation/edit/navigation-menu-selector.js +1 -1
  814. package/src/navigation/edit/responsive-wrapper.js +3 -3
  815. package/src/navigation/edit/test/navigation-menu-selector.js +5 -5
  816. package/src/navigation/edit/utils.js +2 -2
  817. package/src/navigation/index.php +52 -1
  818. package/src/navigation/view.js +3 -1
  819. package/src/navigation-link/edit.js +94 -94
  820. package/src/navigation-link/link-ui.js +74 -89
  821. package/src/navigation-link/style.scss +0 -12
  822. package/src/navigation-submenu/edit.js +2 -2
  823. package/src/page-list/edit.js +2 -2
  824. package/src/page-list-item/edit.js +3 -3
  825. package/src/paragraph/block.json +1 -1
  826. package/src/paragraph/deprecated.js +6 -6
  827. package/src/paragraph/edit.js +2 -23
  828. package/src/paragraph/save.js +2 -2
  829. package/src/paragraph/test/__snapshots__/transforms.native.js.snap +1 -1
  830. package/src/pattern/edit.js +1 -1
  831. package/src/post-author/edit.js +2 -2
  832. package/src/post-author-biography/edit.js +2 -2
  833. package/src/post-author-name/edit.js +2 -2
  834. package/src/post-comments-count/edit.js +2 -2
  835. package/src/post-comments-form/edit.js +2 -2
  836. package/src/post-comments-form/form.js +2 -2
  837. package/src/post-comments-link/edit.js +2 -2
  838. package/src/post-date/edit.js +2 -2
  839. package/src/post-excerpt/edit.js +6 -4
  840. package/src/post-featured-image/dimension-controls.js +33 -37
  841. package/src/post-featured-image/edit.js +3 -3
  842. package/src/post-featured-image/editor.scss +1 -0
  843. package/src/post-featured-image/overlay.js +2 -2
  844. package/src/post-navigation-link/edit.js +2 -2
  845. package/src/post-navigation-link/variations.js +3 -1
  846. package/src/post-template/edit.js +14 -9
  847. package/src/post-template/style.scss +0 -4
  848. package/src/post-terms/edit.js +5 -3
  849. package/src/post-time-to-read/edit.js +3 -3
  850. package/src/post-title/edit.js +2 -2
  851. package/src/private-apis.js +13 -0
  852. package/src/pullquote/deprecated.js +7 -7
  853. package/src/pullquote/edit.js +2 -2
  854. package/src/pullquote/save.js +2 -2
  855. package/src/query/edit/enhanced-pagination-modal.js +5 -1
  856. package/src/query/edit/inspector-controls/author-control.js +6 -2
  857. package/src/query/edit/inspector-controls/create-new-post-link.js +3 -1
  858. package/src/query/edit/inspector-controls/enhanced-pagination-control.js +13 -3
  859. package/src/query/edit/inspector-controls/parent-control.js +18 -6
  860. package/src/query/edit/inspector-controls/taxonomy-controls.js +9 -3
  861. package/src/query/index.php +1 -1
  862. package/src/query/utils.js +3 -1
  863. package/src/query-title/edit.js +2 -2
  864. package/src/query-title/variations.js +3 -1
  865. package/src/quote/deprecated.js +3 -3
  866. package/src/quote/edit.js +2 -2
  867. package/src/quote/save.js +2 -2
  868. package/src/rss/edit.js +30 -23
  869. package/src/rss/editor.scss +2 -16
  870. package/src/search/edit.js +6 -6
  871. package/src/search/edit.native.js +2 -2
  872. package/src/separator/deprecated.js +2 -2
  873. package/src/separator/edit.js +2 -2
  874. package/src/separator/save.js +2 -2
  875. package/src/shortcode/edit.js +13 -17
  876. package/src/shortcode/editor.scss +0 -6
  877. package/src/site-logo/edit.js +4 -4
  878. package/src/site-logo/editor.scss +1 -0
  879. package/src/site-logo/index.php +2 -0
  880. package/src/site-tagline/edit.js +2 -2
  881. package/src/site-title/edit.js +2 -2
  882. package/src/social-link/edit.js +5 -5
  883. package/src/social-link/editor.scss +25 -11
  884. package/src/social-link/variations.js +3 -1
  885. package/src/social-links/deprecated.js +2 -2
  886. package/src/social-links/edit.js +2 -2
  887. package/src/social-links/save.js +2 -2
  888. package/src/spacer/edit.js +3 -3
  889. package/src/table/deprecated.js +12 -20
  890. package/src/table/edit.js +3 -3
  891. package/src/table/save.js +3 -3
  892. package/src/template-part/editor.scss +5 -8
  893. package/src/template-part/variations.js +6 -2
  894. package/src/term-description/edit.js +2 -2
  895. package/src/utils/caption.js +2 -2
  896. package/src/verse/deprecated.js +2 -2
  897. package/src/verse/edit.js +2 -2
  898. package/src/verse/save.js +2 -2
  899. package/src/video/edit.js +2 -2
  900. package/tsconfig.tsbuildinfo +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","metadata","$schema","apiVersion","name","title","category","description","textdomain","attributes","url","type","__experimentalRole","caption","source","selector","providerNameSlug","allowResponsive","responsive","previewable","supports","align","spacing","margin","interactivity","clientNavigation","editorStyle","style","RichText","useBlockProps","blockAttributes","v2","save","className","createElement","isEmpty","Content","tagName","value","v1","embedClassName","deprecated"],"sources":["@wordpress/block-library/src/embed/deprecated.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\n\n/**\n * WordPress dependencies\n */\nimport { RichText, useBlockProps } from '@wordpress/block-editor';\n\nconst { attributes: blockAttributes } = metadata;\n\n// In #41140 support was added to global styles for caption elements which added a `wp-element-caption` classname\n// to the embed figcaption element.\nconst v2 = {\n\tattributes: blockAttributes,\n\tsave( { attributes } ) {\n\t\tconst { url, caption, type, providerNameSlug } = attributes;\n\n\t\tif ( ! url ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst className = classnames( 'wp-block-embed', {\n\t\t\t[ `is-type-${ type }` ]: type,\n\t\t\t[ `is-provider-${ providerNameSlug }` ]: providerNameSlug,\n\t\t\t[ `wp-block-embed-${ providerNameSlug }` ]: providerNameSlug,\n\t\t} );\n\n\t\treturn (\n\t\t\t<figure { ...useBlockProps.save( { className } ) }>\n\t\t\t\t<div className=\"wp-block-embed__wrapper\">\n\t\t\t\t\t{ `\\n${ url }\\n` /* URL needs to be on its own line. */ }\n\t\t\t\t</div>\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content tagName=\"figcaption\" value={ caption } />\n\t\t\t\t) }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\nconst v1 = {\n\tattributes: blockAttributes,\n\tsave( { attributes: { url, caption, type, providerNameSlug } } ) {\n\t\tif ( ! url ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst embedClassName = classnames( 'wp-block-embed', {\n\t\t\t[ `is-type-${ type }` ]: type,\n\t\t\t[ `is-provider-${ providerNameSlug }` ]: providerNameSlug,\n\t\t} );\n\n\t\treturn (\n\t\t\t<figure className={ embedClassName }>\n\t\t\t\t{ `\\n${ url }\\n` /* URL needs to be on its own line. */ }\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content tagName=\"figcaption\" value={ caption } />\n\t\t\t\t) }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\nconst deprecated = [ v2, v1 ];\n\nexport default deprecated;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AAFA,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,GAAA;MAAAC,IAAA;MAAAC,kBAAA;IAAA;IAAAC,OAAA;MAAAF,IAAA;MAAAG,MAAA;MAAAC,QAAA;MAAAH,kBAAA;IAAA;IAAAD,IAAA;MAAAA,IAAA;MAAAC,kBAAA;IAAA;IAAAI,gBAAA;MAAAL,IAAA;MAAAC,kBAAA;IAAA;IAAAK,eAAA;MAAAN,IAAA;MAAA;IAAA;IAAAO,UAAA;MAAAP,IAAA;MAAA;MAAAC,kBAAA;IAAA;IAAAO,WAAA;MAAAR,IAAA;MAAA;MAAAC,kBAAA;IAAA;EAAA;EAAAQ,QAAA;IAAAC,KAAA;IAAAC,OAAA;MAAAC,MAAA;IAAA;IAAAC,aAAA;MAAAC,gBAAA;IAAA;EAAA;EAAAC,WAAA;EAAAC,KAAA;AAAA;AAKA;AACA;AACA;AACA,SAASC,QAAQ,EAAEC,aAAa,QAAQ,yBAAyB;AAEjE,MAAM;EAAEpB,UAAU,EAAEqB;AAAgB,CAAC,GAAG7B,QAAQ;;AA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S,EAAGO;IAAgB,GAChC,KAAK9B,GAAK,IAAG,CAAC,wCACf,CAAEkB,QAAQ,CAACO,OAAO,CAAEtB,OAAQ,CAAC,IAC9BqB,aAAA,CAACN,QAAQ,CAACQ,OAAO;MAACC,OAAO,EAAC,YAAY;MAACC,KAAK,EAAGzB;IAAS,CAAE,CAEpD,CAAC;EAEX;AACD,CAAC;AAED,MAAM4B,UAAU,GAAG,CAAEV,EAAE,EAAEQ,EAAE,CAAE;AAE7B,eAAeE,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["clsx","metadata","$schema","apiVersion","name","title","category","description","textdomain","attributes","url","type","__experimentalRole","caption","source","selector","providerNameSlug","allowResponsive","responsive","previewable","supports","align","spacing","margin","interactivity","clientNavigation","editorStyle","style","RichText","useBlockProps","blockAttributes","v2","save","className","createElement","isEmpty","Content","tagName","value","v1","embedClassName","deprecated"],"sources":["@wordpress/block-library/src/embed/deprecated.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\n\n/**\n * WordPress dependencies\n */\nimport { RichText, useBlockProps } from '@wordpress/block-editor';\n\nconst { attributes: blockAttributes } = metadata;\n\n// In #41140 support was added to global styles for caption elements which added a `wp-element-caption` classname\n// to the embed figcaption element.\nconst v2 = {\n\tattributes: blockAttributes,\n\tsave( { attributes } ) {\n\t\tconst { url, caption, type, providerNameSlug } = attributes;\n\n\t\tif ( ! url ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst className = clsx( 'wp-block-embed', {\n\t\t\t[ `is-type-${ type }` ]: type,\n\t\t\t[ `is-provider-${ providerNameSlug }` ]: providerNameSlug,\n\t\t\t[ `wp-block-embed-${ providerNameSlug }` ]: providerNameSlug,\n\t\t} );\n\n\t\treturn (\n\t\t\t<figure { ...useBlockProps.save( { className } ) }>\n\t\t\t\t<div className=\"wp-block-embed__wrapper\">\n\t\t\t\t\t{ `\\n${ url }\\n` /* URL needs to be on its own line. */ }\n\t\t\t\t</div>\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content tagName=\"figcaption\" value={ caption } />\n\t\t\t\t) }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\nconst v1 = {\n\tattributes: blockAttributes,\n\tsave( { attributes: { url, caption, type, providerNameSlug } } ) {\n\t\tif ( ! url ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst embedClassName = clsx( 'wp-block-embed', {\n\t\t\t[ `is-type-${ type }` ]: type,\n\t\t\t[ `is-provider-${ providerNameSlug }` ]: providerNameSlug,\n\t\t} );\n\n\t\treturn (\n\t\t\t<figure className={ embedClassName }>\n\t\t\t\t{ `\\n${ url }\\n` /* URL needs to be on its own line. */ }\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content tagName=\"figcaption\" value={ caption } />\n\t\t\t\t) }\n\t\t\t</figure>\n\t\t);\n\t},\n};\n\nconst deprecated = [ v2, v1 ];\n\nexport default deprecated;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AAFA,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,GAAA;MAAAC,IAAA;MAAAC,kBAAA;IAAA;IAAAC,OAAA;MAAAF,IAAA;MAAAG,MAAA;MAAAC,QAAA;MAAAH,kBAAA;IAAA;IAAAD,IAAA;MAAAA,IAAA;MAAAC,kBAAA;IAAA;IAAAI,gBAAA;MAAAL,IAAA;MAAAC,kBAAA;IAAA;IAAAK,eAAA;MAAAN,IAAA;MAAA;IAAA;IAAAO,UAAA;MAAAP,IAAA;MAAA;MAAAC,kBAAA;IAAA;IAAAO,WAAA;MAAAR,IAAA;MAAA;MAAAC,kBAAA;IAAA;EAAA;EAAAQ,QAAA;IAAAC,KAAA;IA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AEN,GAAG,EAAG;MACZ,OAAO,IAAI;IACZ;IAEA,MAAM8B,cAAc,GAAGxC,IAAI,CAAE,gBAAgB,EAAE;MAC9C,CAAG,WAAWW,IAAM,EAAC,GAAIA,IAAI;MAC7B,CAAG,eAAeK,gBAAkB,EAAC,GAAIA;IAC1C,CAAE,CAAC;IAEH,OACCkB,aAAA;MAAQD,SAAS,EAAGO;IAAgB,GAChC,KAAK9B,GAAK,IAAG,CAAC,wCACf,CAAEkB,QAAQ,CAACO,OAAO,CAAEtB,OAAQ,CAAC,IAC9BqB,aAAA,CAACN,QAAQ,CAACQ,OAAO;MAACC,OAAO,EAAC,YAAY;MAACC,KAAK,EAAGzB;IAAS,CAAE,CAEpD,CAAC;EAEX;AACD,CAAC;AAED,MAAM4B,UAAU,GAAG,CAAEV,EAAE,EAAEQ,EAAE,CAAE;AAE7B,eAAeE,UAAU","ignoreList":[]}
@@ -12,7 +12,7 @@ import EmbedPreview from './embed-preview';
12
12
  /**
13
13
  * External dependencies
14
14
  */
15
- import classnames from 'classnames';
15
+ import clsx from 'clsx';
16
16
 
17
17
  /**
18
18
  * WordPress dependencies
@@ -214,7 +214,7 @@ const EmbedEdit = props => {
214
214
  allowResponsive,
215
215
  className: classFromPreview
216
216
  } = getMergedAttributes();
217
- const className = classnames(classFromPreview, props.className);
217
+ const className = clsx(classFromPreview, props.className);
218
218
  return createElement(Fragment, null, createElement(EmbedControls, {
219
219
  showEditButton: preview && !cannotEmbed,
220
220
  themeSupportsResponsive: themeSupportsResponsive,
@@ -1 +1 @@
1
- {"version":3,"names":["createUpgradedEmbedBlock","getClassNames","removeAspectRatioClasses","fallback","getEmbedInfoByProvider","getMergedAttributesWithPreview","EmbedControls","embedContentIcon","EmbedLoading","EmbedPlaceholder","EmbedPreview","classnames","__","_x","sprintf","useState","useEffect","useDispatch","useSelect","useBlockProps","store","coreStore","View","getAuthority","EmbedEdit","props","attributes","providerNameSlug","previewable","responsive","url","attributesUrl","isSelected","onReplace","setAttributes","insertBlocksAfter","onFocus","defaultEmbedInfo","title","icon","setURL","isEditingURL","setIsEditingURL","invalidateResolution","preview","fetching","themeSupportsResponsive","cannotEmbed","hasResolved","select","getEmbedPreview","isPreviewEmbedFallback","isRequestingEmbedPreview","getThemeSupports","hasFinishedResolution","embedPreview","previewIsFallback","badEmbedProvider","html","type","undefined","wordpressCantEmbed","data","status","validPreview","getMergedAttributes","toggleResponsive","allowResponsive","className","newAllowResponsive","newURL","replace","URL","host","toString","mergedAttributes","upgradedBlock","blockProps","createElement","label","showEmbedPlaceholder","onSubmit","event","preventDefault","blockClass","value","onChange","target","tryAgain","caption","classFromPreview","Fragment","showEditButton","blockSupportsResponsive","switchBackToURLInput","onCaptionChange"],"sources":["@wordpress/block-library/src/embed/edit.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tcreateUpgradedEmbedBlock,\n\tgetClassNames,\n\tremoveAspectRatioClasses,\n\tfallback,\n\tgetEmbedInfoByProvider,\n\tgetMergedAttributesWithPreview,\n} from './util';\nimport EmbedControls from './embed-controls';\nimport { embedContentIcon } from './icons';\nimport EmbedLoading from './embed-loading';\nimport EmbedPlaceholder from './embed-placeholder';\nimport EmbedPreview from './embed-preview';\n\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useBlockProps } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { View } from '@wordpress/primitives';\nimport { getAuthority } from '@wordpress/url';\n\nconst EmbedEdit = ( props ) => {\n\tconst {\n\t\tattributes: {\n\t\t\tproviderNameSlug,\n\t\t\tpreviewable,\n\t\t\tresponsive,\n\t\t\turl: attributesUrl,\n\t\t},\n\t\tattributes,\n\t\tisSelected,\n\t\tonReplace,\n\t\tsetAttributes,\n\t\tinsertBlocksAfter,\n\t\tonFocus,\n\t} = props;\n\n\tconst defaultEmbedInfo = {\n\t\ttitle: _x( 'Embed', 'block title' ),\n\t\ticon: embedContentIcon,\n\t};\n\tconst { icon, title } =\n\t\tgetEmbedInfoByProvider( providerNameSlug ) || defaultEmbedInfo;\n\n\tconst [ url, setURL ] = useState( attributesUrl );\n\tconst [ isEditingURL, setIsEditingURL ] = useState( false );\n\tconst { invalidateResolution } = useDispatch( coreStore );\n\n\tconst {\n\t\tpreview,\n\t\tfetching,\n\t\tthemeSupportsResponsive,\n\t\tcannotEmbed,\n\t\thasResolved,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEmbedPreview,\n\t\t\t\tisPreviewEmbedFallback,\n\t\t\t\tisRequestingEmbedPreview,\n\t\t\t\tgetThemeSupports,\n\t\t\t\thasFinishedResolution,\n\t\t\t} = select( coreStore );\n\t\t\tif ( ! attributesUrl ) {\n\t\t\t\treturn { fetching: false, cannotEmbed: false };\n\t\t\t}\n\n\t\t\tconst embedPreview = getEmbedPreview( attributesUrl );\n\t\t\tconst previewIsFallback = isPreviewEmbedFallback( attributesUrl );\n\n\t\t\t// The external oEmbed provider does not exist. We got no type info and no html.\n\t\t\tconst badEmbedProvider =\n\t\t\t\tembedPreview?.html === false &&\n\t\t\t\tembedPreview?.type === undefined;\n\t\t\t// Some WordPress URLs that can't be embedded will cause the API to return\n\t\t\t// a valid JSON response with no HTML and `data.status` set to 404, rather\n\t\t\t// than generating a fallback response as other embeds do.\n\t\t\tconst wordpressCantEmbed = embedPreview?.data?.status === 404;\n\t\t\tconst validPreview =\n\t\t\t\t!! embedPreview && ! badEmbedProvider && ! wordpressCantEmbed;\n\t\t\treturn {\n\t\t\t\tpreview: validPreview ? embedPreview : undefined,\n\t\t\t\tfetching: isRequestingEmbedPreview( attributesUrl ),\n\t\t\t\tthemeSupportsResponsive:\n\t\t\t\t\tgetThemeSupports()[ 'responsive-embeds' ],\n\t\t\t\tcannotEmbed: ! validPreview || previewIsFallback,\n\t\t\t\thasResolved: hasFinishedResolution( 'getEmbedPreview', [\n\t\t\t\t\tattributesUrl,\n\t\t\t\t] ),\n\t\t\t};\n\t\t},\n\t\t[ attributesUrl ]\n\t);\n\n\t/**\n\t * Returns the attributes derived from the preview, merged with the current attributes.\n\t *\n\t * @return {Object} Merged attributes.\n\t */\n\tconst getMergedAttributes = () =>\n\t\tgetMergedAttributesWithPreview(\n\t\t\tattributes,\n\t\t\tpreview,\n\t\t\ttitle,\n\t\t\tresponsive\n\t\t);\n\n\tconst toggleResponsive = () => {\n\t\tconst { allowResponsive, className } = attributes;\n\t\tconst { html } = preview;\n\t\tconst newAllowResponsive = ! allowResponsive;\n\n\t\tsetAttributes( {\n\t\t\tallowResponsive: newAllowResponsive,\n\t\t\tclassName: getClassNames(\n\t\t\t\thtml,\n\t\t\t\tclassName,\n\t\t\t\tresponsive && newAllowResponsive\n\t\t\t),\n\t\t} );\n\t};\n\n\tuseEffect( () => {\n\t\tif ( preview?.html || ! cannotEmbed || ! hasResolved ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// At this stage, we're not fetching the preview and know it can't be embedded,\n\t\t// so try removing any trailing slash, and resubmit.\n\t\tconst newURL = attributesUrl.replace( /\\/$/, '' );\n\t\tsetURL( newURL );\n\t\tsetIsEditingURL( false );\n\t\tsetAttributes( { url: newURL } );\n\t}, [\n\t\tpreview?.html,\n\t\tattributesUrl,\n\t\tcannotEmbed,\n\t\thasResolved,\n\t\tsetAttributes,\n\t] );\n\n\t// Try a different provider in case the embed url is not supported.\n\tuseEffect( () => {\n\t\tif ( ! cannotEmbed || fetching || ! url ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Until X provider is supported in WordPress, as a workaround we use Twitter provider.\n\t\tif ( getAuthority( url ) === 'x.com' ) {\n\t\t\tconst newURL = new URL( url );\n\t\t\tnewURL.host = 'twitter.com';\n\t\t\tsetAttributes( { url: newURL.toString() } );\n\t\t}\n\t}, [ url, cannotEmbed, fetching, setAttributes ] );\n\n\t// Handle incoming preview.\n\tuseEffect( () => {\n\t\tif ( preview && ! isEditingURL ) {\n\t\t\t// When obtaining an incoming preview,\n\t\t\t// we set the attributes derived from the preview data.\n\t\t\tconst mergedAttributes = getMergedAttributes();\n\t\t\tsetAttributes( mergedAttributes );\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst upgradedBlock = createUpgradedEmbedBlock(\n\t\t\t\t\tprops,\n\t\t\t\t\tmergedAttributes\n\t\t\t\t);\n\n\t\t\t\tif ( upgradedBlock ) {\n\t\t\t\t\tonReplace( upgradedBlock );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [ preview, isEditingURL ] );\n\n\tconst blockProps = useBlockProps();\n\n\tif ( fetching ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedLoading />\n\t\t\t</View>\n\t\t);\n\t}\n\n\t// translators: %s: type of embed e.g: \"YouTube\", \"Twitter\", etc. \"Embed\" is used when no specific type exists\n\tconst label = sprintf( __( '%s URL' ), title );\n\n\t// No preview, or we can't embed the current URL, or we've clicked the edit button.\n\tconst showEmbedPlaceholder = ! preview || cannotEmbed || isEditingURL;\n\n\tif ( showEmbedPlaceholder ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedPlaceholder\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\tif ( event ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If the embed URL was changed, we need to reset the aspect ratio class.\n\t\t\t\t\t\t// To do this we have to remove the existing ratio class so it can be recalculated.\n\t\t\t\t\t\tconst blockClass = removeAspectRatioClasses(\n\t\t\t\t\t\t\tattributes.className\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tsetIsEditingURL( false );\n\t\t\t\t\t\tsetAttributes( { url, className: blockClass } );\n\t\t\t\t\t} }\n\t\t\t\t\tvalue={ url }\n\t\t\t\t\tcannotEmbed={ cannotEmbed }\n\t\t\t\t\tonChange={ ( event ) => setURL( event.target.value ) }\n\t\t\t\t\tfallback={ () => fallback( url, onReplace ) }\n\t\t\t\t\ttryAgain={ () => {\n\t\t\t\t\t\tinvalidateResolution( 'getEmbedPreview', [ url ] );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t);\n\t}\n\n\t// Even though we set attributes that get derived from the preview,\n\t// we don't access them directly because for the initial render,\n\t// the `setAttributes` call will not have taken effect. If we're\n\t// rendering responsive content, setting the responsive classes\n\t// after the preview has been rendered can result in unwanted\n\t// clipping or scrollbars. The `getAttributesFromPreview` function\n\t// that `getMergedAttributes` uses is memoized so that we're not\n\t// calculating them on every render.\n\tconst {\n\t\tcaption,\n\t\ttype,\n\t\tallowResponsive,\n\t\tclassName: classFromPreview,\n\t} = getMergedAttributes();\n\tconst className = classnames( classFromPreview, props.className );\n\n\treturn (\n\t\t<>\n\t\t\t<EmbedControls\n\t\t\t\tshowEditButton={ preview && ! cannotEmbed }\n\t\t\t\tthemeSupportsResponsive={ themeSupportsResponsive }\n\t\t\t\tblockSupportsResponsive={ responsive }\n\t\t\t\tallowResponsive={ allowResponsive }\n\t\t\t\ttoggleResponsive={ toggleResponsive }\n\t\t\t\tswitchBackToURLInput={ () => setIsEditingURL( true ) }\n\t\t\t/>\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedPreview\n\t\t\t\t\tpreview={ preview }\n\t\t\t\t\tpreviewable={ previewable }\n\t\t\t\t\tclassName={ className }\n\t\t\t\t\turl={ url }\n\t\t\t\t\ttype={ type }\n\t\t\t\t\tcaption={ caption }\n\t\t\t\t\tonCaptionChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { caption: value } )\n\t\t\t\t\t}\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t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AAS;IACnBhB,WAAW,EAAGA,WAAa;IAC3BwC,SAAS,EAAGA,SAAW;IACvBtC,GAAG,EAAGA,GAAK;IACX6B,IAAI,EAAGA,IAAM;IACb8B,OAAO,EAAGA,OAAS;IACnBM,eAAe,EAAKV,KAAK,IACxBnD,aAAa,CAAE;MAAEuD,OAAO,EAAEJ;IAAM,CAAE,CAClC;IACDrD,UAAU,EAAGA,UAAY;IACzBO,IAAI,EAAGA,IAAM;IACbwC,KAAK,EAAGA,KAAO;IACf5C,iBAAiB,EAAGA;EAAmB,CACvC,CACI,CACL,CAAC;AAEL,CAAC;AAED,eAAeX,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["createUpgradedEmbedBlock","getClassNames","removeAspectRatioClasses","fallback","getEmbedInfoByProvider","getMergedAttributesWithPreview","EmbedControls","embedContentIcon","EmbedLoading","EmbedPlaceholder","EmbedPreview","clsx","__","_x","sprintf","useState","useEffect","useDispatch","useSelect","useBlockProps","store","coreStore","View","getAuthority","EmbedEdit","props","attributes","providerNameSlug","previewable","responsive","url","attributesUrl","isSelected","onReplace","setAttributes","insertBlocksAfter","onFocus","defaultEmbedInfo","title","icon","setURL","isEditingURL","setIsEditingURL","invalidateResolution","preview","fetching","themeSupportsResponsive","cannotEmbed","hasResolved","select","getEmbedPreview","isPreviewEmbedFallback","isRequestingEmbedPreview","getThemeSupports","hasFinishedResolution","embedPreview","previewIsFallback","badEmbedProvider","html","type","undefined","wordpressCantEmbed","data","status","validPreview","getMergedAttributes","toggleResponsive","allowResponsive","className","newAllowResponsive","newURL","replace","URL","host","toString","mergedAttributes","upgradedBlock","blockProps","createElement","label","showEmbedPlaceholder","onSubmit","event","preventDefault","blockClass","value","onChange","target","tryAgain","caption","classFromPreview","Fragment","showEditButton","blockSupportsResponsive","switchBackToURLInput","onCaptionChange"],"sources":["@wordpress/block-library/src/embed/edit.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tcreateUpgradedEmbedBlock,\n\tgetClassNames,\n\tremoveAspectRatioClasses,\n\tfallback,\n\tgetEmbedInfoByProvider,\n\tgetMergedAttributesWithPreview,\n} from './util';\nimport EmbedControls from './embed-controls';\nimport { embedContentIcon } from './icons';\nimport EmbedLoading from './embed-loading';\nimport EmbedPlaceholder from './embed-placeholder';\nimport EmbedPreview from './embed-preview';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useBlockProps } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { View } from '@wordpress/primitives';\nimport { getAuthority } from '@wordpress/url';\n\nconst EmbedEdit = ( props ) => {\n\tconst {\n\t\tattributes: {\n\t\t\tproviderNameSlug,\n\t\t\tpreviewable,\n\t\t\tresponsive,\n\t\t\turl: attributesUrl,\n\t\t},\n\t\tattributes,\n\t\tisSelected,\n\t\tonReplace,\n\t\tsetAttributes,\n\t\tinsertBlocksAfter,\n\t\tonFocus,\n\t} = props;\n\n\tconst defaultEmbedInfo = {\n\t\ttitle: _x( 'Embed', 'block title' ),\n\t\ticon: embedContentIcon,\n\t};\n\tconst { icon, title } =\n\t\tgetEmbedInfoByProvider( providerNameSlug ) || defaultEmbedInfo;\n\n\tconst [ url, setURL ] = useState( attributesUrl );\n\tconst [ isEditingURL, setIsEditingURL ] = useState( false );\n\tconst { invalidateResolution } = useDispatch( coreStore );\n\n\tconst {\n\t\tpreview,\n\t\tfetching,\n\t\tthemeSupportsResponsive,\n\t\tcannotEmbed,\n\t\thasResolved,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEmbedPreview,\n\t\t\t\tisPreviewEmbedFallback,\n\t\t\t\tisRequestingEmbedPreview,\n\t\t\t\tgetThemeSupports,\n\t\t\t\thasFinishedResolution,\n\t\t\t} = select( coreStore );\n\t\t\tif ( ! attributesUrl ) {\n\t\t\t\treturn { fetching: false, cannotEmbed: false };\n\t\t\t}\n\n\t\t\tconst embedPreview = getEmbedPreview( attributesUrl );\n\t\t\tconst previewIsFallback = isPreviewEmbedFallback( attributesUrl );\n\n\t\t\t// The external oEmbed provider does not exist. We got no type info and no html.\n\t\t\tconst badEmbedProvider =\n\t\t\t\tembedPreview?.html === false &&\n\t\t\t\tembedPreview?.type === undefined;\n\t\t\t// Some WordPress URLs that can't be embedded will cause the API to return\n\t\t\t// a valid JSON response with no HTML and `data.status` set to 404, rather\n\t\t\t// than generating a fallback response as other embeds do.\n\t\t\tconst wordpressCantEmbed = embedPreview?.data?.status === 404;\n\t\t\tconst validPreview =\n\t\t\t\t!! embedPreview && ! badEmbedProvider && ! wordpressCantEmbed;\n\t\t\treturn {\n\t\t\t\tpreview: validPreview ? embedPreview : undefined,\n\t\t\t\tfetching: isRequestingEmbedPreview( attributesUrl ),\n\t\t\t\tthemeSupportsResponsive:\n\t\t\t\t\tgetThemeSupports()[ 'responsive-embeds' ],\n\t\t\t\tcannotEmbed: ! validPreview || previewIsFallback,\n\t\t\t\thasResolved: hasFinishedResolution( 'getEmbedPreview', [\n\t\t\t\t\tattributesUrl,\n\t\t\t\t] ),\n\t\t\t};\n\t\t},\n\t\t[ attributesUrl ]\n\t);\n\n\t/**\n\t * Returns the attributes derived from the preview, merged with the current attributes.\n\t *\n\t * @return {Object} Merged attributes.\n\t */\n\tconst getMergedAttributes = () =>\n\t\tgetMergedAttributesWithPreview(\n\t\t\tattributes,\n\t\t\tpreview,\n\t\t\ttitle,\n\t\t\tresponsive\n\t\t);\n\n\tconst toggleResponsive = () => {\n\t\tconst { allowResponsive, className } = attributes;\n\t\tconst { html } = preview;\n\t\tconst newAllowResponsive = ! allowResponsive;\n\n\t\tsetAttributes( {\n\t\t\tallowResponsive: newAllowResponsive,\n\t\t\tclassName: getClassNames(\n\t\t\t\thtml,\n\t\t\t\tclassName,\n\t\t\t\tresponsive && newAllowResponsive\n\t\t\t),\n\t\t} );\n\t};\n\n\tuseEffect( () => {\n\t\tif ( preview?.html || ! cannotEmbed || ! hasResolved ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// At this stage, we're not fetching the preview and know it can't be embedded,\n\t\t// so try removing any trailing slash, and resubmit.\n\t\tconst newURL = attributesUrl.replace( /\\/$/, '' );\n\t\tsetURL( newURL );\n\t\tsetIsEditingURL( false );\n\t\tsetAttributes( { url: newURL } );\n\t}, [\n\t\tpreview?.html,\n\t\tattributesUrl,\n\t\tcannotEmbed,\n\t\thasResolved,\n\t\tsetAttributes,\n\t] );\n\n\t// Try a different provider in case the embed url is not supported.\n\tuseEffect( () => {\n\t\tif ( ! cannotEmbed || fetching || ! url ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Until X provider is supported in WordPress, as a workaround we use Twitter provider.\n\t\tif ( getAuthority( url ) === 'x.com' ) {\n\t\t\tconst newURL = new URL( url );\n\t\t\tnewURL.host = 'twitter.com';\n\t\t\tsetAttributes( { url: newURL.toString() } );\n\t\t}\n\t}, [ url, cannotEmbed, fetching, setAttributes ] );\n\n\t// Handle incoming preview.\n\tuseEffect( () => {\n\t\tif ( preview && ! isEditingURL ) {\n\t\t\t// When obtaining an incoming preview,\n\t\t\t// we set the attributes derived from the preview data.\n\t\t\tconst mergedAttributes = getMergedAttributes();\n\t\t\tsetAttributes( mergedAttributes );\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst upgradedBlock = createUpgradedEmbedBlock(\n\t\t\t\t\tprops,\n\t\t\t\t\tmergedAttributes\n\t\t\t\t);\n\n\t\t\t\tif ( upgradedBlock ) {\n\t\t\t\t\tonReplace( upgradedBlock );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [ preview, isEditingURL ] );\n\n\tconst blockProps = useBlockProps();\n\n\tif ( fetching ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedLoading />\n\t\t\t</View>\n\t\t);\n\t}\n\n\t// translators: %s: type of embed e.g: \"YouTube\", \"Twitter\", etc. \"Embed\" is used when no specific type exists\n\tconst label = sprintf( __( '%s URL' ), title );\n\n\t// No preview, or we can't embed the current URL, or we've clicked the edit button.\n\tconst showEmbedPlaceholder = ! preview || cannotEmbed || isEditingURL;\n\n\tif ( showEmbedPlaceholder ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedPlaceholder\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\tif ( event ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If the embed URL was changed, we need to reset the aspect ratio class.\n\t\t\t\t\t\t// To do this we have to remove the existing ratio class so it can be recalculated.\n\t\t\t\t\t\tconst blockClass = removeAspectRatioClasses(\n\t\t\t\t\t\t\tattributes.className\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tsetIsEditingURL( false );\n\t\t\t\t\t\tsetAttributes( { url, className: blockClass } );\n\t\t\t\t\t} }\n\t\t\t\t\tvalue={ url }\n\t\t\t\t\tcannotEmbed={ cannotEmbed }\n\t\t\t\t\tonChange={ ( event ) => setURL( event.target.value ) }\n\t\t\t\t\tfallback={ () => fallback( url, onReplace ) }\n\t\t\t\t\ttryAgain={ () => {\n\t\t\t\t\t\tinvalidateResolution( 'getEmbedPreview', [ url ] );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t);\n\t}\n\n\t// Even though we set attributes that get derived from the preview,\n\t// we don't access them directly because for the initial render,\n\t// the `setAttributes` call will not have taken effect. If we're\n\t// rendering responsive content, setting the responsive classes\n\t// after the preview has been rendered can result in unwanted\n\t// clipping or scrollbars. The `getAttributesFromPreview` function\n\t// that `getMergedAttributes` uses is memoized so that we're not\n\t// calculating them on every render.\n\tconst {\n\t\tcaption,\n\t\ttype,\n\t\tallowResponsive,\n\t\tclassName: classFromPreview,\n\t} = getMergedAttributes();\n\tconst className = clsx( classFromPreview, props.className );\n\n\treturn (\n\t\t<>\n\t\t\t<EmbedControls\n\t\t\t\tshowEditButton={ preview && ! cannotEmbed }\n\t\t\t\tthemeSupportsResponsive={ themeSupportsResponsive }\n\t\t\t\tblockSupportsResponsive={ responsive }\n\t\t\t\tallowResponsive={ allowResponsive }\n\t\t\t\ttoggleResponsive={ toggleResponsive }\n\t\t\t\tswitchBackToURLInput={ () => setIsEditingURL( true ) }\n\t\t\t/>\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedPreview\n\t\t\t\t\tpreview={ preview }\n\t\t\t\t\tpreviewable={ previewable }\n\t\t\t\t\tclassName={ className }\n\t\t\t\t\turl={ url }\n\t\t\t\t\ttype={ type }\n\t\t\t\t\tcaption={ caption }\n\t\t\t\t\tonCaptionChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { caption: value } )\n\t\t\t\t\t}\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</>\n\t);\n};\n\nexport default EmbedEdit;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,wBAAwB,EACxBC,aAAa,EACbC,wBAAwB,EACxBC,QAAQ,EACRC,sBAAsB,EACtBC,8BAA8B,QACxB,QAAQ;AACf,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,SAASC,gBAAgB,QAAQ,SAAS;AAC1C,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,gBAAgB,MAAM,qBAAqB;AAClD,OAAOC,YAAY,MAAM,iBAAiB;;AAE1C;AACA;AACA;AACA,OAAOC,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASC,QAAQ,EAAEC,SA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AG,CAAC;MACnD;IAAG,CACH,CACI,CAAC;EAET;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,MAAM;IACL2D,OAAO;IACP9B,IAAI;IACJQ,eAAe;IACfC,SAAS,EAAEsB;EACZ,CAAC,GAAGzB,mBAAmB,CAAC,CAAC;EACzB,MAAMG,SAAS,GAAGzD,IAAI,CAAE+E,gBAAgB,EAAEjE,KAAK,CAAC2C,SAAU,CAAC;EAE3D,OACCU,aAAA,CAAAa,QAAA,QACCb,aAAA,CAACxE,aAAa;IACbsF,cAAc,EAAGhD,OAAO,IAAI,CAAEG,WAAa;IAC3CD,uBAAuB,EAAGA,uBAAyB;IACnD+C,uBAAuB,EAAGhE,UAAY;IACtCsC,eAAe,EAAGA,eAAiB;IACnCD,gBAAgB,EAAGA,gBAAkB;IACrC4B,oBAAoB,EAAGA,CAAA,KAAMpD,eAAe,CAAE,IAAK;EAAG,CACtD,CAAC,EACFoC,aAAA,CAACxD,IAAI;IAAA,GAAMuD;EAAU,GACpBC,aAAA,CAACpE,YAAY;IACZkC,OAAO,EAAGA,OAAS;IACnBhB,WAAW,EAAGA,WAAa;IAC3BwC,SAAS,EAAGA,SAAW;IACvBtC,GAAG,EAAGA,GAAK;IACX6B,IAAI,EAAGA,IAAM;IACb8B,OAAO,EAAGA,OAAS;IACnBM,eAAe,EAAKV,KAAK,IACxBnD,aAAa,CAAE;MAAEuD,OAAO,EAAEJ;IAAM,CAAE,CAClC;IACDrD,UAAU,EAAGA,UAAY;IACzBO,IAAI,EAAGA,IAAM;IACbwC,KAAK,EAAGA,KAAO;IACf5C,iBAAiB,EAAGA;EAAmB,CACvC,CACI,CACL,CAAC;AAEL,CAAC;AAED,eAAeX,SAAS","ignoreList":[]}
@@ -13,7 +13,7 @@ import EmbedLinkSettings from './embed-link-settings';
13
13
  /**
14
14
  * External dependencies
15
15
  */
16
- import classnames from 'classnames';
16
+ import clsx from 'clsx';
17
17
 
18
18
  /**
19
19
  * WordPress dependencies
@@ -210,7 +210,7 @@ const EmbedEdit = props => {
210
210
  allowResponsive,
211
211
  className: classFromPreview
212
212
  } = getMergedAttributes();
213
- const className = classnames(classFromPreview, props.className);
213
+ const className = clsx(classFromPreview, props.className);
214
214
  const isProviderPreviewable = PREVIEWABLE_PROVIDERS.includes(providerNameSlug) ||
215
215
  // For WordPress embeds, we enable the inline preview for all its providers
216
216
  // except the ones that are not supported yet.
@@ -1 +1 @@
1
- {"version":3,"names":["createUpgradedEmbedBlock","getClassNames","removeAspectRatioClasses","fallback","getEmbedInfoByProvider","getMergedAttributesWithPreview","EmbedControls","embedContentIcon","EmbedLoading","EmbedPlaceholder","EmbedPreview","EmbedLinkSettings","classnames","_x","useCallback","useState","useEffect","useDispatch","useSelect","useBlockProps","store","blockEditorStore","coreStore","View","getAuthority","PREVIEWABLE_PROVIDERS","NOT_PREVIEWABLE_WP_EMBED_PROVIDERS","WP_EMBED_TYPE","EmbedEdit","props","attributes","align","providerNameSlug","previewable","responsive","url","isSelected","onReplace","setAttributes","insertBlocksAfter","onFocus","clientId","defaultEmbedInfo","title","icon","embedInfoByProvider","wasBlockJustInserted","select","isEditingURL","setIsEditingURL","showEmbedBottomSheet","setShowEmbedBottomSheet","invalidateResolution","preview","fetching","themeSupportsResponsive","cannotEmbed","getEmbedPreview","hasFinishedResolution","isPreviewEmbedFallback","getThemeSupports","embedPreview","hasResolvedEmbedPreview","previewIsFallback","badEmbedProvider","html","type","undefined","wordpressCantEmbed","code","validPreview","getMergedAttributes","toggleResponsive","allowResponsive","className","newAllowResponsive","newURL","replace","URL","host","toString","mergedAttributes","upgradedBlock","onEditURL","value","blockClass","blockProps","createElement","showEmbedPlaceholder","classFromPreview","isProviderPreviewable","includes","linkLabel","Fragment","label","onPress","event","tryAgain","openEmbedLinkSettings","blockSupportsResponsive","isDefaultEmbedInfo","autoFocus","isVisible","onClose","onSubmit","withBottomSheet"],"sources":["@wordpress/block-library/src/embed/edit.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tcreateUpgradedEmbedBlock,\n\tgetClassNames,\n\tremoveAspectRatioClasses,\n\tfallback,\n\tgetEmbedInfoByProvider,\n\tgetMergedAttributesWithPreview,\n} from './util';\nimport EmbedControls from './embed-controls';\nimport { embedContentIcon } from './icons';\nimport EmbedLoading from './embed-loading';\nimport EmbedPlaceholder from './embed-placeholder';\nimport EmbedPreview from './embed-preview';\nimport EmbedLinkSettings from './embed-link-settings';\n\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\nimport { useCallback, useState, useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { View } from '@wordpress/primitives';\nimport { getAuthority } from '@wordpress/url';\n\n// The inline preview feature will be released progressible, for this reason\n// the embed will only be considered previewable for the following providers list.\nconst PREVIEWABLE_PROVIDERS = [ 'youtube', 'twitter', 'instagram', 'vimeo' ];\n// Some providers are rendering the inline preview as a WordPress embed and\n// are not supported yet, so we need to disallow them with a fixed providers list.\nconst NOT_PREVIEWABLE_WP_EMBED_PROVIDERS = [ 'pinterest' ];\n\nconst WP_EMBED_TYPE = 'wp-embed';\n\nconst EmbedEdit = ( props ) => {\n\tconst {\n\t\tattributes: { align, providerNameSlug, previewable, responsive, url },\n\t\tattributes,\n\t\tisSelected,\n\t\tonReplace,\n\t\tsetAttributes,\n\t\tinsertBlocksAfter,\n\t\tonFocus,\n\t\tclientId,\n\t} = props;\n\n\tconst defaultEmbedInfo = {\n\t\ttitle: _x( 'Embed', 'block title' ),\n\t\ticon: embedContentIcon,\n\t};\n\tconst embedInfoByProvider = getEmbedInfoByProvider( providerNameSlug );\n\tconst { icon, title } = embedInfoByProvider || defaultEmbedInfo;\n\n\tconst { wasBlockJustInserted } = useSelect(\n\t\t( select ) => ( {\n\t\t\twasBlockJustInserted: select(\n\t\t\t\tblockEditorStore\n\t\t\t).wasBlockJustInserted( clientId, 'inserter_menu' ),\n\t\t} ),\n\t\t[ clientId ]\n\t);\n\tconst [ isEditingURL, setIsEditingURL ] = useState(\n\t\tisSelected && wasBlockJustInserted && ! url\n\t);\n\tconst [ showEmbedBottomSheet, setShowEmbedBottomSheet ] =\n\t\tuseState( isEditingURL );\n\tconst { invalidateResolution } = useDispatch( coreStore );\n\n\tconst { preview, fetching, themeSupportsResponsive, cannotEmbed } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tgetEmbedPreview,\n\t\t\t\t\thasFinishedResolution,\n\t\t\t\t\tisPreviewEmbedFallback,\n\t\t\t\t\tgetThemeSupports,\n\t\t\t\t} = select( coreStore );\n\t\t\t\tif ( ! url ) {\n\t\t\t\t\treturn { fetching: false, cannotEmbed: false };\n\t\t\t\t}\n\n\t\t\t\tconst embedPreview = getEmbedPreview( url );\n\t\t\t\tconst hasResolvedEmbedPreview = hasFinishedResolution(\n\t\t\t\t\t'getEmbedPreview',\n\t\t\t\t\t[ url ]\n\t\t\t\t);\n\t\t\t\tconst previewIsFallback = isPreviewEmbedFallback( url );\n\n\t\t\t\t// The external oEmbed provider does not exist. We got no type info and no html.\n\t\t\t\tconst badEmbedProvider =\n\t\t\t\t\tembedPreview?.html === false &&\n\t\t\t\t\tembedPreview?.type === undefined;\n\t\t\t\t// Some WordPress URLs that can't be embedded will cause the API to return\n\t\t\t\t// a valid JSON response with no HTML and `code` set to 404, rather\n\t\t\t\t// than generating a fallback response as other embeds do.\n\t\t\t\tconst wordpressCantEmbed = embedPreview?.code === '404';\n\t\t\t\tconst validPreview =\n\t\t\t\t\t!! embedPreview &&\n\t\t\t\t\t! badEmbedProvider &&\n\t\t\t\t\t! wordpressCantEmbed;\n\n\t\t\t\treturn {\n\t\t\t\t\tpreview: validPreview ? embedPreview : undefined,\n\t\t\t\t\tfetching: ! hasResolvedEmbedPreview,\n\t\t\t\t\tthemeSupportsResponsive:\n\t\t\t\t\t\tgetThemeSupports()[ 'responsive-embeds' ],\n\t\t\t\t\tcannotEmbed: ! validPreview || previewIsFallback,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ url ]\n\t\t);\n\n\t/**\n\t * Returns the attributes derived from the preview, merged with the current attributes.\n\t *\n\t * @return {Object} Merged attributes.\n\t */\n\tconst getMergedAttributes = () =>\n\t\tgetMergedAttributesWithPreview(\n\t\t\tattributes,\n\t\t\tpreview,\n\t\t\ttitle,\n\t\t\tresponsive\n\t\t);\n\n\tconst toggleResponsive = () => {\n\t\tconst { allowResponsive, className } = attributes;\n\t\tconst { html } = preview;\n\t\tconst newAllowResponsive = ! allowResponsive;\n\n\t\tsetAttributes( {\n\t\t\tallowResponsive: newAllowResponsive,\n\t\t\tclassName: getClassNames(\n\t\t\t\thtml,\n\t\t\t\tclassName,\n\t\t\t\tresponsive && newAllowResponsive\n\t\t\t),\n\t\t} );\n\t};\n\n\tuseEffect( () => {\n\t\tif ( ! preview?.html || ! cannotEmbed || fetching ) {\n\t\t\treturn;\n\t\t}\n\t\t// At this stage, we're not fetching the preview and know it can't be embedded,\n\t\t// so try removing any trailing slash, and resubmit.\n\t\tconst newURL = url.replace( /\\/$/, '' );\n\t\tsetIsEditingURL( false );\n\t\tsetAttributes( { url: newURL } );\n\t}, [ preview?.html, url, cannotEmbed, fetching ] );\n\n\t// Try a different provider in case the embed url is not supported.\n\tuseEffect( () => {\n\t\tif ( ! cannotEmbed || fetching || ! url ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Until X provider is supported in WordPress, as a workaround we use Twitter provider.\n\t\tif ( getAuthority( url ) === 'x.com' ) {\n\t\t\tconst newURL = new URL( url );\n\t\t\tnewURL.host = 'twitter.com';\n\t\t\tsetAttributes( { url: newURL.toString() } );\n\t\t}\n\t}, [ url, cannotEmbed, fetching, setAttributes ] );\n\n\t// Handle incoming preview.\n\tuseEffect( () => {\n\t\tif ( preview && ! isEditingURL ) {\n\t\t\t// When obtaining an incoming preview,\n\t\t\t// we set the attributes derived from the preview data.\n\t\t\tconst mergedAttributes = getMergedAttributes();\n\t\t\tsetAttributes( mergedAttributes );\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst upgradedBlock = createUpgradedEmbedBlock(\n\t\t\t\t\tprops,\n\t\t\t\t\tmergedAttributes\n\t\t\t\t);\n\n\t\t\t\tif ( upgradedBlock ) {\n\t\t\t\t\tonReplace( upgradedBlock );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [ preview, isEditingURL ] );\n\n\tuseEffect(\n\t\t() => setShowEmbedBottomSheet( isEditingURL ),\n\t\t[ isEditingURL ]\n\t);\n\n\tconst onEditURL = useCallback(\n\t\t( value ) => {\n\t\t\t// If the embed URL was changed, we need to reset the aspect ratio class.\n\t\t\t// To do this we have to remove the existing ratio class so it can be recalculated.\n\t\t\tif ( attributes.url !== value ) {\n\t\t\t\tconst blockClass = removeAspectRatioClasses(\n\t\t\t\t\tattributes.className\n\t\t\t\t);\n\t\t\t\tsetAttributes( { className: blockClass } );\n\t\t\t}\n\n\t\t\t// The order of the following calls is important, we need to update the URL attribute before changing `isEditingURL`,\n\t\t\t// otherwise the side-effect that potentially replaces the block when updating the local state won't use the new URL\n\t\t\t// for creating the new block.\n\t\t\tsetAttributes( { url: value } );\n\t\t\tsetIsEditingURL( false );\n\t\t},\n\t\t[ attributes, setAttributes ]\n\t);\n\n\tconst blockProps = useBlockProps();\n\n\tif ( fetching ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedLoading />\n\t\t\t</View>\n\t\t);\n\t}\n\n\tconst showEmbedPlaceholder = ! preview || cannotEmbed;\n\n\t// Even though we set attributes that get derived from the preview,\n\t// we don't access them directly because for the initial render,\n\t// the `setAttributes` call will not have taken effect. If we're\n\t// rendering responsive content, setting the responsive classes\n\t// after the preview has been rendered can result in unwanted\n\t// clipping or scrollbars. The `getAttributesFromPreview` function\n\t// that `getMergedAttributes` uses is memoized so that we're not\n\t// calculating them on every render.\n\tconst {\n\t\ttype,\n\t\tallowResponsive,\n\t\tclassName: classFromPreview,\n\t} = getMergedAttributes();\n\tconst className = classnames( classFromPreview, props.className );\n\n\tconst isProviderPreviewable =\n\t\tPREVIEWABLE_PROVIDERS.includes( providerNameSlug ) ||\n\t\t// For WordPress embeds, we enable the inline preview for all its providers\n\t\t// except the ones that are not supported yet.\n\t\t( WP_EMBED_TYPE === type &&\n\t\t\t! NOT_PREVIEWABLE_WP_EMBED_PROVIDERS.includes( providerNameSlug ) );\n\n\tconst linkLabel = WP_EMBED_TYPE === type ? 'WordPress' : title;\n\n\treturn (\n\t\t<>\n\t\t\t{ showEmbedPlaceholder ? (\n\t\t\t\t<>\n\t\t\t\t\t<View { ...blockProps }>\n\t\t\t\t\t\t<EmbedPlaceholder\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\tlabel={ title }\n\t\t\t\t\t\t\tonPress={ ( event ) => {\n\t\t\t\t\t\t\t\tonFocus( event );\n\t\t\t\t\t\t\t\tsetIsEditingURL( true );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tcannotEmbed={ cannotEmbed }\n\t\t\t\t\t\t\tfallback={ () => fallback( url, onReplace ) }\n\t\t\t\t\t\t\ttryAgain={ () => {\n\t\t\t\t\t\t\t\tinvalidateResolution( 'getEmbedPreview', [\n\t\t\t\t\t\t\t\t\turl,\n\t\t\t\t\t\t\t\t] );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\topenEmbedLinkSettings={ () =>\n\t\t\t\t\t\t\t\tsetShowEmbedBottomSheet( true )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</View>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<EmbedControls\n\t\t\t\t\t\tthemeSupportsResponsive={ themeSupportsResponsive }\n\t\t\t\t\t\tblockSupportsResponsive={ responsive }\n\t\t\t\t\t\tallowResponsive={ allowResponsive }\n\t\t\t\t\t\ttoggleResponsive={ toggleResponsive }\n\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\tlinkLabel={ linkLabel }\n\t\t\t\t\t\tonEditURL={ onEditURL }\n\t\t\t\t\t/>\n\t\t\t\t\t<View { ...blockProps }>\n\t\t\t\t\t\t<EmbedPreview\n\t\t\t\t\t\t\talign={ align }\n\t\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\tlabel={ title }\n\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\tpreview={ preview }\n\t\t\t\t\t\t\tisProviderPreviewable={ isProviderPreviewable }\n\t\t\t\t\t\t\tpreviewable={ previewable }\n\t\t\t\t\t\t\ttype={ type }\n\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\tisDefaultEmbedInfo={ ! embedInfoByProvider }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</View>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t<EmbedLinkSettings\n\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\tautoFocus\n\t\t\t\tvalue={ url }\n\t\t\t\tlabel={ linkLabel }\n\t\t\t\tisVisible={ showEmbedBottomSheet }\n\t\t\t\tonClose={ () => setShowEmbedBottomSheet( false ) }\n\t\t\t\tonSubmit={ onEditURL }\n\t\t\t\twithBottomSheet\n\t\t\t/>\n\t\t</>\n\t);\n};\n\nexport default EmbedEdit;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,wBAAwB,EACxBC,aAAa,EACbC,wBAAwB,EACxBC,QAAQ,EACRC,sBAAsB,EACtBC,8BAA8B,QACxB,QAAQ;AACf,OAAOC,aAAa,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BsB,eAAe;EAAA,CACf,CACA,CAAC;AAEL,CAAC;AAED,eAAe7E,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["createUpgradedEmbedBlock","getClassNames","removeAspectRatioClasses","fallback","getEmbedInfoByProvider","getMergedAttributesWithPreview","EmbedControls","embedContentIcon","EmbedLoading","EmbedPlaceholder","EmbedPreview","EmbedLinkSettings","clsx","_x","useCallback","useState","useEffect","useDispatch","useSelect","useBlockProps","store","blockEditorStore","coreStore","View","getAuthority","PREVIEWABLE_PROVIDERS","NOT_PREVIEWABLE_WP_EMBED_PROVIDERS","WP_EMBED_TYPE","EmbedEdit","props","attributes","align","providerNameSlug","previewable","responsive","url","isSelected","onReplace","setAttributes","insertBlocksAfter","onFocus","clientId","defaultEmbedInfo","title","icon","embedInfoByProvider","wasBlockJustInserted","select","isEditingURL","setIsEditingURL","showEmbedBottomSheet","setShowEmbedBottomSheet","invalidateResolution","preview","fetching","themeSupportsResponsive","cannotEmbed","getEmbedPreview","hasFinishedResolution","isPreviewEmbedFallback","getThemeSupports","embedPreview","hasResolvedEmbedPreview","previewIsFallback","badEmbedProvider","html","type","undefined","wordpressCantEmbed","code","validPreview","getMergedAttributes","toggleResponsive","allowResponsive","className","newAllowResponsive","newURL","replace","URL","host","toString","mergedAttributes","upgradedBlock","onEditURL","value","blockClass","blockProps","createElement","showEmbedPlaceholder","classFromPreview","isProviderPreviewable","includes","linkLabel","Fragment","label","onPress","event","tryAgain","openEmbedLinkSettings","blockSupportsResponsive","isDefaultEmbedInfo","autoFocus","isVisible","onClose","onSubmit","withBottomSheet"],"sources":["@wordpress/block-library/src/embed/edit.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tcreateUpgradedEmbedBlock,\n\tgetClassNames,\n\tremoveAspectRatioClasses,\n\tfallback,\n\tgetEmbedInfoByProvider,\n\tgetMergedAttributesWithPreview,\n} from './util';\nimport EmbedControls from './embed-controls';\nimport { embedContentIcon } from './icons';\nimport EmbedLoading from './embed-loading';\nimport EmbedPlaceholder from './embed-placeholder';\nimport EmbedPreview from './embed-preview';\nimport EmbedLinkSettings from './embed-link-settings';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\nimport { useCallback, useState, useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { View } from '@wordpress/primitives';\nimport { getAuthority } from '@wordpress/url';\n\n// The inline preview feature will be released progressible, for this reason\n// the embed will only be considered previewable for the following providers list.\nconst PREVIEWABLE_PROVIDERS = [ 'youtube', 'twitter', 'instagram', 'vimeo' ];\n// Some providers are rendering the inline preview as a WordPress embed and\n// are not supported yet, so we need to disallow them with a fixed providers list.\nconst NOT_PREVIEWABLE_WP_EMBED_PROVIDERS = [ 'pinterest' ];\n\nconst WP_EMBED_TYPE = 'wp-embed';\n\nconst EmbedEdit = ( props ) => {\n\tconst {\n\t\tattributes: { align, providerNameSlug, previewable, responsive, url },\n\t\tattributes,\n\t\tisSelected,\n\t\tonReplace,\n\t\tsetAttributes,\n\t\tinsertBlocksAfter,\n\t\tonFocus,\n\t\tclientId,\n\t} = props;\n\n\tconst defaultEmbedInfo = {\n\t\ttitle: _x( 'Embed', 'block title' ),\n\t\ticon: embedContentIcon,\n\t};\n\tconst embedInfoByProvider = getEmbedInfoByProvider( providerNameSlug );\n\tconst { icon, title } = embedInfoByProvider || defaultEmbedInfo;\n\n\tconst { wasBlockJustInserted } = useSelect(\n\t\t( select ) => ( {\n\t\t\twasBlockJustInserted: select(\n\t\t\t\tblockEditorStore\n\t\t\t).wasBlockJustInserted( clientId, 'inserter_menu' ),\n\t\t} ),\n\t\t[ clientId ]\n\t);\n\tconst [ isEditingURL, setIsEditingURL ] = useState(\n\t\tisSelected && wasBlockJustInserted && ! url\n\t);\n\tconst [ showEmbedBottomSheet, setShowEmbedBottomSheet ] =\n\t\tuseState( isEditingURL );\n\tconst { invalidateResolution } = useDispatch( coreStore );\n\n\tconst { preview, fetching, themeSupportsResponsive, cannotEmbed } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tgetEmbedPreview,\n\t\t\t\t\thasFinishedResolution,\n\t\t\t\t\tisPreviewEmbedFallback,\n\t\t\t\t\tgetThemeSupports,\n\t\t\t\t} = select( coreStore );\n\t\t\t\tif ( ! url ) {\n\t\t\t\t\treturn { fetching: false, cannotEmbed: false };\n\t\t\t\t}\n\n\t\t\t\tconst embedPreview = getEmbedPreview( url );\n\t\t\t\tconst hasResolvedEmbedPreview = hasFinishedResolution(\n\t\t\t\t\t'getEmbedPreview',\n\t\t\t\t\t[ url ]\n\t\t\t\t);\n\t\t\t\tconst previewIsFallback = isPreviewEmbedFallback( url );\n\n\t\t\t\t// The external oEmbed provider does not exist. We got no type info and no html.\n\t\t\t\tconst badEmbedProvider =\n\t\t\t\t\tembedPreview?.html === false &&\n\t\t\t\t\tembedPreview?.type === undefined;\n\t\t\t\t// Some WordPress URLs that can't be embedded will cause the API to return\n\t\t\t\t// a valid JSON response with no HTML and `code` set to 404, rather\n\t\t\t\t// than generating a fallback response as other embeds do.\n\t\t\t\tconst wordpressCantEmbed = embedPreview?.code === '404';\n\t\t\t\tconst validPreview =\n\t\t\t\t\t!! embedPreview &&\n\t\t\t\t\t! badEmbedProvider &&\n\t\t\t\t\t! wordpressCantEmbed;\n\n\t\t\t\treturn {\n\t\t\t\t\tpreview: validPreview ? embedPreview : undefined,\n\t\t\t\t\tfetching: ! hasResolvedEmbedPreview,\n\t\t\t\t\tthemeSupportsResponsive:\n\t\t\t\t\t\tgetThemeSupports()[ 'responsive-embeds' ],\n\t\t\t\t\tcannotEmbed: ! validPreview || previewIsFallback,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ url ]\n\t\t);\n\n\t/**\n\t * Returns the attributes derived from the preview, merged with the current attributes.\n\t *\n\t * @return {Object} Merged attributes.\n\t */\n\tconst getMergedAttributes = () =>\n\t\tgetMergedAttributesWithPreview(\n\t\t\tattributes,\n\t\t\tpreview,\n\t\t\ttitle,\n\t\t\tresponsive\n\t\t);\n\n\tconst toggleResponsive = () => {\n\t\tconst { allowResponsive, className } = attributes;\n\t\tconst { html } = preview;\n\t\tconst newAllowResponsive = ! allowResponsive;\n\n\t\tsetAttributes( {\n\t\t\tallowResponsive: newAllowResponsive,\n\t\t\tclassName: getClassNames(\n\t\t\t\thtml,\n\t\t\t\tclassName,\n\t\t\t\tresponsive && newAllowResponsive\n\t\t\t),\n\t\t} );\n\t};\n\n\tuseEffect( () => {\n\t\tif ( ! preview?.html || ! cannotEmbed || fetching ) {\n\t\t\treturn;\n\t\t}\n\t\t// At this stage, we're not fetching the preview and know it can't be embedded,\n\t\t// so try removing any trailing slash, and resubmit.\n\t\tconst newURL = url.replace( /\\/$/, '' );\n\t\tsetIsEditingURL( false );\n\t\tsetAttributes( { url: newURL } );\n\t}, [ preview?.html, url, cannotEmbed, fetching ] );\n\n\t// Try a different provider in case the embed url is not supported.\n\tuseEffect( () => {\n\t\tif ( ! cannotEmbed || fetching || ! url ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Until X provider is supported in WordPress, as a workaround we use Twitter provider.\n\t\tif ( getAuthority( url ) === 'x.com' ) {\n\t\t\tconst newURL = new URL( url );\n\t\t\tnewURL.host = 'twitter.com';\n\t\t\tsetAttributes( { url: newURL.toString() } );\n\t\t}\n\t}, [ url, cannotEmbed, fetching, setAttributes ] );\n\n\t// Handle incoming preview.\n\tuseEffect( () => {\n\t\tif ( preview && ! isEditingURL ) {\n\t\t\t// When obtaining an incoming preview,\n\t\t\t// we set the attributes derived from the preview data.\n\t\t\tconst mergedAttributes = getMergedAttributes();\n\t\t\tsetAttributes( mergedAttributes );\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst upgradedBlock = createUpgradedEmbedBlock(\n\t\t\t\t\tprops,\n\t\t\t\t\tmergedAttributes\n\t\t\t\t);\n\n\t\t\t\tif ( upgradedBlock ) {\n\t\t\t\t\tonReplace( upgradedBlock );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [ preview, isEditingURL ] );\n\n\tuseEffect(\n\t\t() => setShowEmbedBottomSheet( isEditingURL ),\n\t\t[ isEditingURL ]\n\t);\n\n\tconst onEditURL = useCallback(\n\t\t( value ) => {\n\t\t\t// If the embed URL was changed, we need to reset the aspect ratio class.\n\t\t\t// To do this we have to remove the existing ratio class so it can be recalculated.\n\t\t\tif ( attributes.url !== value ) {\n\t\t\t\tconst blockClass = removeAspectRatioClasses(\n\t\t\t\t\tattributes.className\n\t\t\t\t);\n\t\t\t\tsetAttributes( { className: blockClass } );\n\t\t\t}\n\n\t\t\t// The order of the following calls is important, we need to update the URL attribute before changing `isEditingURL`,\n\t\t\t// otherwise the side-effect that potentially replaces the block when updating the local state won't use the new URL\n\t\t\t// for creating the new block.\n\t\t\tsetAttributes( { url: value } );\n\t\t\tsetIsEditingURL( false );\n\t\t},\n\t\t[ attributes, setAttributes ]\n\t);\n\n\tconst blockProps = useBlockProps();\n\n\tif ( fetching ) {\n\t\treturn (\n\t\t\t<View { ...blockProps }>\n\t\t\t\t<EmbedLoading />\n\t\t\t</View>\n\t\t);\n\t}\n\n\tconst showEmbedPlaceholder = ! preview || cannotEmbed;\n\n\t// Even though we set attributes that get derived from the preview,\n\t// we don't access them directly because for the initial render,\n\t// the `setAttributes` call will not have taken effect. If we're\n\t// rendering responsive content, setting the responsive classes\n\t// after the preview has been rendered can result in unwanted\n\t// clipping or scrollbars. The `getAttributesFromPreview` function\n\t// that `getMergedAttributes` uses is memoized so that we're not\n\t// calculating them on every render.\n\tconst {\n\t\ttype,\n\t\tallowResponsive,\n\t\tclassName: classFromPreview,\n\t} = getMergedAttributes();\n\tconst className = clsx( classFromPreview, props.className );\n\n\tconst isProviderPreviewable =\n\t\tPREVIEWABLE_PROVIDERS.includes( providerNameSlug ) ||\n\t\t// For WordPress embeds, we enable the inline preview for all its providers\n\t\t// except the ones that are not supported yet.\n\t\t( WP_EMBED_TYPE === type &&\n\t\t\t! NOT_PREVIEWABLE_WP_EMBED_PROVIDERS.includes( providerNameSlug ) );\n\n\tconst linkLabel = WP_EMBED_TYPE === type ? 'WordPress' : title;\n\n\treturn (\n\t\t<>\n\t\t\t{ showEmbedPlaceholder ? (\n\t\t\t\t<>\n\t\t\t\t\t<View { ...blockProps }>\n\t\t\t\t\t\t<EmbedPlaceholder\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\tlabel={ title }\n\t\t\t\t\t\t\tonPress={ ( event ) => {\n\t\t\t\t\t\t\t\tonFocus( event );\n\t\t\t\t\t\t\t\tsetIsEditingURL( true );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tcannotEmbed={ cannotEmbed }\n\t\t\t\t\t\t\tfallback={ () => fallback( url, onReplace ) }\n\t\t\t\t\t\t\ttryAgain={ () => {\n\t\t\t\t\t\t\t\tinvalidateResolution( 'getEmbedPreview', [\n\t\t\t\t\t\t\t\t\turl,\n\t\t\t\t\t\t\t\t] );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\topenEmbedLinkSettings={ () =>\n\t\t\t\t\t\t\t\tsetShowEmbedBottomSheet( true )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</View>\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<EmbedControls\n\t\t\t\t\t\tthemeSupportsResponsive={ themeSupportsResponsive }\n\t\t\t\t\t\tblockSupportsResponsive={ responsive }\n\t\t\t\t\t\tallowResponsive={ allowResponsive }\n\t\t\t\t\t\ttoggleResponsive={ toggleResponsive }\n\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\tlinkLabel={ linkLabel }\n\t\t\t\t\t\tonEditURL={ onEditURL }\n\t\t\t\t\t/>\n\t\t\t\t\t<View { ...blockProps }>\n\t\t\t\t\t\t<EmbedPreview\n\t\t\t\t\t\t\talign={ align }\n\t\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\tlabel={ title }\n\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\tpreview={ preview }\n\t\t\t\t\t\t\tisProviderPreviewable={ isProviderPreviewable }\n\t\t\t\t\t\t\tpreviewable={ previewable }\n\t\t\t\t\t\t\ttype={ type }\n\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\tisDefaultEmbedInfo={ ! embedInfoByProvider }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</View>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t<EmbedLinkSettings\n\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\tautoFocus\n\t\t\t\tvalue={ url }\n\t\t\t\tlabel={ linkLabel }\n\t\t\t\tisVisible={ showEmbedBottomSheet }\n\t\t\t\tonClose={ () => setShowEmbedBottomSheet( false ) }\n\t\t\t\tonSubmit={ onEditURL }\n\t\t\t\twithBottomSheet\n\t\t\t/>\n\t\t</>\n\t);\n};\n\nexport default EmbedEdit;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,wBAAwB,EACxBC,aAAa,EACbC,wBAAwB,EACxBC,QAAQ,EACRC,sBAAsB,EACtBC,8BAA8B,QACxB,QAAQ;AACf,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,SAASC,gBAAgB,QAAQ,SAAS;AAC1C,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,gBAAgB,MAAM,qBAAqB;AAClD,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,iBAAiB,MAAM,uBAAuB;;A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uBAAuB,CAAE,IAAK;EAC9B,CACD,CACI,CACL,CAAC,GAEHoC,aAAA,CAAAM,QAAA,QACCN,aAAA,CAACjF,aAAa;IACbiD,uBAAuB,EAAGA,uBAAyB;IACnD4C,uBAAuB,EAAGjE,UAAY;IACtCuC,eAAe,EAAGA,eAAiB;IACnCD,gBAAgB,EAAGA,gBAAkB;IACrCrC,GAAG,EAAGA,GAAK;IACXyD,SAAS,EAAGA,SAAW;IACvBT,SAAS,EAAGA;EAAW,CACvB,CAAC,EACFI,aAAA,CAAChE,IAAI;IAAA,GAAM+D;EAAU,GACpBC,aAAA,CAAC7E,YAAY;IACZqB,KAAK,EAAGA,KAAO;IACf2C,SAAS,EAAGA,SAAW;IACvBjC,QAAQ,EAAGA,QAAU;IACrBG,IAAI,EAAGA,IAAM;IACbL,iBAAiB,EAAGA,iBAAmB;IACvCH,UAAU,EAAGA,UAAY;IACzB0D,KAAK,EAAGnD,KAAO;IACfH,OAAO,EAAGA,OAAS;IACnBa,OAAO,EAAGA,OAAS;IACnBqC,qBAAqB,EAAGA,qBAAuB;IAC/CzD,WAAW,EAAGA,WAAa;IAC3BiC,IAAI,EAAGA,IAAM;IACb/B,GAAG,EAAGA,GAAK;IACXiE,kBAAkB,EAAG,CAAEvD;EAAqB,CAC5C,CACI,CACL,CACF,EACD0C,aAAA,CAAC5E;EACA;EAAA;IACA0F,SAAS;IACTjB,KAAK,EAAGjD,GAAK;IACb2D,KAAK,EAAGF,SAAW;IACnBU,SAAS,EAAGpD,oBAAsB;IAClCqD,OAAO,EAAGA,CAAA,KAAMpD,uBAAuB,CAAE,KAAM,CAAG;IAClDqD,QAAQ,EAAGrB,SAAW;IACtBsB,eAAe;EAAA,CACf,CACA,CAAC;AAEL,CAAC;AAED,eAAe7E,SAAS","ignoreList":[]}
@@ -3,7 +3,7 @@ import { createElement } from "react";
3
3
  * WordPress dependencies
4
4
  */
5
5
  import { __, _x } from '@wordpress/i18n';
6
- import { Button, Placeholder, ExternalLink } from '@wordpress/components';
6
+ import { Button, Placeholder, ExternalLink, __experimentalHStack as HStack, __experimentalVStack as VStack } from '@wordpress/components';
7
7
  import { BlockIcon } from '@wordpress/block-editor';
8
8
  const EmbedPlaceholder = ({
9
9
  icon,
@@ -39,17 +39,22 @@ const EmbedPlaceholder = ({
39
39
  className: "wp-block-embed__learn-more"
40
40
  }, createElement(ExternalLink, {
41
41
  href: __('https://wordpress.org/documentation/article/embeds/')
42
- }, __('Learn more about embeds'))), cannotEmbed && createElement("div", {
42
+ }, __('Learn more about embeds'))), cannotEmbed && createElement(VStack, {
43
+ spacing: 3,
43
44
  className: "components-placeholder__error"
44
45
  }, createElement("div", {
45
46
  className: "components-placeholder__instructions"
46
- }, __('Sorry, this content could not be embedded.')), createElement(Button, {
47
+ }, __('Sorry, this content could not be embedded.')), createElement(HStack, {
48
+ expanded: false,
49
+ spacing: 3,
50
+ justify: "flex-start"
51
+ }, createElement(Button, {
47
52
  variant: "secondary",
48
53
  onClick: tryAgain
49
54
  }, _x('Try again', 'button label')), ' ', createElement(Button, {
50
55
  variant: "secondary",
51
56
  onClick: fallback
52
- }, _x('Convert to link', 'button label'))));
57
+ }, _x('Convert to link', 'button label')))));
53
58
  };
54
59
  export default EmbedPlaceholder;
55
60
  //# sourceMappingURL=embed-placeholder.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__","_x","Button","Placeholder","ExternalLink","BlockIcon","EmbedPlaceholder","icon","label","value","onSubmit","onChange","cannotEmbed","fallback","tryAgain","createElement","showColors","className","instructions","type","placeholder","variant","href","onClick"],"sources":["@wordpress/block-library/src/embed/embed-placeholder.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { Button, Placeholder, ExternalLink } from '@wordpress/components';\nimport { BlockIcon } from '@wordpress/block-editor';\n\nconst EmbedPlaceholder = ( {\n\ticon,\n\tlabel,\n\tvalue,\n\tonSubmit,\n\tonChange,\n\tcannotEmbed,\n\tfallback,\n\ttryAgain,\n} ) => {\n\treturn (\n\t\t<Placeholder\n\t\t\ticon={ <BlockIcon icon={ icon } showColors /> }\n\t\t\tlabel={ label }\n\t\t\tclassName=\"wp-block-embed\"\n\t\t\tinstructions={ __(\n\t\t\t\t'Paste a link to the content you want to display on your site.'\n\t\t\t) }\n\t\t>\n\t\t\t<form onSubmit={ onSubmit }>\n\t\t\t\t<input\n\t\t\t\t\ttype=\"url\"\n\t\t\t\t\tvalue={ value || '' }\n\t\t\t\t\tclassName=\"components-placeholder__input\"\n\t\t\t\t\taria-label={ label }\n\t\t\t\t\tplaceholder={ __( 'Enter URL to embed here…' ) }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t/>\n\t\t\t\t<Button variant=\"primary\" type=\"submit\">\n\t\t\t\t\t{ _x( 'Embed', 'button label' ) }\n\t\t\t\t</Button>\n\t\t\t</form>\n\t\t\t<div className=\"wp-block-embed__learn-more\">\n\t\t\t\t<ExternalLink\n\t\t\t\t\thref={ __(\n\t\t\t\t\t\t'https://wordpress.org/documentation/article/embeds/'\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Learn more about embeds' ) }\n\t\t\t\t</ExternalLink>\n\t\t\t</div>\n\t\t\t{ cannotEmbed && (\n\t\t\t\t<div className=\"components-placeholder__error\">\n\t\t\t\t\t<div className=\"components-placeholder__instructions\">\n\t\t\t\t\t\t{ __( 'Sorry, this content could not be embedded.' ) }\n\t\t\t\t\t</div>\n\t\t\t\t\t<Button variant=\"secondary\" onClick={ tryAgain }>\n\t\t\t\t\t\t{ _x( 'Try again', 'button label' ) }\n\t\t\t\t\t</Button>{ ' ' }\n\t\t\t\t\t<Button variant=\"secondary\" onClick={ fallback }>\n\t\t\t\t\t\t{ _x( 'Convert to link', 'button label' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</Placeholder>\n\t);\n};\n\nexport default EmbedPlaceholder;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,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;EAAU,GAC7Cb,EAAE,CAAE,WAAW,EAAE,cAAe,CAC3B,CAAC,EAAE,GAAG,EACdc,aAAA,CAACb,MAAM;IAACmB,OAAO,EAAC,WAAW;IAACE,OAAO,EAAGV;EAAU,GAC7CZ,EAAE,CAAE,iBAAiB,EAAE,cAAe,CACjC,CACJ,CAEM,CAAC;AAEhB,CAAC;AAED,eAAeK,gBAAgB","ignoreList":[]}
1
+ {"version":3,"names":["__","_x","Button","Placeholder","ExternalLink","__experimentalHStack","HStack","__experimentalVStack","VStack","BlockIcon","EmbedPlaceholder","icon","label","value","onSubmit","onChange","cannotEmbed","fallback","tryAgain","createElement","showColors","className","instructions","type","placeholder","variant","href","spacing","expanded","justify","onClick"],"sources":["@wordpress/block-library/src/embed/embed-placeholder.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tButton,\n\tPlaceholder,\n\tExternalLink,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { BlockIcon } from '@wordpress/block-editor';\n\nconst EmbedPlaceholder = ( {\n\ticon,\n\tlabel,\n\tvalue,\n\tonSubmit,\n\tonChange,\n\tcannotEmbed,\n\tfallback,\n\ttryAgain,\n} ) => {\n\treturn (\n\t\t<Placeholder\n\t\t\ticon={ <BlockIcon icon={ icon } showColors /> }\n\t\t\tlabel={ label }\n\t\t\tclassName=\"wp-block-embed\"\n\t\t\tinstructions={ __(\n\t\t\t\t'Paste a link to the content you want to display on your site.'\n\t\t\t) }\n\t\t>\n\t\t\t<form onSubmit={ onSubmit }>\n\t\t\t\t<input\n\t\t\t\t\ttype=\"url\"\n\t\t\t\t\tvalue={ value || '' }\n\t\t\t\t\tclassName=\"components-placeholder__input\"\n\t\t\t\t\taria-label={ label }\n\t\t\t\t\tplaceholder={ __( 'Enter URL to embed here…' ) }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t/>\n\t\t\t\t<Button variant=\"primary\" type=\"submit\">\n\t\t\t\t\t{ _x( 'Embed', 'button label' ) }\n\t\t\t\t</Button>\n\t\t\t</form>\n\t\t\t<div className=\"wp-block-embed__learn-more\">\n\t\t\t\t<ExternalLink\n\t\t\t\t\thref={ __(\n\t\t\t\t\t\t'https://wordpress.org/documentation/article/embeds/'\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Learn more about embeds' ) }\n\t\t\t\t</ExternalLink>\n\t\t\t</div>\n\t\t\t{ cannotEmbed && (\n\t\t\t\t<VStack spacing={ 3 } className=\"components-placeholder__error\">\n\t\t\t\t\t<div className=\"components-placeholder__instructions\">\n\t\t\t\t\t\t{ __( 'Sorry, this content could not be embedded.' ) }\n\t\t\t\t\t</div>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\tspacing={ 3 }\n\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button variant=\"secondary\" onClick={ tryAgain }>\n\t\t\t\t\t\t\t{ _x( 'Try again', 'button label' ) }\n\t\t\t\t\t\t</Button>{ ' ' }\n\t\t\t\t\t\t<Button variant=\"secondary\" onClick={ fallback }>\n\t\t\t\t\t\t\t{ _x( 'Convert to link', 'button label' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t) }\n\t\t</Placeholder>\n\t);\n};\n\nexport default EmbedPlaceholder;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SACCC,MAAM,EACNC,WAAW,EACXC,YAAY,EACZC,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;AAC9B,SAASC,SAAS,QAAQ,yBAAyB;AAEnD,MAAMC,gBAAgB,GAAGA,CAAE;EAC1BC,IAAI;EACJC,KAAK;EACLC,KAAK;EACLC,QAAQ;EACRC,QAAQ;EACRC,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AAA,CAACjB,MAAM;IAACuB,OAAO,EAAC,WAAW;IAACK,OAAO,EAAGb;EAAU,GAC7ChB,EAAE,CAAE,iBAAiB,EAAE,cAAe,CACjC,CACD,CACD,CAEG,CAAC;AAEhB,CAAC;AAED,eAAeS,gBAAgB","ignoreList":[]}
@@ -7,7 +7,7 @@ import { getPhotoHtml } from './util';
7
7
  /**
8
8
  * External dependencies
9
9
  */
10
- import classnames from 'classnames/dedupe';
10
+ import clsx from 'clsx';
11
11
 
12
12
  /**
13
13
  * WordPress dependencies
@@ -77,7 +77,7 @@ class EmbedPreview extends Component {
77
77
  const iframeTitle = sprintf(
78
78
  // translators: %s: host providing embed content e.g: www.youtube.com
79
79
  __('Embedded content from %s'), parsedHostBaseUrl);
80
- const sandboxClassnames = classnames(type, className, 'wp-block-embed__wrapper');
80
+ const sandboxClassnames = clsx(type, className, 'wp-block-embed__wrapper');
81
81
 
82
82
  // Disabled because the overlay div doesn't actually have a role or functionality
83
83
  // as far as the user is concerned. We're just catching the first click so that
@@ -100,7 +100,7 @@ class EmbedPreview extends Component {
100
100
  /* eslint-enable jsx-a11y/no-static-element-interactions */
101
101
 
102
102
  return createElement("figure", {
103
- className: classnames(className, 'wp-block-embed', {
103
+ className: clsx(className, 'wp-block-embed', {
104
104
  'is-type-video': 'video' === type
105
105
  })
106
106
  }, previewable ? embedWrapper : createElement(Placeholder, {
@@ -1 +1 @@
1
- {"version":3,"names":["getPhotoHtml","classnames","__","sprintf","Placeholder","SandBox","RichText","BlockIcon","__experimentalGetElementClassName","Component","createBlock","getDefaultBlockName","WpEmbedPreview","EmbedPreview","constructor","arguments","hideOverlay","bind","state","interactive","getDerivedStateFromProps","nextProps","isSelected","setState","render","preview","previewable","url","type","caption","onCaptionChange","className","icon","label","insertBlocksAfter","props","scripts","html","parsedHost","URL","host","split","parsedHostBaseUrl","splice","length","join","iframeTitle","sandboxClassnames","embedWrapper","createElement","title","onFocus","onMouseUp","showColors","href","isEmpty","identifier","tagName","placeholder","value","onChange","inlineToolbar","__unstableOnSplitAtEnd"],"sources":["@wordpress/block-library/src/embed/embed-preview.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { getPhotoHtml } from './util';\n\n/**\n * External dependencies\n */\nimport classnames from 'classnames/dedupe';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Placeholder, SandBox } from '@wordpress/components';\nimport {\n\tRichText,\n\tBlockIcon,\n\t__experimentalGetElementClassName,\n} from '@wordpress/block-editor';\nimport { Component } from '@wordpress/element';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport WpEmbedPreview from './wp-embed-preview';\n\nclass EmbedPreview extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.hideOverlay = this.hideOverlay.bind( this );\n\t\tthis.state = {\n\t\t\tinteractive: false,\n\t\t};\n\t}\n\n\tstatic getDerivedStateFromProps( nextProps, state ) {\n\t\tif ( ! nextProps.isSelected && state.interactive ) {\n\t\t\t// We only want to change this when the block is not selected, because changing it when\n\t\t\t// the block becomes selected makes the overlap disappear too early. Hiding the overlay\n\t\t\t// happens on mouseup when the overlay is clicked.\n\t\t\treturn { interactive: false };\n\t\t}\n\n\t\treturn null;\n\t}\n\n\thideOverlay() {\n\t\t// This is called onMouseUp on the overlay. We can't respond to the `isSelected` prop\n\t\t// changing, because that happens on mouse down, and the overlay immediately disappears,\n\t\t// and the mouse event can end up in the preview content. We can't use onClick on\n\t\t// the overlay to hide it either, because then the editor misses the mouseup event, and\n\t\t// thinks we're multi-selecting blocks.\n\t\tthis.setState( { interactive: true } );\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tpreview,\n\t\t\tpreviewable,\n\t\t\turl,\n\t\t\ttype,\n\t\t\tcaption,\n\t\t\tonCaptionChange,\n\t\t\tisSelected,\n\t\t\tclassName,\n\t\t\ticon,\n\t\t\tlabel,\n\t\t\tinsertBlocksAfter,\n\t\t} = this.props;\n\t\tconst { scripts } = preview;\n\t\tconst { interactive } = this.state;\n\n\t\tconst html = 'photo' === type ? getPhotoHtml( preview ) : preview.html;\n\t\tconst parsedHost = new URL( url ).host.split( '.' );\n\t\tconst parsedHostBaseUrl = parsedHost\n\t\t\t.splice( parsedHost.length - 2, parsedHost.length - 1 )\n\t\t\t.join( '.' );\n\t\tconst iframeTitle = sprintf(\n\t\t\t// translators: %s: host providing embed content e.g: www.youtube.com\n\t\t\t__( 'Embedded content from %s' ),\n\t\t\tparsedHostBaseUrl\n\t\t);\n\t\tconst sandboxClassnames = classnames(\n\t\t\ttype,\n\t\t\tclassName,\n\t\t\t'wp-block-embed__wrapper'\n\t\t);\n\n\t\t// Disabled because the overlay div doesn't actually have a role or functionality\n\t\t// as far as the user is concerned. We're just catching the first click so that\n\t\t// the block can be selected without interacting with the embed preview that the overlay covers.\n\t\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\t\tconst embedWrapper =\n\t\t\t'wp-embed' === type ? (\n\t\t\t\t<WpEmbedPreview html={ html } />\n\t\t\t) : (\n\t\t\t\t<div className=\"wp-block-embed__wrapper\">\n\t\t\t\t\t<SandBox\n\t\t\t\t\t\thtml={ html }\n\t\t\t\t\t\tscripts={ scripts }\n\t\t\t\t\t\ttitle={ iframeTitle }\n\t\t\t\t\t\ttype={ sandboxClassnames }\n\t\t\t\t\t\tonFocus={ this.hideOverlay }\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! interactive && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"block-library-embed__interactive-overlay\"\n\t\t\t\t\t\t\tonMouseUp={ this.hideOverlay }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t);\n\t\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n\n\t\treturn (\n\t\t\t<figure\n\t\t\t\tclassName={ classnames( className, 'wp-block-embed', {\n\t\t\t\t\t'is-type-video': 'video' === type,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t{ previewable ? (\n\t\t\t\t\tembedWrapper\n\t\t\t\t) : (\n\t\t\t\t\t<Placeholder\n\t\t\t\t\t\ticon={ <BlockIcon icon={ icon } showColors /> }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t>\n\t\t\t\t\t\t<p className=\"components-placeholder__error\">\n\t\t\t\t\t\t\t<a href={ url }>{ url }</a>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p className=\"components-placeholder__error\">\n\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: host providing embed content e.g: www.youtube.com */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\"Embedded content from %s can't be previewed in the editor.\"\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tparsedHostBaseUrl\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</Placeholder>\n\t\t\t\t) }\n\t\t\t\t{ ( ! RichText.isEmpty( caption ) || isSelected ) && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"caption\"\n\t\t\t\t\t\ttagName=\"figcaption\"\n\t\t\t\t\t\tclassName={ __experimentalGetElementClassName(\n\t\t\t\t\t\t\t'caption'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tplaceholder={ __( 'Add caption' ) }\n\t\t\t\t\t\tvalue={ caption }\n\t\t\t\t\t\tonChange={ onCaptionChange }\n\t\t\t\t\t\tinlineToolbar\n\t\t\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\tcreateBlock( getDefaultBlockName() )\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</figure>\n\t\t);\n\t}\n}\n\nexport default EmbedPreview;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,QAAQ;;AAErC;AACA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B,aAAA,CAAC1C,SAAS;QAACyB,IAAI,EAAGA,IAAM;QAACqB,UAAU;MAAA,CAAE,CAAG;MAC/CpB,KAAK,EAAGA;IAAO,GAEfgB,aAAA;MAAGlB,SAAS,EAAC;IAA+B,GAC3CkB,aAAA;MAAGK,IAAI,EAAG3B;IAAK,GAAGA,GAAQ,CACxB,CAAC,EACJsB,aAAA;MAAGlB,SAAS,EAAC;IAA+B,GACzC5B,OAAO,EACR;IACAD,EAAE,CACD,4DACD,CAAC,EACDwC,iBACD,CACE,CACS,CACb,EACC,CAAE,CAAEpC,QAAQ,CAACiD,OAAO,CAAE1B,OAAQ,CAAC,IAAIP,UAAU,KAC9C2B,aAAA,CAAC3C,QAAQ;MACRkD,UAAU,EAAC,SAAS;MACpBC,OAAO,EAAC,YAAY;MACpB1B,SAAS,EAAGvB,iCAAiC,CAC5C,SACD,CAAG;MACHkD,WAAW,EAAGxD,EAAE,CAAE,aAAc,CAAG;MACnCyD,KAAK,EAAG9B,OAAS;MACjB+B,QAAQ,EAAG9B,eAAiB;MAC5B+B,aAAa;MACbC,sBAAsB,EAAGA,CAAA,KACxB5B,iBAAiB,CAChBxB,WAAW,CAAEC,mBAAmB,CAAC,CAAE,CACpC;IACA,CACD,CAEK,CAAC;EAEX;AACD;AAEA,eAAeE,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["getPhotoHtml","clsx","__","sprintf","Placeholder","SandBox","RichText","BlockIcon","__experimentalGetElementClassName","Component","createBlock","getDefaultBlockName","WpEmbedPreview","EmbedPreview","constructor","arguments","hideOverlay","bind","state","interactive","getDerivedStateFromProps","nextProps","isSelected","setState","render","preview","previewable","url","type","caption","onCaptionChange","className","icon","label","insertBlocksAfter","props","scripts","html","parsedHost","URL","host","split","parsedHostBaseUrl","splice","length","join","iframeTitle","sandboxClassnames","embedWrapper","createElement","title","onFocus","onMouseUp","showColors","href","isEmpty","identifier","tagName","placeholder","value","onChange","inlineToolbar","__unstableOnSplitAtEnd"],"sources":["@wordpress/block-library/src/embed/embed-preview.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { getPhotoHtml } from './util';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Placeholder, SandBox } from '@wordpress/components';\nimport {\n\tRichText,\n\tBlockIcon,\n\t__experimentalGetElementClassName,\n} from '@wordpress/block-editor';\nimport { Component } from '@wordpress/element';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport WpEmbedPreview from './wp-embed-preview';\n\nclass EmbedPreview extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.hideOverlay = this.hideOverlay.bind( this );\n\t\tthis.state = {\n\t\t\tinteractive: false,\n\t\t};\n\t}\n\n\tstatic getDerivedStateFromProps( nextProps, state ) {\n\t\tif ( ! nextProps.isSelected && state.interactive ) {\n\t\t\t// We only want to change this when the block is not selected, because changing it when\n\t\t\t// the block becomes selected makes the overlap disappear too early. Hiding the overlay\n\t\t\t// happens on mouseup when the overlay is clicked.\n\t\t\treturn { interactive: false };\n\t\t}\n\n\t\treturn null;\n\t}\n\n\thideOverlay() {\n\t\t// This is called onMouseUp on the overlay. We can't respond to the `isSelected` prop\n\t\t// changing, because that happens on mouse down, and the overlay immediately disappears,\n\t\t// and the mouse event can end up in the preview content. We can't use onClick on\n\t\t// the overlay to hide it either, because then the editor misses the mouseup event, and\n\t\t// thinks we're multi-selecting blocks.\n\t\tthis.setState( { interactive: true } );\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tpreview,\n\t\t\tpreviewable,\n\t\t\turl,\n\t\t\ttype,\n\t\t\tcaption,\n\t\t\tonCaptionChange,\n\t\t\tisSelected,\n\t\t\tclassName,\n\t\t\ticon,\n\t\t\tlabel,\n\t\t\tinsertBlocksAfter,\n\t\t} = this.props;\n\t\tconst { scripts } = preview;\n\t\tconst { interactive } = this.state;\n\n\t\tconst html = 'photo' === type ? getPhotoHtml( preview ) : preview.html;\n\t\tconst parsedHost = new URL( url ).host.split( '.' );\n\t\tconst parsedHostBaseUrl = parsedHost\n\t\t\t.splice( parsedHost.length - 2, parsedHost.length - 1 )\n\t\t\t.join( '.' );\n\t\tconst iframeTitle = sprintf(\n\t\t\t// translators: %s: host providing embed content e.g: www.youtube.com\n\t\t\t__( 'Embedded content from %s' ),\n\t\t\tparsedHostBaseUrl\n\t\t);\n\t\tconst sandboxClassnames = clsx(\n\t\t\ttype,\n\t\t\tclassName,\n\t\t\t'wp-block-embed__wrapper'\n\t\t);\n\n\t\t// Disabled because the overlay div doesn't actually have a role or functionality\n\t\t// as far as the user is concerned. We're just catching the first click so that\n\t\t// the block can be selected without interacting with the embed preview that the overlay covers.\n\t\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\t\tconst embedWrapper =\n\t\t\t'wp-embed' === type ? (\n\t\t\t\t<WpEmbedPreview html={ html } />\n\t\t\t) : (\n\t\t\t\t<div className=\"wp-block-embed__wrapper\">\n\t\t\t\t\t<SandBox\n\t\t\t\t\t\thtml={ html }\n\t\t\t\t\t\tscripts={ scripts }\n\t\t\t\t\t\ttitle={ iframeTitle }\n\t\t\t\t\t\ttype={ sandboxClassnames }\n\t\t\t\t\t\tonFocus={ this.hideOverlay }\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! interactive && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"block-library-embed__interactive-overlay\"\n\t\t\t\t\t\t\tonMouseUp={ this.hideOverlay }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t);\n\t\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n\n\t\treturn (\n\t\t\t<figure\n\t\t\t\tclassName={ clsx( className, 'wp-block-embed', {\n\t\t\t\t\t'is-type-video': 'video' === type,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t{ previewable ? (\n\t\t\t\t\tembedWrapper\n\t\t\t\t) : (\n\t\t\t\t\t<Placeholder\n\t\t\t\t\t\ticon={ <BlockIcon icon={ icon } showColors /> }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t>\n\t\t\t\t\t\t<p className=\"components-placeholder__error\">\n\t\t\t\t\t\t\t<a href={ url }>{ url }</a>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p className=\"components-placeholder__error\">\n\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: host providing embed content e.g: www.youtube.com */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\"Embedded content from %s can't be previewed in the editor.\"\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tparsedHostBaseUrl\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</Placeholder>\n\t\t\t\t) }\n\t\t\t\t{ ( ! RichText.isEmpty( caption ) || isSelected ) && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"caption\"\n\t\t\t\t\t\ttagName=\"figcaption\"\n\t\t\t\t\t\tclassName={ __experimentalGetElementClassName(\n\t\t\t\t\t\t\t'caption'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tplaceholder={ __( 'Add caption' ) }\n\t\t\t\t\t\tvalue={ caption }\n\t\t\t\t\t\tonChange={ onCaptionChange }\n\t\t\t\t\t\tinlineToolbar\n\t\t\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\tcreateBlock( getDefaultBlockName() )\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</figure>\n\t\t);\n\t}\n}\n\nexport default EmbedPreview;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAQ,QAAQ;;AAErC;AACA;AACA;AACA,OAAOC,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA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qB,UAAU;MAAA,CAAE,CAAG;MAC/CpB,KAAK,EAAGA;IAAO,GAEfgB,aAAA;MAAGlB,SAAS,EAAC;IAA+B,GAC3CkB,aAAA;MAAGK,IAAI,EAAG3B;IAAK,GAAGA,GAAQ,CACxB,CAAC,EACJsB,aAAA;MAAGlB,SAAS,EAAC;IAA+B,GACzC5B,OAAO,EACR;IACAD,EAAE,CACD,4DACD,CAAC,EACDwC,iBACD,CACE,CACS,CACb,EACC,CAAE,CAAEpC,QAAQ,CAACiD,OAAO,CAAE1B,OAAQ,CAAC,IAAIP,UAAU,KAC9C2B,aAAA,CAAC3C,QAAQ;MACRkD,UAAU,EAAC,SAAS;MACpBC,OAAO,EAAC,YAAY;MACpB1B,SAAS,EAAGvB,iCAAiC,CAC5C,SACD,CAAG;MACHkD,WAAW,EAAGxD,EAAE,CAAE,aAAc,CAAG;MACnCyD,KAAK,EAAG9B,OAAS;MACjB+B,QAAQ,EAAG9B,eAAiB;MAC5B+B,aAAa;MACbC,sBAAsB,EAAGA,CAAA,KACxB5B,iBAAiB,CAChBxB,WAAW,CAAEC,mBAAmB,CAAC,CAAE,CACpC;IACA,CACD,CAEK,CAAC;EAEX;AACD;AAEA,eAAeE,YAAY","ignoreList":[]}
@@ -3,7 +3,7 @@ import { createElement, Fragment } from "react";
3
3
  * External dependencies
4
4
  */
5
5
  import { TouchableWithoutFeedback } from 'react-native';
6
- import classnames from 'classnames/dedupe';
6
+ import clsx from 'clsx';
7
7
 
8
8
  /**
9
9
  * WordPress dependencies
@@ -70,7 +70,7 @@ const EmbedPreview = ({
70
70
  const iframeTitle = sprintf(
71
71
  // translators: %s: host providing embed content e.g: www.youtube.com
72
72
  __('Embedded content from %s'), parsedHostBaseUrl);
73
- const sandboxClassnames = classnames(type, className, 'wp-block-embed__wrapper');
73
+ const sandboxClassnames = clsx(type, className, 'wp-block-embed__wrapper');
74
74
  const PreviewContent = 'wp-embed' === type ? WpEmbedPreview : SandBox;
75
75
  const embedWrapper = createElement(Fragment, null, createElement(TouchableWithoutFeedback, {
76
76
  onPress: () => {
@@ -1 +1 @@
1
- {"version":3,"names":["TouchableWithoutFeedback","classnames","View","BlockCaption","RichText","store","blockEditorStore","__","sprintf","memo","useState","SandBox","useSelect","getPhotoHtml","EmbedNoPreview","WpEmbedPreview","styles","EmbedPreview","align","className","clientId","icon","insertBlocksAfter","isSelected","label","onFocus","preview","previewable","isProviderPreviewable","type","url","isDefaultEmbedInfo","isCaptionSelected","setIsCaptionSelected","locale","getSettings","wrapperStyle","wrapperAlignStyle","sandboxAlignStyle","accessibilityLabelCreator","caption","isEmpty","onEmbedPreviewPress","onFocusCaption","provider_url","providerUrl","html","parsedHost","URL","host","split","parsedHostBaseUrl","splice","length","join","iframeTitle","sandboxClassnames","PreviewContent","embedWrapper","createElement","Fragment","onPress","pointerEvents","style","lang","title","containerStyle","accessible","disabled"],"sources":["@wordpress/block-library/src/embed/embed-preview.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { TouchableWithoutFeedback } from 'react-native';\nimport classnames from 'classnames/dedupe';\n\n/**\n * WordPress dependencies\n */\nimport { View } from '@wordpress/primitives';\nimport {\n\tBlockCaption,\n\tRichText,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { memo, useState } from '@wordpress/element';\nimport { SandBox } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { getPhotoHtml } from './util';\nimport EmbedNoPreview from './embed-no-preview';\nimport WpEmbedPreview from './wp-embed-preview';\nimport styles from './styles.scss';\n\nconst EmbedPreview = ( {\n\talign,\n\tclassName,\n\tclientId,\n\ticon,\n\tinsertBlocksAfter,\n\tisSelected,\n\tlabel,\n\tonFocus,\n\tpreview,\n\tpreviewable,\n\tisProviderPreviewable,\n\ttype,\n\turl,\n\tisDefaultEmbedInfo,\n} ) => {\n\tconst [ isCaptionSelected, setIsCaptionSelected ] = useState( false );\n\tconst { locale } = useSelect( blockEditorStore ).getSettings();\n\n\tconst wrapperStyle = styles[ 'embed-preview__wrapper' ];\n\tconst wrapperAlignStyle =\n\t\tstyles[ `embed-preview__wrapper--align-${ align }` ];\n\tconst sandboxAlignStyle =\n\t\tstyles[ `embed-preview__sandbox--align-${ align }` ];\n\n\tfunction accessibilityLabelCreator( caption ) {\n\t\treturn RichText.isEmpty( caption )\n\t\t\t? /* translators: accessibility text. Empty Embed caption. */\n\t\t\t __( 'Embed caption. Empty' )\n\t\t\t: sprintf(\n\t\t\t\t\t/* translators: accessibility text. %s: Embed caption. */\n\t\t\t\t\t__( 'Embed caption. %s' ),\n\t\t\t\t\tcaption\n\t\t\t );\n\t}\n\n\tfunction onEmbedPreviewPress() {\n\t\tsetIsCaptionSelected( false );\n\t}\n\n\tfunction onFocusCaption() {\n\t\tif ( onFocus ) {\n\t\t\tonFocus();\n\t\t}\n\t\tif ( ! isCaptionSelected ) {\n\t\t\tsetIsCaptionSelected( true );\n\t\t}\n\t}\n\n\tconst { provider_url: providerUrl } = preview;\n\tconst html = 'photo' === type ? getPhotoHtml( preview ) : preview.html;\n\tconst parsedHost = new URL( url ).host.split( '.' );\n\tconst parsedHostBaseUrl = parsedHost\n\t\t.splice( parsedHost.length - 2, parsedHost.length - 1 )\n\t\t.join( '.' );\n\tconst iframeTitle = sprintf(\n\t\t// translators: %s: host providing embed content e.g: www.youtube.com\n\t\t__( 'Embedded content from %s' ),\n\t\tparsedHostBaseUrl\n\t);\n\tconst sandboxClassnames = classnames(\n\t\ttype,\n\t\tclassName,\n\t\t'wp-block-embed__wrapper'\n\t);\n\n\tconst PreviewContent = 'wp-embed' === type ? WpEmbedPreview : SandBox;\n\tconst embedWrapper = (\n\t\t<>\n\t\t\t<TouchableWithoutFeedback\n\t\t\t\tonPress={ () => {\n\t\t\t\t\tif ( onFocus ) {\n\t\t\t\t\t\tonFocus();\n\t\t\t\t\t}\n\t\t\t\t\tif ( isCaptionSelected ) {\n\t\t\t\t\t\tsetIsCaptionSelected( false );\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<View\n\t\t\t\t\tpointerEvents=\"box-only\"\n\t\t\t\t\tstyle={ [ wrapperStyle, wrapperAlignStyle ] }\n\t\t\t\t>\n\t\t\t\t\t<PreviewContent\n\t\t\t\t\t\thtml={ html }\n\t\t\t\t\t\tlang={ locale }\n\t\t\t\t\t\ttitle={ iframeTitle }\n\t\t\t\t\t\ttype={ sandboxClassnames }\n\t\t\t\t\t\tproviderUrl={ providerUrl }\n\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\tcontainerStyle={ sandboxAlignStyle }\n\t\t\t\t\t/>\n\t\t\t\t</View>\n\t\t\t</TouchableWithoutFeedback>\n\t\t</>\n\t);\n\treturn (\n\t\t<TouchableWithoutFeedback\n\t\t\taccessible={ ! isSelected }\n\t\t\tonPress={ onEmbedPreviewPress }\n\t\t\tdisabled={ ! isSelected }\n\t\t>\n\t\t\t<View>\n\t\t\t\t{ isProviderPreviewable && previewable ? (\n\t\t\t\t\tembedWrapper\n\t\t\t\t) : (\n\t\t\t\t\t<EmbedNoPreview\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tonPress={ () => setIsCaptionSelected( false ) }\n\t\t\t\t\t\tpreviewable={ previewable }\n\t\t\t\t\t\tisDefaultEmbedInfo={ isDefaultEmbedInfo }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<BlockCaption\n\t\t\t\t\taccessibilityLabelCreator={ accessibilityLabelCreator }\n\t\t\t\t\taccessible\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t\tisSelected={ isCaptionSelected }\n\t\t\t\t\tonFocus={ onFocusCaption }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</TouchableWithoutFeedback>\n\t);\n};\n\nexport default memo( EmbedPreview );\n"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AAE,KAAM,CAAC;MAC9B;IACD;EAAG,GAEH0B,aAAA,CAACzD,IAAI;IACJ4D,aAAa,EAAC,UAAU;IACxBC,KAAK,EAAG,CAAE3B,YAAY,EAAEC,iBAAiB;EAAI,GAE7CsB,aAAA,CAACF,cAAc;IACdX,IAAI,EAAGA,IAAM;IACbkB,IAAI,EAAG9B,MAAQ;IACf+B,KAAK,EAAGV,WAAa;IACrB1B,IAAI,EAAG2B,iBAAmB;IAC1BX,WAAW,EAAGA,WAAa;IAC3Bf,GAAG,EAAGA,GAAK;IACXoC,cAAc,EAAG5B;EAAmB,CACpC,CACI,CACmB,CACzB,CACF;EACD,OACCqB,aAAA,CAAC3D,wBAAwB;IACxBmE,UAAU,EAAG,CAAE5C,UAAY;IAC3BsC,OAAO,EAAGnB,mBAAqB;IAC/B0B,QAAQ,EAAG,CAAE7C;EAAY,GAEzBoC,aAAA,CAACzD,IAAI,QACF0B,qBAAqB,IAAID,WAAW,GACrC+B,YAAY,GAEZC,aAAA,CAAC7C,cAAc;IACdU,KAAK,EAAGA,KAAO;IACfH,IAAI,EAAGA,IAAM;IACbE,UAAU,EAAGA,UAAY;IACzBsC,OAAO,EAAGA,CAAA,KAAM5B,oBAAoB,CAAE,KAAM,CAAG;IAC/CN,WAAW,EAAGA,WAAa;IAC3BI,kBAAkB,EAAGA;EAAoB,CACzC,CACD,EACD4B,aAAA,CAACxD,YAAY;IACZoC,yBAAyB,EAAGA,yBAA2B;IACvD4B,UAAU;IACV/C,QAAQ,EAAGA,QAAU;IACrBE,iBAAiB,EAAGA,iBAAmB;IACvCC,UAAU,EAAGS,iBAAmB;IAChCP,OAAO,EAAGkB;EAAgB,CAC1B,CACI,CACmB,CAAC;AAE7B,CAAC;AAED,eAAelC,IAAI,CAAEQ,YAAa,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["TouchableWithoutFeedback","clsx","View","BlockCaption","RichText","store","blockEditorStore","__","sprintf","memo","useState","SandBox","useSelect","getPhotoHtml","EmbedNoPreview","WpEmbedPreview","styles","EmbedPreview","align","className","clientId","icon","insertBlocksAfter","isSelected","label","onFocus","preview","previewable","isProviderPreviewable","type","url","isDefaultEmbedInfo","isCaptionSelected","setIsCaptionSelected","locale","getSettings","wrapperStyle","wrapperAlignStyle","sandboxAlignStyle","accessibilityLabelCreator","caption","isEmpty","onEmbedPreviewPress","onFocusCaption","provider_url","providerUrl","html","parsedHost","URL","host","split","parsedHostBaseUrl","splice","length","join","iframeTitle","sandboxClassnames","PreviewContent","embedWrapper","createElement","Fragment","onPress","pointerEvents","style","lang","title","containerStyle","accessible","disabled"],"sources":["@wordpress/block-library/src/embed/embed-preview.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { TouchableWithoutFeedback } from 'react-native';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { View } from '@wordpress/primitives';\nimport {\n\tBlockCaption,\n\tRichText,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { memo, useState } from '@wordpress/element';\nimport { SandBox } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { getPhotoHtml } from './util';\nimport EmbedNoPreview from './embed-no-preview';\nimport WpEmbedPreview from './wp-embed-preview';\nimport styles from './styles.scss';\n\nconst EmbedPreview = ( {\n\talign,\n\tclassName,\n\tclientId,\n\ticon,\n\tinsertBlocksAfter,\n\tisSelected,\n\tlabel,\n\tonFocus,\n\tpreview,\n\tpreviewable,\n\tisProviderPreviewable,\n\ttype,\n\turl,\n\tisDefaultEmbedInfo,\n} ) => {\n\tconst [ isCaptionSelected, setIsCaptionSelected ] = useState( false );\n\tconst { locale } = useSelect( blockEditorStore ).getSettings();\n\n\tconst wrapperStyle = styles[ 'embed-preview__wrapper' ];\n\tconst wrapperAlignStyle =\n\t\tstyles[ `embed-preview__wrapper--align-${ align }` ];\n\tconst sandboxAlignStyle =\n\t\tstyles[ `embed-preview__sandbox--align-${ align }` ];\n\n\tfunction accessibilityLabelCreator( caption ) {\n\t\treturn RichText.isEmpty( caption )\n\t\t\t? /* translators: accessibility text. Empty Embed caption. */\n\t\t\t __( 'Embed caption. Empty' )\n\t\t\t: sprintf(\n\t\t\t\t\t/* translators: accessibility text. %s: Embed caption. */\n\t\t\t\t\t__( 'Embed caption. %s' ),\n\t\t\t\t\tcaption\n\t\t\t );\n\t}\n\n\tfunction onEmbedPreviewPress() {\n\t\tsetIsCaptionSelected( false );\n\t}\n\n\tfunction onFocusCaption() {\n\t\tif ( onFocus ) {\n\t\t\tonFocus();\n\t\t}\n\t\tif ( ! isCaptionSelected ) {\n\t\t\tsetIsCaptionSelected( true );\n\t\t}\n\t}\n\n\tconst { provider_url: providerUrl } = preview;\n\tconst html = 'photo' === type ? getPhotoHtml( preview ) : preview.html;\n\tconst parsedHost = new URL( url ).host.split( '.' );\n\tconst parsedHostBaseUrl = parsedHost\n\t\t.splice( parsedHost.length - 2, parsedHost.length - 1 )\n\t\t.join( '.' );\n\tconst iframeTitle = sprintf(\n\t\t// translators: %s: host providing embed content e.g: www.youtube.com\n\t\t__( 'Embedded content from %s' ),\n\t\tparsedHostBaseUrl\n\t);\n\tconst sandboxClassnames = clsx(\n\t\ttype,\n\t\tclassName,\n\t\t'wp-block-embed__wrapper'\n\t);\n\n\tconst PreviewContent = 'wp-embed' === type ? WpEmbedPreview : SandBox;\n\tconst embedWrapper = (\n\t\t<>\n\t\t\t<TouchableWithoutFeedback\n\t\t\t\tonPress={ () => {\n\t\t\t\t\tif ( onFocus ) {\n\t\t\t\t\t\tonFocus();\n\t\t\t\t\t}\n\t\t\t\t\tif ( isCaptionSelected ) {\n\t\t\t\t\t\tsetIsCaptionSelected( false );\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<View\n\t\t\t\t\tpointerEvents=\"box-only\"\n\t\t\t\t\tstyle={ [ wrapperStyle, wrapperAlignStyle ] }\n\t\t\t\t>\n\t\t\t\t\t<PreviewContent\n\t\t\t\t\t\thtml={ html }\n\t\t\t\t\t\tlang={ locale }\n\t\t\t\t\t\ttitle={ iframeTitle }\n\t\t\t\t\t\ttype={ sandboxClassnames }\n\t\t\t\t\t\tproviderUrl={ providerUrl }\n\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\tcontainerStyle={ sandboxAlignStyle }\n\t\t\t\t\t/>\n\t\t\t\t</View>\n\t\t\t</TouchableWithoutFeedback>\n\t\t</>\n\t);\n\treturn (\n\t\t<TouchableWithoutFeedback\n\t\t\taccessible={ ! isSelected }\n\t\t\tonPress={ onEmbedPreviewPress }\n\t\t\tdisabled={ ! isSelected }\n\t\t>\n\t\t\t<View>\n\t\t\t\t{ isProviderPreviewable && previewable ? (\n\t\t\t\t\tembedWrapper\n\t\t\t\t) : (\n\t\t\t\t\t<EmbedNoPreview\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tonPress={ () => setIsCaptionSelected( false ) }\n\t\t\t\t\t\tpreviewable={ previewable }\n\t\t\t\t\t\tisDefaultEmbedInfo={ isDefaultEmbedInfo }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<BlockCaption\n\t\t\t\t\taccessibilityLabelCreator={ accessibilityLabelCreator }\n\t\t\t\t\taccessible\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t\tisSelected={ isCaptionSelected }\n\t\t\t\t\tonFocus={ onFocusCaption }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</TouchableWithoutFeedback>\n\t);\n};\n\nexport default memo( EmbedPreview );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,wBAAwB,QAAQ,cAAc;AACvD,OAAOC,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,IAAI,QAAQ,uBAAuB;AAC5C,SACCC,YAAY,EACZC,QAAQ,EACRC,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IAAI,EAAGA,IAAM;IACbkB,IAAI,EAAG9B,MAAQ;IACf+B,KAAK,EAAGV,WAAa;IACrB1B,IAAI,EAAG2B,iBAAmB;IAC1BX,WAAW,EAAGA,WAAa;IAC3Bf,GAAG,EAAGA,GAAK;IACXoC,cAAc,EAAG5B;EAAmB,CACpC,CACI,CACmB,CACzB,CACF;EACD,OACCqB,aAAA,CAAC3D,wBAAwB;IACxBmE,UAAU,EAAG,CAAE5C,UAAY;IAC3BsC,OAAO,EAAGnB,mBAAqB;IAC/B0B,QAAQ,EAAG,CAAE7C;EAAY,GAEzBoC,aAAA,CAACzD,IAAI,QACF0B,qBAAqB,IAAID,WAAW,GACrC+B,YAAY,GAEZC,aAAA,CAAC7C,cAAc;IACdU,KAAK,EAAGA,KAAO;IACfH,IAAI,EAAGA,IAAM;IACbE,UAAU,EAAGA,UAAY;IACzBsC,OAAO,EAAGA,CAAA,KAAM5B,oBAAoB,CAAE,KAAM,CAAG;IAC/CN,WAAW,EAAGA,WAAa;IAC3BI,kBAAkB,EAAGA;EAAoB,CACzC,CACD,EACD4B,aAAA,CAACxD,YAAY;IACZoC,yBAAyB,EAAGA,yBAA2B;IACvD4B,UAAU;IACV/C,QAAQ,EAAGA,QAAU;IACrBE,iBAAiB,EAAGA,iBAAmB;IACvCC,UAAU,EAAGS,iBAAmB;IAChCP,OAAO,EAAGkB;EAAgB,CAC1B,CACI,CACmB,CAAC;AAE7B,CAAC;AAED,eAAelC,IAAI,CAAEQ,YAAa,CAAC","ignoreList":[]}
@@ -168,4 +168,10 @@ export const embedPocketCastsIcon = {
168
168
  fill: "#fff"
169
169
  }))
170
170
  };
171
+ export const embedBlueskyIcon = createElement(SVG, {
172
+ viewBox: "0 0 24 24"
173
+ }, createElement(Path, {
174
+ fill: "#0a7aff",
175
+ d: "M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z"
176
+ }));
171
177
  //# sourceMappingURL=icons.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["G","Path","SVG","embedContentIcon","createElement","viewBox","xmlns","d","embedAudioIcon","embedPhotoIcon","embedVideoIcon","embedTwitterIcon","foreground","src","embedYouTubeIcon","embedFacebookIcon","embedInstagramIcon","embedWordPressIcon","embedSpotifyIcon","embedFlickrIcon","embedVimeoIcon","embedRedditIcon","embedTumblrIcon","embedAmazonIcon","embedAnimotoIcon","fill","embedDailymotionIcon","embedPinterestIcon","width","height","version","embedWolframIcon","embedPocketCastsIcon","fillRule","clipRule"],"sources":["@wordpress/block-library/src/embed/icons.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { G, Path, SVG } from '@wordpress/components';\n\nexport const embedContentIcon = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z\" />\n\t</SVG>\n);\nexport const embedAudioIcon = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM13.2 7.7c-.4.4-.7 1.1-.7 1.9v3.7c-.4-.3-.8-.4-1.3-.4-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2.5 0 1-.2 1.4-.5.9-.6 1.4-1.6 1.4-2.6V9.6c0-.4.1-.6.2-.8.3-.3 1-.3 1.6-.3h.2V7h-.2c-.7 0-1.8 0-2.6.7z\" />\n\t</SVG>\n);\nexport const embedPhotoIcon = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9.2 4.5H19c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V9.8l4.6-5.3zm9.8 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z\" />\n\t</SVG>\n);\nexport const embedVideoIcon = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM10 15l5-3-5-3v6z\" />\n\t</SVG>\n);\nexport const embedTwitterIcon = {\n\tforeground: '#1da1f2',\n\tsrc: (\n\t\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t\t<G>\n\t\t\t\t<Path d=\"M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z\"></Path>\n\t\t\t</G>\n\t\t</SVG>\n\t),\n};\nexport const embedYouTubeIcon = {\n\tforeground: '#ff0000',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<Path d=\"M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z\" />\n\t\t</SVG>\n\t),\n};\nexport const embedFacebookIcon = {\n\tforeground: '#3b5998',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<Path d=\"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z\" />\n\t\t</SVG>\n\t),\n};\nexport const embedInstagramIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<G>\n\t\t\t<Path d=\"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z\"></Path>\n\t\t</G>\n\t</SVG>\n);\nexport const embedWordPressIcon = {\n\tforeground: '#0073AA',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<G>\n\t\t\t\t<Path d=\"M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z\"></Path>\n\t\t\t</G>\n\t\t</SVG>\n\t),\n};\nexport const embedSpotifyIcon = {\n\tforeground: '#1db954',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<Path d=\"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325\" />\n\t\t</SVG>\n\t),\n};\nexport const embedFlickrIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z\" />\n\t</SVG>\n);\nexport const embedVimeoIcon = {\n\tforeground: '#1ab7ea',\n\tsrc: (\n\t\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t\t<G>\n\t\t\t\t<Path d=\"M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z\"></Path>\n\t\t\t</G>\n\t\t</SVG>\n\t),\n};\nexport const embedRedditIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z\" />\n\t</SVG>\n);\nexport const embedTumblrIcon = {\n\tforeground: '#35465c',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<Path d=\"M19 3H5a2 2 0 00-2 2v14c0 1.1.9 2 2 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.69 14.66c-2.72 0-3.1-1.9-3.1-3.16v-3.56H8.49V8.99c1.7-.62 2.54-1.99 2.64-2.87 0-.06.06-.41.06-.58h1.9v3.1h2.17v2.3h-2.18v3.1c0 .47.13 1.3 1.2 1.26h1.1v2.36c-1.01.02-2.07 0-2.07 0z\" />\n\t\t</SVG>\n\t),\n};\nexport const embedAmazonIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z\" />\n\t\t<Path d=\"M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z\" />\n\t\t<Path d=\"M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z\" />\n\t</SVG>\n);\nexport const embedAnimotoIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\td=\"m.0206909 21 19.8160091-13.07806 3.5831 6.20826z\"\n\t\t\tfill=\"#4bc7ee\"\n\t\t/>\n\t\t<Path\n\t\t\td=\"m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z\"\n\t\t\tfill=\"#d4cdcb\"\n\t\t/>\n\t\t<Path\n\t\t\td=\"m.0206909 21 15.2439091-16.38571 4.3029 7.32271z\"\n\t\t\tfill=\"#c3d82e\"\n\t\t/>\n\t\t<Path\n\t\t\td=\"m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z\"\n\t\t\tfill=\"#e4ecb0\"\n\t\t/>\n\t\t<Path d=\"m.0206909 21 19.5468091-9.063 1.6621 2.8344z\" fill=\"#209dbd\" />\n\t\t<Path\n\t\t\td=\"m.0206909 21 17.9209091-11.82623 1.6259 2.76323z\"\n\t\t\tfill=\"#7cb3c9\"\n\t\t/>\n\t</SVG>\n);\nexport const embedDailymotionIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\td=\"M11.903 16.568c-1.82 0-3.124-1.281-3.124-2.967a2.987 2.987 0 0 1 2.989-2.989c1.663 0 2.944 1.304 2.944 3.034 0 1.663-1.281 2.922-2.81 2.922ZM17.997 3l-3.308.73v5.107c-.809-1.034-2.045-1.37-3.505-1.37-1.529 0-2.9.561-4.023 1.662-1.259 1.214-1.933 2.764-1.933 4.495 0 1.888.72 3.506 2.113 4.742 1.056.944 2.314 1.415 3.775 1.415 1.438 0 2.517-.382 3.573-1.415v1.415h3.308V3Z\"\n\t\t\tfill=\"#333436\"\n\t\t/>\n\t</SVG>\n);\nexport const embedPinterestIcon = (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2\" />\n\t</SVG>\n);\n\nexport const embedWolframIcon = (\n\t<SVG viewBox=\"0 0 44 44\">\n\t\t<Path d=\"M32.59521,22.001l4.31885-4.84473-6.34131-1.38379.646-6.459-5.94336,2.61035L22,6.31934l-3.27344,5.60351L12.78418,9.3125l.645,6.458L7.08643,17.15234,11.40479,21.999,7.08594,26.84375l6.34131,1.38379-.64551,6.458,5.94287-2.60938L22,37.68066l3.27344-5.60351,5.94287,2.61035-.64551-6.458,6.34277-1.38183Zm.44385,2.75244L30.772,23.97827l-1.59558-2.07391,1.97888.735Zm-8.82147,6.1579L22.75,33.424V30.88977l1.52228-2.22168ZM18.56226,13.48816,19.819,15.09534l-2.49219-.88642L15.94037,12.337Zm6.87719.00116,2.62043-1.15027-1.38654,1.86981L24.183,15.0946Zm3.59357,2.6029-1.22546,1.7381.07525-2.73486,1.44507-1.94867ZM22,29.33008l-2.16406-3.15686L22,23.23688l2.16406,2.93634Zm-4.25458-9.582-.10528-3.836,3.60986,1.284v3.73242Zm5.00458-2.552,3.60986-1.284-.10528,3.836L22.75,20.92853Zm-7.78174-1.10559-.29352-2.94263,1.44245,1.94739.07519,2.73321Zm2.30982,5.08319,3.50817,1.18164-2.16247,2.9342-3.678-1.08447Zm2.4486,7.49285L21.25,30.88977v2.53485L19.78052,30.91Zm3.48707-6.31121,3.50817-1.18164,2.33228,3.03137-3.678,1.08447Zm10.87219-4.28113-2.714,3.04529L28.16418,19.928l1.92176-2.72565ZM24.06036,12.81769l-2.06012,2.6322-2.059-2.63318L22,9.292ZM9.91455,18.07227l4.00079-.87195,1.921,2.72735-3.20794,1.19019Zm2.93024,4.565,1.9801-.73462L13.228,23.97827l-2.26838.77429Zm-1.55591,3.58819L13.701,25.4021l2.64935.78058-2.14447.67853Zm3.64868,1.977L18.19,27.17334l.08313,3.46332L14.52979,32.2793Zm10.7876,2.43549.08447-3.464,3.25165,1.03052.407,4.07684Zm4.06824-3.77478-2.14545-.68,2.65063-.781,2.41266.825Z\" />\n\t</SVG>\n);\n\nexport const embedPocketCastsIcon = {\n\tforeground: '#f43e37',\n\tsrc: (\n\t\t<SVG\n\t\t\twidth=\"24\"\n\t\t\theight=\"24\"\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<Path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z\"\n\t\t\t/>\n\t\t\t<Path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"M2.67,12a9.33,9.33,0,0,1,18.66,0H19a7,7,0,1,0-7,7v2.33A9.33,9.33,0,0,1,2.67,12ZM12,17.6A5.6,5.6,0,1,1,17.6,12h-2A3.56,3.56,0,1,0,12,15.56Z\"\n\t\t\t\tfill=\"#fff\"\n\t\t\t/>\n\t\t</SVG>\n\t),\n};\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,CAAC,EAAEC,IAAI,EAAEC,GAAG,QAAQ,uBAAuB;AAEpD,OAAO,MAAMC,gBAAgB,GAC5BC,aAAA,CAACF,GAAG;EAACG,OAAO,EAAC,WAAW;EAACC,KAAK,EAAC;AAA4B,GAC1DF,a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EAAC,IAAI;EAACxB,OAAO,EAAC,WAAW;EAACyB,OAAO,EAAC;AAAK,GAC5D1B,aAAA,CAACH,IAAI;EAACM,CAAC,EAAC;AAA0uB,CAAE,CAChvB,CACL;AAED,OAAO,MAAMwB,gBAAgB,GAC5B3B,aAAA,CAACF,GAAG;EAACG,OAAO,EAAC;AAAW,GACvBD,aAAA,CAACH,IAAI;EAACM,CAAC,EAAC;AAAq9C,CAAE,CAC39C,CACL;AAED,OAAO,MAAMyB,oBAAoB,GAAG;EACnCpB,UAAU,EAAE,SAAS;EACrBC,GAAG,EACFT,aAAA,CAACF,GAAG;IACH0B,KAAK,EAAC,IAAI;IACVC,MAAM,EAAC,IAAI;IACXxB,OAAO,EAAC,WAAW;IACnBoB,IAAI,EAAC,MAAM;IACXnB,KAAK,EAAC;EAA4B,GAElCF,aAAA,CAACH,IAAI;IACJgC,QAAQ,EAAC,SAAS;IAClBC,QAAQ,EAAC,SAAS;IAClB3B,CAAC,EAAC;EAA4C,CAC9C,CAAC,EACFH,aAAA,CAACH,IAAI;IACJgC,QAAQ,EAAC,SAAS;IAClBC,QAAQ,EAAC,SAAS;IAClB3B,CAAC,EAAC,4IAA4I;IAC9IkB,IAAI,EAAC;EAAM,CACX,CACG;AAEP,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["G","Path","SVG","embedContentIcon","createElement","viewBox","xmlns","d","embedAudioIcon","embedPhotoIcon","embedVideoIcon","embedTwitterIcon","foreground","src","embedYouTubeIcon","embedFacebookIcon","embedInstagramIcon","embedWordPressIcon","embedSpotifyIcon","embedFlickrIcon","embedVimeoIcon","embedRedditIcon","embedTumblrIcon","embedAmazonIcon","embedAnimotoIcon","fill","embedDailymotionIcon","embedPinterestIcon","width","height","version","embedWolframIcon","embedPocketCastsIcon","fillRule","clipRule","embedBlueskyIcon"],"sources":["@wordpress/block-library/src/embed/icons.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { G, Path, SVG } from '@wordpress/components';\n\nexport const embedContentIcon = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z\" />\n\t</SVG>\n);\nexport const embedAudioIcon = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM13.2 7.7c-.4.4-.7 1.1-.7 1.9v3.7c-.4-.3-.8-.4-1.3-.4-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2.5 0 1-.2 1.4-.5.9-.6 1.4-1.6 1.4-2.6V9.6c0-.4.1-.6.2-.8.3-.3 1-.3 1.6-.3h.2V7h-.2c-.7 0-1.8 0-2.6.7z\" />\n\t</SVG>\n);\nexport const embedPhotoIcon = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9.2 4.5H19c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V9.8l4.6-5.3zm9.8 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z\" />\n\t</SVG>\n);\nexport const embedVideoIcon = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM10 15l5-3-5-3v6z\" />\n\t</SVG>\n);\nexport const embedTwitterIcon = {\n\tforeground: '#1da1f2',\n\tsrc: (\n\t\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t\t<G>\n\t\t\t\t<Path d=\"M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z\"></Path>\n\t\t\t</G>\n\t\t</SVG>\n\t),\n};\nexport const embedYouTubeIcon = {\n\tforeground: '#ff0000',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<Path d=\"M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z\" />\n\t\t</SVG>\n\t),\n};\nexport const embedFacebookIcon = {\n\tforeground: '#3b5998',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<Path d=\"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z\" />\n\t\t</SVG>\n\t),\n};\nexport const embedInstagramIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<G>\n\t\t\t<Path d=\"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z\"></Path>\n\t\t</G>\n\t</SVG>\n);\nexport const embedWordPressIcon = {\n\tforeground: '#0073AA',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<G>\n\t\t\t\t<Path d=\"M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z\"></Path>\n\t\t\t</G>\n\t\t</SVG>\n\t),\n};\nexport const embedSpotifyIcon = {\n\tforeground: '#1db954',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<Path d=\"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325\" />\n\t\t</SVG>\n\t),\n};\nexport const embedFlickrIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z\" />\n\t</SVG>\n);\nexport const embedVimeoIcon = {\n\tforeground: '#1ab7ea',\n\tsrc: (\n\t\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t\t<G>\n\t\t\t\t<Path d=\"M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z\"></Path>\n\t\t\t</G>\n\t\t</SVG>\n\t),\n};\nexport const embedRedditIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z\" />\n\t</SVG>\n);\nexport const embedTumblrIcon = {\n\tforeground: '#35465c',\n\tsrc: (\n\t\t<SVG viewBox=\"0 0 24 24\">\n\t\t\t<Path d=\"M19 3H5a2 2 0 00-2 2v14c0 1.1.9 2 2 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.69 14.66c-2.72 0-3.1-1.9-3.1-3.16v-3.56H8.49V8.99c1.7-.62 2.54-1.99 2.64-2.87 0-.06.06-.41.06-.58h1.9v3.1h2.17v2.3h-2.18v3.1c0 .47.13 1.3 1.2 1.26h1.1v2.36c-1.01.02-2.07 0-2.07 0z\" />\n\t\t</SVG>\n\t),\n};\nexport const embedAmazonIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z\" />\n\t\t<Path d=\"M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z\" />\n\t\t<Path d=\"M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z\" />\n\t</SVG>\n);\nexport const embedAnimotoIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\td=\"m.0206909 21 19.8160091-13.07806 3.5831 6.20826z\"\n\t\t\tfill=\"#4bc7ee\"\n\t\t/>\n\t\t<Path\n\t\t\td=\"m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z\"\n\t\t\tfill=\"#d4cdcb\"\n\t\t/>\n\t\t<Path\n\t\t\td=\"m.0206909 21 15.2439091-16.38571 4.3029 7.32271z\"\n\t\t\tfill=\"#c3d82e\"\n\t\t/>\n\t\t<Path\n\t\t\td=\"m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z\"\n\t\t\tfill=\"#e4ecb0\"\n\t\t/>\n\t\t<Path d=\"m.0206909 21 19.5468091-9.063 1.6621 2.8344z\" fill=\"#209dbd\" />\n\t\t<Path\n\t\t\td=\"m.0206909 21 17.9209091-11.82623 1.6259 2.76323z\"\n\t\t\tfill=\"#7cb3c9\"\n\t\t/>\n\t</SVG>\n);\nexport const embedDailymotionIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\td=\"M11.903 16.568c-1.82 0-3.124-1.281-3.124-2.967a2.987 2.987 0 0 1 2.989-2.989c1.663 0 2.944 1.304 2.944 3.034 0 1.663-1.281 2.922-2.81 2.922ZM17.997 3l-3.308.73v5.107c-.809-1.034-2.045-1.37-3.505-1.37-1.529 0-2.9.561-4.023 1.662-1.259 1.214-1.933 2.764-1.933 4.495 0 1.888.72 3.506 2.113 4.742 1.056.944 2.314 1.415 3.775 1.415 1.438 0 2.517-.382 3.573-1.415v1.415h3.308V3Z\"\n\t\t\tfill=\"#333436\"\n\t\t/>\n\t</SVG>\n);\nexport const embedPinterestIcon = (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2\" />\n\t</SVG>\n);\n\nexport const embedWolframIcon = (\n\t<SVG viewBox=\"0 0 44 44\">\n\t\t<Path d=\"M32.59521,22.001l4.31885-4.84473-6.34131-1.38379.646-6.459-5.94336,2.61035L22,6.31934l-3.27344,5.60351L12.78418,9.3125l.645,6.458L7.08643,17.15234,11.40479,21.999,7.08594,26.84375l6.34131,1.38379-.64551,6.458,5.94287-2.60938L22,37.68066l3.27344-5.60351,5.94287,2.61035-.64551-6.458,6.34277-1.38183Zm.44385,2.75244L30.772,23.97827l-1.59558-2.07391,1.97888.735Zm-8.82147,6.1579L22.75,33.424V30.88977l1.52228-2.22168ZM18.56226,13.48816,19.819,15.09534l-2.49219-.88642L15.94037,12.337Zm6.87719.00116,2.62043-1.15027-1.38654,1.86981L24.183,15.0946Zm3.59357,2.6029-1.22546,1.7381.07525-2.73486,1.44507-1.94867ZM22,29.33008l-2.16406-3.15686L22,23.23688l2.16406,2.93634Zm-4.25458-9.582-.10528-3.836,3.60986,1.284v3.73242Zm5.00458-2.552,3.60986-1.284-.10528,3.836L22.75,20.92853Zm-7.78174-1.10559-.29352-2.94263,1.44245,1.94739.07519,2.73321Zm2.30982,5.08319,3.50817,1.18164-2.16247,2.9342-3.678-1.08447Zm2.4486,7.49285L21.25,30.88977v2.53485L19.78052,30.91Zm3.48707-6.31121,3.50817-1.18164,2.33228,3.03137-3.678,1.08447Zm10.87219-4.28113-2.714,3.04529L28.16418,19.928l1.92176-2.72565ZM24.06036,12.81769l-2.06012,2.6322-2.059-2.63318L22,9.292ZM9.91455,18.07227l4.00079-.87195,1.921,2.72735-3.20794,1.19019Zm2.93024,4.565,1.9801-.73462L13.228,23.97827l-2.26838.77429Zm-1.55591,3.58819L13.701,25.4021l2.64935.78058-2.14447.67853Zm3.64868,1.977L18.19,27.17334l.08313,3.46332L14.52979,32.2793Zm10.7876,2.43549.08447-3.464,3.25165,1.03052.407,4.07684Zm4.06824-3.77478-2.14545-.68,2.65063-.781,2.41266.825Z\" />\n\t</SVG>\n);\n\nexport const embedPocketCastsIcon = {\n\tforeground: '#f43e37',\n\tsrc: (\n\t\t<SVG\n\t\t\twidth=\"24\"\n\t\t\theight=\"24\"\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<Path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z\"\n\t\t\t/>\n\t\t\t<Path\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\td=\"M2.67,12a9.33,9.33,0,0,1,18.66,0H19a7,7,0,1,0-7,7v2.33A9.33,9.33,0,0,1,2.67,12ZM12,17.6A5.6,5.6,0,1,1,17.6,12h-2A3.56,3.56,0,1,0,12,15.56Z\"\n\t\t\t\tfill=\"#fff\"\n\t\t\t/>\n\t\t</SVG>\n\t),\n};\n\nexport const embedBlueskyIcon = (\n\t<SVG viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfill=\"#0a7aff\"\n\t\t\td=\"M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z\"\n\t\t/>\n\t</SVG>\n);\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,CAAC,EAAEC,IAAI,EAAEC,GAAG,QAAQ,uBAAuB;AAEpD,OAAO,MAAMC,gBAAgB,GAC5BC,aAAA,CAACF,GAAG;EAACG,OAAO,EAAC,WAAW;EAACC,KAAK,EAAC;AAA4B,GAC1DF,aAAA,CAACH,IAAI;EAACM,CAAC,EAAC;AAAmP,CAAE,CACzP,CACL;AACD,OAAO,MAAMC,cAAc,GAC1BJ,aAAA,CAACF,GAAG;EAACG,OAAO,EAAC,WAAW;EAACC,KAAK,EAAC;AAA4B,GAC1DF,aAAA,CAACH,IAAI;EAACM,CAAC,EAAC;AAA0V,CAAE,CAChW,CACL;AACD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,IAAI;EAACM,CAAC,EAAC;AAAq9C,CAAE,CAC39C,CACL;AAED,OAAO,MAAMyB,oBAAoB,GAAG;EACnCpB,UAAU,EAAE,SAAS;EACrBC,GAAG,EACFT,aAAA,CAACF,GAAG;IACH0B,KAAK,EAAC,IAAI;IACVC,MAAM,EAAC,IAAI;IACXxB,OAAO,EAAC,WAAW;IACnBoB,IAAI,EAAC,MAAM;IACXnB,KAAK,EAAC;EAA4B,GAElCF,aAAA,CAACH,IAAI;IACJgC,QAAQ,EAAC,SAAS;IAClBC,QAAQ,EAAC,SAAS;IAClB3B,CAAC,EAAC;EAA4C,CAC9C,CAAC,EACFH,aAAA,CAACH,IAAI;IACJgC,QAAQ,EAAC,SAAS;IAClBC,QAAQ,EAAC,SAAS;IAClB3B,CAAC,EAAC,4IAA4I;IAC9IkB,IAAI,EAAC;EAAM,CACX,CACG;AAEP,CAAC;AAED,OAAO,MAAMU,gBAAgB,GAC5B/B,aAAA,CAACF,GAAG;EAACG,OAAO,EAAC;AAAW,GACvBD,aAAA,CAACH,IAAI;EACJwB,IAAI,EAAC,SAAS;EACdlB,CAAC,EAAC;AAAyQ,CAC3Q,CACG,CACL","ignoreList":[]}
@@ -2,7 +2,7 @@ import { createElement } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
5
- import classnames from 'classnames/dedupe';
5
+ import clsx from 'clsx';
6
6
 
7
7
  /**
8
8
  * WordPress dependencies
@@ -20,7 +20,7 @@ export default function save({
20
20
  if (!url) {
21
21
  return null;
22
22
  }
23
- const className = classnames('wp-block-embed', {
23
+ const className = clsx('wp-block-embed', {
24
24
  [`is-type-${type}`]: type,
25
25
  [`is-provider-${providerNameSlug}`]: providerNameSlug,
26
26
  [`wp-block-embed-${providerNameSlug}`]: providerNameSlug