@wordpress/block-library 9.6.0 → 9.7.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 (313) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/audio/edit.js +2 -1
  3. package/build/audio/edit.js.map +1 -1
  4. package/build/block/edit.js +3 -5
  5. package/build/block/edit.js.map +1 -1
  6. package/build/button/edit.js +1 -1
  7. package/build/button/edit.js.map +1 -1
  8. package/build/categories/index.js +1 -0
  9. package/build/categories/index.js.map +1 -1
  10. package/build/comment-edit-link/index.js +13 -2
  11. package/build/comment-edit-link/index.js.map +1 -1
  12. package/build/comment-reply-link/index.js +13 -2
  13. package/build/comment-reply-link/index.js.map +1 -1
  14. package/build/comments/edit/comments-legacy.js +4 -1
  15. package/build/comments/edit/comments-legacy.js.map +1 -1
  16. package/build/cover/edit/block-controls.js +4 -2
  17. package/build/cover/edit/block-controls.js.map +1 -1
  18. package/build/cover/edit/index.js +2 -1
  19. package/build/cover/edit/index.js.map +1 -1
  20. package/build/cover/edit/inspector-controls.js +4 -12
  21. package/build/cover/edit/inspector-controls.js.map +1 -1
  22. package/build/details/index.js +3 -1
  23. package/build/details/index.js.map +1 -1
  24. package/build/details/transforms.js +24 -0
  25. package/build/details/transforms.js.map +1 -0
  26. package/build/embed/embed-placeholder.js +8 -2
  27. package/build/embed/embed-placeholder.js.map +1 -1
  28. package/build/file/edit.js +12 -1
  29. package/build/file/edit.js.map +1 -1
  30. package/build/freeform/edit.js +4 -4
  31. package/build/freeform/edit.js.map +1 -1
  32. package/build/freeform/modal.js +12 -3
  33. package/build/freeform/modal.js.map +1 -1
  34. package/build/home-link/edit.js +3 -9
  35. package/build/home-link/edit.js.map +1 -1
  36. package/build/image/edit.js +44 -34
  37. package/build/image/edit.js.map +1 -1
  38. package/build/image/image.js +22 -10
  39. package/build/image/image.js.map +1 -1
  40. package/build/media-text/deprecated.js +144 -3
  41. package/build/media-text/deprecated.js.map +1 -1
  42. package/build/media-text/edit.js +5 -5
  43. package/build/media-text/edit.js.map +1 -1
  44. package/build/media-text/image-fill.js +12 -0
  45. package/build/media-text/image-fill.js.map +1 -0
  46. package/build/media-text/media-container.js +21 -18
  47. package/build/media-text/media-container.js.map +1 -1
  48. package/build/media-text/media-container.native.js +0 -7
  49. package/build/media-text/media-container.native.js.map +1 -1
  50. package/build/media-text/save.js +5 -6
  51. package/build/media-text/save.js.map +1 -1
  52. package/build/missing/edit.js +6 -3
  53. package/build/missing/edit.js.map +1 -1
  54. package/build/navigation/edit/deleted-navigation-warning.js +4 -1
  55. package/build/navigation/edit/deleted-navigation-warning.js.map +1 -1
  56. package/build/navigation/edit/index.js +4 -1
  57. package/build/navigation/edit/index.js.map +1 -1
  58. package/build/navigation/edit/navigation-menu-delete-control.js +4 -1
  59. package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  60. package/build/navigation/edit/placeholder/index.js +4 -1
  61. package/build/navigation/edit/placeholder/index.js.map +1 -1
  62. package/build/navigation/edit/responsive-wrapper.js +8 -2
  63. package/build/navigation/edit/responsive-wrapper.js.map +1 -1
  64. package/build/navigation/edit/unsaved-inner-blocks.js +4 -4
  65. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  66. package/build/navigation-link/link-ui.js +5 -2
  67. package/build/navigation-link/link-ui.js.map +1 -1
  68. package/build/page-list/convert-to-links-modal.js +8 -2
  69. package/build/page-list/convert-to-links-modal.js.map +1 -1
  70. package/build/page-list/edit.js +7 -2
  71. package/build/page-list/edit.js.map +1 -1
  72. package/build/post-comments-form/form.js +4 -1
  73. package/build/post-comments-form/form.js.map +1 -1
  74. package/build/post-featured-image/dimension-controls.js +6 -8
  75. package/build/post-featured-image/dimension-controls.js.map +1 -1
  76. package/build/post-featured-image/edit.js +5 -5
  77. package/build/post-featured-image/edit.js.map +1 -1
  78. package/build/query/edit/enhanced-pagination-modal.js +4 -1
  79. package/build/query/edit/enhanced-pagination-modal.js.map +1 -1
  80. package/build/query/edit/query-placeholder.js +8 -2
  81. package/build/query/edit/query-placeholder.js.map +1 -1
  82. package/build/site-logo/edit.js +15 -15
  83. package/build/site-logo/edit.js.map +1 -1
  84. package/build/social-link/edit.js +4 -1
  85. package/build/social-link/edit.js.map +1 -1
  86. package/build/social-links/edit.js +10 -9
  87. package/build/social-links/edit.js.map +1 -1
  88. package/build/template-part/edit/advanced-controls.js.map +1 -1
  89. package/build/template-part/edit/index.js +1 -1
  90. package/build/template-part/edit/index.js.map +1 -1
  91. package/build/template-part/edit/placeholder.js +8 -2
  92. package/build/template-part/edit/placeholder.js.map +1 -1
  93. package/build/utils/hooks.js +10 -10
  94. package/build/utils/hooks.js.map +1 -1
  95. package/build/video/edit.js +22 -14
  96. package/build/video/edit.js.map +1 -1
  97. package/build/video/tracks-editor.js +12 -3
  98. package/build/video/tracks-editor.js.map +1 -1
  99. package/build-module/audio/edit.js +2 -1
  100. package/build-module/audio/edit.js.map +1 -1
  101. package/build-module/block/edit.js +4 -6
  102. package/build-module/block/edit.js.map +1 -1
  103. package/build-module/button/edit.js +1 -1
  104. package/build-module/button/edit.js.map +1 -1
  105. package/build-module/categories/index.js +1 -0
  106. package/build-module/categories/index.js.map +1 -1
  107. package/build-module/comment-edit-link/index.js +13 -2
  108. package/build-module/comment-edit-link/index.js.map +1 -1
  109. package/build-module/comment-reply-link/index.js +13 -2
  110. package/build-module/comment-reply-link/index.js.map +1 -1
  111. package/build-module/comments/edit/comments-legacy.js +4 -1
  112. package/build-module/comments/edit/comments-legacy.js.map +1 -1
  113. package/build-module/cover/edit/block-controls.js +4 -2
  114. package/build-module/cover/edit/block-controls.js.map +1 -1
  115. package/build-module/cover/edit/index.js +2 -1
  116. package/build-module/cover/edit/index.js.map +1 -1
  117. package/build-module/cover/edit/inspector-controls.js +5 -13
  118. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  119. package/build-module/details/index.js +3 -1
  120. package/build-module/details/index.js.map +1 -1
  121. package/build-module/details/transforms.js +18 -0
  122. package/build-module/details/transforms.js.map +1 -0
  123. package/build-module/embed/embed-placeholder.js +8 -2
  124. package/build-module/embed/embed-placeholder.js.map +1 -1
  125. package/build-module/file/edit.js +12 -1
  126. package/build-module/file/edit.js.map +1 -1
  127. package/build-module/freeform/edit.js +4 -4
  128. package/build-module/freeform/edit.js.map +1 -1
  129. package/build-module/freeform/modal.js +12 -3
  130. package/build-module/freeform/modal.js.map +1 -1
  131. package/build-module/home-link/edit.js +3 -9
  132. package/build-module/home-link/edit.js.map +1 -1
  133. package/build-module/image/edit.js +45 -34
  134. package/build-module/image/edit.js.map +1 -1
  135. package/build-module/image/image.js +23 -11
  136. package/build-module/image/image.js.map +1 -1
  137. package/build-module/media-text/deprecated.js +144 -3
  138. package/build-module/media-text/deprecated.js.map +1 -1
  139. package/build-module/media-text/edit.js +5 -5
  140. package/build-module/media-text/edit.js.map +1 -1
  141. package/build-module/media-text/image-fill.js +6 -0
  142. package/build-module/media-text/image-fill.js.map +1 -0
  143. package/build-module/media-text/media-container.js +21 -17
  144. package/build-module/media-text/media-container.js.map +1 -1
  145. package/build-module/media-text/media-container.native.js +0 -1
  146. package/build-module/media-text/media-container.native.js.map +1 -1
  147. package/build-module/media-text/save.js +5 -6
  148. package/build-module/media-text/save.js.map +1 -1
  149. package/build-module/missing/edit.js +6 -3
  150. package/build-module/missing/edit.js.map +1 -1
  151. package/build-module/navigation/edit/deleted-navigation-warning.js +4 -1
  152. package/build-module/navigation/edit/deleted-navigation-warning.js.map +1 -1
  153. package/build-module/navigation/edit/index.js +4 -1
  154. package/build-module/navigation/edit/index.js.map +1 -1
  155. package/build-module/navigation/edit/navigation-menu-delete-control.js +4 -1
  156. package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  157. package/build-module/navigation/edit/placeholder/index.js +4 -1
  158. package/build-module/navigation/edit/placeholder/index.js.map +1 -1
  159. package/build-module/navigation/edit/responsive-wrapper.js +8 -2
  160. package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
  161. package/build-module/navigation/edit/unsaved-inner-blocks.js +4 -4
  162. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  163. package/build-module/navigation-link/link-ui.js +7 -4
  164. package/build-module/navigation-link/link-ui.js.map +1 -1
  165. package/build-module/page-list/convert-to-links-modal.js +8 -2
  166. package/build-module/page-list/convert-to-links-modal.js.map +1 -1
  167. package/build-module/page-list/edit.js +7 -2
  168. package/build-module/page-list/edit.js.map +1 -1
  169. package/build-module/post-comments-form/form.js +4 -1
  170. package/build-module/post-comments-form/form.js.map +1 -1
  171. package/build-module/post-featured-image/dimension-controls.js +6 -8
  172. package/build-module/post-featured-image/dimension-controls.js.map +1 -1
  173. package/build-module/post-featured-image/edit.js +6 -6
  174. package/build-module/post-featured-image/edit.js.map +1 -1
  175. package/build-module/query/edit/enhanced-pagination-modal.js +4 -1
  176. package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -1
  177. package/build-module/query/edit/query-placeholder.js +8 -2
  178. package/build-module/query/edit/query-placeholder.js.map +1 -1
  179. package/build-module/site-logo/edit.js +16 -16
  180. package/build-module/site-logo/edit.js.map +1 -1
  181. package/build-module/social-link/edit.js +4 -1
  182. package/build-module/social-link/edit.js.map +1 -1
  183. package/build-module/social-links/edit.js +11 -10
  184. package/build-module/social-links/edit.js.map +1 -1
  185. package/build-module/template-part/edit/advanced-controls.js.map +1 -1
  186. package/build-module/template-part/edit/index.js +1 -1
  187. package/build-module/template-part/edit/index.js.map +1 -1
  188. package/build-module/template-part/edit/placeholder.js +8 -2
  189. package/build-module/template-part/edit/placeholder.js.map +1 -1
  190. package/build-module/utils/hooks.js +10 -10
  191. package/build-module/utils/hooks.js.map +1 -1
  192. package/build-module/video/edit.js +22 -15
  193. package/build-module/video/edit.js.map +1 -1
  194. package/build-module/video/tracks-editor.js +12 -3
  195. package/build-module/video/tracks-editor.js.map +1 -1
  196. package/build-style/button/editor-rtl.css +0 -4
  197. package/build-style/button/editor.css +0 -4
  198. package/build-style/buttons/editor-rtl.css +0 -3
  199. package/build-style/buttons/editor.css +0 -3
  200. package/build-style/comment-edit-link/style-rtl.css +94 -0
  201. package/build-style/comment-edit-link/style.css +94 -0
  202. package/build-style/comment-reply-link/style-rtl.css +94 -0
  203. package/build-style/comment-reply-link/style.css +94 -0
  204. package/build-style/comments-pagination/editor-rtl.css +2 -2
  205. package/build-style/comments-pagination/editor.css +2 -2
  206. package/build-style/cover/editor-rtl.css +0 -6
  207. package/build-style/cover/editor.css +0 -6
  208. package/build-style/editor-rtl.css +24 -68
  209. package/build-style/editor.css +24 -70
  210. package/build-style/group/editor-rtl.css +0 -1
  211. package/build-style/group/editor.css +0 -1
  212. package/build-style/image/editor-rtl.css +0 -1
  213. package/build-style/image/editor.css +0 -1
  214. package/build-style/media-text/editor-rtl.css +3 -1
  215. package/build-style/media-text/editor.css +3 -1
  216. package/build-style/media-text/style-rtl.css +20 -0
  217. package/build-style/media-text/style.css +20 -0
  218. package/build-style/navigation/editor-rtl.css +0 -1
  219. package/build-style/navigation/editor.css +0 -1
  220. package/build-style/post-featured-image/style-rtl.css +1 -1
  221. package/build-style/post-featured-image/style.css +1 -1
  222. package/build-style/query-pagination/editor-rtl.css +2 -16
  223. package/build-style/query-pagination/editor.css +2 -18
  224. package/build-style/query-pagination/style-rtl.css +0 -11
  225. package/build-style/query-pagination/style.css +0 -13
  226. package/build-style/site-title/editor-rtl.css +0 -4
  227. package/build-style/site-title/editor.css +0 -4
  228. package/build-style/social-links/editor-rtl.css +17 -0
  229. package/build-style/social-links/editor.css +17 -0
  230. package/build-style/style-rtl.css +29 -12
  231. package/build-style/style.css +29 -14
  232. package/build-style/video/editor-rtl.css +0 -29
  233. package/build-style/video/editor.css +0 -29
  234. package/package.json +35 -35
  235. package/src/audio/edit.js +1 -0
  236. package/src/block/edit.js +6 -4
  237. package/src/button/edit.js +1 -1
  238. package/src/button/editor.scss +0 -5
  239. package/src/buttons/editor.scss +0 -6
  240. package/src/categories/block.json +1 -0
  241. package/src/categories/index.php +13 -2
  242. package/src/comment-date/index.php +1 -1
  243. package/src/comment-edit-link/block.json +13 -2
  244. package/src/comment-edit-link/style.scss +4 -0
  245. package/src/comment-reply-link/block.json +13 -2
  246. package/src/comment-reply-link/style.scss +4 -0
  247. package/src/comments/edit/comments-legacy.js +2 -0
  248. package/src/comments-pagination/editor.scss +1 -1
  249. package/src/cover/edit/block-controls.js +2 -0
  250. package/src/cover/edit/index.js +1 -0
  251. package/src/cover/edit/inspector-controls.js +3 -15
  252. package/src/cover/editor.scss +0 -5
  253. package/src/cover/test/edit.js +30 -26
  254. package/src/details/index.js +2 -0
  255. package/src/details/transforms.js +26 -0
  256. package/src/embed/embed-placeholder.js +12 -2
  257. package/src/file/edit.js +11 -0
  258. package/src/form/index.php +2 -2
  259. package/src/freeform/edit.js +4 -4
  260. package/src/freeform/editor.scss +1 -1
  261. package/src/freeform/modal.js +10 -1
  262. package/src/gallery/editor.scss +1 -1
  263. package/src/group/editor.scss +0 -1
  264. package/src/home-link/edit.js +4 -7
  265. package/src/image/edit.js +42 -30
  266. package/src/image/editor.scss +0 -3
  267. package/src/image/image.js +75 -53
  268. package/src/media-text/deprecated.js +159 -3
  269. package/src/media-text/edit.js +5 -5
  270. package/src/media-text/editor.scss +3 -1
  271. package/src/media-text/image-fill.js +11 -0
  272. package/src/media-text/index.php +53 -43
  273. package/src/media-text/media-container.js +25 -25
  274. package/src/media-text/media-container.native.js +0 -2
  275. package/src/media-text/save.js +9 -13
  276. package/src/media-text/style.scss +21 -0
  277. package/src/media-text/test/image-fill.js +19 -0
  278. package/src/missing/edit.js +9 -3
  279. package/src/navigation/edit/deleted-navigation-warning.js +8 -1
  280. package/src/navigation/edit/index.js +2 -0
  281. package/src/navigation/edit/navigation-menu-delete-control.js +2 -0
  282. package/src/navigation/edit/placeholder/index.js +2 -0
  283. package/src/navigation/edit/responsive-wrapper.js +4 -0
  284. package/src/navigation/edit/unsaved-inner-blocks.js +4 -4
  285. package/src/navigation/editor.scss +6 -3
  286. package/src/navigation-link/link-ui.js +5 -3
  287. package/src/page-list/convert-to-links-modal.js +8 -1
  288. package/src/page-list/edit.js +7 -1
  289. package/src/page-list/index.php +3 -1
  290. package/src/post-comments-form/form.js +2 -0
  291. package/src/post-date/index.php +3 -3
  292. package/src/post-featured-image/dimension-controls.js +4 -4
  293. package/src/post-featured-image/edit.js +4 -6
  294. package/src/post-featured-image/style.scss +1 -1
  295. package/src/query/edit/enhanced-pagination-modal.js +6 -1
  296. package/src/query/edit/query-placeholder.js +4 -0
  297. package/src/query-pagination/editor.scss +1 -21
  298. package/src/query-pagination/style.scss +0 -15
  299. package/src/site-logo/edit.js +13 -20
  300. package/src/site-title/editor.scss +0 -4
  301. package/src/social-link/edit.js +2 -0
  302. package/src/social-links/edit.js +17 -10
  303. package/src/social-links/editor.scss +24 -5
  304. package/src/style.scss +2 -0
  305. package/src/tag-cloud/index.php +7 -2
  306. package/src/template-part/edit/advanced-controls.js +0 -1
  307. package/src/template-part/edit/index.js +12 -10
  308. package/src/template-part/edit/placeholder.js +8 -1
  309. package/src/utils/hooks.js +11 -11
  310. package/src/video/edit.js +26 -21
  311. package/src/video/editor.scss +0 -45
  312. package/src/video/tracks-editor.js +6 -0
  313. package/src/media-text/test/media-container.js +0 -24
