@wordpress/block-editor 11.5.0 → 11.7.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 (345) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +4 -0
  3. package/build/components/block-list/block-html.js +1 -3
  4. package/build/components/block-list/block-html.js.map +1 -1
  5. package/build/components/block-list/block-invalid-warning.js +63 -80
  6. package/build/components/block-list/block-invalid-warning.js.map +1 -1
  7. package/build/components/block-preview/auto.js +6 -23
  8. package/build/components/block-preview/auto.js.map +1 -1
  9. package/build/components/block-settings-menu-controls/index.js +1 -1
  10. package/build/components/block-settings-menu-controls/index.js.map +1 -1
  11. package/build/components/block-switcher/block-transformations-menu.native.js +1 -0
  12. package/build/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  13. package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js +6 -3
  14. package/build/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  15. package/build/components/editor-styles/index.js +20 -2
  16. package/build/components/editor-styles/index.js.map +1 -1
  17. package/build/components/global-styles/border-panel.js +306 -0
  18. package/build/components/global-styles/border-panel.js.map +1 -0
  19. package/build/components/global-styles/color-panel.js +583 -0
  20. package/build/components/global-styles/color-panel.js.map +1 -0
  21. package/build/components/global-styles/dimensions-panel.js +8 -30
  22. package/build/components/global-styles/dimensions-panel.js.map +1 -1
  23. package/build/components/global-styles/get-block-css-selector.js +129 -0
  24. package/build/components/global-styles/get-block-css-selector.js.map +1 -0
  25. package/build/components/global-styles/hooks.js +109 -3
  26. package/build/components/global-styles/hooks.js.map +1 -1
  27. package/build/components/global-styles/index.js +36 -0
  28. package/build/components/global-styles/index.js.map +1 -1
  29. package/build/components/global-styles/typography-panel.js +66 -45
  30. package/build/components/global-styles/typography-panel.js.map +1 -1
  31. package/build/components/global-styles/use-global-styles-output.js +180 -99
  32. package/build/components/global-styles/use-global-styles-output.js.map +1 -1
  33. package/build/components/global-styles/utils.js +2 -1
  34. package/build/components/global-styles/utils.js.map +1 -1
  35. package/build/components/image-size-control/index.js +8 -5
  36. package/build/components/image-size-control/index.js.map +1 -1
  37. package/build/components/inserter/index.js +29 -17
  38. package/build/components/inserter/index.js.map +1 -1
  39. package/build/components/inserter/menu.js +1 -1
  40. package/build/components/inserter/menu.js.map +1 -1
  41. package/build/components/inserter/quick-inserter.js +4 -2
  42. package/build/components/inserter/quick-inserter.js.map +1 -1
  43. package/build/components/inserter/search-results.js +10 -3
  44. package/build/components/inserter/search-results.js.map +1 -1
  45. package/build/components/inserter/tabs.js +1 -1
  46. package/build/components/inserter/tabs.js.map +1 -1
  47. package/build/components/inspector-controls-tabs/position-controls-panel.js +43 -7
  48. package/build/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  49. package/build/components/line-height-control/index.js +15 -1
  50. package/build/components/line-height-control/index.js.map +1 -1
  51. package/build/components/link-control/index.js +1 -1
  52. package/build/components/link-control/index.js.map +1 -1
  53. package/build/components/link-control/search-item.js +5 -2
  54. package/build/components/link-control/search-item.js.map +1 -1
  55. package/build/components/list-view/appender.js +105 -0
  56. package/build/components/list-view/appender.js.map +1 -0
  57. package/build/components/list-view/block.js +5 -5
  58. package/build/components/list-view/block.js.map +1 -1
  59. package/build/components/list-view/branch.js +25 -5
  60. package/build/components/list-view/branch.js.map +1 -1
  61. package/build/components/list-view/index.js +37 -13
  62. package/build/components/list-view/index.js.map +1 -1
  63. package/build/components/list-view/use-block-selection.js +1 -2
  64. package/build/components/list-view/use-block-selection.js.map +1 -1
  65. package/build/components/media-replace-flow/index.js +13 -4
  66. package/build/components/media-replace-flow/index.js.map +1 -1
  67. package/build/components/off-canvas-editor/appender.js +28 -3
  68. package/build/components/off-canvas-editor/appender.js.map +1 -1
  69. package/build/components/off-canvas-editor/branch.js +5 -3
  70. package/build/components/off-canvas-editor/branch.js.map +1 -1
  71. package/build/components/off-canvas-editor/index.js +9 -7
  72. package/build/components/off-canvas-editor/index.js.map +1 -1
  73. package/build/components/off-canvas-editor/link-ui.js +0 -1
  74. package/build/components/off-canvas-editor/link-ui.js.map +1 -1
  75. package/build/components/provider/use-block-sync.js +17 -3
  76. package/build/components/provider/use-block-sync.js.map +1 -1
  77. package/build/components/rich-text/format-edit.js +2 -30
  78. package/build/components/rich-text/format-edit.js.map +1 -1
  79. package/build/components/rich-text/format-toolbar-container.js +0 -3
  80. package/build/components/rich-text/format-toolbar-container.js.map +1 -1
  81. package/build/components/writing-flow/use-input.js +4 -8
  82. package/build/components/writing-flow/use-input.js.map +1 -1
  83. package/build/hooks/border.js +90 -240
  84. package/build/hooks/border.js.map +1 -1
  85. package/build/hooks/color.js +92 -229
  86. package/build/hooks/color.js.map +1 -1
  87. package/build/hooks/content-lock-ui.js +4 -2
  88. package/build/hooks/content-lock-ui.js.map +1 -1
  89. package/build/hooks/{color-panel.js → contrast-checker.js} +11 -49
  90. package/build/hooks/contrast-checker.js.map +1 -0
  91. package/build/hooks/custom-class-name.js +4 -4
  92. package/build/hooks/custom-class-name.js.map +1 -1
  93. package/build/hooks/custom-class-name.native.js +3 -4
  94. package/build/hooks/custom-class-name.native.js.map +1 -1
  95. package/build/hooks/dimensions.js +0 -1
  96. package/build/hooks/dimensions.js.map +1 -1
  97. package/build/hooks/duotone.js +3 -1
  98. package/build/hooks/duotone.js.map +1 -1
  99. package/build/hooks/layout.js +19 -22
  100. package/build/hooks/layout.js.map +1 -1
  101. package/build/hooks/position.js +2 -2
  102. package/build/hooks/position.js.map +1 -1
  103. package/build/hooks/style.js +23 -26
  104. package/build/hooks/style.js.map +1 -1
  105. package/build/hooks/supports.js +7 -1
  106. package/build/hooks/supports.js.map +1 -1
  107. package/build/hooks/typography.js +2 -2
  108. package/build/hooks/typography.js.map +1 -1
  109. package/build/hooks/utils.js +50 -75
  110. package/build/hooks/utils.js.map +1 -1
  111. package/build/layouts/constrained.js +6 -2
  112. package/build/layouts/constrained.js.map +1 -1
  113. package/build/layouts/grid.js +165 -0
  114. package/build/layouts/grid.js.map +1 -0
  115. package/build/layouts/index.js +3 -1
  116. package/build/layouts/index.js.map +1 -1
  117. package/build/private-apis.js +7 -1
  118. package/build/private-apis.js.map +1 -1
  119. package/build/store/actions.js +10 -8
  120. package/build/store/actions.js.map +1 -1
  121. package/build/store/selectors.js +19 -3
  122. package/build/store/selectors.js.map +1 -1
  123. package/build/utils/object.js +76 -0
  124. package/build/utils/object.js.map +1 -0
  125. package/build/utils/parse-css-unit-to-px.js +15 -9
  126. package/build/utils/parse-css-unit-to-px.js.map +1 -1
  127. package/build-module/components/block-list/block-html.js +1 -3
  128. package/build-module/components/block-list/block-html.js.map +1 -1
  129. package/build-module/components/block-list/block-invalid-warning.js +66 -78
  130. package/build-module/components/block-list/block-invalid-warning.js.map +1 -1
  131. package/build-module/components/block-preview/auto.js +6 -22
  132. package/build-module/components/block-preview/auto.js.map +1 -1
  133. package/build-module/components/block-settings-menu-controls/index.js +1 -1
  134. package/build-module/components/block-settings-menu-controls/index.js.map +1 -1
  135. package/build-module/components/block-switcher/block-transformations-menu.native.js +1 -0
  136. package/build-module/components/block-switcher/block-transformations-menu.native.js.map +1 -1
  137. package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js +6 -3
  138. package/build-module/components/convert-to-group-buttons/use-convert-to-group-button-props.js.map +1 -1
  139. package/build-module/components/editor-styles/index.js +19 -2
  140. package/build-module/components/editor-styles/index.js.map +1 -1
  141. package/build-module/components/global-styles/border-panel.js +291 -0
  142. package/build-module/components/global-styles/border-panel.js.map +1 -0
  143. package/build-module/components/global-styles/color-panel.js +554 -0
  144. package/build-module/components/global-styles/color-panel.js.map +1 -0
  145. package/build-module/components/global-styles/dimensions-panel.js +7 -30
  146. package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
  147. package/build-module/components/global-styles/get-block-css-selector.js +120 -0
  148. package/build-module/components/global-styles/get-block-css-selector.js.map +1 -0
  149. package/build-module/components/global-styles/hooks.js +104 -3
  150. package/build-module/components/global-styles/hooks.js.map +1 -1
  151. package/build-module/components/global-styles/index.js +3 -0
  152. package/build-module/components/global-styles/index.js.map +1 -1
  153. package/build-module/components/global-styles/typography-panel.js +65 -46
  154. package/build-module/components/global-styles/typography-panel.js.map +1 -1
  155. package/build-module/components/global-styles/use-global-styles-output.js +181 -100
  156. package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
  157. package/build-module/components/global-styles/utils.js +2 -1
  158. package/build-module/components/global-styles/utils.js.map +1 -1
  159. package/build-module/components/image-size-control/index.js +8 -5
  160. package/build-module/components/image-size-control/index.js.map +1 -1
  161. package/build-module/components/inserter/index.js +28 -16
  162. package/build-module/components/inserter/index.js.map +1 -1
  163. package/build-module/components/inserter/menu.js +1 -1
  164. package/build-module/components/inserter/menu.js.map +1 -1
  165. package/build-module/components/inserter/quick-inserter.js +4 -2
  166. package/build-module/components/inserter/quick-inserter.js.map +1 -1
  167. package/build-module/components/inserter/search-results.js +10 -3
  168. package/build-module/components/inserter/search-results.js.map +1 -1
  169. package/build-module/components/inserter/tabs.js +1 -1
  170. package/build-module/components/inserter/tabs.js.map +1 -1
  171. package/build-module/components/inspector-controls-tabs/position-controls-panel.js +42 -7
  172. package/build-module/components/inspector-controls-tabs/position-controls-panel.js.map +1 -1
  173. package/build-module/components/line-height-control/index.js +15 -1
  174. package/build-module/components/line-height-control/index.js.map +1 -1
  175. package/build-module/components/link-control/index.js +1 -1
  176. package/build-module/components/link-control/index.js.map +1 -1
  177. package/build-module/components/link-control/search-item.js +4 -2
  178. package/build-module/components/link-control/search-item.js.map +1 -1
  179. package/build-module/components/list-view/appender.js +88 -0
  180. package/build-module/components/list-view/appender.js.map +1 -0
  181. package/build-module/components/list-view/block.js +5 -4
  182. package/build-module/components/list-view/block.js.map +1 -1
  183. package/build-module/components/list-view/branch.js +22 -5
  184. package/build-module/components/list-view/branch.js.map +1 -1
  185. package/build-module/components/list-view/index.js +32 -12
  186. package/build-module/components/list-view/index.js.map +1 -1
  187. package/build-module/components/list-view/use-block-selection.js +1 -2
  188. package/build-module/components/list-view/use-block-selection.js.map +1 -1
  189. package/build-module/components/media-replace-flow/index.js +12 -4
  190. package/build-module/components/media-replace-flow/index.js.map +1 -1
  191. package/build-module/components/off-canvas-editor/appender.js +28 -4
  192. package/build-module/components/off-canvas-editor/appender.js.map +1 -1
  193. package/build-module/components/off-canvas-editor/branch.js +5 -3
  194. package/build-module/components/off-canvas-editor/branch.js.map +1 -1
  195. package/build-module/components/off-canvas-editor/index.js +9 -7
  196. package/build-module/components/off-canvas-editor/index.js.map +1 -1
  197. package/build-module/components/off-canvas-editor/link-ui.js +0 -1
  198. package/build-module/components/off-canvas-editor/link-ui.js.map +1 -1
  199. package/build-module/components/provider/use-block-sync.js +17 -3
  200. package/build-module/components/provider/use-block-sync.js.map +1 -1
  201. package/build-module/components/rich-text/format-edit.js +3 -31
  202. package/build-module/components/rich-text/format-edit.js.map +1 -1
  203. package/build-module/components/rich-text/format-toolbar-container.js +0 -3
  204. package/build-module/components/rich-text/format-toolbar-container.js.map +1 -1
  205. package/build-module/components/writing-flow/use-input.js +4 -8
  206. package/build-module/components/writing-flow/use-input.js.map +1 -1
  207. package/build-module/hooks/border.js +92 -240
  208. package/build-module/hooks/border.js.map +1 -1
  209. package/build-module/hooks/color.js +90 -232
  210. package/build-module/hooks/color.js.map +1 -1
  211. package/build-module/hooks/content-lock-ui.js +4 -2
  212. package/build-module/hooks/content-lock-ui.js.map +1 -1
  213. package/build-module/hooks/{color-panel.js → contrast-checker.js} +10 -44
  214. package/build-module/hooks/contrast-checker.js.map +1 -0
  215. package/build-module/hooks/custom-class-name.js +4 -4
  216. package/build-module/hooks/custom-class-name.js.map +1 -1
  217. package/build-module/hooks/custom-class-name.native.js +3 -4
  218. package/build-module/hooks/custom-class-name.native.js.map +1 -1
  219. package/build-module/hooks/dimensions.js +0 -1
  220. package/build-module/hooks/dimensions.js.map +1 -1
  221. package/build-module/hooks/duotone.js +4 -2
  222. package/build-module/hooks/duotone.js.map +1 -1
  223. package/build-module/hooks/layout.js +19 -22
  224. package/build-module/hooks/layout.js.map +1 -1
  225. package/build-module/hooks/position.js +3 -3
  226. package/build-module/hooks/position.js.map +1 -1
  227. package/build-module/hooks/style.js +23 -26
  228. package/build-module/hooks/style.js.map +1 -1
  229. package/build-module/hooks/supports.js +7 -1
  230. package/build-module/hooks/supports.js.map +1 -1
  231. package/build-module/hooks/typography.js +2 -2
  232. package/build-module/hooks/typography.js.map +1 -1
  233. package/build-module/hooks/utils.js +48 -72
  234. package/build-module/hooks/utils.js.map +1 -1
  235. package/build-module/layouts/constrained.js +6 -2
  236. package/build-module/layouts/constrained.js.map +1 -1
  237. package/build-module/layouts/grid.js +151 -0
  238. package/build-module/layouts/grid.js.map +1 -0
  239. package/build-module/layouts/index.js +2 -1
  240. package/build-module/layouts/index.js.map +1 -1
  241. package/build-module/private-apis.js +5 -1
  242. package/build-module/private-apis.js.map +1 -1
  243. package/build-module/store/actions.js +10 -8
  244. package/build-module/store/actions.js.map +1 -1
  245. package/build-module/store/selectors.js +17 -3
  246. package/build-module/store/selectors.js.map +1 -1
  247. package/build-module/utils/object.js +69 -0
  248. package/build-module/utils/object.js.map +1 -0
  249. package/build-module/utils/parse-css-unit-to-px.js +15 -9
  250. package/build-module/utils/parse-css-unit-to-px.js.map +1 -1
  251. package/build-style/style-rtl.css +32 -12
  252. package/build-style/style.css +32 -12
  253. package/package.json +31 -31
  254. package/src/components/block-draggable/content.scss +1 -1
  255. package/src/components/block-inspector/style.scss +3 -0
  256. package/src/components/block-list/block-html.js +1 -1
  257. package/src/components/block-list/block-invalid-warning.js +72 -64
  258. package/src/components/block-mover/test/__snapshots__/index.native.js.snap +20 -2
  259. package/src/components/block-preview/auto.js +2 -17
  260. package/src/components/block-preview/test/index.js +0 -2
  261. package/src/components/block-settings-menu-controls/index.js +2 -1
  262. package/src/components/block-styles/style.scss +2 -2
  263. package/src/components/block-switcher/block-transformations-menu.native.js +1 -0
  264. package/src/components/color-palette/test/__snapshots__/control.js.snap +16 -14
  265. package/src/components/colors-gradients/style.scss +8 -8
  266. package/src/components/convert-to-group-buttons/use-convert-to-group-button-props.js +48 -38
  267. package/src/components/editor-styles/index.js +29 -1
  268. package/src/components/global-styles/border-panel.js +285 -0
  269. package/src/components/global-styles/color-panel.js +706 -0
  270. package/src/components/global-styles/dimensions-panel.js +13 -42
  271. package/src/components/global-styles/get-block-css-selector.js +129 -0
  272. package/src/components/global-styles/hooks.js +154 -1
  273. package/src/components/global-styles/index.js +3 -0
  274. package/src/components/global-styles/test/use-global-styles-output.js +31 -2
  275. package/src/components/global-styles/typography-panel.js +67 -45
  276. package/src/components/global-styles/use-global-styles-output.js +176 -93
  277. package/src/components/global-styles/utils.js +3 -0
  278. package/src/components/image-size-control/index.js +4 -3
  279. package/src/components/image-size-control/test/index.js +2 -2
  280. package/src/components/inner-blocks/README.md +1 -1
  281. package/src/components/inserter/index.js +30 -11
  282. package/src/components/inserter/menu.js +0 -1
  283. package/src/components/inserter/quick-inserter.js +2 -0
  284. package/src/components/inserter/search-results.js +7 -1
  285. package/src/components/inserter/style.scss +3 -0
  286. package/src/components/inserter/tabs.js +1 -9
  287. package/src/components/inspector-controls-tabs/position-controls-panel.js +40 -9
  288. package/src/components/line-height-control/index.js +10 -1
  289. package/src/components/link-control/index.js +1 -1
  290. package/src/components/link-control/search-item.js +3 -1
  291. package/src/components/link-control/style.scss +0 -4
  292. package/src/components/link-control/test/index.js +0 -2
  293. package/src/components/list-view/appender.js +101 -0
  294. package/src/components/list-view/block.js +5 -4
  295. package/src/components/list-view/branch.js +30 -1
  296. package/src/components/list-view/index.js +43 -10
  297. package/src/components/list-view/style.scss +19 -0
  298. package/src/components/list-view/use-block-selection.js +0 -2
  299. package/src/components/media-replace-flow/index.js +36 -24
  300. package/src/components/media-replace-flow/style.scss +5 -2
  301. package/src/components/off-canvas-editor/appender.js +31 -5
  302. package/src/components/off-canvas-editor/branch.js +3 -1
  303. package/src/components/off-canvas-editor/index.js +7 -7
  304. package/src/components/off-canvas-editor/link-ui.js +0 -1
  305. package/src/components/provider/use-block-sync.js +21 -4
  306. package/src/components/rich-text/format-edit.js +2 -32
  307. package/src/components/rich-text/format-toolbar-container.js +1 -7
  308. package/src/components/url-popover/test/index.js +0 -2
  309. package/src/components/writing-flow/use-input.js +4 -5
  310. package/src/hooks/border.js +93 -225
  311. package/src/hooks/color.js +120 -296
  312. package/src/hooks/content-lock-ui.js +6 -2
  313. package/src/hooks/{color-panel.js → contrast-checker.js} +10 -46
  314. package/src/hooks/custom-class-name.js +4 -4
  315. package/src/hooks/custom-class-name.native.js +3 -4
  316. package/src/hooks/dimensions.js +0 -1
  317. package/src/hooks/duotone.js +8 -5
  318. package/src/hooks/layout.js +19 -16
  319. package/src/hooks/position.js +3 -3
  320. package/src/hooks/style.js +29 -28
  321. package/src/hooks/supports.js +6 -0
  322. package/src/hooks/test/style.js +2 -1
  323. package/src/hooks/test/use-typography-props.js +2 -0
  324. package/src/hooks/test/utils.js +0 -104
  325. package/src/hooks/typography.js +2 -1
  326. package/src/hooks/utils.js +63 -70
  327. package/src/layouts/constrained.js +23 -17
  328. package/src/layouts/grid.js +172 -0
  329. package/src/layouts/index.js +2 -1
  330. package/src/layouts/test/grid.js +21 -0
  331. package/src/private-apis.js +4 -0
  332. package/src/store/actions.js +10 -8
  333. package/src/store/selectors.js +20 -3
  334. package/src/utils/object.js +69 -0
  335. package/src/utils/parse-css-unit-to-px.js +14 -9
  336. package/src/utils/test/object.js +107 -0
  337. package/src/utils/test/parse-css-unit-to-px.js +1 -2
  338. package/tsconfig.tsbuildinfo +1 -1
  339. package/build/hooks/border-radius.js +0 -100
  340. package/build/hooks/border-radius.js.map +0 -1
  341. package/build/hooks/color-panel.js.map +0 -1
  342. package/build-module/hooks/border-radius.js +0 -84
  343. package/build-module/hooks/border-radius.js.map +0 -1
  344. package/build-module/hooks/color-panel.js.map +0 -1
  345. package/src/hooks/border-radius.js +0 -70
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import {
5
5
  FontSizePicker,
6
+ __experimentalNumberControl as NumberControl,
6
7
  __experimentalToolsPanel as ToolsPanel,
7
8
  __experimentalToolsPanelItem as ToolsPanelItem,
8
9
  } from '@wordpress/components';
