@wordpress/block-library 9.4.0 → 9.6.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 (838) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/build/archives/edit.js +1 -0
  3. package/build/archives/edit.js.map +1 -1
  4. package/build/audio/edit.js +1 -0
  5. package/build/audio/edit.js.map +1 -1
  6. package/build/avatar/edit.js +1 -0
  7. package/build/avatar/edit.js.map +1 -1
  8. package/build/avatar/user-control.js +1 -0
  9. package/build/avatar/user-control.js.map +1 -1
  10. package/build/button/edit.js +1 -0
  11. package/build/button/edit.js.map +1 -1
  12. package/build/categories/index.js +12 -0
  13. package/build/categories/index.js.map +1 -1
  14. package/build/column/edit.js +2 -2
  15. package/build/column/edit.js.map +1 -1
  16. package/build/column/index.js +2 -0
  17. package/build/column/index.js.map +1 -1
  18. package/build/comment-author-name/index.js +14 -1
  19. package/build/comment-author-name/index.js.map +1 -1
  20. package/build/comment-content/index.js +14 -1
  21. package/build/comment-content/index.js.map +1 -1
  22. package/build/comment-date/index.js +14 -1
  23. package/build/comment-date/index.js.map +1 -1
  24. package/build/comment-template/index.js +12 -0
  25. package/build/comment-template/index.js.map +1 -1
  26. package/build/comments-pagination/comments-pagination-arrow-controls.js +1 -0
  27. package/build/comments-pagination/comments-pagination-arrow-controls.js.map +1 -1
  28. package/build/comments-title/deprecated.js +3 -0
  29. package/build/comments-title/deprecated.js.map +1 -1
  30. package/build/comments-title/edit.js +3 -1
  31. package/build/comments-title/edit.js.map +1 -1
  32. package/build/comments-title/index.js +3 -0
  33. package/build/comments-title/index.js.map +1 -1
  34. package/build/cover/edit/inspector-controls.js +0 -1
  35. package/build/cover/edit/inspector-controls.js.map +1 -1
  36. package/build/details/edit.js +1 -0
  37. package/build/details/edit.js.map +1 -1
  38. package/build/embed/edit.js +12 -4
  39. package/build/embed/edit.js.map +1 -1
  40. package/build/embed/embed-placeholder.js +6 -3
  41. package/build/embed/embed-placeholder.js.map +1 -1
  42. package/build/embed/embed-preview.js +4 -18
  43. package/build/embed/embed-preview.js.map +1 -1
  44. package/build/file/index.js +12 -0
  45. package/build/file/index.js.map +1 -1
  46. package/build/file/inspector.js +1 -0
  47. package/build/file/inspector.js.map +1 -1
  48. package/build/form/edit.js +6 -4
  49. package/build/form/edit.js.map +1 -1
  50. package/build/form-input/edit.js +2 -0
  51. package/build/form-input/edit.js.map +1 -1
  52. package/build/gallery/edit.js +44 -14
  53. package/build/gallery/edit.js.map +1 -1
  54. package/build/gallery/gallery.native.js +4 -1
  55. package/build/gallery/gallery.native.js.map +1 -1
  56. package/build/gallery/gap-styles.js +1 -9
  57. package/build/gallery/gap-styles.js.map +1 -1
  58. package/build/gallery/use-image-sizes.js +2 -2
  59. package/build/gallery/use-image-sizes.js.map +1 -1
  60. package/build/group/edit.js +1 -1
  61. package/build/group/edit.js.map +1 -1
  62. package/build/group/index.js +27 -30
  63. package/build/group/index.js.map +1 -1
  64. package/build/group/variations.js +51 -3
  65. package/build/group/variations.js.map +1 -1
  66. package/build/heading/edit.js +2 -0
  67. package/build/heading/edit.js.map +1 -1
  68. package/build/heading/index.js +3 -0
  69. package/build/heading/index.js.map +1 -1
  70. package/build/image/image.js +6 -1
  71. package/build/image/image.js.map +1 -1
  72. package/build/image/transforms.js +4 -0
  73. package/build/image/transforms.js.map +1 -1
  74. package/build/image/view.js +1 -1
  75. package/build/image/view.js.map +1 -1
  76. package/build/latest-posts/edit.js +38 -11
  77. package/build/latest-posts/edit.js.map +1 -1
  78. package/build/list/index.js +10 -1
  79. package/build/list/index.js.map +1 -1
  80. package/build/list/ordered-list-settings.js +19 -17
  81. package/build/list/ordered-list-settings.js.map +1 -1
  82. package/build/list-item/index.js +11 -3
  83. package/build/list-item/index.js.map +1 -1
  84. package/build/loginout/index.js +14 -1
  85. package/build/loginout/index.js.map +1 -1
  86. package/build/media-text/edit.js +0 -1
  87. package/build/media-text/edit.js.map +1 -1
  88. package/build/missing/edit.js +10 -19
  89. package/build/missing/edit.js.map +1 -1
  90. package/build/navigation/edit/index.js +8 -8
  91. package/build/navigation/edit/index.js.map +1 -1
  92. package/build/navigation/edit/navigation-menu-name-control.js +1 -0
  93. package/build/navigation/edit/navigation-menu-name-control.js.map +1 -1
  94. package/build/navigation/edit/overlay-menu-preview.js +2 -0
  95. package/build/navigation/edit/overlay-menu-preview.js.map +1 -1
  96. package/build/post-author/edit.js +60 -53
  97. package/build/post-author/edit.js.map +1 -1
  98. package/build/post-author/index.js +13 -0
  99. package/build/post-author/index.js.map +1 -1
  100. package/build/post-author-biography/index.js +14 -1
  101. package/build/post-author-biography/index.js.map +1 -1
  102. package/build/post-author-name/index.js +14 -1
  103. package/build/post-author-name/index.js.map +1 -1
  104. package/build/post-comment/edit.js +2 -0
  105. package/build/post-comment/edit.js.map +1 -1
  106. package/build/post-comments-form/index.js +12 -0
  107. package/build/post-comments-form/index.js.map +1 -1
  108. package/build/post-content/index.js +1 -0
  109. package/build/post-content/index.js.map +1 -1
  110. package/build/post-date/index.js +12 -0
  111. package/build/post-date/index.js.map +1 -1
  112. package/build/post-excerpt/edit.js +1 -0
  113. package/build/post-excerpt/edit.js.map +1 -1
  114. package/build/post-excerpt/index.js +12 -0
  115. package/build/post-excerpt/index.js.map +1 -1
  116. package/build/post-featured-image/dimension-controls.js +9 -2
  117. package/build/post-featured-image/dimension-controls.js.map +1 -1
  118. package/build/post-featured-image/edit.js +1 -0
  119. package/build/post-featured-image/edit.js.map +1 -1
  120. package/build/post-navigation-link/edit.js +7 -2
  121. package/build/post-navigation-link/edit.js.map +1 -1
  122. package/build/post-terms/edit.js +1 -0
  123. package/build/post-terms/edit.js.map +1 -1
  124. package/build/post-terms/index.js +12 -0
  125. package/build/post-terms/index.js.map +1 -1
  126. package/build/post-time-to-read/index.js +6 -0
  127. package/build/post-time-to-read/index.js.map +1 -1
  128. package/build/post-title/edit.js +5 -2
  129. package/build/post-title/edit.js.map +1 -1
  130. package/build/post-title/index.js +15 -0
  131. package/build/post-title/index.js.map +1 -1
  132. package/build/preformatted/index.js +12 -0
  133. package/build/preformatted/index.js.map +1 -1
  134. package/build/query/edit/inspector-controls/enhanced-pagination-control.js +1 -0
  135. package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  136. package/build/query/edit/inspector-controls/index.js +69 -9
  137. package/build/query/edit/inspector-controls/index.js.map +1 -1
  138. package/build/query/edit/inspector-controls/offset-controls.js +37 -0
  139. package/build/query/edit/inspector-controls/offset-controls.js.map +1 -0
  140. package/build/query/edit/inspector-controls/pages-control.js +36 -0
  141. package/build/query/edit/inspector-controls/pages-control.js.map +1 -0
  142. package/build/query/edit/inspector-controls/parent-control.js +1 -0
  143. package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
  144. package/build/query/edit/inspector-controls/per-page-control.js +40 -0
  145. package/build/query/edit/inspector-controls/per-page-control.js.map +1 -0
  146. package/build/query/edit/inspector-controls/sticky-control.js +1 -1
  147. package/build/query/edit/inspector-controls/sticky-control.js.map +1 -1
  148. package/build/query/edit/query-content.js +1 -1
  149. package/build/query/edit/query-content.js.map +1 -1
  150. package/build/query/edit/query-toolbar.js +3 -76
  151. package/build/query/edit/query-toolbar.js.map +1 -1
  152. package/build/query/utils.js +10 -5
  153. package/build/query/utils.js.map +1 -1
  154. package/build/query-pagination/query-pagination-arrow-controls.js +1 -0
  155. package/build/query-pagination/query-pagination-arrow-controls.js.map +1 -1
  156. package/build/query-pagination-numbers/edit.js +1 -0
  157. package/build/query-pagination-numbers/edit.js.map +1 -1
  158. package/build/query-title/edit.js +2 -0
  159. package/build/query-title/edit.js.map +1 -1
  160. package/build/query-title/index.js +15 -0
  161. package/build/query-title/index.js.map +1 -1
  162. package/build/quote/index.js +1 -0
  163. package/build/quote/index.js.map +1 -1
  164. package/build/quote/transforms.js +4 -0
  165. package/build/quote/transforms.js.map +1 -1
  166. package/build/search/edit.js +9 -5
  167. package/build/search/edit.js.map +1 -1
  168. package/build/site-logo/edit.js +15 -8
  169. package/build/site-logo/edit.js.map +1 -1
  170. package/build/site-tagline/edit.js +3 -3
  171. package/build/site-tagline/edit.js.map +1 -1
  172. package/build/site-tagline/index.js +12 -1
  173. package/build/site-tagline/index.js.map +1 -1
  174. package/build/site-title/edit.js +2 -2
  175. package/build/site-title/edit.js.map +1 -1
  176. package/build/site-title/index.js +10 -0
  177. package/build/site-title/index.js.map +1 -1
  178. package/build/social-link/edit.js +2 -1
  179. package/build/social-link/edit.js.map +1 -1
  180. package/build/spacer/controls.js +8 -13
  181. package/build/spacer/controls.js.map +1 -1
  182. package/build/table/edit.js +6 -5
  183. package/build/table/edit.js.map +1 -1
  184. package/build/table-of-contents/index.js +14 -1
  185. package/build/table-of-contents/index.js.map +1 -1
  186. package/build/tag-cloud/edit.js +69 -52
  187. package/build/tag-cloud/edit.js.map +1 -1
  188. package/build/tag-cloud/index.js +13 -1
  189. package/build/tag-cloud/index.js.map +1 -1
  190. package/build/template-part/edit/advanced-controls.js +2 -0
  191. package/build/template-part/edit/advanced-controls.js.map +1 -1
  192. package/build/template-part/edit/index.js +7 -6
  193. package/build/template-part/edit/index.js.map +1 -1
  194. package/build/template-part/edit/inner-blocks.js +6 -4
  195. package/build/template-part/edit/inner-blocks.js.map +1 -1
  196. package/build/video/edit-common-settings.js +1 -0
  197. package/build/video/edit-common-settings.js.map +1 -1
  198. package/build/video/edit.js +1 -1
  199. package/build/video/edit.js.map +1 -1
  200. package/build/video/tracks-editor.js +3 -0
  201. package/build/video/tracks-editor.js.map +1 -1
  202. package/build/video/transforms.js +4 -0
  203. package/build/video/transforms.js.map +1 -1
  204. package/build-module/archives/edit.js +1 -0
  205. package/build-module/archives/edit.js.map +1 -1
  206. package/build-module/audio/edit.js +1 -0
  207. package/build-module/audio/edit.js.map +1 -1
  208. package/build-module/avatar/edit.js +1 -0
  209. package/build-module/avatar/edit.js.map +1 -1
  210. package/build-module/avatar/user-control.js +1 -0
  211. package/build-module/avatar/user-control.js.map +1 -1
  212. package/build-module/button/edit.js +1 -0
  213. package/build-module/button/edit.js.map +1 -1
  214. package/build-module/categories/index.js +12 -0
  215. package/build-module/categories/index.js.map +1 -1
  216. package/build-module/column/edit.js +2 -2
  217. package/build-module/column/edit.js.map +1 -1
  218. package/build-module/column/index.js +2 -0
  219. package/build-module/column/index.js.map +1 -1
  220. package/build-module/comment-author-name/index.js +14 -1
  221. package/build-module/comment-author-name/index.js.map +1 -1
  222. package/build-module/comment-content/index.js +14 -1
  223. package/build-module/comment-content/index.js.map +1 -1
  224. package/build-module/comment-date/index.js +14 -1
  225. package/build-module/comment-date/index.js.map +1 -1
  226. package/build-module/comment-template/index.js +12 -0
  227. package/build-module/comment-template/index.js.map +1 -1
  228. package/build-module/comments-pagination/comments-pagination-arrow-controls.js +1 -0
  229. package/build-module/comments-pagination/comments-pagination-arrow-controls.js.map +1 -1
  230. package/build-module/comments-title/deprecated.js +3 -0
  231. package/build-module/comments-title/deprecated.js.map +1 -1
  232. package/build-module/comments-title/edit.js +3 -1
  233. package/build-module/comments-title/edit.js.map +1 -1
  234. package/build-module/comments-title/index.js +3 -0
  235. package/build-module/comments-title/index.js.map +1 -1
  236. package/build-module/cover/edit/inspector-controls.js +0 -1
  237. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  238. package/build-module/details/edit.js +1 -0
  239. package/build-module/details/edit.js.map +1 -1
  240. package/build-module/embed/edit.js +13 -5
  241. package/build-module/embed/edit.js.map +1 -1
  242. package/build-module/embed/embed-placeholder.js +7 -4
  243. package/build-module/embed/embed-placeholder.js.map +1 -1
  244. package/build-module/embed/embed-preview.js +5 -19
  245. package/build-module/embed/embed-preview.js.map +1 -1
  246. package/build-module/file/index.js +12 -0
  247. package/build-module/file/index.js.map +1 -1
  248. package/build-module/file/inspector.js +1 -0
  249. package/build-module/file/inspector.js.map +1 -1
  250. package/build-module/form/edit.js +6 -4
  251. package/build-module/form/edit.js.map +1 -1
  252. package/build-module/form-input/edit.js +2 -0
  253. package/build-module/form-input/edit.js.map +1 -1
  254. package/build-module/gallery/edit.js +45 -15
  255. package/build-module/gallery/edit.js.map +1 -1
  256. package/build-module/gallery/gallery.native.js +4 -1
  257. package/build-module/gallery/gallery.native.js.map +1 -1
  258. package/build-module/gallery/gap-styles.js +1 -9
  259. package/build-module/gallery/gap-styles.js.map +1 -1
  260. package/build-module/gallery/use-image-sizes.js +2 -2
  261. package/build-module/gallery/use-image-sizes.js.map +1 -1
  262. package/build-module/group/edit.js +1 -1
  263. package/build-module/group/edit.js.map +1 -1
  264. package/build-module/group/index.js +27 -30
  265. package/build-module/group/index.js.map +1 -1
  266. package/build-module/group/variations.js +51 -3
  267. package/build-module/group/variations.js.map +1 -1
  268. package/build-module/heading/edit.js +2 -0
  269. package/build-module/heading/edit.js.map +1 -1
  270. package/build-module/heading/index.js +3 -0
  271. package/build-module/heading/index.js.map +1 -1
  272. package/build-module/image/image.js +7 -2
  273. package/build-module/image/image.js.map +1 -1
  274. package/build-module/image/transforms.js +5 -1
  275. package/build-module/image/transforms.js.map +1 -1
  276. package/build-module/image/view.js +1 -1
  277. package/build-module/image/view.js.map +1 -1
  278. package/build-module/latest-posts/edit.js +41 -14
  279. package/build-module/latest-posts/edit.js.map +1 -1
  280. package/build-module/list/index.js +10 -1
  281. package/build-module/list/index.js.map +1 -1
  282. package/build-module/list/ordered-list-settings.js +19 -17
  283. package/build-module/list/ordered-list-settings.js.map +1 -1
  284. package/build-module/list-item/index.js +11 -3
  285. package/build-module/list-item/index.js.map +1 -1
  286. package/build-module/loginout/index.js +14 -1
  287. package/build-module/loginout/index.js.map +1 -1
  288. package/build-module/media-text/edit.js +0 -1
  289. package/build-module/media-text/edit.js.map +1 -1
  290. package/build-module/missing/edit.js +10 -19
  291. package/build-module/missing/edit.js.map +1 -1
  292. package/build-module/navigation/edit/index.js +8 -8
  293. package/build-module/navigation/edit/index.js.map +1 -1
  294. package/build-module/navigation/edit/navigation-menu-name-control.js +1 -0
  295. package/build-module/navigation/edit/navigation-menu-name-control.js.map +1 -1
  296. package/build-module/navigation/edit/overlay-menu-preview.js +2 -0
  297. package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
  298. package/build-module/post-author/edit.js +61 -54
  299. package/build-module/post-author/edit.js.map +1 -1
  300. package/build-module/post-author/index.js +13 -0
  301. package/build-module/post-author/index.js.map +1 -1
  302. package/build-module/post-author-biography/index.js +14 -1
  303. package/build-module/post-author-biography/index.js.map +1 -1
  304. package/build-module/post-author-name/index.js +14 -1
  305. package/build-module/post-author-name/index.js.map +1 -1
  306. package/build-module/post-comment/edit.js +2 -0
  307. package/build-module/post-comment/edit.js.map +1 -1
  308. package/build-module/post-comments-form/index.js +12 -0
  309. package/build-module/post-comments-form/index.js.map +1 -1
  310. package/build-module/post-content/index.js +1 -0
  311. package/build-module/post-content/index.js.map +1 -1
  312. package/build-module/post-date/index.js +12 -0
  313. package/build-module/post-date/index.js.map +1 -1
  314. package/build-module/post-excerpt/edit.js +1 -0
  315. package/build-module/post-excerpt/edit.js.map +1 -1
  316. package/build-module/post-excerpt/index.js +12 -0
  317. package/build-module/post-excerpt/index.js.map +1 -1
  318. package/build-module/post-featured-image/dimension-controls.js +9 -2
  319. package/build-module/post-featured-image/dimension-controls.js.map +1 -1
  320. package/build-module/post-featured-image/edit.js +1 -0
  321. package/build-module/post-featured-image/edit.js.map +1 -1
  322. package/build-module/post-navigation-link/edit.js +7 -2
  323. package/build-module/post-navigation-link/edit.js.map +1 -1
  324. package/build-module/post-terms/edit.js +1 -0
  325. package/build-module/post-terms/edit.js.map +1 -1
  326. package/build-module/post-terms/index.js +12 -0
  327. package/build-module/post-terms/index.js.map +1 -1
  328. package/build-module/post-time-to-read/index.js +6 -0
  329. package/build-module/post-time-to-read/index.js.map +1 -1
  330. package/build-module/post-title/edit.js +5 -2
  331. package/build-module/post-title/edit.js.map +1 -1
  332. package/build-module/post-title/index.js +15 -0
  333. package/build-module/post-title/index.js.map +1 -1
  334. package/build-module/preformatted/index.js +12 -0
  335. package/build-module/preformatted/index.js.map +1 -1
  336. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +1 -0
  337. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  338. package/build-module/query/edit/inspector-controls/index.js +71 -11
  339. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  340. package/build-module/query/edit/inspector-controls/offset-controls.js +29 -0
  341. package/build-module/query/edit/inspector-controls/offset-controls.js.map +1 -0
  342. package/build-module/query/edit/inspector-controls/pages-control.js +28 -0
  343. package/build-module/query/edit/inspector-controls/pages-control.js.map +1 -0
  344. package/build-module/query/edit/inspector-controls/parent-control.js +1 -0
  345. package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
  346. package/build-module/query/edit/inspector-controls/per-page-control.js +33 -0
  347. package/build-module/query/edit/inspector-controls/per-page-control.js.map +1 -0
  348. package/build-module/query/edit/inspector-controls/sticky-control.js +1 -1
  349. package/build-module/query/edit/inspector-controls/sticky-control.js.map +1 -1
  350. package/build-module/query/edit/query-content.js +1 -1
  351. package/build-module/query/edit/query-content.js.map +1 -1
  352. package/build-module/query/edit/query-toolbar.js +4 -78
  353. package/build-module/query/edit/query-toolbar.js.map +1 -1
  354. package/build-module/query/utils.js +10 -5
  355. package/build-module/query/utils.js.map +1 -1
  356. package/build-module/query-pagination/query-pagination-arrow-controls.js +1 -0
  357. package/build-module/query-pagination/query-pagination-arrow-controls.js.map +1 -1
  358. package/build-module/query-pagination-numbers/edit.js +1 -0
  359. package/build-module/query-pagination-numbers/edit.js.map +1 -1
  360. package/build-module/query-title/edit.js +2 -0
  361. package/build-module/query-title/edit.js.map +1 -1
  362. package/build-module/query-title/index.js +15 -0
  363. package/build-module/query-title/index.js.map +1 -1
  364. package/build-module/quote/index.js +1 -0
  365. package/build-module/quote/index.js.map +1 -1
  366. package/build-module/quote/transforms.js +4 -0
  367. package/build-module/quote/transforms.js.map +1 -1
  368. package/build-module/search/edit.js +10 -6
  369. package/build-module/search/edit.js.map +1 -1
  370. package/build-module/site-logo/edit.js +15 -8
  371. package/build-module/site-logo/edit.js.map +1 -1
  372. package/build-module/site-tagline/edit.js +3 -3
  373. package/build-module/site-tagline/edit.js.map +1 -1
  374. package/build-module/site-tagline/index.js +12 -1
  375. package/build-module/site-tagline/index.js.map +1 -1
  376. package/build-module/site-title/edit.js +2 -2
  377. package/build-module/site-title/edit.js.map +1 -1
  378. package/build-module/site-title/index.js +10 -0
  379. package/build-module/site-title/index.js.map +1 -1
  380. package/build-module/social-link/edit.js +2 -1
  381. package/build-module/social-link/edit.js.map +1 -1
  382. package/build-module/spacer/controls.js +9 -14
  383. package/build-module/spacer/controls.js.map +1 -1
  384. package/build-module/table/edit.js +6 -5
  385. package/build-module/table/edit.js.map +1 -1
  386. package/build-module/table-of-contents/index.js +14 -1
  387. package/build-module/table-of-contents/index.js.map +1 -1
  388. package/build-module/tag-cloud/edit.js +70 -53
  389. package/build-module/tag-cloud/edit.js.map +1 -1
  390. package/build-module/tag-cloud/index.js +13 -1
  391. package/build-module/tag-cloud/index.js.map +1 -1
  392. package/build-module/template-part/edit/advanced-controls.js +2 -0
  393. package/build-module/template-part/edit/advanced-controls.js.map +1 -1
  394. package/build-module/template-part/edit/index.js +7 -6
  395. package/build-module/template-part/edit/index.js.map +1 -1
  396. package/build-module/template-part/edit/inner-blocks.js +6 -4
  397. package/build-module/template-part/edit/inner-blocks.js.map +1 -1
  398. package/build-module/video/edit-common-settings.js +1 -0
  399. package/build-module/video/edit-common-settings.js.map +1 -1
  400. package/build-module/video/edit.js +1 -1
  401. package/build-module/video/edit.js.map +1 -1
  402. package/build-module/video/tracks-editor.js +3 -0
  403. package/build-module/video/tracks-editor.js.map +1 -1
  404. package/build-module/video/transforms.js +5 -1
  405. package/build-module/video/transforms.js.map +1 -1
  406. package/build-style/archives/editor-rtl.css +5 -2
  407. package/build-style/archives/editor.css +5 -2
  408. package/build-style/archives/style-rtl.css +5 -2
  409. package/build-style/archives/style.css +5 -2
  410. package/build-style/audio/editor-rtl.css +5 -2
  411. package/build-style/audio/editor.css +5 -2
  412. package/build-style/audio/style-rtl.css +5 -2
  413. package/build-style/audio/style.css +5 -2
  414. package/build-style/audio/theme-rtl.css +5 -2
  415. package/build-style/audio/theme.css +5 -2
  416. package/build-style/avatar/editor-rtl.css +5 -2
  417. package/build-style/avatar/editor.css +5 -2
  418. package/build-style/avatar/style-rtl.css +5 -2
  419. package/build-style/avatar/style.css +5 -2
  420. package/build-style/button/editor-rtl.css +5 -2
  421. package/build-style/button/editor.css +5 -2
  422. package/build-style/button/style-rtl.css +5 -2
  423. package/build-style/button/style.css +5 -2
  424. package/build-style/buttons/editor-rtl.css +5 -2
  425. package/build-style/buttons/editor.css +5 -2
  426. package/build-style/buttons/style-rtl.css +5 -2
  427. package/build-style/buttons/style.css +5 -2
  428. package/build-style/calendar/style-rtl.css +5 -2
  429. package/build-style/calendar/style.css +5 -2
  430. package/build-style/categories/editor-rtl.css +5 -2
  431. package/build-style/categories/editor.css +5 -2
  432. package/build-style/categories/style-rtl.css +5 -2
  433. package/build-style/categories/style.css +5 -2
  434. package/build-style/classic-rtl.css +5 -2
  435. package/build-style/classic.css +5 -2
  436. package/build-style/code/editor-rtl.css +5 -2
  437. package/build-style/code/editor.css +5 -2
  438. package/build-style/code/style-rtl.css +5 -2
  439. package/build-style/code/style.css +5 -2
  440. package/build-style/code/theme-rtl.css +5 -2
  441. package/build-style/code/theme.css +5 -2
  442. package/build-style/columns/editor-rtl.css +5 -2
  443. package/build-style/columns/editor.css +5 -2
  444. package/build-style/columns/style-rtl.css +5 -2
  445. package/build-style/columns/style.css +5 -2
  446. package/build-style/comment-author-avatar/editor-rtl.css +5 -2
  447. package/build-style/comment-author-avatar/editor.css +5 -2
  448. package/build-style/comment-author-name/style-rtl.css +94 -0
  449. package/build-style/comment-author-name/style.css +94 -0
  450. package/build-style/comment-content/style-rtl.css +9 -2
  451. package/build-style/comment-content/style.css +9 -2
  452. package/build-style/comment-date/style-rtl.css +94 -0
  453. package/build-style/comment-date/style.css +94 -0
  454. package/build-style/comment-template/style-rtl.css +5 -2
  455. package/build-style/comment-template/style.css +5 -2
  456. package/build-style/comments/editor-rtl.css +5 -2
  457. package/build-style/comments/editor.css +5 -2
  458. package/build-style/comments/style-rtl.css +5 -2
  459. package/build-style/comments/style.css +5 -2
  460. package/build-style/comments-pagination/editor-rtl.css +5 -2
  461. package/build-style/comments-pagination/editor.css +5 -2
  462. package/build-style/comments-pagination/style-rtl.css +5 -2
  463. package/build-style/comments-pagination/style.css +5 -2
  464. package/build-style/comments-pagination-numbers/editor-rtl.css +5 -2
  465. package/build-style/comments-pagination-numbers/editor.css +5 -2
  466. package/build-style/comments-title/editor-rtl.css +5 -2
  467. package/build-style/comments-title/editor.css +5 -2
  468. package/build-style/common-rtl.css +5 -2
  469. package/build-style/common.css +5 -2
  470. package/build-style/cover/editor-rtl.css +5 -2
  471. package/build-style/cover/editor.css +5 -2
  472. package/build-style/cover/style-rtl.css +5 -2
  473. package/build-style/cover/style.css +5 -2
  474. package/build-style/details/editor-rtl.css +5 -2
  475. package/build-style/details/editor.css +5 -2
  476. package/build-style/details/style-rtl.css +5 -2
  477. package/build-style/details/style.css +5 -2
  478. package/build-style/editor-elements-rtl.css +5 -2
  479. package/build-style/editor-elements.css +5 -2
  480. package/build-style/editor-rtl.css +47 -45
  481. package/build-style/editor.css +47 -45
  482. package/build-style/elements-rtl.css +5 -2
  483. package/build-style/elements.css +5 -2
  484. package/build-style/embed/editor-rtl.css +8 -2
  485. package/build-style/embed/editor.css +8 -2
  486. package/build-style/embed/style-rtl.css +5 -2
  487. package/build-style/embed/style.css +5 -2
  488. package/build-style/embed/theme-rtl.css +5 -2
  489. package/build-style/embed/theme.css +5 -2
  490. package/build-style/file/editor-rtl.css +5 -2
  491. package/build-style/file/editor.css +5 -2
  492. package/build-style/file/style-rtl.css +5 -2
  493. package/build-style/file/style.css +5 -2
  494. package/build-style/footnotes/style-rtl.css +5 -2
  495. package/build-style/footnotes/style.css +5 -2
  496. package/build-style/form-input/editor-rtl.css +5 -2
  497. package/build-style/form-input/editor.css +5 -2
  498. package/build-style/form-input/style-rtl.css +6 -2
  499. package/build-style/form-input/style.css +6 -2
  500. package/build-style/form-submission-notification/editor-rtl.css +5 -2
  501. package/build-style/form-submission-notification/editor.css +5 -2
  502. package/build-style/form-submit-button/style-rtl.css +5 -2
  503. package/build-style/form-submit-button/style.css +5 -2
  504. package/build-style/freeform/editor-rtl.css +5 -2
  505. package/build-style/freeform/editor.css +5 -2
  506. package/build-style/gallery/editor-rtl.css +5 -3
  507. package/build-style/gallery/editor.css +5 -3
  508. package/build-style/gallery/style-rtl.css +29 -9
  509. package/build-style/gallery/style.css +29 -9
  510. package/build-style/gallery/theme-rtl.css +5 -2
  511. package/build-style/gallery/theme.css +5 -2
  512. package/build-style/group/editor-rtl.css +5 -13
  513. package/build-style/group/editor.css +5 -13
  514. package/build-style/group/style-rtl.css +5 -2
  515. package/build-style/group/style.css +5 -2
  516. package/build-style/group/theme-rtl.css +5 -2
  517. package/build-style/group/theme.css +5 -2
  518. package/build-style/heading/style-rtl.css +5 -2
  519. package/build-style/heading/style.css +5 -2
  520. package/build-style/html/editor-rtl.css +5 -2
  521. package/build-style/html/editor.css +5 -2
  522. package/build-style/image/editor-rtl.css +13 -2
  523. package/build-style/image/editor.css +13 -2
  524. package/build-style/image/style-rtl.css +5 -2
  525. package/build-style/image/style.css +5 -2
  526. package/build-style/image/theme-rtl.css +5 -2
  527. package/build-style/image/theme.css +5 -2
  528. package/build-style/latest-comments/style-rtl.css +5 -2
  529. package/build-style/latest-comments/style.css +5 -2
  530. package/build-style/latest-posts/editor-rtl.css +12 -9
  531. package/build-style/latest-posts/editor.css +12 -9
  532. package/build-style/latest-posts/style-rtl.css +5 -2
  533. package/build-style/latest-posts/style.css +5 -2
  534. package/build-style/list/style-rtl.css +5 -2
  535. package/build-style/list/style.css +5 -2
  536. package/build-style/loginout/style-rtl.css +94 -0
  537. package/build-style/loginout/style.css +94 -0
  538. package/build-style/media-text/editor-rtl.css +5 -2
  539. package/build-style/media-text/editor.css +5 -2
  540. package/build-style/media-text/style-rtl.css +5 -2
  541. package/build-style/media-text/style.css +5 -2
  542. package/build-style/more/editor-rtl.css +5 -2
  543. package/build-style/more/editor.css +5 -2
  544. package/build-style/navigation/editor-rtl.css +9 -14
  545. package/build-style/navigation/editor.css +9 -14
  546. package/build-style/navigation/style-rtl.css +5 -2
  547. package/build-style/navigation/style.css +5 -2
  548. package/build-style/navigation-link/editor-rtl.css +5 -5
  549. package/build-style/navigation-link/editor.css +5 -5
  550. package/build-style/navigation-link/style-rtl.css +5 -2
  551. package/build-style/navigation-link/style.css +5 -2
  552. package/build-style/navigation-submenu/editor-rtl.css +5 -2
  553. package/build-style/navigation-submenu/editor.css +5 -2
  554. package/build-style/nextpage/editor-rtl.css +5 -2
  555. package/build-style/nextpage/editor.css +5 -2
  556. package/build-style/page-list/editor-rtl.css +5 -2
  557. package/build-style/page-list/editor.css +5 -2
  558. package/build-style/page-list/style-rtl.css +5 -2
  559. package/build-style/page-list/style.css +5 -2
  560. package/build-style/paragraph/editor-rtl.css +5 -2
  561. package/build-style/paragraph/editor.css +5 -2
  562. package/build-style/paragraph/style-rtl.css +5 -2
  563. package/build-style/paragraph/style.css +5 -2
  564. package/build-style/post-author/editor-rtl.css +95 -0
  565. package/build-style/post-author/editor.css +95 -0
  566. package/build-style/post-author/style-rtl.css +6 -2
  567. package/build-style/post-author/style.css +6 -2
  568. package/build-style/post-author-biography/style-rtl.css +94 -0
  569. package/build-style/post-author-biography/style.css +94 -0
  570. package/build-style/post-author-name/style-rtl.css +94 -0
  571. package/build-style/post-author-name/style.css +94 -0
  572. package/build-style/post-comments-form/editor-rtl.css +5 -2
  573. package/build-style/post-comments-form/editor.css +5 -2
  574. package/build-style/post-comments-form/style-rtl.css +5 -2
  575. package/build-style/post-comments-form/style.css +5 -2
  576. package/build-style/post-content/editor-rtl.css +5 -2
  577. package/build-style/post-content/editor.css +5 -2
  578. package/build-style/post-content/style-rtl.css +96 -0
  579. package/build-style/post-content/style.css +96 -0
  580. package/build-style/post-date/style-rtl.css +5 -2
  581. package/build-style/post-date/style.css +5 -2
  582. package/build-style/post-excerpt/editor-rtl.css +5 -2
  583. package/build-style/post-excerpt/editor.css +5 -2
  584. package/build-style/post-excerpt/style-rtl.css +6 -2
  585. package/build-style/post-excerpt/style.css +6 -2
  586. package/build-style/post-featured-image/editor-rtl.css +5 -2
  587. package/build-style/post-featured-image/editor.css +5 -2
  588. package/build-style/post-featured-image/style-rtl.css +5 -2
  589. package/build-style/post-featured-image/style.css +5 -2
  590. package/build-style/post-navigation-link/style-rtl.css +5 -2
  591. package/build-style/post-navigation-link/style.css +5 -2
  592. package/build-style/post-template/editor-rtl.css +5 -2
  593. package/build-style/post-template/editor.css +5 -2
  594. package/build-style/post-template/style-rtl.css +5 -2
  595. package/build-style/post-template/style.css +5 -2
  596. package/build-style/post-terms/style-rtl.css +5 -2
  597. package/build-style/post-terms/style.css +5 -2
  598. package/build-style/post-time-to-read/style-rtl.css +5 -2
  599. package/build-style/post-time-to-read/style.css +5 -2
  600. package/build-style/post-title/style-rtl.css +5 -2
  601. package/build-style/post-title/style.css +5 -2
  602. package/build-style/preformatted/style-rtl.css +5 -2
  603. package/build-style/preformatted/style.css +5 -2
  604. package/build-style/pullquote/editor-rtl.css +5 -2
  605. package/build-style/pullquote/editor.css +5 -2
  606. package/build-style/pullquote/style-rtl.css +5 -2
  607. package/build-style/pullquote/style.css +5 -2
  608. package/build-style/pullquote/theme-rtl.css +5 -2
  609. package/build-style/pullquote/theme.css +5 -2
  610. package/build-style/query/editor-rtl.css +5 -2
  611. package/build-style/query/editor.css +5 -2
  612. package/build-style/query-pagination/editor-rtl.css +5 -2
  613. package/build-style/query-pagination/editor.css +5 -2
  614. package/build-style/query-pagination/style-rtl.css +5 -2
  615. package/build-style/query-pagination/style.css +5 -2
  616. package/build-style/query-pagination-numbers/editor-rtl.css +5 -2
  617. package/build-style/query-pagination-numbers/editor.css +5 -2
  618. package/build-style/query-title/style-rtl.css +5 -2
  619. package/build-style/query-title/style.css +5 -2
  620. package/build-style/quote/style-rtl.css +5 -2
  621. package/build-style/quote/style.css +5 -2
  622. package/build-style/quote/theme-rtl.css +8 -5
  623. package/build-style/quote/theme.css +8 -5
  624. package/build-style/read-more/style-rtl.css +5 -2
  625. package/build-style/read-more/style.css +5 -2
  626. package/build-style/reset-rtl.css +5 -2
  627. package/build-style/reset.css +5 -2
  628. package/build-style/rss/editor-rtl.css +5 -2
  629. package/build-style/rss/editor.css +5 -2
  630. package/build-style/rss/style-rtl.css +5 -2
  631. package/build-style/rss/style.css +5 -2
  632. package/build-style/search/editor-rtl.css +8 -4
  633. package/build-style/search/editor.css +8 -4
  634. package/build-style/search/style-rtl.css +5 -2
  635. package/build-style/search/style.css +5 -2
  636. package/build-style/search/theme-rtl.css +5 -2
  637. package/build-style/search/theme.css +5 -2
  638. package/build-style/separator/editor-rtl.css +5 -2
  639. package/build-style/separator/editor.css +5 -2
  640. package/build-style/separator/style-rtl.css +5 -2
  641. package/build-style/separator/style.css +5 -2
  642. package/build-style/separator/theme-rtl.css +5 -2
  643. package/build-style/separator/theme.css +5 -2
  644. package/build-style/shortcode/editor-rtl.css +5 -2
  645. package/build-style/shortcode/editor.css +5 -2
  646. package/build-style/site-logo/editor-rtl.css +5 -2
  647. package/build-style/site-logo/editor.css +5 -2
  648. package/build-style/site-logo/style-rtl.css +5 -2
  649. package/build-style/site-logo/style.css +5 -2
  650. package/build-style/site-tagline/editor-rtl.css +5 -2
  651. package/build-style/site-tagline/editor.css +5 -2
  652. package/build-style/site-tagline/style-rtl.css +94 -0
  653. package/build-style/site-tagline/style.css +94 -0
  654. package/build-style/site-title/editor-rtl.css +5 -2
  655. package/build-style/site-title/editor.css +5 -2
  656. package/build-style/site-title/style-rtl.css +9 -3
  657. package/build-style/site-title/style.css +9 -3
  658. package/build-style/social-link/editor-rtl.css +5 -2
  659. package/build-style/social-link/editor.css +5 -2
  660. package/build-style/social-links/editor-rtl.css +5 -2
  661. package/build-style/social-links/editor.css +5 -2
  662. package/build-style/social-links/style-rtl.css +5 -2
  663. package/build-style/social-links/style.css +5 -2
  664. package/build-style/spacer/editor-rtl.css +5 -2
  665. package/build-style/spacer/editor.css +5 -2
  666. package/build-style/spacer/style-rtl.css +5 -2
  667. package/build-style/spacer/style.css +5 -2
  668. package/build-style/style-rtl.css +80 -10
  669. package/build-style/style.css +80 -10
  670. package/build-style/table/editor-rtl.css +5 -2
  671. package/build-style/table/editor.css +5 -2
  672. package/build-style/table/style-rtl.css +5 -2
  673. package/build-style/table/style.css +5 -2
  674. package/build-style/table/theme-rtl.css +5 -2
  675. package/build-style/table/theme.css +5 -2
  676. package/build-style/table-of-contents/style-rtl.css +94 -0
  677. package/build-style/table-of-contents/style.css +94 -0
  678. package/build-style/tag-cloud/editor-rtl.css +102 -0
  679. package/build-style/tag-cloud/editor.css +102 -0
  680. package/build-style/tag-cloud/style-rtl.css +5 -2
  681. package/build-style/tag-cloud/style.css +5 -2
  682. package/build-style/template-part/editor-rtl.css +5 -6
  683. package/build-style/template-part/editor.css +5 -6
  684. package/build-style/template-part/theme-rtl.css +5 -2
  685. package/build-style/template-part/theme.css +5 -2
  686. package/build-style/term-description/style-rtl.css +5 -2
  687. package/build-style/term-description/style.css +5 -2
  688. package/build-style/text-columns/editor-rtl.css +5 -2
  689. package/build-style/text-columns/editor.css +5 -2
  690. package/build-style/text-columns/style-rtl.css +5 -2
  691. package/build-style/text-columns/style.css +5 -2
  692. package/build-style/theme-rtl.css +8 -5
  693. package/build-style/theme.css +8 -5
  694. package/build-style/verse/style-rtl.css +5 -2
  695. package/build-style/verse/style.css +5 -2
  696. package/build-style/video/editor-rtl.css +5 -5
  697. package/build-style/video/editor.css +5 -5
  698. package/build-style/video/style-rtl.css +5 -2
  699. package/build-style/video/style.css +5 -2
  700. package/build-style/video/theme-rtl.css +5 -2
  701. package/build-style/video/theme.css +5 -2
  702. package/package.json +35 -35
  703. package/src/archives/edit.js +1 -0
  704. package/src/audio/edit.js +4 -3
  705. package/src/avatar/edit.js +1 -0
  706. package/src/avatar/user-control.js +1 -0
  707. package/src/button/edit.js +1 -0
  708. package/src/button/index.php +1 -14
  709. package/src/categories/block.json +12 -0
  710. package/src/column/block.json +2 -0
  711. package/src/column/edit.js +2 -2
  712. package/src/comment-author-name/block.json +14 -1
  713. package/src/comment-author-name/style.scss +4 -0
  714. package/src/comment-content/block.json +14 -1
  715. package/src/comment-content/style.scss +5 -0
  716. package/src/comment-date/block.json +14 -1
  717. package/src/comment-date/style.scss +4 -0
  718. package/src/comment-template/block.json +12 -0
  719. package/src/comments-pagination/comments-pagination-arrow-controls.js +1 -0
  720. package/src/comments-title/block.json +3 -0
  721. package/src/comments-title/edit.js +8 -1
  722. package/src/cover/edit/inspector-controls.js +0 -1
  723. package/src/details/edit.js +1 -0
  724. package/src/editor.scss +2 -0
  725. package/src/embed/edit.js +10 -1
  726. package/src/embed/editor.scss +4 -0
  727. package/src/embed/embed-placeholder.js +7 -4
  728. package/src/embed/embed-preview.js +3 -37
  729. package/src/file/block.json +12 -0
  730. package/src/file/inspector.js +1 -0
  731. package/src/form/edit.js +5 -2
  732. package/src/form-input/edit.js +2 -0
  733. package/src/form-input/style.scss +1 -0
  734. package/src/gallery/edit.js +80 -22
  735. package/src/gallery/editor.scss +1 -2
  736. package/src/gallery/gallery.native.js +2 -1
  737. package/src/gallery/gap-styles.js +1 -8
  738. package/src/gallery/style.scss +33 -7
  739. package/src/gallery/test/__snapshots__/index.native.js.snap +1 -1
  740. package/src/gallery/test/index.native.js +5 -5
  741. package/src/gallery/use-image-sizes.js +2 -2
  742. package/src/group/edit.js +1 -1
  743. package/src/group/editor.scss +1 -1
  744. package/src/group/index.js +26 -29
  745. package/src/group/variations.js +56 -0
  746. package/src/heading/block.json +3 -0
  747. package/src/heading/edit.js +3 -1
  748. package/src/image/editor.scss +12 -0
  749. package/src/image/image.js +7 -1
  750. package/src/image/transforms.js +7 -1
  751. package/src/image/view.js +1 -1
  752. package/src/latest-posts/edit.js +61 -17
  753. package/src/latest-posts/editor.scss +11 -10
  754. package/src/list/block.json +10 -1
  755. package/src/list/ordered-list-settings.js +20 -18
  756. package/src/list/test/edit.native.js +1 -3
  757. package/src/list-item/block.json +11 -3
  758. package/src/loginout/block.json +14 -1
  759. package/src/loginout/style.scss +4 -0
  760. package/src/media-text/edit.js +0 -1
  761. package/src/media-text/style.native.scss +2 -0
  762. package/src/missing/edit.js +12 -18
  763. package/src/navigation/edit/index.js +8 -8
  764. package/src/navigation/edit/navigation-menu-name-control.js +1 -0
  765. package/src/navigation/edit/overlay-menu-preview.js +2 -0
  766. package/src/navigation/editor.scss +5 -1
  767. package/src/navigation/index.php +10 -27
  768. package/src/navigation-link/editor.scss +0 -3
  769. package/src/post-author/block.json +13 -0
  770. package/src/post-author/edit.js +68 -57
  771. package/src/post-author/editor.scss +7 -0
  772. package/src/post-author/style.scss +1 -0
  773. package/src/post-author-biography/block.json +14 -1
  774. package/src/post-author-biography/style.scss +4 -0
  775. package/src/post-author-name/block.json +14 -1
  776. package/src/post-author-name/style.scss +4 -0
  777. package/src/post-comment/edit.js +2 -0
  778. package/src/post-comments-form/block.json +12 -0
  779. package/src/post-content/block.json +1 -0
  780. package/src/post-content/style.scss +5 -0
  781. package/src/post-date/block.json +12 -0
  782. package/src/post-excerpt/block.json +12 -0
  783. package/src/post-excerpt/edit.js +1 -0
  784. package/src/post-excerpt/style.scss +3 -0
  785. package/src/post-featured-image/dimension-controls.js +5 -0
  786. package/src/post-featured-image/edit.js +1 -0
  787. package/src/post-navigation-link/edit.js +8 -2
  788. package/src/post-terms/block.json +12 -0
  789. package/src/post-terms/edit.js +1 -0
  790. package/src/post-time-to-read/block.json +6 -0
  791. package/src/post-title/block.json +15 -0
  792. package/src/post-title/edit.js +5 -3
  793. package/src/preformatted/block.json +12 -0
  794. package/src/query/edit/inspector-controls/enhanced-pagination-control.js +1 -0
  795. package/src/query/edit/inspector-controls/index.js +85 -12
  796. package/src/query/edit/inspector-controls/offset-controls.js +31 -0
  797. package/src/query/edit/inspector-controls/pages-control.js +27 -0
  798. package/src/query/edit/inspector-controls/parent-control.js +1 -0
  799. package/src/query/edit/inspector-controls/per-page-control.js +33 -0
  800. package/src/query/edit/inspector-controls/sticky-control.js +1 -1
  801. package/src/query/edit/query-content.js +1 -1
  802. package/src/query/edit/query-toolbar.js +1 -90
  803. package/src/query/utils.js +9 -5
  804. package/src/query-pagination/query-pagination-arrow-controls.js +1 -0
  805. package/src/query-pagination-numbers/edit.js +1 -0
  806. package/src/query-title/block.json +15 -0
  807. package/src/query-title/edit.js +9 -1
  808. package/src/quote/block.json +1 -0
  809. package/src/quote/test/transforms.native.js +1 -1
  810. package/src/quote/theme.scss +5 -3
  811. package/src/quote/transforms.js +11 -2
  812. package/src/search/edit.js +9 -9
  813. package/src/search/editor.scss +5 -2
  814. package/src/site-logo/edit.js +23 -9
  815. package/src/site-tagline/block.json +12 -1
  816. package/src/site-tagline/edit.js +2 -4
  817. package/src/site-tagline/style.scss +4 -0
  818. package/src/site-title/block.json +10 -0
  819. package/src/site-title/edit.js +2 -4
  820. package/src/site-title/style.scss +7 -2
  821. package/src/social-link/edit.js +2 -1
  822. package/src/spacer/controls.js +10 -13
  823. package/src/style.scss +9 -0
  824. package/src/table/edit.js +5 -4
  825. package/src/table-of-contents/block.json +14 -1
  826. package/src/table-of-contents/style.scss +4 -0
  827. package/src/tag-cloud/block.json +13 -1
  828. package/src/tag-cloud/edit.js +80 -56
  829. package/src/tag-cloud/editor.scss +19 -0
  830. package/src/template-part/edit/advanced-controls.js +2 -0
  831. package/src/template-part/edit/index.js +10 -7
  832. package/src/template-part/edit/inner-blocks.js +6 -4
  833. package/src/template-part/editor.scss +0 -5
  834. package/src/video/edit-common-settings.js +1 -0
  835. package/src/video/edit.js +2 -2
  836. package/src/video/editor.scss +0 -4
  837. package/src/video/tracks-editor.js +3 -0
  838. package/src/video/transforms.js +5 -1
