@wordpress/block-library 7.2.0 → 7.3.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 (425) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +1 -1
  3. package/build/archives/edit.js +21 -1
  4. package/build/archives/edit.js.map +1 -1
  5. package/build/archives/index.js +5 -1
  6. package/build/archives/index.js.map +1 -1
  7. package/build/audio/edit.native.js +0 -5
  8. package/build/audio/edit.native.js.map +1 -1
  9. package/build/avatar/edit.js +17 -11
  10. package/build/avatar/edit.js.map +1 -1
  11. package/build/block/edit.js +2 -1
  12. package/build/block/edit.js.map +1 -1
  13. package/build/column/index.js +1 -0
  14. package/build/column/index.js.map +1 -1
  15. package/build/comment-author-avatar/index.js +3 -3
  16. package/build/comment-author-name/index.js +7 -3
  17. package/build/comment-author-name/index.js.map +1 -1
  18. package/build/comment-content/index.js +1 -1
  19. package/build/comment-date/index.js +7 -3
  20. package/build/comment-date/index.js.map +1 -1
  21. package/build/comment-edit-link/index.js +5 -1
  22. package/build/comment-edit-link/index.js.map +1 -1
  23. package/build/comment-reply-link/index.js +5 -1
  24. package/build/comment-reply-link/index.js.map +1 -1
  25. package/build/comment-template/edit.js +7 -14
  26. package/build/comment-template/edit.js.map +1 -1
  27. package/build/comment-template/hooks.js +7 -23
  28. package/build/comment-template/hooks.js.map +1 -1
  29. package/build/comment-template/index.js +2 -2
  30. package/build/comments-pagination-next/index.js +2 -2
  31. package/build/comments-pagination-numbers/index.js +1 -1
  32. package/build/comments-pagination-previous/index.js +1 -1
  33. package/build/comments-query-loop/edit/comments-inspector-controls.js +2 -69
  34. package/build/comments-query-loop/edit/comments-inspector-controls.js.map +1 -1
  35. package/build/comments-query-loop/edit.js +22 -1
  36. package/build/comments-query-loop/edit.js.map +1 -1
  37. package/build/comments-query-loop/index.js +1 -23
  38. package/build/comments-query-loop/index.js.map +1 -1
  39. package/build/cover/edit.js +35 -6
  40. package/build/cover/edit.js.map +1 -1
  41. package/build/cover/index.js +5 -0
  42. package/build/cover/index.js.map +1 -1
  43. package/build/cover/save.js +3 -2
  44. package/build/cover/save.js.map +1 -1
  45. package/build/gallery/gap-styles.js +8 -2
  46. package/build/gallery/gap-styles.js.map +1 -1
  47. package/build/gallery/index.js +1 -0
  48. package/build/gallery/index.js.map +1 -1
  49. package/build/group/edit.js +3 -1
  50. package/build/group/edit.js.map +1 -1
  51. package/build/group/index.js +2 -4
  52. package/build/group/index.js.map +1 -1
  53. package/build/group/variations.js +31 -9
  54. package/build/group/variations.js.map +1 -1
  55. package/build/heading/edit.js +1 -1
  56. package/build/heading/edit.js.map +1 -1
  57. package/build/html/edit.js +3 -2
  58. package/build/html/edit.js.map +1 -1
  59. package/build/image/edit.native.js +8 -10
  60. package/build/image/edit.native.js.map +1 -1
  61. package/build/index.js +3 -3
  62. package/build/index.js.map +1 -1
  63. package/build/list/deprecated.js +2 -2
  64. package/build/list/deprecated.js.map +1 -1
  65. package/build/list/v2/deprecated.js +117 -0
  66. package/build/list/v2/deprecated.js.map +1 -0
  67. package/build/list/v2/edit.js +106 -3
  68. package/build/list/v2/edit.js.map +1 -1
  69. package/build/list/v2/index.js +4 -1
  70. package/build/list/v2/index.js.map +1 -1
  71. package/build/list/v2/migrate.js +85 -0
  72. package/build/list/v2/migrate.js.map +1 -0
  73. package/build/list-item/edit.js +59 -10
  74. package/build/list-item/edit.js.map +1 -1
  75. package/build/list-item/hooks/index.js +32 -0
  76. package/build/list-item/hooks/index.js.map +1 -0
  77. package/build/list-item/hooks/use-enter.js +93 -0
  78. package/build/list-item/hooks/use-enter.js.map +1 -0
  79. package/build/list-item/hooks/use-indent-list-item.js +74 -0
  80. package/build/list-item/hooks/use-indent-list-item.js.map +1 -0
  81. package/build/list-item/hooks/use-outdent-list-item.js +77 -0
  82. package/build/list-item/hooks/use-outdent-list-item.js.map +1 -0
  83. package/build/list-item/index.js +1 -1
  84. package/build/list-item/index.js.map +1 -1
  85. package/build/list-item/utils.js +16 -0
  86. package/build/list-item/utils.js.map +1 -0
  87. package/build/media-text/media-container.native.js +1 -16
  88. package/build/media-text/media-container.native.js.map +1 -1
  89. package/build/navigation/edit/index.js +36 -17
  90. package/build/navigation/edit/index.js.map +1 -1
  91. package/build/navigation/edit/navigation-menu-delete-control.js +1 -1
  92. package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  93. package/build/navigation/edit/unsaved-inner-blocks.js +34 -7
  94. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  95. package/build/navigation/index.js +9 -1
  96. package/build/navigation/index.js.map +1 -1
  97. package/build/navigation/use-navigation-menu.js +1 -0
  98. package/build/navigation/use-navigation-menu.js.map +1 -1
  99. package/build/navigation-link/edit.js +9 -5
  100. package/build/navigation-link/edit.js.map +1 -1
  101. package/build/navigation-link/index.js +1 -1
  102. package/build/navigation-submenu/edit.js +5 -9
  103. package/build/navigation-submenu/edit.js.map +1 -1
  104. package/build/navigation-submenu/index.js +1 -1
  105. package/build/post-comment/edit.js +2 -2
  106. package/build/post-comment/edit.js.map +1 -1
  107. package/build/post-comments-form/edit.js +3 -2
  108. package/build/post-comments-form/edit.js.map +1 -1
  109. package/build/post-featured-image/index.js +1 -1
  110. package/build/post-template/edit.js +7 -2
  111. package/build/post-template/edit.js.map +1 -1
  112. package/build/post-terms/edit.js +3 -1
  113. package/build/post-terms/edit.js.map +1 -1
  114. package/build/post-terms/variations.js +1 -1
  115. package/build/post-terms/variations.js.map +1 -1
  116. package/build/query-pagination/edit.js +1 -1
  117. package/build/query-pagination/edit.js.map +1 -1
  118. package/build/query-pagination-numbers/index.js +19 -1
  119. package/build/query-pagination-numbers/index.js.map +1 -1
  120. package/build/quote/index.js +15 -8
  121. package/build/quote/index.js.map +1 -1
  122. package/build/quote/v2/deprecated.js +133 -0
  123. package/build/quote/v2/deprecated.js.map +1 -0
  124. package/build/quote/v2/edit.js +131 -0
  125. package/build/quote/v2/edit.js.map +1 -0
  126. package/build/quote/v2/index.js +49 -0
  127. package/build/quote/v2/index.js.map +1 -0
  128. package/build/quote/v2/save.js +43 -0
  129. package/build/quote/v2/save.js.map +1 -0
  130. package/build/quote/v2/transforms.js +156 -0
  131. package/build/quote/v2/transforms.js.map +1 -0
  132. package/build/read-more/index.js +1 -1
  133. package/build/rss/edit.js +6 -1
  134. package/build/rss/edit.js.map +1 -1
  135. package/build/site-logo/edit.js +3 -2
  136. package/build/site-logo/edit.js.map +1 -1
  137. package/build/site-logo/index.js +1 -1
  138. package/build/social-links/index.js +1 -0
  139. package/build/social-links/index.js.map +1 -1
  140. package/build/spacer/controls.native.js +1 -1
  141. package/build/spacer/controls.native.js.map +1 -1
  142. package/build/template-part/edit/utils/hooks.js +5 -2
  143. package/build/template-part/edit/utils/hooks.js.map +1 -1
  144. package/build-module/archives/edit.js +22 -2
  145. package/build-module/archives/edit.js.map +1 -1
  146. package/build-module/archives/index.js +5 -1
  147. package/build-module/archives/index.js.map +1 -1
  148. package/build-module/audio/edit.native.js +0 -5
  149. package/build-module/audio/edit.native.js.map +1 -1
  150. package/build-module/avatar/edit.js +16 -11
  151. package/build-module/avatar/edit.js.map +1 -1
  152. package/build-module/block/edit.js +4 -3
  153. package/build-module/block/edit.js.map +1 -1
  154. package/build-module/column/index.js +1 -0
  155. package/build-module/column/index.js.map +1 -1
  156. package/build-module/comment-author-avatar/index.js +3 -3
  157. package/build-module/comment-author-name/index.js +7 -3
  158. package/build-module/comment-author-name/index.js.map +1 -1
  159. package/build-module/comment-content/index.js +1 -1
  160. package/build-module/comment-date/index.js +7 -3
  161. package/build-module/comment-date/index.js.map +1 -1
  162. package/build-module/comment-edit-link/index.js +5 -1
  163. package/build-module/comment-edit-link/index.js.map +1 -1
  164. package/build-module/comment-reply-link/index.js +5 -1
  165. package/build-module/comment-reply-link/index.js.map +1 -1
  166. package/build-module/comment-template/edit.js +7 -14
  167. package/build-module/comment-template/edit.js.map +1 -1
  168. package/build-module/comment-template/hooks.js +7 -23
  169. package/build-module/comment-template/hooks.js.map +1 -1
  170. package/build-module/comment-template/index.js +2 -2
  171. package/build-module/comments-pagination-next/index.js +2 -2
  172. package/build-module/comments-pagination-numbers/index.js +1 -1
  173. package/build-module/comments-pagination-previous/index.js +1 -1
  174. package/build-module/comments-query-loop/edit/comments-inspector-controls.js +4 -70
  175. package/build-module/comments-query-loop/edit/comments-inspector-controls.js.map +1 -1
  176. package/build-module/comments-query-loop/edit.js +22 -1
  177. package/build-module/comments-query-loop/edit.js.map +1 -1
  178. package/build-module/comments-query-loop/index.js +1 -23
  179. package/build-module/comments-query-loop/index.js.map +1 -1
  180. package/build-module/cover/edit.js +36 -8
  181. package/build-module/cover/edit.js.map +1 -1
  182. package/build-module/cover/index.js +5 -0
  183. package/build-module/cover/index.js.map +1 -1
  184. package/build-module/cover/save.js +3 -2
  185. package/build-module/cover/save.js.map +1 -1
  186. package/build-module/gallery/gap-styles.js +8 -2
  187. package/build-module/gallery/gap-styles.js.map +1 -1
  188. package/build-module/gallery/index.js +1 -0
  189. package/build-module/gallery/index.js.map +1 -1
  190. package/build-module/group/edit.js +3 -1
  191. package/build-module/group/edit.js.map +1 -1
  192. package/build-module/group/index.js +2 -4
  193. package/build-module/group/index.js.map +1 -1
  194. package/build-module/group/variations.js +30 -9
  195. package/build-module/group/variations.js.map +1 -1
  196. package/build-module/heading/edit.js +1 -1
  197. package/build-module/heading/edit.js.map +1 -1
  198. package/build-module/html/edit.js +4 -3
  199. package/build-module/html/edit.js.map +1 -1
  200. package/build-module/image/edit.native.js +8 -10
  201. package/build-module/image/edit.native.js.map +1 -1
  202. package/build-module/index.js +3 -3
  203. package/build-module/index.js.map +1 -1
  204. package/build-module/list/deprecated.js +2 -2
  205. package/build-module/list/deprecated.js.map +1 -1
  206. package/build-module/list/v2/deprecated.js +104 -0
  207. package/build-module/list/v2/deprecated.js.map +1 -0
  208. package/build-module/list/v2/edit.js +104 -5
  209. package/build-module/list/v2/edit.js.map +1 -1
  210. package/build-module/list/v2/index.js +3 -1
  211. package/build-module/list/v2/index.js.map +1 -1
  212. package/build-module/list/v2/migrate.js +77 -0
  213. package/build-module/list/v2/migrate.js.map +1 -0
  214. package/build-module/list-item/edit.js +59 -13
  215. package/build-module/list-item/edit.js.map +1 -1
  216. package/build-module/list-item/hooks/index.js +4 -0
  217. package/build-module/list-item/hooks/index.js.map +1 -0
  218. package/build-module/list-item/hooks/use-enter.js +77 -0
  219. package/build-module/list-item/hooks/use-enter.js.map +1 -0
  220. package/build-module/list-item/hooks/use-indent-list-item.js +62 -0
  221. package/build-module/list-item/hooks/use-indent-list-item.js.map +1 -0
  222. package/build-module/list-item/hooks/use-outdent-list-item.js +66 -0
  223. package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -0
  224. package/build-module/list-item/index.js +1 -1
  225. package/build-module/list-item/index.js.map +1 -1
  226. package/build-module/list-item/utils.js +8 -0
  227. package/build-module/list-item/utils.js.map +1 -0
  228. package/build-module/media-text/media-container.native.js +1 -14
  229. package/build-module/media-text/media-container.native.js.map +1 -1
  230. package/build-module/navigation/edit/index.js +37 -17
  231. package/build-module/navigation/edit/index.js.map +1 -1
  232. package/build-module/navigation/edit/navigation-menu-delete-control.js +1 -1
  233. package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  234. package/build-module/navigation/edit/unsaved-inner-blocks.js +35 -8
  235. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  236. package/build-module/navigation/index.js +9 -1
  237. package/build-module/navigation/index.js.map +1 -1
  238. package/build-module/navigation/use-navigation-menu.js +1 -0
  239. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  240. package/build-module/navigation-link/edit.js +9 -5
  241. package/build-module/navigation-link/edit.js.map +1 -1
  242. package/build-module/navigation-link/index.js +1 -1
  243. package/build-module/navigation-submenu/edit.js +6 -10
  244. package/build-module/navigation-submenu/edit.js.map +1 -1
  245. package/build-module/navigation-submenu/index.js +1 -1
  246. package/build-module/post-comment/edit.js +2 -2
  247. package/build-module/post-comment/edit.js.map +1 -1
  248. package/build-module/post-comments-form/edit.js +3 -2
  249. package/build-module/post-comments-form/edit.js.map +1 -1
  250. package/build-module/post-featured-image/index.js +1 -1
  251. package/build-module/post-template/edit.js +7 -2
  252. package/build-module/post-template/edit.js.map +1 -1
  253. package/build-module/post-terms/edit.js +4 -2
  254. package/build-module/post-terms/edit.js.map +1 -1
  255. package/build-module/post-terms/variations.js +3 -3
  256. package/build-module/post-terms/variations.js.map +1 -1
  257. package/build-module/query-pagination/edit.js +1 -1
  258. package/build-module/query-pagination/edit.js.map +1 -1
  259. package/build-module/query-pagination-numbers/index.js +19 -1
  260. package/build-module/query-pagination-numbers/index.js.map +1 -1
  261. package/build-module/quote/index.js +13 -1
  262. package/build-module/quote/index.js.map +1 -1
  263. package/build-module/quote/v2/deprecated.js +116 -0
  264. package/build-module/quote/v2/deprecated.js.map +1 -0
  265. package/build-module/quote/v2/edit.js +115 -0
  266. package/build-module/quote/v2/edit.js.map +1 -0
  267. package/build-module/quote/v2/index.js +33 -0
  268. package/build-module/quote/v2/index.js.map +1 -0
  269. package/build-module/quote/v2/save.js +30 -0
  270. package/build-module/quote/v2/save.js.map +1 -0
  271. package/build-module/quote/v2/transforms.js +147 -0
  272. package/build-module/quote/v2/transforms.js.map +1 -0
  273. package/build-module/read-more/index.js +1 -1
  274. package/build-module/rss/edit.js +5 -1
  275. package/build-module/rss/edit.js.map +1 -1
  276. package/build-module/site-logo/edit.js +3 -2
  277. package/build-module/site-logo/edit.js.map +1 -1
  278. package/build-module/site-logo/index.js +1 -1
  279. package/build-module/social-links/index.js +1 -0
  280. package/build-module/social-links/index.js.map +1 -1
  281. package/build-module/spacer/controls.native.js +1 -1
  282. package/build-module/spacer/controls.native.js.map +1 -1
  283. package/build-module/template-part/edit/utils/hooks.js +5 -2
  284. package/build-module/template-part/edit/utils/hooks.js.map +1 -1
  285. package/build-style/avatar/editor-rtl.css +4 -0
  286. package/build-style/avatar/editor.css +4 -0
  287. package/build-style/avatar/style-rtl.css +79 -0
  288. package/build-style/avatar/style.css +79 -0
  289. package/build-style/editor-rtl.css +30 -9
  290. package/build-style/editor.css +30 -9
  291. package/build-style/group/editor-rtl.css +26 -0
  292. package/build-style/group/editor.css +26 -0
  293. package/build-style/heading/style-rtl.css +0 -8
  294. package/build-style/heading/style.css +0 -8
  295. package/build-style/list/style-rtl.css +1 -1
  296. package/build-style/list/style.css +1 -1
  297. package/build-style/navigation/style-rtl.css +11 -9
  298. package/build-style/navigation/style.css +11 -9
  299. package/build-style/navigation-link/style-rtl.css +3 -0
  300. package/build-style/navigation-link/style.css +3 -0
  301. package/build-style/paragraph/style-rtl.css +0 -4
  302. package/build-style/paragraph/style.css +0 -4
  303. package/build-style/quote/style-rtl.css +1 -0
  304. package/build-style/quote/style.css +1 -0
  305. package/build-style/reset-rtl.css +1 -1
  306. package/build-style/reset.css +1 -1
  307. package/build-style/style-rtl.css +20 -22
  308. package/build-style/style.css +20 -22
  309. package/build-style/template-part/editor-rtl.css +0 -9
  310. package/build-style/template-part/editor.css +0 -9
  311. package/package.json +28 -28
  312. package/src/archives/block.json +5 -1
  313. package/src/archives/edit.js +20 -2
  314. package/src/archives/index.php +4 -4
  315. package/src/audio/edit.native.js +0 -5
  316. package/src/avatar/edit.js +21 -13
  317. package/src/avatar/editor.scss +6 -0
  318. package/src/avatar/index.php +2 -2
  319. package/src/avatar/style.scss +5 -0
  320. package/src/block/edit.js +21 -11
  321. package/src/column/block.json +1 -0
  322. package/src/comment-author-avatar/block.json +3 -3
  323. package/src/comment-author-name/block.json +7 -3
  324. package/src/comment-author-name/index.php +3 -0
  325. package/src/comment-content/block.json +1 -1
  326. package/src/comment-date/block.json +7 -3
  327. package/src/comment-date/index.php +6 -1
  328. package/src/comment-edit-link/block.json +5 -1
  329. package/src/comment-edit-link/index.php +3 -0
  330. package/src/comment-reply-link/block.json +5 -1
  331. package/src/comment-reply-link/index.php +4 -1
  332. package/src/comment-template/block.json +2 -8
  333. package/src/comment-template/edit.js +12 -20
  334. package/src/comment-template/hooks.js +8 -24
  335. package/src/comment-template/index.php +1 -3
  336. package/src/comments-pagination-next/block.json +2 -9
  337. package/src/comments-pagination-numbers/block.json +2 -8
  338. package/src/comments-pagination-previous/block.json +2 -2
  339. package/src/comments-query-loop/block.json +1 -23
  340. package/src/comments-query-loop/edit/comments-inspector-controls.js +2 -83
  341. package/src/comments-query-loop/edit.js +54 -1
  342. package/src/cover/block.json +5 -0
  343. package/src/cover/edit.js +77 -29
  344. package/src/cover/index.php +85 -0
  345. package/src/cover/save.js +18 -14
  346. package/src/gallery/block.json +1 -0
  347. package/src/gallery/gap-styles.js +9 -4
  348. package/src/gallery/index.php +7 -6
  349. package/src/group/block.json +2 -4
  350. package/src/group/edit.js +4 -1
  351. package/src/group/editor.scss +31 -0
  352. package/src/group/variations.js +21 -4
  353. package/src/heading/edit.js +1 -1
  354. package/src/heading/style.scss +0 -3
  355. package/src/html/edit.js +22 -30
  356. package/src/image/edit.native.js +7 -11
  357. package/src/index.js +15 -15
  358. package/src/list/deprecated.js +2 -2
  359. package/src/list/style.scss +1 -2
  360. package/src/list/test/migrate.js +159 -0
  361. package/src/list/v2/deprecated.js +89 -0
  362. package/src/list/v2/edit.js +110 -1
  363. package/src/list/v2/index.js +2 -0
  364. package/src/list/v2/migrate.js +87 -0
  365. package/src/list-item/edit.js +69 -23
  366. package/src/list-item/hooks/index.js +3 -0
  367. package/src/list-item/hooks/use-enter.js +94 -0
  368. package/src/list-item/hooks/use-indent-list-item.js +89 -0
  369. package/src/list-item/hooks/use-outdent-list-item.js +95 -0
  370. package/src/list-item/index.js +1 -1
  371. package/src/list-item/utils.js +14 -0
  372. package/src/media-text/media-container.native.js +1 -14
  373. package/src/navigation/block.json +9 -1
  374. package/src/navigation/edit/index.js +50 -14
  375. package/src/navigation/edit/navigation-menu-delete-control.js +1 -1
  376. package/src/navigation/edit/unsaved-inner-blocks.js +57 -8
  377. package/src/navigation/index.php +6 -1
  378. package/src/navigation/style.scss +15 -13
  379. package/src/navigation/use-navigation-menu.js +4 -0
  380. package/src/navigation-link/block.json +1 -0
  381. package/src/navigation-link/edit.js +43 -35
  382. package/src/navigation-link/index.php +8 -0
  383. package/src/navigation-link/style.scss +6 -0
  384. package/src/navigation-submenu/block.json +1 -0
  385. package/src/navigation-submenu/edit.js +7 -9
  386. package/src/paragraph/style.scss +0 -5
  387. package/src/post-author/index.php +0 -1
  388. package/src/post-comment/edit.js +2 -2
  389. package/src/post-comments-form/edit.js +6 -3
  390. package/src/post-featured-image/block.json +1 -1
  391. package/src/post-template/edit.js +7 -1
  392. package/src/post-terms/edit.js +4 -1
  393. package/src/post-terms/variations.js +3 -3
  394. package/src/query-pagination/edit.js +1 -1
  395. package/src/query-pagination/index.php +9 -2
  396. package/src/query-pagination-numbers/block.json +19 -1
  397. package/src/quote/block.json +8 -0
  398. package/src/quote/index.js +6 -1
  399. package/src/quote/style.scss +1 -0
  400. package/src/quote/v2/deprecated.js +107 -0
  401. package/src/quote/v2/edit.js +136 -0
  402. package/src/quote/v2/index.js +36 -0
  403. package/src/quote/v2/save.js +26 -0
  404. package/src/quote/v2/test/migrate.js +92 -0
  405. package/src/quote/v2/transforms.js +155 -0
  406. package/src/read-more/block.json +1 -1
  407. package/src/reset.scss +1 -1
  408. package/src/rss/edit.js +3 -1
  409. package/src/rss/index.php +14 -1
  410. package/src/site-logo/block.json +1 -1
  411. package/src/site-logo/edit.js +2 -1
  412. package/src/site-logo/index.php +0 -4
  413. package/src/social-link/index.php +1 -2
  414. package/src/social-links/block.json +1 -0
  415. package/src/spacer/controls.native.js +1 -1
  416. package/src/spacer/test/__snapshots__/index.native.js.snap +31 -0
  417. package/src/spacer/test/index.native.js +180 -0
  418. package/src/style.scss +1 -0
  419. package/src/template-part/edit/utils/hooks.js +6 -1
  420. package/src/template-part/editor.scss +0 -10
  421. package/build/navigation/edit/use-list-view-modal.js +0 -73
  422. package/build/navigation/edit/use-list-view-modal.js.map +0 -1
  423. package/build-module/navigation/edit/use-list-view-modal.js +0 -63
  424. package/build-module/navigation/edit/use-list-view-modal.js.map +0 -1
  425. package/src/navigation/edit/use-list-view-modal.js +0 -72
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/template-part/edit/utils/hooks.js"],"names":["find","kebabCase","useDispatch","useSelect","store","coreStore","blockEditorStore","useMemo","serialize","__","createTemplatePartId","useAlternativeTemplateParts","area","excludedId","templateParts","isResolving","select","getEntityRecords","_isResolving","query","per_page","isLoading","filteredTemplateParts","filter","templatePart","theme","slug","useAlternativeBlockPatterns","clientId","blockNameWithArea","getBlockRootClientId","__experimentalGetPatternsByBlockTypes","rootClientId","useCreateTemplatePartFromBlocks","setAttributes","saveEntityRecord","blocks","title","record","content","undefined","useTemplatePartArea","definedAreas","__experimentalGetDefaultTemplatePartAreas","selectedArea","defaultArea","icon","label","tagName","area_tag"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAT,EAAeC,SAAf,QAAgC,QAAhC;AAEA;AACA;AACA;;AACA,SAASC,WAAT,EAAsBC,SAAtB,QAAuC,iBAAvC;AACA,SAASC,KAAK,IAAIC,SAAlB,QAAmC,sBAAnC;AACA,SAASD,KAAK,IAAIE,gBAAlB,QAA0C,yBAA1C;AACA,SAASC,OAAT,QAAwB,oBAAxB;AACA,SAASC,SAAT,QAA0B,mBAA1B;AACA,SAASC,EAAT,QAAmB,iBAAnB;AAEA;AACA;AACA;;AACA,SAASC,oBAAT,QAAqC,2BAArC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,2BAAT,CAAsCC,IAAtC,EAA4CC,UAA5C,EAAyD;AAC/D,QAAM;AAAEC,IAAAA,aAAF;AAAiBC,IAAAA;AAAjB,MAAiCZ,SAAS,CAAIa,MAAF,IAAc;AAC/D,UAAM;AAAEC,MAAAA,gBAAF;AAAoBF,MAAAA,WAAW,EAAEG;AAAjC,QAAkDF,MAAM,CAC7DX,SAD6D,CAA9D;AAGA,UAAMc,KAAK,GAAG;AAA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AAZ,IAAAA,YAAY,WAAZ,YAAAA,YAAY,CAAEE,IAAd,MAAsBD,WAAtB,aAAsBA,WAAtB,uBAAsBA,WAAW,CAAEC,IAAnC,CADA;AAENC,MAAAA,KAAK,EAAE,CAAAH,YAAY,SAAZ,IAAAA,YAAY,WAAZ,YAAAA,YAAY,CAAEG,KAAd,KAAuBtC,EAAE,CAAE,eAAF,CAF1B;AAGNuC,MAAAA,OAAO,2BAAEJ,YAAF,aAAEA,YAAF,uBAAEA,YAAY,CAAEK,QAAhB,yEAA4B;AAH7B,KAAP;AAKA,GAjBc,EAkBf,CAAErC,IAAF,CAlBe,CAAhB;AAoBA","sourcesContent":["/**\n * External dependencies\n */\nimport { find, kebabCase } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\nimport { serialize } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { createTemplatePartId } from './create-template-part-id';\n\n/**\n * Retrieves the available template parts for the given area.\n *\n * @param {string} area Template part area.\n * @param {string} excludedId Template part ID to exclude.\n *\n * @return {{ templateParts: Array, isResolving: boolean }} array of template parts.\n */\nexport function useAlternativeTemplateParts( area, excludedId ) {\n\tconst { templateParts, isResolving } = useSelect( ( select ) => {\n\t\tconst { getEntityRecords, isResolving: _isResolving } = select(\n\t\t\tcoreStore\n\t\t);\n\t\tconst query = { per_page: -1 };\n\t\treturn {\n\t\t\ttemplateParts: getEntityRecords(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template_part',\n\t\t\t\tquery\n\t\t\t),\n\t\t\tisLoading: _isResolving( 'getEntityRecords', [\n\t\t\t\t'postType',\n\t\t\t\t'wp_template_part',\n\t\t\t\tquery,\n\t\t\t] ),\n\t\t};\n\t}, [] );\n\n\tconst filteredTemplateParts = useMemo( () => {\n\t\tif ( ! templateParts ) {\n\t\t\treturn [];\n\t\t}\n\t\treturn (\n\t\t\ttemplateParts.filter(\n\t\t\t\t( templatePart ) =>\n\t\t\t\t\tcreateTemplatePartId(\n\t\t\t\t\t\ttemplatePart.theme,\n\t\t\t\t\t\ttemplatePart.slug\n\t\t\t\t\t) !== excludedId &&\n\t\t\t\t\t( ! area ||\n\t\t\t\t\t\t'uncategorized' === area ||\n\t\t\t\t\t\ttemplatePart.area === area )\n\t\t\t) || []\n\t\t);\n\t}, [ templateParts, area ] );\n\n\treturn {\n\t\ttemplateParts: filteredTemplateParts,\n\t\tisResolving,\n\t};\n}\n\n/**\n * Retrieves the available block patterns for the given area.\n *\n * @param {string} area Template part area.\n * @param {string} clientId Block Client ID. (The container of the block can impact allowed blocks).\n *\n * @return {Array} array of block patterns.\n */\nexport function useAlternativeBlockPatterns( area, clientId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst blockNameWithArea = area\n\t\t\t\t? `core/template-part/${ area }`\n\t\t\t\t: 'core/template-part';\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\t__experimentalGetPatternsByBlockTypes,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\treturn __experimentalGetPatternsByBlockTypes(\n\t\t\t\tblockNameWithArea,\n\t\t\t\trootClientId\n\t\t\t);\n\t\t},\n\t\t[ area, clientId ]\n\t);\n}\n\nexport function useCreateTemplatePartFromBlocks( area, setAttributes ) {\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\n\treturn async ( blocks = [], title = __( 'Untitled Template Part' ) ) => {\n\t\t// If we have `area` set from block attributes, means an exposed\n\t\t// block variation was inserted. So add this prop to the template\n\t\t// part entity on creation. Afterwards remove `area` value from\n\t\t// block attributes.\n\t\tconst record = {\n\t\t\ttitle,\n\t\t\tslug: kebabCase( title ),\n\t\t\tcontent: serialize( blocks ),\n\t\t\t// `area` is filterable on the server and defaults to `UNCATEGORIZED`\n\t\t\t// if provided value is not allowed.\n\t\t\tarea,\n\t\t};\n\t\tconst templatePart = await saveEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template_part',\n\t\t\trecord\n\t\t);\n\t\tsetAttributes( {\n\t\t\tslug: templatePart.slug,\n\t\t\ttheme: templatePart.theme,\n\t\t\tarea: undefined,\n\t\t} );\n\t};\n}\n\n/**\n * Retrieves the template part area object.\n *\n * @param {string} area Template part area identifier.\n *\n * @return {{icon: Object, label: string, tagName: string}} Template Part area.\n */\nexport function useTemplatePartArea( area ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\t// FIXME: @wordpress/block-library should not depend on @wordpress/editor.\n\t\t\t// Blocks can be loaded into a *non-post* block editor.\n\t\t\t// eslint-disable-next-line @wordpress/data-no-store-string-literals\n\t\t\tconst definedAreas = select(\n\t\t\t\t'core/editor'\n\t\t\t).__experimentalGetDefaultTemplatePartAreas();\n\n\t\t\tconst selectedArea = find( definedAreas, { area } );\n\t\t\tconst defaultArea = find( definedAreas, { area: 'uncategorized' } );\n\n\t\t\treturn {\n\t\t\t\ticon: selectedArea?.icon || defaultArea?.icon,\n\t\t\t\tlabel: selectedArea?.label || __( 'Template Part' ),\n\t\t\t\ttagName: selectedArea?.area_tag ?? 'div',\n\t\t\t};\n\t\t},\n\t\t[ area ]\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/template-part/edit/utils/hooks.js"],"names":["find","kebabCase","useDispatch","useSelect","store","coreStore","blockEditorStore","useMemo","serialize","__","createTemplatePartId","useAlternativeTemplateParts","area","excludedId","templateParts","isResolving","select","getEntityRecords","_isResolving","query","per_page","isLoading","filteredTemplateParts","filter","templatePart","theme","slug","useAlternativeBlockPatterns","clientId","blockNameWithArea","getBlockRootClientId","__experimentalGetPatternsByBlockTypes","rootClientId","useCreateTemplatePartFromBlocks","setAttributes","saveEntityRecord","blocks","title","cleanSlug","replace","record","content","undefined","useTemplatePartArea","definedAreas","__experimentalGetD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CAAEvC,IAAF,CAlBe,CAAhB;AAoBA","sourcesContent":["/**\n * External dependencies\n */\nimport { find, kebabCase } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\nimport { serialize } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { createTemplatePartId } from './create-template-part-id';\n\n/**\n * Retrieves the available template parts for the given area.\n *\n * @param {string} area Template part area.\n * @param {string} excludedId Template part ID to exclude.\n *\n * @return {{ templateParts: Array, isResolving: boolean }} array of template parts.\n */\nexport function useAlternativeTemplateParts( area, excludedId ) {\n\tconst { templateParts, isResolving } = useSelect( ( select ) => {\n\t\tconst { getEntityRecords, isResolving: _isResolving } = select(\n\t\t\tcoreStore\n\t\t);\n\t\tconst query = { per_page: -1 };\n\t\treturn {\n\t\t\ttemplateParts: getEntityRecords(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template_part',\n\t\t\t\tquery\n\t\t\t),\n\t\t\tisLoading: _isResolving( 'getEntityRecords', [\n\t\t\t\t'postType',\n\t\t\t\t'wp_template_part',\n\t\t\t\tquery,\n\t\t\t] ),\n\t\t};\n\t}, [] );\n\n\tconst filteredTemplateParts = useMemo( () => {\n\t\tif ( ! templateParts ) {\n\t\t\treturn [];\n\t\t}\n\t\treturn (\n\t\t\ttemplateParts.filter(\n\t\t\t\t( templatePart ) =>\n\t\t\t\t\tcreateTemplatePartId(\n\t\t\t\t\t\ttemplatePart.theme,\n\t\t\t\t\t\ttemplatePart.slug\n\t\t\t\t\t) !== excludedId &&\n\t\t\t\t\t( ! area ||\n\t\t\t\t\t\t'uncategorized' === area ||\n\t\t\t\t\t\ttemplatePart.area === area )\n\t\t\t) || []\n\t\t);\n\t}, [ templateParts, area ] );\n\n\treturn {\n\t\ttemplateParts: filteredTemplateParts,\n\t\tisResolving,\n\t};\n}\n\n/**\n * Retrieves the available block patterns for the given area.\n *\n * @param {string} area Template part area.\n * @param {string} clientId Block Client ID. (The container of the block can impact allowed blocks).\n *\n * @return {Array} array of block patterns.\n */\nexport function useAlternativeBlockPatterns( area, clientId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst blockNameWithArea = area\n\t\t\t\t? `core/template-part/${ area }`\n\t\t\t\t: 'core/template-part';\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\t__experimentalGetPatternsByBlockTypes,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\treturn __experimentalGetPatternsByBlockTypes(\n\t\t\t\tblockNameWithArea,\n\t\t\t\trootClientId\n\t\t\t);\n\t\t},\n\t\t[ area, clientId ]\n\t);\n}\n\nexport function useCreateTemplatePartFromBlocks( area, setAttributes ) {\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\n\treturn async ( blocks = [], title = __( 'Untitled Template Part' ) ) => {\n\t\t// Currently template parts only allow latin chars.\n\t\t// Fallback slug will receive suffix by default.\n\t\tconst cleanSlug =\n\t\t\tkebabCase( title ).replace( /[^\\w-]+/g, '' ) || 'wp-custom-part';\n\n\t\t// If we have `area` set from block attributes, means an exposed\n\t\t// block variation was inserted. So add this prop to the template\n\t\t// part entity on creation. Afterwards remove `area` value from\n\t\t// block attributes.\n\t\tconst record = {\n\t\t\ttitle,\n\t\t\tslug: cleanSlug,\n\t\t\tcontent: serialize( blocks ),\n\t\t\t// `area` is filterable on the server and defaults to `UNCATEGORIZED`\n\t\t\t// if provided value is not allowed.\n\t\t\tarea,\n\t\t};\n\t\tconst templatePart = await saveEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template_part',\n\t\t\trecord\n\t\t);\n\t\tsetAttributes( {\n\t\t\tslug: templatePart.slug,\n\t\t\ttheme: templatePart.theme,\n\t\t\tarea: undefined,\n\t\t} );\n\t};\n}\n\n/**\n * Retrieves the template part area object.\n *\n * @param {string} area Template part area identifier.\n *\n * @return {{icon: Object, label: string, tagName: string}} Template Part area.\n */\nexport function useTemplatePartArea( area ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\t// FIXME: @wordpress/block-library should not depend on @wordpress/editor.\n\t\t\t// Blocks can be loaded into a *non-post* block editor.\n\t\t\t// eslint-disable-next-line @wordpress/data-no-store-string-literals\n\t\t\tconst definedAreas = select(\n\t\t\t\t'core/editor'\n\t\t\t).__experimentalGetDefaultTemplatePartAreas();\n\n\t\t\tconst selectedArea = find( definedAreas, { area } );\n\t\t\tconst defaultArea = find( definedAreas, { area: 'uncategorized' } );\n\n\t\t\treturn {\n\t\t\t\ticon: selectedArea?.icon || defaultArea?.icon,\n\t\t\t\tlabel: selectedArea?.label || __( 'Template Part' ),\n\t\t\t\ttagName: selectedArea?.area_tag ?? 'div',\n\t\t\t};\n\t\t},\n\t\t[ area ]\n\t);\n}\n"]}
@@ -76,4 +76,8 @@
76
76
  */
