@wordpress/block-library 8.6.0 → 8.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (425) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/buttons/index.js +1 -0
  3. package/build/buttons/index.js.map +1 -1
  4. package/build/buttons/transforms.js +1 -0
  5. package/build/buttons/transforms.js.map +1 -1
  6. package/build/column/index.js +2 -1
  7. package/build/column/index.js.map +1 -1
  8. package/build/columns/edit.js +28 -8
  9. package/build/columns/edit.js.map +1 -1
  10. package/build/columns/index.js +6 -1
  11. package/build/columns/index.js.map +1 -1
  12. package/build/columns/utils.js +4 -9
  13. package/build/columns/utils.js.map +1 -1
  14. package/build/cover/edit/index.js +46 -50
  15. package/build/cover/edit/index.js.map +1 -1
  16. package/build/cover/edit/inspector-controls.js +2 -2
  17. package/build/cover/edit/inspector-controls.js.map +1 -1
  18. package/build/cover/edit/{resizable-cover.js → resizable-cover-popover.js} +32 -6
  19. package/build/cover/edit/resizable-cover-popover.js.map +1 -0
  20. package/build/cover/index.js +12 -0
  21. package/build/cover/index.js.map +1 -1
  22. package/build/details/edit.js +67 -0
  23. package/build/details/edit.js.map +1 -0
  24. package/build/details/index.js +110 -0
  25. package/build/details/index.js.map +1 -0
  26. package/build/details/save.js +33 -0
  27. package/build/details/save.js.map +1 -0
  28. package/build/details-content/edit.js +34 -0
  29. package/build/details-content/edit.js.map +1 -0
  30. package/build/details-content/index.js +94 -0
  31. package/build/details-content/index.js.map +1 -0
  32. package/build/details-content/save.js +20 -0
  33. package/build/details-content/save.js.map +1 -0
  34. package/build/details-summary/edit.js +42 -0
  35. package/build/details-summary/edit.js.map +1 -0
  36. package/build/details-summary/index.js +97 -0
  37. package/build/details-summary/index.js.map +1 -0
  38. package/build/details-summary/save.js +24 -0
  39. package/build/details-summary/save.js.map +1 -0
  40. package/build/embed/deprecated.js +4 -1
  41. package/build/embed/deprecated.js.map +1 -1
  42. package/build/embed/embed-link-settings.native.js +1 -1
  43. package/build/embed/embed-link-settings.native.js.map +1 -1
  44. package/build/embed/embed-placeholder.js +1 -1
  45. package/build/embed/embed-placeholder.js.map +1 -1
  46. package/build/embed/index.js +4 -1
  47. package/build/embed/index.js.map +1 -1
  48. package/build/embed/transforms.js +4 -1
  49. package/build/embed/transforms.js.map +1 -1
  50. package/build/embed/util.js +4 -1
  51. package/build/embed/util.js.map +1 -1
  52. package/build/file/edit.native.js +0 -2
  53. package/build/file/edit.native.js.map +1 -1
  54. package/build/gallery/edit.js +8 -5
  55. package/build/gallery/edit.js.map +1 -1
  56. package/build/gallery/use-get-media.native.js +2 -1
  57. package/build/gallery/use-get-media.native.js.map +1 -1
  58. package/build/gallery/use-image-sizes.js +1 -1
  59. package/build/gallery/use-image-sizes.js.map +1 -1
  60. package/build/group/deprecated.js +4 -2
  61. package/build/group/deprecated.js.map +1 -1
  62. package/build/group/edit.js +22 -5
  63. package/build/group/edit.js.map +1 -1
  64. package/build/group/placeholder.js +11 -1
  65. package/build/group/placeholder.js.map +1 -1
  66. package/build/group/variations.js +23 -3
  67. package/build/group/variations.js.map +1 -1
  68. package/build/image/edit.js +1 -1
  69. package/build/image/edit.js.map +1 -1
  70. package/build/image/edit.native.js +1 -1
  71. package/build/image/edit.native.js.map +1 -1
  72. package/build/image/image.js +8 -6
  73. package/build/image/image.js.map +1 -1
  74. package/build/image/index.js +9 -2
  75. package/build/image/index.js.map +1 -1
  76. package/build/index.js +24 -6
  77. package/build/index.js.map +1 -1
  78. package/build/latest-posts/edit.js +1 -0
  79. package/build/latest-posts/edit.js.map +1 -1
  80. package/build/media-text/deprecated.js +228 -18
  81. package/build/media-text/deprecated.js.map +1 -1
  82. package/build/media-text/edit.js +3 -3
  83. package/build/media-text/edit.js.map +1 -1
  84. package/build/media-text/index.js +1 -1
  85. package/build/media-text/media-container.js +2 -6
  86. package/build/media-text/media-container.js.map +1 -1
  87. package/build/media-text/media-container.native.js +3 -3
  88. package/build/media-text/media-container.native.js.map +1 -1
  89. package/build/navigation/deprecated.js +8 -11
  90. package/build/navigation/deprecated.js.map +1 -1
  91. package/build/navigation/edit/index.js +1 -12
  92. package/build/navigation/edit/index.js.map +1 -1
  93. package/build/navigation/edit/inner-blocks.js +1 -4
  94. package/build/navigation/edit/inner-blocks.js.map +1 -1
  95. package/build/navigation/edit/unsaved-inner-blocks.js +1 -14
  96. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  97. package/build/navigation/index.js +0 -1
  98. package/build/navigation/index.js.map +1 -1
  99. package/build/post-author/index.js +0 -1
  100. package/build/post-author/index.js.map +1 -1
  101. package/build/post-date/edit.js +2 -1
  102. package/build/post-date/edit.js.map +1 -1
  103. package/build/post-date/index.js +4 -1
  104. package/build/post-date/index.js.map +1 -1
  105. package/build/post-date/variations.js +28 -0
  106. package/build/post-date/variations.js.map +1 -0
  107. package/build/post-excerpt/edit.js +39 -10
  108. package/build/post-excerpt/edit.js.map +1 -1
  109. package/build/post-featured-image/dimension-controls.js +4 -3
  110. package/build/post-featured-image/dimension-controls.js.map +1 -1
  111. package/build/post-featured-image/edit.js +8 -22
  112. package/build/post-featured-image/edit.js.map +1 -1
  113. package/build/post-template/index.js +1 -1
  114. package/build/post-time-to-read/edit.js +1 -1
  115. package/build/post-time-to-read/edit.js.map +1 -1
  116. package/build/post-time-to-read/index.js +24 -1
  117. package/build/post-time-to-read/index.js.map +1 -1
  118. package/build/quote/index.js +1 -0
  119. package/build/quote/index.js.map +1 -1
  120. package/build/spacer/controls.js +25 -6
  121. package/build/spacer/controls.js.map +1 -1
  122. package/build/spacer/edit.js +27 -7
  123. package/build/spacer/edit.js.map +1 -1
  124. package/build/spacer/save.js +2 -2
  125. package/build/spacer/save.js.map +1 -1
  126. package/build/table/state.js +35 -35
  127. package/build/table/state.js.map +1 -1
  128. package/build/term-description/index.js +1 -2
  129. package/build/term-description/index.js.map +1 -1
  130. package/build/utils/clean-empty-object.js +5 -2
  131. package/build/utils/clean-empty-object.js.map +1 -1
  132. package/build-module/buttons/index.js +1 -0
  133. package/build-module/buttons/index.js.map +1 -1
  134. package/build-module/buttons/transforms.js +1 -0
  135. package/build-module/buttons/transforms.js.map +1 -1
  136. package/build-module/column/index.js +2 -1
  137. package/build-module/column/index.js.map +1 -1
  138. package/build-module/columns/edit.js +28 -8
  139. package/build-module/columns/edit.js.map +1 -1
  140. package/build-module/columns/index.js +6 -1
  141. package/build-module/columns/index.js.map +1 -1
  142. package/build-module/columns/utils.js +4 -8
  143. package/build-module/columns/utils.js.map +1 -1
  144. package/build-module/cover/edit/index.js +48 -52
  145. package/build-module/cover/edit/index.js.map +1 -1
  146. package/build-module/cover/edit/inspector-controls.js +2 -2
  147. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  148. package/build-module/cover/edit/{resizable-cover.js → resizable-cover-popover.js} +31 -6
  149. package/build-module/cover/edit/resizable-cover-popover.js.map +1 -0
  150. package/build-module/cover/index.js +12 -0
  151. package/build-module/cover/index.js.map +1 -1
  152. package/build-module/details/edit.js +52 -0
  153. package/build-module/details/edit.js.map +1 -0
  154. package/build-module/details/index.js +91 -0
  155. package/build-module/details/index.js.map +1 -0
  156. package/build-module/details/save.js +20 -0
  157. package/build-module/details/save.js.map +1 -0
  158. package/build-module/details-content/edit.js +23 -0
  159. package/build-module/details-content/edit.js.map +1 -0
  160. package/build-module/details-content/index.js +76 -0
  161. package/build-module/details-content/index.js.map +1 -0
  162. package/build-module/details-content/save.js +11 -0
  163. package/build-module/details-content/save.js.map +1 -0
  164. package/build-module/details-summary/edit.js +30 -0
  165. package/build-module/details-summary/edit.js.map +1 -0
  166. package/build-module/details-summary/index.js +79 -0
  167. package/build-module/details-summary/index.js.map +1 -0
  168. package/build-module/details-summary/save.js +16 -0
  169. package/build-module/details-summary/save.js.map +1 -0
  170. package/build-module/embed/deprecated.js +4 -1
  171. package/build-module/embed/deprecated.js.map +1 -1
  172. package/build-module/embed/embed-link-settings.native.js +1 -1
  173. package/build-module/embed/embed-link-settings.native.js.map +1 -1
  174. package/build-module/embed/embed-placeholder.js +1 -1
  175. package/build-module/embed/embed-placeholder.js.map +1 -1
  176. package/build-module/embed/index.js +4 -1
  177. package/build-module/embed/index.js.map +1 -1
  178. package/build-module/embed/transforms.js +4 -1
  179. package/build-module/embed/transforms.js.map +1 -1
  180. package/build-module/embed/util.js +4 -1
  181. package/build-module/embed/util.js.map +1 -1
  182. package/build-module/file/edit.native.js +0 -2
  183. package/build-module/file/edit.native.js.map +1 -1
  184. package/build-module/gallery/edit.js +8 -5
  185. package/build-module/gallery/edit.js.map +1 -1
  186. package/build-module/gallery/use-get-media.native.js +2 -1
  187. package/build-module/gallery/use-get-media.native.js.map +1 -1
  188. package/build-module/gallery/use-image-sizes.js +1 -1
  189. package/build-module/gallery/use-image-sizes.js.map +1 -1
  190. package/build-module/group/deprecated.js +4 -2
  191. package/build-module/group/deprecated.js.map +1 -1
  192. package/build-module/group/edit.js +21 -5
  193. package/build-module/group/edit.js.map +1 -1
  194. package/build-module/group/placeholder.js +11 -1
  195. package/build-module/group/placeholder.js.map +1 -1
  196. package/build-module/group/variations.js +24 -1
  197. package/build-module/group/variations.js.map +1 -1
  198. package/build-module/image/edit.js +1 -1
  199. package/build-module/image/edit.js.map +1 -1
  200. package/build-module/image/edit.native.js +1 -1
  201. package/build-module/image/edit.native.js.map +1 -1
  202. package/build-module/image/image.js +8 -6
  203. package/build-module/image/image.js.map +1 -1
  204. package/build-module/image/index.js +9 -2
  205. package/build-module/image/index.js.map +1 -1
  206. package/build-module/index.js +21 -6
  207. package/build-module/index.js.map +1 -1
  208. package/build-module/latest-posts/edit.js +1 -0
  209. package/build-module/latest-posts/edit.js.map +1 -1
  210. package/build-module/media-text/deprecated.js +227 -18
  211. package/build-module/media-text/deprecated.js.map +1 -1
  212. package/build-module/media-text/edit.js +3 -3
  213. package/build-module/media-text/edit.js.map +1 -1
  214. package/build-module/media-text/index.js +1 -1
  215. package/build-module/media-text/media-container.js +1 -5
  216. package/build-module/media-text/media-container.js.map +1 -1
  217. package/build-module/media-text/media-container.native.js +1 -1
  218. package/build-module/media-text/media-container.native.js.map +1 -1
  219. package/build-module/navigation/deprecated.js +8 -10
  220. package/build-module/navigation/deprecated.js.map +1 -1
  221. package/build-module/navigation/edit/index.js +1 -12
  222. package/build-module/navigation/edit/index.js.map +1 -1
  223. package/build-module/navigation/edit/inner-blocks.js +1 -4
  224. package/build-module/navigation/edit/inner-blocks.js.map +1 -1
  225. package/build-module/navigation/edit/unsaved-inner-blocks.js +1 -14
  226. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  227. package/build-module/navigation/index.js +0 -1
  228. package/build-module/navigation/index.js.map +1 -1
  229. package/build-module/post-author/index.js +0 -1
  230. package/build-module/post-author/index.js.map +1 -1
  231. package/build-module/post-date/edit.js +2 -1
  232. package/build-module/post-date/edit.js.map +1 -1
  233. package/build-module/post-date/index.js +3 -1
  234. package/build-module/post-date/index.js.map +1 -1
  235. package/build-module/post-date/variations.js +18 -0
  236. package/build-module/post-date/variations.js.map +1 -0
  237. package/build-module/post-excerpt/edit.js +38 -11
  238. package/build-module/post-excerpt/edit.js.map +1 -1
  239. package/build-module/post-featured-image/dimension-controls.js +4 -3
  240. package/build-module/post-featured-image/dimension-controls.js.map +1 -1
  241. package/build-module/post-featured-image/edit.js +8 -22
  242. package/build-module/post-featured-image/edit.js.map +1 -1
  243. package/build-module/post-template/index.js +1 -1
  244. package/build-module/post-time-to-read/edit.js +1 -1
  245. package/build-module/post-time-to-read/edit.js.map +1 -1
  246. package/build-module/post-time-to-read/index.js +24 -1
  247. package/build-module/post-time-to-read/index.js.map +1 -1
  248. package/build-module/quote/index.js +1 -0
  249. package/build-module/quote/index.js.map +1 -1
  250. package/build-module/spacer/controls.js +27 -9
  251. package/build-module/spacer/controls.js.map +1 -1
  252. package/build-module/spacer/edit.js +27 -8
  253. package/build-module/spacer/edit.js.map +1 -1
  254. package/build-module/spacer/save.js +3 -3
  255. package/build-module/spacer/save.js.map +1 -1
  256. package/build-module/table/state.js +35 -33
  257. package/build-module/table/state.js.map +1 -1
  258. package/build-module/term-description/index.js +1 -2
  259. package/build-module/term-description/index.js.map +1 -1
  260. package/build-module/utils/clean-empty-object.js +6 -3
  261. package/build-module/utils/clean-empty-object.js.map +1 -1
  262. package/build-style/categories/editor-rtl.css +5 -0
  263. package/build-style/categories/editor.css +5 -0
  264. package/build-style/categories/style-rtl.css +4 -0
  265. package/build-style/categories/style.css +4 -0
  266. package/build-style/columns/style-rtl.css +4 -1
  267. package/build-style/columns/style.css +4 -1
  268. package/build-style/common-rtl.css +1 -1
  269. package/build-style/common.css +1 -1
  270. package/build-style/cover/editor-rtl.css +11 -12
  271. package/build-style/cover/editor.css +11 -12
  272. package/build-style/cover/style-rtl.css +3 -2
  273. package/build-style/cover/style.css +3 -2
  274. package/build-style/details/style-rtl.css +91 -0
  275. package/build-style/details/style.css +91 -0
  276. package/build-style/details-summary/editor-rtl.css +91 -0
  277. package/build-style/details-summary/editor.css +91 -0
  278. package/build-style/details-summary/style-rtl.css +91 -0
  279. package/build-style/details-summary/style.css +91 -0
  280. package/build-style/editor-rtl.css +40 -48
  281. package/build-style/editor.css +40 -48
  282. package/build-style/file/style-rtl.css +4 -3
  283. package/build-style/file/style.css +4 -3
  284. package/build-style/navigation/style-rtl.css +2 -0
  285. package/build-style/navigation/style.css +2 -0
  286. package/build-style/post-excerpt/style-rtl.css +1 -1
  287. package/build-style/post-excerpt/style.css +1 -1
  288. package/build-style/post-featured-image/editor-rtl.css +1 -0
  289. package/build-style/post-featured-image/editor.css +1 -0
  290. package/build-style/post-template/style-rtl.css +1 -1
  291. package/build-style/post-template/style.css +1 -1
  292. package/build-style/post-time-to-read/style-rtl.css +91 -0
  293. package/build-style/post-time-to-read/style.css +91 -0
  294. package/build-style/pullquote/style-rtl.css +4 -1
  295. package/build-style/pullquote/style.css +4 -1
  296. package/build-style/search/style-rtl.css +8 -7
  297. package/build-style/search/style.css +8 -7
  298. package/build-style/shortcode/editor-rtl.css +15 -34
  299. package/build-style/shortcode/editor.css +15 -34
  300. package/build-style/spacer/editor-rtl.css +4 -2
  301. package/build-style/spacer/editor.css +4 -2
  302. package/build-style/style-rtl.css +44 -17
  303. package/build-style/style.css +44 -17
  304. package/package.json +31 -31
  305. package/src/buttons/block.json +1 -0
  306. package/src/categories/editor.scss +5 -0
  307. package/src/categories/style.scss +4 -0
  308. package/src/column/block.json +2 -1
  309. package/src/columns/block.json +6 -1
  310. package/src/columns/edit.js +35 -10
  311. package/src/columns/style.scss +5 -1
  312. package/src/columns/utils.js +8 -9
  313. package/src/comments/index.php +1 -0
  314. package/src/common.scss +1 -1
  315. package/src/cover/block.json +12 -0
  316. package/src/cover/edit/index.js +44 -37
  317. package/src/cover/edit/inspector-controls.js +4 -5
  318. package/src/cover/edit/resizable-cover-popover.js +82 -0
  319. package/src/cover/editor.scss +20 -13
  320. package/src/cover/index.php +9 -10
  321. package/src/cover/style.scss +2 -1
  322. package/src/cover/test/__snapshots__/transforms.native.js.snap +2 -2
  323. package/src/cover/test/edit.js +324 -0
  324. package/src/details/block.json +54 -0
  325. package/src/details/edit.js +59 -0
  326. package/src/details/index.js +35 -0
  327. package/src/details/save.js +15 -0
  328. package/src/details/style.scss +3 -0
  329. package/src/details-content/block.json +50 -0
  330. package/src/details-content/edit.js +29 -0
  331. package/src/details-content/index.js +23 -0
  332. package/src/details-content/save.js +12 -0
  333. package/src/details-summary/block.json +53 -0
  334. package/src/details-summary/edit.js +27 -0
  335. package/src/details-summary/editor.scss +3 -0
  336. package/src/details-summary/index.js +23 -0
  337. package/src/details-summary/save.js +13 -0
  338. package/src/details-summary/style.scss +3 -0
  339. package/src/editor.scss +1 -0
  340. package/src/embed/block.json +4 -1
  341. package/src/embed/embed-link-settings.native.js +1 -1
  342. package/src/embed/embed-placeholder.js +1 -1
  343. package/src/file/edit.native.js +0 -2
  344. package/src/file/style.scss +5 -2
  345. package/src/gallery/edit.js +5 -2
  346. package/src/gallery/test/use-get-media.native.js +24 -0
  347. package/src/gallery/use-get-media.native.js +1 -1
  348. package/src/gallery/use-image-sizes.js +1 -1
  349. package/src/group/deprecated.js +4 -2
  350. package/src/group/edit.js +27 -9
  351. package/src/group/placeholder.js +13 -1
  352. package/src/group/variations.js +14 -1
  353. package/src/home-link/index.php +2 -2
  354. package/src/image/block.json +9 -2
  355. package/src/image/edit.js +1 -1
  356. package/src/image/edit.native.js +1 -1
  357. package/src/image/image.js +15 -7
  358. package/src/image/index.php +7 -2
  359. package/src/image/test/__snapshots__/transforms.native.js.snap +1 -1
  360. package/src/index.js +13 -3
  361. package/src/latest-comments/style.scss +1 -1
  362. package/src/latest-posts/edit.js +3 -0
  363. package/src/media-text/block.json +1 -1
  364. package/src/media-text/deprecated.js +235 -3
  365. package/src/media-text/edit.js +7 -6
  366. package/src/media-text/media-container.js +1 -5
  367. package/src/media-text/media-container.native.js +1 -1
  368. package/src/media-text/test/__snapshots__/transforms.native.js.snap +4 -4
  369. package/src/navigation/block.json +0 -1
  370. package/src/navigation/deprecated.js +15 -19
  371. package/src/navigation/edit/index.js +0 -13
  372. package/src/navigation/edit/inner-blocks.js +0 -3
  373. package/src/navigation/edit/unsaved-inner-blocks.js +34 -46
  374. package/src/navigation/index.php +0 -4
  375. package/src/navigation/style.scss +6 -4
  376. package/src/navigation-link/index.php +2 -1
  377. package/src/navigation-submenu/index.php +30 -76
  378. package/src/paragraph/test/edit.native.js +356 -1
  379. package/src/post-author/block.json +0 -1
  380. package/src/post-author/index.php +1 -1
  381. package/src/post-date/edit.js +4 -1
  382. package/src/post-date/index.js +2 -0
  383. package/src/post-date/variations.js +20 -0
  384. package/src/post-excerpt/edit.js +48 -16
  385. package/src/post-excerpt/index.php +3 -3
  386. package/src/post-excerpt/style.scss +2 -1
  387. package/src/post-featured-image/dimension-controls.js +7 -3
  388. package/src/post-featured-image/edit.js +8 -29
  389. package/src/post-featured-image/editor.scss +1 -0
  390. package/src/post-template/block.json +1 -1
  391. package/src/post-template/style.scss +1 -1
  392. package/src/post-time-to-read/block.json +24 -1
  393. package/src/post-time-to-read/edit.js +1 -1
  394. package/src/post-time-to-read/index.php +3 -3
  395. package/src/post-time-to-read/style.scss +4 -0
  396. package/src/preformatted/test/__snapshots__/edit.native.js.snap +2 -2
  397. package/src/preformatted/test/edit.native.js +45 -2
  398. package/src/pullquote/style.scss +5 -1
  399. package/src/pullquote/test/edit.native.js +70 -0
  400. package/src/query-title/index.php +2 -5
  401. package/src/quote/block.json +1 -0
  402. package/src/quote/test/edit.native.js +92 -0
  403. package/src/search/index.php +1 -1
  404. package/src/search/style.scss +16 -12
  405. package/src/shortcode/editor.scss +26 -5
  406. package/src/spacer/controls.js +42 -17
  407. package/src/spacer/edit.js +41 -9
  408. package/src/spacer/editor.scss +2 -1
  409. package/src/spacer/save.js +3 -3
  410. package/src/style.scss +3 -0
  411. package/src/table/state.js +83 -66
  412. package/src/term-description/block.json +1 -2
  413. package/src/utils/clean-empty-object.js +4 -4
  414. package/src/verse/test/edit.native.js +33 -0
  415. package/src/video/test/__snapshots__/transforms.native.js.snap +1 -1
  416. package/tsconfig.tsbuildinfo +1 -1
  417. package/build/cover/edit/resizable-cover.js.map +0 -1
  418. package/build/media-text/media-container-icon.js +0 -27
  419. package/build/media-text/media-container-icon.js.map +0 -1
  420. package/build-module/cover/edit/resizable-cover.js.map +0 -1
  421. package/build-module/media-text/media-container-icon.js +0 -17
  422. package/build-module/media-text/media-container-icon.js.map +0 -1
  423. package/src/cover/edit/resizable-cover.js +0 -61
  424. package/src/cover/test/block-controls.js +0 -62
  425. package/src/media-text/media-container-icon.js +0 -12
