@wordpress/block-editor 9.8.0 → 9.8.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 (149) hide show
  1. package/build/components/block-list/block-list-compact.native.js +73 -0
  2. package/build/components/block-list/block-list-compact.native.js.map +1 -0
  3. package/build/components/block-list/use-block-props/use-focus-first-element.js +1 -1
  4. package/build/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  5. package/build/components/block-popover/index.js +1 -3
  6. package/build/components/block-popover/index.js.map +1 -1
  7. package/build/components/colors-gradients/control.js +1 -0
  8. package/build/components/colors-gradients/control.js.map +1 -1
  9. package/build/components/inner-blocks/index.native.js +6 -2
  10. package/build/components/inner-blocks/index.native.js.map +1 -1
  11. package/build/components/rich-text/index.js +10 -0
  12. package/build/components/rich-text/index.js.map +1 -1
  13. package/build/components/spacing-sizes-control/spacing-input-control.js +6 -1
  14. package/build/components/spacing-sizes-control/spacing-input-control.js.map +1 -1
  15. package/build/components/spacing-sizes-control/utils.js +32 -1
  16. package/build/components/spacing-sizes-control/utils.js.map +1 -1
  17. package/build/components/text-decoration-control/index.js +28 -17
  18. package/build/components/text-decoration-control/index.js.map +1 -1
  19. package/build/components/text-transform-control/index.js +21 -14
  20. package/build/components/text-transform-control/index.js.map +1 -1
  21. package/build/components/writing-flow/index.js +2 -0
  22. package/build/components/writing-flow/index.js.map +1 -1
  23. package/build/components/writing-flow/use-select-all.js +7 -10
  24. package/build/components/writing-flow/use-select-all.js.map +1 -1
  25. package/build/hooks/align.js +3 -1
  26. package/build/hooks/align.js.map +1 -1
  27. package/build/hooks/anchor.js +3 -7
  28. package/build/hooks/anchor.js.map +1 -1
  29. package/build/hooks/dimensions.js +6 -6
  30. package/build/hooks/dimensions.js.map +1 -1
  31. package/build/hooks/font-appearance.js +2 -1
  32. package/build/hooks/font-appearance.js.map +1 -1
  33. package/build/hooks/font-family.js +3 -1
  34. package/build/hooks/font-family.js.map +1 -1
  35. package/build/hooks/font-size.js +3 -1
  36. package/build/hooks/font-size.js.map +1 -1
  37. package/build/hooks/gap.js +23 -6
  38. package/build/hooks/gap.js.map +1 -1
  39. package/build/hooks/layout.js +3 -1
  40. package/build/hooks/layout.js.map +1 -1
  41. package/build/hooks/letter-spacing.js +2 -1
  42. package/build/hooks/letter-spacing.js.map +1 -1
  43. package/build/hooks/line-height.js +2 -1
  44. package/build/hooks/line-height.js.map +1 -1
  45. package/build/hooks/lock.js +3 -7
  46. package/build/hooks/lock.js.map +1 -1
  47. package/build/hooks/text-decoration.js +2 -1
  48. package/build/hooks/text-decoration.js.map +1 -1
  49. package/build/hooks/text-transform.js +2 -1
  50. package/build/hooks/text-transform.js.map +1 -1
  51. package/build/layouts/constrained.js +12 -2
  52. package/build/layouts/constrained.js.map +1 -1
  53. package/build/layouts/flow.js +12 -2
  54. package/build/layouts/flow.js.map +1 -1
  55. package/build-module/components/block-list/block-list-compact.native.js +58 -0
  56. package/build-module/components/block-list/block-list-compact.native.js.map +1 -0
  57. package/build-module/components/block-list/use-block-props/use-focus-first-element.js +1 -1
  58. package/build-module/components/block-list/use-block-props/use-focus-first-element.js.map +1 -1
  59. package/build-module/components/block-popover/index.js +1 -3
  60. package/build-module/components/block-popover/index.js.map +1 -1
  61. package/build-module/components/colors-gradients/control.js +1 -0
  62. package/build-module/components/colors-gradients/control.js.map +1 -1
  63. package/build-module/components/inner-blocks/index.native.js +5 -2
  64. package/build-module/components/inner-blocks/index.native.js.map +1 -1
  65. package/build-module/components/rich-text/index.js +10 -0
  66. package/build-module/components/rich-text/index.js.map +1 -1
  67. package/build-module/components/spacing-sizes-control/spacing-input-control.js +7 -2
  68. package/build-module/components/spacing-sizes-control/spacing-input-control.js.map +1 -1
  69. package/build-module/components/spacing-sizes-control/utils.js +30 -1
  70. package/build-module/components/spacing-sizes-control/utils.js.map +1 -1
  71. package/build-module/components/text-decoration-control/index.js +25 -18
  72. package/build-module/components/text-decoration-control/index.js.map +1 -1
  73. package/build-module/components/text-transform-control/index.js +19 -15
  74. package/build-module/components/text-transform-control/index.js.map +1 -1
  75. package/build-module/components/writing-flow/index.js +2 -0
  76. package/build-module/components/writing-flow/index.js.map +1 -1
  77. package/build-module/components/writing-flow/use-select-all.js +7 -10
  78. package/build-module/components/writing-flow/use-select-all.js.map +1 -1
  79. package/build-module/hooks/align.js +4 -2
  80. package/build-module/hooks/align.js.map +1 -1
  81. package/build-module/hooks/anchor.js +3 -6
  82. package/build-module/hooks/anchor.js.map +1 -1
  83. package/build-module/hooks/dimensions.js +6 -6
  84. package/build-module/hooks/dimensions.js.map +1 -1
  85. package/build-module/hooks/font-appearance.js +2 -1
  86. package/build-module/hooks/font-appearance.js.map +1 -1
  87. package/build-module/hooks/font-family.js +3 -1
  88. package/build-module/hooks/font-family.js.map +1 -1
  89. package/build-module/hooks/font-size.js +3 -1
  90. package/build-module/hooks/font-size.js.map +1 -1
  91. package/build-module/hooks/gap.js +22 -6
  92. package/build-module/hooks/gap.js.map +1 -1
  93. package/build-module/hooks/layout.js +4 -2
  94. package/build-module/hooks/layout.js.map +1 -1
  95. package/build-module/hooks/letter-spacing.js +2 -1
  96. package/build-module/hooks/letter-spacing.js.map +1 -1
  97. package/build-module/hooks/line-height.js +2 -1
  98. package/build-module/hooks/line-height.js.map +1 -1
  99. package/build-module/hooks/lock.js +3 -6
  100. package/build-module/hooks/lock.js.map +1 -1
  101. package/build-module/hooks/text-decoration.js +2 -1
  102. package/build-module/hooks/text-decoration.js.map +1 -1
  103. package/build-module/hooks/text-transform.js +2 -1
  104. package/build-module/hooks/text-transform.js.map +1 -1
  105. package/build-module/layouts/constrained.js +13 -3
  106. package/build-module/layouts/constrained.js.map +1 -1
  107. package/build-module/layouts/flow.js +13 -3
  108. package/build-module/layouts/flow.js.map +1 -1
  109. package/build-style/style-rtl.css +42 -41
  110. package/build-style/style.css +42 -41
  111. package/package.json +28 -28
  112. package/src/components/block-list/block-list-compact.native.js +62 -0
  113. package/src/components/block-list/style.scss +29 -6
  114. package/src/components/block-list/use-block-props/use-focus-first-element.js +1 -1
  115. package/src/components/block-popover/index.js +0 -2
  116. package/src/components/block-switcher/test/index.js +1 -2
  117. package/src/components/button-block-appender/style.scss +23 -0
  118. package/src/components/colors-gradients/control.js +1 -0
  119. package/src/components/inner-blocks/index.native.js +5 -1
  120. package/src/components/rich-text/index.js +9 -0
  121. package/src/components/spacing-sizes-control/spacing-input-control.js +5 -0
  122. package/src/components/spacing-sizes-control/test/utils.js +26 -0
  123. package/src/components/spacing-sizes-control/utils.js +36 -9
  124. package/src/components/text-decoration-control/index.js +41 -30
  125. package/src/components/text-decoration-control/stories/index.js +37 -0
  126. package/src/components/text-transform-control/index.js +27 -27
  127. package/src/components/text-transform-control/stories/index.js +37 -0
  128. package/src/components/writing-flow/index.js +2 -0
  129. package/src/components/writing-flow/use-select-all.js +10 -13
  130. package/src/hooks/align.js +2 -2
  131. package/src/hooks/anchor.js +1 -6
  132. package/src/hooks/dimensions.js +7 -8
  133. package/src/hooks/font-appearance.js +1 -0
  134. package/src/hooks/font-family.js +2 -0
  135. package/src/hooks/font-size.js +2 -0
  136. package/src/hooks/gap.js +43 -25
  137. package/src/hooks/layout.js +2 -2
  138. package/src/hooks/letter-spacing.js +1 -0
  139. package/src/hooks/line-height.js +1 -0
  140. package/src/hooks/lock.js +1 -6
  141. package/src/hooks/test/gap.js +16 -22
  142. package/src/hooks/text-decoration.js +1 -0
  143. package/src/hooks/text-transform.js +1 -0
  144. package/src/hooks/typography.scss +0 -6
  145. package/src/layouts/constrained.js +12 -9
  146. package/src/layouts/flow.js +12 -10
  147. package/src/style.scss +0 -2
  148. package/src/components/text-decoration-control/style.scss +0 -18
  149. package/src/components/text-transform-control/style.scss +0 -18
