@wordpress/block-library 9.10.0 → 9.12.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 (307) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +10 -5
  3. package/build/archives/index.js +6 -0
  4. package/build/archives/index.js.map +1 -1
  5. package/build/avatar/hooks.js +2 -3
  6. package/build/avatar/hooks.js.map +1 -1
  7. package/build/button/get-updated-link-attributes.js +1 -1
  8. package/build/button/get-updated-link-attributes.js.map +1 -1
  9. package/build/button/index.js +1 -1
  10. package/build/button/index.js.map +1 -1
  11. package/build/comments/index.js +12 -0
  12. package/build/comments/index.js.map +1 -1
  13. package/build/cover/constants.js +8 -0
  14. package/build/cover/constants.js.map +1 -0
  15. package/build/cover/deprecated.js +140 -4
  16. package/build/cover/deprecated.js.map +1 -1
  17. package/build/cover/edit/block-controls.js +1 -1
  18. package/build/cover/edit/block-controls.js.map +1 -1
  19. package/build/cover/edit/cover-placeholder.js +1 -2
  20. package/build/cover/edit/cover-placeholder.js.map +1 -1
  21. package/build/cover/edit/index.js +42 -21
  22. package/build/cover/edit/index.js.map +1 -1
  23. package/build/cover/edit/inspector-controls.js +40 -2
  24. package/build/cover/edit/inspector-controls.js.map +1 -1
  25. package/build/cover/index.js +3 -0
  26. package/build/cover/index.js.map +1 -1
  27. package/build/cover/save.js +16 -14
  28. package/build/cover/save.js.map +1 -1
  29. package/build/details/index.js +1 -0
  30. package/build/details/index.js.map +1 -1
  31. package/build/file/edit.js +2 -3
  32. package/build/file/edit.js.map +1 -1
  33. package/build/gallery/constants.js +2 -1
  34. package/build/gallery/constants.js.map +1 -1
  35. package/build/gallery/edit.js +12 -3
  36. package/build/gallery/edit.js.map +1 -1
  37. package/build/gallery/utils.js +26 -5
  38. package/build/gallery/utils.js.map +1 -1
  39. package/build/html/edit.js +5 -1
  40. package/build/html/edit.js.map +1 -1
  41. package/build/html/preview.js +2 -2
  42. package/build/html/preview.js.map +1 -1
  43. package/build/image/edit.js +1 -1
  44. package/build/image/edit.js.map +1 -1
  45. package/build/image/image.js +144 -78
  46. package/build/image/image.js.map +1 -1
  47. package/build/image/index.js +1 -1
  48. package/build/latest-posts/edit.js +3 -9
  49. package/build/latest-posts/edit.js.map +1 -1
  50. package/build/lock-unlock.js.map +1 -1
  51. package/build/navigation/edit/menu-inspector-controls.js +1 -1
  52. package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
  53. package/build/navigation/edit/navigation-menu-selector.js +2 -2
  54. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  55. package/build/paragraph/edit.js +2 -2
  56. package/build/paragraph/edit.js.map +1 -1
  57. package/build/post-content/index.js +13 -0
  58. package/build/post-content/index.js.map +1 -1
  59. package/build/post-featured-image/edit.js +1 -1
  60. package/build/post-featured-image/edit.js.map +1 -1
  61. package/build/post-template/edit.js +11 -0
  62. package/build/post-template/edit.js.map +1 -1
  63. package/build/post-template/index.js +1 -1
  64. package/build/post-time-to-read/edit.js +2 -2
  65. package/build/post-time-to-read/edit.js.map +1 -1
  66. package/build/query/edit/inspector-controls/index.js +2 -2
  67. package/build/query/edit/inspector-controls/index.js.map +1 -1
  68. package/build/query/edit/inspector-controls/order-control.js +2 -2
  69. package/build/query/edit/inspector-controls/order-control.js.map +1 -1
  70. package/build/query/edit/pattern-selection-modal.js +0 -3
  71. package/build/query/edit/pattern-selection-modal.js.map +1 -1
  72. package/build/query/edit/query-content.js +10 -12
  73. package/build/query/edit/query-content.js.map +1 -1
  74. package/build/query/index.js +1 -1
  75. package/build/query/utils.js +32 -1
  76. package/build/query/utils.js.map +1 -1
  77. package/build/query-title/edit.js +1 -1
  78. package/build/query-title/edit.js.map +1 -1
  79. package/build/search/edit.js +19 -14
  80. package/build/search/edit.js.map +1 -1
  81. package/build/separator/transforms.js +12 -0
  82. package/build/separator/transforms.js.map +1 -1
  83. package/build/social-links/edit.js +0 -1
  84. package/build/social-links/edit.js.map +1 -1
  85. package/build/spacer/index.js +2 -0
  86. package/build/spacer/index.js.map +1 -1
  87. package/build/spacer/transforms.js +27 -0
  88. package/build/spacer/transforms.js.map +1 -0
  89. package/build/table/edit.js +0 -1
  90. package/build/table/edit.js.map +1 -1
  91. package/build/table-of-contents/edit.js +2 -7
  92. package/build/table-of-contents/edit.js.map +1 -1
  93. package/build/template-part/edit/index.js +2 -5
  94. package/build/template-part/edit/index.js.map +1 -1
  95. package/build/template-part/edit/selection-modal.js +0 -3
  96. package/build/template-part/edit/selection-modal.js.map +1 -1
  97. package/build/video/edit.js +1 -1
  98. package/build/video/edit.js.map +1 -1
  99. package/build/video/tracks-editor.js +1 -3
  100. package/build/video/tracks-editor.js.map +1 -1
  101. package/build-module/archives/index.js +6 -0
  102. package/build-module/archives/index.js.map +1 -1
  103. package/build-module/avatar/hooks.js +2 -3
  104. package/build-module/avatar/hooks.js.map +1 -1
  105. package/build-module/button/get-updated-link-attributes.js +1 -1
  106. package/build-module/button/get-updated-link-attributes.js.map +1 -1
  107. package/build-module/button/index.js +1 -1
  108. package/build-module/button/index.js.map +1 -1
  109. package/build-module/comments/index.js +12 -0
  110. package/build-module/comments/index.js.map +1 -1
  111. package/build-module/cover/constants.js +2 -0
  112. package/build-module/cover/constants.js.map +1 -0
  113. package/build-module/cover/deprecated.js +140 -4
  114. package/build-module/cover/deprecated.js.map +1 -1
  115. package/build-module/cover/edit/block-controls.js +1 -1
  116. package/build-module/cover/edit/block-controls.js.map +1 -1
  117. package/build-module/cover/edit/cover-placeholder.js +1 -2
  118. package/build-module/cover/edit/cover-placeholder.js.map +1 -1
  119. package/build-module/cover/edit/index.js +42 -21
  120. package/build-module/cover/edit/index.js.map +1 -1
  121. package/build-module/cover/edit/inspector-controls.js +41 -3
  122. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  123. package/build-module/cover/index.js +3 -0
  124. package/build-module/cover/index.js.map +1 -1
  125. package/build-module/cover/save.js +16 -14
  126. package/build-module/cover/save.js.map +1 -1
  127. package/build-module/details/index.js +1 -0
  128. package/build-module/details/index.js.map +1 -1
  129. package/build-module/file/edit.js +2 -3
  130. package/build-module/file/edit.js.map +1 -1
  131. package/build-module/gallery/constants.js +1 -0
  132. package/build-module/gallery/constants.js.map +1 -1
  133. package/build-module/gallery/edit.js +15 -6
  134. package/build-module/gallery/edit.js.map +1 -1
  135. package/build-module/gallery/utils.js +27 -6
  136. package/build-module/gallery/utils.js.map +1 -1
  137. package/build-module/html/edit.js +6 -2
  138. package/build-module/html/edit.js.map +1 -1
  139. package/build-module/html/preview.js +2 -2
  140. package/build-module/html/preview.js.map +1 -1
  141. package/build-module/image/edit.js +1 -1
  142. package/build-module/image/edit.js.map +1 -1
  143. package/build-module/image/image.js +149 -83
  144. package/build-module/image/image.js.map +1 -1
  145. package/build-module/image/index.js +1 -1
  146. package/build-module/latest-posts/edit.js +3 -9
  147. package/build-module/latest-posts/edit.js.map +1 -1
  148. package/build-module/lock-unlock.js.map +1 -1
  149. package/build-module/navigation/edit/menu-inspector-controls.js +1 -3
  150. package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
  151. package/build-module/navigation/edit/navigation-menu-selector.js +2 -2
  152. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  153. package/build-module/paragraph/edit.js +2 -2
  154. package/build-module/paragraph/edit.js.map +1 -1
  155. package/build-module/post-content/index.js +13 -0
  156. package/build-module/post-content/index.js.map +1 -1
  157. package/build-module/post-featured-image/edit.js +1 -1
  158. package/build-module/post-featured-image/edit.js.map +1 -1
  159. package/build-module/post-template/edit.js +11 -0
  160. package/build-module/post-template/edit.js.map +1 -1
  161. package/build-module/post-template/index.js +1 -1
  162. package/build-module/post-time-to-read/edit.js +2 -2
  163. package/build-module/post-time-to-read/edit.js.map +1 -1
  164. package/build-module/query/edit/inspector-controls/index.js +2 -2
  165. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  166. package/build-module/query/edit/inspector-controls/order-control.js +2 -2
  167. package/build-module/query/edit/inspector-controls/order-control.js.map +1 -1
  168. package/build-module/query/edit/pattern-selection-modal.js +0 -3
  169. package/build-module/query/edit/pattern-selection-modal.js.map +1 -1
  170. package/build-module/query/edit/query-content.js +10 -12
  171. package/build-module/query/edit/query-content.js.map +1 -1
  172. package/build-module/query/index.js +1 -1
  173. package/build-module/query/utils.js +29 -0
  174. package/build-module/query/utils.js.map +1 -1
  175. package/build-module/query-title/edit.js +2 -2
  176. package/build-module/query-title/edit.js.map +1 -1
  177. package/build-module/search/edit.js +20 -15
  178. package/build-module/search/edit.js.map +1 -1
  179. package/build-module/separator/transforms.js +12 -0
  180. package/build-module/separator/transforms.js.map +1 -1
  181. package/build-module/social-links/edit.js +0 -1
  182. package/build-module/social-links/edit.js.map +1 -1
  183. package/build-module/spacer/index.js +2 -0
  184. package/build-module/spacer/index.js.map +1 -1
  185. package/build-module/spacer/transforms.js +20 -0
  186. package/build-module/spacer/transforms.js.map +1 -0
  187. package/build-module/table/edit.js +0 -1
  188. package/build-module/table/edit.js.map +1 -1
  189. package/build-module/table-of-contents/edit.js +2 -7
  190. package/build-module/table-of-contents/edit.js.map +1 -1
  191. package/build-module/template-part/edit/index.js +2 -5
  192. package/build-module/template-part/edit/index.js.map +1 -1
  193. package/build-module/template-part/edit/selection-modal.js +0 -3
  194. package/build-module/template-part/edit/selection-modal.js.map +1 -1
  195. package/build-module/video/edit.js +1 -1
  196. package/build-module/video/edit.js.map +1 -1
  197. package/build-module/video/tracks-editor.js +2 -4
  198. package/build-module/video/tracks-editor.js.map +1 -1
  199. package/build-style/archives/editor-rtl.css +5 -0
  200. package/build-style/archives/editor.css +5 -0
  201. package/build-style/button/style-rtl.css +3 -0
  202. package/build-style/button/style.css +3 -0
  203. package/build-style/comments/editor-rtl.css +4 -0
  204. package/build-style/comments/editor.css +4 -0
  205. package/build-style/comments/style-rtl.css +4 -0
  206. package/build-style/comments/style.css +4 -0
  207. package/build-style/cover/editor-rtl.css +3 -5
  208. package/build-style/cover/editor.css +3 -5
  209. package/build-style/cover/style-rtl.css +19 -10
  210. package/build-style/cover/style.css +19 -10
  211. package/build-style/editor-rtl.css +17 -12
  212. package/build-style/editor.css +17 -12
  213. package/build-style/image/editor-rtl.css +4 -0
  214. package/build-style/image/editor.css +4 -0
  215. package/build-style/latest-posts/editor-rtl.css +0 -7
  216. package/build-style/latest-posts/editor.css +0 -7
  217. package/build-style/media-text/style-rtl.css +1 -1
  218. package/build-style/media-text/style.css +1 -1
  219. package/build-style/navigation/editor-rtl.css +1 -0
  220. package/build-style/navigation/editor.css +1 -0
  221. package/build-style/style-rtl.css +27 -11
  222. package/build-style/style.css +27 -11
  223. package/build-types/lock-unlock.d.ts +2 -0
  224. package/build-types/lock-unlock.d.ts.map +1 -0
  225. package/package.json +41 -40
  226. package/src/archives/block.json +6 -0
  227. package/src/archives/editor.scss +8 -0
  228. package/src/avatar/hooks.js +2 -3
  229. package/src/avatar/index.php +4 -5
  230. package/src/button/get-updated-link-attributes.js +1 -1
  231. package/src/button/index.js +1 -1
  232. package/src/button/style.scss +3 -0
  233. package/src/button/test/get-updated-link-attributes.js +15 -0
  234. package/src/comment-author-avatar/index.php +1 -1
  235. package/src/comments/block.json +12 -0
  236. package/src/comments/style.scss +4 -1
  237. package/src/cover/block.json +3 -0
  238. package/src/cover/constants.js +1 -0
  239. package/src/cover/deprecated.js +182 -4
  240. package/src/cover/edit/block-controls.js +1 -1
  241. package/src/cover/edit/cover-placeholder.js +0 -3
  242. package/src/cover/edit/index.js +57 -24
  243. package/src/cover/edit/inspector-controls.js +46 -1
  244. package/src/cover/editor.scss +4 -5
  245. package/src/cover/save.js +29 -20
  246. package/src/cover/style.scss +40 -10
  247. package/src/cover/test/__snapshots__/edit.native.js.snap +9 -9
  248. package/src/cover/test/__snapshots__/transforms.native.js.snap +4 -4
  249. package/src/cover/test/edit.js +1 -3
  250. package/src/cover/test/edit.native.js +4 -4
  251. package/src/cover/test/transforms.native.js +4 -4
  252. package/src/details/block.json +1 -0
  253. package/src/file/edit.js +2 -3
  254. package/src/gallery/constants.js +1 -0
  255. package/src/gallery/edit.js +26 -3
  256. package/src/gallery/utils.js +23 -2
  257. package/src/html/edit.js +7 -1
  258. package/src/html/preview.js +3 -2
  259. package/src/image/block.json +1 -1
  260. package/src/image/edit.js +1 -1
  261. package/src/image/editor.scss +4 -0
  262. package/src/image/image.js +200 -109
  263. package/src/image/test/__snapshots__/transforms.native.js.snap +1 -1
  264. package/src/latest-posts/edit.js +3 -8
  265. package/src/latest-posts/editor.scss +0 -11
  266. package/src/latest-posts/index.php +1 -1
  267. package/src/media-text/style.scss +1 -1
  268. package/src/media-text/test/__snapshots__/transforms.native.js.snap +2 -2
  269. package/src/navigation/edit/menu-inspector-controls.js +2 -2
  270. package/src/navigation/edit/navigation-menu-selector.js +2 -2
  271. package/src/navigation/editor.scss +1 -0
  272. package/src/navigation/index.php +1 -1
  273. package/src/paragraph/edit.js +2 -2
  274. package/src/post-content/block.json +14 -1
  275. package/src/post-featured-image/edit.js +1 -1
  276. package/src/post-template/block.json +2 -1
  277. package/src/post-template/edit.js +19 -0
  278. package/src/post-time-to-read/edit.js +2 -2
  279. package/src/post-time-to-read/index.php +1 -1
  280. package/src/query/block.json +1 -1
  281. package/src/query/edit/inspector-controls/index.js +2 -2
  282. package/src/query/edit/inspector-controls/order-control.js +2 -2
  283. package/src/query/edit/pattern-selection-modal.js +0 -3
  284. package/src/query/edit/query-content.js +9 -17
  285. package/src/query/test/utils.js +59 -1
  286. package/src/query/utils.js +29 -0
  287. package/src/query-title/edit.js +2 -2
  288. package/src/rss/index.php +1 -1
  289. package/src/search/edit.js +28 -25
  290. package/src/search/index.php +2 -2
  291. package/src/separator/test/__snapshots__/transforms.native.js.snap +6 -0
  292. package/src/separator/test/transforms.native.js +1 -1
  293. package/src/separator/transforms.js +11 -0
  294. package/src/social-links/edit.js +0 -1
  295. package/src/spacer/index.js +2 -0
  296. package/src/spacer/test/__snapshots__/transforms.native.js.snap +6 -0
  297. package/src/spacer/test/transforms.native.js +1 -1
  298. package/src/spacer/transforms.js +20 -0
  299. package/src/table/edit.js +0 -1
  300. package/src/table-of-contents/edit.js +2 -6
  301. package/src/template-part/edit/index.js +2 -5
  302. package/src/template-part/edit/selection-modal.js +0 -3
  303. package/src/video/edit.js +1 -1
  304. package/src/video/test/__snapshots__/transforms.native.js.snap +1 -1
  305. package/src/video/tracks-editor.js +2 -4
  306. package/tsconfig.tsbuildinfo +1 -1
  307. /package/src/{lock-unlock.js → lock-unlock.ts} +0 -0
