@wordpress/block-library 9.44.0 → 9.45.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 (367) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/accordion/edit.cjs +0 -2
  3. package/build/accordion/edit.cjs.map +2 -2
  4. package/build/accordion-item/block.json +1 -0
  5. package/build/button/constants.cjs +1 -1
  6. package/build/button/constants.cjs.map +1 -1
  7. package/build/categories/edit.cjs +5 -1
  8. package/build/categories/edit.cjs.map +2 -2
  9. package/build/embed/edit.cjs +38 -34
  10. package/build/embed/edit.cjs.map +3 -3
  11. package/build/embed/transforms.cjs +3 -1
  12. package/build/embed/transforms.cjs.map +2 -2
  13. package/build/embed/util.cjs +13 -2
  14. package/build/embed/util.cjs.map +2 -2
  15. package/build/form/block.json +1 -1
  16. package/build/form-input/block.json +1 -1
  17. package/build/form-submission-notification/block.json +1 -1
  18. package/build/form-submit-button/block.json +1 -1
  19. package/build/group/block.json +2 -1
  20. package/build/image/constants.cjs +1 -1
  21. package/build/image/constants.cjs.map +2 -2
  22. package/build/image/edit.cjs +2 -4
  23. package/build/image/edit.cjs.map +2 -2
  24. package/build/image/image.cjs +49 -19
  25. package/build/image/image.cjs.map +3 -3
  26. package/build/index.cjs +4 -4
  27. package/build/index.cjs.map +2 -2
  28. package/build/latest-posts/edit.cjs +1 -1
  29. package/build/latest-posts/edit.cjs.map +1 -1
  30. package/build/math/edit.cjs +2 -2
  31. package/build/math/edit.cjs.map +2 -2
  32. package/build/navigation/edit/accessible-description.cjs +2 -2
  33. package/build/navigation/edit/accessible-description.cjs.map +2 -2
  34. package/build/navigation/edit/overlay-template-part-selector.cjs.map +2 -2
  35. package/build/navigation-link/edit.cjs +2 -1
  36. package/build/navigation-link/edit.cjs.map +2 -2
  37. package/build/navigation-link/link-ui/dialog-wrapper.cjs +2 -1
  38. package/build/navigation-link/link-ui/dialog-wrapper.cjs.map +2 -2
  39. package/build/navigation-link/link-ui/index.cjs +2 -1
  40. package/build/navigation-link/link-ui/index.cjs.map +2 -2
  41. package/build/paragraph/use-enter.cjs +12 -23
  42. package/build/paragraph/use-enter.cjs.map +2 -2
  43. package/build/post-author/edit.cjs.map +3 -3
  44. package/build/post-comments-form/edit.cjs +2 -2
  45. package/build/post-comments-form/edit.cjs.map +2 -2
  46. package/build/post-featured-image/edit.cjs +2 -5
  47. package/build/post-featured-image/edit.cjs.map +2 -2
  48. package/build/post-template/edit.cjs +8 -2
  49. package/build/post-template/edit.cjs.map +2 -2
  50. package/build/pullquote/block.json +1 -4
  51. package/build/query/edit/inspector-controls/author-control.cjs +1 -1
  52. package/build/query/edit/inspector-controls/author-control.cjs.map +2 -2
  53. package/build/query/edit/inspector-controls/format-controls.cjs +1 -1
  54. package/build/query/edit/inspector-controls/format-controls.cjs.map +2 -2
  55. package/build/query/edit/inspector-controls/parent-control.cjs +1 -1
  56. package/build/query/edit/inspector-controls/parent-control.cjs.map +2 -2
  57. package/build/query/edit/inspector-controls/taxonomy-controls.cjs +1 -1
  58. package/build/query/edit/inspector-controls/taxonomy-controls.cjs.map +2 -2
  59. package/build/site-logo/edit.cjs +34 -20
  60. package/build/site-logo/edit.cjs.map +2 -2
  61. package/build/tab/block.json +23 -23
  62. package/build/tab/controls.cjs +5 -48
  63. package/build/tab/controls.cjs.map +3 -3
  64. package/build/tab/edit.cjs +76 -92
  65. package/build/tab/edit.cjs.map +3 -3
  66. package/build/tab/save.cjs +3 -3
  67. package/build/tab/save.cjs.map +2 -2
  68. package/{src/tabs-menu → build/tab-list}/block.json +4 -4
  69. package/build/{tabs-menu → tab-list}/edit.cjs +9 -14
  70. package/build/tab-list/edit.cjs.map +7 -0
  71. package/build/{tabs-menu → tab-list}/index.cjs +5 -5
  72. package/build/tab-list/index.cjs.map +7 -0
  73. package/build/{tabs-menu → tab-list}/save.cjs +1 -1
  74. package/build/{tabs-menu → tab-list}/save.cjs.map +1 -1
  75. package/build/{tab → tab-panel}/add-tab-toolbar-control.cjs +16 -16
  76. package/build/tab-panel/add-tab-toolbar-control.cjs.map +7 -0
  77. package/build/tab-panel/block.json +27 -37
  78. package/build/tab-panel/controls.cjs +89 -0
  79. package/build/tab-panel/controls.cjs.map +7 -0
  80. package/build/tab-panel/edit.cjs +88 -18
  81. package/build/tab-panel/edit.cjs.map +3 -3
  82. package/build/tab-panel/index.cjs +1 -1
  83. package/build/tab-panel/index.cjs.map +1 -1
  84. package/build/{tab → tab-panel}/init.cjs +1 -1
  85. package/build/{tab → tab-panel}/init.cjs.map +1 -1
  86. package/build/{tab → tab-panel}/remove-tab-toolbar-control.cjs +16 -16
  87. package/build/tab-panel/remove-tab-toolbar-control.cjs.map +7 -0
  88. package/build/tab-panel/save.cjs +4 -2
  89. package/build/tab-panel/save.cjs.map +2 -2
  90. package/build/tab-panels/block.json +66 -0
  91. package/build/{tabs-menu-item/controls.cjs → tab-panels/edit.cjs} +25 -11
  92. package/build/tab-panels/edit.cjs.map +7 -0
  93. package/build/{tabs-menu-item → tab-panels}/index.cjs +5 -5
  94. package/build/{tabs-menu → tab-panels}/index.cjs.map +2 -2
  95. package/build/{tabs-menu-item → tab-panels}/save.cjs +4 -6
  96. package/build/tab-panels/save.cjs.map +7 -0
  97. package/build/tabs/block.json +1 -2
  98. package/build/tabs/controls.cjs +2 -2
  99. package/build/tabs/controls.cjs.map +1 -1
  100. package/build/tabs/edit.cjs +29 -100
  101. package/build/tabs/edit.cjs.map +3 -3
  102. package/build/tabs/index.cjs +5 -5
  103. package/build/tabs/index.cjs.map +1 -1
  104. package/build/tabs/use-tab-list-sync.cjs +190 -0
  105. package/build/tabs/use-tab-list-sync.cjs.map +7 -0
  106. package/build/terms-query/edit/inspector-controls/include-control.cjs +1 -1
  107. package/build/terms-query/edit/inspector-controls/include-control.cjs.map +2 -2
  108. package/build/video/tracks-editor.cjs +2 -2
  109. package/build/video/tracks-editor.cjs.map +2 -2
  110. package/build-module/accordion/edit.mjs +0 -2
  111. package/build-module/accordion/edit.mjs.map +2 -2
  112. package/build-module/accordion-item/block.json +1 -0
  113. package/build-module/button/constants.mjs +1 -1
  114. package/build-module/button/constants.mjs.map +1 -1
  115. package/build-module/categories/edit.mjs +5 -2
  116. package/build-module/categories/edit.mjs.map +2 -2
  117. package/build-module/embed/edit.mjs +45 -36
  118. package/build-module/embed/edit.mjs.map +2 -2
  119. package/build-module/embed/transforms.mjs +8 -2
  120. package/build-module/embed/transforms.mjs.map +2 -2
  121. package/build-module/embed/util.mjs +11 -1
  122. package/build-module/embed/util.mjs.map +2 -2
  123. package/build-module/form/block.json +1 -1
  124. package/build-module/form-input/block.json +1 -1
  125. package/build-module/form-submission-notification/block.json +1 -1
  126. package/build-module/form-submit-button/block.json +1 -1
  127. package/build-module/group/block.json +2 -1
  128. package/build-module/image/constants.mjs +1 -1
  129. package/build-module/image/constants.mjs.map +2 -2
  130. package/build-module/image/edit.mjs +2 -4
  131. package/build-module/image/edit.mjs.map +2 -2
  132. package/build-module/image/image.mjs +49 -19
  133. package/build-module/image/image.mjs.map +3 -3
  134. package/build-module/index.mjs +4 -4
  135. package/build-module/index.mjs.map +2 -2
  136. package/build-module/latest-posts/edit.mjs +1 -1
  137. package/build-module/latest-posts/edit.mjs.map +1 -1
  138. package/build-module/math/edit.mjs +2 -2
  139. package/build-module/math/edit.mjs.map +2 -2
  140. package/build-module/navigation/edit/accessible-description.mjs +1 -1
  141. package/build-module/navigation/edit/accessible-description.mjs.map +1 -1
  142. package/build-module/navigation/edit/overlay-template-part-selector.mjs +2 -2
  143. package/build-module/navigation/edit/overlay-template-part-selector.mjs.map +1 -1
  144. package/build-module/navigation-link/edit.mjs +2 -5
  145. package/build-module/navigation-link/edit.mjs.map +2 -2
  146. package/build-module/navigation-link/link-ui/dialog-wrapper.mjs +2 -1
  147. package/build-module/navigation-link/link-ui/dialog-wrapper.mjs.map +2 -2
  148. package/build-module/navigation-link/link-ui/index.mjs +1 -1
  149. package/build-module/navigation-link/link-ui/index.mjs.map +2 -2
  150. package/build-module/paragraph/use-enter.mjs +13 -23
  151. package/build-module/paragraph/use-enter.mjs.map +2 -2
  152. package/build-module/post-author/edit.mjs +2 -2
  153. package/build-module/post-author/edit.mjs.map +2 -2
  154. package/build-module/post-comments-form/edit.mjs +1 -1
  155. package/build-module/post-comments-form/edit.mjs.map +2 -2
  156. package/build-module/post-featured-image/edit.mjs +2 -5
  157. package/build-module/post-featured-image/edit.mjs.map +2 -2
  158. package/build-module/post-template/edit.mjs +8 -2
  159. package/build-module/post-template/edit.mjs.map +2 -2
  160. package/build-module/pullquote/block.json +1 -4
  161. package/build-module/query/edit/inspector-controls/author-control.mjs +1 -1
  162. package/build-module/query/edit/inspector-controls/author-control.mjs.map +2 -2
  163. package/build-module/query/edit/inspector-controls/format-controls.mjs +1 -1
  164. package/build-module/query/edit/inspector-controls/format-controls.mjs.map +2 -2
  165. package/build-module/query/edit/inspector-controls/parent-control.mjs +1 -1
  166. package/build-module/query/edit/inspector-controls/parent-control.mjs.map +2 -2
  167. package/build-module/query/edit/inspector-controls/taxonomy-controls.mjs +1 -1
  168. package/build-module/query/edit/inspector-controls/taxonomy-controls.mjs.map +2 -2
  169. package/build-module/site-logo/edit.mjs +34 -20
  170. package/build-module/site-logo/edit.mjs.map +2 -2
  171. package/build-module/tab/block.json +23 -23
  172. package/build-module/tab/controls.mjs +7 -57
  173. package/build-module/tab/controls.mjs.map +2 -2
  174. package/build-module/tab/edit.mjs +80 -96
  175. package/build-module/tab/edit.mjs.map +3 -3
  176. package/build-module/tab/save.mjs +4 -4
  177. package/build-module/tab/save.mjs.map +2 -2
  178. package/build-module/{tabs-menu → tab-list}/block.json +4 -4
  179. package/build-module/{tabs-menu → tab-list}/edit.mjs +9 -14
  180. package/build-module/tab-list/edit.mjs.map +7 -0
  181. package/build-module/{tabs-menu → tab-list}/index.mjs +2 -2
  182. package/build-module/tab-list/index.mjs.map +7 -0
  183. package/build-module/{tabs-menu → tab-list}/save.mjs +1 -1
  184. package/build-module/{tabs-menu → tab-list}/save.mjs.map +1 -1
  185. package/build-module/{tab → tab-panel}/add-tab-toolbar-control.mjs +16 -16
  186. package/build-module/tab-panel/add-tab-toolbar-control.mjs.map +7 -0
  187. package/build-module/tab-panel/block.json +27 -37
  188. package/build-module/tab-panel/controls.mjs +65 -0
  189. package/build-module/tab-panel/controls.mjs.map +7 -0
  190. package/build-module/tab-panel/edit.mjs +90 -20
  191. package/build-module/tab-panel/edit.mjs.map +2 -2
  192. package/build-module/tab-panel/index.mjs +1 -1
  193. package/build-module/tab-panel/index.mjs.map +1 -1
  194. package/build-module/{tab → tab-panel}/init.mjs +1 -1
  195. package/build-module/{tab → tab-panel}/init.mjs.map +1 -1
  196. package/build-module/{tab → tab-panel}/remove-tab-toolbar-control.mjs +16 -16
  197. package/build-module/tab-panel/remove-tab-toolbar-control.mjs.map +7 -0
  198. package/build-module/tab-panel/save.mjs +4 -2
  199. package/build-module/tab-panel/save.mjs.map +2 -2
  200. package/build-module/tab-panels/block.json +66 -0
  201. package/build-module/tab-panels/edit.mjs +33 -0
  202. package/build-module/tab-panels/edit.mjs.map +7 -0
  203. package/build-module/{tabs-menu-item → tab-panels}/index.mjs +2 -2
  204. package/build-module/{tabs-menu → tab-panels}/index.mjs.map +2 -2
  205. package/build-module/tab-panels/save.mjs +12 -0
  206. package/build-module/tab-panels/save.mjs.map +7 -0
  207. package/build-module/tabs/block.json +1 -2
  208. package/build-module/tabs/controls.mjs +2 -2
  209. package/build-module/tabs/controls.mjs.map +1 -1
  210. package/build-module/tabs/edit.mjs +31 -102
  211. package/build-module/tabs/edit.mjs.map +2 -2
  212. package/build-module/tabs/index.mjs +5 -5
  213. package/build-module/tabs/index.mjs.map +1 -1
  214. package/build-module/tabs/use-tab-list-sync.mjs +169 -0
  215. package/build-module/tabs/use-tab-list-sync.mjs.map +7 -0
  216. package/build-module/terms-query/edit/inspector-controls/include-control.mjs +1 -1
  217. package/build-module/terms-query/edit/inspector-controls/include-control.mjs.map +2 -2
  218. package/build-module/video/tracks-editor.mjs +2 -2
  219. package/build-module/video/tracks-editor.mjs.map +2 -2
  220. package/build-style/classic-rtl.css +14 -0
  221. package/build-style/classic.css +14 -0
  222. package/build-style/editor-rtl.css +9 -5
  223. package/build-style/editor.css +9 -5
  224. package/build-style/latest-comments/style-rtl.css +4 -4
  225. package/build-style/latest-comments/style.css +4 -4
  226. package/build-style/post-template/style-rtl.css +1 -1
  227. package/build-style/post-template/style.css +1 -1
  228. package/build-style/style-rtl.css +45 -48
  229. package/build-style/style.css +45 -48
  230. package/build-style/tab/editor-rtl.css +11 -0
  231. package/build-style/tab/editor.css +11 -0
  232. package/build-style/tab/style-rtl.css +29 -16
  233. package/build-style/tab/style.css +29 -16
  234. package/build-style/tab-list/editor-rtl.css +6 -0
  235. package/build-style/tab-list/editor.css +6 -0
  236. package/build-style/tab-panel/style-rtl.css +17 -1
  237. package/build-style/tab-panel/style.css +17 -1
  238. package/build-style/tab-panels/style-rtl.css +4 -0
  239. package/build-style/tab-panels/style.css +4 -0
  240. package/build-style/tabs/style-rtl.css +0 -3
  241. package/build-style/tabs/style.css +0 -3
  242. package/build-style/video/editor-rtl.css +4 -0
  243. package/build-style/video/editor.css +4 -0
  244. package/package.json +39 -38
  245. package/src/accordion/edit.js +0 -2
  246. package/src/accordion-item/block.json +1 -0
  247. package/src/block/test/edit.native.js +1 -1
  248. package/src/button/constants.js +1 -1
  249. package/src/button/test/get-updated-link-attributes.js +6 -10
  250. package/src/categories/edit.js +3 -2
  251. package/src/classic.scss +25 -0
  252. package/src/editor.scss +2 -2
  253. package/src/embed/edit.js +61 -52
  254. package/src/embed/edit.native.js +71 -57
  255. package/src/embed/transforms.js +8 -2
  256. package/src/embed/util.js +17 -0
  257. package/src/form/block.json +1 -1
  258. package/src/form-input/block.json +1 -1
  259. package/src/form-submission-notification/block.json +1 -1
  260. package/src/form-submit-button/block.json +1 -1
  261. package/src/group/block.json +2 -1
  262. package/src/image/constants.js +1 -1
  263. package/src/image/edit.js +5 -3
  264. package/src/image/edit.native.js +3 -3
  265. package/src/image/image.js +63 -27
  266. package/src/image/test/edit.native.js +2 -2
  267. package/src/index.js +4 -4
  268. package/src/latest-comments/style.scss +7 -7
  269. package/src/latest-posts/edit.js +1 -1
  270. package/src/latest-posts/index.php +1 -1
  271. package/src/math/edit.js +3 -3
  272. package/src/navigation/edit/accessible-description.js +1 -1
  273. package/src/navigation/edit/overlay-template-part-selector.js +3 -3
  274. package/src/navigation/edit/test/overlay-template-part-selector.js +1 -0
  275. package/src/navigation-link/edit.js +2 -5
  276. package/src/navigation-link/link-ui/dialog-wrapper.js +2 -1
  277. package/src/navigation-link/link-ui/index.js +1 -1
  278. package/src/paragraph/use-enter.js +18 -24
  279. package/src/post-author/edit.js +3 -5
  280. package/src/post-comments-form/edit.js +1 -1
  281. package/src/post-featured-image/edit.js +2 -9
  282. package/src/post-template/edit.js +7 -1
  283. package/src/post-template/index.php +3 -0
  284. package/src/post-template/style.scss +2 -2
  285. package/src/pullquote/block.json +1 -4
  286. package/src/query/edit/inspector-controls/author-control.js +1 -1
  287. package/src/query/edit/inspector-controls/format-controls.js +1 -1
  288. package/src/query/edit/inspector-controls/parent-control.js +1 -1
  289. package/src/query/edit/inspector-controls/taxonomy-controls.js +1 -1
  290. package/src/site-logo/edit.js +40 -20
  291. package/src/style.scss +1 -1
  292. package/src/tab/block.json +23 -23
  293. package/src/tab/controls.js +6 -52
  294. package/src/tab/edit.js +94 -123
  295. package/src/{tabs-menu-item → tab}/editor.scss +3 -3
  296. package/src/tab/index.php +32 -51
  297. package/src/tab/save.js +4 -4
  298. package/src/tab/style.scss +34 -17
  299. package/{build/tabs-menu → src/tab-list}/block.json +4 -4
  300. package/src/{tabs-menu → tab-list}/edit.js +9 -18
  301. package/src/{tabs-menu → tab-list}/editor.scss +2 -2
  302. package/src/{tabs-menu → tab-list}/index.js +1 -1
  303. package/src/tab-list/index.php +80 -0
  304. package/src/{tab → tab-panel}/add-tab-toolbar-control.js +19 -19
  305. package/src/tab-panel/block.json +27 -37
  306. package/src/tab-panel/controls.js +65 -0
  307. package/src/tab-panel/edit.js +121 -20
  308. package/src/tab-panel/index.js +1 -1
  309. package/src/tab-panel/index.php +88 -0
  310. package/src/{tab → tab-panel}/remove-tab-toolbar-control.js +20 -19
  311. package/src/tab-panel/save.js +4 -2
  312. package/src/tab-panel/style.scss +20 -1
  313. package/src/tab-panels/block.json +66 -0
  314. package/src/tab-panels/edit.js +42 -0
  315. package/src/{tabs-menu-item → tab-panels}/index.js +1 -1
  316. package/src/tab-panels/save.js +11 -0
  317. package/src/tab-panels/style.scss +4 -0
  318. package/src/tabs/block.json +1 -2
  319. package/src/tabs/controls.js +2 -2
  320. package/src/tabs/edit.js +32 -150
  321. package/src/tabs/index.js +5 -5
  322. package/src/tabs/index.php +5 -5
  323. package/src/tabs/style.scss +0 -3
  324. package/src/tabs/use-tab-list-sync.js +237 -0
  325. package/src/terms-query/edit/inspector-controls/include-control.js +1 -1
  326. package/src/video/editor.scss +5 -0
  327. package/src/video/tracks-editor.js +2 -2
  328. package/build/tab/add-tab-toolbar-control.cjs.map +0 -7
  329. package/build/tab/remove-tab-toolbar-control.cjs.map +0 -7
  330. package/build/tab/slug-from-label.cjs +0 -37
  331. package/build/tab/slug-from-label.cjs.map +0 -7
  332. package/build/tabs-menu/edit.cjs.map +0 -7
  333. package/build/tabs-menu-item/block.json +0 -59
  334. package/build/tabs-menu-item/controls.cjs.map +0 -7
  335. package/build/tabs-menu-item/edit.cjs +0 -144
  336. package/build/tabs-menu-item/edit.cjs.map +0 -7
  337. package/build/tabs-menu-item/index.cjs.map +0 -7
  338. package/build/tabs-menu-item/save.cjs.map +0 -7
  339. package/build-module/tab/add-tab-toolbar-control.mjs.map +0 -7
  340. package/build-module/tab/remove-tab-toolbar-control.mjs.map +0 -7
  341. package/build-module/tab/slug-from-label.mjs +0 -16
  342. package/build-module/tab/slug-from-label.mjs.map +0 -7
  343. package/build-module/tabs-menu/edit.mjs.map +0 -7
  344. package/build-module/tabs-menu-item/block.json +0 -59
  345. package/build-module/tabs-menu-item/controls.mjs +0 -15
  346. package/build-module/tabs-menu-item/controls.mjs.map +0 -7
  347. package/build-module/tabs-menu-item/edit.mjs +0 -117
  348. package/build-module/tabs-menu-item/edit.mjs.map +0 -7
  349. package/build-module/tabs-menu-item/index.mjs.map +0 -7
  350. package/build-module/tabs-menu-item/save.mjs +0 -14
  351. package/build-module/tabs-menu-item/save.mjs.map +0 -7
  352. package/build-style/tabs-menu/editor-rtl.css +0 -6
  353. package/build-style/tabs-menu/editor.css +0 -6
  354. package/build-style/tabs-menu-item/editor-rtl.css +0 -11
  355. package/build-style/tabs-menu-item/editor.css +0 -11
  356. package/build-style/tabs-menu-item/style-rtl.css +0 -33
  357. package/build-style/tabs-menu-item/style.css +0 -33
  358. package/src/tab/slug-from-label.js +0 -26
  359. package/src/tabs-menu/index.php +0 -80
  360. package/src/tabs-menu-item/block.json +0 -59
  361. package/src/tabs-menu-item/controls.js +0 -19
  362. package/src/tabs-menu-item/edit.js +0 -150
  363. package/src/tabs-menu-item/index.php +0 -70
  364. package/src/tabs-menu-item/save.js +0 -13
  365. package/src/tabs-menu-item/style.scss +0 -40
  366. /package/src/{tabs-menu → tab-list}/save.js +0 -0
  367. /package/src/{tab → tab-panel}/init.js +0 -0
