@wordpress/block-library 9.27.1-next.46f643fa0.0 → 9.28.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 +2 -0
- package/build/cover/edit/index.js +1 -1
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +1 -1
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/file/edit.js +4 -2
- package/build/file/edit.js.map +1 -1
- package/build/file/edit.native.js +1 -1
- package/build/file/edit.native.js.map +1 -1
- package/build/file/transforms.js +6 -6
- package/build/file/transforms.js.map +1 -1
- package/build/file/utils/index.js +5 -0
- package/build/file/utils/index.js.map +1 -1
- package/build/gallery/use-get-media.js +3 -3
- package/build/gallery/use-get-media.js.map +1 -1
- package/build/gallery/use-get-media.native.js +3 -3
- package/build/gallery/use-get-media.native.js.map +1 -1
- package/build/image/edit.native.js +2 -2
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +1 -1
- package/build/image/image.js.map +1 -1
- package/build/list-item/edit.js +3 -0
- package/build/list-item/edit.js.map +1 -1
- package/build/media-text/edit.js +2 -2
- package/build/media-text/edit.js.map +1 -1
- package/build/more/edit.js +13 -28
- package/build/more/edit.js.map +1 -1
- package/build/post-comments-count/index.js +3 -0
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-link/index.js +3 -0
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-featured-image/edit.js +2 -2
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/site-logo/edit.js +2 -2
- package/build/site-logo/edit.js.map +1 -1
- package/build/social-link/icons/tiktok.js +2 -2
- package/build/social-link/icons/tiktok.js.map +1 -1
- package/build/utils/poster-image.js +54 -6
- package/build/utils/poster-image.js.map +1 -1
- package/build-module/cover/edit/index.js +1 -1
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +1 -1
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/file/edit.js +4 -2
- package/build-module/file/edit.js.map +1 -1
- package/build-module/file/edit.native.js +1 -1
- package/build-module/file/edit.native.js.map +1 -1
- package/build-module/file/transforms.js +6 -6
- package/build-module/file/transforms.js.map +1 -1
- package/build-module/file/utils/index.js +5 -0
- package/build-module/file/utils/index.js.map +1 -1
- package/build-module/gallery/use-get-media.js +3 -3
- package/build-module/gallery/use-get-media.js.map +1 -1
- package/build-module/gallery/use-get-media.native.js +3 -3
- package/build-module/gallery/use-get-media.native.js.map +1 -1
- package/build-module/image/edit.native.js +2 -2
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +1 -1
- package/build-module/image/image.js.map +1 -1
- package/build-module/list-item/edit.js +3 -0
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/media-text/edit.js +2 -2
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/more/edit.js +15 -29
- package/build-module/more/edit.js.map +1 -1
- package/build-module/post-comments-count/index.js +3 -0
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-link/index.js +3 -0
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-featured-image/edit.js +2 -2
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/site-logo/edit.js +2 -2
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/social-link/icons/tiktok.js +2 -2
- package/build-module/social-link/icons/tiktok.js.map +1 -1
- package/build-module/utils/poster-image.js +57 -9
- package/build-module/utils/poster-image.js.map +1 -1
- package/build-style/editor-rtl.css +23 -26
- package/build-style/editor.css +23 -26
- package/build-style/gallery/style-rtl.css +1 -2
- package/build-style/gallery/style.css +1 -2
- package/build-style/image/style-rtl.css +1 -2
- package/build-style/image/style.css +1 -2
- package/build-style/more/editor-rtl.css +3 -11
- package/build-style/more/editor.css +3 -11
- package/build-style/post-featured-image/editor-rtl.css +1 -2
- package/build-style/post-featured-image/editor.css +1 -2
- package/build-style/style-rtl.css +2 -4
- package/build-style/style.css +2 -4
- package/package.json +35 -35
- package/src/block/index.php +33 -20
- package/src/cover/edit/index.js +8 -3
- package/src/cover/edit/inspector-controls.js +6 -1
- package/src/file/edit.js +9 -4
- package/src/file/edit.native.js +5 -1
- package/src/file/transforms.js +6 -6
- package/src/file/utils/index.js +5 -0
- package/src/form-input/index.php +4 -2
- package/src/gallery/use-get-media.js +9 -5
- package/src/gallery/use-get-media.native.js +10 -6
- package/src/image/edit.native.js +4 -2
- package/src/image/image.js +6 -1
- package/src/image/index.php +1 -1
- package/src/image/test/edit.native.js +16 -10
- package/src/list-item/edit.js +3 -0
- package/src/loginout/index.php +4 -2
- package/src/media-text/edit.js +16 -6
- package/src/more/edit.js +27 -33
- package/src/more/editor.scss +3 -12
- package/src/post-comments-count/block.json +3 -0
- package/src/post-comments-link/block.json +3 -0
- package/src/post-date/index.php +28 -32
- package/src/post-featured-image/edit.js +2 -2
- package/src/site-logo/edit.js +11 -4
- package/src/social-link/icons/tiktok.js +2 -2
- package/src/utils/poster-image.js +62 -17
- package/src/utils/poster-image.scss +23 -16
|
@@ -6,11 +6,14 @@ import clsx from 'clsx';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
-
import { MediaUpload, MediaUploadCheck } from '@wordpress/block-editor';
|
|
10
|
-
import {
|
|
9
|
+
import { MediaUpload, MediaUploadCheck, store as blockEditorStore } from '@wordpress/block-editor';
|
|
10
|
+
import { store as noticesStore } from '@wordpress/notices';
|
|
11
|
+
import { Button, BaseControl, DropZone, Spinner, __experimentalHStack as HStack, __experimentalToolsPanelItem as ToolsPanelItem } from '@wordpress/components';
|
|
12
|
+
import { isBlobURL } from '@wordpress/blob';
|
|
11
13
|
import { __, sprintf } from '@wordpress/i18n';
|
|
12
|
-
import { useRef } from '@wordpress/element';
|
|
14
|
+
import { useRef, useState } from '@wordpress/element';
|
|
13
15
|
import { useInstanceId } from '@wordpress/compose';
|
|
16
|
+
import { useSelect, useDispatch } from '@wordpress/data';
|
|
14
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
18
|
const POSTER_IMAGE_ALLOWED_MEDIA_TYPES = ['image'];
|
|
16
19
|
function PosterImage({
|
|
@@ -18,7 +21,44 @@ function PosterImage({
|
|
|
18
21
|
onChange
|
|
19
22
|
}) {
|
|
20
23
|
const posterButtonRef = useRef();
|
|
24
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
21
25
|
const descriptionId = useInstanceId(PosterImage, 'block-library-poster-image-description');
|
|
26
|
+
const {
|
|
27
|
+
getSettings
|
|
28
|
+
} = useSelect(blockEditorStore);
|
|
29
|
+
const {
|
|
30
|
+
createErrorNotice
|
|
31
|
+
} = useDispatch(noticesStore);
|
|
32
|
+
const onDropFiles = filesList => {
|
|
33
|
+
getSettings().mediaUpload({
|
|
34
|
+
allowedTypes: POSTER_IMAGE_ALLOWED_MEDIA_TYPES,
|
|
35
|
+
filesList,
|
|
36
|
+
onFileChange: ([image]) => {
|
|
37
|
+
if (isBlobURL(image?.url)) {
|
|
38
|
+
setIsLoading(true);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (image) {
|
|
42
|
+
onChange(image);
|
|
43
|
+
}
|
|
44
|
+
setIsLoading(false);
|
|
45
|
+
},
|
|
46
|
+
onError: message => {
|
|
47
|
+
createErrorNotice(message, {
|
|
48
|
+
id: 'poster-image-upload-notice',
|
|
49
|
+
type: 'snackbar'
|
|
50
|
+
});
|
|
51
|
+
setIsLoading(false);
|
|
52
|
+
},
|
|
53
|
+
multiple: false
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
const getPosterButtonContent = () => {
|
|
57
|
+
if (!poster && isLoading) {
|
|
58
|
+
return /*#__PURE__*/_jsx(Spinner, {});
|
|
59
|
+
}
|
|
60
|
+
return !poster ? __('Set poster image') : __('Replace');
|
|
61
|
+
};
|
|
22
62
|
return /*#__PURE__*/_jsx(MediaUploadCheck, {
|
|
23
63
|
children: /*#__PURE__*/_jsxs(ToolsPanelItem, {
|
|
24
64
|
label: __('Poster image'),
|
|
@@ -35,17 +75,19 @@ function PosterImage({
|
|
|
35
75
|
open
|
|
36
76
|
}) => /*#__PURE__*/_jsxs("div", {
|
|
37
77
|
className: "block-library-poster-image__container",
|
|
38
|
-
children: [poster && /*#__PURE__*/
|
|
78
|
+
children: [poster && /*#__PURE__*/_jsxs(Button, {
|
|
39
79
|
__next40pxDefaultSize: true,
|
|
40
80
|
onClick: open,
|
|
41
81
|
"aria-haspopup": "dialog",
|
|
42
|
-
"aria-label":
|
|
43
|
-
className:
|
|
44
|
-
|
|
82
|
+
"aria-label": __('Edit or replace the poster image.'),
|
|
83
|
+
className: "block-library-poster-image__preview",
|
|
84
|
+
disabled: isLoading,
|
|
85
|
+
accessibleWhenDisabled: true,
|
|
86
|
+
children: [/*#__PURE__*/_jsx("img", {
|
|
45
87
|
src: poster,
|
|
46
88
|
alt: __('Poster image preview'),
|
|
47
89
|
className: "block-library-poster-image__preview-image"
|
|
48
|
-
})
|
|
90
|
+
}), isLoading && /*#__PURE__*/_jsx(Spinner, {})]
|
|
49
91
|
}), /*#__PURE__*/_jsxs(HStack, {
|
|
50
92
|
className: clsx('block-library-poster-image__actions', {
|
|
51
93
|
'block-library-poster-image__actions-select': !poster
|
|
@@ -58,7 +100,9 @@ function PosterImage({
|
|
|
58
100
|
"aria-describedby": descriptionId,
|
|
59
101
|
"aria-haspopup": "dialog",
|
|
60
102
|
variant: !poster ? 'secondary' : undefined,
|
|
61
|
-
|
|
103
|
+
disabled: isLoading,
|
|
104
|
+
accessibleWhenDisabled: true,
|
|
105
|
+
children: getPosterButtonContent()
|
|
62
106
|
}), /*#__PURE__*/_jsx("p", {
|
|
63
107
|
id: descriptionId,
|
|
64
108
|
hidden: true,
|
|
@@ -73,8 +117,12 @@ function PosterImage({
|
|
|
73
117
|
posterButtonRef.current.focus();
|
|
74
118
|
},
|
|
75
119
|
className: "block-library-poster-image__action",
|
|
120
|
+
disabled: isLoading,
|
|
121
|
+
accessibleWhenDisabled: true,
|
|
76
122
|
children: __('Remove')
|
|
77
123
|
})]
|
|
124
|
+
}), /*#__PURE__*/_jsx(DropZone, {
|
|
125
|
+
onFilesDrop: onDropFiles
|
|
78
126
|
})]
|
|
79
127
|
})
|
|
80
128
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["clsx","MediaUpload","MediaUploadCheck","Button","BaseControl","__experimentalHStack","HStack","__experimentalToolsPanelItem","ToolsPanelItem","__","sprintf","useRef","useInstanceId","jsx","_jsx","jsxs","_jsxs","POSTER_IMAGE_ALLOWED_MEDIA_TYPES","PosterImage","poster","onChange","posterButtonRef","descriptionId","children","label","isShownByDefault","hasValue","onDeselect","undefined","VisualLabel","title","onSelect","allowedTypes","render","open","className","__next40pxDefaultSize","onClick","src","alt","ref","variant","id","hidden","current","focus"],"sources":["@wordpress/block-library/src/utils/poster-image.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { MediaUpload, MediaUploadCheck } from '@wordpress/block-editor';\nimport {\n\tButton,\n\tBaseControl,\n\t__experimentalHStack as HStack,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\nconst POSTER_IMAGE_ALLOWED_MEDIA_TYPES = [ 'image' ];\n\nfunction PosterImage( { poster, onChange } ) {\n\tconst posterButtonRef = useRef();\n\tconst descriptionId = useInstanceId(\n\t\tPosterImage,\n\t\t'block-library-poster-image-description'\n\t);\n\n\treturn (\n\t\t<MediaUploadCheck>\n\t\t\t<ToolsPanelItem\n\t\t\t\tlabel={ __( 'Poster image' ) }\n\t\t\t\tisShownByDefault\n\t\t\t\thasValue={ () => !! poster }\n\t\t\t\tonDeselect={ () => onChange( undefined ) }\n\t\t\t>\n\t\t\t\t<BaseControl.VisualLabel>\n\t\t\t\t\t{ __( 'Poster image' ) }\n\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t<MediaUpload\n\t\t\t\t\ttitle={ __( 'Select poster image' ) }\n\t\t\t\t\tonSelect={ onChange }\n\t\t\t\t\tallowedTypes={ POSTER_IMAGE_ALLOWED_MEDIA_TYPES }\n\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t<div className=\"block-library-poster-image__container\">\n\t\t\t\t\t\t\t{ poster && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\t\t\t\t! poster\n\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Edit or replace the poster image.'\n\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\tposter\n\t\t\t\t\t\t\t\t\t\t\t? 'block-library-poster-image__preview'\n\t\t\t\t\t\t\t\t\t\t\t: 'block-library-poster-image__toggle'\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\tsrc={ poster }\n\t\t\t\t\t\t\t\t\t\talt={ __( 'Poster image preview' ) }\n\t\t\t\t\t\t\t\t\t\tclassName=\"block-library-poster-image__preview-image\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t'block-library-poster-image__actions',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'block-library-poster-image__actions-select':\n\t\t\t\t\t\t\t\t\t\t\t! poster,\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\tref={ posterButtonRef }\n\t\t\t\t\t\t\t\t\tclassName=\"block-library-poster-image__action\"\n\t\t\t\t\t\t\t\t\taria-describedby={ descriptionId }\n\t\t\t\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t! poster ? 'secondary' : undefined\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ ! poster\n\t\t\t\t\t\t\t\t\t\t? __( 'Set poster image' )\n\t\t\t\t\t\t\t\t\t\t: __( 'Replace' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t<p id={ descriptionId } hidden>\n\t\t\t\t\t\t\t\t\t{ poster\n\t\t\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: poster image URL. */\n\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'The current poster image url is %s.'\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tposter\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t'There is no poster image currently selected.'\n\t\t\t\t\t\t\t\t\t\t ) }\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t{ !! poster && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\tonChange( undefined );\n\n\t\t\t\t\t\t\t\t\t\t\t// Move focus back to the Media Upload button.\n\t\t\t\t\t\t\t\t\t\t\tposterButtonRef.current.focus();\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\tclassName=\"block-library-poster-image__action\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Remove' ) }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</ToolsPanelItem>\n\t\t</MediaUploadCheck>\n\t);\n}\n\nexport default PosterImage;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,WAAW,EAAEC,gBAAgB,QAAQ,yBAAyB;AACvE,SACCC,MAAM,EACNC,WAAW,EACXC,oBAAoB,IAAIC,MAAM,EAC9BC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,MAAM,QAAQ,oBAAoB;AAC3C,SAASC,aAAa,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEnD,MAAMC,gCAAgC,GAAG,CAAE,OAAO,CAAE;AAEpD,SAASC,WAAWA,CAAE;EAAEC,MAAM;EAAEC;AAAS,CAAC,EAAG;EAC5C,MAAMC,eAAe,GAAGV,MAAM,CAAC,CAAC;EAChC,MAAMW,aAAa,GAAGV,aAAa,CAClCM,WAAW,EACX,wCACD,CAAC;EAED,oBACCJ,IAAA,CAACZ,gBAAgB;IAAAqB,QAAA,eAChBP,KAAA,CAACR,cAAc;MACdgB,KAAK,EAAGf,EAAE,CAAE,cAAe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EAEC,CAAEJ,MAAM,GACPV,EAAE,CAAE,kBAAmB,CAAC,GACxBA,EAAE,CAAE,SAAU;YAAC,CACX,CAAC,eACTK,IAAA;cAAG4B,EAAE,EAAGpB,aAAe;cAACqB,MAAM;cAAApB,QAAA,EAC3BJ,MAAM,GACLT,OAAO,CACP;cACAD,EAAE,CACD,qCACD,CAAC,EACDU,MACA,CAAC,GACDV,EAAE,CACF,8CACA;YAAC,CACF,CAAC,EACF,CAAC,CAAEU,MAAM,iBACVL,IAAA,CAACX,MAAM;cACNiC,qBAAqB;cACrBC,OAAO,EAAGA,CAAA,KAAM;gBACfjB,QAAQ,CAAEQ,SAAU,CAAC;;gBAErB;gBACAP,eAAe,CAACuB,OAAO,CAACC,KAAK,CAAC,CAAC;cAChC,CAAG;cACHV,SAAS,EAAC,oCAAoC;cAAAZ,QAAA,EAE5Cd,EAAE,CAAE,QAAS;YAAC,CACT,CACR;UAAA,CACM,CAAC;QAAA,CACL;MACH,CACH,CAAC;IAAA,CACa;EAAC,CACA,CAAC;AAErB;AAEA,eAAeS,WAAW","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["clsx","MediaUpload","MediaUploadCheck","store","blockEditorStore","noticesStore","Button","BaseControl","DropZone","Spinner","__experimentalHStack","HStack","__experimentalToolsPanelItem","ToolsPanelItem","isBlobURL","__","sprintf","useRef","useState","useInstanceId","useSelect","useDispatch","jsx","_jsx","jsxs","_jsxs","POSTER_IMAGE_ALLOWED_MEDIA_TYPES","PosterImage","poster","onChange","posterButtonRef","isLoading","setIsLoading","descriptionId","getSettings","createErrorNotice","onDropFiles","filesList","mediaUpload","allowedTypes","onFileChange","image","url","onError","message","id","type","multiple","getPosterButtonContent","children","label","isShownByDefault","hasValue","onDeselect","undefined","VisualLabel","title","onSelect","render","open","className","__next40pxDefaultSize","onClick","disabled","accessibleWhenDisabled","src","alt","ref","variant","hidden","current","focus","onFilesDrop"],"sources":["@wordpress/block-library/src/utils/poster-image.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tMediaUpload,\n\tMediaUploadCheck,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { store as noticesStore } from '@wordpress/notices';\nimport {\n\tButton,\n\tBaseControl,\n\tDropZone,\n\tSpinner,\n\t__experimentalHStack as HStack,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { isBlobURL } from '@wordpress/blob';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useRef, useState } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\nconst POSTER_IMAGE_ALLOWED_MEDIA_TYPES = [ 'image' ];\n\nfunction PosterImage( { poster, onChange } ) {\n\tconst posterButtonRef = useRef();\n\tconst [ isLoading, setIsLoading ] = useState( false );\n\tconst descriptionId = useInstanceId(\n\t\tPosterImage,\n\t\t'block-library-poster-image-description'\n\t);\n\n\tconst { getSettings } = useSelect( blockEditorStore );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tconst onDropFiles = ( filesList ) => {\n\t\tgetSettings().mediaUpload( {\n\t\t\tallowedTypes: POSTER_IMAGE_ALLOWED_MEDIA_TYPES,\n\t\t\tfilesList,\n\t\t\tonFileChange: ( [ image ] ) => {\n\t\t\t\tif ( isBlobURL( image?.url ) ) {\n\t\t\t\t\tsetIsLoading( true );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( image ) {\n\t\t\t\t\tonChange( image );\n\t\t\t\t}\n\t\t\t\tsetIsLoading( false );\n\t\t\t},\n\t\t\tonError: ( message ) => {\n\t\t\t\tcreateErrorNotice( message, {\n\t\t\t\t\tid: 'poster-image-upload-notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\t\tsetIsLoading( false );\n\t\t\t},\n\t\t\tmultiple: false,\n\t\t} );\n\t};\n\n\tconst getPosterButtonContent = () => {\n\t\tif ( ! poster && isLoading ) {\n\t\t\treturn <Spinner />;\n\t\t}\n\n\t\treturn ! poster ? __( 'Set poster image' ) : __( 'Replace' );\n\t};\n\n\treturn (\n\t\t<MediaUploadCheck>\n\t\t\t<ToolsPanelItem\n\t\t\t\tlabel={ __( 'Poster image' ) }\n\t\t\t\tisShownByDefault\n\t\t\t\thasValue={ () => !! poster }\n\t\t\t\tonDeselect={ () => onChange( undefined ) }\n\t\t\t>\n\t\t\t\t<BaseControl.VisualLabel>\n\t\t\t\t\t{ __( 'Poster image' ) }\n\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t<MediaUpload\n\t\t\t\t\ttitle={ __( 'Select poster image' ) }\n\t\t\t\t\tonSelect={ onChange }\n\t\t\t\t\tallowedTypes={ POSTER_IMAGE_ALLOWED_MEDIA_TYPES }\n\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t<div className=\"block-library-poster-image__container\">\n\t\t\t\t\t\t\t{ poster && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t\t\t'Edit or replace the poster image.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tclassName=\"block-library-poster-image__preview\"\n\t\t\t\t\t\t\t\t\tdisabled={ isLoading }\n\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\tsrc={ poster }\n\t\t\t\t\t\t\t\t\t\talt={ __( 'Poster image preview' ) }\n\t\t\t\t\t\t\t\t\t\tclassName=\"block-library-poster-image__preview-image\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t{ isLoading && <Spinner /> }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t'block-library-poster-image__actions',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'block-library-poster-image__actions-select':\n\t\t\t\t\t\t\t\t\t\t\t! poster,\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\tref={ posterButtonRef }\n\t\t\t\t\t\t\t\t\tclassName=\"block-library-poster-image__action\"\n\t\t\t\t\t\t\t\t\taria-describedby={ descriptionId }\n\t\t\t\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t! poster ? 'secondary' : undefined\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdisabled={ isLoading }\n\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ getPosterButtonContent() }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t<p id={ descriptionId } hidden>\n\t\t\t\t\t\t\t\t\t{ poster\n\t\t\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: poster image URL. */\n\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'The current poster image url is %s.'\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tposter\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t'There is no poster image currently selected.'\n\t\t\t\t\t\t\t\t\t\t ) }\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t{ !! poster && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\tonChange( undefined );\n\n\t\t\t\t\t\t\t\t\t\t\t// Move focus back to the Media Upload button.\n\t\t\t\t\t\t\t\t\t\t\tposterButtonRef.current.focus();\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\tclassName=\"block-library-poster-image__action\"\n\t\t\t\t\t\t\t\t\t\tdisabled={ isLoading }\n\t\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Remove' ) }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t<DropZone onFilesDrop={ onDropFiles } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</ToolsPanelItem>\n\t\t</MediaUploadCheck>\n\t);\n}\n\nexport default PosterImage;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SACCC,WAAW,EACXC,gBAAgB,EAChBC,KAAK,IAAIC,gBAAgB,QACnB,yBAAyB;AAChC,SAASD,KAAK,IAAIE,YAAY,QAAQ,oBAAoB;AAC1D,SACCC,MAAM,EACNC,WAAW,EACXC,QAAQ,EACRC,OAAO,EACPC,oBAAoB,IAAIC,MAAM,EAC9BC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,MAAM,EAAEC,QAAQ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block) {
|
|
|
1374
1374
|
text-align: center;
|
|
1375
1375
|
white-space: nowrap;
|
|
1376
1376
|
}
|
|
1377
|
-
.wp-block-more
|
|
1377
|
+
.wp-block-more .rich-text {
|
|
1378
1378
|
position: relative;
|
|
1379
1379
|
font-size: 13px;
|
|
1380
1380
|
text-transform: uppercase;
|
|
1381
1381
|
font-weight: 600;
|
|
1382
1382
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
1383
1383
|
color: #757575;
|
|
1384
|
-
|
|
1385
|
-
box-shadow: none;
|
|
1384
|
+
display: inline-flex;
|
|
1386
1385
|
white-space: nowrap;
|
|
1387
1386
|
text-align: center;
|
|
1388
|
-
margin: 0;
|
|
1389
|
-
border-radius: 4px;
|
|
1390
1387
|
background: #fff;
|
|
1391
|
-
padding:
|
|
1392
|
-
height: 24px;
|
|
1393
|
-
max-width: 100%;
|
|
1394
|
-
}
|
|
1395
|
-
.wp-block-more input[type=text]:focus {
|
|
1396
|
-
box-shadow: none;
|
|
1388
|
+
padding: 10px 36px;
|
|
1397
1389
|
}
|
|
1398
1390
|
.wp-block-more::before {
|
|
1399
1391
|
content: "";
|
|
@@ -2691,8 +2683,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2691
2683
|
|
|
2692
2684
|
.wp-block-post-featured-image .block-editor-media-placeholder {
|
|
2693
2685
|
z-index: 1;
|
|
2694
|
-
|
|
2695
|
-
backdrop-filter: none;
|
|
2686
|
+
backdrop-filter: none;
|
|
2696
2687
|
}
|
|
2697
2688
|
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder,
|
|
2698
2689
|
.wp-block-post-featured-image .components-placeholder {
|
|
@@ -2837,8 +2828,25 @@ div[data-type="core/post-featured-image"] img {
|
|
|
2837
2828
|
opacity: 1;
|
|
2838
2829
|
margin-top: 16px;
|
|
2839
2830
|
}
|
|
2831
|
+
.block-library-poster-image__container .components-drop-zone__content {
|
|
2832
|
+
border-radius: 2px;
|
|
2833
|
+
}
|
|
2834
|
+
.block-library-poster-image__container .components-drop-zone .components-drop-zone__content-inner {
|
|
2835
|
+
display: flex;
|
|
2836
|
+
align-items: center;
|
|
2837
|
+
gap: 8px;
|
|
2838
|
+
}
|
|
2839
|
+
.block-library-poster-image__container .components-drop-zone .components-drop-zone__content-inner .components-drop-zone__content-icon {
|
|
2840
|
+
margin: 0;
|
|
2841
|
+
}
|
|
2842
|
+
.block-library-poster-image__container .components-spinner {
|
|
2843
|
+
position: absolute;
|
|
2844
|
+
top: 50%;
|
|
2845
|
+
right: 50%;
|
|
2846
|
+
margin-top: -9px;
|
|
2847
|
+
margin-right: -9px;
|
|
2848
|
+
}
|
|
2840
2849
|
|
|
2841
|
-
.block-library-poster-image__toggle,
|
|
2842
2850
|
.block-library-poster-image__preview {
|
|
2843
2851
|
width: 100%;
|
|
2844
2852
|
padding: 0;
|
|
@@ -2847,9 +2855,6 @@ div[data-type="core/post-featured-image"] img {
|
|
|
2847
2855
|
min-height: 40px;
|
|
2848
2856
|
display: flex;
|
|
2849
2857
|
justify-content: center;
|
|
2850
|
-
}
|
|
2851
|
-
|
|
2852
|
-
.block-library-poster-image__preview {
|
|
2853
2858
|
height: auto !important;
|
|
2854
2859
|
outline: 1px solid rgba(0, 0, 0, 0.1);
|
|
2855
2860
|
}
|
|
@@ -2860,13 +2865,6 @@ div[data-type="core/post-featured-image"] img {
|
|
|
2860
2865
|
aspect-ratio: 2/1;
|
|
2861
2866
|
}
|
|
2862
2867
|
|
|
2863
|
-
.block-library-poster-image__toggle {
|
|
2864
|
-
box-shadow: inset 0 0 0 1px #ccc;
|
|
2865
|
-
}
|
|
2866
|
-
.block-library-poster-image__toggle:focus:not(:disabled) {
|
|
2867
|
-
box-shadow: 0 0 0 currentColor inset, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
2868
|
-
}
|
|
2869
|
-
|
|
2870
2868
|
.block-library-poster-image__actions:not(.block-library-poster-image__actions-select) {
|
|
2871
2869
|
bottom: 0;
|
|
2872
2870
|
opacity: 0;
|
|
@@ -2879,8 +2877,7 @@ div[data-type="core/post-featured-image"] img {
|
|
|
2879
2877
|
}
|
|
2880
2878
|
}
|
|
2881
2879
|
.block-library-poster-image__actions:not(.block-library-poster-image__actions-select) .block-library-poster-image__action {
|
|
2882
|
-
|
|
2883
|
-
backdrop-filter: blur(16px) saturate(180%);
|
|
2880
|
+
backdrop-filter: blur(16px) saturate(180%);
|
|
2884
2881
|
background: rgba(255, 255, 255, 0.75);
|
|
2885
2882
|
}
|
|
2886
2883
|
.block-library-poster-image__actions .block-library-poster-image__action {
|
package/build-style/editor.css
CHANGED
|
@@ -1381,26 +1381,18 @@ figure.wp-block-image:not(.wp-block) {
|
|
|
1381
1381
|
text-align: center;
|
|
1382
1382
|
white-space: nowrap;
|
|
1383
1383
|
}
|
|
1384
|
-
.wp-block-more
|
|
1384
|
+
.wp-block-more .rich-text {
|
|
1385
1385
|
position: relative;
|
|
1386
1386
|
font-size: 13px;
|
|
1387
1387
|
text-transform: uppercase;
|
|
1388
1388
|
font-weight: 600;
|
|
1389
1389
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
1390
1390
|
color: #757575;
|
|
1391
|
-
|
|
1392
|
-
box-shadow: none;
|
|
1391
|
+
display: inline-flex;
|
|
1393
1392
|
white-space: nowrap;
|
|
1394
1393
|
text-align: center;
|
|
1395
|
-
margin: 0;
|
|
1396
|
-
border-radius: 4px;
|
|
1397
1394
|
background: #fff;
|
|
1398
|
-
padding:
|
|
1399
|
-
height: 24px;
|
|
1400
|
-
max-width: 100%;
|
|
1401
|
-
}
|
|
1402
|
-
.wp-block-more input[type=text]:focus {
|
|
1403
|
-
box-shadow: none;
|
|
1395
|
+
padding: 10px 36px;
|
|
1404
1396
|
}
|
|
1405
1397
|
.wp-block-more::before {
|
|
1406
1398
|
content: "";
|
|
@@ -2699,8 +2691,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2699
2691
|
|
|
2700
2692
|
.wp-block-post-featured-image .block-editor-media-placeholder {
|
|
2701
2693
|
z-index: 1;
|
|
2702
|
-
|
|
2703
|
-
backdrop-filter: none;
|
|
2694
|
+
backdrop-filter: none;
|
|
2704
2695
|
}
|
|
2705
2696
|
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder,
|
|
2706
2697
|
.wp-block-post-featured-image .components-placeholder {
|
|
@@ -2845,8 +2836,25 @@ div[data-type="core/post-featured-image"] img {
|
|
|
2845
2836
|
opacity: 1;
|
|
2846
2837
|
margin-top: 16px;
|
|
2847
2838
|
}
|
|
2839
|
+
.block-library-poster-image__container .components-drop-zone__content {
|
|
2840
|
+
border-radius: 2px;
|
|
2841
|
+
}
|
|
2842
|
+
.block-library-poster-image__container .components-drop-zone .components-drop-zone__content-inner {
|
|
2843
|
+
display: flex;
|
|
2844
|
+
align-items: center;
|
|
2845
|
+
gap: 8px;
|
|
2846
|
+
}
|
|
2847
|
+
.block-library-poster-image__container .components-drop-zone .components-drop-zone__content-inner .components-drop-zone__content-icon {
|
|
2848
|
+
margin: 0;
|
|
2849
|
+
}
|
|
2850
|
+
.block-library-poster-image__container .components-spinner {
|
|
2851
|
+
position: absolute;
|
|
2852
|
+
top: 50%;
|
|
2853
|
+
left: 50%;
|
|
2854
|
+
margin-top: -9px;
|
|
2855
|
+
margin-left: -9px;
|
|
2856
|
+
}
|
|
2848
2857
|
|
|
2849
|
-
.block-library-poster-image__toggle,
|
|
2850
2858
|
.block-library-poster-image__preview {
|
|
2851
2859
|
width: 100%;
|
|
2852
2860
|
padding: 0;
|
|
@@ -2855,9 +2863,6 @@ div[data-type="core/post-featured-image"] img {
|
|
|
2855
2863
|
min-height: 40px;
|
|
2856
2864
|
display: flex;
|
|
2857
2865
|
justify-content: center;
|
|
2858
|
-
}
|
|
2859
|
-
|
|
2860
|
-
.block-library-poster-image__preview {
|
|
2861
2866
|
height: auto !important;
|
|
2862
2867
|
outline: 1px solid rgba(0, 0, 0, 0.1);
|
|
2863
2868
|
}
|
|
@@ -2868,13 +2873,6 @@ div[data-type="core/post-featured-image"] img {
|
|
|
2868
2873
|
aspect-ratio: 2/1;
|
|
2869
2874
|
}
|
|
2870
2875
|
|
|
2871
|
-
.block-library-poster-image__toggle {
|
|
2872
|
-
box-shadow: inset 0 0 0 1px #ccc;
|
|
2873
|
-
}
|
|
2874
|
-
.block-library-poster-image__toggle:focus:not(:disabled) {
|
|
2875
|
-
box-shadow: 0 0 0 currentColor inset, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
2876
|
-
}
|
|
2877
|
-
|
|
2878
2876
|
.block-library-poster-image__actions:not(.block-library-poster-image__actions-select) {
|
|
2879
2877
|
bottom: 0;
|
|
2880
2878
|
opacity: 0;
|
|
@@ -2887,8 +2885,7 @@ div[data-type="core/post-featured-image"] img {
|
|
|
2887
2885
|
}
|
|
2888
2886
|
}
|
|
2889
2887
|
.block-library-poster-image__actions:not(.block-library-poster-image__actions-select) .block-library-poster-image__action {
|
|
2890
|
-
|
|
2891
|
-
backdrop-filter: blur(16px) saturate(180%);
|
|
2888
|
+
backdrop-filter: blur(16px) saturate(180%);
|
|
2892
2889
|
background: rgba(255, 255, 255, 0.75);
|
|
2893
2890
|
}
|
|
2894
2891
|
.block-library-poster-image__actions .block-library-poster-image__action {
|
|
@@ -366,8 +366,7 @@ figure.wp-block-gallery.has-nested-images {
|
|
|
366
366
|
height: 100%;
|
|
367
367
|
max-height: 40%;
|
|
368
368
|
pointer-events: none;
|
|
369
|
-
|
|
370
|
-
backdrop-filter: blur(3px);
|
|
369
|
+
backdrop-filter: blur(3px);
|
|
371
370
|
-webkit-mask-image: linear-gradient(0deg, #000 20%, transparent 100%);
|
|
372
371
|
mask-image: linear-gradient(0deg, #000 20%, transparent 100%);
|
|
373
372
|
}
|
|
@@ -366,8 +366,7 @@ figure.wp-block-gallery.has-nested-images {
|
|
|
366
366
|
height: 100%;
|
|
367
367
|
max-height: 40%;
|
|
368
368
|
pointer-events: none;
|
|
369
|
-
|
|
370
|
-
backdrop-filter: blur(3px);
|
|
369
|
+
backdrop-filter: blur(3px);
|
|
371
370
|
-webkit-mask-image: linear-gradient(0deg, #000 20%, transparent 100%);
|
|
372
371
|
mask-image: linear-gradient(0deg, #000 20%, transparent 100%);
|
|
373
372
|
}
|
|
@@ -246,8 +246,7 @@
|
|
|
246
246
|
opacity: 0;
|
|
247
247
|
border: none;
|
|
248
248
|
background-color: rgba(90, 90, 90, 0.25);
|
|
249
|
-
|
|
250
|
-
backdrop-filter: blur(16px) saturate(180%);
|
|
249
|
+
backdrop-filter: blur(16px) saturate(180%);
|
|
251
250
|
cursor: zoom-in;
|
|
252
251
|
display: flex;
|
|
253
252
|
justify-content: center;
|
|
@@ -252,8 +252,7 @@
|
|
|
252
252
|
opacity: 0;
|
|
253
253
|
border: none;
|
|
254
254
|
background-color: rgba(90, 90, 90, 0.25);
|
|
255
|
-
|
|
256
|
-
backdrop-filter: blur(16px) saturate(180%);
|
|
255
|
+
backdrop-filter: blur(16px) saturate(180%);
|
|
257
256
|
cursor: zoom-in;
|
|
258
257
|
display: flex;
|
|
259
258
|
justify-content: center;
|
|
@@ -146,26 +146,18 @@
|
|
|
146
146
|
text-align: center;
|
|
147
147
|
white-space: nowrap;
|
|
148
148
|
}
|
|
149
|
-
.wp-block-more
|
|
149
|
+
.wp-block-more .rich-text {
|
|
150
150
|
position: relative;
|
|
151
151
|
font-size: 13px;
|
|
152
152
|
text-transform: uppercase;
|
|
153
153
|
font-weight: 600;
|
|
154
154
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
155
155
|
color: #757575;
|
|
156
|
-
|
|
157
|
-
box-shadow: none;
|
|
156
|
+
display: inline-flex;
|
|
158
157
|
white-space: nowrap;
|
|
159
158
|
text-align: center;
|
|
160
|
-
margin: 0;
|
|
161
|
-
border-radius: 4px;
|
|
162
159
|
background: #fff;
|
|
163
|
-
padding:
|
|
164
|
-
height: 24px;
|
|
165
|
-
max-width: 100%;
|
|
166
|
-
}
|
|
167
|
-
.wp-block-more input[type=text]:focus {
|
|
168
|
-
box-shadow: none;
|
|
160
|
+
padding: 10px 36px;
|
|
169
161
|
}
|
|
170
162
|
.wp-block-more::before {
|
|
171
163
|
content: "";
|
|
@@ -146,26 +146,18 @@
|
|
|
146
146
|
text-align: center;
|
|
147
147
|
white-space: nowrap;
|
|
148
148
|
}
|
|
149
|
-
.wp-block-more
|
|
149
|
+
.wp-block-more .rich-text {
|
|
150
150
|
position: relative;
|
|
151
151
|
font-size: 13px;
|
|
152
152
|
text-transform: uppercase;
|
|
153
153
|
font-weight: 600;
|
|
154
154
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
155
155
|
color: #757575;
|
|
156
|
-
|
|
157
|
-
box-shadow: none;
|
|
156
|
+
display: inline-flex;
|
|
158
157
|
white-space: nowrap;
|
|
159
158
|
text-align: center;
|
|
160
|
-
margin: 0;
|
|
161
|
-
border-radius: 4px;
|
|
162
159
|
background: #fff;
|
|
163
|
-
padding:
|
|
164
|
-
height: 24px;
|
|
165
|
-
max-width: 100%;
|
|
166
|
-
}
|
|
167
|
-
.wp-block-more input[type=text]:focus {
|
|
168
|
-
box-shadow: none;
|
|
160
|
+
padding: 10px 36px;
|
|
169
161
|
}
|
|
170
162
|
.wp-block-more::before {
|
|
171
163
|
content: "";
|
|
@@ -136,8 +136,7 @@
|
|
|
136
136
|
*/
|
|
137
137
|
.wp-block-post-featured-image .block-editor-media-placeholder {
|
|
138
138
|
z-index: 1;
|
|
139
|
-
|
|
140
|
-
backdrop-filter: none;
|
|
139
|
+
backdrop-filter: none;
|
|
141
140
|
}
|
|
142
141
|
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder,
|
|
143
142
|
.wp-block-post-featured-image .components-placeholder {
|
|
@@ -136,8 +136,7 @@
|
|
|
136
136
|
*/
|
|
137
137
|
.wp-block-post-featured-image .block-editor-media-placeholder {
|
|
138
138
|
z-index: 1;
|
|
139
|
-
|
|
140
|
-
backdrop-filter: none;
|
|
139
|
+
backdrop-filter: none;
|
|
141
140
|
}
|
|
142
141
|
.wp-block-post-featured-image .wp-block-post-featured-image__placeholder,
|
|
143
142
|
.wp-block-post-featured-image .components-placeholder {
|
|
@@ -1465,8 +1465,7 @@ figure.wp-block-gallery.has-nested-images {
|
|
|
1465
1465
|
height: 100%;
|
|
1466
1466
|
max-height: 40%;
|
|
1467
1467
|
pointer-events: none;
|
|
1468
|
-
|
|
1469
|
-
backdrop-filter: blur(3px);
|
|
1468
|
+
backdrop-filter: blur(3px);
|
|
1470
1469
|
-webkit-mask-image: linear-gradient(0deg, #000 20%, transparent 100%);
|
|
1471
1470
|
mask-image: linear-gradient(0deg, #000 20%, transparent 100%);
|
|
1472
1471
|
}
|
|
@@ -1741,8 +1740,7 @@ h6.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]) {
|
|
|
1741
1740
|
opacity: 0;
|
|
1742
1741
|
border: none;
|
|
1743
1742
|
background-color: rgba(90, 90, 90, 0.25);
|
|
1744
|
-
|
|
1745
|
-
backdrop-filter: blur(16px) saturate(180%);
|
|
1743
|
+
backdrop-filter: blur(16px) saturate(180%);
|
|
1746
1744
|
cursor: zoom-in;
|
|
1747
1745
|
display: flex;
|
|
1748
1746
|
justify-content: center;
|
package/build-style/style.css
CHANGED
|
@@ -1473,8 +1473,7 @@ figure.wp-block-gallery.has-nested-images {
|
|
|
1473
1473
|
height: 100%;
|
|
1474
1474
|
max-height: 40%;
|
|
1475
1475
|
pointer-events: none;
|
|
1476
|
-
|
|
1477
|
-
backdrop-filter: blur(3px);
|
|
1476
|
+
backdrop-filter: blur(3px);
|
|
1478
1477
|
-webkit-mask-image: linear-gradient(0deg, #000 20%, transparent 100%);
|
|
1479
1478
|
mask-image: linear-gradient(0deg, #000 20%, transparent 100%);
|
|
1480
1479
|
}
|
|
@@ -1755,8 +1754,7 @@ h6.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]) {
|
|
|
1755
1754
|
opacity: 0;
|
|
1756
1755
|
border: none;
|
|
1757
1756
|
background-color: rgba(90, 90, 90, 0.25);
|
|
1758
|
-
|
|
1759
|
-
backdrop-filter: blur(16px) saturate(180%);
|
|
1757
|
+
backdrop-filter: blur(16px) saturate(180%);
|
|
1760
1758
|
cursor: zoom-in;
|
|
1761
1759
|
display: flex;
|
|
1762
1760
|
justify-content: center;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.28.0",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -41,39 +41,39 @@
|
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@babel/runtime": "7.25.7",
|
|
44
|
-
"@wordpress/a11y": "^4.
|
|
45
|
-
"@wordpress/api-fetch": "^7.
|
|
46
|
-
"@wordpress/autop": "^4.
|
|
47
|
-
"@wordpress/blob": "^4.
|
|
48
|
-
"@wordpress/block-editor": "^15.
|
|
49
|
-
"@wordpress/blocks": "^15.
|
|
50
|
-
"@wordpress/components": "^30.1.
|
|
51
|
-
"@wordpress/compose": "^7.
|
|
52
|
-
"@wordpress/core-data": "^7.
|
|
53
|
-
"@wordpress/data": "^10.
|
|
54
|
-
"@wordpress/date": "^5.
|
|
55
|
-
"@wordpress/deprecated": "^4.
|
|
56
|
-
"@wordpress/dom": "^4.
|
|
57
|
-
"@wordpress/element": "^6.
|
|
58
|
-
"@wordpress/escape-html": "^3.
|
|
59
|
-
"@wordpress/hooks": "^4.
|
|
60
|
-
"@wordpress/html-entities": "^4.
|
|
61
|
-
"@wordpress/i18n": "^6.
|
|
62
|
-
"@wordpress/icons": "^10.
|
|
63
|
-
"@wordpress/interactivity": "^6.28.
|
|
64
|
-
"@wordpress/interactivity-router": "^2.
|
|
65
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
66
|
-
"@wordpress/keycodes": "^4.
|
|
67
|
-
"@wordpress/notices": "^5.
|
|
68
|
-
"@wordpress/patterns": "^2.
|
|
69
|
-
"@wordpress/primitives": "^4.
|
|
70
|
-
"@wordpress/private-apis": "^1.
|
|
71
|
-
"@wordpress/reusable-blocks": "^5.
|
|
72
|
-
"@wordpress/rich-text": "^7.
|
|
73
|
-
"@wordpress/server-side-render": "^6.4.
|
|
74
|
-
"@wordpress/url": "^4.
|
|
75
|
-
"@wordpress/viewport": "^6.
|
|
76
|
-
"@wordpress/wordcount": "^4.
|
|
44
|
+
"@wordpress/a11y": "^4.28.0",
|
|
45
|
+
"@wordpress/api-fetch": "^7.28.0",
|
|
46
|
+
"@wordpress/autop": "^4.28.0",
|
|
47
|
+
"@wordpress/blob": "^4.28.0",
|
|
48
|
+
"@wordpress/block-editor": "^15.1.0",
|
|
49
|
+
"@wordpress/blocks": "^15.1.0",
|
|
50
|
+
"@wordpress/components": "^30.1.0",
|
|
51
|
+
"@wordpress/compose": "^7.28.0",
|
|
52
|
+
"@wordpress/core-data": "^7.28.0",
|
|
53
|
+
"@wordpress/data": "^10.28.0",
|
|
54
|
+
"@wordpress/date": "^5.28.0",
|
|
55
|
+
"@wordpress/deprecated": "^4.28.0",
|
|
56
|
+
"@wordpress/dom": "^4.28.0",
|
|
57
|
+
"@wordpress/element": "^6.28.0",
|
|
58
|
+
"@wordpress/escape-html": "^3.28.0",
|
|
59
|
+
"@wordpress/hooks": "^4.28.0",
|
|
60
|
+
"@wordpress/html-entities": "^4.28.0",
|
|
61
|
+
"@wordpress/i18n": "^6.1.0",
|
|
62
|
+
"@wordpress/icons": "^10.28.0",
|
|
63
|
+
"@wordpress/interactivity": "^6.28.0",
|
|
64
|
+
"@wordpress/interactivity-router": "^2.28.0",
|
|
65
|
+
"@wordpress/keyboard-shortcuts": "^5.28.0",
|
|
66
|
+
"@wordpress/keycodes": "^4.28.0",
|
|
67
|
+
"@wordpress/notices": "^5.28.0",
|
|
68
|
+
"@wordpress/patterns": "^2.28.0",
|
|
69
|
+
"@wordpress/primitives": "^4.28.0",
|
|
70
|
+
"@wordpress/private-apis": "^1.28.0",
|
|
71
|
+
"@wordpress/reusable-blocks": "^5.28.0",
|
|
72
|
+
"@wordpress/rich-text": "^7.28.0",
|
|
73
|
+
"@wordpress/server-side-render": "^6.4.0",
|
|
74
|
+
"@wordpress/url": "^4.28.0",
|
|
75
|
+
"@wordpress/viewport": "^6.28.0",
|
|
76
|
+
"@wordpress/wordcount": "^4.28.0",
|
|
77
77
|
"change-case": "^4.1.2",
|
|
78
78
|
"clsx": "^2.1.1",
|
|
79
79
|
"colord": "^2.7.0",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"publishConfig": {
|
|
92
92
|
"access": "public"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "28cc2098f5ee28f89096b638533796538f495f72"
|
|
95
95
|
}
|