@@ -19,6 +20,10 @@ import LetterSpacingControl from '../letter-spacing-control';
19
20
  import TextTransformControl from '../text-transform-control';
20
21
  import TextDecorationControl from '../text-decoration-control';
21
22
  import { getValueFromVariable } from './utils';
23
+ import { immutableSet } from '../../utils/object';
24
+
25
+ const MIN_TEXT_COLUMNS = 1;
26
+ const MAX_TEXT_COLUMNS = 6;
22
27
 
23
28
  export function useHasTypographyPanel( settings ) {
24
29
  const hasFontFamily = useHasFontFamilyControl( settings );
@@ -27,6 +32,7 @@ export function useHasTypographyPanel( settings ) {
27
32
  const hasLetterSpacing = useHasLetterSpacingControl( settings );
28
33
  const hasTextTransform = useHasTextTransformControl( settings );
29
34
  const hasTextDecoration = useHasTextDecorationControl( settings );
35
+ const hasTextColumns = useHasTextColumnsControl( settings );
30
36
  const hasFontSize = useHasFontSizeControl( settings );
31
37
 
32
38
  return (
@@ -36,7 +42,8 @@ export function useHasTypographyPanel( settings ) {
36
42
  hasLetterSpacing ||
37
43
  hasTextTransform ||
38
44
  hasFontSize ||
39
- hasTextDecoration
45
+ hasTextDecoration ||
46
+ hasTextColumns
40
47
  );
41
48
  }
42
49
 
@@ -93,6 +100,10 @@ function useHasTextDecorationControl( settings ) {
93
100
  return settings?.typography?.textDecoration;
94
101
  }
95
102
 
103
+ function useHasTextColumnsControl( settings ) {
104
+ return settings?.typography?.textColumns;
105
+ }
106
+
96
107
  function TypographyToolsPanel( {
97
108
  resetAllFilter,
98
109
  onChange,
@@ -124,6 +135,7 @@ const DEFAULT_CONTROLS = {
124
135
  letterSpacing: true,
125
136
  textTransform: true,
126
137
  textDecoration: true,
138
+ textColumns: true,
127
139
  };
128
140
 
129
141
  export default function TypographyPanel( {
@@ -150,15 +162,13 @@ export default function TypographyPanel( {
150
162
  const slug = fontFamilies?.find(
151
163
  ( { fontFamily: f } ) => f === newValue
152
164
  )?.slug;
153
- onChange( {
154
- ...value,
155
- typography: {
156
- ...value?.typography,
157
- fontFamily: slug
158
- ? `var:preset|font-family|${ slug }`
159
- : newValue,
160
- },
161
- } );
165
+ onChange(
166
+ immutableSet(
167
+ value,
168
+ [ 'typography', 'fontFamily' ],
169
+ slug ? `var:preset|font-family|${ slug }` : newValue
170
+ )
171
+ );
162
172
  };
163
173
  const hasFontFamily = () => !! value?.typography?.fontFamily;
164
174
  const resetFontFamily = () => setFontFamily( undefined );
@@ -177,13 +187,9 @@ export default function TypographyPanel( {
177
187
  ? `var:preset|font-size|${ metadata?.slug }`
178
188
  : newValue;
179
189
 
180
- onChange( {
181
- ...value,
182
- typography: {
183
- ...value?.typography,
184
- fontSize: actualValue,
185
- },
186
- } );
190
+ onChange(
191
+ immutableSet( value, [ 'typography', 'fontSize' ], actualValue )
192
+ );
187
193
  };
188
194
  const hasFontSize = () => !! value?.typography?.fontSize;
189
195
  const resetFontSize = () => setFontSize( undefined );
@@ -218,13 +224,9 @@ export default function TypographyPanel( {
218
224
  const hasLineHeightEnabled = useHasLineHeightControl( settings );
219
225
  const lineHeight = decodeValue( inheritedValue?.typography?.lineHeight );
220
226
  const setLineHeight = ( newValue ) => {
221
- onChange( {
222
- ...value,
223
- typography: {
224
- ...value?.typography,
225
- lineHeight: newValue,
226
- },
227
- } );
227
+ onChange(
228
+ immutableSet( value, [ 'typography', 'lineHeight' ], newValue )
229
+ );
228
230
  };
229
231
  const hasLineHeight = () => !! value?.typography?.lineHeight;
230
232
  const resetLineHeight = () => setLineHeight( undefined );
@@ -235,30 +237,33 @@ export default function TypographyPanel( {
235
237
  inheritedValue?.typography?.letterSpacing
236
238
  );
237
239
  const setLetterSpacing = ( newValue ) => {
238
- onChange( {
239
- ...value,
240
- typography: {
241
- ...value?.typography,
242
- letterSpacing: newValue,
243
- },
244
- } );
240
+ onChange(
241
+ immutableSet( value, [ 'typography', 'letterSpacing' ], newValue )
242
+ );
245
243
  };
246
244
  const hasLetterSpacing = () => !! value?.typography?.letterSpacing;
247
245
  const resetLetterSpacing = () => setLetterSpacing( undefined );
248
246
 
247
+ // Text Columns
248
+ const hasTextColumnsControl = useHasTextColumnsControl( settings );
249
+ const textColumns = decodeValue( inheritedValue?.typography?.textColumns );
250
+ const setTextColumns = ( newValue ) => {
251
+ onChange(
252
+ immutableSet( value, [ 'typography', 'textColumns' ], newValue )
253
+ );
254
+ };
255
+ const hasTextColumns = () => !! value?.typography?.textColumns;
256
+ const resetTextColumns = () => setTextColumns( undefined );
257
+
249
258
  // Text Transform
250
259
  const hasTextTransformControl = useHasTextTransformControl( settings );
251
260
  const textTransform = decodeValue(
252
261
  inheritedValue?.typography?.textTransform
253
262
  );
254
263
  const setTextTransform = ( newValue ) => {
255
- onChange( {
256
- ...value,
257
- typography: {
258
- ...value?.typography,
259
- textTransform: newValue,
260
- },
261
- } );
264
+ onChange(
265
+ immutableSet( value, [ 'typography', 'textTransform' ], newValue )
266
+ );
262
267
  };
263
268
  const hasTextTransform = () => !! value?.typography?.textTransform;
264
269
  const resetTextTransform = () => setTextTransform( undefined );
@@ -269,13 +274,9 @@ export default function TypographyPanel( {
269
274
  inheritedValue?.typography?.textDecoration
270
275
  );
271
276
  const setTextDecoration = ( newValue ) => {
272
- onChange( {
273
- ...value,
274
- typography: {
275
- ...value?.typography,
276
- textDecoration: newValue,
277
- },
278
- } );
277
+ onChange(
278
+ immutableSet( value, [ 'typography', 'textDecoration' ], newValue )
279
+ );
279
280
  };
280
281
  const hasTextDecoration = () => !! value?.typography?.textDecoration;
281
282
  const resetTextDecoration = () => setTextDecoration( undefined );
@@ -388,6 +389,27 @@ export default function TypographyPanel( {
388
389
  />
389
390
  </ToolsPanelItem>
390
391
  ) }
392
+ { hasTextColumnsControl && (
393
+ <ToolsPanelItem
394
+ className="single-column"
395
+ label={ __( 'Text columns' ) }
396
+ hasValue={ hasTextColumns }
397
+ onDeselect={ resetTextColumns }
398
+ isShownByDefault={ defaultControls.textColumns }
399
+ panelId={ panelId }
400
+ >
401
+ <NumberControl
402
+ label={ __( 'Text columns' ) }
403
+ max={ MAX_TEXT_COLUMNS }
404
+ min={ MIN_TEXT_COLUMNS }
405
+ onChange={ setTextColumns }
406
+ size="__unstable-large"
407
+ spinControls="custom"
408
+ value={ textColumns }
409
+ initialPosition={ 1 }
410
+ />
411
+ </ToolsPanelItem>
412
+ ) }
391
413
  { hasTextDecorationControl && (
392
414
  <ToolsPanelItem
393
415
  className="single-column"
@@ -13,13 +13,14 @@ import {
13
13
  store as blocksStore,
14
14
  } from '@wordpress/blocks';
15
15
  import { useSelect } from '@wordpress/data';
16
- import { useContext, useMemo } from '@wordpress/element';
16
+ import { renderToString, useContext, useMemo } from '@wordpress/element';
17
17
  import { getCSSRules } from '@wordpress/style-engine';
18
18
 
19
19
  /**
20
20
  * Internal dependencies
21
21
  */
22
22
  import { PRESET_METADATA, ROOT_BLOCK_SELECTOR, scopeSelector } from './utils';
23
+ import { getBlockCSSSelector } from './get-block-css-selector';
23
24
  import { getTypographyFontSizeValue } from './typography-utils';
24
25
  import { GlobalStylesContext } from './context';
25
26
  import { useGlobalSetting } from './hooks';
@@ -95,11 +96,11 @@ function getPresetsDeclarations( blockPresets = {}, mergedSettings ) {
95
96
  /**
96
97
  * Transform given preset tree into a set of preset class declarations.
97
98
  *
98
- * @param {string} blockSelector
99
- * @param {Object} blockPresets
99
+ * @param {?string} blockSelector
100
+ * @param {Object} blockPresets
100
101
  * @return {string} CSS declarations for the preset classes.
101
102
  */
102
- function getPresetsClasses( blockSelector, blockPresets = {} ) {
103
+ function getPresetsClasses( blockSelector = '*', blockPresets = {} ) {
103
104
  return PRESET_METADATA.reduce(
104
105
  ( declarations, { path, cssVarInfix, classes } ) => {
105
106
  if ( ! classes ) {
@@ -144,13 +145,16 @@ function getPresetsSvgFilters( blockPresets = {} ) {
144
145
  return [ 'default', 'theme' ]
145
146
  .filter( ( origin ) => presetByOrigin[ origin ] )
146
147
  .flatMap( ( origin ) =>
147
- presetByOrigin[ origin ].map( ( preset ) => (
148
- <PresetDuotoneFilter
149
- preset={ preset }
150
- key={ preset.slug }
151
- />
152
- ) )
153
- );
148
+ presetByOrigin[ origin ].map( ( preset ) =>
149
+ renderToString(
150
+ <PresetDuotoneFilter
151
+ preset={ preset }
152
+ key={ preset.slug }
153
+ />
154
+ )
155
+ )
156
+ )
157
+ .join( '' );
154
158
  } );
155
159
  }
156
160
 
@@ -193,6 +197,89 @@ function concatFeatureVariationSelectorString(
193
197
  return combinedSelectors.join( ', ' );
194
198
  }
195
199
 
200
+ /**
201
+ * Generate style declarations for a block's custom feature and subfeature
202
+ * selectors.
203
+ *
204
+ * NOTE: The passed `styles` object will be mutated by this function.
205
+ *
206
+ * @param {Object} selectors Custom selectors object for a block.
207
+ * @param {Object} styles A block's styles object.
208
+ *
209
+ * @return {Object} Style declarations.
210
+ */
211
+ const getFeatureDeclarations = ( selectors, styles ) => {
212
+ const declarations = {};
213
+
214
+ Object.entries( selectors ).forEach( ( [ feature, selector ] ) => {
215
+ // We're only processing features/subfeatures that have styles.
216
+ if ( feature === 'root' || ! styles?.[ feature ] ) {
217
+ return;
218
+ }
219
+
220
+ const isShorthand = typeof selector === 'string';
221
+
222
+ // If we have a selector object instead of shorthand process it.
223
+ if ( ! isShorthand ) {
224
+ Object.entries( selector ).forEach(
225
+ ( [ subfeature, subfeatureSelector ] ) => {
226
+ // Don't process root feature selector yet or any
227
+ // subfeature that doesn't have a style.
228
+ if (
229
+ subfeature === 'root' ||
230
+ ! styles?.[ feature ][ subfeature ]
231
+ ) {
232
+ return;
233
+ }
234
+
235
+ // Create a temporary styles object and build
236
+ // declarations for subfeature.
237
+ const subfeatureStyles = {
238
+ [ feature ]: {
239
+ [ subfeature ]: styles[ feature ][ subfeature ],
240
+ },
241
+ };
242
+ const newDeclarations =
243
+ getStylesDeclarations( subfeatureStyles );
244
+
245
+ // Merge new declarations in with any others that
246
+ // share the same selector.
247
+ declarations[ subfeatureSelector ] = [
248
+ ...( declarations[ subfeatureSelector ] || [] ),
249
+ ...newDeclarations,
250
+ ];
251
+
252
+ // Remove the subfeature's style now it will be
253
+ // included under its own selector not the block's.
254
+ delete styles[ feature ][ subfeature ];
255
+ }
256
+ );
257
+ }
258
+
259
+ // Now subfeatures have been processed and removed, we can
260
+ // process root, or shorthand, feature selectors.
261
+ if ( isShorthand || selector.root ) {
262
+ const featureSelector = isShorthand ? selector : selector.root;
263
+
264
+ // Create temporary style object and build declarations for feature.
265
+ const featureStyles = { [ feature ]: styles[ feature ] };
266
+ const newDeclarations = getStylesDeclarations( featureStyles );
267
+
268
+ // Merge new declarations with any others that share the selector.
269
+ declarations[ featureSelector ] = [
270
+ ...( declarations[ featureSelector ] || [] ),
271
+ ...newDeclarations,
272
+ ];
273
+
274
+ // Remove the feature from the block's styles now as it will be
275
+ // included under its own selector not the block's.
276
+ delete styles[ feature ];
277
+ }
278
+ } );
279
+
280
+ return declarations;
281
+ };
282
+
196
283
  /**
197
284
  * Transform given style tree into a set of style declarations.
198
285
  *
@@ -399,7 +486,7 @@ export function getLayoutStyles( {
399
486
  ? `${ selector } .${ className }${
400
487
  spacingStyle?.selector || ''
401
488
  }`
402
- : `${ selector }.${ className }${
489
+ : `${ selector }-${ className }${ selector }-${ className }${
403
490
  spacingStyle?.selector || ''
404
491
  }`;
405
492
  }
@@ -496,9 +583,9 @@ export const getNodesWithStyles = ( tree, blockSelectors ) => {
496
583
  }
497
584
 
498
585
  Object.entries( ELEMENTS ).forEach( ( [ name, selector ] ) => {
499
- if ( !! tree.styles?.elements[ name ] ) {
586
+ if ( !! tree.styles?.elements?.[ name ] ) {
500
587
  nodes.push( {
501
- styles: tree.styles?.elements[ name ],
588
+ styles: tree.styles?.elements?.[ name ],
502
589
  selector,
503
590
  } );
504
591
  }
@@ -529,7 +616,7 @@ export const getNodesWithStyles = ( tree, blockSelectors ) => {
529
616
  blockSelectors[ blockName ].fallbackGapValue,
530
617
  hasLayoutSupport:
531
618
  blockSelectors[ blockName ].hasLayoutSupport,
532
- selector: blockSelectors[ blockName ].selector,
619
+ selector: blockSelectors[ blockName ]?.selector,
533
620
  styles: blockStyles,
534
621
  featureSelectors:
535
622
  blockSelectors[ blockName ].featureSelectors,
@@ -547,7 +634,7 @@ export const getNodesWithStyles = ( tree, blockSelectors ) => {
547
634
  ) {
548
635
  nodes.push( {
549
636
  styles: value,
550
- selector: blockSelectors[ blockName ].selector
637
+ selector: blockSelectors[ blockName ]?.selector
551
638
  .split( ',' )
552
639
  .map( ( sel ) => {
553
640
  const elementSelectors =
@@ -606,7 +693,7 @@ export const getNodesWithSettings = ( tree, blockSelectors ) => {
606
693
  nodes.push( {
607
694
  presets: blockPresets,
608
695
  custom: blockCustom,
609
- selector: blockSelectors[ blockName ].selector,
696
+ selector: blockSelectors[ blockName ]?.selector,
610
697
  } );
611
698
  }
612
699
  }
@@ -692,23 +779,16 @@ export const toStyles = (
692
779
  // Process styles for block support features with custom feature level
693
780
  // CSS selectors set.
694
781
  if ( featureSelectors ) {
695
- Object.entries( featureSelectors ).forEach(
696
- ( [ featureName, featureSelector ] ) => {
697
- if ( styles?.[ featureName ] ) {
698
- const featureStyles = {
699
- [ featureName ]: styles[ featureName ],
700
- };
701
- const featureDeclarations =
702
- getStylesDeclarations( featureStyles );
703
- delete styles[ featureName ];
704
-
705
- if ( !! featureDeclarations.length ) {
706
- ruleset =
707
- ruleset +
708
- `${ featureSelector }{${ featureDeclarations.join(
709
- ';'
710
- ) } }`;
711
- }
782
+ const featureDeclarations = getFeatureDeclarations(
783
+ featureSelectors,
784
+ styles
785
+ );
786
+
787
+ Object.entries( featureDeclarations ).forEach(
788
+ ( [ cssSelector, declarations ] ) => {
789
+ if ( !! declarations.length ) {
790
+ const rules = declarations.join( ';' );
791
+ ruleset = ruleset + `${ cssSelector }{${ rules }}`;
712
792
  }
713
793
  }
714
794
  );
@@ -720,43 +800,32 @@ export const toStyles = (
720
800
  if ( styles?.variations?.[ styleVariationName ] ) {
721
801
  // If the block uses any custom selectors for block support, add those first.
722
802
  if ( featureSelectors ) {
723
- Object.entries( featureSelectors ).forEach(
724
- ( [ featureName, featureSelector ] ) => {
725
- if (
726
- styles?.variations?.[
727
- styleVariationName
728
- ]?.[ featureName ]
729
- ) {
730
- const featureStyles = {
731
- [ featureName ]:
732
- styles.variations[
733
- styleVariationName
734
- ][ featureName ],
735
- };
736
- const featureDeclarations =
737
- getStylesDeclarations(
738
- featureStyles
803
+ const featureDeclarations =
804
+ getFeatureDeclarations(
805
+ featureSelectors,
806
+ styles?.variations?.[
807
+ styleVariationName
808
+ ]
809
+ );
810
+
811
+ Object.entries( featureDeclarations ).forEach(
812
+ ( [ baseSelector, declarations ] ) => {
813
+ if ( !! declarations.length ) {
814
+ const cssSelector =
815
+ concatFeatureVariationSelectorString(
816
+ baseSelector,
817
+ styleVariationSelector
739
818
  );
740
- delete styles.variations[
741
- styleVariationName
742
- ][ featureName ];
743
-
744
- if (
745
- !! featureDeclarations.length
746
- ) {
747
- ruleset =
748
- ruleset +
749
- `${ concatFeatureVariationSelectorString(
750
- featureSelector,
751
- styleVariationSelector
752
- ) }{${ featureDeclarations.join(
753
- ';'
754
- ) } }`;
755
- }
819
+ const rules =
820
+ declarations.join( ';' );
821
+ ruleset =
822
+ ruleset +
823
+ `${ cssSelector }{${ rules }}`;
756
824
  }
757
825
  }
758
826
  );
759
827
  }
828
+
760
829
  // Otherwise add regular selectors.
761
830
  const styleVariationDeclarations =
762
831
  getStylesDeclarations(
@@ -907,15 +976,37 @@ export function toSvgFilters( tree, blockSelectors ) {
907
976
  } );
908
977
  }
909
978
 
979
+ const getSelectorsConfig = ( blockType, rootSelector ) => {
980
+ if ( ! isEmpty( blockType?.selectors ) ) {
981
+ return blockType.selectors;
982
+ }
983
+
984
+ const config = { root: rootSelector };
985
+ Object.entries( BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS ).forEach(
986
+ ( [ featureKey, featureName ] ) => {
987
+ const featureSelector = getBlockCSSSelector(
988
+ blockType,
989
+ featureKey
990
+ );
991
+
992
+ if ( featureSelector ) {
993
+ config[ featureName ] = featureSelector;
994
+ }
995
+ }
996
+ );
997
+
998
+ return config;
999
+ };
1000
+
910
1001
  export const getBlockSelectors = ( blockTypes, getBlockStyles ) => {
911
1002
  const result = {};
912
1003
  blockTypes.forEach( ( blockType ) => {
913
1004
  const name = blockType.name;
914
- const selector =
915
- blockType?.supports?.__experimentalSelector ??
916
- '.wp-block-' + name.replace( 'core/', '' ).replace( '/', '-' );
917
- const duotoneSelector =
918
- blockType?.supports?.color?.__experimentalDuotone ?? null;
1005
+ const selector = getBlockCSSSelector( blockType, 'root' );
1006
+ const duotoneSelector = getBlockCSSSelector(
1007
+ blockType,
1008
+ 'filter.duotone'
1009
+ );
919
1010
  const hasLayoutSupport = !! blockType?.supports?.__experimentalLayout;
920
1011
  const fallbackGapValue =
921
1012
  blockType?.supports?.spacing?.blockGap?.__experimentalDefault;
@@ -930,20 +1021,7 @@ export const getBlockSelectors = ( blockTypes, getBlockStyles ) => {
930
1021
  } );
931
1022
  }
932
1023
  // For each block support feature add any custom selectors.
933
- const featureSelectors = {};
934
- Object.entries( BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS ).forEach(
935
- ( [ featureKey, featureName ] ) => {
936
- const featureSelector =
937
- blockType?.supports?.[ featureKey ]?.__experimentalSelector;
938
-
939
- if ( featureSelector ) {
940
- featureSelectors[ featureName ] = scopeSelector(
941
- selector,
942
- featureSelector
943
- );
944
- }
945
- }
946
- );
1024
+ const featureSelectors = getSelectorsConfig( blockType, selector );
947
1025
 
948
1026
  result[ name ] = {
949
1027
  duotoneSelector,
@@ -973,10 +1051,10 @@ export const getBlockSelectors = ( blockTypes, getBlockStyles ) => {
973
1051
  */
974
1052
  function updateConfigWithSeparator( config ) {
975
1053
  const needsSeparatorStyleUpdate =
976
- config.styles?.blocks[ 'core/separator' ] &&
977
- config.styles?.blocks[ 'core/separator' ].color?.background &&
978
- ! config.styles?.blocks[ 'core/separator' ].color?.text &&
979
- ! config.styles?.blocks[ 'core/separator' ].border?.color;
1054
+ config.styles?.blocks?.[ 'core/separator' ] &&
1055
+ config.styles?.blocks?.[ 'core/separator' ].color?.background &&
1056
+ ! config.styles?.blocks?.[ 'core/separator' ].color?.text &&
1057
+ ! config.styles?.blocks?.[ 'core/separator' ].border?.color;
980
1058
  if ( needsSeparatorStyleUpdate ) {
981
1059
  return {
982
1060
  ...config,
@@ -1049,9 +1127,9 @@ export function useGlobalStylesOutput() {
1049
1127
  hasFallbackGapSupport,
1050
1128
  disableLayoutStyles
1051
1129
  );
1130
+ const svgs = toSvgFilters( mergedConfig, blockSelectors );
1052
1131
 
1053
- const filters = toSvgFilters( mergedConfig, blockSelectors );
1054
- const stylesheets = [
1132
+ const styles = [
1055
1133
  {
1056
1134
  css: customProperties,
1057
1135
  isGlobalStyles: true,
@@ -1065,6 +1143,11 @@ export function useGlobalStylesOutput() {
1065
1143
  css: mergedConfig.styles.css ?? '',
1066
1144
  isGlobalStyles: true,
1067
1145
  },
1146
+ {
1147
+ assets: svgs,
1148
+ __unstableType: 'svg',
1149
+ isGlobalStyles: true,
1150
+ },
1068
1151
  ];
1069
1152
 
1070
1153
  // Loop through the blocks to check if there are custom CSS values.
@@ -1073,7 +1156,7 @@ export function useGlobalStylesOutput() {
1073
1156
  getBlockTypes().forEach( ( blockType ) => {
1074
1157
  if ( mergedConfig.styles.blocks[ blockType.name ]?.css ) {
1075
1158
  const selector = blockSelectors[ blockType.name ].selector;
1076
- stylesheets.push( {
1159
+ styles.push( {
1077
1160
  css: processCSSNesting(
1078
1161
  mergedConfig.styles.blocks[ blockType.name ]?.css,
1079
1162
  selector
@@ -1083,7 +1166,7 @@ export function useGlobalStylesOutput() {
1083
1166
  }
1084
1167
  } );
1085
1168
 
1086
- return [ stylesheets, mergedConfig.settings, filters ];
1169
+ return [ styles, mergedConfig.settings ];
1087
1170
  }, [
1088
1171
  hasBlockGapSupport,
1089
1172
  hasFallbackGapSupport,
@@ -16,7 +16,9 @@ export const ROOT_BLOCK_SUPPORTS = [
16
16
  'backgroundColor',
17
17
  'color',
18
18
  'linkColor',
19
+ 'captionColor',
19
20
  'buttonColor',
21
+ 'headingColor',
20
22
  'fontFamily',
21
23
  'fontSize',
22
24
  'fontStyle',
@@ -103,6 +105,7 @@ export const STYLE_PATH_TO_CSS_VAR_INFIX = {
103
105
  'elements.link.typography.fontSize': 'font-size',
104
106
  'elements.button.color.text': 'color',
105
107
  'elements.button.color.background': 'color',
108
+ 'elements.caption.color.text': 'color',
106
109
  'elements.button.typography.fontFamily': 'font-family',
107
110
  'elements.button.typography.fontSize': 'font-size',
108
111
  'elements.heading.color': 'color',
@@ -38,17 +38,16 @@ export default function ImageSizeControl( {
38
38
  { imageSizeOptions && imageSizeOptions.length > 0 && (
39
39
  <SelectControl
40
40
  __nextHasNoMarginBottom
41
- label={ __( 'Image size' ) }
41
+ label={ __( 'Resolution' ) }
42
42
  value={ slug }
43
43
  options={ imageSizeOptions }
44
44
  onChange={ onChangeImage }
45
45
  help={ imageSizeHelp }
46
+ size="__unstable-large"
46
47
  />
47
48
  ) }
48
49
  { isResizable && (
49
50
  <div className="block-editor-image-size-control">
50
- <p>{ __( 'Image dimensions' ) }</p>
51
-
52
51
  <HStack align="baseline" spacing="3">
53
52
  <NumberControl
54
53
  className="block-editor-image-size-control__width"
@@ -58,6 +57,7 @@ export default function ImageSizeControl( {
58
57
  onChange={ ( value ) =>
59
58
  updateDimension( 'width', value )
60
59
  }
60
+ size="__unstable-large"
61
61
  />
62
62
  <NumberControl
63
63
  className="block-editor-image-size-control__height"
@@ -67,6 +67,7 @@ export default function ImageSizeControl( {
67
67
  onChange={ ( value ) =>
68
68
  updateDimension( 'height', value )
69
69
  }
70
+ size="__unstable-large"
70
71
  />
71
72
  </HStack>
72
73
  <HStack>
@@ -334,7 +334,7 @@ describe( 'ImageSizeControl', () => {
334
334
  );
335
335
 
336
336
  expect(
337
- screen.getByRole( 'combobox', { name: 'Image size' } )
337
+ screen.getByRole( 'combobox', { name: 'Resolution' } )
338
338
  ).toHaveValue( 'medium' );
339
339
  } );
340
340
 
@@ -351,7 +351,7 @@ describe( 'ImageSizeControl', () => {
351
351
  );
352
352
 
353
353
  await user.selectOptions(
354
- screen.getByRole( 'combobox', { name: 'Image size' } ),
354
+ screen.getByRole( 'combobox', { name: 'Resolution' } ),
355
355
  'thumbnail'
356
356
  );
357
357
 
@@ -130,7 +130,7 @@ _Options:_
130
130
  - `'insert'` — prevents inserting or removing blocks, but allows moving existing ones.
131
131
  - `false` — prevents locking from being applied to an `InnerBlocks` area even if a parent block contains locking. ( Boolean )
132
132
 
133
- If locking is not set in an `InnerBlocks` area: the locking of the parent `InnerBlocks` area is used. Note that `contentOnly` can't be overriden: it's present, the `templateLock` value of any children is ignored.
133
+ If locking is not set in an `InnerBlocks` area: the locking of the parent `InnerBlocks` area is used. Note that `contentOnly` can't be overridden: it's present, the `templateLock` value of any children is ignored.
134
134
 
135
135
  If the block is a top level block: the locking of the Custom Post Type is used.
136
136