@wordpress/block-library 11.0.0 → 11.0.2-next.v.202609171837.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 (434) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +7 -7
  3. package/build/archives/edit.cjs.map +3 -3
  4. package/build/audio/edit.cjs.map +3 -3
  5. package/build/avatar/hooks.cjs.map +2 -2
  6. package/build/button/edit.cjs.map +2 -2
  7. package/build/categories/edit.cjs.map +3 -3
  8. package/build/code/block.json +1 -0
  9. package/build/code/save.cjs.map +2 -2
  10. package/build/comment-template/hooks.cjs.map +2 -2
  11. package/build/cover/edit/index.cjs.map +2 -2
  12. package/build/cover/edit/inspector-controls.cjs.map +2 -2
  13. package/build/cover/transforms.cjs.map +2 -2
  14. package/build/details/block.json +1 -0
  15. package/build/details/index.cjs.map +2 -2
  16. package/build/embed/embed-controls.cjs.map +2 -2
  17. package/build/file/deprecated.cjs.map +2 -2
  18. package/build/file/edit.cjs.map +2 -2
  19. package/build/file/inspector.cjs.map +3 -3
  20. package/build/file/save.cjs.map +2 -2
  21. package/build/footnotes/block.json +1 -0
  22. package/build/footnotes/edit.cjs.map +2 -2
  23. package/build/gallery/dynamic-gallery.cjs.map +3 -3
  24. package/build/gallery/edit.cjs +64 -37
  25. package/build/gallery/edit.cjs.map +3 -3
  26. package/build/gallery/{flex-styles.cjs → gallery-styles.cjs} +31 -32
  27. package/build/gallery/gallery-styles.cjs.map +7 -0
  28. package/build/gallery/responsive-styles.cjs +27 -5
  29. package/build/gallery/responsive-styles.cjs.map +2 -2
  30. package/build/heading/block.json +2 -0
  31. package/build/heading/index.cjs.map +2 -2
  32. package/build/html/modal.cjs +3 -6
  33. package/build/html/modal.cjs.map +2 -2
  34. package/build/image/edit.cjs.map +2 -2
  35. package/build/image/image.cjs.map +2 -2
  36. package/build/index.cjs.map +2 -2
  37. package/build/latest-comments/edit.cjs.map +3 -3
  38. package/build/latest-posts/edit.cjs.map +2 -2
  39. package/build/list/ordered-list-settings.cjs.map +3 -3
  40. package/build/list-item/hooks/use-enter.cjs.map +2 -2
  41. package/build/math/block.json +2 -0
  42. package/build/math/deprecated.cjs +29 -12
  43. package/build/math/deprecated.cjs.map +2 -2
  44. package/build/math/edit.cjs +67 -46
  45. package/build/math/edit.cjs.map +2 -2
  46. package/build/math/save.cjs +2 -2
  47. package/build/math/save.cjs.map +2 -2
  48. package/build/media-text/constants.cjs +3 -0
  49. package/build/media-text/constants.cjs.map +2 -2
  50. package/build/media-text/deprecated.cjs.map +2 -2
  51. package/build/media-text/edit.cjs +40 -0
  52. package/build/media-text/edit.cjs.map +3 -3
  53. package/build/media-text/image-fill.cjs.map +2 -2
  54. package/build/media-text/media-container.cjs +3 -3
  55. package/build/media-text/media-container.cjs.map +2 -2
  56. package/build/navigation/edit/index.cjs.map +2 -2
  57. package/build/navigation/edit/menu-inspector-controls.cjs.map +2 -2
  58. package/build/navigation/edit/overlay-template-part-selector.cjs.map +3 -3
  59. package/build/navigation/edit/responsive-wrapper.cjs.map +2 -2
  60. package/build/navigation/edit/use-generate-default-navigation-title.cjs.map +2 -2
  61. package/build/navigation/view.cjs +2 -2
  62. package/build/navigation/view.cjs.map +2 -2
  63. package/build/navigation-link/edit.cjs.map +2 -2
  64. package/build/navigation-link/shared/invalid-draft-display.cjs.map +2 -2
  65. package/build/navigation-submenu/edit.cjs.map +2 -2
  66. package/build/paragraph/block.json +1 -0
  67. package/build/paragraph/edit.cjs.map +2 -2
  68. package/build/paragraph/index.cjs +6 -0
  69. package/build/paragraph/index.cjs.map +3 -3
  70. package/build/playlist/edit.cjs +2 -1
  71. package/build/playlist/edit.cjs.map +3 -3
  72. package/build/post-author/edit.cjs.map +3 -3
  73. package/build/post-author-name/edit.cjs.map +2 -2
  74. package/build/post-content/block.json +1 -0
  75. package/build/post-date/edit.cjs.map +2 -2
  76. package/build/post-excerpt/block.json +1 -0
  77. package/build/post-excerpt/edit.cjs.map +2 -2
  78. package/build/post-featured-image/edit.cjs.map +2 -2
  79. package/build/post-navigation-link/edit.cjs.map +3 -3
  80. package/build/post-time-to-read/edit.cjs.map +2 -2
  81. package/build/pullquote/deprecated.cjs.map +2 -2
  82. package/build/query/deprecated.cjs.map +2 -2
  83. package/build/query/edit/inspector-controls/index.cjs.map +3 -3
  84. package/build/query/edit/inspector-controls/order-control.cjs.map +3 -3
  85. package/build/query/edit/inspector-controls/sticky-control.cjs.map +3 -3
  86. package/build/query/view.cjs.map +2 -2
  87. package/build/query-title/use-archive-label.cjs.map +2 -2
  88. package/build/quote/deprecated.cjs.map +2 -2
  89. package/build/quote/transforms.cjs.map +2 -2
  90. package/build/search/edit.cjs.map +3 -3
  91. package/build/separator/edit.cjs.map +3 -3
  92. package/build/social-links/edit.cjs.map +3 -3
  93. package/build/table/state.cjs.map +2 -2
  94. package/build/table-of-contents/edit.cjs.map +3 -3
  95. package/build/table-of-contents/utils.cjs.map +2 -2
  96. package/build/tabs/use-tab-actions.cjs.map +2 -2
  97. package/build/tag-cloud/edit.cjs.map +3 -3
  98. package/build/template-part/edit/advanced-controls.cjs.map +3 -3
  99. package/build/template-part/edit/import-controls.cjs.map +3 -3
  100. package/build/template-part/edit/index.cjs.map +2 -2
  101. package/build/template-part/edit/inner-blocks.cjs.map +2 -2
  102. package/build/template-part/edit/placeholder.cjs.map +2 -2
  103. package/build/term-count/use-term-count.cjs.map +2 -2
  104. package/build/term-description/use-term-description.cjs.map +2 -2
  105. package/build/term-name/use-term-name.cjs.map +2 -2
  106. package/build/terms-query/edit/inspector-controls/index.cjs.map +2 -2
  107. package/build/terms-query/edit/inspector-controls/inherit-control.cjs.map +2 -2
  108. package/build/terms-query/edit/inspector-controls/order-control.cjs.map +3 -3
  109. package/build/terms-query/edit/inspector-controls/taxonomy-control.cjs.map +3 -3
  110. package/build/utils/hooks.cjs.map +2 -2
  111. package/build/utils/media-control.cjs +5 -1
  112. package/build/utils/media-control.cjs.map +2 -2
  113. package/build/utils/poster-image.cjs.map +2 -2
  114. package/build/verse/block.json +1 -0
  115. package/build/video/edit-common-settings.cjs.map +3 -3
  116. package/build/video/tracks-editor.cjs.map +3 -3
  117. package/build-module/archives/edit.mjs +2 -2
  118. package/build-module/archives/edit.mjs.map +2 -2
  119. package/build-module/audio/edit.mjs +2 -2
  120. package/build-module/audio/edit.mjs.map +2 -2
  121. package/build-module/avatar/hooks.mjs.map +2 -2
  122. package/build-module/button/edit.mjs.map +2 -2
  123. package/build-module/categories/edit.mjs +2 -2
  124. package/build-module/categories/edit.mjs.map +2 -2
  125. package/build-module/code/block.json +1 -0
  126. package/build-module/code/save.mjs.map +2 -2
  127. package/build-module/comment-template/hooks.mjs.map +2 -2
  128. package/build-module/cover/edit/index.mjs.map +2 -2
  129. package/build-module/cover/edit/inspector-controls.mjs.map +2 -2
  130. package/build-module/cover/transforms.mjs.map +2 -2
  131. package/build-module/details/block.json +1 -0
  132. package/build-module/details/index.mjs.map +2 -2
  133. package/build-module/embed/embed-controls.mjs.map +2 -2
  134. package/build-module/file/deprecated.mjs.map +2 -2
  135. package/build-module/file/edit.mjs.map +2 -2
  136. package/build-module/file/inspector.mjs +2 -2
  137. package/build-module/file/inspector.mjs.map +2 -2
  138. package/build-module/file/save.mjs.map +2 -2
  139. package/build-module/footnotes/block.json +1 -0
  140. package/build-module/footnotes/edit.mjs.map +2 -2
  141. package/build-module/gallery/dynamic-gallery.mjs +2 -2
  142. package/build-module/gallery/dynamic-gallery.mjs.map +2 -2
  143. package/build-module/gallery/edit.mjs +67 -40
  144. package/build-module/gallery/edit.mjs.map +2 -2
  145. package/build-module/gallery/{flex-styles.mjs → gallery-styles.mjs} +29 -30
  146. package/build-module/gallery/gallery-styles.mjs.map +7 -0
  147. package/build-module/gallery/responsive-styles.mjs +25 -4
  148. package/build-module/gallery/responsive-styles.mjs.map +2 -2
  149. package/build-module/heading/block.json +2 -0
  150. package/build-module/heading/index.mjs.map +2 -2
  151. package/build-module/html/modal.mjs +3 -6
  152. package/build-module/html/modal.mjs.map +2 -2
  153. package/build-module/image/edit.mjs.map +2 -2
  154. package/build-module/image/image.mjs.map +2 -2
  155. package/build-module/index.mjs.map +2 -2
  156. package/build-module/latest-comments/edit.mjs +2 -2
  157. package/build-module/latest-comments/edit.mjs.map +2 -2
  158. package/build-module/latest-posts/edit.mjs.map +2 -2
  159. package/build-module/list/ordered-list-settings.mjs +2 -2
  160. package/build-module/list/ordered-list-settings.mjs.map +2 -2
  161. package/build-module/list-item/hooks/use-enter.mjs.map +2 -2
  162. package/build-module/math/block.json +2 -0
  163. package/build-module/math/deprecated.mjs +29 -12
  164. package/build-module/math/deprecated.mjs.map +2 -2
  165. package/build-module/math/edit.mjs +68 -47
  166. package/build-module/math/edit.mjs.map +2 -2
  167. package/build-module/math/save.mjs +2 -2
  168. package/build-module/math/save.mjs.map +2 -2
  169. package/build-module/media-text/constants.mjs +2 -0
  170. package/build-module/media-text/constants.mjs.map +2 -2
  171. package/build-module/media-text/deprecated.mjs.map +2 -2
  172. package/build-module/media-text/edit.mjs +42 -1
  173. package/build-module/media-text/edit.mjs.map +2 -2
  174. package/build-module/media-text/image-fill.mjs.map +2 -2
  175. package/build-module/media-text/media-container.mjs +1 -1
  176. package/build-module/media-text/media-container.mjs.map +2 -2
  177. package/build-module/navigation/edit/index.mjs.map +2 -2
  178. package/build-module/navigation/edit/menu-inspector-controls.mjs.map +2 -2
  179. package/build-module/navigation/edit/overlay-template-part-selector.mjs +2 -2
  180. package/build-module/navigation/edit/overlay-template-part-selector.mjs.map +2 -2
  181. package/build-module/navigation/edit/responsive-wrapper.mjs.map +2 -2
  182. package/build-module/navigation/edit/use-generate-default-navigation-title.mjs.map +2 -2
  183. package/build-module/navigation/view.mjs +2 -2
  184. package/build-module/navigation/view.mjs.map +2 -2
  185. package/build-module/navigation-link/edit.mjs.map +2 -2
  186. package/build-module/navigation-link/shared/invalid-draft-display.mjs.map +2 -2
  187. package/build-module/navigation-submenu/edit.mjs.map +2 -2
  188. package/build-module/paragraph/block.json +1 -0
  189. package/build-module/paragraph/edit.mjs.map +2 -2
  190. package/build-module/paragraph/index.mjs +6 -0
  191. package/build-module/paragraph/index.mjs.map +2 -2
  192. package/build-module/playlist/edit.mjs +5 -4
  193. package/build-module/playlist/edit.mjs.map +2 -2
  194. package/build-module/post-author/edit.mjs +2 -2
  195. package/build-module/post-author/edit.mjs.map +2 -2
  196. package/build-module/post-author-name/edit.mjs.map +2 -2
  197. package/build-module/post-content/block.json +1 -0
  198. package/build-module/post-date/edit.mjs.map +2 -2
  199. package/build-module/post-excerpt/block.json +1 -0
  200. package/build-module/post-excerpt/edit.mjs.map +2 -2
  201. package/build-module/post-featured-image/edit.mjs.map +2 -2
  202. package/build-module/post-navigation-link/edit.mjs +2 -2
  203. package/build-module/post-navigation-link/edit.mjs.map +2 -2
  204. package/build-module/post-time-to-read/edit.mjs.map +2 -2
  205. package/build-module/pullquote/deprecated.mjs.map +2 -2
  206. package/build-module/query/deprecated.mjs.map +2 -2
  207. package/build-module/query/edit/inspector-controls/index.mjs +2 -2
  208. package/build-module/query/edit/inspector-controls/index.mjs.map +2 -2
  209. package/build-module/query/edit/inspector-controls/order-control.mjs +2 -2
  210. package/build-module/query/edit/inspector-controls/order-control.mjs.map +2 -2
  211. package/build-module/query/edit/inspector-controls/sticky-control.mjs +2 -2
  212. package/build-module/query/edit/inspector-controls/sticky-control.mjs.map +2 -2
  213. package/build-module/query/view.mjs.map +2 -2
  214. package/build-module/query-title/use-archive-label.mjs.map +2 -2
  215. package/build-module/quote/deprecated.mjs.map +2 -2
  216. package/build-module/quote/transforms.mjs.map +2 -2
  217. package/build-module/search/edit.mjs +3 -3
  218. package/build-module/search/edit.mjs.map +2 -2
  219. package/build-module/separator/edit.mjs +5 -2
  220. package/build-module/separator/edit.mjs.map +2 -2
  221. package/build-module/social-links/edit.mjs +2 -2
  222. package/build-module/social-links/edit.mjs.map +2 -2
  223. package/build-module/table/state.mjs.map +2 -2
  224. package/build-module/table-of-contents/edit.mjs +2 -2
  225. package/build-module/table-of-contents/edit.mjs.map +2 -2
  226. package/build-module/table-of-contents/utils.mjs.map +2 -2
  227. package/build-module/tabs/use-tab-actions.mjs.map +2 -2
  228. package/build-module/tag-cloud/edit.mjs +2 -2
  229. package/build-module/tag-cloud/edit.mjs.map +2 -2
  230. package/build-module/template-part/edit/advanced-controls.mjs +5 -2
  231. package/build-module/template-part/edit/advanced-controls.mjs.map +2 -2
  232. package/build-module/template-part/edit/import-controls.mjs +2 -2
  233. package/build-module/template-part/edit/import-controls.mjs.map +2 -2
  234. package/build-module/template-part/edit/index.mjs.map +2 -2
  235. package/build-module/template-part/edit/inner-blocks.mjs.map +2 -2
  236. package/build-module/template-part/edit/placeholder.mjs.map +2 -2
  237. package/build-module/term-count/use-term-count.mjs.map +2 -2
  238. package/build-module/term-description/use-term-description.mjs.map +2 -2
  239. package/build-module/term-name/use-term-name.mjs.map +2 -2
  240. package/build-module/terms-query/edit/inspector-controls/index.mjs.map +2 -2
  241. package/build-module/terms-query/edit/inspector-controls/inherit-control.mjs.map +2 -2
  242. package/build-module/terms-query/edit/inspector-controls/order-control.mjs +2 -2
  243. package/build-module/terms-query/edit/inspector-controls/order-control.mjs.map +2 -2
  244. package/build-module/terms-query/edit/inspector-controls/taxonomy-control.mjs +2 -2
  245. package/build-module/terms-query/edit/inspector-controls/taxonomy-control.mjs.map +2 -2
  246. package/build-module/utils/hooks.mjs.map +2 -2
  247. package/build-module/utils/media-control.mjs +5 -1
  248. package/build-module/utils/media-control.mjs.map +2 -2
  249. package/build-module/utils/poster-image.mjs.map +2 -2
  250. package/build-module/verse/block.json +1 -0
  251. package/build-module/video/edit-common-settings.mjs +2 -2
  252. package/build-module/video/edit-common-settings.mjs.map +2 -2
  253. package/build-module/video/tracks-editor.mjs +2 -2
  254. package/build-module/video/tracks-editor.mjs.map +2 -2
  255. package/build-style/button/style-rtl.css +2 -1
  256. package/build-style/button/style.css +2 -1
  257. package/build-style/columns/style-rtl.css +1 -1
  258. package/build-style/columns/style.css +1 -1
  259. package/build-style/comments/editor-rtl.css +1 -1
  260. package/build-style/comments/editor.css +1 -1
  261. package/build-style/comments/style-rtl.css +1 -1
  262. package/build-style/comments/style.css +1 -1
  263. package/build-style/common-rtl.css +1 -1
  264. package/build-style/common.css +1 -1
  265. package/build-style/cover/style-rtl.css +6 -0
  266. package/build-style/cover/style.css +6 -0
  267. package/build-style/editor-rtl.css +9 -5
  268. package/build-style/editor.css +9 -5
  269. package/build-style/embed/editor-rtl.css +2 -1
  270. package/build-style/embed/editor.css +2 -1
  271. package/build-style/gallery/style-rtl.css +1 -2
  272. package/build-style/gallery/style.css +1 -2
  273. package/build-style/image/style-rtl.css +6 -9
  274. package/build-style/image/style.css +6 -9
  275. package/build-style/math/editor-rtl.css +5 -0
  276. package/build-style/math/editor.css +5 -0
  277. package/build-style/navigation/editor-rtl.css +1 -0
  278. package/build-style/navigation/editor.css +1 -0
  279. package/build-style/navigation/style-rtl.css +1 -1
  280. package/build-style/navigation/style.css +1 -1
  281. package/build-style/post-title/style-rtl.css +2 -2
  282. package/build-style/post-title/style.css +2 -2
  283. package/build-style/query-pagination/editor-rtl.css +0 -3
  284. package/build-style/query-pagination/editor.css +0 -3
  285. package/build-style/search/theme-rtl.css +1 -1
  286. package/build-style/search/theme.css +1 -1
  287. package/build-style/style-rtl.css +23 -19
  288. package/build-style/style.css +23 -19
  289. package/build-style/theme-rtl.css +1 -1
  290. package/build-style/theme.css +1 -1
  291. package/build-style/verse/style-rtl.css +2 -1
  292. package/build-style/verse/style.css +2 -1
  293. package/package.json +40 -40
  294. package/src/archives/edit.jsx +2 -2
  295. package/src/audio/edit.jsx +2 -2
  296. package/src/avatar/hooks.js +2 -2
  297. package/src/button/edit.jsx +1 -1
  298. package/src/button/style.scss +2 -2
  299. package/src/calendar/index.php +1 -1
  300. package/src/categories/edit.jsx +2 -2
  301. package/src/code/README.md +1 -0
  302. package/src/code/block.json +1 -0
  303. package/src/code/save.jsx +1 -1
  304. package/src/columns/style.scss +2 -3
  305. package/src/comment-template/hooks.js +1 -1
  306. package/src/comments/style.scss +1 -1
  307. package/src/common.scss +1 -2
  308. package/src/cover/edit/index.jsx +2 -2
  309. package/src/cover/edit/inspector-controls.jsx +2 -2
  310. package/src/cover/style.scss +10 -0
  311. package/src/cover/test/{edit.jsdom.test.js → edit.browser.test.js} +104 -145
  312. package/src/cover/transforms.js +3 -3
  313. package/src/details/README.md +1 -0
  314. package/src/details/block.json +1 -0
  315. package/src/details/index.js +1 -1
  316. package/src/embed/editor.scss +2 -2
  317. package/src/embed/embed-controls.jsx +2 -2
  318. package/src/file/deprecated.jsx +3 -3
  319. package/src/file/edit.jsx +5 -3
  320. package/src/file/inspector.jsx +3 -3
  321. package/src/file/save.jsx +2 -2
  322. package/src/footnotes/README.md +1 -0
  323. package/src/footnotes/block.json +1 -0
  324. package/src/footnotes/edit.jsx +1 -1
  325. package/src/gallery/dynamic-gallery.jsx +4 -4
  326. package/src/gallery/edit.jsx +121 -68
  327. package/src/gallery/gallery-styles.js +117 -0
  328. package/src/gallery/index.php +181 -67
  329. package/src/gallery/responsive-styles.js +59 -5
  330. package/src/gallery/test/edit.jsdom.test.js +71 -3
  331. package/src/gallery/test/responsive-styles.js +59 -5
  332. package/src/heading/README.md +2 -0
  333. package/src/heading/block.json +2 -0
  334. package/src/heading/index.js +2 -2
  335. package/src/html/modal.jsx +0 -3
  336. package/src/image/edit.jsx +1 -1
  337. package/src/image/image.jsx +7 -7
  338. package/src/image/index.php +10 -4
  339. package/src/image/style.scss +1 -0
  340. package/src/image/test/use-open-image-media-editor-modal.jsdom.test.js +1 -1
  341. package/src/index.jsx +1 -1
  342. package/src/latest-comments/edit.jsx +2 -2
  343. package/src/latest-posts/edit.jsx +1 -1
  344. package/src/list/ordered-list-settings.jsx +2 -2
  345. package/src/list-item/hooks/use-enter.js +1 -1
  346. package/src/math/README.md +2 -2
  347. package/src/math/block.json +2 -0
  348. package/src/math/deprecated.jsx +38 -12
  349. package/src/math/edit.jsx +49 -20
  350. package/src/math/editor.scss +5 -0
  351. package/src/math/save.jsx +20 -4
  352. package/src/media-text/constants.js +1 -0
  353. package/src/media-text/deprecated.jsx +3 -3
  354. package/src/media-text/edit.jsx +48 -3
  355. package/src/media-text/image-fill.js +2 -2
  356. package/src/media-text/media-container.jsx +1 -1
  357. package/src/navigation/edit/index.jsx +1 -1
  358. package/src/navigation/edit/menu-inspector-controls.jsx +2 -2
  359. package/src/navigation/edit/overlay-template-part-selector.jsx +3 -3
  360. package/src/navigation/edit/responsive-wrapper.jsx +1 -1
  361. package/src/navigation/edit/use-generate-default-navigation-title.js +2 -2
  362. package/src/navigation/editor.scss +1 -0
  363. package/src/navigation/index.php +12 -0
  364. package/src/navigation/style.scss +1 -1
  365. package/src/navigation/test/use-navigation-menu.jsdom.test.js +6 -28
  366. package/src/navigation/test/view.jsdom.test.js +23 -0
  367. package/src/navigation/view.js +9 -6
  368. package/src/navigation-link/edit.jsx +1 -1
  369. package/src/navigation-link/shared/invalid-draft-display.jsx +2 -2
  370. package/src/navigation-link/test/__snapshots__/hooks.jsdom.test.js.snap +41 -11
  371. package/src/navigation-submenu/edit.jsx +1 -1
  372. package/src/paragraph/README.md +1 -0
  373. package/src/paragraph/block.json +1 -0
  374. package/src/paragraph/edit.jsx +1 -1
  375. package/src/paragraph/index.js +7 -0
  376. package/src/pattern/index.php +2 -2
  377. package/src/playlist/edit.jsx +6 -4
  378. package/src/playlist-track/test/edit.jsdom.test.jsx +2 -3
  379. package/src/post-author/edit.jsx +2 -2
  380. package/src/post-author-name/edit.jsx +1 -1
  381. package/src/post-content/README.md +1 -0
  382. package/src/post-content/block.json +1 -0
  383. package/src/post-date/edit.jsx +2 -2
  384. package/src/post-excerpt/README.md +1 -0
  385. package/src/post-excerpt/block.json +1 -0
  386. package/src/post-excerpt/edit.jsx +1 -1
  387. package/src/post-featured-image/edit.jsx +2 -2
  388. package/src/post-navigation-link/edit.jsx +4 -4
  389. package/src/post-time-to-read/edit.jsx +2 -2
  390. package/src/post-title/style.scss +2 -3
  391. package/src/pullquote/deprecated.jsx +1 -1
  392. package/src/query/deprecated.jsx +1 -1
  393. package/src/query/edit/inspector-controls/index.jsx +4 -4
  394. package/src/query/edit/inspector-controls/order-control.jsx +2 -2
  395. package/src/query/edit/inspector-controls/sticky-control.jsx +2 -2
  396. package/src/query/view.js +6 -9
  397. package/src/query-pagination/editor.scss +0 -3
  398. package/src/query-title/use-archive-label.js +1 -1
  399. package/src/quote/deprecated.jsx +2 -2
  400. package/src/quote/transforms.js +3 -3
  401. package/src/search/edit.jsx +6 -6
  402. package/src/search/theme.scss +1 -1
  403. package/src/separator/edit.jsx +7 -4
  404. package/src/social-links/edit.jsx +2 -2
  405. package/src/table/state.js +1 -1
  406. package/src/table-of-contents/edit.jsx +6 -6
  407. package/src/table-of-contents/utils.ts +2 -2
  408. package/src/tabs/use-tab-actions.js +1 -1
  409. package/src/tag-cloud/edit.jsx +2 -2
  410. package/src/template-part/edit/advanced-controls.jsx +5 -2
  411. package/src/template-part/edit/import-controls.jsx +2 -2
  412. package/src/template-part/edit/index.jsx +2 -2
  413. package/src/template-part/edit/inner-blocks.jsx +1 -1
  414. package/src/template-part/edit/placeholder.jsx +2 -2
  415. package/src/term-count/use-term-count.js +1 -1
  416. package/src/term-description/use-term-description.js +1 -1
  417. package/src/term-name/use-term-name.js +1 -1
  418. package/src/terms-query/edit/inspector-controls/index.jsx +2 -2
  419. package/src/terms-query/edit/inspector-controls/inherit-control.jsx +1 -1
  420. package/src/terms-query/edit/inspector-controls/order-control.jsx +2 -2
  421. package/src/terms-query/edit/inspector-controls/taxonomy-control.jsx +2 -2
  422. package/src/utils/hooks.js +1 -1
  423. package/src/utils/media-control.jsx +16 -10
  424. package/src/utils/poster-image.jsx +2 -2
  425. package/src/utils/test/waveform-player.jsdom.test.jsx +36 -38
  426. package/src/utils/test/{waveform-utils.jsdom.test.js → waveform-utils.browser.test.js} +64 -44
  427. package/src/verse/README.md +1 -0
  428. package/src/verse/block.json +1 -0
  429. package/src/verse/style.scss +2 -2
  430. package/src/video/edit-common-settings.jsx +3 -3
  431. package/src/video/tracks-editor.jsx +2 -2
  432. package/build/gallery/flex-styles.cjs.map +0 -7
  433. package/build-module/gallery/flex-styles.mjs.map +0 -7
  434. package/src/gallery/flex-styles.js +0 -99
