@wordpress/block-editor 15.17.0 → 15.18.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 (276) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/components/autocomplete/index.cjs.map +3 -3
  3. package/build/components/background-image-control/index.cjs +2 -1
  4. package/build/components/background-image-control/index.cjs.map +2 -2
  5. package/build/components/block-allowed-blocks/modal.cjs.map +2 -2
  6. package/build/components/block-bindings/attribute-control.cjs.map +3 -3
  7. package/build/components/block-card/index.cjs +2 -2
  8. package/build/components/block-card/index.cjs.map +3 -3
  9. package/build/components/block-mover/button.cjs +9 -3
  10. package/build/components/block-mover/button.cjs.map +2 -2
  11. package/build/components/block-pattern-setup/index.cjs +3 -2
  12. package/build/components/block-pattern-setup/index.cjs.map +2 -2
  13. package/build/components/block-patterns-list/index.cjs +2 -1
  14. package/build/components/block-patterns-list/index.cjs.map +2 -2
  15. package/build/components/block-patterns-paging/index.cjs.map +3 -3
  16. package/build/components/block-settings-menu/block-settings-dropdown.cjs +2 -2
  17. package/build/components/block-settings-menu/block-settings-dropdown.cjs.map +3 -3
  18. package/build/components/block-settings-menu/index.cjs +2 -2
  19. package/build/components/block-settings-menu/index.cjs.map +3 -3
  20. package/build/components/block-styles/menu-items.cjs.map +3 -3
  21. package/build/components/block-switcher/index.cjs.map +3 -3
  22. package/build/components/block-switcher/pattern-transformations-menu.cjs +2 -1
  23. package/build/components/block-switcher/pattern-transformations-menu.cjs.map +2 -2
  24. package/build/components/block-toolbar/pattern-overrides-dropdown.cjs.map +3 -3
  25. package/build/components/block-variation-transforms/index.cjs +2 -1
  26. package/build/components/block-variation-transforms/index.cjs.map +2 -2
  27. package/build/components/block-visibility/viewport-visibility-info.cjs +4 -4
  28. package/build/components/block-visibility/viewport-visibility-info.cjs.map +3 -3
  29. package/build/components/collab/{block-comment-icon-slot.cjs → note-icon-slot.cjs} +8 -8
  30. package/build/components/collab/note-icon-slot.cjs.map +7 -0
  31. package/build/components/collab/{block-comment-icon-toolbar-slot.cjs → note-icon-toolbar-slot.cjs} +9 -9
  32. package/build/components/collab/note-icon-toolbar-slot.cjs.map +7 -0
  33. package/build/components/date-format-picker/index.cjs +2 -1
  34. package/build/components/date-format-picker/index.cjs.map +2 -2
  35. package/build/components/global-styles/color-panel.cjs.map +2 -2
  36. package/build/components/global-styles/dimensions-panel.cjs +87 -62
  37. package/build/components/global-styles/dimensions-panel.cjs.map +2 -2
  38. package/build/components/global-styles/filters-panel.cjs.map +2 -2
  39. package/build/components/global-styles/hooks.cjs +9 -7
  40. package/build/components/global-styles/hooks.cjs.map +2 -2
  41. package/build/components/grid/grid-item-movers.cjs +2 -1
  42. package/build/components/grid/grid-item-movers.cjs.map +2 -2
  43. package/build/components/inserter/block-patterns-tab/pattern-category-previews.cjs.map +2 -2
  44. package/build/components/inserter/menu.cjs +2 -1
  45. package/build/components/inserter/menu.cjs.map +2 -2
  46. package/build/components/inserter/search-results.cjs +3 -3
  47. package/build/components/inserter/search-results.cjs.map +2 -2
  48. package/build/components/inspector-popover-header/index.cjs.map +3 -3
  49. package/build/components/link-control/link-preview.cjs +2 -2
  50. package/build/components/link-control/link-preview.cjs.map +2 -2
  51. package/build/components/link-control/settings.cjs +2 -1
  52. package/build/components/link-control/settings.cjs.map +2 -2
  53. package/build/components/link-picker/link-picker.cjs +3 -2
  54. package/build/components/link-picker/link-picker.cjs.map +2 -2
  55. package/build/components/link-picker/link-preview.cjs +2 -2
  56. package/build/components/link-picker/link-preview.cjs.map +2 -2
  57. package/build/components/list-view/block-select-button.cjs +2 -2
  58. package/build/components/list-view/block-select-button.cjs.map +2 -2
  59. package/build/components/list-view/index.cjs +2 -1
  60. package/build/components/list-view/index.cjs.map +2 -2
  61. package/build/components/provider/index.cjs +80 -7
  62. package/build/components/provider/index.cjs.map +2 -2
  63. package/build/components/responsive-block-control/label.cjs +9 -2
  64. package/build/components/responsive-block-control/label.cjs.map +2 -2
  65. package/build/components/rich-text/event-listeners/paste-handler.cjs +12 -5
  66. package/build/components/rich-text/event-listeners/paste-handler.cjs.map +3 -3
  67. package/build/components/url-popover/image-url-input-ui.cjs +1 -1
  68. package/build/components/url-popover/image-url-input-ui.cjs.map +2 -2
  69. package/build/components/writing-flow/use-arrow-nav.cjs +1 -1
  70. package/build/components/writing-flow/use-arrow-nav.cjs.map +2 -2
  71. package/build/hooks/block-bindings.cjs.map +3 -3
  72. package/build/hooks/block-fields/link/index.cjs +1 -1
  73. package/build/hooks/block-fields/link/index.cjs.map +1 -1
  74. package/build/hooks/custom-css.cjs +21 -0
  75. package/build/hooks/custom-css.cjs.map +3 -3
  76. package/build/hooks/dimensions.cjs +5 -1
  77. package/build/hooks/dimensions.cjs.map +2 -2
  78. package/build/hooks/grid-visualizer.cjs +1 -1
  79. package/build/hooks/grid-visualizer.cjs.map +1 -1
  80. package/build/hooks/layout-child.cjs +1 -1
  81. package/build/hooks/layout-child.cjs.map +1 -1
  82. package/build/hooks/utils.cjs +4 -0
  83. package/build/hooks/utils.cjs.map +2 -2
  84. package/build/layouts/flex.cjs +5 -8
  85. package/build/layouts/flex.cjs.map +3 -3
  86. package/build/layouts/grid.cjs +5 -5
  87. package/build/layouts/grid.cjs.map +2 -2
  88. package/build/private-apis.cjs +5 -4
  89. package/build/private-apis.cjs.map +3 -3
  90. package/build/store/private-keys.cjs +3 -0
  91. package/build/store/private-keys.cjs.map +2 -2
  92. package/build/utils/dom.cjs +3 -1
  93. package/build/utils/dom.cjs.map +2 -2
  94. package/build-module/components/autocomplete/index.mjs +2 -2
  95. package/build-module/components/autocomplete/index.mjs.map +2 -2
  96. package/build-module/components/background-image-control/index.mjs +2 -2
  97. package/build-module/components/background-image-control/index.mjs.map +2 -2
  98. package/build-module/components/block-allowed-blocks/modal.mjs +2 -2
  99. package/build-module/components/block-allowed-blocks/modal.mjs.map +2 -2
  100. package/build-module/components/block-bindings/attribute-control.mjs +3 -3
  101. package/build-module/components/block-bindings/attribute-control.mjs.map +2 -2
  102. package/build-module/components/block-card/index.mjs +4 -4
  103. package/build-module/components/block-card/index.mjs.map +2 -2
  104. package/build-module/components/block-mover/button.mjs +11 -5
  105. package/build-module/components/block-mover/button.mjs.map +2 -2
  106. package/build-module/components/block-pattern-setup/index.mjs +2 -1
  107. package/build-module/components/block-pattern-setup/index.mjs.map +2 -2
  108. package/build-module/components/block-patterns-list/index.mjs +1 -1
  109. package/build-module/components/block-patterns-list/index.mjs.map +2 -2
  110. package/build-module/components/block-patterns-paging/index.mjs +3 -3
  111. package/build-module/components/block-patterns-paging/index.mjs.map +2 -2
  112. package/build-module/components/block-settings-menu/block-settings-dropdown.mjs +2 -2
  113. package/build-module/components/block-settings-menu/block-settings-dropdown.mjs.map +2 -2
  114. package/build-module/components/block-settings-menu/index.mjs +2 -2
  115. package/build-module/components/block-settings-menu/index.mjs.map +2 -2
  116. package/build-module/components/block-styles/menu-items.mjs +2 -2
  117. package/build-module/components/block-styles/menu-items.mjs.map +2 -2
  118. package/build-module/components/block-switcher/index.mjs +2 -2
  119. package/build-module/components/block-switcher/index.mjs.map +2 -2
  120. package/build-module/components/block-switcher/pattern-transformations-menu.mjs +2 -7
  121. package/build-module/components/block-switcher/pattern-transformations-menu.mjs.map +2 -2
  122. package/build-module/components/block-toolbar/pattern-overrides-dropdown.mjs +2 -2
  123. package/build-module/components/block-toolbar/pattern-overrides-dropdown.mjs.map +2 -2
  124. package/build-module/components/block-variation-transforms/index.mjs +2 -2
  125. package/build-module/components/block-variation-transforms/index.mjs.map +2 -2
  126. package/build-module/components/block-visibility/viewport-visibility-info.mjs +6 -6
  127. package/build-module/components/block-visibility/viewport-visibility-info.mjs.map +2 -2
  128. package/build-module/components/collab/note-icon-slot.mjs +8 -0
  129. package/build-module/components/collab/note-icon-slot.mjs.map +7 -0
  130. package/build-module/components/collab/note-icon-toolbar-slot.mjs +10 -0
  131. package/build-module/components/collab/note-icon-toolbar-slot.mjs.map +7 -0
  132. package/build-module/components/date-format-picker/index.mjs +2 -2
  133. package/build-module/components/date-format-picker/index.mjs.map +2 -2
  134. package/build-module/components/global-styles/color-panel.mjs.map +2 -2
  135. package/build-module/components/global-styles/dimensions-panel.mjs +87 -62
  136. package/build-module/components/global-styles/dimensions-panel.mjs.map +2 -2
  137. package/build-module/components/global-styles/filters-panel.mjs.map +2 -2
  138. package/build-module/components/global-styles/hooks.mjs +9 -7
  139. package/build-module/components/global-styles/hooks.mjs.map +2 -2
  140. package/build-module/components/grid/grid-item-movers.mjs +2 -5
  141. package/build-module/components/grid/grid-item-movers.mjs.map +2 -2
  142. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.mjs +3 -3
  143. package/build-module/components/inserter/block-patterns-tab/pattern-category-previews.mjs.map +1 -1
  144. package/build-module/components/inserter/menu.mjs +3 -2
  145. package/build-module/components/inserter/menu.mjs.map +2 -2
  146. package/build-module/components/inserter/search-results.mjs +1 -1
  147. package/build-module/components/inserter/search-results.mjs.map +1 -1
  148. package/build-module/components/inspector-popover-header/index.mjs +2 -2
  149. package/build-module/components/inspector-popover-header/index.mjs.map +2 -2
  150. package/build-module/components/link-control/link-preview.mjs +2 -2
  151. package/build-module/components/link-control/link-preview.mjs.map +2 -2
  152. package/build-module/components/link-control/settings.mjs +3 -2
  153. package/build-module/components/link-control/settings.mjs.map +2 -2
  154. package/build-module/components/link-picker/link-picker.mjs +1 -1
  155. package/build-module/components/link-picker/link-picker.mjs.map +2 -2
  156. package/build-module/components/link-picker/link-preview.mjs +2 -2
  157. package/build-module/components/link-picker/link-preview.mjs.map +2 -2
  158. package/build-module/components/list-view/block-select-button.mjs +2 -2
  159. package/build-module/components/list-view/block-select-button.mjs.map +2 -2
  160. package/build-module/components/list-view/index.mjs +2 -4
  161. package/build-module/components/list-view/index.mjs.map +2 -2
  162. package/build-module/components/provider/index.mjs +82 -8
  163. package/build-module/components/provider/index.mjs.map +2 -2
  164. package/build-module/components/responsive-block-control/label.mjs +9 -2
  165. package/build-module/components/responsive-block-control/label.mjs.map +2 -2
  166. package/build-module/components/rich-text/event-listeners/paste-handler.mjs +12 -5
  167. package/build-module/components/rich-text/event-listeners/paste-handler.mjs.map +2 -2
  168. package/build-module/components/url-popover/image-url-input-ui.mjs +1 -1
  169. package/build-module/components/url-popover/image-url-input-ui.mjs.map +2 -2
  170. package/build-module/components/writing-flow/use-arrow-nav.mjs +1 -1
  171. package/build-module/components/writing-flow/use-arrow-nav.mjs.map +2 -2
  172. package/build-module/hooks/block-bindings.mjs +2 -2
  173. package/build-module/hooks/block-bindings.mjs.map +2 -2
  174. package/build-module/hooks/block-fields/link/index.mjs +1 -1
  175. package/build-module/hooks/block-fields/link/index.mjs.map +1 -1
  176. package/build-module/hooks/custom-css.mjs +23 -2
  177. package/build-module/hooks/custom-css.mjs.map +2 -2
  178. package/build-module/hooks/dimensions.mjs +5 -1
  179. package/build-module/hooks/dimensions.mjs.map +2 -2
  180. package/build-module/hooks/grid-visualizer.mjs +1 -1
  181. package/build-module/hooks/grid-visualizer.mjs.map +1 -1
  182. package/build-module/hooks/layout-child.mjs +1 -1
  183. package/build-module/hooks/layout-child.mjs.map +1 -1
  184. package/build-module/hooks/utils.mjs +4 -0
  185. package/build-module/hooks/utils.mjs.map +2 -2
  186. package/build-module/layouts/flex.mjs +4 -7
  187. package/build-module/layouts/flex.mjs.map +2 -2
  188. package/build-module/layouts/grid.mjs +4 -4
  189. package/build-module/layouts/grid.mjs.map +2 -2
  190. package/build-module/private-apis.mjs +7 -5
  191. package/build-module/private-apis.mjs.map +2 -2
  192. package/build-module/store/private-keys.mjs +2 -0
  193. package/build-module/store/private-keys.mjs.map +2 -2
  194. package/build-module/utils/dom.mjs +2 -1
  195. package/build-module/utils/dom.mjs.map +2 -2
  196. package/build-style/content-rtl.css +1 -4
  197. package/build-style/content.css +1 -4
  198. package/build-style/style-rtl.css +12 -12
  199. package/build-style/style.css +12 -12
  200. package/build-types/utils/dom.d.ts +7 -0
  201. package/build-types/utils/dom.d.ts.map +1 -1
  202. package/package.json +39 -38
  203. package/src/components/autocomplete/index.js +4 -2
  204. package/src/components/background-image-control/index.js +2 -2
  205. package/src/components/background-image-control/style.scss +1 -1
  206. package/src/components/block-allowed-blocks/modal.js +3 -3
  207. package/src/components/block-bindings/attribute-control.js +4 -4
  208. package/src/components/block-card/index.js +5 -5
  209. package/src/components/block-list/content.scss +0 -4
  210. package/src/components/block-mover/button.js +17 -7
  211. package/src/components/block-pattern-setup/index.js +2 -1
  212. package/src/components/block-pattern-setup/style.scss +2 -2
  213. package/src/components/block-patterns-list/index.js +1 -1
  214. package/src/components/block-patterns-list/style.scss +1 -1
  215. package/src/components/block-patterns-paging/index.js +5 -6
  216. package/src/components/block-settings-menu/block-settings-dropdown.js +2 -2
  217. package/src/components/block-settings-menu/index.js +2 -2
  218. package/src/components/block-styles/menu-items.js +3 -3
  219. package/src/components/block-switcher/index.js +3 -3
  220. package/src/components/block-switcher/pattern-transformations-menu.js +2 -7
  221. package/src/components/block-switcher/style.scss +2 -2
  222. package/src/components/block-toolbar/pattern-overrides-dropdown.js +2 -2
  223. package/src/components/block-variation-transforms/index.js +2 -2
  224. package/src/components/block-visibility/viewport-visibility-info.js +7 -7
  225. package/src/components/collab/note-icon-slot.js +8 -0
  226. package/src/components/collab/note-icon-toolbar-slot.js +10 -0
  227. package/src/components/date-format-picker/index.js +4 -2
  228. package/src/components/global-styles/color-panel.js +0 -2
  229. package/src/components/global-styles/dimensions-panel.js +100 -73
  230. package/src/components/global-styles/filters-panel.js +0 -2
  231. package/src/components/global-styles/hooks.js +9 -7
  232. package/src/components/global-styles/style.scss +1 -1
  233. package/src/components/grid/grid-item-movers.js +2 -5
  234. package/src/components/inserter/block-patterns-tab/pattern-category-previews.js +5 -5
  235. package/src/components/inserter/menu.js +3 -2
  236. package/src/components/inserter/search-results.js +1 -1
  237. package/src/components/inserter/style.scss +2 -2
  238. package/src/components/inserter-list-item/style.scss +1 -1
  239. package/src/components/inspector-popover-header/index.js +2 -2
  240. package/src/components/link-control/link-preview.js +3 -3
  241. package/src/components/link-control/settings.js +3 -2
  242. package/src/components/link-picker/link-picker.js +1 -1
  243. package/src/components/link-picker/link-preview.js +3 -3
  244. package/src/components/list-view/block-select-button.js +3 -3
  245. package/src/components/list-view/index.js +2 -4
  246. package/src/components/list-view/style.scss +1 -1
  247. package/src/components/media-placeholder/content.scss +1 -1
  248. package/src/components/provider/index.js +149 -8
  249. package/src/components/responsive-block-control/label.js +5 -2
  250. package/src/components/rich-text/event-listeners/paste-handler.js +18 -4
  251. package/src/components/url-input/style.scss +1 -1
  252. package/src/components/url-popover/image-url-input-ui.js +1 -1
  253. package/src/components/writing-flow/use-arrow-nav.js +9 -2
  254. package/src/hooks/block-bindings.js +3 -3
  255. package/src/hooks/block-fields/link/index.js +1 -1
  256. package/src/hooks/custom-css.js +30 -9
  257. package/src/hooks/dimensions.js +6 -1
  258. package/src/hooks/grid-visualizer.js +1 -1
  259. package/src/hooks/layout-child.js +1 -1
  260. package/src/hooks/test/dimensions.js +16 -0
  261. package/src/hooks/test/style.js +2 -0
  262. package/src/hooks/utils.js +4 -0
  263. package/src/layouts/flex.js +7 -9
  264. package/src/layouts/grid.js +7 -4
  265. package/src/private-apis.js +6 -4
  266. package/src/store/private-keys.js +1 -0
  267. package/src/utils/dom.js +3 -3
  268. package/src/utils/test/dom.js +47 -4
  269. package/build/components/collab/block-comment-icon-slot.cjs.map +0 -7
  270. package/build/components/collab/block-comment-icon-toolbar-slot.cjs.map +0 -7
  271. package/build-module/components/collab/block-comment-icon-slot.mjs +0 -8
  272. package/build-module/components/collab/block-comment-icon-slot.mjs.map +0 -7
  273. package/build-module/components/collab/block-comment-icon-toolbar-slot.mjs +0 -10
  274. package/build-module/components/collab/block-comment-icon-toolbar-slot.mjs.map +0 -7
  275. package/src/components/collab/block-comment-icon-slot.js +0 -8
  276. package/src/components/collab/block-comment-icon-toolbar-slot.js +0 -10