@@ -89,28 +89,6 @@
89
89
  /**
90
90
  * Reset the WP Admin page styles for Gutenberg-like pages.
91
91
  */
92
- .wp-block-video.wp-block-video.is-selected .components-placeholder {
93
- color: #1e1e1e;
94
- background-color: #fff;
95
- box-shadow: inset 0 0 0 1px #1e1e1e;
96
- border: none;
97
- border-radius: 2px;
98
- }
99
- .wp-block-video.wp-block-video.is-selected .components-placeholder > svg {
100
- opacity: 0;
101
- }
102
- .wp-block-video.wp-block-video.is-selected .components-placeholder .components-placeholder__illustration {
103
- display: none;
104
- }
105
- .wp-block-video.wp-block-video.is-selected .components-placeholder::before {
106
- opacity: 0;
107
- }
108
- .wp-block-video.wp-block-video .components-placeholder__label,
109
- .wp-block-video.wp-block-video .components-placeholder__instructions,
110
- .wp-block-video.wp-block-video .components-button {
111
- transition: none;
112
- }
113
-
114
92
  .wp-block[data-align=center] > .wp-block-video {
115
93
  text-align: center;
116
94
  }
@@ -156,16 +134,9 @@
156
134
 
157
135
  .block-library-video-tracks-editor > .components-popover__content {
158
136
  width: 360px;
159
- padding: 0;
160
137
  }
