@wordpress/block-library 7.13.0 → 7.13.1-next.957ca95e4c.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 (242) hide show
  1. package/build/columns/transforms.js +10 -1
  2. package/build/columns/transforms.js.map +1 -1
  3. package/build/cover/edit/block-controls.js +9 -2
  4. package/build/cover/edit/block-controls.js.map +1 -1
  5. package/build/gallery/gap-styles.js +5 -4
  6. package/build/gallery/gap-styles.js.map +1 -1
  7. package/build/home-link/index.js +14 -1
  8. package/build/home-link/index.js.map +1 -1
  9. package/build/image/edit.js +3 -1
  10. package/build/image/edit.js.map +1 -1
  11. package/build/image/use-client-width.js +3 -1
  12. package/build/image/use-client-width.js.map +1 -1
  13. package/build/index.js +1 -1
  14. package/build/index.js.map +1 -1
  15. package/build/index.native.js +3 -15
  16. package/build/index.native.js.map +1 -1
  17. package/build/latest-posts/deprecated.js +14 -1
  18. package/build/latest-posts/deprecated.js.map +1 -1
  19. package/build/latest-posts/index.js +14 -1
  20. package/build/latest-posts/index.js.map +1 -1
  21. package/build/list/deprecated.js +84 -1
  22. package/build/list/deprecated.js.map +1 -1
  23. package/build/list/edit.js +153 -134
  24. package/build/list/edit.js.map +1 -1
  25. package/build/list/index.js +29 -34
  26. package/build/list/index.js.map +1 -1
  27. package/build/list/save.js +1 -5
  28. package/build/list/save.js.map +1 -1
  29. package/build/list/{v2/tag-name.js → tag-name.js} +0 -0
  30. package/build/list/tag-name.js.map +1 -0
  31. package/build/list/{v2/tag-name.native.js → tag-name.native.js} +0 -0
  32. package/build/list/tag-name.native.js.map +1 -0
  33. package/build/list/transforms.js +61 -95
  34. package/build/list/transforms.js.map +1 -1
  35. package/build/list/{v2/migrate.js → utils.js} +3 -2
  36. package/build/list/utils.js.map +1 -0
  37. package/build/list-item/edit.native.js +21 -3
  38. package/build/list-item/edit.native.js.map +1 -1
  39. package/build/list-item/hooks/use-copy.js +2 -0
  40. package/build/list-item/hooks/use-copy.js.map +1 -1
  41. package/build/list-item/hooks/use-merge.js +0 -1
  42. package/build/list-item/hooks/use-merge.js.map +1 -1
  43. package/build/list-item/hooks/use-outdent-list-item.js +0 -1
  44. package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
  45. package/build/list-item/hooks/use-space.js +10 -1
  46. package/build/list-item/hooks/use-space.js.map +1 -1
  47. package/build/list-item/index.js +0 -1
  48. package/build/list-item/index.js.map +1 -1
  49. package/build/list-item/utils.js +0 -1
  50. package/build/list-item/utils.js.map +1 -1
  51. package/build/navigation/edit/index.js +6 -3
  52. package/build/navigation/edit/index.js.map +1 -1
  53. package/build/navigation/edit/responsive-wrapper.js +6 -4
  54. package/build/navigation/edit/responsive-wrapper.js.map +1 -1
  55. package/build/navigation/edit/unsaved-inner-blocks.js +4 -15
  56. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  57. package/build/post-excerpt/index.js +4 -2
  58. package/build/post-excerpt/index.js.map +1 -1
  59. package/build/post-terms/edit.js +0 -1
  60. package/build/post-terms/edit.js.map +1 -1
  61. package/build/post-terms/use-post-terms.js +4 -24
  62. package/build/post-terms/use-post-terms.js.map +1 -1
  63. package/build/query-no-results/index.js +13 -0
  64. package/build/query-no-results/index.js.map +1 -1
  65. package/build/query-pagination-numbers/index.js +4 -2
  66. package/build/query-pagination-numbers/index.js.map +1 -1
  67. package/build/query-title/index.js +1 -0
  68. package/build/query-title/index.js.map +1 -1
  69. package/build/quote/index.js +4 -2
  70. package/build/quote/index.js.map +1 -1
  71. package/build/term-description/index.js +6 -0
  72. package/build/term-description/index.js.map +1 -1
  73. package/build/verse/index.js +1 -0
  74. package/build/verse/index.js.map +1 -1
  75. package/build-module/columns/transforms.js +10 -1
  76. package/build-module/columns/transforms.js.map +1 -1
  77. package/build-module/cover/edit/block-controls.js +10 -3
  78. package/build-module/cover/edit/block-controls.js.map +1 -1
  79. package/build-module/gallery/gap-styles.js +6 -5
  80. package/build-module/gallery/gap-styles.js.map +1 -1
  81. package/build-module/home-link/index.js +14 -1
  82. package/build-module/home-link/index.js.map +1 -1
  83. package/build-module/image/edit.js +4 -2
  84. package/build-module/image/edit.js.map +1 -1
  85. package/build-module/image/use-client-width.js +3 -1
  86. package/build-module/image/use-client-width.js.map +1 -1
  87. package/build-module/index.js +1 -1
  88. package/build-module/index.js.map +1 -1
  89. package/build-module/index.native.js +3 -15
  90. package/build-module/index.native.js.map +1 -1
  91. package/build-module/latest-posts/deprecated.js +14 -1
  92. package/build-module/latest-posts/deprecated.js.map +1 -1
  93. package/build-module/latest-posts/index.js +14 -1
  94. package/build-module/latest-posts/index.js.map +1 -1
  95. package/build-module/list/deprecated.js +83 -1
  96. package/build-module/list/deprecated.js.map +1 -1
  97. package/build-module/list/edit.js +151 -134
  98. package/build-module/list/edit.js.map +1 -1
  99. package/build-module/list/index.js +29 -29
  100. package/build-module/list/index.js.map +1 -1
  101. package/build-module/list/save.js +2 -6
  102. package/build-module/list/save.js.map +1 -1
  103. package/build-module/list/{v2/tag-name.js → tag-name.js} +0 -0
  104. package/build-module/list/tag-name.js.map +1 -0
  105. package/build-module/list/{v2/tag-name.native.js → tag-name.native.js} +0 -0
  106. package/build-module/list/tag-name.native.js.map +1 -0
  107. package/build-module/list/transforms.js +62 -97
  108. package/build-module/list/transforms.js.map +1 -1
  109. package/build-module/list/{v2/migrate.js → utils.js} +3 -2
  110. package/build-module/list/utils.js.map +1 -0
  111. package/build-module/list-item/edit.native.js +19 -3
  112. package/build-module/list-item/edit.native.js.map +1 -1
  113. package/build-module/list-item/hooks/use-copy.js +2 -0
  114. package/build-module/list-item/hooks/use-copy.js.map +1 -1
  115. package/build-module/list-item/hooks/use-merge.js +0 -1
  116. package/build-module/list-item/hooks/use-merge.js.map +1 -1
  117. package/build-module/list-item/hooks/use-outdent-list-item.js +0 -1
  118. package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
  119. package/build-module/list-item/hooks/use-space.js +10 -1
  120. package/build-module/list-item/hooks/use-space.js.map +1 -1
  121. package/build-module/list-item/index.js +0 -1
  122. package/build-module/list-item/index.js.map +1 -1
  123. package/build-module/list-item/utils.js +0 -1
  124. package/build-module/list-item/utils.js.map +1 -1
  125. package/build-module/navigation/edit/index.js +5 -3
  126. package/build-module/navigation/edit/index.js.map +1 -1
  127. package/build-module/navigation/edit/responsive-wrapper.js +6 -4
  128. package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
  129. package/build-module/navigation/edit/unsaved-inner-blocks.js +5 -15
  130. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  131. package/build-module/post-excerpt/index.js +4 -2
  132. package/build-module/post-excerpt/index.js.map +1 -1
  133. package/build-module/post-terms/edit.js +0 -1
  134. package/build-module/post-terms/edit.js.map +1 -1
  135. package/build-module/post-terms/use-post-terms.js +5 -25
  136. package/build-module/post-terms/use-post-terms.js.map +1 -1
  137. package/build-module/query-no-results/index.js +13 -0
  138. package/build-module/query-no-results/index.js.map +1 -1
  139. package/build-module/query-pagination-numbers/index.js +4 -2
  140. package/build-module/query-pagination-numbers/index.js.map +1 -1
  141. package/build-module/query-title/index.js +1 -0
  142. package/build-module/query-title/index.js.map +1 -1
  143. package/build-module/quote/index.js +4 -2
  144. package/build-module/quote/index.js.map +1 -1
  145. package/build-module/term-description/index.js +6 -0
  146. package/build-module/term-description/index.js.map +1 -1
  147. package/build-module/verse/index.js +1 -0
  148. package/build-module/verse/index.js.map +1 -1
  149. package/build-style/button/style-rtl.css +1 -4
  150. package/build-style/button/style.css +1 -4
  151. package/build-style/code/editor-rtl.css +79 -0
  152. package/build-style/code/editor.css +79 -0
  153. package/build-style/cover/editor-rtl.css +0 -3
  154. package/build-style/cover/editor.css +0 -3
  155. package/build-style/editor-rtl.css +9 -44
  156. package/build-style/editor.css +9 -44
  157. package/build-style/group/editor-rtl.css +2 -22
  158. package/build-style/group/editor.css +2 -22
  159. package/build-style/navigation/editor-rtl.css +3 -19
  160. package/build-style/navigation/editor.css +3 -19
  161. package/build-style/navigation/style-rtl.css +8 -1
  162. package/build-style/navigation/style.css +8 -1
  163. package/build-style/style-rtl.css +9 -5
  164. package/build-style/style.css +9 -5
  165. package/package.json +28 -28
  166. package/src/button/style.scss +1 -8
  167. package/src/code/editor.scss +3 -0
  168. package/src/columns/transforms.js +17 -3
  169. package/src/cover/edit/block-controls.js +15 -3
  170. package/src/cover/editor.scss +0 -4
  171. package/src/editor.scss +1 -0
  172. package/src/gallery/gap-styles.js +10 -6
  173. package/src/gallery/index.php +23 -2
  174. package/src/group/editor.scss +1 -28
  175. package/src/home-link/block.json +14 -1
  176. package/src/image/edit.js +3 -3
  177. package/src/image/use-client-width.js +1 -1
  178. package/src/index.js +1 -4
  179. package/src/index.native.js +2 -13
  180. package/src/latest-posts/block.json +14 -1
  181. package/src/list/deprecated.js +71 -1
  182. package/src/list/edit.js +146 -133
  183. package/src/list/index.js +25 -24
  184. package/src/list/save.js +3 -4
  185. package/src/list/{v2/tag-name.js → tag-name.js} +0 -0
  186. package/src/list/{v2/tag-name.native.js → tag-name.native.js} +0 -0
  187. package/src/list/test/__snapshots__/edit.native.js.snap +14 -2
  188. package/src/list/test/edit.native.js +0 -154
  189. package/src/list/transforms.js +57 -111
  190. package/src/list/{v2/migrate.js → utils.js} +2 -2
  191. package/src/list-item/block.json +0 -1
  192. package/src/list-item/edit.native.js +32 -2
  193. package/src/list-item/hooks/use-copy.js +2 -0
  194. package/src/list-item/hooks/use-space.js +10 -2
  195. package/src/list-item/style.native.scss +8 -0
  196. package/src/navigation/edit/index.js +14 -4
  197. package/src/navigation/edit/responsive-wrapper.js +8 -3
  198. package/src/navigation/edit/unsaved-inner-blocks.js +14 -24
  199. package/src/navigation/editor.scss +2 -23
  200. package/src/navigation/index.php +13 -8
  201. package/src/navigation/style.scss +11 -2
  202. package/src/post-excerpt/block.json +4 -2
  203. package/src/post-terms/edit.js +0 -1
  204. package/src/post-terms/use-post-terms.js +10 -15
  205. package/src/query-no-results/block.json +13 -0
  206. package/src/query-pagination-numbers/block.json +4 -2
  207. package/src/query-title/block.json +1 -0
  208. package/src/quote/block.json +4 -2
  209. package/src/term-description/block.json +6 -0
  210. package/src/verse/block.json +1 -0
  211. package/build/list/v2/deprecated.js +0 -117
  212. package/build/list/v2/deprecated.js.map +0 -1
  213. package/build/list/v2/edit.js +0 -200
  214. package/build/list/v2/edit.js.map +0 -1
  215. package/build/list/v2/index.js +0 -36
  216. package/build/list/v2/index.js.map +0 -1
  217. package/build/list/v2/migrate.js.map +0 -1
  218. package/build/list/v2/save.js +0 -34
  219. package/build/list/v2/save.js.map +0 -1
  220. package/build/list/v2/tag-name.js.map +0 -1
  221. package/build/list/v2/tag-name.native.js.map +0 -1
  222. package/build/list/v2/transforms.js +0 -137
  223. package/build/list/v2/transforms.js.map +0 -1
  224. package/build-module/list/v2/deprecated.js +0 -104
  225. package/build-module/list/v2/deprecated.js.map +0 -1
  226. package/build-module/list/v2/edit.js +0 -179
  227. package/build-module/list/v2/edit.js.map +0 -1
  228. package/build-module/list/v2/index.js +0 -21
  229. package/build-module/list/v2/index.js.map +0 -1
  230. package/build-module/list/v2/migrate.js.map +0 -1
  231. package/build-module/list/v2/save.js +0 -23
  232. package/build-module/list/v2/save.js.map +0 -1
  233. package/build-module/list/v2/tag-name.js.map +0 -1
  234. package/build-module/list/v2/tag-name.native.js.map +0 -1
  235. package/build-module/list/v2/transforms.js +0 -127
  236. package/build-module/list/v2/transforms.js.map +0 -1
  237. package/src/list/test/migrate.js +0 -158
  238. package/src/list/v2/deprecated.js +0 -89
  239. package/src/list/v2/edit.js +0 -192
  240. package/src/list/v2/index.js +0 -22
  241. package/src/list/v2/save.js +0 -18
  242. package/src/list/v2/transforms.js +0 -120
