@wordpress/block-library 9.13.1-next.cd6172eb0.0 → 9.15.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 (787) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE.md +1 -1
  3. package/build/archives/edit.js +83 -36
  4. package/build/archives/edit.js.map +1 -1
  5. package/build/avatar/user-control.js +1 -0
  6. package/build/avatar/user-control.js.map +1 -1
  7. package/build/block/deprecated.js +1 -0
  8. package/build/block/deprecated.js.map +1 -1
  9. package/build/block/edit.js +1 -0
  10. package/build/block/edit.js.map +1 -1
  11. package/build/button/deprecated.js +183 -1
  12. package/build/button/deprecated.js.map +1 -1
  13. package/build/button/edit.js +49 -27
  14. package/build/button/edit.js.map +1 -1
  15. package/build/button/index.js +8 -2
  16. package/build/button/index.js.map +1 -1
  17. package/build/button/save.js +8 -5
  18. package/build/button/save.js.map +1 -1
  19. package/build/buttons/transforms.js +1 -0
  20. package/build/buttons/transforms.js.map +1 -1
  21. package/build/categories/edit.js +1 -0
  22. package/build/categories/edit.js.map +1 -1
  23. package/build/column/column-preview.native.js +1 -0
  24. package/build/column/column-preview.native.js.map +1 -1
  25. package/build/column/edit.js +33 -13
  26. package/build/column/edit.js.map +1 -1
  27. package/build/columns/columnCalculations.native.js +1 -0
  28. package/build/columns/columnCalculations.native.js.map +1 -1
  29. package/build/columns/deprecated.js +1 -0
  30. package/build/columns/deprecated.js.map +1 -1
  31. package/build/columns/edit.js +51 -27
  32. package/build/columns/edit.js.map +1 -1
  33. package/build/columns/edit.native.js +1 -0
  34. package/build/columns/edit.native.js.map +1 -1
  35. package/build/columns/transforms.js +1 -0
  36. package/build/columns/transforms.js.map +1 -1
  37. package/build/columns/utils.js +1 -0
  38. package/build/columns/utils.js.map +1 -1
  39. package/build/comment-template/edit.js +1 -0
  40. package/build/comment-template/edit.js.map +1 -1
  41. package/build/comment-template/hooks.js +1 -0
  42. package/build/comment-template/hooks.js.map +1 -1
  43. package/build/comment-template/util.js +1 -0
  44. package/build/comment-template/util.js.map +1 -1
  45. package/build/comments/index.js +1 -0
  46. package/build/comments/index.js.map +1 -1
  47. package/build/cover/edit/index.js +9 -3
  48. package/build/cover/edit/index.js.map +1 -1
  49. package/build/cover/edit.native.js +1 -1
  50. package/build/cover/edit.native.js.map +1 -1
  51. package/build/details/edit.js +29 -7
  52. package/build/details/edit.js.map +1 -1
  53. package/build/details/transforms.js +1 -0
  54. package/build/details/transforms.js.map +1 -1
  55. package/build/embed/embed-placeholder.native.js +1 -0
  56. package/build/embed/embed-placeholder.native.js.map +1 -1
  57. package/build/embed/util.js +1 -0
  58. package/build/embed/util.js.map +1 -1
  59. package/build/embed/variations.js +1 -0
  60. package/build/embed/variations.js.map +1 -1
  61. package/build/embed/wp-embed-preview.js +1 -0
  62. package/build/embed/wp-embed-preview.js.map +1 -1
  63. package/build/file/transforms.js +1 -0
  64. package/build/file/transforms.js.map +1 -1
  65. package/build/footnotes/edit.js +1 -0
  66. package/build/footnotes/edit.js.map +1 -1
  67. package/build/form/index.js +1 -2
  68. package/build/form/index.js.map +1 -1
  69. package/build/form/view.js +10 -5
  70. package/build/form/view.js.map +1 -1
  71. package/build/freeform/modal.js +1 -0
  72. package/build/freeform/modal.js.map +1 -1
  73. package/build/gallery/deprecated.js +1 -0
  74. package/build/gallery/deprecated.js.map +1 -1
  75. package/build/gallery/edit.js +1 -0
  76. package/build/gallery/edit.js.map +1 -1
  77. package/build/gallery/shared.js +1 -0
  78. package/build/gallery/shared.js.map +1 -1
  79. package/build/gallery/transforms.js +1 -0
  80. package/build/gallery/transforms.js.map +1 -1
  81. package/build/gallery/use-get-media.js +1 -0
  82. package/build/gallery/use-get-media.js.map +1 -1
  83. package/build/gallery/use-get-media.native.js +1 -0
  84. package/build/gallery/use-get-media.native.js.map +1 -1
  85. package/build/gallery/use-get-new-images.js +1 -0
  86. package/build/gallery/use-get-new-images.js.map +1 -1
  87. package/build/gallery/use-image-sizes.js +1 -0
  88. package/build/gallery/use-image-sizes.js.map +1 -1
  89. package/build/group/placeholder.js +1 -0
  90. package/build/group/placeholder.js.map +1 -1
  91. package/build/group/transforms.js +1 -0
  92. package/build/group/transforms.js.map +1 -1
  93. package/build/heading/transforms.js +1 -0
  94. package/build/heading/transforms.js.map +1 -1
  95. package/build/html/preview.js +1 -0
  96. package/build/html/preview.js.map +1 -1
  97. package/build/image/edit.js +1 -0
  98. package/build/image/edit.js.map +1 -1
  99. package/build/image/edit.native.js +1 -0
  100. package/build/image/edit.native.js.map +1 -1
  101. package/build/image/image.js +2 -1
  102. package/build/image/image.js.map +1 -1
  103. package/build/image/transforms.js +2 -0
  104. package/build/image/transforms.js.map +1 -1
  105. package/build/image/utils.js +1 -0
  106. package/build/image/utils.js.map +1 -1
  107. package/build/image/view.js +1 -3
  108. package/build/image/view.js.map +1 -1
  109. package/build/index.js +2 -1
  110. package/build/index.js.map +1 -1
  111. package/build/index.native.js +1 -0
  112. package/build/index.native.js.map +1 -1
  113. package/build/latest-posts/deprecated.js +12 -0
  114. package/build/latest-posts/deprecated.js.map +1 -1
  115. package/build/latest-posts/edit.js +1 -0
  116. package/build/latest-posts/edit.js.map +1 -1
  117. package/build/latest-posts/index.js +12 -0
  118. package/build/latest-posts/index.js.map +1 -1
  119. package/build/list/transforms.js +1 -0
  120. package/build/list/transforms.js.map +1 -1
  121. package/build/list/utils.js +1 -0
  122. package/build/list/utils.js.map +1 -1
  123. package/build/list-item/hooks/use-indent-list-item.js +1 -0
  124. package/build/list-item/hooks/use-indent-list-item.js.map +1 -1
  125. package/build/list-item/transforms.js +1 -0
  126. package/build/list-item/transforms.js.map +1 -1
  127. package/build/loginout/edit.js +42 -13
  128. package/build/loginout/edit.js.map +1 -1
  129. package/build/media-text/edit.js +60 -31
  130. package/build/media-text/edit.js.map +1 -1
  131. package/build/more/edit.js +28 -7
  132. package/build/more/edit.js.map +1 -1
  133. package/build/more/save.js +1 -0
  134. package/build/more/save.js.map +1 -1
  135. package/build/navigation/deprecated.js +1 -0
  136. package/build/navigation/deprecated.js.map +1 -1
  137. package/build/navigation/edit/index.js +1 -0
  138. package/build/navigation/edit/index.js.map +1 -1
  139. package/build/navigation/edit/navigation-menu-selector.js +5 -3
  140. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  141. package/build/navigation/edit/use-generate-default-navigation-title.js +1 -0
  142. package/build/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
  143. package/build/navigation/menu-items-to-blocks.js +1 -0
  144. package/build/navigation/menu-items-to-blocks.js.map +1 -1
  145. package/build/navigation/use-template-part-area-label.js +1 -0
  146. package/build/navigation/use-template-part-area-label.js.map +1 -1
  147. package/build/navigation/view.js +1 -0
  148. package/build/navigation/view.js.map +1 -1
  149. package/build/navigation-link/edit.js +96 -57
  150. package/build/navigation-link/edit.js.map +1 -1
  151. package/build/navigation-link/hooks.js +1 -0
  152. package/build/navigation-link/hooks.js.map +1 -1
  153. package/build/navigation-link/link-ui.js +3 -3
  154. package/build/navigation-link/link-ui.js.map +1 -1
  155. package/build/navigation-submenu/edit.js +105 -54
  156. package/build/navigation-submenu/edit.js.map +1 -1
  157. package/build/page-list/edit.js +45 -25
  158. package/build/page-list/edit.js.map +1 -1
  159. package/build/page-list/use-convert-to-navigation-links.js +1 -0
  160. package/build/page-list/use-convert-to-navigation-links.js.map +1 -1
  161. package/build/paragraph/edit.js +22 -6
  162. package/build/paragraph/edit.js.map +1 -1
  163. package/build/pattern/edit.js +1 -0
  164. package/build/pattern/edit.js.map +1 -1
  165. package/build/post-author/edit.js +16 -3
  166. package/build/post-author/edit.js.map +1 -1
  167. package/build/post-author/index.js +4 -2
  168. package/build/post-author/index.js.map +1 -1
  169. package/build/post-author-name/edit.js +11 -5
  170. package/build/post-author-name/edit.js.map +1 -1
  171. package/build/post-author-name/index.js +4 -2
  172. package/build/post-author-name/index.js.map +1 -1
  173. package/build/post-comments-form/index.js +6 -1
  174. package/build/post-comments-form/index.js.map +1 -1
  175. package/build/post-comments-link/index.js +8 -1
  176. package/build/post-comments-link/index.js.map +1 -1
  177. package/build/post-date/edit.js +58 -18
  178. package/build/post-date/edit.js.map +1 -1
  179. package/build/post-date/index.js +2 -1
  180. package/build/post-date/index.js.map +1 -1
  181. package/build/post-excerpt/edit.js +42 -18
  182. package/build/post-excerpt/edit.js.map +1 -1
  183. package/build/post-featured-image/dimension-controls.js +18 -19
  184. package/build/post-featured-image/dimension-controls.js.map +1 -1
  185. package/build/post-featured-image/edit.js +45 -11
  186. package/build/post-featured-image/edit.js.map +1 -1
  187. package/build/post-featured-image/index.js +6 -3
  188. package/build/post-featured-image/index.js.map +1 -1
  189. package/build/post-navigation-link/edit.js +1 -0
  190. package/build/post-navigation-link/edit.js.map +1 -1
  191. package/build/post-navigation-link/index.js +11 -7
  192. package/build/post-navigation-link/index.js.map +1 -1
  193. package/build/post-navigation-link/variations.js +3 -2
  194. package/build/post-navigation-link/variations.js.map +1 -1
  195. package/build/post-template/edit.js +1 -0
  196. package/build/post-template/edit.js.map +1 -1
  197. package/build/post-template/index.js +12 -2
  198. package/build/post-template/index.js.map +1 -1
  199. package/build/post-terms/edit.js +1 -0
  200. package/build/post-terms/edit.js.map +1 -1
  201. package/build/post-terms/hooks.js +1 -0
  202. package/build/post-terms/hooks.js.map +1 -1
  203. package/build/post-title/index.js +6 -3
  204. package/build/post-title/index.js.map +1 -1
  205. package/build/pullquote/blockquote.native.js +1 -0
  206. package/build/pullquote/blockquote.native.js.map +1 -1
  207. package/build/pullquote/transforms.js +1 -0
  208. package/build/pullquote/transforms.js.map +1 -1
  209. package/build/query/deprecated.js +1 -0
  210. package/build/query/deprecated.js.map +1 -1
  211. package/build/query/edit/inspector-controls/author-control.js +1 -0
  212. package/build/query/edit/inspector-controls/author-control.js.map +1 -1
  213. package/build/query/edit/inspector-controls/format-controls.js +1 -0
  214. package/build/query/edit/inspector-controls/format-controls.js.map +1 -1
  215. package/build/query/edit/inspector-controls/index.js +1 -0
  216. package/build/query/edit/inspector-controls/index.js.map +1 -1
  217. package/build/query/edit/inspector-controls/parent-control.js +1 -0
  218. package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
  219. package/build/query/edit/inspector-controls/taxonomy-controls.js +1 -0
  220. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  221. package/build/query/utils.js +1 -0
  222. package/build/query/utils.js.map +1 -1
  223. package/build/query-no-results/index.js +11 -10
  224. package/build/query-no-results/index.js.map +1 -1
  225. package/build/query-pagination/edit.js +47 -17
  226. package/build/query-pagination/edit.js.map +1 -1
  227. package/build/query-pagination/query-pagination-label-control.js +1 -1
  228. package/build/query-pagination/query-pagination-label-control.js.map +1 -1
  229. package/build/query-pagination-numbers/edit.js +33 -15
  230. package/build/query-pagination-numbers/edit.js.map +1 -1
  231. package/build/query-title/variations.js +1 -0
  232. package/build/query-title/variations.js.map +1 -1
  233. package/build/query-total/edit.js +90 -0
  234. package/build/query-total/edit.js.map +1 -0
  235. package/build/query-total/icons.js +46 -0
  236. package/build/query-total/icons.js.map +1 -0
  237. package/build/query-total/index.js +81 -0
  238. package/build/query-total/index.js.map +1 -0
  239. package/build/query-total/init.js +12 -0
  240. package/build/query-total/init.js.map +1 -0
  241. package/build/quote/deprecated.js +1 -0
  242. package/build/quote/deprecated.js.map +1 -1
  243. package/build/quote/transforms.js +1 -0
  244. package/build/quote/transforms.js.map +1 -1
  245. package/build/read-more/index.js +7 -1
  246. package/build/read-more/index.js.map +1 -1
  247. package/build/site-logo/index.js +4 -2
  248. package/build/site-logo/index.js.map +1 -1
  249. package/build/site-title/edit.js +41 -12
  250. package/build/site-title/edit.js.map +1 -1
  251. package/build/site-title/index.js +4 -2
  252. package/build/site-title/index.js.map +1 -1
  253. package/build/social-link/edit.js +19 -3
  254. package/build/social-link/edit.js.map +1 -1
  255. package/build/social-link/social-list.js +1 -0
  256. package/build/social-link/social-list.js.map +1 -1
  257. package/build/social-link/variations.js +1 -0
  258. package/build/social-link/variations.js.map +1 -1
  259. package/build/social-links/edit.js +42 -12
  260. package/build/social-links/edit.js.map +1 -1
  261. package/build/social-links/edit.native.js +1 -0
  262. package/build/social-links/edit.native.js.map +1 -1
  263. package/build/spacer/controls.js +35 -12
  264. package/build/spacer/controls.js.map +1 -1
  265. package/build/table/deprecated.js +1 -0
  266. package/build/table/deprecated.js.map +1 -1
  267. package/build/table/edit.js +49 -15
  268. package/build/table/edit.js.map +1 -1
  269. package/build/table/index.js +4 -1
  270. package/build/table/index.js.map +1 -1
  271. package/build/table/save.js +1 -0
  272. package/build/table/save.js.map +1 -1
  273. package/build/table/state.js +1 -0
  274. package/build/table/state.js.map +1 -1
  275. package/build/table/transforms.js +1 -0
  276. package/build/table/transforms.js.map +1 -1
  277. package/build/table-of-contents/edit.js +1 -1
  278. package/build/table-of-contents/edit.js.map +1 -1
  279. package/build/table-of-contents/index.js +24 -23
  280. package/build/table-of-contents/index.js.map +1 -1
  281. package/build/table-of-contents/list.js +1 -0
  282. package/build/table-of-contents/list.js.map +1 -1
  283. package/build/table-of-contents/utils.js +1 -0
  284. package/build/table-of-contents/utils.js.map +1 -1
  285. package/build/tag-cloud/edit.js +57 -11
  286. package/build/tag-cloud/edit.js.map +1 -1
  287. package/build/template-part/edit/advanced-controls.js +1 -0
  288. package/build/template-part/edit/advanced-controls.js.map +1 -1
  289. package/build/template-part/edit/import-controls.js +1 -0
  290. package/build/template-part/edit/import-controls.js.map +1 -1
  291. package/build/template-part/edit/selection-modal.js +1 -0
  292. package/build/template-part/edit/selection-modal.js.map +1 -1
  293. package/build/template-part/edit/utils/hooks.js +1 -0
  294. package/build/template-part/edit/utils/hooks.js.map +1 -1
  295. package/build/template-part/edit/utils/transformers.js +1 -0
  296. package/build/template-part/edit/utils/transformers.js.map +1 -1
  297. package/build/template-part/variations.js +1 -0
  298. package/build/template-part/variations.js.map +1 -1
  299. package/build/text-columns/edit.js +1 -0
  300. package/build/text-columns/edit.js.map +1 -1
  301. package/build/text-columns/save.js +1 -0
  302. package/build/text-columns/save.js.map +1 -1
  303. package/build/text-columns/transforms.js +1 -0
  304. package/build/text-columns/transforms.js.map +1 -1
  305. package/build/utils/get-transformed-metadata.js +1 -0
  306. package/build/utils/get-transformed-metadata.js.map +1 -1
  307. package/build/utils/search-patterns.js +1 -0
  308. package/build/utils/search-patterns.js.map +1 -1
  309. package/build/utils/transformation-categories.native.js +1 -0
  310. package/build/utils/transformation-categories.native.js.map +1 -1
  311. package/build/video/edit-common-settings.js +90 -30
  312. package/build/video/edit-common-settings.js.map +1 -1
  313. package/build/video/edit.js +20 -49
  314. package/build/video/edit.js.map +1 -1
  315. package/build/video/poster-image.js +81 -0
  316. package/build/video/poster-image.js.map +1 -0
  317. package/build/video/tracks-editor.js +2 -1
  318. package/build/video/tracks-editor.js.map +1 -1
  319. package/build/video/tracks.js +1 -0
  320. package/build/video/tracks.js.map +1 -1
  321. package/build-module/archives/edit.js +84 -37
  322. package/build-module/archives/edit.js.map +1 -1
  323. package/build-module/avatar/user-control.js +1 -0
  324. package/build-module/avatar/user-control.js.map +1 -1
  325. package/build-module/block/deprecated.js +1 -0
  326. package/build-module/block/deprecated.js.map +1 -1
  327. package/build-module/block/edit.js +1 -0
  328. package/build-module/block/edit.js.map +1 -1
  329. package/build-module/button/deprecated.js +184 -2
  330. package/build-module/button/deprecated.js.map +1 -1
  331. package/build-module/button/edit.js +50 -28
  332. package/build-module/button/edit.js.map +1 -1
  333. package/build-module/button/index.js +8 -2
  334. package/build-module/button/index.js.map +1 -1
  335. package/build-module/button/save.js +9 -6
  336. package/build-module/button/save.js.map +1 -1
  337. package/build-module/buttons/transforms.js +1 -0
  338. package/build-module/buttons/transforms.js.map +1 -1
  339. package/build-module/categories/edit.js +1 -0
  340. package/build-module/categories/edit.js.map +1 -1
  341. package/build-module/column/column-preview.native.js +1 -0
  342. package/build-module/column/column-preview.native.js.map +1 -1
  343. package/build-module/column/edit.js +34 -14
  344. package/build-module/column/edit.js.map +1 -1
  345. package/build-module/columns/columnCalculations.native.js +1 -0
  346. package/build-module/columns/columnCalculations.native.js.map +1 -1
  347. package/build-module/columns/deprecated.js +1 -0
  348. package/build-module/columns/deprecated.js.map +1 -1
  349. package/build-module/columns/edit.js +53 -29
  350. package/build-module/columns/edit.js.map +1 -1
  351. package/build-module/columns/edit.native.js +1 -0
  352. package/build-module/columns/edit.native.js.map +1 -1
  353. package/build-module/columns/transforms.js +1 -0
  354. package/build-module/columns/transforms.js.map +1 -1
  355. package/build-module/columns/utils.js +1 -0
  356. package/build-module/columns/utils.js.map +1 -1
  357. package/build-module/comment-template/edit.js +1 -0
  358. package/build-module/comment-template/edit.js.map +1 -1
  359. package/build-module/comment-template/hooks.js +1 -0
  360. package/build-module/comment-template/hooks.js.map +1 -1
  361. package/build-module/comment-template/util.js +1 -0
  362. package/build-module/comment-template/util.js.map +1 -1
  363. package/build-module/comments/index.js +1 -0
  364. package/build-module/comments/index.js.map +1 -1
  365. package/build-module/cover/edit/index.js +9 -3
  366. package/build-module/cover/edit/index.js.map +1 -1
  367. package/build-module/cover/edit.native.js +2 -2
  368. package/build-module/cover/edit.native.js.map +1 -1
  369. package/build-module/details/edit.js +30 -8
  370. package/build-module/details/edit.js.map +1 -1
  371. package/build-module/details/transforms.js +1 -0
  372. package/build-module/details/transforms.js.map +1 -1
  373. package/build-module/embed/embed-placeholder.native.js +1 -0
  374. package/build-module/embed/embed-placeholder.native.js.map +1 -1
  375. package/build-module/embed/util.js +1 -0
  376. package/build-module/embed/util.js.map +1 -1
  377. package/build-module/embed/variations.js +1 -0
  378. package/build-module/embed/variations.js.map +1 -1
  379. package/build-module/embed/wp-embed-preview.js +1 -0
  380. package/build-module/embed/wp-embed-preview.js.map +1 -1
  381. package/build-module/file/transforms.js +1 -0
  382. package/build-module/file/transforms.js.map +1 -1
  383. package/build-module/footnotes/edit.js +1 -0
  384. package/build-module/footnotes/edit.js.map +1 -1
  385. package/build-module/form/index.js +1 -2
  386. package/build-module/form/index.js.map +1 -1
  387. package/build-module/form/view.js +10 -5
  388. package/build-module/form/view.js.map +1 -1
  389. package/build-module/freeform/modal.js +1 -0
  390. package/build-module/freeform/modal.js.map +1 -1
  391. package/build-module/gallery/deprecated.js +1 -0
  392. package/build-module/gallery/deprecated.js.map +1 -1
  393. package/build-module/gallery/edit.js +1 -0
  394. package/build-module/gallery/edit.js.map +1 -1
  395. package/build-module/gallery/shared.js +1 -0
  396. package/build-module/gallery/shared.js.map +1 -1
  397. package/build-module/gallery/transforms.js +1 -0
  398. package/build-module/gallery/transforms.js.map +1 -1
  399. package/build-module/gallery/use-get-media.js +1 -0
  400. package/build-module/gallery/use-get-media.js.map +1 -1
  401. package/build-module/gallery/use-get-media.native.js +1 -0
  402. package/build-module/gallery/use-get-media.native.js.map +1 -1
  403. package/build-module/gallery/use-get-new-images.js +1 -0
  404. package/build-module/gallery/use-get-new-images.js.map +1 -1
  405. package/build-module/gallery/use-image-sizes.js +1 -0
  406. package/build-module/gallery/use-image-sizes.js.map +1 -1
  407. package/build-module/group/placeholder.js +1 -0
  408. package/build-module/group/placeholder.js.map +1 -1
  409. package/build-module/group/transforms.js +1 -0
  410. package/build-module/group/transforms.js.map +1 -1
  411. package/build-module/heading/transforms.js +1 -0
  412. package/build-module/heading/transforms.js.map +1 -1
  413. package/build-module/html/preview.js +1 -0
  414. package/build-module/html/preview.js.map +1 -1
  415. package/build-module/image/edit.js +1 -0
  416. package/build-module/image/edit.js.map +1 -1
  417. package/build-module/image/edit.native.js +1 -0
  418. package/build-module/image/edit.native.js.map +1 -1
  419. package/build-module/image/image.js +2 -1
  420. package/build-module/image/image.js.map +1 -1
  421. package/build-module/image/transforms.js +2 -0
  422. package/build-module/image/transforms.js.map +1 -1
  423. package/build-module/image/utils.js +1 -0
  424. package/build-module/image/utils.js.map +1 -1
  425. package/build-module/image/view.js +1 -3
  426. package/build-module/image/view.js.map +1 -1
  427. package/build-module/index.js +2 -1
  428. package/build-module/index.js.map +1 -1
  429. package/build-module/index.native.js +1 -0
  430. package/build-module/index.native.js.map +1 -1
  431. package/build-module/latest-posts/deprecated.js +12 -0
  432. package/build-module/latest-posts/deprecated.js.map +1 -1
  433. package/build-module/latest-posts/edit.js +1 -0
  434. package/build-module/latest-posts/edit.js.map +1 -1
  435. package/build-module/latest-posts/index.js +12 -0
  436. package/build-module/latest-posts/index.js.map +1 -1
  437. package/build-module/list/transforms.js +1 -0
  438. package/build-module/list/transforms.js.map +1 -1
  439. package/build-module/list/utils.js +1 -0
  440. package/build-module/list/utils.js.map +1 -1
  441. package/build-module/list-item/hooks/use-indent-list-item.js +1 -0
  442. package/build-module/list-item/hooks/use-indent-list-item.js.map +1 -1
  443. package/build-module/list-item/transforms.js +1 -0
  444. package/build-module/list-item/transforms.js.map +1 -1
  445. package/build-module/loginout/edit.js +42 -14
  446. package/build-module/loginout/edit.js.map +1 -1
  447. package/build-module/media-text/edit.js +60 -31
  448. package/build-module/media-text/edit.js.map +1 -1
  449. package/build-module/more/edit.js +28 -8
  450. package/build-module/more/edit.js.map +1 -1
  451. package/build-module/more/save.js +1 -0
  452. package/build-module/more/save.js.map +1 -1
  453. package/build-module/navigation/deprecated.js +1 -0
  454. package/build-module/navigation/deprecated.js.map +1 -1
  455. package/build-module/navigation/edit/index.js +1 -0
  456. package/build-module/navigation/edit/index.js.map +1 -1
  457. package/build-module/navigation/edit/navigation-menu-selector.js +5 -3
  458. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  459. package/build-module/navigation/edit/use-generate-default-navigation-title.js +1 -0
  460. package/build-module/navigation/edit/use-generate-default-navigation-title.js.map +1 -1
  461. package/build-module/navigation/menu-items-to-blocks.js +1 -0
  462. package/build-module/navigation/menu-items-to-blocks.js.map +1 -1
  463. package/build-module/navigation/use-template-part-area-label.js +1 -0
  464. package/build-module/navigation/use-template-part-area-label.js.map +1 -1
  465. package/build-module/navigation/view.js +1 -0
  466. package/build-module/navigation/view.js.map +1 -1
  467. package/build-module/navigation-link/edit.js +97 -58
  468. package/build-module/navigation-link/edit.js.map +1 -1
  469. package/build-module/navigation-link/hooks.js +1 -0
  470. package/build-module/navigation-link/hooks.js.map +1 -1
  471. package/build-module/navigation-link/link-ui.js +1 -1
  472. package/build-module/navigation-link/link-ui.js.map +1 -1
  473. package/build-module/navigation-submenu/edit.js +106 -55
  474. package/build-module/navigation-submenu/edit.js.map +1 -1
  475. package/build-module/page-list/edit.js +46 -26
  476. package/build-module/page-list/edit.js.map +1 -1
  477. package/build-module/page-list/use-convert-to-navigation-links.js +1 -0
  478. package/build-module/page-list/use-convert-to-navigation-links.js.map +1 -1
  479. package/build-module/paragraph/edit.js +23 -8
  480. package/build-module/paragraph/edit.js.map +1 -1
  481. package/build-module/pattern/edit.js +1 -0
  482. package/build-module/pattern/edit.js.map +1 -1
  483. package/build-module/post-author/edit.js +17 -4
  484. package/build-module/post-author/edit.js.map +1 -1
  485. package/build-module/post-author/index.js +4 -2
  486. package/build-module/post-author/index.js.map +1 -1
  487. package/build-module/post-author-name/edit.js +12 -6
  488. package/build-module/post-author-name/edit.js.map +1 -1
  489. package/build-module/post-author-name/index.js +4 -2
  490. package/build-module/post-author-name/index.js.map +1 -1
  491. package/build-module/post-comments-form/index.js +6 -1
  492. package/build-module/post-comments-form/index.js.map +1 -1
  493. package/build-module/post-comments-link/index.js +8 -1
  494. package/build-module/post-comments-link/index.js.map +1 -1
  495. package/build-module/post-date/edit.js +59 -19
  496. package/build-module/post-date/edit.js.map +1 -1
  497. package/build-module/post-date/index.js +2 -1
  498. package/build-module/post-date/index.js.map +1 -1
  499. package/build-module/post-excerpt/edit.js +44 -20
  500. package/build-module/post-excerpt/edit.js.map +1 -1
  501. package/build-module/post-featured-image/dimension-controls.js +19 -20
  502. package/build-module/post-featured-image/dimension-controls.js.map +1 -1
  503. package/build-module/post-featured-image/edit.js +47 -13
  504. package/build-module/post-featured-image/edit.js.map +1 -1
  505. package/build-module/post-featured-image/index.js +6 -3
  506. package/build-module/post-featured-image/index.js.map +1 -1
  507. package/build-module/post-navigation-link/edit.js +1 -0
  508. package/build-module/post-navigation-link/edit.js.map +1 -1
  509. package/build-module/post-navigation-link/index.js +12 -7
  510. package/build-module/post-navigation-link/index.js.map +1 -1
  511. package/build-module/post-navigation-link/variations.js +3 -2
  512. package/build-module/post-navigation-link/variations.js.map +1 -1
  513. package/build-module/post-template/edit.js +1 -0
  514. package/build-module/post-template/edit.js.map +1 -1
  515. package/build-module/post-template/index.js +12 -2
  516. package/build-module/post-template/index.js.map +1 -1
  517. package/build-module/post-terms/edit.js +1 -0
  518. package/build-module/post-terms/edit.js.map +1 -1
  519. package/build-module/post-terms/hooks.js +1 -0
  520. package/build-module/post-terms/hooks.js.map +1 -1
  521. package/build-module/post-title/index.js +6 -3
  522. package/build-module/post-title/index.js.map +1 -1
  523. package/build-module/pullquote/blockquote.native.js +1 -0
  524. package/build-module/pullquote/blockquote.native.js.map +1 -1
  525. package/build-module/pullquote/transforms.js +1 -0
  526. package/build-module/pullquote/transforms.js.map +1 -1
  527. package/build-module/query/deprecated.js +1 -0
  528. package/build-module/query/deprecated.js.map +1 -1
  529. package/build-module/query/edit/inspector-controls/author-control.js +1 -0
  530. package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
  531. package/build-module/query/edit/inspector-controls/format-controls.js +1 -0
  532. package/build-module/query/edit/inspector-controls/format-controls.js.map +1 -1
  533. package/build-module/query/edit/inspector-controls/index.js +1 -0
  534. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  535. package/build-module/query/edit/inspector-controls/parent-control.js +1 -0
  536. package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
  537. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +1 -0
  538. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  539. package/build-module/query/utils.js +1 -0
  540. package/build-module/query/utils.js.map +1 -1
  541. package/build-module/query-no-results/index.js +11 -10
  542. package/build-module/query-no-results/index.js.map +1 -1
  543. package/build-module/query-pagination/edit.js +49 -19
  544. package/build-module/query-pagination/edit.js.map +1 -1
  545. package/build-module/query-pagination/query-pagination-label-control.js +1 -1
  546. package/build-module/query-pagination/query-pagination-label-control.js.map +1 -1
  547. package/build-module/query-pagination-numbers/edit.js +34 -16
  548. package/build-module/query-pagination-numbers/edit.js.map +1 -1
  549. package/build-module/query-title/variations.js +1 -0
  550. package/build-module/query-title/variations.js.map +1 -1
  551. package/build-module/query-total/edit.js +83 -0
  552. package/build-module/query-total/edit.js.map +1 -0
  553. package/build-module/query-total/icons.js +39 -0
  554. package/build-module/query-total/icons.js.map +1 -0
  555. package/build-module/query-total/index.js +74 -0
  556. package/build-module/query-total/index.js.map +1 -0
  557. package/build-module/query-total/init.js +6 -0
  558. package/build-module/query-total/init.js.map +1 -0
  559. package/build-module/quote/deprecated.js +1 -0
  560. package/build-module/quote/deprecated.js.map +1 -1
  561. package/build-module/quote/transforms.js +1 -0
  562. package/build-module/quote/transforms.js.map +1 -1
  563. package/build-module/read-more/index.js +7 -1
  564. package/build-module/read-more/index.js.map +1 -1
  565. package/build-module/site-logo/index.js +4 -2
  566. package/build-module/site-logo/index.js.map +1 -1
  567. package/build-module/site-title/edit.js +42 -13
  568. package/build-module/site-title/edit.js.map +1 -1
  569. package/build-module/site-title/index.js +4 -2
  570. package/build-module/site-title/index.js.map +1 -1
  571. package/build-module/social-link/edit.js +20 -4
  572. package/build-module/social-link/edit.js.map +1 -1
  573. package/build-module/social-link/social-list.js +1 -0
  574. package/build-module/social-link/social-list.js.map +1 -1
  575. package/build-module/social-link/variations.js +1 -0
  576. package/build-module/social-link/variations.js.map +1 -1
  577. package/build-module/social-links/edit.js +43 -13
  578. package/build-module/social-links/edit.js.map +1 -1
  579. package/build-module/social-links/edit.native.js +1 -0
  580. package/build-module/social-links/edit.native.js.map +1 -1
  581. package/build-module/spacer/controls.js +36 -13
  582. package/build-module/spacer/controls.js.map +1 -1
  583. package/build-module/table/deprecated.js +1 -0
  584. package/build-module/table/deprecated.js.map +1 -1
  585. package/build-module/table/edit.js +50 -16
  586. package/build-module/table/edit.js.map +1 -1
  587. package/build-module/table/index.js +4 -1
  588. package/build-module/table/index.js.map +1 -1
  589. package/build-module/table/save.js +1 -0
  590. package/build-module/table/save.js.map +1 -1
  591. package/build-module/table/state.js +1 -0
  592. package/build-module/table/state.js.map +1 -1
  593. package/build-module/table/transforms.js +1 -0
  594. package/build-module/table/transforms.js.map +1 -1
  595. package/build-module/table-of-contents/edit.js +1 -1
  596. package/build-module/table-of-contents/edit.js.map +1 -1
  597. package/build-module/table-of-contents/index.js +26 -25
  598. package/build-module/table-of-contents/index.js.map +1 -1
  599. package/build-module/table-of-contents/list.js +1 -0
  600. package/build-module/table-of-contents/list.js.map +1 -1
  601. package/build-module/table-of-contents/utils.js +1 -0
  602. package/build-module/table-of-contents/utils.js.map +1 -1
  603. package/build-module/tag-cloud/edit.js +58 -12
  604. package/build-module/tag-cloud/edit.js.map +1 -1
  605. package/build-module/template-part/edit/advanced-controls.js +1 -0
  606. package/build-module/template-part/edit/advanced-controls.js.map +1 -1
  607. package/build-module/template-part/edit/import-controls.js +1 -0
  608. package/build-module/template-part/edit/import-controls.js.map +1 -1
  609. package/build-module/template-part/edit/selection-modal.js +1 -0
  610. package/build-module/template-part/edit/selection-modal.js.map +1 -1
  611. package/build-module/template-part/edit/utils/hooks.js +1 -0
  612. package/build-module/template-part/edit/utils/hooks.js.map +1 -1
  613. package/build-module/template-part/edit/utils/transformers.js +1 -0
  614. package/build-module/template-part/edit/utils/transformers.js.map +1 -1
  615. package/build-module/template-part/variations.js +1 -0
  616. package/build-module/template-part/variations.js.map +1 -1
  617. package/build-module/text-columns/edit.js +1 -0
  618. package/build-module/text-columns/edit.js.map +1 -1
  619. package/build-module/text-columns/save.js +1 -0
  620. package/build-module/text-columns/save.js.map +1 -1
  621. package/build-module/text-columns/transforms.js +1 -0
  622. package/build-module/text-columns/transforms.js.map +1 -1
  623. package/build-module/utils/get-transformed-metadata.js +1 -0
  624. package/build-module/utils/get-transformed-metadata.js.map +1 -1
  625. package/build-module/utils/search-patterns.js +1 -0
  626. package/build-module/utils/search-patterns.js.map +1 -1
  627. package/build-module/utils/transformation-categories.native.js +1 -0
  628. package/build-module/utils/transformation-categories.native.js.map +1 -1
  629. package/build-module/video/edit-common-settings.js +91 -31
  630. package/build-module/video/edit-common-settings.js.map +1 -1
  631. package/build-module/video/edit.js +24 -53
  632. package/build-module/video/edit.js.map +1 -1
  633. package/build-module/video/poster-image.js +74 -0
  634. package/build-module/video/poster-image.js.map +1 -0
  635. package/build-module/video/tracks-editor.js +2 -1
  636. package/build-module/video/tracks-editor.js.map +1 -1
  637. package/build-module/video/tracks.js +1 -0
  638. package/build-module/video/tracks.js.map +1 -1
  639. package/build-style/button/style-rtl.css +3 -3
  640. package/build-style/button/style.css +3 -3
  641. package/build-style/comment-template/style-rtl.css +0 -1
  642. package/build-style/comment-template/style.css +0 -1
  643. package/build-style/comments/editor-rtl.css +1 -1
  644. package/build-style/comments/editor.css +1 -1
  645. package/build-style/comments/style-rtl.css +1 -1
  646. package/build-style/comments/style.css +1 -1
  647. package/build-style/common-rtl.css +17 -17
  648. package/build-style/common.css +17 -17
  649. package/build-style/editor-rtl.css +45 -60
  650. package/build-style/editor.css +45 -60
  651. package/build-style/form-input/style-rtl.css +0 -2
  652. package/build-style/form-input/style.css +0 -2
  653. package/build-style/freeform/editor-rtl.css +4 -8
  654. package/build-style/freeform/editor.css +4 -8
  655. package/build-style/gallery/style-rtl.css +2 -2
  656. package/build-style/gallery/style.css +2 -2
  657. package/build-style/heading/style-rtl.css +11 -11
  658. package/build-style/heading/style.css +11 -11
  659. package/build-style/image/style-rtl.css +1 -1
  660. package/build-style/image/style.css +1 -1
  661. package/build-style/latest-comments/style-rtl.css +4 -4
  662. package/build-style/latest-comments/style.css +4 -4
  663. package/build-style/latest-posts/style-rtl.css +2 -1
  664. package/build-style/latest-posts/style.css +2 -1
  665. package/build-style/more/editor-rtl.css +1 -1
  666. package/build-style/more/editor.css +1 -1
  667. package/build-style/nextpage/editor-rtl.css +1 -1
  668. package/build-style/nextpage/editor.css +1 -1
  669. package/build-style/post-comments-form/style-rtl.css +2 -2
  670. package/build-style/post-comments-form/style.css +2 -2
  671. package/build-style/{post-template/editor.css → post-comments-link/style-rtl.css} +2 -4
  672. package/build-style/{post-template/editor-rtl.css → post-comments-link/style.css} +2 -4
  673. package/build-style/post-featured-image/editor-rtl.css +27 -27
  674. package/build-style/post-featured-image/editor.css +27 -27
  675. package/build-style/post-template/style-rtl.css +1 -0
  676. package/build-style/post-template/style.css +1 -0
  677. package/build-style/query-total/style-rtl.css +103 -0
  678. package/build-style/query-total/style.css +103 -0
  679. package/build-style/read-more/style-rtl.css +2 -3
  680. package/build-style/read-more/style.css +2 -3
  681. package/build-style/social-link/editor-rtl.css +2 -2
  682. package/build-style/social-link/editor.css +2 -2
  683. package/build-style/social-links/editor-rtl.css +2 -2
  684. package/build-style/social-links/editor.css +2 -2
  685. package/build-style/social-links/style-rtl.css +2 -2
  686. package/build-style/social-links/style.css +2 -2
  687. package/build-style/style-rtl.css +59 -53
  688. package/build-style/style.css +59 -53
  689. package/build-style/tag-cloud/editor-rtl.css +0 -5
  690. package/build-style/tag-cloud/editor.css +0 -5
  691. package/build-style/text-columns/style-rtl.css +3 -3
  692. package/build-style/text-columns/style.css +3 -3
  693. package/package.json +36 -35
  694. package/src/archives/edit.js +94 -36
  695. package/src/audio/test/__snapshots__/edit.native.js.snap +1 -1
  696. package/src/block/index.php +20 -0
  697. package/src/button/block.json +17 -2
  698. package/src/button/deprecated.js +189 -0
  699. package/src/button/edit.js +61 -32
  700. package/src/button/save.js +6 -1
  701. package/src/column/edit.js +34 -13
  702. package/src/columns/edit.js +71 -40
  703. package/src/comments/index.js +1 -0
  704. package/src/cover/edit/index.js +12 -5
  705. package/src/cover/edit.native.js +5 -2
  706. package/src/cover/test/edit.js +5 -7
  707. package/src/details/edit.js +40 -11
  708. package/src/editor.scss +0 -1
  709. package/src/file/test/__snapshots__/edit.native.js.snap +1 -1
  710. package/src/form/block.json +1 -2
  711. package/src/form/index.php +1 -20
  712. package/src/form/view.js +18 -5
  713. package/src/image/image.js +1 -1
  714. package/src/image/index.php +1 -1
  715. package/src/image/transforms.js +1 -0
  716. package/src/image/view.js +1 -3
  717. package/src/index.js +2 -0
  718. package/src/latest-posts/block.json +12 -0
  719. package/src/latest-posts/style.scss +2 -1
  720. package/src/loginout/edit.js +56 -20
  721. package/src/media-text/edit.js +57 -28
  722. package/src/more/edit.js +39 -12
  723. package/src/navigation/edit/navigation-menu-selector.js +9 -2
  724. package/src/navigation/index.php +2 -2
  725. package/src/navigation-link/edit.js +101 -67
  726. package/src/navigation-link/index.php +16 -1
  727. package/src/navigation-link/link-ui.js +1 -1
  728. package/src/navigation-submenu/edit.js +113 -63
  729. package/src/page-list/edit.js +52 -31
  730. package/src/paragraph/edit.js +29 -5
  731. package/src/post-author/block.json +4 -2
  732. package/src/post-author/edit.js +17 -3
  733. package/src/post-author/index.php +4 -0
  734. package/src/post-author-name/block.json +4 -2
  735. package/src/post-author-name/edit.js +17 -4
  736. package/src/post-author-name/index.php +4 -0
  737. package/src/post-comments-form/block.json +6 -1
  738. package/src/post-comments-link/block.json +8 -1
  739. package/src/post-comments-link/style.scss +4 -0
  740. package/src/post-content/index.php +23 -0
  741. package/src/post-date/block.json +2 -1
  742. package/src/post-date/edit.js +79 -25
  743. package/src/post-excerpt/edit.js +59 -22
  744. package/src/post-featured-image/block.json +6 -3
  745. package/src/post-featured-image/dimension-controls.js +18 -21
  746. package/src/post-featured-image/edit.js +67 -10
  747. package/src/post-navigation-link/block.json +0 -6
  748. package/src/post-navigation-link/index.js +11 -0
  749. package/src/post-navigation-link/variations.js +2 -2
  750. package/src/post-template/block.json +12 -2
  751. package/src/post-template/style.scss +2 -0
  752. package/src/post-title/block.json +6 -3
  753. package/src/query-no-results/block.json +1 -11
  754. package/src/query-no-results/index.js +11 -0
  755. package/src/query-pagination/edit.js +57 -15
  756. package/src/query-pagination/query-pagination-label-control.js +1 -3
  757. package/src/query-pagination-numbers/edit.js +41 -19
  758. package/src/query-pagination-previous/index.php +21 -14
  759. package/src/query-total/block.json +52 -0
  760. package/src/query-total/edit.js +81 -0
  761. package/src/query-total/icons.js +43 -0
  762. package/src/query-total/index.js +18 -0
  763. package/src/query-total/index.php +88 -0
  764. package/src/query-total/init.js +6 -0
  765. package/src/query-total/style.scss +4 -0
  766. package/src/read-more/index.js +6 -0
  767. package/src/site-logo/block.json +4 -2
  768. package/src/site-title/block.json +4 -2
  769. package/src/site-title/edit.js +52 -15
  770. package/src/social-link/edit.js +21 -6
  771. package/src/social-links/edit.js +52 -15
  772. package/src/spacer/controls.js +42 -15
  773. package/src/style.scss +2 -0
  774. package/src/table/block.json +4 -1
  775. package/src/table/edit.js +58 -20
  776. package/src/table-of-contents/block.json +0 -52
  777. package/src/table-of-contents/edit.js +1 -1
  778. package/src/table-of-contents/index.js +53 -0
  779. package/src/tag-cloud/edit.js +60 -8
  780. package/src/tag-cloud/editor.scss +0 -8
  781. package/src/video/edit-common-settings.js +97 -39
  782. package/src/video/edit.js +29 -75
  783. package/src/video/poster-image.js +86 -0
  784. package/src/video/tracks-editor.js +1 -1
  785. package/tsconfig.json +0 -2
  786. package/tsconfig.tsbuildinfo +1 -1
  787. package/src/post-template/editor.scss +0 -7