161
138
 
162
139
  .block-library-video-tracks-editor__track-list .components-menu-group__label,
163
140
  .block-library-video-tracks-editor__add-tracks-container .components-menu-group__label {
164
141
  padding: 0;
165
- }
166
-
167
- .block-library-video-tracks-editor__single-track-editor,
168
- .block-library-video-tracks-editor__track-list,
169
- .block-library-video-tracks-editor__add-tracks-container {
170
- padding: 12px;
171
142
  }
@@ -89,28 +89,6 @@
89
89
  /**
90
90
  * Reset the WP Admin page styles for Gutenberg-like pages.
91
91
  */
92
- .wp-block-video.wp-block-video.is-selected .components-placeholder {
93
- color: #1e1e1e;
94
- background-color: #fff;
95
- box-shadow: inset 0 0 0 1px #1e1e1e;
96
- border: none;
97
- border-radius: 2px;
98
- }
99
- .wp-block-video.wp-block-video.is-selected .components-placeholder > svg {
100
- opacity: 0;
101
- }
102
- .wp-block-video.wp-block-video.is-selected .components-placeholder .components-placeholder__illustration {
103
- display: none;
104
- }
105
- .wp-block-video.wp-block-video.is-selected .components-placeholder::before {
106
- opacity: 0;
107
- }
108
- .wp-block-video.wp-block-video .components-placeholder__label,
109
- .wp-block-video.wp-block-video .components-placeholder__instructions,
110
- .wp-block-video.wp-block-video .components-button {
111
- transition: none;
112
- }
113
-
114
92
  .wp-block[data-align=center] > .wp-block-video {
115
93
  text-align: center;
116
94
  }