@@ -1,21 +1,3 @@
1
- /**
2
- * Internal dependencies
3
- */
4
- import {
5
- createUpgradedEmbedBlock,
6
- getClassNames,
7
- removeAspectRatioClasses,
8
- fallback,
9
- getEmbedInfoByProvider,
10
- getMergedAttributesWithPreview,
11
- } from './util';
12
- import EmbedControls from './embed-controls';
13
- import { embedContentIcon } from './icons';
14
- import EmbedLoading from './embed-loading';
15
- import EmbedPlaceholder from './embed-placeholder';
16
- import EmbedPreview from './embed-preview';
17
- import EmbedLinkSettings from './embed-link-settings';
18
-
19
1
  /**
20
2
  * External dependencies
21
3
  */
@@ -33,7 +15,25 @@ import {
33
15
  } from '@wordpress/block-editor';
34
16
  import { store as coreStore } from '@wordpress/core-data';
35
17
  import { View } from '@wordpress/primitives';
36
- import { getAuthority } from '@wordpress/url';
18
+ /**
19
+ * Internal dependencies
20
+ */
21
+ import {
22
+ createUpgradedEmbedBlock,
23
+ findMoreSuitableBlock,
24
+ getClassNames,
25
+ rewriteXToTwitter,
26
+ removeAspectRatioClasses,
27
+ fallback,
28
+ getEmbedInfoByProvider,
29
+ getMergedAttributesWithPreview,
30
+ } from './util';
31
+ import EmbedControls from './embed-controls';
32
+ import { embedContentIcon } from './icons';
33
+ import EmbedLoading from './embed-loading';
34
+ import EmbedPlaceholder from './embed-placeholder';
35
+ import EmbedPreview from './embed-preview';
36
+ import EmbedLinkSettings from './embed-link-settings';
37
37
 
