@wordpress/block-library 9.34.1-next.2f1c7c01b.0 → 9.35.1-next.16d95556a.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 (172) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/block/edit.js +2 -2
  3. package/build/block/edit.js.map +2 -2
  4. package/build/block-keyboard-shortcuts/index.js +17 -7
  5. package/build/block-keyboard-shortcuts/index.js.map +2 -2
  6. package/build/cover/deprecated.js +15 -3
  7. package/build/cover/deprecated.js.map +2 -2
  8. package/build/cover/edit/inspector-controls.js +1 -1
  9. package/build/cover/edit/inspector-controls.js.map +2 -2
  10. package/build/cover/transforms.js +10 -2
  11. package/build/cover/transforms.js.map +2 -2
  12. package/build/embed/icons.js +2 -2
  13. package/build/embed/icons.js.map +2 -2
  14. package/build/embed/variations.js +3 -3
  15. package/build/embed/variations.js.map +2 -2
  16. package/build/heading/index.js +3 -1
  17. package/build/heading/index.js.map +3 -3
  18. package/build/heading/transforms.js +10 -3
  19. package/build/heading/transforms.js.map +2 -2
  20. package/build/heading/variations.js +55 -0
  21. package/build/heading/variations.js.map +7 -0
  22. package/build/html/edit.js +54 -44
  23. package/build/html/edit.js.map +3 -3
  24. package/build/html/modal.js +328 -0
  25. package/build/html/modal.js.map +7 -0
  26. package/build/html/utils.js +72 -0
  27. package/build/html/utils.js.map +7 -0
  28. package/build/navigation-link/edit.js +25 -10
  29. package/build/navigation-link/edit.js.map +2 -2
  30. package/build/navigation-link/link-ui/index.js +8 -3
  31. package/build/navigation-link/link-ui/index.js.map +2 -2
  32. package/build/navigation-link/shared/controls.js +42 -7
  33. package/build/navigation-link/shared/controls.js.map +2 -2
  34. package/build/navigation-link/shared/use-entity-binding.js +31 -2
  35. package/build/navigation-link/shared/use-entity-binding.js.map +3 -3
  36. package/build/paragraph/block.json +1 -3
  37. package/build/paragraph/deprecated.js +65 -12
  38. package/build/paragraph/deprecated.js.map +2 -2
  39. package/build/paragraph/edit.js +14 -25
  40. package/build/paragraph/edit.js.map +2 -2
  41. package/build/paragraph/index.js +3 -1
  42. package/build/paragraph/index.js.map +3 -3
  43. package/build/paragraph/save.js +3 -3
  44. package/build/paragraph/save.js.map +2 -2
  45. package/build/paragraph/transforms.js +7 -1
  46. package/build/paragraph/transforms.js.map +2 -2
  47. package/build/paragraph/variations.js +57 -0
  48. package/build/paragraph/variations.js.map +7 -0
  49. package/build/pullquote/block.json +3 -2
  50. package/build/pullquote/transforms.js +0 -31
  51. package/build/pullquote/transforms.js.map +2 -2
  52. package/build/quote/transforms.js +0 -20
  53. package/build/quote/transforms.js.map +2 -2
  54. package/build-module/block/edit.js +2 -2
  55. package/build-module/block/edit.js.map +2 -2
  56. package/build-module/block-keyboard-shortcuts/index.js +17 -7
  57. package/build-module/block-keyboard-shortcuts/index.js.map +2 -2
  58. package/build-module/cover/deprecated.js +15 -3
  59. package/build-module/cover/deprecated.js.map +2 -2
  60. package/build-module/cover/edit/inspector-controls.js +1 -1
  61. package/build-module/cover/edit/inspector-controls.js.map +2 -2
  62. package/build-module/cover/transforms.js +10 -2
  63. package/build-module/cover/transforms.js.map +2 -2
  64. package/build-module/embed/icons.js +2 -2
  65. package/build-module/embed/icons.js.map +2 -2
  66. package/build-module/embed/variations.js +3 -3
  67. package/build-module/embed/variations.js.map +2 -2
  68. package/build-module/heading/index.js +3 -1
  69. package/build-module/heading/index.js.map +2 -2
  70. package/build-module/heading/transforms.js +10 -3
  71. package/build-module/heading/transforms.js.map +2 -2
  72. package/build-module/heading/variations.js +34 -0
  73. package/build-module/heading/variations.js.map +7 -0
  74. package/build-module/html/edit.js +62 -51
  75. package/build-module/html/edit.js.map +2 -2
  76. package/build-module/html/modal.js +304 -0
  77. package/build-module/html/modal.js.map +7 -0
  78. package/build-module/html/utils.js +46 -0
  79. package/build-module/html/utils.js.map +7 -0
  80. package/build-module/navigation-link/edit.js +25 -10
  81. package/build-module/navigation-link/edit.js.map +2 -2
  82. package/build-module/navigation-link/link-ui/index.js +8 -3
  83. package/build-module/navigation-link/link-ui/index.js.map +2 -2
  84. package/build-module/navigation-link/shared/controls.js +42 -7
  85. package/build-module/navigation-link/shared/controls.js.map +2 -2
  86. package/build-module/navigation-link/shared/use-entity-binding.js +35 -3
  87. package/build-module/navigation-link/shared/use-entity-binding.js.map +2 -2
  88. package/build-module/paragraph/block.json +1 -3
  89. package/build-module/paragraph/deprecated.js +65 -12
  90. package/build-module/paragraph/deprecated.js.map +2 -2
  91. package/build-module/paragraph/edit.js +14 -26
  92. package/build-module/paragraph/edit.js.map +2 -2
  93. package/build-module/paragraph/index.js +3 -1
  94. package/build-module/paragraph/index.js.map +2 -2
  95. package/build-module/paragraph/save.js +3 -3
  96. package/build-module/paragraph/save.js.map +2 -2
  97. package/build-module/paragraph/transforms.js +7 -1
  98. package/build-module/paragraph/transforms.js.map +2 -2
  99. package/build-module/paragraph/variations.js +36 -0
  100. package/build-module/paragraph/variations.js.map +7 -0
  101. package/build-module/pullquote/block.json +3 -2
  102. package/build-module/pullquote/transforms.js +0 -31
  103. package/build-module/pullquote/transforms.js.map +2 -2
  104. package/build-module/quote/transforms.js +0 -20
  105. package/build-module/quote/transforms.js.map +2 -2
  106. package/build-style/accordion-heading/style-rtl.css +19 -3
  107. package/build-style/accordion-heading/style.css +19 -3
  108. package/build-style/accordion-panel/style-rtl.css +4 -1
  109. package/build-style/accordion-panel/style.css +4 -1
  110. package/build-style/common-rtl.css +3 -3
  111. package/build-style/common.css +3 -3
  112. package/build-style/editor-rtl.css +62 -21
  113. package/build-style/editor.css +62 -21
  114. package/build-style/embed/style-rtl.css +5 -0
  115. package/build-style/embed/style.css +5 -0
  116. package/build-style/html/editor-rtl.css +55 -21
  117. package/build-style/html/editor.css +55 -21
  118. package/build-style/navigation-link/editor-rtl.css +7 -0
  119. package/build-style/navigation-link/editor.css +7 -0
  120. package/build-style/style-rtl.css +31 -7
  121. package/build-style/style.css +31 -7
  122. package/package.json +37 -37
  123. package/src/accordion-heading/style.scss +40 -7
  124. package/src/accordion-panel/style.scss +6 -1
  125. package/src/block/edit.js +2 -2
  126. package/src/block-keyboard-shortcuts/index.js +23 -9
  127. package/src/common.scss +6 -5
  128. package/src/cover/deprecated.js +15 -3
  129. package/src/cover/edit/inspector-controls.js +1 -1
  130. package/src/cover/transforms.js +10 -2
  131. package/src/embed/icons.js +2 -4
  132. package/src/embed/style.scss +6 -0
  133. package/src/embed/variations.js +3 -3
  134. package/src/heading/index.js +2 -0
  135. package/src/heading/test/__snapshots__/transforms.native.js.snap +0 -6
  136. package/src/heading/test/transforms.native.js +1 -5
  137. package/src/heading/transforms.js +10 -3
  138. package/src/heading/variations.js +37 -0
  139. package/src/html/edit.js +62 -56
  140. package/src/html/editor.scss +69 -10
  141. package/src/html/modal.js +290 -0
  142. package/src/html/test/utils.js +234 -0
  143. package/src/html/utils.js +75 -0
  144. package/src/navigation-link/edit.js +44 -13
  145. package/src/navigation-link/editor.scss +7 -0
  146. package/src/navigation-link/index.php +65 -2
  147. package/src/navigation-link/link-ui/index.js +9 -8
  148. package/src/navigation-link/shared/controls.js +70 -12
  149. package/src/navigation-link/shared/test/controls.js +5 -0
  150. package/src/navigation-link/shared/test/use-entity-binding.js +14 -1
  151. package/src/navigation-link/shared/use-entity-binding.js +57 -9
  152. package/src/paragraph/block.json +1 -3
  153. package/src/paragraph/deprecated.js +87 -20
  154. package/src/paragraph/edit.js +7 -18
  155. package/src/paragraph/edit.native.js +18 -6
  156. package/src/paragraph/index.js +2 -0
  157. package/src/paragraph/save.js +4 -3
  158. package/src/paragraph/test/__snapshots__/transforms.native.js.snap +0 -6
  159. package/src/paragraph/test/edit.native.js +5 -5
  160. package/src/paragraph/test/transforms.native.js +0 -1
  161. package/src/paragraph/transforms.js +7 -1
  162. package/src/paragraph/variations.js +39 -0
  163. package/src/pullquote/block.json +3 -2
  164. package/src/pullquote/test/__snapshots__/transforms.native.js.snap +5 -5
  165. package/src/pullquote/test/transforms.native.js +1 -1
  166. package/src/pullquote/transforms.js +0 -31
  167. package/src/quote/test/__snapshots__/transforms.native.js.snap +0 -6
  168. package/src/quote/test/transforms.native.js +1 -5
  169. package/src/quote/transforms.js +0 -25
  170. package/src/utils/transformation-categories.native.js +0 -1
  171. package/tsconfig.tsbuildinfo +1 -1
  172. package/src/pullquote/test/edit.native.js +0 -73