@@ -164,9 +164,6 @@
164
164
  margin: 0;
165
165
  }
166
166
 
167
- /**
168
- * Notices & Block Selected/Hover Styles.
169
- */
170
167
  /**
171
168
  * Cross-Block Selection
172
169
  */
@@ -233,6 +230,14 @@
233
230
  .block-editor-block-list__layout .is-block-moving-mode.can-insert-moving-block.block-editor-block-list__block.is-selected::before {
234
231
  border-color: var(--wp-admin-theme-color);
235
232
  }
233
+ .has-multi-selection .block-editor-block-list__layout {
234
+ -webkit-user-select: none;
235
+ user-select: none;
236
+ }
237
+ .block-editor-block-list__layout [class^=components-] {
238
+ -webkit-user-select: text;
239
+ user-select: text;
240
+ }
236
241
 
237
242
  .is-block-moving-mode.block-editor-block-list__block-selection-button {
238
243
  opacity: 0;
@@ -243,6 +248,8 @@
243
248
 
244
249
  .block-editor-block-list__layout .block-editor-block-list__block {
245
250
  position: relative;
251
+ -webkit-user-select: text;
252
+ user-select: text;
246
253
  overflow-wrap: break-word;
247
254
  /**
248
255
  * Notices
@@ -254,6 +261,12 @@
254
261
  * Block styles and alignments
255
262
  */
256
263
  }
264
+ .block-editor-block-list__layout .block-editor-block-list__block.is-partially-selected::after {
265
+ height: 0;
266
+ }
267
+ .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after, .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after {
268
+ height: auto;
269
+ }
257
270
  .block-editor-block-list__layout .block-editor-block-list__block .reusable-block-edit-panel * {
258
271
  z-index: 1;
259
272
  }
@@ -299,7 +312,14 @@
299
312
  bottom: 0;
300
313
  right: 0;
301
314
  border-radius: 2px;
302
- box-shadow: 0 0 0 var(--wp-admin-border-width-focus) transparent;
315
+ box-shadow: 0 0 0 0 transparent;
316
+ transition: box-shadow 0.1s linear;
317
+ }
318
+ @media (prefers-reduced-motion: reduce) {
319
+ .block-editor-block-list__layout .block-editor-block-list__block::after {
320
+ transition-duration: 0s;
321
+ transition-delay: 0s;
322
+ }
303
323
  }