@@ -136,6 +136,9 @@
136
136
  text-align: center;
137
137
  word-break: break-word;
138
138
  box-sizing: border-box;
139
+ height: 100%;
140
+ width: 100%;
141
+ align-content: center;
139
142
  }
140
143
  .wp-block-button__link.aligncenter {
141
144
  text-align: center;
@@ -532,6 +535,10 @@
532
535
  border: none;
533
536
  }
534
537
 
538
+ .wp-block-comments {
539
+ box-sizing: border-box;
540
+ }
541
+
535
542
  .wp-block-comments-pagination > .wp-block-comments-pagination-next,
536
543
  .wp-block-comments-pagination > .wp-block-comments-pagination-previous,
537
544
  .wp-block-comments-pagination > .wp-block-comments-pagination-numbers {
@@ -665,7 +672,6 @@
665
672
  right: 0;
666
673
  bottom: 0;
667
674
  left: 0;
668
- z-index: 1;
669
675
  opacity: 0.5;
670
676
  }
671
677
  .wp-block-cover-image.has-background-dim.has-background-dim-10:not(.has-background-gradient)::before,
@@ -828,8 +834,8 @@
828
834
  }
829
835
  .wp-block-cover-image .wp-block-cover__inner-container,
830
836
  .wp-block-cover .wp-block-cover__inner-container {
837
+ position: relative;
831
838
  width: 100%;
832
- z-index: 1;
833
839
  color: inherit; direction: rtl;
834
840
  }