@@ -21,6 +21,11 @@
21
21
  }
22
22
  }
23
23
 
24
+ .wp-block-accordion-heading.wp-block-accordion-heading {
25
+ min-width: 100%;
26
+ margin: 0;
27
+ }
28
+
24
29
  .wp-block-accordion-heading__toggle {
25
30
  font-family: inherit;
26
31
  font-size: inherit;
@@ -31,21 +36,32 @@
31
36
  text-decoration: inherit;
32
37
  word-spacing: inherit;
33
38
  font-style: inherit;
34
- background: none;
35
39
  border: none;
36
- color: inherit;
37
40
  padding: var(--wp--preset--spacing--20, 1em) 0;
38
41
  cursor: pointer;
39
42
  overflow: hidden;
40
43
  display: flex;
41
44
  align-items: center;
42
45
  text-align: inherit;
43
- position: relative;
44
46
  width: 100%;
47
+ background-color: inherit !important;
48
+ color: inherit !important;
45
49
  }
46
50
  .wp-block-accordion-heading__toggle:not(:focus-visible) {
47
51
  outline: none;
48
52
  }
53
+ .wp-block-accordion-heading__toggle:hover, .wp-block-accordion-heading__toggle:focus {
54
+ text-decoration: none;
55
+ background-color: inherit !important;
56
+ box-shadow: none;
57
+ color: inherit;
58
+ border: none;
59
+ padding: var(--wp--preset--spacing--20, 1em) 0;
60
+ }
61
+ .wp-block-accordion-heading__toggle:focus-visible {
62
+ outline: auto;
63
+ outline-offset: 0;
64
+ }
49
65
  .wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title {
50
66
  text-decoration: underline;
51
67
  }