77
77
  .wp-block-avatar__image img {
78
78
  width: 100%;
79
+ }
80
+
81
+ .wp-block-avatar.aligncenter .components-resizable-box__container {
82
+ margin: 0 auto;
79
83
  }
@@ -76,4 +76,8 @@
76
76
  */
77
77
  .wp-block-avatar__image img {
78
78
  width: 100%;
79
+ }
80
+
81
+ .wp-block-avatar.aligncenter .components-resizable-box__container {
82
+ margin: 0 auto;
79
83
  }
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Colors
3
+ */
4
+ /**
5
+ * Breakpoints & Media Queries
6
+ */
7
+ /**
8
+ * SCSS Variables.
9
+ *
10
+ * Please use variables from this sheet to ensure consistency across the UI.
11
+ * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
12
+ * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
13
+ */
14
+ /**
15
+ * Colors
16
+ */
17
+ /**
18
+ * Fonts & basic variables.
19
+ */
20
+ /**
21
+ * Grid System.
22
+ * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
23
+ */
24
+ /**
25
+ * Dimensions.
26
+ */
27
+ /**
28
+ * Shadows.
29
+ */
30
+ /**
31
+ * Editor widths.
32
+ */
33
+ /**
34
+ * Block & Editor UI.
35
+ */
36
+ /**
37
+ * Block paddings.
38
+ */
39
+ /**
40
+ * React Native specific.
41
+ * These variables do not appear to be used anywhere else.
42
+ */
43
+ /**
44
+ * Converts a hex value into the rgb equivalent.
45
+ *
46
+ * @param {string} hex - the hexadecimal value to convert
47
+ * @return {string} comma separated rgb values
48
+ */
49
+ /**
50
+ * Breakpoint mixins
51
+ */
52
+ /**
53
+ * Long content fade mixin
54
+ *
55
+ * Creates a fading overlay to signify that the content is longer
56
+ * than the space allows.
57
+ */
58
+ /**
59
+ * Focus styles.
60
+ */
61
+ /**
62
+ * Applies editor left position to the selector passed as argument
63
+ */
64
+ /**
65
+ * Styles that are reused verbatim in a few places
66
+ */
67
+ /**
68
+ * Allows users to opt-out of animations via OS-level preferences.
69
+ */
70
+ /**
71
+ * Reset default styles for JavaScript UI based pages.
72
+ * This is a WP-admin agnostic reset
73
+ */
74
+ /**
75
+ * Reset the WP Admin page styles for Gutenberg-like pages.
76
+ */
77
+ .wp-block-avatar.aligncenter {
78
+ text-align: center;
79
+ }
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Colors
3
+ */
4
+ /**
5
+ * Breakpoints & Media Queries
6
+ */
7
+ /**
8
+ * SCSS Variables.
9
+ *
10
+ * Please use variables from this sheet to ensure consistency across the UI.
11
+ * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
12
+ * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
13
+ */
14
+ /**
15
+ * Colors
16
+ */
17
+ /**
18
+ * Fonts & basic variables.
19
+ */
20
+ /**
21
+ * Grid System.
22
+ * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
23
+ */
24
+ /**
25
+ * Dimensions.
26
+ */
27
+ /**
28
+ * Shadows.
29
+ */
30
+ /**
31
+ * Editor widths.
32
+ */
33
+ /**
34
+ * Block & Editor UI.
35
+ */
36
+ /**
37
+ * Block paddings.
38
+ */
39
+ /**
40
+ * React Native specific.
41
+ * These variables do not appear to be used anywhere else.
42
+ */
43
+ /**
44
+ * Converts a hex value into the rgb equivalent.
45
+ *
46
+ * @param {string} hex - the hexadecimal value to convert
47
+ * @return {string} comma separated rgb values
48
+ */
49
+ /**
50
+ * Breakpoint mixins
51
+ */
52
+ /**
53
+ * Long content fade mixin
54
+ *
55
+ * Creates a fading overlay to signify that the content is longer
56
+ * than the space allows.
57
+ */
58
+ /**
59
+ * Focus styles.
60
+ */
61
+ /**
62
+ * Applies editor left position to the selector passed as argument
63
+ */
64
+ /**
65
+ * Styles that are reused verbatim in a few places
66
+ */
67
+ /**
68
+ * Allows users to opt-out of animations via OS-level preferences.
69
+ */
70
+ /**
71
+ * Reset default styles for JavaScript UI based pages.
72
+ * This is a WP-admin agnostic reset
73
+ */
74
+ /**
75
+ * Reset the WP Admin page styles for Gutenberg-like pages.
76
+ */
77
+ .wp-block-avatar.aligncenter {
78
+ text-align: center;
79
+ }
@@ -98,6 +98,10 @@ ul.wp-block-archives {
98
98
  width: 100%;
99
99
  }