835
841
  .wp-block-cover-image.is-position-top-left,
@@ -944,14 +950,6 @@ video.wp-block-cover__video-background.is-repeated {
944
950
  background-size: auto;
945
951
  }
946
952
 
947
- .wp-block-cover__video-background {
948
- z-index: 0;
949
- }
950
-
951
- .wp-block-cover__image-background {
952
- z-index: 0;
953
- }
954
-
955
953
  section.wp-block-cover-image h2,
956
954
  .wp-block-cover-image-text,
957
955
  .wp-block-cover-text {
@@ -1025,6 +1023,24 @@ section.wp-block-cover-image > h2,
1025
1023
  color: inherit;
1026
1024
  }
1027
1025
 
1026
+ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__video-background {
1027
+ z-index: 0;
1028
+ }
1029
+ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__image-background {
1030
+ z-index: 0;
1031
+ }
1032
+ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)).has-background-dim:not(.has-background-gradient)::before,
1033
+ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__background,
1034
+ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__gradient-background {
1035
+ z-index: 1;
1036
+ }
1037
+ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__inner-container {
1038
+ z-index: 1;
1039
+ }
1040
+ .has-modal-open body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__inner-container {
1041
+ z-index: auto;
1042
+ }
1043
+
1028
1044
  .wp-block-details {
1029
1045
  box-sizing: border-box;
1030
1046
  }