@@ -62,7 +78,10 @@
62
78
  justify-content: center;
63
79
  }
64
80
 
65
- .wp-block-accordion-panel[inert], .wp-block-accordion-panel[aria-hidden=true] {
81
+ .wp-block-accordion-panel.wp-block-accordion-panel {
82
+ min-width: 100%;
83
+ }
84
+ .wp-block-accordion-panel.wp-block-accordion-panel[inert], .wp-block-accordion-panel.wp-block-accordion-panel[aria-hidden=true] {
66
85
  display: none;
67
86
  margin-block-start: 0;
68
87
  }
@@ -1150,6 +1169,11 @@ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-blo
1150
1169
  min-height: 240px;
1151
1170
  }
1152
1171
 
1172
+ .wp-block-group.is-layout-flex .wp-block-embed {
1173
+ flex: 1 1 0%;
1174
+ min-width: 0;
1175
+ }
1176
+
1153
1177
  .wp-block-embed {
1154
1178
  overflow-wrap: break-word;
1155
1179
  }
@@ -4597,15 +4621,15 @@ a[data-fn].fn::after {
4597
4621
  font-size: var(--wp--preset--font-size--huge);
4598
4622
  }
4599
4623
 
4600
- .has-text-align-center {
4624
+ :root .has-text-align-center {
4601
4625
  text-align: center;
4602
4626
  }
4603
4627
 
4604
- .has-text-align-left {
4628
+ :root .has-text-align-left {
4605
4629
  text-align: left;
4606
4630
  }
4607
4631
 
4608
- .has-text-align-right {
4632
+ :root .has-text-align-right {
4609
4633
  text-align: right;
4610
4634
  }
4611
4635
 
@@ -21,6 +21,11 @@
21
21
  }
22
22
  }
23
23
 
24
+ .wp-block-accordion-heading.wp-block-accordion-heading {
25
+ min-width: 100%;
26
+ margin: 0;
27
+ }
28
+
24
29
  .wp-block-accordion-heading__toggle {
25
30
  font-family: inherit;
26
31
  font-size: inherit;
@@ -31,21 +36,32 @@
31
36
  text-decoration: inherit;
32
37
  word-spacing: inherit;
33
38
  font-style: inherit;
34
- background: none;
35
39
  border: none;
36
- color: inherit;
37
40
  padding: var(--wp--preset--spacing--20, 1em) 0;
38
41
  cursor: pointer;
39
42
  overflow: hidden;
40
43
  display: flex;
41
44
  align-items: center;
42
45
  text-align: inherit;
43
- position: relative;
44
46
  width: 100%;
47
+ background-color: inherit !important;
48
+ color: inherit !important;
45
49
  }
46
50
  .wp-block-accordion-heading__toggle:not(:focus-visible) {
47
51
  outline: none;
48
52
  }
53
+ .wp-block-accordion-heading__toggle:hover, .wp-block-accordion-heading__toggle:focus {
54
+ text-decoration: none;
55
+ background-color: inherit !important;
56
+ box-shadow: none;
57
+ color: inherit;
58
+ border: none;
59
+ padding: var(--wp--preset--spacing--20, 1em) 0;
60
+ }
61
+ .wp-block-accordion-heading__toggle:focus-visible {
62
+ outline: auto;
63
+ outline-offset: 0;
64
+ }
49
65
  .wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title {
50
66
  text-decoration: underline;
51
67
  }
@@ -62,7 +78,10 @@
62
78
  justify-content: center;
63
79
  }