100
100
 
101
+ .wp-block-avatar.aligncenter .components-resizable-box__container {
102
+ margin: 0 auto;
103
+ }
104
+
101
105
  .edit-post-visual-editor .block-library-block__reusable-block-container .is-root-container {
102
106
  padding-right: 0;
103
107
  padding-left: 0;
@@ -937,6 +941,32 @@ figure.wp-block-gallery .components-spinner {
937
941
  margin-bottom: 18px;
938
942
  }
939
943
 
944
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child {
945
+ gap: inherit;
946
+ pointer-events: none;
947
+ }
948
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child,
949
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child .block-editor-default-block-appender__content,
950
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child .block-editor-inserter {
951
+ display: inherit;
952
+ width: 100%;
953
+ flex-direction: inherit;
954
+ flex: 1;
955
+ }
956
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child::after {
957
+ content: "";
958
+ display: flex;
959
+ border: 1px dashed currentColor;
960
+ opacity: 0.4;
961
+ border-radius: 2px;
962
+ flex: 1;
963
+ pointer-events: none;
964
+ min-height: 48px;
965
+ }
966
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child .block-editor-inserter {
967
+ pointer-events: all;
968
+ }
969
+
940
970
  .block-library-html__edit .block-library-html__preview-overlay {
941
971
  position: absolute;
942
972
  width: 100%;
@@ -2361,15 +2391,6 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
2361
2391
  }
2362
2392
  }
