@wordpress/block-library 9.46.0 → 9.48.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 +8 -0
- package/build/button/edit.cjs +7 -4
- package/build/button/edit.cjs.map +3 -3
- package/build/columns/edit.cjs +4 -10
- package/build/columns/edit.cjs.map +2 -2
- package/build/cover/edit/inspector-controls.cjs +20 -6
- package/build/cover/edit/inspector-controls.cjs.map +2 -2
- package/build/freeform/migration-notice.cjs +1 -1
- package/build/freeform/migration-notice.cjs.map +1 -1
- package/build/home-link/block.json +7 -0
- package/build/home-link/edit.cjs +167 -24
- package/build/home-link/edit.cjs.map +3 -3
- package/build/html/edit.cjs +2 -4
- package/build/html/edit.cjs.map +2 -2
- package/build/html/modal.cjs +0 -4
- package/build/html/modal.cjs.map +2 -2
- package/build/image/block.json +4 -0
- package/build/image/deprecated.cjs +202 -4
- package/build/image/deprecated.cjs.map +3 -3
- package/build/image/image.cjs +94 -30
- package/build/image/image.cjs.map +2 -2
- package/build/image/index.cjs +23 -4
- package/build/image/index.cjs.map +2 -2
- package/build/image/save.cjs +25 -10
- package/build/image/save.cjs.map +2 -2
- package/build/image/transforms.cjs +15 -3
- package/build/image/transforms.cjs.map +2 -2
- package/build/image/use-open-image-media-editor-modal.cjs +37 -14
- package/build/image/use-open-image-media-editor-modal.cjs.map +2 -2
- package/build/list-item/hooks/use-enter.cjs +8 -4
- package/build/list-item/hooks/use-enter.cjs.map +3 -3
- package/build/list-item/hooks/use-space.cjs +8 -4
- package/build/list-item/hooks/use-space.cjs.map +3 -3
- package/build/navigation-link/edit.cjs +2 -1
- package/build/navigation-link/edit.cjs.map +2 -2
- package/build/navigation-link/shared/use-handle-link-change.cjs +19 -3
- package/build/navigation-link/shared/use-handle-link-change.cjs.map +3 -3
- package/build/navigation-submenu/edit.cjs +8 -22
- package/build/navigation-submenu/edit.cjs.map +2 -2
- package/build/paragraph/use-enter.cjs +8 -4
- package/build/paragraph/use-enter.cjs.map +3 -3
- package/build/post-date/edit.cjs +9 -1
- package/build/post-date/edit.cjs.map +2 -2
- package/build/post-featured-image/edit.cjs +6 -5
- package/build/post-featured-image/edit.cjs.map +2 -2
- package/build/site-logo/edit.cjs +5 -2
- package/build/site-logo/edit.cjs.map +2 -2
- package/build/social-link/edit.cjs.map +3 -3
- package/build/tab-list/edit.cjs +2 -0
- package/build/tab-list/edit.cjs.map +2 -2
- package/build/tab-panels/edit.cjs +5 -1
- package/build/tab-panels/edit.cjs.map +2 -2
- package/build/table/edit.cjs +1 -0
- package/build/table/edit.cjs.map +2 -2
- package/build/tabs/edit.cjs +1 -36
- package/build/tabs/edit.cjs.map +2 -2
- package/build-module/button/edit.mjs +12 -5
- package/build-module/button/edit.mjs.map +2 -2
- package/build-module/columns/edit.mjs +4 -10
- package/build-module/columns/edit.mjs.map +2 -2
- package/build-module/cover/edit/inspector-controls.mjs +20 -7
- package/build-module/cover/edit/inspector-controls.mjs.map +2 -2
- package/build-module/freeform/migration-notice.mjs +1 -1
- package/build-module/freeform/migration-notice.mjs.map +1 -1
- package/build-module/home-link/block.json +7 -0
- package/build-module/home-link/edit.mjs +181 -26
- package/build-module/home-link/edit.mjs.map +2 -2
- package/build-module/html/edit.mjs +2 -4
- package/build-module/html/edit.mjs.map +2 -2
- package/build-module/html/modal.mjs +0 -4
- package/build-module/html/modal.mjs.map +2 -2
- package/build-module/image/block.json +4 -0
- package/build-module/image/deprecated.mjs +204 -5
- package/build-module/image/deprecated.mjs.map +2 -2
- package/build-module/image/image.mjs +96 -30
- package/build-module/image/image.mjs.map +2 -2
- package/build-module/image/index.mjs +23 -4
- package/build-module/image/index.mjs.map +2 -2
- package/build-module/image/save.mjs +25 -10
- package/build-module/image/save.mjs.map +2 -2
- package/build-module/image/transforms.mjs +15 -3
- package/build-module/image/transforms.mjs.map +2 -2
- package/build-module/image/use-open-image-media-editor-modal.mjs +37 -14
- package/build-module/image/use-open-image-media-editor-modal.mjs.map +2 -2
- package/build-module/list-item/hooks/use-enter.mjs +12 -5
- package/build-module/list-item/hooks/use-enter.mjs.map +2 -2
- package/build-module/list-item/hooks/use-space.mjs +12 -5
- package/build-module/list-item/hooks/use-space.mjs.map +2 -2
- package/build-module/navigation-link/edit.mjs +2 -1
- package/build-module/navigation-link/edit.mjs.map +2 -2
- package/build-module/navigation-link/shared/use-handle-link-change.mjs +19 -3
- package/build-module/navigation-link/shared/use-handle-link-change.mjs.map +2 -2
- package/build-module/navigation-submenu/edit.mjs +9 -23
- package/build-module/navigation-submenu/edit.mjs.map +2 -2
- package/build-module/paragraph/use-enter.mjs +12 -5
- package/build-module/paragraph/use-enter.mjs.map +2 -2
- package/build-module/post-date/edit.mjs +9 -1
- package/build-module/post-date/edit.mjs.map +2 -2
- package/build-module/post-featured-image/edit.mjs +6 -5
- package/build-module/post-featured-image/edit.mjs.map +2 -2
- package/build-module/site-logo/edit.mjs +6 -2
- package/build-module/site-logo/edit.mjs.map +2 -2
- package/build-module/social-link/edit.mjs +2 -2
- package/build-module/social-link/edit.mjs.map +2 -2
- package/build-module/tab-list/edit.mjs +2 -0
- package/build-module/tab-list/edit.mjs.map +2 -2
- package/build-module/tab-panels/edit.mjs +5 -1
- package/build-module/tab-panels/edit.mjs.map +2 -2
- package/build-module/table/edit.mjs +1 -0
- package/build-module/table/edit.mjs.map +2 -2
- package/build-module/tabs/edit.mjs +2 -37
- package/build-module/tabs/edit.mjs.map +2 -2
- package/build-style/breadcrumbs/style-rtl.css +1 -1
- package/build-style/breadcrumbs/style.css +1 -1
- package/build-style/editor-rtl.css +0 -11
- package/build-style/editor.css +0 -11
- package/build-style/gallery/editor-rtl.css +0 -11
- package/build-style/gallery/editor.css +0 -11
- package/build-style/style-rtl.css +1 -1
- package/build-style/style.css +1 -1
- package/package.json +40 -40
- package/src/block/edit-title.native.js +3 -3
- package/src/block/edit.native.js +2 -2
- package/src/breadcrumbs/style.scss +1 -1
- package/src/button/edit.js +14 -5
- package/src/columns/edit.js +3 -9
- package/src/cover/controls.native.js +2 -2
- package/src/cover/edit/inspector-controls.js +69 -52
- package/src/cover/edit.native.js +6 -4
- package/src/cover/focal-point-settings-button.native.js +2 -2
- package/src/cover/test/edit.js +70 -31
- package/src/embed/embed-no-preview.native.js +7 -3
- package/src/embed/embed-placeholder.native.js +2 -2
- package/src/file/edit.native.js +2 -2
- package/src/freeform/migration-notice.js +1 -1
- package/src/gallery/editor.scss +0 -14
- package/src/home-link/block.json +7 -0
- package/src/home-link/edit.js +185 -22
- package/src/home-link/index.php +14 -2
- package/src/html/edit.js +14 -12
- package/src/html/modal.js +0 -5
- package/src/image/block.json +4 -0
- package/src/image/deprecated.js +236 -4
- package/src/image/edit.native.js +2 -2
- package/src/image/image.js +166 -76
- package/src/image/index.js +20 -1
- package/src/image/index.php +1 -1
- package/src/image/save.js +39 -12
- package/src/image/test/use-open-image-media-editor-modal.js +101 -0
- package/src/image/transforms.js +21 -5
- package/src/image/use-open-image-media-editor-modal.js +41 -17
- package/src/latest-posts/edit.native.js +2 -2
- package/src/list-item/hooks/use-enter.js +15 -5
- package/src/list-item/hooks/use-space.js +15 -5
- package/src/list-item/list-style-type.native.js +2 -2
- package/src/media-text/media-container.native.js +7 -3
- package/src/missing/edit.native.js +4 -4
- package/src/missing/test/edit.native.js +3 -3
- package/src/navigation/test/use-navigation-menu.js +8 -2
- package/src/navigation-link/edit.js +1 -0
- package/src/navigation-link/shared/test/use-handle-link-change.test.js +212 -0
- package/src/navigation-link/shared/use-handle-link-change.js +36 -9
- package/src/navigation-submenu/edit.js +11 -28
- package/src/navigation-submenu/index.php +13 -0
- package/src/paragraph/use-enter.js +19 -5
- package/src/post-date/edit.js +7 -3
- package/src/post-featured-image/edit.js +15 -11
- package/src/search/edit.native.js +2 -2
- package/src/search/test/edit.native.js +2 -2
- package/src/site-logo/edit.js +7 -1
- package/src/social-link/edit.js +2 -2
- package/src/tab-list/edit.js +3 -0
- package/src/tab-panels/edit.js +10 -1
- package/src/table/edit.js +1 -0
- package/src/tabs/edit.js +14 -42
- package/src/video/edit.native.js +3 -3
|
@@ -710,17 +710,6 @@ html :where(.wp-block-column) {
|
|
|
710
710
|
:root :where(figure.wp-block-gallery) > .blocks-gallery-media-placeholder-wrapper {
|
|
711
711
|
flex-basis: 100%;
|
|
712
712
|
}
|
|
713
|
-
:root :where(figure.wp-block-gallery) .wp-block-image .components-notice.is-error {
|
|
714
|
-
display: block;
|
|
715
|
-
}
|
|
716
|
-
:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__content {
|
|
717
|
-
margin: 4px 0;
|
|
718
|
-
}
|
|
719
|
-
:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__dismiss {
|
|
720
|
-
position: absolute;
|
|
721
|
-
top: 0;
|
|
722
|
-
left: 5px;
|
|
723
|
-
}
|
|
724
713
|
:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .components-placeholder__label {
|
|
725
714
|
display: none;
|
|
726
715
|
}
|
package/build-style/editor.css
CHANGED
|
@@ -712,17 +712,6 @@ html :where(.wp-block-column) {
|
|
|
712
712
|
:root :where(figure.wp-block-gallery) > .blocks-gallery-media-placeholder-wrapper {
|
|
713
713
|
flex-basis: 100%;
|
|
714
714
|
}
|
|
715
|
-
:root :where(figure.wp-block-gallery) .wp-block-image .components-notice.is-error {
|
|
716
|
-
display: block;
|
|
717
|
-
}
|
|
718
|
-
:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__content {
|
|
719
|
-
margin: 4px 0;
|
|
720
|
-
}
|
|
721
|
-
:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__dismiss {
|
|
722
|
-
position: absolute;
|
|
723
|
-
top: 0;
|
|
724
|
-
right: 5px;
|
|
725
|
-
}
|
|
726
715
|
:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .components-placeholder__label {
|
|
727
716
|
display: none;
|
|
728
717
|
}
|
|
@@ -96,17 +96,6 @@
|
|
|
96
96
|
:root :where(figure.wp-block-gallery) > .blocks-gallery-media-placeholder-wrapper {
|
|
97
97
|
flex-basis: 100%;
|
|
98
98
|
}
|
|
99
|
-
:root :where(figure.wp-block-gallery) .wp-block-image .components-notice.is-error {
|
|
100
|
-
display: block;
|
|
101
|
-
}
|
|
102
|
-
:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__content {
|
|
103
|
-
margin: 4px 0;
|
|
104
|
-
}
|
|
105
|
-
:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__dismiss {
|
|
106
|
-
position: absolute;
|
|
107
|
-
top: 0;
|
|
108
|
-
left: 5px;
|
|
109
|
-
}
|
|
110
99
|
:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .components-placeholder__label {
|
|
111
100
|
display: none;
|
|
112
101
|
}
|
|
@@ -96,17 +96,6 @@
|
|
|
96
96
|
:root :where(figure.wp-block-gallery) > .blocks-gallery-media-placeholder-wrapper {
|
|
97
97
|
flex-basis: 100%;
|
|
98
98
|
}
|
|
99
|
-
:root :where(figure.wp-block-gallery) .wp-block-image .components-notice.is-error {
|
|
100
|
-
display: block;
|
|
101
|
-
}
|
|
102
|
-
:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__content {
|
|
103
|
-
margin: 4px 0;
|
|
104
|
-
}
|
|
105
|
-
:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__dismiss {
|
|
106
|
-
position: absolute;
|
|
107
|
-
top: 0;
|
|
108
|
-
right: 5px;
|
|
109
|
-
}
|
|
110
99
|
:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .components-placeholder__label {
|
|
111
100
|
display: none;
|
|
112
101
|
}
|
package/build-style/style.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.48.0",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -95,44 +95,44 @@
|
|
|
95
95
|
],
|
|
96
96
|
"dependencies": {
|
|
97
97
|
"@arraypress/waveform-player": "1.2.1",
|
|
98
|
-
"@wordpress/a11y": "^4.
|
|
99
|
-
"@wordpress/api-fetch": "^7.
|
|
100
|
-
"@wordpress/autop": "^4.
|
|
101
|
-
"@wordpress/base-styles": "^
|
|
102
|
-
"@wordpress/blob": "^4.
|
|
103
|
-
"@wordpress/block-editor": "^15.
|
|
104
|
-
"@wordpress/blocks": "^15.
|
|
105
|
-
"@wordpress/components": "^
|
|
106
|
-
"@wordpress/compose": "^
|
|
107
|
-
"@wordpress/core-data": "^7.
|
|
108
|
-
"@wordpress/data": "^10.
|
|
109
|
-
"@wordpress/date": "^5.
|
|
110
|
-
"@wordpress/deprecated": "^4.
|
|
111
|
-
"@wordpress/dom": "^4.
|
|
112
|
-
"@wordpress/element": "^
|
|
113
|
-
"@wordpress/escape-html": "^3.
|
|
114
|
-
"@wordpress/hooks": "^4.
|
|
115
|
-
"@wordpress/html-entities": "^4.
|
|
116
|
-
"@wordpress/i18n": "^6.
|
|
117
|
-
"@wordpress/icons": "^13.
|
|
118
|
-
"@wordpress/interactivity": "^6.
|
|
119
|
-
"@wordpress/interactivity-router": "^2.
|
|
120
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
121
|
-
"@wordpress/keycodes": "^4.
|
|
122
|
-
"@wordpress/latex-to-mathml": "^1.
|
|
123
|
-
"@wordpress/notices": "^5.
|
|
124
|
-
"@wordpress/patterns": "^2.
|
|
125
|
-
"@wordpress/primitives": "^4.
|
|
126
|
-
"@wordpress/private-apis": "^1.
|
|
127
|
-
"@wordpress/reusable-blocks": "^5.
|
|
128
|
-
"@wordpress/rich-text": "^7.
|
|
129
|
-
"@wordpress/server-side-render": "^6.
|
|
130
|
-
"@wordpress/shortcode": "^4.
|
|
131
|
-
"@wordpress/ui": "^0.
|
|
132
|
-
"@wordpress/upload-media": "^0.
|
|
133
|
-
"@wordpress/url": "^4.
|
|
134
|
-
"@wordpress/viewport": "^6.
|
|
135
|
-
"@wordpress/wordcount": "^4.
|
|
98
|
+
"@wordpress/a11y": "^4.48.0",
|
|
99
|
+
"@wordpress/api-fetch": "^7.48.0",
|
|
100
|
+
"@wordpress/autop": "^4.48.0",
|
|
101
|
+
"@wordpress/base-styles": "^9.1.0",
|
|
102
|
+
"@wordpress/blob": "^4.48.0",
|
|
103
|
+
"@wordpress/block-editor": "^15.21.0",
|
|
104
|
+
"@wordpress/blocks": "^15.21.0",
|
|
105
|
+
"@wordpress/components": "^35.0.0",
|
|
106
|
+
"@wordpress/compose": "^8.1.0",
|
|
107
|
+
"@wordpress/core-data": "^7.48.0",
|
|
108
|
+
"@wordpress/data": "^10.48.0",
|
|
109
|
+
"@wordpress/date": "^5.48.0",
|
|
110
|
+
"@wordpress/deprecated": "^4.48.0",
|
|
111
|
+
"@wordpress/dom": "^4.48.0",
|
|
112
|
+
"@wordpress/element": "^8.0.0",
|
|
113
|
+
"@wordpress/escape-html": "^3.48.0",
|
|
114
|
+
"@wordpress/hooks": "^4.48.0",
|
|
115
|
+
"@wordpress/html-entities": "^4.48.0",
|
|
116
|
+
"@wordpress/i18n": "^6.21.0",
|
|
117
|
+
"@wordpress/icons": "^13.3.0",
|
|
118
|
+
"@wordpress/interactivity": "^6.48.0",
|
|
119
|
+
"@wordpress/interactivity-router": "^2.48.0",
|
|
120
|
+
"@wordpress/keyboard-shortcuts": "^5.48.0",
|
|
121
|
+
"@wordpress/keycodes": "^4.48.0",
|
|
122
|
+
"@wordpress/latex-to-mathml": "^1.16.0",
|
|
123
|
+
"@wordpress/notices": "^5.48.0",
|
|
124
|
+
"@wordpress/patterns": "^2.48.0",
|
|
125
|
+
"@wordpress/primitives": "^4.48.0",
|
|
126
|
+
"@wordpress/private-apis": "^1.48.0",
|
|
127
|
+
"@wordpress/reusable-blocks": "^5.48.0",
|
|
128
|
+
"@wordpress/rich-text": "^7.48.0",
|
|
129
|
+
"@wordpress/server-side-render": "^6.24.0",
|
|
130
|
+
"@wordpress/shortcode": "^4.48.0",
|
|
131
|
+
"@wordpress/ui": "^0.15.0",
|
|
132
|
+
"@wordpress/upload-media": "^0.33.0",
|
|
133
|
+
"@wordpress/url": "^4.48.0",
|
|
134
|
+
"@wordpress/viewport": "^6.48.0",
|
|
135
|
+
"@wordpress/wordcount": "^4.48.0",
|
|
136
136
|
"change-case": "^4.1.2",
|
|
137
137
|
"clsx": "^2.1.1",
|
|
138
138
|
"colord": "^2.7.0",
|
|
@@ -153,5 +153,5 @@
|
|
|
153
153
|
"publishConfig": {
|
|
154
154
|
"access": "public"
|
|
155
155
|
},
|
|
156
|
-
"gitHead": "
|
|
156
|
+
"gitHead": "e7856693aeb4e2522d13608cd32c994e4a97cb9c"
|
|
157
157
|
}
|
|
@@ -6,7 +6,7 @@ import { Text, View } from 'react-native';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
-
import { Icon } from '@wordpress/components';
|
|
9
|
+
import { Icon as WCIcon } from '@wordpress/components';
|
|
10
10
|
import { useGlobalStyles } from '@wordpress/block-editor';
|
|
11
11
|
import { __ } from '@wordpress/i18n';
|
|
12
12
|
import { withPreferredColorScheme } from '@wordpress/compose';
|
|
@@ -41,7 +41,7 @@ function EditTitle( { getStylesFromColorScheme, title } ) {
|
|
|
41
41
|
return (
|
|
42
42
|
<View style={ styles.titleContainer }>
|
|
43
43
|
<View style={ styles.lockIconContainer }>
|
|
44
|
-
<
|
|
44
|
+
<WCIcon
|
|
45
45
|
label={ __( 'Lock icon' ) }
|
|
46
46
|
icon={ lock }
|
|
47
47
|
size={ 16 }
|
|
@@ -52,7 +52,7 @@ function EditTitle( { getStylesFromColorScheme, title } ) {
|
|
|
52
52
|
{ title }
|
|
53
53
|
</Text>
|
|
54
54
|
<View style={ styles.helpIconContainer }>
|
|
55
|
-
<
|
|
55
|
+
<WCIcon
|
|
56
56
|
label={ __( 'Help icon' ) }
|
|
57
57
|
icon={ help }
|
|
58
58
|
size={ 20 }
|
package/src/block/edit.native.js
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from '@wordpress/core-data';
|
|
21
21
|
import {
|
|
22
22
|
BottomSheet,
|
|
23
|
-
Icon,
|
|
23
|
+
Icon as WCIcon,
|
|
24
24
|
Disabled,
|
|
25
25
|
TextControl,
|
|
26
26
|
} from '@wordpress/components';
|
|
@@ -167,7 +167,7 @@ export default function ReusableBlockEdit( {
|
|
|
167
167
|
onClose={ closeSheet }
|
|
168
168
|
>
|
|
169
169
|
<View style={ styles.infoContainer }>
|
|
170
|
-
<
|
|
170
|
+
<WCIcon
|
|
171
171
|
icon={ help }
|
|
172
172
|
color={ infoSheetIconStyle.color }
|
|
173
173
|
size={ styles.infoSheetIcon.size }
|
package/src/button/edit.js
CHANGED
|
@@ -39,7 +39,11 @@ import {
|
|
|
39
39
|
getDefaultBlockName,
|
|
40
40
|
getBlockBindingsSource,
|
|
41
41
|
} from '@wordpress/blocks';
|
|
42
|
-
import {
|
|
42
|
+
import {
|
|
43
|
+
useMergeRefs,
|
|
44
|
+
useRefEffect,
|
|
45
|
+
privateApis as composePrivateApis,
|
|
46
|
+
} from '@wordpress/compose';
|
|
43
47
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
44
48
|
import { NEW_TAB_TARGET, NOFOLLOW_REL } from './constants';
|
|
45
49
|
import { getUpdatedLinkAttributes } from './get-updated-link-attributes';
|
|
@@ -49,6 +53,7 @@ import useDeprecatedTextAlign from '../utils/deprecated-text-align-attributes';
|
|
|
49
53
|
import { getWidthClasses, isPercentageWidth } from './utils';
|
|
50
54
|
|
|
51
55
|
const { HTMLElementControl } = unlock( blockEditorPrivateApis );
|
|
56
|
+
const { subscribeDelegatedListener } = unlock( composePrivateApis );
|
|
52
57
|
|
|
53
58
|
const LINK_SETTINGS = [
|
|
54
59
|
...LinkControl.DEFAULT_LINK_SETTINGS,
|
|
@@ -107,10 +112,14 @@ function useEnter( props ) {
|
|
|
107
112
|
selectionChange( middle.clientId );
|
|
108
113
|
}
|
|
109
114
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
115
|
+
// Capture phase so we run before writing-flow's ancestor-bubble
|
|
116
|
+
// keydown handlers that gate on `event.defaultPrevented`.
|
|
117
|
+
return subscribeDelegatedListener(
|
|
118
|
+
element,
|
|
119
|
+
'keydown',
|
|
120
|
+
onKeyDown,
|
|
121
|
+
true
|
|
122
|
+
);
|
|
114
123
|
}, [] );
|
|
115
124
|
}
|
|
116
125
|
|
package/src/columns/edit.js
CHANGED
|
@@ -267,17 +267,12 @@ function ColumnsEditContainer( { attributes, setAttributes, clientId } ) {
|
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
function Placeholder( { clientId, name, setAttributes } ) {
|
|
270
|
-
const { blockType,
|
|
270
|
+
const { blockType, variations } = useSelect(
|
|
271
271
|
( select ) => {
|
|
272
|
-
const {
|
|
273
|
-
getBlockVariations,
|
|
274
|
-
getBlockType,
|
|
275
|
-
getDefaultBlockVariation,
|
|
276
|
-
} = select( blocksStore );
|
|
272
|
+
const { getBlockVariations, getBlockType } = select( blocksStore );
|
|
277
273
|
|
|
278
274
|
return {
|
|
279
275
|
blockType: getBlockType( name ),
|
|
280
|
-
defaultVariation: getDefaultBlockVariation( name, 'block' ),
|
|
281
276
|
variations: getBlockVariations( name, 'block' ),
|
|
282
277
|
};
|
|
283
278
|
},
|
|
@@ -293,7 +288,7 @@ function Placeholder( { clientId, name, setAttributes } ) {
|
|
|
293
288
|
label={ blockType?.title }
|
|
294
289
|
variations={ variations }
|
|
295
290
|
instructions={ __( 'Divide into columns. Select a layout:' ) }
|
|
296
|
-
onSelect={ ( nextVariation
|
|
291
|
+
onSelect={ ( nextVariation ) => {
|
|
297
292
|
if ( nextVariation.attributes ) {
|
|
298
293
|
setAttributes( nextVariation.attributes );
|
|
299
294
|
}
|
|
@@ -307,7 +302,6 @@ function Placeholder( { clientId, name, setAttributes } ) {
|
|
|
307
302
|
);
|
|
308
303
|
}
|
|
309
304
|
} }
|
|
310
|
-
allowSkip
|
|
311
305
|
/>
|
|
312
306
|
</div>
|
|
313
307
|
);
|
|
@@ -9,7 +9,7 @@ import Video from 'react-native-video';
|
|
|
9
9
|
*/
|
|
10
10
|
import {
|
|
11
11
|
Image,
|
|
12
|
-
Icon,
|
|
12
|
+
Icon as WCIcon,
|
|
13
13
|
IMAGE_DEFAULT_FOCAL_POINT,
|
|
14
14
|
PanelBody,
|
|
15
15
|
RangeControl,
|
|
@@ -138,7 +138,7 @@ function Controls( {
|
|
|
138
138
|
];
|
|
139
139
|
|
|
140
140
|
const focalPointHint = ! hasParallax && ! displayPlaceholder && (
|
|
141
|
-
<
|
|
141
|
+
<WCIcon
|
|
142
142
|
icon={ plus }
|
|
143
143
|
size={ styles.focalPointHint?.width }
|
|
144
144
|
style={ [
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { useMemo } from '@wordpress/element';
|
|
5
5
|
import {
|
|
6
|
-
ExternalLink,
|
|
7
6
|
FocalPointPicker,
|
|
8
7
|
RangeControl,
|
|
9
8
|
TextareaControl,
|
|
@@ -27,6 +26,7 @@ import {
|
|
|
27
26
|
import { __ } from '@wordpress/i18n';
|
|
28
27
|
import { useSelect } from '@wordpress/data';
|
|
29
28
|
import { store as coreStore } from '@wordpress/core-data';
|
|
29
|
+
import { Link } from '@wordpress/ui';
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Internal dependencies
|
|
@@ -124,9 +124,20 @@ export default function CoverInspectorControls( {
|
|
|
124
124
|
const sizeSlug = attributes.sizeSlug || DEFAULT_MEDIA_SIZE_SLUG;
|
|
125
125
|
|
|
126
126
|
const { gradientValue, setGradient } = __experimentalUseGradient();
|
|
127
|
-
const {
|
|
127
|
+
const { imageSizes, hasSelectedStyleState } = useSelect(
|
|
128
|
+
( select ) => {
|
|
129
|
+
const {
|
|
130
|
+
getSettings,
|
|
131
|
+
hasSelectedStyleState: hasSelectedBlockStyleState,
|
|
132
|
+
} = unlock( select( blockEditorStore ) );
|
|
128
133
|
|
|
129
|
-
|
|
134
|
+
return {
|
|
135
|
+
imageSizes: getSettings()?.imageSizes,
|
|
136
|
+
hasSelectedStyleState: hasSelectedBlockStyleState( clientId ),
|
|
137
|
+
};
|
|
138
|
+
},
|
|
139
|
+
[ clientId ]
|
|
140
|
+
);
|
|
130
141
|
|
|
131
142
|
const image = useSelect(
|
|
132
143
|
( select ) =>
|
|
@@ -189,12 +200,15 @@ export default function CoverInspectorControls( {
|
|
|
189
200
|
|
|
190
201
|
const colorGradientSettings = useMultipleOriginColorsAndGradients();
|
|
191
202
|
|
|
203
|
+
const showOverlayControls =
|
|
204
|
+
colorGradientSettings.hasColorsOrGradients && ! hasSelectedStyleState;
|
|
205
|
+
|
|
192
206
|
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
193
207
|
|
|
194
208
|
return (
|
|
195
209
|
<>
|
|
196
|
-
|
|
197
|
-
|
|
210
|
+
{ ( !! url || useFeaturedImage ) && (
|
|
211
|
+
<InspectorControls>
|
|
198
212
|
<ToolsPanel
|
|
199
213
|
label={ __( 'Settings' ) }
|
|
200
214
|
resetAll={ () => {
|
|
@@ -299,7 +313,8 @@ export default function CoverInspectorControls( {
|
|
|
299
313
|
}
|
|
300
314
|
help={
|
|
301
315
|
<>
|
|
302
|
-
<
|
|
316
|
+
<Link
|
|
317
|
+
openInNewTab
|
|
303
318
|
href={
|
|
304
319
|
// translators: Localized tutorial, if one exists. W3C Web Accessibility Initiative link has list of existing translations.
|
|
305
320
|
__(
|
|
@@ -310,7 +325,7 @@ export default function CoverInspectorControls( {
|
|
|
310
325
|
{ __(
|
|
311
326
|
'Describe the purpose of the image.'
|
|
312
327
|
) }
|
|
313
|
-
</
|
|
328
|
+
</Link>
|
|
314
329
|
<br />
|
|
315
330
|
{ __(
|
|
316
331
|
'Leave empty if decorative.'
|
|
@@ -329,9 +344,9 @@ export default function CoverInspectorControls( {
|
|
|
329
344
|
/>
|
|
330
345
|
) }
|
|
331
346
|
</ToolsPanel>
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
{
|
|
347
|
+
</InspectorControls>
|
|
348
|
+
) }
|
|
349
|
+
{ showOverlayControls && (
|
|
335
350
|
<InspectorControls group="color">
|
|
336
351
|
<ColorGradientSettingsDropdown
|
|
337
352
|
__experimentalIsRenderedInSidebar
|
|
@@ -386,51 +401,53 @@ export default function CoverInspectorControls( {
|
|
|
386
401
|
</ToolsPanelItem>
|
|
387
402
|
</InspectorControls>
|
|
388
403
|
) }
|
|
389
|
-
|
|
390
|
-
<
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
minHeight: undefined,
|
|
397
|
-
minHeightUnit: undefined,
|
|
398
|
-
} )
|
|
399
|
-
}
|
|
400
|
-
resetAllFilter={ () => ( {
|
|
401
|
-
minHeight: undefined,
|
|
402
|
-
minHeightUnit: undefined,
|
|
403
|
-
} ) }
|
|
404
|
-
isShownByDefault
|
|
405
|
-
panelId={ clientId }
|
|
406
|
-
>
|
|
407
|
-
<CoverHeightInput
|
|
408
|
-
value={
|
|
409
|
-
attributes?.style?.dimensions?.aspectRatio
|
|
410
|
-
? ''
|
|
411
|
-
: minHeight
|
|
412
|
-
}
|
|
413
|
-
unit={ minHeightUnit }
|
|
414
|
-
onChange={ ( newMinHeight ) =>
|
|
415
|
-
setAttributes( {
|
|
416
|
-
minHeight: newMinHeight,
|
|
417
|
-
style: cleanEmptyObject( {
|
|
418
|
-
...attributes?.style,
|
|
419
|
-
dimensions: {
|
|
420
|
-
...attributes?.style?.dimensions,
|
|
421
|
-
aspectRatio: undefined, // Reset aspect ratio when minHeight is set.
|
|
422
|
-
},
|
|
423
|
-
} ),
|
|
424
|
-
} )
|
|
425
|
-
}
|
|
426
|
-
onUnitChange={ ( nextUnit ) =>
|
|
404
|
+
{ ! hasSelectedStyleState && (
|
|
405
|
+
<InspectorControls group="dimensions">
|
|
406
|
+
<ToolsPanelItem
|
|
407
|
+
className="single-column"
|
|
408
|
+
hasValue={ () => !! minHeight }
|
|
409
|
+
label={ __( 'Minimum height' ) }
|
|
410
|
+
onDeselect={ () =>
|
|
427
411
|
setAttributes( {
|
|
428
|
-
|
|
412
|
+
minHeight: undefined,
|
|
413
|
+
minHeightUnit: undefined,
|
|
429
414
|
} )
|
|
430
415
|
}
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
416
|
+
resetAllFilter={ () => ( {
|
|
417
|
+
minHeight: undefined,
|
|
418
|
+
minHeightUnit: undefined,
|
|
419
|
+
} ) }
|
|
420
|
+
isShownByDefault
|
|
421
|
+
panelId={ clientId }
|
|
422
|
+
>
|
|
423
|
+
<CoverHeightInput
|
|
424
|
+
value={
|
|
425
|
+
attributes?.style?.dimensions?.aspectRatio
|
|
426
|
+
? ''
|
|
427
|
+
: minHeight
|
|
428
|
+
}
|
|
429
|
+
unit={ minHeightUnit }
|
|
430
|
+
onChange={ ( newMinHeight ) =>
|
|
431
|
+
setAttributes( {
|
|
432
|
+
minHeight: newMinHeight,
|
|
433
|
+
style: cleanEmptyObject( {
|
|
434
|
+
...attributes?.style,
|
|
435
|
+
dimensions: {
|
|
436
|
+
...attributes?.style?.dimensions,
|
|
437
|
+
aspectRatio: undefined, // Reset aspect ratio when minHeight is set.
|
|
438
|
+
},
|
|
439
|
+
} ),
|
|
440
|
+
} )
|
|
441
|
+
}
|
|
442
|
+
onUnitChange={ ( nextUnit ) =>
|
|
443
|
+
setAttributes( {
|
|
444
|
+
minHeightUnit: nextUnit,
|
|
445
|
+
} )
|
|
446
|
+
}
|
|
447
|
+
/>
|
|
448
|
+
</ToolsPanelItem>
|
|
449
|
+
</InspectorControls>
|
|
450
|
+
) }
|
|
434
451
|
<InspectorControls group="advanced">
|
|
435
452
|
<HTMLElementControl
|
|
436
453
|
tagName={ tagName }
|
package/src/cover/edit.native.js
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from '@wordpress/react-native-bridge';
|
|
24
24
|
import { __ } from '@wordpress/i18n';
|
|
25
25
|
import {
|
|
26
|
-
Icon,
|
|
26
|
+
Icon as WCIcon,
|
|
27
27
|
Image,
|
|
28
28
|
ImageEditingButton,
|
|
29
29
|
IMAGE_DEFAULT_FOCAL_POINT,
|
|
@@ -354,7 +354,9 @@ const Cover = ( {
|
|
|
354
354
|
styles.iconDark
|
|
355
355
|
);
|
|
356
356
|
|
|
357
|
-
const placeholderIcon =
|
|
357
|
+
const placeholderIcon = (
|
|
358
|
+
<WCIcon icon={ icon } { ...placeholderIconStyle } />
|
|
359
|
+
);
|
|
358
360
|
|
|
359
361
|
const toolbarControls = ( open ) => (
|
|
360
362
|
<BlockControls group="other">
|
|
@@ -380,7 +382,7 @@ const Cover = ( {
|
|
|
380
382
|
>
|
|
381
383
|
<View style={ styles.selectImageContainer }>
|
|
382
384
|
<View style={ styles.selectImage }>
|
|
383
|
-
<
|
|
385
|
+
<WCIcon
|
|
384
386
|
size={ 16 }
|
|
385
387
|
icon={ image }
|
|
386
388
|
{ ...styles.selectImageIcon }
|
|
@@ -665,7 +667,7 @@ const Cover = ( {
|
|
|
665
667
|
style={ styles.uploadFailedContainer }
|
|
666
668
|
>
|
|
667
669
|
<View style={ styles.uploadFailed }>
|
|
668
|
-
<
|
|
670
|
+
<WCIcon
|
|
669
671
|
icon={ cautionFilled }
|
|
670
672
|
{ ...styles.uploadFailedIcon }
|
|
671
673
|
/>
|
|
@@ -8,7 +8,7 @@ import { View } from 'react-native';
|
|
|
8
8
|
* WordPress dependencies
|
|
9
9
|
*/
|
|
10
10
|
import { __ } from '@wordpress/i18n';
|
|
11
|
-
import { Icon, BottomSheet } from '@wordpress/components';
|
|
11
|
+
import { Icon as WCIcon, BottomSheet } from '@wordpress/components';
|
|
12
12
|
import { blockSettingsScreens } from '@wordpress/block-editor';
|
|
13
13
|
import { chevronRight } from '@wordpress/icons';
|
|
14
14
|
|
|
@@ -44,7 +44,7 @@ function FocalPointSettingsButton( {
|
|
|
44
44
|
* issue: https://github.com/react-native-svg/react-native-svg/issues/1345
|
|
45
45
|
*/ }
|
|
46
46
|
<View style={ disabled && styles.dimmedActionButton }>
|
|
47
|
-
<
|
|
47
|
+
<WCIcon icon={ chevronRight } />
|
|
48
48
|
</View>
|
|
49
49
|
</BottomSheet.Cell>
|
|
50
50
|
);
|