@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
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 9.5.0 (2024-08-07)
6
+
7
+ ### New Feature
8
+
9
+ - Query Loop Block: Moves per page, offset, and pages controls into Inspector Controls. ([#58207](https://github.com/WordPress/gutenberg/pull/58207))
10
+
5
11
  ## 9.4.0 (2024-07-24)
6
12
 
7
13
  ## 9.3.0 (2024-07-10)
@@ -52,6 +52,7 @@ const AvatarInspectorControls = ({
52
52
  }),
53
53
  checked: attributes.isLink
54
54
  }), attributes.isLink && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToggleControl, {
55
+ __nextHasNoMarginBottom: true,
55
56
  label: (0, _i18n.__)('Open in new tab'),
56
57
  onChange: value => setAttributes({
57
58
  linkTarget: value ? '_blank' : '_self'
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_components","_i18n","_url","_hooks","_userControl","_jsxRuntime","AvatarInspectorControls","setAttributes","avatar","attributes","selectUser","jsx","InspectorControls","children","jsxs","PanelBody","title","__","RangeControl","__nextHasNoMarginBottom","__next40pxDefaultSize","label","onChange","newSize","size","min","minSize","max","maxSize","initialPosition","value","ToggleControl","isLink","checked","linkTarget","default","userId","ResizableAvatar","blockProps","isSelected","borderProps","useBorderProps","doubledSizedSrc","addQueryArgs","removeQueryArgs","src","s","ResizableBox","width","height","showHandle","onResizeStop","event","direction","elt","delta","parseInt","lockAspectRatio","enable","top","right","isRTL","bottom","left","minWidth","maxWidth","alt","className","clsx","style","CommentEdit","context","commentId","useBlockProps","useCommentAvatar","Fragment","href","onClick","preventDefault","UserEdit","postId","postType","useUserAvatar","Edit","props"],"sources":["@wordpress/block-library/src/avatar/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tInspectorControls,\n\tuseBlockProps,\n\t__experimentalUseBorderProps as useBorderProps,\n} from '@wordpress/block-editor';\nimport {\n\tPanelBody,\n\tRangeControl,\n\tResizableBox,\n\tToggleControl,\n} from '@wordpress/components';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { addQueryArgs, removeQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { useUserAvatar, useCommentAvatar } from './hooks';\nimport UserControl from './user-control';\n\nconst AvatarInspectorControls = ( {\n\tsetAttributes,\n\tavatar,\n\tattributes,\n\tselectUser,\n} ) => (\n\t<InspectorControls>\n\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t<RangeControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tlabel={ __( 'Image size' ) }\n\t\t\t\tonChange={ ( newSize ) =>\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tsize: newSize,\n\t\t\t\t\t} )\n\t\t\t\t}\n\t\t\t\tmin={ avatar.minSize }\n\t\t\t\tmax={ avatar.maxSize }\n\t\t\t\tinitialPosition={ attributes?.size }\n\t\t\t\tvalue={ attributes?.size }\n\t\t\t/>\n\t\t\t<ToggleControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Link to user profile' ) }\n\t\t\t\tonChange={ () =>\n\t\t\t\t\tsetAttributes( { isLink: ! attributes.isLink } )\n\t\t\t\t}\n\t\t\t\tchecked={ attributes.isLink }\n\t\t\t/>\n\t\t\t{ attributes.isLink && (\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tlinkTarget: value ? '_blank' : '_self',\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tchecked={ attributes.linkTarget === '_blank' }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ selectUser && (\n\t\t\t\t<UserControl\n\t\t\t\t\tvalue={ attributes?.userId }\n\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tuserId: value,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</PanelBody>\n\t</InspectorControls>\n);\n\nconst ResizableAvatar = ( {\n\tsetAttributes,\n\tattributes,\n\tavatar,\n\tblockProps,\n\tisSelected,\n} ) => {\n\tconst borderProps = useBorderProps( attributes );\n\tconst doubledSizedSrc = addQueryArgs(\n\t\tremoveQueryArgs( avatar?.src, [ 's' ] ),\n\t\t{\n\t\t\ts: attributes?.size * 2,\n\t\t}\n\t);\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t<ResizableBox\n\t\t\t\tsize={ {\n\t\t\t\t\twidth: attributes.size,\n\t\t\t\t\theight: attributes.size,\n\t\t\t\t} }\n\t\t\t\tshowHandle={ isSelected }\n\t\t\t\tonResizeStop={ ( event, direction, elt, delta ) => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tsize: parseInt(\n\t\t\t\t\t\t\tattributes.size + ( delta.height || delta.width ),\n\t\t\t\t\t\t\t10\n\t\t\t\t\t\t),\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t\tlockAspectRatio\n\t\t\t\tenable={ {\n\t\t\t\t\ttop: false,\n\t\t\t\t\tright: ! isRTL(),\n\t\t\t\t\tbottom: true,\n\t\t\t\t\tleft: isRTL(),\n\t\t\t\t} }\n\t\t\t\tminWidth={ avatar.minSize }\n\t\t\t\tmaxWidth={ avatar.maxSize }\n\t\t\t>\n\t\t\t\t<img\n\t\t\t\t\tsrc={ doubledSizedSrc }\n\t\t\t\t\talt={ avatar.alt }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'avatar',\n\t\t\t\t\t\t'avatar-' + attributes.size,\n\t\t\t\t\t\t'photo',\n\t\t\t\t\t\t'wp-block-avatar__image',\n\t\t\t\t\t\tborderProps.className\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ borderProps.style }\n\t\t\t\t/>\n\t\t\t</ResizableBox>\n\t\t</div>\n\t);\n};\nconst CommentEdit = ( { attributes, context, setAttributes, isSelected } ) => {\n\tconst { commentId } = context;\n\tconst blockProps = useBlockProps();\n\tconst avatar = useCommentAvatar( { commentId } );\n\treturn (\n\t\t<>\n\t\t\t<AvatarInspectorControls\n\t\t\t\tavatar={ avatar }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\tattributes={ attributes }\n\t\t\t\tselectUser={ false }\n\t\t\t/>\n\t\t\t{ attributes.isLink ? (\n\t\t\t\t<a\n\t\t\t\t\thref=\"#avatar-pseudo-link\"\n\t\t\t\t\tclassName=\"wp-block-avatar__link\"\n\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t>\n\t\t\t\t\t<ResizableAvatar\n\t\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\t\tavatar={ avatar }\n\t\t\t\t\t\tblockProps={ blockProps }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t/>\n\t\t\t\t</a>\n\t\t\t) : (\n\t\t\t\t<ResizableAvatar\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tavatar={ avatar }\n\t\t\t\t\tblockProps={ blockProps }\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n};\n\nconst UserEdit = ( { attributes, context, setAttributes, isSelected } ) => {\n\tconst { postId, postType } = context;\n\tconst avatar = useUserAvatar( {\n\t\tuserId: attributes?.userId,\n\t\tpostId,\n\t\tpostType,\n\t} );\n\tconst blockProps = useBlockProps();\n\treturn (\n\t\t<>\n\t\t\t<AvatarInspectorControls\n\t\t\t\tselectUser\n\t\t\t\tattributes={ attributes }\n\t\t\t\tavatar={ avatar }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t/>\n\t\t\t{ attributes.isLink ? (\n\t\t\t\t<a\n\t\t\t\t\thref=\"#avatar-pseudo-link\"\n\t\t\t\t\tclassName=\"wp-block-avatar__link\"\n\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t>\n\t\t\t\t\t<ResizableAvatar\n\t\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\t\tavatar={ avatar }\n\t\t\t\t\t\tblockProps={ blockProps }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t/>\n\t\t\t\t</a>\n\t\t\t) : (\n\t\t\t\t<ResizableAvatar\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tavatar={ avatar }\n\t\t\t\t\tblockProps={ blockProps }\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n};\n\nexport default function Edit( props ) {\n\t// Don't show the Comment Edit controls if we have a comment ID set, or if we're in the Site Editor (where it is `null`).\n\tif ( props?.context?.commentId || props?.context?.commentId === null ) {\n\t\treturn <CommentEdit { ...props } />;\n\t}\n\treturn <UserEdit { ...props } />;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAF,OAAA;AAMA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAP,sBAAA,CAAAC,OAAA;AAAyC,IAAAO,WAAA,GAAAP,OAAA;AA1BzC;AACA;AACA;;AAGA;AACA;AACA;;AAeA;AACA;AACA;;AAIA,MAAMQ,uBAAuB,GAAGA,CAAE;EACjCC,aAAa;EACbC,MAAM;EACNC,UAAU;EACVC;AACD,CAAC,kBACA,IAAAL,WAAA,CAAAM,GAAA,EAACZ,YAAA,CAAAa,iBAAiB;EAAAC,QAAA,eACjB,IAAAR,WAAA,CAAAS,IAAA,EAACd,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,aAAa,EAAGA;MAAe,CAC/B;IAAC,CACA,CAAC,gBAEJ,IAAAF,WAAA,CAAAM,GAAA,EAAC0B,eAAe;MACf5B,UAAU,EAAGA,UAAY;MACzBD,MAAM,EAAGA,MAAQ;MACjB8B,UAAU,EAAGA,UAAY;MACzBC,UAAU,EAAGA,UAAY;MACzBhC,aAAa,EAAGA;IAAe,CAC/B,CACD;EAAA,CACA,CAAC;AAEL,CAAC;AAEc,SAAS4E,IAAIA,CAAEC,KAAK,EAAG;EACrC;EACA,IAAKA,KAAK,EAAEb,OAAO,EAAEC,SAAS,IAAIY,KAAK,EAAEb,OAAO,EAAEC,SAAS,KAAK,IAAI,EAAG;IACtE,oBAAO,IAAAnE,WAAA,CAAAM,GAAA,EAAC2D,WAAW;MAAA,GAAMc;IAAK,CAAI,CAAC;EACpC;EACA,oBAAO,IAAA/E,WAAA,CAAAM,GAAA,EAACoE,QAAQ;IAAA,GAAMK;EAAK,CAAI,CAAC;AACjC","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_components","_i18n","_url","_hooks","_userControl","_jsxRuntime","AvatarInspectorControls","setAttributes","avatar","attributes","selectUser","jsx","InspectorControls","children","jsxs","PanelBody","title","__","RangeControl","__nextHasNoMarginBottom","__next40pxDefaultSize","label","onChange","newSize","size","min","minSize","max","maxSize","initialPosition","value","ToggleControl","isLink","checked","linkTarget","default","userId","ResizableAvatar","blockProps","isSelected","borderProps","useBorderProps","doubledSizedSrc","addQueryArgs","removeQueryArgs","src","s","ResizableBox","width","height","showHandle","onResizeStop","event","direction","elt","delta","parseInt","lockAspectRatio","enable","top","right","isRTL","bottom","left","minWidth","maxWidth","alt","className","clsx","style","CommentEdit","context","commentId","useBlockProps","useCommentAvatar","Fragment","href","onClick","preventDefault","UserEdit","postId","postType","useUserAvatar","Edit","props"],"sources":["@wordpress/block-library/src/avatar/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tInspectorControls,\n\tuseBlockProps,\n\t__experimentalUseBorderProps as useBorderProps,\n} from '@wordpress/block-editor';\nimport {\n\tPanelBody,\n\tRangeControl,\n\tResizableBox,\n\tToggleControl,\n} from '@wordpress/components';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { addQueryArgs, removeQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { useUserAvatar, useCommentAvatar } from './hooks';\nimport UserControl from './user-control';\n\nconst AvatarInspectorControls = ( {\n\tsetAttributes,\n\tavatar,\n\tattributes,\n\tselectUser,\n} ) => (\n\t<InspectorControls>\n\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t<RangeControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tlabel={ __( 'Image size' ) }\n\t\t\t\tonChange={ ( newSize ) =>\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tsize: newSize,\n\t\t\t\t\t} )\n\t\t\t\t}\n\t\t\t\tmin={ avatar.minSize }\n\t\t\t\tmax={ avatar.maxSize }\n\t\t\t\tinitialPosition={ attributes?.size }\n\t\t\t\tvalue={ attributes?.size }\n\t\t\t/>\n\t\t\t<ToggleControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Link to user profile' ) }\n\t\t\t\tonChange={ () =>\n\t\t\t\t\tsetAttributes( { isLink: ! attributes.isLink } )\n\t\t\t\t}\n\t\t\t\tchecked={ attributes.isLink }\n\t\t\t/>\n\t\t\t{ attributes.isLink && (\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tlinkTarget: value ? '_blank' : '_self',\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tchecked={ attributes.linkTarget === '_blank' }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ selectUser && (\n\t\t\t\t<UserControl\n\t\t\t\t\tvalue={ attributes?.userId }\n\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tuserId: value,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</PanelBody>\n\t</InspectorControls>\n);\n\nconst ResizableAvatar = ( {\n\tsetAttributes,\n\tattributes,\n\tavatar,\n\tblockProps,\n\tisSelected,\n} ) => {\n\tconst borderProps = useBorderProps( attributes );\n\tconst doubledSizedSrc = addQueryArgs(\n\t\tremoveQueryArgs( avatar?.src, [ 's' ] ),\n\t\t{\n\t\t\ts: attributes?.size * 2,\n\t\t}\n\t);\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t<ResizableBox\n\t\t\t\tsize={ {\n\t\t\t\t\twidth: attributes.size,\n\t\t\t\t\theight: attributes.size,\n\t\t\t\t} }\n\t\t\t\tshowHandle={ isSelected }\n\t\t\t\tonResizeStop={ ( event, direction, elt, delta ) => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tsize: parseInt(\n\t\t\t\t\t\t\tattributes.size + ( delta.height || delta.width ),\n\t\t\t\t\t\t\t10\n\t\t\t\t\t\t),\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t\tlockAspectRatio\n\t\t\t\tenable={ {\n\t\t\t\t\ttop: false,\n\t\t\t\t\tright: ! isRTL(),\n\t\t\t\t\tbottom: true,\n\t\t\t\t\tleft: isRTL(),\n\t\t\t\t} }\n\t\t\t\tminWidth={ avatar.minSize }\n\t\t\t\tmaxWidth={ avatar.maxSize }\n\t\t\t>\n\t\t\t\t<img\n\t\t\t\t\tsrc={ doubledSizedSrc }\n\t\t\t\t\talt={ avatar.alt }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'avatar',\n\t\t\t\t\t\t'avatar-' + attributes.size,\n\t\t\t\t\t\t'photo',\n\t\t\t\t\t\t'wp-block-avatar__image',\n\t\t\t\t\t\tborderProps.className\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ borderProps.style }\n\t\t\t\t/>\n\t\t\t</ResizableBox>\n\t\t</div>\n\t);\n};\nconst CommentEdit = ( { attributes, context, setAttributes, isSelected } ) => {\n\tconst { commentId } = context;\n\tconst blockProps = useBlockProps();\n\tconst avatar = useCommentAvatar( { commentId } );\n\treturn (\n\t\t<>\n\t\t\t<AvatarInspectorControls\n\t\t\t\tavatar={ avatar }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\tattributes={ attributes }\n\t\t\t\tselectUser={ false }\n\t\t\t/>\n\t\t\t{ attributes.isLink ? (\n\t\t\t\t<a\n\t\t\t\t\thref=\"#avatar-pseudo-link\"\n\t\t\t\t\tclassName=\"wp-block-avatar__link\"\n\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t>\n\t\t\t\t\t<ResizableAvatar\n\t\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\t\tavatar={ avatar }\n\t\t\t\t\t\tblockProps={ blockProps }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t/>\n\t\t\t\t</a>\n\t\t\t) : (\n\t\t\t\t<ResizableAvatar\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tavatar={ avatar }\n\t\t\t\t\tblockProps={ blockProps }\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n};\n\nconst UserEdit = ( { attributes, context, setAttributes, isSelected } ) => {\n\tconst { postId, postType } = context;\n\tconst avatar = useUserAvatar( {\n\t\tuserId: attributes?.userId,\n\t\tpostId,\n\t\tpostType,\n\t} );\n\tconst blockProps = useBlockProps();\n\treturn (\n\t\t<>\n\t\t\t<AvatarInspectorControls\n\t\t\t\tselectUser\n\t\t\t\tattributes={ attributes }\n\t\t\t\tavatar={ avatar }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t/>\n\t\t\t{ attributes.isLink ? (\n\t\t\t\t<a\n\t\t\t\t\thref=\"#avatar-pseudo-link\"\n\t\t\t\t\tclassName=\"wp-block-avatar__link\"\n\t\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t\t>\n\t\t\t\t\t<ResizableAvatar\n\t\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\t\tavatar={ avatar }\n\t\t\t\t\t\tblockProps={ blockProps }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t/>\n\t\t\t\t</a>\n\t\t\t) : (\n\t\t\t\t<ResizableAvatar\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tavatar={ avatar }\n\t\t\t\t\tblockProps={ blockProps }\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n};\n\nexport default function Edit( props ) {\n\t// Don't show the Comment Edit controls if we have a comment ID set, or if we're in the Site Editor (where it is `null`).\n\tif ( props?.context?.commentId || props?.context?.commentId === null ) {\n\t\treturn <CommentEdit { ...props } />;\n\t}\n\treturn <UserEdit { ...props } />;\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAF,OAAA;AAMA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAP,sBAAA,CAAAC,OAAA;AAAyC,IAAAO,WAAA,GAAAP,OAAA;AA1BzC;AACA;AACA;;AAGA;AACA;AACA;;AAeA;AACA;AACA;;AAIA,MAA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KAAK,CAAC0B,cAAc,CAAC,CAAG;MAAAjE,QAAA,eAE/C,IAAAR,WAAA,CAAAM,GAAA,EAAC0B,eAAe;QACf5B,UAAU,EAAGA,UAAY;QACzBD,MAAM,EAAGA,MAAQ;QACjB8B,UAAU,EAAGA,UAAY;QACzBC,UAAU,EAAGA,UAAY;QACzBhC,aAAa,EAAGA;MAAe,CAC/B;IAAC,CACA,CAAC,gBAEJ,IAAAF,WAAA,CAAAM,GAAA,EAAC0B,eAAe;MACf5B,UAAU,EAAGA,UAAY;MACzBD,MAAM,EAAGA,MAAQ;MACjB8B,UAAU,EAAGA,UAAY;MACzBC,UAAU,EAAGA,UAAY;MACzBhC,aAAa,EAAGA;IAAe,CAC/B,CACD;EAAA,CACA,CAAC;AAEL,CAAC;AAEc,SAAS4E,IAAIA,CAAEC,KAAK,EAAG;EACrC;EACA,IAAKA,KAAK,EAAEb,OAAO,EAAEC,SAAS,IAAIY,KAAK,EAAEb,OAAO,EAAEC,SAAS,KAAK,IAAI,EAAG;IACtE,oBAAO,IAAAnE,WAAA,CAAAM,GAAA,EAAC2D,WAAW;MAAA,GAAMc;IAAK,CAAI,CAAC;EACpC;EACA,oBAAO,IAAA/E,WAAA,CAAAM,GAAA,EAACoE,QAAQ;IAAA,GAAMK;EAAK,CAAI,CAAC;AACjC","ignoreList":[]}
@@ -78,6 +78,18 @@ const metadata = exports.metadata = {
78
78
  },
79
79
  interactivity: {
80
80
  clientNavigation: true
81
+ },
82
+ __experimentalBorder: {
83
+ radius: true,
84
+ color: true,
85
+ width: true,
86
+ style: true,
87
+ __experimentalDefaultControls: {
88
+ radius: true,
89
+ color: true,
90
+ width: true,
91
+ style: true
92
+ }
81
93
  }
82
94
  },
83
95
  editorStyle: "wp-block-categories-editor",
@@ -1 +1 @@
1
- {"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","metadata","exports","$schema","apiVersion","name","title","category","description","textdomain","attributes","displayAsDropdown","type","showHierarchy","showPostCounts","showOnlyTopLevel","showEmpty","label","__experimentalRole","showLabel","supports","align","html","spacing","margin","padding","__experimentalDefaultControls","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","editorStyle","style","settings","icon","example","edit","init","initBlock"],"sources":["@wordpress/block-library/src/categories/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { category 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';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\tedit,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AAVA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAI,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,iBAAA;MAAAC,IAAA;MAAA;IAAA;IAAAC,aAAA;MAAAD,IAAA;MAAA;IAAA;IAAAE,cAAA;MAAAF,IAAA;MAAA;IAAA;IAAAG,gBAAA;MAAAH,IAAA;MAAA;IAAA;IAAAI,SAAA;MAAAJ,IAAA;MAAA;IAAA;IAAAK,KAAA;MAAAL,IAAA;MAAAM,kBAAA;IAAA;IAAAC,SAAA;MAAAP,IAAA;MAAA;IAAA;EAAA;EAAAQ,QAAA;IAAAC,KAAA;IAAAC,IAAA;IAAAC,OAAA;MAAAC,MAAA;MAAAC,OAAA;MAAAC,6BAAA;QAAAF,MAAA;QAAAC,OAAA;MAAA;IAAA;IAAAE,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAT,6BAAA;QAAAE,QAAA;MAAA;IAAA;IAAAQ,aAAA;MAAAC,gBAAA;IAAA;EAAA;EAAAC,WAAA;EAAAC,KAAA;AAAA;AAOA,MAAM;EAAElC;AAAK,CAAC,GAAGJ,QAAQ;AAACC,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAInB,MAAMmC,QAAQ,GAAAtC,OAAA,CAAAsC,QAAA,GAAG;EACvBC,IAAI,EAAJA,eAAI;EACJC,OAAO,EAAE,CAAC,CAAC;EACXC,IAAI,EAAJA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAExC,IAAI;EAAEJ,QAAQ;EAAEuC;AAAS,CAAE,CAAC;AAACtC,OAAA,CAAA0C,IAAA,GAAAA,IAAA","ignoreList":[]}
1
+ {"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","metadata","exports","$schema","apiVersion","name","title","category","description","textdomain","attributes","displayAsDropdown","type","showHierarchy","showPostCounts","showOnlyTopLevel","showEmpty","label","__experimentalRole","showLabel","supports","align","html","spacing","margin","padding","__experimentalDefaultControls","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","__experimentalBorder","radius","color","width","style","editorStyle","settings","icon","example","edit","init","initBlock"],"sources":["@wordpress/block-library/src/categories/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { category 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';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {},\n\tedit,\n};\n\nexport const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,GAAAA,IAAA;AAInB,MAAMuC,QAAQ,GAAA1C,OAAA,CAAA0C,QAAA,GAAG;EACvBC,IAAI,EAAJA,eAAI;EACJC,OAAO,EAAE,CAAC,CAAC;EACXC,IAAI,EAAJA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAE5C,IAAI;EAAEJ,QAAQ;EAAE2C;AAAS,CAAE,CAAC;AAAC1C,OAAA,CAAA8C,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -31,8 +31,8 @@ function ColumnInspectorControls({
31
31
  title: (0, _i18n.__)('Settings'),
32
32
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalUnitControl, {
33
33
  label: (0, _i18n.__)('Width'),
34
- labelPosition: "edge",
35
- __unstableInputWidth: "80px",
34
+ __unstableInputWidth: "calc(50% - 8px)",
35
+ __next40pxDefaultSize: true,
36
36
  value: width || '',
37
37
  onChange: nextWidth => {
38
38
  nextWidth = 0 > parseFloat(nextWidth) ? '0' : nextWidth;
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_components","_data","_i18n","_jsxRuntime","ColumnInspectorControls","width","setAttributes","availableUnits","useSettings","units","useCustomUnits","jsx","PanelBody","title","__","children","__experimentalUnitControl","label","labelPosition","__unstableInputWidth","value","onChange","nextWidth","parseFloat","ColumnEdit","attributes","verticalAlignment","templateLock","allowedBlocks","clientId","classes","clsx","columnsIds","hasChildBlocks","rootClientId","useSelect","select","getBlockOrder","getBlockRootClientId","blockEditorStore","rootId","length","updateBlockAttributes","useDispatch","updateAlignment","widthWithUnit","Number","isFinite","blockProps","useBlockProps","className","style","flexBasis","undefined","columnsCount","currentColumnPosition","indexOf","sprintf","innerBlocksProps","useInnerBlocksProps","renderAppender","InnerBlocks","ButtonBlockAppender","jsxs","Fragment","BlockControls","BlockVerticalAlignmentToolbar","controls","InspectorControls","_default","exports","default"],"sources":["@wordpress/block-library/src/column/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tInnerBlocks,\n\tBlockControls,\n\tBlockVerticalAlignmentToolbar,\n\tInspectorControls,\n\tuseBlockProps,\n\tuseSettings,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport {\n\t__experimentalUseCustomUnits as useCustomUnits,\n\tPanelBody,\n\t__experimentalUnitControl as UnitControl,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { sprintf, __ } from '@wordpress/i18n';\n\nfunction ColumnInspectorControls( { width, setAttributes } ) {\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ '%', 'px', 'em', 'rem', 'vw' ],\n\t} );\n\treturn (\n\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t<UnitControl\n\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\tlabelPosition=\"edge\"\n\t\t\t\t__unstableInputWidth=\"80px\"\n\t\t\t\tvalue={ width || '' }\n\t\t\t\tonChange={ ( nextWidth ) => {\n\t\t\t\t\tnextWidth = 0 > parseFloat( nextWidth ) ? '0' : nextWidth;\n\t\t\t\t\tsetAttributes( { width: nextWidth } );\n\t\t\t\t} }\n\t\t\t\tunits={ units }\n\t\t\t/>\n\t\t</PanelBody>\n\t);\n}\n\nfunction ColumnEdit( {\n\tattributes: { verticalAlignment, width, templateLock, allowedBlocks },\n\tsetAttributes,\n\tclientId,\n} ) {\n\tconst classes = clsx( 'block-core-columns', {\n\t\t[ `is-vertically-aligned-${ verticalAlignment }` ]: verticalAlignment,\n\t} );\n\tconst { columnsIds, hasChildBlocks, rootClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockOrder, getBlockRootClientId } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst rootId = getBlockRootClientId( clientId );\n\n\t\t\treturn {\n\t\t\t\thasChildBlocks: getBlockOrder( clientId ).length > 0,\n\t\t\t\trootClientId: rootId,\n\t\t\t\tcolumnsIds: getBlockOrder( rootId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\tconst updateAlignment = ( value ) => {\n\t\t// Update own alignment.\n\t\tsetAttributes( { verticalAlignment: value } );\n\t\t// Reset parent Columns block.\n\t\tupdateBlockAttributes( rootClientId, {\n\t\t\tverticalAlignment: null,\n\t\t} );\n\t};\n\n\tconst widthWithUnit = Number.isFinite( width ) ? width + '%' : width;\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classes,\n\t\tstyle: widthWithUnit ? { flexBasis: widthWithUnit } : undefined,\n\t} );\n\n\tconst columnsCount = columnsIds.length;\n\tconst currentColumnPosition = columnsIds.indexOf( clientId ) + 1;\n\n\tconst label = sprintf(\n\t\t/* translators: 1: Block label (i.e. \"Block: Column\"), 2: Position of the selected block, 3: Total number of sibling blocks of the same type */\n\t\t__( '%1$s (%2$d of %3$d)' ),\n\t\tblockProps[ 'aria-label' ],\n\t\tcurrentColumnPosition,\n\t\tcolumnsCount\n\t);\n\n\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{ ...blockProps, 'aria-label': label },\n\t\t{\n\t\t\ttemplateLock,\n\t\t\tallowedBlocks,\n\t\t\trenderAppender: hasChildBlocks\n\t\t\t\t? undefined\n\t\t\t\t: InnerBlocks.ButtonBlockAppender,\n\t\t}\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<BlockVerticalAlignmentToolbar\n\t\t\t\t\tonChange={ updateAlignment }\n\t\t\t\t\tvalue={ verticalAlignment }\n\t\t\t\t\tcontrols={ [ 'top', 'center', 'bottom', 'stretch' ] }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls>\n\t\t\t\t<ColumnInspectorControls\n\t\t\t\t\twidth={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;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc/C,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_components","_data","_i18n","_jsxRuntime","ColumnInspectorControls","width","setAttributes","availableUnits","useSettings","units","useCustomUnits","jsx","PanelBody","title","__","children","__experimentalUnitControl","label","__unstableInputWidth","__next40pxDefaultSize","value","onChange","nextWidth","parseFloat","ColumnEdit","attributes","verticalAlignment","templateLock","allowedBlocks","clientId","classes","clsx","columnsIds","hasChildBlocks","rootClientId","useSelect","select","getBlockOrder","getBlockRootClientId","blockEditorStore","rootId","length","updateBlockAttributes","useDispatch","updateAlignment","widthWithUnit","Number","isFinite","blockProps","useBlockProps","className","style","flexBasis","undefined","columnsCount","currentColumnPosition","indexOf","sprintf","innerBlocksProps","useInnerBlocksProps","renderAppender","InnerBlocks","ButtonBlockAppender","jsxs","Fragment","BlockControls","BlockVerticalAlignmentToolbar","controls","InspectorControls","_default","exports","default"],"sources":["@wordpress/block-library/src/column/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tInnerBlocks,\n\tBlockControls,\n\tBlockVerticalAlignmentToolbar,\n\tInspectorControls,\n\tuseBlockProps,\n\tuseSettings,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport {\n\t__experimentalUseCustomUnits as useCustomUnits,\n\tPanelBody,\n\t__experimentalUnitControl as UnitControl,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { sprintf, __ } from '@wordpress/i18n';\n\nfunction ColumnInspectorControls( { width, setAttributes } ) {\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ '%', 'px', 'em', 'rem', 'vw' ],\n\t} );\n\treturn (\n\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t<UnitControl\n\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\t__unstableInputWidth=\"calc(50% - 8px)\"\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tvalue={ width || '' }\n\t\t\t\tonChange={ ( nextWidth ) => {\n\t\t\t\t\tnextWidth = 0 > parseFloat( nextWidth ) ? '0' : nextWidth;\n\t\t\t\t\tsetAttributes( { width: nextWidth } );\n\t\t\t\t} }\n\t\t\t\tunits={ units }\n\t\t\t/>\n\t\t</PanelBody>\n\t);\n}\n\nfunction ColumnEdit( {\n\tattributes: { verticalAlignment, width, templateLock, allowedBlocks },\n\tsetAttributes,\n\tclientId,\n} ) {\n\tconst classes = clsx( 'block-core-columns', {\n\t\t[ `is-vertically-aligned-${ verticalAlignment }` ]: verticalAlignment,\n\t} );\n\tconst { columnsIds, hasChildBlocks, rootClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockOrder, getBlockRootClientId } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst rootId = getBlockRootClientId( clientId );\n\n\t\t\treturn {\n\t\t\t\thasChildBlocks: getBlockOrder( clientId ).length > 0,\n\t\t\t\trootClientId: rootId,\n\t\t\t\tcolumnsIds: getBlockOrder( rootId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\tconst updateAlignment = ( value ) => {\n\t\t// Update own alignment.\n\t\tsetAttributes( { verticalAlignment: value } );\n\t\t// Reset parent Columns block.\n\t\tupdateBlockAttributes( rootClientId, {\n\t\t\tverticalAlignment: null,\n\t\t} );\n\t};\n\n\tconst widthWithUnit = Number.isFinite( width ) ? width + '%' : width;\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classes,\n\t\tstyle: widthWithUnit ? { flexBasis: widthWithUnit } : undefined,\n\t} );\n\n\tconst columnsCount = columnsIds.length;\n\tconst currentColumnPosition = columnsIds.indexOf( clientId ) + 1;\n\n\tconst label = sprintf(\n\t\t/* translators: 1: Block label (i.e. \"Block: Column\"), 2: Position of the selected block, 3: Total number of sibling blocks of the same type */\n\t\t__( '%1$s (%2$d of %3$d)' ),\n\t\tblockProps[ 'aria-label' ],\n\t\tcurrentColumnPosition,\n\t\tcolumnsCount\n\t);\n\n\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{ ...blockProps, 'aria-label': label },\n\t\t{\n\t\t\ttemplateLock,\n\t\t\tallowedBlocks,\n\t\t\trenderAppender: hasChildBlocks\n\t\t\t\t? undefined\n\t\t\t\t: InnerBlocks.ButtonBlockAppender,\n\t\t}\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<BlockVerticalAlignmentToolbar\n\t\t\t\t\tonChange={ updateAlignment }\n\t\t\t\t\tvalue={ verticalAlignment }\n\t\t\t\t\tcontrols={ [ 'top', 'center', 'bottom', 'stretch' ] }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls>\n\t\t\t\t<ColumnInspectorControls\n\t\t\t\t\twidth={ width }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<div { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n\nexport default ColumnEdit;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,WAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAA8C,IAAAK,WAAA,GAAAL,OAAA;AAxB9C;AACA;AACA;;AAGA;AACA;AACA;;AAmBA,SAASM,uBAAuBA,CAAE;EAAEC,KAAK;EAAEC;AAAc,CAAC,EAAG;EAC5D,MAAM,CAAEC,cAAc,CAAE,GAAG,IAAAC,wBAAW,EAAE,eAAgB,CAAC;EACzD,MAAMC,KAAK,GAAG,IAAAC,wCAAc,EAA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A5D,WAAA,CAAA6D,QAAA;IAAAjD,QAAA,gBACC,IAAAZ,WAAA,CAAAQ,GAAA,EAACZ,YAAA,CAAAkE,aAAa;MAAAlD,QAAA,eACb,IAAAZ,WAAA,CAAAQ,GAAA,EAACZ,YAAA,CAAAmE,6BAA6B;QAC7B7C,QAAQ,EAAGuB,eAAiB;QAC5BxB,KAAK,EAAGM,iBAAmB;QAC3ByC,QAAQ,EAAG,CAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS;MAAI,CACrD;IAAC,CACY,CAAC,eAChB,IAAAhE,WAAA,CAAAQ,GAAA,EAACZ,YAAA,CAAAqE,iBAAiB;MAAArD,QAAA,eACjB,IAAAZ,WAAA,CAAAQ,GAAA,EAACP,uBAAuB;QACvBC,KAAK,EAAGA,KAAO;QACfC,aAAa,EAAGA;MAAe,CAC/B;IAAC,CACgB,CAAC,eACpB,IAAAH,WAAA,CAAAQ,GAAA;MAAA,GAAU+C;IAAgB,CAAI,CAAC;EAAA,CAC9B,CAAC;AAEL;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc/C,UAAU","ignoreList":[]}
@@ -66,10 +66,12 @@ const metadata = exports.metadata = {
66
66
  },
67
67
  __experimentalBorder: {
68
68
  color: true,
69
+ radius: true,
69
70
  style: true,
70
71
  width: true,
71
72
  __experimentalDefaultControls: {
72
73
  color: true,
74
+ radius: true,
73
75
  style: true,
74
76
  width: true
75
77
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","metadata","exports","$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","settings","icon","edit","save","deprecated","init","initBlock"],"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":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,KAAA,GAAAF,sBAAA,CAAAF,OAAA;AAEA,IAAAK,KAAA,GAAAH,sBAAA,CAAAF,OAAA;AAZA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAM,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,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;AASA,MAAM;EAAE1C;AAAK,CAAC,GAAGJ,QAAQ;AAACC,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAInB,MAAM2C,QAAQ,GAAA9C,OAAA,CAAA8C,QAAA,GAAG;EACvBC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,UAAU,EAAVA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAEjD,IAAI;EAAEJ,QAAQ;EAAE+C;AAAS,CAAE,CAAC;AAAC9C,OAAA,CAAAmD,IAAA,GAAAA,IAAA","ignoreList":[]}
1
+ {"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","metadata","exports","$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","settings","icon","edit","save","deprecated","init","initBlock"],"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":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,KAAA,GAAAF,sBAAA,CAAAF,OAAA;AAEA,IAAAK,KAAA,GAAAH,sBAAA,CAAAF,OAAA;AAZA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAM,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,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;AASA,MAAM;EAAE3C;AAAK,CAAC,GAAGJ,QAAQ;AAACC,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAInB,MAAM4C,QAAQ,GAAA/C,OAAA,CAAA+C,QAAA,GAAG;EACvBC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,UAAU,EAAVA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAElD,IAAI;EAAEJ,QAAQ;EAAEgD;AAAS,CAAE,CAAC;AAAC/C,OAAA,CAAAoD,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -48,6 +48,18 @@ const metadata = exports.metadata = {
48
48
  },
49
49
  interactivity: {
50
50
  clientNavigation: true
51
+ },
52
+ __experimentalBorder: {
53
+ radius: true,
54
+ color: true,
55
+ width: true,
56
+ style: true,
57
+ __experimentalDefaultControls: {
58
+ radius: true,
59
+ color: true,
60
+ width: true,
61
+ style: true
62
+ }
51
63
  }
52
64
  },
53
65
  style: "wp-block-comment-template"
@@ -1 +1 @@
1
- {"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","_save","metadata","exports","$schema","apiVersion","name","title","category","parent","description","textdomain","usesContext","supports","align","html","reusable","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","__experimentalDefaultControls","interactivity","clientNavigation","style","settings","icon","edit","save","init","initBlock"],"sources":["@wordpress/block-library/src/comment-template/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { layout as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,KAAA,GAAAF,sBAAA,CAAAF,OAAA;AAXA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAK,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,MAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,WAAA;EAAAC,QAAA;IAAAC,KAAA;IAAAC,IAAA;IAAAC,QAAA;IAAAC,OAAA;MAAAC,MAAA;MAAAC,OAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAC,6BAAA;QAAAR,QAAA;MAAA;IAAA;IAAAS,aAAA;MAAAC,gBAAA;IAAA;EAAA;EAAAC,KAAA;AAAA;AAQA,MAAM;EAAE1B;AAAK,CAAC,GAAGJ,QAAQ;AAACC,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAGnB,MAAM2B,QAAQ,GAAA9B,OAAA,CAAA8B,QAAA,GAAG;EACvBC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAEhC,IAAI;EAAEJ,QAAQ;EAAE+B;AAAS,CAAE,CAAC;AAAC9B,OAAA,CAAAkC,IAAA,GAAAA,IAAA","ignoreList":[]}
1
+ {"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","_save","metadata","exports","$schema","apiVersion","name","title","category","parent","description","textdomain","usesContext","supports","align","html","reusable","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","__experimentalDefaultControls","interactivity","clientNavigation","__experimentalBorder","radius","color","width","style","settings","icon","edit","save","init","initBlock"],"sources":["@wordpress/block-library/src/comment-template/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { layout as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport save from './save';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tsave,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,KAAA,GAAAF,sBAAA,CAAAF,OAAA;AAXA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAK,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,MAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,WAAA;EAAAC,QAAA;IAAAC,KAAA;IAAAC,IAAA;IAAAC,QAAA;IAAAC,OAAA;MAAAC,MAAA;MAAAC,OAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;MAAAC,6BAAA;QAAAR,QAAA;MAAA;IAAA;IAAAS,aAAA;MAAAC,gBAAA;IAAA;IAAAC,oBAAA;MAAAC,MAAA;MAAAC,KAAA;MAAAC,KAAA;MAAAC,KAAA;MAAAP,6BAAA;QAAAI,MAAA;QAAAC,KAAA;QAAAC,KAAA;QAAAC,KAAA;MAAA;IAAA;EAAA;EAAAA,KAAA;AAAA;AAQA,MAAM;EAAE9B;AAAK,CAAC,GAAGJ,QAAQ;AAACC,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAGnB,MAAM+B,QAAQ,GAAAlC,OAAA,CAAAkC,QAAA,GAAG;EACvBC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAEpC,IAAI;EAAEJ,QAAQ;EAAEmC;AAAS,CAAE,CAAC;AAAClC,OAAA,CAAAsC,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -32,6 +32,9 @@ const metadata = {
32
32
  level: {
33
33
  type: "number",
34
34
  "default": 2
35
+ },
36
+ levelOptions: {
37
+ type: "array"
35
38
  }
36
39
  },
37
40
  supports: {
@@ -1 +1 @@
1
- {"version":3,"names":["metadata","$schema","apiVersion","name","title","category","ancestor","description","textdomain","usesContext","attributes","textAlign","type","showPostTitle","showCommentsCount","level","supports","anchor","align","html","__experimentalBorder","radius","color","width","style","gradients","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","_default","exports","default","singleCommentLabel","multipleCommentsLabel","migrate","oldAttributes","newAttributes","isEligible","save"],"sources":["@wordpress/block-library/src/comments-title/deprecated.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport metadata from './block.json';\n\nconst { attributes, supports } = metadata;\n\nexport default [\n\t{\n\t\tattributes: {\n\t\t\t...attributes,\n\t\t\tsingleCommentLabel: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tmultipleCommentsLabel: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t},\n\t\tsupports,\n\t\tmigrate: ( oldAttributes ) => {\n\t\t\tconst {\n\t\t\t\tsingleCommentLabel,\n\t\t\t\tmultipleCommentsLabel,\n\t\t\t\t...newAttributes\n\t\t\t} = oldAttributes;\n\t\t\treturn newAttributes;\n\t\t},\n\t\tisEligible: ( { multipleCommentsLabel, singleCommentLabel } ) =>\n\t\t\tmultipleCommentsLabel || singleCommentLabel,\n\t\tsave: () => null,\n\t},\n];\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAFA,MAAAA,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;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;AAKA,MAAM;EAAEhC,UAAU;EAAEM;AAAS,CAAC,GAAGhB,QAAQ;AAAC,IAAA2C,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAE3B,CACd;EACCnC,UAAU,EAAE;IACX,GAAGA,UAAU;IACboC,kBAAkB,EAAE;MACnBlC,IAAI,EAAE;IACP,CAAC;IACDmC,qBAAqB,EAAE;MACtBnC,IAAI,EAAE;IACP;EACD,CAAC;EACDI,QAAQ;EACRgC,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":[]}
1
+ {"version":3,"names":["metadata","$schema","apiVersion","name","title","category","ancestor","description","textdomain","usesContext","attributes","textAlign","type","showPostTitle","showCommentsCount","level","levelOptions","supports","anchor","align","html","__experimentalBorder","radius","color","width","style","gradients","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","_default","exports","default","singleCommentLabel","multipleCommentsLabel","migrate","oldAttributes","newAttributes","isEligible","save"],"sources":["@wordpress/block-library/src/comments-title/deprecated.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport metadata from './block.json';\n\nconst { attributes, supports } = metadata;\n\nexport default [\n\t{\n\t\tattributes: {\n\t\t\t...attributes,\n\t\t\tsingleCommentLabel: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tmultipleCommentsLabel: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t},\n\t\tsupports,\n\t\tmigrate: ( oldAttributes ) => {\n\t\t\tconst {\n\t\t\t\tsingleCommentLabel,\n\t\t\t\tmultipleCommentsLabel,\n\t\t\t\t...newAttributes\n\t\t\t} = oldAttributes;\n\t\t\treturn newAttributes;\n\t\t},\n\t\tisEligible: ( { multipleCommentsLabel, singleCommentLabel } ) =>\n\t\t\tmultipleCommentsLabel || singleCommentLabel,\n\t\tsave: () => null,\n\t},\n];\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAFA,MAAAA,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,WAAA;EAAAC,UAAA;IAAAC,SAAA;MAAAC,IAAA;IAAA;IAAAC,aAAA;MAAAD,IAAA;MAAA;IAAA;IAAAE,iBAAA;MAAAF,IAAA;MAAA;IAAA;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;AAAC,IAAA4C,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAE3B,CACd;EACCpC,UAAU,EAAE;IACX,GAAGA,UAAU;IACbqC,kBAAkB,EAAE;MACnBnC,IAAI,EAAE;IACP,CAAC;IACDoC,qBAAqB,EAAE;MACtBpC,IAAI,EAAE;IACP;EACD,CAAC;EACDK,QAAQ;EACRgC,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":[]}
@@ -28,7 +28,8 @@ function Edit({
28
28
  textAlign,
29
29
  showPostTitle,
30
30
  showCommentsCount,
31
- level
31
+ level,
32
+ levelOptions
32
33
  },
33
34
  setAttributes,
34
35
  context: {
@@ -92,6 +93,7 @@ function Edit({
92
93
  })
93
94
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.HeadingLevelDropdown, {
94
95
  value: level,
96
+ options: levelOptions,
95
97
  onChange: newLevel => setAttributes({
96
98
  level: newLevel
97
99
  })
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_i18n","_coreData","_components","_element","_data","_apiFetch","_url","_jsxRuntime","Edit","attributes","textAlign","showPostTitle","showCommentsCount","level","setAttributes","context","postType","postId","TagName","commentsCount","setCommentsCount","useState","rawTitle","useEntityProp","isSiteEditor","blockProps","useBlockProps","className","clsx","threadCommentsDepth","threadComments","commentsPerPage","pageComments","useSelect","select","getSettings","blockEditorStore","__experimentalDiscussionSettings","useEffect","nestedCommentsNumber","Math","min","topLevelCommentsNumber","commentsNumber","parseInt","currentPostId","apiFetch","path","addQueryArgs","post","_fields","method","parse","then","res","headers","get","catch","blockControls","jsxs","BlockControls","group","children","jsx","AlignmentControl","value","onChange","newAlign","HeadingLevelDropdown","newLevel","inspectorControls","InspectorControls","PanelBody","title","__","ToggleControl","__nextHasNoMarginBottom","label","checked","postTitle","placeholder","undefined","sprintf","_n","Fragment"],"sources":["@wordpress/block-library/src/comments-title/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tuseBlockProps,\n\tInspectorControls,\n\tstore as blockEditorStore,\n\tHeadingLevelDropdown,\n} from '@wordpress/block-editor';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useEntityProp } from '@wordpress/core-data';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\n\nexport default function Edit( {\n\tattributes: { textAlign, showPostTitle, showCommentsCount, level },\n\tsetAttributes,\n\tcontext: { postType, postId },\n} ) {\n\tconst TagName = 'h' + level;\n\tconst [ commentsCount, setCommentsCount ] = useState();\n\tconst [ rawTitle ] = useEntityProp( 'postType', postType, 'title', postId );\n\tconst isSiteEditor = typeof postId === 'undefined';\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tconst {\n\t\tthreadCommentsDepth,\n\t\tthreadComments,\n\t\tcommentsPerPage,\n\t\tpageComments,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn getSettings().__experimentalDiscussionSettings;\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( isSiteEditor ) {\n\t\t\t// Match the number of comments that will be shown in the comment-template/edit.js placeholder\n\n\t\t\tconst nestedCommentsNumber = threadComments\n\t\t\t\t? Math.min( threadCommentsDepth, 3 ) - 1\n\t\t\t\t: 0;\n\t\t\tconst topLevelCommentsNumber = pageComments ? commentsPerPage : 3;\n\n\t\t\tconst commentsNumber =\n\t\t\t\tparseInt( nestedCommentsNumber ) +\n\t\t\t\tparseInt( topLevelCommentsNumber );\n\n\t\t\tsetCommentsCount( Math.min( commentsNumber, 3 ) );\n\t\t\treturn;\n\t\t}\n\t\tconst currentPostId = postId;\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\tpost: postId,\n\t\t\t\t_fields: 'id',\n\t\t\t} ),\n\t\t\tmethod: 'HEAD',\n\t\t\tparse: false,\n\t\t} )\n\t\t\t.then( ( res ) => {\n\t\t\t\t// Stale requests will have the `currentPostId` of an older closure.\n\t\t\t\tif ( currentPostId === postId ) {\n\t\t\t\t\tsetCommentsCount(\n\t\t\t\t\t\tparseInt( res.headers.get( 'X-WP-Total' ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( () => {\n\t\t\t\tsetCommentsCount( 0 );\n\t\t\t} );\n\t}, [ postId ] );\n\n\tconst blockControls = (\n\t\t<BlockControls group=\"block\">\n\t\t\t<AlignmentControl\n\t\t\t\tvalue={ textAlign }\n\t\t\t\tonChange={ ( newAlign ) =>\n\t\t\t\t\tsetAttributes( { textAlign: newAlign } )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<HeadingLevelDropdown\n\t\t\t\tvalue={ level }\n\t\t\t\tonChange={ ( newLevel ) =>\n\t\t\t\t\tsetAttributes( { level: newLevel } )\n\t\t\t\t}\n\t\t\t/>\n\t\t</BlockControls>\n\t);\n\n\tconst inspectorControls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Show post title' ) }\n\t\t\t\t\tchecked={ showPostTitle }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { showPostTitle: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Show comments count' ) }\n\t\t\t\t\tchecked={ showCommentsCount }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { showCommentsCount: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\tconst postTitle = isSiteEditor ? __( '“Post Title”' ) : `\"${ rawTitle }\"`;\n\n\tlet placeholder;\n\tif ( showCommentsCount && commentsCount !== undefined ) {\n\t\tif ( showPostTitle ) {\n\t\t\tif ( commentsCount === 1 ) {\n\t\t\t\t/* translators: %s: Post title. */\n\t\t\t\tplaceholder = sprintf( __( 'One response to %s' ), postTitle );\n\t\t\t} else {\n\t\t\t\tplaceholder = sprintf(\n\t\t\t\t\t/* translators: 1: Number of comments, 2: Post title. */\n\t\t\t\t\t_n(\n\t\t\t\t\t\t'%1$s response to %2$s',\n\t\t\t\t\t\t'%1$s responses to %2$s',\n\t\t\t\t\t\tcommentsCount\n\t\t\t\t\t),\n\t\t\t\t\tcommentsCount,\n\t\t\t\t\tpostTitle\n\t\t\t\t);\n\t\t\t}\n\t\t} else if ( commentsCount === 1 ) {\n\t\t\tplaceholder = __( 'One response' );\n\t\t} else {\n\t\t\tplaceholder = sprintf(\n\t\t\t\t/* translators: %s: Number of comments. */\n\t\t\t\t_n( '%s response', '%s responses', commentsCount ),\n\t\t\t\tcommentsCount\n\t\t\t);\n\t\t}\n\t} else if ( showPostTitle ) {\n\t\tif ( commentsCount === 1 ) {\n\t\t\t/* translators: %s: Post title. */\n\t\t\tplaceholder = sprintf( __( 'Response to %s' ), postTitle );\n\t\t} else {\n\t\t\t/* translators: %s: Post title. */\n\t\t\tplaceholder = sprintf( __( 'Responses to %s' ), postTitle );\n\t\t}\n\t} else if ( commentsCount === 1 ) {\n\t\tplaceholder = __( 'Response' );\n\t} else {\n\t\tplaceholder = __( 'Responses' );\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<TagName { ...blockProps }>{ placeholder }</TagName>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,IAAA,GAAAR,OAAA;AAA8C,IAAAS,WAAA,GAAAT,OAAA;AAtB9C;AACA;AACA;;AAGA;AACA;AACA;;AAiBe,SAASU,IAAIA,CAAE;EAC7BC,UAAU,EAAE;IAAEC,SAAS;IAAEC,aAAa;IAAEC,iBAAiB;IAAEC;EAAM,CAAC;EAClEC,aAAa;EACbC,OAAO,EAAE;IAAEC,QAAQ;IAAEC;EAAO;AAC7B,CAAC,EAAG;EACH,MAAMC,OAAO,GAAG,GAAG,GAAGL,KAAK;EAC3B,MAAM,CAAEM,aAAa,EAAEC,gBAAgB,CAAE,GAAG,IAAAC,iBAAQ,EAAC,CAAC;EACtD,MAAM,CAAEC,QAAQ,CAAE,GAAG,IAAAC,uBAAa,EAAE,UAAU,EAAEP,QAAQ,EAAE,OAAO,EAAEC,MAAO,CAAC;EAC3E,MAAMO,YAAY,GAAG,OAAOP,MAAM,KAAK,WAAW;EAClD,MAAMQ,UAAU,GAAG,IAAAC,0BAAa,EAAE;IACjCC,SAAS,EAAE,IAAAC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C6D,WAAW,GAAG,IAAAN,QAAE,EAAE,UAAW,CAAC;EAC/B,CAAC,MAAM;IACNM,WAAW,GAAG,IAAAN,QAAE,EAAE,WAAY,CAAC;EAChC;EAEA,oBACC,IAAAnE,WAAA,CAAAoD,IAAA,EAAApD,WAAA,CAAA6E,QAAA;IAAAtB,QAAA,GACGJ,aAAa,EACbY,iBAAiB,eACnB,IAAA/D,WAAA,CAAAwD,GAAA,EAAC7C,OAAO;MAAA,GAAMO,UAAU;MAAAqC,QAAA,EAAKkB;IAAW,CAAW,CAAC;EAAA,CACnD,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_blockEditor","_i18n","_coreData","_components","_element","_data","_apiFetch","_url","_jsxRuntime","Edit","attributes","textAlign","showPostTitle","showCommentsCount","level","levelOptions","setAttributes","context","postType","postId","TagName","commentsCount","setCommentsCount","useState","rawTitle","useEntityProp","isSiteEditor","blockProps","useBlockProps","className","clsx","threadCommentsDepth","threadComments","commentsPerPage","pageComments","useSelect","select","getSettings","blockEditorStore","__experimentalDiscussionSettings","useEffect","nestedCommentsNumber","Math","min","topLevelCommentsNumber","commentsNumber","parseInt","currentPostId","apiFetch","path","addQueryArgs","post","_fields","method","parse","then","res","headers","get","catch","blockControls","jsxs","BlockControls","group","children","jsx","AlignmentControl","value","onChange","newAlign","HeadingLevelDropdown","options","newLevel","inspectorControls","InspectorControls","PanelBody","title","__","ToggleControl","__nextHasNoMarginBottom","label","checked","postTitle","placeholder","undefined","sprintf","_n","Fragment"],"sources":["@wordpress/block-library/src/comments-title/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tuseBlockProps,\n\tInspectorControls,\n\tstore as blockEditorStore,\n\tHeadingLevelDropdown,\n} from '@wordpress/block-editor';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useEntityProp } from '@wordpress/core-data';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\n\nexport default function Edit( {\n\tattributes: {\n\t\ttextAlign,\n\t\tshowPostTitle,\n\t\tshowCommentsCount,\n\t\tlevel,\n\t\tlevelOptions,\n\t},\n\tsetAttributes,\n\tcontext: { postType, postId },\n} ) {\n\tconst TagName = 'h' + level;\n\tconst [ commentsCount, setCommentsCount ] = useState();\n\tconst [ rawTitle ] = useEntityProp( 'postType', postType, 'title', postId );\n\tconst isSiteEditor = typeof postId === 'undefined';\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tconst {\n\t\tthreadCommentsDepth,\n\t\tthreadComments,\n\t\tcommentsPerPage,\n\t\tpageComments,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn getSettings().__experimentalDiscussionSettings;\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( isSiteEditor ) {\n\t\t\t// Match the number of comments that will be shown in the comment-template/edit.js placeholder\n\n\t\t\tconst nestedCommentsNumber = threadComments\n\t\t\t\t? Math.min( threadCommentsDepth, 3 ) - 1\n\t\t\t\t: 0;\n\t\t\tconst topLevelCommentsNumber = pageComments ? commentsPerPage : 3;\n\n\t\t\tconst commentsNumber =\n\t\t\t\tparseInt( nestedCommentsNumber ) +\n\t\t\t\tparseInt( topLevelCommentsNumber );\n\n\t\t\tsetCommentsCount( Math.min( commentsNumber, 3 ) );\n\t\t\treturn;\n\t\t}\n\t\tconst currentPostId = postId;\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\tpost: postId,\n\t\t\t\t_fields: 'id',\n\t\t\t} ),\n\t\t\tmethod: 'HEAD',\n\t\t\tparse: false,\n\t\t} )\n\t\t\t.then( ( res ) => {\n\t\t\t\t// Stale requests will have the `currentPostId` of an older closure.\n\t\t\t\tif ( currentPostId === postId ) {\n\t\t\t\t\tsetCommentsCount(\n\t\t\t\t\t\tparseInt( res.headers.get( 'X-WP-Total' ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( () => {\n\t\t\t\tsetCommentsCount( 0 );\n\t\t\t} );\n\t}, [ postId ] );\n\n\tconst blockControls = (\n\t\t<BlockControls group=\"block\">\n\t\t\t<AlignmentControl\n\t\t\t\tvalue={ textAlign }\n\t\t\t\tonChange={ ( newAlign ) =>\n\t\t\t\t\tsetAttributes( { textAlign: newAlign } )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<HeadingLevelDropdown\n\t\t\t\tvalue={ level }\n\t\t\t\toptions={ levelOptions }\n\t\t\t\tonChange={ ( newLevel ) =>\n\t\t\t\t\tsetAttributes( { level: newLevel } )\n\t\t\t\t}\n\t\t\t/>\n\t\t</BlockControls>\n\t);\n\n\tconst inspectorControls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Show post title' ) }\n\t\t\t\t\tchecked={ showPostTitle }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { showPostTitle: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Show comments count' ) }\n\t\t\t\t\tchecked={ showCommentsCount }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { showCommentsCount: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\tconst postTitle = isSiteEditor ? __( '“Post Title”' ) : `\"${ rawTitle }\"`;\n\n\tlet placeholder;\n\tif ( showCommentsCount && commentsCount !== undefined ) {\n\t\tif ( showPostTitle ) {\n\t\t\tif ( commentsCount === 1 ) {\n\t\t\t\t/* translators: %s: Post title. */\n\t\t\t\tplaceholder = sprintf( __( 'One response to %s' ), postTitle );\n\t\t\t} else {\n\t\t\t\tplaceholder = sprintf(\n\t\t\t\t\t/* translators: 1: Number of comments, 2: Post title. */\n\t\t\t\t\t_n(\n\t\t\t\t\t\t'%1$s response to %2$s',\n\t\t\t\t\t\t'%1$s responses to %2$s',\n\t\t\t\t\t\tcommentsCount\n\t\t\t\t\t),\n\t\t\t\t\tcommentsCount,\n\t\t\t\t\tpostTitle\n\t\t\t\t);\n\t\t\t}\n\t\t} else if ( commentsCount === 1 ) {\n\t\t\tplaceholder = __( 'One response' );\n\t\t} else {\n\t\t\tplaceholder = sprintf(\n\t\t\t\t/* translators: %s: Number of comments. */\n\t\t\t\t_n( '%s response', '%s responses', commentsCount ),\n\t\t\t\tcommentsCount\n\t\t\t);\n\t\t}\n\t} else if ( showPostTitle ) {\n\t\tif ( commentsCount === 1 ) {\n\t\t\t/* translators: %s: Post title. */\n\t\t\tplaceholder = sprintf( __( 'Response to %s' ), postTitle );\n\t\t} else {\n\t\t\t/* translators: %s: Post title. */\n\t\t\tplaceholder = sprintf( __( 'Responses to %s' ), postTitle );\n\t\t}\n\t} else if ( commentsCount === 1 ) {\n\t\tplaceholder = __( 'Response' );\n\t} else {\n\t\tplaceholder = __( 'Responses' );\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<TagName { ...blockProps }>{ placeholder }</TagName>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,G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type: "number",
42
42
  "default": 2
43
+ },
44
+ levelOptions: {
45
+ type: "array"
43
46
  }
44
47
  },
45
48
  supports: {
@@ -1 +1 @@
1
- {"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","_deprecated","metadata","exports","$schema","apiVersion","name","title","category","ancestor","description","textdomain","usesContext","attributes","textAlign","type","showPostTitle","showCommentsCount","level","supports","anchor","align","html","__experimentalBorder","radius","color","width","style","gradients","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","settings","icon","edit","deprecated","init","initBlock"],"sources":["@wordpress/block-library/src/comments-title/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { title as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AAXA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAK,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,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;AAQA,MAAM;EAAEvC;AAAK,CAAC,GAAGJ,QAAQ;AAACC,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAGnB,MAAMwC,QAAQ,GAAA3C,OAAA,CAAA2C,QAAA,GAAG;EACvBC,IAAI,EAAJA,YAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,UAAU,EAAVA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAE7C,IAAI;EAAEJ,QAAQ;EAAE4C;AAAS,CAAE,CAAC;AAAC3C,OAAA,CAAA+C,IAAA,GAAAA,IAAA","ignoreList":[]}
1
+ {"version":3,"names":["_icons","require","_initBlock","_interopRequireDefault","_edit","_deprecated","metadata","exports","$schema","apiVersion","name","title","category","ancestor","description","textdomain","usesContext","attributes","textAlign","type","showPostTitle","showCommentsCount","level","levelOptions","supports","anchor","align","html","__experimentalBorder","radius","color","width","style","gradients","__experimentalDefaultControls","background","text","spacing","margin","padding","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","interactivity","clientNavigation","settings","icon","edit","deprecated","init","initBlock"],"sources":["@wordpress/block-library/src/comments-title/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { title as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n\tdeprecated,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AAXA;AACA;AACA;AAGA;AACA;AACA;AAFA,MAAAK,QAAA,GAAAC,OAAA,CAAAD,QAAA;EAAAE,OAAA;EAAAC,UAAA;EAAAC,IAAA;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;AAQA,MAAM;EAAExC;AAAK,CAAC,GAAGJ,QAAQ;AAACC,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAGnB,MAAMyC,QAAQ,GAAA5C,OAAA,CAAA4C,QAAA,GAAG;EACvBC,IAAI,EAAJA,YAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,UAAU,EAAVA;AACD,CAAC;AAEM,MAAMC,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAE9C,IAAI;EAAEJ,QAAQ;EAAE6C;AAAS,CAAE,CAAC;AAAC5C,OAAA,CAAAgD,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -45,6 +45,7 @@ function DetailsEdit({
45
45
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.PanelBody, {
46
46
  title: (0, _i18n.__)('Settings'),
47
47
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ToggleControl, {
48
+ __nextHasNoMarginBottom: true,
48
49
  label: (0, _i18n.__)('Open by default'),
49
50
  checked: showContent,
50
51
  onChange: () => setAttributes({
@@ -1 +1 @@
1
- {"version":3,"names":["_blockEditor","require","_data","_components","_i18n","_jsxRuntime","TEMPLATE","placeholder","__","DetailsEdit","attributes","setAttributes","clientId","showContent","summary","blockProps","useBlockProps","innerBlocksProps","useInnerBlocksProps","template","__experimentalCaptureToolbars","hasSelection","useSelect","select","isBlockSelected","hasSelectedInnerBlock","blockEditorStore","jsxs","Fragment","children","jsx","InspectorControls","PanelBody","title","ToggleControl","label","checked","onChange","open","onClick","event","preventDefault","RichText","identifier","allowedFormats","withoutInteractiveFormatting","value","newSummary","_default","exports","default"],"sources":["@wordpress/block-library/src/details/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tRichText,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n\tInspectorControls,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst TEMPLATE = [\n\t[\n\t\t'core/paragraph',\n\t\t{\n\t\t\tplaceholder: __( 'Type / to add a hidden block' ),\n\t\t},\n\t],\n];\n\nfunction DetailsEdit( { attributes, setAttributes, clientId } ) {\n\tconst { showContent, summary } = attributes;\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t\t__experimentalCaptureToolbars: true,\n\t} );\n\n\t// Check if either the block or the inner blocks are selected.\n\tconst hasSelection = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isBlockSelected, hasSelectedInnerBlock } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\t/* Sets deep to true to also find blocks inside the details content block. */\n\t\t\treturn (\n\t\t\t\thasSelectedInnerBlock( clientId, true ) ||\n\t\t\t\tisBlockSelected( clientId )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Open by default' ) }\n\t\t\t\t\t\tchecked={ showContent }\n\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tshowContent: ! showContent,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<details\n\t\t\t\t{ ...innerBlocksProps }\n\t\t\t\topen={ hasSelection || showContent }\n\t\t\t>\n\t\t\t\t<summary onClick={ ( event ) => event.preventDefault() }>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"summary\"\n\t\t\t\t\t\taria-label={ __( 'Write summary' ) }\n\t\t\t\t\t\tplaceholder={ __( 'Write summary…' ) }\n\t\t\t\t\t\tallowedFormats={ [] }\n\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\tvalue={ summary }\n\t\t\t\t\t\tonChange={ ( newSummary ) =>\n\t\t\t\t\t\t\tsetAttributes( { summary: newSummary } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</summary>\n\t\t\t\t{ innerBlocksProps.children }\n\t\t\t</details>\n\t\t</>\n\t);\n}\n\nexport default DetailsEdit;\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAOA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAAqC,IAAAI,WAAA,GAAAJ,OAAA;AAZrC;AACA;AACA;;AAYA,MAAMK,QAAQ,GAAG,CAChB,CACC,gBAAgB,EAChB;EACCC,WAAW,EAAE,IAAAC,QAAE,EAAE,8BAA+B;AACjD,CAAC,CACD,CACD;AAED,SAASC,WAAWA,CAAE;EAAEC,UAAU;EAAEC,aAAa;EAAEC;AAAS,CAAC,EAAG;EAC/D,MAAM;IAAEC,WAAW;IAAEC;EAAQ,CAAC,GAAGJ,UAAU;EAC3C,MAAMK,UAAU,GAAG,IAAAC,0BAAa,EAAC,CAAC;EAClC,MAAMC,gBAAgB,GAAG,IAAAC,gCAAmB,EAAEH,UAAU,EAAE;IACzDI,QAAQ,EAAEb,QAAQ;IAClBc,6BAA6B,EAAE;EAChC,CAAE,CAAC;;EAEH;EACA,MAAMC,YAAY,GAAG,IAAAC,eAAS,EAC3BC,MAAM,IAAM;IACb,MAAM;MAAEC,eAAe;MAAEC;IAAsB,CAAC,GAC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,UAAU,IACtBpC,aAAa,CAAE;YAAEG,OAAO,EAAEiC;UAAW,CAAE;QACvC,CACD;MAAC,CACM,CAAC,EACR9B,gBAAgB,CAACY,QAAQ;IAAA,CACnB,CAAC;EAAA,CACT,CAAC;AAEL;AAAC,IAAAmB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEczC,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["_blockEditor","require","_data","_components","_i18n","_jsxRuntime","TEMPLATE","placeholder","__","DetailsEdit","attributes","setAttributes","clientId","showContent","summary","blockProps","useBlockProps","innerBlocksProps","useInnerBlocksProps","template","__experimentalCaptureToolbars","hasSelection","useSelect","select","isBlockSelected","hasSelectedInnerBlock","blockEditorStore","jsxs","Fragment","children","jsx","InspectorControls","PanelBody","title","ToggleControl","__nextHasNoMarginBottom","label","checked","onChange","open","onClick","event","preventDefault","RichText","identifier","allowedFormats","withoutInteractiveFormatting","value","newSummary","_default","exports","default"],"sources":["@wordpress/block-library/src/details/edit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tRichText,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n\tInspectorControls,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody, ToggleControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst TEMPLATE = [\n\t[\n\t\t'core/paragraph',\n\t\t{\n\t\t\tplaceholder: __( 'Type / to add a hidden block' ),\n\t\t},\n\t],\n];\n\nfunction DetailsEdit( { attributes, setAttributes, clientId } ) {\n\tconst { showContent, summary } = attributes;\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t\t__experimentalCaptureToolbars: true,\n\t} );\n\n\t// Check if either the block or the inner blocks are selected.\n\tconst hasSelection = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isBlockSelected, hasSelectedInnerBlock } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\t/* Sets deep to true to also find blocks inside the details content block. */\n\t\t\treturn (\n\t\t\t\thasSelectedInnerBlock( clientId, true ) ||\n\t\t\t\tisBlockSelected( clientId )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Open by default' ) }\n\t\t\t\t\t\tchecked={ showContent }\n\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tshowContent: ! showContent,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<details\n\t\t\t\t{ ...innerBlocksProps }\n\t\t\t\topen={ hasSelection || showContent }\n\t\t\t>\n\t\t\t\t<summary onClick={ ( event ) => event.preventDefault() }>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"summary\"\n\t\t\t\t\t\taria-label={ __( 'Write summary' ) }\n\t\t\t\t\t\tplaceholder={ __( 'Write summary…' ) }\n\t\t\t\t\t\tallowedFormats={ [] }\n\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\tvalue={ summary }\n\t\t\t\t\t\tonChange={ ( newSummary ) =>\n\t\t\t\t\t\t\tsetAttributes( { summary: newSummary } )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</summary>\n\t\t\t\t{ innerBlocksProps.children }\n\t\t\t</details>\n\t\t</>\n\t);\n}\n\nexport default DetailsEdit;\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAOA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA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,QAAQ,EAAGA,CAAA,KACV3B,aAAa,CAAE;YACdE,WAAW,EAAE,CAAEA;UAChB,CAAE;QACF,CACD;MAAC,CACQ;IAAC,CACM,CAAC,eACpB,IAAAR,WAAA,CAAAsB,IAAA;MAAA,GACMV,gBAAgB;MACrBsB,IAAI,EAAGlB,YAAY,IAAIR,WAAa;MAAAgB,QAAA,gBAEpC,IAAAxB,WAAA,CAAAyB,GAAA;QAASU,OAAO,EAAKC,KAAK,IAAMA,KAAK,CAACC,cAAc,CAAC,CAAG;QAAAb,QAAA,eACvD,IAAAxB,WAAA,CAAAyB,GAAA,EAAC9B,YAAA,CAAA2C,QAAQ;UACRC,UAAU,EAAC,SAAS;UACpB,cAAa,IAAApC,QAAE,EAAE,eAAgB,CAAG;UACpCD,WAAW,EAAG,IAAAC,QAAE,EAAE,gBAAiB,CAAG;UACtCqC,cAAc,EAAG,EAAI;UACrBC,4BAA4B;UAC5BC,KAAK,EAAGjC,OAAS;UACjBwB,QAAQ,EAAKU,UAAU,IACtBrC,aAAa,CAAE;YAAEG,OAAO,EAAEkC;UAAW,CAAE;QACvC,CACD;MAAC,CACM,CAAC,EACR/B,gBAAgB,CAACY,QAAQ;IAAA,CACnB,CAAC;EAAA,CACT,CAAC;AAEL;AAAC,IAAAoB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc1C,WAAW","ignoreList":[]}
@@ -62,10 +62,9 @@ const Edit = ({
62
62
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.InspectorControls, {
63
63
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.PanelBody, {
64
64
  title: (0, _i18n.__)('Settings'),
65
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SelectControl
66
- // __nextHasNoMarginBottom
67
- // size={ '__unstable-large' }
68
- , {
65
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SelectControl, {
66
+ __nextHasNoMarginBottom: true,
67
+ __next40pxDefaultSize: true,
69
68
  label: (0, _i18n.__)('Submissions method'),
70
69
  options: [
71
70
  // TODO: Allow plugins to add their own submission methods.
@@ -83,6 +82,7 @@ const Edit = ({
83
82
  help: submissionMethod === 'custom' ? (0, _i18n.__)('Select the method to use for form submissions. Additional options for the "custom" mode can be found in the "Advanced" section.') : (0, _i18n.__)('Select the method to use for form submissions.')
84
83
  }), submissionMethod === 'email' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.TextControl, {
85
84
  __nextHasNoMarginBottom: true,
85
+ __next40pxDefaultSize: true,
86
86
  autoComplete: "off",
87
87
  label: (0, _i18n.__)('Email for form submissions'),
88
88
  value: email,
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_blockEditor","_components","_data","_utils","_jsxRuntime","TEMPLATE","formSubmissionNotificationSuccess","formSubmissionNotificationError","type","label","__","required","Edit","attributes","setAttributes","clientId","action","method","email","submissionMethod","blockProps","useBlockProps","hasInnerBlocks","useSelect","select","getBlock","blockEditorStore","block","innerBlocks","length","innerBlocksProps","useInnerBlocksProps","template","renderAppender","undefined","InnerBlocks","ButtonBlockAppender","jsxs","Fragment","children","jsx","InspectorControls","PanelBody","title","SelectControl","options","value","onChange","help","TextControl","__nextHasNoMarginBottom","autoComplete","group","newVal","className","encType","_default","exports","default"],"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":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AAGoB,IAAAK,WAAA,GAAAL,OAAA;AApBpB;AACA;AACA;;AAYA;AACA;AACA;;AAMA,MAAMM,QAAQ,GAAG,CAChBC,wCAAiC,EACjCC,sCAA+B,EAC/B,CACC,iBAAiB,EACjB;EACCC,IAAI,EAAE,MAAM;EACZC,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AAA,GAAAC,OAAA,CAAAC,OAAA,GACa9C,IAAI","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_blockEditor","_components","_data","_utils","_jsxRuntime","TEMPLATE","formSubmissionNotificationSuccess","formSubmissionNotificationError","type","label","__","required","Edit","attributes","setAttributes","clientId","action","method","email","submissionMethod","blockProps","useBlockProps","hasInnerBlocks","useSelect","select","getBlock","blockEditorStore","block","innerBlocks","length","innerBlocksProps","useInnerBlocksProps","template","renderAppender","undefined","InnerBlocks","ButtonBlockAppender","jsxs","Fragment","children","jsx","InspectorControls","PanelBody","title","SelectControl","__nextHasNoMarginBottom","__next40pxDefaultSize","options","value","onChange","help","TextControl","autoComplete","group","newVal","className","encType","_default","exports","default"],"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":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAJ,OAAA;AAGoB,IAAAK,WAAA,GAAAL,OAAA;AApBpB;AACA;AACA;;AAYA;AACA;AACA;;AAMA,MAAMM,QAAQ,GAAG,CAChBC,wCAAiC,EACjCC,sCAA+B,EAC/B,CACC,iBAAiB,EACjB;EACCC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE,IAAAC,QAAE,EAAE,MAAO,CAAC;EACnBC,QAAQ,EAAE;AACX,CAAC,CACD,EACD,CACC,iBAAiB,EACjB;EACCH,IAAI,EAAE,OAAO;EACbC,KAAK,EAAE,IAAAC,QAAE,EAAE,OAAQ,CAAC;EACpBC,QAAQ,EAAE;AACX,CAAC,CACD,EACD,CACC,iBAAiB,EACjB;EACCH,IAAI,EAAE,UAAU;EAChBC,KAAK,EAAE,IAAAC,QAAE,EAAE,SAAU,C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BAAuB;QACvBpC,KAAK,EAAG,IAAAC,QAAE,EAAE,QAAS,CAAG;QACxBqC,OAAO,EAAG,CACT;UAAEtC,KAAK,EAAE,KAAK;UAAEuC,KAAK,EAAE;QAAM,CAAC,EAC9B;UAAEvC,KAAK,EAAE,MAAM;UAAEuC,KAAK,EAAE;QAAO,CAAC,CAC9B;QACHA,KAAK,EAAG/B,MAAQ;QAChBgC,QAAQ,EAAKD,KAAK,IACjBlC,aAAa,CAAE;UAAEG,MAAM,EAAE+B;QAAM,CAAE,CACjC;QACDE,IAAI,EAAG,IAAAxC,QAAE,EACR,gDACD;MAAG,CACH,CAAC,eACF,IAAAN,WAAA,CAAAoC,GAAA,EAACvC,WAAA,CAAAkD,WAAW;QACXN,uBAAuB;QACvBO,YAAY,EAAC,KAAK;QAClB3C,KAAK,EAAG,IAAAC,QAAE,EAAE,aAAc,CAAG;QAC7BsC,KAAK,EAAGhC,MAAQ;QAChBiC,QAAQ,EAAKK,MAAM,IAAM;UACxBxC,aAAa,CAAE;YACdE,MAAM,EAAEsC;UACT,CAAE,CAAC;QACJ,CAAG;QACHJ,IAAI,EAAG,IAAAxC,QAAE,EACR,6CACD;MAAG,CACH,CAAC;IAAA,CACgB,CACnB,eACD,IAAAN,WAAA,CAAAoC,GAAA;MAAA,GACMV,gBAAgB;MACrByB,SAAS,EAAC,eAAe;MACzBC,OAAO,EAAGrC,gBAAgB,KAAK,OAAO,GAAG,YAAY,GAAG;IAAM,CAC9D,CAAC;EAAA,CACD,CAAC;AAEL,CAAC;AAAC,IAAAsC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GACa/C,IAAI","ignoreList":[]}
@@ -68,6 +68,7 @@ function InputFieldBlock({
68
68
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.InspectorControls, {
69
69
  group: "advanced",
70
70
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.TextControl, {
71
+ __nextHasNoMarginBottom: true,
71
72
  autoComplete: "off",
72
73
  label: (0, _i18n.__)('Name'),
73
74
  value: name,
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_blockEditor","_components","_element","_jsxRuntime","InputFieldBlock","attributes","setAttributes","className","type","name","label","inlineLabel","required","placeholder","value","blockProps","useBlockProps","ref","useRef","TagName","borderProps","useBorderProps","colorProps","useColorProps","current","focus","controls","jsxs","Fragment","children","jsx","InspectorControls","PanelBody","title","__","CheckboxControl","__nextHasNoMarginBottom","checked","onChange","newVal","group","TextControl","autoComplete","help","clsx","event","target","RichText","tagName","newLabel","undefined","style","_default","exports","default"],"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...bor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AG1C,IAAM;QAC/CD,SAAS,EAAG,IAAAqC,aAAI,EACfrC,SAAS,EACT,4BAA4B,EAC5Be,UAAU,CAACf,SAAS,EACpBa,WAAW,CAACb,SACb,CAAG;QACH,cAAa,IAAA2B,QAAE,EAAE,2BAA4B;QAC7C;QACA;QACA;QAAA;QACArB,WAAW,EACVA,WAAW,GAAGqC,SAAS,GAAG,IAAAhB,QAAE,EAAE,uBAAwB,CACtD;QACDpB,KAAK,EAAGD,WAAa;QACrByB,QAAQ,EAAKO,KAAK,IACjBvC,aAAa,CAAE;UAAEO,WAAW,EAAEgC,KAAK,CAACC,MAAM,CAAChC;QAAM,CAAE,CACnD;QACD,iBAAgBF,QAAU;QAC1BuC,KAAK,EAAG;UACP,GAAG/B,WAAW,CAAC+B,KAAK;UACpB,GAAG7B,UAAU,CAAC6B;QACf;MAAG,CACH,CAAC;IAAA,CACG,CAAC;EAAA,CACH,CAAC;AAER;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEclD,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_blockEditor","_components","_element","_jsxRuntime","InputFieldBlock","attributes","setAttributes","className","type","name","label","inlineLabel","required","placeholder","value","blockProps","useBlockProps","ref","useRef","TagName","borderProps","useBorderProps","colorProps","useColorProps","current","focus","controls","jsxs","Fragment","children","jsx","InspectorControls","PanelBody","title","__","CheckboxControl","__nextHasNoMarginBottom","checked","onChange","newVal","group","TextControl","autoComplete","help","clsx","event","target","RichText","tagName","newLabel","undefined","style","_default","exports","default"],"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":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAOA,IAAAG,WAAA,GAAAH,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AAA4C,IAAAK,WAAA,GAAAL,OAAA;AAlB5C;AACA;AACA;;AAGA;AACA;AACA;;AAaA,SAASM,eAAeA,CAAE;EAAEC,UAAU;EAAEC,aAAa;EAAEC;AAAU,CAAC,EAAG;EACpE,MAAM;IAAEC,IAAI;IAAEC,IAAI;IAAEC,KAAK;IAAEC,WAAW;IAAEC,QAAQ;IAAEC,WAAW;IAAEC;EAAM,CAAC,GACrET,UAAU;EACX,MAAMU,UA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