64
80
 
65
- .wp-block-accordion-panel[inert], .wp-block-accordion-panel[aria-hidden=true] {
81
+ .wp-block-accordion-panel.wp-block-accordion-panel {
82
+ min-width: 100%;
83
+ }
84
+ .wp-block-accordion-panel.wp-block-accordion-panel[inert], .wp-block-accordion-panel.wp-block-accordion-panel[aria-hidden=true] {
66
85
  display: none;
67
86
  margin-block-start: 0;
68
87
  }
@@ -1157,6 +1176,11 @@ body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-blo
1157
1176
  min-height: 240px;
1158
1177
  }
1159
1178
 
1179
+ .wp-block-group.is-layout-flex .wp-block-embed {
1180
+ flex: 1 1 0%;
1181
+ min-width: 0;
1182
+ }
1183
+
1160
1184
  .wp-block-embed {
1161
1185
  overflow-wrap: break-word;
1162
1186
  }
@@ -4630,16 +4654,16 @@ a[data-fn].fn::after {
4630
4654
  font-size: var(--wp--preset--font-size--huge);
4631
4655
  }
4632
4656
 
4633
- .has-text-align-center {
4657
+ :root .has-text-align-center {
4634
4658
  text-align: center;
4635
4659
  }
4636
4660
 
4637
- .has-text-align-left {
4661
+ :root .has-text-align-left {
4638
4662
  /*rtl:ignore*/
4639
4663
  text-align: left;
4640
4664
  }
4641
4665
 
4642
- .has-text-align-right {
4666
+ :root .has-text-align-right {
4643
4667
  /*rtl:ignore*/
4644
4668
  text-align: right;
4645
4669
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-library",
3
- "version": "9.34.1-next.2f1c7c01b.0",
3
+ "version": "9.35.1-next.16d95556a.0",
4
4
  "description": "Block library for the WordPress editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -82,41 +82,41 @@
82
82
  "{src,build,build-module}/*/init.js"
83
83
  ],
84
84
  "dependencies": {
85
- "@wordpress/a11y": "^4.34.1-next.2f1c7c01b.0",
86
- "@wordpress/api-fetch": "^7.34.1-next.2f1c7c01b.0",
87
- "@wordpress/autop": "^4.34.1-next.2f1c7c01b.0",
88
- "@wordpress/base-styles": "^6.10.1-next.2f1c7c01b.0",
89
- "@wordpress/blob": "^4.34.1-next.2f1c7c01b.0",
90
- "@wordpress/block-editor": "^15.7.1-next.2f1c7c01b.0",
91
- "@wordpress/blocks": "^15.7.1-next.2f1c7c01b.0",
92
- "@wordpress/components": "^30.7.2-next.2f1c7c01b.0",
93
- "@wordpress/compose": "^7.34.1-next.2f1c7c01b.0",
94
- "@wordpress/core-data": "^7.34.1-next.2f1c7c01b.0",
95
- "@wordpress/data": "^10.34.1-next.2f1c7c01b.0",
96
- "@wordpress/date": "^5.34.1-next.2f1c7c01b.0",
97
- "@wordpress/deprecated": "^4.34.1-next.2f1c7c01b.0",
98
- "@wordpress/dom": "^4.34.1-next.2f1c7c01b.0",
99
- "@wordpress/element": "^6.34.1-next.2f1c7c01b.0",
100
- "@wordpress/escape-html": "^3.34.1-next.2f1c7c01b.0",
101
- "@wordpress/hooks": "^4.34.1-next.2f1c7c01b.0",
102
- "@wordpress/html-entities": "^4.34.1-next.2f1c7c01b.0",
103
- "@wordpress/i18n": "^6.7.1-next.2f1c7c01b.0",
104
- "@wordpress/icons": "^11.1.1-next.2f1c7c01b.0",
105
- "@wordpress/interactivity": "^6.34.1-next.2f1c7c01b.0",
106
- "@wordpress/interactivity-router": "^2.34.1-next.2f1c7c01b.0",
107
- "@wordpress/keyboard-shortcuts": "^5.34.1-next.2f1c7c01b.0",
108
- "@wordpress/keycodes": "^4.34.1-next.2f1c7c01b.0",
109
- "@wordpress/latex-to-mathml": "^1.2.1-next.2f1c7c01b.0",
110
- "@wordpress/notices": "^5.34.1-next.2f1c7c01b.0",
111
- "@wordpress/patterns": "^2.34.1-next.2f1c7c01b.0",
112
- "@wordpress/primitives": "^4.34.1-next.2f1c7c01b.0",
113
- "@wordpress/private-apis": "^1.34.1-next.2f1c7c01b.0",
114
- "@wordpress/reusable-blocks": "^5.34.1-next.2f1c7c01b.0",
115
- "@wordpress/rich-text": "^7.34.1-next.2f1c7c01b.0",
116
- "@wordpress/server-side-render": "^6.10.1-next.2f1c7c01b.0",
117
- "@wordpress/url": "^4.34.1-next.2f1c7c01b.0",
118
- "@wordpress/viewport": "^6.34.1-next.2f1c7c01b.0",
119
- "@wordpress/wordcount": "^4.34.1-next.2f1c7c01b.0",
85
+ "@wordpress/a11y": "^4.35.1-next.16d95556a.0",
86
+ "@wordpress/api-fetch": "^7.35.1-next.16d95556a.0",
87
+ "@wordpress/autop": "^4.35.1-next.16d95556a.0",
88
+ "@wordpress/base-styles": "^6.11.1-next.16d95556a.0",
89
+ "@wordpress/blob": "^4.35.1-next.16d95556a.0",
90
+ "@wordpress/block-editor": "^15.8.1-next.16d95556a.0",
91
+ "@wordpress/blocks": "^15.8.1-next.16d95556a.0",
92
+ "@wordpress/components": "^30.8.1-next.16d95556a.0",
93
+ "@wordpress/compose": "^7.35.1-next.16d95556a.0",
94
+ "@wordpress/core-data": "^7.35.1-next.16d95556a.0",
95
+ "@wordpress/data": "^10.35.1-next.16d95556a.0",
96
+ "@wordpress/date": "^5.35.1-next.16d95556a.0",
97
+ "@wordpress/deprecated": "^4.35.1-next.16d95556a.0",
98
+ "@wordpress/dom": "^4.35.1-next.16d95556a.0",
99
+ "@wordpress/element": "^6.35.1-next.16d95556a.0",
100
+ "@wordpress/escape-html": "^3.35.1-next.16d95556a.0",
101
+ "@wordpress/hooks": "^4.35.1-next.16d95556a.0",
102
+ "@wordpress/html-entities": "^4.35.1-next.16d95556a.0",
103
+ "@wordpress/i18n": "^6.8.1-next.16d95556a.0",
104
+ "@wordpress/icons": "^11.2.1-next.16d95556a.0",
105
+ "@wordpress/interactivity": "^6.35.1-next.16d95556a.0",
106
+ "@wordpress/interactivity-router": "^2.35.1-next.16d95556a.0",
107
+ "@wordpress/keyboard-shortcuts": "^5.35.1-next.16d95556a.0",
108
+ "@wordpress/keycodes": "^4.35.1-next.16d95556a.0",
109
+ "@wordpress/latex-to-mathml": "^1.3.1-next.16d95556a.0",
110
+ "@wordpress/notices": "^5.35.1-next.16d95556a.0",
111
+ "@wordpress/patterns": "^2.35.1-next.16d95556a.0",
112
+ "@wordpress/primitives": "^4.35.1-next.16d95556a.0",
113
+ "@wordpress/private-apis": "^1.35.1-next.16d95556a.0",
114
+ "@wordpress/reusable-blocks": "^5.35.1-next.16d95556a.0",
115
+ "@wordpress/rich-text": "^7.35.1-next.16d95556a.0",
116
+ "@wordpress/server-side-render": "^6.11.1-next.16d95556a.0",
117
+ "@wordpress/url": "^4.35.1-next.16d95556a.0",
118
+ "@wordpress/viewport": "^6.35.1-next.16d95556a.0",
119
+ "@wordpress/wordcount": "^4.35.1-next.16d95556a.0",
120
120
  "change-case": "^4.1.2",
121
121
  "clsx": "^2.1.1",
122
122
  "colord": "^2.7.0",
@@ -134,5 +134,5 @@
134
134
  "publishConfig": {
135
135
  "access": "public"
136
136
  },
137
- "gitHead": "c6ddcdf455bc02567a2c9e03de6862a2061b85e8"
137
+ "gitHead": "59a9383612bbe16e21af84d13b035bfbca7fe833"
138
138
  }
@@ -1,3 +1,17 @@
1
+ // In many classic themes, selectors like `.entry-content h1` are used,
2
+ // potentially applying relatively high specificity (such as `0-1-1`) to
3
+ // heading elements. To properly override those styles, use a selector
4
+ // with a specificity of `0-2-0`.
5
+ .wp-block-accordion-heading.wp-block-accordion-heading {
6
+ // Some themes may have an explicit width. Since it's unpredictable
7
+ // what CSS specificity should be used to override them, ensure 100%
8
+ // width using min-width instead.
9
+ min-width: 100%;
10
+ // Some classic themes apply default margins to heading elements,
11
+ // so those styles need to be reset.
12
+ margin: 0;
13
+ }
14
+
1
15
  .wp-block-accordion-heading__toggle {
2
16
  font-family: inherit;
3
17
  font-size: inherit;
@@ -8,26 +22,45 @@
8
22
  text-decoration: inherit;
9
23
  word-spacing: inherit;
10
24
  font-style: inherit;
11
- background: none;
12
25
  border: none;
13
- color: inherit;
14
26
  padding: var(--wp--preset--spacing--20, 1em) 0;
15
27
  cursor: pointer;
16
28
  overflow: hidden;
17
29
  display: flex;
18
30
  align-items: center;
19
31
  text-align: inherit;
20
- position: relative;
21
32
  width: 100%;
22
33
 
34
+ // Some themes may apply colors to button elements with a particularly
35
+ // high CSS specificity. Since it's impossible to predict this specificity,
36
+ // we reset the colors using `!important`.
37
+ background-color: inherit !important;
38
+ color: inherit !important;
39
+
23
40
  &:not(:focus-visible) {
24
41
  outline: none;
25
42
  }
26
43
 
27
- &:hover {
28
- .wp-block-accordion-heading__toggle-title {
29
- text-decoration: underline;
30
- }
44
+ &:hover,
45
+ &:focus {
46
+ // Some themes may apply styles when a button element is hovered
47
+ // over or focused. This is not intended for accordion toggle
48
+ // buttons, so we reset it here.
49
+ text-decoration: none;
50
+ background-color: inherit !important;
51
+ box-shadow: none;
52
+ color: inherit;
53
+ border: none;
54
+ padding: var(--wp--preset--spacing--20, 1em) 0;
55
+ }
56
+
57
+ &:focus-visible {
58
+ outline: auto;
59
+ outline-offset: 0;
60
+ }
61
+
62
+ &:hover .wp-block-accordion-heading__toggle-title {
63
+ text-decoration: underline;
31
64
  }
32
65
  }
33
66
 
@@ -1,4 +1,9 @@
1
- .wp-block-accordion-panel {
1
+ // Some classic themes may use selectors like `.wp-block .wp-block`
2
+ // and apply some kind of width to the blocks. To properly override
3
+ // those styles, use a selector with a specificity of `0-2-0`.
4
+ .wp-block-accordion-panel.wp-block-accordion-panel {
5
+ min-width: 100%;
6
+
2
7
  // Prevent blockGap from Accordion Content block from adding extra margin between accordions.
3
8
  &[inert],
4
9
  &[aria-hidden="true"] {
package/src/block/edit.js CHANGED
@@ -124,7 +124,7 @@ function ReusableBlockControl( {
124
124
  return (
125
125
  <>
126
126
  { canUserEdit && !! handleEditOriginal && (
127
- <BlockControls>
127
+ <BlockControls group="other">
128
128
  <ToolbarGroup>
129
129
  <ToolbarButton onClick={ handleEditOriginal }>
130
130
  { __( 'Edit original' ) }
@@ -134,7 +134,7 @@ function ReusableBlockControl( {
134
134
  ) }
135
135
 
136
136
  { canOverrideBlocks && (
137
- <BlockControls>
137
+ <BlockControls group="other">
138
138
  <ToolbarGroup>
139
139
  <ToolbarButton
140
140
  onClick={ resetContent }
@@ -46,19 +46,33 @@ function BlockKeyboardShortcuts() {
46
46
  ) {
47
47
  return;
48
48
  }
49
+ const newAttributes = {
50
+ content: attributes.content,
51
+ };
49
52
 
50
- const textAlign =
51
- blockName === 'core/paragraph' ? 'align' : 'textAlign';
52
- const destinationTextAlign =
53
- destinationBlockName === 'core/paragraph' ? 'align' : 'textAlign';
53
+ // Read textAlign from source block (could be in old or new format)
54
+ const sourceTextAlign =
55
+ attributes.textAlign || attributes.style?.typography?.textAlign;
56
+
57
+ // When destination is heading, preserve heading format (textAlign attribute + level)
58
+ // When destination is paragraph, use block support format (style.typography.textAlign)
59
+ if ( destinationBlockName === 'core/heading' ) {
60
+ newAttributes.level = level;
61
+ if ( sourceTextAlign ) {
62
+ newAttributes.textAlign = sourceTextAlign;
63
+ }
64
+ } else if ( sourceTextAlign ) {
65
+ // Destination is paragraph
66
+ newAttributes.style = {
67
+ typography: {
68
+ textAlign: sourceTextAlign,
69
+ },
70
+ };
71
+ }
54
72
 
55
73
  replaceBlocks(
56
74
  currentClientId,
57
- createBlock( destinationBlockName, {
58
- level,
59
- content: attributes.content,
60
- ...{ [ destinationTextAlign ]: attributes[ textAlign ] },
61
- } )
75
+ createBlock( destinationBlockName, newAttributes )
62
76
  );
63
77
  };
64
78
 
package/src/common.scss CHANGED
@@ -35,16 +35,17 @@
35
35
  }
36
36
 
37
37
  // Text alignments.
38
- .has-text-align-center {
38
+ // The :root prefix increases CSS specificity from 0-1-0 to 0-2-0,
39
+ // ensuring that block instance-level text alignment overrides take
40
+ // precedence over global styles.
41
+ :root .has-text-align-center {
39
42
  text-align: center;
40
43
  }
41
-
42
- .has-text-align-left {
44
+ :root .has-text-align-left {
43
45
  /*rtl:ignore*/
44
46
  text-align: left;
45
47
  }
46
-
47
- .has-text-align-right {
48
+ :root .has-text-align-right {
48
49
  /*rtl:ignore*/
49
50
  text-align: right;
50
51
  }
@@ -1847,7 +1847,11 @@ const v3 = {
1847
1847
  [
1848
1848
  createBlock( 'core/paragraph', {
1849
1849
  content: attributes.title,
1850
- align: attributes.contentAlign,
1850
+ style: {
1851
+ typography: {
1852
+ textAlign: attributes.contentAlign,
1853
+ },
1854
+ },
1851
1855
  fontSize: 'large',
1852
1856
  placeholder: __( 'Write title…' ),
1853
1857
  } ),
@@ -1933,7 +1937,11 @@ const v2 = {
1933
1937
  [
1934
1938
  createBlock( 'core/paragraph', {
1935
1939
  content: attributes.title,
1936
- align: attributes.contentAlign,
1940
+ style: {
1941
+ typography: {
1942
+ textAlign: attributes.contentAlign,
1943
+ },
1944
+ },
1937
1945
  fontSize: 'large',
1938
1946
  placeholder: __( 'Write title…' ),
1939
1947
  } ),
@@ -1993,7 +2001,11 @@ const v1 = {
1993
2001
  [
1994
2002
  createBlock( 'core/paragraph', {
1995
2003
  content: attributes.title,
1996
- align: attributes.contentAlign,
2004
+ style: {
2005
+ typography: {
2006
+ textAlign: attributes.contentAlign,
2007
+ },
2008
+ },
1997
2009
  fontSize: 'large',
1998
2010
  placeholder: __( 'Write title…' ),
1999
2011
  } ),
@@ -196,7 +196,7 @@ export default function CoverInspectorControls( {
196
196
  return (
197
197
  <>
198
198
  <InspectorControls>
199
- { !! url && (
199
+ { ( !! url || useFeaturedImage ) && (
200
200
  <ToolsPanel
201
201
  label={ __( 'Settings' ) }
202
202
  resetAll={ () => {
@@ -37,7 +37,11 @@ const transforms = {
37
37
  createBlock( 'core/paragraph', {
38
38
  content: caption,
39
39
  fontSize: 'large',
40
- align: 'center',
40
+ style: {
41
+ typography: {
42
+ textAlign: 'center',
43
+ },
44
+ },
41
45
  } ),
42
46
  ]
43
47
  ),
@@ -60,7 +64,11 @@ const transforms = {
60
64
  createBlock( 'core/paragraph', {
61
65
  content: caption,
62
66
  fontSize: 'large',
63
- align: 'center',
67
+ style: {
68
+ typography: {
69
+ textAlign: 'center',
70
+ },
71
+ },
64
72
  } ),
65
73
  ]
66
74
  ),
@@ -24,12 +24,10 @@ export const embedVideoIcon = (
24
24
  </SVG>
25
25
  );
26
26
  export const embedTwitterIcon = {
27
- foreground: '#1da1f2',
27
+ foreground: '#000000',
28
28
  src: (
29
29
  <SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
30
- <G>
31
- <Path d="M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z"></Path>
32
- </G>
30
+ <Path d="M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z" />
33
31
  </SVG>
34
32
  ),
35
33
  };
@@ -22,6 +22,12 @@
22
22
  min-height: 240px;
23
23
  }
24
24
 
25
+ // Allow embeds to grow and shrink inside flex group blocks (Stack/Row), preventing collapse while fitting available space.
26
+ .wp-block-group.is-layout-flex .wp-block-embed {
27
+ flex: 1 1 0%;
28
+ min-width: 0;
29
+ }
30
+
25
31
  .wp-block-embed {
26
32
  overflow-wrap: break-word; // Break long strings of text without spaces so they don't overflow the block.
27
33
 
@@ -48,10 +48,10 @@ function getTitle( providerName ) {
48
48
  const variations = [
49
49
  {
50
50
  name: 'twitter',
51
- title: getTitle( 'Twitter' ),
51
+ title: getTitle( 'X' ),
52
52
  icon: embedTwitterIcon,
53
- keywords: [ 'tweet', __( 'social' ) ],
54
- description: __( 'Embed a tweet.' ),
53
+ keywords: [ 'x', 'twitter', 'tweet', __( 'social' ) ],
54
+ description: __( 'Embed an X post.' ),
55
55
  patterns: [ /^https?:\/\/(www\.)?twitter\.com\/.+/i ],
56
56
  attributes: { providerNameSlug: 'twitter', responsive: true },
57
57
  },
@@ -13,6 +13,7 @@ import edit from './edit';
13
13
  import metadata from './block.json';
14
14
  import save from './save';
15
15
  import transforms from './transforms';
16
+ import variations from './variations';
16
17
 
17
18
  const { name } = metadata;
18
19
 
@@ -65,6 +66,7 @@ export const settings = {
65
66
  },
66
67
  edit,
67
68
  save,
69
+ variations,
68
70
  };
69
71
 
70
72
  export const init = () => initBlock( { name, metadata, settings } );
@@ -32,12 +32,6 @@ exports[`Heading block transforms to Paragraph block 1`] = `
32
32
  <!-- /wp:paragraph -->"
33
33
  `;
34
34
 
35
- exports[`Heading block transforms to Pullquote block 1`] = `
36
- "<!-- wp:pullquote -->
37
- <figure class="wp-block-pullquote"><blockquote><p>Example text</p></blockquote></figure>
38
- <!-- /wp:pullquote -->"
39
- `;
40
-
41
35
  exports[`Heading block transforms to Quote block 1`] = `
42
36
  "<!-- wp:quote -->
43
37
  <blockquote class="wp-block-quote"><!-- wp:heading -->
@@ -16,11 +16,7 @@ const initialHtml = `
16
16
  <!-- /wp:heading -->`;
17
17
 
18
18
  const transformsWithInnerBlocks = [ 'List', 'Quote', 'Columns', 'Group' ];
19
- const blockTransforms = [
20
- 'Paragraph',
21
- 'Pullquote',
22
- ...transformsWithInnerBlocks,
23
- ];
19
+ const blockTransforms = [ 'Paragraph', ...transformsWithInnerBlocks ];
24
20
 
25
21
  setupCoreBlocks();
26
22
 
@@ -17,7 +17,8 @@ const transforms = {
17
17
  blocks: [ 'core/paragraph' ],
18
18
  transform: ( attributes ) =>
19
19
  attributes.map( ( _attributes ) => {
20
- const { content, anchor, align: textAlign } = _attributes;
20
+ const { content, anchor, style } = _attributes;
21
+ const textAlign = style?.typography?.textAlign;
21
22
  return createBlock( 'core/heading', {
22
23
  ...getTransformedAttributes(
23
24
  _attributes,
@@ -92,7 +93,7 @@ const transforms = {
92
93
  blocks: [ 'core/paragraph' ],
93
94
  transform: ( attributes ) =>
94
95
  attributes.map( ( _attributes ) => {
95
- const { content, textAlign: align } = _attributes;
96
+ const { content, textAlign } = _attributes;
96
97
  return createBlock( 'core/paragraph', {
97
98
  ...getTransformedAttributes(
98
99
  _attributes,
@@ -102,7 +103,13 @@ const transforms = {
102
103
  } )
103
104
  ),
104
105
  content,
105
- align,
106
+ ...( textAlign && {
107
+ style: {
108
+ typography: {
109
+ textAlign,
110
+ },
111
+ },
112
+ } ),
106
113
  } );
107
114
  } ),
108
115
  },