@wordpress/block-library 11.1.0 → 11.2.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 (444) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/build/accordion-heading/block.json +1 -0
  3. package/build/archives/block.json +3 -0
  4. package/build/audio/edit.cjs +2 -1
  5. package/build/audio/edit.cjs.map +2 -2
  6. package/build/avatar/block.json +4 -0
  7. package/build/avatar/edit.cjs +31 -1
  8. package/build/avatar/edit.cjs.map +3 -3
  9. package/build/button/block.json +6 -0
  10. package/build/button/edit.cjs +9 -6
  11. package/build/button/edit.cjs.map +2 -2
  12. package/build/buttons/block.json +6 -1
  13. package/build/code/block.json +4 -0
  14. package/build/column/edit.cjs +5 -0
  15. package/build/column/edit.cjs.map +2 -2
  16. package/build/columns/block.json +4 -0
  17. package/build/columns/edit.cjs +21 -112
  18. package/build/columns/edit.cjs.map +3 -3
  19. package/build/comments/edit/placeholder.cjs +95 -87
  20. package/build/comments/edit/placeholder.cjs.map +2 -2
  21. package/build/comments-pagination/block.json +11 -0
  22. package/build/cover/block.json +2 -1
  23. package/build/cover/edit/index.cjs +26 -5
  24. package/build/cover/edit/index.cjs.map +2 -2
  25. package/build/cover/edit/inspector-controls.cjs +4 -1
  26. package/build/cover/edit/inspector-controls.cjs.map +2 -2
  27. package/build/cover/embed-video-utils.cjs +9 -8
  28. package/build/cover/embed-video-utils.cjs.map +2 -2
  29. package/build/cover/view.cjs +21 -0
  30. package/build/cover/view.cjs.map +7 -0
  31. package/build/details/block.json +3 -0
  32. package/build/embed/block.json +6 -1
  33. package/build/file/block.json +5 -0
  34. package/build/footnotes/block.json +4 -0
  35. package/build/gallery/block.json +13 -0
  36. package/build/gallery/dynamic-gallery.cjs +32 -93
  37. package/build/gallery/dynamic-gallery.cjs.map +3 -3
  38. package/build/gallery/edit.cjs +103 -40
  39. package/build/gallery/edit.cjs.map +2 -2
  40. package/build/gallery/order-controls.cjs +107 -0
  41. package/build/gallery/order-controls.cjs.map +7 -0
  42. package/build/gallery/order-images.cjs +92 -0
  43. package/build/gallery/order-images.cjs.map +7 -0
  44. package/build/gallery/order-options.cjs +62 -0
  45. package/build/gallery/order-options.cjs.map +7 -0
  46. package/build/gallery/use-dynamic-gallery.cjs +1 -7
  47. package/build/gallery/use-dynamic-gallery.cjs.map +2 -2
  48. package/build/gallery/use-get-media.cjs +2 -3
  49. package/build/gallery/use-get-media.cjs.map +2 -2
  50. package/build/group/edit.cjs +3 -3
  51. package/build/group/edit.cjs.map +2 -2
  52. package/build/heading/block.json +5 -0
  53. package/build/home-link/block.json +12 -0
  54. package/build/icon/components/custom-inserter/index.cjs +3 -1
  55. package/build/icon/components/custom-inserter/index.cjs.map +2 -2
  56. package/build/icon/edit.cjs +49 -5
  57. package/build/icon/edit.cjs.map +2 -2
  58. package/build/image/use-open-image-media-editor-modal.cjs +32 -28
  59. package/build/image/use-open-image-media-editor-modal.cjs.map +2 -2
  60. package/build/image/view.cjs +44 -50
  61. package/build/image/view.cjs.map +2 -2
  62. package/build/latest-comments/block.json +10 -0
  63. package/build/latest-posts/block.json +4 -0
  64. package/build/list/block.json +12 -1
  65. package/build/list-item/block.json +8 -1
  66. package/build/list-item/index.cjs +4 -0
  67. package/build/list-item/index.cjs.map +3 -3
  68. package/build/loginout/block.json +4 -0
  69. package/build/math/block.json +4 -0
  70. package/build/media-text/block.json +18 -0
  71. package/build/navigation-link/link-ui/index.cjs +33 -19
  72. package/build/navigation-link/link-ui/index.cjs.map +2 -2
  73. package/build/navigation-link/shared/index.cjs +5 -0
  74. package/build/navigation-link/shared/index.cjs.map +2 -2
  75. package/build/navigation-link/shared/use-block-suggestions.cjs +141 -0
  76. package/build/navigation-link/shared/use-block-suggestions.cjs.map +7 -0
  77. package/build/page-list/block.json +4 -0
  78. package/build/paragraph/block.json +1 -0
  79. package/build/post-author-biography/block.json +1 -0
  80. package/build/post-comments-form/block.json +5 -0
  81. package/build/post-content/block.json +2 -1
  82. package/build/post-excerpt/block.json +4 -0
  83. package/build/post-featured-image/block.json +1 -0
  84. package/build/post-featured-image/edit.cjs +1 -1
  85. package/build/post-featured-image/edit.cjs.map +2 -2
  86. package/build/post-terms/block.json +4 -0
  87. package/build/post-time-to-read/block.json +4 -0
  88. package/build/post-title/block.json +4 -0
  89. package/build/preformatted/block.json +4 -0
  90. package/build/pullquote/block.json +2 -1
  91. package/build/query-no-results/block.json +4 -0
  92. package/build/query-pagination/block.json +17 -0
  93. package/build/query-total/block.json +4 -0
  94. package/build/quote/block.json +2 -0
  95. package/build/read-more/block.json +5 -0
  96. package/build/rss/block.json +4 -0
  97. package/build/search/block.json +2 -1
  98. package/build/site-tagline/block.json +4 -0
  99. package/build/site-title/block.json +4 -0
  100. package/build/social-links/block.json +1 -0
  101. package/build/tab-list/block.json +4 -0
  102. package/build/tab-list/edit.cjs +3 -1
  103. package/build/tab-list/edit.cjs.map +3 -3
  104. package/build/tab-list/save.cjs +3 -1
  105. package/build/tab-list/save.cjs.map +3 -3
  106. package/build/tab-panels/block.json +3 -0
  107. package/build/tabs/block.json +3 -0
  108. package/build/term-count/block.json +5 -0
  109. package/build/term-description/block.json +4 -0
  110. package/build/term-name/block.json +6 -1
  111. package/build/term-template/block.json +4 -0
  112. package/build/utils/waveform-utils.cjs +2 -2
  113. package/build/utils/waveform-utils.cjs.map +2 -2
  114. package/build/verse/block.json +4 -0
  115. package/build/video/block.json +7 -1
  116. package/build/video/edit.cjs +10 -2
  117. package/build/video/edit.cjs.map +2 -2
  118. package/build-module/accordion-heading/block.json +1 -0
  119. package/build-module/archives/block.json +3 -0
  120. package/build-module/audio/edit.mjs +2 -1
  121. package/build-module/audio/edit.mjs.map +2 -2
  122. package/build-module/avatar/block.json +4 -0
  123. package/build-module/avatar/edit.mjs +33 -2
  124. package/build-module/avatar/edit.mjs.map +2 -2
  125. package/build-module/button/block.json +6 -0
  126. package/build-module/button/edit.mjs +11 -7
  127. package/build-module/button/edit.mjs.map +2 -2
  128. package/build-module/buttons/block.json +6 -1
  129. package/build-module/code/block.json +4 -0
  130. package/build-module/column/edit.mjs +5 -0
  131. package/build-module/column/edit.mjs.map +2 -2
  132. package/build-module/columns/block.json +4 -0
  133. package/build-module/columns/edit.mjs +22 -122
  134. package/build-module/columns/edit.mjs.map +2 -2
  135. package/build-module/comments/edit/placeholder.mjs +95 -87
  136. package/build-module/comments/edit/placeholder.mjs.map +2 -2
  137. package/build-module/comments-pagination/block.json +11 -0
  138. package/build-module/cover/block.json +2 -1
  139. package/build-module/cover/edit/index.mjs +32 -6
  140. package/build-module/cover/edit/index.mjs.map +2 -2
  141. package/build-module/cover/edit/inspector-controls.mjs +5 -2
  142. package/build-module/cover/edit/inspector-controls.mjs.map +2 -2
  143. package/build-module/cover/embed-video-utils.mjs +9 -8
  144. package/build-module/cover/embed-video-utils.mjs.map +2 -2
  145. package/build-module/cover/view.mjs +19 -0
  146. package/build-module/cover/view.mjs.map +7 -0
  147. package/build-module/details/block.json +3 -0
  148. package/build-module/embed/block.json +6 -1
  149. package/build-module/file/block.json +5 -0
  150. package/build-module/footnotes/block.json +4 -0
  151. package/build-module/gallery/block.json +13 -0
  152. package/build-module/gallery/dynamic-gallery.mjs +33 -97
  153. package/build-module/gallery/dynamic-gallery.mjs.map +2 -2
  154. package/build-module/gallery/edit.mjs +110 -42
  155. package/build-module/gallery/edit.mjs.map +2 -2
  156. package/build-module/gallery/order-controls.mjs +87 -0
  157. package/build-module/gallery/order-controls.mjs.map +7 -0
  158. package/build-module/gallery/order-images.mjs +66 -0
  159. package/build-module/gallery/order-images.mjs.map +7 -0
  160. package/build-module/gallery/order-options.mjs +33 -0
  161. package/build-module/gallery/order-options.mjs.map +7 -0
  162. package/build-module/gallery/use-dynamic-gallery.mjs +1 -7
  163. package/build-module/gallery/use-dynamic-gallery.mjs.map +2 -2
  164. package/build-module/gallery/use-get-media.mjs +2 -3
  165. package/build-module/gallery/use-get-media.mjs.map +2 -2
  166. package/build-module/group/edit.mjs +4 -4
  167. package/build-module/group/edit.mjs.map +2 -2
  168. package/build-module/heading/block.json +5 -0
  169. package/build-module/home-link/block.json +12 -0
  170. package/build-module/icon/components/custom-inserter/index.mjs +3 -1
  171. package/build-module/icon/components/custom-inserter/index.mjs.map +2 -2
  172. package/build-module/icon/edit.mjs +50 -6
  173. package/build-module/icon/edit.mjs.map +2 -2
  174. package/build-module/image/use-open-image-media-editor-modal.mjs +32 -28
  175. package/build-module/image/use-open-image-media-editor-modal.mjs.map +2 -2
  176. package/build-module/image/view.mjs +44 -50
  177. package/build-module/image/view.mjs.map +2 -2
  178. package/build-module/latest-comments/block.json +10 -0
  179. package/build-module/latest-posts/block.json +4 -0
  180. package/build-module/list/block.json +12 -1
  181. package/build-module/list-item/block.json +8 -1
  182. package/build-module/list-item/index.mjs +4 -0
  183. package/build-module/list-item/index.mjs.map +2 -2
  184. package/build-module/loginout/block.json +4 -0
  185. package/build-module/math/block.json +4 -0
  186. package/build-module/media-text/block.json +18 -0
  187. package/build-module/navigation-link/link-ui/index.mjs +39 -20
  188. package/build-module/navigation-link/link-ui/index.mjs.map +2 -2
  189. package/build-module/navigation-link/shared/index.mjs +6 -0
  190. package/build-module/navigation-link/shared/index.mjs.map +2 -2
  191. package/build-module/navigation-link/shared/use-block-suggestions.mjs +120 -0
  192. package/build-module/navigation-link/shared/use-block-suggestions.mjs.map +7 -0
  193. package/build-module/page-list/block.json +4 -0
  194. package/build-module/paragraph/block.json +1 -0
  195. package/build-module/post-author-biography/block.json +1 -0
  196. package/build-module/post-comments-form/block.json +5 -0
  197. package/build-module/post-content/block.json +2 -1
  198. package/build-module/post-excerpt/block.json +4 -0
  199. package/build-module/post-featured-image/block.json +1 -0
  200. package/build-module/post-featured-image/edit.mjs +1 -1
  201. package/build-module/post-featured-image/edit.mjs.map +2 -2
  202. package/build-module/post-terms/block.json +4 -0
  203. package/build-module/post-time-to-read/block.json +4 -0
  204. package/build-module/post-title/block.json +4 -0
  205. package/build-module/preformatted/block.json +4 -0
  206. package/build-module/pullquote/block.json +2 -1
  207. package/build-module/query-no-results/block.json +4 -0
  208. package/build-module/query-pagination/block.json +17 -0
  209. package/build-module/query-total/block.json +4 -0
  210. package/build-module/quote/block.json +2 -0
  211. package/build-module/read-more/block.json +5 -0
  212. package/build-module/rss/block.json +4 -0
  213. package/build-module/search/block.json +2 -1
  214. package/build-module/site-tagline/block.json +4 -0
  215. package/build-module/site-title/block.json +4 -0
  216. package/build-module/social-links/block.json +1 -0
  217. package/build-module/tab-list/block.json +4 -0
  218. package/build-module/tab-list/edit.mjs +4 -1
  219. package/build-module/tab-list/edit.mjs.map +2 -2
  220. package/build-module/tab-list/save.mjs +4 -1
  221. package/build-module/tab-list/save.mjs.map +2 -2
  222. package/build-module/tab-panels/block.json +3 -0
  223. package/build-module/tabs/block.json +3 -0
  224. package/build-module/term-count/block.json +5 -0
  225. package/build-module/term-description/block.json +4 -0
  226. package/build-module/term-name/block.json +6 -1
  227. package/build-module/term-template/block.json +4 -0
  228. package/build-module/utils/waveform-utils.mjs +1 -1
  229. package/build-module/utils/waveform-utils.mjs.map +1 -1
  230. package/build-module/verse/block.json +4 -0
  231. package/build-module/video/block.json +7 -1
  232. package/build-module/video/edit.mjs +10 -2
  233. package/build-module/video/edit.mjs.map +2 -2
  234. package/build-style/avatar/editor-rtl.css +4 -0
  235. package/build-style/avatar/editor.css +4 -0
  236. package/build-style/comments-pagination/style-rtl.css +3 -0
  237. package/build-style/comments-pagination/style.css +3 -0
  238. package/build-style/common-rtl.css +32 -1
  239. package/build-style/common.css +35 -2
  240. package/build-style/editor-rtl.css +11 -4
  241. package/build-style/editor.css +11 -4
  242. package/build-style/embed/style-rtl.css +4 -1
  243. package/build-style/embed/style.css +4 -1
  244. package/build-style/gallery/editor-rtl.css +1 -3
  245. package/build-style/gallery/editor.css +1 -3
  246. package/build-style/image/style-rtl.css +11 -2
  247. package/build-style/image/style.css +11 -2
  248. package/build-style/media-text/style-rtl.css +4 -1
  249. package/build-style/media-text/style.css +4 -1
  250. package/build-style/query-pagination/style-rtl.css +3 -0
  251. package/build-style/query-pagination/style.css +3 -0
  252. package/build-style/style-rtl.css +70 -9
  253. package/build-style/style.css +73 -10
  254. package/build-style/table/editor-rtl.css +6 -1
  255. package/build-style/table/editor.css +6 -1
  256. package/build-style/table/style-rtl.css +4 -2
  257. package/build-style/table/style.css +4 -2
  258. package/build-style/tag-cloud/style-rtl.css +1 -1
  259. package/build-style/tag-cloud/style.css +1 -1
  260. package/build-style/verse/style-rtl.css +8 -1
  261. package/build-style/verse/style.css +8 -1
  262. package/build-types/gallery/order-controls.d.ts +58 -0
  263. package/build-types/gallery/order-controls.d.ts.map +1 -0
  264. package/build-types/gallery/order-options.d.ts +67 -0
  265. package/build-types/gallery/order-options.d.ts.map +1 -0
  266. package/package.json +44 -41
  267. package/src/accordion-heading/README.md +1 -0
  268. package/src/accordion-heading/block.json +1 -0
  269. package/src/archives/README.md +2 -0
  270. package/src/archives/block.json +3 -0
  271. package/src/audio/edit.jsx +2 -1
  272. package/src/avatar/README.md +2 -0
  273. package/src/avatar/block.json +4 -0
  274. package/src/avatar/edit.jsx +48 -2
  275. package/src/avatar/editor.scss +4 -0
  276. package/src/avatar/index.php +5 -3
  277. package/src/breadcrumbs/index.php +1 -1
  278. package/src/button/README.md +4 -0
  279. package/src/button/block.json +6 -0
  280. package/src/button/edit.jsx +47 -52
  281. package/src/button/index.php +47 -0
  282. package/src/buttons/README.md +4 -0
  283. package/src/buttons/block.json +6 -1
  284. package/src/code/README.md +3 -0
  285. package/src/code/block.json +4 -0
  286. package/src/column/edit.jsx +6 -0
  287. package/src/columns/README.md +3 -0
  288. package/src/columns/block.json +4 -0
  289. package/src/columns/edit.jsx +1 -131
  290. package/src/comments/edit/placeholder.jsx +5 -1
  291. package/src/comments-pagination/README.md +4 -0
  292. package/src/comments-pagination/block.json +11 -0
  293. package/src/comments-pagination/style.scss +3 -0
  294. package/src/common.scss +38 -0
  295. package/src/cover/README.md +1 -0
  296. package/src/cover/block.json +2 -1
  297. package/src/cover/edit/index.jsx +38 -6
  298. package/src/cover/edit/inspector-controls.jsx +10 -1
  299. package/src/cover/embed-video-utils.js +18 -10
  300. package/src/cover/index.php +44 -15
  301. package/src/cover/test/edit.browser.test.js +182 -2
  302. package/src/cover/test/embed-video-utils.test.js +48 -0
  303. package/src/cover/view.js +22 -0
  304. package/src/details/README.md +2 -0
  305. package/src/details/block.json +3 -0
  306. package/src/embed/README.md +4 -0
  307. package/src/embed/block.json +6 -1
  308. package/src/embed/style.scss +7 -1
  309. package/src/file/README.md +4 -0
  310. package/src/file/block.json +5 -0
  311. package/src/footnotes/README.md +3 -0
  312. package/src/footnotes/block.json +4 -0
  313. package/src/gallery/README.md +13 -0
  314. package/src/gallery/block.json +13 -0
  315. package/src/gallery/dynamic-gallery.jsx +11 -91
  316. package/src/gallery/edit.jsx +146 -47
  317. package/src/gallery/editor.scss +5 -9
  318. package/src/gallery/order-controls.tsx +143 -0
  319. package/src/gallery/order-images.js +111 -0
  320. package/src/gallery/order-options.ts +75 -0
  321. package/src/gallery/test/edit.jsdom.test.js +87 -10
  322. package/src/gallery/test/order-images.js +162 -0
  323. package/src/gallery/use-dynamic-gallery.js +1 -9
  324. package/src/gallery/use-get-media.js +7 -2
  325. package/src/group/edit.jsx +5 -5
  326. package/src/heading/README.md +4 -0
  327. package/src/heading/block.json +5 -0
  328. package/src/home-link/README.md +6 -0
  329. package/src/home-link/block.json +12 -0
  330. package/src/icon/components/custom-inserter/index.jsx +5 -1
  331. package/src/icon/edit.jsx +68 -7
  332. package/src/icon/index.php +1 -1
  333. package/src/image/index.php +3 -4
  334. package/src/image/style.scss +14 -2
  335. package/src/image/test/use-open-image-media-editor-modal.jsdom.test.js +122 -60
  336. package/src/image/use-open-image-media-editor-modal.js +37 -41
  337. package/src/image/view.js +64 -68
  338. package/src/latest-comments/README.md +3 -0
  339. package/src/latest-comments/block.json +10 -0
  340. package/src/latest-posts/README.md +3 -0
  341. package/src/latest-posts/block.json +4 -0
  342. package/src/list/README.md +6 -0
  343. package/src/list/block.json +12 -1
  344. package/src/list-item/README.md +6 -0
  345. package/src/list-item/block.json +8 -1
  346. package/src/list-item/index.js +5 -0
  347. package/src/loginout/README.md +3 -0
  348. package/src/loginout/block.json +4 -0
  349. package/src/math/README.md +3 -0
  350. package/src/math/block.json +4 -0
  351. package/src/media-text/README.md +17 -0
  352. package/src/media-text/block.json +18 -0
  353. package/src/media-text/style.scss +5 -1
  354. package/src/navigation/test/use-navigation-menu.jsdom.test.js +1 -1
  355. package/src/navigation-link/README.md +1 -1
  356. package/src/navigation-link/link-ui/index.jsx +60 -27
  357. package/src/navigation-link/link-ui/test/get-suggestions-query.jsdom.test.js +67 -0
  358. package/src/navigation-link/shared/index.js +4 -0
  359. package/src/navigation-link/shared/test/use-block-suggestions.jsdom.test.js +158 -0
  360. package/src/navigation-link/shared/test/use-entity-binding.jsdom.test.js +1 -7
  361. package/src/navigation-link/shared/use-block-suggestions.js +192 -0
  362. package/src/page-list/README.md +3 -0
  363. package/src/page-list/block.json +4 -0
  364. package/src/paragraph/README.md +1 -0
  365. package/src/paragraph/block.json +1 -0
  366. package/src/playlist/test/edit-component.jsdom.test.jsx +11 -11
  367. package/src/playlist-track/test/edit.jsdom.test.jsx +3 -3
  368. package/src/post-author-biography/README.md +1 -0
  369. package/src/post-author-biography/block.json +1 -0
  370. package/src/post-comments-form/README.md +3 -0
  371. package/src/post-comments-form/block.json +5 -0
  372. package/src/post-content/README.md +1 -0
  373. package/src/post-content/block.json +2 -1
  374. package/src/post-excerpt/README.md +3 -0
  375. package/src/post-excerpt/block.json +4 -0
  376. package/src/post-featured-image/block.json +1 -0
  377. package/src/post-featured-image/edit.jsx +2 -2
  378. package/src/post-terms/README.md +3 -0
  379. package/src/post-terms/block.json +4 -0
  380. package/src/post-time-to-read/README.md +3 -0
  381. package/src/post-time-to-read/block.json +4 -0
  382. package/src/post-title/README.md +3 -0
  383. package/src/post-title/block.json +4 -0
  384. package/src/preformatted/README.md +3 -0
  385. package/src/preformatted/block.json +4 -0
  386. package/src/pullquote/README.md +1 -0
  387. package/src/pullquote/block.json +2 -1
  388. package/src/query-no-results/README.md +3 -0
  389. package/src/query-no-results/block.json +4 -0
  390. package/src/query-pagination/README.md +4 -0
  391. package/src/query-pagination/block.json +17 -0
  392. package/src/query-pagination/style.scss +3 -0
  393. package/src/query-total/README.md +3 -0
  394. package/src/query-total/block.json +4 -0
  395. package/src/quote/README.md +2 -0
  396. package/src/quote/block.json +2 -0
  397. package/src/read-more/README.md +3 -0
  398. package/src/read-more/block.json +5 -0
  399. package/src/rss/README.md +3 -0
  400. package/src/rss/block.json +4 -0
  401. package/src/search/README.md +1 -0
  402. package/src/search/block.json +2 -1
  403. package/src/site-tagline/README.md +3 -0
  404. package/src/site-tagline/block.json +4 -0
  405. package/src/site-title/README.md +3 -0
  406. package/src/site-title/block.json +4 -0
  407. package/src/social-links/README.md +1 -0
  408. package/src/social-links/block.json +1 -0
  409. package/src/tab-list/README.md +2 -0
  410. package/src/tab-list/block.json +4 -0
  411. package/src/tab-list/edit.jsx +3 -0
  412. package/src/tab-list/save.jsx +3 -0
  413. package/src/tab-panels/README.md +2 -0
  414. package/src/tab-panels/block.json +3 -0
  415. package/src/table/editor.scss +8 -2
  416. package/src/table/style.scss +4 -4
  417. package/src/tabs/README.md +2 -0
  418. package/src/tabs/block.json +3 -0
  419. package/src/tag-cloud/style.scss +1 -1
  420. package/src/template-part/index.php +16 -3
  421. package/src/term-count/README.md +4 -0
  422. package/src/term-count/block.json +5 -0
  423. package/src/term-description/README.md +3 -0
  424. package/src/term-description/block.json +4 -0
  425. package/src/term-name/README.md +4 -0
  426. package/src/term-name/block.json +6 -1
  427. package/src/term-template/README.md +3 -0
  428. package/src/term-template/block.json +4 -0
  429. package/src/utils/test/waveform-player-auto-init.jsdom.test.js +25 -0
  430. package/src/utils/test/waveform-player-dependency.jsdom.test.js +7 -60
  431. package/src/utils/test/waveform-utils.browser.test.js +3 -15
  432. package/src/utils/waveform-utils.js +1 -1
  433. package/src/verse/README.md +4 -0
  434. package/src/verse/block.json +4 -0
  435. package/src/verse/style.scss +11 -2
  436. package/src/video/README.md +4 -0
  437. package/src/video/block.json +7 -1
  438. package/src/video/edit.jsx +13 -2
  439. package/build/columns/utils.cjs +0 -112
  440. package/build/columns/utils.cjs.map +0 -7
  441. package/build-module/columns/utils.mjs +0 -78
  442. package/build-module/columns/utils.mjs.map +0 -7
  443. package/src/columns/test/utils.js +0 -331
  444. package/src/columns/utils.js +0 -176
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/column/edit.jsx"],
4
- "sourcesContent": ["import clsx from 'clsx';\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\t__experimentalUnitControl as UnitControl,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { sprintf, __ } from '@wordpress/i18n';\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\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\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\treturn (\n\t\t<ToolsPanel\n\t\t\tlabel={ __( 'Settings' ) }\n\t\t\tresetAll={ () => {\n\t\t\t\tsetAttributes( { width: undefined } );\n\t\t\t} }\n\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t>\n\t\t\t<ToolsPanelItem\n\t\t\t\thasValue={ () => width !== undefined }\n\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\tonDeselect={ () => setAttributes( { width: undefined } ) }\n\t\t\t\tisShownByDefault\n\t\t\t>\n\t\t\t\t<UnitControl\n\t\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\t\t__unstableInputWidth=\"calc(50% - 8px)\"\n\t\t\t\t\tvalue={ width || '' }\n\t\t\t\t\tonChange={ ( nextWidth ) => {\n\t\t\t\t\t\tnextWidth =\n\t\t\t\t\t\t\t0 > parseFloat( nextWidth ) ? '0' : nextWidth;\n\t\t\t\t\t\tsetAttributes( { width: nextWidth } );\n\t\t\t\t\t} }\n\t\t\t\t\tunits={ units }\n\t\t\t\t/>\n\t\t\t</ToolsPanelItem>\n\t\t</ToolsPanel>\n\t);\n}\n\n/**\n * Renders the `core/column` block in the editor.\n *\n * @param {Object} props Component props.\n * @param {Object} props.attributes Block attributes.\n * @param {string} [props.attributes.verticalAlignment] Vertical alignment of the column, one of `top`, `center`, `bottom` or `stretch`. Setting it resets the alignment on the parent Columns block.\n * @param {string|number} [props.attributes.width] Column width, used as its `flex-basis`. A number is treated as a percentage, for content saved before the attribute became a CSS length.\n * @param {string|boolean} [props.attributes.templateLock] Template lock applied to the inner blocks, one of `all`, `insert`, `contentOnly` or `false`.\n * @param {string[]} [props.attributes.allowedBlocks] Names of the blocks allowed as inner blocks, added by the `allowedBlocks` block support.\n * @param {Function} props.setAttributes Callback for updating block attributes.\n * @param {string} props.clientId Client ID of the block.\n *\n * @return {React.JSX.Element} React element.\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? false\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"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,0BASO;AACP,wBAKO;AACP,kBAAuC;AACvC,kBAA4B;AAC5B,mBAA+C;AAsB3C;AApBJ,SAAS,wBAAyB,EAAE,OAAO,cAAc,GAAI;AAC5D,QAAM,CAAE,cAAe,QAAI,iCAAa,eAAgB;AACxD,QAAM,YAAQ,kBAAAA,8BAAgB;AAAA,IAC7B,gBAAgB,kBAAkB,CAAE,KAAK,MAAM,MAAM,OAAO,IAAK;AAAA,EAClE,CAAE;AACF,QAAM,wBAAoB,6CAA+B;AACzD,SACC;AAAA,IAAC,kBAAAC;AAAA,IAAA;AAAA,MACA,WAAQ,gBAAI,UAAW;AAAA,MACvB,UAAW,MAAM;AAChB,sBAAe,EAAE,OAAO,OAAU,CAAE;AAAA,MACrC;AAAA,MACA;AAAA,MAEA;AAAA,QAAC,kBAAAC;AAAA,QAAA;AAAA,UACA,UAAW,MAAM,UAAU;AAAA,UAC3B,WAAQ,gBAAI,OAAQ;AAAA,UACpB,YAAa,MAAM,cAAe,EAAE,OAAO,OAAU,CAAE;AAAA,UACvD,kBAAgB;AAAA,UAEhB;AAAA,YAAC,kBAAAC;AAAA,YAAA;AAAA,cACA,WAAQ,gBAAI,OAAQ;AAAA,cACpB,sBAAqB;AAAA,cACrB,OAAQ,SAAS;AAAA,cACjB,UAAW,CAAE,cAAe;AAC3B,4BACC,IAAI,WAAY,SAAU,IAAI,MAAM;AACrC,8BAAe,EAAE,OAAO,UAAU,CAAE;AAAA,cACrC;AAAA,cACA;AAAA;AAAA,UACD;AAAA;AAAA,MACD;AAAA;AAAA,EACD;AAEF;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AAA,EACD;AAEA,SACC,4EACC;AAAA,gDAAC,qCACA;AAAA,MAAC;AAAA;AAAA,QACA,UAAW;AAAA,QACX,OAAQ;AAAA,QACR,UAAW,CAAE,OAAO,UAAU,UAAU,SAAU;AAAA;AAAA,IACnD,GACD;AAAA,IACA,4CAAC,yCACA;AAAA,MAAC;AAAA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACD,GACD;AAAA,IACA,4CAAC,SAAM,GAAG,kBAAmB;AAAA,KAC9B;AAEF;AAEA,IAAO,eAAQ;",
4
+ "sourcesContent": ["import clsx from 'clsx';\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\t__experimentalUnitControl as UnitControl,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { sprintf, __ } from '@wordpress/i18n';\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\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\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\treturn (\n\t\t<ToolsPanel\n\t\t\tlabel={ __( 'Settings' ) }\n\t\t\tresetAll={ () => {\n\t\t\t\tsetAttributes( { width: undefined } );\n\t\t\t} }\n\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t>\n\t\t\t<ToolsPanelItem\n\t\t\t\thasValue={ () => width !== undefined }\n\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\tonDeselect={ () => setAttributes( { width: undefined } ) }\n\t\t\t\tisShownByDefault\n\t\t\t>\n\t\t\t\t<UnitControl\n\t\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\t\t__unstableInputWidth=\"calc(50% - 8px)\"\n\t\t\t\t\tvalue={ width || '' }\n\t\t\t\t\tonChange={ ( nextWidth ) => {\n\t\t\t\t\t\tnextWidth =\n\t\t\t\t\t\t\t0 > parseFloat( nextWidth ) ? '0' : nextWidth;\n\t\t\t\t\t\tsetAttributes( { width: nextWidth } );\n\t\t\t\t\t} }\n\t\t\t\t\tunits={ units }\n\t\t\t\t/>\n\t\t\t</ToolsPanelItem>\n\t\t</ToolsPanel>\n\t);\n}\n\n/**\n * Renders the `core/column` block in the editor.\n *\n * @param {Object} props Component props.\n * @param {Object} props.attributes Block attributes.\n * @param {string} [props.attributes.verticalAlignment] Vertical alignment of the column, one of `top`, `center`, `bottom` or `stretch`. Setting it resets the alignment on the parent Columns block.\n * @param {string|number} [props.attributes.width] Column width, used as its `flex-basis`. A number is treated as a percentage, for content saved before the attribute became a CSS length.\n * @param {string|boolean} [props.attributes.templateLock] Template lock applied to the inner blocks, one of `all`, `insert`, `contentOnly` or `false`.\n * @param {string[]} [props.attributes.allowedBlocks] Names of the blocks allowed as inner blocks, added by the `allowedBlocks` block support.\n * @param {Function} props.setAttributes Callback for updating block attributes.\n * @param {string} props.clientId Client ID of the block.\n *\n * @return {React.JSX.Element} React element.\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\t// State, not a ref, so that the element is there on the next render.\n\tconst [ dropZoneElement, setDropZoneElement ] = useState( null );\n\tconst blockProps = useBlockProps( {\n\t\tref: setDropZoneElement,\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\t// Allows dropping before or after the column, not only inside it.\n\t\t\tdropZoneElement,\n\t\t\ttemplateLock,\n\t\t\tallowedBlocks,\n\t\t\trenderAppender: hasChildBlocks\n\t\t\t\t? false\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"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,0BASO;AACP,wBAKO;AACP,kBAAuC;AACvC,qBAAyB;AACzB,kBAA4B;AAC5B,mBAA+C;AAsB3C;AApBJ,SAAS,wBAAyB,EAAE,OAAO,cAAc,GAAI;AAC5D,QAAM,CAAE,cAAe,QAAI,iCAAa,eAAgB;AACxD,QAAM,YAAQ,kBAAAA,8BAAgB;AAAA,IAC7B,gBAAgB,kBAAkB,CAAE,KAAK,MAAM,MAAM,OAAO,IAAK;AAAA,EAClE,CAAE;AACF,QAAM,wBAAoB,6CAA+B;AACzD,SACC;AAAA,IAAC,kBAAAC;AAAA,IAAA;AAAA,MACA,WAAQ,gBAAI,UAAW;AAAA,MACvB,UAAW,MAAM;AAChB,sBAAe,EAAE,OAAO,OAAU,CAAE;AAAA,MACrC;AAAA,MACA;AAAA,MAEA;AAAA,QAAC,kBAAAC;AAAA,QAAA;AAAA,UACA,UAAW,MAAM,UAAU;AAAA,UAC3B,WAAQ,gBAAI,OAAQ;AAAA,UACpB,YAAa,MAAM,cAAe,EAAE,OAAO,OAAU,CAAE;AAAA,UACvD,kBAAgB;AAAA,UAEhB;AAAA,YAAC,kBAAAC;AAAA,YAAA;AAAA,cACA,WAAQ,gBAAI,OAAQ;AAAA,cACpB,sBAAqB;AAAA,cACrB,OAAQ,SAAS;AAAA,cACjB,UAAW,CAAE,cAAe;AAC3B,4BACC,IAAI,WAAY,SAAU,IAAI,MAAM;AACrC,8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;AAAA,IACzB;AAAA,IACA;AAAA,EACD;AAEA,QAAM,uBAAmB;AAAA,IACxB,EAAE,GAAG,YAAY,cAAc,MAAM;AAAA,IACrC;AAAA;AAAA,MAEC;AAAA,MACA;AAAA,MACA;AAAA,MACA,gBAAgB,iBACb,QACA,gCAAY;AAAA,IAChB;AAAA,EACD;AAEA,SACC,4EACC;AAAA,gDAAC,qCACA;AAAA,MAAC;AAAA;AAAA,QACA,UAAW;AAAA,QACX,OAAQ;AAAA,QACR,UAAW,CAAE,OAAO,UAAU,UAAU,SAAU;AAAA;AAAA,IACnD,GACD;AAAA,IACA,4CAAC,yCACA;AAAA,MAAC;AAAA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACD,GACD;AAAA,IACA,4CAAC,SAAM,GAAG,kBAAmB;AAAA,KAC9B;AAEF;AAEA,IAAO,eAAQ;",
6
6
  "names": ["useCustomUnits", "ToolsPanel", "ToolsPanelItem", "UnitControl", "clsx", "blockEditorStore"]
7
7
  }
@@ -43,6 +43,10 @@
43
43
  "gradient": true
44
44
  }
