@wordpress/block-library 9.11.0 → 9.12.1-next.082ed6819.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 (272) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/block-keyboard-shortcuts/index.js +7 -7
  3. package/build/block-keyboard-shortcuts/index.js.map +1 -1
  4. package/build/button/index.js +1 -1
  5. package/build/button/index.js.map +1 -1
  6. package/build/cover/deprecated.js +140 -4
  7. package/build/cover/deprecated.js.map +1 -1
  8. package/build/cover/edit/block-controls.js +1 -1
  9. package/build/cover/edit/block-controls.js.map +1 -1
  10. package/build/cover/edit/cover-placeholder.js +1 -2
  11. package/build/cover/edit/cover-placeholder.js.map +1 -1
  12. package/build/cover/edit/index.js +23 -23
  13. package/build/cover/edit/index.js.map +1 -1
  14. package/build/cover/index.js +10 -10
  15. package/build/cover/index.js.map +1 -1
  16. package/build/cover/save.js +13 -13
  17. package/build/cover/save.js.map +1 -1
  18. package/build/cover/shared.js +6 -7
  19. package/build/cover/shared.js.map +1 -1
  20. package/build/details/index.js +20 -0
  21. package/build/details/index.js.map +1 -1
  22. package/build/file/edit.js +8 -4
  23. package/build/file/edit.js.map +1 -1
  24. package/build/freeform/modal.js +1 -1
  25. package/build/freeform/modal.js.map +1 -1
  26. package/build/gallery/edit.js +1 -1
  27. package/build/gallery/edit.js.map +1 -1
  28. package/build/heading/index.js +1 -7
  29. package/build/heading/index.js.map +1 -1
  30. package/build/home-link/edit.js +20 -36
  31. package/build/home-link/edit.js.map +1 -1
  32. package/build/image/edit.js +1 -1
  33. package/build/image/edit.js.map +1 -1
  34. package/build/image/image.js +144 -78
  35. package/build/image/image.js.map +1 -1
  36. package/build/image/index.js +1 -1
  37. package/build/latest-posts/edit.js +0 -1
  38. package/build/latest-posts/edit.js.map +1 -1
  39. package/build/lock-unlock.js.map +1 -1
  40. package/build/navigation/edit/index.js +2 -23
  41. package/build/navigation/edit/index.js.map +1 -1
  42. package/build/navigation/use-template-part-area-label.js +6 -8
  43. package/build/navigation/use-template-part-area-label.js.map +1 -1
  44. package/build/page-list/index.js +14 -0
  45. package/build/page-list/index.js.map +1 -1
  46. package/build/paragraph/edit.js +26 -25
  47. package/build/paragraph/edit.js.map +1 -1
  48. package/build/post-content/index.js +13 -0
  49. package/build/post-content/index.js.map +1 -1
  50. package/build/post-template/edit.js +11 -0
  51. package/build/post-template/edit.js.map +1 -1
  52. package/build/post-template/index.js +1 -1
  53. package/build/query/edit/inspector-controls/enhanced-pagination-control.js +1 -3
  54. package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  55. package/build/query/edit/inspector-controls/index.js +3 -13
  56. package/build/query/edit/inspector-controls/index.js.map +1 -1
  57. package/build/query/edit/pattern-selection-modal.js +0 -3
  58. package/build/query/edit/pattern-selection-modal.js.map +1 -1
  59. package/build/query/edit/query-content.js +10 -12
  60. package/build/query/edit/query-content.js.map +1 -1
  61. package/build/query/index.js +1 -1
  62. package/build/query/utils.js +38 -9
  63. package/build/query/utils.js.map +1 -1
  64. package/build/social-link/edit.js +22 -9
  65. package/build/social-link/edit.js.map +1 -1
  66. package/build/template-part/edit/advanced-controls.js +2 -7
  67. package/build/template-part/edit/advanced-controls.js.map +1 -1
  68. package/build/template-part/edit/index.js +1 -4
  69. package/build/template-part/edit/index.js.map +1 -1
  70. package/build/template-part/edit/selection-modal.js +0 -3
  71. package/build/template-part/edit/selection-modal.js.map +1 -1
  72. package/build/template-part/edit/utils/get-template-part-icon.js +23 -0
  73. package/build/template-part/edit/utils/get-template-part-icon.js.map +1 -0
  74. package/build/template-part/edit/utils/hooks.js +1 -6
  75. package/build/template-part/edit/utils/hooks.js.map +1 -1
  76. package/build/template-part/variations.js +6 -12
  77. package/build/template-part/variations.js.map +1 -1
  78. package/build/video/edit.js +1 -1
  79. package/build/video/edit.js.map +1 -1
  80. package/build/video/tracks-editor.js +135 -123
  81. package/build/video/tracks-editor.js.map +1 -1
  82. package/build-module/block-keyboard-shortcuts/index.js +7 -7
  83. package/build-module/block-keyboard-shortcuts/index.js.map +1 -1
  84. package/build-module/button/index.js +1 -1
  85. package/build-module/button/index.js.map +1 -1
  86. package/build-module/cover/deprecated.js +140 -4
  87. package/build-module/cover/deprecated.js.map +1 -1
  88. package/build-module/cover/edit/block-controls.js +1 -1
  89. package/build-module/cover/edit/block-controls.js.map +1 -1
  90. package/build-module/cover/edit/cover-placeholder.js +1 -2
  91. package/build-module/cover/edit/cover-placeholder.js.map +1 -1
  92. package/build-module/cover/edit/index.js +23 -23
  93. package/build-module/cover/edit/index.js.map +1 -1
  94. package/build-module/cover/index.js +10 -10
  95. package/build-module/cover/index.js.map +1 -1
  96. package/build-module/cover/save.js +13 -13
  97. package/build-module/cover/save.js.map +1 -1
  98. package/build-module/cover/shared.js +6 -7
  99. package/build-module/cover/shared.js.map +1 -1
  100. package/build-module/details/index.js +21 -1
  101. package/build-module/details/index.js.map +1 -1
  102. package/build-module/file/edit.js +8 -4
  103. package/build-module/file/edit.js.map +1 -1
  104. package/build-module/freeform/modal.js +1 -1
  105. package/build-module/freeform/modal.js.map +1 -1
  106. package/build-module/gallery/edit.js +1 -1
  107. package/build-module/gallery/edit.js.map +1 -1
  108. package/build-module/heading/index.js +1 -7
  109. package/build-module/heading/index.js.map +1 -1
  110. package/build-module/home-link/edit.js +23 -39
  111. package/build-module/home-link/edit.js.map +1 -1
  112. package/build-module/image/edit.js +1 -1
  113. package/build-module/image/edit.js.map +1 -1
  114. package/build-module/image/image.js +149 -83
  115. package/build-module/image/image.js.map +1 -1
  116. package/build-module/image/index.js +1 -1
  117. package/build-module/latest-posts/edit.js +0 -1
  118. package/build-module/latest-posts/edit.js.map +1 -1
  119. package/build-module/lock-unlock.js.map +1 -1
  120. package/build-module/navigation/edit/index.js +2 -23
  121. package/build-module/navigation/edit/index.js.map +1 -1
  122. package/build-module/navigation/use-template-part-area-label.js +6 -8
  123. package/build-module/navigation/use-template-part-area-label.js.map +1 -1
  124. package/build-module/page-list/index.js +14 -0
  125. package/build-module/page-list/index.js.map +1 -1
  126. package/build-module/paragraph/edit.js +26 -25
  127. package/build-module/paragraph/edit.js.map +1 -1
  128. package/build-module/post-content/index.js +13 -0
  129. package/build-module/post-content/index.js.map +1 -1
  130. package/build-module/post-template/edit.js +11 -0
  131. package/build-module/post-template/edit.js.map +1 -1
  132. package/build-module/post-template/index.js +1 -1
  133. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +1 -3
  134. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
  135. package/build-module/query/edit/inspector-controls/index.js +3 -13
  136. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  137. package/build-module/query/edit/pattern-selection-modal.js +0 -3
  138. package/build-module/query/edit/pattern-selection-modal.js.map +1 -1
  139. package/build-module/query/edit/query-content.js +10 -12
  140. package/build-module/query/edit/query-content.js.map +1 -1
  141. package/build-module/query/index.js +1 -1
  142. package/build-module/query/utils.js +35 -8
  143. package/build-module/query/utils.js.map +1 -1
  144. package/build-module/social-link/edit.js +24 -11
  145. package/build-module/social-link/edit.js.map +1 -1
  146. package/build-module/template-part/edit/advanced-controls.js +3 -8
  147. package/build-module/template-part/edit/advanced-controls.js.map +1 -1
  148. package/build-module/template-part/edit/index.js +1 -4
  149. package/build-module/template-part/edit/index.js.map +1 -1
  150. package/build-module/template-part/edit/selection-modal.js +0 -3
  151. package/build-module/template-part/edit/selection-modal.js.map +1 -1
  152. package/build-module/template-part/edit/utils/get-template-part-icon.js +15 -0
  153. package/build-module/template-part/edit/utils/get-template-part-icon.js.map +1 -0
  154. package/build-module/template-part/edit/utils/hooks.js +1 -6
  155. package/build-module/template-part/edit/utils/hooks.js.map +1 -1
  156. package/build-module/template-part/variations.js +5 -11
  157. package/build-module/template-part/variations.js.map +1 -1
  158. package/build-module/video/edit.js +1 -1
  159. package/build-module/video/edit.js.map +1 -1
  160. package/build-module/video/tracks-editor.js +136 -124
  161. package/build-module/video/tracks-editor.js.map +1 -1
  162. package/build-style/cover/editor-rtl.css +3 -5
  163. package/build-style/cover/editor.css +3 -5
  164. package/build-style/cover/style-rtl.css +19 -15
  165. package/build-style/cover/style.css +19 -15
  166. package/build-style/editor-rtl.css +19 -30
  167. package/build-style/editor.css +19 -30
  168. package/build-style/group/editor-rtl.css +0 -10
  169. package/build-style/group/editor.css +0 -10
  170. package/build-style/image/editor-rtl.css +4 -0
  171. package/build-style/image/editor.css +4 -0
  172. package/build-style/image/style-rtl.css +0 -2
  173. package/build-style/image/style.css +0 -2
  174. package/build-style/latest-posts/editor-rtl.css +0 -7
  175. package/build-style/latest-posts/editor.css +0 -7
  176. package/build-style/media-text/style-rtl.css +1 -1
  177. package/build-style/media-text/style.css +1 -1
  178. package/build-style/navigation/style-rtl.css +1 -1
  179. package/build-style/navigation/style.css +1 -1
  180. package/build-style/page-list/style-rtl.css +4 -0
  181. package/build-style/page-list/style.css +4 -0
  182. package/build-style/query/editor-rtl.css +0 -4
  183. package/build-style/query/editor.css +0 -4
  184. package/build-style/search/style-rtl.css +3 -3
  185. package/build-style/search/style.css +3 -3
  186. package/build-style/social-link/editor-rtl.css +4 -4
  187. package/build-style/social-link/editor.css +4 -4
  188. package/build-style/style-rtl.css +28 -22
  189. package/build-style/style.css +28 -22
  190. package/build-style/video/editor-rtl.css +8 -0
  191. package/build-style/video/editor.css +8 -0
  192. package/build-types/lock-unlock.d.ts +2 -0
  193. package/build-types/lock-unlock.d.ts.map +1 -0
  194. package/package.json +39 -39
  195. package/src/block-keyboard-shortcuts/index.js +25 -11
  196. package/src/button/index.js +1 -1
  197. package/src/comments/block.json +3 -9
  198. package/src/cover/deprecated.js +182 -4
  199. package/src/cover/edit/block-controls.js +1 -1
  200. package/src/cover/edit/cover-placeholder.js +0 -3
  201. package/src/cover/edit/index.js +42 -27
  202. package/src/cover/editor.scss +4 -5
  203. package/src/cover/index.js +8 -8
  204. package/src/cover/save.js +27 -20
  205. package/src/cover/shared.js +10 -10
  206. package/src/cover/style.scss +40 -16
  207. package/src/cover/test/__snapshots__/edit.native.js.snap +9 -9
  208. package/src/cover/test/__snapshots__/transforms.native.js.snap +4 -4
  209. package/src/cover/test/edit.js +2 -2
  210. package/src/cover/test/edit.native.js +4 -4
  211. package/src/cover/test/transforms.native.js +4 -4
  212. package/src/details/block.json +1 -0
  213. package/src/details/index.js +23 -1
  214. package/src/file/edit.js +9 -3
  215. package/src/freeform/modal.js +1 -1
  216. package/src/gallery/edit.js +1 -1
  217. package/src/group/editor.scss +0 -12
  218. package/src/heading/block.json +1 -7
  219. package/src/home-link/edit.js +27 -45
  220. package/src/home-link/index.php +0 -3
  221. package/src/image/block.json +1 -1
  222. package/src/image/edit.js +1 -1
  223. package/src/image/editor.scss +4 -0
  224. package/src/image/image.js +200 -109
  225. package/src/image/style.scss +0 -1
  226. package/src/image/test/__snapshots__/transforms.native.js.snap +1 -1
  227. package/src/latest-posts/edit.js +0 -1
  228. package/src/latest-posts/editor.scss +0 -11
  229. package/src/media-text/style.scss +1 -1
  230. package/src/media-text/test/__snapshots__/transforms.native.js.snap +2 -2
  231. package/src/navigation/edit/index.js +3 -30
  232. package/src/navigation/index.php +5 -151
  233. package/src/navigation/style.scss +1 -1
  234. package/src/navigation/use-template-part-area-label.js +10 -10
  235. package/src/page-list/block.json +14 -0
  236. package/src/page-list/style.scss +4 -0
  237. package/src/paragraph/edit.js +20 -17
  238. package/src/pattern/index.php +0 -7
  239. package/src/post-content/block.json +14 -1
  240. package/src/post-template/block.json +2 -1
  241. package/src/post-template/edit.js +19 -0
  242. package/src/query/block.json +1 -1
  243. package/src/query/edit/inspector-controls/enhanced-pagination-control.js +3 -5
  244. package/src/query/edit/inspector-controls/index.js +2 -12
  245. package/src/query/edit/pattern-selection-modal.js +0 -3
  246. package/src/query/edit/query-content.js +9 -17
  247. package/src/query/editor.scss +0 -4
  248. package/src/query/index.php +1 -1
  249. package/src/query/test/utils.js +59 -1
  250. package/src/query/utils.js +43 -15
  251. package/src/rss/index.php +11 -8
  252. package/src/search/index.php +2 -2
  253. package/src/search/style.scss +3 -5
  254. package/src/social-link/edit.js +47 -19
  255. package/src/social-link/editor.scss +6 -7
  256. package/src/template-part/edit/advanced-controls.js +13 -13
  257. package/src/template-part/edit/index.js +1 -4
  258. package/src/template-part/edit/selection-modal.js +0 -3
  259. package/src/template-part/edit/utils/get-template-part-icon.js +20 -0
  260. package/src/template-part/edit/utils/hooks.js +2 -7
  261. package/src/template-part/variations.js +4 -16
  262. package/src/video/edit.js +1 -1
  263. package/src/video/editor.scss +9 -0
  264. package/src/video/test/__snapshots__/transforms.native.js.snap +1 -1
  265. package/src/video/tracks-editor.js +157 -141
  266. package/tsconfig.tsbuildinfo +1 -1
  267. package/build/query/edit/inspector-controls/create-new-post-link.js +0 -40
  268. package/build/query/edit/inspector-controls/create-new-post-link.js.map +0 -1
  269. package/build-module/query/edit/inspector-controls/create-new-post-link.js +0 -33
  270. package/build-module/query/edit/inspector-controls/create-new-post-link.js.map +0 -1
  271. package/src/query/edit/inspector-controls/create-new-post-link.js +0 -32
  272. /package/src/{lock-unlock.js → lock-unlock.ts} +0 -0