304
324
  .block-editor-block-list__layout .block-editor-block-list__block.has-warning {
305
325
  min-height: 48px;
@@ -1676,6 +1696,24 @@
1676
1696
  color: #000;
1677
1697
  }
1678
1698
 
1699
+ .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child {
1700
+ pointer-events: none;
1701
+ }
1702
+ .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after {
1703
+ content: "";
1704
+ position: absolute;
1705
+ top: 0;
1706
+ left: 0;
1707
+ bottom: 0;
1708
+ right: 0;
1709
+ pointer-events: none;
1710
+ border: 1px dashed currentColor;
1711
+ border-radius: 2px;
1712
+ }
1713
+ .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter {
1714
+ visibility: hidden;
1715
+ }
1716
+
1679
1717
  .block-editor-color-gradient-control .block-editor-color-gradient-control__color-indicator {
1680
1718
  margin-bottom: 12px;
1681
1719
  }
@@ -3199,38 +3237,6 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
3199
3237
  z-index: 100000;
3200
3238
  }
3201
3239
 
3202
- .block-editor-text-transform-control {
3203
- flex: 0 0 50%;
3204
- }
3205
- .block-editor-text-transform-control legend {
3206
- margin-bottom: 8px;
3207
- }
3208
- .block-editor-text-transform-control .block-editor-text-transform-control__buttons {
3209
- display: inline-flex;
3210
- margin-bottom: 24px;
3211
- }
3212
- .block-editor-text-transform-control .block-editor-text-transform-control__buttons .components-button.has-icon {
3213
- min-width: 24px;
3214
- padding: 0;
3215
- margin-left: 4px;
3216
- }
3217
-
3218
- .block-editor-text-decoration-control {
3219
- flex: 0 0 50%;
3220
- }
3221
- .block-editor-text-decoration-control legend {
3222
- margin-bottom: 8px;
3223
- }
3224
- .block-editor-text-decoration-control .block-editor-text-decoration-control__buttons {
3225
- display: inline-flex;
3226
- margin-bottom: 24px;
3227
- }
3228
- .block-editor-text-decoration-control .block-editor-text-decoration-control__buttons .components-button.has-icon {
3229
- min-width: 24px;
3230
- padding: 0;
3231
- margin-left: 4px;
3232
- }
3233
-
3234
3240
  .block-editor-tool-selector__help {
3235
3241
  margin-top: 8px;
3236
3242
  margin-right: -8px;
@@ -3600,11 +3606,6 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
3600
3606
  grid-column: span 1;
3601
3607
  }
