@wordpress/block-library 9.1.0 → 9.3.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.
- package/CHANGELOG.md +21 -17
- package/build/audio/edit.js +20 -8
- package/build/audio/edit.js.map +1 -1
- package/build/audio/index.js +4 -0
- package/build/audio/index.js.map +1 -1
- package/build/audio/transforms.js +1 -1
- package/build/audio/transforms.js.map +1 -1
- package/build/block/edit.js +0 -1
- package/build/block/edit.js.map +1 -1
- package/build/block/index.js +5 -1
- package/build/block/index.js.map +1 -1
- package/build/button/index.js +1 -0
- package/build/button/index.js.map +1 -1
- package/build/embed/embed-preview.js +4 -4
- package/build/embed/embed-preview.js.map +1 -1
- package/build/file/edit.js +14 -6
- package/build/file/edit.js.map +1 -1
- package/build/file/index.js +4 -0
- package/build/file/index.js.map +1 -1
- package/build/file/transforms.js +2 -3
- package/build/file/transforms.js.map +1 -1
- package/build/gallery/deprecated.js +6 -54
- package/build/gallery/deprecated.js.map +1 -1
- package/build/gallery/edit.js +9 -8
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/index.js +2 -2
- package/build/gallery/index.js.map +1 -1
- package/build/gallery/save.js +0 -11
- package/build/gallery/save.js.map +1 -1
- package/build/gallery/shared.js +0 -27
- package/build/gallery/shared.js.map +1 -1
- package/build/gallery/transforms.js +29 -80
- package/build/gallery/transforms.js.map +1 -1
- package/build/group/index.js +1 -0
- package/build/group/index.js.map +1 -1
- package/build/group/placeholder.js +5 -0
- package/build/group/placeholder.js.map +1 -1
- package/build/image/edit.js +13 -21
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +33 -19
- package/build/image/image.js.map +1 -1
- package/build/image/index.js +4 -0
- package/build/image/index.js.map +1 -1
- package/build/image/transforms.js +1 -1
- package/build/image/transforms.js.map +1 -1
- package/build/list-item/edit.js +1 -1
- package/build/list-item/edit.js.map +1 -1
- package/build/list-item/hooks/use-merge.js +8 -1
- package/build/list-item/hooks/use-merge.js.map +1 -1
- package/build/list-item/index.js +11 -1
- package/build/list-item/index.js.map +1 -1
- package/build/lock-unlock.js +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/loginout/index.js +3 -0
- package/build/loginout/index.js.map +1 -1
- package/build/media-text/edit.js +3 -2
- package/build/media-text/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +1 -1
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/page-list/convert-to-links-modal.js +1 -1
- package/build/page-list/convert-to-links-modal.js.map +1 -1
- package/build/page-list/edit.js +1 -1
- package/build/page-list/edit.js.map +1 -1
- package/build/post-content/index.js +3 -0
- package/build/post-content/index.js.map +1 -1
- package/build/post-date/edit.js +3 -1
- package/build/post-date/edit.js.map +1 -1
- package/build/post-excerpt/index.js +3 -0
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-title/index.js +3 -0
- package/build/post-title/index.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +3 -2
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/query-toolbar.js +54 -61
- package/build/query/edit/query-toolbar.js.map +1 -1
- package/build/query/index.js +34 -0
- package/build/query/index.js.map +1 -1
- package/build/quote/edit.js +1 -0
- package/build/quote/edit.js.map +1 -1
- package/build/site-tagline/index.js +1 -0
- package/build/site-tagline/index.js.map +1 -1
- package/build/site-title/index.js +1 -0
- package/build/site-title/index.js.map +1 -1
- package/build/social-link/edit.js +9 -3
- package/build/social-link/edit.js.map +1 -1
- package/build/table/edit.js +8 -17
- package/build/table/edit.js.map +1 -1
- package/build/table-of-contents/index.js +1 -1
- package/build/template-part/edit/title-modal.js +1 -1
- package/build/template-part/edit/title-modal.js.map +1 -1
- package/build/utils/caption.js +2 -1
- package/build/utils/caption.js.map +1 -1
- package/build/utils/hooks.js +12 -0
- package/build/utils/hooks.js.map +1 -1
- package/build/verse/index.js +1 -0
- package/build/verse/index.js.map +1 -1
- package/build/video/deprecated.js +4 -0
- package/build/video/deprecated.js.map +1 -1
- package/build/video/edit.js +17 -7
- package/build/video/edit.js.map +1 -1
- package/build/video/index.js +4 -0
- package/build/video/index.js.map +1 -1
- package/build/video/transforms.js +1 -1
- package/build/video/transforms.js.map +1 -1
- package/build-module/audio/edit.js +20 -8
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/audio/index.js +4 -0
- package/build-module/audio/index.js.map +1 -1
- package/build-module/audio/transforms.js +1 -1
- package/build-module/audio/transforms.js.map +1 -1
- package/build-module/block/edit.js +0 -1
- package/build-module/block/edit.js.map +1 -1
- package/build-module/block/index.js +5 -1
- package/build-module/block/index.js.map +1 -1
- package/build-module/button/index.js +1 -0
- package/build-module/button/index.js.map +1 -1
- package/build-module/embed/embed-preview.js +4 -4
- package/build-module/embed/embed-preview.js.map +1 -1
- package/build-module/file/edit.js +15 -7
- package/build-module/file/edit.js.map +1 -1
- package/build-module/file/index.js +4 -0
- package/build-module/file/index.js.map +1 -1
- package/build-module/file/transforms.js +2 -3
- package/build-module/file/transforms.js.map +1 -1
- package/build-module/gallery/deprecated.js +6 -54
- package/build-module/gallery/deprecated.js.map +1 -1
- package/build-module/gallery/edit.js +10 -9
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/index.js +1 -1
- package/build-module/gallery/index.js.map +1 -1
- package/build-module/gallery/save.js +0 -11
- package/build-module/gallery/save.js.map +1 -1
- package/build-module/gallery/shared.js +0 -25
- package/build-module/gallery/shared.js.map +1 -1
- package/build-module/gallery/transforms.js +29 -80
- package/build-module/gallery/transforms.js.map +1 -1
- package/build-module/group/index.js +1 -0
- package/build-module/group/index.js.map +1 -1
- package/build-module/group/placeholder.js +5 -0
- package/build-module/group/placeholder.js.map +1 -1
- package/build-module/image/edit.js +12 -20
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +28 -14
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/index.js +4 -0
- package/build-module/image/index.js.map +1 -1
- package/build-module/image/transforms.js +1 -1
- package/build-module/image/transforms.js.map +1 -1
- package/build-module/list-item/edit.js +1 -1
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/list-item/hooks/use-merge.js +8 -1
- package/build-module/list-item/hooks/use-merge.js.map +1 -1
- package/build-module/list-item/index.js +11 -1
- package/build-module/list-item/index.js.map +1 -1
- package/build-module/lock-unlock.js +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/loginout/index.js +3 -0
- package/build-module/loginout/index.js.map +1 -1
- package/build-module/media-text/edit.js +3 -2
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +1 -1
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/page-list/convert-to-links-modal.js +1 -1
- package/build-module/page-list/convert-to-links-modal.js.map +1 -1
- package/build-module/page-list/edit.js +1 -1
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/post-content/index.js +3 -0
- package/build-module/post-content/index.js.map +1 -1
- package/build-module/post-date/edit.js +4 -2
- package/build-module/post-date/edit.js.map +1 -1
- package/build-module/post-excerpt/index.js +3 -0
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-title/index.js +3 -0
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +3 -2
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/query-toolbar.js +55 -62
- package/build-module/query/edit/query-toolbar.js.map +1 -1
- package/build-module/query/index.js +34 -0
- package/build-module/query/index.js.map +1 -1
- package/build-module/quote/edit.js +1 -0
- package/build-module/quote/edit.js.map +1 -1
- package/build-module/site-tagline/index.js +1 -0
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/site-title/index.js +1 -0
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-link/edit.js +9 -3
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/table/edit.js +9 -18
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table-of-contents/index.js +1 -1
- package/build-module/template-part/edit/title-modal.js +1 -1
- package/build-module/template-part/edit/title-modal.js.map +1 -1
- package/build-module/utils/caption.js +2 -1
- package/build-module/utils/caption.js.map +1 -1
- package/build-module/utils/hooks.js +11 -0
- package/build-module/utils/hooks.js.map +1 -1
- package/build-module/verse/index.js +1 -0
- package/build-module/verse/index.js.map +1 -1
- package/build-module/video/deprecated.js +4 -0
- package/build-module/video/deprecated.js.map +1 -1
- package/build-module/video/edit.js +18 -8
- package/build-module/video/edit.js.map +1 -1
- package/build-module/video/index.js +4 -0
- package/build-module/video/index.js.map +1 -1
- package/build-module/video/transforms.js +1 -1
- package/build-module/video/transforms.js.map +1 -1
- package/build-style/audio/style-rtl.css +1 -1
- package/build-style/audio/style.css +1 -1
- package/build-style/audio/theme-rtl.css +2 -2
- package/build-style/audio/theme.css +2 -2
- package/build-style/common-rtl.css +1 -3
- package/build-style/common.css +1 -3
- package/build-style/editor-rtl.css +3 -12
- package/build-style/editor.css +3 -12
- package/build-style/embed/style-rtl.css +1 -1
- package/build-style/embed/style.css +1 -1
- package/build-style/embed/theme-rtl.css +2 -2
- package/build-style/embed/theme.css +2 -2
- package/build-style/image/editor-rtl.css +0 -12
- package/build-style/image/editor.css +0 -12
- package/build-style/image/style-rtl.css +7 -1
- package/build-style/image/style.css +7 -1
- package/build-style/media-text/style-rtl.css +4 -0
- package/build-style/media-text/style.css +4 -0
- package/build-style/navigation/style-rtl.css +1 -0
- package/build-style/navigation/style.css +1 -0
- package/build-style/post-comments-form/style-rtl.css +11 -10
- package/build-style/post-comments-form/style.css +11 -10
- package/build-style/query/editor-rtl.css +3 -0
- package/build-style/query/editor.css +3 -0
- package/build-style/reset-rtl.css +1 -5
- package/build-style/reset.css +1 -5
- package/build-style/search/style-rtl.css +1 -2
- package/build-style/search/style.css +1 -2
- package/build-style/social-links/style-rtl.css +91 -91
- package/build-style/social-links/style.css +91 -91
- package/build-style/style-rtl.css +119 -110
- package/build-style/style.css +119 -110
- package/build-style/table/theme-rtl.css +2 -2
- package/build-style/table/theme.css +2 -2
- package/build-style/theme-rtl.css +8 -8
- package/build-style/theme.css +8 -8
- package/build-style/video/style-rtl.css +1 -1
- package/build-style/video/style.css +1 -1
- package/build-style/video/theme-rtl.css +2 -2
- package/build-style/video/theme.css +2 -2
- package/package.json +35 -35
- package/src/audio/block.json +4 -0
- package/src/audio/edit.js +19 -7
- package/src/audio/style.scss +1 -1
- package/src/audio/theme.scss +1 -1
- package/src/audio/transforms.js +1 -1
- package/src/block/block.json +5 -1
- package/src/block/edit.js +0 -1
- package/src/button/block.json +1 -0
- package/src/button/index.php +14 -1
- package/src/embed/embed-preview.js +4 -6
- package/src/embed/style.scss +1 -1
- package/src/embed/theme.scss +1 -1
- package/src/file/block.json +4 -0
- package/src/file/edit.js +19 -6
- package/src/file/transforms.js +1 -2
- package/src/gallery/deprecated.js +6 -55
- package/src/gallery/edit.js +13 -10
- package/src/gallery/gallery-styles.native.scss +0 -2
- package/src/gallery/index.js +1 -1
- package/src/gallery/save.js +0 -10
- package/src/gallery/shared.js +0 -28
- package/src/gallery/transforms.js +56 -99
- package/src/group/block.json +1 -0
- package/src/group/placeholder.js +7 -0
- package/src/image/block.json +4 -0
- package/src/image/edit.js +10 -19
- package/src/image/editor.scss +0 -13
- package/src/image/image.js +45 -16
- package/src/image/index.php +26 -5
- package/src/image/style.scss +11 -1
- package/src/image/transforms.js +1 -1
- package/src/list-item/block.json +11 -1
- package/src/list-item/edit.js +1 -1
- package/src/list-item/hooks/use-merge.js +19 -5
- package/src/lock-unlock.js +1 -1
- package/src/loginout/block.json +3 -0
- package/src/media-text/edit.js +3 -2
- package/src/media-text/index.php +68 -18
- package/src/media-text/style.scss +4 -0
- package/src/navigation/index.php +5 -3
- package/src/navigation/style.scss +1 -0
- package/src/navigation-submenu/edit.js +1 -1
- package/src/page-list/convert-to-links-modal.js +1 -1
- package/src/page-list/edit.js +1 -1
- package/src/paragraph/test/__snapshots__/edit.native.js.snap +30 -0
- package/src/paragraph/test/edit.native.js +99 -0
- package/src/post-comments-form/style.scss +15 -12
- package/src/post-content/block.json +3 -0
- package/src/post-date/edit.js +5 -1
- package/src/post-date/index.php +9 -3
- package/src/post-excerpt/block.json +3 -0
- package/src/post-title/block.json +3 -0
- package/src/query/edit/inspector-controls/index.js +3 -2
- package/src/query/edit/query-toolbar.js +60 -72
- package/src/query/editor.scss +4 -0
- package/src/query/index.js +40 -0
- package/src/quote/edit.js +1 -0
- package/src/reset.scss +11 -12
- package/src/site-tagline/block.json +1 -0
- package/src/site-title/block.json +1 -0
- package/src/social-link/edit.js +9 -3
- package/src/social-links/style.scss +2 -2
- package/src/table/edit.js +11 -24
- package/src/table/theme.scss +1 -1
- package/src/table-of-contents/block.json +1 -1
- package/src/template-part/edit/title-modal.js +1 -1
- package/src/template-part/index.php +1 -1
- package/src/utils/caption.js +5 -1
- package/src/utils/hooks.js +14 -1
- package/src/verse/block.json +1 -0
- package/src/video/block.json +4 -0
- package/src/video/edit.js +23 -8
- package/src/video/style.scss +1 -1
- package/src/video/theme.scss +1 -1
- package/src/video/transforms.js +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/build/gallery/edit-wrapper.js +0 -37
- package/build/gallery/edit-wrapper.js.map +0 -1
- package/build/gallery/v1/constants.js +0 -10
- package/build/gallery/v1/constants.js.map +0 -1
- package/build/gallery/v1/edit.js +0 -399
- package/build/gallery/v1/edit.js.map +0 -1
- package/build/gallery/v1/gallery-button.native.js +0 -55
- package/build/gallery/v1/gallery-button.native.js.map +0 -1
- package/build/gallery/v1/gallery-image.js +0 -285
- package/build/gallery/v1/gallery-image.js.map +0 -1
- package/build/gallery/v1/gallery-image.native.js +0 -297
- package/build/gallery/v1/gallery-image.native.js.map +0 -1
- package/build/gallery/v1/gallery.js +0 -112
- package/build/gallery/v1/gallery.js.map +0 -1
- package/build/gallery/v1/gallery.native.js +0 -139
- package/build/gallery/v1/gallery.native.js.map +0 -1
- package/build/gallery/v1/save.js +0 -81
- package/build/gallery/v1/save.js.map +0 -1
- package/build/gallery/v1/shared.js +0 -17
- package/build/gallery/v1/shared.js.map +0 -1
- package/build/gallery/v1/tiles.native.js +0 -83
- package/build/gallery/v1/tiles.native.js.map +0 -1
- package/build/utils/constants.js +0 -15
- package/build/utils/constants.js.map +0 -1
- package/build-module/gallery/edit-wrapper.js +0 -31
- package/build-module/gallery/edit-wrapper.js.map +0 -1
- package/build-module/gallery/v1/constants.js +0 -4
- package/build-module/gallery/v1/constants.js.map +0 -1
- package/build-module/gallery/v1/edit.js +0 -393
- package/build-module/gallery/v1/edit.js.map +0 -1
- package/build-module/gallery/v1/gallery-button.native.js +0 -46
- package/build-module/gallery/v1/gallery-button.native.js.map +0 -1
- package/build-module/gallery/v1/gallery-image.js +0 -279
- package/build-module/gallery/v1/gallery-image.js.map +0 -1
- package/build-module/gallery/v1/gallery-image.native.js +0 -291
- package/build-module/gallery/v1/gallery-image.native.js.map +0 -1
- package/build-module/gallery/v1/gallery.js +0 -104
- package/build-module/gallery/v1/gallery.js.map +0 -1
- package/build-module/gallery/v1/gallery.native.js +0 -131
- package/build-module/gallery/v1/gallery.native.js.map +0 -1
- package/build-module/gallery/v1/save.js +0 -74
- package/build-module/gallery/v1/save.js.map +0 -1
- package/build-module/gallery/v1/shared.js +0 -10
- package/build-module/gallery/v1/shared.js.map +0 -1
- package/build-module/gallery/v1/tiles.native.js +0 -75
- package/build-module/gallery/v1/tiles.native.js.map +0 -1
- package/build-module/utils/constants.js +0 -9
- package/build-module/utils/constants.js.map +0 -1
- package/src/gallery/edit-wrapper.js +0 -27
- package/src/gallery/v1/constants.js +0 -3
- package/src/gallery/v1/edit.js +0 -450
- package/src/gallery/v1/gallery-button.native.js +0 -47
- package/src/gallery/v1/gallery-image-style.native.scss +0 -109
- package/src/gallery/v1/gallery-image.js +0 -293
- package/src/gallery/v1/gallery-image.native.js +0 -348
- package/src/gallery/v1/gallery-styles.native.scss +0 -8
- package/src/gallery/v1/gallery.js +0 -125
- package/src/gallery/v1/gallery.native.js +0 -162
- package/src/gallery/v1/save.js +0 -98
- package/src/gallery/v1/shared.js +0 -19
- package/src/gallery/v1/tiles-styles.native.scss +0 -11
- package/src/gallery/v1/tiles.native.js +0 -79
- package/src/utils/constants.js +0 -8
package/build-style/theme.css
CHANGED
|
@@ -86,12 +86,12 @@
|
|
|
86
86
|
/**
|
|
87
87
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
88
88
|
*/
|
|
89
|
-
.wp-block-audio figcaption {
|
|
89
|
+
.wp-block-audio :where(figcaption) {
|
|
90
90
|
color: #555;
|
|
91
91
|
font-size: 13px;
|
|
92
92
|
text-align: center;
|
|
93
93
|
}
|
|
94
|
-
.is-dark-theme .wp-block-audio figcaption {
|
|
94
|
+
.is-dark-theme .wp-block-audio :where(figcaption) {
|
|
95
95
|
color: rgba(255, 255, 255, 0.65);
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -106,12 +106,12 @@
|
|
|
106
106
|
padding: 0.8em 1em;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
.wp-block-embed figcaption {
|
|
109
|
+
.wp-block-embed :where(figcaption) {
|
|
110
110
|
color: #555;
|
|
111
111
|
font-size: 13px;
|
|
112
112
|
text-align: center;
|
|
113
113
|
}
|
|
114
|
-
.is-dark-theme .wp-block-embed figcaption {
|
|
114
|
+
.is-dark-theme .wp-block-embed :where(figcaption) {
|
|
115
115
|
color: rgba(255, 255, 255, 0.65);
|
|
116
116
|
}
|
|
117
117
|
|
|
@@ -225,21 +225,21 @@
|
|
|
225
225
|
.wp-block-table th {
|
|
226
226
|
word-break: normal;
|
|
227
227
|
}
|
|
228
|
-
.wp-block-table figcaption {
|
|
228
|
+
.wp-block-table :where(figcaption) {
|
|
229
229
|
color: #555;
|
|
230
230
|
font-size: 13px;
|
|
231
231
|
text-align: center;
|
|
232
232
|
}
|
|
233
|
-
.is-dark-theme .wp-block-table figcaption {
|
|
233
|
+
.is-dark-theme .wp-block-table :where(figcaption) {
|
|
234
234
|
color: rgba(255, 255, 255, 0.65);
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
.wp-block-video figcaption {
|
|
237
|
+
.wp-block-video :where(figcaption) {
|
|
238
238
|
color: #555;
|
|
239
239
|
font-size: 13px;
|
|
240
240
|
text-align: center;
|
|
241
241
|
}
|
|
242
|
-
.is-dark-theme .wp-block-video figcaption {
|
|
242
|
+
.is-dark-theme .wp-block-video :where(figcaption) {
|
|
243
243
|
color: rgba(255, 255, 255, 0.65);
|
|
244
244
|
}
|
|
245
245
|
|
|
@@ -86,12 +86,12 @@
|
|
|
86
86
|
/**
|
|
87
87
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
88
88
|
*/
|
|
89
|
-
.wp-block-video figcaption {
|
|
89
|
+
.wp-block-video :where(figcaption) {
|
|
90
90
|
color: #555;
|
|
91
91
|
font-size: 13px;
|
|
92
92
|
text-align: center;
|
|
93
93
|
}
|
|
94
|
-
.is-dark-theme .wp-block-video figcaption {
|
|
94
|
+
.is-dark-theme .wp-block-video :where(figcaption) {
|
|
95
95
|
color: rgba(255, 255, 255, 0.65);
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -86,12 +86,12 @@
|
|
|
86
86
|
/**
|
|
87
87
|
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
88
88
|
*/
|
|
89
|
-
.wp-block-video figcaption {
|
|
89
|
+
.wp-block-video :where(figcaption) {
|
|
90
90
|
color: #555;
|
|
91
91
|
font-size: 13px;
|
|
92
92
|
text-align: center;
|
|
93
93
|
}
|
|
94
|
-
.is-dark-theme .wp-block-video figcaption {
|
|
94
|
+
.is-dark-theme .wp-block-video :where(figcaption) {
|
|
95
95
|
color: rgba(255, 255, 255, 0.65);
|
|
96
96
|
}
|
|
97
97
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.0",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -32,39 +32,39 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.16.0",
|
|
35
|
-
"@wordpress/a11y": "^4.
|
|
36
|
-
"@wordpress/api-fetch": "^7.
|
|
37
|
-
"@wordpress/autop": "^4.
|
|
38
|
-
"@wordpress/blob": "^4.
|
|
39
|
-
"@wordpress/block-editor": "^13.
|
|
40
|
-
"@wordpress/blocks": "^13.
|
|
41
|
-
"@wordpress/components": "^28.
|
|
42
|
-
"@wordpress/compose": "^7.
|
|
43
|
-
"@wordpress/core-data": "^7.
|
|
44
|
-
"@wordpress/data": "^10.
|
|
45
|
-
"@wordpress/date": "^5.
|
|
46
|
-
"@wordpress/deprecated": "^4.
|
|
47
|
-
"@wordpress/dom": "^4.
|
|
48
|
-
"@wordpress/element": "^6.
|
|
49
|
-
"@wordpress/escape-html": "^3.
|
|
50
|
-
"@wordpress/hooks": "^4.
|
|
51
|
-
"@wordpress/html-entities": "^4.
|
|
52
|
-
"@wordpress/i18n": "^5.
|
|
53
|
-
"@wordpress/icons": "^10.
|
|
54
|
-
"@wordpress/interactivity": "^6.
|
|
55
|
-
"@wordpress/interactivity-router": "^2.
|
|
56
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
57
|
-
"@wordpress/keycodes": "^4.
|
|
58
|
-
"@wordpress/notices": "^5.
|
|
59
|
-
"@wordpress/patterns": "^2.
|
|
60
|
-
"@wordpress/primitives": "^4.
|
|
61
|
-
"@wordpress/private-apis": "^1.
|
|
62
|
-
"@wordpress/reusable-blocks": "^5.
|
|
63
|
-
"@wordpress/rich-text": "^7.
|
|
64
|
-
"@wordpress/server-side-render": "^5.
|
|
65
|
-
"@wordpress/url": "^4.
|
|
66
|
-
"@wordpress/viewport": "^6.
|
|
67
|
-
"@wordpress/wordcount": "^4.
|
|
35
|
+
"@wordpress/a11y": "^4.3.0",
|
|
36
|
+
"@wordpress/api-fetch": "^7.3.0",
|
|
37
|
+
"@wordpress/autop": "^4.3.0",
|
|
38
|
+
"@wordpress/blob": "^4.3.0",
|
|
39
|
+
"@wordpress/block-editor": "^13.3.0",
|
|
40
|
+
"@wordpress/blocks": "^13.3.0",
|
|
41
|
+
"@wordpress/components": "^28.3.0",
|
|
42
|
+
"@wordpress/compose": "^7.3.0",
|
|
43
|
+
"@wordpress/core-data": "^7.3.0",
|
|
44
|
+
"@wordpress/data": "^10.3.0",
|
|
45
|
+
"@wordpress/date": "^5.3.0",
|
|
46
|
+
"@wordpress/deprecated": "^4.3.0",
|
|
47
|
+
"@wordpress/dom": "^4.3.0",
|
|
48
|
+
"@wordpress/element": "^6.3.0",
|
|
49
|
+
"@wordpress/escape-html": "^3.3.0",
|
|
50
|
+
"@wordpress/hooks": "^4.3.0",
|
|
51
|
+
"@wordpress/html-entities": "^4.3.0",
|
|
52
|
+
"@wordpress/i18n": "^5.3.0",
|
|
53
|
+
"@wordpress/icons": "^10.3.0",
|
|
54
|
+
"@wordpress/interactivity": "^6.3.0",
|
|
55
|
+
"@wordpress/interactivity-router": "^2.3.0",
|
|
56
|
+
"@wordpress/keyboard-shortcuts": "^5.3.0",
|
|
57
|
+
"@wordpress/keycodes": "^4.3.0",
|
|
58
|
+
"@wordpress/notices": "^5.3.0",
|
|
59
|
+
"@wordpress/patterns": "^2.3.0",
|
|
60
|
+
"@wordpress/primitives": "^4.3.0",
|
|
61
|
+
"@wordpress/private-apis": "^1.3.0",
|
|
62
|
+
"@wordpress/reusable-blocks": "^5.3.0",
|
|
63
|
+
"@wordpress/rich-text": "^7.3.0",
|
|
64
|
+
"@wordpress/server-side-render": "^5.3.0",
|
|
65
|
+
"@wordpress/url": "^4.3.0",
|
|
66
|
+
"@wordpress/viewport": "^6.3.0",
|
|
67
|
+
"@wordpress/wordcount": "^4.3.0",
|
|
68
68
|
"change-case": "^4.1.2",
|
|
69
69
|
"clsx": "^2.1.1",
|
|
70
70
|
"colord": "^2.7.0",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "122867d355ca4edc63d3a3bbd9411d3a2e1458df"
|
|
86
86
|
}
|
package/src/audio/block.json
CHANGED
package/src/audio/edit.js
CHANGED
|
@@ -26,6 +26,7 @@ import { __, _x } from '@wordpress/i18n';
|
|
|
26
26
|
import { useDispatch } from '@wordpress/data';
|
|
27
27
|
import { audio as icon } from '@wordpress/icons';
|
|
28
28
|
import { store as noticesStore } from '@wordpress/notices';
|
|
29
|
+
import { useState } from '@wordpress/element';
|
|
29
30
|
|
|
30
31
|
/**
|
|
31
32
|
* Internal dependencies
|
|
@@ -45,10 +46,10 @@ function AudioEdit( {
|
|
|
45
46
|
insertBlocksAfter,
|
|
46
47
|
} ) {
|
|
47
48
|
const { id, autoplay, loop, preload, src } = attributes;
|
|
48
|
-
const
|
|
49
|
+
const [ temporaryURL, setTemporaryURL ] = useState( attributes.blob );
|
|
49
50
|
|
|
50
51
|
useUploadMediaFromBlobURL( {
|
|
51
|
-
url:
|
|
52
|
+
url: temporaryURL,
|
|
52
53
|
allowedTypes: ALLOWED_MEDIA_TYPES,
|
|
53
54
|
onChange: onSelectAudio,
|
|
54
55
|
onError: onUploadError,
|
|
@@ -72,7 +73,8 @@ function AudioEdit( {
|
|
|
72
73
|
onReplace( embedBlock );
|
|
73
74
|
return;
|
|
74
75
|
}
|
|
75
|
-
setAttributes( { src: newSrc, id: undefined } );
|
|
76
|
+
setAttributes( { src: newSrc, id: undefined, blob: undefined } );
|
|
77
|
+
setTemporaryURL();
|
|
76
78
|
}
|
|
77
79
|
}
|
|
78
80
|
|
|
@@ -95,27 +97,37 @@ function AudioEdit( {
|
|
|
95
97
|
src: undefined,
|
|
96
98
|
id: undefined,
|
|
97
99
|
caption: undefined,
|
|
100
|
+
blob: undefined,
|
|
98
101
|
} );
|
|
102
|
+
setTemporaryURL();
|
|
99
103
|
return;
|
|
100
104
|
}
|
|
105
|
+
|
|
106
|
+
if ( isBlobURL( media.url ) ) {
|
|
107
|
+
setTemporaryURL( media.url );
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
|
|
101
111
|
// Sets the block's attribute and updates the edit component from the
|
|
102
112
|
// selected media, then switches off the editing UI.
|
|
103
113
|
setAttributes( {
|
|
114
|
+
blob: undefined,
|
|
104
115
|
src: media.url,
|
|
105
116
|
id: media.id,
|
|
106
117
|
caption: media.caption,
|
|
107
118
|
} );
|
|
119
|
+
setTemporaryURL();
|
|
108
120
|
}
|
|
109
121
|
|
|
110
122
|
const classes = clsx( className, {
|
|
111
|
-
'is-transient':
|
|
123
|
+
'is-transient': !! temporaryURL,
|
|
112
124
|
} );
|
|
113
125
|
|
|
114
126
|
const blockProps = useBlockProps( {
|
|
115
127
|
className: classes,
|
|
116
128
|
} );
|
|
117
129
|
|
|
118
|
-
if ( ! src ) {
|
|
130
|
+
if ( ! src && ! temporaryURL ) {
|
|
119
131
|
return (
|
|
120
132
|
<div { ...blockProps }>
|
|
121
133
|
<MediaPlaceholder
|
|
@@ -190,9 +202,9 @@ function AudioEdit( {
|
|
|
190
202
|
file or change the position slider when the controls are enabled.
|
|
191
203
|
*/ }
|
|
192
204
|
<Disabled isDisabled={ ! isSingleSelected }>
|
|
193
|
-
<audio controls="controls" src={ src } />
|
|
205
|
+
<audio controls="controls" src={ src ?? temporaryURL } />
|
|
194
206
|
</Disabled>
|
|
195
|
-
{
|
|
207
|
+
{ !! temporaryURL && <Spinner /> }
|
|
196
208
|
<Caption
|
|
197
209
|
attributes={ attributes }
|
|
198
210
|
setAttributes={ setAttributes }
|
package/src/audio/style.scss
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// Supply caption styles to audio blocks, even if the theme hasn't opted in.
|
|
5
5
|
// Reason being: the new markup, <figcaptions>, are not likely to be styled in the majority of existing themes,
|
|
6
6
|
// so we supply the styles so as to not appear broken or unstyled in those themes.
|
|
7
|
-
figcaption {
|
|
7
|
+
:where(figcaption) {
|
|
8
8
|
@include caption-style();
|
|
9
9
|
}
|
|
10
10
|
|
package/src/audio/theme.scss
CHANGED
package/src/audio/transforms.js
CHANGED
package/src/block/block.json
CHANGED
package/src/block/edit.js
CHANGED
package/src/button/block.json
CHANGED
package/src/button/index.php
CHANGED
|
@@ -17,7 +17,20 @@
|
|
|
17
17
|
* @return string The block content.
|
|
18
18
|
*/
|
|
19
19
|
function render_block_core_button( $attributes, $content ) {
|
|
20
|
-
|
|
20
|
+
/*
|
|
21
|
+
* The current Gutenberg plugin supports WordPress 6.4, but the next_token()
|
|
22
|
+
* method does not exist in WordPress 6.4. Therefore, if Gutenberg is used
|
|
23
|
+
* as a plugin, use the Gutenberg class that has the `next_token()` method.
|
|
24
|
+
*
|
|
25
|
+
* TODO: After the Gutenberg plugin drops support for WordPress 6.4, this
|
|
26
|
+
* conditional statement will be removed and the core class `WP_HTML_Tag_Processor`
|
|
27
|
+
* should be used.
|
|
28
|
+
*/
|
|
29
|
+
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN && class_exists( 'Gutenberg_HTML_Tag_Processor_6_5' ) ) {
|
|
30
|
+
$p = new Gutenberg_HTML_Tag_Processor_6_5( $content );
|
|
31
|
+
} else {
|
|
32
|
+
$p = new WP_HTML_Tag_Processor( $content );
|
|
33
|
+
}
|
|
21
34
|
|
|
22
35
|
/*
|
|
23
36
|
* The button block can render an `<a>` or `<button>` and also has a
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
} from '@wordpress/block-editor';
|
|
21
21
|
import { Component } from '@wordpress/element';
|
|
22
22
|
import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
|
|
23
|
+
import { getAuthority } from '@wordpress/url';
|
|
23
24
|
|
|
24
25
|
/**
|
|
25
26
|
* Internal dependencies
|
|
@@ -73,14 +74,11 @@ class EmbedPreview extends Component {
|
|
|
73
74
|
const { interactive } = this.state;
|
|
74
75
|
|
|
75
76
|
const html = 'photo' === type ? getPhotoHtml( preview ) : preview.html;
|
|
76
|
-
const
|
|
77
|
-
const parsedHostBaseUrl = parsedHost
|
|
78
|
-
.splice( parsedHost.length - 2, parsedHost.length - 1 )
|
|
79
|
-
.join( '.' );
|
|
77
|
+
const embedSourceUrl = getAuthority( url );
|
|
80
78
|
const iframeTitle = sprintf(
|
|
81
79
|
// translators: %s: host providing embed content e.g: www.youtube.com
|
|
82
80
|
__( 'Embedded content from %s' ),
|
|
83
|
-
|
|
81
|
+
embedSourceUrl
|
|
84
82
|
);
|
|
85
83
|
const sandboxClassnames = clsx(
|
|
86
84
|
type,
|
|
@@ -136,7 +134,7 @@ class EmbedPreview extends Component {
|
|
|
136
134
|
__(
|
|
137
135
|
"Embedded content from %s can't be previewed in the editor."
|
|
138
136
|
),
|
|
139
|
-
|
|
137
|
+
embedSourceUrl
|
|
140
138
|
) }
|
|
141
139
|
</p>
|
|
142
140
|
</Placeholder>
|
package/src/embed/style.scss
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
// Supply caption styles to embeds, even if the theme hasn't opted in.
|
|
26
26
|
// Reason being: the new markup, figcaptions, are not likely to be styled in the majority of existing themes,
|
|
27
27
|
// so we supply the styles so as to not appear broken or unstyled in those.
|
|
28
|
-
figcaption {
|
|
28
|
+
:where(figcaption) {
|
|
29
29
|
@include caption-style();
|
|
30
30
|
}
|
|
31
31
|
|
package/src/embed/theme.scss
CHANGED
package/src/file/block.json
CHANGED
package/src/file/edit.js
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
store as blockEditorStore,
|
|
24
24
|
__experimentalGetElementClassName,
|
|
25
25
|
} from '@wordpress/block-editor';
|
|
26
|
-
import { useEffect } from '@wordpress/element';
|
|
26
|
+
import { useEffect, useState } from '@wordpress/element';
|
|
27
27
|
import { useCopyToClipboard } from '@wordpress/compose';
|
|
28
28
|
import { __, _x } from '@wordpress/i18n';
|
|
29
29
|
import { file as icon } from '@wordpress/icons';
|
|
@@ -73,6 +73,7 @@ function FileEdit( { attributes, isSelected, setAttributes, clientId } ) {
|
|
|
73
73
|
displayPreview,
|
|
74
74
|
previewHeight,
|
|
75
75
|
} = attributes;
|
|
76
|
+
const [ temporaryURL, setTemporaryURL ] = useState( attributes.blob );
|
|
76
77
|
const { media } = useSelect(
|
|
77
78
|
( select ) => ( {
|
|
78
79
|
media:
|
|
@@ -88,7 +89,7 @@ function FileEdit( { attributes, isSelected, setAttributes, clientId } ) {
|
|
|
88
89
|
useDispatch( blockEditorStore );
|
|
89
90
|
|
|
90
91
|
useUploadMediaFromBlobURL( {
|
|
91
|
-
url:
|
|
92
|
+
url: temporaryURL,
|
|
92
93
|
onChange: onSelectFile,
|
|
93
94
|
onError: onUploadError,
|
|
94
95
|
} );
|
|
@@ -108,6 +109,12 @@ function FileEdit( { attributes, isSelected, setAttributes, clientId } ) {
|
|
|
108
109
|
|
|
109
110
|
function onSelectFile( newMedia ) {
|
|
110
111
|
if ( ! newMedia || ! newMedia.url ) {
|
|
112
|
+
setTemporaryURL();
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if ( isBlobURL( newMedia.url ) ) {
|
|
117
|
+
setTemporaryURL( newMedia.url );
|
|
111
118
|
return;
|
|
112
119
|
}
|
|
113
120
|
|
|
@@ -120,7 +127,9 @@ function FileEdit( { attributes, isSelected, setAttributes, clientId } ) {
|
|
|
120
127
|
displayPreview: isPdf ? true : undefined,
|
|
121
128
|
previewHeight: isPdf ? 600 : undefined,
|
|
122
129
|
fileId: `wp-block-file--media-${ clientId }`,
|
|
130
|
+
blob: undefined,
|
|
123
131
|
} );
|
|
132
|
+
setTemporaryURL();
|
|
124
133
|
}
|
|
125
134
|
|
|
126
135
|
function onUploadError( message ) {
|
|
@@ -166,16 +175,16 @@ function FileEdit( { attributes, isSelected, setAttributes, clientId } ) {
|
|
|
166
175
|
|
|
167
176
|
const blockProps = useBlockProps( {
|
|
168
177
|
className: clsx(
|
|
169
|
-
|
|
178
|
+
!! temporaryURL && getAnimateClassName( { type: 'loading' } ),
|
|
170
179
|
{
|
|
171
|
-
'is-transient':
|
|
180
|
+
'is-transient': !! temporaryURL,
|
|
172
181
|
}
|
|
173
182
|
),
|
|
174
183
|
} );
|
|
175
184
|
|
|
176
185
|
const displayPreviewInEditor = browserSupportsPdfs() && displayPreview;
|
|
177
186
|
|
|
178
|
-
if ( ! href ) {
|
|
187
|
+
if ( ! href && ! temporaryURL ) {
|
|
179
188
|
return (
|
|
180
189
|
<div { ...blockProps }>
|
|
181
190
|
<MediaPlaceholder
|
|
@@ -197,7 +206,11 @@ function FileEdit( { attributes, isSelected, setAttributes, clientId } ) {
|
|
|
197
206
|
return (
|
|
198
207
|
<>
|
|
199
208
|
<FileBlockInspector
|
|
200
|
-
hrefs={ {
|
|
209
|
+
hrefs={ {
|
|
210
|
+
href: href || temporaryURL,
|
|
211
|
+
textLinkHref,
|
|
212
|
+
attachmentPage,
|
|
213
|
+
} }
|
|
201
214
|
{ ...{
|
|
202
215
|
openInNewWindow: !! textLinkTarget,
|
|
203
216
|
showDownloadButton,
|
package/src/file/transforms.js
CHANGED
|
@@ -22,7 +22,6 @@ import {
|
|
|
22
22
|
LINK_DESTINATION_MEDIA,
|
|
23
23
|
LINK_DESTINATION_NONE,
|
|
24
24
|
} from './constants';
|
|
25
|
-
import { isGalleryV2Enabled } from './shared';
|
|
26
25
|
|
|
27
26
|
const DEPRECATED_LINK_DESTINATION_MEDIA = 'file';
|
|
28
27
|
const DEPRECATED_LINK_DESTINATION_ATTACHMENT = 'post';
|
|
@@ -408,11 +407,7 @@ const v6 = {
|
|
|
408
407
|
);
|
|
409
408
|
},
|
|
410
409
|
migrate( attributes ) {
|
|
411
|
-
|
|
412
|
-
return runV2Migration( attributes );
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
return attributes;
|
|
410
|
+
return runV2Migration( attributes );
|
|
416
411
|
},
|
|
417
412
|
};
|
|
418
413
|
const v5 = {
|
|
@@ -498,23 +493,7 @@ const v5 = {
|
|
|
498
493
|
return ! linkTo || linkTo === 'attachment' || linkTo === 'media';
|
|
499
494
|
},
|
|
500
495
|
migrate( attributes ) {
|
|
501
|
-
|
|
502
|
-
return runV2Migration( attributes );
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
let linkTo = attributes.linkTo;
|
|
506
|
-
|
|
507
|
-
if ( ! attributes.linkTo ) {
|
|
508
|
-
linkTo = 'none';
|
|
509
|
-
} else if ( attributes.linkTo === 'attachment' ) {
|
|
510
|
-
linkTo = 'post';
|
|
511
|
-
} else if ( attributes.linkTo === 'media' ) {
|
|
512
|
-
linkTo = 'file';
|
|
513
|
-
}
|
|
514
|
-
return {
|
|
515
|
-
...attributes,
|
|
516
|
-
linkTo,
|
|
517
|
-
};
|
|
496
|
+
return runV2Migration( attributes );
|
|
518
497
|
},
|
|
519
498
|
save( { attributes } ) {
|
|
520
499
|
const {
|
|
@@ -661,17 +640,7 @@ const v4 = {
|
|
|
661
640
|
return ids && ids.some( ( id ) => typeof id === 'string' );
|
|
662
641
|
},
|
|
663
642
|
migrate( attributes ) {
|
|
664
|
-
|
|
665
|
-
return runV2Migration( attributes );
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
return {
|
|
669
|
-
...attributes,
|
|
670
|
-
ids: ( attributes.ids ?? [] ).map( ( id ) => {
|
|
671
|
-
const parsedId = parseInt( id, 10 );
|
|
672
|
-
return Number.isInteger( parsedId ) ? parsedId : null;
|
|
673
|
-
} ),
|
|
674
|
-
};
|
|
643
|
+
return runV2Migration( attributes );
|
|
675
644
|
},
|
|
676
645
|
save( { attributes } ) {
|
|
677
646
|
const {
|
|
@@ -867,10 +836,7 @@ const v3 = {
|
|
|
867
836
|
);
|
|
868
837
|
},
|
|
869
838
|
migrate( attributes ) {
|
|
870
|
-
|
|
871
|
-
return runV2Migration( attributes );
|
|
872
|
-
}
|
|
873
|
-
return attributes;
|
|
839
|
+
return runV2Migration( attributes );
|
|
874
840
|
},
|
|
875
841
|
};
|
|
876
842
|
const v2 = {
|
|
@@ -936,18 +902,7 @@ const v2 = {
|
|
|
936
902
|
);
|
|
937
903
|
},
|
|
938
904
|
migrate( attributes ) {
|
|
939
|
-
|
|
940
|
-
return runV2Migration( attributes );
|
|
941
|
-
}
|
|
942
|
-
return {
|
|
943
|
-
...attributes,
|
|
944
|
-
ids: ( attributes.images ?? [] ).map( ( { id } ) => {
|
|
945
|
-
if ( ! id ) {
|
|
946
|
-
return null;
|
|
947
|
-
}
|
|
948
|
-
return parseInt( id, 10 );
|
|
949
|
-
} ),
|
|
950
|
-
};
|
|
905
|
+
return runV2Migration( attributes );
|
|
951
906
|
},
|
|
952
907
|
supports: {
|
|
953
908
|
align: true,
|
|
@@ -1100,11 +1055,7 @@ const v1 = {
|
|
|
1100
1055
|
);
|
|
1101
1056
|
},
|
|
1102
1057
|
migrate( attributes ) {
|
|
1103
|
-
|
|
1104
|
-
return runV2Migration( attributes );
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
return attributes;
|
|
1058
|
+
return runV2Migration( attributes );
|
|
1108
1059
|
},
|
|
1109
1060
|
};
|
|
1110
1061
|
|