@@ -2119,7 +2135,7 @@ ul {
2119
2135
  }
2120
2136
 
2121
2137
  .wp-block-media-text__media a {
2122
- display: inline-block;
2138
+ display: block;
2123
2139
  }
2124
2140
 
2125
2141
  .wp-block-media-text__media img,
@@ -136,6 +136,9 @@
136
136
  text-align: center;
137
137
  word-break: break-word;
138
138
  box-sizing: border-box;
139
+ height: 100%;
140
+ width: 100%;
141
+ align-content: center;
139
142
  }
140
143
  .wp-block-button__link.aligncenter {
141
144
  text-align: center;
@@ -537,6 +540,10 @@
537
540
  border: none;
538
541
  }
539
542
 
543
+ .wp-block-comments {
544
+ box-sizing: border-box;
545
+ }
546
+
540
547
  .wp-block-comments-pagination > .wp-block-comments-pagination-next,
541
548
  .wp-block-comments-pagination > .wp-block-comments-pagination-previous,
542
549
  .wp-block-comments-pagination > .wp-block-comments-pagination-numbers {
@@ -673,7 +680,6 @@
673
680
  left: 0;
674
681
  bottom: 0;
675
682
  right: 0;
676
- z-index: 1;
677
683
  opacity: 0.5;
678
684
  }