@@ -106,32 +106,12 @@
106
106
  .wp-block-group.is-layout-flex.block-editor-block-list__block > .block-list-appender:only-child::after {
107
107
  content: "";
108
108
  display: flex;
109
- border: 1px dashed currentColor;
110
- opacity: 0.4;
111
- border-radius: 2px;
112
109
  flex: 1 0 48px;
113
110
  pointer-events: none;
114
111
  min-height: 46px;
115
- }
116
- .wp-block-group.is-layout-flex.block-editor-block-list__block > .block-list-appender:only-child .block-editor-inserter {
117
- pointer-events: all;
118
- }
119
-
120
- .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child {
121
- pointer-events: none;
122
- }
123
- .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after {
124
- content: "";
125
- position: absolute;
126
- top: 0;
127
- right: 0;
128
- bottom: 0;
129
- left: 0;
130
112
  border: 1px dashed currentColor;
131
- opacity: 0.4;
132
113
  border-radius: 2px;
133
- pointer-events: none;
134
114
  }
135
- .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter {
136
- visibility: hidden;
115
+ .wp-block-group.is-layout-flex.block-editor-block-list__block > .block-list-appender:only-child .block-editor-inserter {
116
+ pointer-events: all;
137
117
  }
@@ -280,14 +280,13 @@
280
280
  left: 0;
281
281
  bottom: 0;
282
282
  right: 0;
283
- border: 1px dashed currentColor;
284
- opacity: 0.4;
285
283
  pointer-events: none;
284
+ border: 1px dashed currentColor;
285
+ border-radius: 2px;
286
286
  border-radius: inherit;
287
287
  }