@@ -672,7 +672,6 @@
672
672
  right: 0;
673
673
  bottom: 0;
674
674
  left: 0;
675
- z-index: 1;
676
675
  opacity: 0.5;
677
676
  }
678
677
  .wp-block-cover-image.has-background-dim.has-background-dim-10:not(.has-background-gradient)::before,
@@ -835,15 +834,10 @@
835
834
  }
836
835
  .wp-block-cover-image .wp-block-cover__inner-container,
837
836
  .wp-block-cover .wp-block-cover__inner-container {
837
+ position: relative;
838
838
  width: 100%;
839
- z-index: 1;
840
839
  color: inherit; direction: rtl;
841
840
  }
842
- .has-modal-open .wp-block-cover-image .wp-block-cover__inner-container,
843
- .has-modal-open .wp-block-cover .wp-block-cover__inner-container {
844
- z-index: auto;
845
- }
846
-
847
841
  .wp-block-cover-image.is-position-top-left,
848
842
  .wp-block-cover.is-position-top-left {
849
843
  align-items: flex-start;
@@ -956,14 +950,6 @@ video.wp-block-cover__video-background.is-repeated {
956
950
  background-size: auto;
957
951
  }
958
952
 
959
- .wp-block-cover__video-background {
960
- z-index: 0;
961
- }
962
-
963
- .wp-block-cover__image-background {
964
- z-index: 0;
965
- }
966
-
967
953
  section.wp-block-cover-image h2,
968
954
  .wp-block-cover-image-text,
969
955
  .wp-block-cover-text {
@@ -1037,6 +1023,24 @@ section.wp-block-cover-image > h2,
1037
1023
  color: inherit;
1038
1024
  }
1039
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
+
1040
1044
  .wp-block-details {
1041
1045
  box-sizing: border-box;
1042
1046
  }
@@ -1603,8 +1607,6 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
1603
1607
  max-width: 100%;
1604
1608
  vertical-align: bottom;
1605
1609
  box-sizing: border-box;
1606
- width: -moz-fit-content;
1607
- width: fit-content;
1608
1610
  }
