@wordpress/edit-site 6.33.2 → 6.33.3

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 (27) hide show
  1. package/build/components/dataviews-actions/index.js +8 -6
  2. package/build/components/dataviews-actions/index.js.map +2 -2
  3. package/build/components/page-templates/fields.js +19 -26
  4. package/build/components/page-templates/fields.js.map +2 -2
  5. package/build/components/page-templates/index.js +41 -31
  6. package/build/components/page-templates/index.js.map +2 -2
  7. package/build/components/sidebar-navigation-screen-templates-browse/content.js +6 -7
  8. package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +2 -2
  9. package/build/components/style-book/index.js +20 -11
  10. package/build/components/style-book/index.js.map +2 -2
  11. package/build-module/components/dataviews-actions/index.js +8 -6
  12. package/build-module/components/dataviews-actions/index.js.map +2 -2
  13. package/build-module/components/page-templates/fields.js +19 -26
  14. package/build-module/components/page-templates/fields.js.map +2 -2
  15. package/build-module/components/page-templates/index.js +41 -31
  16. package/build-module/components/page-templates/index.js.map +2 -2
  17. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +6 -7
  18. package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +2 -2
  19. package/build-module/components/style-book/index.js +20 -11
  20. package/build-module/components/style-book/index.js.map +2 -2
  21. package/package.json +44 -44
  22. package/src/components/dataviews-actions/index.js +12 -10
  23. package/src/components/page-templates/fields.js +23 -29
  24. package/src/components/page-templates/index.js +51 -38
  25. package/src/components/sidebar-navigation-screen-templates-browse/content.js +6 -7
  26. package/src/components/style-book/index.js +23 -13
  27. package/tsconfig.tsbuildinfo +1 -1
@@ -227,19 +227,29 @@ function applyBlockVariationsToExamples( examples, variation ) {
227
227
  if ( ! variation ) {
228
228
  return examples;
229
229
  }
230
-
231
- return examples.map( ( example ) => ( {
232
- ...example,
233
- variation,
234
- blocks: {
235
- ...example.blocks,
236
- attributes: {
237
- ...example.blocks.attributes,
238
- style: undefined,
239
- className: getVariationClassName( variation ),
240
- },
241
- },
242
- } ) );
230
+ return examples.map( ( example ) => {
231
+ return {
232
+ ...example,
233
+ variation,
234
+ blocks: Array.isArray( example.blocks )
235
+ ? example.blocks.map( ( block ) => ( {
236
+ ...block,
237
+ attributes: {
238
+ ...block.attributes,
239
+ style: undefined,
240
+ className: getVariationClassName( variation ),
241
+ },
242
+ } ) )
243
+ : {
244
+ ...example.blocks,
245
+ attributes: {
246
+ ...example.blocks.attributes,
247
+ style: undefined,
248
+ className: getVariationClassName( variation ),
249
+ },
250
+ },
251
+ };
252
+ } );
243
253
  }
244
254
 
245
255
  function StyleBook( {