288
288
  .wp-block-navigation-placeholder__preview > svg {
289
289
  fill: currentColor;
290
- opacity: 0.4;
291
290
  }
292
291
 
293
292
  .wp-block-navigation.is-vertical .is-small .components-placeholder__fieldset,
@@ -486,17 +485,6 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
486
485
  padding: 8px 12px;
487
486
  }
488
487
 
489
- .wp-block-navigation__unsaved-changes {
490
- position: relative;
491
- }
492
- .wp-block-navigation__unsaved-changes .components-spinner {
493
- position: absolute;
494
- top: calc(50% - 16px / 2);
495
- right: calc(50% - 16px / 2);
496
- opacity: 0;
497
- animation: 0.5s linear 2s normal forwards fadein;
498
- }
499
-
500
488
  @keyframes fadeouthalf {
501
489
  0% {
502
490
  opacity: 1;
@@ -505,11 +493,6 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
505
493
  opacity: 0.5;
506
494
  }
507
495
  }
508
- .wp-block-navigation__unsaved-changes-overlay.is-saving {
509
- opacity: 1;
510
- animation: 0.5s linear 2s normal forwards fadeouthalf;
511
- }
512
-
513
496
  .wp-block-navigation-delete-menu-button {
514
497
  width: 100%;
515
498
  justify-content: center;
@@ -519,6 +502,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
519
502
  .wp-block-navigation__overlay-menu-preview {
520
503
  display: flex;
521
504
  align-items: center;
505
+ justify-content: space-between;
522
506
  width: 100%;
523
507
  background-color: #f0f0f0;
524
508
  padding: 0 24px;
@@ -280,14 +280,13 @@
280
280
  right: 0;
281
281
  bottom: 0;
282
282
  left: 0;
283
- border: 1px dashed currentColor;
284
- opacity: 0.4;
285
283
  pointer-events: none;
284
+ border: 1px dashed currentColor;
285
+ border-radius: 2px;
286
286
  border-radius: inherit;
287
287
  }
288
288
  .wp-block-navigation-placeholder__preview > svg {
289
289
  fill: currentColor;
290
- opacity: 0.4;
291
290
  }
292
291
 
293
292
  .wp-block-navigation.is-vertical .is-small .components-placeholder__fieldset,
@@ -486,17 +485,6 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
486
485
  padding: 8px 12px;
487
486
  }