@@ -156,16 +134,9 @@
156
134
 
157
135
  .block-library-video-tracks-editor > .components-popover__content {
158
136
  width: 360px;
159
- padding: 0;
160
137
  }
161
138
 
162
139
  .block-library-video-tracks-editor__track-list .components-menu-group__label,
163
140
  .block-library-video-tracks-editor__add-tracks-container .components-menu-group__label {
164
141
  padding: 0;
165
- }
166
-
167
- .block-library-video-tracks-editor__single-track-editor,
168
- .block-library-video-tracks-editor__track-list,
169
- .block-library-video-tracks-editor__add-tracks-container {
170
- padding: 12px;
171
142
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-library",
3
- "version": "9.6.0",
3
+ "version": "9.7.0",
4
4
  "description": "Block library for the WordPress editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -32,39 +32,39 @@
32
32
  ],
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.16.0",
35
- "@wordpress/a11y": "^4.6.0",
36
- "@wordpress/api-fetch": "^7.6.0",
37
- "@wordpress/autop": "^4.6.0",
38
- "@wordpress/blob": "^4.6.0",
39
- "@wordpress/block-editor": "^14.1.0",
40
- "@wordpress/blocks": "^13.6.0",
41
- "@wordpress/components": "^28.6.0",
42
- "@wordpress/compose": "^7.6.0",
43
- "@wordpress/core-data": "^7.6.0",
44
- "@wordpress/data": "^10.6.0",
45
- "@wordpress/date": "^5.6.0",
46
- "@wordpress/deprecated": "^4.6.0",
47
- "@wordpress/dom": "^4.6.0",
48
- "@wordpress/element": "^6.6.0",
49
- "@wordpress/escape-html": "^3.6.0",
50
- "@wordpress/hooks": "^4.6.0",
51
- "@wordpress/html-entities": "^4.6.0",
52
- "@wordpress/i18n": "^5.6.0",
53
- "@wordpress/icons": "^10.6.0",
54
- "@wordpress/interactivity": "^6.6.0",
55
- "@wordpress/interactivity-router": "^2.6.0",
56
- "@wordpress/keyboard-shortcuts": "^5.6.0",
57
- "@wordpress/keycodes": "^4.6.0",
58
- "@wordpress/notices": "^5.6.0",
59
- "@wordpress/patterns": "^2.6.0",
60
- "@wordpress/primitives": "^4.6.0",
61
- "@wordpress/private-apis": "^1.6.0",
62
- "@wordpress/reusable-blocks": "^5.6.0",
63
- "@wordpress/rich-text": "^7.6.0",
64
- "@wordpress/server-side-render": "^5.6.0",
65
- "@wordpress/url": "^4.6.0",
66
- "@wordpress/viewport": "^6.6.0",
67
- "@wordpress/wordcount": "^4.6.0",
35
+ "@wordpress/a11y": "^4.7.0",
36
+ "@wordpress/api-fetch": "^7.7.0",
37
+ "@wordpress/autop": "^4.7.0",
38
+ "@wordpress/blob": "^4.7.0",
39
+ "@wordpress/block-editor": "^14.2.0",
40
+ "@wordpress/blocks": "^13.7.0",
41
+ "@wordpress/components": "^28.7.0",
42
+ "@wordpress/compose": "^7.7.0",
43
+ "@wordpress/core-data": "^7.7.0",
44
+ "@wordpress/data": "^10.7.0",
45
+ "@wordpress/date": "^5.7.0",
46
+ "@wordpress/deprecated": "^4.7.0",
47
+ "@wordpress/dom": "^4.7.0",
48
+ "@wordpress/element": "^6.7.0",
49
+ "@wordpress/escape-html": "^3.7.0",
50
+ "@wordpress/hooks": "^4.7.0",
51
+ "@wordpress/html-entities": "^4.7.0",
52
+ "@wordpress/i18n": "^5.7.0",
53
+ "@wordpress/icons": "^10.7.0",
54
+ "@wordpress/interactivity": "^6.7.0",
55
+ "@wordpress/interactivity-router": "^2.7.0",
56
+ "@wordpress/keyboard-shortcuts": "^5.7.0",
57
+ "@wordpress/keycodes": "^4.7.0",
58
+ "@wordpress/notices": "^5.7.0",
59
+ "@wordpress/patterns": "^2.7.0",
60
+ "@wordpress/primitives": "^4.7.0",
61
+ "@wordpress/private-apis": "^1.7.0",
62
+ "@wordpress/reusable-blocks": "^5.7.0",
63
+ "@wordpress/rich-text": "^7.7.0",
64
+ "@wordpress/server-side-render": "^5.7.0",
65
+ "@wordpress/url": "^4.7.0",
66
+ "@wordpress/viewport": "^6.7.0",
67
+ "@wordpress/wordcount": "^4.7.0",
68
68
  "change-case": "^4.1.2",
