@wordpress/block-library 9.3.0 → 9.4.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 (392) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/block/edit.js +38 -23
  3. package/build/block/edit.js.map +1 -1
  4. package/build/button/edit.js +1 -1
  5. package/build/button/edit.js.map +1 -1
  6. package/build/buttons/index.js +26 -0
  7. package/build/buttons/index.js.map +1 -1
  8. package/build/categories/edit.js +20 -3
  9. package/build/categories/edit.js.map +1 -1
  10. package/build/categories/index.js +8 -0
  11. package/build/categories/index.js.map +1 -1
  12. package/build/columns/index.js +2 -2
  13. package/build/columns/index.js.map +1 -1
  14. package/build/cover/edit/inspector-controls.js +2 -1
  15. package/build/cover/edit/inspector-controls.js.map +1 -1
  16. package/build/embed/variations.js +39 -34
  17. package/build/embed/variations.js.map +1 -1
  18. package/build/footnotes/index.js +1 -1
  19. package/build/footnotes/index.js.map +1 -1
  20. package/build/form-input/edit.js +2 -0
  21. package/build/form-input/edit.js.map +1 -1
  22. package/build/gallery/index.js +10 -0
  23. package/build/gallery/index.js.map +1 -1
  24. package/build/group/deprecated.js +2 -5
  25. package/build/group/deprecated.js.map +1 -1
  26. package/build/heading/index.js +14 -1
  27. package/build/heading/index.js.map +1 -1
  28. package/build/image/edit.js +1 -1
  29. package/build/image/edit.js.map +1 -1
  30. package/build/image/image.js +24 -11
  31. package/build/image/image.js.map +1 -1
  32. package/build/image/index.js +3 -0
  33. package/build/image/index.js.map +1 -1
  34. package/build/image/view.js +65 -49
  35. package/build/image/view.js.map +1 -1
  36. package/build/latest-comments/index.js +9 -0
  37. package/build/latest-comments/index.js.map +1 -1
  38. package/build/list/edit.js +3 -3
  39. package/build/list/edit.js.map +1 -1
  40. package/build/list-item/edit.js +2 -2
  41. package/build/list-item/edit.js.map +1 -1
  42. package/build/list-item/hooks/index.js +0 -7
  43. package/build/list-item/hooks/index.js.map +1 -1
  44. package/build/media-text/index.js +12 -0
  45. package/build/media-text/index.js.map +1 -1
  46. package/build/navigation/edit/navigation-menu-delete-control.js +1 -0
  47. package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  48. package/build/navigation/use-navigation-menu.js +5 -1
  49. package/build/navigation/use-navigation-menu.js.map +1 -1
  50. package/build/navigation-link/link-ui.js +13 -17
  51. package/build/navigation-link/link-ui.js.map +1 -1
  52. package/build/navigation-submenu/edit.js +0 -11
  53. package/build/navigation-submenu/edit.js.map +1 -1
  54. package/build/page-list/edit.js +1 -0
  55. package/build/page-list/edit.js.map +1 -1
  56. package/build/page-list-item/edit.js +4 -1
  57. package/build/page-list-item/edit.js.map +1 -1
  58. package/build/paragraph/index.js +6 -0
  59. package/build/paragraph/index.js.map +1 -1
  60. package/build/paragraph/transforms.js +6 -0
  61. package/build/paragraph/transforms.js.map +1 -1
  62. package/build/post-author/index.js +8 -0
  63. package/build/post-author/index.js.map +1 -1
  64. package/build/post-author-biography/index.js +3 -0
  65. package/build/post-author-biography/index.js.map +1 -1
  66. package/build/post-author-name/index.js +3 -0
  67. package/build/post-author-name/index.js.map +1 -1
  68. package/build/post-date/index.js +3 -0
  69. package/build/post-date/index.js.map +1 -1
  70. package/build/post-excerpt/edit.js +1 -0
  71. package/build/post-excerpt/edit.js.map +1 -1
  72. package/build/post-featured-image/index.js +3 -0
  73. package/build/post-featured-image/index.js.map +1 -1
  74. package/build/post-terms/index.js +3 -0
  75. package/build/post-terms/index.js.map +1 -1
  76. package/build/post-title/edit.js +5 -1
  77. package/build/post-title/edit.js.map +1 -1
  78. package/build/query/edit/inspector-controls/author-control.js +3 -1
  79. package/build/query/edit/inspector-controls/author-control.js.map +1 -1
  80. package/build/query/edit/inspector-controls/index.js +24 -6
  81. package/build/query/edit/inspector-controls/index.js.map +1 -1
  82. package/build/query/edit/inspector-controls/order-control.js +1 -0
  83. package/build/query/edit/inspector-controls/order-control.js.map +1 -1
  84. package/build/query/edit/inspector-controls/parent-control.js +2 -1
  85. package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
  86. package/build/query/edit/inspector-controls/sticky-control.js +1 -0
  87. package/build/query/edit/inspector-controls/sticky-control.js.map +1 -1
  88. package/build/query/edit/inspector-controls/taxonomy-controls.js +5 -2
  89. package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  90. package/build/query/edit/query-content.js +11 -2
  91. package/build/query/edit/query-content.js.map +1 -1
  92. package/build/query/edit/query-placeholder.js +1 -14
  93. package/build/query/edit/query-placeholder.js.map +1 -1
  94. package/build/query/utils.js +5 -1
  95. package/build/query/utils.js.map +1 -1
  96. package/build/query/variations.js +9 -55
  97. package/build/query/variations.js.map +1 -1
  98. package/build/query-pagination-numbers/edit.js +1 -0
  99. package/build/query-pagination-numbers/edit.js.map +1 -1
  100. package/build/query-title/edit.js +11 -19
  101. package/build/query-title/edit.js.map +1 -1
  102. package/build/query-title/use-archive-label.js +95 -0
  103. package/build/query-title/use-archive-label.js.map +1 -0
  104. package/build/quote/index.js +15 -1
  105. package/build/quote/index.js.map +1 -1
  106. package/build/search/index.js +3 -0
  107. package/build/search/index.js.map +1 -1
  108. package/build/site-logo/edit.js +4 -1
  109. package/build/site-logo/edit.js.map +1 -1
  110. package/build/site-tagline/edit.js +5 -2
  111. package/build/site-tagline/edit.js.map +1 -1
  112. package/build/site-tagline/index.js +6 -1
  113. package/build/site-tagline/index.js.map +1 -1
  114. package/build/site-title/edit.js +4 -1
  115. package/build/site-title/edit.js.map +1 -1
  116. package/build/site-title/index.js +6 -1
  117. package/build/site-title/index.js.map +1 -1
  118. package/build/social-link/icons/soundcloud.js +1 -1
  119. package/build/social-link/icons/soundcloud.js.map +1 -1
  120. package/build/social-links/index.js +12 -0
  121. package/build/social-links/index.js.map +1 -1
  122. package/build/tag-cloud/edit.js +4 -1
  123. package/build/tag-cloud/edit.js.map +1 -1
  124. package/build/template-part/edit/index.js +5 -3
  125. package/build/template-part/edit/index.js.map +1 -1
  126. package/build/template-part/edit/inner-blocks.js +8 -3
  127. package/build/template-part/edit/inner-blocks.js.map +1 -1
  128. package/build/template-part/edit/placeholder.js +23 -3
  129. package/build/template-part/edit/placeholder.js.map +1 -1
  130. package/build/template-part/edit/title-modal.js +20 -8
  131. package/build/template-part/edit/title-modal.js.map +1 -1
  132. package/build/term-description/index.js +12 -0
  133. package/build/term-description/index.js.map +1 -1
  134. package/build/utils/hooks.js +5 -1
  135. package/build/utils/hooks.js.map +1 -1
  136. package/build-module/block/edit.js +38 -23
  137. package/build-module/block/edit.js.map +1 -1
  138. package/build-module/button/edit.js +1 -1
  139. package/build-module/button/edit.js.map +1 -1
  140. package/build-module/buttons/index.js +26 -0
  141. package/build-module/buttons/index.js.map +1 -1
  142. package/build-module/categories/edit.js +21 -4
  143. package/build-module/categories/edit.js.map +1 -1
  144. package/build-module/categories/index.js +8 -0
  145. package/build-module/categories/index.js.map +1 -1
  146. package/build-module/columns/index.js +2 -2
  147. package/build-module/columns/index.js.map +1 -1
  148. package/build-module/cover/edit/inspector-controls.js +2 -1
  149. package/build-module/cover/edit/inspector-controls.js.map +1 -1
  150. package/build-module/embed/variations.js +40 -35
  151. package/build-module/embed/variations.js.map +1 -1
  152. package/build-module/footnotes/index.js +1 -1
  153. package/build-module/footnotes/index.js.map +1 -1
  154. package/build-module/form-input/edit.js +2 -0
  155. package/build-module/form-input/edit.js.map +1 -1
  156. package/build-module/gallery/index.js +10 -0
  157. package/build-module/gallery/index.js.map +1 -1
  158. package/build-module/group/deprecated.js +2 -5
  159. package/build-module/group/deprecated.js.map +1 -1
  160. package/build-module/heading/index.js +14 -1
  161. package/build-module/heading/index.js.map +1 -1
  162. package/build-module/image/edit.js +1 -1
  163. package/build-module/image/edit.js.map +1 -1
  164. package/build-module/image/image.js +25 -12
  165. package/build-module/image/image.js.map +1 -1
  166. package/build-module/image/index.js +3 -0
  167. package/build-module/image/index.js.map +1 -1
  168. package/build-module/image/view.js +65 -49
  169. package/build-module/image/view.js.map +1 -1
  170. package/build-module/latest-comments/index.js +9 -0
  171. package/build-module/latest-comments/index.js.map +1 -1
  172. package/build-module/list/edit.js +3 -3
  173. package/build-module/list/edit.js.map +1 -1
  174. package/build-module/list-item/edit.js +2 -2
  175. package/build-module/list-item/edit.js.map +1 -1
  176. package/build-module/list-item/hooks/index.js +0 -1
  177. package/build-module/list-item/hooks/index.js.map +1 -1
  178. package/build-module/media-text/index.js +12 -0
  179. package/build-module/media-text/index.js.map +1 -1
  180. package/build-module/navigation/edit/navigation-menu-delete-control.js +1 -0
  181. package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  182. package/build-module/navigation/use-navigation-menu.js +5 -1
  183. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  184. package/build-module/navigation-link/link-ui.js +13 -17
  185. package/build-module/navigation-link/link-ui.js.map +1 -1
  186. package/build-module/navigation-submenu/edit.js +0 -11
  187. package/build-module/navigation-submenu/edit.js.map +1 -1
  188. package/build-module/page-list/edit.js +1 -0
  189. package/build-module/page-list/edit.js.map +1 -1
  190. package/build-module/page-list-item/edit.js +4 -1
  191. package/build-module/page-list-item/edit.js.map +1 -1
  192. package/build-module/paragraph/index.js +6 -0
  193. package/build-module/paragraph/index.js.map +1 -1
  194. package/build-module/paragraph/transforms.js +6 -0
  195. package/build-module/paragraph/transforms.js.map +1 -1
  196. package/build-module/post-author/index.js +8 -0
  197. package/build-module/post-author/index.js.map +1 -1
  198. package/build-module/post-author-biography/index.js +3 -0
  199. package/build-module/post-author-biography/index.js.map +1 -1
  200. package/build-module/post-author-name/index.js +3 -0
  201. package/build-module/post-author-name/index.js.map +1 -1
  202. package/build-module/post-date/index.js +3 -0
  203. package/build-module/post-date/index.js.map +1 -1
  204. package/build-module/post-excerpt/edit.js +1 -0
  205. package/build-module/post-excerpt/edit.js.map +1 -1
  206. package/build-module/post-featured-image/index.js +3 -0
  207. package/build-module/post-featured-image/index.js.map +1 -1
  208. package/build-module/post-terms/index.js +3 -0
  209. package/build-module/post-terms/index.js.map +1 -1
  210. package/build-module/post-title/edit.js +5 -1
  211. package/build-module/post-title/edit.js.map +1 -1
  212. package/build-module/query/edit/inspector-controls/author-control.js +3 -1
  213. package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
  214. package/build-module/query/edit/inspector-controls/index.js +25 -7
  215. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  216. package/build-module/query/edit/inspector-controls/order-control.js +1 -0
  217. package/build-module/query/edit/inspector-controls/order-control.js.map +1 -1
  218. package/build-module/query/edit/inspector-controls/parent-control.js +2 -1
  219. package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
  220. package/build-module/query/edit/inspector-controls/sticky-control.js +1 -0
  221. package/build-module/query/edit/inspector-controls/sticky-control.js.map +1 -1
  222. package/build-module/query/edit/inspector-controls/taxonomy-controls.js +6 -4
  223. package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
  224. package/build-module/query/edit/query-content.js +11 -2
  225. package/build-module/query/edit/query-content.js.map +1 -1
  226. package/build-module/query/edit/query-placeholder.js +1 -14
  227. package/build-module/query/edit/query-placeholder.js.map +1 -1
  228. package/build-module/query/utils.js +5 -1
  229. package/build-module/query/utils.js.map +1 -1
  230. package/build-module/query/variations.js +4 -50
  231. package/build-module/query/variations.js.map +1 -1
  232. package/build-module/query-pagination-numbers/edit.js +1 -0
  233. package/build-module/query-pagination-numbers/edit.js.map +1 -1
  234. package/build-module/query-title/edit.js +12 -20
  235. package/build-module/query-title/edit.js.map +1 -1
  236. package/build-module/query-title/use-archive-label.js +88 -0
  237. package/build-module/query-title/use-archive-label.js.map +1 -0
  238. package/build-module/quote/index.js +15 -1
  239. package/build-module/quote/index.js.map +1 -1
  240. package/build-module/search/index.js +3 -0
  241. package/build-module/search/index.js.map +1 -1
  242. package/build-module/site-logo/edit.js +4 -1
  243. package/build-module/site-logo/edit.js.map +1 -1
  244. package/build-module/site-tagline/edit.js +5 -2
  245. package/build-module/site-tagline/edit.js.map +1 -1
  246. package/build-module/site-tagline/index.js +6 -1
  247. package/build-module/site-tagline/index.js.map +1 -1
  248. package/build-module/site-title/edit.js +4 -1
  249. package/build-module/site-title/edit.js.map +1 -1
  250. package/build-module/site-title/index.js +6 -1
  251. package/build-module/site-title/index.js.map +1 -1
  252. package/build-module/social-link/icons/soundcloud.js +1 -1
  253. package/build-module/social-link/icons/soundcloud.js.map +1 -1
  254. package/build-module/social-links/index.js +12 -0
  255. package/build-module/social-links/index.js.map +1 -1
  256. package/build-module/tag-cloud/edit.js +4 -1
  257. package/build-module/tag-cloud/edit.js.map +1 -1
  258. package/build-module/template-part/edit/index.js +5 -3
  259. package/build-module/template-part/edit/index.js.map +1 -1
  260. package/build-module/template-part/edit/inner-blocks.js +8 -3
  261. package/build-module/template-part/edit/inner-blocks.js.map +1 -1
  262. package/build-module/template-part/edit/placeholder.js +23 -3
  263. package/build-module/template-part/edit/placeholder.js.map +1 -1
  264. package/build-module/template-part/edit/title-modal.js +20 -8
  265. package/build-module/template-part/edit/title-modal.js.map +1 -1
  266. package/build-module/term-description/index.js +12 -0
  267. package/build-module/term-description/index.js.map +1 -1
  268. package/build-module/utils/hooks.js +5 -1
  269. package/build-module/utils/hooks.js.map +1 -1
  270. package/build-style/categories/editor-rtl.css +4 -0
  271. package/build-style/categories/editor.css +4 -0
  272. package/build-style/categories/style-rtl.css +4 -0
  273. package/build-style/categories/style.css +4 -0
  274. package/build-style/editor-rtl.css +13 -12
  275. package/build-style/editor.css +13 -12
  276. package/build-style/image/editor-rtl.css +8 -4
  277. package/build-style/image/editor.css +8 -4
  278. package/build-style/image/style-rtl.css +19 -0
  279. package/build-style/image/style.css +19 -0
  280. package/build-style/list/style-rtl.css +1 -1
  281. package/build-style/list/style.css +1 -1
  282. package/build-style/navigation/style-rtl.css +1 -4
  283. package/build-style/navigation/style.css +1 -4
  284. package/build-style/post-comments-form/style-rtl.css +1 -1
  285. package/build-style/post-comments-form/style.css +1 -1
  286. package/build-style/query/editor-rtl.css +0 -7
  287. package/build-style/query/editor.css +0 -7
  288. package/build-style/search/editor-rtl.css +1 -1
  289. package/build-style/search/editor.css +1 -1
  290. package/build-style/social-links/style-rtl.css +2 -2
  291. package/build-style/social-links/style.css +2 -2
  292. package/build-style/style-rtl.css +29 -8
  293. package/build-style/style.css +29 -8
  294. package/build-style/term-description/style-rtl.css +1 -0
  295. package/build-style/term-description/style.css +1 -0
  296. package/package.json +35 -35
  297. package/src/block/edit.js +58 -27
  298. package/src/block/test/edit.native.js +6 -2
  299. package/src/button/edit.js +1 -1
  300. package/src/button/index.php +2 -2
  301. package/src/buttons/block.json +20 -0
  302. package/src/buttons/index.js +6 -0
  303. package/src/categories/block.json +8 -0
  304. package/src/categories/edit.js +32 -4
  305. package/src/categories/editor.scss +4 -0
  306. package/src/categories/index.php +4 -1
  307. package/src/categories/style.scss +4 -0
  308. package/src/columns/index.js +1 -1
  309. package/src/cover/edit/inspector-controls.js +1 -0
  310. package/src/embed/test/__snapshots__/index.native.js.snap +8 -8
  311. package/src/embed/test/index.js +1 -1
  312. package/src/embed/test/index.native.js +24 -23
  313. package/src/embed/variations.js +43 -35
  314. package/src/footnotes/index.js +1 -2
  315. package/src/form-input/edit.js +2 -0
  316. package/src/gallery/block.json +10 -0
  317. package/src/group/deprecated.js +3 -7
  318. package/src/heading/block.json +12 -0
  319. package/src/heading/index.js +1 -0
  320. package/src/image/block.json +3 -0
  321. package/src/image/edit.js +1 -1
  322. package/src/image/editor.scss +6 -1
  323. package/src/image/image.js +55 -35
  324. package/src/image/index.php +32 -15
  325. package/src/image/style.scss +22 -0
  326. package/src/image/test/edit.native.js +1 -0
  327. package/src/image/view.js +69 -49
  328. package/src/latest-comments/block.json +9 -0
  329. package/src/list/edit.js +3 -3
  330. package/src/list/style.scss +1 -1
  331. package/src/list-item/edit.js +2 -2
  332. package/src/list-item/hooks/index.js +0 -1
  333. package/src/media-text/block.json +12 -0
  334. package/src/navigation/edit/navigation-menu-delete-control.js +1 -0
  335. package/src/navigation/index.php +1 -1
  336. package/src/navigation/style.scss +4 -9
  337. package/src/navigation/test/use-navigation-menu.js +54 -15
  338. package/src/navigation/use-navigation-menu.js +5 -1
  339. package/src/navigation-link/link-ui.js +8 -14
  340. package/src/navigation-submenu/edit.js +1 -13
  341. package/src/page-list/edit.js +1 -0
  342. package/src/page-list-item/edit.js +4 -4
  343. package/src/paragraph/block.json +6 -0
  344. package/src/post-author/index.js +8 -0
  345. package/src/post-author-biography/block.json +3 -0
  346. package/src/post-author-name/block.json +3 -0
  347. package/src/post-comments-form/style.scss +1 -1
  348. package/src/post-date/block.json +3 -0
  349. package/src/post-excerpt/edit.js +1 -0
  350. package/src/post-featured-image/block.json +3 -0
  351. package/src/post-terms/block.json +3 -0
  352. package/src/post-title/edit.js +5 -5
  353. package/src/query/edit/inspector-controls/author-control.js +2 -0
  354. package/src/query/edit/inspector-controls/index.js +41 -14
  355. package/src/query/edit/inspector-controls/order-control.js +1 -0
  356. package/src/query/edit/inspector-controls/parent-control.js +1 -0
  357. package/src/query/edit/inspector-controls/sticky-control.js +1 -0
  358. package/src/query/edit/inspector-controls/taxonomy-controls.js +8 -3
  359. package/src/query/edit/query-content.js +17 -3
  360. package/src/query/edit/query-placeholder.js +1 -21
  361. package/src/query/editor.scss +0 -9
  362. package/src/query/utils.js +4 -0
  363. package/src/query/variations.js +4 -46
  364. package/src/query-pagination-numbers/edit.js +1 -0
  365. package/src/query-title/edit.js +10 -17
  366. package/src/query-title/use-archive-label.js +99 -0
  367. package/src/quote/block.json +15 -1
  368. package/src/search/block.json +3 -0
  369. package/src/search/editor.scss +1 -1
  370. package/src/site-logo/edit.js +4 -1
  371. package/src/site-tagline/block.json +6 -1
  372. package/src/site-tagline/edit.js +5 -2
  373. package/src/site-title/edit.js +4 -1
  374. package/src/site-title/index.js +6 -1
  375. package/src/social-link/icons/soundcloud.js +1 -1
  376. package/src/social-link/socials-with-bg.scss +1 -1
  377. package/src/social-link/socials-without-bg.scss +1 -1
  378. package/src/social-links/block.json +12 -0
  379. package/src/tag-cloud/edit.js +7 -1
  380. package/src/template-part/edit/index.js +5 -3
  381. package/src/template-part/edit/inner-blocks.js +8 -5
  382. package/src/template-part/edit/placeholder.js +31 -6
  383. package/src/template-part/edit/title-modal.js +18 -4
  384. package/src/term-description/block.json +12 -0
  385. package/src/term-description/style.scss +2 -0
  386. package/src/utils/hooks.js +5 -1
  387. package/tsconfig.tsbuildinfo +1 -1
  388. package/build/list-item/hooks/use-split.js +0 -39
  389. package/build/list-item/hooks/use-split.js.map +0 -1
  390. package/build-module/list-item/hooks/use-split.js +0 -32
  391. package/build-module/list-item/hooks/use-split.js.map +0 -1
  392. package/src/list-item/hooks/use-split.js +0 -33
