@wordpress/block-library 8.28.5 → 8.30.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 (289) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/audio/edit.js +7 -17
  3. package/build/audio/edit.js.map +1 -1
  4. package/build/audio/edit.native.js.map +1 -1
  5. package/build/avatar/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/buttons/edit.js +1 -6
  9. package/build/buttons/edit.js.map +1 -1
  10. package/build/buttons/edit.native.js +1 -7
  11. package/build/buttons/edit.native.js.map +1 -1
  12. package/build/columns/edit.js +8 -2
  13. package/build/columns/edit.js.map +1 -1
  14. package/build/comment-author-avatar/edit.js +1 -1
  15. package/build/comment-author-avatar/edit.js.map +1 -1
  16. package/build/cover/edit/index.js.map +1 -1
  17. package/build/cover/edit/inspector-controls.js.map +1 -1
  18. package/build/cover/edit/resizable-cover-popover.js +0 -6
  19. package/build/cover/edit/resizable-cover-popover.js.map +1 -1
  20. package/build/cover/edit.native.js.map +1 -1
  21. package/build/details/index.js +1 -0
  22. package/build/details/index.js.map +1 -1
  23. package/build/file/deprecated.js.map +1 -1
  24. package/build/file/edit.js +6 -13
  25. package/build/file/edit.js.map +1 -1
  26. package/build/file/edit.native.js.map +1 -1
  27. package/build/file/save.js.map +1 -1
  28. package/build/form-input/edit.js +1 -1
  29. package/build/form-input/edit.js.map +1 -1
  30. package/build/gallery/edit.js +5 -5
  31. package/build/gallery/edit.js.map +1 -1
  32. package/build/gallery/gallery.native.js.map +1 -1
  33. package/build/gallery/v1/edit.js.map +1 -1
  34. package/build/gallery/v1/gallery.native.js.map +1 -1
  35. package/build/group/variations.js +12 -15
  36. package/build/group/variations.js.map +1 -1
  37. package/build/image/edit.js.map +1 -1
  38. package/build/image/edit.native.js.map +1 -1
  39. package/build/image/image.js.map +1 -1
  40. package/build/latest-posts/edit.native.js.map +1 -1
  41. package/build/list/edit.js +5 -0
  42. package/build/list/edit.js.map +1 -1
  43. package/build/list/ordered-list-settings.js +1 -1
  44. package/build/list/ordered-list-settings.js.map +1 -1
  45. package/build/list-item/edit.native.js.map +1 -1
  46. package/build/list-item/hooks/use-indent-list-item.js +1 -0
  47. package/build/list-item/hooks/use-indent-list-item.js.map +1 -1
  48. package/build/list-item/hooks/use-outdent-list-item.js +1 -0
  49. package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
  50. package/build/list-item/hooks/use-space.js +16 -7
  51. package/build/list-item/hooks/use-space.js.map +1 -1
  52. package/build/media-text/media-container.native.js +1 -1
  53. package/build/media-text/media-container.native.js.map +1 -1
  54. package/build/navigation/edit/index.js.map +1 -1
  55. package/build/navigation-link/link-ui.js.map +1 -1
  56. package/build/paragraph/edit.native.js.map +1 -1
  57. package/build/pattern/edit.js +23 -9
  58. package/build/pattern/edit.js.map +1 -1
  59. package/build/post-excerpt/edit.js.map +1 -1
  60. package/build/post-featured-image/dimension-controls.js.map +1 -1
  61. package/build/post-featured-image/edit.js.map +1 -1
  62. package/build/post-navigation-link/edit.js.map +1 -1
  63. package/build/query/edit/pattern-selection-modal.js.map +1 -1
  64. package/build/query/utils.js +7 -5
  65. package/build/query/utils.js.map +1 -1
  66. package/build/query-pagination-next/edit.js.map +1 -1
  67. package/build/query-pagination-previous/edit.js.map +1 -1
  68. package/build/quote/deprecated.js +111 -12
  69. package/build/quote/deprecated.js.map +1 -1
  70. package/build/quote/edit.js +5 -5
  71. package/build/quote/edit.js.map +1 -1
  72. package/build/quote/index.js +1 -1
  73. package/build/quote/index.js.map +1 -1
  74. package/build/quote/save.js +2 -2
  75. package/build/quote/save.js.map +1 -1
  76. package/build/read-more/edit.js.map +1 -1
  77. package/build/search/edit.js +1 -1
  78. package/build/search/edit.js.map +1 -1
  79. package/build/search/edit.native.js.map +1 -1
  80. package/build/site-logo/edit.js.map +1 -1
  81. package/build/site-title/{edit/index.js → edit.js} +1 -1
  82. package/build/site-title/edit.js.map +1 -0
  83. package/build/social-link/edit.js.map +1 -1
  84. package/build/social-links/edit.native.js.map +1 -1
  85. package/build/spacer/edit.js.map +1 -1
  86. package/build/table-of-contents/edit.js.map +1 -1
  87. package/build/template-part/edit/index.js +53 -1
  88. package/build/template-part/edit/index.js.map +1 -1
  89. package/build/template-part/edit/selection-modal.js +2 -8
  90. package/build/template-part/edit/selection-modal.js.map +1 -1
  91. package/build/template-part/edit/utils/map-template-part-to-block-pattern.js +30 -0
  92. package/build/template-part/edit/utils/map-template-part-to-block-pattern.js.map +1 -0
  93. package/build/utils/hooks.js +55 -4
  94. package/build/utils/hooks.js.map +1 -1
  95. package/build/video/edit-common-settings.js.map +1 -1
  96. package/build/video/edit.js +7 -16
  97. package/build/video/edit.js.map +1 -1
  98. package/build/video/edit.native.js +2 -7
  99. package/build/video/edit.native.js.map +1 -1
  100. package/build-module/audio/edit.js +10 -20
  101. package/build-module/audio/edit.js.map +1 -1
  102. package/build-module/audio/edit.native.js.map +1 -1
  103. package/build-module/avatar/edit.js.map +1 -1
  104. package/build-module/button/edit.js +1 -1
  105. package/build-module/button/edit.js.map +1 -1
  106. package/build-module/buttons/edit.js +2 -7
  107. package/build-module/buttons/edit.js.map +1 -1
  108. package/build-module/buttons/edit.native.js +1 -7
  109. package/build-module/buttons/edit.native.js.map +1 -1
  110. package/build-module/columns/edit.js +8 -2
  111. package/build-module/columns/edit.js.map +1 -1
  112. package/build-module/comment-author-avatar/edit.js +1 -1
  113. package/build-module/comment-author-avatar/edit.js.map +1 -1
  114. package/build-module/cover/edit/index.js.map +1 -1
  115. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  116. package/build-module/cover/edit/resizable-cover-popover.js +1 -7
  117. package/build-module/cover/edit/resizable-cover-popover.js.map +1 -1
  118. package/build-module/cover/edit.native.js.map +1 -1
  119. package/build-module/details/index.js +1 -0
  120. package/build-module/details/index.js.map +1 -1
  121. package/build-module/file/deprecated.js.map +1 -1
  122. package/build-module/file/edit.js +7 -14
  123. package/build-module/file/edit.js.map +1 -1
  124. package/build-module/file/edit.native.js.map +1 -1
  125. package/build-module/file/save.js.map +1 -1
  126. package/build-module/form-input/edit.js +1 -1
  127. package/build-module/form-input/edit.js.map +1 -1
  128. package/build-module/gallery/edit.js +5 -5
  129. package/build-module/gallery/edit.js.map +1 -1
  130. package/build-module/gallery/gallery.native.js.map +1 -1
  131. package/build-module/gallery/v1/edit.js.map +1 -1
  132. package/build-module/gallery/v1/gallery.native.js.map +1 -1
  133. package/build-module/group/variations.js +12 -15
  134. package/build-module/group/variations.js.map +1 -1
  135. package/build-module/image/edit.js.map +1 -1
  136. package/build-module/image/edit.native.js.map +1 -1
  137. package/build-module/image/image.js.map +1 -1
  138. package/build-module/latest-posts/edit.native.js.map +1 -1
  139. package/build-module/list/edit.js +5 -0
  140. package/build-module/list/edit.js.map +1 -1
  141. package/build-module/list/ordered-list-settings.js +1 -1
  142. package/build-module/list/ordered-list-settings.js.map +1 -1
  143. package/build-module/list-item/edit.native.js.map +1 -1
  144. package/build-module/list-item/hooks/use-indent-list-item.js +1 -0
  145. package/build-module/list-item/hooks/use-indent-list-item.js.map +1 -1
  146. package/build-module/list-item/hooks/use-outdent-list-item.js +1 -0
  147. package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
  148. package/build-module/list-item/hooks/use-space.js +17 -8
  149. package/build-module/list-item/hooks/use-space.js.map +1 -1
  150. package/build-module/media-text/media-container.native.js +1 -1
  151. package/build-module/media-text/media-container.native.js.map +1 -1
  152. package/build-module/navigation/edit/index.js.map +1 -1
  153. package/build-module/navigation-link/link-ui.js.map +1 -1
  154. package/build-module/paragraph/edit.native.js.map +1 -1
  155. package/build-module/pattern/edit.js +24 -10
  156. package/build-module/pattern/edit.js.map +1 -1
  157. package/build-module/post-excerpt/edit.js.map +1 -1
  158. package/build-module/post-featured-image/dimension-controls.js.map +1 -1
  159. package/build-module/post-featured-image/edit.js.map +1 -1
  160. package/build-module/post-navigation-link/edit.js.map +1 -1
  161. package/build-module/query/edit/pattern-selection-modal.js.map +1 -1
  162. package/build-module/query/utils.js +7 -5
  163. package/build-module/query/utils.js.map +1 -1
  164. package/build-module/query-pagination-next/edit.js.map +1 -1
  165. package/build-module/query-pagination-previous/edit.js.map +1 -1
  166. package/build-module/quote/deprecated.js +112 -13
  167. package/build-module/quote/deprecated.js.map +1 -1
  168. package/build-module/quote/edit.js +5 -5
  169. package/build-module/quote/edit.js.map +1 -1
  170. package/build-module/quote/index.js +1 -1
  171. package/build-module/quote/index.js.map +1 -1
  172. package/build-module/quote/save.js +2 -2
  173. package/build-module/quote/save.js.map +1 -1
  174. package/build-module/read-more/edit.js.map +1 -1
  175. package/build-module/search/edit.js +1 -1
  176. package/build-module/search/edit.js.map +1 -1
  177. package/build-module/search/edit.native.js.map +1 -1
  178. package/build-module/site-logo/edit.js.map +1 -1
  179. package/build-module/site-title/{edit/index.js → edit.js} +1 -1
  180. package/build-module/site-title/edit.js.map +1 -0
  181. package/build-module/social-link/edit.js.map +1 -1
  182. package/build-module/social-links/edit.native.js.map +1 -1
  183. package/build-module/spacer/edit.js.map +1 -1
  184. package/build-module/table-of-contents/edit.js.map +1 -1
  185. package/build-module/template-part/edit/index.js +57 -5
  186. package/build-module/template-part/edit/index.js.map +1 -1
  187. package/build-module/template-part/edit/selection-modal.js +2 -8
  188. package/build-module/template-part/edit/selection-modal.js.map +1 -1
  189. package/build-module/template-part/edit/utils/map-template-part-to-block-pattern.js +24 -0
  190. package/build-module/template-part/edit/utils/map-template-part-to-block-pattern.js.map +1 -0
  191. package/build-module/utils/hooks.js +54 -3
  192. package/build-module/utils/hooks.js.map +1 -1
  193. package/build-module/video/edit-common-settings.js.map +1 -1
  194. package/build-module/video/edit.js +10 -19
  195. package/build-module/video/edit.js.map +1 -1
  196. package/build-module/video/edit.native.js +2 -7
  197. package/build-module/video/edit.native.js.map +1 -1
  198. package/build-style/editor-rtl.css +4 -1
  199. package/build-style/editor.css +4 -1
  200. package/build-style/group/editor-rtl.css +1 -1
  201. package/build-style/group/editor.css +1 -1
  202. package/build-style/image/editor-rtl.css +3 -0
  203. package/build-style/image/editor.css +3 -0
  204. package/package.json +34 -34
  205. package/src/audio/edit.js +9 -19
  206. package/src/audio/edit.native.js +3 -3
  207. package/src/avatar/edit.js +1 -1
  208. package/src/avatar/index.php +12 -1
  209. package/src/block/index.php +2 -0
  210. package/src/button/edit.js +2 -2
  211. package/src/buttons/edit.js +3 -16
  212. package/src/buttons/edit.native.js +2 -18
  213. package/src/calendar/index.php +5 -0
  214. package/src/columns/edit.js +9 -2
  215. package/src/comment-author-avatar/edit.js +1 -1
  216. package/src/comments/index.php +2 -0
  217. package/src/cover/edit/index.js +2 -2
  218. package/src/cover/edit/inspector-controls.js +1 -1
  219. package/src/cover/edit/resizable-cover-popover.js +1 -6
  220. package/src/cover/edit.native.js +1 -1
  221. package/src/details/block.json +1 -0
  222. package/src/file/deprecated.js +3 -3
  223. package/src/file/edit.js +8 -15
  224. package/src/file/edit.native.js +4 -4
  225. package/src/file/save.js +1 -1
  226. package/src/form-input/edit.js +1 -1
  227. package/src/gallery/edit.js +6 -12
  228. package/src/gallery/gallery.native.js +1 -1
  229. package/src/gallery/test/index.native.js +1 -1
  230. package/src/gallery/v1/edit.js +2 -2
  231. package/src/gallery/v1/gallery.native.js +1 -1
  232. package/src/group/editor.scss +1 -1
  233. package/src/group/variations.js +3 -6
  234. package/src/image/edit.js +1 -1
  235. package/src/image/edit.native.js +1 -1
  236. package/src/image/editor.scss +6 -0
  237. package/src/image/image.js +2 -2
  238. package/src/latest-posts/edit.native.js +1 -1
  239. package/src/list/edit.js +5 -0
  240. package/src/list/ordered-list-settings.js +1 -1
  241. package/src/list-item/edit.native.js +1 -1
  242. package/src/list-item/hooks/use-indent-list-item.js +2 -0
  243. package/src/list-item/hooks/use-outdent-list-item.js +2 -0
  244. package/src/list-item/hooks/use-space.js +16 -9
  245. package/src/media-text/media-container.native.js +5 -3
  246. package/src/media-text/test/edit.native.js +58 -0
  247. package/src/missing/test/edit-integration.native.js +2 -1
  248. package/src/navigation/edit/index.js +1 -1
  249. package/src/navigation/edit/test/navigation-menu-selector.js +3 -3
  250. package/src/navigation/index.php +18 -13
  251. package/src/navigation-link/link-ui.js +2 -2
  252. package/src/paragraph/edit.native.js +1 -1
  253. package/src/paragraph/test/edit.native.js +36 -0
  254. package/src/pattern/edit.js +27 -10
  255. package/src/post-author-biography/index.php +4 -3
  256. package/src/post-author-name/index.php +4 -3
  257. package/src/post-excerpt/edit.js +1 -1
  258. package/src/post-featured-image/dimension-controls.js +4 -4
  259. package/src/post-featured-image/edit.js +1 -1
  260. package/src/post-navigation-link/edit.js +1 -1
  261. package/src/post-template/index.php +2 -0
  262. package/src/query/edit/pattern-selection-modal.js +1 -1
  263. package/src/query/utils.js +6 -4
  264. package/src/query-pagination-next/edit.js +1 -1
  265. package/src/query-pagination-previous/edit.js +1 -1
  266. package/src/quote/block.json +1 -1
  267. package/src/quote/deprecated.js +110 -15
  268. package/src/quote/edit.js +5 -5
  269. package/src/quote/save.js +2 -2
  270. package/src/quote/test/__snapshots__/transforms.native.js.snap +2 -2
  271. package/src/read-more/edit.js +1 -1
  272. package/src/search/edit.js +1 -1
  273. package/src/search/edit.native.js +4 -4
  274. package/src/site-logo/edit.js +1 -1
  275. package/src/social-link/edit.js +1 -1
  276. package/src/social-links/edit.native.js +1 -1
  277. package/src/spacer/edit.js +1 -1
  278. package/src/table-of-contents/edit.js +1 -1
  279. package/src/template-part/edit/index.js +91 -4
  280. package/src/template-part/edit/selection-modal.js +4 -8
  281. package/src/template-part/edit/utils/map-template-part-to-block-pattern.js +23 -0
  282. package/src/utils/hooks.js +53 -3
  283. package/src/video/edit-common-settings.js +1 -1
  284. package/src/video/edit.js +10 -18
  285. package/src/video/edit.native.js +5 -8
  286. package/src/video/test/edit.native.js +0 -14
  287. package/build/site-title/edit/index.js.map +0 -1
  288. package/build-module/site-title/edit/index.js.map +0 -1
  289. /package/src/site-title/{edit/index.js → edit.js} +0 -0
