@wordpress/block-library 6.0.6 → 6.0.10

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 (187) hide show
  1. package/build/cover/edit.js +8 -3
  2. package/build/cover/edit.js.map +1 -1
  3. package/build/cover/transforms.js +2 -0
  4. package/build/cover/transforms.js.map +1 -1
  5. package/build/gallery/edit.js +1 -1
  6. package/build/gallery/edit.js.map +1 -1
  7. package/build/gallery/v1/update-gallery-modal.js +1 -1
  8. package/build/gallery/v1/update-gallery-modal.js.map +1 -1
  9. package/build/index.js +4 -3
  10. package/build/index.js.map +1 -1
  11. package/build/navigation/deprecated.js +118 -12
  12. package/build/navigation/deprecated.js.map +1 -1
  13. package/build/navigation/edit/index.js +59 -33
  14. package/build/navigation/edit/index.js.map +1 -1
  15. package/build/navigation/edit/inner-blocks.js +1 -1
  16. package/build/navigation/edit/inner-blocks.js.map +1 -1
  17. package/build/navigation/edit/navigation-menu-selector.js +2 -2
  18. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  19. package/build/navigation/edit/placeholder/index.js +16 -48
  20. package/build/navigation/edit/placeholder/index.js.map +1 -1
  21. package/build/navigation/edit/responsive-wrapper.js +5 -2
  22. package/build/navigation/edit/responsive-wrapper.js.map +1 -1
  23. package/build/navigation/edit/unsaved-inner-blocks.js +4 -35
  24. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  25. package/build/navigation/edit/use-create-navigation-menu.js +50 -0
  26. package/build/navigation/edit/use-create-navigation-menu.js.map +1 -0
  27. package/build/navigation/edit/use-generate-default-navigation-title.js +73 -0
  28. package/build/navigation/edit/use-generate-default-navigation-title.js.map +1 -0
  29. package/build/navigation/index.js +1 -1
  30. package/build/navigation/save.js +2 -2
  31. package/build/navigation/save.js.map +1 -1
  32. package/build/navigation/use-navigation-menu.js +19 -8
  33. package/build/navigation/use-navigation-menu.js.map +1 -1
  34. package/build/navigation-area/edit.js +5 -0
  35. package/build/navigation-area/edit.js.map +1 -1
  36. package/build/page-list/edit.js +40 -42
  37. package/build/page-list/edit.js.map +1 -1
  38. package/build/pattern/index.js +1 -1
  39. package/build/post-featured-image/edit.js +53 -23
  40. package/build/post-featured-image/edit.js.map +1 -1
  41. package/build/post-terms/index.js +1 -1
  42. package/build/post-title/edit.js +2 -2
  43. package/build/post-title/edit.js.map +1 -1
  44. package/build/query-title/index.js +1 -1
  45. package/build/site-logo/index.js +1 -1
  46. package/build/site-tagline/index.js +1 -1
  47. package/build/site-title/index.js +1 -1
  48. package/build/template-part/edit/placeholder/index.js +1 -1
  49. package/build/template-part/edit/placeholder/index.js.map +1 -1
  50. package/build/template-part/index.js +2 -1
  51. package/build/template-part/index.js.map +1 -1
  52. package/build-module/cover/edit.js +8 -3
  53. package/build-module/cover/edit.js.map +1 -1
  54. package/build-module/cover/transforms.js +2 -0
  55. package/build-module/cover/transforms.js.map +1 -1
  56. package/build-module/gallery/edit.js +1 -1
  57. package/build-module/gallery/edit.js.map +1 -1
  58. package/build-module/gallery/v1/update-gallery-modal.js +1 -1
  59. package/build-module/gallery/v1/update-gallery-modal.js.map +1 -1
  60. package/build-module/index.js +4 -3
  61. package/build-module/index.js.map +1 -1
  62. package/build-module/navigation/deprecated.js +118 -12
  63. package/build-module/navigation/deprecated.js.map +1 -1
  64. package/build-module/navigation/edit/index.js +60 -33
  65. package/build-module/navigation/edit/index.js.map +1 -1
  66. package/build-module/navigation/edit/inner-blocks.js +1 -1
  67. package/build-module/navigation/edit/inner-blocks.js.map +1 -1
  68. package/build-module/navigation/edit/navigation-menu-selector.js +2 -2
  69. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  70. package/build-module/navigation/edit/placeholder/index.js +15 -45
  71. package/build-module/navigation/edit/placeholder/index.js.map +1 -1
  72. package/build-module/navigation/edit/responsive-wrapper.js +5 -2
  73. package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
  74. package/build-module/navigation/edit/unsaved-inner-blocks.js +6 -35
  75. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  76. package/build-module/navigation/edit/use-create-navigation-menu.js +36 -0
  77. package/build-module/navigation/edit/use-create-navigation-menu.js.map +1 -0
  78. package/build-module/navigation/edit/use-generate-default-navigation-title.js +57 -0
  79. package/build-module/navigation/edit/use-generate-default-navigation-title.js.map +1 -0
  80. package/build-module/navigation/index.js +1 -1
  81. package/build-module/navigation/save.js +2 -2
  82. package/build-module/navigation/save.js.map +1 -1
  83. package/build-module/navigation/use-navigation-menu.js +19 -8
  84. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  85. package/build-module/navigation-area/edit.js +4 -0
  86. package/build-module/navigation-area/edit.js.map +1 -1
  87. package/build-module/page-list/edit.js +41 -43
  88. package/build-module/page-list/edit.js.map +1 -1
  89. package/build-module/pattern/index.js +1 -1
  90. package/build-module/post-featured-image/edit.js +55 -26
  91. package/build-module/post-featured-image/edit.js.map +1 -1
  92. package/build-module/post-terms/index.js +1 -1
  93. package/build-module/post-title/edit.js +2 -2
  94. package/build-module/post-title/edit.js.map +1 -1
  95. package/build-module/query-title/index.js +1 -1
  96. package/build-module/site-logo/index.js +1 -1
  97. package/build-module/site-tagline/index.js +1 -1
  98. package/build-module/site-title/index.js +1 -1
  99. package/build-module/template-part/edit/placeholder/index.js +2 -2
  100. package/build-module/template-part/edit/placeholder/index.js.map +1 -1
  101. package/build-module/template-part/index.js +2 -1
  102. package/build-module/template-part/index.js.map +1 -1
  103. package/build-style/code/theme-rtl.css +1 -1
  104. package/build-style/code/theme.css +1 -1
  105. package/build-style/cover/style-rtl.css +8 -2
  106. package/build-style/cover/style.css +8 -2
  107. package/build-style/editor-rtl.css +104 -53
  108. package/build-style/editor.css +104 -53
  109. package/build-style/gallery/editor-rtl.css +1 -0
  110. package/build-style/gallery/editor.css +1 -0
  111. package/build-style/navigation/style-rtl.css +40 -3
  112. package/build-style/navigation/style.css +40 -3
  113. package/build-style/post-comments-form/style-rtl.css +18 -0
  114. package/build-style/post-comments-form/style.css +18 -0
  115. package/build-style/post-featured-image/editor-rtl.css +100 -16
  116. package/build-style/post-featured-image/editor.css +100 -16
  117. package/build-style/site-logo/editor-rtl.css +2 -2
  118. package/build-style/site-logo/editor.css +2 -2
  119. package/build-style/social-links/editor-rtl.css +1 -35
  120. package/build-style/social-links/editor.css +1 -35
  121. package/build-style/style-rtl.css +66 -27
  122. package/build-style/style.css +66 -27
  123. package/build-style/theme-rtl.css +1 -1
  124. package/build-style/theme.css +1 -1
  125. package/package.json +8 -8
  126. package/src/calendar/index.php +3 -3
  127. package/src/code/theme.scss +1 -1
  128. package/src/cover/edit.js +8 -1
  129. package/src/cover/style.scss +9 -2
  130. package/src/cover/transforms.js +2 -0
  131. package/src/gallery/edit.js +1 -1
  132. package/src/gallery/editor.scss +1 -0
  133. package/src/gallery/index.php +1 -1
  134. package/src/gallery/v1/update-gallery-modal.js +1 -1
  135. package/src/home-link/index.php +1 -1
  136. package/src/image/index.php +1 -1
  137. package/src/index.js +28 -26
  138. package/src/navigation/block.json +1 -1
  139. package/src/navigation/deprecated.js +105 -4
  140. package/src/navigation/edit/index.js +68 -36
  141. package/src/navigation/edit/inner-blocks.js +2 -1
  142. package/src/navigation/edit/navigation-menu-selector.js +2 -2
  143. package/src/navigation/edit/placeholder/index.js +16 -62
  144. package/src/navigation/edit/responsive-wrapper.js +8 -1
  145. package/src/navigation/edit/unsaved-inner-blocks.js +6 -57
  146. package/src/navigation/edit/use-create-navigation-menu.js +39 -0
  147. package/src/navigation/edit/use-generate-default-navigation-title.js +79 -0
  148. package/src/navigation/index.php +173 -19
  149. package/src/navigation/save.js +2 -2
  150. package/src/navigation/style.scss +56 -5
  151. package/src/navigation/use-navigation-menu.js +20 -9
  152. package/src/navigation-area/edit.js +5 -0
  153. package/src/navigation-area/index.php +2 -1
  154. package/src/navigation-link/index.php +1 -1
  155. package/src/navigation-submenu/index.php +2 -8
  156. package/src/page-list/edit.js +35 -44
  157. package/src/page-list/index.php +10 -5
  158. package/src/pattern/block.json +1 -1
  159. package/src/post-comments-form/style.scss +20 -1
  160. package/src/post-featured-image/edit.js +58 -26
  161. package/src/post-featured-image/editor.scss +124 -20
  162. package/src/post-terms/block.json +1 -1
  163. package/src/post-title/edit.js +2 -2
  164. package/src/query-title/block.json +1 -1
  165. package/src/site-logo/block.json +1 -1
  166. package/src/site-logo/editor.scss +3 -2
  167. package/src/site-tagline/block.json +1 -1
  168. package/src/site-title/block.json +1 -1
  169. package/src/social-links/editor.scss +1 -47
  170. package/src/style.scss +0 -1
  171. package/src/table-of-contents/index.php +1 -1
  172. package/src/template-part/block.json +2 -1
  173. package/src/template-part/edit/placeholder/index.js +2 -2
  174. package/src/template-part/index.php +2 -1
  175. package/build/navigation/edit/navigation-menu-name-modal.js +0 -55
  176. package/build/navigation/edit/navigation-menu-name-modal.js.map +0 -1
  177. package/build/navigation/edit/navigation-menu-publish-button.js +0 -53
  178. package/build/navigation/edit/navigation-menu-publish-button.js.map +0 -1
  179. package/build-module/navigation/edit/navigation-menu-name-modal.js +0 -47
  180. package/build-module/navigation/edit/navigation-menu-name-modal.js.map +0 -1
  181. package/build-module/navigation/edit/navigation-menu-publish-button.js +0 -40
  182. package/build-module/navigation/edit/navigation-menu-publish-button.js.map +0 -1
  183. package/build-style/navigation-submenu/style-rtl.css +0 -97
  184. package/build-style/navigation-submenu/style.css +0 -97
  185. package/src/navigation/edit/navigation-menu-name-modal.js +0 -69
  186. package/src/navigation/edit/navigation-menu-publish-button.js +0 -57
  187. package/src/navigation-submenu/style.scss +0 -25