45
45
  },
46
+ "dimensions": {
47
+ "minHeight": true,
48
+ "minWidth": true
49
+ },
46
50
  "spacing": {
47
51
  "blockGap": {
48
52
  "__experimentalDefault": "2em",
@@ -39,87 +39,14 @@ var import_components = require("@wordpress/components");
39
39
  var import_block_editor = require("@wordpress/block-editor");
40
40
  var import_data = require("@wordpress/data");
41
41
  var import_blocks = require("@wordpress/blocks");
42
- var import_utils = require("./utils.cjs");
43
42
  var import_hooks = require("../utils/hooks.cjs");
44
43
  var import_jsx_runtime = require("react/jsx-runtime");
45
44
  var DEFAULT_BLOCK = {
46
45
  name: "core/column"
47
46
  };
48
- function ColumnInspectorControls({
49
- clientId,
50
- setAttributes,
51
- isStackedOnMobile
52
- }) {
53
- const { count, canInsertColumnBlock, minCount } = (0, import_data.useSelect)(
54
- (select) => {
55
- const { canInsertBlockType, canRemoveBlock, getBlockOrder } = select(import_block_editor.store);
56
- const blockOrder = getBlockOrder(clientId);
57
- const preventRemovalBlockIndexes = blockOrder.reduce(
58
- (acc, blockId, index) => {
59
- if (!canRemoveBlock(blockId)) {
60
- acc.push(index);
61
- }
62
- return acc;
63
- },
64
- []
65
- );
66
- return {
67
- count: blockOrder.length,
68
- canInsertColumnBlock: canInsertBlockType(
69
- "core/column",
70
- clientId
71
- ),
72
- minCount: Math.max(...preventRemovalBlockIndexes) + 1
73
- };
74
- },
75
- [clientId]
76
- );
77
- const { getBlocks } = (0, import_data.useSelect)(import_block_editor.store);
78
- const { replaceInnerBlocks } = (0, import_data.useDispatch)(import_block_editor.store);
79
- function updateColumns(previousColumns, newColumns) {
80
- let innerBlocks = getBlocks(clientId);
81
- const hasExplicitWidths = (0, import_utils.hasExplicitPercentColumnWidths)(innerBlocks);
82
- const isAddingColumn = newColumns > previousColumns;
83
- if (isAddingColumn && hasExplicitWidths) {
84
- const newColumnWidth = (0, import_utils.toWidthPrecision)(100 / newColumns);
85
- const newlyAddedColumns = newColumns - previousColumns;
86
- const widths = (0, import_utils.getRedistributedColumnWidths)(
87
- innerBlocks,
88
- 100 - newColumnWidth * newlyAddedColumns
89
- );
90
- innerBlocks = [
91
- ...(0, import_utils.getMappedColumnWidths)(innerBlocks, widths),
92
- ...Array.from({
93
- length: newlyAddedColumns
94
- }).map(() => {
95
- return (0, import_blocks.createBlock)("core/column", {
96
- width: `${newColumnWidth}%`
97
- });
98
- })
99
- ];
100
- } else if (isAddingColumn) {
101
- innerBlocks = [
102
- ...innerBlocks,
103
- ...Array.from({
104
- length: newColumns - previousColumns
105
- }).map(() => {
106
- return (0, import_blocks.createBlock)("core/column");
107
- })
108
- ];
109
- } else if (newColumns < previousColumns) {
110
- innerBlocks = innerBlocks.slice(
111
- 0,
112
- -(previousColumns - newColumns)
113
- );
114
- if (hasExplicitWidths) {
115
- const widths = (0, import_utils.getRedistributedColumnWidths)(innerBlocks, 100);
116
- innerBlocks = (0, import_utils.getMappedColumnWidths)(innerBlocks, widths);
117
- }
118
- }
119
- replaceInnerBlocks(clientId, innerBlocks);
120
- }
47
+ function ColumnInspectorControls({ setAttributes, isStackedOnMobile }) {
121
48
  const dropdownMenuProps = (0, import_hooks.useToolsPanelDropdownMenuProps)();
122
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
123
50
  import_components.__experimentalToolsPanel,
124
51
  {
125
52
  label: (0, import_i18n.__)("Settings"),
@@ -129,44 +56,27 @@ function ColumnInspectorControls({
129
56
  });
130
57
  },
131
58
  dropdownMenuProps,
132
- children: [
133
- canInsertColumnBlock && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.__experimentalVStack, { spacing: 4, style: { gridColumn: "1 / -1" }, children: [
134
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
135
- import_components.RangeControl,
59
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
60
+ import_components.__experimentalToolsPanelItem,
61
+ {
62
+ label: (0, import_i18n.__)("Stack on mobile"),
63
+ isShownByDefault: true,
64
+ hasValue: () => isStackedOnMobile !== true,
65
+ onDeselect: () => setAttributes({
66
+ isStackedOnMobile: true
67
+ }),
68
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
+ import_components.ToggleControl,
136
70
  {
137
- label: (0, import_i18n.__)("Columns"),
138
- value: count,
139
- onChange: (value) => updateColumns(count, Math.max(minCount, value)),
140
- min: Math.max(1, minCount),
141
- max: Math.max(6, count)
71
+ label: (0, import_i18n.__)("Stack on mobile"),
72
+ checked: isStackedOnMobile,
73
+ onChange: () => setAttributes({
74
+ isStackedOnMobile: !isStackedOnMobile
75
+ })
142
76
  }
143
- ),
144
- count > 6 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Notice, { status: "warning", isDismissible: false, children: (0, import_i18n.__)(
145
- "This column count exceeds the recommended amount and may cause visual breakage."
146
- ) })
147
- ] }),
148
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
149
- import_components.__experimentalToolsPanelItem,
150
- {
151
- label: (0, import_i18n.__)("Stack on mobile"),
152
- isShownByDefault: true,
153
- hasValue: () => isStackedOnMobile !== true,
154
- onDeselect: () => setAttributes({
155
- isStackedOnMobile: true
156
- }),
157
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
158
- import_components.ToggleControl,
159
- {
160
- label: (0, import_i18n.__)("Stack on mobile"),
161
- checked: isStackedOnMobile,
162
- onChange: () => setAttributes({
163
- isStackedOnMobile: !isStackedOnMobile
164
- })
165
- }
166
- )
167
- }
168
- )
169
- ]
77
+ )
78
+ }
79
+ )
170
80
  }