38
38
  // The inline preview feature will be released progressible, for this reason
39
39
  // the embed will only be considered previewable for the following providers list.
@@ -77,6 +77,8 @@ const EmbedEdit = ( props ) => {
77
77
  const [ showEmbedBottomSheet, setShowEmbedBottomSheet ] =
78
78
  useState( isEditingURL );
79
79
  const { invalidateResolution } = useDispatch( coreStore );
80
+ const { __unstableMarkNextChangeAsNotPersistent } =
81
+ useDispatch( blockEditorStore );
80
82
 
81
83
  const { preview, fetching, themeSupportsResponsive, cannotEmbed } =
82
84
  useSelect(
@@ -150,50 +152,61 @@ const EmbedEdit = ( props ) => {
150
152
  } );
151
153
  };
152
154
 
155
+ // When the preview can't be embedded, retry without any trailing slash.
153
156
  useEffect( () => {
154
- if ( ! preview?.html || ! cannotEmbed || fetching ) {
157
+ if ( ! cannotEmbed || fetching || ! url ) {
155
158
  return;
156
159
  }
157
- // At this stage, we're not fetching the preview and know it can't be embedded,
158
- // so try removing any trailing slash, and resubmit.
160
+
159
161
  const newURL = url.replace( /\/$/, '' );
162
+ if ( newURL === url ) {
163
+ return;
164
+ }
165
+
160
166
  setIsEditingURL( false );
167
+ __unstableMarkNextChangeAsNotPersistent();
161
168
  setAttributes( { url: newURL } );
162
- }, [ preview?.html, url, cannotEmbed, fetching ] );
169
+ }, [
170
+ url,
171
+ cannotEmbed,
172
+ fetching,
173
+ setAttributes,
174
+ __unstableMarkNextChangeAsNotPersistent,
175
+ ] );
163
176
 