1609
1611
  @media (prefers-reduced-motion: no-preference) {
1610
1612
  .wp-block-image img.hide {
@@ -2133,7 +2135,7 @@ ul {
2133
2135
  }
2134
2136
 
2135
2137
  .wp-block-media-text__media a {
2136
- display: inline-block;
2138
+ display: block;
2137
2139
  }
2138
2140
 
2139
2141
  .wp-block-media-text__media img,
@@ -2556,7 +2558,7 @@ button.wp-block-navigation-item__content {
2556
2558
  padding-top: clamp(1rem, var(--wp--style--root--padding-top), 20rem);
2557
2559
  padding-left: clamp(1rem, var(--wp--style--root--padding-right), 20rem);
2558
2560
  padding-bottom: clamp(1rem, var(--wp--style--root--padding-bottom), 20rem);
2559
- padding-right: clamp(1rem, var(--wp--style--root--padding-left), 20em);
2561
+ padding-right: clamp(1rem, var(--wp--style--root--padding-left), 20rem);
2560
2562
  overflow: auto;
2561
2563
  z-index: 100000;
2562
2564
  }
@@ -2765,6 +2767,10 @@ html.has-modal-open {
2765
2767
  background-color: inherit;
2766
2768
  }
2767
2769
 
2770
+ .wp-block-page-list {
2771
+ box-sizing: border-box;
2772
+ }
2773
+
2768
2774
  .is-small-text {
2769
2775
  font-size: 0.875em;
2770
2776
  }
@@ -3340,9 +3346,9 @@ ul.wp-block-rss.is-grid li {
3340
3346
  margin-right: 0;
3341
3347
  flex-shrink: 0;
3342
3348
  max-width: 100%;
3343
- }
3344
- .wp-block-search.wp-block-search__button-only .wp-block-search__button[aria-expanded=true] {
3345
- max-width: calc(100% - 100px);
3349
+ box-sizing: border-box;
3350
+ display: flex;
3351
+ justify-content: center;
3346
3352
  }
3347
3353
  .wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper {
3348
3354
  transition-property: width;
@@ -680,7 +680,6 @@
680
680
  left: 0;
681
681
  bottom: 0;
682
682
  right: 0;
683
- z-index: 1;
684
683
  opacity: 0.5;
685
684
  }
686
685
  .wp-block-cover-image.has-background-dim.has-background-dim-10:not(.has-background-gradient)::before,
@@ -843,16 +842,11 @@
843
842
  }
844
843
  .wp-block-cover-image .wp-block-cover__inner-container,
845
844
  .wp-block-cover .wp-block-cover__inner-container {
845
+ position: relative;
846
846
  width: 100%;
847
- z-index: 1;
848
847
  color: inherit;
849
848
  /*rtl:raw: direction: rtl; */
850
849
  }
851
- .has-modal-open .wp-block-cover-image .wp-block-cover__inner-container,
852
- .has-modal-open .wp-block-cover .wp-block-cover__inner-container {
853
- z-index: auto;
854
- }
855
-
856
850
  .wp-block-cover-image.is-position-top-left,
857
851
  .wp-block-cover.is-position-top-left {
858
852
  align-items: flex-start;
@@ -965,14 +959,6 @@ video.wp-block-cover__video-background.is-repeated {
965
959
  background-size: auto;
966
960
  }
967
961
 
968
- .wp-block-cover__video-background {
969
- z-index: 0;
970
- }
971
-
972
- .wp-block-cover__image-background {
973
- z-index: 0;
974
- }
975
-
976
962
  section.wp-block-cover-image h2,
977
963
  .wp-block-cover-image-text,
978
964
  .wp-block-cover-text {
@@ -1046,6 +1032,24 @@ section.wp-block-cover-image > h2,
1046
1032
  color: inherit;
1047
1033
  }
1048
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
+
1049
1053
  .wp-block-details {
1050
1054
  box-sizing: border-box;
1051
1055
  }
@@ -1613,8 +1617,6 @@ h6.has-text-align-left[style*=writing-mode]:where([style*="vertical-lr"]) {
1613
1617
  max-width: 100%;
1614
1618
  vertical-align: bottom;
1615
1619
  box-sizing: border-box;
1616
- width: -moz-fit-content;
1617
- width: fit-content;
1618
1620
  }
1619
1621
  @media (prefers-reduced-motion: no-preference) {
1620
1622
  .wp-block-image img.hide {
@@ -2165,7 +2167,7 @@ ul {
2165
2167
  }
2166
2168
 
2167
2169
  .wp-block-media-text__media a {
2168
- display: inline-block;
2170
+ display: block;
2169
2171
  }
2170
2172
 
2171
2173
  .wp-block-media-text__media img,
@@ -2588,7 +2590,7 @@ button.wp-block-navigation-item__content {
2588
2590
  padding-top: clamp(1rem, var(--wp--style--root--padding-top), 20rem);
2589
2591
  padding-right: clamp(1rem, var(--wp--style--root--padding-right), 20rem);
2590
2592
  padding-bottom: clamp(1rem, var(--wp--style--root--padding-bottom), 20rem);
2591
- padding-left: clamp(1rem, var(--wp--style--root--padding-left), 20em);
2593
+ padding-left: clamp(1rem, var(--wp--style--root--padding-left), 20rem);
2592
2594
  overflow: auto;
2593
2595
  z-index: 100000;
2594
2596
  }
@@ -2797,6 +2799,10 @@ html.has-modal-open {
2797
2799
  background-color: inherit;
2798
2800
  }
2799
2801
 
2802
+ .wp-block-page-list {
2803
+ box-sizing: border-box;
2804
+ }
2805
+
2800
2806
  .is-small-text {
2801
2807
  font-size: 0.875em;
2802
2808
  }
@@ -3374,9 +3380,9 @@ ul.wp-block-rss.is-grid li {
3374
3380
  margin-left: 0;
3375
3381
  flex-shrink: 0;
3376
3382
  max-width: 100%;
3377
- }
3378
- .wp-block-search.wp-block-search__button-only .wp-block-search__button[aria-expanded=true] {
3379
- max-width: calc(100% - 100px);
3383
+ box-sizing: border-box;
3384
+ display: flex;
3385
+ justify-content: center;
3380
3386
  }
3381
3387
  .wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper {
3382
3388
  transition-property: width;
@@ -132,6 +132,7 @@
132
132
  max-width: 240px;
133
133
  }
134
134
 
135
+ .block-library-video-tracks-editor__tracks-informative-message-title,
135
136
  .block-library-video-tracks-editor__single-track-editor-edit-track-label {
136
137
  margin-top: 4px;
137
138
  color: #757575;
@@ -148,4 +149,11 @@
148
149
  .block-library-video-tracks-editor__track-list .components-menu-group__label,
149
150
  .block-library-video-tracks-editor__add-tracks-container .components-menu-group__label {
150
151
  padding: 0;
152
+ }
153
+
154
+ .block-library-video-tracks-editor__tracks-informative-message {
155
+ padding: 8px;
156
+ }
157
+ .block-library-video-tracks-editor__tracks-informative-message-description {
158
+ margin-bottom: 0;
151
159
  }
@@ -132,6 +132,7 @@
132
132
  max-width: 240px;
133
133
  }
134
134
 
135
+ .block-library-video-tracks-editor__tracks-informative-message-title,
135
136
  .block-library-video-tracks-editor__single-track-editor-edit-track-label {
136
137
  margin-top: 4px;
137
138
  color: #757575;
@@ -148,4 +149,11 @@
148
149
  .block-library-video-tracks-editor__track-list .components-menu-group__label,
149
150
  .block-library-video-tracks-editor__add-tracks-container .components-menu-group__label {
150
151
  padding: 0;
152
+ }
153
+
154
+ .block-library-video-tracks-editor__tracks-informative-message {
155
+ padding: 8px;
156
+ }
157
+ .block-library-video-tracks-editor__tracks-informative-message-description {
158
+ margin-bottom: 0;
151
159
  }
@@ -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.11.0",
3
+ "version": "9.12.1-next.082ed6819.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": "*",
43
- "@wordpress/api-fetch": "*",
44
- "@wordpress/autop": "*",
45
- "@wordpress/blob": "*",
46
- "@wordpress/block-editor": "*",
47
- "@wordpress/blocks": "*",
43
+ "@wordpress/a11y": "^4.12.1-next.082ed6819.0",
44
+ "@wordpress/api-fetch": "^7.12.1-next.082ed6819.0",
45
+ "@wordpress/autop": "^4.12.1-next.082ed6819.0",
46
+ "@wordpress/blob": "^4.12.1-next.082ed6819.0",
47
+ "@wordpress/block-editor": "^14.7.1-next.082ed6819.0",
48
+ "@wordpress/blocks": "^14.1.1-next.082ed6819.0",
48
49
  "@wordpress/components": "*",
49
- "@wordpress/compose": "*",
50
- "@wordpress/core-data": "*",
50
+ "@wordpress/compose": "^7.12.1-next.082ed6819.0",
51
+ "@wordpress/core-data": "^7.12.1-next.082ed6819.0",
51
52
  "@wordpress/data": "*",
52
- "@wordpress/date": "*",
53
- "@wordpress/deprecated": "*",
54
- "@wordpress/dom": "*",
55
- "@wordpress/element": "*",
56
- "@wordpress/escape-html": "*",
57
- "@wordpress/hooks": "*",
58
- "@wordpress/html-entities": "*",
59
- "@wordpress/i18n": "*",
60
- "@wordpress/icons": "*",
61
- "@wordpress/interactivity": "*",
62
- "@wordpress/interactivity-router": "*",
63
- "@wordpress/keyboard-shortcuts": "*",
64
- "@wordpress/keycodes": "*",
65
- "@wordpress/notices": "*",
66
- "@wordpress/patterns": "*",
67
- "@wordpress/primitives": "*",
68
- "@wordpress/private-apis": "*",
69
- "@wordpress/reusable-blocks": "*",
70
- "@wordpress/rich-text": "*",
71
- "@wordpress/server-side-render": "*",
72
- "@wordpress/url": "*",
73
- "@wordpress/viewport": "*",
74
- "@wordpress/wordcount": "*",
53
+ "@wordpress/date": "^5.12.1-next.082ed6819.0",
54
+ "@wordpress/deprecated": "^4.12.1-next.082ed6819.0",
55
+ "@wordpress/dom": "^4.12.1-next.082ed6819.0",
56
+ "@wordpress/element": "^6.12.1-next.082ed6819.0",
57
+ "@wordpress/escape-html": "^3.12.1-next.082ed6819.0",
58
+ "@wordpress/hooks": "^4.12.1-next.082ed6819.0",
59
+ "@wordpress/html-entities": "^4.12.1-next.082ed6819.0",
60
+ "@wordpress/i18n": "^5.12.1-next.082ed6819.0",
61
+ "@wordpress/icons": "^10.12.1-next.082ed6819.0",
62
+ "@wordpress/interactivity": "^6.12.1-next.082ed6819.0",
63
+ "@wordpress/interactivity-router": "^2.12.1-next.082ed6819.0",
64
+ "@wordpress/keyboard-shortcuts": "^5.12.1-next.082ed6819.0",
65
+ "@wordpress/keycodes": "^4.12.1-next.082ed6819.0",
66
+ "@wordpress/notices": "^5.12.1-next.082ed6819.0",
67
+ "@wordpress/patterns": "^2.12.1-next.082ed6819.0",
68
+ "@wordpress/primitives": "^4.12.1-next.082ed6819.0",
69
+ "@wordpress/private-apis": "^1.12.1-next.082ed6819.0",
70
+ "@wordpress/reusable-blocks": "^5.12.1-next.082ed6819.0",
71
+ "@wordpress/rich-text": "^7.12.1-next.082ed6819.0",
72
+ "@wordpress/server-side-render": "^5.12.1-next.082ed6819.0",
73
+ "@wordpress/url": "^4.12.1-next.082ed6819.0",
74
+ "@wordpress/viewport": "^6.12.1-next.082ed6819.0",
75
+ "@wordpress/wordcount": "^4.12.1-next.082ed6819.0",
75
76
  "change-case": "^4.1.2",
76
77
  "clsx": "^2.1.1",
77
78
  "colord": "^2.7.0",
@@ -89,6 +90,5 @@
89
90
  "publishConfig": {
90
91
  "access": "public"
91
92
  },
92
- "wpScript": true,
93
- "gitHead": "dcf4613b33b0eda14e203ac30f700ed0db70347f"
93
+ "gitHead": "2bb7bad15ddb8e88210fab7d4a1ef1565466e424"
94
94
  }
@@ -90,22 +90,36 @@ function BlockKeyboardShortcuts() {
90
90
  },
91
91
  } );
92
92
  } );