2363
2393
 
2364
- .block-library-template-part__selection-content .block-editor-block-patterns-list {
2365
- display: grid;
2366
- grid-template-columns: 1fr 1fr;
2367
- grid-gap: 8px;
2368
- }
2369
- .block-library-template-part__selection-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item {
2370
- margin-bottom: 0;
2371
- }
2372
-
2373
2394
  .wp-block-text-columns .block-editor-rich-text__editable:focus {
2374
2395
  outline: 1px solid #ddd;
2375
2396
  }
@@ -98,6 +98,10 @@ ul.wp-block-archives {
98
98
  width: 100%;
99
99
  }
100
100
 
101
+ .wp-block-avatar.aligncenter .components-resizable-box__container {
102
+ margin: 0 auto;
103
+ }
104
+
101
105
  .edit-post-visual-editor .block-library-block__reusable-block-container .is-root-container {
102
106
  padding-left: 0;
103
107
  padding-right: 0;
@@ -945,6 +949,32 @@ figure.wp-block-gallery .components-spinner {
945
949
  margin-bottom: 18px;
946
950
  }
947
951
 
952
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child {
953
+ gap: inherit;
954
+ pointer-events: none;
955
+ }
956
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child,
957
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child .block-editor-default-block-appender__content,
958
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child .block-editor-inserter {
959
+ display: inherit;
960
+ width: 100%;
961
+ flex-direction: inherit;
962
+ flex: 1;
963
+ }
964
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child::after {
965
+ content: "";
966
+ display: flex;
967
+ border: 1px dashed currentColor;
968
+ opacity: 0.4;
969
+ border-radius: 2px;
970
+ flex: 1;
971
+ pointer-events: none;
972
+ min-height: 48px;
973
+ }
974
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child .block-editor-inserter {
975
+ pointer-events: all;
976
+ }
977
+
948
978
  .block-library-html__edit .block-library-html__preview-overlay {
949
979
  position: absolute;
950
980
  width: 100%;
@@ -2369,15 +2399,6 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
2369
2399
  }
2370
2400
  }