679
685
  .wp-block-cover-image.has-background-dim.has-background-dim-10:not(.has-background-gradient)::before,
@@ -836,8 +842,8 @@
836
842
  }
837
843
  .wp-block-cover-image .wp-block-cover__inner-container,
838
844
  .wp-block-cover .wp-block-cover__inner-container {
845
+ position: relative;
839
846
  width: 100%;
840
- z-index: 1;
841
847
  color: inherit;
842
848
  /*rtl:raw: direction: rtl; */
843
849
  }
@@ -953,14 +959,6 @@ video.wp-block-cover__video-background.is-repeated {
953
959
  background-size: auto;
954
960
  }
955
961
 
956
- .wp-block-cover__video-background {
957
- z-index: 0;
958
- }
959
-
960
- .wp-block-cover__image-background {
961
- z-index: 0;
962
- }
963
-
964
962
  section.wp-block-cover-image h2,
965
963
  .wp-block-cover-image-text,
966
964
  .wp-block-cover-text {
@@ -1034,6 +1032,24 @@ section.wp-block-cover-image > h2,
1034
1032
  color: inherit;
1035
1033
  }
1036
1034
 
1035
+ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__video-background {
1036
+ z-index: 0;
1037
+ }
1038
+ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__image-background {
1039
+ z-index: 0;
1040
+ }
1041
+ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)).has-background-dim:not(.has-background-gradient)::before,
1042
+ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__background,
1043
+ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__gradient-background {
1044
+ z-index: 1;
1045
+ }
1046
+ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__inner-container {
1047
+ z-index: 1;
1048
+ }
1049
+ .has-modal-open body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background + .wp-block-cover__inner-container)) .wp-block-cover__inner-container {
1050
+ z-index: auto;
1051
+ }
1052
+
1037
1053
  .wp-block-details {
1038
1054
  box-sizing: border-box;
1039
1055
  }
@@ -2151,7 +2167,7 @@ ul {
2151
2167
  }
2152
2168
 
2153
2169
  .wp-block-media-text__media a {
2154
- display: inline-block;
2170
+ display: block;
2155
2171
  }
2156
2172
 
2157
2173
  .wp-block-media-text__media img,
