@wordpress/block-library 6.0.25 → 6.0.28

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 (123) hide show
  1. package/build/gallery/constants.js +5 -1
  2. package/build/gallery/constants.js.map +1 -1
  3. package/build/gallery/transforms.js +8 -2
  4. package/build/gallery/transforms.js.map +1 -1
  5. package/build/gallery/utils.js +4 -3
  6. package/build/gallery/utils.js.map +1 -1
  7. package/build/heading/edit.js +14 -2
  8. package/build/heading/edit.js.map +1 -1
  9. package/build/page-list/edit.js +37 -10
  10. package/build/page-list/edit.js.map +1 -1
  11. package/build/post-featured-image/dimension-controls.js +50 -30
  12. package/build/post-featured-image/dimension-controls.js.map +1 -1
  13. package/build/post-featured-image/edit.js +4 -2
  14. package/build/post-featured-image/edit.js.map +1 -1
  15. package/build/site-logo/edit.js +0 -25
  16. package/build/site-logo/edit.js.map +1 -1
  17. package/build/social-links/deprecated.js +1 -62
  18. package/build/social-links/deprecated.js.map +1 -1
  19. package/build/social-links/edit.js +1 -1
  20. package/build/social-links/edit.js.map +1 -1
  21. package/build/spacer/controls.js +111 -0
  22. package/build/spacer/controls.js.map +1 -0
  23. package/build/spacer/controls.native.js +95 -0
  24. package/build/spacer/controls.native.js.map +1 -0
  25. package/build/spacer/deprecated.js +53 -0
  26. package/build/spacer/deprecated.js.map +1 -0
  27. package/build/spacer/edit.js +111 -82
  28. package/build/spacer/edit.js.map +1 -1
  29. package/build/spacer/edit.native.js +76 -0
  30. package/build/spacer/edit.native.js.map +1 -0
  31. package/build/spacer/index.js +7 -4
  32. package/build/spacer/index.js.map +1 -1
  33. package/build/spacer/save.js +6 -3
  34. package/build/spacer/save.js.map +1 -1
  35. package/build/table/deprecated.js +1 -1
  36. package/build/table/deprecated.js.map +1 -1
  37. package/build-module/gallery/constants.js +2 -0
  38. package/build-module/gallery/constants.js.map +1 -1
  39. package/build-module/gallery/transforms.js +8 -2
  40. package/build-module/gallery/transforms.js.map +1 -1
  41. package/build-module/gallery/utils.js +5 -4
  42. package/build-module/gallery/utils.js.map +1 -1
  43. package/build-module/heading/edit.js +15 -3
  44. package/build-module/heading/edit.js.map +1 -1
  45. package/build-module/page-list/edit.js +38 -11
  46. package/build-module/page-list/edit.js.map +1 -1
  47. package/build-module/post-featured-image/dimension-controls.js +52 -29
  48. package/build-module/post-featured-image/dimension-controls.js.map +1 -1
  49. package/build-module/post-featured-image/edit.js +4 -2
  50. package/build-module/post-featured-image/edit.js.map +1 -1
  51. package/build-module/site-logo/edit.js +0 -25
  52. package/build-module/site-logo/edit.js.map +1 -1
  53. package/build-module/social-links/deprecated.js +1 -62
  54. package/build-module/social-links/deprecated.js.map +1 -1
  55. package/build-module/social-links/edit.js +1 -1
  56. package/build-module/social-links/edit.js.map +1 -1
  57. package/build-module/spacer/controls.js +101 -0
  58. package/build-module/spacer/controls.js.map +1 -0
  59. package/build-module/spacer/controls.native.js +82 -0
  60. package/build-module/spacer/controls.native.js.map +1 -0
  61. package/build-module/spacer/deprecated.js +44 -0
  62. package/build-module/spacer/deprecated.js.map +1 -0
  63. package/build-module/spacer/edit.js +108 -82
  64. package/build-module/spacer/edit.js.map +1 -1
  65. package/build-module/spacer/edit.native.js +61 -0
  66. package/build-module/spacer/edit.native.js.map +1 -0
  67. package/build-module/spacer/index.js +6 -4
  68. package/build-module/spacer/index.js.map +1 -1
  69. package/build-module/spacer/save.js +6 -3
  70. package/build-module/spacer/save.js.map +1 -1
  71. package/build-module/table/deprecated.js +1 -1
  72. package/build-module/table/deprecated.js.map +1 -1
  73. package/build-style/common-rtl.css +8 -0
  74. package/build-style/common.css +8 -0
  75. package/build-style/cover/style-rtl.css +67 -5
  76. package/build-style/cover/style.css +67 -5
  77. package/build-style/editor-rtl.css +8 -7
  78. package/build-style/editor.css +8 -7
  79. package/build-style/gallery/style-rtl.css +2 -1
  80. package/build-style/gallery/style.css +2 -1
  81. package/build-style/page-list/editor-rtl.css +4 -0
  82. package/build-style/page-list/editor.css +4 -0
  83. package/build-style/post-featured-image/editor-rtl.css +0 -7
  84. package/build-style/post-featured-image/editor.css +0 -7
  85. package/build-style/post-template/style-rtl.css +4 -0
  86. package/build-style/post-template/style.css +4 -0
  87. package/build-style/spacer/editor-rtl.css +4 -0
  88. package/build-style/spacer/editor.css +4 -0
  89. package/build-style/style-rtl.css +81 -6
  90. package/build-style/style.css +81 -6
  91. package/package.json +9 -9
  92. package/src/archives/index.php +1 -1
  93. package/src/common.scss +8 -0
  94. package/src/cover/style.scss +19 -3
  95. package/src/gallery/constants.js +2 -0
  96. package/src/gallery/style.scss +4 -1
  97. package/src/gallery/transforms.js +7 -1
  98. package/src/gallery/utils.js +7 -3
  99. package/src/heading/edit.js +18 -5
  100. package/src/navigation/index.php +4 -4
  101. package/src/page-list/edit.js +47 -9
  102. package/src/page-list/editor.scss +4 -0
  103. package/src/page-list/index.php +5 -0
  104. package/src/post-featured-image/dimension-controls.js +75 -50
  105. package/src/post-featured-image/edit.js +6 -4
  106. package/src/post-featured-image/editor.scss +0 -8
  107. package/src/post-template/style.scss +5 -0
  108. package/src/search/index.php +12 -7
  109. package/src/site-logo/edit.js +1 -32
  110. package/src/site-logo/index.php +1 -1
  111. package/src/site-title/index.php +0 -1
  112. package/src/social-links/deprecated.js +0 -59
  113. package/src/social-links/edit.js +1 -1
  114. package/src/spacer/block.json +3 -3
  115. package/src/spacer/controls.js +108 -0
  116. package/src/spacer/controls.native.js +82 -0
  117. package/src/spacer/deprecated.js +41 -0
  118. package/src/spacer/edit.js +127 -113
  119. package/src/spacer/edit.native.js +68 -0
  120. package/src/spacer/editor.scss +6 -0
  121. package/src/spacer/index.js +2 -0
  122. package/src/spacer/save.js +5 -2
  123. package/src/table/deprecated.js +5 -1