@@ -578,7 +578,7 @@ export class ImageEdit extends Component {
578
578
  footerNote={
579
579
  <>
580
580
  { __(
581
- 'Describe the purpose of the image. Leave empty if the image is purely decorative.'
581
+ 'Describe the purpose of the image. Leave empty if decorative.'
582
582
  ) }{ ' ' }
583
583
  <FooterMessageLink
584
584
  href={
@@ -170,12 +170,18 @@ export default function Image( {
170
170
  ( { slug } ) => image?.media_details?.sizes?.[ slug ]?.source_url
171
171
  )
172
172
  .map( ( { name, slug } ) => ( { value: slug, label: name } ) );
173
+ const canUploadMedia = !! mediaUpload;
173
174
 
174
175
  // If an image is externally hosted, try to fetch the image data. This may
175
176
  // fail if the image host doesn't allow CORS with the domain. If it works,
176
177
  // we can enable a button in the toolbar to upload the image.
177
178
  useEffect( () => {
178
- if ( ! isExternalImage( id, url ) || ! isSelected || externalBlob ) {
179
+ if (
180
+ ! isExternalImage( id, url ) ||
181
+ ! isSelected ||
182
+ ! canUploadMedia ||
183
+ externalBlob
184
+ ) {
179
185
  return;
180
186
  }
181
187
 
@@ -185,7 +191,7 @@ export default function Image( {
185
191
  .then( ( blob ) => setExternalBlob( blob ) )
186
192
  // Do nothing, cannot upload.
187
193
  .catch( () => {} );
188
- }, [ id, url, isSelected, externalBlob ] );
194
+ }, [ id, url, isSelected, externalBlob, canUploadMedia ] );
189
195
 
190
196
  // We need to show the caption when changes come from
191
197
  // history navigation(undo/redo).
@@ -401,19 +407,18 @@ export default function Image( {
401
407
  { ! multiImageSelection && (
402
408
  <TextareaControl
403
409
  __nextHasNoMarginBottom
404
- label={ __( 'Alt text (alternative text)' ) }
410
+ label={ __( 'Alternative text' ) }
405
411
  value={ alt }
406
412
  onChange={ updateAlt }
407
413
  help={
408
414
  <>
409
415
  <ExternalLink href="https://www.w3.org/WAI/tutorials/images/decision-tree">
410
416
  { __(
411
- 'Describe the purpose of the image'
417
+ 'Describe the purpose of the image.'
412
418
  ) }
413
419
  </ExternalLink>
414
- { __(
415
- 'Leave empty if the image is purely decorative.'
416
- ) }
420
+ <br />
421
+ { __( 'Leave empty if decorative.' ) }
417
422
  </>
418
423
  }
419
424
  />
@@ -428,6 +433,9 @@ export default function Image( {
428
433
  isResizable={ isResizable }
429
434
  imageWidth={ naturalWidth }
430
435
  imageHeight={ naturalHeight }
436
+ imageSizeHelp={ __(
437
+ 'Select the size of the source image.'
438
+ ) }
431
439
  />
432
440
  </PanelBody>
433
441
  </InspectorControls>
@@ -14,13 +14,18 @@
14
14
  * @return string Returns the block content with the data-id attribute added.
15
15
  */
16
16
  function render_block_core_image( $attributes, $content ) {
17
+ $processor = new WP_HTML_Tag_Processor( $content );
18
+ $processor->next_tag( 'img' );
19
+
20
+ if ( $processor->get_attribute( 'src' ) === null ) {
21
+ return '';
22
+ }
23
+
17
24
  if ( isset( $attributes['data-id'] ) ) {
18
25
  // Add the data-id="$id" attribute to the img element
19
26
  // to provide backwards compatibility for the Gallery Block,
20
27
  // which now wraps Image Blocks within innerBlocks.
21
28
  // The data-id attribute is added in a core/gallery `render_block_data` hook.
22
- $processor = new WP_HTML_Tag_Processor( $content );
23
- $processor->next_tag( 'img' );
24
29
  $processor->set_attribute( 'data-id', $attributes['data-id'] );
25
30
  $content = $processor->get_updated_html();
26
31
  }
@@ -42,7 +42,7 @@ exports[`Image block transformations to Group block 1`] = `
42
42
 
43
43
  exports[`Image block transformations to Media & Text block 1`] = `
44
44
  "<!-- wp:media-text {"mediaId":1,"mediaType":"image"} -->
45
- <div class="wp-block-media-text alignwide is-stacked-on-mobile"><figure class="wp-block-media-text__media"><img src="https://cldup.com/cXyG__fTLN.jpg" alt="" class="wp-image-1 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->
45
+ <div class="wp-block-media-text is-stacked-on-mobile"><figure class="wp-block-media-text__media"><img src="https://cldup.com/cXyG__fTLN.jpg" alt="" class="wp-image-1 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->
46
46
  <p></p>
47
47
  <!-- /wp:paragraph --></div></div>
48
48
  <!-- /wp:media-text -->"
package/src/index.js CHANGED
@@ -45,6 +45,9 @@ import * as commentsPaginationNext from './comments-pagination-next';
45
45
  import * as commentsPaginationNumbers from './comments-pagination-numbers';
46
46
  import * as commentsTitle from './comments-title';
47
47
  import * as cover from './cover';
48
+ import * as details from './details';
49
+ import * as detailsContent from './details-content';
50
+ import * as detailsSummary from './details-summary';
48
51
  import * as embed from './embed';
49
52
  import * as file from './file';
50
53
  import * as gallery from './gallery';
@@ -121,8 +124,8 @@ import isBlockMetadataExperimental from './utils/is-block-metadata-experimental'
121
124
  /**
122
125
  * Function to get all the block-library blocks in an array
123
126
  */
124
- const getAllBlocks = () =>
125
- [
127
+ const getAllBlocks = () => {
128
+ const blocks = [
126
129
  // Common blocks are grouped at the top to prioritize their display
127
130
  // in various contexts — like the inserter and auto-complete components.
128
131
  paragraph,
@@ -224,7 +227,14 @@ const getAllBlocks = () =>
224
227
  termDescription,
225
228
  queryTitle,
226
229
  postAuthorBiography,
227
- ].filter( Boolean );
230
+ ];
231
+ if ( window?.__experimentalEnableDetailsBlocks ) {
232
+ blocks.push( details );
233
+ blocks.push( detailsContent );
234
+ blocks.push( detailsSummary );
235
+ }
236
+ return blocks.filter( Boolean );
237
+ };
228
238
 
229
239
  /**
230
240
  * Function to get all the core blocks in an array.
@@ -1,7 +1,7 @@
1
1
  // Lower specificity - target list element.
2
2
  ol.wp-block-latest-comments {
3
3
  // Removes left spacing in Customizer Widgets screen.
4
- // Due to low specificity this will be safely overriden
4
+ // Due to low specificity this will be safely overridden
5
5
  // by default wp-block layout styles in the Post/Site editor
6
6
  margin-left: 0;
7
7
 
@@ -289,6 +289,9 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
289
289
  imageWidth={ defaultImageWidth }
290
290
  imageHeight={ defaultImageHeight }
291
291
  imageSizeOptions={ imageSizeOptions }
292
+ imageSizeHelp={ __(
293
+ 'Select the size of the source image.'
294
+ ) }
292
295
  onChangeImage={ ( value ) =>
293
296
  setAttributes( {
294
297
  featuredImageSizeSlug: value,
@@ -10,7 +10,7 @@
10
10
  "attributes": {
11
11
  "align": {
12
12
  "type": "string",
13
- "default": "wide"
13
+ "default": "none"
14
14
  },
15
15
  "mediaAlt": {
16
16
  "type": "string",
@@ -13,6 +13,7 @@ import {
13
13
  useInnerBlocksProps,
14
14
  useBlockProps,
15
15
  } from '@wordpress/block-editor';
16
+ import { compose } from '@wordpress/compose';
16
17
 
17
18
  /**
18
19
  * Internal dependencies
@@ -30,6 +31,19 @@ const v1ToV5ImageFillStyles = ( url, focalPoint ) => {
30
31
  : {};
31
32
  };
32
33
 
34
+ const v6ImageFillStyles = ( url, focalPoint ) => {
35
+ return url
36
+ ? {
37
+ backgroundImage: `url(${ url })`,
38
+ backgroundPosition: focalPoint
39
+ ? `${ Math.round( focalPoint.x * 100 ) }% ${ Math.round(
40
+ focalPoint.y * 100
41
+ ) }%`
42
+ : `50% 50%`,
43
+ }
44
+ : {};
45
+ };
46
+
33
47
  const DEFAULT_MEDIA_WIDTH = 50;
34
48
  const noop = () => {};
35
49
 
@@ -49,6 +63,20 @@ const migrateCustomColors = ( attributes ) => {
49
63
  };
50
64
  };
51
65
 
66
+ // After align attribute's default was updated this function explicitly sets
67
+ // the align value for deprecated blocks to the `wide` value which was default
68
+ // for their versions of this block.
69
+ const migrateDefaultAlign = ( attributes ) => {
70
+ if ( attributes.align ) {
71
+ return attributes;
72
+ }
73
+
74
+ return {
75
+ ...attributes,
76
+ align: 'wide',
77
+ };
78
+ };
79
+
52
80
  const baseAttributes = {
53
81
  align: {
54
82
  type: 'string',
@@ -133,6 +161,40 @@ const v4ToV5BlockAttributes = {
133
161
  },
134
162
  };
135
163
 
164
+ const v6Attributes = {
165
+ ...v4ToV5BlockAttributes,
166
+ mediaAlt: {
167
+ type: 'string',
168
+ source: 'attribute',
169
+ selector: 'figure img',
170
+ attribute: 'alt',
171
+ default: '',
172
+ __experimentalRole: 'content',
173
+ },
174
+ mediaId: {
175
+ type: 'number',
176
+ __experimentalRole: 'content',
177
+ },
178
+ mediaUrl: {
179
+ type: 'string',
180
+ source: 'attribute',
181
+ selector: 'figure video,figure img',
182
+ attribute: 'src',
183
+ __experimentalRole: 'content',
184
+ },
185
+ href: {
186
+ type: 'string',
187
+ source: 'attribute',
188
+ selector: 'figure a',
189
+ attribute: 'href',
190
+ __experimentalRole: 'content',
191
+ },
192
+ mediaType: {
193
+ type: 'string',
194
+ __experimentalRole: 'content',
195
+ },
196
+ };
197
+
136
198
  const v4ToV5Supports = {
137
199
  anchor: true,
138
200
  align: [ 'wide', 'full' ],
@@ -143,6 +205,166 @@ const v4ToV5Supports = {
143
205
  },
144
206
  };
145
207
 
208
+ const v6Supports = {
209
+ ...v4ToV5Supports,
210
+ color: {
211
+ gradients: true,
212
+ link: true,
213
+ __experimentalDefaultControls: {
214
+ background: true,
215
+ text: true,
216
+ },
217
+ },
218
+ spacing: {
219
+ margin: true,
220
+ padding: true,
221
+ },
222
+ typography: {
223
+ fontSize: true,
224
+ lineHeight: true,
225
+ __experimentalFontFamily: true,
226
+ __experimentalFontWeight: true,
227
+ __experimentalFontStyle: true,
228
+ __experimentalTextTransform: true,
229
+ __experimentalTextDecoration: true,
230
+ __experimentalLetterSpacing: true,
231
+ __experimentalDefaultControls: {
232
+ fontSize: true,
233
+ },
234
+ },
235
+ };
236
+
237
+ // Version with wide as the default alignment.
238
+ // See: https://github.com/WordPress/gutenberg/pull/48404
239
+ const v6 = {
240
+ attributes: v6Attributes,
241
+ supports: v6Supports,
242
+ save( { attributes } ) {
243
+ const {
244
+ isStackedOnMobile,
245
+ mediaAlt,
246
+ mediaPosition,
247
+ mediaType,
248
+ mediaUrl,
249
+ mediaWidth,
250
+ mediaId,
251
+ verticalAlignment,
252
+ imageFill,
253
+ focalPoint,
254
+ linkClass,
255
+ href,
256
+ linkTarget,
257
+ rel,
258
+ } = attributes;
259
+ const mediaSizeSlug =
260
+ attributes.mediaSizeSlug || DEFAULT_MEDIA_SIZE_SLUG;
261
+ const newRel = isEmpty( rel ) ? undefined : rel;
262
+
263
+ const imageClasses = classnames( {
264
+ [ `wp-image-${ mediaId }` ]: mediaId && mediaType === 'image',
265
+ [ `size-${ mediaSizeSlug }` ]: mediaId && mediaType === 'image',
266
+ } );
267
+
268
+ let image = (
269
+ <img
270
+ src={ mediaUrl }
271
+ alt={ mediaAlt }
272
+ className={ imageClasses || null }
273
+ />
274
+ );
275
+
276
+ if ( href ) {
277
+ image = (
278
+ <a
279
+ className={ linkClass }
280
+ href={ href }
281
+ target={ linkTarget }
282
+ rel={ newRel }
283
+ >
284
+ { image }
285
+ </a>
286
+ );
287
+ }
288
+
289
+ const mediaTypeRenders = {
290
+ image: () => image,
291
+ video: () => <video controls src={ mediaUrl } />,
292
+ };
293
+ const className = classnames( {
294
+ 'has-media-on-the-right': 'right' === mediaPosition,
295
+ 'is-stacked-on-mobile': isStackedOnMobile,
296
+ [ `is-vertically-aligned-${ verticalAlignment }` ]:
297
+ verticalAlignment,
298
+ 'is-image-fill': imageFill,
299
+ } );
300
+ const backgroundStyles = imageFill
301
+ ? v6ImageFillStyles( mediaUrl, focalPoint )
302
+ : {};
303
+
304
+ let gridTemplateColumns;
305
+ if ( mediaWidth !== DEFAULT_MEDIA_WIDTH ) {
306
+ gridTemplateColumns =
307
+ 'right' === mediaPosition
308
+ ? `auto ${ mediaWidth }%`
309
+ : `${ mediaWidth }% auto`;
310
+ }
311
+ const style = {
312
+ gridTemplateColumns,
313
+ };
314
+
315
+ if ( 'right' === mediaPosition ) {
316
+ return (
317
+ <div { ...useBlockProps.save( { className, style } ) }>
318
+ <div
319
+ { ...useInnerBlocksProps.save( {
320
+ className: 'wp-block-media-text__content',
321
+ } ) }
322
+ />
323
+ <figure
324
+ className="wp-block-media-text__media"
325
+ style={ backgroundStyles }
326
+ >
327
+ { ( mediaTypeRenders[ mediaType ] || noop )() }
328
+ </figure>
329
+ </div>
330
+ );
331
+ }
332
+ return (
333
+ <div { ...useBlockProps.save( { className, style } ) }>
334
+ <figure
335
+ className="wp-block-media-text__media"
336
+ style={ backgroundStyles }
337
+ >
338
+ { ( mediaTypeRenders[ mediaType ] || noop )() }
339
+ </figure>
340
+ <div
341
+ { ...useInnerBlocksProps.save( {
342
+ className: 'wp-block-media-text__content',
343
+ } ) }
344
+ />
345
+ </div>
346
+ );
347
+ },
348
+ migrate: migrateDefaultAlign,
349
+ isEligible( attributes, innerBlocks, { block } ) {
350
+ const { attributes: finalizedAttributes } = block;
351
+ // When the align attribute defaults to none, valid block markup should
352
+ // not contain any alignment CSS class. Unfortunately, this
353
+ // deprecation's version of the block won't be invalidated due to the
354
+ // alignwide class still being in the markup. That is because the custom
355
+ // CSS classname support picks it up and adds it to the className
356
+ // attribute. At the time of parsing, the className attribute won't
357
+ // contain the alignwide class, hence the need to check the finalized
358
+ // block attributes.
359
+ return (
360
+ attributes.align === undefined &&
361
+ !! finalizedAttributes.className?.includes( 'alignwide' )
362
+ );
363
+ },
364
+ };
365
+
366
+ // Version with non-rounded background position attribute for focal point.
367
+ // See: https://github.com/WordPress/gutenberg/pull/33915
146
368
  const v5 = {
147
369
  attributes: v4ToV5BlockAttributes,
148
370
  supports: v4ToV5Supports,
@@ -252,9 +474,11 @@ const v5 = {
252
474
  </div>
253
475
  );
254
476
  },
477
+ migrate: migrateDefaultAlign,
255
478
  };
256
479
 
257
480
  // Version with CSS grid
481
+ // See: https://github.com/WordPress/gutenberg/pull/40806
258
482
  const v4 = {
259
483
  attributes: v4ToV5BlockAttributes,
260
484
  supports: v4ToV5Supports,
@@ -348,8 +572,11 @@ const v4 = {
348
572
  </div>
349
573
  );
350
574
  },
575
+ migrate: migrateDefaultAlign,
351
576
  };
352
577
 
578
+ // Version with ad-hoc color attributes
579
+ // See: https://github.com/WordPress/gutenberg/pull/21169
353
580
  const v3 = {
354
581
  attributes: {
355
582
  ...baseAttributes,
@@ -399,7 +626,7 @@ const v3 = {
399
626
  type: 'object',
400
627
  },
401
628
  },
402
- migrate: migrateCustomColors,
629
+ migrate: compose( migrateCustomColors, migrateDefaultAlign ),
403
630
  save( { attributes } ) {
404
631
  const {
405
632
  backgroundColor,
@@ -496,6 +723,8 @@ const v3 = {
496
723
  },
497
724
  };
498
725
 
726
+ // Version with stack on mobile off by default
727
+ // See: https://github.com/WordPress/gutenberg/pull/14364
499
728
  const v2 = {
500
729
  attributes: {
501
730
  ...baseAttributes,
@@ -521,7 +750,7 @@ const v2 = {
521
750
  type: 'object',
522
751
  },
523
752
  },
524
- migrate: migrateCustomColors,
753
+ migrate: compose( migrateCustomColors, migrateDefaultAlign ),
525
754
  save( { attributes } ) {
526
755
  const {
527
756
  backgroundColor,
@@ -596,6 +825,8 @@ const v2 = {
596
825
  },
597
826
  };
598
827
 
828
+ // Version without the wp-image-#### class on image
829
+ // See: https://github.com/WordPress/gutenberg/pull/11922
599
830
  const v1 = {
600
831
  attributes: {
601
832
  ...baseAttributes,
@@ -612,6 +843,7 @@ const v1 = {
612
843
  attribute: 'src',
613
844
  },
614
845
  },
846
+ migrate: migrateDefaultAlign,
615
847
  save( { attributes } ) {
616
848
  const {
617
849
  backgroundColor,
@@ -663,4 +895,4 @@ const v1 = {
663
895
  },
664
896
  };
665
897
 
666
- export default [ v5, v4, v3, v2, v1 ];
898
+ export default [ v6, v5, v4, v3, v2, v1 ];
@@ -270,17 +270,16 @@ function MediaTextEdit( { attributes, isSelected, setAttributes, clientId } ) {
270
270
  { mediaType === 'image' && (
271
271
  <TextareaControl
272
272
  __nextHasNoMarginBottom
273
- label={ __( 'Alt text (alternative text)' ) }
273
+ label={ __( 'Alternative text' ) }
274
274
  value={ mediaAlt }
275
275
  onChange={ onMediaAltChange }
276
276
  help={
277
277
  <>
278
278
  <ExternalLink href="https://www.w3.org/WAI/tutorials/images/decision-tree">
279
- { __( 'Describe the purpose of the image' ) }
279
+ { __( 'Describe the purpose of the image.' ) }
280
280
  </ExternalLink>
281
- { __(
282
- 'Leave empty if the image is purely decorative.'
283
- ) }
281
+ <br />
282
+ { __( 'Leave empty if decorative.' ) }
284
283
  </>
285
284
  }
286
285
  />
@@ -291,7 +290,9 @@ function MediaTextEdit( { attributes, isSelected, setAttributes, clientId } ) {
291
290
  slug={ mediaSizeSlug }
292
291
  imageSizeOptions={ imageSizeOptions }
293
292
  isResizable={ false }
294
- imageSizeHelp={ __( 'Select which image size to load.' ) }
293
+ imageSizeHelp={ __(
294
+ 'Select the size of the source image.'
295
+ ) }
295
296
  />
296
297
  ) }
297
298
  { mediaUrl && (
@@ -20,11 +20,7 @@ import { useDispatch } from '@wordpress/data';
20
20
  import { forwardRef } from '@wordpress/element';
21
21
  import { isBlobURL } from '@wordpress/blob';
22
22
  import { store as noticesStore } from '@wordpress/notices';
23
-
24
- /**
25
- * Internal dependencies
26
- */
27
- import icon from './media-container-icon';
23
+ import { media as icon } from '@wordpress/icons';
28
24
 
29
25
  /**
30
26
  * Constants
@@ -26,12 +26,12 @@ import { Component } from '@wordpress/element';
26
26
  import { __ } from '@wordpress/i18n';
27
27
  import { isURL, getProtocol } from '@wordpress/url';
28
28
  import { compose, withPreferredColorScheme } from '@wordpress/compose';
29
+ import { media as icon } from '@wordpress/icons';
29
30
 
30
31
  /**
31
32
  * Internal dependencies
32
33
  */
33
34
  import styles from './style.scss';
34
- import icon from './media-container-icon';
35
35
  import SvgIconRetry from './icon-retry';
36
36
 
37
37
  /**
@@ -3,7 +3,7 @@
3
3
  exports[`Media & Text block transformations with Image to Columns block 1`] = `
4
4
  "<!-- wp:columns -->
5
5
  <div class="wp-block-columns"><!-- wp:column {"width":"100%"} -->
6
- <div class="wp-block-column" style="flex-basis:100%"><!-- wp:media-text {"mediaId":4674,"mediaType":"image","isStackedOnMobile":false,"className":"is-stacked-on-mobile"} -->
6
+ <div class="wp-block-column" style="flex-basis:100%"><!-- wp:media-text {"align":"wide","mediaId":4674,"mediaType":"image","isStackedOnMobile":false,"className":"is-stacked-on-mobile"} -->
7
7
  <div class="wp-block-media-text alignwide is-stacked-on-mobile"><figure class="wp-block-media-text__media"><img src="https://cldup.com/cXyG__fTLN.jpg" alt="" class="wp-image-4674 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph {"className":"has-large-font-size"} -->
8
8
  <p class="has-large-font-size">Mountain</p>
9
9
  <!-- /wp:paragraph --></div></div>
@@ -22,7 +22,7 @@ exports[`Media & Text block transformations with Image to Cover block 1`] = `
22
22
 
23
23
  exports[`Media & Text block transformations with Image to Group block 1`] = `
24
24
  "<!-- wp:group {"align":"wide","layout":{"type":"constrained"}} -->
25
- <div class="wp-block-group alignwide"><!-- wp:media-text {"mediaId":4674,"mediaType":"image","isStackedOnMobile":false,"className":"is-stacked-on-mobile"} -->
25
+ <div class="wp-block-group alignwide"><!-- wp:media-text {"align":"wide","mediaId":4674,"mediaType":"image","isStackedOnMobile":false,"className":"is-stacked-on-mobile"} -->
26
26
  <div class="wp-block-media-text alignwide is-stacked-on-mobile"><figure class="wp-block-media-text__media"><img src="https://cldup.com/cXyG__fTLN.jpg" alt="" class="wp-image-4674 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph {"className":"has-large-font-size"} -->
27
27
  <p class="has-large-font-size">Mountain</p>
28
28
  <!-- /wp:paragraph --></div></div>
@@ -39,7 +39,7 @@ exports[`Media & Text block transformations with Image to Image block 1`] = `
39
39
  exports[`Media & Text block transformations with Video to Columns block 1`] = `
40
40
  "<!-- wp:columns -->
41
41
  <div class="wp-block-columns"><!-- wp:column {"width":"100%"} -->
42
- <div class="wp-block-column" style="flex-basis:100%"><!-- wp:media-text {"mediaId":4675,"mediaType":"video","isStackedOnMobile":false,"className":"is-stacked-on-mobile"} -->
42
+ <div class="wp-block-column" style="flex-basis:100%"><!-- wp:media-text {"align":"wide","mediaId":4675,"mediaType":"video","isStackedOnMobile":false,"className":"is-stacked-on-mobile"} -->
43
43
  <div class="wp-block-media-text alignwide is-stacked-on-mobile"><figure class="wp-block-media-text__media"><video controls src="https://i.cloudup.com/YtZFJbuQCE.mov"></video></figure><div class="wp-block-media-text__content"><!-- wp:paragraph {"className":"has-large-font-size"} -->
44
44
  <p class="has-large-font-size">Cloudup</p>
45
45
  <!-- /wp:paragraph --></div></div>
@@ -58,7 +58,7 @@ exports[`Media & Text block transformations with Video to Cover block 1`] = `
58
58
 
59
59
  exports[`Media & Text block transformations with Video to Group block 1`] = `
60
60
  "<!-- wp:group {"align":"wide","layout":{"type":"constrained"}} -->
61
- <div class="wp-block-group alignwide"><!-- wp:media-text {"mediaId":4675,"mediaType":"video","isStackedOnMobile":false,"className":"is-stacked-on-mobile"} -->
61
+ <div class="wp-block-group alignwide"><!-- wp:media-text {"align":"wide","mediaId":4675,"mediaType":"video","isStackedOnMobile":false,"className":"is-stacked-on-mobile"} -->
62
62
  <div class="wp-block-media-text alignwide is-stacked-on-mobile"><figure class="wp-block-media-text__media"><video controls src="https://i.cloudup.com/YtZFJbuQCE.mov"></video></figure><div class="wp-block-media-text__content"><!-- wp:paragraph {"className":"has-large-font-size"} -->
63
63
  <p class="has-large-font-size">Cloudup</p>
64
64
  <!-- /wp:paragraph --></div></div>
@@ -87,7 +87,6 @@
87
87
  "showSubmenuIcon": "showSubmenuIcon",
88
88
  "openSubmenusOnClick": "openSubmenusOnClick",
89
89
  "style": "style",
90
- "orientation": "orientation",
91
90
  "maxNestingLevel": "maxNestingLevel"
92
91
  },
93
92
  "supports": {
@@ -1,8 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { mapValues } from 'lodash';
5
-
6
1
  /**
7
2
  * WordPress dependencies
8
3
  */
@@ -331,22 +326,23 @@ const migrateTypographyPresets = function ( attributes ) {
331
326
  ...attributes,
332
327
  style: {
333
328
  ...attributes.style,
334
- typography: mapValues(
335
- attributes.style.typography,
336
- ( value, key ) => {
337
- const prefix = TYPOGRAPHY_PRESET_DEPRECATION_MAP[ key ];
338
- if ( prefix && value.startsWith( prefix ) ) {
339
- const newValue = value.slice( prefix.length );
340
- if (
341
- 'textDecoration' === key &&
342
- 'strikethrough' === newValue
343
- ) {
344
- return 'line-through';
329
+ typography: Object.fromEntries(
330
+ Object.entries( attributes.style.typography ?? {} ).map(
331
+ ( [ key, value ] ) => {
332
+ const prefix = TYPOGRAPHY_PRESET_DEPRECATION_MAP[ key ];
333
+ if ( prefix && value.startsWith( prefix ) ) {
334
+ const newValue = value.slice( prefix.length );
335
+ if (
336
+ 'textDecoration' === key &&
337
+ 'strikethrough' === newValue
338
+ ) {
339
+ return [ key, 'line-through' ];
340
+ }
341
+ return [ key, newValue ];
345
342
  }
346
- return newValue;
343
+ return [ key, value ];
347
344
  }
348
- return value;
349
- }
345
+ )
350
346
  ),
351
347
  },
352
348
  };
@@ -477,19 +477,6 @@ function Navigation( {
477
477
  showClassicMenuConversionNotice,
478
478
  ] );
479
479
 
480
- // Spacer block needs orientation from context. This is a patch until
481
- // https://github.com/WordPress/gutenberg/issues/36197 is addressed.
482
- useEffect( () => {
483
- if ( orientation ) {
484
- __unstableMarkNextChangeAsNotPersistent();
485
- setAttributes( { orientation } );
486
- }
487
- }, [
488
- orientation,
489
- __unstableMarkNextChangeAsNotPersistent,
490
- setAttributes,
491
- ] );
492
-
493
480
  useEffect( () => {
494
481
  if ( ! enableContrastChecking ) {
495
482
  return;