@@ -0,0 +1,2 @@
1
+ export declare const lock: (object: Record<symbol, WeakKey>, privateData: unknown) => void, unlock: (object: Record<symbol, WeakKey>) => any;
2
+ //# sourceMappingURL=lock-unlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lock-unlock.d.ts","sourceRoot":"","sources":["../src/lock-unlock.ts"],"names":[],"mappings":"AAKA,eAAO,MAAQ,IAAI,mEAAE,MAAM,0CAIzB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-library",
3
- "version": "9.10.0",
3
+ "version": "9.12.0",
4
4
  "description": "Block library for the WordPress editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -25,11 +25,7 @@
25
25
  "main": "build/index.js",
26
26
  "module": "build-module/index.js",
27
27
  "react-native": "src/index",
28
- "sideEffects": [
29
- "build-style/**",
30
- "src/**/*.scss",
31
- "{src,build,build-module}/*/init.js"
32
- ],
28
+ "wpScript": true,
33
29
  "wpScriptModuleExports": {
34
30
  "./file/view": "./build-module/file/view.js",
35
31
  "./image/view": "./build-module/image/view.js",
@@ -37,41 +33,46 @@
37
33
  "./query/view": "./build-module/query/view.js",
38
34
  "./search/view": "./build-module/search/view.js"
39
35
  },
36
+ "sideEffects": [
37
+ "build-style/**",
38
+ "src/**/*.scss",
39
+ "{src,build,build-module}/*/init.js"
40
+ ],
40
41
  "dependencies": {
41
42
  "@babel/runtime": "7.25.7",
42
- "@wordpress/a11y": "^4.10.0",
43
- "@wordpress/api-fetch": "^7.10.0",
44
- "@wordpress/autop": "^4.10.0",
45
- "@wordpress/blob": "^4.10.0",
46
- "@wordpress/block-editor": "^14.5.0",
47
- "@wordpress/blocks": "^13.10.0",
48
- "@wordpress/components": "^28.10.0",
49
- "@wordpress/compose": "^7.10.0",
50
- "@wordpress/core-data": "^7.10.0",
51
- "@wordpress/data": "^10.10.0",
52
- "@wordpress/date": "^5.10.0",
53
- "@wordpress/deprecated": "^4.10.0",
54
- "@wordpress/dom": "^4.10.0",
55
- "@wordpress/element": "^6.10.0",
56
- "@wordpress/escape-html": "^3.10.0",
57
- "@wordpress/hooks": "^4.10.0",
58
- "@wordpress/html-entities": "^4.10.0",
59
- "@wordpress/i18n": "^5.10.0",
60
- "@wordpress/icons": "^10.10.0",
61
- "@wordpress/interactivity": "^6.10.0",
62
- "@wordpress/interactivity-router": "^2.10.0",
63
- "@wordpress/keyboard-shortcuts": "^5.10.0",
64
- "@wordpress/keycodes": "^4.10.0",
65
- "@wordpress/notices": "^5.10.0",
66
- "@wordpress/patterns": "^2.10.0",
67
- "@wordpress/primitives": "^4.10.0",
68
- "@wordpress/private-apis": "^1.10.0",
69
- "@wordpress/reusable-blocks": "^5.10.0",
70
- "@wordpress/rich-text": "^7.10.0",
71
- "@wordpress/server-side-render": "^5.10.0",
72
- "@wordpress/url": "^4.10.0",
73
- "@wordpress/viewport": "^6.10.0",
74
- "@wordpress/wordcount": "^4.10.0",
43
+ "@wordpress/a11y": "*",
44
+ "@wordpress/api-fetch": "*",
45
+ "@wordpress/autop": "*",
46
+ "@wordpress/blob": "*",
47
+ "@wordpress/block-editor": "*",
48
+ "@wordpress/blocks": "*",
49
+ "@wordpress/components": "*",
50
+ "@wordpress/compose": "*",
51
+ "@wordpress/core-data": "*",
52
+ "@wordpress/data": "*",
53
+ "@wordpress/date": "*",
54
+ "@wordpress/deprecated": "*",
55
+ "@wordpress/dom": "*",
56
+ "@wordpress/element": "*",
57
+ "@wordpress/escape-html": "*",
58
+ "@wordpress/hooks": "*",
59
+ "@wordpress/html-entities": "*",
60
+ "@wordpress/i18n": "*",
61
+ "@wordpress/icons": "*",
62
+ "@wordpress/interactivity": "*",
63
+ "@wordpress/interactivity-router": "*",
64
+ "@wordpress/keyboard-shortcuts": "*",
65
+ "@wordpress/keycodes": "*",
66
+ "@wordpress/notices": "*",
67
+ "@wordpress/patterns": "*",
68
+ "@wordpress/primitives": "*",
69
+ "@wordpress/private-apis": "*",
70
+ "@wordpress/reusable-blocks": "*",
71
+ "@wordpress/rich-text": "*",
72
+ "@wordpress/server-side-render": "*",
73
+ "@wordpress/url": "*",
74
+ "@wordpress/viewport": "*",
75
+ "@wordpress/wordcount": "*",
75
76
  "change-case": "^4.1.2",
76
77
  "clsx": "^2.1.1",
77
78
  "colord": "^2.7.0",
@@ -89,5 +90,5 @@
89
90
  "publishConfig": {
90
91
  "access": "public"
91
92
  },
92
- "gitHead": "ab34a7ac935fd1478eac63b596242d83270897ee"
93
+ "gitHead": "510540d99f3d222a96f08d3d7b66c9e7a726f705"
93
94
  }