@@ -97,6 +97,10 @@
97
97
  .block-library-spacer__resize-container {
98
98
  clear: both;
99
99
  }
100
+ .block-library-spacer__resize-container:not(.is-resizing) {
101
+ height: 100% !important;
102
+ width: 100% !important;
103
+ }
100
104
  .block-library-spacer__resize-container .components-resizable-box__handle::before {
101
105
  content: none;
102
106
  }
@@ -97,6 +97,10 @@
97
97
  .block-library-spacer__resize-container {
98
98
  clear: both;
99
99
  }
100
+ .block-library-spacer__resize-container:not(.is-resizing) {
101
+ height: 100% !important;
102
+ width: 100% !important;
103
+ }
100
104
  .block-library-spacer__resize-container .components-resizable-box__handle::before {
101
105
  content: none;
102
106
  }
@@ -403,18 +403,20 @@
403
403
  .wp-block-cover .has-background-dim:not([class*=-background-color]) {
404
404
  background-color: #000;
405
405
  }
406
+ .wp-block-cover-image .has-background-dim.has-background-gradient,
407
+ .wp-block-cover .has-background-dim.has-background-gradient {
408
+ background-color: transparent;
409
+ }
406
410
  .wp-block-cover-image.has-background-dim::before,
407
- .wp-block-cover-image .has-background-dim::before,
408
- .wp-block-cover.has-background-dim::before,
409
- .wp-block-cover .has-background-dim::before {
411
+ .wp-block-cover.has-background-dim::before {
410
412
  content: "";
411
413
  background-color: inherit;
412
414
  }
413
415
  .wp-block-cover-image.has-background-dim:not(.has-background-gradient)::before,
414
- .wp-block-cover-image .has-background-dim:not(.has-background-gradient)::before,
416
+ .wp-block-cover-image .wp-block-cover__background,
415
417
  .wp-block-cover-image .wp-block-cover__gradient-background,
416
418
  .wp-block-cover.has-background-dim:not(.has-background-gradient)::before,
417
- .wp-block-cover .has-background-dim:not(.has-background-gradient)::before,
419
+ .wp-block-cover .wp-block-cover__background,
418
420
  .wp-block-cover .wp-block-cover__gradient-background {
419
421
  position: absolute;
420
422
  top: 0;
@@ -424,6 +426,66 @@
424
426
  z-index: 1;
425
427
  opacity: 0.5;
426
428
  }
429
+ .wp-block-cover-image.has-background-dim.has-background-dim-10:not(.has-background-gradient)::before,
430
+ .wp-block-cover-image.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background,
431
+ .wp-block-cover.has-background-dim.has-background-dim-10:not(.has-background-gradient)::before,
432
+ .wp-block-cover.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background {
433
+ opacity: 0.1;
434
+ }
435
+ .wp-block-cover-image.has-background-dim.has-background-dim-20:not(.has-background-gradient)::before,
436
+ .wp-block-cover-image.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background,
437
+ .wp-block-cover.has-background-dim.has-background-dim-20:not(.has-background-gradient)::before,
438
+ .wp-block-cover.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background {
439
+ opacity: 0.2;
440
+ }
441
+ .wp-block-cover-image.has-background-dim.has-background-dim-30:not(.has-background-gradient)::before,
442
+ .wp-block-cover-image.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background,
443
+ .wp-block-cover.has-background-dim.has-background-dim-30:not(.has-background-gradient)::before,
444
+ .wp-block-cover.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background {
445
+ opacity: 0.3;
446
+ }
447
+ .wp-block-cover-image.has-background-dim.has-background-dim-40:not(.has-background-gradient)::before,
448
+ .wp-block-cover-image.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background,
449
+ .wp-block-cover.has-background-dim.has-background-dim-40:not(.has-background-gradient)::before,
450
+ .wp-block-cover.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background {
451
+ opacity: 0.4;
452
+ }
453
+ .wp-block-cover-image.has-background-dim.has-background-dim-50:not(.has-background-gradient)::before,
454
+ .wp-block-cover-image.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background,
455
+ .wp-block-cover.has-background-dim.has-background-dim-50:not(.has-background-gradient)::before,
456
+ .wp-block-cover.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background {
457
+ opacity: 0.5;
458
+ }
459
+ .wp-block-cover-image.has-background-dim.has-background-dim-60:not(.has-background-gradient)::before,
460
+ .wp-block-cover-image.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background,
461
+ .wp-block-cover.has-background-dim.has-background-dim-60:not(.has-background-gradient)::before,
462
+ .wp-block-cover.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background {
463
+ opacity: 0.6;
464
+ }
465
+ .wp-block-cover-image.has-background-dim.has-background-dim-70:not(.has-background-gradient)::before,
466
+ .wp-block-cover-image.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background,
467
+ .wp-block-cover.has-background-dim.has-background-dim-70:not(.has-background-gradient)::before,
468
+ .wp-block-cover.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background {
469
+ opacity: 0.7;
470
+ }
471
+ .wp-block-cover-image.has-background-dim.has-background-dim-80:not(.has-background-gradient)::before,
472
+ .wp-block-cover-image.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background,
473
+ .wp-block-cover.has-background-dim.has-background-dim-80:not(.has-background-gradient)::before,
474
+ .wp-block-cover.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background {
475
+ opacity: 0.8;
476
+ }
477
+ .wp-block-cover-image.has-background-dim.has-background-dim-90:not(.has-background-gradient)::before,
478
+ .wp-block-cover-image.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background,
479
+ .wp-block-cover.has-background-dim.has-background-dim-90:not(.has-background-gradient)::before,
480
+ .wp-block-cover.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background {
481
+ opacity: 0.9;
482
+ }
483
+ .wp-block-cover-image.has-background-dim.has-background-dim-100:not(.has-background-gradient)::before,
484
+ .wp-block-cover-image.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background,
485
+ .wp-block-cover.has-background-dim.has-background-dim-100:not(.has-background-gradient)::before,
486
+ .wp-block-cover.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background {
487
+ opacity: 1;
488
+ }
427
489
  .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0,
428
490
  .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0 {
429
491
  opacity: 0;
@@ -969,6 +1031,7 @@ section.wp-block-cover-image > h2,
969
1031
  margin-top: auto;
970
1032
  margin-bottom: auto;
971
1033
  flex-direction: column;
1034
+ max-width: 100%;
972
1035
  }
973
1036
  .wp-block-gallery.has-nested-images figure.wp-block-image > div,
974
1037
  .wp-block-gallery.has-nested-images figure.wp-block-image > a {
@@ -979,7 +1042,7 @@ section.wp-block-cover-image > h2,
979
1042
  .wp-block-gallery.has-nested-images figure.wp-block-image img {
980
1043
  display: block;
981
1044
  height: auto;
982
- max-width: 100%;
1045
+ max-width: 100% !important;
983
1046
  width: auto;
984
1047
  }
985
1048
  .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
@@ -2265,6 +2328,10 @@ p.has-background {
2265
2328
  list-style: none;
2266
2329
  padding: 0;
2267
2330
  }
2331
+ .wp-block-post-template.wp-block-post-template,
2332
+ .wp-block-query-loop.wp-block-post-template {
2333
+ background: none;
2334
+ }
2268
2335
  .wp-block-post-template.is-flex-container,
2269
2336
  .wp-block-query-loop.is-flex-container {
2270
2337
  flex-direction: row;
@@ -3169,4 +3236,12 @@ pre.wp-block-verse {
3169
3236
  top: 5px;
3170
3237
  width: auto;
3171
3238
  z-index: 100000;
3239
+ }
3240
+
3241
+ /**
3242
+ * Provide baseline responsiveness for images.
3243
+ */
3244
+ html :where(img[class*="wp-image-"]) {
3245
+ height: auto;
3246
+ max-width: 100%;
3172
3247
  }
@@ -406,18 +406,20 @@
406
406
  .wp-block-cover .has-background-dim:not([class*=-background-color]) {
407
407
  background-color: #000;
408
408
  }
409
+ .wp-block-cover-image .has-background-dim.has-background-gradient,
410
+ .wp-block-cover .has-background-dim.has-background-gradient {
411
+ background-color: transparent;
412
+ }
409
413
  .wp-block-cover-image.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 {
414
+ .wp-block-cover.has-background-dim::before {
413
415
  content: "";
414
416
  background-color: inherit;
415
417
  }
416
418
  .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,
419
+ .wp-block-cover-image .wp-block-cover__background,
418
420
  .wp-block-cover-image .wp-block-cover__gradient-background,
419
421
  .wp-block-cover.has-background-dim:not(.has-background-gradient)::before,
420
- .wp-block-cover .has-background-dim:not(.has-background-gradient)::before,
422
+ .wp-block-cover .wp-block-cover__background,
421
423
  .wp-block-cover .wp-block-cover__gradient-background {
422
424
  position: absolute;
423
425
  top: 0;
@@ -427,6 +429,66 @@
427
429
  z-index: 1;
428
430
  opacity: 0.5;
429
431
  }
432
+ .wp-block-cover-image.has-background-dim.has-background-dim-10:not(.has-background-gradient)::before,
433
+ .wp-block-cover-image.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background,
434
+ .wp-block-cover.has-background-dim.has-background-dim-10:not(.has-background-gradient)::before,
435
+ .wp-block-cover.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background {
436
+ opacity: 0.1;
437
+ }
438
+ .wp-block-cover-image.has-background-dim.has-background-dim-20:not(.has-background-gradient)::before,
439
+ .wp-block-cover-image.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background,
440
+ .wp-block-cover.has-background-dim.has-background-dim-20:not(.has-background-gradient)::before,
441
+ .wp-block-cover.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background {
442
+ opacity: 0.2;
443
+ }
444
+ .wp-block-cover-image.has-background-dim.has-background-dim-30:not(.has-background-gradient)::before,
445
+ .wp-block-cover-image.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background,
446
+ .wp-block-cover.has-background-dim.has-background-dim-30:not(.has-background-gradient)::before,
447
+ .wp-block-cover.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background {
448
+ opacity: 0.3;
449
+ }
450
+ .wp-block-cover-image.has-background-dim.has-background-dim-40:not(.has-background-gradient)::before,
451
+ .wp-block-cover-image.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background,
452
+ .wp-block-cover.has-background-dim.has-background-dim-40:not(.has-background-gradient)::before,
453
+ .wp-block-cover.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background {
454
+ opacity: 0.4;
455
+ }
456
+ .wp-block-cover-image.has-background-dim.has-background-dim-50:not(.has-background-gradient)::before,
457
+ .wp-block-cover-image.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background,
458
+ .wp-block-cover.has-background-dim.has-background-dim-50:not(.has-background-gradient)::before,
459
+ .wp-block-cover.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background {
460
+ opacity: 0.5;
461
+ }
462
+ .wp-block-cover-image.has-background-dim.has-background-dim-60:not(.has-background-gradient)::before,
463
+ .wp-block-cover-image.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background,
464
+ .wp-block-cover.has-background-dim.has-background-dim-60:not(.has-background-gradient)::before,
465
+ .wp-block-cover.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background {
466
+ opacity: 0.6;
467
+ }
468
+ .wp-block-cover-image.has-background-dim.has-background-dim-70:not(.has-background-gradient)::before,
469
+ .wp-block-cover-image.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background,
470
+ .wp-block-cover.has-background-dim.has-background-dim-70:not(.has-background-gradient)::before,
471
+ .wp-block-cover.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background {
472
+ opacity: 0.7;
473
+ }
474
+ .wp-block-cover-image.has-background-dim.has-background-dim-80:not(.has-background-gradient)::before,
475
+ .wp-block-cover-image.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background,
476
+ .wp-block-cover.has-background-dim.has-background-dim-80:not(.has-background-gradient)::before,
477
+ .wp-block-cover.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background {
478
+ opacity: 0.8;
479
+ }
480
+ .wp-block-cover-image.has-background-dim.has-background-dim-90:not(.has-background-gradient)::before,
481
+ .wp-block-cover-image.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background,
482
+ .wp-block-cover.has-background-dim.has-background-dim-90:not(.has-background-gradient)::before,
483
+ .wp-block-cover.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background {
484
+ opacity: 0.9;
485
+ }
486
+ .wp-block-cover-image.has-background-dim.has-background-dim-100:not(.has-background-gradient)::before,
487
+ .wp-block-cover-image.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background,
488
+ .wp-block-cover.has-background-dim.has-background-dim-100:not(.has-background-gradient)::before,
489
+ .wp-block-cover.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background {
490
+ opacity: 1;
491
+ }
430
492
  .wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0,
431
493
  .wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0 {
432
494
  opacity: 0;
@@ -973,6 +1035,7 @@ section.wp-block-cover-image > h2,
973
1035
  margin-top: auto;
974
1036
  margin-bottom: auto;
975
1037
  flex-direction: column;
1038
+ max-width: 100%;
976
1039
  }
977
1040
  .wp-block-gallery.has-nested-images figure.wp-block-image > div,
978
1041
  .wp-block-gallery.has-nested-images figure.wp-block-image > a {
@@ -983,7 +1046,7 @@ section.wp-block-cover-image > h2,
983
1046
  .wp-block-gallery.has-nested-images figure.wp-block-image img {
984
1047
  display: block;
985
1048
  height: auto;
986
- max-width: 100%;
1049
+ max-width: 100% !important;
987
1050
  width: auto;
988
1051
  }
989
1052
  .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
@@ -2287,6 +2350,10 @@ p.has-background {
2287
2350
  list-style: none;
2288
2351
  padding: 0;
2289
2352
  }
2353
+ .wp-block-post-template.wp-block-post-template,
2354
+ .wp-block-query-loop.wp-block-post-template {
2355
+ background: none;
2356
+ }
2290
2357
  .wp-block-post-template.is-flex-container,
2291
2358
  .wp-block-query-loop.is-flex-container {
2292
2359
  flex-direction: row;
@@ -3198,4 +3265,12 @@ pre.wp-block-verse {
3198
3265
  top: 5px;
3199
3266
  width: auto;
3200
3267
  z-index: 100000;
3268
+ }
3269
+
3270
+ /**
3271
+ * Provide baseline responsiveness for images.
3272
+ */
3273
+ html :where(img[class*="wp-image-"]) {
3274
+ height: auto;
3275
+ max-width: 100%;
3201
3276
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-library",
3
- "version": "6.0.25",
3
+ "version": "6.0.28",
4
4
  "description": "Block library for the WordPress editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -34,14 +34,14 @@
34
34
  "dependencies": {
35
35
  "@babel/runtime": "^7.16.0",
36
36
  "@wordpress/a11y": "^3.2.4",
37
- "@wordpress/api-fetch": "^5.2.6",
37
+ "@wordpress/api-fetch": "^5.2.7",
38
38
  "@wordpress/autop": "^3.2.3",
39
39
  "@wordpress/blob": "^3.2.2",
40
- "@wordpress/block-editor": "^8.0.16",
40
+ "@wordpress/block-editor": "^8.0.18",
41
41
  "@wordpress/blocks": "^11.1.5",
42
- "@wordpress/components": "^19.2.2",
42
+ "@wordpress/components": "^19.2.3",
43
43
  "@wordpress/compose": "^5.0.7",
44
- "@wordpress/core-data": "^4.0.9",
44
+ "@wordpress/core-data": "^4.0.11",
45
45
  "@wordpress/data": "^6.1.5",
46
46
  "@wordpress/date": "^4.2.3",
47
47
  "@wordpress/deprecated": "^3.2.3",
@@ -56,10 +56,10 @@
56
56
  "@wordpress/keycodes": "^3.2.4",
57
57
  "@wordpress/notices": "^3.2.8",
58
58
  "@wordpress/primitives": "^3.0.4",
59
- "@wordpress/reusable-blocks": "^3.0.22",
59
+ "@wordpress/reusable-blocks": "^3.0.24",
60
60
  "@wordpress/rich-text": "^5.0.8",
61
- "@wordpress/server-side-render": "^3.0.19",
62
- "@wordpress/url": "^3.3.1",
61
+ "@wordpress/server-side-render": "^3.0.21",
62
+ "@wordpress/url": "^3.3.2",
63
63
  "@wordpress/viewport": "^4.0.7",
64
64
  "classnames": "^2.3.1",
65
65
  "colord": "^2.7.0",
@@ -72,5 +72,5 @@
72
72
  "publishConfig": {
73
73
  "access": "public"
74
74
  },
75
- "gitHead": "cac1a1f3c854fc282d67b91a74936c3fe42d7d0a"
75
+ "gitHead": "342ca4cdad4dd5a974db45232a48fe53f7eb28e0"
76
76
  }
@@ -23,7 +23,7 @@ function render_block_core_archives( $attributes ) {
23
23
 
24
24
  $class .= ' wp-block-archives-dropdown';
25
25
 
26
- $dropdown_id = esc_attr( uniqid( 'wp-block-archives-' ) );
26
+ $dropdown_id = wp_unique_id( 'wp-block-archives-' );
27
27
  $title = __( 'Archives' );
28
28
 
29
29
  /** This filter is documented in wp-includes/widgets/class-wp-widget-archives.php */
package/src/common.scss CHANGED
@@ -101,3 +101,11 @@
101
101
  width: auto;
102
102
  z-index: 100000;
103
103
  }
104
+
105
+ /**
106
+ * Provide baseline responsiveness for images.
107
+ */
108
+ html :where(img[class*="wp-image-"]) {
109
+ height: auto;
110
+ max-width: 100%;
111
+ }
@@ -50,16 +50,19 @@
50
50
  background-color: $black;
51
51
  }
52
52
 
53
+ .has-background-dim.has-background-gradient {
54
+ background-color: transparent;
55
+ }
56
+
53
57
  // the first selector is required for old Cover markup
54
- &.has-background-dim::before,
55
- .has-background-dim::before {
58
+ &.has-background-dim::before {
56
59
  content: "";
57
60
  background-color: inherit;
58
61
  }
59
62
 
60
63
  // the first selector is required for old Cover markup
61
64
  &.has-background-dim:not(.has-background-gradient)::before,
62
- .has-background-dim:not(.has-background-gradient)::before,
65
+ .wp-block-cover__background,
63
66
  .wp-block-cover__gradient-background {
64
67
  position: absolute;
65
68
  top: 0;
@@ -70,6 +73,19 @@
70
73
  opacity: 0.5;
71
74
  }
72
75
 
76
+ // The following styles are needed to support legacy blocks added prior to the update
77
+ // that moved opacity to a nested span.
78
+ // https://github.com/WordPress/gutenberg/pull/35065
79
+ // https://github.com/WordPress/gutenberg/pull/38362
80
+ @for $i from 1 through 10 {
81
+ &.has-background-dim.has-background-dim-#{ $i * 10 } {
82
+ &:not(.has-background-gradient)::before,
83
+ .wp-block-cover__gradient-background {
84
+ opacity: $i * 0.1;
85
+ }
86
+ }
87
+ }
88
+
73
89
  @for $i from 0 through 10 {
74
90
  .wp-block-cover__gradient-background.has-background-dim.has-background-dim-#{ $i * 10 } {
75
91
  opacity: $i * 0.1;
@@ -1,3 +1,5 @@
1
1
  export const LINK_DESTINATION_NONE = 'none';
2
2
  export const LINK_DESTINATION_MEDIA = 'media';
3
3
  export const LINK_DESTINATION_ATTACHMENT = 'attachment';
4
+ export const LINK_DESTINATION_MEDIA_WP_CORE = 'file';
5
+ export const LINK_DESTINATION_ATTACHMENT_WP_CORE = 'post';
@@ -30,6 +30,7 @@
30
30
  margin-top: auto;
31
31
  margin-bottom: auto;
32
32
  flex-direction: column;
33
+ max-width: 100%;
33
34
 
34
35
  > div,
35
36
  > a {
@@ -41,7 +42,9 @@
41
42
  img {
42
43
  display: block;
43
44
  height: auto;
44
- max-width: 100%;
45
+ // Ensure max-width is not overridden on the img when the parent gallery has
46
+ // wide or full alignment.
47
+ max-width: 100% !important;
45
48
  width: auto;
46
49
  }
47
50
 
@@ -291,7 +291,10 @@ const transforms = {
291
291
  url,
292
292
  alt,
293
293
  caption,
294
- imageSizeSlug,
294
+ sizeSlug: imageSizeSlug,
295
+ linkDestination,
296
+ href,
297
+ linkTarget,
295
298
  },
296
299
  } ) =>
297
300
  createBlock( 'core/image', {
@@ -301,6 +304,9 @@ const transforms = {
301
304
  caption,
302
305
  sizeSlug: imageSizeSlug,
303
306
  align,
307
+ linkDestination,
308
+ href,
309
+ linkTarget,
304
310
  } )
305
311
  );
306
312
  }
@@ -5,6 +5,8 @@ import {
5
5
  LINK_DESTINATION_ATTACHMENT,
6
6
  LINK_DESTINATION_MEDIA,
7
7
  LINK_DESTINATION_NONE,
8
+ LINK_DESTINATION_MEDIA_WP_CORE,
9
+ LINK_DESTINATION_ATTACHMENT_WP_CORE,
8
10
  } from './constants';
9
11
  import {
10
12
  LINK_DESTINATION_ATTACHMENT as IMAGE_LINK_DESTINATION_ATTACHMENT,
@@ -21,15 +23,17 @@ import {
21
23
  * @return {Object} New attributes to assign to image block.
22
24
  */
23
25
  export function getHrefAndDestination( image, destination ) {
24
- // Need to determine the URL that the selected destination maps to.
25
- // Gutenberg and WordPress use different constants so the new link
26
- // destination also needs to be tweaked.
26
+ // Gutenberg and WordPress use different constants so if image_default_link_type
27
+ // option is set we need to map from the WP Core values.
28
+
27
29
  switch ( destination ) {
30
+ case LINK_DESTINATION_MEDIA_WP_CORE:
28
31
  case LINK_DESTINATION_MEDIA:
29
32
  return {
30
33
  href: image?.source_url || image?.url, // eslint-disable-line camelcase
31
34
  linkDestination: IMAGE_LINK_DESTINATION_MEDIA,
32
35
  };
36
+ case LINK_DESTINATION_ATTACHMENT_WP_CORE:
33
37
  case LINK_DESTINATION_ATTACHMENT:
34
38
  return {
35
39
  href: image?.link,
@@ -8,7 +8,7 @@ import classnames from 'classnames';
8
8
  */
9
9
  import { __ } from '@wordpress/i18n';
10
10
  import { useEffect } from '@wordpress/element';
11
- import { useDispatch } from '@wordpress/data';
11
+ import { useDispatch, useSelect } from '@wordpress/data';
12
12
  import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
13
13
  import {
14
14
  AlignmentControl,
@@ -41,6 +41,14 @@ function HeadingEdit( {
41
41
  style,
42
42
  } );
43
43
 
44
+ const { canGenerateAnchors } = useSelect( ( select ) => {
45
+ const settings = select( blockEditorStore ).getSettings();
46
+
47
+ return {
48
+ canGenerateAnchors: !! settings.__experimentalGenerateAnchors,
49
+ };
50
+ }, [] );
51
+
44
52
  const { __unstableMarkNextChangeAsNotPersistent } = useDispatch(
45
53
  blockEditorStore
46
54
  );
@@ -48,6 +56,10 @@ function HeadingEdit( {
48
56
  // Initially set anchor for headings that have content but no anchor set.
49
57
  // This is used when transforming a block to heading, or for legacy anchors.
50
58
  useEffect( () => {
59
+ if ( ! canGenerateAnchors ) {
60
+ return;
61
+ }
62
+
51
63
  if ( ! anchor && content ) {
52
64
  // This side-effect should not create an undo level.
53
65
  __unstableMarkNextChangeAsNotPersistent();
@@ -59,14 +71,15 @@ function HeadingEdit( {
59
71
 
60
72
  // Remove anchor map when block unmounts.
61
73
  return () => setAnchor( clientId, null );
62
- }, [ content, anchor ] );
74
+ }, [ anchor, content, clientId, canGenerateAnchors ] );
63
75
 
64
76
  const onContentChange = ( value ) => {
65
77
  const newAttrs = { content: value };
66
78
  if (
67
- ! anchor ||
68
- ! value ||
69
- generateAnchor( clientId, content ) === anchor
79
+ canGenerateAnchors &&
80
+ ( ! anchor ||
81
+ ! value ||
82
+ generateAnchor( clientId, content ) === anchor )
70
83
  ) {
71
84
  newAttrs.anchor = generateAnchor( clientId, value );
72
85
  }
@@ -513,7 +513,7 @@ function render_block_core_navigation( $attributes, $content, $block ) {
513
513
  )
514
514
  );
515
515
 
516
- $modal_unique_id = uniqid();
516
+ $modal_unique_id = wp_unique_id( 'modal-' );
517
517
 
518
518
  // Determine whether or not navigation elements should be wrapped in the markup required to make it responsive,
519
519
  // return early if they don't.
@@ -538,12 +538,12 @@ function render_block_core_navigation( $attributes, $content, $block ) {
538
538
  );
539
539
 
540
540
  $responsive_container_markup = sprintf(
541
- '<button aria-haspopup="true" aria-label="%3$s" class="%6$s" data-micromodal-trigger="modal-%1$s"><svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false"><rect x="4" y="7.5" width="16" height="1.5" /><rect x="4" y="15" width="16" height="1.5" /></svg></button>
542
- <div class="%5$s" style="%7$s" id="modal-%1$s">
541
+ '<button aria-haspopup="true" aria-label="%3$s" class="%6$s" data-micromodal-trigger="%1$s"><svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false"><rect x="4" y="7.5" width="16" height="1.5" /><rect x="4" y="15" width="16" height="1.5" /></svg></button>
542
+ <div class="%5$s" style="%7$s" id="%1$s">
543
543
  <div class="wp-block-navigation__responsive-close" tabindex="-1" data-micromodal-close>
544
544
  <div class="wp-block-navigation__responsive-dialog" aria-label="%8$s">
545
545
  <button aria-label="%4$s" data-micromodal-close class="wp-block-navigation__responsive-container-close"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" role="img" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg></button>
546
- <div class="wp-block-navigation__responsive-container-content" id="modal-%1$s-content">
546
+ <div class="wp-block-navigation__responsive-container-content" id="%1$s-content">
547
547
  %2$s
548
548
  </div>
549
549
  </div>