@@ -64,8 +64,21 @@ const metadata = exports.metadata = {
64
64
  },
65
65
  interactivity: {
66
66
  clientNavigation: true
67
+ },
68
+ __experimentalBorder: {
69
+ radius: true,
70
+ color: true,
71
+ width: true,
72
+ style: true,
73
+ __experimentalDefaultControls: {
74
+ radius: true,
75
+ color: true,
76
+ width: true,
77
+ style: true
78
+ }
67
79
  }
68
- }
80
+ },
81
+ style: "wp-block-comment-date"
69
82
  };
70
83
  const {
71
84
  name
@@ -1 +1 @@
1
- {"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","_deprecated","metadata","exports","$schema","apiVersion","name","title","category","ancestor","description","textdomain","attributes","format","type","isLink","usesContext","supports","html","color","gradients","link","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","settings","icon","edit","deprecated","init","initBlock"],"sources":["@wordpress/block-library/src/comment-date/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postDate as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AAXA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAK,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,MAAA;MAAAC,IAAA;IAAA;IAAAC,MAAA;MAAAD,IAAA;MAAA;IAAA;EAAA;EAAAE,WAAA;EAAAC,QAAA;IAAAC,IAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,IAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;QAAAH,IAAA;MAAA;IAAA;IAAAI,OAAA;MAAAC,MAAA;MAAAC,OAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAd,6BAAA;QAAAO,QAAA;MAAA;IAAA;IAAAQ,aAAA;MAAAC,gBAAA;IAAA;EAAA;AAAA;AAQA,MAAM;EAAEhC;AAAK,CAAC,GAAGJ,QAAQ;AAACC,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAGnB,MAAMiC,QAAQ,GAAApC,OAAA,CAAAoC,QAAA,GAAG;EACvBC,IAAI,EAAJA,eAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,UAAU,EAAVA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAEtC,IAAI;EAAEJ,QAAQ;EAAEqC;AAAS,CAAE,CAAC;AAACpC,OAAA,CAAAwC,IAAA,GAAAA,IAAA","ignoreList":[]}
1
+ {"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","_deprecated","metadata","exports","$schema","apiVersion","name","title","category","ancestor","description","textdomain","attributes","format","type","isLink","usesContext","supports","html","color","gradients","link","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","__experimentalBorder","radius","width","style","settings","icon","edit","deprecated","init","initBlock"],"sources":["@wordpress/block-library/src/comment-date/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { postDate as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AAXA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAK,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,MAAA;MAAAC,IAAA;IAAA;IAAAC,MAAA;MAAAD,IAAA;MAAA;IAAA;EAAA;EAAAE,WAAA;EAAAC,QAAA;IAAAC,IAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,IAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;QAAAH,IAAA;MAAA;IAAA;IAAAI,OAAA;MAAAC,MAAA;MAAAC,OAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAd,6BAAA;QAAAO,QAAA;MAAA;IAAA;IAAAQ,aAAA;MAAAC,gBAAA;IAAA;IAAAC,oBAAA;MAAAC,MAAA;MAAArB,KAAA;MAAAsB,KAAA;MAAAC,KAAA;MAAApB,6BAAA;QAAAkB,MAAA;QAAArB,KAAA;QAAAsB,KAAA;QAAAC,KAAA;MAAA;IAAA;EAAA;EAAAA,KAAA;AAAA;AAQA,MAAM;EAAEpC;AAAK,CAAC,GAAGJ,QAAQ;AAACC,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAGnB,MAAMqC,QAAQ,GAAAxC,OAAA,CAAAwC,QAAA,GAAG;EACvBC,IAAI,EAAJA,eAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,UAAU,EAAVA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAE1C,IAAI;EAAEJ,QAAQ;EAAEyC;AAAS,CAAE,CAAC;AAACxC,OAAA,CAAA4C,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -48,6 +48,18 @@ const metadata = exports.metadata = {
48
48
  },
49
49
  interactivity: {
50
50
  clientNavigation: true
51
+ },
52
+ __experimentalBorder: {
53
+ radius: true,
54
+ color: true,
55
+ width: true,
56
+ style: true,
57
+ __experimentalDefaultControls: {
58
+ radius: true,
59
+ color: true,
60
+ width: true,
61
+ style: true
62
+ }
51
63
  }
52
64
  },
