@wordpress/block-library 9.36.1-next.738bb1424.0 → 9.36.2-next.8fd3f8831.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 (168) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/accordion-heading/deprecated.cjs +120 -1
  3. package/build/accordion-heading/deprecated.cjs.map +2 -2
  4. package/build/accordion-heading/edit.cjs +9 -1
  5. package/build/accordion-heading/edit.cjs.map +3 -3
  6. package/build/accordion-heading/save.cjs +1 -0
  7. package/build/accordion-heading/save.cjs.map +2 -2
  8. package/build/accordion-item/block.json +3 -0
  9. package/build/accordion-item/edit.cjs +3 -37
  10. package/build/accordion-item/edit.cjs.map +2 -2
  11. package/build/accordion-panel/block.json +1 -4
  12. package/build/accordion-panel/edit.cjs +3 -2
  13. package/build/accordion-panel/edit.cjs.map +2 -2
  14. package/build/breadcrumbs/block.json +1 -2
  15. package/build/breadcrumbs/edit.cjs +2 -1
  16. package/build/breadcrumbs/edit.cjs.map +2 -2
  17. package/build/button/index.cjs +9 -1
  18. package/build/button/index.cjs.map +2 -2
  19. package/build/buttons/block.json +1 -0
  20. package/build/comment-author-name/block.json +1 -3
  21. package/build/comment-author-name/deprecated.cjs +57 -1
  22. package/build/comment-author-name/deprecated.cjs.map +3 -3
  23. package/build/comment-author-name/edit.cjs +9 -19
  24. package/build/comment-author-name/edit.cjs.map +3 -3
  25. package/build/freeform/edit.cjs +48 -174
  26. package/build/freeform/edit.cjs.map +2 -2
  27. package/build/freeform/modal.cjs +51 -67
  28. package/build/freeform/modal.cjs.map +2 -2
  29. package/build/index.cjs +2 -2
  30. package/build/index.cjs.map +2 -2
  31. package/build/list/block.json +2 -1
  32. package/build/query/edit/query-content.cjs +4 -3
  33. package/build/query/edit/query-content.cjs.map +2 -2
  34. package/build/query/edit/query-placeholder.cjs +4 -3
  35. package/build/query/edit/query-placeholder.cjs.map +2 -2
  36. package/build/query/edit/query-toolbar.cjs +19 -7
  37. package/build/query/edit/query-toolbar.cjs.map +3 -3
  38. package/build/social-links/block.json +2 -1
  39. package/build-module/accordion-heading/deprecated.js +122 -2
  40. package/build-module/accordion-heading/deprecated.js.map +2 -2
  41. package/build-module/accordion-heading/edit.js +11 -2
  42. package/build-module/accordion-heading/edit.js.map +2 -2
  43. package/build-module/accordion-heading/save.js +1 -0
  44. package/build-module/accordion-heading/save.js.map +2 -2
  45. package/build-module/accordion-item/block.json +3 -0
  46. package/build-module/accordion-item/edit.js +3 -37
  47. package/build-module/accordion-item/edit.js.map +2 -2
  48. package/build-module/accordion-panel/block.json +1 -4
  49. package/build-module/accordion-panel/edit.js +3 -2
  50. package/build-module/accordion-panel/edit.js.map +2 -2
  51. package/build-module/breadcrumbs/block.json +1 -2
  52. package/build-module/breadcrumbs/edit.js +2 -1
  53. package/build-module/breadcrumbs/edit.js.map +2 -2
  54. package/build-module/button/index.js +9 -1
  55. package/build-module/button/index.js.map +2 -2
  56. package/build-module/buttons/block.json +1 -0
  57. package/build-module/comment-author-name/block.json +1 -3
  58. package/build-module/comment-author-name/deprecated.js +57 -1
  59. package/build-module/comment-author-name/deprecated.js.map +2 -2
  60. package/build-module/comment-author-name/edit.js +10 -25
  61. package/build-module/comment-author-name/edit.js.map +2 -2
  62. package/build-module/freeform/edit.js +56 -176
  63. package/build-module/freeform/edit.js.map +2 -2
  64. package/build-module/freeform/modal.js +55 -78
  65. package/build-module/freeform/modal.js.map +2 -2
  66. package/build-module/index.js +2 -2
  67. package/build-module/index.js.map +2 -2
  68. package/build-module/list/block.json +2 -1
  69. package/build-module/query/edit/query-content.js +5 -5
  70. package/build-module/query/edit/query-content.js.map +2 -2
  71. package/build-module/query/edit/query-placeholder.js +4 -4
  72. package/build-module/query/edit/query-placeholder.js.map +2 -2
  73. package/build-module/query/edit/query-toolbar.js +22 -7
  74. package/build-module/query/edit/query-toolbar.js.map +2 -2
  75. package/build-module/social-links/block.json +2 -1
  76. package/build-style/audio/style-rtl.css +4 -0
  77. package/build-style/audio/style.css +4 -0
  78. package/build-style/audio/theme-rtl.css +4 -0
  79. package/build-style/audio/theme.css +4 -0
  80. package/build-style/columns/style-rtl.css +4 -0
  81. package/build-style/columns/style.css +4 -0
  82. package/build-style/common-rtl.css +4 -0
  83. package/build-style/common.css +4 -0
  84. package/build-style/editor-rtl.css +9 -324
  85. package/build-style/editor.css +9 -328
  86. package/build-style/embed/style-rtl.css +4 -0
  87. package/build-style/embed/style.css +4 -0
  88. package/build-style/embed/theme-rtl.css +4 -0
  89. package/build-style/embed/theme.css +4 -0
  90. package/build-style/freeform/editor-rtl.css +10 -330
  91. package/build-style/freeform/editor.css +10 -334
  92. package/build-style/gallery/editor-rtl.css +4 -0
  93. package/build-style/gallery/editor.css +4 -0
  94. package/build-style/gallery/style-rtl.css +4 -0
  95. package/build-style/gallery/style.css +4 -0
  96. package/build-style/gallery/theme-rtl.css +4 -0
  97. package/build-style/gallery/theme.css +4 -0
  98. package/build-style/html/editor-rtl.css +4 -0
  99. package/build-style/html/editor.css +4 -0
  100. package/build-style/image/editor-rtl.css +4 -0
  101. package/build-style/image/editor.css +4 -0
  102. package/build-style/image/style-rtl.css +4 -0
  103. package/build-style/image/style.css +4 -0
  104. package/build-style/image/theme-rtl.css +4 -0
  105. package/build-style/image/theme.css +4 -0
  106. package/build-style/latest-posts/style-rtl.css +4 -0
  107. package/build-style/latest-posts/style.css +4 -0
  108. package/build-style/navigation/editor-rtl.css +4 -0
  109. package/build-style/navigation/editor.css +4 -0
  110. package/build-style/navigation/style-rtl.css +4 -0
  111. package/build-style/navigation/style.css +4 -0
  112. package/build-style/navigation-submenu/editor-rtl.css +4 -0
  113. package/build-style/navigation-submenu/editor.css +4 -0
  114. package/build-style/page-list/editor-rtl.css +4 -0
  115. package/build-style/page-list/editor.css +4 -0
  116. package/build-style/paragraph/editor-rtl.css +5 -0
  117. package/build-style/paragraph/editor.css +5 -0
  118. package/build-style/post-template/style-rtl.css +4 -0
  119. package/build-style/post-template/style.css +4 -0
  120. package/build-style/query/editor-rtl.css +4 -0
  121. package/build-style/query/editor.css +4 -0
  122. package/build-style/rss/style-rtl.css +4 -0
  123. package/build-style/rss/style.css +4 -0
  124. package/build-style/shortcode/editor-rtl.css +4 -0
  125. package/build-style/shortcode/editor.css +4 -0
  126. package/build-style/style-rtl.css +4 -0
  127. package/build-style/style.css +4 -0
  128. package/build-style/table/editor-rtl.css +4 -0
  129. package/build-style/table/editor.css +4 -0
  130. package/build-style/table/theme-rtl.css +4 -0
  131. package/build-style/table/theme.css +4 -0
  132. package/build-style/template-part/editor-rtl.css +4 -0
  133. package/build-style/template-part/editor.css +4 -0
  134. package/build-style/theme-rtl.css +4 -0
  135. package/build-style/theme.css +4 -0
  136. package/build-style/video/style-rtl.css +4 -0
  137. package/build-style/video/style.css +4 -0
  138. package/build-style/video/theme-rtl.css +4 -0
  139. package/build-style/video/theme.css +4 -0
  140. package/package.json +37 -37
  141. package/src/accordion-heading/deprecated.js +122 -1
  142. package/src/accordion-heading/edit.js +11 -1
  143. package/src/accordion-heading/save.js +1 -0
  144. package/src/accordion-item/block.json +3 -0
  145. package/src/accordion-item/edit.js +4 -38
  146. package/src/accordion-panel/block.json +1 -4
  147. package/src/accordion-panel/edit.js +3 -4
  148. package/src/breadcrumbs/block.json +1 -2
  149. package/src/breadcrumbs/edit.js +2 -1
  150. package/src/breadcrumbs/index.php +23 -1
  151. package/src/button/index.js +12 -0
  152. package/src/button/test/get-experimental-label.js +50 -0
  153. package/src/buttons/block.json +1 -0
  154. package/src/comment-author-name/block.json +1 -3
  155. package/src/comment-author-name/deprecated.js +61 -1
  156. package/src/comment-author-name/edit.js +10 -34
  157. package/src/freeform/edit.js +60 -245
  158. package/src/freeform/editor.scss +1 -382
  159. package/src/freeform/modal.js +47 -80
  160. package/src/index.js +1 -1
  161. package/src/list/block.json +2 -1
  162. package/src/paragraph/editor.scss +8 -0
  163. package/src/post-date/index.php +4 -7
  164. package/src/query/edit/query-content.js +3 -3
  165. package/src/query/edit/query-placeholder.js +3 -3
  166. package/src/query/edit/query-toolbar.js +47 -31
  167. package/src/social-links/block.json +2 -1
  168. package/src/term-template/index.php +1 -1
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  .wp-block-post-template {
87
91
  margin-top: 0;
88
92
  margin-bottom: 0;
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  .wp-block-post-template {
87
91
  margin-top: 0;
88
92
  margin-bottom: 0;
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  .block-library-query-pattern__selection-modal .block-editor-block-patterns-list {
87
91
  column-count: 2;
88
92
  column-gap: 24px;
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  .block-library-query-pattern__selection-modal .block-editor-block-patterns-list {
87
91
  column-count: 2;
88
92
  column-gap: 24px;
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  ul.wp-block-rss.alignleft {
87
91
  margin-right: 2em;
88
92
  }
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  ul.wp-block-rss.alignleft {
87
91
  /*rtl:ignore*/
88
92
  margin-right: 2em;
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  .blocks-shortcode__textarea {
87
91
  box-sizing: border-box;
88
92
  max-height: 250px;
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  .blocks-shortcode__textarea {
87
91
  box-sizing: border-box;
88
92
  max-height: 250px;
@@ -167,6 +167,10 @@
167
167
  /**
168
168
  * Reset the WP Admin page styles for Gutenberg-like pages.
169
169
  */
170
+ /**
171
+ * Creates a checkerboard pattern background to indicate transparency.
172
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
173
+ */
170
174
  .wp-block-audio {
171
175
  box-sizing: border-box;
172
176
  }
@@ -167,6 +167,10 @@
167
167
  /**
168
168
  * Reset the WP Admin page styles for Gutenberg-like pages.
169
169
  */
170
+ /**
171
+ * Creates a checkerboard pattern background to indicate transparency.
172
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
173
+ */
170
174
  .wp-block-audio {
171
175
  box-sizing: border-box;
172
176
  }
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  .wp-block[data-align=left] > .wp-block-table, .wp-block[data-align=right] > .wp-block-table, .wp-block[data-align=center] > .wp-block-table {
87
91
  height: auto;
88
92
  }
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  .wp-block[data-align=left] > .wp-block-table, .wp-block[data-align=right] > .wp-block-table, .wp-block[data-align=center] > .wp-block-table {
87
91
  height: auto;
88
92
  }
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  .wp-block-table {
87
91
  margin: 0 0 1em 0;
88
92
  }
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  .wp-block-table {
87
91
  margin: 0 0 1em 0;
88
92
  }
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  .block-editor-template-part__selection-modal {
87
91
  z-index: 1000001;
88
92
  }
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  .block-editor-template-part__selection-modal {
87
91
  z-index: 1000001;
88
92
  }
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  .wp-block-audio :where(figcaption) {
87
91
  color: #555;
88
92
  font-size: 13px;
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  .wp-block-audio :where(figcaption) {
87
91
  color: #555;
88
92
  font-size: 13px;
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  .wp-block-video {
87
91
  box-sizing: border-box;
88
92
  }
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  .wp-block-video {
87
91
  box-sizing: border-box;
88
92
  }
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  .wp-block-video :where(figcaption) {
87
91
  color: #555;
88
92
  font-size: 13px;
@@ -83,6 +83,10 @@
83
83
  /**
84
84
  * Reset the WP Admin page styles for Gutenberg-like pages.
85
85
  */
86
+ /**
87
+ * Creates a checkerboard pattern background to indicate transparency.
88
+ * @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
89
+ */
86
90
  .wp-block-video :where(figcaption) {
87
91
  color: #555;
88
92
  font-size: 13px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-library",
3
- "version": "9.36.1-next.738bb1424.0",
3
+ "version": "9.36.2-next.8fd3f8831.0",
4
4
  "description": "Block library for the WordPress editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -94,41 +94,41 @@
94
94
  "build-module/*/init.js"
95
95
  ],
96
96
  "dependencies": {
97
- "@wordpress/a11y": "^4.36.1-next.738bb1424.0",
98
- "@wordpress/api-fetch": "^7.36.1-next.738bb1424.0",
99
- "@wordpress/autop": "^4.36.1-next.738bb1424.0",
100
- "@wordpress/base-styles": "^6.12.1-next.738bb1424.0",
101
- "@wordpress/blob": "^4.36.1-next.738bb1424.0",
102
- "@wordpress/block-editor": "^15.9.1-next.738bb1424.0",
103
- "@wordpress/blocks": "^15.9.1-next.738bb1424.0",
104
- "@wordpress/components": "^31.0.1-next.738bb1424.0",
105
- "@wordpress/compose": "^7.36.1-next.738bb1424.0",
106
- "@wordpress/core-data": "^7.36.1-next.738bb1424.0",
107
- "@wordpress/data": "^10.36.1-next.738bb1424.0",
108
- "@wordpress/date": "^5.36.1-next.738bb1424.0",
109
- "@wordpress/deprecated": "^4.36.1-next.738bb1424.0",
110
- "@wordpress/dom": "^4.36.1-next.738bb1424.0",
111
- "@wordpress/element": "^6.36.1-next.738bb1424.0",
112
- "@wordpress/escape-html": "^3.36.1-next.738bb1424.0",
113
- "@wordpress/hooks": "^4.36.1-next.738bb1424.0",
114
- "@wordpress/html-entities": "^4.36.1-next.738bb1424.0",
115
- "@wordpress/i18n": "^6.9.1-next.738bb1424.0",
116
- "@wordpress/icons": "^11.3.1-next.738bb1424.0",
117
- "@wordpress/interactivity": "^6.36.1-next.738bb1424.0",
118
- "@wordpress/interactivity-router": "^2.36.1-next.738bb1424.0",
119
- "@wordpress/keyboard-shortcuts": "^5.36.1-next.738bb1424.0",
120
- "@wordpress/keycodes": "^4.36.1-next.738bb1424.0",
121
- "@wordpress/latex-to-mathml": "^1.4.1-next.738bb1424.0",
122
- "@wordpress/notices": "^5.36.1-next.738bb1424.0",
123
- "@wordpress/patterns": "^2.36.1-next.738bb1424.0",
124
- "@wordpress/primitives": "^4.36.1-next.738bb1424.0",
125
- "@wordpress/private-apis": "^1.36.1-next.738bb1424.0",
126
- "@wordpress/reusable-blocks": "^5.36.1-next.738bb1424.0",
127
- "@wordpress/rich-text": "^7.36.1-next.738bb1424.0",
128
- "@wordpress/server-side-render": "^6.12.1-next.738bb1424.0",
129
- "@wordpress/url": "^4.36.1-next.738bb1424.0",
130
- "@wordpress/viewport": "^6.36.1-next.738bb1424.0",
131
- "@wordpress/wordcount": "^4.36.1-next.738bb1424.0",
97
+ "@wordpress/a11y": "^4.36.1-next.8fd3f8831.0",
98
+ "@wordpress/api-fetch": "^7.36.1-next.8fd3f8831.0",
99
+ "@wordpress/autop": "^4.36.1-next.8fd3f8831.0",
100
+ "@wordpress/base-styles": "^6.12.1-next.8fd3f8831.0",
101
+ "@wordpress/blob": "^4.36.1-next.8fd3f8831.0",
102
+ "@wordpress/block-editor": "^15.9.1-next.8fd3f8831.0",
103
+ "@wordpress/blocks": "^15.9.1-next.8fd3f8831.0",
104
+ "@wordpress/components": "^31.0.1-next.8fd3f8831.0",
105
+ "@wordpress/compose": "^7.36.1-next.8fd3f8831.0",
106
+ "@wordpress/core-data": "^7.36.1-next.8fd3f8831.0",
107
+ "@wordpress/data": "^10.36.1-next.8fd3f8831.0",
108
+ "@wordpress/date": "^5.36.1-next.8fd3f8831.0",
109
+ "@wordpress/deprecated": "^4.36.1-next.8fd3f8831.0",
110
+ "@wordpress/dom": "^4.36.1-next.8fd3f8831.0",
111
+ "@wordpress/element": "^6.36.1-next.8fd3f8831.0",
112
+ "@wordpress/escape-html": "^3.36.1-next.8fd3f8831.0",
113
+ "@wordpress/hooks": "^4.36.1-next.8fd3f8831.0",
114
+ "@wordpress/html-entities": "^4.36.1-next.8fd3f8831.0",
115
+ "@wordpress/i18n": "^6.9.1-next.8fd3f8831.0",
116
+ "@wordpress/icons": "^11.3.1-next.8fd3f8831.0",
117
+ "@wordpress/interactivity": "^6.36.1-next.8fd3f8831.0",
118
+ "@wordpress/interactivity-router": "^2.36.1-next.8fd3f8831.0",
119
+ "@wordpress/keyboard-shortcuts": "^5.36.1-next.8fd3f8831.0",
120
+ "@wordpress/keycodes": "^4.36.1-next.8fd3f8831.0",
121
+ "@wordpress/latex-to-mathml": "^1.4.1-next.8fd3f8831.0",
122
+ "@wordpress/notices": "^5.36.1-next.8fd3f8831.0",
123
+ "@wordpress/patterns": "^2.36.1-next.8fd3f8831.0",
124
+ "@wordpress/primitives": "^4.36.1-next.8fd3f8831.0",
125
+ "@wordpress/private-apis": "^1.36.1-next.8fd3f8831.0",
126
+ "@wordpress/reusable-blocks": "^5.36.1-next.8fd3f8831.0",
127
+ "@wordpress/rich-text": "^7.36.1-next.8fd3f8831.0",
128
+ "@wordpress/server-side-render": "^6.12.1-next.8fd3f8831.0",
129
+ "@wordpress/url": "^4.36.1-next.8fd3f8831.0",
130
+ "@wordpress/viewport": "^6.36.1-next.8fd3f8831.0",
131
+ "@wordpress/wordcount": "^4.36.1-next.8fd3f8831.0",
132
132
  "change-case": "^4.1.2",
133
133
  "clsx": "^2.1.1",
134
134
  "colord": "^2.7.0",
@@ -146,5 +146,5 @@
146
146
  "publishConfig": {
147
147
  "access": "public"
148
148
  },
149
- "gitHead": "ab1b004c0d61c295aa34bc86ea07f979343983ce"
149
+ "gitHead": "e582b351bc4c4b8734bb087f63a3beec9875c3c7"
150
150
  }
@@ -5,6 +5,7 @@ import {
5
5
  useBlockProps,
6
6
  __experimentalGetSpacingClassesAndStyles as getSpacingClassesAndStyles,
7
7
  RichText,
8
+ getTypographyClassesAndStyles,
8
9
  } from '@wordpress/block-editor';
9
10
 
10
11
  const v1 = {
@@ -116,4 +117,124 @@ const v1 = {
116
117
  },
117
118
  };
118
119
 
119
- export default [ v1 ];
120
+ const v2 = {
121
+ attributes: {
122
+ openByDefault: {
123
+ type: 'boolean',
124
+ default: false,
125
+ },
126
+ title: {
127
+ type: 'rich-text',
128
+ source: 'rich-text',
129
+ selector: '.wp-block-accordion-heading__toggle-title',
130
+ role: 'content',
131
+ },
132
+ level: {
133
+ type: 'number',
134
+ },
135
+ iconPosition: {
136
+ type: 'string',
137
+ enum: [ 'left', 'right' ],
138
+ default: 'right',
139
+ },
140
+ showIcon: {
141
+ type: 'boolean',
142
+ default: true,
143
+ },
144
+ },
145
+ supports: {
146
+ anchor: true,
147
+ color: {
148
+ background: true,
149
+ gradients: true,
150
+ },
151
+ align: false,
152
+ interactivity: true,
153
+ spacing: {
154
+ padding: true,
155
+ __experimentalDefaultControls: {
156
+ padding: true,
157
+ },
158
+ __experimentalSkipSerialization: true,
159
+ __experimentalSelector: '.wp-block-accordion-heading__toggle',
160
+ },
161
+ __experimentalBorder: {
162
+ color: true,
163
+ radius: true,
164
+ style: true,
165
+ width: true,
166
+ __experimentalDefaultControls: {
167
+ color: true,
168
+ radius: true,
169
+ style: true,
170
+ width: true,
171
+ },
172
+ },
173
+ typography: {
174
+ __experimentalSkipSerialization: [
175
+ 'textDecoration',
176
+ 'letterSpacing',
177
+ ],
178
+ fontSize: true,
179
+ __experimentalFontFamily: true,
180
+ __experimentalFontWeight: true,
181
+ __experimentalFontStyle: true,
182
+ __experimentalTextTransform: true,
183
+ __experimentalTextDecoration: true,
184
+ __experimentalLetterSpacing: true,
185
+ __experimentalDefaultControls: {
186
+ fontSize: true,
187
+ fontFamily: true,
188
+ },
189
+ },
190
+ shadow: true,
191
+ visibility: false,
192
+ lock: false,
193
+ },
194
+ save( { attributes } ) {
195
+ const { level, title, iconPosition, showIcon } = attributes;
196
+ const TagName = 'h' + ( level || 3 );
197
+ const typographyProps = getTypographyClassesAndStyles( attributes );
198
+
199
+ const blockProps = useBlockProps.save();
200
+ const spacingProps = getSpacingClassesAndStyles( attributes );
201
+
202
+ return (
203
+ <TagName { ...blockProps }>
204
+ <button
205
+ className="wp-block-accordion-heading__toggle"
206
+ style={ spacingProps.style }
207
+ >
208
+ { showIcon && iconPosition === 'left' && (
209
+ <span
210
+ className="wp-block-accordion-heading__toggle-icon"
211
+ aria-hidden="true"
212
+ >
213
+ +
214
+ </span>
215
+ ) }
216
+ <RichText.Content
217
+ className="wp-block-accordion-heading__toggle-title"
218
+ tagName="span"
219
+ value={ title }
220
+ style={ {
221
+ letterSpacing: typographyProps.style.letterSpacing,
222
+ textDecoration:
223
+ typographyProps.style.textDecoration,
224
+ } }
225
+ />
226
+ { showIcon && iconPosition === 'right' && (
227
+ <span
228
+ className="wp-block-accordion-heading__toggle-icon"
229
+ aria-hidden="true"
230
+ >
231
+ +
232
+ </span>
233
+ ) }
234
+ </button>
235
+ </TagName>
236
+ );
237
+ },
238
+ };
239
+
240
+ export default [ v1, v2 ];
@@ -9,7 +9,9 @@ import {
9
9
  RichText,
10
10
  getTypographyClassesAndStyles as useTypographyProps,
11
11
  useSettings,
12
+ store as blockEditorStore,
12
13
  } from '@wordpress/block-editor';
14
+ import { useDispatch } from '@wordpress/data';
13
15
 
14
16
  export default function Edit( { attributes, setAttributes, context } ) {
15
17
  const { title } = attributes;
@@ -19,16 +21,24 @@ export default function Edit( { attributes, setAttributes, context } ) {
19
21
  'core/accordion-heading-level': headingLevel,
20
22
  } = context;
21
23
  const TagName = 'h' + headingLevel;
24
+ const { __unstableMarkNextChangeAsNotPersistent } =
25
+ useDispatch( blockEditorStore );
22
26
 
23
27
  // Set icon attributes.
24
28
  useEffect( () => {
25
29
  if ( iconPosition !== undefined && showIcon !== undefined ) {
30
+ __unstableMarkNextChangeAsNotPersistent();
26
31
  setAttributes( {
27
32
  iconPosition,
28
33
  showIcon,
29
34
  } );
30
35
  }
31
- }, [ iconPosition, showIcon, setAttributes ] );
36
+ }, [
37
+ iconPosition,
38
+ showIcon,
39
+ setAttributes,
40
+ __unstableMarkNextChangeAsNotPersistent,
41
+ ] );
32
42
 
33
43
  const [ fluidTypographySettings, layout ] = useSettings(
34
44
  'typography.fluid',
@@ -19,6 +19,7 @@ export default function save( { attributes } ) {
19
19
  return (
20
20
  <TagName { ...blockProps }>
21
21
  <button
22
+ type="button"
22
23
  className="wp-block-accordion-heading__toggle"
23
24
  style={ spacingProps.style }
24
25
  >
@@ -55,6 +55,9 @@
55
55
  "default": false
56
56
  }
57
57
  },
58
+ "providesContext": {
59
+ "core/accordion-open-by-default": "openByDefault"
60
+ },
58
61
  "textdomain": "default",
59
62
  "style": "wp-block-accordion-item"
60
63
  }
@@ -25,12 +25,9 @@ import clsx from 'clsx';
25
25
  */
26
26
  import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
27
27
 
28
- export default function Edit( {
29
- attributes,
30
- clientId,
31
- setAttributes,
32
- context,
33
- } ) {
28
+ const TEMPLATE = [ [ 'core/accordion-heading' ], [ 'core/accordion-panel' ] ];
29
+
30
+ export default function Edit( { attributes, clientId, setAttributes } ) {
34
31
  const { openByDefault } = attributes;
35
32
  const dropdownMenuProps = useToolsPanelDropdownMenuProps();
36
33
 
@@ -75,21 +72,8 @@ export default function Edit( {
75
72
  } ),
76
73
  } );
77
74
 
78
- // Get heading level from context.
79
- const headingLevel = context && context[ 'core/accordion-heading-level' ];
80
75
  const innerBlocksProps = useInnerBlocksProps( blockProps, {
81
- template: [
82
- [
83
- 'core/accordion-heading',
84
- headingLevel ? { level: headingLevel } : {},
85
- ],
86
- [
87
- 'core/accordion-panel',
88
- {
89
- openByDefault,
90
- },
91
- ],
92
- ],
76
+ template: TEMPLATE,
93
77
  templateLock: 'all',
94
78
  directInsert: true,
95
79
  templateInsertUpdatesSelection: true,
@@ -102,11 +86,6 @@ export default function Edit( {
102
86
  label={ __( 'Settings' ) }
103
87
  resetAll={ () => {
104
88
  setAttributes( { openByDefault: false } );
105
- if ( contentBlockClientId ) {
106
- updateBlockAttributes( contentBlockClientId, {
107
- openByDefault: false,
108
- } );
109
- }
110
89
  } }
111
90
  dropdownMenuProps={ dropdownMenuProps }
112
91
  >
@@ -116,11 +95,6 @@ export default function Edit( {
116
95
  hasValue={ () => !! openByDefault }
117
96
  onDeselect={ () => {
118
97
  setAttributes( { openByDefault: false } );
119
- if ( contentBlockClientId ) {
120
- updateBlockAttributes( contentBlockClientId, {
121
- openByDefault: false,
122
- } );
123
- }
124
98
  } }
125
99
  >
126
100
  <ToggleControl
@@ -129,14 +103,6 @@ export default function Edit( {
129
103
  setAttributes( {
130
104
  openByDefault: value,
131
105
  } );
132
- if ( contentBlockClientId ) {
133
- updateBlockAttributes(
134
- contentBlockClientId,
135
- {
136
- openByDefault: value,
137
- }
138
- );
139
- }
140
106
  } }
141
107
  checked={ openByDefault }
142
108
  help={ __(
@@ -6,6 +6,7 @@
6
6
  "category": "design",
7
7
  "description": "Contains the hidden or revealed content beneath the heading.",
8
8
  "parent": [ "core/accordion-item" ],
9
+ "usesContext": [ "core/accordion-open-by-default" ],
9
10
  "supports": {
10
11
  "html": false,
11
12
  "color": {
@@ -61,10 +62,6 @@
61
62
  "enum": [ "all", "insert", "contentOnly", false ],
62
63
  "default": false
63
64
  },
64
- "openByDefault": {
65
- "type": "boolean",
66
- "default": false
67
- },
68
65
  "isSelected": {
69
66
  "type": "boolean",
70
67
  "default": false
@@ -3,10 +3,9 @@
3
3
  */
4
4
  import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';
5
5
 
6
- export default function Edit( { attributes } ) {
7
- const { allowedBlocks, templateLock, openByDefault, isSelected } =
8
- attributes;
9
-
6
+ export default function Edit( { attributes, context } ) {
7
+ const { allowedBlocks, templateLock, isSelected } = attributes;
8
+ const openByDefault = context[ 'core/accordion-open-by-default' ];
10
9
  const blockProps = useBlockProps( {
11
10
  'aria-hidden': ! isSelected && ! openByDefault,
12
11
  role: 'region',