@wordpress/block-library 8.12.6 → 8.12.7

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 (99) hide show
  1. package/build/archives/index.js +5 -1
  2. package/build/archives/index.js.map +1 -1
  3. package/build/audio/index.js +5 -1
  4. package/build/audio/index.js.map +1 -1
  5. package/build/categories/index.js +5 -1
  6. package/build/categories/index.js.map +1 -1
  7. package/build/code/index.js +5 -1
  8. package/build/code/index.js.map +1 -1
  9. package/build/details/index.js +5 -1
  10. package/build/details/index.js.map +1 -1
  11. package/build/gallery/index.js +3 -1
  12. package/build/gallery/index.js.map +1 -1
  13. package/build/heading/index.js +5 -1
  14. package/build/heading/index.js.map +1 -1
  15. package/build/heading/transforms.js +5 -1
  16. package/build/heading/transforms.js.map +1 -1
  17. package/build/image/image.js +1 -1
  18. package/build/image/image.js.map +1 -1
  19. package/build/list/index.js +5 -1
  20. package/build/list/index.js.map +1 -1
  21. package/build/list-item/utils.js +5 -1
  22. package/build/list-item/utils.js.map +1 -1
  23. package/build/post-time-to-read/index.js +5 -1
  24. package/build/post-time-to-read/index.js.map +1 -1
  25. package/build/site-logo/index.js +5 -1
  26. package/build/site-logo/index.js.map +1 -1
  27. package/build/site-tagline/index.js +5 -1
  28. package/build/site-tagline/index.js.map +1 -1
  29. package/build/site-title/index.js +5 -1
  30. package/build/site-title/index.js.map +1 -1
  31. package/build/social-links/index.js +3 -1
  32. package/build/social-links/index.js.map +1 -1
  33. package/build/table/index.js +5 -1
  34. package/build/table/index.js.map +1 -1
  35. package/build/verse/index.js +5 -1
  36. package/build/verse/index.js.map +1 -1
  37. package/build/video/deprecated.js +5 -1
  38. package/build/video/deprecated.js.map +1 -1
  39. package/build/video/index.js +5 -1
  40. package/build/video/index.js.map +1 -1
  41. package/build-module/archives/index.js +5 -1
  42. package/build-module/archives/index.js.map +1 -1
  43. package/build-module/audio/index.js +5 -1
  44. package/build-module/audio/index.js.map +1 -1
  45. package/build-module/categories/index.js +5 -1
  46. package/build-module/categories/index.js.map +1 -1
  47. package/build-module/code/index.js +5 -1
  48. package/build-module/code/index.js.map +1 -1
  49. package/build-module/details/index.js +5 -1
  50. package/build-module/details/index.js.map +1 -1
  51. package/build-module/gallery/index.js +3 -1
  52. package/build-module/gallery/index.js.map +1 -1
  53. package/build-module/heading/index.js +5 -1
  54. package/build-module/heading/index.js.map +1 -1
  55. package/build-module/heading/transforms.js +5 -1
  56. package/build-module/heading/transforms.js.map +1 -1
  57. package/build-module/image/image.js +1 -1
  58. package/build-module/image/image.js.map +1 -1
  59. package/build-module/list/index.js +5 -1
  60. package/build-module/list/index.js.map +1 -1
  61. package/build-module/list-item/utils.js +5 -1
  62. package/build-module/list-item/utils.js.map +1 -1
  63. package/build-module/post-time-to-read/index.js +5 -1
  64. package/build-module/post-time-to-read/index.js.map +1 -1
  65. package/build-module/site-logo/index.js +5 -1
  66. package/build-module/site-logo/index.js.map +1 -1
  67. package/build-module/site-tagline/index.js +5 -1
  68. package/build-module/site-tagline/index.js.map +1 -1
  69. package/build-module/site-title/index.js +5 -1
  70. package/build-module/site-title/index.js.map +1 -1
  71. package/build-module/social-links/index.js +3 -1
  72. package/build-module/social-links/index.js.map +1 -1
  73. package/build-module/table/index.js +5 -1
  74. package/build-module/table/index.js.map +1 -1
  75. package/build-module/verse/index.js +5 -1
  76. package/build-module/verse/index.js.map +1 -1
  77. package/build-module/video/deprecated.js +5 -1
  78. package/build-module/video/deprecated.js.map +1 -1
  79. package/build-module/video/index.js +5 -1
  80. package/build-module/video/index.js.map +1 -1
  81. package/package.json +12 -12
  82. package/src/archives/block.json +5 -1
  83. package/src/audio/block.json +5 -1
  84. package/src/categories/block.json +5 -1
  85. package/src/code/block.json +5 -1
  86. package/src/details/block.json +5 -1
  87. package/src/gallery/block.json +3 -1
  88. package/src/heading/block.json +5 -1
  89. package/src/image/image.js +2 -1
  90. package/src/list/block.json +5 -1
  91. package/src/post-time-to-read/block.json +5 -1
  92. package/src/post-title/index.php +6 -3
  93. package/src/site-logo/block.json +5 -1
  94. package/src/site-tagline/block.json +5 -1
  95. package/src/site-title/block.json +5 -1
  96. package/src/social-links/block.json +3 -1
  97. package/src/table/block.json +5 -1
  98. package/src/verse/block.json +5 -1
  99. package/src/video/block.json +5 -1