53
65
  style: "wp-block-comment-template"
@@ -1 +1 @@
1
- {"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","_save","metadata","exports","$schema","apiVersion","name","title","category","parent","description","textdomain","usesContext","supports","align","html","reusable","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","__experimentalDefaultControls","interactivity","clientNavigation","style","settings","icon","edit","save","init","initBlock"],"sources":["@wordpress/block-library/src/comment-template/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { layout as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,KAAA,GAAAF,sBAAA,CAAAF,OAAA;AAXA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAK,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,MAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,WAAA;EAAAC,QAAA;IAAAC,KAAA;IAAAC,IAAA;IAAAC,QAAA;IAAAC,OAAA;MAAAC,MAAA;MAAAC,OAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAC,6BAAA;QAAAR,QAAA;MAAA;IAAA;IAAAS,aAAA;MAAAC,gBAAA;IAAA;EAAA;EAAAC,KAAA;AAAA;AAQA,MAAM;EAAE1B;AAAK,CAAC,GAAGJ,QAAQ;AAACC,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAGnB,MAAM2B,QAAQ,GAAA9B,OAAA,CAAA8B,QAAA,GAAG;EACvBC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAEhC,IAAI;EAAEJ,QAAQ;EAAE+B;AAAS,CAAE,CAAC;AAAC9B,OAAA,CAAAkC,IAAA,GAAAA,IAAA","ignoreList":[]}
1
+ {"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","_save","metadata","exports","$schema","apiVersion","name","title","category","parent","description","textdomain","usesContext","supports","align","html","reusable","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","__experimentalDefaultControls","interactivity","clientNavigation","__experimentalBorder","radius","color","width","style","settings","icon","edit","save","init","initBlock"],"sources":["@wordpress/block-library/src/comment-template/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { layout as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,KAAA,GAAAF,sBAAA,CAAAF,OAAA;AAXA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAK,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,MAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,WAAA;EAAAC,QAAA;IAAAC,KAAA;IAAAC,IAAA;IAAAC,QAAA;IAAAC,OAAA;MAAAC,MAAA;MAAAC,OAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAC,6BAAA;QAAAR,QAAA;MAAA;IAAA;IAAAS,aAAA;MAAAC,gBAAA;IAAA;IAAAC,oBAAA;MAAAC,MAAA;MAAAC,KAAA;MAAAC,KAAA;MAAAC,KAAA;MAAAP,6BAAA;QAAAI,MAAA;QAAAC,KAAA;QAAAC,KAAA;QAAAC,KAAA;MAAA;IAAA;EAAA;EAAAA,KAAA;AAAA;AAQA,MAAM;EAAE9B;AAAK,CAAC,GAAGJ,QAAQ;AAACC,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAGnB,MAAM+B,QAAQ,GAAAlC,OAAA,CAAAkC,QAAA,GAAG;EACvBC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAEpC,IAAI;EAAEJ,QAAQ;EAAEmC;AAAS,CAAE,CAAC;AAAClC,OAAA,CAAAsC,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -16,6 +16,7 @@ function CommentsPaginationArrowControls({
16
16
  onChange
17
17
  }) {
18
18
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalToggleGroupControl, {
19
+ __next40pxDefaultSize: true,
19
20
  __nextHasNoMarginBottom: true,
20
21
  label: (0, _i18n.__)('Arrow'),
21
22
  value: value,
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_jsxRuntime","CommentsPaginationArrowControls","value","onChange","jsxs","__experimentalToggleGroupControl","__nextHasNoMarginBottom","label","__","help","isBlock","children","jsx","__experimentalToggleGroupControlOption","_x"],"sources":["@wordpress/block-library/src/comments-pagination/comments-pagination-arrow-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from '@wordpress/components';\n\nexport function CommentsPaginationArrowControls( { value, onChange } ) {\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Arrow' ) }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\thelp={ __(\n\t\t\t\t'A decorative arrow appended to the next and previous comments link.'\n\t\t\t) }\n\t\t\tisBlock\n\t\t>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"none\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'None',\n\t\t\t\t\t'Arrow option for Comments Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"arrow\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Arrow',\n\t\t\t\t\t'Arrow option for Comments Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"chevron\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Chevron',\n\t\t\t\t\t'Arrow option for Comments Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t</ToggleGroupControl>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAG+B,IAAAE,WAAA,GAAAF,OAAA;AAP/B;AACA;AACA;;AAOO,SAASG,+BAA+BA,CAAE;EAAEC,KAAK;EAAEC;AAAS,CAAC,EAAG;EACtE,oBACC,IAAAH,WAAA,CAAAI,IAAA,EAACL,WAAA,CAAAM,gCAAkB;IAClBC,uBAAuB;IACvBC,KAAK,EAAG,IAAAC,QAAE,EAAE,OAAQ,CAAG;IACvBN,KAAK,EAAGA,KAAO;IACfC,QAAQ,EAAGA,QAAU;IACrBM,IAAI,EAAG,IAAAD,QAAE,EACR,qEACD,CAAG;IACHE,OAAO;IAAAC,QAAA,gBAEP,IAAAX,WAAA,CAAAY,GAAA,EAACb,WAAA,CAAAc,sCAAwB;MACxBX,KAAK,EAAC,MAAM;MACZK,KAAK,EAAG,IAAAO,QAAE,EACT,MAAM,EACN,2DACD;IAAG,CACH,CAAC,eACF,IAAAd,WAAA,CAAAY,GAAA,EAACb,WAAA,CAAAc,sCAAwB;MACxBX,KAAK,EAAC,OAAO;MACbK,KAAK,EAAG,IAAAO,QAAE,EACT,OAAO,EACP,2DACD;IAAG,CACH,CAAC,eACF,IAAAd,WAAA,CAAAY,GAAA,EAACb,WAAA,CAAAc,sCAAwB;MACxBX,KAAK,EAAC,SAAS;MACfK,KAAK,EAAG,IAAAO,QAAE,EACT,SAAS,EACT,2DACD;IAAG,CACH,CAAC;EAAA,CACiB,CAAC;AAEvB","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_components","_jsxRuntime","CommentsPaginationArrowControls","value","onChange","jsxs","__experimentalToggleGroupControl","__next40pxDefaultSize","__nextHasNoMarginBottom","label","__","help","isBlock","children","jsx","__experimentalToggleGroupControlOption","_x"],"sources":["@wordpress/block-library/src/comments-pagination/comments-pagination-arrow-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from '@wordpress/components';\n\nexport function CommentsPaginationArrowControls( { value, onChange } ) {\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Arrow' ) }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\thelp={ __(\n\t\t\t\t'A decorative arrow appended to the next and previous comments link.'\n\t\t\t) }\n\t\t\tisBlock\n\t\t>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"none\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'None',\n\t\t\t\t\t'Arrow option for Comments Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"arrow\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Arrow',\n\t\t\t\t\t'Arrow option for Comments Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOption\n\t\t\t\tvalue=\"chevron\"\n\t\t\t\tlabel={ _x(\n\t\t\t\t\t'Chevron',\n\t\t\t\t\t'Arrow option for Comments Pagination Next/Previous blocks'\n\t\t\t\t) }\n\t\t\t/>\n\t\t</ToggleGroupControl>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAG+B,IAAAE,WAAA,GAAAF,OAAA;AAP/B;AACA;AACA;;AAOO,SAASG,+BAA+BA,CAAE;EAAEC,KAAK;EAAEC;AAAS,CAAC,EAAG;EACtE,oBACC,IAAAH,WAAA,CAAAI,IAAA,EAACL,WAAA,CAAAM,gCAAkB;IAClBC,qBAAqB;IACrBC,uBAAuB;IACvBC,KAAK,EAAG,IAAAC,QAAE,EAAE,OAAQ,CAAG;IACvBP,KAAK,EAAGA,KAAO;IACfC,QAAQ,EAAGA,QAAU;IACrBO,IAAI,EAAG,IAAAD,QAAE,EACR,qEACD,CAAG;IACHE,OAAO;IAAAC,QAAA,gBAEP,IAAAZ,WAAA,CAAAa,GAAA,EAACd,WAAA,CAAAe,sCAAwB;MACxBZ,KAAK,EAAC,MAAM;MACZM,KAAK,EAAG,IAAAO,QAAE,EACT,MAAM,EACN,2DACD;IAAG,CACH,CAAC,eACF,IAAAf,WAAA,CAAAa,GAAA,EAACd,WAAA,CAAAe,sCAAwB;MACxBZ,KAAK,EAAC,OAAO;MACbM,KAAK,EAAG,IAAAO,QAAE,EACT,OAAO,EACP,2DACD;IAAG,CACH,CAAC,eACF,IAAAf,WAAA,CAAAa,GAAA,EAACd,WAAA,CAAAe,sCAAwB;MACxBZ,KAAK,EAAC,SAAS;MACfM,KAAK,EAAG,IAAAO,QAAE,EACT,SAAS,EACT,2DACD;IAAG,CACH,CAAC;EAAA,CACiB,CAAC;AAEvB","ignoreList":[]}
@@ -32,6 +32,9 @@ const metadata = {
32
32
  level: {
33
33
  type: "number",
34
34
  "default": 2
35
+ },
36
+ levelOptions: {
37
+ type: "array"
35
38
  }
36
39
  },
37
40
  supports: {
@@ -1 +1 @@
1
- {"version":3,"names":["metadata","$schema","apiVersion","name","title","category","ancestor","description","textdomain","usesContext","attributes","textAlign","type","showPostTitle","showCommentsCount","level","supports","anchor","align","html","__experimentalBorder","radius","color","width","style","gradients","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","_default","exports","default","singleCommentLabel","multipleCommentsLabel","migrate","oldAttributes","newAttributes","isEligible","save"],"sources":["@wordpress/block-library/src/comments-title/deprecated.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport metadata from './block.json';\n\nconst { attributes, supports } = metadata;\n\nexport default [\n\t{\n\t\tattributes: {\n\t\t\t...attributes,\n\t\t\tsingleCommentLabel: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tmultipleCommentsLabel: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t},\n\t\tsupports,\n\t\tmigrate: ( oldAttributes ) => {\n\t\t\tconst {\n\t\t\t\tsingleCommentLabel,\n\t\t\t\tmultipleCommentsLabel,\n\t\t\t\t...newAttributes\n\t\t\t} = oldAttributes;\n\t\t\treturn newAttributes;\n\t\t},\n\t\tisEligible: ( { multipleCommentsLabel, singleCommentLabel } ) =>\n\t\t\tmultipleCommentsLabel || singleCommentLabel,\n\t\tsave: () => null,\n\t},\n];\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAFA,MAAAA,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA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AA,KAAM;AACb,CAAC,CACD","ignoreList":[]}
1
+ {"version":3,"names":["metadata","$schema","apiVersion","name","title","category","ancestor","description","textdomain","usesContext","attributes","textAlign","type","showPostTitle","showCommentsCount","level","levelOptions","supports","anchor","align","html","__experimentalBorder","radius","color","width","style","gradients","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","_default","exports","default","singleCommentLabel","multipleCommentsLabel","migrate","oldAttributes","newAttributes","isEligible","save"],"sources":["@wordpress/block-library/src/comments-title/deprecated.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport metadata from './block.json';\n\nconst { attributes, supports } = metadata;\n\nexport default [\n\t{\n\t\tattributes: {\n\t\t\t...attributes,\n\t\t\tsingleCommentLabel: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tmultipleCommentsLabel: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t},\n\t\tsupports,\n\t\tmigrate: ( oldAttributes ) => {\n\t\t\tconst {\n\t\t\t\tsingleCommentLabel,\n\t\t\t\tmultipleCommentsLabel,\n\t\t\t\t...newAttributes\n\t\t\t} = oldAttributes;\n\t\t\treturn newAttributes;\n\t\t},\n\t\tisEligible: ( { multipleCommentsLabel, singleCommentLabel } ) =>\n\t\t\tmultipleCommentsLabel || singleCommentLabel,\n\t\tsave: () => null,\n\t},\n];\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAFA,MAAAA,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,WAAA;EAAAC,UAAA;IAAAC,SAAA;MAAAC,IAAA;IAAA;IAAAC,aAAA;MAAAD,IAAA;MAAA;IAAA;IAAAE,iBAAA;MAAAF,IAAA;MAAA;IAAA;IAA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,
31
- level
31
+ level,
32
+ levelOptions
32
33
  },
33
34
  setAttributes,
34
35
  context: {
@@ -92,6 +93,7 @@ function Edit({
92
93
  })
93
94
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.HeadingLevelDropdown, {
94
95
  value: level,
96
+ options: levelOptions,
95
97
  onChange: newLevel => setAttributes({
96
98
  level: newLevel
97
99
  })
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_i18n","_coreData","_components","_element","_data","_apiFetch","_url","_jsxRuntime","Edit","attributes","textAlign","showPostTitle","showCommentsCount","level","setAttributes","context","postType","postId","TagName","commentsCount","setCommentsCount","useState","rawTitle","useEntityProp","isSiteEditor","blockProps","useBlockProps","className","clsx","threadCommentsDepth","threadComments","commentsPerPage","pageComments","useSelect","select","getSettings","blockEditorStore","__experimentalDiscussionSettings","useEffect","nestedCommentsNumber","Math","min","topLevelCommentsNumber","commentsNumber","parseInt","currentPostId","apiFetch","path","addQueryArgs","post","_fields","method","parse","then","res","headers","get","catch","blockControls","jsxs","BlockControls","group","children","jsx","AlignmentControl","value","onChange","newAlign","HeadingLevelDropdown","newLevel","inspectorControls","InspectorControls","PanelBody","title","__","ToggleControl","__nextHasNoMarginBottom","label","checked","postTitle","placeholder","undefined","sprintf","_n","Fragment"],"sources":["@wordpress/block-library/src/comments-title/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tuseBlockProps,\n\tInspectorControls,\n\tstore as blockEditorStore,\n\tHeadingLevelDropdown,\n} from '@wordpress/block-editor';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useEntityProp } from '@wordpress/core-data';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\n\nexport default function Edit( {\n\tattributes: { textAlign, showPostTitle, showCommentsCount, level },\n\tsetAttributes,\n\tcontext: { postType, postId },\n} ) {\n\tconst TagName = 'h' + level;\n\tconst [ commentsCount, setCommentsCount ] = useState();\n\tconst [ rawTitle ] = useEntityProp( 'postType', postType, 'title', postId );\n\tconst isSiteEditor = typeof postId === 'undefined';\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tconst {\n\t\tthreadCommentsDepth,\n\t\tthreadComments,\n\t\tcommentsPerPage,\n\t\tpageComments,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn getSettings().__experimentalDiscussionSettings;\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( isSiteEditor ) {\n\t\t\t// Match the number of comments that will be shown in the comment-template/edit.js placeholder\n\n\t\t\tconst nestedCommentsNumber = threadComments\n\t\t\t\t? Math.min( threadCommentsDepth, 3 ) - 1\n\t\t\t\t: 0;\n\t\t\tconst topLevelCommentsNumber = pageComments ? commentsPerPage : 3;\n\n\t\t\tconst commentsNumber =\n\t\t\t\tparseInt( nestedCommentsNumber ) +\n\t\t\t\tparseInt( topLevelCommentsNumber );\n\n\t\t\tsetCommentsCount( Math.min( commentsNumber, 3 ) );\n\t\t\treturn;\n\t\t}\n\t\tconst currentPostId = postId;\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\tpost: postId,\n\t\t\t\t_fields: 'id',\n\t\t\t} ),\n\t\t\tmethod: 'HEAD',\n\t\t\tparse: false,\n\t\t} )\n\t\t\t.then( ( res ) => {\n\t\t\t\t// Stale requests will have the `currentPostId` of an older closure.\n\t\t\t\tif ( currentPostId === postId ) {\n\t\t\t\t\tsetCommentsCount(\n\t\t\t\t\t\tparseInt( res.headers.get( 'X-WP-Total' ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( () => {\n\t\t\t\tsetCommentsCount( 0 );\n\t\t\t} );\n\t}, [ postId ] );\n\n\tconst blockControls = (\n\t\t<BlockControls group=\"block\">\n\t\t\t<AlignmentControl\n\t\t\t\tvalue={ textAlign }\n\t\t\t\tonChange={ ( newAlign ) =>\n\t\t\t\t\tsetAttributes( { textAlign: newAlign } )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<HeadingLevelDropdown\n\t\t\t\tvalue={ level }\n\t\t\t\tonChange={ ( newLevel ) =>\n\t\t\t\t\tsetAttributes( { level: newLevel } )\n\t\t\t\t}\n\t\t\t/>\n\t\t</BlockControls>\n\t);\n\n\tconst inspectorControls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Show post title' ) }\n\t\t\t\t\tchecked={ showPostTitle }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { showPostTitle: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Show comments count' ) }\n\t\t\t\t\tchecked={ showCommentsCount }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { showCommentsCount: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\tconst postTitle = isSiteEditor ? __( '“Post Title”' ) : `\"${ rawTitle }\"`;\n\n\tlet placeholder;\n\tif ( showCommentsCount && commentsCount !== undefined ) {\n\t\tif ( showPostTitle ) {\n\t\t\tif ( commentsCount === 1 ) {\n\t\t\t\t/* translators: %s: Post title. */\n\t\t\t\tplaceholder = sprintf( __( 'One response to %s' ), postTitle );\n\t\t\t} else {\n\t\t\t\tplaceholder = sprintf(\n\t\t\t\t\t/* translators: 1: Number of comments, 2: Post title. */\n\t\t\t\t\t_n(\n\t\t\t\t\t\t'%1$s response to %2$s',\n\t\t\t\t\t\t'%1$s responses to %2$s',\n\t\t\t\t\t\tcommentsCount\n\t\t\t\t\t),\n\t\t\t\t\tcommentsCount,\n\t\t\t\t\tpostTitle\n\t\t\t\t);\n\t\t\t}\n\t\t} else if ( commentsCount === 1 ) {\n\t\t\tplaceholder = __( 'One response' );\n\t\t} else {\n\t\t\tplaceholder = sprintf(\n\t\t\t\t/* translators: %s: Number of comments. */\n\t\t\t\t_n( '%s response', '%s responses', commentsCount ),\n\t\t\t\tcommentsCount\n\t\t\t);\n\t\t}\n\t} else if ( showPostTitle ) {\n\t\tif ( commentsCount === 1 ) {\n\t\t\t/* translators: %s: Post title. */\n\t\t\tplaceholder = sprintf( __( 'Response to %s' ), postTitle );\n\t\t} else {\n\t\t\t/* translators: %s: Post title. */\n\t\t\tplaceholder = sprintf( __( 'Responses to %s' ), postTitle );\n\t\t}\n\t} else if ( commentsCount === 1 ) {\n\t\tplaceholder = __( 'Response' );\n\t} else {\n\t\tplaceholder = __( 'Responses' );\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<TagName { ...blockProps }>{ placeholder }</TagName>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,IAAA,GAAAR,OAAA;AAA8C,IAAAS,WAAA,GAAAT,OAAA;AAtB9C;AACA;AACA;;AAGA;AACA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CAAC,EAAG;MACjC6D,WAAW,GAAG,IAAAN,QAAE,EAAE,cAAe,CAAC;IACnC,CAAC,MAAM;MACNM,WAAW,GAAG,IAAAE,aAAO,GACpB;MACA,IAAAC,QAAE,EAAE,aAAa,EAAE,cAAc,EAAEhE,aAAc,CAAC,EAClDA,aACD,CAAC;IACF;EACD,CAAC,MAAM,IAAKR,aAAa,EAAG;IAC3B,IAAKQ,aAAa,KAAK,CAAC,EAAG;MAC1B;MACA6D,WAAW,GAAG,IAAAE,aAAO,EAAE,IAAAR,QAAE,EAAE,gBAAiB,CAAC,EAAEK,SAAU,CAAC;IAC3D,CAAC,MAAM;MACN;MACAC,WAAW,GAAG,IAAAE,aAAO,EAAE,IAAAR,QAAE,EAAE,iBAAkB,CAAC,EAAEK,SAAU,CAAC;IAC5D;EACD,CAAC,MAAM,IAAK5D,aAAa,KAAK,CAAC,EAAG;IACjC6D,WAAW,GAAG,IAAAN,QAAE,EAAE,UAAW,CAAC;EAC/B,CAAC,MAAM;IACNM,WAAW,GAAG,IAAAN,QAAE,EAAE,WAAY,CAAC;EAChC;EAEA,oBACC,IAAAnE,WAAA,CAAAoD,IAAA,EAAApD,WAAA,CAAA6E,QAAA;IAAAtB,QAAA,GACGJ,aAAa,EACbY,iBAAiB,eACnB,IAAA/D,WAAA,CAAAwD,GAAA,EAAC7C,OAAO;MAAA,GAAMO,UAAU;MAAAqC,QAAA,EAAKkB;IAAW,CAAW,CAAC;EAAA,CACnD,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_i18n","_coreData","_components","_element","_data","_apiFetch","_url","_jsxRuntime","Edit","attributes","textAlign","showPostTitle","showCommentsCount","level","levelOptions","setAttributes","context","postType","postId","TagName","commentsCount","setCommentsCount","useState","rawTitle","useEntityProp","isSiteEditor","blockProps","useBlockProps","className","clsx","threadCommentsDepth","threadComments","commentsPerPage","pageComments","useSelect","select","getSettings","blockEditorStore","__experimentalDiscussionSettings","useEffect","nestedCommentsNumber","Math","min","topLevelCommentsNumber","commentsNumber","parseInt","currentPostId","apiFetch","path","addQueryArgs","post","_fields","method","parse","then","res","headers","get","catch","blockControls","jsxs","BlockControls","group","children","jsx","AlignmentControl","value","onChange","newAlign","HeadingLevelDropdown","options","newLevel","inspectorControls","InspectorControls","PanelBody","title","__","ToggleControl","__nextHasNoMarginBottom","label","checked","postTitle","placeholder","undefined","sprintf","_n","Fragment"],"sources":["@wordpress/block-library/src/comments-title/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tuseBlockProps,\n\tInspectorControls,\n\tstore as blockEditorStore,\n\tHeadingLevelDropdown,\n} from '@wordpress/block-editor';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useEntityProp } from '@wordpress/core-data';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\n\nexport default function Edit( {\n\tattributes: {\n\t\ttextAlign,\n\t\tshowPostTitle,\n\t\tshowCommentsCount,\n\t\tlevel,\n\t\tlevelOptions,\n\t},\n\tsetAttributes,\n\tcontext: { postType, postId },\n} ) {\n\tconst TagName = 'h' + level;\n\tconst [ commentsCount, setCommentsCount ] = useState();\n\tconst [ rawTitle ] = useEntityProp( 'postType', postType, 'title', postId );\n\tconst isSiteEditor = typeof postId === 'undefined';\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tconst {\n\t\tthreadCommentsDepth,\n\t\tthreadComments,\n\t\tcommentsPerPage,\n\t\tpageComments,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn getSettings().__experimentalDiscussionSettings;\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( isSiteEditor ) {\n\t\t\t// Match the number of comments that will be shown in the comment-template/edit.js placeholder\n\n\t\t\tconst nestedCommentsNumber = threadComments\n\t\t\t\t? Math.min( threadCommentsDepth, 3 ) - 1\n\t\t\t\t: 0;\n\t\t\tconst topLevelCommentsNumber = pageComments ? commentsPerPage : 3;\n\n\t\t\tconst commentsNumber =\n\t\t\t\tparseInt( nestedCommentsNumber ) +\n\t\t\t\tparseInt( topLevelCommentsNumber );\n\n\t\t\tsetCommentsCount( Math.min( commentsNumber, 3 ) );\n\t\t\treturn;\n\t\t}\n\t\tconst currentPostId = postId;\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\tpost: postId,\n\t\t\t\t_fields: 'id',\n\t\t\t} ),\n\t\t\tmethod: 'HEAD',\n\t\t\tparse: false,\n\t\t} )\n\t\t\t.then( ( res ) => {\n\t\t\t\t// Stale requests will have the `currentPostId` of an older closure.\n\t\t\t\tif ( currentPostId === postId ) {\n\t\t\t\t\tsetCommentsCount(\n\t\t\t\t\t\tparseInt( res.headers.get( 'X-WP-Total' ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( () => {\n\t\t\t\tsetCommentsCount( 0 );\n\t\t\t} );\n\t}, [ postId ] );\n\n\tconst blockControls = (\n\t\t<BlockControls group=\"block\">\n\t\t\t<AlignmentControl\n\t\t\t\tvalue={ textAlign }\n\t\t\t\tonChange={ ( newAlign ) =>\n\t\t\t\t\tsetAttributes( { textAlign: newAlign } )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<HeadingLevelDropdown\n\t\t\t\tvalue={ level }\n\t\t\t\toptions={ levelOptions }\n\t\t\t\tonChange={ ( newLevel ) =>\n\t\t\t\t\tsetAttributes( { level: newLevel } )\n\t\t\t\t}\n\t\t\t/>\n\t\t</BlockControls>\n\t);\n\n\tconst inspectorControls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Show post title' ) }\n\t\t\t\t\tchecked={ showPostTitle }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { showPostTitle: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Show comments count' ) }\n\t\t\t\t\tchecked={ showCommentsCount }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { showCommentsCount: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\tconst postTitle = isSiteEditor ? __( '“Post Title”' ) : `\"${ rawTitle }\"`;\n\n\tlet placeholder;\n\tif ( showCommentsCount && commentsCount !== undefined ) {\n\t\tif ( showPostTitle ) {\n\t\t\tif ( commentsCount === 1 ) {\n\t\t\t\t/* translators: %s: Post title. */\n\t\t\t\tplaceholder = sprintf( __( 'One response to %s' ), postTitle );\n\t\t\t} else {\n\t\t\t\tplaceholder = sprintf(\n\t\t\t\t\t/* translators: 1: Number of comments, 2: Post title. */\n\t\t\t\t\t_n(\n\t\t\t\t\t\t'%1$s response to %2$s',\n\t\t\t\t\t\t'%1$s responses to %2$s',\n\t\t\t\t\t\tcommentsCount\n\t\t\t\t\t),\n\t\t\t\t\tcommentsCount,\n\t\t\t\t\tpostTitle\n\t\t\t\t);\n\t\t\t}\n\t\t} else if ( commentsCount === 1 ) {\n\t\t\tplaceholder = __( 'One response' );\n\t\t} else {\n\t\t\tplaceholder = sprintf(\n\t\t\t\t/* translators: %s: Number of comments. */\n\t\t\t\t_n( '%s response', '%s responses', commentsCount ),\n\t\t\t\tcommentsCount\n\t\t\t);\n\t\t}\n\t} else if ( showPostTitle ) {\n\t\tif ( commentsCount === 1 ) {\n\t\t\t/* translators: %s: Post title. */\n\t\t\tplaceholder = sprintf( __( 'Response to %s' ), postTitle );\n\t\t} else {\n\t\t\t/* translators: %s: Post title. */\n\t\t\tplaceholder = sprintf( __( 'Responses to %s' ), postTitle );\n\t\t}\n\t} else if ( commentsCount === 1 ) {\n\t\tplaceholder = __( 'Response' );\n\t} else {\n\t\tplaceholder = __( 'Responses' );\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<TagName { ...blockProps }>{ placeholder }</TagName>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,IAAA,GAAAR,OAAA;AAA8C,IAAAS,WAAA,GAAAT,OAAA;AAtB9C;AACA;AACA;;AAGA;AACA;AACA;;AAiBe,SAASU,IAAIA,CAAE;EAC7BC,UAAU,EAAE;IACXC,SAAS;IACTC,aAAa;IACbC,iBAAiB;IACjBC,KAAK;IACLC;EACD,CAAC;EACDC,aAAa;EACbC,OAAO,EAAE;IAAEC,QAAQ;IAAEC;EAAO;AAC7B,CAAC,EAAG;EACH,MAAMC,OAAO,GAAG,GAAG,GAAGN,KAAK;EAC3B,MAAM,CAAEO,aAAa,EAAEC,gBAAgB,CAAE,GAAG,IAAAC,iBAAQ,EAAC,CAAC;EACtD,MAAM,CAAEC,QAAQ,CAAE,GAAG,IAAAC,uBAAa,EAAE,UAAU,EAAEP,QAAQ,EAAE,OAAO,EAAEC,MAAO,CAAC;EAC3E,MAAMO,YAAY,GAAG,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AAO,EAAE,IAAAR,QAAE,EAAE,iBAAkB,CAAC,EAAEK,SAAU,CAAC;IAC5D;EACD,CAAC,MAAM,IAAK7D,aAAa,KAAK,CAAC,EAAG;IACjC8D,WAAW,GAAG,IAAAN,QAAE,EAAE,UAAW,CAAC;EAC/B,CAAC,MAAM;IACNM,WAAW,GAAG,IAAAN,QAAE,EAAE,WAAY,CAAC;EAChC;EAEA,oBACC,IAAArE,WAAA,CAAAqD,IAAA,EAAArD,WAAA,CAAA+E,QAAA;IAAAvB,QAAA,GACGJ,aAAa,EACba,iBAAiB,eACnB,IAAAjE,WAAA,CAAAyD,GAAA,EAAC7C,OAAO;MAAA,GAAMO,UAAU;MAAAqC,QAAA,EAAKmB;IAAW,CAAW,CAAC;EAAA,CACnD,CAAC;AAEL","ignoreList":[]}
@@ -40,6 +40,9 @@ const metadata = exports.metadata = {
40
40
  level: {
41
41
  type: "number",
42
42
  "default": 2
43
+ },
44
+ levelOptions: {
45
+ type: "array"
43
46
  }
44
47
  },
45
48
  supports: {
@@ -1 +1 @@
1
- {"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","_deprecated","metadata","exports","$schema","apiVersion","name","title","category","ancestor","description","textdomain","usesContext","attributes","textAlign","type","showPostTitle","showCommentsCount","level","supports","anchor","align","html","__experimentalBorder","radius","color","width","style","gradients","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","settings","icon","edit","deprecated","init","initBlock"],"sources":["@wordpress/block-library/src/comments-title/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { title as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n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C,OAAA,CAAA2C,QAAA,GAAG;EACvBC,IAAI,EAAJA,YAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,UAAU,EAAVA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAE7C,IAAI;EAAEJ,QAAQ;EAAE4C;AAAS,CAAE,CAAC;AAAC3C,OAAA,CAAA+C,IAAA,GAAAA,IAAA","ignoreList":[]}
1
+ {"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","_deprecated","metadata","exports","$schema","apiVersion","name","title","category","ancestor","description","textdomain","usesContext","attributes","textAlign","type","showPostTitle","showCommentsCount","level","levelOptions","supports","anchor","align","html","__experimentalBorder","radius","color","width","style","gradients","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","settings","icon","edit","deprecated","init","initBlock"],"sources":["@wordpress/block-library/src/comments-title/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { title as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AAXA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAK,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;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}), showFocalPointPicker && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FocalPointPicker, {
147
147
  __nextHasNoMarginBottom: true,
148
- __next40pxDefaultSize: true,
149
148
  label: (0, _i18n.__)('Focal point'),
150
149
  url: url,
151
150
  value: focalPoint,
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_components","_compose","_blockEditor","_i18n","_shared","_lockUnlock","_jsxRuntime","cleanEmptyObject","unlock","blockEditorPrivateApis","CoverHeightInput","onChange","onUnitChange","unit","value","instanceId","useInstanceId","UnitControl","inputId","isPx","availableUnits","useSettings","units","useCustomUnits","defaultValues","px","em","rem","vw","vh","handleOnChange","unprocessedValue","inputValue","parseFloat","undefined","isNaN","computedValue","useMemo","parsedQuantity","parseQuantityAndUnitFromRawValue","join","min","COVER_MIN_HEIGHT","jsx","__experimentalUnitControl","label","__","id","isResetValueOnUnitChange","__unstableInputWidth","CoverInspectorControls","attributes","setAttributes","clientId","setOverlayColor","coverRef","currentSettings","updateDimRatio","onClearMedia","useFeaturedImage","dimRatio","focalPoint","hasParallax","isRepeated","minHeight","minHeightUnit","alt","tagName","isVideoBackground","isImageBackground","mediaElement","url","overlayColor","gradientValue","setGradient","__experimentalUseGradient","toggleParallax","toggleIsRepeated","showFocalPointPicker","imperativeFocalPointPreview","styleOfRef","property","current","style","mediaPosition","colorGradientSettings","useMultipleOriginColorsAndGradients","htmlElementMessages","header","main","section","article","aside","footer","jsxs","Fragment","children","InspectorControls","PanelBody","title","ToggleControl","__nextHasNoMarginBottom","checked","FocalPointPicker","__next40pxDefaultSize","onDragStart","onDrag","newFocalPoint","TextareaControl","newAlt","help","ExternalLink","href","PanelRow","Button","variant","size","className","onClick","hasColorsOrGradients","group","__experimentalColorGradientSettingsDropdown","__experimentalIsRenderedInSidebar","settings","colorValue","color","onColorChange","onGradientChange","isShownByDefault","resetAllFilter","customOverlayColor","gradient","customGradient","clearable","panelId","__experimentalToolsPanelItem","hasValue","onDeselect","RangeControl","newDimRatio","max","step","required","dimensions","aspectRatio","newMinHeight","nextUnit","SelectControl","options"],"sources":["@wordpress/block-library/src/cover/edit/inspector-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport {\n\tButton,\n\tExternalLink,\n\tFocalPointPicker,\n\tPanelBody,\n\tPanelRow,\n\tRangeControl,\n\tTextareaControl,\n\tToggleControl,\n\tSelectControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tInspectorControls,\n\tuseSettings,\n\t__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,\n\t__experimentalUseGradient,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { COVER_MIN_HEIGHT, mediaPosition } from '../shared';\nimport { unlock } from '../../lock-unlock';\n\nconst { cleanEmptyObject } = unlock( blockEditorPrivateApis );\n\nfunction CoverHeightInput( {\n\tonChange,\n\tonUnitChange,\n\tunit = 'px',\n\tvalue = '',\n} ) {\n\tconst instanceId = useInstanceId( UnitControl );\n\tconst inputId = `block-cover-height-input-${ instanceId }`;\n\tconst isPx = unit === 'px';\n\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ 'px', 'em', 'rem', 'vw', 'vh' ],\n\t\tdefaultValues: { px: 430, '%': 20, em: 20, rem: 20, vw: 20, vh: 50 },\n\t} );\n\n\tconst handleOnChange = ( unprocessedValue ) => {\n\t\tconst inputValue =\n\t\t\tunprocessedValue !== ''\n\t\t\t\t? parseFloat( unprocessedValue )\n\t\t\t\t: undefined;\n\n\t\tif ( isNaN( inputValue ) && inputValue !== undefined ) {\n\t\t\treturn;\n\t\t}\n\t\tonChange( inputValue );\n\t};\n\n\tconst computedValue = useMemo( () => {\n\t\tconst [ parsedQuantity ] = parseQuantityAndUnitFromRawValue( value );\n\t\treturn [ parsedQuantity, unit ].join( '' );\n\t}, [ unit, value ] );\n\n\tconst min = isPx ? COVER_MIN_HEIGHT : 0;\n\n\treturn (\n\t\t<UnitControl\n\t\t\tlabel={ __( 'Minimum height of cover' ) }\n\t\t\tid={ inputId }\n\t\t\tisResetValueOnUnitChange\n\t\t\tmin={ min }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonUnitChange={ onUnitChange }\n\t\t\t__unstableInputWidth=\"80px\"\n\t\t\tunits={ units }\n\t\t\tvalue={ computedValue }\n\t\t/>\n\t);\n}\nexport default function CoverInspectorControls( {\n\tattributes,\n\tsetAttributes,\n\tclientId,\n\tsetOverlayColor,\n\tcoverRef,\n\tcurrentSettings,\n\tupdateDimRatio,\n\tonClearMedia,\n} ) {\n\tconst {\n\t\tuseFeaturedImage,\n\t\tdimRatio,\n\t\tfocalPoint,\n\t\thasParallax,\n\t\tisRepeated,\n\t\tminHeight,\n\t\tminHeightUnit,\n\t\talt,\n\t\ttagName,\n\t} = attributes;\n\tconst {\n\t\tisVideoBackground,\n\t\tisImageBackground,\n\t\tmediaElement,\n\t\turl,\n\t\toverlayColor,\n\t} = currentSettings;\n\n\tconst { gradientValue, setGradient } = __experimentalUseGradient();\n\n\tconst toggleParallax = () => {\n\t\tsetAttributes( {\n\t\t\thasParallax: ! hasParallax,\n\t\t\t...( ! hasParallax ? { focalPoint: undefined } : {} ),\n\t\t} );\n\t};\n\n\tconst toggleIsRepeated = () => {\n\t\tsetAttributes( {\n\t\t\tisRepeated: ! isRepeated,\n\t\t} );\n\t};\n\n\tconst showFocalPointPicker =\n\t\tisVideoBackground ||\n\t\t( isImageBackground && ( ! hasParallax || isRepeated ) );\n\n\tconst imperativeFocalPointPreview = ( value ) => {\n\t\tconst [ styleOfRef, property ] = mediaElement.current\n\t\t\t? [ mediaElement.current.style, 'objectPosition' ]\n\t\t\t: [ coverRef.current.style, 'backgroundPosition' ];\n\t\tstyleOfRef[ property ] = mediaPosition( value );\n\t};\n\n\tconst colorGradientSettings = useMultipleOriginColorsAndGradients();\n\n\tconst htmlElementMessages = {\n\t\theader: __(\n\t\t\t'The <header> element should represent introductory content, typically a group of introductory or navigational aids.'\n\t\t),\n\t\tmain: __(\n\t\t\t'The <main> element should be used for the primary content of your document only.'\n\t\t),\n\t\tsection: __(\n\t\t\t\"The <section> element should represent a standalone portion of the document that can't be better represented by another element.\"\n\t\t),\n\t\tarticle: __(\n\t\t\t'The <article> element should represent a self-contained, syndicatable portion of the document.'\n\t\t),\n\t\taside: __(\n\t\t\t\"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.\"\n\t\t),\n\t\tfooter: __(\n\t\t\t'The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).'\n\t\t),\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t{ !! url && (\n\t\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t\t{ isImageBackground && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Fixed background' ) }\n\t\t\t\t\t\t\t\t\tchecked={ hasParallax }\n\t\t\t\t\t\t\t\t\tonChange={ toggleParallax }\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Repeated background' ) }\n\t\t\t\t\t\t\t\t\tchecked={ isRepeated }\n\t\t\t\t\t\t\t\t\tonChange={ toggleIsRepeated }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showFocalPointPicker && (\n\t\t\t\t\t\t\t<FocalPointPicker\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tlabel={ __( 'Focal point' ) }\n\t\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\t\tvalue={ focalPoint }\n\t\t\t\t\t\t\t\tonDragStart={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\tonDrag={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\tonChange={ ( newFocalPoint ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tfocalPoint: newFocalPoint,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! useFeaturedImage && url && ! isVideoBackground && (\n\t\t\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\t\tvalue={ alt }\n\t\t\t\t\t\t\t\tonChange={ ( newAlt ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( { alt: newAlt } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t\t// translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.\n\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'https://www.w3.org/WAI/tutorials/images/decision-tree/'\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Describe the purpose of the image.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t{ __( 'Leave empty if decorative.' ) }\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tclassName=\"block-library-cover__reset-button\"\n\t\t\t\t\t\t\t\tonClick={ onClearMedia }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Clear Media' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</PanelRow>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t</InspectorControls>\n\t\t\t{ colorGradientSettings.hasColorsOrGradients && (\n\t\t\t\t<InspectorControls group=\"color\">\n\t\t\t\t\t<ColorGradientSettingsDropdown\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\tsettings={ [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcolorValue: overlayColor.color,\n\t\t\t\t\t\t\t\tgradientValue,\n\t\t\t\t\t\t\t\tlabel: __( 'Overlay' ),\n\t\t\t\t\t\t\t\tonColorChange: setOverlayColor,\n\t\t\t\t\t\t\t\tonGradientChange: setGradient,\n\t\t\t\t\t\t\t\tisShownByDefault: true,\n\t\t\t\t\t\t\t\tresetAllFilter: () => ( {\n\t\t\t\t\t\t\t\t\toverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tcustomOverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tgradient: undefined,\n\t\t\t\t\t\t\t\t\tcustomGradient: undefined,\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t\t\tclearable: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t\t{ ...colorGradientSettings }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => {\n\t\t\t\t\t\t\t// If there's a media background the dimRatio will be\n\t\t\t\t\t\t\t// defaulted to 50 whereas it will be 100 for colors.\n\t\t\t\t\t\t\treturn dimRatio === undefined\n\t\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t\t: dimRatio !== ( url ? 50 : 100 );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\tonDeselect={ () => updateDimRatio( url ? 50 : 100 ) }\n\t\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\t\tdimRatio: url ? 50 : 100,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\t\tvalue={ dimRatio }\n\t\t\t\t\t\t\tonChange={ ( newDimRatio ) =>\n\t\t\t\t\t\t\t\tupdateDimRatio( newDimRatio )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\t\tstep={ 10 }\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<InspectorControls group=\"dimensions\">\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ () => !! minHeight }\n\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t} ) }\n\t\t\t\t\tisShownByDefault\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<CoverHeightInput\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tattributes?.style?.dimensions?.aspectRatio\n\t\t\t\t\t\t\t\t? ''\n\t\t\t\t\t\t\t\t: minHeight\n\t\t\t\t\t\t}\n\t\t\t\t\t\tunit={ minHeightUnit }\n\t\t\t\t\t\tonChange={ ( newMinHeight ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tminHeight: newMinHeight,\n\t\t\t\t\t\t\t\tstyle: cleanEmptyObject( {\n\t\t\t\t\t\t\t\t\t...attributes?.style,\n\t\t\t\t\t\t\t\t\tdimensions: {\n\t\t\t\t\t\t\t\t\t\t...attributes?.style?.dimensions,\n\t\t\t\t\t\t\t\t\t\taspectRatio: undefined, // Reset aspect ratio when minHeight is set.\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonUnitChange={ ( nextUnit ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tminHeightUnit: nextUnit,\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</ToolsPanelItem>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'HTML element' ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<div>)' ), value: 'div' },\n\t\t\t\t\t\t{ label: '<header>', value: 'header' },\n\t\t\t\t\t\t{ label: '<main>', value: 'main' },\n\t\t\t\t\t\t{ label: '<section>', value: 'section' },\n\t\t\t\t\t\t{ label: '<article>', value: 'article' },\n\t\t\t\t\t\t{ label: '<aside>', value: 'aside' },\n\t\t\t\t\t\t{ label: '<footer>', value: 'footer' },\n\t\t\t\t\t] }\n\t\t\t\t\tvalue={ tagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ htmlElementMessages[ tagName ] }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAeA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAQA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAA2C,IAAAO,WAAA,GAAAP,OAAA;AAlC3C;AACA;AACA;;AA4BA;AACA;AACA;;AAIA,MAAM;EAAEQ;AAAiB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE7D,SAASC,gBAAgBA,CAAE;EAC1BC,QAAQ;EACRC,YAAY;EACZC,IAAI,GAAG,IAAI;EACXC,KAAK,GAAG;AACT,CAAC,EAAG;EACH,MAAMC,UAAU,GAAG,IAAAC,sBAAa,EAAEC,qCAAY,CAAC;EAC/C,MAAMC,OAAO,GAAI,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U,CAAC,EACxC;UAAE+B,KAAK,EAAE,SAAS;UAAE/B,KAAK,EAAE;QAAQ,CAAC,EACpC;UAAE+B,KAAK,EAAE,UAAU;UAAE/B,KAAK,EAAE;QAAS,CAAC,CACpC;QACHA,KAAK,EAAGqD,OAAS;QACjBxD,QAAQ,EAAKG,KAAK,IACjBsC,aAAa,CAAE;UAAEe,OAAO,EAAErD;QAAM,CAAE,CAClC;QACDgG,IAAI,EAAGvB,mBAAmB,CAAEpB,OAAO;MAAI,CACvC;IAAC,CACgB,CAAC;EAAA,CACnB,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_components","_compose","_blockEditor","_i18n","_shared","_lockUnlock","_jsxRuntime","cleanEmptyObject","unlock","blockEditorPrivateApis","CoverHeightInput","onChange","onUnitChange","unit","value","instanceId","useInstanceId","UnitControl","inputId","isPx","availableUnits","useSettings","units","useCustomUnits","defaultValues","px","em","rem","vw","vh","handleOnChange","unprocessedValue","inputValue","parseFloat","undefined","isNaN","computedValue","useMemo","parsedQuantity","parseQuantityAndUnitFromRawValue","join","min","COVER_MIN_HEIGHT","jsx","__experimentalUnitControl","label","__","id","isResetValueOnUnitChange","__unstableInputWidth","CoverInspectorControls","attributes","setAttributes","clientId","setOverlayColor","coverRef","currentSettings","updateDimRatio","onClearMedia","useFeaturedImage","dimRatio","focalPoint","hasParallax","isRepeated","minHeight","minHeightUnit","alt","tagName","isVideoBackground","isImageBackground","mediaElement","url","overlayColor","gradientValue","setGradient","__experimentalUseGradient","toggleParallax","toggleIsRepeated","showFocalPointPicker","imperativeFocalPointPreview","styleOfRef","property","current","style","mediaPosition","colorGradientSettings","useMultipleOriginColorsAndGradients","htmlElementMessages","header","main","section","article","aside","footer","jsxs","Fragment","children","InspectorControls","PanelBody","title","ToggleControl","__nextHasNoMarginBottom","checked","FocalPointPicker","onDragStart","onDrag","newFocalPoint","TextareaControl","newAlt","help","ExternalLink","href","PanelRow","Button","variant","size","className","onClick","hasColorsOrGradients","group","__experimentalColorGradientSettingsDropdown","__experimentalIsRenderedInSidebar","settings","colorValue","color","onColorChange","onGradientChange","isShownByDefault","resetAllFilter","customOverlayColor","gradient","customGradient","clearable","panelId","__experimentalToolsPanelItem","hasValue","onDeselect","RangeControl","newDimRatio","max","step","required","__next40pxDefaultSize","dimensions","aspectRatio","newMinHeight","nextUnit","SelectControl","options"],"sources":["@wordpress/block-library/src/cover/edit/inspector-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport {\n\tButton,\n\tExternalLink,\n\tFocalPointPicker,\n\tPanelBody,\n\tPanelRow,\n\tRangeControl,\n\tTextareaControl,\n\tToggleControl,\n\tSelectControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tInspectorControls,\n\tuseSettings,\n\t__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,\n\t__experimentalUseGradient,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { COVER_MIN_HEIGHT, mediaPosition } from '../shared';\nimport { unlock } from '../../lock-unlock';\n\nconst { cleanEmptyObject } = unlock( blockEditorPrivateApis );\n\nfunction CoverHeightInput( {\n\tonChange,\n\tonUnitChange,\n\tunit = 'px',\n\tvalue = '',\n} ) {\n\tconst instanceId = useInstanceId( UnitControl );\n\tconst inputId = `block-cover-height-input-${ instanceId }`;\n\tconst isPx = unit === 'px';\n\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ 'px', 'em', 'rem', 'vw', 'vh' ],\n\t\tdefaultValues: { px: 430, '%': 20, em: 20, rem: 20, vw: 20, vh: 50 },\n\t} );\n\n\tconst handleOnChange = ( unprocessedValue ) => {\n\t\tconst inputValue =\n\t\t\tunprocessedValue !== ''\n\t\t\t\t? parseFloat( unprocessedValue )\n\t\t\t\t: undefined;\n\n\t\tif ( isNaN( inputValue ) && inputValue !== undefined ) {\n\t\t\treturn;\n\t\t}\n\t\tonChange( inputValue );\n\t};\n\n\tconst computedValue = useMemo( () => {\n\t\tconst [ parsedQuantity ] = parseQuantityAndUnitFromRawValue( value );\n\t\treturn [ parsedQuantity, unit ].join( '' );\n\t}, [ unit, value ] );\n\n\tconst min = isPx ? COVER_MIN_HEIGHT : 0;\n\n\treturn (\n\t\t<UnitControl\n\t\t\tlabel={ __( 'Minimum height of cover' ) }\n\t\t\tid={ inputId }\n\t\t\tisResetValueOnUnitChange\n\t\t\tmin={ min }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonUnitChange={ onUnitChange }\n\t\t\t__unstableInputWidth=\"80px\"\n\t\t\tunits={ units }\n\t\t\tvalue={ computedValue }\n\t\t/>\n\t);\n}\nexport default function CoverInspectorControls( {\n\tattributes,\n\tsetAttributes,\n\tclientId,\n\tsetOverlayColor,\n\tcoverRef,\n\tcurrentSettings,\n\tupdateDimRatio,\n\tonClearMedia,\n} ) {\n\tconst {\n\t\tuseFeaturedImage,\n\t\tdimRatio,\n\t\tfocalPoint,\n\t\thasParallax,\n\t\tisRepeated,\n\t\tminHeight,\n\t\tminHeightUnit,\n\t\talt,\n\t\ttagName,\n\t} = attributes;\n\tconst {\n\t\tisVideoBackground,\n\t\tisImageBackground,\n\t\tmediaElement,\n\t\turl,\n\t\toverlayColor,\n\t} = currentSettings;\n\n\tconst { gradientValue, setGradient } = __experimentalUseGradient();\n\n\tconst toggleParallax = () => {\n\t\tsetAttributes( {\n\t\t\thasParallax: ! hasParallax,\n\t\t\t...( ! hasParallax ? { focalPoint: undefined } : {} ),\n\t\t} );\n\t};\n\n\tconst toggleIsRepeated = () => {\n\t\tsetAttributes( {\n\t\t\tisRepeated: ! isRepeated,\n\t\t} );\n\t};\n\n\tconst showFocalPointPicker =\n\t\tisVideoBackground ||\n\t\t( isImageBackground && ( ! hasParallax || isRepeated ) );\n\n\tconst imperativeFocalPointPreview = ( value ) => {\n\t\tconst [ styleOfRef, property ] = mediaElement.current\n\t\t\t? [ mediaElement.current.style, 'objectPosition' ]\n\t\t\t: [ coverRef.current.style, 'backgroundPosition' ];\n\t\tstyleOfRef[ property ] = mediaPosition( value );\n\t};\n\n\tconst colorGradientSettings = useMultipleOriginColorsAndGradients();\n\n\tconst htmlElementMessages = {\n\t\theader: __(\n\t\t\t'The <header> element should represent introductory content, typically a group of introductory or navigational aids.'\n\t\t),\n\t\tmain: __(\n\t\t\t'The <main> element should be used for the primary content of your document only.'\n\t\t),\n\t\tsection: __(\n\t\t\t\"The <section> element should represent a standalone portion of the document that can't be better represented by another element.\"\n\t\t),\n\t\tarticle: __(\n\t\t\t'The <article> element should represent a self-contained, syndicatable portion of the document.'\n\t\t),\n\t\taside: __(\n\t\t\t\"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.\"\n\t\t),\n\t\tfooter: __(\n\t\t\t'The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).'\n\t\t),\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t{ !! url && (\n\t\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t\t{ isImageBackground && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Fixed background' ) }\n\t\t\t\t\t\t\t\t\tchecked={ hasParallax }\n\t\t\t\t\t\t\t\t\tonChange={ toggleParallax }\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Repeated background' ) }\n\t\t\t\t\t\t\t\t\tchecked={ isRepeated }\n\t\t\t\t\t\t\t\t\tonChange={ toggleIsRepeated }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showFocalPointPicker && (\n\t\t\t\t\t\t\t<FocalPointPicker\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Focal point' ) }\n\t\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\t\tvalue={ focalPoint }\n\t\t\t\t\t\t\t\tonDragStart={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\tonDrag={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\tonChange={ ( newFocalPoint ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tfocalPoint: newFocalPoint,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! useFeaturedImage && url && ! isVideoBackground && (\n\t\t\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\t\tvalue={ alt }\n\t\t\t\t\t\t\t\tonChange={ ( newAlt ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( { alt: newAlt } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\thref={\n\t\t\t\t\t\t\t\t\t\t\t\t// translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.\n\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'https://www.w3.org/WAI/tutorials/images/decision-tree/'\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Describe the purpose of the image.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t{ __( 'Leave empty if decorative.' ) }\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tclassName=\"block-library-cover__reset-button\"\n\t\t\t\t\t\t\t\tonClick={ onClearMedia }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Clear Media' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</PanelRow>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t</InspectorControls>\n\t\t\t{ colorGradientSettings.hasColorsOrGradients && (\n\t\t\t\t<InspectorControls group=\"color\">\n\t\t\t\t\t<ColorGradientSettingsDropdown\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\tsettings={ [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcolorValue: overlayColor.color,\n\t\t\t\t\t\t\t\tgradientValue,\n\t\t\t\t\t\t\t\tlabel: __( 'Overlay' ),\n\t\t\t\t\t\t\t\tonColorChange: setOverlayColor,\n\t\t\t\t\t\t\t\tonGradientChange: setGradient,\n\t\t\t\t\t\t\t\tisShownByDefault: true,\n\t\t\t\t\t\t\t\tresetAllFilter: () => ( {\n\t\t\t\t\t\t\t\t\toverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tcustomOverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tgradient: undefined,\n\t\t\t\t\t\t\t\t\tcustomGradient: undefined,\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t\t\tclearable: true,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t\t{ ...colorGradientSettings }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => {\n\t\t\t\t\t\t\t// If there's a media background the dimRatio will be\n\t\t\t\t\t\t\t// defaulted to 50 whereas it will be 100 for colors.\n\t\t\t\t\t\t\treturn dimRatio === undefined\n\t\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t\t: dimRatio !== ( url ? 50 : 100 );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\tonDeselect={ () => updateDimRatio( url ? 50 : 100 ) }\n\t\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\t\tdimRatio: url ? 50 : 100,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\t\tvalue={ dimRatio }\n\t\t\t\t\t\t\tonChange={ ( newDimRatio ) =>\n\t\t\t\t\t\t\t\tupdateDimRatio( newDimRatio )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\t\tstep={ 10 }\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<InspectorControls group=\"dimensions\">\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ () => !! minHeight }\n\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t} ) }\n\t\t\t\t\tisShownByDefault\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<CoverHeightInput\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tattributes?.style?.dimensions?.aspectRatio\n\t\t\t\t\t\t\t\t? ''\n\t\t\t\t\t\t\t\t: minHeight\n\t\t\t\t\t\t}\n\t\t\t\t\t\tunit={ minHeightUnit }\n\t\t\t\t\t\tonChange={ ( newMinHeight ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tminHeight: newMinHeight,\n\t\t\t\t\t\t\t\tstyle: cleanEmptyObject( {\n\t\t\t\t\t\t\t\t\t...attributes?.style,\n\t\t\t\t\t\t\t\t\tdimensions: {\n\t\t\t\t\t\t\t\t\t\t...attributes?.style?.dimensions,\n\t\t\t\t\t\t\t\t\t\taspectRatio: undefined, // Reset aspect ratio when minHeight is set.\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonUnitChange={ ( nextUnit ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tminHeightUnit: nextUnit,\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</ToolsPanelItem>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'HTML element' ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<div>)' ), value: 'div' },\n\t\t\t\t\t\t{ label: '<header>', value: 'header' },\n\t\t\t\t\t\t{ label: '<main>', value: 'main' },\n\t\t\t\t\t\t{ label: '<section>', value: 'section' },\n\t\t\t\t\t\t{ label: '<article>', value: 'article' },\n\t\t\t\t\t\t{ label: '<aside>', value: 'aside' },\n\t\t\t\t\t\t{ label: '<footer>', value: 'footer' },\n\t\t\t\t\t] }\n\t\t\t\t\tvalue={ tagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ htmlElementMessages[ tagName ] }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAeA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAQA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAA2C,IAAAO,WAAA,GAAAP,OAAA;AAlC3C;AACA;AACA;;AA4BA;AACA;AACA;;AAIA,MAAM;EAAEQ;AAAiB,CAAC,GAAG,IAAAC,kBAAM,EAAEC,wBAAuB,CAAC;AAE7D,SAASC,gBAAgBA,CAAE;EAC1BC,QAAQ;EACRC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EAAE;QAAO,CAAC,EAClC;UAAE+B,KAAK,EAAE,WAAW;UAAE/B,KAAK,EAAE;QAAU,CAAC,EACxC;UAAE+B,KAAK,EAAE,WAAW;UAAE/B,KAAK,EAAE;QAAU,CAAC,EACxC;UAAE+B,KAAK,EAAE,SAAS;UAAE/B,KAAK,EAAE;QAAQ,CAAC,EACpC;UAAE+B,KAAK,EAAE,UAAU;UAAE/B,KAAK,EAAE;QAAS,CAAC,CACpC;QACHA,KAAK,EAAGqD,OAAS;QACjBxD,QAAQ,EAAKG,KAAK,IACjBsC,aAAa,CAAE;UAAEe,OAAO,EAAErD;QAAM,CAAE,CAClC;QACD+F,IAAI,EAAGtB,mBAAmB,CAAEpB,OAAO;MAAI,CACvC;IAAC,CACgB,CAAC;EAAA,CACnB,CAAC;AAEL","ignoreList":[]}
@@ -45,6 +45,7 @@ function DetailsEdit({
45
45
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.PanelBody, {
46
46
  title: (0, _i18n.__)('Settings'),
47
47
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToggleControl, {
48
+ __nextHasNoMarginBottom: true,
48
49
  label: (0, _i18n.__)('Open by default'),
49
50
  checked: showContent,
50
51
  onChange: () => setAttributes({
@@ -1 +1 @@
1
- {"version":3,"names":["_blockEditor","require","_data","_components","_i18n","_jsxRuntime","TEMPLATE","placeholder","__","DetailsEdit","attributes","setAttributes","clientId","showContent","summary","blockProps","useBlockProps","innerBlocksProps","useInnerBlocksProps","template","__experimentalCaptureToolbars","hasSelection","useSelect","select","isBlockSelected","hasSelectedInnerBlock","blockEditorStore","jsxs","Fragment","children","jsx","InspectorControls","PanelBody","title","ToggleControl","label","checked","onChange","open","onClick","event","preventDefault","RichText","identifier","allowedFormats","withoutInteractiveFormatting","value","newSummary","_default","exports","default"],"sources":["@wordpress/block-library/src/details/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tRichText,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n\tInspectorControls,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst TEMPLATE = [\n\t[\n\t\t'core/paragraph',\n\t\t{\n\t\t\tplaceholder: __( 'Type / to add a hidden block' ),\n\t\t},\n\t],\n];\n\nfunction DetailsEdit( { attributes, setAttributes, clientId } ) {\n\tconst { showContent, summary } = attributes;\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t\t__experimentalCaptureToolbars: true,\n\t} );\n\n\t// Check if either the block or the inner blocks are selected.\n\tconst hasSelection = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isBlockSelected, hasSelectedInnerBlock } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\t/* Sets deep to true to also find blocks inside the details content block. */\n\t\t\treturn (\n\t\t\t\thasSelectedInnerBlock( clientId, true ) ||\n\t\t\t\tisBlockSelected( clientId )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Open by default' ) }\n\t\t\t\t\t\tchecked={ showContent }\n\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tshowContent: ! showContent,\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</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<details\n\t\t\t\t{ ...innerBlocksProps }\n\t\t\t\topen={ hasSelection || showContent }\n\t\t\t>\n\t\t\t\t<summary onClick={ ( event ) => event.preventDefault() }>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"summary\"\n\t\t\t\t\t\taria-label={ __( 'Write summary' ) }\n\t\t\t\t\t\tplaceholder={ __( 'Write summary…' ) }\n\t\t\t\t\t\tallowedFormats={ [] }\n\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\tvalue={ summary }\n\t\t\t\t\t\tonChange={ ( newSummary ) =>\n\t\t\t\t\t\t\tsetAttributes( { summary: newSummary } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</summary>\n\t\t\t\t{ innerBlocksProps.children }\n\t\t\t</details>\n\t\t</>\n\t);\n}\n\nexport default DetailsEdit;\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAOA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAAqC,IAAAI,WAAA,GAAAJ,OAAA;AAZrC;AACA;AACA;;AAYA,MAAMK,QAAQ,GAAG,CAChB,CACC,gBAAgB,EAChB;EACCC,WAAW,EAAE,IAAAC,QAAE,EAAE,8BAA+B;AACjD,CAAC,CACD,CACD;AAED,SAASC,WAAWA,CAAE;EAAEC,UAAU;EAAEC,aAAa;EAAEC;AAAS,CAAC,EAAG;EAC/D,MAAM;IAAEC,WAAW;IAAEC;EAAQ,CAAC,GAAGJ,UAAU;EAC3C,MAAMK,UAAU,GAAG,IAAAC,0BAAa,EAAC,CAAC;EAClC,MAAMC,gBAAgB,GAAG,IAAAC,gCAAmB,EAAEH,UAAU,EAAE;IACzDI,QAAQ,EAAEb,QAAQ;IAClBc,6BAA6B,EAAE;EAChC,CAAE,CAAC;;EAEH;EACA,MAAMC,YAAY,GAAG,IAAAC,eAAS,EAC3BC,MAAM,IAAM;IACb,MAAM;MAAEC,eAAe;MAAEC;IAAsB,CAAC,GAC/CF,MAAM,CAAEG,kBAAiB,CAAC;IAC3B;IACA,OACCD,qBAAqB,CAAEb,QAAQ,EAAE,IAAK,CAAC,IACvCY,eAAe,CAAEZ,QAAS,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AAA,CACnB,CAAC;EAAA,CACT,CAAC;AAEL;AAAC,IAAAmB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEczC,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["_blockEditor","require","_data","_components","_i18n","_jsxRuntime","TEMPLATE","placeholder","__","DetailsEdit","attributes","setAttributes","clientId","showContent","summary","blockProps","useBlockProps","innerBlocksProps","useInnerBlocksProps","template","__experimentalCaptureToolbars","hasSelection","useSelect","select","isBlockSelected","hasSelectedInnerBlock","blockEditorStore","jsxs","Fragment","children","jsx","InspectorControls","PanelBody","title","ToggleControl","__nextHasNoMarginBottom","label","checked","onChange","open","onClick","event","preventDefault","RichText","identifier","allowedFormats","withoutInteractiveFormatting","value","newSummary","_default","exports","default"],"sources":["@wordpress/block-library/src/details/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tRichText,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n\tInspectorControls,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst TEMPLATE = [\n\t[\n\t\t'core/paragraph',\n\t\t{\n\t\t\tplaceholder: __( 'Type / to add a hidden block' ),\n\t\t},\n\t],\n];\n\nfunction DetailsEdit( { attributes, setAttributes, clientId } ) {\n\tconst { showContent, summary } = attributes;\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t\t__experimentalCaptureToolbars: true,\n\t} );\n\n\t// Check if either the block or the inner blocks are selected.\n\tconst hasSelection = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isBlockSelected, hasSelectedInnerBlock } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\t/* Sets deep to true to also find blocks inside the details content block. */\n\t\t\treturn (\n\t\t\t\thasSelectedInnerBlock( clientId, true ) ||\n\t\t\t\tisBlockSelected( clientId )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Open by default' ) }\n\t\t\t\t\t\tchecked={ showContent }\n\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tshowContent: ! showContent,\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</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<details\n\t\t\t\t{ ...innerBlocksProps }\n\t\t\t\topen={ hasSelection || showContent }\n\t\t\t>\n\t\t\t\t<summary onClick={ ( event ) => event.preventDefault() }>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"summary\"\n\t\t\t\t\t\taria-label={ __( 'Write summary' ) }\n\t\t\t\t\t\tplaceholder={ __( 'Write summary…' ) }\n\t\t\t\t\t\tallowedFormats={ [] }\n\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\tvalue={ summary }\n\t\t\t\t\t\tonChange={ ( newSummary ) =>\n\t\t\t\t\t\t\tsetAttributes( { summary: newSummary } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</summary>\n\t\t\t\t{ innerBlocksProps.children }\n\t\t\t</details>\n\t\t</>\n\t);\n}\n\nexport default DetailsEdit;\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAOA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAAqC,IAAAI,WAAA,GAAAJ,OAAA;AAZrC;AACA;AACA;;AAYA,MAAMK,QAAQ,GAAG,CAChB,CACC,gBAAgB,EAChB;EACCC,WAAW,E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pB,IAAAR,WAAA,CAAAsB,IAAA;MAAA,GACMV,gBAAgB;MACrBsB,IAAI,EAAGlB,YAAY,IAAIR,WAAa;MAAAgB,QAAA,gBAEpC,IAAAxB,WAAA,CAAAyB,GAAA;QAASU,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;QAAAb,QAAA,eACvD,IAAAxB,WAAA,CAAAyB,GAAA,EAAC9B,YAAA,CAAA2C,QAAQ;UACRC,UAAU,EAAC,SAAS;UACpB,cAAa,IAAApC,QAAE,EAAE,eAAgB,CAAG;UACpCD,WAAW,EAAG,IAAAC,QAAE,EAAE,gBAAiB,CAAG;UACtCqC,cAAc,EAAG,EAAI;UACrBC,4BAA4B;UAC5BC,KAAK,EAAGjC,OAAS;UACjBwB,QAAQ,EAAKU,UAAU,IACtBrC,aAAa,CAAE;YAAEG,OAAO,EAAEkC;UAAW,CAAE;QACvC,CACD;MAAC,CACM,CAAC,EACR/B,gBAAgB,CAACY,QAAQ;IAAA,CACnB,CAAC;EAAA,CACT,CAAC;AAEL;AAAC,IAAAoB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc1C,WAAW","ignoreList":[]}
@@ -11,6 +11,7 @@ var _icons = require("./icons");
11
11
  var _embedLoading = _interopRequireDefault(require("./embed-loading"));
12
12
  var _embedPlaceholder = _interopRequireDefault(require("./embed-placeholder"));
13
13
  var _embedPreview = _interopRequireDefault(require("./embed-preview"));
14
+ var _caption = require("../utils/caption");
14
15
  var _clsx = _interopRequireDefault(require("clsx"));
15
16
  var _i18n = require("@wordpress/i18n");
16
17
  var _element = require("@wordpress/element");
@@ -201,7 +202,7 @@ const EmbedEdit = props => {
201
202
  },
202
203
  value: url,
203
204
  cannotEmbed: cannotEmbed,
204
- onChange: event => setURL(event.target.value),
205
+ onChange: value => setURL(value),
205
206
  fallback: () => (0, _util.fallback)(url, onReplace),
206
207
  tryAgain: () => {
207
208
  invalidateResolution('getEmbedPreview', [url]);
@@ -233,9 +234,9 @@ const EmbedEdit = props => {
233
234
  allowResponsive: allowResponsive,
234
235
  toggleResponsive: toggleResponsive,
235
236
  switchBackToURLInput: () => setIsEditingURL(true)
236
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.View, {
237
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitives.View, {
237
238
  ...blockProps,
238
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_embedPreview.default, {
239
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_embedPreview.default, {
239
240
  preview: preview,
240
241
  previewable: previewable,
241
242
  className: className,
@@ -249,7 +250,14 @@ const EmbedEdit = props => {
249
250
  icon: icon,
250
251
  label: label,
251
252
  insertBlocksAfter: insertBlocksAfter
252
- })
253
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_caption.Caption, {
254
+ attributes: attributes,
255
+ setAttributes: setAttributes,
256
+ isSelected: isSelected,
257
+ insertBlocksAfter: insertBlocksAfter,
258
+ label: (0, _i18n.__)('Embed caption text'),
259
+ showToolbarButton: isSelected
260
+ })]
253
261
  })]
254
262
  });
255
263
  };
@@ -1 +1 @@
1
- {"version":3,"names":["_util","require","_embedControls","_interopRequireDefault","_icons","_embedLoading","_embedPlaceholder","_embedPreview","_clsx","_i18n","_element","_data","_blockEditor","_coreData","_primitives","_url","_jsxRuntime","EmbedEdit","props","attributes","providerNameSlug","previewable","responsive","url","attributesUrl","isSelected","onReplace","setAttributes","insertBlocksAfter","onFocus","defaultEmbedInfo","title","_x","icon","embedContentIcon","getEmbedInfoByProvider","setURL","useState","isEditingURL","setIsEditingURL","invalidateResolution","useDispatch","coreStore","preview","fetching","themeSupportsResponsive","cannotEmbed","hasResolved","useSelect","select","getEmbedPreview","isPreviewEmbedFallback","isRequestingEmbedPreview","getThemeSupports","hasFinishedResolution","embedPreview","previewIsFallback","badEmbedProvider","html","type","undefined","wordpressCantEmbed","data","status","validPreview","getMergedAttributes","getMergedAttributesWithPreview","toggleResponsive","allowResponsive","className","newAllowResponsive","getClassNames","useEffect","newURL","replace","getAuthority","URL","host","toString","mergedAttributes","upgradedBlock","createUpgradedEmbedBlock","blockProps","useBlockProps","jsx","View","children","default","label","sprintf","__","showEmbedPlaceholder","onSubmit","event","preventDefault","blockClass","removeAspectRatioClasses","value","onChange","target","fallback","tryAgain","caption","classFromPreview","clsx","jsxs","Fragment","showEditButton","blockSupportsResponsive","switchBackToURLInput","onCaptionChange","_default","exports"],"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":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAQA,IAAAC,cAA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AoB,EAAGA,CAAA,KAAMtE,eAAe,CAAE,IAAK;IAAG,CACtD,CAAC,eACF,IAAAvB,WAAA,CAAAoE,GAAA,EAACtE,WAAA,CAAAuE,IAAI;MAAA,GAAMH,UAAU;MAAAI,QAAA,eACpB,IAAAtE,WAAA,CAAAoE,GAAA,EAAC7E,aAAA,CAAAgF,OAAY;QACZ5C,OAAO,EAAGA,OAAS;QACnBtB,WAAW,EAAGA,WAAa;QAC3BgD,SAAS,EAAGA,SAAW;QACvB9C,GAAG,EAAGA,GAAK;QACXoC,IAAI,EAAGA,IAAM;QACb2C,OAAO,EAAGA,OAAS;QACnBQ,eAAe,EAAKb,KAAK,IACxBtE,aAAa,CAAE;UAAE2E,OAAO,EAAEL;QAAM,CAAE,CAClC;QACDxE,UAAU,EAAGA,UAAY;QACzBQ,IAAI,EAAGA,IAAM;QACbuD,KAAK,EAAGA,KAAO;QACf5D,iBAAiB,EAAGA;MAAmB,CACvC;IAAC,CACG,CAAC;EAAA,CACN,CAAC;AAEL,CAAC;AAAC,IAAAmF,QAAA,GAAAC,OAAA,CAAAzB,OAAA,GAEatE,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["_util","require","_embedControls","_interopRequireDefault","_icons","_embedLoading","_embedPlaceholder","_embedPreview","_caption","_clsx","_i18n","_element","_data","_blockEditor","_coreData","_primitives","_url","_jsxRuntime","EmbedEdit","props","attributes","providerNameSlug","previewable","responsive","url","attributesUrl","isSelected","onReplace","setAttributes","insertBlocksAfter","onFocus","defaultEmbedInfo","title","_x","icon","embedContentIcon","getEmbedInfoByProvider","setURL","useState","isEditingURL","setIsEditingURL","invalidateResolution","useDispatch","coreStore","preview","fetching","themeSupportsResponsive","cannotEmbed","hasResolved","useSelect","select","getEmbedPreview","isPreviewEmbedFallback","isRequestingEmbedPreview","getThemeSupports","hasFinishedResolution","embedPreview","previewIsFallback","badEmbedProvider","html","type","undefined","wordpressCantEmbed","data","status","validPreview","getMergedAttributes","getMergedAttributesWithPreview","toggleResponsive","allowResponsive","className","newAllowResponsive","getClassNames","useEffect","newURL","replace","getAuthority","URL","host","toString","mergedAttributes","upgradedBlock","createUpgradedEmbedBlock","blockProps","useBlockProps","jsx","View","children","default","label","sprintf","__","showEmbedPlaceholder","onSubmit","event","preventDefault","blockClass","removeAspectRatioClasses","value","onChange","fallback","tryAgain","caption","classFromPreview","clsx","jsxs","Fragment","showEditButton","blockSupportsResponsive","switchBackToURLInput","onCaptionChange","Caption","showToolbarButton","_default","exports"],"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';\nimport { Caption } from '../utils/caption';\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={ ( value ) => setURL( 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\t<Caption\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\tinsertBlocksAfter={ insertBlocksAfter }\n\t\t\t\t\tlabel={ __( 'Embed caption text' ) }\n\t\t\t\t\tshowToolbarButton={ isSelected }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t</>\n\t);\n};\n\nexport default EmbedEdit;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAQA,IAAAC,cAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,iBAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,aAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAKA,IAAAQ,KAAA,GAAAN,sBAAA,CAAAF,OAAA;AAKA,IAAAS,KAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AACA,IAAAW,KAAA,GAAAX,OAAA;AACA,IAAAY,YAAA,GAAAZ,OAAA;AACA,IAAAa,SAAA,GAAAb,OAAA;AACA,IAAAc,WAAA,GAAAd,OAAA;AACA,IAAAe,IAAA,GAAAf,OAAA;AAA8C,IAAAgB,WAAA,GAAAhB,OAAA;AAhC9C;AACA;AACA;;AAgBA;AACA;AACA;;AAGA;AACA;AACA;;AASA,MAAMiB,SAAS,GAAKC,KAAK,IAAM;EAC9B,MAAM;IACLC,UAAU,EAAE;MACXC,gBAAgB;MAChBC,WAAW;MACXC,UAAU;MACVC,GAAG,EAAEC;IACN,CAAC;IACDL,UAAU;IACVM,UAAU;IACVC,SAAS;IACTC,aAAa;IACbC,iBAAiB;IACjBC;EACD,CAAC,GAAGX,KAAK;EAET,MAAMY,gBAAgB,GAAG;IACxBC,KAAK,EAAE,IAAAC,QAAE,EAAE,OAAO,EAAE,aAAc,CAAC;IACnCC,IAAI,EAAEC;EACP,CAAC;EACD,MAAM;IAAED,IAAI;I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A1B,OAAA,GAEatE,SAAS","ignoreList":[]}
@@ -32,14 +32,17 @@ const EmbedPlaceholder = ({
32
32
  instructions: (0, _i18n.__)('Paste a link to the content you want to display on your site.'),
33
33
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("form", {
34
34
  onSubmit: onSubmit,
35
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
35
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalInputControl, {
36
+ __next40pxDefaultSize: true,
36
37
  type: "url",
37
38
  value: value || '',
38
- className: "components-placeholder__input",
39
- "aria-label": label,
39
+ className: "wp-block-embed__placeholder-input",
40
+ label: label,
41
+ hideLabelFromVision: true,
40
42
  placeholder: (0, _i18n.__)('Enter URL to embed here…'),
41
43
  onChange: onChange
42
44
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
45
+ __next40pxDefaultSize: true,
43
46
  variant: "primary",
44
47
  type: "submit",
45
48
  children: (0, _i18n._x)('Embed', 'button label')
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_components","_blockEditor","_jsxRuntime","EmbedPlaceholder","icon","label","value","onSubmit","onChange","cannotEmbed","fallback","tryAgain","jsxs","Placeholder","jsx","BlockIcon","showColors","className","instructions","__","children","type","placeholder","Button","variant","_x","ExternalLink","href","__experimentalVStack","spacing","__experimentalHStack","expanded","justify","onClick","_default","exports","default"],"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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ockEditor","_jsxRuntime","EmbedPlaceholder","icon","label","value","onSubmit","onChange","cannotEmbed","fallback","tryAgain","jsxs","Placeholder","jsx","BlockIcon","showColors","className","instructions","__","children","__experimentalInputControl","__next40pxDefaultSize","type","hideLabelFromVision","placeholder","Button","variant","_x","ExternalLink","href","__experimentalVStack","spacing","__experimentalHStack","expanded","justify","onClick","_default","exports","default"],"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\t__experimentalInputControl as InputControl,\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<InputControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\ttype=\"url\"\n\t\t\t\t\tvalue={ value || '' }\n\t\t\t\t\tclassName=\"wp-block-embed__placeholder-input\"\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\thideLabelFromVision\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 __next40pxDefaultSize 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":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAQA,IAAAE,YAAA,GAAAF,OAAA;AAAoD,IAAAG,WAAA,GAAAH,OAAA;AAZpD;AACA;AACA;;AAYA,MAAMI,gBAAgB,GAAGA,CAAE;EAC1BC,IAAI;EACJC,KAAK;EACLC,KAAK;EACLC,QAAQ;EACRC,QAAQ;EACRC,WAAW;EACXC,QAAQ;EACRC;AACD,CAAC,KAAM;EACN,oBACC,IAAAT,WAAA,CAAAU,IAAA,EAACZ,WAAA,CAAAa,WAAW;IACXT,IAAI,eAAG,IAAAF,WAAA,CAAAY,GAAA,EAACb,YAAA,CAAAc,S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