3602
3608
 
3603
- .typography-block-support-panel .components-font-size-picker__controls,
3604
- .typography-block-support-panel .block-editor-text-decoration-control__buttons,
3605
- .typography-block-support-panel .block-editor-text-transform-control__buttons {
3606
- margin-bottom: 0;
3607
- }
3608
3609
  .typography-block-support-panel .single-column {
3609
3610
  grid-column: span 1;
3610
3611
  }
@@ -164,9 +164,6 @@
164
164
  margin: 0;
165
165
  }
166
166
 
167
- /**
168
- * Notices & Block Selected/Hover Styles.
169
- */
170
167
  /**
171
168
  * Cross-Block Selection
172
169
  */
@@ -233,6 +230,14 @@
233
230
  .block-editor-block-list__layout .is-block-moving-mode.can-insert-moving-block.block-editor-block-list__block.is-selected::before {
234
231
  border-color: var(--wp-admin-theme-color);
235
232
  }
233
+ .has-multi-selection .block-editor-block-list__layout {
234
+ -webkit-user-select: none;
235
+ user-select: none;
236
+ }
237
+ .block-editor-block-list__layout [class^=components-] {
238
+ -webkit-user-select: text;
239
+ user-select: text;
240
+ }
236
241
 
237
242
  .is-block-moving-mode.block-editor-block-list__block-selection-button {
238
243
  opacity: 0;
@@ -243,6 +248,8 @@
243
248
 
244
249
  .block-editor-block-list__layout .block-editor-block-list__block {
245
250
  position: relative;
251
+ -webkit-user-select: text;
252
+ user-select: text;
246
253
  overflow-wrap: break-word;
247
254
  /**
248
255
  * Notices
@@ -254,6 +261,12 @@
254
261
  * Block styles and alignments
255
262
  */
256
263
  }
264
+ .block-editor-block-list__layout .block-editor-block-list__block.is-partially-selected::after {
265
+ height: 0;
266
+ }
267
+ .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted::after, .block-editor-block-list__layout .block-editor-block-list__block.is-highlighted ~ .is-multi-selected::after {
268
+ height: auto;
269
+ }
257
270
  .block-editor-block-list__layout .block-editor-block-list__block .reusable-block-edit-panel * {
258
271
  z-index: 1;
259
272
  }
@@ -299,7 +312,14 @@
299
312
  bottom: 0;
300
313
  left: 0;
301
314
  border-radius: 2px;
302
- box-shadow: 0 0 0 var(--wp-admin-border-width-focus) transparent;
315
+ box-shadow: 0 0 0 0 transparent;
316
+ transition: box-shadow 0.1s linear;
317
+ }
318
+ @media (prefers-reduced-motion: reduce) {
319
+ .block-editor-block-list__layout .block-editor-block-list__block::after {
320
+ transition-duration: 0s;
321
+ transition-delay: 0s;
322
+ }
303
323
  }
304
324
  .block-editor-block-list__layout .block-editor-block-list__block.has-warning {
305
325
  min-height: 48px;
@@ -1676,6 +1696,24 @@
1676
1696
  color: #000;
1677
1697
  }
1678
1698
 
1699
+ .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child {
1700
+ pointer-events: none;
1701
+ }
1702
+ .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child::after {
1703
+ content: "";
1704
+ position: absolute;
1705
+ top: 0;
1706
+ right: 0;
1707
+ bottom: 0;
1708
+ left: 0;
1709
+ pointer-events: none;
1710
+ border: 1px dashed currentColor;
1711
+ border-radius: 2px;
1712
+ }
1713
+ .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter, .is-layout-flow.block-editor-block-list__block:not(.is-selected) > .block-list-appender:only-child .block-editor-inserter {
1714
+ visibility: hidden;
1715
+ }
1716
+
1679
1717
  .block-editor-color-gradient-control .block-editor-color-gradient-control__color-indicator {
1680
1718
  margin-bottom: 12px;
1681
1719
  }
@@ -3199,38 +3237,6 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
3199
3237
  z-index: 100000;
3200
3238
  }
3201
3239
 