@@ -14,6 +14,7 @@ import {
14
14
  __experimentalToolsPanel as ToolsPanel,
15
15
  __experimentalToolsPanelItem as ToolsPanelItem,
16
16
  __experimentalUseCustomUnits as useCustomUnits,
17
+ Placeholder,
17
18
  } from '@wordpress/components';
18
19
  import { useViewportMatch } from '@wordpress/compose';
19
20
  import { useSelect, useDispatch } from '@wordpress/data';
@@ -176,6 +177,7 @@ export default function Image( {
176
177
  ] = useState( {} );
177
178
  const [ isEditingImage, setIsEditingImage ] = useState( false );
178
179
  const [ externalBlob, setExternalBlob ] = useState();
180
+ const [ hasImageErrored, setHasImageErrored ] = useState( false );
179
181
  const hasNonContentControls = blockEditingMode === 'default';
180
182
  const isContentOnlyMode = blockEditingMode === 'contentOnly';
181
183
  const isResizable =
@@ -245,15 +247,24 @@ export default function Image( {
245
247
  }
246
248
 
247
249
  function onImageError() {
250
+ setHasImageErrored( true );
251
+
248
252
  // Check if there's an embed block that handles this URL, e.g., instagram URL.
249
253
  // See: https://github.com/WordPress/gutenberg/pull/11472
250
254
  const embedBlock = createUpgradedEmbedBlock( { attributes: { url } } );
251
-
252
255
  if ( undefined !== embedBlock ) {
253
256
  onReplace( embedBlock );
254
257
  }
255
258
  }
256
259
 
260
+ function onImageLoad( event ) {
261
+ setHasImageErrored( false );
262
+ setLoadedNaturalSize( {
263
+ loadedNaturalWidth: event.target?.naturalWidth,
264
+ loadedNaturalHeight: event.target?.naturalHeight,
265
+ } );
266
+ }
267
+
257
268
  function onSetHref( props ) {
258
269
  setAttributes( props );
259
270
  }
@@ -479,7 +490,7 @@ export default function Image( {
479
490
  return {
480
491
  lockUrlControls:
481
492
  !! urlBinding &&
482
- ! urlBindingSource?.canUserEditValue( {
493
+ ! urlBindingSource?.canUserEditValue?.( {
483
494
  select,
484
495
  context,
485
496
  args: urlBinding?.args,
@@ -494,7 +505,7 @@ export default function Image( {
494
505
  hasParentPattern,
495
506
  lockAltControls:
496
507
  !! altBinding &&
497
- ! altBindingSource?.canUserEditValue( {
508
+ ! altBindingSource?.canUserEditValue?.( {
498
509
  select,
499
510
  context,
500
511
  args: altBinding?.args,
@@ -508,7 +519,7 @@ export default function Image( {
508
519
  : __( 'Connected to dynamic data' ),
509
520
  lockTitleControls:
510
521
  !! titleBinding &&
511
- ! titleBindingSource?.canUserEditValue( {
522
+ ! titleBindingSource?.canUserEditValue?.( {
512
523
  select,
513
524
  context,
514
525
  args: titleBinding?.args,
@@ -815,37 +826,46 @@ export default function Image( {
815
826
  const shadowProps = getShadowClassesAndStyles( attributes );
816
827
  const isRounded = attributes.className?.includes( 'is-style-rounded' );
817
828
 
818
- let img = (
819
- // Disable reason: Image itself is not meant to be interactive, but
820
- // should direct focus to block.
821
- /* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
822
- <>
823
- <img
824
- src={ temporaryURL || url }
825
- alt={ defaultedAlt }
826
- onError={ () => onImageError() }
827
- onLoad={ ( event ) => {
828
- setLoadedNaturalSize( {
829
- loadedNaturalWidth: event.target?.naturalWidth,
830
- loadedNaturalHeight: event.target?.naturalHeight,
831
- } );
832
- } }
833
- ref={ imageRef }
834
- className={ borderProps.className }
835
- style={ {
836
- width:
837
- ( width && height ) || aspectRatio ? '100%' : undefined,
838
- height:
839
- ( width && height ) || aspectRatio ? '100%' : undefined,
840
- objectFit: scale,
841
- ...borderProps.style,
842
- ...shadowProps.style,
843
- } }
844
- />
845
- { temporaryURL && <Spinner /> }
846
- </>
847
- /* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
848
- );
829
+ let img =
830
+ temporaryURL && hasImageErrored ? (
831
+ // Show a placeholder during upload when the blob URL can't be loaded. This can
832
+ // happen when the user uploads a HEIC image in a browser that doesn't support them.
833
+ <Placeholder
834
+ className="wp-block-image__placeholder"
835
+ withIllustration
836
+ >
837
+ <Spinner />
838
+ </Placeholder>
839
+ ) : (
840
+ // Disable reason: Image itself is not meant to be interactive, but
841
+ // should direct focus to block.
842
+ /* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
843
+ <>
844
+ <img
845
+ src={ temporaryURL || url }
846
+ alt={ defaultedAlt }
847
+ onError={ onImageError }
848
+ onLoad={ onImageLoad }
849
+ ref={ imageRef }
850
+ className={ borderProps.className }
851
+ style={ {
852
+ width:
853
+ ( width && height ) || aspectRatio
854
+ ? '100%'
855
+ : undefined,
856
+ height:
857
+ ( width && height ) || aspectRatio
858
+ ? '100%'
859
+ : undefined,
860
+ objectFit: scale,
861
+ ...borderProps.style,
862
+ ...shadowProps.style,
863
+ } }
864
+ />
865
+ { temporaryURL && <Spinner /> }
866
+ </>
867
+ /* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */
868
+ );
849
869
 
850
870
  if ( canEditImage && isEditingImage ) {
851
871
  img = (
@@ -185,22 +185,37 @@ function block_core_image_render_lightbox( $block_content, $block ) {
185
185
  $p->seek( 'figure' );
186
186
  $figure_class_names = $p->get_attribute( 'class' );
187
187
  $figure_styles = $p->get_attribute( 'style' );
188
+
189
+ // Create unique id and set the image metadata in the state.
190
+ $unique_image_id = uniqid();
191
+
192
+ wp_interactivity_state(
193
+ 'core/image',
194
+ array(
195
+ 'metadata' => array(
196
+ $unique_image_id => array(
197
+ 'uploadedSrc' => $img_uploaded_src,
198
+ 'figureClassNames' => $figure_class_names,
199
+ 'figureStyles' => $figure_styles,
200
+ 'imgClassNames' => $img_class_names,
201
+ 'imgStyles' => $img_styles,
202
+ 'targetWidth' => $img_width,
203
+ 'targetHeight' => $img_height,
204
+ 'scaleAttr' => $block['attrs']['scale'] ?? false,
205
+ 'ariaLabel' => $aria_label,
206
+ 'alt' => $alt,
207
+ ),
208
+ ),
209
+ )
210
+ );
211
+
188
212
  $p->add_class( 'wp-lightbox-container' );
189
213
  $p->set_attribute( 'data-wp-interactive', 'core/image' );
190
214
  $p->set_attribute(
191
215
  'data-wp-context',
192
216
  wp_json_encode(
193
217
  array(
194
- 'uploadedSrc' => $img_uploaded_src,
195
- 'figureClassNames' => $figure_class_names,
196
- 'figureStyles' => $figure_styles,
197
- 'imgClassNames' => $img_class_names,
198
- 'imgStyles' => $img_styles,
199
- 'targetWidth' => $img_width,
200
- 'targetHeight' => $img_height,
201
- 'scaleAttr' => $block['attrs']['scale'] ?? false,
202
- 'ariaLabel' => $aria_label,
203
- 'alt' => $alt,
218
+ 'imageId' => $unique_image_id,
204
219
  ),
205
220
  JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP
206
221
  )
@@ -215,6 +230,8 @@ function block_core_image_render_lightbox( $block_content, $block ) {
215
230
  // contain a caption, and we don't want to trigger the lightbox when the
216
231
  // caption is clicked.
217
232
  $p->set_attribute( 'data-wp-on-async--click', 'actions.showLightbox' );
233
+ $p->set_attribute( 'data-wp-class--hide', 'state.isContentHidden' );
234
+ $p->set_attribute( 'data-wp-class--show', 'state.isContentVisible' );
218
235
 
219
236
  $body_content = $p->get_updated_html();
220
237
 
@@ -231,8 +248,8 @@ function block_core_image_render_lightbox( $block_content, $block ) {
231
248
  aria-label="' . esc_attr( $aria_label ) . '"
232
249
  data-wp-init="callbacks.initTriggerButton"
233
250
  data-wp-on-async--click="actions.showLightbox"
234
- data-wp-style--right="context.imageButtonRight"
235
- data-wp-style--top="context.imageButtonTop"
251
+ data-wp-style--right="state.imageButtonRight"
252
+ data-wp-style--top="state.imageButtonTop"
236
253
  >
237
254
  <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
238
255
  <path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
@@ -288,15 +305,15 @@ function block_core_image_print_lightbox_overlay() {
288
305
  tabindex="-1"
289
306
  >
290
307
  <button type="button" aria-label="$close_button_label" style="fill: $close_button_color" class="close-button">
291
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg>
308
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" focusable="false"><path d="m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"></path></svg>
292
309
  </button>
293
310
  <div class="lightbox-image-container">
294
- <figure data-wp-bind--class="state.currentImage.figureClassNames" data-wp-bind--style="state.currentImage.figureStyles">
311
+ <figure data-wp-bind--class="state.currentImage.figureClassNames" data-wp-bind--style="state.figureStyles">
295
312
  <img data-wp-bind--alt="state.currentImage.alt" data-wp-bind--class="state.currentImage.imgClassNames" data-wp-bind--style="state.imgStyles" data-wp-bind--src="state.currentImage.currentSrc">
296
313
  </figure>
297
314
  </div>
298
315
  <div class="lightbox-image-container">
299
- <figure data-wp-bind--class="state.currentImage.figureClassNames" data-wp-bind--style="state.currentImage.figureStyles">
316
+ <figure data-wp-bind--class="state.currentImage.figureClassNames" data-wp-bind--style="state.figureStyles">
300
317
  <img data-wp-bind--alt="state.currentImage.alt" data-wp-bind--class="state.currentImage.imgClassNames" data-wp-bind--style="state.imgStyles" data-wp-bind--src="state.enlargedSrc">
301
318
  </figure>
302
319
  </div>
@@ -9,6 +9,16 @@
9
9
  max-width: 100%;
10
10
  vertical-align: bottom;
11
11
  box-sizing: border-box;
12
+
13
+ @media (prefers-reduced-motion: no-preference) {
14
+ &.hide {
15
+ visibility: hidden;
16
+ }
17
+
18
+ &.show {
19
+ animation: show-content-image 0.4s;
20
+ }
21
+ }
12
22
  }
13
23
 
14
24
  // The following style maintains border radius application for deprecated
@@ -319,6 +329,18 @@
319
329
  }
320
330
  }
321
331
 
332
+ @keyframes show-content-image {
333
+ 0% {
334
+ visibility: hidden;
335
+ }
336
+ 99% {
337
+ visibility: hidden;
338
+ }
339
+ 100% {
340
+ visibility: visible;
341
+ }
342
+ }
343
+
322
344
  @keyframes turn-on-visibility {
323
345
  0% {
324
346
  opacity: 0;
@@ -48,6 +48,7 @@ function mockGetMedia( media ) {
48
48
  const FETCH_MEDIA = {
49
49
  request: {
50
50
  path: `/wp/v2/media/1?context=edit`,
51
+ parse: false,
51
52
  },
52
53
  response: {
53
54
  source_url: 'https://cldup.com/cXyG__fTLN.jpg',
package/src/image/view.js CHANGED
@@ -19,27 +19,16 @@ let isTouching = false;
19
19
  */
20
20
  let lastTouchTime = 0;
21
21
 
22
- /**
23
- * Stores the image reference of the currently opened lightbox.
24
- *
25
- * @type {HTMLElement}
26
- */
27
- let imageRef;
28
-
29
- /**
30
- * Stores the button reference of the currently opened lightbox.
31
- *
32
- * @type {HTMLElement}
33
- */
34
- let buttonRef;
35
-
36
22
  const { state, actions, callbacks } = store(
37
23
  'core/image',
38
24
  {
39
25
  state: {
40
- currentImage: {},
26
+ currentImageId: null,
27
+ get currentImage() {
28
+ return state.metadata[ state.currentImageId ];
29
+ },
41
30
  get overlayOpened() {
42
- return state.currentImage.currentSrc;
31
+ return state.currentImageId !== null;
43
32
  },
44
33
  get roleAttribute() {
45
34
  return state.overlayOpened ? 'dialog' : null;
@@ -53,6 +42,15 @@ const { state, actions, callbacks } = store(
53
42
  'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs='
54
43
  );
55
44
  },
45
+ get figureStyles() {
46
+ return (
47
+ state.overlayOpened &&
48
+ `${ state.currentImage.figureStyles?.replace(
49
+ /margin[^;]*;?/g,
50
+ ''
51
+ ) };`
52
+ );
53
+ },
56
54
  get imgStyles() {
57
55
  return (
58
56
  state.overlayOpened &&
@@ -62,33 +60,56 @@ const { state, actions, callbacks } = store(
62
60
  ) }; object-fit:cover;`
63
61
  );
64
62
  },
63
+ get imageButtonRight() {
64
+ const { imageId } = getContext();
65
+ return state.metadata[ imageId ].imageButtonRight;
66
+ },
67
+ get imageButtonTop() {
68
+ const { imageId } = getContext();
69
+ return state.metadata[ imageId ].imageButtonTop;
70
+ },
71
+ get isContentHidden() {
72
+ const ctx = getContext();
73
+ return (
74
+ state.overlayEnabled && state.currentImageId === ctx.imageId
75
+ );
76
+ },
77
+ get isContentVisible() {
78
+ const ctx = getContext();
79
+ return (
80
+ ! state.overlayEnabled &&
81
+ state.currentImageId === ctx.imageId
82
+ );
83
+ },
65
84
  },
66
85
  actions: {
67
86
  showLightbox() {
68
- const ctx = getContext();
87
+ const { imageId } = getContext();
69
88
 
70
89
  // Bails out if the image has not loaded yet.
71
- if ( ! ctx.imageRef?.complete ) {
90
+ if ( ! state.metadata[ imageId ].imageRef?.complete ) {
72
91
  return;
73
92
  }
74
93
 
75
- // Stores the positons of the scroll to fix it until the overlay is
94
+ // Stores the positions of the scroll to fix it until the overlay is
76
95
  // closed.
77
96
  state.scrollTopReset = document.documentElement.scrollTop;
78
97
  state.scrollLeftReset = document.documentElement.scrollLeft;
79
98
 
80
- // Moves the information of the expaned image to the state.
81
- ctx.currentSrc = ctx.imageRef.currentSrc;
82
- imageRef = ctx.imageRef;
83
- buttonRef = ctx.buttonRef;
84
- state.currentImage = ctx;
99
+ // Sets the current expanded image in the state and enables the overlay.
85
100
  state.overlayEnabled = true;
101
+ state.currentImageId = imageId;
86
102
 
87
103
  // Computes the styles of the overlay for the animation.
88
104
  callbacks.setOverlayStyles();
89
105
  },
90
106
  hideLightbox() {
91
107
  if ( state.overlayEnabled ) {
108
+ // Starts the overlay closing animation. The showClosingAnimation
109
+ // class is used to avoid showing it on page load.
110
+ state.showClosingAnimation = true;
111
+ state.overlayEnabled = false;
112
+
92
113
  // Waits until the close animation has completed before allowing a
93
114
  // user to scroll again. The duration of this animation is defined in
94
115
  // the `styles.scss` file, but in any case we should wait a few
@@ -98,20 +119,13 @@ const { state, actions, callbacks } = store(
98
119
  // Delays before changing the focus. Otherwise the focus ring will
99
120
  // appear on Firefox before the image has finished animating, which
100
121
  // looks broken.
101
- buttonRef.focus( {
122
+ state.currentImage.buttonRef.focus( {
102
123
  preventScroll: true,
103
124
  } );
104
125
 
105
- // Resets the current image to mark the overlay as closed.
106
- state.currentImage = {};
107
- imageRef = null;
108
- buttonRef = null;
126
+ // Resets the current image id to mark the overlay as closed.
127
+ state.currentImageId = null;
109
128
  }, 450 );
110
-
111
- // Starts the overlay closing animation. The showClosingAnimation
112
- // class is used to avoid showing it on page load.
113
- state.showClosingAnimation = true;
114
- state.overlayEnabled = false;
115
129
  }
116
130
  },
117
131
  handleKeydown( event ) {
@@ -174,7 +188,7 @@ const { state, actions, callbacks } = store(
174
188
  },
175
189
  callbacks: {
176
190
  setOverlayStyles() {
177
- if ( ! imageRef ) {
191
+ if ( ! state.currentImage.imageRef ) {
178
192
  return;
179
193
  }
180
194
 
@@ -183,9 +197,9 @@ const { state, actions, callbacks } = store(
183
197
  naturalHeight,
184
198
  offsetWidth: originalWidth,
185
199
  offsetHeight: originalHeight,
186
- } = imageRef;
200
+ } = state.currentImage.imageRef;
187
201
  let { x: screenPosX, y: screenPosY } =
188
- imageRef.getBoundingClientRect();
202
+ state.currentImage.imageRef.getBoundingClientRect();
189
203
 
190
204
  // Natural ratio of the image clicked to open the lightbox.
191
205
  const naturalRatio = naturalWidth / naturalHeight;
@@ -231,6 +245,7 @@ const { state, actions, callbacks } = store(
231
245
  let containerMaxHeight = imgMaxHeight;
232
246
  let containerWidth = imgMaxWidth;
233
247
  let containerHeight = imgMaxHeight;
248
+
234
249
  // Checks if the target image has a different ratio than the original
235
250
  // one (thumbnail). Recalculates the width and height.
236
251
  if ( naturalRatio.toFixed( 2 ) !== imgRatio.toFixed( 2 ) ) {
@@ -341,9 +356,11 @@ const { state, actions, callbacks } = store(
341
356
  `;
342
357
  },
343
358
  setButtonStyles() {
344
- const ctx = getContext();
359
+ const { imageId } = getContext();
345
360
  const { ref } = getElement();
346
- ctx.imageRef = ref;
361
+
362
+ state.metadata[ imageId ].imageRef = ref;
363
+ state.metadata[ imageId ].currentSrc = ref.currentSrc;
347
364
 
348
365
  const {
349
366
  naturalWidth,
@@ -386,10 +403,13 @@ const { state, actions, callbacks } = store(
386
403
  const buttonOffsetTop = figureHeight - offsetHeight;
387
404
  const buttonOffsetRight = figureWidth - offsetWidth;
388
405
 
406
+ let imageButtonTop = buttonOffsetTop + 16;
407
+ let imageButtonRight = buttonOffsetRight + 16;
408
+
389
409
  // In the case of an image with object-fit: contain, the size of the
390
410
  // <img> element can be larger than the image itself, so it needs to
391
411
  // calculate where to place the button.
392
- if ( ctx.scaleAttr === 'contain' ) {
412
+ if ( state.metadata[ imageId ].scaleAttr === 'contain' ) {
393
413
  // Natural ratio of the image.
394
414
  const naturalRatio = naturalWidth / naturalHeight;
395
415
  // Offset ratio of the image.
@@ -399,25 +419,25 @@ const { state, actions, callbacks } = store(
399
419
  // If it reaches the width first, it keeps the width and compute the
400
420
  // height.
401
421
  const referenceHeight = offsetWidth / naturalRatio;
402
- ctx.imageButtonTop =
422
+ imageButtonTop =
403
423
  ( offsetHeight - referenceHeight ) / 2 +
404
424
  buttonOffsetTop +
405
425
  16;
406
- ctx.imageButtonRight = buttonOffsetRight + 16;
426
+ imageButtonRight = buttonOffsetRight + 16;
407
427
  } else {
408
428
  // If it reaches the height first, it keeps the height and compute
409
429
  // the width.
410
430
  const referenceWidth = offsetHeight * naturalRatio;
411
- ctx.imageButtonTop = buttonOffsetTop + 16;
412
- ctx.imageButtonRight =
431
+ imageButtonTop = buttonOffsetTop + 16;
432
+ imageButtonRight =
413
433
  ( offsetWidth - referenceWidth ) / 2 +
414
434
  buttonOffsetRight +
415
435
  16;
416
436
  }
417
- } else {
418
- ctx.imageButtonTop = buttonOffsetTop + 16;
419
- ctx.imageButtonRight = buttonOffsetRight + 16;
420
437
  }
438
+
439
+ state.metadata[ imageId ].imageButtonTop = imageButtonTop;
440
+ state.metadata[ imageId ].imageButtonRight = imageButtonRight;
421
441
  },
422
442
  setOverlayFocus() {
423
443
  if ( state.overlayEnabled ) {
@@ -427,9 +447,9 @@ const { state, actions, callbacks } = store(
427
447
  }
428
448
  },
429
449
  initTriggerButton() {
430
- const ctx = getContext();
450
+ const { imageId } = getContext();
431
451
  const { ref } = getElement();
432
- ctx.buttonRef = ref;
452
+ state.metadata[ imageId ].buttonRef = ref;
433
453
  },
434
454
  },
435
455
  },
@@ -29,6 +29,15 @@
29
29
  },
30
30
  "supports": {
31
31
  "align": true,
32
+ "color": {
33
+ "gradients": true,
34
+ "link": true,
35
+ "__experimentalDefaultControls": {
36
+ "background": true,
37
+ "text": true,
38
+ "link": true
39
+ }
40
+ },
32
41
  "html": false,
33
42
  "spacing": {
34
43
  "margin": true,
package/src/list/edit.js CHANGED
@@ -110,7 +110,7 @@ function IndentUI( { clientId } ) {
110
110
  <ToolbarButton
111
111
  icon={ isRTL() ? formatOutdentRTL : formatOutdent }
112
112
  title={ __( 'Outdent' ) }
113
- describedBy={ __( 'Outdent list item' ) }
113
+ description={ __( 'Outdent list item' ) }
114
114
  disabled={ ! canOutdent }
115
115
  onClick={ outdentList }
116
116
  />
@@ -147,7 +147,7 @@ export default function Edit( { attributes, setAttributes, clientId, style } ) {
147
147
  <ToolbarButton
148
148
  icon={ isRTL() ? formatListBulletsRTL : formatListBullets }
149
149
  title={ __( 'Unordered' ) }
150
- describedBy={ __( 'Convert to unordered list' ) }
150
+ description={ __( 'Convert to unordered list' ) }
151
151
  isActive={ ordered === false }
152
152
  onClick={ () => {
153
153
  setAttributes( { ordered: false } );
@@ -156,7 +156,7 @@ export default function Edit( { attributes, setAttributes, clientId, style } ) {
156
156
  <ToolbarButton
157
157
  icon={ isRTL() ? formatListNumberedRTL : formatListNumbered }
158
158
  title={ __( 'Ordered' ) }
159
- describedBy={ __( 'Convert to ordered list' ) }
159
+ description={ __( 'Convert to ordered list' ) }
160
160
  isActive={ ordered === true }
161
161
  onClick={ () => {
162
162
  setAttributes( { ordered: true } );
@@ -3,6 +3,6 @@ ul {
3
3
  box-sizing: border-box;
4
4
  }
5
5
 
6
- :root :where(ul.has-background, ol.has-background) {
6
+ :root :where(.wp-block-list.has-background) {
7
7
  padding: $block-bg-padding--v $block-bg-padding--h;
8
8
  }
@@ -53,14 +53,14 @@ export function IndentUI( { clientId } ) {
53
53
  <ToolbarButton
54
54
  icon={ isRTL() ? formatOutdentRTL : formatOutdent }
55
55
  title={ __( 'Outdent' ) }
56
- describedBy={ __( 'Outdent list item' ) }
56
+ description={ __( 'Outdent list item' ) }
57
57
  disabled={ ! canOutdent }
58
58
  onClick={ () => outdentListItem() }
59
59
  />
60
60
  <ToolbarButton
61
61
  icon={ isRTL() ? formatIndentRTL : formatIndent }
62
62
  title={ __( 'Indent' ) }
63
- describedBy={ __( 'Indent list item' ) }
63
+ description={ __( 'Indent list item' ) }
64
64
  disabled={ ! canIndent }
65
65
  onClick={ () => indentListItem() }
66
66
  />
@@ -2,5 +2,4 @@ export { default as useOutdentListItem } from './use-outdent-list-item';
2
2
  export { default as useIndentListItem } from './use-indent-list-item';
3
3
  export { default as useEnter } from './use-enter';
4
4
  export { default as useSpace } from './use-space';
5
- export { default as useSplit } from './use-split';
6
5
  export { default as useMerge } from './use-merge';
@@ -103,6 +103,18 @@
103
103
  "anchor": true,
104
104
  "align": [ "wide", "full" ],
105
105
  "html": false,
106
+ "__experimentalBorder": {
107
+ "color": true,
108
+ "radius": true,
109
+ "style": true,
110
+ "width": true,
111
+ "__experimentalDefaultControls": {
112
+ "color": true,
113
+ "radius": true,
114
+ "style": true,
115
+ "width": true
116
+ }
117
+ },
106
118
  "color": {
107
119
  "gradients": true,
108
120
  "heading": true,
@@ -41,6 +41,7 @@ export default function NavigationMenuDeleteControl( { onDelete } ) {
41
41
  setIsConfirmDialogVisible( false );
42
42
  } }
43
43
  confirmButtonText={ __( 'Delete' ) }
44
+ size="medium"
44
45
  >
45
46
  { __(
46
47
  'Are you sure you want to delete this Navigation Menu?'
@@ -483,7 +483,7 @@ class WP_Navigation_Block_Renderer {
483
483
  }
484
484
  }
485
485
  $toggle_button_content = $should_display_icon_label ? $toggle_button_icon : __( 'Menu' );
486
- $toggle_close_button_icon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg>';
486
+ $toggle_close_button_icon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" focusable="false"><path d="m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"></path></svg>';
487
487
  $toggle_close_button_content = $should_display_icon_label ? $toggle_close_button_icon : __( 'Close' );
488
488
  $toggle_aria_label_open = $should_display_icon_label ? 'aria-label="' . __( 'Open menu' ) . '"' : ''; // Open button label.
489
489
  $toggle_aria_label_close = $should_display_icon_label ? 'aria-label="' . __( 'Close menu' ) . '"' : ''; // Close button label.
@@ -76,15 +76,10 @@ $navigation-icon-size: 24px;
76
76
  }
77
77
  }
78
78
 
79
- &:where(:not([class*="has-text-decoration"])) {
80
- a {
81
- text-decoration: none;
82
-
83
- &:focus,
84
- &:active {
85
- text-decoration: none;
86
- }
87
- }
79
+ & :where(a),
80
+ & :where(a:focus),
81
+ & :where(a:active) {
82
+ text-decoration: none;
88
83
  }
89
84
 
90
85
  // Submenu indicator.