@@ -49,7 +49,11 @@
49
49
  "align": true,
50
50
  "spacing": {
51
51
  "margin": true,
52
- "padding": true
52
+ "padding": true,
53
+ "__experimentalDefaultControls": {
54
+ "margin": false,
55
+ "padding": false
56
+ }
53
57
  }
54
58
  },
55
59
  "editorStyle": "wp-block-audio-editor",
@@ -33,7 +33,11 @@
33
33
  "html": false,
34
34
  "spacing": {
35
35
  "margin": true,
36
- "padding": true
36
+ "padding": true,
37
+ "__experimentalDefaultControls": {
38
+ "margin": false,
39
+ "padding": false
40
+ }
37
41
  },
38
42
  "typography": {
39
43
  "fontSize": true,
@@ -31,7 +31,11 @@
31
31
  },
32
32
  "spacing": {
33
33
  "margin": [ "top", "bottom" ],
34
- "padding": true
34
+ "padding": true,
35
+ "__experimentalDefaultControls": {
36
+ "margin": false,
37
+ "padding": false
38
+ }
35
39
  },
36
40
  "__experimentalBorder": {
37
41
  "radius": true,
@@ -34,7 +34,11 @@
34
34
  "html": false,
35
35
  "spacing": {
36
36
  "margin": true,
37
- "padding": true
37
+ "padding": true,
38
+ "__experimentalDefaultControls": {
39
+ "margin": false,
40
+ "padding": false
41
+ }
38
42
  },
39
43
  "typography": {
40
44
  "fontSize": true,
@@ -115,7 +115,9 @@
115
115
  "blockGap": [ "horizontal", "vertical" ],
116
116
  "__experimentalSkipSerialization": [ "blockGap" ],
117
117
  "__experimentalDefaultControls": {
118
- "blockGap": true
118
+ "blockGap": true,
119
+ "margin": false,
120
+ "padding": false
119
121
  }
120
122
  },
121
123
  "color": {
@@ -40,7 +40,11 @@
40
40
  },
41
41
  "spacing": {
42
42
  "margin": true,
43
- "padding": true
43
+ "padding": true,
44
+ "__experimentalDefaultControls": {
45
+ "margin": false,
46
+ "padding": false
47
+ }
44
48
  },
45
49
  "typography": {
46
50
  "fontSize": true,
@@ -607,7 +607,8 @@ export default function Image( {
607
607
  const ratio =
608
608
  ( aspectRatio && evalAspectRatio( aspectRatio ) ) ||
609
609
  ( width && height && width / height ) ||
610
- naturalWidth / naturalHeight;
610
+ naturalWidth / naturalHeight ||
611
+ 1;
611
612
 
612
613
  const currentWidth = ! width && height ? height * ratio : width;
613
614
  const currentHeight = ! height && width ? width / ratio : height;
@@ -61,7 +61,11 @@
61
61
  },
62
62
  "spacing": {
63
63
  "margin": true,
64
- "padding": true
64
+ "padding": true,
65
+ "__experimentalDefaultControls": {
66
+ "margin": false,
67
+ "padding": false
68
+ }
65
69
  },
66
70
  "__unstablePasteTextInline": true,
67
71
  "__experimentalSelector": "ol,ul",
@@ -24,7 +24,11 @@
24
24
  "html": false,
25
25
  "spacing": {
26
26
  "margin": true,
27
- "padding": true
27
+ "padding": true,
28
+ "__experimentalDefaultControls": {
29
+ "margin": false,
30
+ "padding": false
31
+ }
28
32
  },
29
33
  "typography": {
30
34
  "fontSize": true,
@@ -19,8 +19,11 @@ function render_block_core_post_title( $attributes, $content, $block ) {
19
19
  return '';
20
20
  }
21
21
 
22
- $post = get_post( $block->context['postId'] );
23
- $title = get_the_title( $post );
22
+ /**
23
+ * The `$post` argument is intentionally omitted so that changes are reflected when previewing a post.
24
+ * See: https://github.com/WordPress/gutenberg/pull/37622#issuecomment-1000932816.
25
+ */
26
+ $title = get_the_title();
24
27
 
25
28
  if ( ! $title ) {
26
29
  return '';
@@ -33,7 +36,7 @@ function render_block_core_post_title( $attributes, $content, $block ) {
33
36
 
34
37
  if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) {
35
38
  $rel = ! empty( $attributes['rel'] ) ? 'rel="' . esc_attr( $attributes['rel'] ) . '"' : '';
36
- $title = sprintf( '<a href="%1$s" target="%2$s" %3$s>%4$s</a>', get_the_permalink( $post ), esc_attr( $attributes['linkTarget'] ), $rel, $title );
39
+ $title = sprintf( '<a href="%1$s" target="%2$s" %3$s>%4$s</a>', get_the_permalink( $block->context['postId'] ), esc_attr( $attributes['linkTarget'] ), $rel, $title );
37
40
  }
38
41
 
39
42
  $classes = array();
@@ -40,7 +40,11 @@
40
40
  },
41
41
  "spacing": {
42
42
  "margin": true,
43
- "padding": true
43
+ "padding": true,
44
+ "__experimentalDefaultControls": {
45
+ "margin": false,
46
+ "padding": false
47
+ }
44
48
  }
45
49
  },
46
50
  "styles": [
@@ -25,7 +25,11 @@
25
25
  },
26
26
  "spacing": {
27
27
  "margin": true,
28
- "padding": true
28
+ "padding": true,
29
+ "__experimentalDefaultControls": {
30
+ "margin": false,
31
+ "padding": false
32
+ }
29
33
  },
30
34
  "typography": {
31
35
  "fontSize": true,
@@ -40,7 +40,11 @@
40
40
  },
41
41
  "spacing": {
42
42
  "padding": true,
43
- "margin": true
43
+ "margin": true,
44
+ "__experimentalDefaultControls": {
45
+ "margin": false,
46
+ "padding": false
47
+ }
44
48
  },
45
49
  "typography": {
46
50
  "fontSize": true,
@@ -73,7 +73,9 @@
73
73
  "padding": true,
74
74
  "units": [ "px", "em", "rem", "vh", "vw" ],
75
75
  "__experimentalDefaultControls": {
76
- "blockGap": true
76
+ "blockGap": true,
77
+ "margin": true,
78
+ "padding": false
77
79
  }
78
80
  }
79
81
  },
@@ -166,7 +166,11 @@
166
166
  },
167
167
  "spacing": {
168
168
  "margin": true,
169
- "padding": true
169
+ "padding": true,
170
+ "__experimentalDefaultControls": {
171
+ "margin": false,
172
+ "padding": false
173
+ }
170
174
  },
171
175
  "typography": {
172
176
  "fontSize": true,
@@ -46,7 +46,11 @@
46
46
  },
47
47
  "spacing": {
48
48
  "margin": true,
49
- "padding": true
49
+ "padding": true,
50
+ "__experimentalDefaultControls": {
51
+ "margin": false,
52
+ "padding": false
53
+ }
50
54
  },
51
55
  "__experimentalBorder": {
52
56
  "radius": true,
@@ -83,7 +83,11 @@
83
83
  "align": true,
84
84
  "spacing": {
85
85
  "margin": true,
86
- "padding": true
86
+ "padding": true,
87
+ "__experimentalDefaultControls": {
88
+ "margin": false,
89
+ "padding": false
90
+ }
87
91
  }
88
92
  },
89
93
  "editorStyle": "wp-block-video-editor",