3202
- .block-editor-text-transform-control {
3203
- flex: 0 0 50%;
3204
- }
3205
- .block-editor-text-transform-control legend {
3206
- margin-bottom: 8px;
3207
- }
3208
- .block-editor-text-transform-control .block-editor-text-transform-control__buttons {
3209
- display: inline-flex;
3210
- margin-bottom: 24px;
3211
- }
3212
- .block-editor-text-transform-control .block-editor-text-transform-control__buttons .components-button.has-icon {
3213
- min-width: 24px;
3214
- padding: 0;
3215
- margin-right: 4px;
3216
- }
3217
-
3218
- .block-editor-text-decoration-control {
3219
- flex: 0 0 50%;
3220
- }
3221
- .block-editor-text-decoration-control legend {
3222
- margin-bottom: 8px;
3223
- }
3224
- .block-editor-text-decoration-control .block-editor-text-decoration-control__buttons {
3225
- display: inline-flex;
3226
- margin-bottom: 24px;
3227
- }
3228
- .block-editor-text-decoration-control .block-editor-text-decoration-control__buttons .components-button.has-icon {
3229
- min-width: 24px;
3230
- padding: 0;
3231
- margin-right: 4px;
3232
- }
3233
-
3234
3240
  .block-editor-tool-selector__help {
3235
3241
  margin-top: 8px;
3236
3242
  margin-left: -8px;
@@ -3600,11 +3606,6 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
3600
3606
  grid-column: span 1;
3601
3607
  }
3602
3608
 
3603
- .typography-block-support-panel .components-font-size-picker__controls,
3604
- .typography-block-support-panel .block-editor-text-decoration-control__buttons,
3605
- .typography-block-support-panel .block-editor-text-transform-control__buttons {
3606
- margin-bottom: 0;
3607
- }
3608
3609
  .typography-block-support-panel .single-column {
3609
3610
  grid-column: span 1;
3610
3611
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-editor",
3
- "version": "9.8.0",
3
+ "version": "9.8.1-next.957ca95e4c.0",
4
4
  "description": "Generic block editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -33,32 +33,32 @@
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.16.0",
35
35
  "@react-spring/web": "^9.4.5",
36
- "@wordpress/a11y": "^3.16.0",
37
- "@wordpress/api-fetch": "^6.13.0",
38
- "@wordpress/blob": "^3.16.0",
39
- "@wordpress/blocks": "^11.15.0",
40
- "@wordpress/components": "^20.0.0",
41
- "@wordpress/compose": "^5.14.0",
42
- "@wordpress/data": "^7.0.0",
43
- "@wordpress/date": "^4.16.0",
44
- "@wordpress/deprecated": "^3.16.0",
45
- "@wordpress/dom": "^3.16.0",
46
- "@wordpress/element": "^4.14.0",
47
- "@wordpress/hooks": "^3.16.0",
48
- "@wordpress/html-entities": "^3.16.0",
49
- "@wordpress/i18n": "^4.16.0",
50
- "@wordpress/icons": "^9.7.0",
51
- "@wordpress/is-shallow-equal": "^4.16.0",
52
- "@wordpress/keyboard-shortcuts": "^3.14.0",
53
- "@wordpress/keycodes": "^3.16.0",
54
- "@wordpress/notices": "^3.16.0",
55
- "@wordpress/rich-text": "^5.14.0",
56
- "@wordpress/shortcode": "^3.16.0",
57
- "@wordpress/style-engine": "^0.15.0",
58
- "@wordpress/token-list": "^2.16.0",
59
- "@wordpress/url": "^3.17.0",
60
- "@wordpress/warning": "^2.16.0",
61
- "@wordpress/wordcount": "^3.16.0",
36
+ "@wordpress/a11y": "^3.16.1-next.957ca95e4c.0",
37
+ "@wordpress/api-fetch": "^6.13.1-next.957ca95e4c.0",
38
+ "@wordpress/blob": "^3.16.1-next.957ca95e4c.0",
39
+ "@wordpress/blocks": "^11.15.1-next.957ca95e4c.0",
40
+ "@wordpress/components": "^20.0.2-next.957ca95e4c.0",
41
+ "@wordpress/compose": "^5.14.1-next.957ca95e4c.0",
42
+ "@wordpress/data": "^7.0.1-next.957ca95e4c.0",
43
+ "@wordpress/date": "^4.16.1-next.957ca95e4c.0",
44
+ "@wordpress/deprecated": "^3.16.1-next.957ca95e4c.0",
45
+ "@wordpress/dom": "^3.16.1-next.957ca95e4c.0",
46
+ "@wordpress/element": "^4.14.1-next.957ca95e4c.0",
47
+ "@wordpress/hooks": "^3.16.1-next.957ca95e4c.0",
48
+ "@wordpress/html-entities": "^3.16.1-next.957ca95e4c.0",
49
+ "@wordpress/i18n": "^4.16.1-next.957ca95e4c.0",
50
+ "@wordpress/icons": "^9.7.1-next.957ca95e4c.0",
51
+ "@wordpress/is-shallow-equal": "^4.16.1-next.957ca95e4c.0",
52
+ "@wordpress/keyboard-shortcuts": "^3.14.1-next.957ca95e4c.0",
53
+ "@wordpress/keycodes": "^3.16.1-next.957ca95e4c.0",
54
+ "@wordpress/notices": "^3.16.1-next.957ca95e4c.0",
55
+ "@wordpress/rich-text": "^5.14.1-next.957ca95e4c.0",
56
+ "@wordpress/shortcode": "^3.16.1-next.957ca95e4c.0",
57
+ "@wordpress/style-engine": "^0.15.1-next.957ca95e4c.0",
58
+ "@wordpress/token-list": "^2.16.1-next.957ca95e4c.0",
59
+ "@wordpress/url": "^3.17.1-next.957ca95e4c.0",
60
+ "@wordpress/warning": "^2.16.1-next.957ca95e4c.0",
61
+ "@wordpress/wordcount": "^3.16.1-next.957ca95e4c.0",
62
62
  "change-case": "^4.1.2",
63
63
  "classnames": "^2.3.1",
64
64
  "colord": "^2.7.0",
@@ -79,5 +79,5 @@
79
79
  "publishConfig": {
80
80
  "access": "public"
81
81
  },
82
- "gitHead": "171b87c7465b93e685e081c5f57f153507363c95"
82
+ "gitHead": "272a74bbbaab10ee24424eafe9578e705fbfbbb4"
83
83
  }
