@wordpress/block-library 10.0.1-next.v.202606191442.0 → 10.1.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 (249) hide show
  1. package/CHANGELOG.md +4 -1
  2. package/build/audio/edit.cjs +8 -1
  3. package/build/audio/edit.cjs.map +2 -2
  4. package/build/breadcrumbs/edit.cjs +0 -1
  5. package/build/breadcrumbs/edit.cjs.map +2 -2
  6. package/build/button/edit.cjs +0 -1
  7. package/build/button/edit.cjs.map +2 -2
  8. package/build/cover/edit/embed-video-url-input.cjs +0 -1
  9. package/build/cover/edit/embed-video-url-input.cjs.map +2 -2
  10. package/build/details/edit.cjs +0 -1
  11. package/build/details/edit.cjs.map +2 -2
  12. package/build/form/edit.cjs +0 -2
  13. package/build/form/edit.cjs.map +2 -2
  14. package/build/form-input/edit.cjs +0 -2
  15. package/build/form-input/edit.cjs.map +2 -2
  16. package/build/freeform/edit.cjs +5 -14
  17. package/build/freeform/edit.cjs.map +3 -3
  18. package/build/freeform/migration-notice.cjs.map +2 -2
  19. package/build/home-link/edit.cjs +0 -1
  20. package/build/home-link/edit.cjs.map +2 -2
  21. package/build/html/modal.cjs +6 -3
  22. package/build/html/modal.cjs.map +2 -2
  23. package/build/icon/edit.cjs +2 -4
  24. package/build/icon/edit.cjs.map +2 -2
  25. package/build/image/image.cjs +0 -2
  26. package/build/image/image.cjs.map +2 -2
  27. package/build/image/use-open-image-media-editor-modal.cjs +5 -25
  28. package/build/image/use-open-image-media-editor-modal.cjs.map +2 -2
  29. package/build/list/ordered-list-settings.cjs +0 -1
  30. package/build/list/ordered-list-settings.cjs.map +2 -2
  31. package/build/navigation/edit/index.cjs +9 -9
  32. package/build/navigation/edit/index.cjs.map +2 -2
  33. package/build/navigation/edit/navigation-menu-name-control.cjs +0 -1
  34. package/build/navigation/edit/navigation-menu-name-control.cjs.map +2 -2
  35. package/build/navigation-link/block.json +1 -1
  36. package/build/navigation-link/link-ui/page-creator.cjs +0 -1
  37. package/build/navigation-link/link-ui/page-creator.cjs.map +2 -2
  38. package/build/navigation-link/shared/controls.cjs +0 -2
  39. package/build/navigation-link/shared/controls.cjs.map +2 -2
  40. package/build/playlist-track/edit.cjs +0 -3
  41. package/build/playlist-track/edit.cjs.map +2 -2
  42. package/build/post-comment/edit.cjs +0 -1
  43. package/build/post-comment/edit.cjs.map +2 -2
  44. package/build/post-featured-image/edit.cjs +0 -1
  45. package/build/post-featured-image/edit.cjs.map +2 -2
  46. package/build/post-terms/edit.cjs +0 -1
  47. package/build/post-terms/edit.cjs.map +2 -2
  48. package/build/post-title/edit.cjs +0 -1
  49. package/build/post-title/edit.cjs.map +2 -2
  50. package/build/query/edit/enhanced-pagination-modal.cjs +10 -1
  51. package/build/query/edit/enhanced-pagination-modal.cjs.map +3 -3
  52. package/build/query/edit/inspector-controls/index.cjs +0 -1
  53. package/build/query/edit/inspector-controls/index.cjs.map +2 -2
  54. package/build/rss/edit.cjs +0 -1
  55. package/build/rss/edit.cjs.map +2 -2
  56. package/build/search/block.json +4 -0
  57. package/build/search/edit.cjs +242 -204
  58. package/build/search/edit.cjs.map +2 -2
  59. package/build/site-logo/edit.cjs +2 -1
  60. package/build/site-logo/edit.cjs.map +2 -2
  61. package/build/social-link/edit.cjs +0 -3
  62. package/build/social-link/edit.cjs.map +2 -2
  63. package/build/tab-list/block.json +2 -2
  64. package/build/tab-list/edit.cjs +14 -8
  65. package/build/tab-list/edit.cjs.map +2 -2
  66. package/build/tab-list/init.cjs +28 -0
  67. package/build/tab-list/init.cjs.map +7 -0
  68. package/build/tab-panel/edit.cjs +0 -9
  69. package/build/tab-panel/edit.cjs.map +2 -2
  70. package/build/tab-panel/save.cjs +2 -1
  71. package/build/tab-panel/save.cjs.map +2 -2
  72. package/build/tab-panels/block.json +0 -1
  73. package/build/tab-panels/init.cjs +28 -0
  74. package/build/tab-panels/init.cjs.map +7 -0
  75. package/build/table/edit.cjs +0 -2
  76. package/build/table/edit.cjs.map +2 -2
  77. package/build/tabs/view.cjs +20 -94
  78. package/build/tabs/view.cjs.map +2 -2
  79. package/build/template-part/edit/advanced-controls.cjs +0 -1
  80. package/build/template-part/edit/advanced-controls.cjs.map +2 -2
  81. package/build/template-part/edit/title-modal.cjs +1 -2
  82. package/build/template-part/edit/title-modal.cjs.map +2 -2
  83. package/build/video/edit.cjs +3 -2
  84. package/build/video/edit.cjs.map +2 -2
  85. package/build/video/tracks-editor.cjs +0 -2
  86. package/build/video/tracks-editor.cjs.map +2 -2
  87. package/build-module/audio/edit.mjs +8 -2
  88. package/build-module/audio/edit.mjs.map +2 -2
  89. package/build-module/breadcrumbs/edit.mjs +0 -1
  90. package/build-module/breadcrumbs/edit.mjs.map +2 -2
  91. package/build-module/button/edit.mjs +0 -1
  92. package/build-module/button/edit.mjs.map +2 -2
  93. package/build-module/cover/edit/embed-video-url-input.mjs +0 -1
  94. package/build-module/cover/edit/embed-video-url-input.mjs.map +2 -2
  95. package/build-module/details/edit.mjs +0 -1
  96. package/build-module/details/edit.mjs.map +2 -2
  97. package/build-module/form/edit.mjs +0 -2
  98. package/build-module/form/edit.mjs.map +2 -2
  99. package/build-module/form-input/edit.mjs +0 -2
  100. package/build-module/form-input/edit.mjs.map +2 -2
  101. package/build-module/freeform/edit.mjs +5 -14
  102. package/build-module/freeform/edit.mjs.map +2 -2
  103. package/build-module/freeform/migration-notice.mjs.map +2 -2
  104. package/build-module/home-link/edit.mjs +0 -1
  105. package/build-module/home-link/edit.mjs.map +2 -2
  106. package/build-module/html/modal.mjs +6 -3
  107. package/build-module/html/modal.mjs.map +2 -2
  108. package/build-module/icon/edit.mjs +2 -4
  109. package/build-module/icon/edit.mjs.map +2 -2
  110. package/build-module/image/image.mjs +0 -2
  111. package/build-module/image/image.mjs.map +2 -2
  112. package/build-module/image/use-open-image-media-editor-modal.mjs +5 -25
  113. package/build-module/image/use-open-image-media-editor-modal.mjs.map +2 -2
  114. package/build-module/list/ordered-list-settings.mjs +0 -1
  115. package/build-module/list/ordered-list-settings.mjs.map +2 -2
  116. package/build-module/navigation/edit/index.mjs +9 -9
  117. package/build-module/navigation/edit/index.mjs.map +2 -2
  118. package/build-module/navigation/edit/navigation-menu-name-control.mjs +0 -1
  119. package/build-module/navigation/edit/navigation-menu-name-control.mjs.map +2 -2
  120. package/build-module/navigation-link/block.json +1 -1
  121. package/build-module/navigation-link/link-ui/page-creator.mjs +0 -1
  122. package/build-module/navigation-link/link-ui/page-creator.mjs.map +2 -2
  123. package/build-module/navigation-link/shared/controls.mjs +0 -2
  124. package/build-module/navigation-link/shared/controls.mjs.map +2 -2
  125. package/build-module/playlist-track/edit.mjs +0 -3
  126. package/build-module/playlist-track/edit.mjs.map +2 -2
  127. package/build-module/post-comment/edit.mjs +0 -1
  128. package/build-module/post-comment/edit.mjs.map +2 -2
  129. package/build-module/post-featured-image/edit.mjs +0 -1
  130. package/build-module/post-featured-image/edit.mjs.map +2 -2
  131. package/build-module/post-terms/edit.mjs +0 -1
  132. package/build-module/post-terms/edit.mjs.map +2 -2
  133. package/build-module/post-title/edit.mjs +0 -1
  134. package/build-module/post-title/edit.mjs.map +2 -2
  135. package/build-module/query/edit/enhanced-pagination-modal.mjs +10 -1
  136. package/build-module/query/edit/enhanced-pagination-modal.mjs.map +2 -2
  137. package/build-module/query/edit/inspector-controls/index.mjs +0 -1
  138. package/build-module/query/edit/inspector-controls/index.mjs.map +2 -2
  139. package/build-module/rss/edit.mjs +0 -1
  140. package/build-module/rss/edit.mjs.map +2 -2
  141. package/build-module/search/block.json +4 -0
  142. package/build-module/search/edit.mjs +242 -204
  143. package/build-module/search/edit.mjs.map +2 -2
  144. package/build-module/site-logo/edit.mjs +2 -1
  145. package/build-module/site-logo/edit.mjs.map +2 -2
  146. package/build-module/social-link/edit.mjs +0 -3
  147. package/build-module/social-link/edit.mjs.map +2 -2
  148. package/build-module/tab-list/block.json +2 -2
  149. package/build-module/tab-list/edit.mjs +15 -9
  150. package/build-module/tab-list/edit.mjs.map +2 -2
  151. package/build-module/tab-list/init.mjs +7 -0
  152. package/build-module/tab-list/init.mjs.map +7 -0
  153. package/build-module/tab-panel/edit.mjs +1 -10
  154. package/build-module/tab-panel/edit.mjs.map +2 -2
  155. package/build-module/tab-panel/save.mjs +2 -1
  156. package/build-module/tab-panel/save.mjs.map +2 -2
  157. package/build-module/tab-panels/block.json +0 -1
  158. package/build-module/tab-panels/init.mjs +7 -0
  159. package/build-module/tab-panels/init.mjs.map +7 -0
  160. package/build-module/table/edit.mjs +0 -2
  161. package/build-module/table/edit.mjs.map +2 -2
  162. package/build-module/tabs/view.mjs +20 -94
  163. package/build-module/tabs/view.mjs.map +2 -2
  164. package/build-module/template-part/edit/advanced-controls.mjs +0 -1
  165. package/build-module/template-part/edit/advanced-controls.mjs.map +2 -2
  166. package/build-module/template-part/edit/title-modal.mjs +1 -2
  167. package/build-module/template-part/edit/title-modal.mjs.map +2 -2
  168. package/build-module/video/edit.mjs +3 -3
  169. package/build-module/video/edit.mjs.map +2 -2
  170. package/build-module/video/tracks-editor.mjs +0 -2
  171. package/build-module/video/tracks-editor.mjs.map +2 -2
  172. package/build-style/editor-rtl.css +0 -15
  173. package/build-style/editor.css +0 -15
  174. package/build-style/style-rtl.css +1 -1
  175. package/build-style/style.css +1 -1
  176. package/build-style/tab-list/style-rtl.css +1 -1
  177. package/build-style/tab-list/style.css +1 -1
  178. package/package.json +40 -40
  179. package/src/audio/edit.js +5 -9
  180. package/src/breadcrumbs/edit.js +0 -1
  181. package/src/button/edit.js +0 -1
  182. package/src/cover/edit/embed-video-url-input.js +0 -1
  183. package/src/cover/test/edit.js +51 -40
  184. package/src/details/edit.js +0 -1
  185. package/src/editor.scss +0 -1
  186. package/src/form/edit.js +0 -2
  187. package/src/form-input/edit.js +0 -2
  188. package/src/freeform/edit.js +6 -29
  189. package/src/freeform/migration-notice.js +2 -4
  190. package/src/home-link/edit.js +0 -1
  191. package/src/html/modal.js +3 -0
  192. package/src/icon/edit.js +0 -2
  193. package/src/image/image.js +0 -2
  194. package/src/image/test/use-open-image-media-editor-modal.js +20 -26
  195. package/src/image/use-open-image-media-editor-modal.js +24 -42
  196. package/src/list/ordered-list-settings.js +0 -1
  197. package/src/navigation/edit/index.js +9 -13
  198. package/src/navigation/edit/navigation-menu-name-control.js +0 -1
  199. package/src/navigation-link/README.md +1 -1
  200. package/src/navigation-link/block.json +1 -1
  201. package/src/navigation-link/link-ui/page-creator.js +0 -1
  202. package/src/navigation-link/shared/controls.js +0 -2
  203. package/src/navigation-link/test/__snapshots__/hooks.js.snap +5 -0
  204. package/src/playlist-track/edit.js +0 -3
  205. package/src/post-comment/edit.js +0 -1
  206. package/src/post-featured-image/edit.js +0 -1
  207. package/src/post-terms/edit.js +0 -1
  208. package/src/post-title/edit.js +0 -1
  209. package/src/query/edit/enhanced-pagination-modal.js +11 -1
  210. package/src/query/edit/inspector-controls/index.js +0 -1
  211. package/src/rss/edit.js +0 -1
  212. package/src/search/README.md +1 -0
  213. package/src/search/block.json +4 -0
  214. package/src/search/edit.js +106 -55
  215. package/src/search/index.php +25 -1
  216. package/src/site-logo/edit.js +3 -1
  217. package/src/social-link/edit.js +0 -3
  218. package/src/tab-list/README.md +1 -1
  219. package/src/tab-list/block.json +2 -2
  220. package/src/tab-list/edit.js +14 -8
  221. package/src/tab-list/index.php +4 -6
  222. package/src/tab-list/init.js +6 -0
  223. package/src/tab-list/style.scss +1 -2
  224. package/src/tab-panel/edit.js +1 -14
  225. package/src/tab-panel/index.php +2 -25
  226. package/src/tab-panel/save.js +1 -0
  227. package/src/tab-panels/block.json +0 -1
  228. package/src/tab-panels/init.js +6 -0
  229. package/src/table/edit.js +0 -2
  230. package/src/tabs/index.php +12 -19
  231. package/src/tabs/view.js +20 -100
  232. package/src/template-part/edit/advanced-controls.js +0 -1
  233. package/src/template-part/edit/title-modal.js +0 -1
  234. package/src/utils/test/style-state.js +26 -26
  235. package/src/video/edit.js +9 -16
  236. package/src/video/tracks-editor.js +0 -2
  237. package/build/freeform/convert-to-blocks-button.cjs +0 -40
  238. package/build/freeform/convert-to-blocks-button.cjs.map +0 -7
  239. package/build/list-item/utils.cjs +0 -57
  240. package/build/list-item/utils.cjs.map +0 -7
  241. package/build-module/freeform/convert-to-blocks-button.mjs +0 -19
  242. package/build-module/freeform/convert-to-blocks-button.mjs.map +0 -7
  243. package/build-module/list-item/utils.mjs +0 -32
  244. package/build-module/list-item/utils.mjs.map +0 -7
  245. package/build-style/tab-list/editor-rtl.css +0 -14
  246. package/build-style/tab-list/editor.css +0 -14
  247. package/src/freeform/convert-to-blocks-button.js +0 -18
  248. package/src/list-item/utils.js +0 -34
  249. package/src/tab-list/editor.scss +0 -17
