@wordpress/block-library 9.4.0 → 9.5.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 (585) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/avatar/edit.js +1 -0
  3. package/build/avatar/edit.js.map +1 -1
  4. package/build/categories/index.js +12 -0
  5. package/build/categories/index.js.map +1 -1
  6. package/build/column/edit.js +2 -2
  7. package/build/column/edit.js.map +1 -1
  8. package/build/column/index.js +2 -0
  9. package/build/column/index.js.map +1 -1
  10. package/build/comment-template/index.js +12 -0
  11. package/build/comment-template/index.js.map +1 -1
  12. package/build/comments-title/deprecated.js +3 -0
  13. package/build/comments-title/deprecated.js.map +1 -1
  14. package/build/comments-title/edit.js +3 -1
  15. package/build/comments-title/edit.js.map +1 -1
  16. package/build/comments-title/index.js +3 -0
  17. package/build/comments-title/index.js.map +1 -1
  18. package/build/details/edit.js +1 -0
  19. package/build/details/edit.js.map +1 -1
  20. package/build/form/edit.js +4 -4
  21. package/build/form/edit.js.map +1 -1
  22. package/build/form-input/edit.js +1 -0
  23. package/build/form-input/edit.js.map +1 -1
  24. package/build/gallery/edit.js +42 -8
  25. package/build/gallery/edit.js.map +1 -1
  26. package/build/gallery/gap-styles.js +1 -9
  27. package/build/gallery/gap-styles.js.map +1 -1
  28. package/build/gallery/use-image-sizes.js +2 -2
  29. package/build/gallery/use-image-sizes.js.map +1 -1
  30. package/build/group/index.js +27 -30
  31. package/build/group/index.js.map +1 -1
  32. package/build/group/variations.js +51 -3
  33. package/build/group/variations.js.map +1 -1
  34. package/build/heading/edit.js +2 -0
  35. package/build/heading/edit.js.map +1 -1
  36. package/build/heading/index.js +3 -0
  37. package/build/heading/index.js.map +1 -1
  38. package/build/image/view.js +1 -1
  39. package/build/image/view.js.map +1 -1
  40. package/build/latest-posts/edit.js +1 -0
  41. package/build/latest-posts/edit.js.map +1 -1
  42. package/build/list/index.js +1 -1
  43. package/build/list/ordered-list-settings.js +19 -17
  44. package/build/list/ordered-list-settings.js.map +1 -1
  45. package/build/list-item/index.js +3 -2
  46. package/build/list-item/index.js.map +1 -1
  47. package/build/loginout/index.js +14 -1
  48. package/build/loginout/index.js.map +1 -1
  49. package/build/navigation/edit/index.js +5 -4
  50. package/build/navigation/edit/index.js.map +1 -1
  51. package/build/post-comments-form/index.js +12 -0
  52. package/build/post-comments-form/index.js.map +1 -1
  53. package/build/post-content/index.js +1 -0
  54. package/build/post-content/index.js.map +1 -1
  55. package/build/post-date/index.js +12 -0
  56. package/build/post-date/index.js.map +1 -1
  57. package/build/post-excerpt/index.js +12 -0
  58. package/build/post-excerpt/index.js.map +1 -1
  59. package/build/post-navigation-link/edit.js +2 -0
  60. package/build/post-navigation-link/edit.js.map +1 -1
  61. package/build/post-terms/index.js +12 -0
  62. package/build/post-terms/index.js.map +1 -1
  63. package/build/post-time-to-read/index.js +6 -0
  64. package/build/post-time-to-read/index.js.map +1 -1
  65. package/build/post-title/edit.js +4 -2
  66. package/build/post-title/edit.js.map +1 -1
  67. package/build/post-title/index.js +15 -0
  68. package/build/post-title/index.js.map +1 -1
  69. package/build/query/edit/inspector-controls/enhanced-pagination-control.js +1 -0
  70. package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  71. package/build/query/edit/inspector-controls/index.js +69 -9
  72. package/build/query/edit/inspector-controls/index.js.map +1 -1
  73. package/build/query/edit/inspector-controls/offset-controls.js +37 -0
  74. package/build/query/edit/inspector-controls/offset-controls.js.map +1 -0
  75. package/build/query/edit/inspector-controls/pages-control.js +36 -0
  76. package/build/query/edit/inspector-controls/pages-control.js.map +1 -0
  77. package/build/query/edit/inspector-controls/per-page-control.js +40 -0
  78. package/build/query/edit/inspector-controls/per-page-control.js.map +1 -0
  79. package/build/query/edit/inspector-controls/sticky-control.js +1 -1
  80. package/build/query/edit/inspector-controls/sticky-control.js.map +1 -1
  81. package/build/query/edit/query-toolbar.js +3 -76
  82. package/build/query/edit/query-toolbar.js.map +1 -1
  83. package/build/query/utils.js +10 -5
  84. package/build/query/utils.js.map +1 -1
  85. package/build/query-title/edit.js +2 -0
  86. package/build/query-title/edit.js.map +1 -1
  87. package/build/query-title/index.js +3 -0
  88. package/build/query-title/index.js.map +1 -1
  89. package/build/site-logo/edit.js +15 -8
  90. package/build/site-logo/edit.js.map +1 -1
  91. package/build/site-tagline/edit.js +3 -3
  92. package/build/site-tagline/edit.js.map +1 -1
  93. package/build/site-tagline/index.js +12 -1
  94. package/build/site-tagline/index.js.map +1 -1
  95. package/build/site-title/edit.js +2 -2
  96. package/build/site-title/edit.js.map +1 -1
  97. package/build/site-title/index.js +10 -0
  98. package/build/site-title/index.js.map +1 -1
  99. package/build/social-link/edit.js +0 -1
  100. package/build/social-link/edit.js.map +1 -1
  101. package/build/spacer/controls.js +8 -13
  102. package/build/spacer/controls.js.map +1 -1
  103. package/build/table-of-contents/index.js +14 -1
  104. package/build/table-of-contents/index.js.map +1 -1
  105. package/build/tag-cloud/edit.js +38 -32
  106. package/build/tag-cloud/edit.js.map +1 -1
  107. package/build/tag-cloud/index.js +1 -1
  108. package/build/template-part/edit/index.js +7 -6
  109. package/build/template-part/edit/index.js.map +1 -1
  110. package/build/template-part/edit/inner-blocks.js +6 -4
  111. package/build/template-part/edit/inner-blocks.js.map +1 -1
  112. package/build-module/avatar/edit.js +1 -0
  113. package/build-module/avatar/edit.js.map +1 -1
  114. package/build-module/categories/index.js +12 -0
  115. package/build-module/categories/index.js.map +1 -1
  116. package/build-module/column/edit.js +2 -2
  117. package/build-module/column/edit.js.map +1 -1
  118. package/build-module/column/index.js +2 -0
  119. package/build-module/column/index.js.map +1 -1
  120. package/build-module/comment-template/index.js +12 -0
  121. package/build-module/comment-template/index.js.map +1 -1
  122. package/build-module/comments-title/deprecated.js +3 -0
  123. package/build-module/comments-title/deprecated.js.map +1 -1
  124. package/build-module/comments-title/edit.js +3 -1
  125. package/build-module/comments-title/edit.js.map +1 -1
  126. package/build-module/comments-title/index.js +3 -0
  127. package/build-module/comments-title/index.js.map +1 -1
  128. package/build-module/details/edit.js +1 -0
  129. package/build-module/details/edit.js.map +1 -1
  130. package/build-module/form/edit.js +4 -4
  131. package/build-module/form/edit.js.map +1 -1
  132. package/build-module/form-input/edit.js +1 -0
  133. package/build-module/form-input/edit.js.map +1 -1
  134. package/build-module/gallery/edit.js +43 -9
  135. package/build-module/gallery/edit.js.map +1 -1
  136. package/build-module/gallery/gap-styles.js +1 -9
  137. package/build-module/gallery/gap-styles.js.map +1 -1
  138. package/build-module/gallery/use-image-sizes.js +2 -2
  139. package/build-module/gallery/use-image-sizes.js.map +1 -1
  140. package/build-module/group/index.js +27 -30
  141. package/build-module/group/index.js.map +1 -1
  142. package/build-module/group/variations.js +51 -3
  143. package/build-module/group/variations.js.map +1 -1
  144. package/build-module/heading/edit.js +2 -0
  145. package/build-module/heading/edit.js.map +1 -1
  146. package/build-module/heading/index.js +3 -0
  147. package/build-module/heading/index.js.map +1 -1
  148. package/build-module/image/view.js +1 -1
  149. package/build-module/image/view.js.map +1 -1
  150. package/build-module/latest-posts/edit.js +1 -0
  151. package/build-module/latest-posts/edit.js.map +1 -1
  152. package/build-module/list/index.js +1 -1
  153. package/build-module/list/ordered-list-settings.js +19 -17
  154. package/build-module/list/ordered-list-settings.js.map +1 -1
  155. package/build-module/list-item/index.js +3 -2
  156. package/build-module/list-item/index.js.map +1 -1
  157. package/build-module/loginout/index.js +14 -1
  158. package/build-module/loginout/index.js.map +1 -1
  159. package/build-module/navigation/edit/index.js +5 -4
  160. package/build-module/navigation/edit/index.js.map +1 -1
  161. package/build-module/post-comments-form/index.js +12 -0
  162. package/build-module/post-comments-form/index.js.map +1 -1
  163. package/build-module/post-content/index.js +1 -0
  164. package/build-module/post-content/index.js.map +1 -1
  165. package/build-module/post-date/index.js +12 -0
  166. package/build-module/post-date/index.js.map +1 -1
  167. package/build-module/post-excerpt/index.js +12 -0
  168. package/build-module/post-excerpt/index.js.map +1 -1
  169. package/build-module/post-navigation-link/edit.js +2 -0
  170. package/build-module/post-navigation-link/edit.js.map +1 -1
  171. package/build-module/post-terms/index.js +12 -0
  172. package/build-module/post-terms/index.js.map +1 -1
  173. package/build-module/post-time-to-read/index.js +6 -0
  174. package/build-module/post-time-to-read/index.js.map +1 -1
  175. package/build-module/post-title/edit.js +4 -2
  176. package/build-module/post-title/edit.js.map +1 -1
  177. package/build-module/post-title/index.js +15 -0
  178. package/build-module/post-title/index.js.map +1 -1
  179. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +1 -0
  180. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  181. package/build-module/query/edit/inspector-controls/index.js +71 -11
  182. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  183. package/build-module/query/edit/inspector-controls/offset-controls.js +29 -0
  184. package/build-module/query/edit/inspector-controls/offset-controls.js.map +1 -0
  185. package/build-module/query/edit/inspector-controls/pages-control.js +28 -0
  186. package/build-module/query/edit/inspector-controls/pages-control.js.map +1 -0
  187. package/build-module/query/edit/inspector-controls/per-page-control.js +33 -0
  188. package/build-module/query/edit/inspector-controls/per-page-control.js.map +1 -0
  189. package/build-module/query/edit/inspector-controls/sticky-control.js +1 -1
  190. package/build-module/query/edit/inspector-controls/sticky-control.js.map +1 -1
  191. package/build-module/query/edit/query-toolbar.js +4 -78
  192. package/build-module/query/edit/query-toolbar.js.map +1 -1
  193. package/build-module/query/utils.js +10 -5
  194. package/build-module/query/utils.js.map +1 -1
  195. package/build-module/query-title/edit.js +2 -0
  196. package/build-module/query-title/edit.js.map +1 -1
  197. package/build-module/query-title/index.js +3 -0
  198. package/build-module/query-title/index.js.map +1 -1
  199. package/build-module/site-logo/edit.js +15 -8
  200. package/build-module/site-logo/edit.js.map +1 -1
  201. package/build-module/site-tagline/edit.js +3 -3
  202. package/build-module/site-tagline/edit.js.map +1 -1
  203. package/build-module/site-tagline/index.js +12 -1
  204. package/build-module/site-tagline/index.js.map +1 -1
  205. package/build-module/site-title/edit.js +2 -2
  206. package/build-module/site-title/edit.js.map +1 -1
  207. package/build-module/site-title/index.js +10 -0
  208. package/build-module/site-title/index.js.map +1 -1
  209. package/build-module/social-link/edit.js +0 -1
  210. package/build-module/social-link/edit.js.map +1 -1
  211. package/build-module/spacer/controls.js +9 -14
  212. package/build-module/spacer/controls.js.map +1 -1
  213. package/build-module/table-of-contents/index.js +14 -1
  214. package/build-module/table-of-contents/index.js.map +1 -1
  215. package/build-module/tag-cloud/edit.js +39 -33
  216. package/build-module/tag-cloud/edit.js.map +1 -1
  217. package/build-module/tag-cloud/index.js +1 -1
  218. package/build-module/template-part/edit/index.js +7 -6
  219. package/build-module/template-part/edit/index.js.map +1 -1
  220. package/build-module/template-part/edit/inner-blocks.js +6 -4
  221. package/build-module/template-part/edit/inner-blocks.js.map +1 -1
  222. package/build-style/archives/editor-rtl.css +3 -0
  223. package/build-style/archives/editor.css +3 -0
  224. package/build-style/archives/style-rtl.css +3 -0
  225. package/build-style/archives/style.css +3 -0
  226. package/build-style/audio/editor-rtl.css +3 -0
  227. package/build-style/audio/editor.css +3 -0
  228. package/build-style/audio/style-rtl.css +3 -0
  229. package/build-style/audio/style.css +3 -0
  230. package/build-style/audio/theme-rtl.css +3 -0
  231. package/build-style/audio/theme.css +3 -0
  232. package/build-style/avatar/editor-rtl.css +3 -0
  233. package/build-style/avatar/editor.css +3 -0
  234. package/build-style/avatar/style-rtl.css +3 -0
  235. package/build-style/avatar/style.css +3 -0
  236. package/build-style/button/editor-rtl.css +3 -0
  237. package/build-style/button/editor.css +3 -0
  238. package/build-style/button/style-rtl.css +3 -0
  239. package/build-style/button/style.css +3 -0
  240. package/build-style/buttons/editor-rtl.css +3 -0
  241. package/build-style/buttons/editor.css +3 -0
  242. package/build-style/buttons/style-rtl.css +3 -0
  243. package/build-style/buttons/style.css +3 -0
  244. package/build-style/calendar/style-rtl.css +3 -0
  245. package/build-style/calendar/style.css +3 -0
  246. package/build-style/categories/editor-rtl.css +3 -0
  247. package/build-style/categories/editor.css +3 -0
  248. package/build-style/categories/style-rtl.css +3 -0
  249. package/build-style/categories/style.css +3 -0
  250. package/build-style/classic-rtl.css +3 -0
  251. package/build-style/classic.css +3 -0
  252. package/build-style/code/editor-rtl.css +3 -0
  253. package/build-style/code/editor.css +3 -0
  254. package/build-style/code/style-rtl.css +3 -0
  255. package/build-style/code/style.css +3 -0
  256. package/build-style/code/theme-rtl.css +3 -0
  257. package/build-style/code/theme.css +3 -0
  258. package/build-style/columns/editor-rtl.css +3 -0
  259. package/build-style/columns/editor.css +3 -0
  260. package/build-style/columns/style-rtl.css +3 -0
  261. package/build-style/columns/style.css +3 -0
  262. package/build-style/comment-author-avatar/editor-rtl.css +3 -0
  263. package/build-style/comment-author-avatar/editor.css +3 -0
  264. package/build-style/comment-content/style-rtl.css +3 -0
  265. package/build-style/comment-content/style.css +3 -0
  266. package/build-style/comment-template/style-rtl.css +3 -0
  267. package/build-style/comment-template/style.css +3 -0
  268. package/build-style/comments/editor-rtl.css +3 -0
  269. package/build-style/comments/editor.css +3 -0
  270. package/build-style/comments/style-rtl.css +3 -0
  271. package/build-style/comments/style.css +3 -0
  272. package/build-style/comments-pagination/editor-rtl.css +3 -0
  273. package/build-style/comments-pagination/editor.css +3 -0
  274. package/build-style/comments-pagination/style-rtl.css +3 -0
  275. package/build-style/comments-pagination/style.css +3 -0
  276. package/build-style/comments-pagination-numbers/editor-rtl.css +3 -0
  277. package/build-style/comments-pagination-numbers/editor.css +3 -0
  278. package/build-style/comments-title/editor-rtl.css +3 -0
  279. package/build-style/comments-title/editor.css +3 -0
  280. package/build-style/common-rtl.css +3 -0
  281. package/build-style/common.css +3 -0
  282. package/build-style/cover/editor-rtl.css +3 -0
  283. package/build-style/cover/editor.css +3 -0
  284. package/build-style/cover/style-rtl.css +3 -0
  285. package/build-style/cover/style.css +3 -0
  286. package/build-style/details/editor-rtl.css +3 -0
  287. package/build-style/details/editor.css +3 -0
  288. package/build-style/details/style-rtl.css +3 -0
  289. package/build-style/details/style.css +3 -0
  290. package/build-style/editor-elements-rtl.css +3 -0
  291. package/build-style/editor-elements.css +3 -0
  292. package/build-style/editor-rtl.css +16 -30
  293. package/build-style/editor.css +16 -30
  294. package/build-style/elements-rtl.css +3 -0
  295. package/build-style/elements.css +3 -0
  296. package/build-style/embed/editor-rtl.css +3 -0
  297. package/build-style/embed/editor.css +3 -0
  298. package/build-style/embed/style-rtl.css +3 -0
  299. package/build-style/embed/style.css +3 -0
  300. package/build-style/embed/theme-rtl.css +3 -0
  301. package/build-style/embed/theme.css +3 -0
  302. package/build-style/file/editor-rtl.css +3 -0
  303. package/build-style/file/editor.css +3 -0
  304. package/build-style/file/style-rtl.css +3 -0
  305. package/build-style/file/style.css +3 -0
  306. package/build-style/footnotes/style-rtl.css +3 -0
  307. package/build-style/footnotes/style.css +3 -0
  308. package/build-style/form-input/editor-rtl.css +3 -0
  309. package/build-style/form-input/editor.css +3 -0
  310. package/build-style/form-input/style-rtl.css +4 -0
  311. package/build-style/form-input/style.css +4 -0
  312. package/build-style/form-submission-notification/editor-rtl.css +3 -0
  313. package/build-style/form-submission-notification/editor.css +3 -0
  314. package/build-style/form-submit-button/style-rtl.css +3 -0
  315. package/build-style/form-submit-button/style.css +3 -0
  316. package/build-style/freeform/editor-rtl.css +3 -0
  317. package/build-style/freeform/editor.css +3 -0
  318. package/build-style/gallery/editor-rtl.css +3 -1
  319. package/build-style/gallery/editor.css +3 -1
  320. package/build-style/gallery/style-rtl.css +3 -0
  321. package/build-style/gallery/style.css +3 -0
  322. package/build-style/gallery/theme-rtl.css +3 -0
  323. package/build-style/gallery/theme.css +3 -0
  324. package/build-style/group/editor-rtl.css +3 -11
  325. package/build-style/group/editor.css +3 -11
  326. package/build-style/group/style-rtl.css +3 -0
  327. package/build-style/group/style.css +3 -0
  328. package/build-style/group/theme-rtl.css +3 -0
  329. package/build-style/group/theme.css +3 -0
  330. package/build-style/heading/style-rtl.css +3 -0
  331. package/build-style/heading/style.css +3 -0
  332. package/build-style/html/editor-rtl.css +3 -0
  333. package/build-style/html/editor.css +3 -0
  334. package/build-style/image/editor-rtl.css +11 -0
  335. package/build-style/image/editor.css +11 -0
  336. package/build-style/image/style-rtl.css +3 -0
  337. package/build-style/image/style.css +3 -0
  338. package/build-style/image/theme-rtl.css +3 -0
  339. package/build-style/image/theme.css +3 -0
  340. package/build-style/latest-comments/style-rtl.css +3 -0
  341. package/build-style/latest-comments/style.css +3 -0
  342. package/build-style/latest-posts/editor-rtl.css +3 -3
  343. package/build-style/latest-posts/editor.css +3 -3
  344. package/build-style/latest-posts/style-rtl.css +3 -0
  345. package/build-style/latest-posts/style.css +3 -0
  346. package/build-style/list/style-rtl.css +3 -0
  347. package/build-style/list/style.css +3 -0
  348. package/build-style/loginout/style-rtl.css +94 -0
  349. package/build-style/loginout/style.css +94 -0
  350. package/build-style/media-text/editor-rtl.css +3 -0
  351. package/build-style/media-text/editor.css +3 -0
  352. package/build-style/media-text/style-rtl.css +3 -0
  353. package/build-style/media-text/style.css +3 -0
  354. package/build-style/more/editor-rtl.css +3 -0
  355. package/build-style/more/editor.css +3 -0
  356. package/build-style/navigation/editor-rtl.css +3 -12
  357. package/build-style/navigation/editor.css +3 -12
  358. package/build-style/navigation/style-rtl.css +3 -0
  359. package/build-style/navigation/style.css +3 -0
  360. package/build-style/navigation-link/editor-rtl.css +3 -0
  361. package/build-style/navigation-link/editor.css +3 -0
  362. package/build-style/navigation-link/style-rtl.css +3 -0
  363. package/build-style/navigation-link/style.css +3 -0
  364. package/build-style/navigation-submenu/editor-rtl.css +3 -0
  365. package/build-style/navigation-submenu/editor.css +3 -0
  366. package/build-style/nextpage/editor-rtl.css +3 -0
  367. package/build-style/nextpage/editor.css +3 -0
  368. package/build-style/page-list/editor-rtl.css +3 -0
  369. package/build-style/page-list/editor.css +3 -0
  370. package/build-style/page-list/style-rtl.css +3 -0
  371. package/build-style/page-list/style.css +3 -0
  372. package/build-style/paragraph/editor-rtl.css +3 -0
  373. package/build-style/paragraph/editor.css +3 -0
  374. package/build-style/paragraph/style-rtl.css +3 -0
  375. package/build-style/paragraph/style.css +3 -0
  376. package/build-style/post-author/style-rtl.css +3 -0
  377. package/build-style/post-author/style.css +3 -0
  378. package/build-style/post-comments-form/editor-rtl.css +3 -0
  379. package/build-style/post-comments-form/editor.css +3 -0
  380. package/build-style/post-comments-form/style-rtl.css +3 -0
  381. package/build-style/post-comments-form/style.css +3 -0
  382. package/build-style/post-content/editor-rtl.css +3 -0
  383. package/build-style/post-content/editor.css +3 -0
  384. package/build-style/post-content/style-rtl.css +96 -0
  385. package/build-style/post-content/style.css +96 -0
  386. package/build-style/post-date/style-rtl.css +3 -0
  387. package/build-style/post-date/style.css +3 -0
  388. package/build-style/post-excerpt/editor-rtl.css +3 -0
  389. package/build-style/post-excerpt/editor.css +3 -0
  390. package/build-style/post-excerpt/style-rtl.css +4 -0
  391. package/build-style/post-excerpt/style.css +4 -0
  392. package/build-style/post-featured-image/editor-rtl.css +3 -0
  393. package/build-style/post-featured-image/editor.css +3 -0
  394. package/build-style/post-featured-image/style-rtl.css +3 -0
  395. package/build-style/post-featured-image/style.css +3 -0
  396. package/build-style/post-navigation-link/style-rtl.css +3 -0
  397. package/build-style/post-navigation-link/style.css +3 -0
  398. package/build-style/post-template/editor-rtl.css +3 -0
  399. package/build-style/post-template/editor.css +3 -0
  400. package/build-style/post-template/style-rtl.css +3 -0
  401. package/build-style/post-template/style.css +3 -0
  402. package/build-style/post-terms/style-rtl.css +3 -0
  403. package/build-style/post-terms/style.css +3 -0
  404. package/build-style/post-time-to-read/style-rtl.css +3 -0
  405. package/build-style/post-time-to-read/style.css +3 -0
  406. package/build-style/post-title/style-rtl.css +3 -0
  407. package/build-style/post-title/style.css +3 -0
  408. package/build-style/preformatted/style-rtl.css +3 -0
  409. package/build-style/preformatted/style.css +3 -0
  410. package/build-style/pullquote/editor-rtl.css +3 -0
  411. package/build-style/pullquote/editor.css +3 -0
  412. package/build-style/pullquote/style-rtl.css +3 -0
  413. package/build-style/pullquote/style.css +3 -0
  414. package/build-style/pullquote/theme-rtl.css +3 -0
  415. package/build-style/pullquote/theme.css +3 -0
  416. package/build-style/query/editor-rtl.css +3 -0
  417. package/build-style/query/editor.css +3 -0
  418. package/build-style/query-pagination/editor-rtl.css +3 -0
  419. package/build-style/query-pagination/editor.css +3 -0
  420. package/build-style/query-pagination/style-rtl.css +3 -0
  421. package/build-style/query-pagination/style.css +3 -0
  422. package/build-style/query-pagination-numbers/editor-rtl.css +3 -0
  423. package/build-style/query-pagination-numbers/editor.css +3 -0
  424. package/build-style/query-title/style-rtl.css +3 -0
  425. package/build-style/query-title/style.css +3 -0
  426. package/build-style/quote/style-rtl.css +3 -0
  427. package/build-style/quote/style.css +3 -0
  428. package/build-style/quote/theme-rtl.css +6 -3
  429. package/build-style/quote/theme.css +6 -3
  430. package/build-style/read-more/style-rtl.css +3 -0
  431. package/build-style/read-more/style.css +3 -0
  432. package/build-style/reset-rtl.css +3 -0
  433. package/build-style/reset.css +3 -0
  434. package/build-style/rss/editor-rtl.css +3 -0
  435. package/build-style/rss/editor.css +3 -0
  436. package/build-style/rss/style-rtl.css +3 -0
  437. package/build-style/rss/style.css +3 -0
  438. package/build-style/search/editor-rtl.css +3 -0
  439. package/build-style/search/editor.css +3 -0
  440. package/build-style/search/style-rtl.css +3 -0
  441. package/build-style/search/style.css +3 -0
  442. package/build-style/search/theme-rtl.css +3 -0
  443. package/build-style/search/theme.css +3 -0
  444. package/build-style/separator/editor-rtl.css +3 -0
  445. package/build-style/separator/editor.css +3 -0
  446. package/build-style/separator/style-rtl.css +3 -0
  447. package/build-style/separator/style.css +3 -0
  448. package/build-style/separator/theme-rtl.css +3 -0
  449. package/build-style/separator/theme.css +3 -0
  450. package/build-style/shortcode/editor-rtl.css +3 -0
  451. package/build-style/shortcode/editor.css +3 -0
  452. package/build-style/site-logo/editor-rtl.css +3 -0
  453. package/build-style/site-logo/editor.css +3 -0
  454. package/build-style/site-logo/style-rtl.css +3 -0
  455. package/build-style/site-logo/style.css +3 -0
  456. package/build-style/site-tagline/editor-rtl.css +3 -0
  457. package/build-style/site-tagline/editor.css +3 -0
  458. package/build-style/site-tagline/style-rtl.css +94 -0
  459. package/build-style/site-tagline/style.css +94 -0
  460. package/build-style/site-title/editor-rtl.css +3 -0
  461. package/build-style/site-title/editor.css +3 -0
  462. package/build-style/site-title/style-rtl.css +7 -1
  463. package/build-style/site-title/style.css +7 -1
  464. package/build-style/social-link/editor-rtl.css +3 -0
  465. package/build-style/social-link/editor.css +3 -0
  466. package/build-style/social-links/editor-rtl.css +3 -0
  467. package/build-style/social-links/editor.css +3 -0
  468. package/build-style/social-links/style-rtl.css +3 -0
  469. package/build-style/social-links/style.css +3 -0
  470. package/build-style/spacer/editor-rtl.css +3 -0
  471. package/build-style/spacer/editor.css +3 -0
  472. package/build-style/spacer/style-rtl.css +3 -0
  473. package/build-style/spacer/style.css +3 -0
  474. package/build-style/style-rtl.css +27 -1
  475. package/build-style/style.css +27 -1
  476. package/build-style/table/editor-rtl.css +3 -0
  477. package/build-style/table/editor.css +3 -0
  478. package/build-style/table/style-rtl.css +3 -0
  479. package/build-style/table/style.css +3 -0
  480. package/build-style/table/theme-rtl.css +3 -0
  481. package/build-style/table/theme.css +3 -0
  482. package/build-style/table-of-contents/style-rtl.css +94 -0
  483. package/build-style/table-of-contents/style.css +94 -0
  484. package/build-style/tag-cloud/editor-rtl.css +95 -0
  485. package/build-style/tag-cloud/editor.css +95 -0
  486. package/build-style/tag-cloud/style-rtl.css +3 -0
  487. package/build-style/tag-cloud/style.css +3 -0
  488. package/build-style/template-part/editor-rtl.css +3 -0
  489. package/build-style/template-part/editor.css +3 -0
  490. package/build-style/template-part/theme-rtl.css +3 -0
  491. package/build-style/template-part/theme.css +3 -0
  492. package/build-style/term-description/style-rtl.css +3 -0
  493. package/build-style/term-description/style.css +3 -0
  494. package/build-style/text-columns/editor-rtl.css +3 -0
  495. package/build-style/text-columns/editor.css +3 -0
  496. package/build-style/text-columns/style-rtl.css +3 -0
  497. package/build-style/text-columns/style.css +3 -0
  498. package/build-style/theme-rtl.css +6 -3
  499. package/build-style/theme.css +6 -3
  500. package/build-style/verse/style-rtl.css +3 -0
  501. package/build-style/verse/style.css +3 -0
  502. package/build-style/video/editor-rtl.css +3 -3
  503. package/build-style/video/editor.css +3 -3
  504. package/build-style/video/style-rtl.css +3 -0
  505. package/build-style/video/style.css +3 -0
  506. package/build-style/video/theme-rtl.css +3 -0
  507. package/build-style/video/theme.css +3 -0
  508. package/package.json +35 -35
  509. package/src/avatar/edit.js +1 -0
  510. package/src/button/index.php +1 -14
  511. package/src/categories/block.json +12 -0
  512. package/src/column/block.json +2 -0
  513. package/src/column/edit.js +2 -2
  514. package/src/comment-template/block.json +12 -0
  515. package/src/comments-title/block.json +3 -0
  516. package/src/comments-title/edit.js +8 -1
  517. package/src/details/edit.js +1 -0
  518. package/src/editor.scss +1 -0
  519. package/src/form/edit.js +3 -2
  520. package/src/form-input/edit.js +1 -0
  521. package/src/form-input/style.scss +1 -0
  522. package/src/gallery/edit.js +75 -13
  523. package/src/gallery/editor.scss +0 -1
  524. package/src/gallery/gap-styles.js +1 -8
  525. package/src/gallery/test/__snapshots__/index.native.js.snap +1 -1
  526. package/src/gallery/test/index.native.js +5 -5
  527. package/src/gallery/use-image-sizes.js +2 -2
  528. package/src/group/editor.scss +1 -1
  529. package/src/group/index.js +26 -29
  530. package/src/group/variations.js +56 -0
  531. package/src/heading/block.json +3 -0
  532. package/src/heading/edit.js +3 -1
  533. package/src/image/editor.scss +12 -0
  534. package/src/image/view.js +1 -1
  535. package/src/latest-posts/edit.js +1 -0
  536. package/src/latest-posts/editor.scss +0 -4
  537. package/src/list/block.json +1 -1
  538. package/src/list/ordered-list-settings.js +20 -18
  539. package/src/list/test/edit.native.js +1 -3
  540. package/src/list-item/block.json +3 -2
  541. package/src/loginout/block.json +14 -1
  542. package/src/loginout/style.scss +4 -0
  543. package/src/media-text/style.native.scss +2 -0
  544. package/src/navigation/edit/index.js +5 -5
  545. package/src/navigation/editor.scss +0 -1
  546. package/src/post-comments-form/block.json +12 -0
  547. package/src/post-content/block.json +1 -0
  548. package/src/post-content/style.scss +5 -0
  549. package/src/post-date/block.json +12 -0
  550. package/src/post-excerpt/block.json +12 -0
  551. package/src/post-excerpt/style.scss +3 -0
  552. package/src/post-navigation-link/edit.js +2 -0
  553. package/src/post-terms/block.json +12 -0
  554. package/src/post-time-to-read/block.json +6 -0
  555. package/src/post-title/block.json +15 -0
  556. package/src/post-title/edit.js +4 -3
  557. package/src/query/edit/inspector-controls/enhanced-pagination-control.js +1 -0
  558. package/src/query/edit/inspector-controls/index.js +85 -12
  559. package/src/query/edit/inspector-controls/offset-controls.js +31 -0
  560. package/src/query/edit/inspector-controls/pages-control.js +27 -0
  561. package/src/query/edit/inspector-controls/per-page-control.js +33 -0
  562. package/src/query/edit/inspector-controls/sticky-control.js +1 -1
  563. package/src/query/edit/query-toolbar.js +1 -90
  564. package/src/query/utils.js +9 -5
  565. package/src/query-title/block.json +3 -0
  566. package/src/query-title/edit.js +9 -1
  567. package/src/quote/theme.scss +5 -3
  568. package/src/site-logo/edit.js +23 -9
  569. package/src/site-tagline/block.json +12 -1
  570. package/src/site-tagline/edit.js +2 -4
  571. package/src/site-tagline/style.scss +4 -0
  572. package/src/site-title/block.json +10 -0
  573. package/src/site-title/edit.js +2 -4
  574. package/src/site-title/style.scss +7 -2
  575. package/src/social-link/edit.js +0 -1
  576. package/src/spacer/controls.js +10 -13
  577. package/src/style.scss +4 -0
  578. package/src/table-of-contents/block.json +14 -1
  579. package/src/table-of-contents/style.scss +4 -0
  580. package/src/tag-cloud/block.json +1 -1
  581. package/src/tag-cloud/edit.js +46 -34
  582. package/src/tag-cloud/editor.scss +9 -0
  583. package/src/template-part/edit/index.js +10 -7
  584. package/src/template-part/edit/inner-blocks.js +6 -4
  585. package/src/video/editor.scss +0 -4