164
- // Try a different provider in case the embed url is not supported.
177
+ // Apply preview-derived attributes once the preview resolves.
165
178
  useEffect( () => {
166
- if ( ! cannotEmbed || fetching || ! url ) {
179
+ if ( ! preview || isEditingURL ) {
167
180
  return;
168
181
  }
169
182
 
170
- // Until X provider is supported in WordPress, as a workaround we use Twitter provider.
171
- if ( getAuthority( url ) === 'x.com' ) {
172
- const newURL = new URL( url );
173
- newURL.host = 'twitter.com';
174
- setAttributes( { url: newURL.toString() } );
175
- }
176
- }, [ url, cannotEmbed, fetching, setAttributes ] );
183
+ const mergedAttributes = getMergedAttributes();
177
184
 
178
- // Handle incoming preview.
179
- useEffect( () => {
180
- if ( preview && ! isEditingURL ) {
181
- // When obtaining an incoming preview,
182
- // we set the attributes derived from the preview data.
183
- const mergedAttributes = getMergedAttributes();
184
- setAttributes( mergedAttributes );
185
+ if ( onReplace ) {
186
+ const upgradedBlock = createUpgradedEmbedBlock(
187
+ props,
188
+ mergedAttributes
189
+ );
185
190
 
186
- if ( onReplace ) {
187
- const upgradedBlock = createUpgradedEmbedBlock(
188
- props,
189
- mergedAttributes
190
- );
191
-
192
- if ( upgradedBlock ) {
193
- onReplace( upgradedBlock );
194
- }
191
+ if ( upgradedBlock ) {
192
+ // Mutate via setAttributes; onReplace would remount the
193
+ // block and clear the URL textbox on undo.
194
+ __unstableMarkNextChangeAsNotPersistent();
195
+ setAttributes( upgradedBlock.attributes );
196
+ return;
195
197
  }
196
198
  }
199
+
200
+ const hasChanges = Object.keys( mergedAttributes ).some(
201
+ ( key ) => mergedAttributes[ key ] !== attributes[ key ]
202
+ );
203
+
204
+ if ( hasChanges ) {
205
+ // Merge into the URL-submit undo level so a single undo
206
+ // reverts both the submit and the preview-driven attributes.
207
+ __unstableMarkNextChangeAsNotPersistent();
208
+ setAttributes( mergedAttributes );
209
+ }
197
210
  }, [ preview, isEditingURL ] );
198
211
 
199
212
  useEffect(
@@ -203,19 +216,20 @@ const EmbedEdit = ( props ) => {
203
216
 
204
217
  const onEditURL = useCallback(
205
218
  ( value ) => {
206
- // If the embed URL was changed, we need to reset the aspect ratio class.
207
- // To do this we have to remove the existing ratio class so it can be recalculated.
208
- if ( attributes.url !== value ) {
209
- const blockClass = removeAspectRatioClasses(
210
- attributes.className
211
- );
212
- setAttributes( { className: blockClass } );
213
- }
219
+ const rewrittenURL = rewriteXToTwitter( value );
220
+ const urlChanged = attributes.url !== rewrittenURL;
214
221
 
215
222
  // The order of the following calls is important, we need to update the URL attribute before changing `isEditingURL`,
216
223
  // otherwise the side-effect that potentially replaces the block when updating the local state won't use the new URL
217
224
  // for creating the new block.
218
- setAttributes( { url: value } );
225
+ setAttributes( {
226
+ url: rewrittenURL,
227
+ ...findMoreSuitableBlock( rewrittenURL )?.attributes,
228
+ // If the embed URL was changed, reset the aspect ratio class so it can be recalculated.
229
+ ...( urlChanged && {
230
+ className: removeAspectRatioClasses( attributes.className ),
231
+ } ),
232
+ } );
219
233
  setIsEditingURL( false );
220
234
  },
221
235
  [ attributes, setAttributes ]
@@ -7,7 +7,11 @@ import { createBlock } from '@wordpress/blocks';
7
7
  * Internal dependencies
8
8
  */
9
9
  import metadata from './block.json';
10
- import { removeAspectRatioClasses } from './util';
10
+ import {
11
+ findMoreSuitableBlock,
12
+ rewriteXToTwitter,
13
+ removeAspectRatioClasses,
14
+ } from './util';
11
15
 
12
16
  const { name: EMBED_BLOCK } = metadata;
13
17
 
@@ -23,8 +27,10 @@ const transforms = {
23
27
  /^\s*(https?:\/\/\S+)\s*$/i.test( node.textContent ) &&
24
28
  node.textContent?.match( /https/gi )?.length === 1,
25
29
  transform: ( node ) => {
30
+ const url = rewriteXToTwitter( node.textContent.trim() );
26
31
  return createBlock( EMBED_BLOCK, {
27
- url: node.textContent.trim(),
32
+ url,
33
+ ...findMoreSuitableBlock( url )?.attributes,
28
34
  } );
29
35
  },
30
36
  },
package/src/embed/util.js CHANGED
@@ -14,6 +14,7 @@ import {
14
14
  getBlockType,
15
15
  getBlockVariations,
16
16
  } from '@wordpress/blocks';
17
+ import { getAuthority } from '@wordpress/url';
17
18
 
18
19
  /**
19
20
  * Internal dependencies
@@ -60,6 +61,22 @@ export const findMoreSuitableBlock = ( url ) =>
60
61
  matchesPatterns( url, patterns )
61
62
  );
62
63
 
64
+ /**
65
+ * Rewrites `x.com` URLs to `twitter.com` as a workaround while the
66
+ * WordPress oEmbed registry lacks an X provider. See: https://core.trac.wordpress.org/ticket/59142.
67
+ *
68
+ * @param {string} url The URL to rewrite.
69
+ * @return {string} The (possibly) rewritten URL.
70
+ */
71
+ export function rewriteXToTwitter( url ) {
72
+ if ( ! url || getAuthority( url ) !== 'x.com' ) {
73
+ return url;
74
+ }
75
+ const rewritten = new URL( url );
76
+ rewritten.host = 'twitter.com';
77
+ return rewritten.toString();
78
+ }
79
+
63
80
  export const isFromWordPress = ( html ) =>
64
81
  html && html.includes( 'class="wp-embedded-content"' );
65
82
 
@@ -4,7 +4,7 @@
4
4
  "__experimental": true,
5
5
  "name": "core/form",
6
6
  "title": "Form",
7
- "category": "common",
7
+ "category": "widgets",
8
8
  "allowedBlocks": [
9
9
  "core/paragraph",
10
10
  "core/heading",
@@ -4,7 +4,7 @@
4
4
  "__experimental": true,
5
5
  "name": "core/form-input",
6
6
  "title": "Input Field",
7
- "category": "common",
7
+ "category": "widgets",
8
8
  "ancestor": [ "core/form" ],
9
9
  "description": "The basic building block for forms.",
10
10
  "keywords": [ "input", "form" ],
@@ -4,7 +4,7 @@
4
4
  "__experimental": true,
5
5
  "name": "core/form-submission-notification",
6
6
  "title": "Form Submission Notification",
7
- "category": "common",
7
+ "category": "widgets",
8
8
  "ancestor": [ "core/form" ],
9
9
  "description": "Provide a notification message after the form has been submitted.",
10
10
  "keywords": [ "form", "feedback", "notification", "message" ],
@@ -4,7 +4,7 @@
4
4
  "__experimental": true,
5
5
  "name": "core/form-submit-button",
6
6
  "title": "Form Submit Button",
7
- "category": "common",
7
+ "category": "widgets",
8
8
  "icon": "button",
9
9
  "ancestor": [ "core/form" ],
10
10
  "allowedBlocks": [ "core/buttons", "core/button" ],
@@ -55,7 +55,8 @@
55
55
  }
56
56
  },
57
57
  "dimensions": {
58
- "minHeight": true
58
+ "minHeight": true,
59
+ "minWidth": true
59
60
  },
60
61
  "__experimentalBorder": {
61
62
  "color": true,
@@ -3,7 +3,7 @@ export const LINK_DESTINATION_NONE = 'none';
3
3
  export const LINK_DESTINATION_MEDIA = 'media';
4
4
  export const LINK_DESTINATION_ATTACHMENT = 'attachment';
5
5
  export const LINK_DESTINATION_CUSTOM = 'custom';
6
- export const NEW_TAB_REL = [ 'noreferrer', 'noopener' ];
6
+ export const NEW_TAB_REL = [ 'noopener' ];
7
7
  export const ALLOWED_MEDIA_TYPES = [ 'image' ];
8
8
  export const MEDIA_ID_NO_FEATURED_IMAGE_SET = 0;
9
9
  export const SIZED_LAYOUTS = [ 'flex', 'grid' ];
package/src/image/edit.js CHANGED
@@ -142,8 +142,6 @@ export function ImageEdit( {
142
142
  setAttributes( {
143
143
  width: undefined,
144
144
  height: undefined,
145
- aspectRatio: undefined,
146
- scale: undefined,
147
145
  } );
148
146
  }
149
147
  }, [ __unstableMarkNextChangeAsNotPersistent, align, setAttributes ] );
@@ -355,7 +353,11 @@ export function ImageEdit( {
355
353
 
356
354
  const isSideloading = useSelect(
357
355
  ( select ) => {
358
- if ( ! window.__clientSideMediaProcessing || ! id ) {
356
+ if (
357
+ ( ! window.__clientSideMediaProcessing &&
358
+ ! window.__heicUploadSupport ) ||
359
+ ! id
360
+ ) {
359
361
  return false;
360
362
  }
361
363
  return select( uploadStore ).isUploadingById( id );
@@ -34,7 +34,7 @@ import {
34
34
  BottomSheetSelectControl,
35
35
  FooterMessageControl,
36
36
  FooterMessageLink,
37
- Badge,
37
+ WCBadge,
38
38
  } from '@wordpress/components';
39
39
  import {
40
40
  BlockCaption,
@@ -803,7 +803,7 @@ export class ImageEdit extends Component {
803
803
  }
804
804
 
805
805
  const getImageComponent = ( openMediaOptions, getMediaOptions ) => (
806
- <Badge label={ badgeLabelText } show={ badgeLabelShown }>
806
+ <WCBadge label={ badgeLabelText } show={ badgeLabelShown }>
807
807
  <TouchableWithoutFeedback
808
808
  accessible={ ! isSelected }
809
809
  onPress={ this.onImagePressed }
@@ -886,7 +886,7 @@ export class ImageEdit extends Component {
886
886
  onBlur={ this.props.onBlur } // Always assign onBlur as props.
887
887
  insertBlocksAfter={ this.props.insertBlocksAfter }
888
888
  />
889
- </Badge>
889
+ </WCBadge>
890
890
  );
891
891
 
892
892
  return (
@@ -70,9 +70,12 @@ import {
70
70
  } from './constants';
71
71
  import { evalAspectRatio, mediaPosition } from './utils';
72
72
 
73
- const { DimensionsTool, ResolutionTool, mediaEditKey } = unlock(
74
- blockEditorPrivateApis
75
- );
73
+ const {
74
+ DimensionsTool,
75
+ ResolutionTool,
76
+ mediaEditKey,
77
+ openMediaEditorModalKey,
78
+ } = unlock( blockEditorPrivateApis );
76
79
 
77
80
  const scaleOptions = [
78
81
  {
@@ -362,27 +365,6 @@ export default function Image( {
362
365
  [ id, isSingleSelected ]
363
366
  );
364
367
 
365
- // If the image has an id but the attachment doesn't exist on this site,
366
- // clear the id so Gutenberg treats the image as external.
367
- // This handles content copied between WordPress sites.
368
- //
369
- // Known limitation: if a different attachment with the same id happens to
370
- // exist on the destination site, the lookup will succeed and the wrong
371
- // local image will be used. URL matching could address this in a follow-up.
372
- // See: https://github.com/WordPress/gutenberg/issues/74156
373
- useEffect( () => {
374
- if ( ! id || ! isSingleSelected ) {
375
- return;
376
- }
377
- // Only clear for confirmed 404s. apiFetch throws the Response object
378
- // for HTTP errors, so checking .status === 404 avoids incorrectly
379
- // clearing the id on 403, 500, or network failures, which would
380
- // cause data loss for valid local attachments.
381
- if ( attachmentResolutionError?.status === 404 ) {
382
- setAttributes( { id: undefined } );
383
- }
384
- }, [ id, isSingleSelected, attachmentResolutionError, setAttributes ] );
385
-
386
368
  const {
387
369
  canInsertCover,
388
370
  imageEditing,
@@ -411,9 +393,27 @@ export default function Image( {
411
393
  [ clientId ]
412
394
  );
413
395
  const { getBlock, getSettings } = useSelect( blockEditorStore );
414
- const onNavigateToEntityRecord = getSettings().onNavigateToEntityRecord;
396
+ const settings = getSettings();
397
+ const { onNavigateToEntityRecord } = settings;
398
+ const openMediaEditorModal = settings[ openMediaEditorModalKey ];
399
+
400
+ const handleMediaUpdate = useCallback(
401
+ ( { id: newId, url: newUrl } ) => {
402
+ if ( typeof newId === 'number' && newId !== id ) {
403
+ setAttributes( {
404
+ id: newId,
405
+ url: newUrl ?? url,
406
+ } );
407
+ }
408
+ },
409
+ [ id, url, setAttributes ]
410
+ );
415
411
 
416
- const { replaceBlocks, toggleSelection } = useDispatch( blockEditorStore );
412
+ const {
413
+ replaceBlocks,
414
+ toggleSelection,
415
+ __unstableMarkNextChangeAsNotPersistent,
416
+ } = useDispatch( blockEditorStore );
417
417
  const { createErrorNotice, createSuccessNotice } =
418
418
  useDispatch( noticesStore );
419
419
  const { editEntityRecord } = useDispatch( coreStore );
@@ -444,6 +444,34 @@ export default function Image( {
444
444
  )
445
445
  .map( ( { name, slug } ) => ( { value: slug, label: name } ) );
446
446
 
447
+ // If the image has an id but the attachment doesn't exist on this site,
448
+ // clear the id so Gutenberg treats the image as external.
449
+ // This handles content copied between WordPress sites.
450
+ //
451
+ // Known limitation: if a different attachment with the same id happens to
452
+ // exist on the destination site, the lookup will succeed and the wrong
453
+ // local image will be used. URL matching could address this in a follow-up.
454
+ // See: https://github.com/WordPress/gutenberg/issues/74156
455
+ useEffect( () => {
456
+ if ( ! id || ! isSingleSelected ) {
457
+ return;
458
+ }
459
+ // Only clear for confirmed 404s. apiFetch throws the Response object
460
+ // for HTTP errors, so checking .status === 404 avoids incorrectly
461
+ // clearing the id on 403, 500, or network failures, which would
462
+ // cause data loss for valid local attachments.
463
+ if ( attachmentResolutionError?.status === 404 ) {
464
+ __unstableMarkNextChangeAsNotPersistent();
465
+ setAttributes( { id: undefined } );
466
+ }
467
+ }, [
468
+ id,
469
+ isSingleSelected,
470
+ attachmentResolutionError,
471
+ setAttributes,
472
+ __unstableMarkNextChangeAsNotPersistent,
473
+ ] );
474
+
447
475
  // If an image is externally hosted, try to fetch the image data. This may
448
476
  // fail if the image host doesn't allow CORS with the domain. If it works,
449
477
  // we can enable a button in the toolbar to upload the image.
@@ -864,7 +892,15 @@ export default function Image( {
864
892
  ) }
865
893
  { allowCrop && (
866
894
  <ToolbarButton
867
- onClick={ () => setIsEditingImage( true ) }
895
+ onClick={
896
+ openMediaEditorModal && id
897
+ ? () =>
898
+ openMediaEditorModal( {
899
+ id,
900
+ onUpdate: handleMediaUpdate,
901
+ } )
902
+ : () => setIsEditingImage( true )
903
+ }
868
904
  icon={ crop }
869
905
  label={ __( 'Crop' ) }
870
906
  />
@@ -269,7 +269,7 @@ describe( 'Image Block', () => {
269
269
  fireEvent.press( linkTargetButton );
270
270
 
271
271
  const expectedHtml = `<!-- wp:image {"id":1,"sizeSlug":"large","linkDestination":"custom","className":"is-style-default"} -->
272
- <figure class="wp-block-image size-large is-style-default"><a href="https://wordpress.org" target="_blank" rel="noreferrer noopener"><img src="https://cldup.com/cXyG__fTLN.jpg" alt="" class="wp-image-1"/></a><figcaption class="wp-element-caption">Mountain</figcaption></figure>
272
+ <figure class="wp-block-image size-large is-style-default"><a href="https://wordpress.org" target="_blank" rel="noopener"><img src="https://cldup.com/cXyG__fTLN.jpg" alt="" class="wp-image-1"/></a><figcaption class="wp-element-caption">Mountain</figcaption></figure>
273
273
  <!-- /wp:image -->`;
274
274
  expect( getEditorHtml() ).toBe( expectedHtml );
275
275
  } );
@@ -278,7 +278,7 @@ describe( 'Image Block', () => {
278
278
  const initialHtml = `
279
279
  <!-- wp:image {"id":1,"sizeSlug":"large","linkDestination":"custom","className":"is-style-default"} -->
280
280
  <figure class="wp-block-image size-large is-style-default">
281
- <a href="https://wordpress.org" target="_blank" rel="noreferrer noopener">
281
+ <a href="https://wordpress.org" target="_blank" rel="noopener">
282
282
  <img src="https://cldup.com/cXyG__fTLN.jpg" alt="" class="wp-image-1"/>
283
283
  </a>
284
284
  <figcaption class="wp-element-caption">Mountain</figcaption>
package/src/index.js CHANGED
@@ -137,11 +137,11 @@ import * as socialLinks from './social-links';
137
137
  import * as spacer from './spacer';
138
138
  import * as tab from './tab';
139
139
  import * as tabPanel from './tab-panel';
140
+ import * as tabPanels from './tab-panels';
140
141
  import * as table from './table';
141
142
  import * as tableOfContents from './table-of-contents';
143
+ import * as tabList from './tab-list';
142
144
  import * as tabs from './tabs';
143
- import * as tabsMenu from './tabs-menu';
144
- import * as tabsMenuItem from './tabs-menu-item';
145
145
  import * as tagCloud from './tag-cloud';
146
146
  import * as templatePart from './template-part';
147
147
  import * as termCount from './term-count';
@@ -288,10 +288,10 @@ const getAllBlocks = () => {
288
288
 
289
289
  if ( window?.__experimentalEnableBlockExperiments ) {
290
290
  blocks.push( tab );
291
+ blocks.push( tabList );
291
292
  blocks.push( tabs );
292
- blocks.push( tabsMenu );
293
- blocks.push( tabsMenuItem );
294
293
  blocks.push( tabPanel );
294
+ blocks.push( tabPanels );
295
295
  blocks.push( playlist );
296
296
  blocks.push( playlistTrack );
297
297
  }
@@ -1,3 +1,10 @@
1
+ // Reset the browser's default `padding-inline-start: 40px` on `<ol>`.
2
+ // Using `:where` keeps specificity at 0 so global styles, theme.json,
3
+ // and inspector controls can override it without difficulty.
4
+ :where(.wp-block-latest-comments) {
5
+ padding-left: 0;
6
+ }
7
+
1
8
  // Lower specificity - target list element.
2
9
  ol.wp-block-latest-comments {
3
10
  // Removes left spacing in Customizer Widgets screen.
@@ -26,13 +33,6 @@ ol.wp-block-latest-comments {
26
33
  }
27
34
  }
28
35
 
29
- // Higher specificity - target list via wrapper.
30
- .wp-block-latest-comments .wp-block-latest-comments {
31
- // Remove left spacing. Higher specificity required to
32
- // override default wp-block layout styles in the Post/Site editor.
33
- padding-left: 0;
34
- }
35
-
36
36
  .wp-block-latest-comments__comment {
37
37
  list-style: none;
38
38
  margin-bottom: 1em;
@@ -743,7 +743,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
743
743
  <a
744
744
  className="wp-block-latest-posts__read-more"
745
745
  href={ post.link }
746
- rel="noopener noreferrer"
746
+ rel="noopener"
747
747
  onClick={
748
748
  showRedirectionPreventedNotice
749
749
  }
@@ -163,7 +163,7 @@ function render_block_core_latest_posts( $attributes ) {
163
163
  $trimmed_excerpt = substr( $trimmed_excerpt, 0, -11 );
164
164
  $trimmed_excerpt .= sprintf(
165
165
  /* translators: 1: A URL to a post, 2: Hidden accessibility text: Post title */
166
- __( '… <a class="wp-block-latest-posts__read-more" href="%1$s" rel="noopener noreferrer">Read more<span class="screen-reader-text">: %2$s</span></a>' ),
166
+ __( '… <a class="wp-block-latest-posts__read-more" href="%1$s" rel="noopener">Read more<span class="screen-reader-text">: %2$s</span></a>' ),
167
167
  esc_url( $post_link ),
168
168
  esc_html( $title )
169
169
  );
package/src/math/edit.js CHANGED
@@ -21,7 +21,7 @@ import { speak } from '@wordpress/a11y';
21
21
  */
22
22
  import { unlock } from '../lock-unlock';
23
23
 
24
- const { Badge } = unlock( componentsPrivateApis );
24
+ const { Badge: WCBadge } = unlock( componentsPrivateApis );
25
25
 
26
26
  export default function MathEdit( { attributes, setAttributes, isSelected } ) {
27
27
  const { latex, mathML } = attributes;
@@ -116,7 +116,7 @@ export default function MathEdit( { attributes, setAttributes, isSelected } ) {
116
116
  />
117
117
  { error && (
118
118
  <>
119
- <Badge
119
+ <WCBadge
120
120
  intent="error"
121
121
  className="wp-block-math__error"
122
122
  >
@@ -125,7 +125,7 @@ export default function MathEdit( { attributes, setAttributes, isSelected } ) {
125
125
  __( 'Error: %s' ),
126
126
  error
127
127
  ) }
128
- </Badge>
128
+ </WCBadge>
129
129
  <style children=".wp-block-math__error .components-badge__content{white-space:normal}" />
130
130
  </>
131
131
  ) }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { VisuallyHidden } from '@wordpress/components';
4
+ import { VisuallyHidden } from '@wordpress/ui';
5
5
 
6
6
  export default function AccessibleDescription( { id, children } ) {
7
7
  return (
@@ -11,7 +11,7 @@ import {
11
11
  FlexBlock,
12
12
  FlexItem,
13
13
  __experimentalHStack as HStack,
14
- __experimentalText as Text,
14
+ __experimentalText as WCText,
15
15
  } from '@wordpress/components';
16
16
  import { __, sprintf } from '@wordpress/i18n';
17
17
  import { decodeEntities } from '@wordpress/html-entities';
@@ -351,7 +351,7 @@ export default function OverlayTemplatePartSelector( {
351
351
  alignment="flex-start"
352
352
  className="wp-block-navigation__overlay-help-text-wrapper"
353
353
  >
354
- <Text
354
+ <WCText
355
355
  variant="muted"
356
356
  isBlock
357
357
  className="wp-block-navigation__overlay-help-text"
@@ -359,7 +359,7 @@ export default function OverlayTemplatePartSelector( {
359
359
  { __(
360
360
  'An overlay template allows you to customize the appearance of the dialog that opens when the menu button is pressed.'
361
361
  ) }
362
- </Text>
362
+ </WCText>
363
363
  </HStack>
364
364
  </div>
365
365
  );
@@ -43,6 +43,7 @@ jest.mock( '@wordpress/data', () => ( {
43
43
  return newState;
44
44
  } ),
45
45
  register: jest.fn(),
46
+ keyedReducer: jest.fn( () => ( reducer ) => reducer ),
46
47
  } ) );
47
48
 
48
49
  const mockSetAttributes = jest.fn();
@@ -8,11 +8,7 @@ import clsx from 'clsx';
8
8
  */
9
9
  import { createBlock } from '@wordpress/blocks';
10
10
  import { useSelect, useDispatch } from '@wordpress/data';
11
- import {
12
- ToolbarButton,
13
- ToolbarGroup,
14
- VisuallyHidden,
15
- } from '@wordpress/components';
11
+ import { ToolbarButton, ToolbarGroup } from '@wordpress/components';
16
12
  import { displayShortcut, isKeyboardEvent } from '@wordpress/keycodes';
17
13
  import { __, sprintf } from '@wordpress/i18n';
18
14
  import {
@@ -26,6 +22,7 @@ import {
26
22
  } from '@wordpress/block-editor';
27
23
  import { isURL, prependHTTP } from '@wordpress/url';
28
24
  import { useState, useEffect, useRef, useCallback } from '@wordpress/element';
25
+ import { VisuallyHidden } from '@wordpress/ui';
29
26
  import { link as linkIcon, addSubmenu } from '@wordpress/icons';
30
27
  import { useMergeRefs, useInstanceId } from '@wordpress/compose';
31
28