171
81
  );
172
82
  }
@@ -209,7 +119,6 @@ function ColumnsEditContainer({ attributes, setAttributes, clientId }) {
209
119
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_block_editor.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
210
120
  ColumnInspectorControls,
211
121
  {
212
- clientId,
213
122
  setAttributes,
214
123
  isStackedOnMobile
215
124
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/columns/edit.jsx"],
4
- "sourcesContent": ["import clsx from 'clsx';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tNotice,\n\tRangeControl,\n\tToggleControl,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport {\n\tInspectorControls,\n\tuseInnerBlocksProps,\n\tBlockControls,\n\tBlockVerticalAlignmentToolbar,\n\t__experimentalBlockVariationPicker,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useDispatch, useSelect, useRegistry } from '@wordpress/data';\nimport {\n\tcreateBlock,\n\tcreateBlocksFromInnerBlocksTemplate,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport {\n\thasExplicitPercentColumnWidths,\n\tgetMappedColumnWidths,\n\tgetRedistributedColumnWidths,\n\ttoWidthPrecision,\n} from './utils';\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\n\nconst DEFAULT_BLOCK = {\n\tname: 'core/column',\n};\n\nfunction ColumnInspectorControls( {\n\tclientId,\n\tsetAttributes,\n\tisStackedOnMobile,\n} ) {\n\tconst { count, canInsertColumnBlock, minCount } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { canInsertBlockType, canRemoveBlock, getBlockOrder } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst blockOrder = getBlockOrder( clientId );\n\n\t\t\t// Get the indexes of columns for which removal is prevented.\n\t\t\t// The highest index will be used to determine the minimum column count.\n\t\t\tconst preventRemovalBlockIndexes = blockOrder.reduce(\n\t\t\t\t( acc, blockId, index ) => {\n\t\t\t\t\tif ( ! canRemoveBlock( blockId ) ) {\n\t\t\t\t\t\tacc.push( index );\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t},\n\t\t\t\t[]\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tcount: blockOrder.length,\n\t\t\t\tcanInsertColumnBlock: canInsertBlockType(\n\t\t\t\t\t'core/column',\n\t\t\t\t\tclientId\n\t\t\t\t),\n\t\t\t\tminCount: Math.max( ...preventRemovalBlockIndexes ) + 1,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst { getBlocks } = useSelect( blockEditorStore );\n\tconst { replaceInnerBlocks } = useDispatch( blockEditorStore );\n\n\t/**\n\t * Updates the column count, including necessary revisions to child Column\n\t * blocks to grant required or redistribute available space.\n\t *\n\t * @param {number} previousColumns Previous column count.\n\t * @param {number} newColumns New column count.\n\t */\n\tfunction updateColumns( previousColumns, newColumns ) {\n\t\tlet innerBlocks = getBlocks( clientId );\n\t\tconst hasExplicitWidths = hasExplicitPercentColumnWidths( innerBlocks );\n\n\t\t// Redistribute available width for existing inner blocks.\n\t\tconst isAddingColumn = newColumns > previousColumns;\n\n\t\tif ( isAddingColumn && hasExplicitWidths ) {\n\t\t\t// If adding a new column, assign width to the new column equal to\n\t\t\t// as if it were `1 / columns` of the total available space.\n\t\t\tconst newColumnWidth = toWidthPrecision( 100 / newColumns );\n\t\t\tconst newlyAddedColumns = newColumns - previousColumns;\n\n\t\t\t// Redistribute in consideration of pending block insertion as\n\t\t\t// constraining the available working width.\n\t\t\tconst widths = getRedistributedColumnWidths(\n\t\t\t\tinnerBlocks,\n\t\t\t\t100 - newColumnWidth * newlyAddedColumns\n\t\t\t);\n\n\t\t\tinnerBlocks = [\n\t\t\t\t...getMappedColumnWidths( innerBlocks, widths ),\n\t\t\t\t...Array.from( {\n\t\t\t\t\tlength: newlyAddedColumns,\n\t\t\t\t} ).map( () => {\n\t\t\t\t\treturn createBlock( 'core/column', {\n\t\t\t\t\t\twidth: `${ newColumnWidth }%`,\n\t\t\t\t\t} );\n\t\t\t\t} ),\n\t\t\t];\n\t\t} else if ( isAddingColumn ) {\n\t\t\tinnerBlocks = [\n\t\t\t\t...innerBlocks,\n\t\t\t\t...Array.from( {\n\t\t\t\t\tlength: newColumns - previousColumns,\n\t\t\t\t} ).map( () => {\n\t\t\t\t\treturn createBlock( 'core/column' );\n\t\t\t\t} ),\n\t\t\t];\n\t\t} else if ( newColumns < previousColumns ) {\n\t\t\t// The removed column will be the last of the inner blocks.\n\t\t\tinnerBlocks = innerBlocks.slice(\n\t\t\t\t0,\n\t\t\t\t-( previousColumns - newColumns )\n\t\t\t);\n\t\t\tif ( hasExplicitWidths ) {\n\t\t\t\t// Redistribute as if block is already removed.\n\t\t\t\tconst widths = getRedistributedColumnWidths( innerBlocks, 100 );\n\n\t\t\t\tinnerBlocks = getMappedColumnWidths( innerBlocks, widths );\n\t\t\t}\n\t\t}\n\n\t\treplaceInnerBlocks( clientId, innerBlocks );\n\t}\n\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\treturn (\n\t\t<ToolsPanel\n\t\t\tlabel={ __( 'Settings' ) }\n\t\t\tresetAll={ () => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tisStackedOnMobile: true,\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t>\n\t\t\t{ canInsertColumnBlock && (\n\t\t\t\t<VStack spacing={ 4 } style={ { gridColumn: '1 / -1' } }>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\tlabel={ __( 'Columns' ) }\n\t\t\t\t\t\tvalue={ count }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tupdateColumns( count, Math.max( minCount, value ) )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmin={ Math.max( 1, minCount ) }\n\t\t\t\t\t\tmax={ Math.max( 6, count ) }\n\t\t\t\t\t/>\n\t\t\t\t\t{ count > 6 && (\n\t\t\t\t\t\t<Notice status=\"warning\" isDismissible={ false }>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'This column count exceeds the recommended amount and may cause visual breakage.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Notice>\n\t\t\t\t\t) }\n\t\t\t\t</VStack>\n\t\t\t) }\n\t\t\t<ToolsPanelItem\n\t\t\t\tlabel={ __( 'Stack on mobile' ) }\n\t\t\t\tisShownByDefault\n\t\t\t\thasValue={ () => isStackedOnMobile !== true }\n\t\t\t\tonDeselect={ () =>\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tisStackedOnMobile: true,\n\t\t\t\t\t} )\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'Stack on mobile' ) }\n\t\t\t\t\tchecked={ isStackedOnMobile }\n\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tisStackedOnMobile: ! isStackedOnMobile,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</ToolsPanelItem>\n\t\t</ToolsPanel>\n\t);\n}\n\nfunction ColumnsEditContainer( { attributes, setAttributes, clientId } ) {\n\tconst { isStackedOnMobile, verticalAlignment, templateLock } = attributes;\n\tconst registry = useRegistry();\n\tconst { getBlockOrder } = useSelect( blockEditorStore );\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\tconst classes = clsx( {\n\t\t[ `are-vertically-aligned-${ verticalAlignment }` ]: verticalAlignment,\n\t\t[ `is-not-stacked-on-mobile` ]: ! isStackedOnMobile,\n\t} );\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classes,\n\t} );\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\tdefaultBlock: DEFAULT_BLOCK,\n\t\tdirectInsert: true,\n\t\torientation: 'horizontal',\n\t\trenderAppender: false,\n\t\ttemplateLock,\n\t} );\n\n\t/**\n\t * Update all child Column blocks with a new vertical alignment setting\n\t * based on whatever alignment is passed in. This allows change to parent\n\t * to override anything set on a individual column basis.\n\t *\n\t * @param {string} newVerticalAlignment The vertical alignment setting.\n\t */\n\tfunction updateAlignment( newVerticalAlignment ) {\n\t\tconst innerBlockClientIds = getBlockOrder( clientId );\n\n\t\t// Update own and child Column block vertical alignments.\n\t\t// This is a single action; the batching prevents creating multiple history records.\n\t\tregistry.batch( () => {\n\t\t\tsetAttributes( { verticalAlignment: newVerticalAlignment } );\n\t\t\tupdateBlockAttributes( innerBlockClientIds, {\n\t\t\t\tverticalAlignment: newVerticalAlignment,\n\t\t\t} );\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/>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls>\n\t\t\t\t<ColumnInspectorControls\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tisStackedOnMobile={ isStackedOnMobile }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<div { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n\nfunction Placeholder( { clientId, name, setAttributes } ) {\n\tconst { blockType, variations } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockVariations, getBlockType } = select( blocksStore );\n\n\t\t\treturn {\n\t\t\t\tblockType: getBlockType( name ),\n\t\t\t\tvariations: getBlockVariations( name, 'block' ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\tconst { replaceInnerBlocks } = useDispatch( blockEditorStore );\n\tconst blockProps = useBlockProps();\n\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t<__experimentalBlockVariationPicker\n\t\t\t\ticon={ blockType?.icon?.src }\n\t\t\t\tlabel={ blockType?.title }\n\t\t\t\tvariations={ variations }\n\t\t\t\tinstructions={ __( 'Divide into columns. Select a layout:' ) }\n\t\t\t\tonSelect={ ( nextVariation ) => {\n\t\t\t\t\tif ( nextVariation.attributes ) {\n\t\t\t\t\t\tsetAttributes( nextVariation.attributes );\n\t\t\t\t\t}\n\t\t\t\t\tif ( nextVariation.innerBlocks ) {\n\t\t\t\t\t\treplaceInnerBlocks(\n\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\tcreateBlocksFromInnerBlocksTemplate(\n\t\t\t\t\t\t\t\tnextVariation.innerBlocks\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\ttrue\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</div>\n\t);\n}\n\n/**\n * Renders the `core/columns` block in the editor.\n *\n * Until the block has inner blocks it renders a variation picker; afterwards it\n * renders the columns container. Every prop is forwarded to whichever of the two\n * is rendered.\n *\n * @param {Object} props Component props.\n * @param {string} props.clientId Client ID of the block.\n * @param {string} props.name Block name, used to look up the variations offered by the picker.\n * @param {Object} props.attributes Block attributes.\n * @param {string} [props.attributes.verticalAlignment] Vertical alignment applied to the block and to every child Column block.\n * @param {boolean} [props.attributes.isStackedOnMobile] Whether the columns stack on small viewports. Defaults to `true`.\n * @param {string|boolean} [props.attributes.templateLock] Template lock applied to the inner blocks, one of `all`, `insert`, `contentOnly` or `false`.\n * @param {Function} props.setAttributes Callback for updating block attributes.\n *\n * @return {React.JSX.Element} React element.\n */\nconst ColumnsEdit = ( props ) => {\n\tconst { clientId } = props;\n\tconst hasInnerBlocks = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getBlocks( clientId ).length > 0,\n\t\t[ clientId ]\n\t);\n\tconst Component = hasInnerBlocks ? ColumnsEditContainer : Placeholder;\n\n\treturn <Component { ...props } />;\n};\n\nexport default ColumnsEdit;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,kBAAmB;AACnB,wBAOO;AACP,0BAQO;AACP,kBAAoD;AACpD,oBAIO;AACP,mBAKO;AACP,mBAA+C;AAuH3C;AArHJ,IAAM,gBAAgB;AAAA,EACrB,MAAM;AACP;AAEA,SAAS,wBAAyB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,EAAE,OAAO,sBAAsB,SAAS,QAAI;AAAA,IACjD,CAAE,WAAY;AACb,YAAM,EAAE,oBAAoB,gBAAgB,cAAc,IACzD,OAAQ,oBAAAA,KAAiB;AAC1B,YAAM,aAAa,cAAe,QAAS;AAI3C,YAAM,6BAA6B,WAAW;AAAA,QAC7C,CAAE,KAAK,SAAS,UAAW;AAC1B,cAAK,CAAE,eAAgB,OAAQ,GAAI;AAClC,gBAAI,KAAM,KAAM;AAAA,UACjB;AACA,iBAAO;AAAA,QACR;AAAA,QACA,CAAC;AAAA,MACF;AAEA,aAAO;AAAA,QACN,OAAO,WAAW;AAAA,QAClB,sBAAsB;AAAA,UACrB;AAAA,UACA;AAAA,QACD;AAAA,QACA,UAAU,KAAK,IAAK,GAAG,0BAA2B,IAAI;AAAA,MACvD;A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C;AAAA;AAAA,MACA,MAAO,WAAW,MAAM;AAAA,MACxB,OAAQ,WAAW;AAAA,MACnB;AAAA,MACA,kBAAe,gBAAI,uCAAwC;AAAA,MAC3D,UAAW,CAAE,kBAAmB;AAC/B,YAAK,cAAc,YAAa;AAC/B,wBAAe,cAAc,UAAW;AAAA,QACzC;AACA,YAAK,cAAc,aAAc;AAChC;AAAA,YACC;AAAA,gBACA;AAAA,cACC,cAAc;AAAA,YACf;AAAA,YACA;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA;AAAA,EACD,GACD;AAEF;AAoBA,IAAM,cAAc,CAAE,UAAW;AAChC,QAAM,EAAE,SAAS,IAAI;AACrB,QAAM,qBAAiB;AAAA,IACtB,CAAE,WACD,OAAQ,oBAAAA,KAAiB,EAAE,UAAW,QAAS,EAAE,SAAS;AAAA,IAC3D,CAAE,QAAS;AAAA,EACZ;AACA,QAAM,YAAY,iBAAiB,uBAAuB;AAE1D,SAAO,4CAAC,aAAY,GAAG,OAAQ;AAChC;AAEA,IAAO,eAAQ;",
6
- "names": ["blockEditorStore", "ToolsPanel", "VStack", "ToolsPanelItem", "clsx", "blocksStore"]
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tToggleControl,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport {\n\tInspectorControls,\n\tuseInnerBlocksProps,\n\tBlockControls,\n\tBlockVerticalAlignmentToolbar,\n\t__experimentalBlockVariationPicker,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useDispatch, useSelect, useRegistry } from '@wordpress/data';\nimport {\n\tcreateBlocksFromInnerBlocksTemplate,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\n\nconst DEFAULT_BLOCK = {\n\tname: 'core/column',\n};\n\nfunction ColumnInspectorControls( { setAttributes, isStackedOnMobile } ) {\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\treturn (\n\t\t<ToolsPanel\n\t\t\tlabel={ __( 'Settings' ) }\n\t\t\tresetAll={ () => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tisStackedOnMobile: true,\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t>\n\t\t\t<ToolsPanelItem\n\t\t\t\tlabel={ __( 'Stack on mobile' ) }\n\t\t\t\tisShownByDefault\n\t\t\t\thasValue={ () => isStackedOnMobile !== true }\n\t\t\t\tonDeselect={ () =>\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tisStackedOnMobile: true,\n\t\t\t\t\t} )\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'Stack on mobile' ) }\n\t\t\t\t\tchecked={ isStackedOnMobile }\n\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tisStackedOnMobile: ! isStackedOnMobile,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</ToolsPanelItem>\n\t\t</ToolsPanel>\n\t);\n}\n\nfunction ColumnsEditContainer( { attributes, setAttributes, clientId } ) {\n\tconst { isStackedOnMobile, verticalAlignment, templateLock } = attributes;\n\tconst registry = useRegistry();\n\tconst { getBlockOrder } = useSelect( blockEditorStore );\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\tconst classes = clsx( {\n\t\t[ `are-vertically-aligned-${ verticalAlignment }` ]: verticalAlignment,\n\t\t[ `is-not-stacked-on-mobile` ]: ! isStackedOnMobile,\n\t} );\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classes,\n\t} );\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\tdefaultBlock: DEFAULT_BLOCK,\n\t\tdirectInsert: true,\n\t\torientation: 'horizontal',\n\t\trenderAppender: false,\n\t\ttemplateLock,\n\t} );\n\n\t/**\n\t * Update all child Column blocks with a new vertical alignment setting\n\t * based on whatever alignment is passed in. This allows change to parent\n\t * to override anything set on a individual column basis.\n\t *\n\t * @param {string} newVerticalAlignment The vertical alignment setting.\n\t */\n\tfunction updateAlignment( newVerticalAlignment ) {\n\t\tconst innerBlockClientIds = getBlockOrder( clientId );\n\n\t\t// Update own and child Column block vertical alignments.\n\t\t// This is a single action; the batching prevents creating multiple history records.\n\t\tregistry.batch( () => {\n\t\t\tsetAttributes( { verticalAlignment: newVerticalAlignment } );\n\t\t\tupdateBlockAttributes( innerBlockClientIds, {\n\t\t\t\tverticalAlignment: newVerticalAlignment,\n\t\t\t} );\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/>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls>\n\t\t\t\t<ColumnInspectorControls\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tisStackedOnMobile={ isStackedOnMobile }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<div { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n\nfunction Placeholder( { clientId, name, setAttributes } ) {\n\tconst { blockType, variations } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockVariations, getBlockType } = select( blocksStore );\n\n\t\t\treturn {\n\t\t\t\tblockType: getBlockType( name ),\n\t\t\t\tvariations: getBlockVariations( name, 'block' ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\tconst { replaceInnerBlocks } = useDispatch( blockEditorStore );\n\tconst blockProps = useBlockProps();\n\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t<__experimentalBlockVariationPicker\n\t\t\t\ticon={ blockType?.icon?.src }\n\t\t\t\tlabel={ blockType?.title }\n\t\t\t\tvariations={ variations }\n\t\t\t\tinstructions={ __( 'Divide into columns. Select a layout:' ) }\n\t\t\t\tonSelect={ ( nextVariation ) => {\n\t\t\t\t\tif ( nextVariation.attributes ) {\n\t\t\t\t\t\tsetAttributes( nextVariation.attributes );\n\t\t\t\t\t}\n\t\t\t\t\tif ( nextVariation.innerBlocks ) {\n\t\t\t\t\t\treplaceInnerBlocks(\n\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\tcreateBlocksFromInnerBlocksTemplate(\n\t\t\t\t\t\t\t\tnextVariation.innerBlocks\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\ttrue\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</div>\n\t);\n}\n\n/**\n * Renders the `core/columns` block in the editor.\n *\n * Until the block has inner blocks it renders a variation picker; afterwards it\n * renders the columns container. Every prop is forwarded to whichever of the two\n * is rendered.\n *\n * @param {Object} props Component props.\n * @param {string} props.clientId Client ID of the block.\n * @param {string} props.name Block name, used to look up the variations offered by the picker.\n * @param {Object} props.attributes Block attributes.\n * @param {string} [props.attributes.verticalAlignment] Vertical alignment applied to the block and to every child Column block.\n * @param {boolean} [props.attributes.isStackedOnMobile] Whether the columns stack on small viewports. Defaults to `true`.\n * @param {string|boolean} [props.attributes.templateLock] Template lock applied to the inner blocks, one of `all`, `insert`, `contentOnly` or `false`.\n * @param {Function} props.setAttributes Callback for updating block attributes.\n *\n * @return {React.JSX.Element} React element.\n */\nconst ColumnsEdit = ( props ) => {\n\tconst { clientId } = props;\n\tconst hasInnerBlocks = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getBlocks( clientId ).length > 0,\n\t\t[ clientId ]\n\t);\n\tconst Component = hasInnerBlocks ? ColumnsEditContainer : Placeholder;\n\n\treturn <Component { ...props } />;\n};\n\nexport default ColumnsEdit;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A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K,cAAc,YAAa;AAC/B,wBAAe,cAAc,UAAW;AAAA,QACzC;AACA,YAAK,cAAc,aAAc;AAChC;AAAA,YACC;AAAA,gBACA;AAAA,cACC,cAAc;AAAA,YACf;AAAA,YACA;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA;AAAA,EACD,GACD;AAEF;AAoBA,IAAM,cAAc,CAAE,UAAW;AAChC,QAAM,EAAE,SAAS,IAAI;AACrB,QAAM,qBAAiB;AAAA,IACtB,CAAE,WACD,OAAQ,oBAAAA,KAAiB,EAAE,UAAW,QAAS,EAAE,SAAS;AAAA,IAC3D,CAAE,QAAS;AAAA,EACZ;AACA,QAAM,YAAY,iBAAiB,uBAAuB;AAE1D,SAAO,4CAAC,aAAY,GAAG,OAAQ;AAChC;AAEA,IAAO,eAAQ;",
6
+ "names": ["ToolsPanel", "ToolsPanelItem", "blockEditorStore", "clsx", "blocksStore"]
7
7
  }