@@ -14,7 +14,7 @@ import {
14
14
  __experimentalHStack as HStack,
15
15
  __experimentalVStack as VStack,
16
16
  __experimentalHeading as Heading,
17
- __experimentalText as Text,
17
+ __experimentalText as WCText,
18
18
  FlexBlock,
19
19
  } from '@wordpress/components';
20
20
 
@@ -162,23 +162,23 @@ export function PatternCategoryPreviews( {
162
162
  />
163
163
  </HStack>
164
164
  { ! currentCategoryPatterns.length && (
165
- <Text
165
+ <WCText
166
166
  variant="muted"
167
167
  className="block-editor-inserter__patterns-category-no-results"
168
168
  >
169
169
  { __( 'No results found' ) }
170
- </Text>
170
+ </WCText>
171
171
  ) }
172
172
  </VStack>
173
173
  { currentCategoryPatterns.length > 0 && (
174
174
  <>
175
- <Text
175
+ <WCText
176
176
  size="12"
177
177
  as="p"
178
178
  className="block-editor-inserter__help-text"
179
179
  >
180
180
  { __( 'Drag and drop patterns into the canvas.' ) }
181
- </Text>
181
+ </WCText>
182
182
  <BlockPatternsList
183
183
  ref={ scrollContainerRef }
184
184
  blockPatterns={ pagingProps.categoryPatterns }
@@ -14,7 +14,8 @@ import {
14
14
  useRef,
15
15
  useLayoutEffect,
16
16
  } from '@wordpress/element';
17
- import { VisuallyHidden, SearchControl, Popover } from '@wordpress/components';
17
+ import { SearchControl, Popover } from '@wordpress/components';
18
+ import { VisuallyHidden } from '@wordpress/ui';
18
19
  import { __ } from '@wordpress/i18n';
19
20
  import { useDebouncedInput, useViewportMatch } from '@wordpress/compose';
20
21
  import { useSelect } from '@wordpress/data';
@@ -235,7 +236,7 @@ function InserterMenu(
235
236
  </div>
236
237
  { showInserterHelpPanel && (
237
238
  <div className="block-editor-inserter__tips">
238
- <VisuallyHidden as="h2">
239
+ <VisuallyHidden render={ <h2 /> }>
239
240
  { __( 'A tip for using the block editor' ) }
240
241
  </VisuallyHidden>
241
242
  <Tips />
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { useMemo, useEffect } from '@wordpress/element';
5
5
  import { __, _n, sprintf } from '@wordpress/i18n';
6
- import { VisuallyHidden } from '@wordpress/components';
6
+ import { VisuallyHidden } from '@wordpress/ui';
7
7
  import { useDebounce, useAsyncList } from '@wordpress/compose';
8
8
  import { speak } from '@wordpress/a11y';
9
9
  import { useSelect } from '@wordpress/data';
@@ -85,7 +85,7 @@ $block-inserter-tabs-height: 44px;
85
85
  .block-editor-inserter__toggle.components-button {
86
86
  display: inline-flex;
87
87
  align-items: center;
88
- cursor: pointer;
88
+ cursor: var(--wpds-cursor-control);
89
89
  border: none;
90
90
  outline: none;
91
91
  padding: 0;
@@ -482,7 +482,7 @@ $block-inserter-tabs-height: 44px;
482
482
 
483
483
  .block-editor-inserter__media-list__list-item {
484
484
  position: relative;
485
- cursor: pointer;
485
+ cursor: var(--wpds-cursor-control);
486
486
  margin-bottom: $grid-unit-30;
487
487
 
488
488
  &.is-placeholder {
@@ -42,7 +42,7 @@
42
42
  padding: $grid-unit-10;
43
43
  align-items: stretch;
44
44
  justify-content: center;
45
- cursor: pointer;
45
+ cursor: var(--wpds-cursor-control);
46
46
  background: transparent;
47
47
  word-break: break-word;
48
48
  @media not ( prefers-reduced-motion ) {
@@ -7,7 +7,7 @@ import {
7
7
  __experimentalHeading as Heading,
8
8
  __experimentalSpacer as Spacer,
9
9
  Button,
10
- __experimentalText as Text,
10
+ __experimentalText as WCText,
11
11
  } from '@wordpress/components';
12
12
  import { closeSmall } from '@wordpress/icons';
13
13
  import { __ } from '@wordpress/i18n';
@@ -52,7 +52,7 @@ export default function InspectorPopoverHeader( {
52
52
  />
53
53
  ) }
54
54
  </HStack>
55
- { help && <Text>{ help }</Text> }
55
+ { help && <WCText>{ help }</WCText> }
56
56
  </VStack>
57
57
  );
58
58
  }
@@ -36,7 +36,7 @@ import { store as preferencesStore } from '@wordpress/preferences';
36
36
  import { unlock } from '../../lock-unlock';
37
37
  import { ViewerSlot } from './viewer-slot';
38
38
 
39
- const { Badge } = unlock( componentsPrivateApis );
39
+ const { Badge: WCBadge } = unlock( componentsPrivateApis );
40
40
 
41
41
  import useRichUrlData from './use-rich-url-data';
42
42
 
@@ -164,12 +164,12 @@ export default function LinkPreview( {
164
164
  >
165
165
  { value.badges.map(
166
166
  ( badge, index ) => (
167
- <Badge
167
+ <WCBadge
168
168
  key={ `${ badge.label }|${ badge.intent }|${ index }` }
169
169
  intent={ badge.intent }
170
170
  >
171
171
  { badge.label }
172
- </Badge>
172
+ </WCBadge>
173
173
  )
174
174
  ) }
175
175
  </HStack>
@@ -2,7 +2,8 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { __ } from '@wordpress/i18n';
5
- import { CheckboxControl, VisuallyHidden } from '@wordpress/components';
5
+ import { CheckboxControl } from '@wordpress/components';
6
+ import { VisuallyHidden } from '@wordpress/ui';
6
7
 
7
8
  const noop = () => {};
8
9
 
@@ -58,7 +59,7 @@ const LinkControlSettings = ( { value, onChange = noop, settings } ) => {
58
59
 
59
60
  return (
60
61
  <fieldset className="block-editor-link-control__settings">
61
- <VisuallyHidden as="legend">
62
+ <VisuallyHidden render={ <legend /> }>
62
63
  { __( 'Currently selected link settings' ) }
63
64
  </VisuallyHidden>
64
65
  { theSettings }
@@ -5,9 +5,9 @@ import {
5
5
  BaseControl,
6
6
  Button,
7
7
  Popover,
8
- VisuallyHidden,
9
8
  useBaseControlProps,
10
9
  } from '@wordpress/components';
10
+ import { VisuallyHidden } from '@wordpress/ui';
11
11
  import { useState, useId, useRef } from '@wordpress/element';
12
12
  import { __ } from '@wordpress/i18n';
13
13
 
@@ -16,7 +16,7 @@ import { __unstableStripHTML as stripHTML } from '@wordpress/dom';
16
16
  */
17
17
  import { unlock } from '../../lock-unlock';
18
18
 
19
- const { Badge } = unlock( componentsPrivateApis );
19
+ const { Badge: WCBadge } = unlock( componentsPrivateApis );
20
20
 
21
21
  /**
22
22
  * Link preview component that displays the current link information.
@@ -67,12 +67,12 @@ export function LinkPreview( { title, url, image, badges } ) {
67
67
  alignment="left"
68
68
  >
69
69
  { badges.map( ( badge ) => (
70
- <Badge
70
+ <WCBadge
71
71
  key={ `${ badge.label }|${ badge.intent }` }
72
72
  intent={ badge.intent }
73
73
  >
74
74
  { badge.label }
75
- </Badge>
75
+ </WCBadge>
76
76
  ) ) }
77
77
  </HStack>
78
78
  ) }
@@ -36,7 +36,7 @@ import { store as blockEditorStore } from '../../store';
36
36
  import { unlock } from '../../lock-unlock';
37
37
  import { getBlockVisibilityLabel } from '../block-visibility';
38
38
 
39
- const { Badge } = unlock( componentsPrivateApis );
39
+ const { Badge: WCBadge } = unlock( componentsPrivateApis );
40
40
 
41
41
  function ListViewBlockSelectButton(
42
42
  {
@@ -136,9 +136,9 @@ function ListViewBlockSelectButton(
136
136
  </span>
137
137
  { blockInformation?.anchor && (
138
138
  <span className="block-editor-list-view-block-select-button__anchor-wrapper">
139
- <Badge className="block-editor-list-view-block-select-button__anchor">
139
+ <WCBadge className="block-editor-list-view-block-select-button__anchor">
140
140
  { blockInformation.anchor }
141
- </Badge>
141
+ </WCBadge>
142
142
  </span>
143
143
  ) }
144
144
  { isSticky && (
@@ -11,10 +11,8 @@ import {
11
11
  useMergeRefs,
12
12
  __experimentalUseFixedWindowList as useFixedWindowList,
13
13
  } from '@wordpress/compose';
14
- import {
15
- __experimentalTreeGrid as TreeGrid,
16
- VisuallyHidden,
17
- } from '@wordpress/components';
14
+ import { __experimentalTreeGrid as TreeGrid } from '@wordpress/components';
15
+ import { VisuallyHidden } from '@wordpress/ui';
18
16
  import { AsyncModeProvider, useSelect } from '@wordpress/data';
19
17
  import deprecated from '@wordpress/deprecated';
20
18
  import {
@@ -469,7 +469,7 @@ $block-navigation-max-indent: 8;
469
469
  .block-editor-list-view__expander {
470
470
  height: $icon-size;
471
471
  width: $icon-size;
472
- cursor: pointer;
472
+ cursor: var(--wpds-cursor-control);
473
473
  }
474
474
 
475
475
  .block-editor-list-view-leaf[aria-level] .block-editor-list-view__expander {
@@ -7,7 +7,7 @@
7
7
  min-height: 0;
8
8
 
9
9
  &:hover {
10
- cursor: pointer;
10
+ cursor: var(--wpds-cursor-control);
11
11
  box-shadow: 0 0 0 1px var(--wp-admin-theme-color);
12
12
  }
13
13
  }
@@ -8,6 +8,7 @@ import {
8
8
  MediaUploadProvider,
9
9
  store as uploadStore,
10
10
  detectClientSideMediaSupport,
11
+ isHeicCanvasSupported,
11
12
  } from '@wordpress/upload-media';
12
13
 
13
14
  /**
@@ -38,6 +39,17 @@ let hasLoggedFallback = false;
38
39
  */
39
40
  let isClientSideMediaEnabledCache = null;
40
41
 
42
+ /**
43
+ * Cached result of whether HEIC-only canvas processing should be enabled.
44
+ */
45
+ let isHeicCanvasEnabledCache = null;
46
+
47
+ /**
48
+ * HEIC MIME types that should be routed through the upload-media pipeline
49
+ * when in HEIC-only mode.
50
+ */
51
+ const HEIC_MIME_TYPES = [ 'image/heic', 'image/heif' ];
52
+
41
53
  /**
42
54
  * Checks if client-side media processing should be enabled.
43
55
  *
@@ -85,6 +97,44 @@ function shouldEnableClientSideMediaProcessing() {
85
97
  return true;
86
98
  }
87
99
 
100
+ /**
101
+ * Checks if HEIC-only canvas processing should be enabled.
102
+ *
103
+ * Returns true when:
104
+ * 1. Full client-side processing is NOT available (otherwise it handles HEIC already)
105
+ * 2. The server has set the __heicUploadSupport flag
106
+ * 3. The browser supports createImageBitmap + OffscreenCanvas (e.g. Safari)
107
+ *
108
+ * @return {boolean} Whether HEIC-only canvas processing should be enabled.
109
+ */
110
+ function shouldEnableHeicCanvasProcessing() {
111
+ if ( isHeicCanvasEnabledCache !== null ) {
112
+ return isHeicCanvasEnabledCache;
113
+ }
114
+
115
+ // If full client-side processing is enabled, it already handles HEIC.
116
+ if ( shouldEnableClientSideMediaProcessing() ) {
117
+ isHeicCanvasEnabledCache = false;
118
+ return false;
119
+ }
120
+
121
+ if ( ! window.__heicUploadSupport ) {
122
+ isHeicCanvasEnabledCache = false;
123
+ return false;
124
+ }
125
+
126
+ if (
127
+ typeof isHeicCanvasSupported !== 'function' ||
128
+ ! isHeicCanvasSupported()
129
+ ) {
130
+ isHeicCanvasEnabledCache = false;
131
+ return false;
132
+ }
133
+
134
+ isHeicCanvasEnabledCache = true;
135
+ return true;
136
+ }
137
+
88
138
  /**
89
139
  * Upload a media file when the file upload button is activated
90
140
  * or when adding a file to the editor via drag & drop.
@@ -128,6 +178,92 @@ function mediaUpload(
128
178
  } );
129
179
  }
130
180
 
181
+ /**
182
+ * Upload interceptor for HEIC-only mode.
183
+ *
184
+ * Routes HEIC files through the upload-media pipeline for canvas-based
185
+ * conversion, while passing non-HEIC files to the original mediaUpload
186
+ * function for standard server-side processing.
187
+ *
188
+ * @param {WPDataRegistry} registry
189
+ * @param {Object} settings Block editor settings.
190
+ * @param {Object} $3 Parameters object passed to the function.
191
+ * @param {Array} $3.allowedTypes Array with the types of media that can be uploaded, if unset all types are allowed.
192
+ * @param {Object} $3.additionalData Additional data to include in the request.
193
+ * @param {Array<File>} $3.filesList List of files.
194
+ * @param {Function} $3.onError Function called when an error happens.
195
+ * @param {Function} $3.onFileChange Function called each time a file or a temporary representation of the file is available.
196
+ * @param {Function} $3.onSuccess Function called once a file has completely finished uploading, including thumbnails.
197
+ * @param {Function} $3.onBatchSuccess Function called once all files in a group have completely finished uploading, including thumbnails.
198
+ */
199
+ function heicMediaUpload(
200
+ registry,
201
+ settings,
202
+ {
203
+ allowedTypes,
204
+ additionalData = {},
205
+ filesList,
206
+ onError = noop,
207
+ onFileChange,
208
+ onSuccess,
209
+ onBatchSuccess,
210
+ }
211
+ ) {
212
+ const files = Array.from( filesList );
213
+ const heicFiles = files.filter( ( file ) =>
214
+ HEIC_MIME_TYPES.includes( file.type )
215
+ );
216
+ const otherFiles = files.filter(
217
+ ( file ) => ! HEIC_MIME_TYPES.includes( file.type )
218
+ );
219
+
220
+ // When the batch contains both HEIC and non-HEIC files, coordinate
221
+ // onBatchSuccess so it fires only after *both* paths have completed.
222
+ const hasBothPaths =
223
+ heicFiles.length > 0 && otherFiles.length > 0 && settings?.mediaUpload;
224
+ let pathsRemaining = hasBothPaths ? 2 : 1;
225
+ const coordinatedBatchSuccess = hasBothPaths
226
+ ? () => {
227
+ pathsRemaining--;
228
+ if ( pathsRemaining <= 0 ) {
229
+ onBatchSuccess?.();
230
+ }
231
+ }
232
+ : onBatchSuccess;
233
+
234
+ // Route HEIC files through the upload-media pipeline.
235
+ if ( heicFiles.length > 0 ) {
236
+ void registry.dispatch( uploadStore ).addItems( {
237
+ files: heicFiles,
238
+ onChange: onFileChange,
239
+ onSuccess: ( attachments ) => {
240
+ settings?.[ mediaUploadOnSuccessKey ]?.( attachments );
241
+ onSuccess?.( attachments );
242
+ },
243
+ onBatchSuccess: coordinatedBatchSuccess,
244
+ onError: ( error ) =>
245
+ onError(
246
+ typeof error === 'string' ? error : error?.message ?? ''
247
+ ),
248
+ additionalData,
249
+ allowedTypes,
250
+ } );
251
+ }
252
+
253
+ // Pass non-HEIC files to the original server-side upload function.
254
+ if ( otherFiles.length > 0 && settings?.mediaUpload ) {
255
+ settings.mediaUpload( {
256
+ allowedTypes,
257
+ additionalData,
258
+ filesList: otherFiles,
259
+ onError,
260
+ onFileChange,
261
+ onSuccess,
262
+ onBatchSuccess: coordinatedBatchSuccess,
263
+ } );
264
+ }
265
+ }
266
+
131
267
  /**
132
268
  * Calls useBlockSync as a child of SelectionContext.Provider so that the
133
269
  * hook can read selection state from the context provided by this tree
@@ -152,6 +288,9 @@ export const ExperimentalBlockEditorProvider = withRegistryProvider(
152
288
 
153
289
  const isClientSideMediaEnabled =
154
290
  shouldEnableClientSideMediaProcessing();
291
+ const isHeicCanvasEnabled = shouldEnableHeicCanvasProcessing();
292
+ const useUploadMediaPipeline =
293
+ isClientSideMediaEnabled || isHeicCanvasEnabled;
155
294
 
156
295
  // Nested providers (e.g. from useBlockPreview) inherit settings
157
296
  // where mediaUpload has already been replaced with the
@@ -162,16 +301,17 @@ export const ExperimentalBlockEditorProvider = withRegistryProvider(
162
301
 
163
302
  const settings = useMemo( () => {
164
303
  if (
165
- isClientSideMediaEnabled &&
304
+ useUploadMediaPipeline &&
166
305
  _settings?.mediaUpload &&
167
306
  ! isMediaUploadIntercepted
168
307
  ) {
169
- // Create a new object so that the original props.settings.mediaUpload is not modified.
170
- const interceptor = mediaUpload.bind(
171
- null,
172
- registry,
173
- _settings
174
- );
308
+ // Choose the right interceptor:
309
+ // - Full mode: all uploads go through upload-media pipeline.
310
+ // - HEIC-only mode: only HEIC files go through, rest use legacy path.
311
+ const uploadFn = isClientSideMediaEnabled
312
+ ? mediaUpload
313
+ : heicMediaUpload;
314
+ const interceptor = uploadFn.bind( null, registry, _settings );
175
315
  interceptor.__isMediaUploadInterceptor = true;
176
316
  return {
177
317
  ..._settings,
@@ -182,6 +322,7 @@ export const ExperimentalBlockEditorProvider = withRegistryProvider(
182
322
  }, [
183
323
  _settings,
184
324
  registry,
325
+ useUploadMediaPipeline,
185
326
  isClientSideMediaEnabled,
186
327
  isMediaUploadIntercepted,
187
328
  ] );
@@ -258,7 +399,7 @@ export const ExperimentalBlockEditorProvider = withRegistryProvider(
258
399
  // overwrite the store's server-side function with the
259
400
  // interceptor, causing uploads to loop instead of reaching
260
401
  // the server.
261
- if ( isClientSideMediaEnabled && ! isMediaUploadIntercepted ) {
402
+ if ( useUploadMediaPipeline && ! isMediaUploadIntercepted ) {
262
403
  return (
263
404
  <MediaUploadProvider
264
405
  settings={ mediaUploadSettings }
@@ -2,7 +2,7 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { useInstanceId } from '@wordpress/compose';
5
- import { VisuallyHidden } from '@wordpress/components';
5
+ import { VisuallyHidden } from '@wordpress/ui';
6
6
  import { _x, sprintf } from '@wordpress/i18n';
7
7
 
8
8
  export default function ResponsiveBlockControlLabel( {
@@ -27,7 +27,10 @@ export default function ResponsiveBlockControlLabel( {
27
27
  <span aria-describedby={ `rbc-desc-${ instanceId }` }>
28
28
  { viewport.label }
29
29
  </span>
30
- <VisuallyHidden as="span" id={ `rbc-desc-${ instanceId }` }>
30
+ <VisuallyHidden
31
+ id={ `rbc-desc-${ instanceId }` }
32
+ render={ <span /> }
33
+ >
31
34
  { accessibleLabel }
32
35
  </VisuallyHidden>
33
36
  </>
@@ -8,6 +8,7 @@ import { isURL } from '@wordpress/url';
8
8
  /**
9
9
  * Internal dependencies
10
10
  */
11
+ import { store as blockEditorStore } from '../../../store';
11
12
  import { addActiveFormats } from '../utils';
12
13
  import { getPasteEventData } from '../../../utils/pasting';
13
14
 
@@ -25,6 +26,7 @@ export default ( props ) => ( element ) => {
25
26
  __unstableEmbedURLOnPaste,
26
27
  preserveWhiteSpace,
27
28
  pastePlainText,
29
+ registry,
28
30
  } = props.current;
29
31
 
30
32
  // The event listener is attached to the window, so we need to check if
@@ -116,11 +118,23 @@ export default ( props ) => ( element ) => {
116
118
 
117
119
  if ( typeof content === 'string' ) {
118
120
  pasteInline( content );
119
- } else if ( content.length > 0 ) {
120
- if ( onReplace && isEmpty( value ) ) {
121
- onReplace( content, content.length - 1, -1 );
122
- }
121
+ return;
122
+ }
123
+
124
+ if ( ! content.length || ! onReplace || ! isEmpty( value ) ) {
125
+ return;
123
126
  }
127
+
128
+ // Record an intermediate paragraph-with-URL state so a single undo
129
+ // after the URL → block transformation restores the pasted link.
130
+ if ( mode === 'BLOCKS' ) {
131
+ pasteInline( html );
132
+ registry
133
+ .dispatch( blockEditorStore )
134
+ .__unstableMarkLastChangeAsPersistent();
135
+ }
136
+
137
+ onReplace( content, content.length - 1, -1 );
124
138
  }
125
139
 
126
140
  const { defaultView } = element.ownerDocument;
@@ -61,7 +61,7 @@ $input-size: 300px;
61
61
  color: $gray-700;
62
62
  display: block;
63
63
  font-size: $default-font-size;
64
- cursor: pointer;
64
+ cursor: var(--wpds-cursor-control);
65
65
  background: $white;
66
66
  width: 100%;
67
67
  border: none;
@@ -38,7 +38,7 @@ const LINK_DESTINATION_NONE = 'none';
38
38
  const LINK_DESTINATION_CUSTOM = 'custom';
39
39
  const LINK_DESTINATION_MEDIA = 'media';
40
40
  const LINK_DESTINATION_ATTACHMENT = 'attachment';
41
- const NEW_TAB_REL = [ 'noreferrer', 'noopener' ];
41
+ const NEW_TAB_REL = [ 'noopener' ];
42
42
 
43
43
  const ImageURLInputUI = ( {
44
44
  linkDestination,
@@ -115,9 +115,16 @@ export function getClosestTabbable(
115
115
  }
116
116
 
117
117
  function isTabCandidate( node ) {
118
- // If it's a block and there are nested focusable nodes, skip because
119
- // there are better candidates.
118
+ // If it's a block wrapper (not itself a contenteditable editing surface)
119
+ // and there are nested focusable nodes, skip because there are better
120
+ // candidates. We must not skip contenteditable nodes that happen to
121
+ // contain links or other focusable inline elements, since those are the
122
+ // correct navigation targets.
123
+ //
124
+ // See https://github.com/WordPress/gutenberg/pull/77474
125
+ // TODO: Consider fixing focus.tabbable
120
126
  if (
127
+ node.contentEditable !== 'true' &&
121
128
  getBlockClientId( node ) &&
122
129
  focus.focusable
123
130
  .find( node )
@@ -5,7 +5,7 @@ import { __ } from '@wordpress/i18n';
5
5
  import { store as blocksStore } from '@wordpress/blocks';
6
6
  import {
7
7
  __experimentalItemGroup as ItemGroup,
8
- __experimentalText as Text,
8
+ __experimentalText as WCText,
9
9
  __experimentalToolsPanel as ToolsPanel,
10
10
  } from '@wordpress/components';
11
11
  import { useSelect } from '@wordpress/data';
@@ -103,13 +103,13 @@ export const BlockBindingsPanel = ( { name: blockName, metadata } ) => {
103
103
  Use a div element to make the ToolsPanelHiddenInnerWrapper
104
104
  toggle the visibility of this help text automatically.
105
105
  */ }
106
- <Text as="div" variant="muted">
106
+ <WCText as="div" variant="muted">
107
107
  <p>
108
108
  { __(
109
109
  'Attributes connected to custom fields or other dynamic data.'
110
110
  ) }
111
111
  </p>
112
- </Text>
112
+ </WCText>
113
113
  </ToolsPanel>
114
114
  </InspectorControls>
115
115
  );
@@ -18,7 +18,7 @@ import { prependHTTP } from '@wordpress/url';
18
18
  import LinkControl from '../../../components/link-control';
19
19
  import { useInspectorPopoverPlacement } from '../use-inspector-popover-placement';
20
20
 
21
- export const NEW_TAB_REL = 'noreferrer noopener';
21
+ export const NEW_TAB_REL = 'noopener';
22
22
  export const NEW_TAB_TARGET = '_blank';
23
23
  export const NOFOLLOW_REL = 'nofollow';
24
24
 
@@ -1,17 +1,11 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { useMemo } from '@wordpress/element';
5
- import { useSelect } from '@wordpress/data';
1
+ import { useEffect, useMemo } from '@wordpress/element';
2
+ import { useDispatch, useSelect } from '@wordpress/data';
6
3
  import { useInstanceId } from '@wordpress/compose';
7
4
  import { getBlockType, hasBlockSupport } from '@wordpress/blocks';
8
5
  import { __, sprintf } from '@wordpress/i18n';
9
6
  import { processCSSNesting } from '@wordpress/global-styles-engine';
7
+ import { store as noticesStore } from '@wordpress/notices';
10
8
  import { useBlockEditingMode } from '../components/block-editing-mode';
11
-
12
- /**
13
- * Internal dependencies
14
- */
15
9
  import InspectorControls from '../components/inspector-controls';
16
10
  import AdvancedPanel, {
17
11
  validateCSS,
@@ -69,6 +63,8 @@ function CustomCSSControl( { blockName, setAttributes, style } ) {
69
63
  );
70
64
  }
71
65
 
66
+ const CUSTOM_CSS_WARNING_NOTICE_ID = 'custom-css-edit-warning';
67
+
72
68
  function CustomCSSEdit( { clientId, name, setAttributes } ) {
73
69
  const { style, canEditCSS } = useSelect(
74
70
  ( select ) => {
@@ -113,6 +109,31 @@ function useBlockProps( { style } ) {
113
109
  customCSS.trim().length > 0 &&
114
110
  validateCSS( customCSS );
115
111
 
112
+ const canEditCSS = useSelect(
113
+ ( select ) => select( blockEditorStore ).getSettings().canEditCSS,
114
+ []
115
+ );
116
+
117
+ const { createWarningNotice } = useDispatch( noticesStore );
118
+
119
+ // Show a warning notice when the user lacks edit_css and a block has
120
+ // custom CSS. The fixed notice ID ensures only one notice is shown
121
+ // regardless of how many blocks have CSS.
122
+ const hasCustomCSS = !! customCSS?.trim();
123
+ useEffect( () => {
124
+ if ( ! canEditCSS && hasCustomCSS ) {
125
+ createWarningNotice(
126
+ __(
127
+ 'This post contains blocks with custom CSS. You do not have permission to edit CSS. If you save this post, the custom CSS will be removed.'
128
+ ),
129
+ {
130
+ id: CUSTOM_CSS_WARNING_NOTICE_ID,
131
+ isDismissible: true,
132
+ }
133
+ );
134
+ }
135
+ }, [ canEditCSS, hasCustomCSS, createWarningNotice ] );
136
+
116
137
  const customCSSIdentifier = useInstanceId(
117
138
  CUSTOM_CSS_INSTANCE_REFERENCE,
118
139
  'wp-custom-css'