@@ -0,0 +1,62 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { View } from 'react-native';
5
+
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import { store as blockEditorStore } from '@wordpress/block-editor';
10
+ import { useSelect } from '@wordpress/data';
11
+
12
+ /**
13
+ * Internal dependencies
14
+ */
15
+ import styles from './style.scss';
16
+ import BlockListBlock from './block';
17
+
18
+ /**
19
+ * NOTE: This is a component currently used by the List block (V2)
20
+ * It only passes the needed props for this block, if other blocks will use it
21
+ * make sure you pass other props that might be required coming from:
22
+ * components/inner-blocks/index.native.js
23
+ */
24
+
25
+ function BlockListCompact( props ) {
26
+ const {
27
+ marginHorizontal = styles.defaultBlock.marginLeft,
28
+ marginVertical = styles.defaultBlock.marginTop,
29
+ rootClientId,
30
+ } = props;
31
+ const { blockClientIds } = useSelect(
32
+ ( select ) => {
33
+ const { getBlockOrder } = select( blockEditorStore );
34
+ const blockOrder = getBlockOrder( rootClientId );
35
+
36
+ return {
37
+ blockClientIds: blockOrder,
38
+ };
39
+ },
40
+ [ rootClientId ]
41
+ );
42
+
43
+ const containerStyle = {
44
+ marginVertical: -marginVertical,
45
+ marginHorizontal: -marginHorizontal,
46
+ };
47
+
48
+ return (
49
+ <View style={ containerStyle }>
50
+ { blockClientIds.map( ( currentClientId ) => (
51
+ <BlockListBlock
52
+ clientId={ currentClientId }
53
+ key={ currentClientId }
54
+ marginHorizontal={ marginHorizontal }
55
+ marginVertical={ marginVertical }
56
+ />
57
+ ) ) }
58
+ </View>
59
+ );
60
+ }
61
+
62
+ export default BlockListCompact;
@@ -4,10 +4,6 @@
4
4
  margin: 0;
5
5
  }
6
6
 
7
- /**
8
- * Notices & Block Selected/Hover Styles.
9
- */
10
-
11
7
  /**
12
8
  * Cross-Block Selection
13
9
  */
@@ -104,8 +100,20 @@
104
100
  border-color: var(--wp-admin-theme-color);
105
101
  }
106
102
  }
107
- }
108
103
 
104
+ // Ensure an accurate partial text selection.
105
+ // To do this, we disable text selection on the main container, then re-enable it only on the
106
+ // elements that actually get selected.
107
+ // To keep in mind: user-select is currently inherited to all nodes inside.
108
+ .has-multi-selection & {
109
+ user-select: none;
110
+ }
111
+
112
+ // Re-enable it on components inside.
113
+ [class^="components-"] {
114
+ user-select: text;
115
+ }
116
+ }
109
117
 