93
- }, [] );
93
+ }, [ registerShortcut ] );
94
94
 
95
95
  useShortcut(
96
96
  'core/block-editor/transform-heading-to-paragraph',
97
97
  ( event ) => handleTransformHeadingAndParagraph( event, 0 )
98
98
  );
99
-
100
- [ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => {
101
- //the loop is based off on a constant therefore
102
- //the hook will execute the same way every time
103
- //eslint-disable-next-line react-hooks/rules-of-hooks
104
- useShortcut(
105
- `core/block-editor/transform-paragraph-to-heading-${ level }`,
106
- ( event ) => handleTransformHeadingAndParagraph( event, level )
107
- );
108
- } );
99
+ useShortcut(
100
+ 'core/block-editor/transform-paragraph-to-heading-1',
101
+ ( event ) => handleTransformHeadingAndParagraph( event, 1 )
102
+ );
103
+ useShortcut(
104
+ 'core/block-editor/transform-paragraph-to-heading-2',
105
+ ( event ) => handleTransformHeadingAndParagraph( event, 2 )
106
+ );
107
+ useShortcut(
108
+ 'core/block-editor/transform-paragraph-to-heading-3',
109
+ ( event ) => handleTransformHeadingAndParagraph( event, 3 )
110
+ );
111
+ useShortcut(
112
+ 'core/block-editor/transform-paragraph-to-heading-4',
113
+ ( event ) => handleTransformHeadingAndParagraph( event, 4 )
114
+ );
115
+ useShortcut(
116
+ 'core/block-editor/transform-paragraph-to-heading-5',
117
+ ( event ) => handleTransformHeadingAndParagraph( event, 5 )
118
+ );
119
+ useShortcut(
120
+ 'core/block-editor/transform-paragraph-to-heading-6',
121
+ ( event ) => handleTransformHeadingAndParagraph( event, 6 )
122
+ );
109
123
 