69
69
  "clsx": "^2.1.1",
70
70
  "colord": "^2.7.0",
@@ -82,5 +82,5 @@
82
82
  "publishConfig": {
83
83
  "access": "public"
84
84
  },
85
- "gitHead": "ab9564947967bb3f00343130954b9efacba6cdd7"
85
+ "gitHead": "c90d920de07c53dff82c5914635b56fafa503b7f"
86
86
  }
package/src/audio/edit.js CHANGED
@@ -155,6 +155,7 @@ function AudioEdit( {
155
155
  onSelect={ onSelectAudio }
156
156
  onSelectURL={ onSelectURL }
157
157
  onError={ onUploadError }
158
+ onReset={ () => onSelectAudio( undefined ) }
158
159
  />
159
160
  </BlockControls>
160
161
  ) }
package/src/block/edit.js CHANGED
@@ -29,6 +29,7 @@ import {
29
29
  privateApis as blockEditorPrivateApis,
30
30
  store as blockEditorStore,
31
31
  BlockControls,
32
+ InnerBlocks,
32
33
  } from '@wordpress/block-editor';
33
34
  import { privateApis as patternsPrivateApis } from '@wordpress/patterns';
34
35
  import { store as blocksStore } from '@wordpress/blocks';
@@ -247,14 +248,15 @@ function ReusableBlockEdit( {
247
248
  ),
248
249
  } );
249
250
 