2371
2401
 
2372
- .block-library-template-part__selection-content .block-editor-block-patterns-list {
2373
- display: grid;
2374
- grid-template-columns: 1fr 1fr;
2375
- grid-gap: 8px;
2376
- }
2377
- .block-library-template-part__selection-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item {
2378
- margin-bottom: 0;
2379
- }
2380
-
2381
2402
  .wp-block-text-columns .block-editor-rich-text__editable:focus {
2382
2403
  outline: 1px solid #ddd;
2383
2404
  }
@@ -89,4 +89,30 @@
89
89
  [data-type="core/group"].is-selected .has-background .block-list-appender {
90
90
  margin-top: 18px;
91
91
  margin-bottom: 18px;
92
+ }
93
+
94
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child {
95
+ gap: inherit;
96
+ pointer-events: none;
97
+ }
98
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child,
99
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child .block-editor-default-block-appender__content,
100
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child .block-editor-inserter {
101
+ display: inherit;
102
+ width: 100%;
103
+ flex-direction: inherit;
104
+ flex: 1;
105
+ }
106
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child::after {
107
+ content: "";
108
+ display: flex;
109
+ border: 1px dashed currentColor;
110
+ opacity: 0.4;
111
+ border-radius: 2px;
112
+ flex: 1;
113
+ pointer-events: none;
114
+ min-height: 48px;
115
+ }
116
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child .block-editor-inserter {
117
+ pointer-events: all;
92
118
  }