@@ -401,17 +401,23 @@
401
401
  background-size: auto;
402
402
  }
403
403
  .wp-block-cover-image.has-background-dim:not([class*=-background-color]),
404
- .wp-block-cover.has-background-dim:not([class*=-background-color]) {
404
+ .wp-block-cover-image .has-background-dim:not([class*=-background-color]),
405
+ .wp-block-cover.has-background-dim:not([class*=-background-color]),
406
+ .wp-block-cover .has-background-dim:not([class*=-background-color]) {
405
407
  background-color: #000;
406
408
  }
407
409
  .wp-block-cover-image.has-background-dim::before,
408
- .wp-block-cover.has-background-dim::before {
410
+ .wp-block-cover-image .has-background-dim::before,
411
+ .wp-block-cover.has-background-dim::before,
412
+ .wp-block-cover .has-background-dim::before {
409
413
  content: "";
410
414
  background-color: inherit;
411
415
  }
412
416
  .wp-block-cover-image.has-background-dim:not(.has-background-gradient)::before,
417
+ .wp-block-cover-image .has-background-dim:not(.has-background-gradient)::before,
413
418
  .wp-block-cover-image .wp-block-cover__gradient-background,
414
419
  .wp-block-cover.has-background-dim:not(.has-background-gradient)::before,
420
+ .wp-block-cover .has-background-dim:not(.has-background-gradient)::before,
415
421
  .wp-block-cover .wp-block-cover__gradient-background {
416
422
  position: absolute;
417
423
  top: 0;
@@ -1547,17 +1553,22 @@ ul.has-background {
1547
1553
  }
1548
1554
  .wp-block-navigation .wp-block-navigation__submenu-icon {
1549
1555
  align-self: center;
1550
- height: inherit;
1551
1556
  line-height: 0;
1552
- margin-left: 6px;
1557
+ display: inline-block;
1558
+ vertical-align: middle;
1553
1559
  padding: 0;
1554
1560
  background-color: inherit;
1555
1561
  color: currentColor;
1556
1562
  border: none;
1563
+ margin-left: 0.25em;
1564
+ width: 0.6em;
1565
+ height: 0.6em;
1557
1566
  }
1558
1567
  .wp-block-navigation .wp-block-navigation__submenu-icon svg {
1559
1568
  display: inline-block;
1560
1569
  stroke: currentColor;
1570
+ width: inherit;
1571
+ height: inherit;
1561
1572
  }
1562
1573
 
1563
1574
  .wp-block-navigation .has-child :where(.wp-block-navigation__submenu-container) {
@@ -1642,6 +1653,28 @@ ul.has-background {
1642
1653
  }
1643
1654
  }
1644
1655
 
1656
+ .wp-block-navigation-submenu {
1657
+ position: relative;
1658
+ display: flex;
1659
+ }
1660
+ .wp-block-navigation-submenu .wp-block-navigation__submenu-icon svg {
1661
+ stroke: currentColor;
1662
+ }
1663
+
1664
+ button.wp-block-navigation-item__content {
1665
+ background-color: transparent;
1666
+ border: none;
1667
+ color: currentColor;
1668
+ font-size: inherit;
1669
+ font-family: inherit;
1670
+ line-height: inherit;
1671
+ text-align: left;
1672
+ }
1673
+
1674
+ .wp-block-navigation-submenu__toggle {
1675
+ cursor: pointer;
1676
+ }
1677
+
1645
1678
  /**
1646
1679
  * Margins
1647
1680
  */
@@ -1716,6 +1749,11 @@ ul.has-background {
1716
1749
  display: none;
1717
1750
  }
1718
1751
 
1752
+ .wp-block-navigation__container:only-child,
1753
+ .wp-block-page-list:only-child {
1754
+ flex-grow: 1;
1755
+ }
1756
+
1719
1757
  /**
1720
1758
  * Mobile menu.
1721
1759
  */
@@ -1734,6 +1772,10 @@ ul.has-background {
1734
1772
  justify-content: var(--layout-justify, initial);
1735
1773
  align-items: var(--layout-align, initial);
1736
1774
  }
1775
+ .wp-block-navigation__responsive-container:not(.is-menu-open.is-menu-open) {
1776
+ color: inherit !important;
1777
+ background-color: inherit !important;
1778
+ }
1737
1779
  .wp-block-navigation__responsive-container.is-menu-open {
1738
1780
  display: flex;
1739
1781
  flex-direction: column;
@@ -1787,7 +1829,8 @@ ul.has-background {
1787
1829
  align-items: var(--layout-justification-setting, initial);
1788
1830
  }
1789
1831
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item .wp-block-navigation__submenu-container,
1790
- .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
1832
+ .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,
1833
+ .wp-block-navigation__responsive-container.is-menu-open .wp-block-page-list {
1791
1834
  color: inherit !important;
1792
1835
  background: transparent !important;
1793
1836
  }
@@ -1871,28 +1914,6 @@ html.has-modal-open {
1871
1914
  overflow-wrap: break-word;
1872
1915
  }
1873
1916
 
1874
- .wp-block-navigation-submenu {
1875
- position: relative;
1876
- display: flex;
1877
- }
1878
- .wp-block-navigation-submenu .wp-block-navigation__submenu-icon svg {
1879
- stroke: currentColor;
1880
- }
1881
-
1882
- button.wp-block-navigation-item__content {
1883
- background-color: transparent;
1884
- border: none;
1885
- color: currentColor;
1886
- font-size: inherit;
1887
- font-family: inherit;
1888
- line-height: inherit;
1889
- text-align: left;
1890
- }
1891
-
1892
- .wp-block-navigation-submenu__toggle {
1893
- cursor: pointer;
1894
- }
1895
-
1896
1917
  .wp-block-navigation .wp-block-home-link__content {
1897
1918
  color: inherit;
1898
1919
  display: block;
@@ -2081,6 +2102,24 @@ p.has-background {
2081
2102
  border: none;
2082
2103
  }
2083
2104
 
2105
+ .wp-block-post-comments-form[style*=font-weight] :where(.comment-reply-title) {
2106
+ font-weight: inherit;
2107
+ }
2108
+ .wp-block-post-comments-form[style*=font-family] :where(.comment-reply-title) {
2109
+ font-family: inherit;
2110
+ }
2111
+ .wp-block-post-comments-form[class*=-font-size] :where(.comment-reply-title), .wp-block-post-comments-form[style*=font-size] :where(.comment-reply-title) {
2112
+ font-size: inherit;
2113
+ }
2114
+ .wp-block-post-comments-form[style*=line-height] :where(.comment-reply-title) {
2115
+ line-height: inherit;
2116
+ }
2117
+ .wp-block-post-comments-form[style*=font-style] :where(.comment-reply-title) {
2118
+ font-style: inherit;
2119
+ }
2120
+ .wp-block-post-comments-form[style*=letter-spacing] :where(.comment-reply-title) {
2121
+ letter-spacing: inherit;
2122
+ }
2084
2123
  .wp-block-post-comments-form input[type=submit] {
2085
2124
  border: none;
2086
2125
  box-shadow: none;
@@ -83,7 +83,7 @@
83
83
  color: rgba(255, 255, 255, 0.65);
84
84
  }
85
85
 
86
- .wp-block-code {
86
+ .wp-block-code > code {
87
87
  font-family: Menlo, Consolas, monaco, monospace;
88
88
  color: #1e1e1e;
89
89
  padding: 0.8em 1em;
@@ -83,7 +83,7 @@
83
83
  color: rgba(255, 255, 255, 0.65);
84
84
  }
85
85
 
86
- .wp-block-code {
86
+ .wp-block-code > code {
87
87
  font-family: Menlo, Consolas, monaco, monospace;
88
88
  color: #1e1e1e;
89
89
  padding: 0.8em 1em;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-library",
3
- "version": "6.0.6",
3
+ "version": "6.0.10",
4
4
  "description": "Block library for the WordPress editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -37,11 +37,11 @@
37
37
  "@wordpress/api-fetch": "^5.2.6",
38
38
  "@wordpress/autop": "^3.2.3",
39
39
  "@wordpress/blob": "^3.2.2",
40
- "@wordpress/block-editor": "^8.0.2",
40
+ "@wordpress/block-editor": "^8.0.6",
41
41
  "@wordpress/blocks": "^11.1.4",
42
- "@wordpress/components": "^19.0.2",
42
+ "@wordpress/components": "^19.1.0",
43
43
  "@wordpress/compose": "^5.0.6",
44
- "@wordpress/core-data": "^4.0.7",
44
+ "@wordpress/core-data": "^4.0.8",
45
45
  "@wordpress/data": "^6.1.4",
46
46
  "@wordpress/date": "^4.2.3",
47
47
  "@wordpress/deprecated": "^3.2.3",
@@ -52,14 +52,14 @@
52
52
  "@wordpress/html-entities": "^3.2.3",
53
53
  "@wordpress/i18n": "^4.2.4",
54
54
  "@wordpress/icons": "^6.1.1",
55
- "@wordpress/interface": "^4.1.4",
55
+ "@wordpress/interface": "^4.1.8",
56
56
  "@wordpress/is-shallow-equal": "^4.2.1",
57
57
  "@wordpress/keycodes": "^3.2.4",
58
58
  "@wordpress/notices": "^3.2.7",
59
59
  "@wordpress/primitives": "^3.0.4",
60
- "@wordpress/reusable-blocks": "^3.0.8",
60
+ "@wordpress/reusable-blocks": "^3.0.12",
61
61
  "@wordpress/rich-text": "^5.0.6",
62
- "@wordpress/server-side-render": "^3.0.6",
62
+ "@wordpress/server-side-render": "^3.0.10",
63
63
  "@wordpress/url": "^3.3.1",
64
64
  "@wordpress/viewport": "^4.0.6",
65
65
  "classnames": "^2.3.1",
@@ -73,5 +73,5 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "9a1dd3474d937468e4cf9caf9886ad61ef0a8f50"
76
+ "gitHead": "6d3bd917064b4b194677233ee426f5988fa441b9"
77
77
  }
@@ -19,7 +19,7 @@ function render_block_core_calendar( $attributes ) {
19
19
  // when there are no published posts on the site.
20
20
  if ( ! block_core_calendar_has_published_posts() ) {
21
21
  if ( is_user_logged_in() ) {
22
- return '<div>' . __( 'The calendar block is hidden because there are no published posts.', 'gutenberg' ) . '</div>';
22
+ return '<div>' . __( 'The calendar block is hidden because there are no published posts.' ) . '</div>';
23
23
  }
24
24
  return '';
25
25
  }
@@ -85,7 +85,7 @@ function block_core_calendar_has_published_posts() {
85
85
  }
86
86
 
87
87
  // On single sites we try our own cached option first.
88
- $has_published_posts = get_option( 'gutenberg_calendar_block_has_published_posts', null );
88
+ $has_published_posts = get_option( 'wp_calendar_block_has_published_posts', null );
89
89
  if ( null !== $has_published_posts ) {
90
90
  return (bool) $has_published_posts;
91
91
  }
@@ -103,7 +103,7 @@ function block_core_calendar_has_published_posts() {
103
103
  function block_core_calendar_update_has_published_posts() {
104
104
  global $wpdb;
105
105
  $has_published_posts = (bool) $wpdb->get_var( "SELECT 1 as test FROM {$wpdb->posts} WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1" );
106
- update_option( 'gutenberg_calendar_block_has_published_posts', $has_published_posts );
106
+ update_option( 'wp_calendar_block_has_published_posts', $has_published_posts );
107
107
  return $has_published_posts;
108
108
  }
109
109
 
@@ -1,4 +1,4 @@
1
- .wp-block-code {
1
+ .wp-block-code > code {
2
2
  font-family: $editor-html-font;
3
3
  color: $gray-900;
4
4
  padding: 0.8em 1em;
package/src/cover/edit.js CHANGED
@@ -310,6 +310,7 @@ function CoverEdit( {
310
310
  setAttributes,
311
311
  setOverlayColor,
312
312
  toggleSelection,
313
+ markNextChangeAsNotPersistent,
313
314
  } ) {
314
315
  const {
315
316
  contentPosition,
@@ -391,6 +392,8 @@ function CoverEdit( {
391
392
  );
392
393
 
393
394
  useEffect( () => {
395
+ // This side-effect should not create an undo level.
396
+ markNextChangeAsNotPersistent();
394
397
  setAttributes( { isDark: isCoverDark } );
395
398
  }, [ isCoverDark ] );
396
399
 
@@ -769,10 +772,14 @@ function CoverEdit( {
769
772
 
770
773
  export default compose( [
771
774
  withDispatch( ( dispatch ) => {
772
- const { toggleSelection } = dispatch( blockEditorStore );
775
+ const {
776
+ toggleSelection,
777
+ __unstableMarkNextChangeAsNotPersistent,
778
+ } = dispatch( blockEditorStore );
773
779
 
774
780
  return {
775
781
  toggleSelection,
782
+ markNextChangeAsNotPersistent: __unstableMarkNextChangeAsNotPersistent,
776
783
  };
777
784
  } ),
778
785
  withColors( { overlayColor: 'background-color' } ),
@@ -43,16 +43,23 @@
43
43
  * - Issue with background color specificity: https://github.com/WordPress/gutenberg/issues/26545
44
44
  * - Issue with alternative fix: https://github.com/WordPress/gutenberg/issues/26545
45
45
  */
46
- &.has-background-dim:not([class*="-background-color"]) {
46
+
47
+ // the first selector is required for old Cover markup
48
+ &.has-background-dim:not([class*="-background-color"]),
49
+ .has-background-dim:not([class*="-background-color"]) {
47
50
  background-color: $black;
48
51
  }
49
52
 
50
- &.has-background-dim::before {
53
+ // the first selector is required for old Cover markup
54
+ &.has-background-dim::before,
55
+ .has-background-dim::before {
51
56
  content: "";
52
57
  background-color: inherit;
53
58
  }
54
59
 
60
+ // the first selector is required for old Cover markup
55
61
  &.has-background-dim:not(.has-background-gradient)::before,
62
+ .has-background-dim:not(.has-background-gradient)::before,
56
63
  .wp-block-cover__gradient-background {
57
64
  position: absolute;
58
65
  top: 0;
@@ -17,6 +17,7 @@ const transforms = {
17
17
  createBlock(
18
18
  'core/cover',
19
19
  {
20
+ dimRatio: 50,
20
21
  url,
21
22
  alt,
22
23
  align,
@@ -43,6 +44,7 @@ const transforms = {
43
44
  createBlock(
44
45
  'core/cover',
45
46
  {
47
+ dimRatio: 50,
46
48
  url: src,
47
49
  align,
48
50
  id,
@@ -498,7 +498,7 @@ function GalleryEdit( props ) {
498
498
  hideCancelButton={ true }
499
499
  />
500
500
  ) }
501
- { Platform.isWeb && ! imageSizeOptions && (
501
+ { Platform.isWeb && ! imageSizeOptions && hasImageIds && (
502
502
  <BaseControl className={ 'gallery-image-sizes' }>
503
503
  <BaseControl.VisualLabel>
504
504
  { __( 'Image size' ) }
@@ -128,6 +128,7 @@ figure.wp-block-gallery {
128
128
  bottom: 0;
129
129
  left: 0;
130
130
  z-index: 1;
131
+ pointer-events: none;
131
132
  }
132
133
  }
133
134
 
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Server-side rendering of the `core/image` block.
4
4
  *
5
- * @package gutenberg
5
+ * @package WordPress
6
6
  */
7
7
 
8
8
  /**
@@ -39,7 +39,7 @@ export const updateGallery = ( {
39
39
  }
40
40
  const innerBlocks = images.map( ( image ) =>
41
41
  createBlock( 'core/image', {
42
- id: parseInt( image.id, 10 ),
42
+ id: image.id ? parseInt( image.id, 10 ) : null,
43
43
  url: image.url,
44
44
  alt: image.alt,
45
45
  caption: image.caption,
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Server-side rendering of the `core/home-link` block.
4
4
  *
5
- * @package gutenberg
5
+ * @package WordPress
6
6
  */
7
7
 
8
8
  /**
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Server-side rendering of the `core/image` block.
4
4
  *
5
- * @package gutenberg
5
+ * @package WordPress
6
6
  */
7
7
 
8
8
  /**
package/src/index.js CHANGED
@@ -149,54 +149,55 @@ export const __experimentalGetCoreBlocks = () => [
149
149
  html,
150
150
  latestComments,
151
151
  latestPosts,
152
- logInOut,
153
152
  mediaText,
154
153
  missing,
155
154
  more,
156
- navigation,
157
- navigationArea,
158
- navigationLink,
159
- navigationSubmenu,
160
155
  nextpage,
161
156
  pageList,
162
157
  pattern,
163
- postAuthor,
164
- postComments,
165
- postContent,
166
- postDate,
167
- postExcerpt,
168
- postFeaturedImage,
169
- postNavigationLink,
170
- postTemplate,
171
- postTerms,
172
- postTitle,
173
158
  preformatted,
174
159
  pullquote,
175
- query,
176
- queryPagination,
177
- queryPaginationNext,
178
- queryPaginationNumbers,
179
- queryPaginationPrevious,
180
- queryTitle,
181
160
  reusableBlock,
182
161
  rss,
183
162
  search,
184
163
  separator,
185
164
  shortcode,
186
- siteLogo,
187
- siteTagline,
188
- siteTitle,
189
165
  socialLink,
190
166
  socialLinks,
191
167
  spacer,
192
168
  table,
193
169
  // tableOfContents,
194
170
  tagCloud,
195
- templatePart,
196
- termDescription,
197
171
  textColumns,
198
172
  verse,
199
173
  video,
174
+
175
+ // theme blocks
176
+ navigation,
177
+ navigationLink,
178
+ navigationSubmenu,
179
+ siteLogo,
180
+ siteTitle,
181
+ siteTagline,
182
+ query,
183
+ templatePart,
184
+ postTitle,
185
+ postExcerpt,
186
+ postFeaturedImage,
187
+ postContent,
188
+ postAuthor,
189
+ postDate,
190
+ postTerms,
191
+ postNavigationLink,
192
+ postTemplate,
193
+ queryPagination,
194
+ queryPaginationNext,
195
+ queryPaginationNumbers,
196
+ queryPaginationPrevious,
197
+ postComments,
198
+ logInOut,
199
+ termDescription,
200
+ queryTitle,
200
201
  ];
201
202
 
202
203
  /**
@@ -253,6 +254,7 @@ export const __experimentalRegisterExperimentalCoreBlocks =
253
254
  commentReplyLink,
254
255
  commentTemplate,
255
256
  commentsQueryLoop,
257
+ navigationArea,
256
258
  postComment,
257
259
  postCommentsCount,
258
260
  postCommentsForm,
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "textdomain": "default",
13
13
  "attributes": {
14
- "navigationMenuId": {
14
+ "ref": {
15
15
  "type": "number"
16
16
  },
17
17
  "textColor": {
@@ -21,6 +21,13 @@ const TYPOGRAPHY_PRESET_DEPRECATION_MAP = {
21
21
  textTransform: 'var:preset|text-transform|',
22
22
  };
23
23
 
24
+ const migrateIdToRef = ( { navigationMenuId, ...attributes } ) => {
25
+ return {
26
+ ...attributes,
27
+ ref: navigationMenuId,
28
+ };
29
+ };
30
+
24
31
  const migrateWithLayout = ( attributes ) => {
25
32
  if ( !! attributes.layout ) {
26
33
  return attributes;
@@ -47,6 +54,97 @@ const migrateWithLayout = ( attributes ) => {
47
54
  return updatedAttributes;
48
55
  };
49
56
 
57
+ const v6 = {
58
+ attributes: {
59
+ navigationMenuId: {
60
+ type: 'number',
61
+ },
62
+ textColor: {
63
+ type: 'string',
64
+ },
65
+ customTextColor: {
66
+ type: 'string',
67
+ },
68
+ rgbTextColor: {
69
+ type: 'string',
70
+ },
71
+ backgroundColor: {
72
+ type: 'string',
73
+ },
74
+ customBackgroundColor: {
75
+ type: 'string',
76
+ },
77
+ rgbBackgroundColor: {
78
+ type: 'string',
79
+ },
80
+ showSubmenuIcon: {
81
+ type: 'boolean',
82
+ default: true,
83
+ },
84
+ openSubmenusOnClick: {
85
+ type: 'boolean',
86
+ default: false,
87
+ },
88
+ overlayMenu: {
89
+ type: 'string',
90
+ default: 'mobile',
91
+ },
92
+ __unstableLocation: {
93
+ type: 'string',
94
+ },
95
+ overlayBackgroundColor: {
96
+ type: 'string',
97
+ },
98
+ customOverlayBackgroundColor: {
99
+ type: 'string',
100
+ },
101
+ overlayTextColor: {
102
+ type: 'string',
103
+ },
104
+ customOverlayTextColor: {
105
+ type: 'string',
106
+ },
107
+ },
108
+ supports: {
109
+ align: [ 'wide', 'full' ],
110
+ anchor: true,
111
+ html: false,
112
+ inserter: true,
113
+ typography: {
114
+ fontSize: true,
115
+ lineHeight: true,
116
+ __experimentalFontStyle: true,
117
+ __experimentalFontWeight: true,
118
+ __experimentalTextTransform: true,
119
+ __experimentalFontFamily: true,
120
+ __experimentalTextDecoration: true,
121
+ __experimentalDefaultControls: {
122
+ fontSize: true,
123
+ },
124
+ },
125
+ spacing: {
126
+ blockGap: true,
127
+ units: [ 'px', 'em', 'rem', 'vh', 'vw' ],
128
+ __experimentalDefaultControls: {
129
+ blockGap: true,
130
+ },
131
+ },
132
+ __experimentalLayout: {
133
+ allowSwitching: false,
134
+ allowInheriting: false,
135
+ default: {
136
+ type: 'flex',
137
+ setCascadingProperties: true,
138
+ },
139
+ },
140
+ },
141
+ save() {
142
+ return <InnerBlocks.Content />;
143
+ },
144
+ isEligible: ( { navigationMenuId } ) => !! navigationMenuId,
145
+ migrate: migrateIdToRef,
146
+ };
147
+
50
148
  const v5 = {
51
149
  attributes: {
52
150
  navigationMenuId: {
@@ -135,7 +233,7 @@ const v5 = {
135
233
  },
136
234
  isEligible: ( { itemsJustification, orientation } ) =>
137
235
  !! itemsJustification || !! orientation,
138
- migrate: migrateWithLayout,
236
+ migrate: compose( migrateIdToRef, migrateWithLayout ),
139
237
  };
140
238
 
141
239
  const v4 = {
@@ -218,7 +316,7 @@ const v4 = {
218
316
  save() {
219
317
  return <InnerBlocks.Content />;
220
318
  },
221
- migrate: compose( migrateWithLayout, migrateFontFamily ),
319
+ migrate: compose( migrateIdToRef, migrateWithLayout, migrateFontFamily ),
222
320
  isEligible( { style } ) {
223
321
  return style?.typography?.fontFamily;
224
322
  },
@@ -259,6 +357,7 @@ const migrateTypographyPresets = function ( attributes ) {
259
357
  };
260
358
 
261
359
  const deprecated = [
360
+ v6,
262
361
  v5,
263
362
  v4,
264
363
  // Remove `isResponsive` attribute.
@@ -336,6 +435,7 @@ const deprecated = [
336
435
  return attributes.isResponsive;
337
436
  },
338
437
  migrate: compose(
438
+ migrateIdToRef,
339
439
  migrateWithLayout,
340
440
  migrateFontFamily,
341
441
  migrateIsResponsive
@@ -410,6 +510,7 @@ const deprecated = [
410
510
  return false;
411
511
  },
412
512
  migrate: compose(
513
+ migrateIdToRef,
413
514
  migrateWithLayout,
414
515
  migrateFontFamily,
415
516
  migrateTypographyPresets
@@ -454,7 +555,7 @@ const deprecated = [
454
555
  html: false,
455
556
  inserter: true,
456
557
  },
457
- migrate( attributes ) {
558
+ migrate: compose( migrateIdToRef, ( attributes ) => {
458
559
  return {
459
560
  ...omit( attributes, [ 'rgbTextColor', 'rgbBackgroundColor' ] ),
460
561
  customTextColor: attributes.textColor
@@ -464,7 +565,7 @@ const deprecated = [
464
565
  ? undefined
465
566
  : attributes.rgbBackgroundColor,
466
567
  };
467
- },
568
+ } ),
468
569
  save() {
469
570
  return <InnerBlocks.Content />;
470
571
  },