@@ -236,7 +236,6 @@ function ContentOnlyControls( {
236
236
  >
237
237
  <div className="wp-block-image__toolbar_content_textarea__container">
238
238
  <TextControl
239
- __next40pxDefaultSize
240
239
  className="wp-block-image__toolbar_content_textarea"
241
240
  label={ __( 'Title attribute' ) }
242
241
  value={ attributes.title || '' }
@@ -1143,7 +1142,6 @@ export default function Image( {
1143
1142
  ) }
1144
1143
  <InspectorControls group="advanced">
1145
1144
  <TextControl
1146
- __next40pxDefaultSize
1147
1145
  label={ __( 'Title attribute' ) }
1148
1146
  value={ title || '' }
1149
1147
  onChange={ onSetTitle }
@@ -45,8 +45,7 @@ jest.mock( '../../lock-unlock', () => ( {
45
45
 
46
46
  function createRegistry( {
47
47
  getEditedEntityRecord = () => false,
48
- getEntityRecord = () => undefined,
49
- resolveGetEntityRecord = getEntityRecord,
48
+ resolveGetEntityRecord = () => undefined,
50
49
  } = {} ) {
51
50
  const actions = {
52
51
  invalidateResolution: jest.fn(),
@@ -54,7 +53,6 @@ function createRegistry( {
54
53
  return {
55
54
  select: jest.fn( () => ( {
56
55
  getEditedEntityRecord,
57
- getEntityRecord,
58
56
  } ) ),
59
57
  dispatch: jest.fn( () => actions ),
60
58
  resolveSelect: jest.fn( () => ( {
@@ -169,11 +167,8 @@ describe( 'useOpenImageMediaEditorModal', () => {
169
167
  caption: 'Original caption',
170
168
  },
171
169
  registryOptions: {
172
- getEntityRecord: () => originalAttachment,
173
- resolveGetEntityRecord: ( kind, name, attachmentId, query ) =>
174
- query?.context === 'edit'
175
- ? updatedAttachment
176
- : originalAttachment,
170
+ getEditedEntityRecord: () => originalAttachment,
171
+ resolveGetEntityRecord: () => updatedAttachment,
177
172
  },
178
173
  } );
179
174
 
@@ -181,13 +176,15 @@ describe( 'useOpenImageMediaEditorModal', () => {
181
176
  alt: 'Updated alt',
182
177
  caption: 'Updated caption',
183
178
  } );
184
- expect( registry.actions.invalidateResolution ).toHaveBeenCalledWith(
185
- 'getEntityRecord',
186
- [ 'postType', 'attachment', 1 ]
179
+ // A single, query-less resolution is invalidated: the hook reads,
180
+ // resolves, and invalidates the attachment through the entity's default
181
+ // (edit) context rather than an explicitly-keyed query.
182
+ expect( registry.actions.invalidateResolution ).toHaveBeenCalledTimes(
183
+ 1
187
184
  );
188
185
  expect( registry.actions.invalidateResolution ).toHaveBeenCalledWith(
189
186
  'getEntityRecord',
190
- [ 'postType', 'attachment', 1, { context: 'edit' } ]
187
+ [ 'postType', 'attachment', 1 ]
191
188
  );
192
189
  } );
193
190
 
@@ -220,8 +217,7 @@ describe( 'useOpenImageMediaEditorModal', () => {
220
217
  1,
221
218
  'postType',
222
219
  'attachment',
223
- 1,
224
- { context: 'edit' }
220
+ 1
225
221
  );
226
222
  expect( openMediaEditorModal ).toHaveBeenCalledWith( {
227
223
  id: 1,
@@ -263,8 +259,7 @@ describe( 'useOpenImageMediaEditorModal', () => {
263
259
  1,
264
260
  'postType',
265
261
  'attachment',
266
- 1,
267
- { context: 'edit' }
262
+ 1
268
263
  );
269
264
  expect( openMediaEditorModal ).toHaveBeenCalledWith( {
270
265
  id: 1,
@@ -299,7 +294,7 @@ describe( 'useOpenImageMediaEditorModal', () => {
299
294
  caption: undefined,
300
295
  },
301
296
  registryOptions: {
302
- getEntityRecord: () => ( {
297
+ getEditedEntityRecord: () => ( {
303
298
  id: 1,
304
299
  alt_text: '',
305
300
  caption: {
@@ -314,8 +309,7 @@ describe( 'useOpenImageMediaEditorModal', () => {
314
309
  1,
315
310
  'postType',
316
311
  'attachment',
317
- 1,
318
- { context: 'edit' }
312
+ 1
319
313
  );
320
314
  expect( setAttributes ).toHaveBeenCalledWith( {
321
315
  caption: 'Updated attachment caption',
@@ -341,7 +335,7 @@ describe( 'useOpenImageMediaEditorModal', () => {
341
335
  caption: '',
342
336
  },
343
337
  registryOptions: {
344
- getEntityRecord: ( kind, name, attachmentId ) =>
338
+ getEditedEntityRecord: ( kind, name, attachmentId ) =>
345
339
  attachmentId === 1 ? originalAttachment : undefined,
346
340
  resolveGetEntityRecord: ( kind, name, attachmentId ) =>
347
341
  attachmentId === 2 ? updatedAttachment : undefined,
@@ -371,7 +365,7 @@ describe( 'useOpenImageMediaEditorModal', () => {
371
365
  };
372
366
  const deferredAttachment = createDeferred();
373
367
  const registry = createRegistry( {
374
- getEntityRecord: ( kind, name, attachmentId ) =>
368
+ getEditedEntityRecord: ( kind, name, attachmentId ) =>
375
369
  attachmentId === 1 ? originalAttachment : undefined,
376
370
  resolveGetEntityRecord: ( kind, name, attachmentId ) =>
377
371
  attachmentId === 2 ? deferredAttachment.promise : undefined,
@@ -437,7 +431,7 @@ describe( 'useOpenImageMediaEditorModal', () => {
437
431
  caption: '',
438
432
  },
439
433
  registryOptions: {
440
- getEntityRecord: ( kind, name, attachmentId ) =>
434
+ getEditedEntityRecord: ( kind, name, attachmentId ) =>
441
435
  attachmentId === 1
442
436
  ? originalAttachment
443
437
  : {
@@ -469,7 +463,7 @@ describe( 'useOpenImageMediaEditorModal', () => {
469
463
  caption: undefined,
470
464
  },
471
465
  registryOptions: {
472
- getEntityRecord: () => ( {
466
+ getEditedEntityRecord: () => ( {
473
467
  id: 1,
474
468
  alt_text: '',
475
469
  caption: { raw: 'Existing caption' },
@@ -526,7 +520,7 @@ describe( 'useOpenImageMediaEditorModal', () => {
526
520
  caption: undefined,
527
521
  },
528
522
  registryOptions: {
529
- getEntityRecord: () => ( {
523
+ getEditedEntityRecord: () => ( {
530
524
  id: 1,
531
525
  alt_text: 'Original alt',
532
526
  caption: { raw: 'Existing caption' },
@@ -556,7 +550,7 @@ describe( 'useOpenImageMediaEditorModal', () => {
556
550
  caption: { toString: () => '' },
557
551
  },
558
552
  registryOptions: {
559
- getEntityRecord: () => ( {
553
+ getEditedEntityRecord: () => ( {
560
554
  id: 1,
561
555
  alt_text: 'Original alt',
562
556
  caption: { raw: 'Existing caption' },
@@ -603,7 +597,7 @@ describe( 'useOpenImageMediaEditorModal', () => {
603
597
  };
604
598
  const deferredAttachment = createDeferred();
605
599
  const registry = createRegistry( {
606
- getEntityRecord: () => ( {
600
+ getEditedEntityRecord: () => ( {
607
601
  id: 1,
608
602
  alt_text: '',
609
603
  caption: { raw: '' },
@@ -104,9 +104,6 @@ export function getSyncedImageBlockAttributes(
104
104
  }
105
105
 
106
106
  const { openMediaEditorModalKey } = unlock( blockEditorPrivateApis );
107
- // Caption sync needs `caption.raw`; view/default attachment records can contain
108
- // only rendered caption data or be tied to an in-flight stale resolution.
109
- const ATTACHMENT_EDIT_QUERY = { context: 'edit' };
110
107
 
111
108
  function getAttachmentFallbackForEmptyBlockMetadata( { alt, caption } ) {
112
109
  const attachment = {};
@@ -177,25 +174,23 @@ export function useOpenImageMediaEditorModal( {
177
174
  };
178
175
  }, [ alt, caption, id, url ] );
179
176
 
177
+ // Reads the cached attachment record. The `attachment` postType entity
178
+ // fetches with `context: 'edit'` by default, so `getEditedEntityRecord`
179
+ // returns the edit-context record — carrying `caption` as `{ raw }` and a
180
+ // usable `alt_text` — without us specifying a context. It is resolver-
181
+ // backed, so on a cold cache this also kicks off the fetch and returns a
182
+ // falsy value synchronously; that resolution shares its cache key with the
183
+ // `resolveAttachmentRecord` call below (both keyed on the no-query
184
+ // `getEntityRecord`), so the two dedupe into a single request.
180
185
  const getCachedAttachmentRecord = useCallback(
181
- ( attachmentId ) => {
182
- const { getEditedEntityRecord, getEntityRecord } =
183
- registry.select( coreStore );
184
- return (
185
- getEditedEntityRecord(
186
+ ( attachmentId ) =>
187
+ registry
188
+ .select( coreStore )
189
+ .getEditedEntityRecord(
186
190
  'postType',
187
191
  'attachment',
188
192
  attachmentId
189
- ) ||
190
- getEntityRecord(
191
- 'postType',
192
- 'attachment',
193
- attachmentId,
194
- ATTACHMENT_EDIT_QUERY
195
- ) ||
196
- getEntityRecord( 'postType', 'attachment', attachmentId )
197
- );
198
- },
193
+ ),
199
194
  [ registry ]
200
195
  );
201
196
 
@@ -204,18 +199,10 @@ export function useOpenImageMediaEditorModal( {
204
199
  const resolveSelect = registry.resolveSelect( coreStore );
205
200
 
206
201
  try {
207
- return (
208
- ( await resolveSelect.getEntityRecord(
209
- 'postType',
210
- 'attachment',
211
- attachmentId,
212
- ATTACHMENT_EDIT_QUERY
213
- ) ) ||
214
- ( await resolveSelect.getEntityRecord(
215
- 'postType',
216
- 'attachment',
217
- attachmentId
218
- ) )
202
+ return await resolveSelect.getEntityRecord(
203
+ 'postType',
204
+ 'attachment',
205
+ attachmentId
219
206
  );
220
207
  } catch {
221
208
  return undefined;
@@ -226,8 +213,9 @@ export function useOpenImageMediaEditorModal( {
226
213
 
227
214
  const resolveFreshAttachmentRecord = useCallback(
228
215
  async ( attachmentId ) => {
229
- // Bust cached records so resolveAttachmentRecord fetches the
230
- // server state that reflects the media editor's saved changes.
216
+ // Invalidate the cached resolution so resolveAttachmentRecord
217
+ // re-fetches the server state that reflects the media editor's
218
+ // saved changes.
231
219
  const { invalidateResolution } = registry.dispatch( coreStore );
232
220
 
233
221
  invalidateResolution( 'getEntityRecord', [
@@ -235,12 +223,6 @@ export function useOpenImageMediaEditorModal( {
235
223
  'attachment',
236
224
  attachmentId,
237
225
  ] );
238
- invalidateResolution( 'getEntityRecord', [
239
- 'postType',
240
- 'attachment',
241
- attachmentId,
242
- ATTACHMENT_EDIT_QUERY,
243
- ] );
244
226
  return resolveAttachmentRecord( attachmentId );
245
227
  },
246
228
  [ registry, resolveAttachmentRecord ]
@@ -321,10 +303,10 @@ export function useOpenImageMediaEditorModal( {
321
303
  }
322
304
 
323
305
  // Snapshot the attachment's current metadata before the user makes
324
- // any changes so handleMediaUpdate can compare against it later.
325
- // Prefer a freshly resolved edit-context record for accuracy; fall
326
- // back to whatever is in the cache, or a minimal object derived from
327
- // the block's own attributes when nothing is cached yet.
306
+ // any changes so handleMediaUpdate can compare against it later. Use
307
+ // the cached record when it's already present; only resolve when
308
+ // nothing is cached yet, then fall back to a minimal object derived
309
+ // from the block's own attributes.
328
310
  const cachedAttachmentRecord = getCachedAttachmentRecord( id );
329
311
  const fallbackAttachmentRecord =
330
312
  getAttachmentFallbackForEmptyBlockMetadata(
@@ -86,7 +86,6 @@ const OrderedListSettings = ( { setAttributes, reversed, start, type } ) => {
86
86
  }
87
87
  >
88
88
  <TextControl
89
- __next40pxDefaultSize
90
89
  label={ __( 'Start value' ) }
91
90
  type="number"
92
91
  onChange={ ( value ) => {
@@ -362,27 +362,29 @@ function Navigation( {
362
362
  innerBlocks,
363
363
  } = useInnerBlocks( clientId );
364
364
 
365
+ const {
366
+ replaceInnerBlocks,
367
+ selectBlock,
368
+ __unstableMarkNextChangeAsNotPersistent,
369
+ } = useDispatch( blockEditorStore );
370
+
365
371
  // Reset submenuVisibility to default if orientation changes to horizontal
366
372
  // while "always" is selected, but only when the Navigation block or one
367
373
  // of its inner blocks is being edited. Rendering related template parts
368
374
  // should not mark them dirty.
369
375
  useEffect( () => {
370
- if (
371
- ( isSelected || isInnerBlockSelected ) &&
372
- orientation === 'horizontal' &&
373
- submenuVisibility === 'always'
374
- ) {
376
+ if ( orientation === 'horizontal' && submenuVisibility === 'always' ) {
377
+ __unstableMarkNextChangeAsNotPersistent();
375
378
  setAttributes( {
376
379
  submenuVisibility: 'hover',
377
380
  showSubmenuIcon: true,
378
381
  } );
379
382
  }
380
383
  }, [
381
- isSelected,
382
- isInnerBlockSelected,
383
384
  orientation,
384
385
  submenuVisibility,
385
386
  setAttributes,
387
+ __unstableMarkNextChangeAsNotPersistent,
386
388
  ] );
387
389
 
388
390
  // Use a ref to store whether we've confirmed a page-list has submenus.
@@ -442,12 +444,6 @@ function Navigation( {
442
444
  templatePart.area === NAVIGATION_OVERLAY_TEMPLATE_PART_AREA
443
445
  ) ?? false;
444
446
 
445
- const {
446
- replaceInnerBlocks,
447
- selectBlock,
448
- __unstableMarkNextChangeAsNotPersistent,
449
- } = useDispatch( blockEditorStore );
450
-
451
447
  const [ isResponsiveMenuOpen, setResponsiveMenuVisibility ] =
452
448
  useState( false );
453
449
 
@@ -14,7 +14,6 @@ export default function NavigationMenuNameControl() {
14
14
 
15
15
  return (
16
16
  <TextControl
17
- __next40pxDefaultSize
18
17
  label={ __( 'Menu name' ) }
19
18
  value={ title }
20
19
  onChange={ updateTitle }
@@ -74,7 +74,7 @@ _Defined via the [`usesContext` and `providesContext`](https://developer.wordpre
74
74
  _Defined via the [`selectors`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-selectors/) property in block.json._
75
75
 
76
76
  - **states**:
77
- - @current: `.wp-block-navigation .current-menu-item`
77
+ - -current: `.wp-block-navigation .current-menu-item`
78
78
 
79
79
  ## Block Markup
80
80
 
@@ -87,7 +87,7 @@
87
87
  },
88
88
  "selectors": {
89
89
  "states": {
90
- "@current": ".wp-block-navigation .current-menu-item"
90
+ "-current": ".wp-block-navigation .current-menu-item"
91
91
  }
92
92
  },
93
93
  "editorStyle": "wp-block-navigation-link-editor",
@@ -128,7 +128,6 @@ export function LinkUIPageCreator( {
128
128
  <form onSubmit={ createPage }>
129
129
  <VStack spacing={ 4 }>
130
130
  <TextControl
131
- __next40pxDefaultSize
132
131
  label={ __( 'Title' ) }
133
132
  onChange={ setTitle }
134
133
  placeholder={ __( 'No title' ) }
@@ -178,7 +178,6 @@ export function Controls( {
178
178
  isShownByDefault
179
179
  >
180
180
  <TextControl
181
- __next40pxDefaultSize
182
181
  label={ __( 'Text' ) }
183
182
  value={ label ? stripHTML( label ) : '' }
184
183
  onChange={ ( labelValue ) => {
@@ -292,7 +291,6 @@ export function Controls( {
292
291
  isShownByDefault={ ! isContentOnly }
293
292
  >
294
293
  <TextControl
295
- __next40pxDefaultSize
296
294
  label={ __( 'Rel attribute' ) }
297
295
  value={ rel || '' }
298
296
  onChange={ ( relValue ) => {
@@ -9,6 +9,7 @@ exports[`hooks enhanceNavigationLinkVariations enhances variations with icon and
9
9
  "attributes": {},
10
10
  "description": "A link to a custom URL.",
11
11
  "icon": <SVG
12
+ fill="currentColor"
12
13
  viewBox="0 0 24 24"
13
14
  xmlns="http://www.w3.org/2000/svg"
14
15
  >
@@ -26,6 +27,7 @@ exports[`hooks enhanceNavigationLinkVariations enhances variations with icon and
26
27
  },
27
28
  "description": "A link to a post.",
28
29
  "icon": <SVG
30
+ fill="currentColor"
29
31
  viewBox="0 0 24 24"
30
32
  xmlns="http://www.w3.org/2000/svg"
31
33
  >
@@ -43,6 +45,7 @@ exports[`hooks enhanceNavigationLinkVariations enhances variations with icon and
43
45
  },
44
46
  "description": "A link to a page.",
45
47
  "icon": <SVG
48
+ fill="currentColor"
46
49
  viewBox="0 0 24 24"
47
50
  xmlns="http://www.w3.org/2000/svg"
48
51
  >
@@ -63,6 +66,7 @@ exports[`hooks enhanceNavigationLinkVariations enhances variations with icon and
63
66
  },
64
67
  "description": "A link to a category.",
65
68
  "icon": <SVG
69
+ fill="currentColor"
66
70
  viewBox="0 0 24 24"
67
71
  xmlns="http://www.w3.org/2000/svg"
68
72
  >
@@ -82,6 +86,7 @@ exports[`hooks enhanceNavigationLinkVariations enhances variations with icon and
82
86
  },
83
87
  "description": "A link to a tag.",
84
88
  "icon": <SVG
89
+ fill="currentColor"
85
90
  viewBox="0 0 24 24"
86
91
  xmlns="http://www.w3.org/2000/svg"
87
92
  >
@@ -161,7 +161,6 @@ const PlaylistTrackEdit = ( { attributes, setAttributes, context } ) => {
161
161
  <InspectorControls>
162
162
  <PanelBody title={ __( 'Settings' ) }>
163
163
  <TextControl
164
- __next40pxDefaultSize
165
164
  label={ __( 'Artist' ) }
166
165
  value={ artist ? stripHTML( artist ) : '' }
167
166
  onChange={ ( artistValue ) => {
@@ -169,7 +168,6 @@ const PlaylistTrackEdit = ( { attributes, setAttributes, context } ) => {
169
168
  } }
170
169
  />
171
170
  <TextControl
172
- __next40pxDefaultSize
173
171
  label={ __( 'Album' ) }
174
172
  value={ album ? stripHTML( album ) : '' }
175
173
  onChange={ ( albumValue ) => {
@@ -177,7 +175,6 @@ const PlaylistTrackEdit = ( { attributes, setAttributes, context } ) => {
177
175
  } }
178
176
  />
179
177
  <TextControl
180
- __next40pxDefaultSize
181
178
  label={ __( 'Title' ) }
182
179
  value={ title ? stripHTML( title ) : '' }
183
180
  onChange={ ( titleValue ) => {
@@ -34,7 +34,6 @@ export default function Edit( { attributes: { commentId }, setAttributes } ) {
34
34
  ) }
35
35
  >
36
36
  <TextControl
37
- __next40pxDefaultSize
38
37
  value={ commentId }
39
38
  onChange={ ( val ) =>
40
39
  setCommentIdInput( parseInt( val ) )
@@ -356,7 +356,6 @@ export default function PostFeaturedImageEdit( {
356
356
  }
357
357
  >
358
358
  <TextControl
359
- __next40pxDefaultSize
360
359
  label={ __( 'Link relation' ) }
361
360
  help={ createInterpolateElement(
362
361
  __(
@@ -65,7 +65,6 @@ export default function PostTermsEdit( {
65
65
  <>
66
66
  <InspectorControls group="advanced">
67
67
  <TextControl
68
- __next40pxDefaultSize
69
68
  autoComplete="off"
70
69
  label={ __( 'Separator' ) }
71
70
  value={ separator || '' }
@@ -203,7 +203,6 @@ export default function PostTitleEdit( {
203
203
  }
204
204
  >
205
205
  <TextControl
206
- __next40pxDefaultSize
207
206
  label={ __( 'Link relation' ) }
208
207
  help={ createInterpolateElement(
209
208
  __(
@@ -8,6 +8,8 @@ import {
8
8
  } from '@wordpress/components';
9
9
  import { __ } from '@wordpress/i18n';
10
10
  import { useState, useEffect } from '@wordpress/element';
11
+ import { useDispatch } from '@wordpress/data';
12
+ import { store as blockEditorStore } from '@wordpress/block-editor';
11
13
 
12
14
  /**
13
15
  * Internal dependencies
@@ -24,13 +26,21 @@ export default function EnhancedPaginationModal( {
24
26
  } ) {
25
27
  const [ isOpen, setOpen ] = useState( false );
26
28
  const hasUnsupportedBlocks = useUnsupportedBlocks( clientId );
29
+ const { __unstableMarkNextChangeAsNotPersistent } =
30
+ useDispatch( blockEditorStore );
27
31
 
28
32
  useEffect( () => {
29
33
  if ( enhancedPagination && hasUnsupportedBlocks ) {
34
+ __unstableMarkNextChangeAsNotPersistent();
30
35
  setAttributes( { enhancedPagination: false } );
31
36
  setOpen( true );
32
37
  }
33
- }, [ enhancedPagination, hasUnsupportedBlocks, setAttributes ] );
38
+ }, [
39
+ enhancedPagination,
40
+ hasUnsupportedBlocks,
41
+ setAttributes,
42
+ __unstableMarkNextChangeAsNotPersistent,
43
+ ] );
34
44
 
35
45
  const closeModal = () => {
36
46
  setOpen( false );
@@ -432,7 +432,6 @@ export default function QueryInspectorControls( props ) {
432
432
  } }
433
433
  >
434
434
  <TextControl
435
- __next40pxDefaultSize
436
435
  label={ __( 'Keyword' ) }
437
436
  value={ querySearch }
438
437
  onChange={ ( newQuerySearch ) => {
package/src/rss/edit.js CHANGED
@@ -289,7 +289,6 @@ export default function RSSEdit( { attributes, setAttributes, name } ) {
289
289
  </InspectorControls>
290
290
  <InspectorControls group="advanced">
291
291
  <TextControl
292
- __next40pxDefaultSize
293
292
  label={ __( 'Link relation' ) }
294
293
  help={ createInterpolateElement(
295
294
  __(
@@ -24,6 +24,7 @@ _Defined via the [`attributes`](https://developer.wordpress.org/block-editor/ref
24
24
  | `buttonPosition` | `string` | `"button-outside"` | — |
25
25
  | `buttonUseIcon` | `boolean` | `false` | — |
26
26
  | `query` | `object` | `{}` | — |
27
+ | `tagName` | `string` | `""` | — |
27
28
 
28
29
  ## Supports
29
30
 
@@ -42,6 +42,10 @@
42
42
  "query": {
43
43
  "type": "object",
44
44
  "default": {}
45
+ },
46
+ "tagName": {
47
+ "type": "string",
48
+ "default": ""
45
49
  }
46
50
  },
47
51
  "supports": {