@@ -1 +1 @@
1
- {"version":3,"names":["column","icon","initBlock","deprecated","edit","metadata","$schema","apiVersion","name","title","category","parent","description","textdomain","attributes","verticalAlignment","type","width","allowedBlocks","templateLock","supports","__experimentalOnEnter","anchor","reusable","html","color","gradients","heading","button","link","__experimentalDefaultControls","background","text","shadow","spacing","blockGap","padding","__experimentalBorder","style","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","layout","interactivity","clientNavigation","save","settings","init"],"sources":["@wordpress/block-library/src/column/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { column as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,IAAIC,IAAI,QAAQ,kBAAkB;;AAEjD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAC3C,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,IAAI,MAAM,QAAQ;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,MAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,iBAAA;MAAAC,IAAA;IAAA;IAAAC,KAAA;MAAAD,IAAA;IAAA;IAAAE,aAAA;MAAAF,IAAA;IAAA;IAAAG,YAAA;MAAAH,IAAA;MAAA;IAAA;EAAA;EAAAI,QAAA;IAAAC,qBAAA;IAAAC,MAAA;IAAAC,QAAA;IAAAC,IAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,OAAA;MAAAC,MAAA;MAAAC,IAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;MAAA;IAAA;IAAAC,MAAA;IAAAC,OAAA;MAAAC,QAAA;MAAAC,OAAA;MAAAN,6BAAA;QAAAM,OAAA;QAAAD,QAAA;MAAA;IAAA;IAAAE,oBAAA;MAAAZ,KAAA;MAAAa,KAAA;MAAArB,KAAA;MAAAa,6BAAA;QAAAL,KAAA;QAAAa,KAAA;QAAArB,KAAA;MAAA;IAAA;IAAAsB,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAjB,6BAAA;QAAAU,QAAA;MAAA;IAAA;IAAAQ,MAAA;IAAAC,aAAA;MAAAC,gBAAA;IAAA;EAAA;AAAA;AAE1B,OAAOC,IAAI,MAAM,QAAQ;AAEzB,MAAM;EAAE3C;AAAK,CAAC,GAAGH,QAAQ;AAEzB,SAASA,QAAQ,EAAEG,IAAI;AAEvB,OAAO,MAAM4C,QAAQ,GAAG;EACvBnD,IAAI;EACJG,IAAI;EACJ+C,IAAI;EACJhD;AACD,CAAC;AAED,OAAO,MAAMkD,IAAI,GAAGA,CAAA,KAAMnD,SAAS,CAAE;EAAEM,IAAI;EAAEH,QAAQ;EAAE+C;AAAS,CAAE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["column","icon","initBlock","deprecated","edit","metadata","$schema","apiVersion","name","title","category","parent","description","textdomain","attributes","verticalAlignment","type","width","allowedBlocks","templateLock","supports","__experimentalOnEnter","anchor","reusable","html","color","gradients","heading","button","link","__experimentalDefaultControls","background","text","shadow","spacing","blockGap","padding","__experimentalBorder","radius","style","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","layout","interactivity","clientNavigation","save","settings","init"],"sources":["@wordpress/block-library/src/column/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { column as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,MAAM,IAAIC,IAAI,QAAQ,kBAAkB;;AAEjD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAC3C,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,IAAI,MAAM,QAAQ;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,MAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,iBAAA;MAAAC,IAAA;IAAA;IAAAC,KAAA;MAAAD,IAAA;IAAA;IAAAE,aAAA;MAAAF,IAAA;IAAA;IAAAG,YAAA;MAAAH,IAAA;MAAA;IAAA;EAAA;EAAAI,QAAA;IAAAC,qBAAA;IAAAC,MAAA;IAAAC,QAAA;IAAAC,IAAA;IAAAC,KAAA;MAAAC,SAAA;MAAAC,OAAA;MAAAC,MAAA;MAAAC,IAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;MAAA;IAAA;IAAAC,MAAA;IAAAC,OAAA;MAAAC,QAAA;MAAAC,OAAA;MAAAN,6BAAA;QAAAM,OAAA;QAAAD,QAAA;MAAA;IAAA;IAAAE,oBAAA;MAAAZ,KAAA;MAAAa,MAAA;MAAAC,KAAA;MAAAtB,KAAA;MAAAa,6BAAA;QAAAL,KAAA;QAAAa,MAAA;QAAAC,KAAA;QAAAtB,KAAA;MAAA;IAAA;IAAAuB,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAlB,6BAAA;QAAAW,QAAA;MAAA;IAAA;IAAAQ,MAAA;IAAAC,aAAA;MAAAC,gBAAA;IAAA;EAAA;AAAA;AAE1B,OAAOC,IAAI,MAAM,QAAQ;AAEzB,MAAM;EAAE5C;AAAK,CAAC,GAAGH,QAAQ;AAEzB,SAASA,QAAQ,EAAEG,IAAI;AAEvB,OAAO,MAAM6C,QAAQ,GAAG;EACvBpD,IAAI;EACJG,IAAI;EACJgD,IAAI;EACJjD;AACD,CAAC;AAED,OAAO,MAAMmD,IAAI,GAAGA,CAAA,KAAMpD,SAAS,CAAE;EAAEM,IAAI;EAAEH,QAAQ;EAAEgD;AAAS,CAAE,CAAC","ignoreList":[]}
@@ -40,6 +40,18 @@ const metadata = {
40
40
  },
41
41
  interactivity: {
42
42
  clientNavigation: true
43
+ },
44
+ __experimentalBorder: {
45
+ radius: true,
46
+ color: true,
47
+ width: true,
48
+ style: true,
49
+ __experimentalDefaultControls: {
50
+ radius: true,
51
+ color: true,
52
+ width: true,
53
+ style: true
54
+ }
43
55
  }
44
56
  },
45
57
  style: "wp-block-comment-template"
@@ -1 +1 @@
1
- {"version":3,"names":["layout","icon","initBlock","metadata","$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","edit","save","settings","init"],"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":"AAAA;AACA;AACA;AACA,SAASA,MAAM,IAAIC,IAAI,QAAQ,kBAAkB;;AAEjD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAAC,MAAAC,QAAA;EAAAC,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;AAE5C,OAAOC,IAAI,MAAM,QAAQ;AACzB,OAAOC,IAAI,MAAM,QAAQ;AAEzB,MAAM;EAAE5B;AAAK,CAAC,GAAGH,QAAQ;AACzB,SAASA,QAAQ,EAAEG,IAAI;AAEvB,OAAO,MAAM6B,QAAQ,GAAG;EACvBlC,IAAI;EACJgC,IAAI;EACJC;AACD,CAAC;AAED,OAAO,MAAME,IAAI,GAAGA,CAAA,KAAMlC,SAAS,CAAE;EAAEI,IAAI;EAAEH,QAAQ;EAAEgC;AAAS,CAAE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["layout","icon","initBlock","metadata","$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","edit","save","settings","init"],"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":"AAAA;AACA;AACA;AACA,SAASA,MAAM,IAAIC,IAAI,QAAQ,kBAAkB;;AAEjD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAAC,MAAAC,QAAA;EAAAC,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;AAE5C,OAAOC,IAAI,MAAM,QAAQ;AACzB,OAAOC,IAAI,MAAM,QAAQ;AAEzB,MAAM;EAAEhC;AAAK,CAAC,GAAGH,QAAQ;AACzB,SAASA,QAAQ,EAAEG,IAAI;AAEvB,OAAO,MAAMiC,QAAQ,GAAG;EACvBtC,IAAI;EACJoC,IAAI;EACJC;AACD,CAAC;AAED,OAAO,MAAME,IAAI,GAAGA,CAAA,KAAMtC,SAAS,CAAE;EAAEI,IAAI;EAAEH,QAAQ;EAAEoC;AAAS,CAAE,CAAC","ignoreList":[]}
@@ -26,6 +26,9 @@ const metadata = {
26
26
  level: {
27
27
  type: "number",
28
28
  "default": 2
29
+ },
30
+ levelOptions: {
31
+ type: "array"
29
32
  }
30
33
  },
31
34
  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","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;EAAA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M;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","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;IAAAG,KAAA;MAAAH,IAAA;MAAA;IAAA;IAAAI,YAAA;MAAAJ,IAAA;IAAA;EAAA;EAAAK,QAAA;IAAAC,MAAA;IAAAC,KAAA;IAAAC,IAAA;IAAAC,oBAAA;MAAAC,MAAA;MAAAC,KAAA;MAAAC,KAAA;MAAAC,KAAA;IAAA;IAAAF,KAAA;MAAAG,SAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;MAAA;IAAA;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;MAAAd,6BAAA;QAAAO,QAAA;QAAAE,wBAAA;QAAAE,uBAAA;QAAAD,wBAAA;MAAA;IAAA;IAAAK,aAAA;MAAAC,gBAAA;IAAA;EAAA;AAAA;AAKA,MAAM;EAAEjC,UAAU;EAAEO;AAAS,CAAC,GAAGjB,QAAQ;AAEzC,eAAe,CACd;EACCU,UAAU,EAAE;IACX,GAAGA,UAAU;IACbkC,kBAAkB,EAAE;MACnBhC,IAAI,EAAE;IACP,CAAC;IACDiC,qBAAqB,EAAE;MACtBjC,IAAI,EAAE;IACP;EACD,CAAC;EACDK,QAAQ;EACR6B,OAAO,EAAIC,aAAa,IAAM;IAC7B,MAAM;MACLH,kBAAkB;MAClBC,qBAAqB;MACrB,GAAGG;IACJ,CAAC,GAAGD,aAAa;IACjB,OAAOC,aAAa;EACrB,CAAC;EACDC,UAAU,EAAEA,CAAE;IAAEJ,qBAAqB;IAAED;EAAmB,CAAC,KAC1DC,qBAAqB,IAAID,kBAAkB;EAC5CM,IAAI,EAAEA,CAAA,KAAM;AACb,CAAC,CACD","ignoreList":[]}
@@ -22,7 +22,8 @@ export default function Edit({
22
22
  textAlign,
23
23
  showPostTitle,
24
24
  showCommentsCount,
25
- level
25
+ level,
26
+ levelOptions
26
27
  },
27
28
  setAttributes,
28
29
  context: {
@@ -86,6 +87,7 @@ export default function Edit({
86
87
  })
87
88
  }), /*#__PURE__*/_jsx(HeadingLevelDropdown, {
88
89
  value: level,
90
+ options: levelOptions,
89
91
  onChange: newLevel => setAttributes({
90
92
  level: newLevel
91
93
  })
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","AlignmentControl","BlockControls","useBlockProps","InspectorControls","store","blockEditorStore","HeadingLevelDropdown","__","_n","sprintf","useEntityProp","PanelBody","ToggleControl","useState","useEffect","useSelect","apiFetch","addQueryArgs","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Edit","attributes","textAlign","showPostTitle","showCommentsCount","level","setAttributes","context","postType","postId","TagName","commentsCount","setCommentsCount","rawTitle","isSiteEditor","blockProps","className","threadCommentsDepth","threadComments","commentsPerPage","pageComments","select","getSettings","__experimentalDiscussionSettings","nestedCommentsNumber","Math","min","topLevelCommentsNumber","commentsNumber","parseInt","currentPostId","path","post","_fields","method","parse","then","res","headers","get","catch","blockControls","group","children","value","onChange","newAlign","newLevel","inspectorControls","title","__nextHasNoMarginBottom","label","checked","postTitle","placeholder","undefined"],"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":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,gBAAgB,EAChBC,aAAa,EACbC,aAAa,EACbC,iBAAiB,EACjBC,KAAK,IAAIC,gBAAgB,EACzBC,oBAAoB,QACd,yBAAyB;AAChC,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAASC,SAAS,EAAEC,aAAa,QAAQ,uBAAuB;AAChE,SAASC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;AACxD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,OAAOC,QAAQ,MAAM,sBAAsB;AAC3C,SAASC,YAAY,QAAQ,gBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,I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2C,WAAW,GAAGrE,OAAO,CAAEF,EAAE,CAAE,gBAAiB,CAAC,EAAEsE,SAAU,CAAC;IAC3D,CAAC,MAAM;MACN;MACAC,WAAW,GAAGrE,OAAO,CAAEF,EAAE,CAAE,iBAAkB,CAAC,EAAEsE,SAAU,CAAC;IAC5D;EACD,CAAC,MAAM,IAAK1C,aAAa,KAAK,CAAC,EAAG;IACjC2C,WAAW,GAAGvE,EAAE,CAAE,UAAW,CAAC;EAC/B,CAAC,MAAM;IACNuE,WAAW,GAAGvE,EAAE,CAAE,WAAY,CAAC;EAChC;EAEA,oBACCc,KAAA,CAAAE,SAAA;IAAA4C,QAAA,GACGF,aAAa,EACbO,iBAAiB,eACnBrD,IAAA,CAACe,OAAO;MAAA,GAAMK,UAAU;MAAA4B,QAAA,EAAKW;IAAW,CAAW,CAAC;EAAA,CACnD,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["clsx","AlignmentControl","BlockControls","useBlockProps","InspectorControls","store","blockEditorStore","HeadingLevelDropdown","__","_n","sprintf","useEntityProp","PanelBody","ToggleControl","useState","useEffect","useSelect","apiFetch","addQueryArgs","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Edit","attributes","textAlign","showPostTitle","showCommentsCount","level","levelOptions","setAttributes","context","postType","postId","TagName","commentsCount","setCommentsCount","rawTitle","isSiteEditor","blockProps","className","threadCommentsDepth","threadComments","commentsPerPage","pageComments","select","getSettings","__experimentalDiscussionSettings","nestedCommentsNumber","Math","min","topLevelCommentsNumber","commentsNumber","parseInt","currentPostId","path","post","_fields","method","parse","then","res","headers","get","catch","blockControls","group","children","value","onChange","newAlign","options","newLevel","inspectorControls","title","__nextHasNoMarginBottom","label","checked","postTitle","placeholder","undefined"],"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":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;A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AEF,EAAE,CAAE,oBAAqB,CAAC,EAAEwE,SAAU,CAAC;MAC/D,CAAC,MAAM;QACNC,WAAW,GAAGvE,OAAO,EACpB;QACAD,EAAE,CACD,uBAAuB,EACvB,wBAAwB,EACxB4B,aACD,CAAC,EACDA,aAAa,EACb2C,SACD,CAAC;MACF;IACD,CAAC,MAAM,IAAK3C,aAAa,KAAK,CAAC,EAAG;MACjC4C,WAAW,GAAGzE,EAAE,CAAE,cAAe,CAAC;IACnC,CAAC,MAAM;MACNyE,WAAW,GAAGvE,OAAO,EACpB;MACAD,EAAE,CAAE,aAAa,EAAE,cAAc,EAAE4B,aAAc,CAAC,EAClDA,aACD,CAAC;IACF;EACD,CAAC,MAAM,IAAKT,aAAa,EAAG;IAC3B,IAAKS,aAAa,KAAK,CAAC,EAAG;MAC1B;MACA4C,WAAW,GAAGvE,OAAO,CAAEF,EAAE,CAAE,gBAAiB,CAAC,EAAEwE,SAAU,CAAC;IAC3D,CAAC,MAAM;MACN;MACAC,WAAW,GAAGvE,OAAO,CAAEF,EAAE,CAAE,iBAAkB,CAAC,EAAEwE,SAAU,CAAC;IAC5D;EACD,CAAC,MAAM,IAAK3C,aAAa,KAAK,CAAC,EAAG;IACjC4C,WAAW,GAAGzE,EAAE,CAAE,UAAW,CAAC;EAC/B,CAAC,MAAM;IACNyE,WAAW,GAAGzE,EAAE,CAAE,WAAY,CAAC;EAChC;EAEA,oBACCc,KAAA,CAAAE,SAAA;IAAA6C,QAAA,GACGF,aAAa,EACbQ,iBAAiB,eACnBvD,IAAA,CAACgB,OAAO;MAAA,GAAMK,UAAU;MAAA4B,QAAA,EAAKY;IAAW,CAAW,CAAC;EAAA,CACnD,CAAC;AAEL","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":["title","icon","initBlock","metadata","$schema","apiVersion","name","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","edit","deprecated","settings","init"],"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":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,IAAI,QAAQ,kBAAkB;;AAEhD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAN,KAAA;EAAAO,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;IAAAG,KAAA;MAAAH,IAAA;MAAA;IAAA;EAAA;EAAAI,QAAA;IAAAC,MAAA;IAAAC,KAAA;IAAAC,IAAA;IAAAC,oBAAA;MAAAC,MAAA;MAAAC,KAAA;MAAAC,KAAA;MAAAC,KAAA;IAAA;IAAAF,KAAA;MAAAG,SAAA;MAAAC,6BAAA;QAAAC,UAAA;QAAAC,IAAA;MAAA;IAAA;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;MAAAd,6BAAA;QAAAO,QAAA;QAAAE,wBAAA;QAAAE,uBAAA;QAAAD,wBAAA;MAAA;IAAA;IAAAK,aAAA;MAAAC,gBAAA;IAAA;EAAA;AAAA;AAE5C,OAAOC,IAAI,MAAM,QAAQ;AACzB,OAAOC,UAAU,MAAM,cAAc;AAErC,MAAM;EAAExC;AAAK,CAAC,GAAGH,QAAQ;AACzB,SAASA,QAAQ,EAAEG,IAAI;AAEvB,OAAO,MAAMyC,QAAQ,GAAG;EACvB9C,IAAI;EACJ4C,IAAI;EACJC;AACD,CAAC;AAED,OAAO,MAAME,IAAI,GAAGA,CAAA,KAAM9C,SAAS,CAAE;EAAEI,IAAI;EAAEH,QAAQ;EAAE4C;AAAS,CAAE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["title","icon","initBlock","metadata","$schema","apiVersion","name","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","edit","deprecated","settings","init"],"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":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AS,CAAE;EAAEI,IAAI;EAAEH,QAAQ;EAAE6C;AAAS,CAAE,CAAC","ignoreList":[]}
@@ -40,6 +40,7 @@ function DetailsEdit({
40
40
  children: /*#__PURE__*/_jsx(PanelBody, {
41
41
  title: __('Settings'),
42
42
  children: /*#__PURE__*/_jsx(ToggleControl, {
43
+ __nextHasNoMarginBottom: true,
43
44
  label: __('Open by default'),
44
45
  checked: showContent,
45
46
  onChange: () => setAttributes({
@@ -1 +1 @@
1
- {"version":3,"names":["RichText","useBlockProps","useInnerBlocksProps","store","blockEditorStore","InspectorControls","useSelect","PanelBody","ToggleControl","__","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","TEMPLATE","placeholder","DetailsEdit","attributes","setAttributes","clientId","showContent","summary","blockProps","innerBlocksProps","template","__experimentalCaptureToolbars","hasSelection","select","isBlockSelected","hasSelectedInnerBlock","children","title","label","checked","onChange","open","onClick","event","preventDefault","identifier","allowedFormats","withoutInteractiveFormatting","value","newSummary"],"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":"AAAA;AACA;AACA;AACA,SACCA,QAAQ,EACRC,aAAa,EACbC,mBAAmB,EACnBC,KAAK,IAAIC,gBAAgB,EACzBC,iBAAiB,QACX,yBAAyB;AAChC,SAASC,SAAS,QAAQ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EAAE,CAAEA;UAChB,CAAE;QACF,CACD;MAAC,CACQ;IAAC,CACM,CAAC,eACpBT,KAAA;MAAA,GACMY,gBAAgB;MACrBY,IAAI,EAAGT,YAAY,IAAIN,WAAa;MAAAU,QAAA,gBAEpCrB,IAAA;QAAS2B,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;QAAAR,QAAA,eACvDrB,IAAA,CAACX,QAAQ;UACRyC,UAAU,EAAC,SAAS;UACpB,cAAahC,EAAE,CAAE,eAAgB,CAAG;UACpCQ,WAAW,EAAGR,EAAE,CAAE,gBAAiB,CAAG;UACtCiC,cAAc,EAAG,EAAI;UACrBC,4BAA4B;UAC5BC,KAAK,EAAGrB,OAAS;UACjBa,QAAQ,EAAKS,UAAU,IACtBzB,aAAa,CAAE;YAAEG,OAAO,EAAEsB;UAAW,CAAE;QACvC,CACD;MAAC,CACM,CAAC,EACRpB,gBAAgB,CAACO,QAAQ;IAAA,CACnB,CAAC;EAAA,CACT,CAAC;AAEL;AAEA,eAAed,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["RichText","useBlockProps","useInnerBlocksProps","store","blockEditorStore","InspectorControls","useSelect","PanelBody","ToggleControl","__","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","TEMPLATE","placeholder","DetailsEdit","attributes","setAttributes","clientId","showContent","summary","blockProps","innerBlocksProps","template","__experimentalCaptureToolbars","hasSelection","select","isBlockSelected","hasSelectedInnerBlock","children","title","__nextHasNoMarginBottom","label","checked","onChange","open","onClick","event","preventDefault","identifier","allowedFormats","withoutInteractiveFormatting","value","newSummary"],"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":"AAAA;AACA;AACA;AACA,SACCA,QAAQ,EACRC,aAAa,EACbC,mBAAmB,EACnBC,KAAK,IAAIC,gBAAgB,EACzBC,iBAAiB,QACX,yBAAyB;AAChC,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,SAAS,EAAEC,aAAa,QAAQ,uBAAuB;AAChE,SAASC,EAAE,QAAQ,iBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAErC,MAAMC,QAAQ,GAAG,CAChB,CACC,gBAAgB,EAChB;EACCC,WAAW,EAAER,EAAE,CAAE,8BAA+B;AACjD,CAAC,CACD,CACD;AAED,SAASS,WAAWA,CAAE;EAAEC,UAAU;EAAEC,aAAa;EAAEC;AAAS,CAAC,EAAG;EAC/D,MAAM;IAAEC,WAAW;IAAEC;EAAQ,CAAC,GAAGJ,UAAU;EAC3C,MAAMK,UAAU,GAAGvB,aAAa,CAAC,CAAC;EAClC,MAAMwB,gBAAgB,GAAGvB,mBAAmB,CAAEsB,UAAU,EAAE;IACzDE,QAAQ,EAAEV,QAAQ;IAClBW,6BAA6B,EAAE;EAChC,CAAE,CAAC;;EAEH;EACA,MAAMC,YAAY,GAAGtB,SAAS,CAC3BuB,MAAM,IAAM;IACb,MAAM;MAAEC,eAAe;MAAEC;IAAsB,CAAC,GAC/CF,MAAM,CAAEzB,gBAAiB,CAAC;IAC3B;IACA,OACC2B,qBAAqB,CAAEV,QAAQ,EAAE,IAAK,CAAC,IACvCS,eAAe,CAAET,QAAS,CAAC;EAE7B,CAAC,EACD,CAAEA,QAAQ,CACX,CAAC;EAED,oBACCR,KAAA,CAAAE,SAAA;IAAAiB,QAAA,gBACCrB,IAAA,CAACN,iBAAiB;MAAA2B,QAAA,eACjBrB,IAAA,CAACJ,SAAS;QAAC0B,KAAK,EAAGxB,EAAE,CAAE,UAAW,CAAG;QAAAuB,QAAA,eACpCrB,IAAA,CAACH,aAAa;UACb0B,uBAAuB;UACvBC,KAAK,EAAG1B,EAAE,CAAE,iBAAkB,CAAG;UACjC2B,OAAO,EAAGd,WAAa;UACvBe,QAAQ,EAAGA,CAAA,KACVjB,aAAa,CAAE;YACdE,WAAW,EAAE,CAAEA;UAChB,CAAE;QACF,CACD;MAAC,CACQ;IAAC,CACM,CAAC,eACpBT,KAAA;MAAA,GACMY,gBAAgB;MACrBa,IAAI,EAAGV,YAAY,IAAIN,WAAa;MAAAU,QAAA,gBAEpCrB,IAAA;QAAS4B,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;QAAAT,QAAA,eACvDrB,IAAA,CAACX,QAAQ;UACR0C,UAAU,EAAC,SAAS;UACpB,cAAajC,EAAE,CAAE,eAAgB,CAAG;UACpCQ,WAAW,EAAGR,EAAE,CAAE,gBAAiB,CAAG;UACtCkC,cAAc,EAAG,EAAI;UACrBC,4BAA4B;UAC5BC,KAAK,EAAGtB,OAAS;UACjBc,QAAQ,EAAKS,UAAU,IACtB1B,aAAa,CAAE;YAAEG,OAAO,EAAEuB;UAAW,CAAE;QACvC,CACD;MAAC,CACM,CAAC,EACRrB,gBAAgB,CAACO,QAAQ;IAAA,CACnB,CAAC;EAAA,CACT,CAAC;AAEL;AAEA,eAAed,WAAW","ignoreList":[]}
@@ -57,10 +57,9 @@ const Edit = ({
57
57
  children: [/*#__PURE__*/_jsx(InspectorControls, {
58
58
  children: /*#__PURE__*/_jsxs(PanelBody, {
59
59
  title: __('Settings'),
60
- children: [/*#__PURE__*/_jsx(SelectControl
61
- // __nextHasNoMarginBottom
62
- // size={ '__unstable-large' }
63
- , {
60
+ children: [/*#__PURE__*/_jsx(SelectControl, {
61
+ __nextHasNoMarginBottom: true,
62
+ __next40pxDefaultSize: true,
64
63
  label: __('Submissions method'),
65
64
  options: [
66
65
  // TODO: Allow plugins to add their own submission methods.
@@ -78,6 +77,7 @@ const Edit = ({
78
77
  help: submissionMethod === 'custom' ? __('Select the method to use for form submissions. Additional options for the "custom" mode can be found in the "Advanced" section.') : __('Select the method to use for form submissions.')
79
78
  }), submissionMethod === 'email' && /*#__PURE__*/_jsx(TextControl, {
80
79
  __nextHasNoMarginBottom: true,
80
+ __next40pxDefaultSize: true,
81
81
  autoComplete: "off",
82
82
  label: __('Email for form submissions'),
83
83
  value: email,
@@ -1 +1 @@
1
- {"version":3,"names":["__","InnerBlocks","useBlockProps","useInnerBlocksProps","InspectorControls","store","blockEditorStore","TextControl","SelectControl","PanelBody","useSelect","formSubmissionNotificationSuccess","formSubmissionNotificationError","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","TEMPLATE","type","label","required","Edit","attributes","setAttributes","clientId","action","method","email","submissionMethod","blockProps","hasInnerBlocks","select","getBlock","block","innerBlocks","length","innerBlocksProps","template","renderAppender","undefined","ButtonBlockAppender","children","title","options","value","onChange","help","__nextHasNoMarginBottom","autoComplete","group","newVal","className","encType"],"sources":["@wordpress/block-library/src/form/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInnerBlocks,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tInspectorControls,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { TextControl, SelectControl, PanelBody } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tformSubmissionNotificationSuccess,\n\tformSubmissionNotificationError,\n} from './utils.js';\n\nconst TEMPLATE = [\n\tformSubmissionNotificationSuccess,\n\tformSubmissionNotificationError,\n\t[\n\t\t'core/form-input',\n\t\t{\n\t\t\ttype: 'text',\n\t\t\tlabel: __( 'Name' ),\n\t\t\trequired: true,\n\t\t},\n\t],\n\t[\n\t\t'core/form-input',\n\t\t{\n\t\t\ttype: 'email',\n\t\t\tlabel: __( 'Email' ),\n\t\t\trequired: true,\n\t\t},\n\t],\n\t[\n\t\t'core/form-input',\n\t\t{\n\t\t\ttype: 'textarea',\n\t\t\tlabel: __( 'Comment' ),\n\t\t\trequired: true,\n\t\t},\n\t],\n\t[ 'core/form-submit-button', {} ],\n];\n\nconst Edit = ( { attributes, setAttributes, clientId } ) => {\n\tconst { action, method, email, submissionMethod } = attributes;\n\tconst blockProps = useBlockProps();\n\n\tconst { hasInnerBlocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlock } = select( blockEditorStore );\n\t\t\tconst block = getBlock( clientId );\n\t\t\treturn {\n\t\t\t\thasInnerBlocks: !! ( block && block.innerBlocks.length ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t\trenderAppender: hasInnerBlocks\n\t\t\t? undefined\n\t\t\t: InnerBlocks.ButtonBlockAppender,\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<SelectControl\n\t\t\t\t\t\t// __nextHasNoMarginBottom\n\t\t\t\t\t\t// size={ '__unstable-large' }\n\t\t\t\t\t\tlabel={ __( 'Submissions method' ) }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t// TODO: Allow plugins to add their own submission methods.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Send email' ),\n\t\t\t\t\t\t\t\tvalue: 'email',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( '- Custom -' ),\n\t\t\t\t\t\t\t\tvalue: 'custom',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tvalue={ submissionMethod }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { submissionMethod: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\tsubmissionMethod === 'custom'\n\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t'Select the method to use for form submissions. Additional options for the \"custom\" mode can be found in the \"Advanced\" section.'\n\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\t\t\t'Select the method to use for form submissions.'\n\t\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\t{ submissionMethod === 'email' && (\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tlabel={ __( 'Email for form submissions' ) }\n\t\t\t\t\t\t\tvalue={ email }\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tsetAttributes( { email: value } );\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\taction: `mailto:${ value }`,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\tsetAttributes( { method: 'post' } );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'The email address where form submissions will be sent. Separate multiple email addresses with a comma.'\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{ submissionMethod !== 'email' && (\n\t\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Method' ) }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t{ label: 'Get', value: 'get' },\n\t\t\t\t\t\t\t{ label: 'Post', value: 'post' },\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tvalue={ method }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { method: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Select the method to use for form submissions.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tlabel={ __( 'Form action' ) }\n\t\t\t\t\t\tvalue={ action }\n\t\t\t\t\t\tonChange={ ( newVal ) => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\taction: newVal,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'The URL where the form should be submitted.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<form\n\t\t\t\t{ ...innerBlocksProps }\n\t\t\t\tclassName=\"wp-block-form\"\n\t\t\t\tencType={ submissionMethod === 'email' ? 'text/plain' : null }\n\t\t\t/>\n\t\t</>\n\t);\n};\nexport default Edit;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SACCC,WAAW,EACXC,aAAa,EACbC,mBAAmB,EACnBC,iBAAiB,EACjBC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,WAAW,EAAEC,aAAa,EAAEC,SAAS,QAAQ,uBAAuB;AAC7E,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SACCC,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B,IAAI,EAAGhD,EAAE,CACR,wGACD;QAAG,CACH,CACD;MAAA,CACS;IAAC,CACM,CAAC,EAClB8B,gBAAgB,KAAK,OAAO,iBAC7Bd,KAAA,CAACZ,iBAAiB;MAAC+C,KAAK,EAAC,UAAU;MAAAR,QAAA,gBAClC7B,IAAA,CAACN,aAAa;QACbyC,uBAAuB;QACvB5B,KAAK,EAAGrB,EAAE,CAAE,QAAS,CAAG;QACxB6C,OAAO,EAAG,CACT;UAAExB,KAAK,EAAE,KAAK;UAAEyB,KAAK,EAAE;QAAM,CAAC,EAC9B;UAAEzB,KAAK,EAAE,MAAM;UAAEyB,KAAK,EAAE;QAAO,CAAC,CAC9B;QACHA,KAAK,EAAGlB,MAAQ;QAChBmB,QAAQ,EAAKD,KAAK,IACjBrB,aAAa,CAAE;UAAEG,MAAM,EAAEkB;QAAM,CAAE,CACjC;QACDE,IAAI,EAAGhD,EAAE,CACR,gDACD;MAAG,CACH,CAAC,eACFc,IAAA,CAACP,WAAW;QACX0C,uBAAuB;QACvBC,YAAY,EAAC,KAAK;QAClB7B,KAAK,EAAGrB,EAAE,CAAE,aAAc,CAAG;QAC7B8C,KAAK,EAAGnB,MAAQ;QAChBoB,QAAQ,EAAKK,MAAM,IAAM;UACxB3B,aAAa,CAAE;YACdE,MAAM,EAAEyB;UACT,CAAE,CAAC;QACJ,CAAG;QACHJ,IAAI,EAAGhD,EAAE,CACR,6CACD;MAAG,CACH,CAAC;IAAA,CACgB,CACnB,eACDc,IAAA;MAAA,GACMwB,gBAAgB;MACrBe,SAAS,EAAC,eAAe;MACzBC,OAAO,EAAGxB,gBAAgB,KAAK,OAAO,GAAG,YAAY,GAAG;IAAM,CAC9D,CAAC;EAAA,CACD,CAAC;AAEL,CAAC;AACD,eAAeP,IAAI","ignoreList":[]}
1
+ {"version":3,"names":["__","InnerBlocks","useBlockProps","useInnerBlocksProps","InspectorControls","store","blockEditorStore","TextControl","SelectControl","PanelBody","useSelect","formSubmissionNotificationSuccess","formSubmissionNotificationError","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","TEMPLATE","type","label","required","Edit","attributes","setAttributes","clientId","action","method","email","submissionMethod","blockProps","hasInnerBlocks","select","getBlock","block","innerBlocks","length","innerBlocksProps","template","renderAppender","undefined","ButtonBlockAppender","children","title","__nextHasNoMarginBottom","__next40pxDefaultSize","options","value","onChange","help","autoComplete","group","newVal","className","encType"],"sources":["@wordpress/block-library/src/form/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInnerBlocks,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tInspectorControls,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { TextControl, SelectControl, PanelBody } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tformSubmissionNotificationSuccess,\n\tformSubmissionNotificationError,\n} from './utils.js';\n\nconst TEMPLATE = [\n\tformSubmissionNotificationSuccess,\n\tformSubmissionNotificationError,\n\t[\n\t\t'core/form-input',\n\t\t{\n\t\t\ttype: 'text',\n\t\t\tlabel: __( 'Name' ),\n\t\t\trequired: true,\n\t\t},\n\t],\n\t[\n\t\t'core/form-input',\n\t\t{\n\t\t\ttype: 'email',\n\t\t\tlabel: __( 'Email' ),\n\t\t\trequired: true,\n\t\t},\n\t],\n\t[\n\t\t'core/form-input',\n\t\t{\n\t\t\ttype: 'textarea',\n\t\t\tlabel: __( 'Comment' ),\n\t\t\trequired: true,\n\t\t},\n\t],\n\t[ 'core/form-submit-button', {} ],\n];\n\nconst Edit = ( { attributes, setAttributes, clientId } ) => {\n\tconst { action, method, email, submissionMethod } = attributes;\n\tconst blockProps = useBlockProps();\n\n\tconst { hasInnerBlocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlock } = select( blockEditorStore );\n\t\t\tconst block = getBlock( clientId );\n\t\t\treturn {\n\t\t\t\thasInnerBlocks: !! ( block && block.innerBlocks.length ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t\trenderAppender: hasInnerBlocks\n\t\t\t? undefined\n\t\t\t: InnerBlocks.ButtonBlockAppender,\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<SelectControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ __( 'Submissions method' ) }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t// TODO: Allow plugins to add their own submission methods.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Send email' ),\n\t\t\t\t\t\t\t\tvalue: 'email',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( '- Custom -' ),\n\t\t\t\t\t\t\t\tvalue: 'custom',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tvalue={ submissionMethod }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { submissionMethod: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\tsubmissionMethod === 'custom'\n\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t'Select the method to use for form submissions. Additional options for the \"custom\" mode can be found in the \"Advanced\" section.'\n\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\t\t\t'Select the method to use for form submissions.'\n\t\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\t{ submissionMethod === 'email' && (\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tlabel={ __( 'Email for form submissions' ) }\n\t\t\t\t\t\t\tvalue={ email }\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tsetAttributes( { email: value } );\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\taction: `mailto:${ value }`,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\tsetAttributes( { method: 'post' } );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'The email address where form submissions will be sent. Separate multiple email addresses with a comma.'\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{ submissionMethod !== 'email' && (\n\t\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Method' ) }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t{ label: 'Get', value: 'get' },\n\t\t\t\t\t\t\t{ label: 'Post', value: 'post' },\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tvalue={ method }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( { method: value } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Select the method to use for form submissions.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tlabel={ __( 'Form action' ) }\n\t\t\t\t\t\tvalue={ action }\n\t\t\t\t\t\tonChange={ ( newVal ) => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\taction: newVal,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'The URL where the form should be submitted.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<form\n\t\t\t\t{ ...innerBlocksProps }\n\t\t\t\tclassName=\"wp-block-form\"\n\t\t\t\tencType={ submissionMethod === 'email' ? 'text/plain' : null }\n\t\t\t/>\n\t\t</>\n\t);\n};\nexport default Edit;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SACCC,WAAW,EACXC,aAAa,EACbC,mBAAmB,EACnBC,iBAAiB,EACjBC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,WAAW,EAAEC,aAAa,EAAEC,SAAS,QAAQ,uBAAuB;AAC7E,SAASC,SAAS,QAAQ,iBAAiB;;AAE3C;AACA;AACA;AACA,SACCC,iCAAiC,EACjCC,+BAA+B,QACzB,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAEpB,MAAMC,QAAQ,GAAG,CAChBR,iCAAiC,EACjCC,+BAA+B,EAC/B,CACC,iBAAiB,EACjB;EACCQ,IAAI,EAAE,MAAM;EACZC,KAAK,EAAErB,EAAE,CAAE,MAAO,CAAC;EACnBsB,QAAQ,EAAE;AACX,CAAC,CACD,EACD,CACC,iBAAiB,EACjB;EACCF,IAAI,EAAE,OAAO;EACbC,KAAK,EAAErB,EAAE,CAAE,OAAQ,CAAC;EACpBsB,QAAQ,EAAE;AACX,CAAC,CACD,EACD,CACC,iBAAiB,EACjB;EACCF,IAAI,EAAE,UAAU;EAChBC,KAAK,EAAErB,EAAE,CAAE,SAAU,CAAC;EACtBsB,QAAQ,EAAE;AACX,CAAC,CACD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DE,IAAI,EAAGlD,EAAE,CACR,gDACD;MAAG,CACH,CAAC,eACFc,IAAA,CAACP,WAAW;QACXsC,uBAAuB;QACvBM,YAAY,EAAC,KAAK;QAClB9B,KAAK,EAAGrB,EAAE,CAAE,aAAc,CAAG;QAC7BgD,KAAK,EAAGrB,MAAQ;QAChBsB,QAAQ,EAAKI,MAAM,IAAM;UACxB5B,aAAa,CAAE;YACdE,MAAM,EAAE0B;UACT,CAAE,CAAC;QACJ,CAAG;QACHH,IAAI,EAAGlD,EAAE,CACR,6CACD;MAAG,CACH,CAAC;IAAA,CACgB,CACnB,eACDc,IAAA;MAAA,GACMwB,gBAAgB;MACrBgB,SAAS,EAAC,eAAe;MACzBC,OAAO,EAAGzB,gBAAgB,KAAK,OAAO,GAAG,YAAY,GAAG;IAAM,CAC9D,CAAC;EAAA,CACD,CAAC;AAEL,CAAC;AACD,eAAeP,IAAI","ignoreList":[]}
@@ -62,6 +62,7 @@ function InputFieldBlock({
62
62
  }), /*#__PURE__*/_jsx(InspectorControls, {
63
63
  group: "advanced",
64
64
  children: /*#__PURE__*/_jsx(TextControl, {
65
+ __nextHasNoMarginBottom: true,
65
66
  autoComplete: "off",
66
67
  label: __('Name'),
67
68
  value: name,
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","__","InspectorControls","RichText","useBlockProps","__experimentalUseBorderProps","useBorderProps","__experimentalUseColorProps","useColorProps","PanelBody","TextControl","CheckboxControl","useRef","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","InputFieldBlock","attributes","setAttributes","className","type","name","label","inlineLabel","required","placeholder","value","blockProps","ref","TagName","borderProps","colorProps","current","focus","controls","children","title","__nextHasNoMarginBottom","checked","onChange","newVal","group","autoComplete","help","event","target","tagName","newLabel","undefined","style"],"sources":["@wordpress/block-library/src/form-input/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInspectorControls,\n\tRichText,\n\tuseBlockProps,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalUseColorProps as useColorProps,\n} from '@wordpress/block-editor';\nimport { PanelBody, TextControl, CheckboxControl } from '@wordpress/components';\n\nimport { useRef } from '@wordpress/element';\n\nfunction InputFieldBlock( { attributes, setAttributes, className } ) {\n\tconst { type, name, label, inlineLabel, required, placeholder, value } =\n\t\tattributes;\n\tconst blockProps = useBlockProps();\n\tconst ref = useRef();\n\tconst TagName = type === 'textarea' ? 'textarea' : 'input';\n\n\tconst borderProps = useBorderProps( attributes );\n\tconst colorProps = useColorProps( attributes );\n\tif ( ref.current ) {\n\t\tref.current.focus();\n\t}\n\n\tconst controls = (\n\t\t<>\n\t\t\t{ 'hidden' !== type && (\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t\t{ 'checkbox' !== type && (\n\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Inline label' ) }\n\t\t\t\t\t\t\t\tchecked={ inlineLabel }\n\t\t\t\t\t\t\t\tonChange={ ( newVal ) => {\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tinlineLabel: newVal,\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<CheckboxControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Required' ) }\n\t\t\t\t\t\t\tchecked={ required }\n\t\t\t\t\t\t\tonChange={ ( newVal ) => {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\trequired: newVal,\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</PanelBody>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\tvalue={ name }\n\t\t\t\t\tonChange={ ( newVal ) => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tname: newVal,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t'Affects the \"name\" atribute of the input element, and is used as a name for the form submission results.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n\n\tif ( 'hidden' === type ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ controls }\n\t\t\t\t<input\n\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t'wp-block-form-input__input',\n\t\t\t\t\t\tcolorProps.className,\n\t\t\t\t\t\tborderProps.className\n\t\t\t\t\t) }\n\t\t\t\t\taria-label={ __( 'Value' ) }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ ( event ) =>\n\t\t\t\t\t\tsetAttributes( { value: event.target.value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t{ controls }\n\t\t\t<span\n\t\t\t\tclassName={ clsx( 'wp-block-form-input__label', {\n\t\t\t\t\t'is-label-inline': inlineLabel || 'checkbox' === type,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<RichText\n\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\tclassName=\"wp-block-form-input__label-content\"\n\t\t\t\t\tvalue={ label }\n\t\t\t\t\tonChange={ ( newLabel ) =>\n\t\t\t\t\t\tsetAttributes( { label: newLabel } )\n\t\t\t\t\t}\n\t\t\t\t\taria-label={ label ? __( 'Label' ) : __( 'Empty label' ) }\n\t\t\t\t\tdata-empty={ label ? false : true }\n\t\t\t\t\tplaceholder={ __( 'Type the label for this input' ) }\n\t\t\t\t/>\n\t\t\t\t<TagName\n\t\t\t\t\ttype={ 'textarea' === type ? undefined : type }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t'wp-block-form-input__input',\n\t\t\t\t\t\tcolorProps.className,\n\t\t\t\t\t\tborderProps.className\n\t\t\t\t\t) }\n\t\t\t\t\taria-label={ __( 'Optional placeholder text' ) }\n\t\t\t\t\t// We hide the placeholder field's placeholder when there is a value. This\n\t\t\t\t\t// stops screen readers from reading the placeholder field's placeholder\n\t\t\t\t\t// which is confusing.\n\t\t\t\t\tplaceholder={\n\t\t\t\t\t\tplaceholder ? undefined : __( 'Optional placeholder…' )\n\t\t\t\t\t}\n\t\t\t\t\tvalue={ placeholder }\n\t\t\t\t\tonChange={ ( event ) =>\n\t\t\t\t\t\tsetAttributes( { placeholder: event.target.value } )\n\t\t\t\t\t}\n\t\t\t\t\taria-required={ required }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...borderProps.style,\n\t\t\t\t\t\t...colorProps.style,\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</span>\n\t\t</div>\n\t);\n}\n\nexport default InputFieldBlock;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,iBAAiB,EACjBC,QAAQ,EACRC,aAAa,EACbC,4BAA4B,IAAIC,cAAc,EAC9CC,2BAA2B,IAAIC,aAAa,QACtC,yBAAyB;AAChC,SAASC,SAAS,EAAEC,WAAW,EAAEC,eAAe,QAAQ,uBAAuB;AAE/E,SAASC,MAAM,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,S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9CO,KAAK,EAAGJ,KAAO;QACfiB,QAAQ,EAAKQ,QAAQ,IACpB7B,aAAa,CAAE;UAAEI,KAAK,EAAEyB;QAAS,CAAE,CACnC;QACD,cAAazB,KAAK,GAAGxB,EAAE,CAAE,OAAQ,CAAC,GAAGA,EAAE,CAAE,aAAc,CAAG;QAC1D,cAAawB,KAAK,GAAG,KAAK,GAAG,IAAM;QACnCG,WAAW,EAAG3B,EAAE,CAAE,+BAAgC;MAAG,CACrD,CAAC,eACFa,IAAA,CAACkB,OAAO;QACPT,IAAI,EAAG,UAAU,KAAKA,IAAI,GAAG4B,SAAS,GAAG5B,IAAM;QAC/CD,SAAS,EAAGtB,IAAI,CACfsB,SAAS,EACT,4BAA4B,EAC5BY,UAAU,CAACZ,SAAS,EACpBW,WAAW,CAACX,SACb,CAAG;QACH,cAAarB,EAAE,CAAE,2BAA4B;QAC7C;QACA;QACA;QAAA;QACA2B,WAAW,EACVA,WAAW,GAAGuB,SAAS,GAAGlD,EAAE,CAAE,uBAAwB,CACtD;QACD4B,KAAK,EAAGD,WAAa;QACrBc,QAAQ,EAAKK,KAAK,IACjB1B,aAAa,CAAE;UAAEO,WAAW,EAAEmB,KAAK,CAACC,MAAM,CAACnB;QAAM,CAAE,CACnD;QACD,iBAAgBF,QAAU;QAC1ByB,KAAK,EAAG;UACP,GAAGnB,WAAW,CAACmB,KAAK;UACpB,GAAGlB,UAAU,CAACkB;QACf;MAAG,CACH,CAAC;IAAA,CACG,CAAC;EAAA,CACH,CAAC;AAER;AAEA,eAAejC,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["clsx","__","InspectorControls","RichText","useBlockProps","__experimentalUseBorderProps","useBorderProps","__experimentalUseColorProps","useColorProps","PanelBody","TextControl","CheckboxControl","useRef","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","InputFieldBlock","attributes","setAttributes","className","type","name","label","inlineLabel","required","placeholder","value","blockProps","ref","TagName","borderProps","colorProps","current","focus","controls","children","title","__nextHasNoMarginBottom","checked","onChange","newVal","group","autoComplete","help","event","target","tagName","newLabel","undefined","style"],"sources":["@wordpress/block-library/src/form-input/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInspectorControls,\n\tRichText,\n\tuseBlockProps,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalUseColorProps as useColorProps,\n} from '@wordpress/block-editor';\nimport { PanelBody, TextControl, CheckboxControl } from '@wordpress/components';\n\nimport { useRef } from '@wordpress/element';\n\nfunction InputFieldBlock( { attributes, setAttributes, className } ) {\n\tconst { type, name, label, inlineLabel, required, placeholder, value } =\n\t\tattributes;\n\tconst blockProps = useBlockProps();\n\tconst ref = useRef();\n\tconst TagName = type === 'textarea' ? 'textarea' : 'input';\n\n\tconst borderProps = useBorderProps( attributes );\n\tconst colorProps = useColorProps( attributes );\n\tif ( ref.current ) {\n\t\tref.current.focus();\n\t}\n\n\tconst controls = (\n\t\t<>\n\t\t\t{ 'hidden' !== type && (\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t\t{ 'checkbox' !== type && (\n\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Inline label' ) }\n\t\t\t\t\t\t\t\tchecked={ inlineLabel }\n\t\t\t\t\t\t\t\tonChange={ ( newVal ) => {\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tinlineLabel: newVal,\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<CheckboxControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Required' ) }\n\t\t\t\t\t\t\tchecked={ required }\n\t\t\t\t\t\t\tonChange={ ( newVal ) => {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\trequired: newVal,\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</PanelBody>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\tvalue={ name }\n\t\t\t\t\tonChange={ ( newVal ) => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tname: newVal,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t'Affects the \"name\" atribute of the input element, and is used as a name for the form submission results.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n\n\tif ( 'hidden' === type ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ controls }\n\t\t\t\t<input\n\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t'wp-block-form-input__input',\n\t\t\t\t\t\tcolorProps.className,\n\t\t\t\t\t\tborderProps.className\n\t\t\t\t\t) }\n\t\t\t\t\taria-label={ __( 'Value' ) }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ ( event ) =>\n\t\t\t\t\t\tsetAttributes( { value: event.target.value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t{ controls }\n\t\t\t<span\n\t\t\t\tclassName={ clsx( 'wp-block-form-input__label', {\n\t\t\t\t\t'is-label-inline': inlineLabel || 'checkbox' === type,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<RichText\n\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\tclassName=\"wp-block-form-input__label-content\"\n\t\t\t\t\tvalue={ label }\n\t\t\t\t\tonChange={ ( newLabel ) =>\n\t\t\t\t\t\tsetAttributes( { label: newLabel } )\n\t\t\t\t\t}\n\t\t\t\t\taria-label={ label ? __( 'Label' ) : __( 'Empty label' ) }\n\t\t\t\t\tdata-empty={ label ? false : true }\n\t\t\t\t\tplaceholder={ __( 'Type the label for this input' ) }\n\t\t\t\t/>\n\t\t\t\t<TagName\n\t\t\t\t\ttype={ 'textarea' === type ? undefined : type }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t'wp-block-form-input__input',\n\t\t\t\t\t\tcolorProps.className,\n\t\t\t\t\t\tborderProps.className\n\t\t\t\t\t) }\n\t\t\t\t\taria-label={ __( 'Optional placeholder text' ) }\n\t\t\t\t\t// We hide the placeholder field's placeholder when there is a value. This\n\t\t\t\t\t// stops screen readers from reading the placeholder field's placeholder\n\t\t\t\t\t// which is confusing.\n\t\t\t\t\tplaceholder={\n\t\t\t\t\t\tplaceholder ? undefined : __( 'Optional placeholder…' )\n\t\t\t\t\t}\n\t\t\t\t\tvalue={ placeholder }\n\t\t\t\t\tonChange={ ( event ) =>\n\t\t\t\t\t\tsetAttributes( { placeholder: event.target.value } )\n\t\t\t\t\t}\n\t\t\t\t\taria-required={ required }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...borderProps.style,\n\t\t\t\t\t\t...colorProps.style,\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</span>\n\t\t</div>\n\t);\n}\n\nexport default InputFieldBlock;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,iBAAiB,EACjBC,QAAQ,EACRC,aAAa,EACbC,4BAA4B,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clsx from 'clsx';
7
7
  * WordPress dependencies
8
8
  */
9
9
  import { compose } from '@wordpress/compose';
10
- import { BaseControl, PanelBody, SelectControl, ToggleControl, RangeControl, Spinner, withNotices } from '@wordpress/components';
10
+ import { BaseControl, PanelBody, SelectControl, ToggleControl, RangeControl, Spinner, MenuGroup, MenuItem, ToolbarDropdownMenu, withNotices } from '@wordpress/components';
11
11
  import { store as blockEditorStore, MediaPlaceholder, InspectorControls, useBlockProps, useInnerBlocksProps, BlockControls, MediaReplaceFlow } from '@wordpress/block-editor';
12
12
  import { Platform, useEffect, useMemo } from '@wordpress/element';
13
13
  import { __, _x, sprintf } from '@wordpress/i18n';
@@ -17,6 +17,7 @@ import { View } from '@wordpress/primitives';
17
17
  import { createBlock } from '@wordpress/blocks';
18
18
  import { createBlobURL } from '@wordpress/blob';
19
19
  import { store as noticesStore } from '@wordpress/notices';
20
+ import { link as linkIcon, customLink, image as imageIcon, linkOff } from '@wordpress/icons';
20
21
 
21
22
  /**
22
23
  * Internal dependencies
@@ -36,14 +37,20 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
36
37
  import { Fragment as _Fragment } from "react/jsx-runtime";
37
38
  const MAX_COLUMNS = 8;
38
39
  const linkOptions = [{
40
+ icon: customLink,
41
+ label: __('Link images to attachment pages'),
39
42
  value: LINK_DESTINATION_ATTACHMENT,
40
- label: __('Attachment Page')
43
+ noticeText: __('Attachment Pages')
41
44
  }, {
45
+ icon: imageIcon,
46
+ label: __('Link images to media files'),
42
47
  value: LINK_DESTINATION_MEDIA,
43
- label: __('Media File')
48
+ noticeText: __('Media Files')
44
49
  }, {
50
+ icon: linkOff,
51
+ label: _x('None', 'Media item link option'),
45
52
  value: LINK_DESTINATION_NONE,
46
- label: _x('None', 'Media item link option')
53
+ noticeText: __('None')
47
54
  }];
48
55
  const ALLOWED_MEDIA_TYPES = ['image'];
49
56
  const PLACEHOLDER_TEXT = Platform.isNative ? __('Add media') : __('Drag images, upload new ones or select files from your library.');
@@ -246,7 +253,7 @@ function GalleryEdit(props) {
246
253
  updateBlockAttributes(blocks, changedAttributes, true);
247
254
  const linkToText = [...linkOptions].find(linkType => linkType.value === value);
248
255
  createSuccessNotice(sprintf( /* translators: %s: image size settings */
249
- __('All gallery image links updated to: %s'), linkToText.label), {
256
+ __('All gallery image links updated to: %s'), linkToText.noticeText), {
250
257
  id: 'gallery-attributes-linkTo',
251
258
  type: 'snackbar'
252
259
  });
@@ -392,15 +399,15 @@ function GalleryEdit(props) {
392
399
  onChange: updateImagesSize,
393
400
  hideCancelButton: true,
394
401
  size: "__unstable-large"
395
- }), /*#__PURE__*/_jsx(SelectControl, {
402
+ }), Platform.isNative ? /*#__PURE__*/_jsx(SelectControl, {
396
403
  __nextHasNoMarginBottom: true,
397
- label: __('Link to'),
404
+ label: __('Link'),
398
405
  value: linkTo,
399
406
  onChange: setLinkTo,
400
407
  options: linkOptions,
401
408
  hideCancelButton: true,
402
409
  size: "__unstable-large"
403
- }), /*#__PURE__*/_jsx(ToggleControl, {
410
+ }) : null, /*#__PURE__*/_jsx(ToggleControl, {
404
411
  __nextHasNoMarginBottom: true,
405
412
  label: __('Crop images to fit'),
406
413
  checked: !!imageCrop,
@@ -425,7 +432,34 @@ function GalleryEdit(props) {
425
432
  })]
426
433
  })]
427
434
  })
428
- }), Platform.isWeb && /*#__PURE__*/_jsxs(_Fragment, {
435
+ }), Platform.isWeb ? /*#__PURE__*/_jsx(BlockControls, {
436
+ group: "block",
437
+ children: /*#__PURE__*/_jsx(ToolbarDropdownMenu, {
438
+ icon: linkIcon,
439
+ label: __('Link'),
440
+ children: ({
441
+ onClose
442
+ }) => /*#__PURE__*/_jsx(MenuGroup, {
443
+ children: linkOptions.map(linkItem => {
444
+ const isOptionSelected = linkTo === linkItem.value;
445
+ return /*#__PURE__*/_jsx(MenuItem, {
446
+ isSelected: isOptionSelected,
447
+ className: clsx('components-dropdown-menu__menu-item', {
448
+ 'is-active': isOptionSelected
449
+ }),
450
+ iconPosition: "left",
451
+ icon: linkItem.icon,
452
+ onClick: () => {
453
+ setLinkTo(linkItem.value);
454
+ onClose();
455
+ },
456
+ role: "menuitemradio",
457
+ children: linkItem.label
458
+ }, linkItem.value);
459
+ })
460
+ })
461
+ })
462
+ }) : null, Platform.isWeb && /*#__PURE__*/_jsxs(_Fragment, {
429
463
  children: [!multiGallerySelection && /*#__PURE__*/_jsx(BlockControls, {
430
464
  group: "other",
431
465
  children: /*#__PURE__*/_jsx(MediaReplaceFlow, {