@@ -38,6 +38,7 @@ var import_i18n = require("@wordpress/i18n");
38
38
  var import_data = require("@wordpress/data");
39
39
  var import_core_data = require("@wordpress/core-data");
40
40
  var import_element = require("@wordpress/element");
41
+ var import_react_inert_value = require("@wordpress/react-inert-value");
41
42
  var import_form = __toESM(require("../../post-comments-form/form.cjs"));
42
43
  var import_jsx_runtime = require("react/jsx-runtime");
43
44
  function PostCommentsPlaceholder({ postType, postId }) {
@@ -47,98 +48,105 @@ function PostCommentsPlaceholder({ postType, postId }) {
47
48
  (select) => select(import_block_editor.store).getSettings().__experimentalDiscussionSettings?.avatarURL,
48
49
  []
49
50
  );
50
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "wp-block-comments__legacy-placeholder", inert: "true", children: [
51
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
52
- /* translators: %s: Post title. */
53
- children: (0, import_i18n.sprintf)((0, import_i18n.__)("One response to %s"), postTitle)
54
- }),
55
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "navigation", children: [
56
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "alignleft", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", { href: "#top", children: [
57
- "« ",
58
- (0, import_i18n.__)("Older Comments")
59
- ] }) }),
60
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "alignright", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", { href: "#top", children: [
61
- (0, import_i18n.__)("Newer Comments"),
62
- " »"
63
- ] }) })
64
- ] }),
65
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", { className: "commentlist", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { className: "comment even thread-even depth-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("article", { className: "comment-body", children: [
66
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("footer", { className: "comment-meta", children: [
67
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "comment-author vcard", children: [
68
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
- "img",
70
- {
71
- alt: (0, import_i18n.__)("Commenter Avatar"),
72
- src: avatarURL,
73
- className: "avatar avatar-32 photo",
74
- height: "32",
75
- width: "32",
76
- loading: "lazy"
77
- }
78
- ),
79
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("b", { className: "fn", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: "#top", className: "url", children: (0, import_i18n.__)("A WordPress Commenter") }) }),
80
- " ",
81
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "says", children: [
82
- (0, import_i18n.__)("says"),
83
- ":"
84
- ] })
51
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
52
+ "div",
53
+ {
54
+ className: "wp-block-comments__legacy-placeholder",
55
+ inert: (0, import_react_inert_value.inertValue)(true),
56
+ children: [
57
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
58
+ /* translators: %s: Post title. */
59
+ children: (0, import_i18n.sprintf)((0, import_i18n.__)("One response to %s"), postTitle)
60
+ }),
61
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "navigation", children: [
62
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "alignleft", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", { href: "#top", children: [
63
+ "« ",
64
+ (0, import_i18n.__)("Older Comments")
65
+ ] }) }),
66
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "alignright", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", { href: "#top", children: [
67
+ (0, import_i18n.__)("Newer Comments"),
68
+ " »"
69
+ ] }) })
85
70
  ] }),