@@ -20,13 +20,16 @@ import {
20
20
  useBlockProps,
21
21
  useSettings,
22
22
  useBlockEditingMode,
23
+ store as blockEditorStore,
23
24
  } from '@wordpress/block-editor';
25
+ import { useSelect } from '@wordpress/data';
26
+ import { getBlockSupport } from '@wordpress/blocks';
24
27
  import { formatLtr } from '@wordpress/icons';
25
-
26
28
  /**
27
29
  * Internal dependencies
28
30
  */
29
31
  import { useOnEnter } from './use-enter';
32
+ import { unlock } from '../lock-unlock';
30
33
 
31
34
  function ParagraphRTLControl( { direction, setDirection } ) {
32
35
  return (
@@ -47,7 +50,7 @@ function hasDropCapDisabled( align ) {
47
50
  return align === ( isRTL() ? 'left' : 'right' ) || align === 'center';
48
51
  }
49
52
 
50
- function DropCapControl( { clientId, attributes, setAttributes } ) {
53
+ function DropCapControl( { clientId, attributes, setAttributes, name } ) {
51
54
  // Please do not add a useSelect call to the paragraph block unconditionally.
52
55
  // Every useSelect added to a (frequently used) block will degrade load
53
56
  // and type performance. By moving it within InspectorControls, the subscription is
@@ -69,11 +72,18 @@ function DropCapControl( { clientId, attributes, setAttributes } ) {
69
72
  helpText = __( 'Show a large initial letter.' );
70
73
  }
71
74
 
75
+ const isDropCapControlEnabledByDefault = getBlockSupport(
76
+ name,
77
+ 'typography.defaultControls.dropCap',
78
+ false
79
+ );
80
+
72
81
  return (
73
82
  <InspectorControls group="typography">
74
83
  <ToolsPanelItem
75
84
  hasValue={ () => !! dropCap }
76
85
  label={ __( 'Drop cap' ) }
86
+ isShownByDefault={ isDropCapControlEnabledByDefault }
77
87
  onDeselect={ () => setAttributes( { dropCap: undefined } ) }
78
88
  resetAllFilter={ () => ( { dropCap: undefined } ) }
79
89
  panelId={ clientId }
@@ -99,8 +109,13 @@ function ParagraphBlock( {
99
109
  setAttributes,
100
110
  clientId,
101
111
  isSelected: isSingleSelected,
112
+ name,
102
113
  } ) {
103
- const { align, content, direction, dropCap, placeholder } = attributes;
114
+ const isZoomOut = useSelect( ( select ) =>
115
+ unlock( select( blockEditorStore ) ).isZoomOut()
116
+ );
117
+
118
+ const { align, content, direction, dropCap } = attributes;
104
119
  const blockProps = useBlockProps( {
105
120
  ref: useOnEnter( { clientId, content } ),
106
121
  className: clsx( {
@@ -110,6 +125,12 @@ function ParagraphBlock( {
110
125
  style: { direction },
111
126
  } );
112
127
  const blockEditingMode = useBlockEditingMode();
128
+ let { placeholder } = attributes;
129
+ if ( isZoomOut ) {
130
+ placeholder = '';
131
+ } else if ( ! placeholder ) {
132
+ placeholder = __( 'Type / to choose a block' );
133
+ }
113
134
 
114
135
  return (
115
136
  <>
@@ -136,6 +157,7 @@ function ParagraphBlock( {
136
157
  ) }
137
158
  { isSingleSelected && (
138
159
  <DropCapControl
160
+ name={ name }
139
161
  clientId={ clientId }
140
162
  attributes={ attributes }
141
163
  setAttributes={ setAttributes }
@@ -160,8 +182,10 @@ function ParagraphBlock( {
160
182
  : __( 'Block: Paragraph' )
161
183
  }
162
184
  data-empty={ RichText.isEmpty( content ) }
163
- placeholder={ placeholder || __( 'Type / to choose a block' ) }
164
- data-custom-placeholder={ placeholder ? true : undefined }
185
+ placeholder={ placeholder }
186
+ data-custom-placeholder={
187
+ placeholder && ! isZoomOut ? true : undefined
188
+ }
165
189
  __unstableEmbedURLOnPaste
166
190
  __unstableAllowPrefixTransformations
167
191
  />
@@ -26,11 +26,13 @@
26
26
  },
27
27
  "isLink": {
28
28
  "type": "boolean",
29
- "default": false
29
+ "default": false,
30
+ "role": "content"
30
31
  },
31
32
  "linkTarget": {
32
33
  "type": "string",
33
- "default": "_self"
34
+ "default": "_self",
35
+ "role": "content"
34
36
  }
35
37
  },
36
38
  "usesContext": [ "postType", "postId", "queryId" ],
@@ -21,7 +21,7 @@ import {
21
21
  __experimentalVStack as VStack,
22
22
  } from '@wordpress/components';
23
23
  import { useSelect, useDispatch } from '@wordpress/data';
24
- import { __ } from '@wordpress/i18n';
24
+ import { __, sprintf } from '@wordpress/i18n';
25
25
  import { store as coreStore } from '@wordpress/core-data';
26
26
 
27
27
  const minimumUsersForCombobox = 25;
@@ -38,9 +38,9 @@ function PostAuthorEdit( {
38
38
  setAttributes,
39
39
  } ) {
40
40
  const isDescendentOfQueryLoop = Number.isFinite( queryId );
41
- const { authorId, authorDetails, authors } = useSelect(
41
+ const { authorId, authorDetails, authors, supportsAuthor } = useSelect(
42
42
  ( select ) => {
43
- const { getEditedEntityRecord, getUser, getUsers } =
43
+ const { getEditedEntityRecord, getUser, getUsers, getPostType } =
44
44
  select( coreStore );
45
45
  const _authorId = getEditedEntityRecord(
46
46
  'postType',
@@ -52,6 +52,8 @@ function PostAuthorEdit( {
52
52
  authorId: _authorId,
53
53
  authorDetails: _authorId ? getUser( _authorId ) : null,
54
54
  authors: getUsers( AUTHORS_QUERY ),
55
+ supportsAuthor:
56
+ getPostType( postType )?.supports?.author ?? false,
55
57
  };
56
58
  },
57
59
  [ postType, postId ]
@@ -97,6 +99,18 @@ function PostAuthorEdit( {
97
99
  const showAuthorControl =
98
100
  !! postId && ! isDescendentOfQueryLoop && authorOptions.length > 0;
99
101
 
102
+ if ( ! supportsAuthor ) {
103
+ return (
104
+ <div { ...blockProps }>
105
+ { sprintf(
106
+ // translators: %s: Name of the post type e.g: "post".
107
+ __( 'This post type (%s) does not support the author.' ),
108
+ postType
109
+ ) }
110
+ </div>
111
+ );
112
+ }
113
+
100
114
  return (
101
115
  <>
102
116
  <InspectorControls>
@@ -26,6 +26,10 @@ function render_block_core_post_author( $attributes, $content, $block ) {
26
26
  return '';
27
27
  }
28
28
 
29
+ if ( ! post_type_supports( $block->context['postType'], 'author' ) ) {
30
+ return '';
31
+ }
32
+
29
33
  $avatar = ! empty( $attributes['avatarSize'] ) ? get_avatar(
30
34
  $author_id,
31
35
  $attributes['avatarSize']
@@ -12,11 +12,13 @@
12
12
  },
13
13
  "isLink": {
14
14
  "type": "boolean",
15
- "default": false
15
+ "default": false,
16
+ "role": "content"
16
17
  },
17
18
  "linkTarget": {
18
19
  "type": "string",
19
- "default": "_self"
20
+ "default": "_self",
21
+ "role": "content"
20
22
  }
21
23
  },
22
24
  "usesContext": [ "postType", "postId" ],
@@ -13,7 +13,7 @@ import {
13
13
  useBlockProps,
14
14
  } from '@wordpress/block-editor';
15
15
  import { useSelect } from '@wordpress/data';
16
- import { __ } from '@wordpress/i18n';
16
+ import { __, sprintf } from '@wordpress/i18n';
17
17
  import { store as coreStore } from '@wordpress/core-data';
18
18
  import { PanelBody, ToggleControl } from '@wordpress/components';
19
19
 
@@ -22,9 +22,10 @@ function PostAuthorNameEdit( {
22
22
  attributes: { textAlign, isLink, linkTarget },
23
23
  setAttributes,
24
24
  } ) {
25
- const { authorName } = useSelect(
25
+ const { authorName, supportsAuthor } = useSelect(
26
26
  ( select ) => {
27
- const { getEditedEntityRecord, getUser } = select( coreStore );
27
+ const { getEditedEntityRecord, getUser, getPostType } =
28
+ select( coreStore );
28
29
  const _authorId = getEditedEntityRecord(
29
30
  'postType',
30
31
  postType,
@@ -33,6 +34,8 @@ function PostAuthorNameEdit( {
33
34
 
34
35
  return {
35
36
  authorName: _authorId ? getUser( _authorId ) : null,
37
+ supportsAuthor:
38
+ getPostType( postType )?.supports?.author ?? false,
36
39
  };
37
40
  },
38
41
  [ postType, postId ]
@@ -90,7 +93,17 @@ function PostAuthorNameEdit( {
90
93
  ) }
91
94
  </PanelBody>
92
95
  </InspectorControls>
93
- <div { ...blockProps }> { displayAuthor } </div>
96
+ <div { ...blockProps }>
97
+ { supportsAuthor
98
+ ? displayAuthor
99
+ : sprintf(
100
+ // translators: %s: Name of the post type e.g: "post".
101
+ __(
102
+ 'This post type (%s) does not support the author.'
103
+ ),
104
+ postType
105
+ ) }
106
+ </div>
94
107
  </>
95
108
  );
96
109
  }
@@ -26,6 +26,10 @@ function render_block_core_post_author_name( $attributes, $content, $block ) {
26
26
  return '';
27
27
  }
28
28
 
29
+ if ( ! post_type_supports( $block->context['postType'], 'author' ) ) {
30
+ return '';
31
+ }
32
+
29
33
  $author_name = get_the_author_meta( 'display_name', $author_id );
30
34
  if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) {
31
35
  $author_name = sprintf( '<a href="%1$s" target="%2$s" class="wp-block-post-author-name__link">%3$s</a>', get_author_posts_url( $author_id ), esc_attr( $attributes['linkTarget'] ), $author_name );
@@ -56,5 +56,10 @@
56
56
  "wp-block-post-comments-form",
57
57
  "wp-block-buttons",
58
58
  "wp-block-button"
59
- ]
59
+ ],
60
+ "example": {
61
+ "attributes": {
62
+ "textAlign": "center"
63
+ }
64
+ }
60
65
  }
@@ -42,6 +42,13 @@
42
42
  },
43
43
  "interactivity": {
44
44
  "clientNavigation": true
45
+ },
46
+ "__experimentalBorder": {
47
+ "radius": true,
48
+ "color": true,
49
+ "width": true,
50
+ "style": true
45
51
  }
46
- }
52
+ },
53
+ "style": "wp-block-post-comments-link"
47
54
  }
@@ -0,0 +1,4 @@
1
+ .wp-block-post-comments-link {
2
+ // This block has customizable padding, border-box makes that more predictable.
3
+ box-sizing: border-box;
4
+ }
@@ -46,10 +46,33 @@ function render_block_core_post_content( $attributes, $content, $block ) {
46
46
  $content .= wp_link_pages( array( 'echo' => 0 ) );
47
47
  }
48
48
 
49
+ $ignored_hooked_blocks = get_post_meta( $post_id, '_wp_ignored_hooked_blocks', true );
50
+ if ( ! empty( $ignored_hooked_blocks ) ) {
51
+ $ignored_hooked_blocks = json_decode( $ignored_hooked_blocks, true );
52
+ $attributes['metadata'] = array(
53
+ 'ignoredHookedBlocks' => $ignored_hooked_blocks,
54
+ );
55
+ }
56
+
57
+ // Wrap in Post Content block so the Block Hooks algorithm can insert blocks
58
+ // that are hooked as first or last child of `core/post-content`.
59
+ $content = get_comment_delimited_block_content(
60
+ 'core/post-content',
61
+ $attributes,
62
+ $content
63
+ );
64
+
65
+ // We need to remove the `core/post-content` block wrapper after the Block Hooks algorithm,
66
+ // but before `do_blocks` runs, as it would otherwise attempt to render the same block again --
67
+ // thus recursing infinitely.
68
+ add_filter( 'the_content', 'remove_serialized_parent_block', 8 );
69
+
49
70
  /** This filter is documented in wp-includes/post-template.php */
50
71
  $content = apply_filters( 'the_content', str_replace( ']]>', ']]&gt;', $content ) );
51
72
  unset( $seen_ids[ $post_id ] );
52
73
 
74
+ remove_filter( 'the_content', 'remove_serialized_parent_block', 8 );
75
+
53
76
  if ( empty( $content ) ) {
54
77
  return '';
55
78
  }
@@ -15,7 +15,8 @@
15
15
  },
16
16
  "isLink": {
17
17
  "type": "boolean",
18
- "default": false
18
+ "default": false,
19
+ "role": "content"
19
20
  },
20
21
  "displayType": {
21
22
  "type": "string",
@@ -26,13 +26,19 @@ import {
26
26
  ToolbarGroup,
27
27
  ToolbarButton,
28
28
  ToggleControl,
29
- PanelBody,
29
+ __experimentalToolsPanel as ToolsPanel,
30
+ __experimentalToolsPanelItem as ToolsPanelItem,
30
31
  } from '@wordpress/components';
31
32
  import { __, _x, sprintf } from '@wordpress/i18n';
32
33
  import { edit } from '@wordpress/icons';
33
34
  import { DOWN } from '@wordpress/keycodes';
34
35
  import { useSelect } from '@wordpress/data';
35
36
 
37
+ /**
38
+ * Internal dependencies
39
+ */
40
+ import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
41
+
36
42
  export default function PostDateEdit( {
37
43
  attributes: { textAlign, format, isLink, displayType },
38
44
  context: { postId, postType: postTypeSlug, queryId },
@@ -44,6 +50,7 @@ export default function PostDateEdit( {
44
50
  [ `wp-block-post-date__modified-date` ]: displayType === 'modified',
45
51
  } ),
46
52
  } );
53
+ const dropdownMenuProps = useToolsPanelDropdownMenuProps();
47
54
 
48
55
  // Use internal state instead of a ref to make sure that the component
49
56
  // re-renders when the popover's anchor updates.
@@ -160,16 +167,37 @@ export default function PostDateEdit( {
160
167
  </BlockControls>
161
168
 
162
169
  <InspectorControls>
163
- <PanelBody title={ __( 'Settings' ) }>
164
- <DateFormatPicker
165
- format={ format }
166
- defaultFormat={ siteFormat }
167
- onChange={ ( nextFormat ) =>
168
- setAttributes( { format: nextFormat } )
170
+ <ToolsPanel
171
+ label={ __( 'Settings' ) }
172
+ resetAll={ () => {
173
+ setAttributes( {
174
+ format: undefined,
175
+ isLink: false,
176
+ displayType: 'date',
177
+ } );
178
+ } }
179
+ dropdownMenuProps={ dropdownMenuProps }
180
+ >
181
+ <ToolsPanelItem
182
+ hasValue={ () =>
183
+ format !== undefined && format !== siteFormat
184
+ }
185
+ label={ __( 'Date Format' ) }
186
+ onDeselect={ () =>
187
+ setAttributes( { format: undefined } )
169
188
  }
170
- />
171
- <ToggleControl
172
- __nextHasNoMarginBottom
189
+ isShownByDefault
190
+ >
191
+ <DateFormatPicker
192
+ format={ format }
193
+ defaultFormat={ siteFormat }
194
+ onChange={ ( nextFormat ) =>
195
+ setAttributes( { format: nextFormat } )
196
+ }
197
+ />
198
+ </ToolsPanelItem>
199
+ <ToolsPanelItem
200
+ hasValue={ () => isLink !== false }
173
201
  label={
174
202
  postType?.labels.singular_name
175
203
  ? sprintf(
@@ -179,23 +207,49 @@ export default function PostDateEdit( {
179
207
  )
180
208
  : __( 'Link to post' )
181
209
  }
182
- onChange={ () => setAttributes( { isLink: ! isLink } ) }
183
- checked={ isLink }
184
- />
185
- <ToggleControl
186
- __nextHasNoMarginBottom
210
+ onDeselect={ () => setAttributes( { isLink: false } ) }
211
+ isShownByDefault
212
+ >
213
+ <ToggleControl
214
+ __nextHasNoMarginBottom
215
+ label={
216
+ postType?.labels.singular_name
217
+ ? sprintf(
218
+ // translators: %s: Name of the post type e.g: "post".
219
+ __( 'Link to %s' ),
220
+ postType.labels.singular_name.toLowerCase()
221
+ )
222
+ : __( 'Link to post' )
223
+ }
224
+ onChange={ () =>
225
+ setAttributes( { isLink: ! isLink } )
226
+ }
227
+ checked={ isLink }
228
+ />
229
+ </ToolsPanelItem>
230
+ <ToolsPanelItem
231
+ hasValue={ () => displayType !== 'date' }
187
232
  label={ __( 'Display last modified date' ) }
188
- onChange={ ( value ) =>
189
- setAttributes( {
190
- displayType: value ? 'modified' : 'date',
191
- } )
233
+ onDeselect={ () =>
234
+ setAttributes( { displayType: 'date' } )
192
235
  }
193
- checked={ displayType === 'modified' }
194
- help={ __(
195
- 'Only shows if the post has been modified'
196
- ) }
197
- />
198
- </PanelBody>
236
+ isShownByDefault
237
+ >
238
+ <ToggleControl
239
+ __nextHasNoMarginBottom
240
+ label={ __( 'Display last modified date' ) }
241
+ onChange={ ( value ) =>
242
+ setAttributes( {
243
+ displayType: value ? 'modified' : 'date',
244
+ } )
245
+ }
246
+ checked={ displayType === 'modified' }
247
+ help={ __(
248
+ 'Only shows if the post has been modified'
249
+ ) }
250
+ />
251
+ </ToolsPanelItem>
252
+ </ToolsPanel>
199
253
  </InspectorControls>
200
254
 
201
255
  <div { ...blockProps }>{ postDate }</div>
@@ -16,14 +16,22 @@ import {
16
16
  Warning,
17
17
  useBlockProps,
18
18
  } from '@wordpress/block-editor';
19
- import { PanelBody, ToggleControl, RangeControl } from '@wordpress/components';
19
+ import {
20
+ ToggleControl,
21
+ RangeControl,
22
+ __experimentalToolsPanel as ToolsPanel,
23
+ __experimentalToolsPanelItem as ToolsPanelItem,
24
+ } from '@wordpress/components';
20
25
  import { __, _x } from '@wordpress/i18n';
21
26
  import { useSelect } from '@wordpress/data';
22
27
 
23
28
  /**
24
29
  * Internal dependencies
25
30
  */
26
- import { useCanEditEntity } from '../utils/hooks';
31
+ import {
32
+ useCanEditEntity,
33
+ useToolsPanelDropdownMenuProps,
34
+ } from '../utils/hooks';
27
35
 
28
36
  const ELLIPSIS = '…';
29
37
 
@@ -41,6 +49,8 @@ export default function PostExcerptEditor( {
41
49
  { rendered: renderedExcerpt, protected: isProtected } = {},
42
50
  ] = useEntityProp( 'postType', postType, 'excerpt', postId );
43
51
 
52
+ const dropdownMenuProps = useToolsPanelDropdownMenuProps();
53
+
44
54
  /**
45
55
  * Check if the post type supports excerpts.
46
56
  * Add an exception and return early for the "page" post type,
@@ -219,29 +229,56 @@ export default function PostExcerptEditor( {
219
229
  />
220
230
  </BlockControls>
221
231
  <InspectorControls>
222
- <PanelBody title={ __( 'Settings' ) }>
223
- <ToggleControl
224
- __nextHasNoMarginBottom
232
+ <ToolsPanel
233
+ label={ __( 'Settings' ) }
234
+ resetAll={ () => {
235
+ setAttributes( {
236
+ showMoreOnNewLine: true,
237
+ excerptLength: 55,
238
+ } );
239
+ } }
240
+ dropdownMenuProps={ dropdownMenuProps }
241
+ >
242
+ <ToolsPanelItem
243
+ hasValue={ () => showMoreOnNewLine !== true }
225
244
  label={ __( 'Show link on new line' ) }
226
- checked={ showMoreOnNewLine }
227
- onChange={ ( newShowMoreOnNewLine ) =>
228
- setAttributes( {
229
- showMoreOnNewLine: newShowMoreOnNewLine,
230
- } )
245
+ onDeselect={ () =>
246
+ setAttributes( { showMoreOnNewLine: true } )
231
247
  }
232
- />
233
- <RangeControl
234
- __next40pxDefaultSize
235
- __nextHasNoMarginBottom
248
+ isShownByDefault
249
+ >
250
+ <ToggleControl
251
+ __nextHasNoMarginBottom
252
+ label={ __( 'Show link on new line' ) }
253
+ checked={ showMoreOnNewLine }
254
+ onChange={ ( newShowMoreOnNewLine ) =>
255
+ setAttributes( {
256
+ showMoreOnNewLine: newShowMoreOnNewLine,
257
+ } )
258
+ }
259
+ />
260
+ </ToolsPanelItem>
261
+ <ToolsPanelItem
262
+ hasValue={ () => excerptLength !== 55 }
236
263
  label={ __( 'Max number of words' ) }
237
- value={ excerptLength }
238
- onChange={ ( value ) => {
239
- setAttributes( { excerptLength: value } );
240
- } }
241
- min="10"
242
- max="100"
243
- />
244
- </PanelBody>
264
+ onDeselect={ () =>
265
+ setAttributes( { excerptLength: 55 } )
266
+ }
267
+ isShownByDefault
268
+ >
269
+ <RangeControl
270
+ __next40pxDefaultSize
271
+ __nextHasNoMarginBottom
272
+ label={ __( 'Max number of words' ) }
273
+ value={ excerptLength }
274
+ onChange={ ( value ) => {
275
+ setAttributes( { excerptLength: value } );
276
+ } }
277
+ min="10"
278
+ max="100"
279
+ />
280
+ </ToolsPanelItem>
281
+ </ToolsPanel>
245
282
  </InspectorControls>
246
283
  <div { ...blockProps }>
247
284
  { excerptContent }
@@ -9,7 +9,8 @@
9
9
  "attributes": {
10
10
  "isLink": {
11
11
  "type": "boolean",
12
- "default": false
12
+ "default": false,
13
+ "role": "content"
13
14
  },
14
15
  "aspectRatio": {
15
16
  "type": "string"
@@ -30,11 +31,13 @@
30
31
  "rel": {
31
32
  "type": "string",
32
33
  "attribute": "rel",
33
- "default": ""
34
+ "default": "",
35
+ "role": "content"
34
36
  },
35
37
  "linkTarget": {
36
38
  "type": "string",
37
- "default": "_self"
39
+ "default": "_self",
40
+ "role": "content"
38
41
  },
39
42
  "overlayColor": {
40
43
  "type": "string"
@@ -12,10 +12,18 @@ import {
12
12
  } from '@wordpress/components';
13
13
  import {
14
14
  useSettings,
15
+ privateApis as blockEditorPrivateApis,
15
16
  store as blockEditorStore,
16
17
  } from '@wordpress/block-editor';
17
18
  import { useSelect } from '@wordpress/data';
18
19
 
20
+ /**
21
+ * Internal dependencies
22
+ */
23
+ import { unlock } from '../lock-unlock';
24
+
25
+ const { ResolutionTool } = unlock( blockEditorPrivateApis );
26
+
19
27
  const SCALE_OPTIONS = (
20
28
  <>
21
29
  <ToggleGroupControlOption
@@ -223,30 +231,19 @@ const DimensionControls = ( {
223
231
  </ToolsPanelItem>
224
232
  ) }
225
233
  { !! imageSizeOptions.length && (
226
- <ToolsPanelItem
227
- hasValue={ () => !! sizeSlug }
228
- label={ __( 'Resolution' ) }
229
- onDeselect={ () =>
230
- setAttributes( { sizeSlug: undefined } )
234
+ <ResolutionTool
235
+ panelId={ clientId }
236
+ value={ sizeSlug }
237
+ defaultValue={ DEFAULT_SIZE }
238
+ options={ imageSizeOptions }
239
+ onChange={ ( nextSizeSlug ) =>
240
+ setAttributes( { sizeSlug: nextSizeSlug } )
231
241
  }
242
+ isShownByDefault={ false }
232
243
  resetAllFilter={ () => ( {
233
- sizeSlug: undefined,
244
+ sizeSlug: DEFAULT_SIZE,
234
245
  } ) }
235
- isShownByDefault={ false }
236
- panelId={ clientId }
237
- >
238
- <SelectControl
239
- __next40pxDefaultSize
240
- __nextHasNoMarginBottom
241
- label={ __( 'Resolution' ) }
242
- value={ sizeSlug || DEFAULT_SIZE }
243
- options={ imageSizeOptions }
244
- onChange={ ( nextSizeSlug ) =>
245
- setAttributes( { sizeSlug: nextSizeSlug } )
246
- }
247
- help={ __( 'Select the size of the source image.' ) }
248
- />
249
- </ToolsPanelItem>
246
+ />
250
247
  ) }
251
248
  </>
252
249
  );