@@ -1248,7 +1248,6 @@ figure.wp-block-gallery .components-spinner {
1248
1248
  margin: 0;
1249
1249
  }
1250
1250
  .wp-block-group__placeholder .components-placeholder__instructions {
1251
- text-align: center;
1252
1251
  margin-bottom: 18px;
1253
1252
  }
1254
1253
  .wp-block-group__placeholder .wp-block-group-placeholder__variations svg {
@@ -1275,6 +1274,7 @@ figure.wp-block-gallery .components-spinner {
1275
1274
  .wp-block-group__placeholder .components-placeholder {
1276
1275
  min-height: auto;
1277
1276
  padding: 24px;
1277
+ align-items: center;
1278
1278
  }
1279
1279
  .wp-block-group__placeholder .is-small .wp-block-group-placeholder__variations > li,
1280
1280
  .wp-block-group__placeholder .is-medium .wp-block-group-placeholder__variations > li {
@@ -1311,6 +1311,9 @@ figure.wp-block-gallery .components-spinner {
1311
1311
  outline: 2px solid transparent !important;
1312
1312
  }
1313
1313
 
1314
+ .wp-block-image.wp-block-image:not(.is-selected) .components-placeholder__fieldset {
1315
+ display: none;
1316
+ }
1314
1317
  .wp-block-image.wp-block-image.is-selected .components-placeholder {
1315
1318
  color: #1e1e1e;
1316
1319
  background-color: #fff;
@@ -1256,7 +1256,6 @@ figure.wp-block-gallery .components-spinner {
1256
1256
  margin: 0;
1257
1257
  }
1258
1258
  .wp-block-group__placeholder .components-placeholder__instructions {
1259
- text-align: center;
1260
1259
  margin-bottom: 18px;
1261
1260
  }
1262
1261
  .wp-block-group__placeholder .wp-block-group-placeholder__variations svg {
@@ -1283,6 +1282,7 @@ figure.wp-block-gallery .components-spinner {
1283
1282
  .wp-block-group__placeholder .components-placeholder {
1284
1283
  min-height: auto;
1285
1284
  padding: 24px;
1285
+ align-items: center;
1286
1286
  }
1287
1287
  .wp-block-group__placeholder .is-small .wp-block-group-placeholder__variations > li,
1288
1288
  .wp-block-group__placeholder .is-medium .wp-block-group-placeholder__variations > li {
@@ -1319,6 +1319,9 @@ figure.wp-block-gallery .components-spinner {
1319
1319
  outline: 2px solid transparent !important;
1320
1320
  }
1321
1321
 
1322
+ .wp-block-image.wp-block-image:not(.is-selected) .components-placeholder__fieldset {
1323
+ display: none;
1324
+ }
1322
1325
  .wp-block-image.wp-block-image.is-selected .components-placeholder {
1323
1326
  color: #1e1e1e;
1324
1327
  background-color: #fff;
@@ -150,7 +150,6 @@
150
150
  margin: 0;
151
151
  }
152
152
  .wp-block-group__placeholder .components-placeholder__instructions {
153
- text-align: center;
154
153
  margin-bottom: 18px;
155
154
  }
156
155
  .wp-block-group__placeholder .wp-block-group-placeholder__variations svg {
@@ -177,6 +176,7 @@
177
176
  .wp-block-group__placeholder .components-placeholder {
178
177
  min-height: auto;
179
178
  padding: 24px;
179
+ align-items: center;
180
180
  }
181
181
  .wp-block-group__placeholder .is-small .wp-block-group-placeholder__variations > li,
182
182
  .wp-block-group__placeholder .is-medium .wp-block-group-placeholder__variations > li {
@@ -150,7 +150,6 @@
150
150
  margin: 0;
151
151
  }
152
152
  .wp-block-group__placeholder .components-placeholder__instructions {
153
- text-align: center;
154
153
  margin-bottom: 18px;
155
154
  }
156
155
  .wp-block-group__placeholder .wp-block-group-placeholder__variations svg {
@@ -177,6 +176,7 @@
177
176
  .wp-block-group__placeholder .components-placeholder {
178
177
  min-height: auto;
179
178
  padding: 24px;
179
+ align-items: center;
180
180
  }
181
181
  .wp-block-group__placeholder .is-small .wp-block-group-placeholder__variations > li,
182
182
  .wp-block-group__placeholder .is-medium .wp-block-group-placeholder__variations > li {
@@ -86,6 +86,9 @@
86
86
  /**
87
87
  * Reset the WP Admin page styles for Gutenberg-like pages.
88
88
  */
89
+ .wp-block-image.wp-block-image:not(.is-selected) .components-placeholder__fieldset {
90
+ display: none;
91
+ }
89
92
  .wp-block-image.wp-block-image.is-selected .components-placeholder {
90
93
  color: #1e1e1e;
91
94
  background-color: #fff;
@@ -86,6 +86,9 @@
86
86
  /**
87
87
  * Reset the WP Admin page styles for Gutenberg-like pages.
88
88
  */
89
+ .wp-block-image.wp-block-image:not(.is-selected) .components-placeholder__fieldset {
90
+ display: none;
91
+ }
89
92
  .wp-block-image.wp-block-image.is-selected .components-placeholder {
90
93
  color: #1e1e1e;
91
94
  background-color: #fff;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-library",
3
- "version": "8.28.5",
3
+ "version": "8.30.0",
4
4
  "description": "Block library for the WordPress editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -31,38 +31,38 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.16.0",
34
- "@wordpress/a11y": "^3.51.1",
35
- "@wordpress/api-fetch": "^6.48.1",
36
- "@wordpress/autop": "^3.51.1",
37
- "@wordpress/blob": "^3.51.1",
38
- "@wordpress/block-editor": "^12.19.5",
39
- "@wordpress/blocks": "^12.28.5",
40
- "@wordpress/components": "^26.0.4",
41
- "@wordpress/compose": "^6.28.1",
42
- "@wordpress/core-data": "^6.28.5",
43
- "@wordpress/data": "^9.21.1",
44
- "@wordpress/date": "^4.51.1",
45
- "@wordpress/deprecated": "^3.51.1",
46
- "@wordpress/dom": "^3.51.1",
47
- "@wordpress/element": "^5.28.1",
48
- "@wordpress/escape-html": "^2.51.1",
49
- "@wordpress/hooks": "^3.51.1",
50
- "@wordpress/html-entities": "^3.51.1",
51
- "@wordpress/i18n": "^4.51.1",
52
- "@wordpress/icons": "^9.42.3",
53
- "@wordpress/interactivity": "^5.0.3",
54
- "@wordpress/interactivity-router": "^1.1.3",
55
- "@wordpress/keycodes": "^3.51.1",
56
- "@wordpress/notices": "^4.19.1",
57
- "@wordpress/patterns": "^1.12.5",
58
- "@wordpress/primitives": "^3.49.1",
59
- "@wordpress/private-apis": "^0.33.1",
60
- "@wordpress/reusable-blocks": "^4.28.5",
61
- "@wordpress/rich-text": "^6.28.3",
62
- "@wordpress/server-side-render": "^4.28.5",
63
- "@wordpress/url": "^3.52.1",
64
- "@wordpress/viewport": "^5.28.1",
65
- "@wordpress/wordcount": "^3.51.1",
34
+ "@wordpress/a11y": "^3.53.0",
35
+ "@wordpress/api-fetch": "^6.50.0",
36
+ "@wordpress/autop": "^3.53.0",
37
+ "@wordpress/blob": "^3.53.0",
38
+ "@wordpress/block-editor": "^12.21.0",
39
+ "@wordpress/blocks": "^12.30.0",
40
+ "@wordpress/components": "^27.1.0",
41
+ "@wordpress/compose": "^6.30.0",
42
+ "@wordpress/core-data": "^6.30.0",
43
+ "@wordpress/data": "^9.23.0",
44
+ "@wordpress/date": "^4.53.0",
45
+ "@wordpress/deprecated": "^3.53.0",
46
+ "@wordpress/dom": "^3.53.0",
47
+ "@wordpress/element": "^5.30.0",
48
+ "@wordpress/escape-html": "^2.53.0",
49
+ "@wordpress/hooks": "^3.53.0",
50
+ "@wordpress/html-entities": "^3.53.0",
51
+ "@wordpress/i18n": "^4.53.0",
52
+ "@wordpress/icons": "^9.44.0",
53
+ "@wordpress/interactivity": "^5.2.0",
54
+ "@wordpress/interactivity-router": "^1.3.0",
55
+ "@wordpress/keycodes": "^3.53.0",
56
+ "@wordpress/notices": "^4.21.0",
57
+ "@wordpress/patterns": "^1.14.0",
58
+ "@wordpress/primitives": "^3.51.0",
59
+ "@wordpress/private-apis": "^0.35.0",
60
+ "@wordpress/reusable-blocks": "^4.30.0",
61
+ "@wordpress/rich-text": "^6.30.0",
62
+ "@wordpress/server-side-render": "^4.30.0",
63
+ "@wordpress/url": "^3.54.0",
64
+ "@wordpress/viewport": "^5.30.0",
65
+ "@wordpress/wordcount": "^3.53.0",
66
66
  "change-case": "^4.1.2",
67
67
  "classnames": "^2.3.1",
68
68
  "colord": "^2.7.0",
@@ -80,5 +80,5 @@
80
80
  "publishConfig": {
81
81
  "access": "public"
82
82
  },
83
- "gitHead": "4927ea437069f9aed12f696df294a79bd8e12fd5"
83
+ "gitHead": "ac3c3e465a083081a86a4da6ee6fb817b41e5130"
84
84
  }
package/src/audio/edit.js CHANGED
@@ -6,7 +6,7 @@ import classnames from 'classnames';
6
6
  /**
7
7
  * WordPress dependencies
8
8
  */
9
- import { getBlobByURL, isBlobURL } from '@wordpress/blob';
9
+ import { isBlobURL } from '@wordpress/blob';
10
10
  import {
11
11
  Disabled,
12
12
  PanelBody,
@@ -21,11 +21,9 @@ import {
21
21
  MediaPlaceholder,
22
22
  MediaReplaceFlow,
23
23
  useBlockProps,
24
- store as blockEditorStore,
25
24
  } from '@wordpress/block-editor';
26
- import { useEffect } from '@wordpress/element';
27
25
  import { __, _x } from '@wordpress/i18n';
28
- import { useDispatch, useSelect } from '@wordpress/data';
26
+ import { useDispatch } from '@wordpress/data';
29
27
  import { audio as icon } from '@wordpress/icons';
30
28
  import { store as noticesStore } from '@wordpress/notices';
31
29
 
@@ -33,6 +31,7 @@ import { store as noticesStore } from '@wordpress/notices';
33
31
  * Internal dependencies
34
32
  */
35
33
  import { createUpgradedEmbedBlock } from '../embed/util';
34
+ import { useUploadMediaFromBlobURL } from '../utils/hooks';
36
35
  import { Caption } from '../utils/caption';
37
36
 
38
37
  const ALLOWED_MEDIA_TYPES = [ 'audio' ];
@@ -47,22 +46,13 @@ function AudioEdit( {
47
46
  } ) {
48
47
  const { id, autoplay, loop, preload, src } = attributes;
49
48
  const isTemporaryAudio = ! id && isBlobURL( src );
50
- const { getSettings } = useSelect( blockEditorStore );
51
49
 
52
- useEffect( () => {
53
- if ( ! id && isBlobURL( src ) ) {
54
- const file = getBlobByURL( src );
55
-
56
- if ( file ) {
57
- getSettings().mediaUpload( {
58
- filesList: [ file ],
59
- onFileChange: ( [ media ] ) => onSelectAudio( media ),
60
- onError: ( e ) => onUploadError( e ),
61
- allowedTypes: ALLOWED_MEDIA_TYPES,
62
- } );
63
- }
64
- }
65
- }, [] );
50
+ useUploadMediaFromBlobURL( {
51
+ url: src,
52
+ allowedTypes: ALLOWED_MEDIA_TYPES,
53
+ onChange: onSelectAudio,
54
+ onError: onUploadError,
55
+ } );
66
56
 
67
57
  function toggleAttribute( attribute ) {
68
58
  return ( newValue ) => {
@@ -212,13 +212,13 @@ function AudioEdit( {
212
212
  label: _x( 'None', '"Preload" value' ),
213
213
  },
214
214
  ] }
215
- hideCancelButton={ true }
215
+ hideCancelButton
216
216
  />
217
217
  </PanelBody>
218
218
  </InspectorControls>
219
219
  <MediaUpload
220
220
  allowedTypes={ ALLOWED_MEDIA_TYPES }
221
- isReplacingMedia={ true }
221
+ isReplacingMedia
222
222
  onSelect={ onSelectAudio }
223
223
  onSelectURL={ onSelectURL }
224
224
  render={ ( { open, getMediaOptions } ) => {
@@ -226,7 +226,7 @@ function AudioEdit( {
226
226
  } }
227
227
  />
228
228
  <BlockCaption
229
- accessible={ true }
229
+ accessible
230
230
  accessibilityLabelCreator={ ( caption ) =>
231
231
  RichText.isEmpty( caption )
232
232
  ? /* translators: accessibility text. Empty Audio caption. */
@@ -187,7 +187,7 @@ const UserEdit = ( { attributes, context, setAttributes, isSelected } ) => {
187
187
  return (
188
188
  <>
189
189
  <AvatarInspectorControls
190
- selectUser={ true }
190
+ selectUser
191
191
  attributes={ attributes }
192
192
  avatar={ avatar }
193
193
  setAttributes={ setAttributes }
@@ -31,7 +31,18 @@ function render_block_core_avatar( $attributes, $content, $block ) {
31
31
  : '';
32
32
 
33
33
  if ( ! isset( $block->context['commentId'] ) ) {
34
- $author_id = isset( $attributes['userId'] ) ? $attributes['userId'] : get_post_field( 'post_author', $block->context['postId'] );
34
+ if ( isset( $attributes['userId'] ) ) {
35
+ $author_id = $attributes['userId'];
36
+ } elseif ( isset( $block->context['postId'] ) ) {
37
+ $author_id = get_post_field( 'post_author', $block->context['postId'] );
38
+ } else {
39
+ $author_id = get_query_var( 'author' );
40
+ }
41
+
42
+ if ( empty( $author_id ) ) {
43
+ return '';
44
+ }
45
+
35
46
  $author_name = get_the_author_meta( 'display_name', $author_id );
36
47
  // translators: %s is the Author name.
37
48
  $alt = sprintf( __( '%s Avatar' ), $author_name );
@@ -8,6 +8,8 @@
8
8
  /**
9
9
  * Renders the `core/block` block on server.
10
10
  *
11
+ * @global WP_Embed $wp_embed
12
+ *
11
13
  * @param array $attributes The block attributes.
12
14
  *
13
15
  * @return string Rendered HTML of the referenced block.
@@ -124,7 +124,7 @@ function WidthPanel( { selectedWidth, setAttributes } ) {
124
124
  }
125
125
 
126
126
  return (
127
- <PanelBody title={ __( 'Width settings' ) }>
127
+ <PanelBody title={ __( 'Settings' ) }>
128
128
  <ButtonGroup aria-label={ __( 'Button width' ) }>
129
129
  { [ 25, 50, 75, 100 ].map( ( widthValue ) => {
130
130
  return (
@@ -329,7 +329,7 @@ function ButtonEdit( props ) {
329
329
  title={ __( 'Unlink' ) }
330
330
  shortcut={ displayShortcut.primaryShift( 'k' ) }
331
331
  onClick={ unlink }
332
- isActive={ true }
332
+ isActive
333
333
  />
334
334
  ) }
335
335
  </BlockControls>
@@ -6,11 +6,7 @@ import classnames from 'classnames';
6
6
  /**
7
7
  * WordPress dependencies
8
8
  */
9
- import {
10
- useBlockProps,
11
- useInnerBlocksProps,
12
- store as blockEditorStore,
13
- } from '@wordpress/block-editor';
9
+ import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';
14
10
  import { useSelect } from '@wordpress/data';
15
11
  import { store as blocksStore } from '@wordpress/blocks';
16
12
 
@@ -36,16 +32,12 @@ function ButtonsEdit( { attributes, className } ) {
36
32
  'has-custom-font-size': fontSize || style?.typography?.fontSize,
37
33
  } ),
38
34
  } );
39
- const { preferredStyle, hasButtonVariations } = useSelect( ( select ) => {
40
- const preferredStyleVariations =
41
- select( blockEditorStore ).getSettings()
42
- .__experimentalPreferredStyleVariations;
35
+ const { hasButtonVariations } = useSelect( ( select ) => {
43
36
  const buttonVariations = select( blocksStore ).getBlockVariations(
44
37
  'core/button',
45
38
  'inserter'
46
39
  );
47
40
  return {
48
- preferredStyle: preferredStyleVariations?.value?.[ 'core/button' ],
49
41
  hasButtonVariations: buttonVariations.length > 0,
50
42
  };
51
43
  }, [] );
@@ -54,12 +46,7 @@ function ButtonsEdit( { attributes, className } ) {
54
46
  defaultBlock: DEFAULT_BLOCK,
55
47
  // This check should be handled by the `Inserter` internally to be consistent across all blocks that use it.
56
48
  directInsert: ! hasButtonVariations,
57
- template: [
58
- [
59
- 'core/button',
60
- { className: preferredStyle && `is-style-${ preferredStyle }` },
61
- ],
62
- ],
49
+ template: [ [ 'core/button' ] ],
63
50
  templateInsertUpdatesSelection: true,
64
51
  orientation: layout?.orientation ?? 'horizontal',
65
52
  } );
@@ -69,13 +69,6 @@ export default function ButtonsEdit( {
69
69
  [ clientId ]
70
70
  );
71
71
 
72
- const preferredStyle = useSelect( ( select ) => {
73
- const preferredStyleVariations =
74
- select( blockEditorStore ).getSettings()
75
- .__experimentalPreferredStyleVariations;
76
- return preferredStyleVariations?.value?.[ 'core/button' ];
77
- }, [] );
78
-
79
72
  const { getBlockOrder } = useSelect( blockEditorStore );
80
73
  const { insertBlock, removeBlock, selectBlock } =
81
74
  useDispatch( blockEditorStore );
@@ -113,7 +106,7 @@ export default function ButtonsEdit( {
113
106
  const renderFooterAppender = useRef( () => (
114
107
  <View style={ styles.appenderContainer }>
115
108
  <InnerBlocks.ButtonBlockAppender
116
- isFloating={ true }
109
+ isFloating
117
110
  onAddBlock={ onAddNextButton }
118
111
  />
119
112
  </View>
@@ -144,16 +137,7 @@ export default function ButtonsEdit( {
144
137
  ) }
145
138
  { resizeObserver }
146
139
  <InnerBlocks
147
- template={ [
148
- [
149
- 'core/button',
150
- {
151
- className:
152
- preferredStyle &&
153
- `is-style-${ preferredStyle }`,
154
- },
155
- ],
156
- ] }
140
+ template={ [ [ 'core/button' ] ] }
157
141
  renderFooterAppender={
158
142
  shouldRenderFooterAppender && renderFooterAppender.current
159
143
  }
@@ -8,6 +8,9 @@
8
8
  /**
9
9
  * Renders the `core/calendar` block on server.
10
10
  *
11
+ * @global int $monthnum.
12
+ * @global int $year.
13
+ *
11
14
  * @param array $attributes The block attributes.
12
15
  *
13
16
  * @return string Returns the block content.
@@ -117,6 +120,8 @@ function block_core_calendar_has_published_posts() {
117
120
  * Queries the database for any published post and saves
118
121
  * a flag whether any published post exists or not.
119
122
  *
123
+ * @global wpdb $wpdb WordPress database abstraction object.
124
+ *
120
125
  * @return bool Has any published posts or not.
121
126
  */
122
127
  function block_core_calendar_update_has_published_posts() {
@@ -40,6 +40,10 @@ import {
40
40
  toWidthPrecision,
41
41
  } from './utils';
42
42
 
43
+ const DEFAULT_BLOCK = {
44
+ name: 'core/column',
45
+ };
46
+
43
47
  function ColumnsEditContainer( { attributes, setAttributes, clientId } ) {
44
48
  const { isStackedOnMobile, verticalAlignment, templateLock } = attributes;
45
49
  const { count, canInsertColumnBlock, minCount } = useSelect(
@@ -90,6 +94,8 @@ function ColumnsEditContainer( { attributes, setAttributes, clientId } ) {
90
94
  className: classes,
91
95
  } );
92
96
  const innerBlocksProps = useInnerBlocksProps( blockProps, {
97
+ defaultBlock: DEFAULT_BLOCK,
98
+ directInsert: true,
93
99
  orientation: 'horizontal',
94
100
  renderAppender: false,
95
101
  templateLock,
@@ -133,18 +139,19 @@ function ColumnsEditContainer( { attributes, setAttributes, clientId } ) {
133
139
  // If adding a new column, assign width to the new column equal to
134
140
  // as if it were `1 / columns` of the total available space.
135
141
  const newColumnWidth = toWidthPrecision( 100 / newColumns );
142
+ const newlyAddedColumns = newColumns - previousColumns;
136
143
 
137
144
  // Redistribute in consideration of pending block insertion as
138
145
  // constraining the available working width.
139
146
  const widths = getRedistributedColumnWidths(
140
147
  innerBlocks,
141
- 100 - newColumnWidth
148
+ 100 - newColumnWidth * newlyAddedColumns
142
149
  );
143
150
 
144
151
  innerBlocks = [
145
152
  ...getMappedColumnWidths( innerBlocks, widths ),
146
153
  ...Array.from( {
147
- length: newColumns - previousColumns,
154
+ length: newlyAddedColumns,
148
155
  } ).map( () => {
149
156
  return createBlock( 'core/column', {
150
157
  width: `${ newColumnWidth }%`,
@@ -48,7 +48,7 @@ export default function Edit( {
48
48
 
49
49
  const inspectorControls = (
50
50
  <InspectorControls>
51
- <PanelBody title={ __( 'Avatar Settings' ) }>
51
+ <PanelBody title={ __( 'Settings' ) }>
52
52
  <RangeControl
53
53
  __nextHasNoMarginBottom
54
54
  __next40pxDefaultSize
@@ -16,6 +16,8 @@
16
16
  * the block is in legacy mode. If not, the HTML generated in the editor is
17
17
  * returned instead.
18
18
  *
19
+ * @global WP_Post $post Global post object.
20
+ *
19
21
  * @param array $attributes Block attributes.
20
22
  * @param string $content Block default content.
21
23
  * @param WP_Block $block Block instance.
@@ -464,7 +464,7 @@ function CoverEdit( {
464
464
  >
465
465
  <div className="wp-block-cover__placeholder-background-options">
466
466
  <ColorPalette
467
- disableCustomColors={ true }
467
+ disableCustomColors
468
468
  value={ overlayColor.color }
469
469
  onChange={ onSetOverlayColor }
470
470
  clearable={ false }
@@ -525,7 +525,7 @@ function CoverEdit( {
525
525
  { ! url && useFeaturedImage && (
526
526
  <Placeholder
527
527
  className="wp-block-cover__image--placeholder-image"
528
- withIllustration={ true }
528
+ withIllustration
529
529
  />
530
530
  ) }
531
531
 
@@ -304,7 +304,7 @@ export default function CoverInspectorControls( {
304
304
  minHeight: undefined,
305
305
  minHeightUnit: undefined,
306
306
  } ) }
307
- isShownByDefault={ true }
307
+ isShownByDefault
308
308
  panelId={ clientId }
309
309
  >
310
310
  <CoverHeightInput
@@ -6,7 +6,7 @@ import classnames from 'classnames';
6
6
  /**
7
7
  * WordPress dependencies
8
8
  */
9
- import { useMemo, useState } from '@wordpress/element';
9
+ import { useState } from '@wordpress/element';
10
10
  import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
11
11
 
12
12
  /**
@@ -40,10 +40,6 @@ export default function ResizableCoverPopover( {
40
40
  ...props
41
41
  } ) {
42
42
  const [ isResizing, setIsResizing ] = useState( false );
43
- const dimensions = useMemo(
44
- () => ( { height, minHeight, width } ),
45
- [ minHeight, height, width ]
46
- );
47
43
 
48
44
  const resizableBoxProps = {
49
45
  className: classnames( className, { 'is-resizing': isResizing } ),
@@ -75,7 +71,6 @@ export default function ResizableCoverPopover( {
75
71
  return (
76
72
  <ResizableBoxPopover
77
73
  className="block-library-cover__resizable-box-popover"
78
- __unstableRefreshSize={ dimensions }
79
74
  resizableBoxProps={ resizableBoxProps }
80
75
  { ...props }
81
76
  />
@@ -538,7 +538,7 @@ const Cover = ( {
538
538
  <BottomSheetConsumer>
539
539
  { ( { shouldEnableBottomSheetScroll } ) => (
540
540
  <ColorPalette
541
- enableCustomColor={ true }
541
+ enableCustomColor
542
542
  customColorIndicatorStyles={
543
543
  styles.paletteColorIndicator
544
544
  }
@@ -19,6 +19,7 @@
19
19
  }
20
20
  },
21
21
  "supports": {
22
+ "__experimentalOnEnter": true,
22
23
  "align": [ "wide", "full" ],
23
24
  "color": {
24
25
  "gradients": true,
@@ -131,7 +131,7 @@ const v3 = {
131
131
  'wp-block-file__button',
132
132
  __experimentalGetElementClassName( 'button' )
133
133
  ) }
134
- download={ true }
134
+ download
135
135
  aria-describedby={ describedById }
136
136
  >
137
137
  <RichText.Content value={ downloadButtonText } />
@@ -259,7 +259,7 @@ const v2 = {
259
259
  <a
260
260
  href={ href }
261
261
  className="wp-block-file__button"
262
- download={ true }
262
+ download
263
263
  aria-describedby={ describedById }
264
264
  >
265
265
  <RichText.Content value={ downloadButtonText } />
@@ -372,7 +372,7 @@ const v1 = {
372
372
  <a
373
373
  href={ href }
374
374
  className="wp-block-file__button"
375
- download={ true }
375
+ download
376
376
  >
377
377
  <RichText.Content value={ downloadButtonText } />
378
378
  </a>
package/src/file/edit.js CHANGED
@@ -6,7 +6,7 @@ import classnames from 'classnames';
6
6
  /**
7
7
  * WordPress dependencies
8
8
  */
9
- import { getBlobByURL, isBlobURL, revokeBlobURL } from '@wordpress/blob';
9
+ import { isBlobURL } from '@wordpress/blob';
10
10
  import {
11
11
  __unstableGetAnimateClassName as getAnimateClassName,
12
12
  ResizableBox,
@@ -36,6 +36,7 @@ import { store as noticesStore } from '@wordpress/notices';
36
36
  import FileBlockInspector from './inspector';
37
37
  import { browserSupportsPdfs } from './utils';
38
38
  import removeAnchorTag from '../utils/remove-anchor-tag';
39
+ import { useUploadMediaFromBlobURL } from '../utils/hooks';
39
40
 
40
41
  export const MIN_PREVIEW_HEIGHT = 200;
41
42
  export const MAX_PREVIEW_HEIGHT = 2000;
@@ -72,7 +73,6 @@ function FileEdit( { attributes, isSelected, setAttributes, clientId } ) {
72
73
  displayPreview,
73
74
  previewHeight,
74
75
  } = attributes;
75
- const { getSettings } = useSelect( blockEditorStore );
76
76
  const { media } = useSelect(
77
77
  ( select ) => ( {
78
78
  media:
@@ -86,20 +86,13 @@ function FileEdit( { attributes, isSelected, setAttributes, clientId } ) {
86
86
  const { createErrorNotice } = useDispatch( noticesStore );
87
87
  const { toggleSelection } = useDispatch( blockEditorStore );
88
88
 
89
- useEffect( () => {
90
- // Upload a file drag-and-dropped into the editor.
91
- if ( isBlobURL( href ) ) {
92
- const file = getBlobByURL( href );
93
-
94
- getSettings().mediaUpload( {
95
- filesList: [ file ],
96
- onFileChange: ( [ newMedia ] ) => onSelectFile( newMedia ),
97
- onError: onUploadError,
98
- } );
99
-
100
- revokeBlobURL( href );
101
- }
89
+ useUploadMediaFromBlobURL( {
90
+ url: href,
91
+ onChange: onSelectFile,
92
+ onError: onUploadError,
93
+ } );
102
94
 
95
+ useEffect( () => {
103
96
  if ( RichText.isEmpty( downloadButtonText ) ) {
104
97
  setAttributes( {
105
98
  downloadButtonText: _x( 'Download', 'button label' ),