86
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "comment-metadata", children: [
87
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: "#top", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("time", { dateTime: "2000-01-01T00:00:00+00:00", children: (0, import_i18n.__)("January 1, 2000 at 00:00 am") }) }),
88
- " ",
89
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "edit-link", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
71
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", { className: "commentlist", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { className: "comment even thread-even depth-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("article", { className: "comment-body", children: [
72
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("footer", { className: "comment-meta", children: [
73
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "comment-author vcard", children: [
74
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
75
+ "img",
76
+ {
77
+ alt: (0, import_i18n.__)("Commenter Avatar"),
78
+ src: avatarURL,
79
+ className: "avatar avatar-32 photo",
80
+ height: "32",
81
+ width: "32",
82
+ loading: "lazy"
83
+ }
84
+ ),
85
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("b", { className: "fn", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: "#top", className: "url", children: (0, import_i18n.__)("A WordPress Commenter") }) }),
86
+ " ",
87
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "says", children: [
88
+ (0, import_i18n.__)("says"),
89
+ ":"
90
+ ] })
91
+ ] }),
92
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "comment-metadata", children: [
93
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: "#top", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("time", { dateTime: "2000-01-01T00:00:00+00:00", children: (0, import_i18n.__)("January 1, 2000 at 00:00 am") }) }),
94
+ " ",
95
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "edit-link", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
96
+ "a",
97
+ {
98
+ className: "comment-edit-link",
99
+ href: "#top",
100
+ children: (0, import_i18n.__)("Edit")
101
+ }
102
+ ) })
103
+ ] })
104
+ ] }),
105
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "comment-content", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [
106
+ (0, import_i18n.__)("Hi, this is a comment."),
107
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
108
+ (0, import_i18n.__)(
109
+ "To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard."
110
+ ),
111
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
112
+ (0, import_element.createInterpolateElement)(
113
+ (0, import_i18n.__)(
114
+ "Commenter avatars come from <a>Gravatar</a>."
115
+ ),
116
+ {
117
+ a: (
118
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
119
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: "https://gravatar.com/" })
120
+ )
121
+ }
122
+ )
123
+ ] }) }),
124
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "reply", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
90
125
  "a",