110
118
  .is-block-moving-mode.block-editor-block-list__block-selection-button {
111
119
  // Should be invisible but not unfocusable.
@@ -118,6 +126,19 @@
118
126
  .block-editor-block-list__layout .block-editor-block-list__block {
119
127
  position: relative;
120
128
 
129
+ // Re-enable text-selection on editable blocks.
130
+ user-select: text;
131
+
132
+ // Hide the select style pseudo element as it interferes with the style.
133
+ &.is-partially-selected::after {
134
+ height: 0;
135
+ }
136
+
137
+ &.is-highlighted::after,
138
+ &.is-highlighted ~ .is-multi-selected::after {
139
+ height: auto;
140
+ }
141
+
121
142
  // Break long strings of text without spaces so they don't overflow the block.
122
143
  overflow-wrap: break-word;
123
144
 
@@ -192,7 +213,9 @@
192
213
  bottom: 0;
193
214
  left: 0;
194
215
  border-radius: $radius-block-ui;
195
- box-shadow: 0 0 0 var(--wp-admin-border-width-focus) transparent;
216
+ box-shadow: 0 0 0 0 transparent;
217
+ transition: box-shadow 0.1s linear;
218
+ @include reduce-motion("transition");
196
219
  }
197
220
 
198
221
  // Warnings
@@ -85,7 +85,7 @@ export function useFocusFirstElement( clientId ) {
85
85
  const { ownerDocument } = ref.current;
86
86
 
87
87
  // Do not focus the block if it already contains the active element.
88
- if ( ref.current.contains( ownerDocument.activeElement ) ) {
88
+ if ( isInsideRootBlock( ref.current, ownerDocument.activeElement ) ) {
89
89
  return;
90
90
  }
91
91
 
@@ -66,8 +66,6 @@ function BlockPopover(
66
66
  // Render in the old slot if needed for backward compatibility,
67
67
  // otherwise render in place (not in the default popover slot).
68
68
  __unstableSlotName={ __unstablePopoverSlot || null }
69
- // Observe movement for block animations (especially horizontal).
70
- __unstableObserveElement={ selectedElement }
71
69
  __unstableForcePosition
72
70
  __unstableShift
73
71
  { ...props }
@@ -8,7 +8,6 @@ import { shallow, mount } from 'enzyme';
8
8
  */
9
9
  import { useSelect } from '@wordpress/data';
10
10
  import { registerBlockType, unregisterBlockType } from '@wordpress/blocks';
11
- import { DOWN } from '@wordpress/keycodes';
12
11
  import { Button } from '@wordpress/components';
13
12
  import { copy } from '@wordpress/icons';
14
13
 
@@ -180,7 +179,7 @@ describe( 'BlockSwitcherDropdownMenu', () => {
180
179
  const onToggleStub = jest.fn();
181
180
  const mockKeyDown = {
182
181
  preventDefault: () => {},
183
- keyCode: DOWN,
182
+ code: 'ArrowDown',
184
183
  };
185
184
 
186
185
  afterEach( () => {
@@ -31,3 +31,26 @@
31
31
  color: $black;
32
32
  }
33
33
  }
34
+
35
+ // When the appender shows up in empty container blocks, such as Group and Columns, add an extra click state.
36
+ .block-list-appender:only-child {
37
+ .is-layout-constrained.block-editor-block-list__block:not(.is-selected) > &,
38
+ .is-layout-flow.block-editor-block-list__block:not(.is-selected) > & {
39
+ pointer-events: none;
40
+
41
+ &::after {
42
+ content: "";
43
+ position: absolute;
44
+ top: 0;
45
+ right: 0;
46
+ bottom: 0;
47
+ left: 0;
48
+ pointer-events: none;
49
+ @include placeholder-style();
50
+ }
51
+
52
+ .block-editor-inserter {
53
+ visibility: hidden;
54
+ }
55
+ }
56
+ }
@@ -92,6 +92,7 @@ function ColorGradientControlInner( {
92
92
  ),
93
93
  [ TAB_GRADIENT.value ]: (
94
94
  <GradientPicker
95
+ __nextHasNoMargin
95
96
  value={ gradientValue }
96
97
  onChange={
97
98
  canChooseAColor
@@ -21,6 +21,7 @@ import getBlockContext from './get-block-context';
21
21
  * Internal dependencies
22
22
  */
23
23
  import BlockList from '../block-list';
24
+ import BlockListCompact from '../block-list/block-list-compact';
24
25
  import { useBlockEditContext } from '../block-edit/context';
25
26
  import useBlockSync from '../provider/use-block-sync';
26
27
  import { BlockContextProvider } from '../block-context';
@@ -96,6 +97,7 @@ function UncontrolledInnerBlocks( props ) {
96
97
  blockWidth,
97
98
  __experimentalLayout: layout = defaultLayout,
98
99
  gridProperties,
100
+ useCompactList,
99
101
  } = props;
100
102
 
101
103
  const block = useSelect(
@@ -112,8 +114,10 @@ function UncontrolledInnerBlocks( props ) {
112
114
  templateInsertUpdatesSelection
113
115
  );
114
116
 
117
+ const BlockListComponent = useCompactList ? BlockListCompact : BlockList;
118
+
115
119
  let blockList = (
116
- <BlockList
120
+ <BlockListComponent
117
121
  marginVertical={ marginVertical }
118
122
  marginHorizontal={ marginHorizontal }
119
123
  rootClientId={ clientId }
@@ -115,6 +115,15 @@ function RichTextWrapper(
115
115
  },
116
116
  forwardedRef
117
117
  ) {
118
+ if ( multiline ) {
119
+ deprecated( 'wp.blockEditor.RichText multiline prop', {
120
+ since: '6.1',
121
+ version: '6.3',
122
+ alternative: 'nested blocks (InnerBlocks)',
123
+ link: 'https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/',
124
+ } );
125
+ }
126
+
118
127
  const instanceId = useInstanceId( RichTextWrapper );
119
128
 
120
129
  identifier = identifier || instanceId;
@@ -30,6 +30,7 @@ import {
30
30
  LABELS,
31
31
  getSliderValueFromPreset,
32
32
  getCustomValueFromPreset,
33
+ getPresetValueFromCustomValue,
33
34
  isValueSpacingPreset,
34
35
  } from './utils';
35
36
 
@@ -42,6 +43,9 @@ export default function SpacingInputControl( {
42
43
  type,
43
44
  minimumCustomValue,
44
45
  } ) {
46
+ // Treat value as a preset value if the passed in value matches the value of one of the spacingSizes.
47
+ value = getPresetValueFromCustomValue( value, spacingSizes );
48
+
45
49
  let selectListSizes = spacingSizes;
46
50
  const showRangeControl = spacingSizes.length <= 8;
47
51
 
@@ -216,6 +220,7 @@ export default function SpacingInputControl( {
216
220
  label={ ariaLabel }
217
221
  hideLabelFromVision={ true }
218
222
  className="components-spacing-sizes-control__custom-value-input"
223
+ style={ { gridColumn: '1' } }
219
224
  />
220
225
 
221
226
  <RangeControl
@@ -4,6 +4,7 @@
4
4
  import {
5
5
  isValueSpacingPreset,
6
6
  getCustomValueFromPreset,
7
+ getPresetValueFromCustomValue,
7
8
  getSpacingPresetCssVar,
8
9
  getSpacingPresetSlug,
9
10
  getSliderValueFromPreset,
@@ -40,6 +41,28 @@ describe( 'getCustomValueFromPreset', () => {
40
41
  } );
41
42
  } );
42
43
 
44
+ describe( 'getPresetValueFromCustomValue', () => {
45
+ const spacingSizes = [ { name: 'Small', slug: 20, size: '8px' } ];
46
+ it( 'should return original value if a string in spacing presets var format', () => {
47
+ expect(
48
+ getPresetValueFromCustomValue(
49
+ 'var:preset|spacing|80',
50
+ spacingSizes
51
+ )
52
+ ).toBe( 'var:preset|spacing|80' );
53
+ } );
54
+ it( 'should return value constructed from matching spacingSizes array entry if value matches sizes', () => {
55
+ expect( getPresetValueFromCustomValue( '8px', spacingSizes ) ).toBe(
56
+ 'var:preset|spacing|20'
57
+ );
58
+ } );
59
+ it( 'should return values as-is if no matching preset in spacingSizes array', () => {
60
+ expect(
61
+ getPresetValueFromCustomValue( '1.125rem', spacingSizes )
62
+ ).toBe( '1.125rem' );
63
+ } );
64
+ } );
65
+
43
66
  describe( 'getSpacingPresetCssVar', () => {
44
67
  it( 'should return original value if not a string in spacing presets var format', () => {
45
68
  expect( getSpacingPresetCssVar( '20px' ) ).toBe( '20px' );
@@ -144,6 +167,9 @@ describe( 'isValuesDefined', () => {
144
167
  it( 'should return false if values are not defined', () => {
145
168
  expect( isValuesDefined( undefinedValues ) ).toBe( false );
146
169
  } );
170
+ it( 'should return false if values is passed in as null', () => {
171
+ expect( isValuesDefined( null ) ).toBe( false );
172
+ } );
147
173
  const definedValues = {
148
174
  top: 'var:preset|spacing|30',
149
175
  bottom: 'var:preset|spacing|20',