250
- // Use `blocks` variable until `innerBlocks` is populated, which has the proper clientIds.
251
251
  const innerBlocksProps = useInnerBlocksProps( blockProps, {
252
252
  templateLock: 'all',
253
253
  layout,
254
- value: innerBlocks.length > 0 ? innerBlocks : blocks,
254
+ value: blocks,
255
255
  onInput: NOOP,
256
256
  onChange: NOOP,
257
- renderAppender: blocks?.length ? undefined : blocks.ButtonBlockAppender,
257
+ renderAppender: blocks?.length
258
+ ? undefined
259
+ : InnerBlocks.ButtonBlockAppender,
258
260
  } );
259
261
 
260
262
  const handleEditOriginal = () => {
@@ -292,7 +294,7 @@ function ReusableBlockEdit( {
292
294
 
293
295
  return (
294
296
  <>
295
- { hasResolved && (
297
+ { hasResolved && ! isMissing && (
296
298
  <ReusableBlockControl
297
299
  recordId={ ref }
298
300
  canOverrideBlocks={ canOverrideBlocks }
@@ -254,7 +254,7 @@ function ButtonEdit( props ) {
254
254
  } ),
255
255
  };
256
256
  },
257
- [ isSelected, metadata?.bindings?.url ]
257
+ [ context, isSelected, metadata?.bindings?.url ]
258
258
  );
259
259
 
260
260
  return (
@@ -32,8 +32,3 @@
32
32
  div[data-type="core/button"] {
33
33
  display: table;
34
34
  }
35
-
36
- .editor-styles-wrapper .wp-block-button[style*="text-decoration"] .wp-block-button__link {
37
- text-decoration: inherit;
38
- }
39
-
@@ -52,12 +52,6 @@ $blocks-block__margin: 0.5em;
52
52
  margin-bottom: 0;
53
53
  }
54
54
  }
55
-
56
- .editor-styles-wrapper &.has-custom-font-size {
57
- .wp-block-button__link {
58
- font-size: inherit;
59
- }
60
- }
61
55
  }
62
56
 
63
57
  .wp-block[data-align="center"] > .wp-block-buttons {
@@ -36,6 +36,7 @@
36
36
  "default": true
37
37
  }
38
38
  },
39
+ "usesContext": [ "enhancedPagination" ],
39
40
  "supports": {
40
41
  "align": true,
41
42
  "html": false,
@@ -9,12 +9,15 @@
9
9
  * Renders the `core/categories` block on server.
10
10
  *
11
11
  * @since 5.0.0
12
+ * @since 6.7.0 Enable client-side rendering if enhancedPagination context is true.
12
13
  *
13
- * @param array $attributes The block attributes.
14
+ * @param array $attributes The block attributes.
15
+ * @param string $content Block default content.
16
+ * @param WP_Block $block Block instance.
14
17
  *
15
18
  * @return string Returns the categories list/dropdown markup.
16
19
  */
17
- function render_block_core_categories( $attributes ) {
20
+ function render_block_core_categories( $attributes, $content, $block ) {
18
21
  static $block_id = 0;
19
22
  ++$block_id;
20
23
 
@@ -54,6 +57,14 @@ function render_block_core_categories( $attributes ) {
54
57
  $wrapper_markup = '<ul %1$s>%2$s</ul>';
55
58
  $items_markup = wp_list_categories( $args );
56
59
  $type = 'list';
60
+
61
+ if ( ! empty( $block->context['enhancedPagination'] ) ) {
62
+ $p = new WP_HTML_Tag_Processor( $items_markup );
63
+ while ( $p->next_tag( 'a' ) ) {
64
+ $p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' );
65
+ }
66
+ $items_markup = $p->get_updated_html();
67
+ }
57
68
  }
58
69
 
59
70
  $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => "wp-block-categories-{$type}" ) );
@@ -30,7 +30,7 @@ function render_block_core_comment_date( $attributes, $content, $block ) {
30
30
  $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
31
31
  if ( isset( $attributes['format'] ) && 'human-diff' === $attributes['format'] ) {
32
32
  // translators: %s: human-readable time difference.
33
- $formatted_date = sprintf( __( '%s ago', 'gutenberg' ), human_time_diff( get_comment_date( 'U', $comment ) ) );
33
+ $formatted_date = sprintf( __( '%s ago' ), human_time_diff( get_comment_date( 'U', $comment ) ) );
34
34
  } else {
35
35
  $formatted_date = get_comment_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $comment );
36
36
  }
@@ -30,7 +30,11 @@
30
30
  },
31
31
  "spacing": {
32
32
  "margin": true,
33
- "padding": true
33
+ "padding": true,
34
+ "__experimentalDefaultControls": {
35
+ "margin": false,
36
+ "padding": false
37
+ }
34
38
  },
35
39
  "typography": {
36
40
  "fontSize": true,
@@ -47,6 +51,13 @@
47
51
  },
48
52
  "interactivity": {
49
53
  "clientNavigation": true
54
+ },
55
+ "__experimentalBorder": {
56
+ "radius": true,
57
+ "color": true,
58
+ "width": true,
59
+ "style": true
50
60
  }
51
- }
61
+ },
62
+ "style": "wp-block-comment-edit-link"
52
63
  }
@@ -0,0 +1,4 @@
1
+ .wp-block-comment-edit-link {
2
+ // This block has customizable padding, border-box makes that more predictable.
3
+ box-sizing: border-box;
4
+ }
@@ -25,7 +25,11 @@
25
25
  },
26
26
  "spacing": {
27
27
  "margin": true,
28
- "padding": true
28
+ "padding": true,
29
+ "__experimentalDefaultControls": {
30
+ "margin": false,
31
+ "padding": false
32
+ }
29
33
  },