488
487
 
489
- .wp-block-navigation__unsaved-changes {
490
- position: relative;
491
- }
492
- .wp-block-navigation__unsaved-changes .components-spinner {
493
- position: absolute;
494
- top: calc(50% - 16px / 2);
495
- left: calc(50% - 16px / 2);
496
- opacity: 0;
497
- animation: 0.5s linear 2s normal forwards fadein;
498
- }
499
-
500
488
  @keyframes fadeouthalf {
501
489
  0% {
502
490
  opacity: 1;
@@ -505,11 +493,6 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
505
493
  opacity: 0.5;
506
494
  }
507
495
  }
508
- .wp-block-navigation__unsaved-changes-overlay.is-saving {
509
- opacity: 1;
510
- animation: 0.5s linear 2s normal forwards fadeouthalf;
511
- }
512
-
513
496
  .wp-block-navigation-delete-menu-button {
514
497
  width: 100%;
515
498
  justify-content: center;
@@ -519,6 +502,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
519
502
  .wp-block-navigation__overlay-menu-preview {
520
503
  display: flex;
521
504
  align-items: center;
505
+ justify-content: space-between;
522
506
  width: 100%;
523
507
  background-color: #f0f0f0;
524
508
  padding: 0 24px;
@@ -394,7 +394,10 @@ button.wp-block-navigation-item__content {
394
394
  display: flex;
395
395
  flex-direction: column;
396
396
  background-color: inherit;
397
- padding: 2rem;
397
+ padding-top: var(--wp--style--root--padding-top, 2rem);
398
+ padding-left: var(--wp--style--root--padding-right, 2rem);
399
+ padding-bottom: var(--wp--style--root--padding-bottom, 2rem);
400
+ padding-right: var(--wp--style--root--padding-left, 2rem);
398
401
  overflow: auto;
399
402
  z-index: 100000;
400
403
  }
@@ -489,6 +492,7 @@ button.wp-block-navigation-item__content {
489
492
  border: none;
490
493
  margin: 0;
491
494
  padding: 0;
495
+ text-transform: inherit;
492
496
  }
493
497
  .wp-block-navigation__responsive-container-open svg,
494
498
  .wp-block-navigation__responsive-container-close svg {
@@ -517,6 +521,9 @@ button.wp-block-navigation-item__content {
517
521
 
518
522
  .wp-block-navigation__responsive-close {
519
523
  width: 100%;
524
+ max-width: var(--wp--style--global--wide-size, 100%);
525
+ margin-right: auto;
526
+ margin-left: auto;
520
527
  }
521
528
  .wp-block-navigation__responsive-close:focus {
522
529
  outline: none;
@@ -394,7 +394,10 @@ button.wp-block-navigation-item__content {
394
394
  display: flex;
395
395
  flex-direction: column;
396
396
  background-color: inherit;
397
- padding: 2rem;
397
+ padding-top: var(--wp--style--root--padding-top, 2rem);
398
+ padding-right: var(--wp--style--root--padding-right, 2rem);
399
+ padding-bottom: var(--wp--style--root--padding-bottom, 2rem);
400
+ padding-left: var(--wp--style--root--padding-left, 2rem);
398
401
  overflow: auto;
399
402
  z-index: 100000;
400
403
  }
@@ -489,6 +492,7 @@ button.wp-block-navigation-item__content {
489
492
  border: none;
490
493
  margin: 0;
491
494
  padding: 0;
495
+ text-transform: inherit;
492
496
  }
493
497
  .wp-block-navigation__responsive-container-open svg,
494
498
  .wp-block-navigation__responsive-container-close svg {
@@ -517,6 +521,9 @@ button.wp-block-navigation-item__content {
517
521
 
518
522
  .wp-block-navigation__responsive-close {
519
523
  width: 100%;
524
+ max-width: var(--wp--style--global--wide-size, 100%);
525
+ margin-left: auto;
526
+ margin-right: auto;
520
527
  }
521
528
  .wp-block-navigation__responsive-close:focus {
522
529
  outline: none;
@@ -96,16 +96,12 @@
96
96
  }
97
97
 
98
98
  .wp-block-button__link {
99
- box-shadow: none;
100
99
  cursor: pointer;
101
100
  display: inline-block;
102
101
  text-align: center;
103
102
  word-break: break-word;
104
103
  box-sizing: border-box;
105
104
  }
106
- .wp-block-button__link:hover, .wp-block-button__link:focus, .wp-block-button__link:active, .wp-block-button__link:visited {
107
- color: #fff;
108
- }
109
105
  .wp-block-button__link.aligncenter {
110
106
  text-align: center;
111
107
  }
@@ -114,6 +110,7 @@
114
110
  }
115
111
 
116
112
  :where(.wp-block-button__link) {
113
+ box-shadow: none;
117
114
  text-decoration: none;
118
115
  border-radius: 9999px;
119
116
  padding: calc(0.667em + 2px) calc(1.333em + 2px);
@@ -2033,7 +2030,10 @@ button.wp-block-navigation-item__content {
2033
2030
  display: flex;
2034
2031
  flex-direction: column;
2035
2032
  background-color: inherit;
2036
- padding: 2rem;
2033
+ padding-top: var(--wp--style--root--padding-top, 2rem);
2034
+ padding-left: var(--wp--style--root--padding-right, 2rem);
2035
+ padding-bottom: var(--wp--style--root--padding-bottom, 2rem);
2036
+ padding-right: var(--wp--style--root--padding-left, 2rem);
2037
2037
  overflow: auto;
2038
2038
  z-index: 100000;
2039
2039
  }
@@ -2128,6 +2128,7 @@ button.wp-block-navigation-item__content {
2128
2128
  border: none;
2129
2129
  margin: 0;
2130
2130
  padding: 0;
2131
+ text-transform: inherit;
2131
2132
  }
2132
2133
  .wp-block-navigation__responsive-container-open svg,
2133
2134
  .wp-block-navigation__responsive-container-close svg {
@@ -2156,6 +2157,9 @@ button.wp-block-navigation-item__content {
2156
2157
 
2157
2158
  .wp-block-navigation__responsive-close {
2158
2159
  width: 100%;
2160
+ max-width: var(--wp--style--global--wide-size, 100%);
2161
+ margin-right: auto;
2162
+ margin-left: auto;
2159
2163
  }
2160
2164
  .wp-block-navigation__responsive-close:focus {
2161
2165
  outline: none;
@@ -96,16 +96,12 @@
96
96
  }
97
97
 
98
98
  .wp-block-button__link {
99
- box-shadow: none;
100
99
  cursor: pointer;
101
100
  display: inline-block;
102
101
  text-align: center;
103
102
  word-break: break-word;
104
103
  box-sizing: border-box;
105
104
  }
106
- .wp-block-button__link:hover, .wp-block-button__link:focus, .wp-block-button__link:active, .wp-block-button__link:visited {
107
- color: #fff;
108
- }
109
105
  .wp-block-button__link.aligncenter {
110
106
  text-align: center;
111
107
  }
@@ -115,6 +111,7 @@
115
111
  }
116
112
 
117
113
  :where(.wp-block-button__link) {
114
+ box-shadow: none;
118
115
  text-decoration: none;
119
116
  border-radius: 9999px;
120
117
  padding: calc(0.667em + 2px) calc(1.333em + 2px);
@@ -2059,7 +2056,10 @@ button.wp-block-navigation-item__content {
2059
2056
  display: flex;
2060
2057
  flex-direction: column;
2061
2058
  background-color: inherit;
2062
- padding: 2rem;
2059
+ padding-top: var(--wp--style--root--padding-top, 2rem);
2060
+ padding-right: var(--wp--style--root--padding-right, 2rem);
2061
+ padding-bottom: var(--wp--style--root--padding-bottom, 2rem);
2062
+ padding-left: var(--wp--style--root--padding-left, 2rem);
2063
2063
  overflow: auto;
2064
2064
  z-index: 100000;
2065
2065
  }
@@ -2154,6 +2154,7 @@ button.wp-block-navigation-item__content {
2154
2154
  border: none;
2155
2155
  margin: 0;
2156
2156
  padding: 0;
2157
+ text-transform: inherit;
2157
2158
  }
2158
2159
  .wp-block-navigation__responsive-container-open svg,
2159
2160
  .wp-block-navigation__responsive-container-close svg {
@@ -2182,6 +2183,9 @@ button.wp-block-navigation-item__content {
2182
2183
 
2183
2184
  .wp-block-navigation__responsive-close {
2184
2185
  width: 100%;
2186
+ max-width: var(--wp--style--global--wide-size, 100%);
2187
+ margin-left: auto;
2188
+ margin-right: auto;
2185
2189
  }
2186
2190
  .wp-block-navigation__responsive-close:focus {
2187
2191
  outline: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-library",
3
- "version": "7.13.0",
3
+ "version": "7.13.1-next.957ca95e4c.0",
4
4
  "description": "Block library for the WordPress editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -34,32 +34,32 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@babel/runtime": "^7.16.0",
37
- "@wordpress/a11y": "^3.16.0",
38
- "@wordpress/api-fetch": "^6.13.0",
39
- "@wordpress/autop": "^3.16.0",
40
- "@wordpress/blob": "^3.16.0",
41
- "@wordpress/block-editor": "^9.8.0",
42
- "@wordpress/blocks": "^11.15.0",
43
- "@wordpress/components": "^20.0.0",
44
- "@wordpress/compose": "^5.14.0",
45
- "@wordpress/core-data": "^4.14.0",
46
- "@wordpress/data": "^7.0.0",
47
- "@wordpress/date": "^4.16.0",
48
- "@wordpress/deprecated": "^3.16.0",
49
- "@wordpress/dom": "^3.16.0",
50
- "@wordpress/element": "^4.14.0",
51
- "@wordpress/hooks": "^3.16.0",
52
- "@wordpress/html-entities": "^3.16.0",
53
- "@wordpress/i18n": "^4.16.0",
54
- "@wordpress/icons": "^9.7.0",
55
- "@wordpress/keycodes": "^3.16.0",
56
- "@wordpress/notices": "^3.16.0",
57
- "@wordpress/primitives": "^3.14.0",
58
- "@wordpress/reusable-blocks": "^3.14.0",
59
- "@wordpress/rich-text": "^5.14.0",
60
- "@wordpress/server-side-render": "^3.14.0",
61
- "@wordpress/url": "^3.17.0",
62
- "@wordpress/viewport": "^4.14.0",
37
+ "@wordpress/a11y": "^3.16.1-next.957ca95e4c.0",
38
+ "@wordpress/api-fetch": "^6.13.1-next.957ca95e4c.0",
39
+ "@wordpress/autop": "^3.16.1-next.957ca95e4c.0",
40
+ "@wordpress/blob": "^3.16.1-next.957ca95e4c.0",
41
+ "@wordpress/block-editor": "^9.8.1-next.957ca95e4c.0",
42
+ "@wordpress/blocks": "^11.15.1-next.957ca95e4c.0",
43
+ "@wordpress/components": "^20.0.2-next.957ca95e4c.0",
44
+ "@wordpress/compose": "^5.14.1-next.957ca95e4c.0",
45
+ "@wordpress/core-data": "^5.0.1-next.957ca95e4c.0",
46
+ "@wordpress/data": "^7.0.1-next.957ca95e4c.0",
47
+ "@wordpress/date": "^4.16.1-next.957ca95e4c.0",
48
+ "@wordpress/deprecated": "^3.16.1-next.957ca95e4c.0",
49
+ "@wordpress/dom": "^3.16.1-next.957ca95e4c.0",
50
+ "@wordpress/element": "^4.14.1-next.957ca95e4c.0",
51
+ "@wordpress/hooks": "^3.16.1-next.957ca95e4c.0",
52
+ "@wordpress/html-entities": "^3.16.1-next.957ca95e4c.0",
53
+ "@wordpress/i18n": "^4.16.1-next.957ca95e4c.0",
54
+ "@wordpress/icons": "^9.7.1-next.957ca95e4c.0",
55
+ "@wordpress/keycodes": "^3.16.1-next.957ca95e4c.0",
56
+ "@wordpress/notices": "^3.16.1-next.957ca95e4c.0",
57
+ "@wordpress/primitives": "^3.14.1-next.957ca95e4c.0",
58
+ "@wordpress/reusable-blocks": "^3.14.1-next.957ca95e4c.0",
59
+ "@wordpress/rich-text": "^5.14.1-next.957ca95e4c.0",
60
+ "@wordpress/server-side-render": "^3.14.1-next.957ca95e4c.0",
61
+ "@wordpress/url": "^3.17.1-next.957ca95e4c.0",
62
+ "@wordpress/viewport": "^4.14.1-next.957ca95e4c.0",
63
63
  "change-case": "^4.1.2",
64
64
  "classnames": "^2.3.1",
65
65
  "colord": "^2.7.0",
@@ -76,5 +76,5 @@
76
76
  "publishConfig": {
77
77
  "access": "public"
78
78
  },
79
- "gitHead": "171b87c7465b93e685e081c5f57f153507363c95"
79
+ "gitHead": "272a74bbbaab10ee24424eafe9578e705fbfbbb4"
80
80
  }
@@ -4,20 +4,12 @@ $blocks-block__margin: 0.5em;
4
4
  // Prefer the link selector instead of the regular button classname
5
5
  // to support the previous markup in addition to the new one.
6
6
  .wp-block-button__link {
7
- box-shadow: none;
8
7
  cursor: pointer;
9
8
  display: inline-block;
10
9
  text-align: center;
11
10
  word-break: break-word; // overflow-wrap doesn't work well if a link is wrapped in the div, so use word-break here.
12
11
  box-sizing: border-box;
13
12
 
14
- &:hover,
15
- &:focus,
16
- &:active,
17
- &:visited {
18
- color: $white;
19
- }
20
-
21
13
  &.aligncenter {
22
14
  text-align: center;
23
15
  }
@@ -32,6 +24,7 @@ $blocks-block__margin: 0.5em;
32
24
  // They are needed for backwards compatibility.
33
25
  :where(.wp-block-button__link) {
34
26
  // This needs a low specificity so it won't override the rules from the button element if defined in theme.json.
27
+ box-shadow: none;
35
28
  text-decoration: none;
36
29
 
37
30
  // 100% causes an oval, but any explicit but really high value retains the pill shape.
@@ -0,0 +1,3 @@
1
+ .wp-block-code code {
2
+ background: none;
3
+ }
@@ -29,9 +29,23 @@ const transforms = {
29
29
  createBlocksFromInnerBlocksTemplate( innerBlocksTemplate )
30
30
  );
31
31
  },
32
- isMatch: ( { length: selectedBlocksLength } ) =>
33
- selectedBlocksLength &&
34
- selectedBlocksLength <= MAXIMUM_SELECTED_BLOCKS,
32
+ isMatch: ( { length: selectedBlocksLength }, blocks ) => {
33
+ // If a user is trying to transform a single Columns block, skip
34
+ // the transformation. Enabling this functiontionality creates
35
+ // nested Columns blocks resulting in an unintuitive user experience.
36
+ // Multiple Columns blocks can still be transformed.
37
+ if (
38
+ blocks.length === 1 &&
39
+ blocks[ 0 ].name === 'core/columns'
40
+ ) {
41
+ return false;
42
+ }
43
+
44
+ return (
45
+ selectedBlocksLength &&
46
+ selectedBlocksLength <= MAXIMUM_SELECTED_BLOCKS
47
+ );
48
+ },
35
49
  },
36
50
  {
37
51
  type: 'block',
@@ -9,7 +9,7 @@ import {
9
9
  __experimentalBlockAlignmentMatrixControl as BlockAlignmentMatrixControl,
10
10
  __experimentalBlockFullHeightAligmentControl as FullHeightAlignmentControl,
11
11
  } from '@wordpress/block-editor';
12
- import { __ } from '@wordpress/i18n';
12
+ import { __, isRTL } from '@wordpress/i18n';
13
13
 
14
14
  /**
15
15
  * Internal dependencies
@@ -58,15 +58,27 @@ export default function CoverBlockControls( {
58
58
  } );
59
59
  };
60
60
 
61
+ // Flip value horizontally to match the physical direction indicated by
62
+ // AlignmentMatrixControl with the logical direction indicated by cover
63
+ // block in RTL languages.
64
+ const flipHorizontalPosition = ( ltrContentPosition ) => {
65
+ return isRTL()
66
+ ? ltrContentPosition.replace( /left|right/, ( match ) =>
67
+ match === 'left' ? 'right' : 'left'
68
+ )
69
+ : ltrContentPosition;
70
+ };
71
+
61
72
  return (
62
73
  <>
63
74
  <BlockControls group="block">
64
75
  <BlockAlignmentMatrixControl
65
76
  label={ __( 'Change content position' ) }
66
- value={ contentPosition }
77
+ value={ flipHorizontalPosition( contentPosition ) }
67
78
  onChange={ ( nextPosition ) =>
68
79
  setAttributes( {
69
- contentPosition: nextPosition,
80
+ contentPosition:
81
+ flipHorizontalPosition( nextPosition ),
70
82
  } )
71
83
  }
72
84
  isDisabled={ ! hasInnerBlocks }
@@ -47,10 +47,6 @@
47
47
  margin: 0;
48
48
  }
49
49
 
50
- .block-editor-block-list__layout {
51
- width: 100%;
52
- }
53
-
54
50
  // The .wp-block-cover class is used just to increase selector specificity.
55
51
  .wp-block-cover__inner-container {
56
52
  // Avoid text align inherit from cover image align.
package/src/editor.scss CHANGED
@@ -5,6 +5,7 @@
5
5
  @import "./button/editor.scss";
6
6
  @import "./buttons/editor.scss";
7
7
  @import "./categories/editor.scss";
8
+ @import "./code/editor.scss";
8
9
  @import "./columns/editor.scss";
9
10
  @import "./comments/editor.scss";
10
11
  @import "./comment-author-avatar/editor.scss";
@@ -1,7 +1,10 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { BlockList } from '@wordpress/block-editor';
4
+ import {
5
+ BlockList,
6
+ __experimentalGetGapCSSValue as getGapCSSValue,
7
+ } from '@wordpress/block-editor';
5
8
  import { useContext, createPortal } from '@wordpress/element';
6
9
 
7
10
  export default function GapStyles( { blockGap, clientId } ) {
@@ -17,17 +20,18 @@ export default function GapStyles( { blockGap, clientId } ) {
17
20
  if ( !! blockGap ) {
18
21
  row =
19
22
  typeof blockGap === 'string'
20
- ? blockGap
21
- : blockGap?.top || fallbackValue;
23
+ ? getGapCSSValue( blockGap )
24
+ : getGapCSSValue( blockGap?.top ) || fallbackValue;
22
25
  column =
23
26
  typeof blockGap === 'string'
24
- ? blockGap
25
- : blockGap?.left || fallbackValue;
27
+ ? getGapCSSValue( blockGap )
28
+ : getGapCSSValue( blockGap?.left ) || fallbackValue;
26
29
  gapValue = row === column ? row : `${ row } ${ column }`;
27
30
  }
28
31
 
32
+ // The unstable gallery gap calculation requires a real value (such as `0px`) and not `0`.
29
33
  const gap = `#block-${ clientId } {
30
- --wp--style--unstable-gallery-gap: ${ column };
34
+ --wp--style--unstable-gallery-gap: ${ column === '0' ? '0px' : column };
31
35
  gap: ${ gapValue }
32
36
  }`;
33
37
 
@@ -51,13 +51,29 @@ function block_core_gallery_render( $attributes, $content ) {
51
51
  if ( is_array( $gap ) ) {
52
52
  foreach ( $gap as $key => $value ) {
53
53
  // Make sure $value is a string to avoid PHP 8.1 deprecation error in preg_match() when the value is null.
54
- $value = is_string( $value ) ? $value : '';
55
- $gap[ $key ] = $value && preg_match( '%[\\\(&=}]|/\*%', $value ) ? null : $value;
54
+ $value = is_string( $value ) ? $value : '';
55
+ $value = $value && preg_match( '%[\\\(&=}]|/\*%', $value ) ? null : $value;
56
+
57
+ // Get spacing CSS variable from preset value if provided.
58
+ if ( is_string( $value ) && str_contains( $value, 'var:preset|spacing|' ) ) {
59
+ $index_to_splice = strrpos( $value, '|' ) + 1;
60
+ $slug = _wp_to_kebab_case( substr( $value, $index_to_splice ) );
61
+ $value = "var(--wp--preset--spacing--$slug)";
62
+ }
63
+
64
+ $gap[ $key ] = $value;
56
65
  }
57
66
  } else {
58
67
  // Make sure $gap is a string to avoid PHP 8.1 deprecation error in preg_match() when the value is null.
59
68
  $gap = is_string( $gap ) ? $gap : '';
60
69
  $gap = $gap && preg_match( '%[\\\(&=}]|/\*%', $gap ) ? null : $gap;
70
+
71
+ // Get spacing CSS variable from preset value if provided.
72
+ if ( is_string( $gap ) && str_contains( $gap, 'var:preset|spacing|' ) ) {
73
+ $index_to_splice = strrpos( $gap, '|' ) + 1;
74
+ $slug = _wp_to_kebab_case( substr( $gap, $index_to_splice ) );
75
+ $gap = "var(--wp--preset--spacing--$slug)";
76
+ }
61
77
  }
62
78
 
63
79
  $class = wp_unique_id( 'wp-block-gallery-' );
@@ -80,6 +96,11 @@ function block_core_gallery_render( $attributes, $content ) {
80
96
  $gap_value = $gap_row === $gap_column ? $gap_row : $gap_row . ' ' . $gap_column;
81
97
  }
82
98
 
99
+ // The unstable gallery gap calculation requires a real value (such as `0px`) and not `0`.
100
+ if ( '0' === $gap_column ) {
101
+ $gap_column = '0px';
102
+ }
103
+
83
104
  // Set the CSS variable to the column value, and the `gap` property to the combined gap value.
84
105
  $style = '.wp-block-gallery.' . $class . '{ --wp--style--unstable-gallery-gap: ' . $gap_column . '; gap: ' . $gap_value . '}';
85
106
 
@@ -39,12 +39,10 @@
39
39
  &::after {
40
40
  content: "";
41
41
  display: flex;
42
- border: $border-width dashed currentColor;
43
- opacity: 0.4;
44
- border-radius: $radius-block-ui;
45
42
  flex: 1 0 $grid-unit-60;
46
43
  pointer-events: none;
47
44
  min-height: $grid-unit-60 - $border-width - $border-width;
45
+ @include placeholder-style();
48
46
  }
49
47
 
50
48
  // Let the parent be selectable in the placeholder area.
@@ -53,28 +51,3 @@
53
51
  pointer-events: all;
54
52
  }
55
53
  }
56
-
57
- // Show an unselected empty group button as a dashed outline instead of the appender button.
58
- // This effectively adds a selectable-to-delete state.
59
- .is-layout-flow.block-editor-block-list__block:not(.is-selected) {
60
- > .block-list-appender:only-child {
61
- pointer-events: none;
62
-
63
- &::after {
64
- content: "";
65
- position: absolute;
66
- top: 0;
67
- right: 0;
68
- bottom: 0;
69
- left: 0;
70
- border: $border-width dashed currentColor;
71
- opacity: 0.4;
72
- border-radius: $radius-block-ui;
73
- pointer-events: none;
74
- }
75
-
76
- .block-editor-inserter {
77
- visibility: hidden;
78
- }
79
- }
80
- }
@@ -23,7 +23,20 @@
23
23
  ],
24
24
  "supports": {
25
25
  "reusable": false,
26
- "html": false
26
+ "html": false,
27
+ "typography": {
28
+ "fontSize": true,
29
+ "lineHeight": true,
30
+ "__experimentalFontFamily": true,
31
+ "__experimentalFontWeight": true,
32
+ "__experimentalFontStyle": true,
33
+ "__experimentalTextTransform": true,
34
+ "__experimentalTextDecoration": true,
35
+ "__experimentalLetterSpacing": true,
36
+ "__experimentalDefaultControls": {
37
+ "fontSize": true
38
+ }
39
+ }
27
40
  },
28
41
  "editorStyle": "wp-block-home-link-editor",
29
42
  "style": "wp-block-home-link"
package/src/image/edit.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * External dependencies
3
3
  */
4
4
  import classnames from 'classnames';
5
- import { get, has, isEmpty, omit, pick } from 'lodash';
5
+ import { get, isEmpty, omit, pick } from 'lodash';
6
6
 
7
7
  /**
8
8
  * WordPress dependencies
@@ -98,8 +98,8 @@ export const isExternalImage = ( id, url ) => url && ! id && ! isBlobURL( url );
98
98
  */
99
99
  function hasDefaultSize( image, defaultSize ) {
100
100
  return (
101
- has( image, [ 'sizes', defaultSize, 'url' ] ) ||
102
- has( image, [ 'media_details', 'sizes', defaultSize, 'source_url' ] )
101
+ 'url' in ( image?.sizes?.[ defaultSize ] ?? {} ) ||
102
+ 'source_url' in ( image?.media_details?.sizes?.[ defaultSize ] ?? {} )
103
103
  );
104
104
  }
105
105