@@ -26,6 +26,12 @@
26
26
  },
27
27
  "supports": {
28
28
  "align": true,
29
+ "__experimentalBorder": {
30
+ "radius": true,
31
+ "color": true,
32
+ "width": true,
33
+ "style": true
34
+ },
29
35
  "html": false,
30
36
  "spacing": {
31
37
  "margin": true,
@@ -1,3 +1,11 @@
1
1
  ul.wp-block-archives {
2
2
  padding-left: 2.5em;
3
3
  }
4
+
5
+ // The following styles are to prevent duplicate spacing and borders for the archives
6
+ // block in the editor given it uses server side rendering.
7
+ // See https://github.com/WordPress/gutenberg/pull/63400
8
+ .wp-block-archives .wp-block-archives {
9
+ margin: 0;
10
+ border: 0;
11
+ }
@@ -47,9 +47,8 @@ export function useCommentAvatar( { commentId } ) {
47
47
  src: avatarUrls ? avatarUrls[ avatarUrls.length - 1 ] : defaultAvatar,
48
48
  minSize,
49
49
  maxSize,
50
- // translators: %s is the Author name.
51
50
  alt: authorName
52
- ? // translators: %s is the Author name.
51
+ ? // translators: %s: Author name.
53
52
  sprintf( __( '%s Avatar' ), authorName )
54
53
  : __( 'Default Avatar' ),
55
54
  };
@@ -89,7 +88,7 @@ export function useUserAvatar( { userId, postId, postType } ) {
89
88
  minSize,
90
89
  maxSize,
91
90
  alt: authorDetails
92
- ? // translators: %s is the Author name.
91
+ ? // translators: %s: Author name.
93
92
  sprintf( __( '%s Avatar' ), authorDetails?.name )
94
93
  : __( 'Default Avatar' ),
95
94
  };
@@ -46,7 +46,7 @@ function render_block_core_avatar( $attributes, $content, $block ) {
46
46
  }
47
47
 
48
48
  $author_name = get_the_author_meta( 'display_name', $author_id );
49
- // translators: %s is the Author name.
49
+ // translators: %s: Author name.
50
50
  $alt = sprintf( __( '%s Avatar' ), $author_name );
51
51
  $avatar_block = get_avatar(
52
52
  $author_id,
@@ -64,7 +64,7 @@ function render_block_core_avatar( $attributes, $content, $block ) {
64
64
  // translators: %s is the Author name.
65
65
  $label = 'aria-label="' . esc_attr( sprintf( __( '(%s author archive, opens in a new tab)' ), $author_name ) ) . '"';
66
66
  }
67
- // translators: %1$s: Author archive link. %2$s: Link target. %3$s Aria label. %4$s Avatar image.
67
+ // translators: 1: Author archive link. 2: Link target. %3$s Aria label. %4$s Avatar image.
68
68
  $avatar_block = sprintf( '<a href="%1$s" target="%2$s" %3$s class="wp-block-avatar__link">%4$s</a>', esc_url( get_author_posts_url( $author_id ) ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block );
69
69
  }
70
70
  return sprintf( '<div %1s>%2s</div>', $wrapper_attributes, $avatar_block );
@@ -73,7 +73,7 @@ function render_block_core_avatar( $attributes, $content, $block ) {
73
73
  if ( ! $comment ) {
74
74
  return '';
75
75
  }
76
- /* translators: %s is the Comment Author name */
76
+ /* translators: %s: Author name. */
77
77
  $alt = sprintf( __( '%s Avatar' ), $comment->comment_author );
78
78
  $avatar_block = get_avatar(
79
79
  $comment,
@@ -88,10 +88,9 @@ function render_block_core_avatar( $attributes, $content, $block ) {
88
88
  if ( isset( $attributes['isLink'] ) && $attributes['isLink'] && isset( $comment->comment_author_url ) && '' !== $comment->comment_author_url ) {
89
89
  $label = '';
90
90
  if ( '_blank' === $attributes['linkTarget'] ) {
91
- // translators: %s is the Comment Author name.
91
+ // translators: %s: Comment author name.
92
92
  $label = 'aria-label="' . esc_attr( sprintf( __( '(%s website link, opens in a new tab)' ), $comment->comment_author ) ) . '"';
93
93
  }
94
- // translators: %1$s: Comment Author website link. %2$s: Link target. %3$s Aria label. %4$s Avatar image.
95
94
  $avatar_block = sprintf( '<a href="%1$s" target="%2$s" %3$s class="wp-block-avatar__link">%4$s</a>', esc_url( $comment->comment_author_url ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block );
96
95
  }
97
96
  return sprintf( '<div %1s>%2s</div>', $wrapper_attributes, $avatar_block );
@@ -40,7 +40,7 @@ export function getUpdatedLinkAttributes( {
40
40
  if ( nofollow ) {
41
41
  updatedRel = updatedRel?.includes( NOFOLLOW_REL )
42
42
  ? updatedRel
43
- : updatedRel + ` ${ NOFOLLOW_REL }`;
43
+ : ( updatedRel + ` ${ NOFOLLOW_REL }` ).trim();
44
44
  } else {
45
45
  const relRegex = new RegExp( `\\b${ NOFOLLOW_REL }\\s*`, 'g' );
46
46
  updatedRel = updatedRel?.replace( relRegex, '' ).trim();
@@ -22,7 +22,7 @@ export const settings = {
22
22
  example: {
23
23
  attributes: {
24
24
  className: 'is-style-fill',
25
- text: __( 'Call to Action' ),
25
+ text: __( 'Call to action' ),
26
26
  },
27
27
  },
28
28
  edit,
@@ -9,6 +9,9 @@ $blocks-block__margin: 0.5em;
9
9
  text-align: center;
10
10
  word-break: break-word; // overflow-wrap doesn't work well if a link is wrapped in the div, so use word-break here.
11
11
  box-sizing: border-box;
12
+ height: 100%;
13
+ width: 100%;
14
+ align-content: center;
12
15
 
13
16
  &.aligncenter {
14
17
  text-align: center;
@@ -79,6 +79,21 @@ describe( 'getUpdatedLinkAttributes method', () => {
79
79
  expect( result.rel ).toEqual( 'rel_value nofollow' );
80
80
  } );
81
81
 
82
+ it( 'should correctly update link attributes with nofollow without spacing', () => {
83
+ const options = {
84
+ url: 'example.com',
85
+ opensInNewTab: false,
86
+ nofollow: true,
87
+ rel: '',
88
+ };
89
+
90
+ const result = getUpdatedLinkAttributes( options );
91
+
92
+ expect( result.url ).toEqual( 'http://example.com' );
93
+ expect( result.linkTarget ).toEqual( undefined );
94
+ expect( result.rel ).toEqual( 'nofollow' );
95
+ } );
96
+
82
97
  it( 'should correctly handle rel with existing nofollow values and remove duplicates', () => {
83
98
  const options = {
84
99
  url: 'example.com',
@@ -46,7 +46,7 @@ function render_block_core_comment_author_avatar( $attributes, $content, $block
46
46
  $styles = isset( $wrapper_attributes['style'] ) ? $wrapper_attributes['style'] : '';
47
47
  $classes = isset( $wrapper_attributes['class'] ) ? $wrapper_attributes['class'] : '';
48
48
 
49
- /* translators: %s is the Comment Author name */
49
+ /* translators: %s: Author name. */
50
50
  $alt = sprintf( __( '%s Avatar' ), $comment->comment_author );
51
51
 
52
52
  $avatar_block = get_avatar(
@@ -45,6 +45,18 @@
45
45
  "__experimentalDefaultControls": {
46
46
  "fontSize": true
47
47
  }
48
+ },
49
+ "__experimentalBorder": {
50
+ "radius": true,
51
+ "color": true,
52
+ "width": true,
53
+ "style": true,
54
+ "__experimentalDefaultControls": {
55
+ "radius": true,
56
+ "color": true,
57
+ "width": true,
58
+ "style": true
59
+ }
48
60
  }
49
61
  },
50
62
  "editorStyle": "wp-block-comments-editor",
@@ -13,7 +13,6 @@
13
13
  }
14
14
 
15
15
  /* end utility classes */
16
-
17
16
  .navigation {
18
17
  &::after {
19
18
  content: "";
@@ -146,3 +145,7 @@
146
145
  :where(.wp-block-post-comments input[type="submit"]) {
147
146
  border: none;
148
147
  }
148
+
149
+ .wp-block-comments {
150
+ box-sizing: border-box;
151
+ }
@@ -78,6 +78,9 @@
78
78
  "tagName": {
79
79
  "type": "string",
80
80
  "default": "div"
81
+ },
82
+ "sizeSlug": {
83
+ "type": "string"
81
84
  }
82
85
  },
83
86
  "usesContext": [ "postId", "postType" ],
@@ -0,0 +1 @@
1
+ export const DEFAULT_MEDIA_SIZE_SLUG = 'full';