30
34
  "typography": {
31
35
  "fontSize": true,
@@ -40,6 +44,13 @@
40
44
  "fontSize": true
41
45
  }
42
46
  },
47
+ "__experimentalBorder": {
48
+ "radius": true,
49
+ "color": true,
50
+ "width": true,
51
+ "style": true
52
+ },
43
53
  "html": false
44
- }
54
+ },
55
+ "style": "wp-block-comment-reply-link"
45
56
  }
@@ -0,0 +1,4 @@
1
+ .wp-block-comment-reply-link {
2
+ // This block has customizable padding, border-box makes that more predictable.
3
+ box-sizing: border-box;
4
+ }
@@ -29,6 +29,8 @@ export default function CommentsLegacy( {
29
29
 
30
30
  const actions = [
31
31
  <Button
32
+ // TODO: Switch to `true` (40px size) if possible
33
+ __next40pxDefaultSize={ false }
32
34
  key="convert"
33
35
  onClick={ () => void setAttributes( { legacy: false } ) }
34
36
  variant="primary"
@@ -5,7 +5,7 @@ $pagination-margin: 0.5em;
5
5
  justify-content: center;
6
6
  }
7
7
 
8
- .editor-styles-wrapper {
8
+ :where(.editor-styles-wrapper) {
9
9
  .wp-block-comments-pagination {
10
10
  max-width: 100%;
11
11
  &.block-editor-block-list__layout {
@@ -26,6 +26,7 @@ export default function CoverBlockControls( {
26
26
  onSelectMedia,
27
27
  currentSettings,
28
28
  toggleUseFeaturedImage,
29
+ onClearMedia,
29
30
  } ) {
30
31
  const { contentPosition, id, useFeaturedImage, minHeight, minHeightUnit } =
31
32
  attributes;
@@ -101,6 +102,7 @@ export default function CoverBlockControls( {
101
102
  onToggleFeaturedImage={ toggleUseFeaturedImage }
102
103
  useFeaturedImage={ useFeaturedImage }
103
104
  name={ ! url ? __( 'Add Media' ) : __( 'Replace' ) }
105
+ onReset={ onClearMedia }
104
106
  />
105
107
  </BlockControls>
106
108
  </>
@@ -398,6 +398,7 @@ function CoverEdit( {
398
398
  onSelectMedia={ onSelectMedia }
399
399
  currentSettings={ currentSettings }
400
400
  toggleUseFeaturedImage={ toggleUseFeaturedImage }
401
+ onClearMedia={ onClearMedia }
401
402
  />
402
403
  );
403
404
 
@@ -3,11 +3,9 @@
3
3
  */
4
4
  import { useMemo } from '@wordpress/element';
5
5
  import {
6
- Button,
7
6
  ExternalLink,
8
7
  FocalPointPicker,
9
8
  PanelBody,
10
- PanelRow,
11
9
  RangeControl,
12
10
  TextareaControl,
13
11
  ToggleControl,
@@ -73,13 +71,13 @@ function CoverHeightInput( {
73
71
 
74
72
  return (
75
73
  <UnitControl
76
- label={ __( 'Minimum height of cover' ) }
74
+ __next40pxDefaultSize
75
+ label={ __( 'Minimum height' ) }
77
76
  id={ inputId }
78
77
  isResetValueOnUnitChange
79
78
  min={ min }
80
79
  onChange={ handleOnChange }
81
80
  onUnitChange={ onUnitChange }
82
- __unstableInputWidth="80px"
83
81
  units={ units }
84
82
  value={ computedValue }
85
83
  />
@@ -93,7 +91,6 @@ export default function CoverInspectorControls( {
93
91
  coverRef,
94
92
  currentSettings,
95
93
  updateDimRatio,
96
- onClearMedia,
97
94
  } ) {
98
95
  const {
99
96
  useFeaturedImage,
@@ -228,16 +225,6 @@ export default function CoverInspectorControls( {
228
225
  }
229
226
  />
230
227
  ) }
231
- <PanelRow>
232
- <Button
233
- variant="secondary"
234
- size="small"
235
- className="block-library-cover__reset-button"
236
- onClick={ onClearMedia }
237
- >
238
- { __( 'Clear Media' ) }
239
- </Button>
240
- </PanelRow>
241
228
  </PanelBody>
242
229
  ) }
243
230
  </InspectorControls>
@@ -299,6 +286,7 @@ export default function CoverInspectorControls( {
299
286
  ) }
300
287
  <InspectorControls group="dimensions">
301
288
  <ToolsPanelItem
289
+ className="single-column"
302
290
  hasValue={ () => !! minHeight }
303
291
  label={ __( 'Minimum height' ) }
304
292
  onDeselect={ () =>
@@ -1,9 +1,4 @@
1
1
  .wp-block-cover {
2
- /* Extra specificity needed because the reset.css applied in the editor context is overriding this rule. */
3
- .editor-styles-wrapper & {
4
- box-sizing: border-box;
5
- }
6
-
7
2
  // Override default cover styles
8
3
  // because we're not ready yet to show the cover block.
9
4
  &.is-placeholder {
@@ -155,6 +155,34 @@ describe( 'Cover block', () => {
155
155
  'is-position-top-left'
156
156
  );
157
157
  } );
158
+
159
+ test( 'clears media when clear media button clicked', async () => {
160
+ await setup( {
161
+ url: 'http://localhost/my-image.jpg',
162
+ } );
163
+
164
+ await selectBlock( 'Block: Cover' );
165
+ expect(
166
+ within( screen.getByLabelText( 'Block: Cover' ) ).getByRole(
167
+ 'img'
168
+ )
169
+ ).toBeInTheDocument();
170
+
171
+ await userEvent.click(
172
+ screen.getByRole( 'button', { name: 'Replace' } )
173
+ );
174
+ await userEvent.click(
175
+ screen.getByRole( 'menuitem', {
176
+ name: 'Reset',
177
+ } )
178
+ );
179
+
180
+ expect(
181
+ within( screen.getByLabelText( 'Block: Cover' ) ).queryByRole(
182
+ 'img'
183
+ )
184
+ ).not.toBeInTheDocument();
185
+ } );
158
186
  } );
159
187
 
160
188
  describe( 'Inspector controls', () => {
@@ -242,30 +270,6 @@ describe( 'Cover block', () => {
242
270
  expect( screen.getByAltText( 'Me' ) ).toBeInTheDocument();
243
271
  } );
244
272
 
245
- test( 'clears media when clear media button clicked', async () => {
246
- await setup( {
247
- url: 'http://localhost/my-image.jpg',
248
- } );
249
-
250
- await selectBlock( 'Block: Cover' );
251
- expect(
252
- within( screen.getByLabelText( 'Block: Cover' ) ).getByRole(
253
- 'img'
254
- )
255
- ).toBeInTheDocument();
256
-
257
- await userEvent.click(
258
- screen.getByRole( 'button', {
259
- name: 'Clear Media',
260
- } )
261
- );
262
- expect(
263
- within( screen.getByLabelText( 'Block: Cover' ) ).queryByRole(
264
- 'img'
265
- )
266
- ).not.toBeInTheDocument();
267
- } );
268
-
269
273
  describe( 'Color panel', () => {
270
274
  test( 'applies selected opacity to block when number control value changed', async () => {
271
275
  const { container } = await setup();
@@ -372,10 +376,10 @@ describe( 'Cover block', () => {
372
376
  } )
373
377
  );
374
378
  await userEvent.clear(
375
- screen.getByLabelText( 'Minimum height of cover' )
379
+ screen.getByLabelText( 'Minimum height' )
376
380
  );
377
381
  await userEvent.type(
378
- screen.getByLabelText( 'Minimum height of cover' ),
382
+ screen.getByLabelText( 'Minimum height' ),
379
383
  '300'
380
384
  );
381
385
 
@@ -11,6 +11,7 @@ import initBlock from '../utils/init-block';
11
11
  import metadata from './block.json';
12
12
  import edit from './edit';
13
13
  import save from './save';
14
+ import transforms from './transforms';
14
15
 
15
16
  const { name } = metadata;
16
17
  export { metadata, name };
@@ -35,6 +36,7 @@ export const settings = {
35
36
  },
36
37
  save,
37
38
  edit,
39
+ transforms,
38
40
  };
39
41
 
40
42
  export const init = () => initBlock( { name, metadata, settings } );
@@ -0,0 +1,26 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { createBlock, cloneBlock } from '@wordpress/blocks';
5
+
6
+ export default {
7
+ from: [
8
+ {
9
+ type: 'block',
10
+ isMultiBlock: true,
11
+ blocks: [ '*' ],
12
+ isMatch( {}, blocks ) {
13
+ return ! (
14
+ blocks.length === 1 && blocks[ 0 ].name === 'core/details'
15
+ );
16
+ },
17
+ __experimentalConvert( blocks ) {
18
+ return createBlock(
19
+ 'core/details',
20
+ {},
21
+ blocks.map( ( block ) => cloneBlock( block ) )
22
+ );
23
+ },
24
+ },
25
+ ],
26
+ };
@@ -65,10 +65,20 @@ const EmbedPlaceholder = ( {
65
65
  spacing={ 3 }
66
66
  justify="flex-start"
67
67
  >
68
- <Button variant="secondary" onClick={ tryAgain }>
68
+ <Button
69
+ // TODO: Switch to `true` (40px size) if possible
70
+ __next40pxDefaultSize={ false }
71
+ variant="secondary"
72
+ onClick={ tryAgain }
73
+ >
69
74
  { _x( 'Try again', 'button label' ) }
70
75
  </Button>{ ' ' }
71
- <Button variant="secondary" onClick={ fallback }>
76
+ <Button
77
+ // TODO: Switch to `true` (40px size) if possible
78
+ __next40pxDefaultSize={ false }
79
+ variant="secondary"
80
+ onClick={ fallback }
81
+ >
72
82
  { _x( 'Convert to link', 'button label' ) }
73
83
  </Button>
74
84
  </HStack>
package/src/file/edit.js CHANGED
@@ -109,6 +109,16 @@ function FileEdit( { attributes, isSelected, setAttributes, clientId } ) {
109
109
 
110
110
  function onSelectFile( newMedia ) {
111
111
  if ( ! newMedia || ! newMedia.url ) {
112
+ // Reset attributes.
113
+ setAttributes( {
114
+ href: undefined,
115
+ fileName: undefined,
116
+ textLinkHref: undefined,
117
+ id: undefined,
118
+ fileId: undefined,
119
+ displayPreview: undefined,
120
+ previewHeight: undefined,
121
+ } );
112
122
  setTemporaryURL();
113
123
  return;
114
124
  }
@@ -230,6 +240,7 @@ function FileEdit( { attributes, isSelected, setAttributes, clientId } ) {
230
240
  accept="*"
231
241
  onSelect={ onSelectFile }
232
242
  onError={ onUploadError }
243
+ onReset={ () => onSelectFile( undefined ) }
233
244
  />
234
245
  <ClipboardToolbarButton
235
246
  text={ href }