@@ -1,16 +1,12 @@
1
- /* eslint-disable jest-dom/prefer-to-have-style -- This suite moves to Browser Mode in the next stacked PR. */
2
- import { describe, expect, test } from 'vitest';
3
- import { screen, fireEvent, act, within } from '@testing-library/react';
4
- import userEvent from '@testing-library/user-event';
1
+ import { beforeEach, describe, expect, test } from 'vitest';
2
+ import { userEvent } from 'vitest/browser';
3
+ import { screen, act, within, waitFor } from '@testing-library/react';
4
+ import { createBlock } from '@wordpress/blocks';
5
5
  import {
6
6
  initializeEditor,
7
7
  selectBlock,
8
8
  } from '@wordpress/integration-tests/helpers/integration-test-editor';
9
- globalThis.wpVitest.mockMatchMedia();
10
- globalThis.wpVitest.mockCSSSupports();
11
- globalThis.wpVitest.mockResizeObserver();
12
- globalThis.wpVitest.mockVisibleElements();
13
-
9
+ import { registerCoreBlocks } from '@wordpress/block-library';
14
10
  const defaultSettings = {
15
11
  __experimentalFeatures: {
16
12
  color: {
@@ -38,63 +34,26 @@ const disabledColorSettings = {
38
34
  disableCustomGradients: true,
39
35
  };
40
36
 
41
- /**
42
- * Runs `callback` with `requestAnimationFrame` callbacks flushed on a microtask
43
- * ahead of any pending `setTimeout( 0 )` timers, then restores the original.
44
- *
45
- * In a browser, Ariakit normalizes the matrix's roving tabindex in a
46
- * `requestAnimationFrame` before `useFocusOnMount`'s `setTimeout( 0 )` focuses
47
- * the active (center) cell, so opening the dropdown leaves the content position
48
- * untouched. JSDOM implements `requestAnimationFrame` as a ~16ms timer, which
49
- * inverts the ordering and would otherwise focus and select the first DOM cell.
50
- *
51
- * @param {() => ( Promise< unknown > | unknown )} callback
52
- * @return {Promise< unknown >} Resolves with the callback's return value.
53
- */
54
- async function withAnimationFramesBeforeTimers( callback ) {
55
- const originalRequestAnimationFrame = global.requestAnimationFrame;
56
-
57
- let flushing = false;
58
- global.requestAnimationFrame = ( frameCallback ) => {
59
- // Frames scheduled while flushing fall back to the real implementation
60
- // so self-rescheduling loops (e.g. Popover's Floating UI `autoUpdate`)
61
- // don't spin forever on the microtask queue.
62
- if ( flushing ) {
63
- return originalRequestAnimationFrame( frameCallback );
64
- }
65
-
66
- queueMicrotask( () => {
67
- flushing = true;
68
- try {
69
- frameCallback( performance.now() );
70
- } finally {
71
- flushing = false;
72
- }
73
- } );
74
-
75
- return 0;
76
- };
77
-
78
- try {
79
- return await callback();
80
- } finally {
81
- global.requestAnimationFrame = originalRequestAnimationFrame;
82
- }
37
+ async function setup( attributes, customSettings, innerBlocks = [] ) {
38
+ const testBlock = { name: 'core/cover', attributes, innerBlocks };
39
+ const settings = customSettings || defaultSettings;
40
+ return initializeEditor( testBlock, false, settings );
83
41
  }
84
42
 
85
- async function setup( attributes, useCoreBlocks, customSettings ) {
86
- const testBlock = { name: 'core/cover', attributes };
87
- const settings = customSettings || defaultSettings;
88
- return initializeEditor( testBlock, useCoreBlocks, settings );
43
+ async function activateWithKeyboard( element ) {
44
+ act( () => element.focus() );
45
+ expect( element ).toHaveFocus();
46
+ await userEvent.keyboard( '{Enter}' );
89
47
  }
90
48
 
91
49
  async function createAndSelectBlock() {
92
- await userEvent.click(
93
- screen.getByRole( 'button', {
94
- name: 'Black',
95
- } )
96
- );
97
- await selectBlock( 'Block: Cover' );
50
+ const view = await setup( { overlayColor: 'black' }, undefined, [
51
+ createBlock( 'core/paragraph' ),
52
+ ] );
53
+ const cover = screen.getByLabelText( 'Block: Cover' );
54
+ await act( async () => cover.focus() );
55
+ await waitFor( () => expect( cover ).toHaveClass( 'is-selected' ) );
56
+ return view;
98
57
  }
99
58
 
100
59
  async function openStylesTabIfAvailable() {
@@ -108,6 +67,8 @@ async function openStylesTabIfAvailable() {
108
67
  }
109
68
 
110
69
  describe( 'Cover block', () => {
70
+ beforeEach( () => registerCoreBlocks() );
71
+
111
72
  describe( 'Editor canvas', () => {
112
73
  test( 'shows placeholder if background image and color not set', async () => {
113
74
  await setup();
@@ -120,38 +81,46 @@ describe( 'Cover block', () => {
120
81
  } );
121
82
 
122
83
  test( 'can set overlay color using color picker on block placeholder', async () => {
123
- const { container } = await setup();
84
+ await setup();
124
85
  const colorPicker = screen.getByRole( 'button', {
125
86
  name: 'Black',
126
87
  } );
127
- await userEvent.click( colorPicker );
88
+ await activateWithKeyboard( colorPicker );
128
89
  const color = colorPicker.style.backgroundColor;
129
- expect(
130
- screen.queryByRole( 'group', {
131
- name: 'To edit this block, you need permission to upload media.',
132
- } )
133
- ).not.toBeInTheDocument();
90
+ await waitFor( () =>
91
+ expect(
92
+ screen.getByLabelText( 'Block: Cover' )
93
+ ).not.toHaveClass( 'is-placeholder' )
94
+ );
134
95
 
96
+ const coverBlock = screen.getByLabelText( 'Block: Cover' );
135
97
  // eslint-disable-next-line testing-library/no-node-access
136
- const overlay = container.getElementsByClassName(
137
- 'wp-block-cover__background'
98
+ const overlay = coverBlock.querySelector(
99
+ '.wp-block-cover__background'
100
+ );
101
+ await waitFor( () =>
102
+ expect(
103
+ window.getComputedStyle( overlay ).backgroundColor
104
+ ).toBe( color )
138
105
  );
139
- expect( overlay[ 0 ].style.backgroundColor ).toBe( color );
140
106
  } );
141
107
 
142
108
  test( 'can have the title edited', async () => {
143
109
  await setup();
144
110
 
145
- await userEvent.click(
146
- screen.getByRole( 'button', {
147
- name: 'Black',
148
- } )
111
+ const colorButton = screen.getByRole( 'button', { name: 'Black' } );
112
+ await activateWithKeyboard( colorButton );
113
+ await waitFor( () =>
114
+ expect(
115
+ screen.getByLabelText( 'Block: Cover' )
116
+ ).not.toHaveClass( 'is-placeholder' )
149
117
  );
150
118
 
151
119
  const title = screen.getByLabelText( 'Empty block;', {
152
120
  exact: false,
153
121
  } );
154
- await userEvent.click( title );
122
+ act( () => title.focus() );
123
+ expect( title ).toHaveFocus();
155
124
  await userEvent.keyboard( 'abc' );
156
125
  expect( title ).toHaveTextContent( 'abc' );
157
126
  } );
@@ -159,48 +128,46 @@ describe( 'Cover block', () => {
159
128
 
160
129
  describe( 'Block toolbar', () => {
161
130
  test( 'full height toggle sets minHeight style attribute to 100vh when clicked', async () => {
162
- await setup();
163
131
  await createAndSelectBlock();
164
132
 
165
133
  const cover = screen.getByLabelText( 'Block: Cover' );
166
- expect( cover.style.minHeight ).not.toBe( '100vh' );
134
+ expect( window.getComputedStyle( cover ).minHeight ).not.toBe(
135
+ `${ window.innerHeight }px`
136
+ );
167
137
 
168
138
  await userEvent.click( screen.getByLabelText( 'Full height' ) );
169
139
 
170
- expect( cover.style.minHeight ).toBe( '100vh' );
140
+ await waitFor( () =>
141
+ expect(
142
+ window.getComputedStyle(
143
+ screen.getByLabelText( 'Block: Cover' )
144
+ ).minHeight
145
+ ).toBe( `${ window.innerHeight }px` )
146
+ );
171
147
  } );
172
148
 
173
149
  test( 'content position button sets content position', async () => {
174
- await setup();
175
150
  await createAndSelectBlock();
151
+ const cover = screen.getByLabelText( 'Block: Cover' );
176
152
 
177
- // Open the matrix dropdown with browser-like frame ordering so
178
- // focus-on-mount lands on the active cell instead of dirtying the
179
- // content position.
180
- await withAnimationFramesBeforeTimers( () =>
181
- userEvent.click(
182
- screen.getByLabelText( 'Change content position' )
183
- )
184
- );
153
+ expect( cover ).not.toHaveClass( 'has-custom-content-position' );
185
154
 
186
- expect( screen.getByLabelText( 'Block: Cover' ) ).not.toHaveClass(
187
- 'has-custom-content-position'
155
+ await userEvent.click(
156
+ screen.getByLabelText( 'Change content position' )
188
157
  );
158
+ expect( cover ).not.toHaveClass( 'has-custom-content-position' );
189
159
 
190
- await act( async () =>
191
- within( screen.getByRole( 'grid' ) )
192
- .getByRole( 'gridcell', {
193
- name: 'top left',
194
- } )
195
- .focus()
160
+ await userEvent.click(
161
+ within( screen.getByRole( 'grid' ) ).getByRole( 'gridcell', {
162
+ name: 'top left',
163
+ } )
196
164
  );
197
165
 
198
- expect( screen.getByLabelText( 'Block: Cover' ) ).toHaveClass(
199
- 'has-custom-content-position'
200
- );
201
- expect( screen.getByLabelText( 'Block: Cover' ) ).toHaveClass(
202
- 'is-position-top-left'
166
+ await waitFor( () =>
167
+ expect( cover ).toHaveClass( 'has-custom-content-position' )
203
168
  );
169
+
170
+ expect( cover ).toHaveClass( 'is-position-top-left' );
204
171
  } );
205
172
 
206
173
  test( 'clears media when clear media button clicked', async () => {
@@ -218,10 +185,8 @@ describe( 'Cover block', () => {
218
185
  await userEvent.click(
219
186
  screen.getByRole( 'button', { name: 'Replace' } )
220
187
  );
221
- await userEvent.click(
222
- screen.getByRole( 'menuitem', {
223
- name: 'Reset',
224
- } )
188
+ await activateWithKeyboard(
189
+ screen.getByRole( 'menuitem', { name: 'Reset' } )
225
190
  );
226
191
 
227
192
  expect(
@@ -243,7 +208,6 @@ describe( 'Cover block', () => {
243
208
  ).not.toBeInTheDocument();
244
209
  } );
245
210
  test( 'does not display settings tab when media settings are empty', async () => {
246
- await setup();
247
211
  await createAndSelectBlock();
248
212
 
249
213
  expect(
@@ -313,7 +277,9 @@ describe( 'Cover block', () => {
313
277
  const image = within(
314
278
  screen.getByLabelText( 'Block: Cover' )
315
279
  ).getByRole( 'presentation' );
316
- expect( image.style.objectPosition ).toBe( '100% 50%' );
280
+ expect( window.getComputedStyle( image ).objectPosition ).toBe(
281
+ '100% 50%'
282
+ );
317
283
  } );
318
284
 
319
285
  test( 'sets alt attribute if text entered in alt text box', async () => {
@@ -331,9 +297,7 @@ describe( 'Cover block', () => {
331
297
 
332
298
  describe( 'Color panel', () => {
333
299
  test( 'applies selected opacity to block when number control value changed', async () => {
334
- const { container } = await setup();
335
-
336
- await createAndSelectBlock();
300
+ const { container } = await createAndSelectBlock();
337
301
 
338
302
  // eslint-disable-next-line testing-library/no-node-access
339
303
  const overlay = container.getElementsByClassName(
@@ -343,26 +307,18 @@ describe( 'Cover block', () => {
343
307
  expect( overlay[ 0 ] ).toHaveClass( 'has-background-dim-100' );
344
308
 
345
309
  await openStylesTabIfAvailable();
346
- // Need act here as the isDark method is async.
347
- // eslint-disable-next-line testing-library/no-unnecessary-act
348
- await act( async () => {
349
- fireEvent.change(
350
- screen.getByRole( 'spinbutton', {
351
- name: 'Overlay opacity',
352
- } ),
353
- {
354
- target: { value: '40' },
355
- }
356
- );
357
- } );
310
+ await userEvent.fill(
311
+ screen.getByRole( 'spinbutton', {
312
+ name: 'Overlay opacity',
313
+ } ),
314
+ '40'
315
+ );
358
316
 
359
317
  expect( overlay[ 0 ] ).toHaveClass( 'has-background-dim-40' );
360
318
  } );
361
319
 
362
320
  test( 'applies selected opacity to block when slider moved', async () => {
363
- const { container } = await setup();
364
-
365
- await createAndSelectBlock();
321
+ const { container } = await createAndSelectBlock();
366
322
 
367
323
  // eslint-disable-next-line testing-library/no-node-access
368
324
  const overlay = container.getElementsByClassName(
@@ -373,23 +329,19 @@ describe( 'Cover block', () => {
373
329
 
374
330
  await openStylesTabIfAvailable();
375
331
 
376
- // Need act here as the isDark method is async.
377
- // eslint-disable-next-line testing-library/no-unnecessary-act
378
- await act( async () => {
379
- fireEvent.change(
380
- screen.getByRole( 'slider', {
381
- name: 'Overlay opacity',
382
- } ),
383
- { target: { value: 30 } }
384
- );
385
- } );
332
+ await userEvent.fill(
333
+ screen.getByRole( 'slider', {
334
+ name: 'Overlay opacity',
335
+ } ),
336
+ '30'
337
+ );
386
338
 
387
339
  expect( overlay[ 0 ] ).toHaveClass( 'has-background-dim-30' );
388
340
  } );
389
341
 
390
342
  describe( 'when colors are disabled', () => {
391
343
  test( 'does not render overlay control', async () => {
392
- await setup( undefined, true, disabledColorSettings );
344
+ await setup( undefined, disabledColorSettings );
393
345
  await selectBlock( 'Block: Cover' );
394
346
  await openStylesTabIfAvailable();
395
347
 
@@ -400,7 +352,7 @@ describe( 'Cover block', () => {
400
352
  expect( overlayControl ).not.toBeInTheDocument();
401
353
  } );
402
354
  test( 'does not render opacity control', async () => {
403
- await setup( undefined, true, disabledColorSettings );
355
+ await setup( undefined, disabledColorSettings );
404
356
  await selectBlock( 'Block: Cover' );
405
357
  await openStylesTabIfAvailable();
406
358
 
@@ -415,7 +367,6 @@ describe( 'Cover block', () => {
415
367
 
416
368
  describe( 'Dimensions panel', () => {
417
369
  test( 'sets minHeight attribute when number control value changed', async () => {
418
- await setup();
419
370
  await createAndSelectBlock();
420
371
  await openStylesTabIfAvailable();
421
372
  await userEvent.clear(
@@ -427,7 +378,9 @@ describe( 'Cover block', () => {
427
378
  );
428
379
 
429
380
  expect(
430
- screen.getByLabelText( 'Block: Cover' ).style.minHeight
381
+ window.getComputedStyle(
382
+ screen.getByLabelText( 'Block: Cover' )
383
+ ).minHeight
431
384
  ).toBe( '300px' );
432
385
  } );
433
386
  } );
@@ -439,12 +392,15 @@ describe( 'Cover block', () => {
439
392
  const colorPicker = screen.getByRole( 'button', {
440
393
  name: 'White',
441
394
  } );
442
- await userEvent.click( colorPicker );
395
+ await activateWithKeyboard( colorPicker );
443
396
 
397
+ await waitFor( () =>
398
+ expect( screen.getByLabelText( 'Block: Cover' ) ).toHaveClass(
399
+ 'is-light'
400
+ )
401
+ );
444
402
  const coverBlock = screen.getByLabelText( 'Block: Cover' );
445
403
 
446
- expect( coverBlock ).toHaveClass( 'is-light' );
447
-
448
404
  await selectBlock( 'Block: Cover' );
449
405
  await openStylesTabIfAvailable();
450
406
  await userEvent.click( screen.getByText( 'Overlay' ) );
@@ -459,9 +415,13 @@ describe( 'Cover block', () => {
459
415
  const colorPicker = screen.getByRole( 'button', {
460
416
  name: 'White',
461
417
  } );
462
- await userEvent.click( colorPicker );
418
+ await activateWithKeyboard( colorPicker );
419
+ await waitFor( () =>
420
+ expect( screen.getByLabelText( 'Block: Cover' ) ).toHaveClass(
421
+ 'is-light'
422
+ )
423
+ );
463
424
  const coverBlock = screen.getByLabelText( 'Block: Cover' );
464
- expect( coverBlock ).toHaveClass( 'is-light' );
465
425
  await selectBlock( 'Block: Cover' );
466
426
  await openStylesTabIfAvailable();
467
427
  await userEvent.click( screen.getByText( 'Overlay' ) );
@@ -475,4 +435,3 @@ describe( 'Cover block', () => {
475
435
  } );
476
436
  } );
477
437
  } );
478
- /* eslint-enable jest-dom/prefer-to-have-style */
@@ -119,7 +119,7 @@ const transforms = {
119
119
  ...style?.color,
120
120
  background: undefined,
121
121
  gradient: undefined,
122
- }
122
+ }
123
123
  : undefined,
124
124
  } ),
125
125
  };
@@ -234,7 +234,7 @@ const transforms = {
234
234
  attributes?.customOverlayColor,
235
235
  gradient: attributes?.customGradient,
236
236
  ...attributes?.style?.color,
237
- }
237
+ }
238
238
  : undefined,
239
239
  } ),
240
240
  };
@@ -280,7 +280,7 @@ const transforms = {
280
280
  ?.style?.color,
281
281
  ...groupAttributes?.style
282
282
  ?.color,
283
- }
283
+ }
284
284
  : undefined,
285
285
  } ),
286
286
  },
@@ -30,6 +30,7 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
30
30
  - [`gradients`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-gradients): `true`
31
31
  - [`link`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#color-link): `true`
32
32
  - [`html`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#html): `false`
33
+ - [`shadow`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#shadow): `true`
33
34
  - [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing):
34
35
  - `margin`: `true`
35
36
  - `padding`: `true`
@@ -46,6 +46,7 @@
46
46
  "style": true
47
47
  },
48
48
  "html": false,
49
+ "shadow": true,
49
50
  "spacing": {
50
51
  "margin": true,
51
52
  "padding": true,
@@ -60,7 +60,7 @@ export const settings = {
60
60
  /* translators: %s: accessibility text; summary title. */
61
61
  __( 'Details. %s' ),
62
62
  summary
63
- );
63
+ );
64
64
  }
65
65
  },
66
66
  save,
@@ -20,8 +20,8 @@
20
20
 
21
21
  // Stops long URLs from breaking out of the no preview available screen
22
22
  .components-placeholder__error {
23
- // stylelint-disable-next-line declaration-property-value-keyword-no-deprecated -- Pending review of overflow-wrap alternative.
24
- word-break: break-word;
23
+ word-break: normal;
24
+ overflow-wrap: break-word;
25
25
  }
26
26
  }
27
27
 
@@ -14,10 +14,10 @@ function getResponsiveHelp( checked ) {
14
14
  return checked
15
15
  ? __(
16
16
  'This embed will preserve its aspect ratio when the browser is resized.'
17
- )
17
+ )
18
18
  : __(
19
19
  'This embed may not preserve its aspect ratio when the browser is resized.'
20
- );
20
+ );
21
21
  }
22
22
 
23
23
  const EmbedControls = ( {
@@ -78,7 +78,7 @@ const v3 = {
78
78
  /* translators: %s: filename. */
79
79
  __( 'Embed of %s.' ),
80
80
  fileName
81
- );
81
+ );
82
82
 
83
83
  const hasFilename = ! RichText.isEmpty( fileName );
84
84
 
@@ -209,7 +209,7 @@ const v2 = {
209
209
  /* translators: %s: filename. */
210
210
  __( 'Embed of %s.' ),
211
211
  fileName
212
- );
212
+ );
213
213
 
214
214
  const hasFilename = ! RichText.isEmpty( fileName );
215
215
 
@@ -329,7 +329,7 @@ const v1 = {
329
329
  /* translators: %s: filename. */
330
330
  __( 'Embed of %s.' ),
331
331
  fileName
332
- );
332
+ );
333
333
 
334
334
  return (
335
335
  href && (
package/src/file/edit.jsx CHANGED
@@ -72,7 +72,7 @@ function FileEdit( { attributes, isSelected, setAttributes, clientId } ) {
72
72
  'attachment',
73
73
  id,
74
74
  { context: 'view' }
75
- )
75
+ )
76
76
  : undefined,
77
77
  } ),
78
78
  [ id ]
@@ -114,9 +114,11 @@ function FileEdit( { attributes, isSelected, setAttributes, clientId } ) {
114
114
  getFilename( newMedia.url ).toLowerCase().endsWith( '.pdf' );
115
115
  const pdfAttributes = {
116
116
  displayPreview: isPdf
117
- ? attributes.displayPreview ?? true
117
+ ? ( attributes.displayPreview ?? true )
118
+ : undefined,
119
+ previewHeight: isPdf
120
+ ? ( attributes.previewHeight ?? 600 )
118
121
  : undefined,
119
- previewHeight: isPdf ? attributes.previewHeight ?? 600 : undefined,
120
122
  };
121
123
 
122
124
  setAttributes( {
@@ -1,7 +1,7 @@
1
1
  import { __ } from '@wordpress/i18n';
2
2
  import {
3
3
  RangeControl,
4
- SelectControl,
4
+ SelectControl as WCSelectControl,
5
5
  ToggleControl,
6
6
  __experimentalToolsPanel as ToolsPanel,
7
7
  __experimentalToolsPanelItem as ToolsPanelItem,
@@ -57,7 +57,7 @@ export default function FileBlockInspector( {
57
57
  displayPreview
58
58
  ? __(
59
59
  "Note: Most phone and tablet browsers won't display embedded PDFs."
60
- )
60
+ )
61
61
  : null
62
62
  }
63
63
  checked={ !! displayPreview }
@@ -101,7 +101,7 @@ export default function FileBlockInspector( {
101
101
  hasValue={ () => textLinkHref !== href }
102
102
  onDeselect={ () => changeLinkDestinationOption( href ) }
103
103
  >
104
- <SelectControl
104
+ <WCSelectControl
105
105
  label={ __( 'Link to' ) }
106
106
  value={ textLinkHref }
107
107
  options={ linkDestinationOptions }
package/src/file/save.jsx CHANGED
@@ -21,8 +21,8 @@ export default function save( { attributes } ) {
21
21
  const pdfEmbedLabel = RichText.isEmpty( fileName )
22
22
  ? 'PDF embed'
23
23
  : // To do: use toPlainText, but we need ensure it's RichTextData. See
24
- // https://github.com/WordPress/gutenberg/pull/56710.
25
- fileName.toString();
24
+ // https://github.com/WordPress/gutenberg/pull/56710.
25
+ fileName.toString();
26
26
 
27
27
  const hasFilename = ! RichText.isEmpty( fileName );
28
28
 
@@ -28,6 +28,7 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer
28
28
  - [`multiple`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#multiple): `false`
29
29
  - [`reusable`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#reusable): `false`
30
30
  - [`inserter`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#inserter): `false`
31
+ - [`shadow`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#shadow): `true`
31
32
  - [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing):
32
33
  - `margin`: `true`
33
34
  - `padding`: `true`
@@ -35,6 +35,7 @@
35
35
  "multiple": false,
36
36
  "reusable": false,
37
37
  "inserter": false,
38
+ "shadow": true,
38
39
  "spacing": {
39
40
  "margin": true,
40
41
  "padding": true,
@@ -90,7 +90,7 @@ export default function FootnotesEdit( { context: { postType, postId } } ) {
90
90
  ? {
91
91
  content: nextFootnote,
92
92
  id,
93
- }
93
+ }
94
94
  : footnote;
95
95
  } )
96
96
  ),
@@ -5,7 +5,7 @@ import {
5
5
  Notice,
6
6
  PanelBody,
7
7
  Placeholder,
8
- SelectControl,
8
+ SelectControl as WCSelectControl,
9
9
  Spinner,
10
10
  ToolbarButton,
11
11
  __experimentalToolsPanel as ToolsPanel,
@@ -56,7 +56,7 @@ const ORDER_OPTIONS = [
56
56
  */
57
57
  function OrderControl( { orderby, order, onChange } ) {
58
58
  return (
59
- <SelectControl
59
+ <WCSelectControl
60
60
  label={ __( 'Order by' ) }
61
61
  value={ `${ orderby }/${ order }` }
62
62
  options={ ORDER_OPTIONS }
@@ -386,8 +386,8 @@ export function GalleryDynamicView( {
386
386
  // source wording comes from the source descriptor.
387
387
  const emptyInstructions = isResolvingDynamic
388
388
  ? __( 'Loading images…' )
389
- : sourceDescriptor?.emptyMessage ??
390
- __( 'Dynamic images will appear here.' );
389
+ : ( sourceDescriptor?.emptyMessage ??
390
+ __( 'Dynamic images will appear here.' ) );
391
391
 
392
392
  return (
393
393
  <>