110
124
  return null;
111
125
  }
@@ -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,
@@ -17,10 +17,7 @@
17
17
  }
18
18
  },
19
19
  "supports": {
20
- "align": [
21
- "wide",
22
- "full"
23
- ],
20
+ "align": [ "wide", "full" ],
24
21
  "html": false,
25
22
  "color": {
26
23
  "gradients": true,
@@ -63,8 +60,5 @@
63
60
  }
64
61
  },
65
62
  "editorStyle": "wp-block-comments-editor",
66
- "usesContext": [
67
- "postId",
68
- "postType"
69
- ]
70
- }
63
+ "usesContext": [ "postId", "postType" ]
64
+ }
@@ -164,7 +164,7 @@ const v8ToV11BlockAttributes = {
164
164
  },
165
165
  };
166
166
 
167
- const v12BlockAttributes = {
167
+ const v12toV13BlockAttributes = {
168
168
  ...v8ToV11BlockAttributes,
169
169
  useFeaturedImage: {
170
170
  type: 'boolean',
@@ -176,6 +176,20 @@ const v12BlockAttributes = {
176
176
  },
177
177
  };
178
178
 
179
+ const v14BlockAttributes = {
180
+ ...v12toV13BlockAttributes,
181
+ isUserOverlayColor: {
182
+ type: 'boolean',
183
+ },
184
+ sizeSlug: {
185
+ type: 'string',
186
+ },
187
+ alt: {
188
+ type: 'string',
189
+ default: '',
190
+ },
191
+ };
192
+
179
193
  const v7toV11BlockSupports = {
180
194
  anchor: true,
181
195
  align: true,
@@ -244,9 +258,173 @@ const v12BlockSupports = {
244
258
  },
245
259
  };
246
260
 
261
+ const v14BlockSupports = {
262
+ ...v12BlockSupports,
263
+ shadow: true,
264
+ dimensions: {
265
+ aspectRatio: true,
266
+ },
267
+ interactivity: {
268
+ clientNavigation: true,
269
+ },
270
+ };
271
+
272
+ // Deprecation for blocks that have z-index.
273
+ const v14 = {
274
+ attributes: v14BlockAttributes,
275
+ supports: v14BlockSupports,
276
+ save( { attributes } ) {
277
+ const {
278
+ backgroundType,
279
+ gradient,
280
+ contentPosition,
281
+ customGradient,
282
+ customOverlayColor,
283
+ dimRatio,
284
+ focalPoint,
285
+ useFeaturedImage,
286
+ hasParallax,
287
+ isDark,
288
+ isRepeated,
289
+ overlayColor,
290
+ url,
291
+ alt,
292
+ id,
293
+ minHeight: minHeightProp,
294
+ minHeightUnit,
295
+ tagName: Tag,
296
+ sizeSlug,
297
+ } = attributes;
298
+ const overlayColorClass = getColorClassName(
299
+ 'background-color',
300
+ overlayColor
301
+ );
302
+ const gradientClass = __experimentalGetGradientClass( gradient );
303
+ const minHeight =
304
+ minHeightProp && minHeightUnit
305
+ ? `${ minHeightProp }${ minHeightUnit }`
306
+ : minHeightProp;
307
+
308
+ const isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;
309
+ const isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;
310
+
311
+ const isImgElement = ! ( hasParallax || isRepeated );
312
+
313
+ const style = {
314
+ minHeight: minHeight || undefined,
315
+ };
316
+
317
+ const bgStyle = {
318
+ backgroundColor: ! overlayColorClass
319
+ ? customOverlayColor
320
+ : undefined,
321
+ background: customGradient ? customGradient : undefined,
322
+ };
323
+
324
+ const objectPosition =
325
+ // prettier-ignore
326
+ focalPoint && isImgElement
327
+ ? mediaPosition(focalPoint)
328
+ : undefined;
329
+
330
+ const backgroundImage = url ? `url(${ url })` : undefined;
331
+
332
+ const backgroundPosition = mediaPosition( focalPoint );
333
+
334
+ const classes = clsx(
335
+ {
336
+ 'is-light': ! isDark,
337
+ 'has-parallax': hasParallax,
338
+ 'is-repeated': isRepeated,
339
+ 'has-custom-content-position':
340
+ ! isContentPositionCenter( contentPosition ),
341
+ },
342
+ getPositionClassName( contentPosition )
343
+ );
344
+
345
+ const imgClasses = clsx(
346
+ 'wp-block-cover__image-background',
347
+ id ? `wp-image-${ id }` : null,
348
+ {
349
+ [ `size-${ sizeSlug }` ]: sizeSlug,
350
+ 'has-parallax': hasParallax,
351
+ 'is-repeated': isRepeated,
352
+ }
353
+ );
354
+
355
+ const gradientValue = gradient || customGradient;
356
+
357
+ return (
358
+ <Tag { ...useBlockProps.save( { className: classes, style } ) }>
359
+ <span
360
+ aria-hidden="true"
361
+ className={ clsx(
362
+ 'wp-block-cover__background',
363
+ overlayColorClass,
364
+ dimRatioToClass( dimRatio ),
365
+ {
366
+ 'has-background-dim': dimRatio !== undefined,
367
+ // For backwards compatibility. Former versions of the Cover Block applied
368
+ // `.wp-block-cover__gradient-background` in the presence of
369
+ // media, a gradient and a dim.
370
+ 'wp-block-cover__gradient-background':
371
+ url && gradientValue && dimRatio !== 0,
372
+ 'has-background-gradient': gradientValue,
373
+ [ gradientClass ]: gradientClass,
374
+ }
375
+ ) }
376
+ style={ bgStyle }
377
+ />
378
+
379
+ { ! useFeaturedImage &&
380
+ isImageBackground &&
381
+ url &&
382
+ ( isImgElement ? (
383
+ <img
384
+ className={ imgClasses }
385
+ alt={ alt }
386
+ src={ url }
387
+ style={ { objectPosition } }
388
+ data-object-fit="cover"
389
+ data-object-position={ objectPosition }
390
+ />
391
+ ) : (
392
+ <div
393
+ role={ alt ? 'img' : undefined }
394
+ aria-label={ alt ? alt : undefined }
395
+ className={ imgClasses }
396
+ style={ { backgroundPosition, backgroundImage } }
397
+ />
398
+ ) ) }
399
+ { isVideoBackground && url && (
400
+ <video
401
+ className={ clsx(
402
+ 'wp-block-cover__video-background',
403
+ 'intrinsic-ignore'
404
+ ) }
405
+ autoPlay
406
+ muted
407
+ loop
408
+ playsInline
409
+ src={ url }
410
+ style={ { objectPosition } }
411
+ data-object-fit="cover"
412
+ data-object-position={ objectPosition }
413
+ />
414
+ ) }
415
+ <div
416
+ { ...useInnerBlocksProps.save( {
417
+ className: 'wp-block-cover__inner-container',
418
+ } ) }
419
+ />
420
+ </Tag>
421
+ );
422
+ },
423
+ };
424
+
247
425
  // Deprecation for blocks that does not have the aria-label when the image background is fixed or repeated.
248
426
  const v13 = {
249
- attributes: v12BlockAttributes,
427
+ attributes: v12toV13BlockAttributes,
250
428
  supports: v12BlockSupports,
251
429
  save( { attributes } ) {
252
430
  const {
@@ -396,7 +574,7 @@ const v13 = {
396
574
 
397
575
  // Deprecation for blocks to prevent auto overlay color from overriding previously set values.
398
576
  const v12 = {
399
- attributes: v12BlockAttributes,
577
+ attributes: v12toV13BlockAttributes,
400
578
  supports: v12BlockSupports,
401
579
  isEligible( attributes ) {
402
580
  return (
@@ -1824,4 +2002,4 @@ const v1 = {
1824
2002
  },
1825
2003
  };
1826
2004
 
1827
- export default [ v13, v12, v11, v10, v9, v8, v7, v6, v5, v4, v3, v2, v1 ];
2005
+ export default [ v14, v13, v12, v11, v10, v9, v8, v7, v6, v5, v4, v3, v2, v1 ];