@wordpress/block-library 9.7.0 → 9.7.1-next.1f6eadc42.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/build/archives/edit.js +1 -1
- package/build/archives/edit.js.map +1 -1
- package/build/block/edit.js +2 -3
- package/build/block/edit.js.map +1 -1
- package/build/buttons/index.js +1 -1
- package/build/comments/edit/comments-legacy.js +2 -4
- package/build/comments/edit/comments-legacy.js.map +1 -1
- package/build/cover/deprecated.js +1 -1
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit/index.js +4 -2
- package/build/cover/edit/index.js.map +1 -1
- package/build/embed/edit.js +5 -11
- package/build/embed/edit.js.map +1 -1
- package/build/embed/embed-placeholder.js +4 -8
- package/build/embed/embed-placeholder.js.map +1 -1
- package/build/embed/embed-preview.js +16 -4
- package/build/embed/embed-preview.js.map +1 -1
- package/build/file/transforms.js +18 -4
- package/build/file/transforms.js.map +1 -1
- package/build/form-input/deprecated.js +113 -1
- package/build/form-input/deprecated.js.map +1 -1
- package/build/form-input/edit.js +16 -12
- package/build/form-input/edit.js.map +1 -1
- package/build/form-input/save.js +9 -1
- package/build/form-input/save.js.map +1 -1
- package/build/freeform/modal.js +6 -12
- package/build/freeform/modal.js.map +1 -1
- package/build/image/edit.js +55 -15
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +23 -20
- package/build/image/image.js.map +1 -1
- package/build/image/transforms.js +0 -13
- package/build/image/transforms.js.map +1 -1
- package/build/image/use-max-width-observer.js +35 -0
- package/build/image/use-max-width-observer.js.map +1 -0
- package/build/image/utils.js +11 -0
- package/build/image/utils.js.map +1 -1
- package/build/latest-posts/edit.js +1 -1
- package/build/latest-posts/edit.js.map +1 -1
- package/build/missing/edit.js +2 -4
- package/build/missing/edit.js.map +1 -1
- package/build/navigation/edit/deleted-navigation-warning.js +14 -10
- package/build/navigation/edit/deleted-navigation-warning.js.map +1 -1
- package/build/navigation/edit/index.js +2 -4
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/menu-inspector-controls.js +2 -1
- package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build/navigation/edit/navigation-menu-delete-control.js +2 -4
- package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build/navigation/edit/placeholder/index.js +2 -4
- package/build/navigation/edit/placeholder/index.js.map +1 -1
- package/build/navigation/edit/responsive-wrapper.js +4 -8
- package/build/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build/navigation-link/link-ui.js +2 -4
- package/build/navigation-link/link-ui.js.map +1 -1
- package/build/page-list/convert-to-links-modal.js +4 -8
- package/build/page-list/convert-to-links-modal.js.map +1 -1
- package/build/page-list/edit.js +2 -4
- package/build/page-list/edit.js.map +1 -1
- package/build/post-comments-form/form.js +2 -4
- package/build/post-comments-form/form.js.map +1 -1
- package/build/post-featured-image/edit.js +2 -4
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-title/index.js +4 -1
- package/build/post-title/index.js.map +1 -1
- package/build/query/edit/enhanced-pagination-modal.js +4 -6
- package/build/query/edit/enhanced-pagination-modal.js.map +1 -1
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js +3 -3
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +2 -10
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/query-content.js +9 -3
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query/edit/query-placeholder.js +4 -8
- package/build/query/edit/query-placeholder.js.map +1 -1
- package/build/site-logo/edit.js +4 -8
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-title/index.js +4 -1
- package/build/site-title/index.js.map +1 -1
- package/build/social-link/edit.js +1 -1
- package/build/social-link/edit.js.map +1 -1
- package/build/template-part/edit/inner-blocks.js +10 -1
- package/build/template-part/edit/inner-blocks.js.map +1 -1
- package/build/template-part/edit/placeholder.js +4 -8
- package/build/template-part/edit/placeholder.js.map +1 -1
- package/build/video/edit.js +4 -8
- package/build/video/edit.js.map +1 -1
- package/build/video/tracks-editor.js +6 -12
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/archives/edit.js +1 -1
- package/build-module/archives/edit.js.map +1 -1
- package/build-module/block/edit.js +2 -3
- package/build-module/block/edit.js.map +1 -1
- package/build-module/buttons/index.js +1 -1
- package/build-module/comments/edit/comments-legacy.js +2 -4
- package/build-module/comments/edit/comments-legacy.js.map +1 -1
- package/build-module/cover/deprecated.js +1 -1
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit/index.js +4 -2
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/embed/edit.js +6 -12
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/embed-placeholder.js +4 -8
- package/build-module/embed/embed-placeholder.js.map +1 -1
- package/build-module/embed/embed-preview.js +16 -4
- package/build-module/embed/embed-preview.js.map +1 -1
- package/build-module/file/transforms.js +18 -4
- package/build-module/file/transforms.js.map +1 -1
- package/build-module/form-input/deprecated.js +114 -2
- package/build-module/form-input/deprecated.js.map +1 -1
- package/build-module/form-input/edit.js +16 -12
- package/build-module/form-input/edit.js.map +1 -1
- package/build-module/form-input/save.js +9 -1
- package/build-module/form-input/save.js.map +1 -1
- package/build-module/freeform/modal.js +6 -12
- package/build-module/freeform/modal.js.map +1 -1
- package/build-module/image/edit.js +58 -18
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +23 -20
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/transforms.js +0 -13
- package/build-module/image/transforms.js.map +1 -1
- package/build-module/image/use-max-width-observer.js +29 -0
- package/build-module/image/use-max-width-observer.js.map +1 -0
- package/build-module/image/utils.js +11 -1
- package/build-module/image/utils.js.map +1 -1
- package/build-module/latest-posts/edit.js +1 -1
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/missing/edit.js +2 -4
- package/build-module/missing/edit.js.map +1 -1
- package/build-module/navigation/edit/deleted-navigation-warning.js +15 -11
- package/build-module/navigation/edit/deleted-navigation-warning.js.map +1 -1
- package/build-module/navigation/edit/index.js +2 -4
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/menu-inspector-controls.js +2 -1
- package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js +2 -4
- package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build-module/navigation/edit/placeholder/index.js +2 -4
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/edit/responsive-wrapper.js +4 -8
- package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build-module/navigation-link/link-ui.js +2 -4
- package/build-module/navigation-link/link-ui.js.map +1 -1
- package/build-module/page-list/convert-to-links-modal.js +4 -8
- package/build-module/page-list/convert-to-links-modal.js.map +1 -1
- package/build-module/page-list/edit.js +2 -4
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/post-comments-form/form.js +2 -4
- package/build-module/post-comments-form/form.js.map +1 -1
- package/build-module/post-featured-image/edit.js +2 -4
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-title/index.js +4 -1
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/query/edit/enhanced-pagination-modal.js +4 -6
- package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -1
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +3 -3
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +2 -10
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/query-content.js +10 -4
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/edit/query-placeholder.js +4 -8
- package/build-module/query/edit/query-placeholder.js.map +1 -1
- package/build-module/site-logo/edit.js +4 -8
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-title/index.js +4 -1
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-link/edit.js +1 -1
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/template-part/edit/inner-blocks.js +10 -1
- package/build-module/template-part/edit/inner-blocks.js.map +1 -1
- package/build-module/template-part/edit/placeholder.js +4 -8
- package/build-module/template-part/edit/placeholder.js.map +1 -1
- package/build-module/video/edit.js +4 -8
- package/build-module/video/edit.js.map +1 -1
- package/build-module/video/tracks-editor.js +6 -12
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/buttons/editor-rtl.css +2 -2
- package/build-style/buttons/editor.css +2 -2
- package/build-style/buttons/style-rtl.css +2 -2
- package/build-style/buttons/style.css +2 -2
- package/build-style/common-rtl.css +2 -2
- package/build-style/common.css +2 -2
- package/build-style/editor-rtl.css +11 -31
- package/build-style/editor.css +11 -31
- package/build-style/form-input/style-rtl.css +7 -8
- package/build-style/form-input/style.css +7 -8
- package/build-style/image/editor-rtl.css +6 -26
- package/build-style/image/editor.css +6 -26
- package/build-style/navigation/editor-rtl.css +1 -1
- package/build-style/navigation/editor.css +1 -1
- package/build-style/post-title/style-rtl.css +21 -0
- package/build-style/post-title/style.css +21 -0
- package/build-style/site-title/style-rtl.css +21 -0
- package/build-style/site-title/style.css +21 -0
- package/build-style/style-rtl.css +53 -12
- package/build-style/style.css +53 -12
- package/package.json +42 -35
- package/src/archives/edit.js +1 -1
- package/src/block/edit.js +3 -7
- package/src/buttons/block.json +1 -1
- package/src/buttons/editor.scss +2 -2
- package/src/buttons/style.scss +2 -2
- package/src/comments/edit/comments-legacy.js +1 -2
- package/src/cover/deprecated.js +3 -2
- package/src/cover/edit/index.js +5 -1
- package/src/embed/edit.js +0 -7
- package/src/embed/embed-placeholder.js +2 -4
- package/src/embed/embed-preview.js +22 -2
- package/src/file/index.php +1 -1
- package/src/file/transforms.js +26 -6
- package/src/form-input/deprecated.js +114 -1
- package/src/form-input/edit.js +17 -11
- package/src/form-input/save.js +13 -3
- package/src/form-input/style.scss +9 -8
- package/src/freeform/modal.js +3 -6
- package/src/image/edit.js +91 -20
- package/src/image/editor.scss +7 -38
- package/src/image/image.js +31 -20
- package/src/image/index.php +1 -1
- package/src/image/transforms.js +0 -23
- package/src/image/use-max-width-observer.js +32 -0
- package/src/image/utils.js +13 -1
- package/src/latest-posts/edit.js +1 -1
- package/src/missing/edit.js +1 -2
- package/src/navigation/edit/deleted-navigation-warning.js +23 -20
- package/src/navigation/edit/index.js +1 -2
- package/src/navigation/edit/menu-inspector-controls.js +3 -1
- package/src/navigation/edit/navigation-menu-delete-control.js +1 -2
- package/src/navigation/edit/placeholder/index.js +1 -2
- package/src/navigation/edit/responsive-wrapper.js +2 -4
- package/src/navigation/editor.scss +5 -1
- package/src/navigation/index.php +1 -1
- package/src/navigation-link/link-ui.js +1 -2
- package/src/page-list/convert-to-links-modal.js +2 -4
- package/src/page-list/edit.js +1 -2
- package/src/post-comments-form/form.js +1 -2
- package/src/post-featured-image/edit.js +1 -2
- package/src/post-title/block.json +4 -1
- package/src/post-title/style.scss +24 -0
- package/src/query/edit/enhanced-pagination-modal.js +3 -4
- package/src/query/edit/inspector-controls/enhanced-pagination-control.js +3 -3
- package/src/query/edit/inspector-controls/index.js +2 -9
- package/src/query/edit/query-content.js +7 -0
- package/src/query/edit/query-placeholder.js +2 -4
- package/src/query/index.php +1 -1
- package/src/search/index.php +1 -1
- package/src/site-logo/edit.js +2 -4
- package/src/site-title/block.json +4 -1
- package/src/site-title/style.scss +24 -0
- package/src/social-link/edit.js +1 -1
- package/src/template-part/edit/inner-blocks.js +20 -1
- package/src/template-part/edit/placeholder.js +2 -4
- package/src/video/edit.js +2 -4
- package/src/video/tracks-editor.js +3 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "9.7.0",
|
|
3
|
+
"version": "9.7.1-next.1f6eadc42.0",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -30,41 +30,48 @@
|
|
|
30
30
|
"src/**/*.scss",
|
|
31
31
|
"{src,build,build-module}/*/init.js"
|
|
32
32
|
],
|
|
33
|
+
"wpScriptModuleExports": {
|
|
34
|
+
"./file/view": "./build-module/file/view.js",
|
|
35
|
+
"./image/view": "./build-module/image/view.js",
|
|
36
|
+
"./navigation/view": "./build-module/navigation/view.js",
|
|
37
|
+
"./query/view": "./build-module/query/view.js",
|
|
38
|
+
"./search/view": "./build-module/search/view.js"
|
|
39
|
+
},
|
|
33
40
|
"dependencies": {
|
|
34
41
|
"@babel/runtime": "^7.16.0",
|
|
35
|
-
"@wordpress/a11y": "^4.7.0",
|
|
36
|
-
"@wordpress/api-fetch": "^7.7.0",
|
|
37
|
-
"@wordpress/autop": "^4.7.0",
|
|
38
|
-
"@wordpress/blob": "^4.7.0",
|
|
39
|
-
"@wordpress/block-editor": "^14.2.0",
|
|
40
|
-
"@wordpress/blocks": "^13.7.0",
|
|
41
|
-
"@wordpress/components": "^28.
|
|
42
|
-
"@wordpress/compose": "^7.
|
|
43
|
-
"@wordpress/core-data": "^7.7.0",
|
|
44
|
-
"@wordpress/data": "^10.7.0",
|
|
45
|
-
"@wordpress/date": "^5.7.0",
|
|
46
|
-
"@wordpress/deprecated": "^4.7.0",
|
|
47
|
-
"@wordpress/dom": "^4.7.0",
|
|
48
|
-
"@wordpress/element": "^6.7.0",
|
|
49
|
-
"@wordpress/escape-html": "^3.7.0",
|
|
50
|
-
"@wordpress/hooks": "^4.7.0",
|
|
51
|
-
"@wordpress/html-entities": "^4.7.0",
|
|
52
|
-
"@wordpress/i18n": "^5.7.0",
|
|
53
|
-
"@wordpress/icons": "^10.7.0",
|
|
54
|
-
"@wordpress/interactivity": "^6.7.0",
|
|
55
|
-
"@wordpress/interactivity-router": "^2.7.0",
|
|
56
|
-
"@wordpress/keyboard-shortcuts": "^5.7.0",
|
|
57
|
-
"@wordpress/keycodes": "^4.7.0",
|
|
58
|
-
"@wordpress/notices": "^5.7.0",
|
|
59
|
-
"@wordpress/patterns": "^2.7.0",
|
|
60
|
-
"@wordpress/primitives": "^4.7.0",
|
|
61
|
-
"@wordpress/private-apis": "^1.7.0",
|
|
62
|
-
"@wordpress/reusable-blocks": "^5.7.0",
|
|
63
|
-
"@wordpress/rich-text": "^7.7.0",
|
|
64
|
-
"@wordpress/server-side-render": "^5.7.0",
|
|
65
|
-
"@wordpress/url": "^4.7.0",
|
|
66
|
-
"@wordpress/viewport": "^6.7.0",
|
|
67
|
-
"@wordpress/wordcount": "^4.7.0",
|
|
42
|
+
"@wordpress/a11y": "^4.7.1-next.1f6eadc42.0",
|
|
43
|
+
"@wordpress/api-fetch": "^7.7.1-next.1f6eadc42.0",
|
|
44
|
+
"@wordpress/autop": "^4.7.1-next.1f6eadc42.0",
|
|
45
|
+
"@wordpress/blob": "^4.7.1-next.1f6eadc42.0",
|
|
46
|
+
"@wordpress/block-editor": "^14.2.1-next.1f6eadc42.0",
|
|
47
|
+
"@wordpress/blocks": "^13.7.1-next.1f6eadc42.0",
|
|
48
|
+
"@wordpress/components": "^28.8.1-next.1f6eadc42.0",
|
|
49
|
+
"@wordpress/compose": "^7.8.1-next.1f6eadc42.0",
|
|
50
|
+
"@wordpress/core-data": "^7.7.1-next.1f6eadc42.0",
|
|
51
|
+
"@wordpress/data": "^10.7.1-next.1f6eadc42.0",
|
|
52
|
+
"@wordpress/date": "^5.7.1-next.1f6eadc42.0",
|
|
53
|
+
"@wordpress/deprecated": "^4.7.1-next.1f6eadc42.0",
|
|
54
|
+
"@wordpress/dom": "^4.7.1-next.1f6eadc42.0",
|
|
55
|
+
"@wordpress/element": "^6.7.1-next.1f6eadc42.0",
|
|
56
|
+
"@wordpress/escape-html": "^3.7.1-next.1f6eadc42.0",
|
|
57
|
+
"@wordpress/hooks": "^4.7.1-next.1f6eadc42.0",
|
|
58
|
+
"@wordpress/html-entities": "^4.7.1-next.1f6eadc42.0",
|
|
59
|
+
"@wordpress/i18n": "^5.7.1-next.1f6eadc42.0",
|
|
60
|
+
"@wordpress/icons": "^10.7.1-next.1f6eadc42.0",
|
|
61
|
+
"@wordpress/interactivity": "^6.7.2-next.1f6eadc42.0",
|
|
62
|
+
"@wordpress/interactivity-router": "^2.7.1-next.1f6eadc42.0",
|
|
63
|
+
"@wordpress/keyboard-shortcuts": "^5.7.1-next.1f6eadc42.0",
|
|
64
|
+
"@wordpress/keycodes": "^4.7.1-next.1f6eadc42.0",
|
|
65
|
+
"@wordpress/notices": "^5.7.1-next.1f6eadc42.0",
|
|
66
|
+
"@wordpress/patterns": "^2.7.1-next.1f6eadc42.0",
|
|
67
|
+
"@wordpress/primitives": "^4.7.1-next.1f6eadc42.0",
|
|
68
|
+
"@wordpress/private-apis": "^1.7.1-next.1f6eadc42.0",
|
|
69
|
+
"@wordpress/reusable-blocks": "^5.7.1-next.1f6eadc42.0",
|
|
70
|
+
"@wordpress/rich-text": "^7.7.1-next.1f6eadc42.0",
|
|
71
|
+
"@wordpress/server-side-render": "^5.7.1-next.1f6eadc42.0",
|
|
72
|
+
"@wordpress/url": "^4.7.1-next.1f6eadc42.0",
|
|
73
|
+
"@wordpress/viewport": "^6.7.1-next.1f6eadc42.0",
|
|
74
|
+
"@wordpress/wordcount": "^4.7.1-next.1f6eadc42.0",
|
|
68
75
|
"change-case": "^4.1.2",
|
|
69
76
|
"clsx": "^2.1.1",
|
|
70
77
|
"colord": "^2.7.0",
|
|
@@ -82,5 +89,5 @@
|
|
|
82
89
|
"publishConfig": {
|
|
83
90
|
"access": "public"
|
|
84
91
|
},
|
|
85
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "960a22b909c9fdbc90e7435b7ba8947b9218837a"
|
|
86
93
|
}
|
package/src/archives/edit.js
CHANGED
|
@@ -53,7 +53,7 @@ export default function ArchivesEdit( { attributes, setAttributes } ) {
|
|
|
53
53
|
<SelectControl
|
|
54
54
|
__next40pxDefaultSize
|
|
55
55
|
__nextHasNoMarginBottom
|
|
56
|
-
label={ __( 'Group by
|
|
56
|
+
label={ __( 'Group by' ) }
|
|
57
57
|
options={ [
|
|
58
58
|
{ label: __( 'Year' ), value: 'yearly' },
|
|
59
59
|
{ label: __( 'Month' ), value: 'monthly' },
|
package/src/block/edit.js
CHANGED
|
@@ -194,19 +194,15 @@ function ReusableBlockEdit( {
|
|
|
194
194
|
hasPatternOverridesSource,
|
|
195
195
|
} = useSelect(
|
|
196
196
|
( select ) => {
|
|
197
|
-
const {
|
|
198
|
-
|
|
199
|
-
getSettings,
|
|
200
|
-
getBlockEditingMode: _getBlockEditingMode,
|
|
201
|
-
} = select( blockEditorStore );
|
|
197
|
+
const { getBlocks, getSettings, getBlockEditingMode } =
|
|
198
|
+
select( blockEditorStore );
|
|
202
199
|
const { getBlockBindingsSource } = unlock( select( blocksStore ) );
|
|
203
200
|
// For editing link to the site editor if the theme and user permissions support it.
|
|
204
201
|
return {
|
|
205
202
|
innerBlocks: getBlocks( patternClientId ),
|
|
206
|
-
getBlockEditingMode: _getBlockEditingMode,
|
|
207
203
|
onNavigateToEntityRecord:
|
|
208
204
|
getSettings().onNavigateToEntityRecord,
|
|
209
|
-
editingMode:
|
|
205
|
+
editingMode: getBlockEditingMode( patternClientId ),
|
|
210
206
|
hasPatternOverridesSource: !! getBlockBindingsSource(
|
|
211
207
|
'core/pattern-overrides'
|
|
212
208
|
),
|
package/src/buttons/block.json
CHANGED
package/src/buttons/editor.scss
CHANGED
|
@@ -33,14 +33,14 @@ $blocks-block__margin: 0.5em;
|
|
|
33
33
|
//
|
|
34
34
|
// This back compat rule is ignored if the user decides to use the
|
|
35
35
|
// newer justification options on the button block, hence the :not.
|
|
36
|
-
/* stylelint-disable indentation -- Disable the stylelint rule, otherwise this selector is ugly! */
|
|
36
|
+
/* stylelint-disable @stylistic/indentation -- Disable the stylelint rule, otherwise this selector is ugly! */
|
|
37
37
|
&:not(
|
|
38
38
|
.is-content-justification-space-between,
|
|
39
39
|
.is-content-justification-right,
|
|
40
40
|
.is-content-justification-left,
|
|
41
41
|
.is-content-justification-center
|
|
42
42
|
) .wp-block[data-align="center"] {
|
|
43
|
-
/* stylelint-enable indentation */
|
|
43
|
+
/* stylelint-enable @stylistic/indentation */
|
|
44
44
|
margin-left: auto;
|
|
45
45
|
margin-right: auto;
|
|
46
46
|
margin-top: 0;
|
package/src/buttons/style.scss
CHANGED
|
@@ -55,14 +55,14 @@ $blocks-block__margin: 0.5em;
|
|
|
55
55
|
//
|
|
56
56
|
// This back compat rule is ignored if the user decides to use the
|
|
57
57
|
// newer justification options on the button block, hence the :not.
|
|
58
|
-
/* stylelint-disable indentation -- Disable the stylelint rule, otherwise this selector is ugly! */
|
|
58
|
+
/* stylelint-disable @stylistic/indentation -- Disable the stylelint rule, otherwise this selector is ugly! */
|
|
59
59
|
&:not(
|
|
60
60
|
.is-content-justification-space-between,
|
|
61
61
|
.is-content-justification-right,
|
|
62
62
|
.is-content-justification-left,
|
|
63
63
|
.is-content-justification-center
|
|
64
64
|
) .wp-block-button.aligncenter {
|
|
65
|
-
/* stylelint-enable indentation */
|
|
65
|
+
/* stylelint-enable @stylistic/indentation */
|
|
66
66
|
margin-left: auto;
|
|
67
67
|
margin-right: auto;
|
|
68
68
|
width: 100%;
|
|
@@ -29,8 +29,7 @@ export default function CommentsLegacy( {
|
|
|
29
29
|
|
|
30
30
|
const actions = [
|
|
31
31
|
<Button
|
|
32
|
-
|
|
33
|
-
__next40pxDefaultSize={ false }
|
|
32
|
+
__next40pxDefaultSize
|
|
34
33
|
key="convert"
|
|
35
34
|
onClick={ () => void setAttributes( { legacy: false } ) }
|
|
36
35
|
variant="primary"
|
package/src/cover/deprecated.js
CHANGED
|
@@ -400,8 +400,9 @@ const v12 = {
|
|
|
400
400
|
supports: v12BlockSupports,
|
|
401
401
|
isEligible( attributes ) {
|
|
402
402
|
return (
|
|
403
|
-
attributes.customOverlayColor !== undefined ||
|
|
404
|
-
|
|
403
|
+
( attributes.customOverlayColor !== undefined ||
|
|
404
|
+
attributes.overlayColor !== undefined ) &&
|
|
405
|
+
attributes.isUserOverlayColor === undefined
|
|
405
406
|
);
|
|
406
407
|
},
|
|
407
408
|
migrate( attributes ) {
|
package/src/cover/edit/index.js
CHANGED
|
@@ -143,7 +143,10 @@ function CoverEdit( {
|
|
|
143
143
|
averageBackgroundColor
|
|
144
144
|
);
|
|
145
145
|
__unstableMarkNextChangeAsNotPersistent();
|
|
146
|
-
setAttributes( {
|
|
146
|
+
setAttributes( {
|
|
147
|
+
isDark: newIsDark,
|
|
148
|
+
isUserOverlayColor: isUserOverlayColor || false,
|
|
149
|
+
} );
|
|
147
150
|
} )();
|
|
148
151
|
// Disable reason: Update the block only when the featured image changes.
|
|
149
152
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -201,6 +204,7 @@ function CoverEdit( {
|
|
|
201
204
|
useFeaturedImage: undefined,
|
|
202
205
|
dimRatio: newDimRatio,
|
|
203
206
|
isDark: newIsDark,
|
|
207
|
+
isUserOverlayColor: isUserOverlayColor || false,
|
|
204
208
|
} );
|
|
205
209
|
};
|
|
206
210
|
|
package/src/embed/edit.js
CHANGED
|
@@ -14,7 +14,6 @@ import { embedContentIcon } from './icons';
|
|
|
14
14
|
import EmbedLoading from './embed-loading';
|
|
15
15
|
import EmbedPlaceholder from './embed-placeholder';
|
|
16
16
|
import EmbedPreview from './embed-preview';
|
|
17
|
-
import { Caption } from '../utils/caption';
|
|
18
17
|
|
|
19
18
|
/**
|
|
20
19
|
* External dependencies
|
|
@@ -277,14 +276,8 @@ const EmbedEdit = ( props ) => {
|
|
|
277
276
|
icon={ icon }
|
|
278
277
|
label={ label }
|
|
279
278
|
insertBlocksAfter={ insertBlocksAfter }
|
|
280
|
-
/>
|
|
281
|
-
<Caption
|
|
282
279
|
attributes={ attributes }
|
|
283
280
|
setAttributes={ setAttributes }
|
|
284
|
-
isSelected={ isSelected }
|
|
285
|
-
insertBlocksAfter={ insertBlocksAfter }
|
|
286
|
-
label={ __( 'Embed caption text' ) }
|
|
287
|
-
showToolbarButton={ isSelected }
|
|
288
281
|
/>
|
|
289
282
|
</View>
|
|
290
283
|
</>
|
|
@@ -66,16 +66,14 @@ const EmbedPlaceholder = ( {
|
|
|
66
66
|
justify="flex-start"
|
|
67
67
|
>
|
|
68
68
|
<Button
|
|
69
|
-
|
|
70
|
-
__next40pxDefaultSize={ false }
|
|
69
|
+
__next40pxDefaultSize
|
|
71
70
|
variant="secondary"
|
|
72
71
|
onClick={ tryAgain }
|
|
73
72
|
>
|
|
74
73
|
{ _x( 'Try again', 'button label' ) }
|
|
75
74
|
</Button>{ ' ' }
|
|
76
75
|
<Button
|
|
77
|
-
|
|
78
|
-
__next40pxDefaultSize={ false }
|
|
76
|
+
__next40pxDefaultSize
|
|
79
77
|
variant="secondary"
|
|
80
78
|
onClick={ fallback }
|
|
81
79
|
>
|
|
@@ -21,6 +21,7 @@ import { getAuthority } from '@wordpress/url';
|
|
|
21
21
|
* Internal dependencies
|
|
22
22
|
*/
|
|
23
23
|
import WpEmbedPreview from './wp-embed-preview';
|
|
24
|
+
import { Caption } from '../utils/caption';
|
|
24
25
|
|
|
25
26
|
class EmbedPreview extends Component {
|
|
26
27
|
constructor() {
|
|
@@ -52,8 +53,19 @@ class EmbedPreview extends Component {
|
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
render() {
|
|
55
|
-
const {
|
|
56
|
-
|
|
56
|
+
const {
|
|
57
|
+
preview,
|
|
58
|
+
previewable,
|
|
59
|
+
url,
|
|
60
|
+
type,
|
|
61
|
+
className,
|
|
62
|
+
icon,
|
|
63
|
+
label,
|
|
64
|
+
insertBlocksAfter,
|
|
65
|
+
attributes,
|
|
66
|
+
setAttributes,
|
|
67
|
+
isSelected,
|
|
68
|
+
} = this.props;
|
|
57
69
|
const { scripts } = preview;
|
|
58
70
|
const { interactive } = this.state;
|
|
59
71
|
|
|
@@ -123,6 +135,14 @@ class EmbedPreview extends Component {
|
|
|
123
135
|
</p>
|
|
124
136
|
</Placeholder>
|
|
125
137
|
) }
|
|
138
|
+
<Caption
|
|
139
|
+
attributes={ attributes }
|
|
140
|
+
setAttributes={ setAttributes }
|
|
141
|
+
isSelected={ isSelected }
|
|
142
|
+
insertBlocksAfter={ insertBlocksAfter }
|
|
143
|
+
label={ __( 'Embed caption text' ) }
|
|
144
|
+
showToolbarButton={ isSelected }
|
|
145
|
+
/>
|
|
126
146
|
</figure>
|
|
127
147
|
);
|
|
128
148
|
}
|
package/src/file/index.php
CHANGED
|
@@ -21,7 +21,7 @@ function render_block_core_file( $attributes, $content ) {
|
|
|
21
21
|
if ( ! empty( $attributes['displayPreview'] ) ) {
|
|
22
22
|
$suffix = wp_scripts_get_suffix();
|
|
23
23
|
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
|
|
24
|
-
$module_url = gutenberg_url( '/build/
|
|
24
|
+
$module_url = gutenberg_url( '/build-module/block-library/file/view.min.js' );
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
wp_register_script_module(
|
package/src/file/transforms.js
CHANGED
|
@@ -24,12 +24,32 @@ const transforms = {
|
|
|
24
24
|
const blobURL = createBlobURL( file );
|
|
25
25
|
|
|
26
26
|
// File will be uploaded in componentDidMount()
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
if ( file.type.startsWith( 'video/' ) ) {
|
|
28
|
+
blocks.push(
|
|
29
|
+
createBlock( 'core/video', {
|
|
30
|
+
blob: createBlobURL( file ),
|
|
31
|
+
} )
|
|
32
|
+
);
|
|
33
|
+
} else if ( file.type.startsWith( 'image/' ) ) {
|
|
34
|
+
blocks.push(
|
|
35
|
+
createBlock( 'core/image', {
|
|
36
|
+
blob: createBlobURL( file ),
|
|
37
|
+
} )
|
|
38
|
+
);
|
|
39
|
+
} else if ( file.type.startsWith( 'audio/' ) ) {
|
|
40
|
+
blocks.push(
|
|
41
|
+
createBlock( 'core/audio', {
|
|
42
|
+
blob: createBlobURL( file ),
|
|
43
|
+
} )
|
|
44
|
+
);
|
|
45
|
+
} else {
|
|
46
|
+
blocks.push(
|
|
47
|
+
createBlock( 'core/file', {
|
|
48
|
+
blob: blobURL,
|
|
49
|
+
fileName: file.name,
|
|
50
|
+
} )
|
|
51
|
+
);
|
|
52
|
+
}
|
|
33
53
|
} );
|
|
34
54
|
|
|
35
55
|
return blocks;
|
|
@@ -9,6 +9,7 @@ import removeAccents from 'remove-accents';
|
|
|
9
9
|
*/
|
|
10
10
|
import {
|
|
11
11
|
RichText,
|
|
12
|
+
useBlockProps,
|
|
12
13
|
__experimentalGetBorderClassesAndStyles as getBorderClassesAndStyles,
|
|
13
14
|
__experimentalGetColorClassesAndStyles as getColorClassesAndStyles,
|
|
14
15
|
} from '@wordpress/block-editor';
|
|
@@ -26,6 +27,118 @@ const getNameFromLabelV1 = ( content ) => {
|
|
|
26
27
|
);
|
|
27
28
|
};
|
|
28
29
|
|
|
30
|
+
const v2 = {
|
|
31
|
+
attributes: {
|
|
32
|
+
type: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
default: 'text',
|
|
35
|
+
},
|
|
36
|
+
name: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
},
|
|
39
|
+
label: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
default: 'Label',
|
|
42
|
+
selector: '.wp-block-form-input__label-content',
|
|
43
|
+
source: 'html',
|
|
44
|
+
__experimentalRole: 'content',
|
|
45
|
+
},
|
|
46
|
+
inlineLabel: {
|
|
47
|
+
type: 'boolean',
|
|
48
|
+
default: false,
|
|
49
|
+
},
|
|
50
|
+
required: {
|
|
51
|
+
type: 'boolean',
|
|
52
|
+
default: false,
|
|
53
|
+
selector: '.wp-block-form-input__input',
|
|
54
|
+
source: 'attribute',
|
|
55
|
+
attribute: 'required',
|
|
56
|
+
},
|
|
57
|
+
placeholder: {
|
|
58
|
+
type: 'string',
|
|
59
|
+
selector: '.wp-block-form-input__input',
|
|
60
|
+
source: 'attribute',
|
|
61
|
+
attribute: 'placeholder',
|
|
62
|
+
__experimentalRole: 'content',
|
|
63
|
+
},
|
|
64
|
+
value: {
|
|
65
|
+
type: 'string',
|
|
66
|
+
default: '',
|
|
67
|
+
selector: 'input',
|
|
68
|
+
source: 'attribute',
|
|
69
|
+
attribute: 'value',
|
|
70
|
+
},
|
|
71
|
+
visibilityPermissions: {
|
|
72
|
+
type: 'string',
|
|
73
|
+
default: 'all',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
supports: {
|
|
77
|
+
anchor: true,
|
|
78
|
+
reusable: false,
|
|
79
|
+
spacing: {
|
|
80
|
+
margin: [ 'top', 'bottom' ],
|
|
81
|
+
},
|
|
82
|
+
__experimentalBorder: {
|
|
83
|
+
radius: true,
|
|
84
|
+
__experimentalSkipSerialization: true,
|
|
85
|
+
__experimentalDefaultControls: {
|
|
86
|
+
radius: true,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
save( { attributes } ) {
|
|
91
|
+
const { type, name, label, inlineLabel, required, placeholder, value } =
|
|
92
|
+
attributes;
|
|
93
|
+
|
|
94
|
+
const borderProps = getBorderClassesAndStyles( attributes );
|
|
95
|
+
const colorProps = getColorClassesAndStyles( attributes );
|
|
96
|
+
|
|
97
|
+
const inputStyle = {
|
|
98
|
+
...borderProps.style,
|
|
99
|
+
...colorProps.style,
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const inputClasses = clsx(
|
|
103
|
+
'wp-block-form-input__input',
|
|
104
|
+
colorProps.className,
|
|
105
|
+
borderProps.className
|
|
106
|
+
);
|
|
107
|
+
const TagName = type === 'textarea' ? 'textarea' : 'input';
|
|
108
|
+
|
|
109
|
+
const blockProps = useBlockProps.save();
|
|
110
|
+
|
|
111
|
+
if ( 'hidden' === type ) {
|
|
112
|
+
return <input type={ type } name={ name } value={ value } />;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return (
|
|
116
|
+
<div { ...blockProps }>
|
|
117
|
+
{ /* eslint-disable jsx-a11y/label-has-associated-control */ }
|
|
118
|
+
<label
|
|
119
|
+
className={ clsx( 'wp-block-form-input__label', {
|
|
120
|
+
'is-label-inline': inlineLabel,
|
|
121
|
+
} ) }
|
|
122
|
+
>
|
|
123
|
+
<span className="wp-block-form-input__label-content">
|
|
124
|
+
<RichText.Content value={ label } />
|
|
125
|
+
</span>
|
|
126
|
+
<TagName
|
|
127
|
+
className={ inputClasses }
|
|
128
|
+
type={ 'textarea' === type ? undefined : type }
|
|
129
|
+
name={ name || getNameFromLabelV1( label ) }
|
|
130
|
+
required={ required }
|
|
131
|
+
aria-required={ required }
|
|
132
|
+
placeholder={ placeholder || undefined }
|
|
133
|
+
style={ inputStyle }
|
|
134
|
+
/>
|
|
135
|
+
</label>
|
|
136
|
+
{ /* eslint-enable jsx-a11y/label-has-associated-control */ }
|
|
137
|
+
</div>
|
|
138
|
+
);
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
|
|
29
142
|
// Version without wrapper div in saved markup
|
|
30
143
|
// See: https://github.com/WordPress/gutenberg/pull/56507
|
|
31
144
|
const v1 = {
|
|
@@ -137,6 +250,6 @@ const v1 = {
|
|
|
137
250
|
},
|
|
138
251
|
};
|
|
139
252
|
|
|
140
|
-
const deprecated = [ v1 ];
|
|
253
|
+
const deprecated = [ v2, v1 ];
|
|
141
254
|
|
|
142
255
|
export default deprecated;
|
package/src/form-input/edit.js
CHANGED
|
@@ -31,6 +31,9 @@ function InputFieldBlock( { attributes, setAttributes, className } ) {
|
|
|
31
31
|
ref.current.focus();
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
// Note: radio inputs aren't implemented yet.
|
|
35
|
+
const isCheckboxOrRadio = type === 'checkbox' || type === 'radio';
|
|
36
|
+
|
|
34
37
|
const controls = (
|
|
35
38
|
<>
|
|
36
39
|
{ 'hidden' !== type && (
|
|
@@ -81,6 +84,18 @@ function InputFieldBlock( { attributes, setAttributes, className } ) {
|
|
|
81
84
|
</>
|
|
82
85
|
);
|
|
83
86
|
|
|
87
|
+
const content = (
|
|
88
|
+
<RichText
|
|
89
|
+
tagName="span"
|
|
90
|
+
className="wp-block-form-input__label-content"
|
|
91
|
+
value={ label }
|
|
92
|
+
onChange={ ( newLabel ) => setAttributes( { label: newLabel } ) }
|
|
93
|
+
aria-label={ label ? __( 'Label' ) : __( 'Empty label' ) }
|
|
94
|
+
data-empty={ ! label }
|
|
95
|
+
placeholder={ __( 'Type the label for this input' ) }
|
|
96
|
+
/>
|
|
97
|
+
);
|
|
98
|
+
|
|
84
99
|
if ( 'hidden' === type ) {
|
|
85
100
|
return (
|
|
86
101
|
<>
|
|
@@ -111,17 +126,7 @@ function InputFieldBlock( { attributes, setAttributes, className } ) {
|
|
|
111
126
|
'is-label-inline': inlineLabel || 'checkbox' === type,
|
|
112
127
|
} ) }
|
|
113
128
|
>
|
|
114
|
-
|
|
115
|
-
tagName="span"
|
|
116
|
-
className="wp-block-form-input__label-content"
|
|
117
|
-
value={ label }
|
|
118
|
-
onChange={ ( newLabel ) =>
|
|
119
|
-
setAttributes( { label: newLabel } )
|
|
120
|
-
}
|
|
121
|
-
aria-label={ label ? __( 'Label' ) : __( 'Empty label' ) }
|
|
122
|
-
data-empty={ label ? false : true }
|
|
123
|
-
placeholder={ __( 'Type the label for this input' ) }
|
|
124
|
-
/>
|
|
129
|
+
{ ! isCheckboxOrRadio && content }
|
|
125
130
|
<TagName
|
|
126
131
|
type={ 'textarea' === type ? undefined : type }
|
|
127
132
|
className={ clsx(
|
|
@@ -147,6 +152,7 @@ function InputFieldBlock( { attributes, setAttributes, className } ) {
|
|
|
147
152
|
...colorProps.style,
|
|
148
153
|
} }
|
|
149
154
|
/>
|
|
155
|
+
{ isCheckboxOrRadio && content }
|
|
150
156
|
</span>
|
|
151
157
|
</div>
|
|
152
158
|
);
|
package/src/form-input/save.js
CHANGED
|
@@ -55,6 +55,9 @@ export default function save( { attributes } ) {
|
|
|
55
55
|
|
|
56
56
|
const blockProps = useBlockProps.save();
|
|
57
57
|
|
|
58
|
+
// Note: radio inputs aren't implemented yet.
|
|
59
|
+
const isCheckboxOrRadio = type === 'checkbox' || type === 'radio';
|
|
60
|
+
|
|
58
61
|
if ( 'hidden' === type ) {
|
|
59
62
|
return <input type={ type } name={ name } value={ value } />;
|
|
60
63
|
}
|
|
@@ -67,9 +70,11 @@ export default function save( { attributes } ) {
|
|
|
67
70
|
'is-label-inline': inlineLabel,
|
|
68
71
|
} ) }
|
|
69
72
|
>
|
|
70
|
-
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
+
{ ! isCheckboxOrRadio && (
|
|
74
|
+
<span className="wp-block-form-input__label-content">
|
|
75
|
+
<RichText.Content value={ label } />
|
|
76
|
+
</span>
|
|
77
|
+
) }
|
|
73
78
|
<TagName
|
|
74
79
|
className={ inputClasses }
|
|
75
80
|
type={ 'textarea' === type ? undefined : type }
|
|
@@ -79,6 +84,11 @@ export default function save( { attributes } ) {
|
|
|
79
84
|
placeholder={ placeholder || undefined }
|
|
80
85
|
style={ inputStyle }
|
|
81
86
|
/>
|
|
87
|
+
{ isCheckboxOrRadio && (
|
|
88
|
+
<span className="wp-block-form-input__label-content">
|
|
89
|
+
<RichText.Content value={ label } />
|
|
90
|
+
</span>
|
|
91
|
+
) }
|
|
82
92
|
</label>
|
|
83
93
|
{ /* eslint-enable jsx-a11y/label-has-associated-control */ }
|
|
84
94
|
</div>
|
|
@@ -15,16 +15,17 @@
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
/*
|
|
19
|
-
Small tweak to left-align the checkbox.
|
|
20
|
-
Even though `:has` is not currently supported in Firefox, this is a small tweak
|
|
21
|
-
and does not affect the functionality of the block or the user's experience.
|
|
22
|
-
There will be a minor inconsistency between browsers. However, it's more important to provide
|
|
23
|
-
a better experience for 80+% of users, until Firefox catches up and supports `:has`.
|
|
24
|
-
*/
|
|
25
18
|
&:has(input[type="checkbox"]) {
|
|
19
|
+
flex-direction: row;
|
|
26
20
|
width: fit-content;
|
|
27
|
-
|
|
21
|
+
|
|
22
|
+
.wp-block-form-input__label-content {
|
|
23
|
+
margin: 0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:has(.wp-block-form-input__label-content + input[type="checkbox"]) {
|
|
28
|
+
/* stylelint-disable-next-line declaration-property-value-allowed-list -- This style is required for old markup. */
|
|
28
29
|
flex-direction: row-reverse;
|
|
29
30
|
}
|
|
30
31
|
}
|
package/src/freeform/modal.js
CHANGED
|
@@ -25,8 +25,7 @@ function ModalAuxiliaryActions( { onClick, isModalFullScreen } ) {
|
|
|
25
25
|
|
|
26
26
|
return (
|
|
27
27
|
<Button
|
|
28
|
-
|
|
29
|
-
__next40pxDefaultSize={ false }
|
|
28
|
+
size="small"
|
|
30
29
|
onClick={ onClick }
|
|
31
30
|
icon={ fullscreen }
|
|
32
31
|
isPressed={ isModalFullScreen }
|
|
@@ -123,8 +122,7 @@ export default function ModalEdit( props ) {
|
|
|
123
122
|
>
|
|
124
123
|
<FlexItem>
|
|
125
124
|
<Button
|
|
126
|
-
|
|
127
|
-
__next40pxDefaultSize={ false }
|
|
125
|
+
__next40pxDefaultSize
|
|
128
126
|
variant="tertiary"
|
|
129
127
|
onClick={ onClose }
|
|
130
128
|
>
|
|
@@ -133,8 +131,7 @@ export default function ModalEdit( props ) {
|
|
|
133
131
|
</FlexItem>
|
|
134
132
|
<FlexItem>
|
|
135
133
|
<Button
|
|
136
|
-
|
|
137
|
-
__next40pxDefaultSize={ false }
|
|
134
|
+
__next40pxDefaultSize
|
|
138
135
|
variant="primary"
|
|
139
136
|
onClick={ () => {
|
|
140
137
|
setAttributes( {
|