91
126
  {
92
- className: "comment-edit-link",
127
+ className: "comment-reply-link",
93
128
  href: "#top",
94
- children: (0, import_i18n.__)("Edit")
129
+ "aria-label": (0, import_i18n.__)(
130
+ "Reply to A WordPress Commenter"
131
+ ),
132
+ /* translators: Comment reply button text. */
133
+ children: (0, import_i18n._x)("Reply", "verb")
95
134
  }
96
135
  ) })
97
- ] })
98
- ] }),
99
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "comment-content", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [
100
- (0, import_i18n.__)("Hi, this is a comment."),
101
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
102
- (0, import_i18n.__)(
103
- "To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard."
104
- ),
105
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
106
- (0, import_element.createInterpolateElement)(
107
- (0, import_i18n.__)(
108
- "Commenter avatars come from <a>Gravatar</a>."
109
- ),
110
- {
111
- a: (
112
- // eslint-disable-next-line jsx-a11y/anchor-has-content
113
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: "https://gravatar.com/" })
114
- )
115
- }
116
- )
117
- ] }) }),
118
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "reply", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
119
- "a",
120
- {
121
- className: "comment-reply-link",
122
- href: "#top",
123
- "aria-label": (0, import_i18n.__)(
124
- "Reply to A WordPress Commenter"
125
- ),
126
- /* translators: Comment reply button text. */
127
- children: (0, import_i18n._x)("Reply", "verb")
128
- }
129
- ) })
130
- ] }) }) }),
131
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "navigation", children: [
132
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "alignleft", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", { href: "#top", children: [
133
- "« ",
134
- (0, import_i18n.__)("Older Comments")
135
- ] }) }),
136
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "alignright", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", { href: "#top", children: [
137
- (0, import_i18n.__)("Newer Comments"),
138
- " »"
139
- ] }) })
140
- ] }),
141
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.default, { postId, postType })
142
- ] });
136
+ ] }) }) }),
137
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "navigation", children: [
138
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "alignleft", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", { href: "#top", children: [
139
+ "« ",
140
+ (0, import_i18n.__)("Older Comments")
141
+ ] }) }),
142
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "alignright", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", { href: "#top", children: [
143
+ (0, import_i18n.__)("Newer Comments"),
144
+ " »"
145
+ ] }) })
146
+ ] }),
147
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.default, { postId, postType })
148
+ ]
149
+ }
150
+ );
143
151
  }