@@ -89,4 +89,30 @@
89
89
  [data-type="core/group"].is-selected .has-background .block-list-appender {
90
90
  margin-top: 18px;
91
91
  margin-bottom: 18px;
92
+ }
93
+
94
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child {
95
+ gap: inherit;
96
+ pointer-events: none;
97
+ }
98
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child,
99
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child .block-editor-default-block-appender__content,
100
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child .block-editor-inserter {
101
+ display: inherit;
102
+ width: 100%;
103
+ flex-direction: inherit;
104
+ flex: 1;
105
+ }
106
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child::after {
107
+ content: "";
108
+ display: flex;
109
+ border: 1px dashed currentColor;
110
+ opacity: 0.4;
111
+ border-radius: 2px;
112
+ flex: 1;
113
+ pointer-events: none;
114
+ min-height: 48px;
115
+ }
116
+ .is-layout-flex.block-editor-block-list__block .block-list-appender:only-child .block-editor-inserter {
117
+ pointer-events: all;
92
118
  }
@@ -74,14 +74,6 @@
74
74
  /**
75
75
  * Reset the WP Admin page styles for Gutenberg-like pages.
76
76
  */
77
- h1,
78
- h2,
79
- h3,
80
- h4,
81
- h5,
82
- h6 {
83
- overflow-wrap: break-word;
84
- }
85
77
  h1.has-background,