144
152
  //# sourceMappingURL=placeholder.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/comments/edit/placeholder.jsx"],
4
- "sourcesContent": ["import { store as blockEditorStore } from '@wordpress/block-editor';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { useEntityProp } from '@wordpress/core-data';\nimport { createInterpolateElement } from '@wordpress/element';\nimport CommentsForm from '../../post-comments-form/form';\n\nexport default function PostCommentsPlaceholder( { postType, postId } ) {\n\tlet [ postTitle ] = useEntityProp( 'postType', postType, 'title', postId );\n\tpostTitle = postTitle || __( 'Post Title' );\n\n\tconst avatarURL = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getSettings()\n\t\t\t\t.__experimentalDiscussionSettings?.avatarURL,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<div className=\"wp-block-comments__legacy-placeholder\" inert=\"true\">\n\t\t\t<h3>\n\t\t\t\t{\n\t\t\t\t\t/* translators: %s: Post title. */\n\t\t\t\t\tsprintf( __( 'One response to %s' ), postTitle )\n\t\t\t\t}\n\t\t\t</h3>\n\n\t\t\t<div className=\"navigation\">\n\t\t\t\t<div className=\"alignleft\">\n\t\t\t\t\t<a href=\"#top\">« { __( 'Older Comments' ) }</a>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"alignright\">\n\t\t\t\t\t<a href=\"#top\">{ __( 'Newer Comments' ) } »</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<ol className=\"commentlist\">\n\t\t\t\t<li className=\"comment even thread-even depth-1\">\n\t\t\t\t\t<article className=\"comment-body\">\n\t\t\t\t\t\t<footer className=\"comment-meta\">\n\t\t\t\t\t\t\t<div className=\"comment-author vcard\">\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\talt={ __( 'Commenter Avatar' ) }\n\t\t\t\t\t\t\t\t\tsrc={ avatarURL }\n\t\t\t\t\t\t\t\t\tclassName=\"avatar avatar-32 photo\"\n\t\t\t\t\t\t\t\t\theight=\"32\"\n\t\t\t\t\t\t\t\t\twidth=\"32\"\n\t\t\t\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<b className=\"fn\">\n\t\t\t\t\t\t\t\t\t<a href=\"#top\" className=\"url\">\n\t\t\t\t\t\t\t\t\t\t{ __( 'A WordPress Commenter' ) }\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</b>{ ' ' }\n\t\t\t\t\t\t\t\t<span className=\"says\">{ __( 'says' ) }:</span>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"comment-metadata\">\n\t\t\t\t\t\t\t\t<a href=\"#top\">\n\t\t\t\t\t\t\t\t\t<time dateTime=\"2000-01-01T00:00:00+00:00\">\n\t\t\t\t\t\t\t\t\t\t{ __( 'January 1, 2000 at 00:00 am' ) }\n\t\t\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t\t\t</a>{ ' ' }\n\t\t\t\t\t\t\t\t<span className=\"edit-link\">\n\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\tclassName=\"comment-edit-link\"\n\t\t\t\t\t\t\t\t\t\thref=\"#top\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Edit' ) }\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</footer>\n\n\t\t\t\t\t\t<div className=\"comment-content\">\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t{ __( 'Hi, this is a comment.' ) }\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'Commenter avatars come from <a>Gravatar</a>.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"https://gravatar.com/\" />\n\t\t\t\t\t\t\t\t\t\t),\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</p>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div className=\"reply\">\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\tclassName=\"comment-reply-link\"\n\t\t\t\t\t\t\t\thref=\"#top\"\n\t\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t\t'Reply to A WordPress Commenter'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t/* translators: Comment reply button text. */\n\t\t\t\t\t\t\t\t\t_x( 'Reply', 'verb' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</article>\n\t\t\t\t</li>\n\t\t\t</ol>\n\n\t\t\t<div className=\"navigation\">\n\t\t\t\t<div className=\"alignleft\">\n\t\t\t\t\t<a href=\"#top\">« { __( 'Older Comments' ) }</a>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"alignright\">\n\t\t\t\t\t<a href=\"#top\">{ __( 'Newer Comments' ) } »</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<CommentsForm postId={ postId } postType={ postType } />\n\t\t</div>\n\t);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA0C;AAC1C,kBAAgC;AAChC,kBAA0B;AAC1B,uBAA8B;AAC9B,qBAAyC;AACzC,kBAAyB;AAetB;AAbY,SAAR,wBAA0C,EAAE,UAAU,OAAO,GAAI;AACvE,MAAI,CAAE,SAAU,QAAI,gCAAe,YAAY,UAAU,SAAS,MAAO;AACzE,cAAY,iBAAa,gBAAI,YAAa;AAE1C,QAAM,gBAAY;AAAA,IACjB,CAAE,WACD,OAAQ,oBAAAA,KAAiB,EAAE,YAAY,EACrC,kCAAkC;AAAA,IACrC,CAAC;AAAA,EACF;AAEA,SACC,6CAAC,SA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E;AAAA,4BAAI,wBAAyB;AAAA,QAC/B,4CAAC,QAAG;AAAA,YACF;AAAA,UACD;AAAA,QACD;AAAA,QACA,4CAAC,QAAG;AAAA,YACF;AAAA,cACD;AAAA,YACC;AAAA,UACD;AAAA,UACA;AAAA,YACC;AAAA;AAAA,cAEC,4CAAC,OAAE,MAAK,yBAAwB;AAAA;AAAA,UAElC;AAAA,QACD;AAAA,SACD,GACD;AAAA,MAEA,4CAAC,SAAI,WAAU,SACd;AAAA,QAAC;AAAA;AAAA,UACA,WAAU;AAAA,UACV,MAAK;AAAA,UACL,kBAAa;AAAA,YACZ;AAAA,UACD;AAAA;AAAA,UAIC,8BAAI,SAAS,MAAO;AAAA;AAAA,MAEtB,GACD;AAAA,OACD,GACD,GACD;AAAA,IAEA,6CAAC,SAAI,WAAU,cACd;AAAA,kDAAC,SAAI,WAAU,aACd,uDAAC,OAAE,MAAK,QAAO;AAAA;AAAA,YAAI,gBAAI,gBAAiB;AAAA,SAAG,GAC5C;AAAA,MACA,4CAAC,SAAI,WAAU,cACd,uDAAC,OAAE,MAAK,QAAS;AAAA,4BAAI,gBAAiB;AAAA,QAAG;AAAA,SAAE,GAC5C;AAAA,OACD;AAAA,IAEA,4CAAC,YAAAC,SAAA,EAAa,QAAkB,UAAsB;AAAA,KACvD;AAEF;",
4
+ "sourcesContent": ["import { store as blockEditorStore } from '@wordpress/block-editor';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { useEntityProp } from '@wordpress/core-data';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { inertValue } from '@wordpress/react-inert-value';\nimport CommentsForm from '../../post-comments-form/form';\n\nexport default function PostCommentsPlaceholder( { postType, postId } ) {\n\tlet [ postTitle ] = useEntityProp( 'postType', postType, 'title', postId );\n\tpostTitle = postTitle || __( 'Post Title' );\n\n\tconst avatarURL = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getSettings()\n\t\t\t\t.__experimentalDiscussionSettings?.avatarURL,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"wp-block-comments__legacy-placeholder\"\n\t\t\tinert={ inertValue( true ) }\n\t\t>\n\t\t\t<h3>\n\t\t\t\t{\n\t\t\t\t\t/* translators: %s: Post title. */\n\t\t\t\t\tsprintf( __( 'One response to %s' ), postTitle )\n\t\t\t\t}\n\t\t\t</h3>\n\n\t\t\t<div className=\"navigation\">\n\t\t\t\t<div className=\"alignleft\">\n\t\t\t\t\t<a href=\"#top\">« { __( 'Older Comments' ) }</a>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"alignright\">\n\t\t\t\t\t<a href=\"#top\">{ __( 'Newer Comments' ) } »</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<ol className=\"commentlist\">\n\t\t\t\t<li className=\"comment even thread-even depth-1\">\n\t\t\t\t\t<article className=\"comment-body\">\n\t\t\t\t\t\t<footer className=\"comment-meta\">\n\t\t\t\t\t\t\t<div className=\"comment-author vcard\">\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\talt={ __( 'Commenter Avatar' ) }\n\t\t\t\t\t\t\t\t\tsrc={ avatarURL }\n\t\t\t\t\t\t\t\t\tclassName=\"avatar avatar-32 photo\"\n\t\t\t\t\t\t\t\t\theight=\"32\"\n\t\t\t\t\t\t\t\t\twidth=\"32\"\n\t\t\t\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<b className=\"fn\">\n\t\t\t\t\t\t\t\t\t<a href=\"#top\" className=\"url\">\n\t\t\t\t\t\t\t\t\t\t{ __( 'A WordPress Commenter' ) }\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</b>{ ' ' }\n\t\t\t\t\t\t\t\t<span className=\"says\">{ __( 'says' ) }:</span>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div className=\"comment-metadata\">\n\t\t\t\t\t\t\t\t<a href=\"#top\">\n\t\t\t\t\t\t\t\t\t<time dateTime=\"2000-01-01T00:00:00+00:00\">\n\t\t\t\t\t\t\t\t\t\t{ __( 'January 1, 2000 at 00:00 am' ) }\n\t\t\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t\t\t</a>{ ' ' }\n\t\t\t\t\t\t\t\t<span className=\"edit-link\">\n\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\tclassName=\"comment-edit-link\"\n\t\t\t\t\t\t\t\t\t\thref=\"#top\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Edit' ) }\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</footer>\n\n\t\t\t\t\t\t<div className=\"comment-content\">\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t{ __( 'Hi, this is a comment.' ) }\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'Commenter avatars come from <a>Gravatar</a>.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"https://gravatar.com/\" />\n\t\t\t\t\t\t\t\t\t\t),\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</p>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div className=\"reply\">\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\tclassName=\"comment-reply-link\"\n\t\t\t\t\t\t\t\thref=\"#top\"\n\t\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t\t'Reply to A WordPress Commenter'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t/* translators: Comment reply button text. */\n\t\t\t\t\t\t\t\t\t_x( 'Reply', 'verb' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</article>\n\t\t\t\t</li>\n\t\t\t</ol>\n\n\t\t\t<div className=\"navigation\">\n\t\t\t\t<div className=\"alignleft\">\n\t\t\t\t\t<a href=\"#top\">« { __( 'Older Comments' ) }</a>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"alignright\">\n\t\t\t\t\t<a href=\"#top\">{ __( 'Newer Comments' ) } »</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<CommentsForm postId={ postId } postType={ postType } />\n\t\t</div>\n\t);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA0C;AAC1C,kBAAgC;AAChC,kBAA0B;AAC1B,uBAA8B;AAC9B,qBAAyC;AACzC,+BAA2B;AAC3B,kBAAyB;AAkBtB;AAhBY,SAAR,wBAA0C,EAAE,UAAU,OAAO,GAAI;AACvE,MAAI,CAAE,SAAU,QAAI,gCAAe,YAAY,UAAU,SAAS,MAAO;AACzE,cAAY,iBAAa,gBAAI,YAAa;AAE1C,QAAM,gBAAY;AAAA,IACjB,CAAE,WACD,OAAQ,oBAAAA,KAAiB,EAAE,YAAY,EACrC,kCAAkC;AAAA,IACrC,CAAC;AAAA,EACF;AAEA,SACC;AAAA,IAAC;AAAA;AAAA,MACA,WAAU;AAAA,MACV,WAAQ,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d,uDAAC,OACE;AAAA,gCAAI,wBAAyB;AAAA,YAC/B,4CAAC,QAAG;AAAA,gBACF;AAAA,cACD;AAAA,YACD;AAAA,YACA,4CAAC,QAAG;AAAA,gBACF;AAAA,kBACD;AAAA,gBACC;AAAA,cACD;AAAA,cACA;AAAA,gBACC;AAAA;AAAA,kBAEC,4CAAC,OAAE,MAAK,yBAAwB;AAAA;AAAA,cAElC;AAAA,YACD;AAAA,aACD,GACD;AAAA,UAEA,4CAAC,SAAI,WAAU,SACd;AAAA,YAAC;AAAA;AAAA,cACA,WAAU;AAAA,cACV,MAAK;AAAA,cACL,kBAAa;AAAA,gBACZ;AAAA,cACD;AAAA;AAAA,cAIC,8BAAI,SAAS,MAAO;AAAA;AAAA,UAEtB,GACD;AAAA,WACD,GACD,GACD;AAAA,QAEA,6CAAC,SAAI,WAAU,cACd;AAAA,sDAAC,SAAI,WAAU,aACd,uDAAC,OAAE,MAAK,QAAO;AAAA;AAAA,gBAAI,gBAAI,gBAAiB;AAAA,aAAG,GAC5C;AAAA,UACA,4CAAC,SAAI,WAAU,cACd,uDAAC,OAAE,MAAK,QAAS;AAAA,gCAAI,gBAAiB;AAAA,YAAG;AAAA,aAAE,GAC5C;AAAA,WACD;AAAA,QAEA,4CAAC,YAAAC,SAAA,EAAa,QAAkB,UAAsB;AAAA;AAAA;AAAA,EACvD;AAEF;",
6
6
  "names": ["blockEditorStore", "CommentsForm"]
7
7
  }
@@ -50,6 +50,11 @@
50
50
  "type": "flex"
51
51
  }
52
52
  },
53
+ "spacing": {
54
+ "padding": true,
55
+ "margin": true,
56
+ "blockGap": true
57
+ },
53
58
  "typography": {
54
59
  "fontSize": true,
55
60
  "lineHeight": true,
@@ -63,6 +68,12 @@
63
68
  "fontSize": true
64
69
  }
65
70
  },
71
+ "__experimentalBorder": {
72
+ "color": true,
73
+ "radius": true,
74
+ "style": true,
75
+ "width": true
76
+ },
66
77
  "interactivity": {
67
78
  "clientNavigation": true
68
79
  }
@@ -153,7 +153,8 @@
153
153
  "allowJustification": false
154
154
  },
155
155
  "interactivity": {
156
- "clientNavigation": true
156
+ "clientNavigation": true,
157
+ "interactive": true
157
158
  },
158
159
  "filter": {
159
160
  "duotone": true