86
78
  h2.has-background,
87
79
  h3.has-background,
@@ -74,14 +74,6 @@
74
74
  /**
75
75
  * Reset the WP Admin page styles for Gutenberg-like pages.
76
76
  */
77
- h1,
78
- h2,
79
- h3,
80
- h4,
81
- h5,
82
- h6 {
83
- overflow-wrap: break-word;
84
- }
85
77
  h1.has-background,
86
78
  h2.has-background,
87
79
  h3.has-background,
@@ -76,7 +76,7 @@
76
76
  */
77
77
  ol,
78
78
  ul {
79
- overflow-wrap: break-word;
79
+ box-sizing: border-box;
80
80
  }
81
81
  ol.has-background,
82
82
  ul.has-background {
@@ -76,7 +76,7 @@
76
76
  */
77
77
  ol,
78
78
  ul {
79
- overflow-wrap: break-word;
79
+ box-sizing: border-box;
80
80
  }
81
81
  ol.has-background,
82
82
  ul.has-background {
@@ -106,20 +106,22 @@
106
106
  display: block;
107
107
  padding: 0;
108
108
  }
109
- .wp-block-navigation[style*=text-decoration] .wp-block-navigation-item,
110
- .wp-block-navigation[style*=text-decoration] .wp-block-navigation__submenu-container {
111
- text-decoration: inherit;
109
+ .wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content {
110
+ text-decoration: underline;
112
111
  }
113
- .wp-block-navigation[style*=text-decoration] a {
114
- text-decoration: inherit;
112
+ .wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content:focus, .wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content:active {
113
+ text-decoration: underline;
115
114
  }
116
- .wp-block-navigation[style*=text-decoration] a:focus, .wp-block-navigation[style*=text-decoration] a:active {
117
- text-decoration: inherit;
115
+ .wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content {
116
+ text-decoration: line-through;
118
117
  }
119
- .wp-block-navigation:not([style*=text-decoration]) a {
118
+ .wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:focus, .wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:active {
119
+ text-decoration: line-through;
120
+ }
121
+ .wp-block-navigation:where(:not([class*="has-text-decoration"])) a {
120
122
  text-decoration: none;
121
123
  }
122
- .wp-block-navigation:not([style*=text-decoration]) a:focus, .wp-block-navigation:not([style*=text-decoration]) a:active {
124
+ .wp-block-navigation:where(:not([class*="has-text-decoration"])) a:focus, .wp-block-navigation:where(:not([class*="has-text-decoration"])) a:active {
123
125
  text-decoration: none;
124
126
  }
125
127
  .wp-block-navigation .wp-block-navigation__submenu-icon {
@@ -106,20 +106,22 @@
106
106
  display: block;
107
107
  padding: 0;
108
108
  }
109
- .wp-block-navigation[style*=text-decoration] .wp-block-navigation-item,
110
- .wp-block-navigation[style*=text-decoration] .wp-block-navigation__submenu-container {
111
- text-decoration: inherit;
109
+ .wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content {
110
+ text-decoration: underline;
112
111
  }
113
- .wp-block-navigation[style*=text-decoration] a {
114
- text-decoration: inherit;
112
+ .wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content:focus, .wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content:active {
113
+ text-decoration: underline;
115
114
  }
116
- .wp-block-navigation[style*=text-decoration] a:focus, .wp-block-navigation[style*=text-decoration] a:active {
117
- text-decoration: inherit;
115
+ .wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content {
116
+ text-decoration: line-through;
118
117
  }
119
- .wp-block-navigation:not([style*=text-decoration]) a {
118
+ .wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:focus, .wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:active {
119
+ text-decoration: line-through;
120
+ }
121
+ .wp-block-navigation:where(:not([class*="has-text-decoration"])) a {
120
122
  text-decoration: none;
121
123
  }
122
- .wp-block-navigation:not([style*=text-decoration]) a:focus, .wp-block-navigation:not([style*=text-decoration]) a:active {
124
+ .wp-block-navigation:where(:not([class*="has-text-decoration"])) a:focus, .wp-block-navigation:where(:not([class*="has-text-decoration"])) a:active {
123
125
  text-decoration: none;
124
126
  }
125
127
  .wp-block-navigation .wp-block-navigation__submenu-icon {
@@ -77,4 +77,7 @@
77
77
  .wp-block-navigation .wp-block-navigation-item__label {
78
78
  word-break: normal;
79
79
  overflow-wrap: break-word;
80
+ }
81
+ .wp-block-navigation .wp-block-navigation-item__description {
82
+ display: none;
80
83
  }
@@ -77,4 +77,7 @@
77
77
  .wp-block-navigation .wp-block-navigation-item__label {
78
78
  word-break: normal;
79
79
  overflow-wrap: break-word;
80
+ }
81
+ .wp-block-navigation .wp-block-navigation-item__description {
82
+ display: none;
80
83
  }
@@ -100,10 +100,6 @@
100
100
  font-style: normal;
101
101
  }
102
102
 
103
- p {
104
- overflow-wrap: break-word;
105
- }
106
-
107
103
  p.has-drop-cap.has-background {
108
104
  overflow: hidden;
109
105
  }
@@ -100,10 +100,6 @@
100
100
  font-style: normal;
101
101
  }
102
102
 
103
- p {
104
- overflow-wrap: break-word;
105
- }
106
-
107
103
  p.has-drop-cap.has-background {
108
104
  overflow: hidden;
109
105
  }
@@ -75,6 +75,7 @@
75
75
  * Reset the WP Admin page styles for Gutenberg-like pages.
76
76
  */
77
77
  .wp-block-quote {
78
+ box-sizing: border-box;
78
79
  overflow-wrap: break-word;
79
80
  }
80
81
  .wp-block-quote.is-style-large:not(.is-style-plain), .wp-block-quote.is-large:not(.is-style-plain) {
@@ -75,6 +75,7 @@
75
75
  * Reset the WP Admin page styles for Gutenberg-like pages.
76
76
  */
77
77
  .wp-block-quote {
78
+ box-sizing: border-box;
78
79
  overflow-wrap: break-word;
79
80
  }
80
81
  .wp-block-quote.is-style-large:not(.is-style-plain), .wp-block-quote.is-large:not(.is-style-plain) {
@@ -121,7 +121,7 @@ html :where(.editor-styles-wrapper) ol {
121
121
  margin: revert;
122
122
  padding: revert;
123
123
  list-style-type: revert;
124
- box-sizing: revert;
124
+ box-sizing: border-box;
125
125
  }
126
126
  html :where(.editor-styles-wrapper) ul ul,
127
127
  html :where(.editor-styles-wrapper) ul ol,
@@ -121,7 +121,7 @@ html :where(.editor-styles-wrapper) ol {
121
121
  margin: revert;
122
122
  padding: revert;
123
123
  list-style-type: revert;
124
- box-sizing: revert;
124
+ box-sizing: border-box;
125
125
  }
126
126
  html :where(.editor-styles-wrapper) ul ul,
127
127
  html :where(.editor-styles-wrapper) ul ol,