@wordpress/block-library 8.27.0 → 8.27.1
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/cover/edit/index.js +2 -1
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +13 -1
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/cover/index.js +3 -0
- package/build/cover/index.js.map +1 -1
- package/build/group/index.js +1 -0
- package/build/group/index.js.map +1 -1
- package/build-module/cover/edit/index.js +2 -1
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +14 -2
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/cover/index.js +3 -0
- package/build-module/cover/index.js.map +1 -1
- package/build-module/group/index.js +1 -0
- package/build-module/group/index.js.map +1 -1
- package/build-style/cover/style-rtl.css +1 -2
- package/build-style/cover/style.css +1 -2
- package/build-style/style-rtl.css +1 -2
- package/build-style/style.css +1 -2
- package/package.json +8 -8
- package/src/cover/block.json +3 -0
- package/src/cover/edit/index.js +2 -1
- package/src/cover/edit/inspector-controls.js +14 -1
- package/src/cover/style.scss +2 -3
- package/src/file/index.php +3 -3
- package/src/group/block.json +1 -0
- package/src/image/index.php +1 -1
- package/src/navigation/index.php +3 -3
- package/src/query/index.php +1 -1
- package/src/search/index.php +3 -3
|
@@ -331,7 +331,8 @@ function CoverEdit({
|
|
|
331
331
|
minHeight: newMinHeight
|
|
332
332
|
});
|
|
333
333
|
},
|
|
334
|
-
|
|
334
|
+
// Hide the resize handle if an aspect ratio is set, as the aspect ratio takes precedence.
|
|
335
|
+
showHandle: !attributes.style?.dimensions?.aspectRatio ? true : false,
|
|
335
336
|
size: resizableBoxDimensions,
|
|
336
337
|
width
|
|
337
338
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","_coreData","_element","_components","_compose","_blockEditor","_i18n","_data","_blob","_notices","_shared","_inspectorControls","_blockControls","_coverPlaceholder","_resizableCoverPopover","_colorUtils","getInnerBlocksTemplate","attributes","align","placeholder","__","isTemporaryMedia","id","url","isBlobURL","CoverEdit","clientId","isSelected","overlayColor","setAttributes","setOverlayColor","toggleSelection","context","postId","postType","contentPosition","originalUrl","backgroundType","originalBackgroundType","useFeaturedImage","dimRatio","focalPoint","hasParallax","isDark","isRepeated","minHeight","minHeightUnit","alt","allowedBlocks","templateLock","tagName","TagName","isUserOverlayColor","featuredImage","useEntityProp","__unstableMarkNextChangeAsNotPersistent","useDispatch","blockEditorStore","media","useSelect","select","coreStore","getMedia","mediaUrl","source_url","useEffect","averageBackgroundColor","getMediaColor","newOverlayColor","color","newIsDark","compositeIsDark","replaceAll","IMAGE_BACKGROUND_TYPE","createErrorNotice","noticesStore","gradientClass","gradientValue","__experimentalUseGradient","onSelectMedia","newMedia","mediaAttributes","attributesFromMedia","isImage","type","media_type","includes","undefined","newDimRatio","onClearMedia","DEFAULT_OVERLAY_COLOR","DEFAULT_BACKGROUND_COLOR","onSetOverlayColor","onUpdateDimRatio","onUploadError","message","isUploadingMedia","isImageBackground","isVideoBackground","VIDEO_BACKGROUND_TYPE","resizeListener","height","width","useResizeObserver","resizableBoxDimensions","useMemo","minHeightWithUnit","isImgElement","style","backgroundImage","backgroundPosition","mediaPosition","bgStyle","backgroundColor","mediaStyle","objectPosition","hasBackground","hasInnerBlocks","getBlock","innerBlocks","length","ref","useRef","blockProps","useBlockProps","fontSizes","useSettings","hasFontSizes","innerBlocksTemplate","fontSize","innerBlocksProps","useInnerBlocksProps","className","template","templateInsertUpdatesSelection","dropZoneElement","current","mediaElement","currentSettings","toggleUseFeaturedImage","newUseFeaturedImage","blockControls","_react","createElement","default","inspectorControls","coverRef","updateDimRatio","resizableCoverProps","onResizeStart","onResize","value","onResizeStop","newMinHeight","showHandle","size","Fragment","classnames","onError","ColorPalette","disableCustomColors","onChange","clearable","classes","isContentPositionCenter","getPositionClassName","dimRatioToClass","class","Placeholder","withIllustration","src","role","autoPlay","muted","loop","Spinner","disableMediaButtons","_default","compose","withColors","exports"],"sources":["@wordpress/block-library/src/cover/edit/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useEntityProp, store as coreStore } from '@wordpress/core-data';\nimport { useEffect, useMemo, useRef } from '@wordpress/element';\nimport { Placeholder, Spinner } from '@wordpress/components';\nimport { compose, useResizeObserver } from '@wordpress/compose';\nimport {\n\twithColors,\n\tColorPalette,\n\tuseBlockProps,\n\tuseSettings,\n\tuseInnerBlocksProps,\n\t__experimentalUseGradient,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { isBlobURL } from '@wordpress/blob';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport {\n\tattributesFromMedia,\n\tIMAGE_BACKGROUND_TYPE,\n\tVIDEO_BACKGROUND_TYPE,\n\tdimRatioToClass,\n\tisContentPositionCenter,\n\tgetPositionClassName,\n\tmediaPosition,\n} from '../shared';\nimport CoverInspectorControls from './inspector-controls';\nimport CoverBlockControls from './block-controls';\nimport CoverPlaceholder from './cover-placeholder';\nimport ResizableCoverPopover from './resizable-cover-popover';\nimport {\n\tgetMediaColor,\n\tcompositeIsDark,\n\tDEFAULT_BACKGROUND_COLOR,\n\tDEFAULT_OVERLAY_COLOR,\n} from './color-utils';\n\nfunction getInnerBlocksTemplate( attributes ) {\n\treturn [\n\t\t[\n\t\t\t'core/paragraph',\n\t\t\t{\n\t\t\t\talign: 'center',\n\t\t\t\tplaceholder: __( 'Write title…' ),\n\t\t\t\t...attributes,\n\t\t\t},\n\t\t],\n\t];\n}\n\n/**\n * Is the URL a temporary blob URL? A blob URL is one that is used temporarily while\n * the media (image or video) is being uploaded and will not have an id allocated yet.\n *\n * @param {number} id The id of the media.\n * @param {string} url The url of the media.\n *\n * @return {boolean} Is the URL a Blob URL.\n */\nconst isTemporaryMedia = ( id, url ) => ! id && isBlobURL( url );\n\nfunction CoverEdit( {\n\tattributes,\n\tclientId,\n\tisSelected,\n\toverlayColor,\n\tsetAttributes,\n\tsetOverlayColor,\n\ttoggleSelection,\n\tcontext: { postId, postType },\n} ) {\n\tconst {\n\t\tcontentPosition,\n\t\tid,\n\t\turl: originalUrl,\n\t\tbackgroundType: originalBackgroundType,\n\t\tuseFeaturedImage,\n\t\tdimRatio,\n\t\tfocalPoint,\n\t\thasParallax,\n\t\tisDark,\n\t\tisRepeated,\n\t\tminHeight,\n\t\tminHeightUnit,\n\t\talt,\n\t\tallowedBlocks,\n\t\ttemplateLock,\n\t\ttagName: TagName = 'div',\n\t\tisUserOverlayColor,\n\t} = attributes;\n\n\tconst [ featuredImage ] = useEntityProp(\n\t\t'postType',\n\t\tpostType,\n\t\t'featured_media',\n\t\tpostId\n\t);\n\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\tconst media = useSelect(\n\t\t( select ) =>\n\t\t\tfeaturedImage &&\n\t\t\tselect( coreStore ).getMedia( featuredImage, { context: 'view' } ),\n\t\t[ featuredImage ]\n\t);\n\tconst mediaUrl = media?.source_url;\n\n\t// User can change the featured image outside of the block, but we still\n\t// need to update the block when that happens. This effect should only\n\t// run when the featured image changes in that case. All other cases are\n\t// handled in their respective callbacks.\n\tuseEffect( () => {\n\t\t( async () => {\n\t\t\tif ( ! useFeaturedImage ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst averageBackgroundColor = await getMediaColor( mediaUrl );\n\n\t\t\tlet newOverlayColor = overlayColor.color;\n\t\t\tif ( ! isUserOverlayColor ) {\n\t\t\t\tnewOverlayColor = averageBackgroundColor;\n\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\tsetOverlayColor( newOverlayColor );\n\t\t\t}\n\n\t\t\tconst newIsDark = compositeIsDark(\n\t\t\t\tdimRatio,\n\t\t\t\tnewOverlayColor,\n\t\t\t\taverageBackgroundColor\n\t\t\t);\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( { isDark: newIsDark } );\n\t\t} )();\n\t\t// Disable reason: Update the block only when the featured image changes.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ mediaUrl ] );\n\n\t// instead of destructuring the attributes\n\t// we define the url and background type\n\t// depending on the value of the useFeaturedImage flag\n\t// to preview in edit the dynamic featured image\n\tconst url = useFeaturedImage\n\t\t? mediaUrl\n\t\t: // Ensure the url is not malformed due to sanitization through `wp_kses`.\n\t\t originalUrl?.replaceAll( '&', '&' );\n\tconst backgroundType = useFeaturedImage\n\t\t? IMAGE_BACKGROUND_TYPE\n\t\t: originalBackgroundType;\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst { gradientClass, gradientValue } = __experimentalUseGradient();\n\n\tconst onSelectMedia = async ( newMedia ) => {\n\t\tconst mediaAttributes = attributesFromMedia( newMedia );\n\t\tconst isImage = [ newMedia?.type, newMedia?.media_type ].includes(\n\t\t\tIMAGE_BACKGROUND_TYPE\n\t\t);\n\n\t\tconst averageBackgroundColor = await getMediaColor(\n\t\t\tisImage ? newMedia?.url : undefined\n\t\t);\n\n\t\tlet newOverlayColor = overlayColor.color;\n\t\tif ( ! isUserOverlayColor ) {\n\t\t\tnewOverlayColor = averageBackgroundColor;\n\t\t\tsetOverlayColor( newOverlayColor );\n\n\t\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t}\n\n\t\t// Only set a new dimRatio if there was no previous media selected\n\t\t// to avoid resetting to 50 if it has been explicitly set to 100.\n\t\t// See issue #52835 for context.\n\t\tconst newDimRatio =\n\t\t\toriginalUrl === undefined && dimRatio === 100 ? 50 : dimRatio;\n\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tnewDimRatio,\n\t\t\tnewOverlayColor,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\t...mediaAttributes,\n\t\t\tfocalPoint: undefined,\n\t\t\tuseFeaturedImage: undefined,\n\t\t\tdimRatio: newDimRatio,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onClearMedia = () => {\n\t\tlet newOverlayColor = overlayColor.color;\n\t\tif ( ! isUserOverlayColor ) {\n\t\t\tnewOverlayColor = DEFAULT_OVERLAY_COLOR;\n\t\t\tsetOverlayColor( undefined );\n\n\t\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t}\n\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tdimRatio,\n\t\t\tnewOverlayColor,\n\t\t\tDEFAULT_BACKGROUND_COLOR\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\turl: undefined,\n\t\t\tid: undefined,\n\t\t\tbackgroundType: undefined,\n\t\t\tfocalPoint: undefined,\n\t\t\thasParallax: undefined,\n\t\t\tisRepeated: undefined,\n\t\t\tuseFeaturedImage: undefined,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onSetOverlayColor = async ( newOverlayColor ) => {\n\t\tconst averageBackgroundColor = await getMediaColor( url );\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tdimRatio,\n\t\t\tnewOverlayColor,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetOverlayColor( newOverlayColor );\n\n\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\n\t\tsetAttributes( {\n\t\t\tisUserOverlayColor: true,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onUpdateDimRatio = async ( newDimRatio ) => {\n\t\tconst averageBackgroundColor = await getMediaColor( url );\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tnewDimRatio,\n\t\t\toverlayColor.color,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\tdimRatio: newDimRatio,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onUploadError = ( message ) => {\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t};\n\n\tconst isUploadingMedia = isTemporaryMedia( id, url );\n\n\tconst isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;\n\tconst isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;\n\n\tconst [ resizeListener, { height, width } ] = useResizeObserver();\n\tconst resizableBoxDimensions = useMemo( () => {\n\t\treturn {\n\t\t\theight: minHeightUnit === 'px' ? minHeight : 'auto',\n\t\t\twidth: 'auto',\n\t\t};\n\t}, [ minHeight, minHeightUnit ] );\n\n\tconst minHeightWithUnit =\n\t\tminHeight && minHeightUnit\n\t\t\t? `${ minHeight }${ minHeightUnit }`\n\t\t\t: minHeight;\n\n\tconst isImgElement = ! ( hasParallax || isRepeated );\n\n\tconst style = {\n\t\tminHeight: minHeightWithUnit || undefined,\n\t};\n\n\tconst backgroundImage = url ? `url(${ url })` : undefined;\n\n\tconst backgroundPosition = mediaPosition( focalPoint );\n\n\tconst bgStyle = { backgroundColor: overlayColor.color };\n\tconst mediaStyle = {\n\t\tobjectPosition:\n\t\t\tfocalPoint && isImgElement\n\t\t\t\t? mediaPosition( focalPoint )\n\t\t\t\t: undefined,\n\t};\n\n\tconst hasBackground = !! ( url || overlayColor.color || gradientValue );\n\n\tconst hasInnerBlocks = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getBlock( clientId ).innerBlocks.length >\n\t\t\t0,\n\t\t[ clientId ]\n\t);\n\n\tconst ref = useRef();\n\tconst blockProps = useBlockProps( { ref } );\n\n\t// Check for fontSize support before we pass a fontSize attribute to the innerBlocks.\n\tconst [ fontSizes ] = useSettings( 'typography.fontSizes' );\n\tconst hasFontSizes = fontSizes?.length > 0;\n\tconst innerBlocksTemplate = getInnerBlocksTemplate( {\n\t\tfontSize: hasFontSizes ? 'large' : undefined,\n\t} );\n\n\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{\n\t\t\tclassName: 'wp-block-cover__inner-container',\n\t\t},\n\t\t{\n\t\t\t// Avoid template sync when the `templateLock` value is `all` or `contentOnly`.\n\t\t\t// See: https://github.com/WordPress/gutenberg/pull/45632\n\t\t\ttemplate: ! hasInnerBlocks ? innerBlocksTemplate : undefined,\n\t\t\ttemplateInsertUpdatesSelection: true,\n\t\t\tallowedBlocks,\n\t\t\ttemplateLock,\n\t\t\tdropZoneElement: ref.current,\n\t\t}\n\t);\n\n\tconst mediaElement = useRef();\n\tconst currentSettings = {\n\t\tisVideoBackground,\n\t\tisImageBackground,\n\t\tmediaElement,\n\t\thasInnerBlocks,\n\t\turl,\n\t\tisImgElement,\n\t\toverlayColor,\n\t};\n\n\tconst toggleUseFeaturedImage = async () => {\n\t\tconst newUseFeaturedImage = ! useFeaturedImage;\n\n\t\tconst averageBackgroundColor = newUseFeaturedImage\n\t\t\t? await getMediaColor( mediaUrl )\n\t\t\t: DEFAULT_BACKGROUND_COLOR;\n\n\t\tconst newOverlayColor = ! isUserOverlayColor\n\t\t\t? averageBackgroundColor\n\t\t\t: overlayColor.color;\n\n\t\tif ( ! isUserOverlayColor ) {\n\t\t\tif ( newUseFeaturedImage ) {\n\t\t\t\tsetOverlayColor( newOverlayColor );\n\t\t\t} else {\n\t\t\t\tsetOverlayColor( undefined );\n\t\t\t}\n\n\t\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t}\n\n\t\tconst newDimRatio = dimRatio === 100 ? 50 : dimRatio;\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tnewDimRatio,\n\t\t\tnewOverlayColor,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\tid: undefined,\n\t\t\turl: undefined,\n\t\t\tuseFeaturedImage: newUseFeaturedImage,\n\t\t\tdimRatio: newDimRatio,\n\t\t\tbackgroundType: useFeaturedImage\n\t\t\t\t? IMAGE_BACKGROUND_TYPE\n\t\t\t\t: undefined,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst blockControls = (\n\t\t<CoverBlockControls\n\t\t\tattributes={ attributes }\n\t\t\tsetAttributes={ setAttributes }\n\t\t\tonSelectMedia={ onSelectMedia }\n\t\t\tcurrentSettings={ currentSettings }\n\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t/>\n\t);\n\n\tconst inspectorControls = (\n\t\t<CoverInspectorControls\n\t\t\tattributes={ attributes }\n\t\t\tsetAttributes={ setAttributes }\n\t\t\tclientId={ clientId }\n\t\t\tsetOverlayColor={ onSetOverlayColor }\n\t\t\tcoverRef={ ref }\n\t\t\tcurrentSettings={ currentSettings }\n\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\tupdateDimRatio={ onUpdateDimRatio }\n\t\t\tonClearMedia={ onClearMedia }\n\t\t/>\n\t);\n\n\tconst resizableCoverProps = {\n\t\tclassName: 'block-library-cover__resize-container',\n\t\tclientId,\n\t\theight,\n\t\tminHeight: minHeightWithUnit,\n\t\tonResizeStart: () => {\n\t\t\tsetAttributes( { minHeightUnit: 'px' } );\n\t\t\ttoggleSelection( false );\n\t\t},\n\t\tonResize: ( value ) => {\n\t\t\tsetAttributes( { minHeight: value } );\n\t\t},\n\t\tonResizeStop: ( newMinHeight ) => {\n\t\t\ttoggleSelection( true );\n\t\t\tsetAttributes( { minHeight: newMinHeight } );\n\t\t},\n\t\tshowHandle: true,\n\t\tsize: resizableBoxDimensions,\n\t\twidth,\n\t};\n\n\tif ( ! useFeaturedImage && ! hasInnerBlocks && ! hasBackground ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ blockControls }\n\t\t\t\t{ inspectorControls }\n\t\t\t\t{ isSelected && (\n\t\t\t\t\t<ResizableCoverPopover { ...resizableCoverProps } />\n\t\t\t\t) }\n\t\t\t\t<TagName\n\t\t\t\t\t{ ...blockProps }\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'is-placeholder',\n\t\t\t\t\t\tblockProps.className\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...blockProps.style,\n\t\t\t\t\t\tminHeight: minHeightWithUnit || undefined,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ resizeListener }\n\t\t\t\t\t<CoverPlaceholder\n\t\t\t\t\t\tonSelectMedia={ onSelectMedia }\n\t\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"wp-block-cover__placeholder-background-options\">\n\t\t\t\t\t\t\t<ColorPalette\n\t\t\t\t\t\t\t\tdisableCustomColors={ true }\n\t\t\t\t\t\t\t\tvalue={ overlayColor.color }\n\t\t\t\t\t\t\t\tonChange={ onSetOverlayColor }\n\t\t\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CoverPlaceholder>\n\t\t\t\t</TagName>\n\t\t\t</>\n\t\t);\n\t}\n\n\tconst classes = classnames(\n\t\t{\n\t\t\t'is-dark-theme': isDark,\n\t\t\t'is-light': ! isDark,\n\t\t\t'is-transient': isUploadingMedia,\n\t\t\t'has-parallax': hasParallax,\n\t\t\t'is-repeated': isRepeated,\n\t\t\t'has-custom-content-position':\n\t\t\t\t! isContentPositionCenter( contentPosition ),\n\t\t},\n\t\tgetPositionClassName( contentPosition )\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<TagName\n\t\t\t\t{ ...blockProps }\n\t\t\t\tclassName={ classnames( classes, blockProps.className ) }\n\t\t\t\tstyle={ { ...style, ...blockProps.style } }\n\t\t\t\tdata-url={ url }\n\t\t\t>\n\t\t\t\t{ resizeListener }\n\t\t\t\t{ ( ! useFeaturedImage || url ) && (\n\t\t\t\t\t<span\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'wp-block-cover__background',\n\t\t\t\t\t\t\tdimRatioToClass( dimRatio ),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t[ overlayColor.class ]: overlayColor.class,\n\t\t\t\t\t\t\t\t'has-background-dim': dimRatio !== undefined,\n\t\t\t\t\t\t\t\t// For backwards compatibility. Former versions of the Cover Block applied\n\t\t\t\t\t\t\t\t// `.wp-block-cover__gradient-background` in the presence of\n\t\t\t\t\t\t\t\t// media, a gradient and a dim.\n\t\t\t\t\t\t\t\t'wp-block-cover__gradient-background':\n\t\t\t\t\t\t\t\t\turl && gradientValue && dimRatio !== 0,\n\t\t\t\t\t\t\t\t'has-background-gradient': gradientValue,\n\t\t\t\t\t\t\t\t[ gradientClass ]: gradientClass,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tstyle={ { backgroundImage: gradientValue, ...bgStyle } }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ ! url && useFeaturedImage && (\n\t\t\t\t\t<Placeholder\n\t\t\t\t\t\tclassName=\"wp-block-cover__image--placeholder-image\"\n\t\t\t\t\t\twithIllustration={ true }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ url &&\n\t\t\t\t\tisImageBackground &&\n\t\t\t\t\t( isImgElement ? (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tref={ mediaElement }\n\t\t\t\t\t\t\tclassName=\"wp-block-cover__image-background\"\n\t\t\t\t\t\t\talt={ alt }\n\t\t\t\t\t\t\tsrc={ url }\n\t\t\t\t\t\t\tstyle={ mediaStyle }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tref={ mediaElement }\n\t\t\t\t\t\t\trole={ alt ? 'img' : undefined }\n\t\t\t\t\t\t\taria-label={ alt ? alt : undefined }\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\tclasses,\n\t\t\t\t\t\t\t\t'wp-block-cover__image-background'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tstyle={ { backgroundImage, backgroundPosition } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t{ url && isVideoBackground && (\n\t\t\t\t\t<video\n\t\t\t\t\t\tref={ mediaElement }\n\t\t\t\t\t\tclassName=\"wp-block-cover__video-background\"\n\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\tmuted\n\t\t\t\t\t\tloop\n\t\t\t\t\t\tsrc={ url }\n\t\t\t\t\t\tstyle={ mediaStyle }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ isUploadingMedia && <Spinner /> }\n\t\t\t\t<CoverPlaceholder\n\t\t\t\t\tdisableMediaButtons\n\t\t\t\t\tonSelectMedia={ onSelectMedia }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\t\t/>\n\t\t\t\t<div { ...innerBlocksProps } />\n\t\t\t</TagName>\n\t\t\t{ isSelected && (\n\t\t\t\t<ResizableCoverPopover { ...resizableCoverProps } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default compose( [\n\twithColors( { overlayColor: 'background-color' } ),\n] )( CoverEdit );\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AASA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAR,OAAA;AACA,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MAAE,CAAC,EACjC,IAAAjC,MAAA,CAAAC,aAAA,EAAClI,iBAAA,CAAAmI,OAAgB;IAChBgC,mBAAmB;IACnBjG,aAAa,EAAGA,aAAe;IAC/B+E,OAAO,EAAGhE,aAAe;IACzB6C,sBAAsB,EAAGA;EAAwB,CACjD,CAAC,EACF,IAAAG,MAAA,CAAAC,aAAA;IAAA,GAAUb;EAAgB,CAAI,CACtB,CAAC,EACRvG,UAAU,IACX,IAAAmH,MAAA,CAAAC,aAAA,EAACjI,sBAAA,CAAAkI,OAAqB;IAAA,GAAMI;EAAmB,CAAI,CAEnD,CAAC;AAEL;AAAC,IAAA6B,QAAA,GAEc,IAAAC,gBAAO,EAAE,CACvB,IAAAC,uBAAU,EAAE;EAAEvJ,YAAY,EAAE;AAAmB,CAAE,CAAC,CACjD,CAAC,CAAEH,SAAU,CAAC;AAAA2J,OAAA,CAAApC,OAAA,GAAAiC,QAAA"}
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","_coreData","_element","_components","_compose","_blockEditor","_i18n","_data","_blob","_notices","_shared","_inspectorControls","_blockControls","_coverPlaceholder","_resizableCoverPopover","_colorUtils","getInnerBlocksTemplate","attributes","align","placeholder","__","isTemporaryMedia","id","url","isBlobURL","CoverEdit","clientId","isSelected","overlayColor","setAttributes","setOverlayColor","toggleSelection","context","postId","postType","contentPosition","originalUrl","backgroundType","originalBackgroundType","useFeaturedImage","dimRatio","focalPoint","hasParallax","isDark","isRepeated","minHeight","minHeightUnit","alt","allowedBlocks","templateLock","tagName","TagName","isUserOverlayColor","featuredImage","useEntityProp","__unstableMarkNextChangeAsNotPersistent","useDispatch","blockEditorStore","media","useSelect","select","coreStore","getMedia","mediaUrl","source_url","useEffect","averageBackgroundColor","getMediaColor","newOverlayColor","color","newIsDark","compositeIsDark","replaceAll","IMAGE_BACKGROUND_TYPE","createErrorNotice","noticesStore","gradientClass","gradientValue","__experimentalUseGradient","onSelectMedia","newMedia","mediaAttributes","attributesFromMedia","isImage","type","media_type","includes","undefined","newDimRatio","onClearMedia","DEFAULT_OVERLAY_COLOR","DEFAULT_BACKGROUND_COLOR","onSetOverlayColor","onUpdateDimRatio","onUploadError","message","isUploadingMedia","isImageBackground","isVideoBackground","VIDEO_BACKGROUND_TYPE","resizeListener","height","width","useResizeObserver","resizableBoxDimensions","useMemo","minHeightWithUnit","isImgElement","style","backgroundImage","backgroundPosition","mediaPosition","bgStyle","backgroundColor","mediaStyle","objectPosition","hasBackground","hasInnerBlocks","getBlock","innerBlocks","length","ref","useRef","blockProps","useBlockProps","fontSizes","useSettings","hasFontSizes","innerBlocksTemplate","fontSize","innerBlocksProps","useInnerBlocksProps","className","template","templateInsertUpdatesSelection","dropZoneElement","current","mediaElement","currentSettings","toggleUseFeaturedImage","newUseFeaturedImage","blockControls","_react","createElement","default","inspectorControls","coverRef","updateDimRatio","resizableCoverProps","onResizeStart","onResize","value","onResizeStop","newMinHeight","showHandle","dimensions","aspectRatio","size","Fragment","classnames","onError","ColorPalette","disableCustomColors","onChange","clearable","classes","isContentPositionCenter","getPositionClassName","dimRatioToClass","class","Placeholder","withIllustration","src","role","autoPlay","muted","loop","Spinner","disableMediaButtons","_default","compose","withColors","exports"],"sources":["@wordpress/block-library/src/cover/edit/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useEntityProp, store as coreStore } from '@wordpress/core-data';\nimport { useEffect, useMemo, useRef } from '@wordpress/element';\nimport { Placeholder, Spinner } from '@wordpress/components';\nimport { compose, useResizeObserver } from '@wordpress/compose';\nimport {\n\twithColors,\n\tColorPalette,\n\tuseBlockProps,\n\tuseSettings,\n\tuseInnerBlocksProps,\n\t__experimentalUseGradient,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { isBlobURL } from '@wordpress/blob';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport {\n\tattributesFromMedia,\n\tIMAGE_BACKGROUND_TYPE,\n\tVIDEO_BACKGROUND_TYPE,\n\tdimRatioToClass,\n\tisContentPositionCenter,\n\tgetPositionClassName,\n\tmediaPosition,\n} from '../shared';\nimport CoverInspectorControls from './inspector-controls';\nimport CoverBlockControls from './block-controls';\nimport CoverPlaceholder from './cover-placeholder';\nimport ResizableCoverPopover from './resizable-cover-popover';\nimport {\n\tgetMediaColor,\n\tcompositeIsDark,\n\tDEFAULT_BACKGROUND_COLOR,\n\tDEFAULT_OVERLAY_COLOR,\n} from './color-utils';\n\nfunction getInnerBlocksTemplate( attributes ) {\n\treturn [\n\t\t[\n\t\t\t'core/paragraph',\n\t\t\t{\n\t\t\t\talign: 'center',\n\t\t\t\tplaceholder: __( 'Write title…' ),\n\t\t\t\t...attributes,\n\t\t\t},\n\t\t],\n\t];\n}\n\n/**\n * Is the URL a temporary blob URL? A blob URL is one that is used temporarily while\n * the media (image or video) is being uploaded and will not have an id allocated yet.\n *\n * @param {number} id The id of the media.\n * @param {string} url The url of the media.\n *\n * @return {boolean} Is the URL a Blob URL.\n */\nconst isTemporaryMedia = ( id, url ) => ! id && isBlobURL( url );\n\nfunction CoverEdit( {\n\tattributes,\n\tclientId,\n\tisSelected,\n\toverlayColor,\n\tsetAttributes,\n\tsetOverlayColor,\n\ttoggleSelection,\n\tcontext: { postId, postType },\n} ) {\n\tconst {\n\t\tcontentPosition,\n\t\tid,\n\t\turl: originalUrl,\n\t\tbackgroundType: originalBackgroundType,\n\t\tuseFeaturedImage,\n\t\tdimRatio,\n\t\tfocalPoint,\n\t\thasParallax,\n\t\tisDark,\n\t\tisRepeated,\n\t\tminHeight,\n\t\tminHeightUnit,\n\t\talt,\n\t\tallowedBlocks,\n\t\ttemplateLock,\n\t\ttagName: TagName = 'div',\n\t\tisUserOverlayColor,\n\t} = attributes;\n\n\tconst [ featuredImage ] = useEntityProp(\n\t\t'postType',\n\t\tpostType,\n\t\t'featured_media',\n\t\tpostId\n\t);\n\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\tconst media = useSelect(\n\t\t( select ) =>\n\t\t\tfeaturedImage &&\n\t\t\tselect( coreStore ).getMedia( featuredImage, { context: 'view' } ),\n\t\t[ featuredImage ]\n\t);\n\tconst mediaUrl = media?.source_url;\n\n\t// User can change the featured image outside of the block, but we still\n\t// need to update the block when that happens. This effect should only\n\t// run when the featured image changes in that case. All other cases are\n\t// handled in their respective callbacks.\n\tuseEffect( () => {\n\t\t( async () => {\n\t\t\tif ( ! useFeaturedImage ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst averageBackgroundColor = await getMediaColor( mediaUrl );\n\n\t\t\tlet newOverlayColor = overlayColor.color;\n\t\t\tif ( ! isUserOverlayColor ) {\n\t\t\t\tnewOverlayColor = averageBackgroundColor;\n\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\tsetOverlayColor( newOverlayColor );\n\t\t\t}\n\n\t\t\tconst newIsDark = compositeIsDark(\n\t\t\t\tdimRatio,\n\t\t\t\tnewOverlayColor,\n\t\t\t\taverageBackgroundColor\n\t\t\t);\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( { isDark: newIsDark } );\n\t\t} )();\n\t\t// Disable reason: Update the block only when the featured image changes.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ mediaUrl ] );\n\n\t// instead of destructuring the attributes\n\t// we define the url and background type\n\t// depending on the value of the useFeaturedImage flag\n\t// to preview in edit the dynamic featured image\n\tconst url = useFeaturedImage\n\t\t? mediaUrl\n\t\t: // Ensure the url is not malformed due to sanitization through `wp_kses`.\n\t\t originalUrl?.replaceAll( '&', '&' );\n\tconst backgroundType = useFeaturedImage\n\t\t? IMAGE_BACKGROUND_TYPE\n\t\t: originalBackgroundType;\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst { gradientClass, gradientValue } = __experimentalUseGradient();\n\n\tconst onSelectMedia = async ( newMedia ) => {\n\t\tconst mediaAttributes = attributesFromMedia( newMedia );\n\t\tconst isImage = [ newMedia?.type, newMedia?.media_type ].includes(\n\t\t\tIMAGE_BACKGROUND_TYPE\n\t\t);\n\n\t\tconst averageBackgroundColor = await getMediaColor(\n\t\t\tisImage ? newMedia?.url : undefined\n\t\t);\n\n\t\tlet newOverlayColor = overlayColor.color;\n\t\tif ( ! isUserOverlayColor ) {\n\t\t\tnewOverlayColor = averageBackgroundColor;\n\t\t\tsetOverlayColor( newOverlayColor );\n\n\t\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t}\n\n\t\t// Only set a new dimRatio if there was no previous media selected\n\t\t// to avoid resetting to 50 if it has been explicitly set to 100.\n\t\t// See issue #52835 for context.\n\t\tconst newDimRatio =\n\t\t\toriginalUrl === undefined && dimRatio === 100 ? 50 : dimRatio;\n\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tnewDimRatio,\n\t\t\tnewOverlayColor,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\t...mediaAttributes,\n\t\t\tfocalPoint: undefined,\n\t\t\tuseFeaturedImage: undefined,\n\t\t\tdimRatio: newDimRatio,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onClearMedia = () => {\n\t\tlet newOverlayColor = overlayColor.color;\n\t\tif ( ! isUserOverlayColor ) {\n\t\t\tnewOverlayColor = DEFAULT_OVERLAY_COLOR;\n\t\t\tsetOverlayColor( undefined );\n\n\t\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t}\n\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tdimRatio,\n\t\t\tnewOverlayColor,\n\t\t\tDEFAULT_BACKGROUND_COLOR\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\turl: undefined,\n\t\t\tid: undefined,\n\t\t\tbackgroundType: undefined,\n\t\t\tfocalPoint: undefined,\n\t\t\thasParallax: undefined,\n\t\t\tisRepeated: undefined,\n\t\t\tuseFeaturedImage: undefined,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onSetOverlayColor = async ( newOverlayColor ) => {\n\t\tconst averageBackgroundColor = await getMediaColor( url );\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tdimRatio,\n\t\t\tnewOverlayColor,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetOverlayColor( newOverlayColor );\n\n\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\n\t\tsetAttributes( {\n\t\t\tisUserOverlayColor: true,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onUpdateDimRatio = async ( newDimRatio ) => {\n\t\tconst averageBackgroundColor = await getMediaColor( url );\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tnewDimRatio,\n\t\t\toverlayColor.color,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\tdimRatio: newDimRatio,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onUploadError = ( message ) => {\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t};\n\n\tconst isUploadingMedia = isTemporaryMedia( id, url );\n\n\tconst isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;\n\tconst isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;\n\n\tconst [ resizeListener, { height, width } ] = useResizeObserver();\n\tconst resizableBoxDimensions = useMemo( () => {\n\t\treturn {\n\t\t\theight: minHeightUnit === 'px' ? minHeight : 'auto',\n\t\t\twidth: 'auto',\n\t\t};\n\t}, [ minHeight, minHeightUnit ] );\n\n\tconst minHeightWithUnit =\n\t\tminHeight && minHeightUnit\n\t\t\t? `${ minHeight }${ minHeightUnit }`\n\t\t\t: minHeight;\n\n\tconst isImgElement = ! ( hasParallax || isRepeated );\n\n\tconst style = {\n\t\tminHeight: minHeightWithUnit || undefined,\n\t};\n\n\tconst backgroundImage = url ? `url(${ url })` : undefined;\n\n\tconst backgroundPosition = mediaPosition( focalPoint );\n\n\tconst bgStyle = { backgroundColor: overlayColor.color };\n\tconst mediaStyle = {\n\t\tobjectPosition:\n\t\t\tfocalPoint && isImgElement\n\t\t\t\t? mediaPosition( focalPoint )\n\t\t\t\t: undefined,\n\t};\n\n\tconst hasBackground = !! ( url || overlayColor.color || gradientValue );\n\n\tconst hasInnerBlocks = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getBlock( clientId ).innerBlocks.length >\n\t\t\t0,\n\t\t[ clientId ]\n\t);\n\n\tconst ref = useRef();\n\tconst blockProps = useBlockProps( { ref } );\n\n\t// Check for fontSize support before we pass a fontSize attribute to the innerBlocks.\n\tconst [ fontSizes ] = useSettings( 'typography.fontSizes' );\n\tconst hasFontSizes = fontSizes?.length > 0;\n\tconst innerBlocksTemplate = getInnerBlocksTemplate( {\n\t\tfontSize: hasFontSizes ? 'large' : undefined,\n\t} );\n\n\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{\n\t\t\tclassName: 'wp-block-cover__inner-container',\n\t\t},\n\t\t{\n\t\t\t// Avoid template sync when the `templateLock` value is `all` or `contentOnly`.\n\t\t\t// See: https://github.com/WordPress/gutenberg/pull/45632\n\t\t\ttemplate: ! hasInnerBlocks ? innerBlocksTemplate : undefined,\n\t\t\ttemplateInsertUpdatesSelection: true,\n\t\t\tallowedBlocks,\n\t\t\ttemplateLock,\n\t\t\tdropZoneElement: ref.current,\n\t\t}\n\t);\n\n\tconst mediaElement = useRef();\n\tconst currentSettings = {\n\t\tisVideoBackground,\n\t\tisImageBackground,\n\t\tmediaElement,\n\t\thasInnerBlocks,\n\t\turl,\n\t\tisImgElement,\n\t\toverlayColor,\n\t};\n\n\tconst toggleUseFeaturedImage = async () => {\n\t\tconst newUseFeaturedImage = ! useFeaturedImage;\n\n\t\tconst averageBackgroundColor = newUseFeaturedImage\n\t\t\t? await getMediaColor( mediaUrl )\n\t\t\t: DEFAULT_BACKGROUND_COLOR;\n\n\t\tconst newOverlayColor = ! isUserOverlayColor\n\t\t\t? averageBackgroundColor\n\t\t\t: overlayColor.color;\n\n\t\tif ( ! isUserOverlayColor ) {\n\t\t\tif ( newUseFeaturedImage ) {\n\t\t\t\tsetOverlayColor( newOverlayColor );\n\t\t\t} else {\n\t\t\t\tsetOverlayColor( undefined );\n\t\t\t}\n\n\t\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t}\n\n\t\tconst newDimRatio = dimRatio === 100 ? 50 : dimRatio;\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tnewDimRatio,\n\t\t\tnewOverlayColor,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\tid: undefined,\n\t\t\turl: undefined,\n\t\t\tuseFeaturedImage: newUseFeaturedImage,\n\t\t\tdimRatio: newDimRatio,\n\t\t\tbackgroundType: useFeaturedImage\n\t\t\t\t? IMAGE_BACKGROUND_TYPE\n\t\t\t\t: undefined,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst blockControls = (\n\t\t<CoverBlockControls\n\t\t\tattributes={ attributes }\n\t\t\tsetAttributes={ setAttributes }\n\t\t\tonSelectMedia={ onSelectMedia }\n\t\t\tcurrentSettings={ currentSettings }\n\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t/>\n\t);\n\n\tconst inspectorControls = (\n\t\t<CoverInspectorControls\n\t\t\tattributes={ attributes }\n\t\t\tsetAttributes={ setAttributes }\n\t\t\tclientId={ clientId }\n\t\t\tsetOverlayColor={ onSetOverlayColor }\n\t\t\tcoverRef={ ref }\n\t\t\tcurrentSettings={ currentSettings }\n\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\tupdateDimRatio={ onUpdateDimRatio }\n\t\t\tonClearMedia={ onClearMedia }\n\t\t/>\n\t);\n\n\tconst resizableCoverProps = {\n\t\tclassName: 'block-library-cover__resize-container',\n\t\tclientId,\n\t\theight,\n\t\tminHeight: minHeightWithUnit,\n\t\tonResizeStart: () => {\n\t\t\tsetAttributes( { minHeightUnit: 'px' } );\n\t\t\ttoggleSelection( false );\n\t\t},\n\t\tonResize: ( value ) => {\n\t\t\tsetAttributes( { minHeight: value } );\n\t\t},\n\t\tonResizeStop: ( newMinHeight ) => {\n\t\t\ttoggleSelection( true );\n\t\t\tsetAttributes( { minHeight: newMinHeight } );\n\t\t},\n\t\t// Hide the resize handle if an aspect ratio is set, as the aspect ratio takes precedence.\n\t\tshowHandle: ! attributes.style?.dimensions?.aspectRatio ? true : false,\n\t\tsize: resizableBoxDimensions,\n\t\twidth,\n\t};\n\n\tif ( ! useFeaturedImage && ! hasInnerBlocks && ! hasBackground ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ blockControls }\n\t\t\t\t{ inspectorControls }\n\t\t\t\t{ isSelected && (\n\t\t\t\t\t<ResizableCoverPopover { ...resizableCoverProps } />\n\t\t\t\t) }\n\t\t\t\t<TagName\n\t\t\t\t\t{ ...blockProps }\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'is-placeholder',\n\t\t\t\t\t\tblockProps.className\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...blockProps.style,\n\t\t\t\t\t\tminHeight: minHeightWithUnit || undefined,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ resizeListener }\n\t\t\t\t\t<CoverPlaceholder\n\t\t\t\t\t\tonSelectMedia={ onSelectMedia }\n\t\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"wp-block-cover__placeholder-background-options\">\n\t\t\t\t\t\t\t<ColorPalette\n\t\t\t\t\t\t\t\tdisableCustomColors={ true }\n\t\t\t\t\t\t\t\tvalue={ overlayColor.color }\n\t\t\t\t\t\t\t\tonChange={ onSetOverlayColor }\n\t\t\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CoverPlaceholder>\n\t\t\t\t</TagName>\n\t\t\t</>\n\t\t);\n\t}\n\n\tconst classes = classnames(\n\t\t{\n\t\t\t'is-dark-theme': isDark,\n\t\t\t'is-light': ! isDark,\n\t\t\t'is-transient': isUploadingMedia,\n\t\t\t'has-parallax': hasParallax,\n\t\t\t'is-repeated': isRepeated,\n\t\t\t'has-custom-content-position':\n\t\t\t\t! isContentPositionCenter( contentPosition ),\n\t\t},\n\t\tgetPositionClassName( contentPosition )\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<TagName\n\t\t\t\t{ ...blockProps }\n\t\t\t\tclassName={ classnames( classes, blockProps.className ) }\n\t\t\t\tstyle={ { ...style, ...blockProps.style } }\n\t\t\t\tdata-url={ url }\n\t\t\t>\n\t\t\t\t{ resizeListener }\n\t\t\t\t{ ( ! useFeaturedImage || url ) && (\n\t\t\t\t\t<span\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'wp-block-cover__background',\n\t\t\t\t\t\t\tdimRatioToClass( dimRatio ),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t[ overlayColor.class ]: overlayColor.class,\n\t\t\t\t\t\t\t\t'has-background-dim': dimRatio !== undefined,\n\t\t\t\t\t\t\t\t// For backwards compatibility. Former versions of the Cover Block applied\n\t\t\t\t\t\t\t\t// `.wp-block-cover__gradient-background` in the presence of\n\t\t\t\t\t\t\t\t// media, a gradient and a dim.\n\t\t\t\t\t\t\t\t'wp-block-cover__gradient-background':\n\t\t\t\t\t\t\t\t\turl && gradientValue && dimRatio !== 0,\n\t\t\t\t\t\t\t\t'has-background-gradient': gradientValue,\n\t\t\t\t\t\t\t\t[ gradientClass ]: gradientClass,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tstyle={ { backgroundImage: gradientValue, ...bgStyle } }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ ! url && useFeaturedImage && (\n\t\t\t\t\t<Placeholder\n\t\t\t\t\t\tclassName=\"wp-block-cover__image--placeholder-image\"\n\t\t\t\t\t\twithIllustration={ true }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ url &&\n\t\t\t\t\tisImageBackground &&\n\t\t\t\t\t( isImgElement ? (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tref={ mediaElement }\n\t\t\t\t\t\t\tclassName=\"wp-block-cover__image-background\"\n\t\t\t\t\t\t\talt={ alt }\n\t\t\t\t\t\t\tsrc={ url }\n\t\t\t\t\t\t\tstyle={ mediaStyle }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tref={ mediaElement }\n\t\t\t\t\t\t\trole={ alt ? 'img' : undefined }\n\t\t\t\t\t\t\taria-label={ alt ? alt : undefined }\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\tclasses,\n\t\t\t\t\t\t\t\t'wp-block-cover__image-background'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tstyle={ { backgroundImage, backgroundPosition } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t{ url && isVideoBackground && (\n\t\t\t\t\t<video\n\t\t\t\t\t\tref={ mediaElement }\n\t\t\t\t\t\tclassName=\"wp-block-cover__video-background\"\n\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\tmuted\n\t\t\t\t\t\tloop\n\t\t\t\t\t\tsrc={ url }\n\t\t\t\t\t\tstyle={ mediaStyle }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ isUploadingMedia && <Spinner /> }\n\t\t\t\t<CoverPlaceholder\n\t\t\t\t\tdisableMediaButtons\n\t\t\t\t\tonSelectMedia={ onSelectMedia }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\t\t/>\n\t\t\t\t<div { ...innerBlocksProps } />\n\t\t\t</TagName>\n\t\t\t{ isSelected && (\n\t\t\t\t<ResizableCoverPopover { ...resizableCoverProps } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default compose( [\n\twithColors( { overlayColor: 'background-color' } ),\n] )( CoverEdit );\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AASA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAKA,IAAAU,OAAA,GAAAV,OAAA;AASA,IAAAW,kBAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,cAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,iBAAA,GAAAd,sBAAA,CAAAC,OAAA;AACA,IAAAc,sBAAA,GAAAf,sBAAA,CAAAC,OAAA;AACA,IAAAe,WAAA,GAAAf,OAAA;AA1CA;AACA;AACA;;AAGA;AACA;AACA;;AAmBA;AACA;AACA;;AAqBA,SAASgB,sBAAsBA,CAAEC,UAAU,EAAG;EAC7C,OAAO,CACN,CACC,gBAAgB,EAChB;IACCC,KAAK,EAAE,QAAQ;IACfC,WAAW,EAAE,IAAAC,QAAE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AEL;AAAC,IAAA+B,QAAA,GAEc,IAAAC,gBAAO,EAAE,CACvB,IAAAC,uBAAU,EAAE;EAAEzJ,YAAY,EAAE;AAAmB,CAAE,CAAC,CACjD,CAAC,CAAEH,SAAU,CAAC;AAAA6J,OAAA,CAAAtC,OAAA,GAAAmC,QAAA"}
|
|
@@ -11,6 +11,7 @@ var _compose = require("@wordpress/compose");
|
|
|
11
11
|
var _blockEditor = require("@wordpress/block-editor");
|
|
12
12
|
var _i18n = require("@wordpress/i18n");
|
|
13
13
|
var _shared = require("../shared");
|
|
14
|
+
var _lockUnlock = require("../../lock-unlock");
|
|
14
15
|
/**
|
|
15
16
|
* WordPress dependencies
|
|
16
17
|
*/
|
|
@@ -19,6 +20,9 @@ var _shared = require("../shared");
|
|
|
19
20
|
* Internal dependencies
|
|
20
21
|
*/
|
|
21
22
|
|
|
23
|
+
const {
|
|
24
|
+
cleanEmptyObject
|
|
25
|
+
} = (0, _lockUnlock.unlock)(_blockEditor.privateApis);
|
|
22
26
|
function CoverHeightInput({
|
|
23
27
|
onChange,
|
|
24
28
|
onUnitChange,
|
|
@@ -222,8 +226,16 @@ function CoverInspectorControls({
|
|
|
222
226
|
value: minHeight,
|
|
223
227
|
unit: minHeightUnit,
|
|
224
228
|
onChange: newMinHeight => setAttributes({
|
|
225
|
-
minHeight: newMinHeight
|
|
229
|
+
minHeight: newMinHeight,
|
|
230
|
+
style: cleanEmptyObject({
|
|
231
|
+
...attributes?.style,
|
|
232
|
+
dimensions: {
|
|
233
|
+
...attributes?.style?.dimensions,
|
|
234
|
+
aspectRatio: undefined // Reset aspect ratio when minHeight is set.
|
|
235
|
+
}
|
|
236
|
+
})
|
|
226
237
|
}),
|
|
238
|
+
|
|
227
239
|
onUnitChange: nextUnit => setAttributes({
|
|
228
240
|
minHeightUnit: nextUnit
|
|
229
241
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_components","_compose","_blockEditor","_i18n","_shared","CoverHeightInput","onChange","onUnitChange","unit","value","instanceId","useInstanceId","UnitControl","inputId","isPx","availableUnits","useSettings","units","useCustomUnits","defaultValues","px","em","rem","vw","vh","handleOnChange","unprocessedValue","inputValue","parseFloat","undefined","isNaN","computedValue","useMemo","parsedQuantity","parseQuantityAndUnitFromRawValue","join","min","COVER_MIN_HEIGHT","_react","createElement","__experimentalUnitControl","label","__","id","isResetValueOnUnitChange","__unstableInputWidth","CoverInspectorControls","attributes","setAttributes","clientId","setOverlayColor","coverRef","currentSettings","updateDimRatio","onClearMedia","useFeaturedImage","dimRatio","focalPoint","hasParallax","isRepeated","minHeight","minHeightUnit","alt","tagName","isVideoBackground","isImageBackground","mediaElement","url","overlayColor","gradientValue","setGradient","__experimentalUseGradient","toggleParallax","toggleIsRepeated","showFocalPointPicker","imperativeFocalPointPreview","styleOfRef","property","current","style","mediaPosition","colorGradientSettings","useMultipleOriginColorsAndGradients","htmlElementMessages","header","main","section","article","aside","footer","Fragment","InspectorControls","PanelBody","title","ToggleControl","__nextHasNoMarginBottom","checked","FocalPointPicker","onDragStart","onDrag","newFocalPoint","TextareaControl","newAlt","help","ExternalLink","href","PanelRow","Button","variant","size","className","onClick","hasColorsOrGradients","group","__experimentalColorGradientSettingsDropdown","__experimentalIsRenderedInSidebar","settings","colorValue","color","onColorChange","onGradientChange","isShownByDefault","resetAllFilter","customOverlayColor","gradient","customGradient","panelId","__experimentalToolsPanelItem","hasValue","onDeselect","RangeControl","newDimRatio","max","step","required","__next40pxDefaultSize","newMinHeight","nextUnit","SelectControl","options"],"sources":["@wordpress/block-library/src/cover/edit/inspector-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport {\n\tButton,\n\tExternalLink,\n\tFocalPointPicker,\n\tPanelBody,\n\tPanelRow,\n\tRangeControl,\n\tTextareaControl,\n\tToggleControl,\n\tSelectControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tInspectorControls,\n\tuseSettings,\n\t__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,\n\t__experimentalUseGradient,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { COVER_MIN_HEIGHT, mediaPosition } from '../shared';\n\nfunction CoverHeightInput( {\n\tonChange,\n\tonUnitChange,\n\tunit = 'px',\n\tvalue = '',\n} ) {\n\tconst instanceId = useInstanceId( UnitControl );\n\tconst inputId = `block-cover-height-input-${ instanceId }`;\n\tconst isPx = unit === 'px';\n\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ 'px', 'em', 'rem', 'vw', 'vh' ],\n\t\tdefaultValues: { px: 430, '%': 20, em: 20, rem: 20, vw: 20, vh: 50 },\n\t} );\n\n\tconst handleOnChange = ( unprocessedValue ) => {\n\t\tconst inputValue =\n\t\t\tunprocessedValue !== ''\n\t\t\t\t? parseFloat( unprocessedValue )\n\t\t\t\t: undefined;\n\n\t\tif ( isNaN( inputValue ) && inputValue !== undefined ) {\n\t\t\treturn;\n\t\t}\n\t\tonChange( inputValue );\n\t};\n\n\tconst computedValue = useMemo( () => {\n\t\tconst [ parsedQuantity ] = parseQuantityAndUnitFromRawValue( value );\n\t\treturn [ parsedQuantity, unit ].join( '' );\n\t}, [ unit, value ] );\n\n\tconst min = isPx ? COVER_MIN_HEIGHT : 0;\n\n\treturn (\n\t\t<UnitControl\n\t\t\tlabel={ __( 'Minimum height of cover' ) }\n\t\t\tid={ inputId }\n\t\t\tisResetValueOnUnitChange\n\t\t\tmin={ min }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonUnitChange={ onUnitChange }\n\t\t\t__unstableInputWidth={ '80px' }\n\t\t\tunits={ units }\n\t\t\tvalue={ computedValue }\n\t\t/>\n\t);\n}\nexport default function CoverInspectorControls( {\n\tattributes,\n\tsetAttributes,\n\tclientId,\n\tsetOverlayColor,\n\tcoverRef,\n\tcurrentSettings,\n\tupdateDimRatio,\n\tonClearMedia,\n} ) {\n\tconst {\n\t\tuseFeaturedImage,\n\t\tdimRatio,\n\t\tfocalPoint,\n\t\thasParallax,\n\t\tisRepeated,\n\t\tminHeight,\n\t\tminHeightUnit,\n\t\talt,\n\t\ttagName,\n\t} = attributes;\n\tconst {\n\t\tisVideoBackground,\n\t\tisImageBackground,\n\t\tmediaElement,\n\t\turl,\n\t\toverlayColor,\n\t} = currentSettings;\n\n\tconst { gradientValue, setGradient } = __experimentalUseGradient();\n\n\tconst toggleParallax = () => {\n\t\tsetAttributes( {\n\t\t\thasParallax: ! hasParallax,\n\t\t\t...( ! hasParallax ? { focalPoint: undefined } : {} ),\n\t\t} );\n\t};\n\n\tconst toggleIsRepeated = () => {\n\t\tsetAttributes( {\n\t\t\tisRepeated: ! isRepeated,\n\t\t} );\n\t};\n\n\tconst showFocalPointPicker =\n\t\tisVideoBackground ||\n\t\t( isImageBackground && ( ! hasParallax || isRepeated ) );\n\n\tconst imperativeFocalPointPreview = ( value ) => {\n\t\tconst [ styleOfRef, property ] = mediaElement.current\n\t\t\t? [ mediaElement.current.style, 'objectPosition' ]\n\t\t\t: [ coverRef.current.style, 'backgroundPosition' ];\n\t\tstyleOfRef[ property ] = mediaPosition( value );\n\t};\n\n\tconst colorGradientSettings = useMultipleOriginColorsAndGradients();\n\n\tconst htmlElementMessages = {\n\t\theader: __(\n\t\t\t'The <header> element should represent introductory content, typically a group of introductory or navigational aids.'\n\t\t),\n\t\tmain: __(\n\t\t\t'The <main> element should be used for the primary content of your document only.'\n\t\t),\n\t\tsection: __(\n\t\t\t\"The <section> element should represent a standalone portion of the document that can't be better represented by another element.\"\n\t\t),\n\t\tarticle: __(\n\t\t\t'The <article> element should represent a self-contained, syndicatable portion of the document.'\n\t\t),\n\t\taside: __(\n\t\t\t\"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.\"\n\t\t),\n\t\tfooter: __(\n\t\t\t'The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).'\n\t\t),\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t{ !! url && (\n\t\t\t\t\t<PanelBody title={ __( 'Media settings' ) }>\n\t\t\t\t\t\t{ isImageBackground && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Fixed background' ) }\n\t\t\t\t\t\t\t\t\tchecked={ hasParallax }\n\t\t\t\t\t\t\t\t\tonChange={ toggleParallax }\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Repeated background' ) }\n\t\t\t\t\t\t\t\t\tchecked={ isRepeated }\n\t\t\t\t\t\t\t\t\tonChange={ toggleIsRepeated }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showFocalPointPicker && (\n\t\t\t\t\t\t\t<FocalPointPicker\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Focal point picker' ) }\n\t\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\t\tvalue={ focalPoint }\n\t\t\t\t\t\t\t\tonDragStart={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\tonDrag={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\tonChange={ ( newFocalPoint ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tfocalPoint: newFocalPoint,\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) }\n\t\t\t\t\t\t{ ! useFeaturedImage && url && ! isVideoBackground && (\n\t\t\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\t\tvalue={ alt }\n\t\t\t\t\t\t\t\tonChange={ ( newAlt ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( { alt: newAlt } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<ExternalLink href=\"https://www.w3.org/WAI/tutorials/images/decision-tree\">\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'Describe the purpose of the image.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t{ __( 'Leave empty if decorative.' ) }\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) }\n\t\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tclassName=\"block-library-cover__reset-button\"\n\t\t\t\t\t\t\t\tonClick={ onClearMedia }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Clear Media' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</PanelRow>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t</InspectorControls>\n\t\t\t{ colorGradientSettings.hasColorsOrGradients && (\n\t\t\t\t<InspectorControls group=\"color\">\n\t\t\t\t\t<ColorGradientSettingsDropdown\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\tsettings={ [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcolorValue: overlayColor.color,\n\t\t\t\t\t\t\t\tgradientValue,\n\t\t\t\t\t\t\t\tlabel: __( 'Overlay' ),\n\t\t\t\t\t\t\t\tonColorChange: setOverlayColor,\n\t\t\t\t\t\t\t\tonGradientChange: setGradient,\n\t\t\t\t\t\t\t\tisShownByDefault: true,\n\t\t\t\t\t\t\t\tresetAllFilter: () => ( {\n\t\t\t\t\t\t\t\t\toverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tcustomOverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tgradient: undefined,\n\t\t\t\t\t\t\t\t\tcustomGradient: undefined,\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t\t{ ...colorGradientSettings }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => {\n\t\t\t\t\t\t\t// If there's a media background the dimRatio will be\n\t\t\t\t\t\t\t// defaulted to 50 whereas it will be 100 for colors.\n\t\t\t\t\t\t\treturn dimRatio === undefined\n\t\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t\t: dimRatio !== ( url ? 50 : 100 );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\tonDeselect={ () => updateDimRatio( url ? 50 : 100 ) }\n\t\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\t\tdimRatio: url ? 50 : 100,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\t\tvalue={ dimRatio }\n\t\t\t\t\t\t\tonChange={ ( newDimRatio ) =>\n\t\t\t\t\t\t\t\tupdateDimRatio( newDimRatio )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\t\tstep={ 10 }\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<InspectorControls group=\"dimensions\">\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ () => !! minHeight }\n\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t} ) }\n\t\t\t\t\tisShownByDefault={ true }\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<CoverHeightInput\n\t\t\t\t\t\tvalue={ minHeight }\n\t\t\t\t\t\tunit={ minHeightUnit }\n\t\t\t\t\t\tonChange={ ( newMinHeight ) =>\n\t\t\t\t\t\t\tsetAttributes( { minHeight: newMinHeight } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonUnitChange={ ( nextUnit ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tminHeightUnit: nextUnit,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'HTML element' ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<div>)' ), value: 'div' },\n\t\t\t\t\t\t{ label: '<header>', value: 'header' },\n\t\t\t\t\t\t{ label: '<main>', value: 'main' },\n\t\t\t\t\t\t{ label: '<section>', value: 'section' },\n\t\t\t\t\t\t{ label: '<article>', value: 'article' },\n\t\t\t\t\t\t{ label: '<aside>', value: 'aside' },\n\t\t\t\t\t\t{ label: '<footer>', value: 'footer' },\n\t\t\t\t\t] }\n\t\t\t\t\tvalue={ tagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ htmlElementMessages[ tagName ] }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAeA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAOA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,OAAA,GAAAL,OAAA;AAhCA;AACA;AACA;;AA2BA;AACA;AACA;;AAGA,SAASM,gBAAgBA,CAAE;EAC1BC,QAAQ;EACRC,YAAY;EACZC,IAAI,GAAG,IAAI;EACXC,KAAK,GAAG;AACT,CAAC,EAAG;EACH,MAAMC,UAAU,GAAG,IAAAC,sBAAa,EAAEC,qCAAY,CAAC;EAC/C,MAAMC,OAAO,GAAI,4BAA4BH,UAAY,EAAC;EAC1D,MAAMI,IAAI,GAAGN,I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ACsB,KAAK,EAAC;EAAU,GAClC,IAAA3E,MAAA,CAAAC,aAAA,EAACvC,WAAA,CAAA0I,aAAa;IACb3C,uBAAuB;IACvBwC,qBAAqB;IACrB9F,KAAK,EAAG,IAAAC,QAAE,EAAE,cAAe,CAAG;IAC9BiG,OAAO,EAAG,CACT;MAAElG,KAAK,EAAE,IAAAC,QAAE,EAAE,iBAAkB,CAAC;MAAEjC,KAAK,EAAE;IAAM,CAAC,EAChD;MAAEgC,KAAK,EAAE,UAAU;MAAEhC,KAAK,EAAE;IAAS,CAAC,EACtC;MAAEgC,KAAK,EAAE,QAAQ;MAAEhC,KAAK,EAAE;IAAO,CAAC,EAClC;MAAEgC,KAAK,EAAE,WAAW;MAAEhC,KAAK,EAAE;IAAU,CAAC,EACxC;MAAEgC,KAAK,EAAE,WAAW;MAAEhC,KAAK,EAAE;IAAU,CAAC,EACxC;MAAEgC,KAAK,EAAE,SAAS;MAAEhC,KAAK,EAAE;IAAQ,CAAC,EACpC;MAAEgC,KAAK,EAAE,UAAU;MAAEhC,KAAK,EAAE;IAAS,CAAC,CACpC;IACHA,KAAK,EAAGsD,OAAS;IACjBzD,QAAQ,EAAKG,KAAK,IACjBuC,aAAa,CAAE;MAAEe,OAAO,EAAEtD;IAAM,CAAE,CAClC;IACD8F,IAAI,EAAGpB,mBAAmB,CAAEpB,OAAO;EAAI,CACvC,CACiB,CAClB,CAAC;AAEL"}
|
|
1
|
+
{"version":3,"names":["_element","require","_components","_compose","_blockEditor","_i18n","_shared","_lockUnlock","cleanEmptyObject","unlock","blockEditorPrivateApis","CoverHeightInput","onChange","onUnitChange","unit","value","instanceId","useInstanceId","UnitControl","inputId","isPx","availableUnits","useSettings","units","useCustomUnits","defaultValues","px","em","rem","vw","vh","handleOnChange","unprocessedValue","inputValue","parseFloat","undefined","isNaN","computedValue","useMemo","parsedQuantity","parseQuantityAndUnitFromRawValue","join","min","COVER_MIN_HEIGHT","_react","createElement","__experimentalUnitControl","label","__","id","isResetValueOnUnitChange","__unstableInputWidth","CoverInspectorControls","attributes","setAttributes","clientId","setOverlayColor","coverRef","currentSettings","updateDimRatio","onClearMedia","useFeaturedImage","dimRatio","focalPoint","hasParallax","isRepeated","minHeight","minHeightUnit","alt","tagName","isVideoBackground","isImageBackground","mediaElement","url","overlayColor","gradientValue","setGradient","__experimentalUseGradient","toggleParallax","toggleIsRepeated","showFocalPointPicker","imperativeFocalPointPreview","styleOfRef","property","current","style","mediaPosition","colorGradientSettings","useMultipleOriginColorsAndGradients","htmlElementMessages","header","main","section","article","aside","footer","Fragment","InspectorControls","PanelBody","title","ToggleControl","__nextHasNoMarginBottom","checked","FocalPointPicker","onDragStart","onDrag","newFocalPoint","TextareaControl","newAlt","help","ExternalLink","href","PanelRow","Button","variant","size","className","onClick","hasColorsOrGradients","group","__experimentalColorGradientSettingsDropdown","__experimentalIsRenderedInSidebar","settings","colorValue","color","onColorChange","onGradientChange","isShownByDefault","resetAllFilter","customOverlayColor","gradient","customGradient","panelId","__experimentalToolsPanelItem","hasValue","onDeselect","RangeControl","newDimRatio","max","step","required","__next40pxDefaultSize","newMinHeight","dimensions","aspectRatio","nextUnit","SelectControl","options"],"sources":["@wordpress/block-library/src/cover/edit/inspector-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport {\n\tButton,\n\tExternalLink,\n\tFocalPointPicker,\n\tPanelBody,\n\tPanelRow,\n\tRangeControl,\n\tTextareaControl,\n\tToggleControl,\n\tSelectControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tInspectorControls,\n\tuseSettings,\n\t__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,\n\t__experimentalUseGradient,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { COVER_MIN_HEIGHT, mediaPosition } from '../shared';\nimport { unlock } from '../../lock-unlock';\n\nconst { cleanEmptyObject } = unlock( blockEditorPrivateApis );\n\nfunction CoverHeightInput( {\n\tonChange,\n\tonUnitChange,\n\tunit = 'px',\n\tvalue = '',\n} ) {\n\tconst instanceId = useInstanceId( UnitControl );\n\tconst inputId = `block-cover-height-input-${ instanceId }`;\n\tconst isPx = unit === 'px';\n\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ 'px', 'em', 'rem', 'vw', 'vh' ],\n\t\tdefaultValues: { px: 430, '%': 20, em: 20, rem: 20, vw: 20, vh: 50 },\n\t} );\n\n\tconst handleOnChange = ( unprocessedValue ) => {\n\t\tconst inputValue =\n\t\t\tunprocessedValue !== ''\n\t\t\t\t? parseFloat( unprocessedValue )\n\t\t\t\t: undefined;\n\n\t\tif ( isNaN( inputValue ) && inputValue !== undefined ) {\n\t\t\treturn;\n\t\t}\n\t\tonChange( inputValue );\n\t};\n\n\tconst computedValue = useMemo( () => {\n\t\tconst [ parsedQuantity ] = parseQuantityAndUnitFromRawValue( value );\n\t\treturn [ parsedQuantity, unit ].join( '' );\n\t}, [ unit, value ] );\n\n\tconst min = isPx ? COVER_MIN_HEIGHT : 0;\n\n\treturn (\n\t\t<UnitControl\n\t\t\tlabel={ __( 'Minimum height of cover' ) }\n\t\t\tid={ inputId }\n\t\t\tisResetValueOnUnitChange\n\t\t\tmin={ min }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonUnitChange={ onUnitChange }\n\t\t\t__unstableInputWidth={ '80px' }\n\t\t\tunits={ units }\n\t\t\tvalue={ computedValue }\n\t\t/>\n\t);\n}\nexport default function CoverInspectorControls( {\n\tattributes,\n\tsetAttributes,\n\tclientId,\n\tsetOverlayColor,\n\tcoverRef,\n\tcurrentSettings,\n\tupdateDimRatio,\n\tonClearMedia,\n} ) {\n\tconst {\n\t\tuseFeaturedImage,\n\t\tdimRatio,\n\t\tfocalPoint,\n\t\thasParallax,\n\t\tisRepeated,\n\t\tminHeight,\n\t\tminHeightUnit,\n\t\talt,\n\t\ttagName,\n\t} = attributes;\n\tconst {\n\t\tisVideoBackground,\n\t\tisImageBackground,\n\t\tmediaElement,\n\t\turl,\n\t\toverlayColor,\n\t} = currentSettings;\n\n\tconst { gradientValue, setGradient } = __experimentalUseGradient();\n\n\tconst toggleParallax = () => {\n\t\tsetAttributes( {\n\t\t\thasParallax: ! hasParallax,\n\t\t\t...( ! hasParallax ? { focalPoint: undefined } : {} ),\n\t\t} );\n\t};\n\n\tconst toggleIsRepeated = () => {\n\t\tsetAttributes( {\n\t\t\tisRepeated: ! isRepeated,\n\t\t} );\n\t};\n\n\tconst showFocalPointPicker =\n\t\tisVideoBackground ||\n\t\t( isImageBackground && ( ! hasParallax || isRepeated ) );\n\n\tconst imperativeFocalPointPreview = ( value ) => {\n\t\tconst [ styleOfRef, property ] = mediaElement.current\n\t\t\t? [ mediaElement.current.style, 'objectPosition' ]\n\t\t\t: [ coverRef.current.style, 'backgroundPosition' ];\n\t\tstyleOfRef[ property ] = mediaPosition( value );\n\t};\n\n\tconst colorGradientSettings = useMultipleOriginColorsAndGradients();\n\n\tconst htmlElementMessages = {\n\t\theader: __(\n\t\t\t'The <header> element should represent introductory content, typically a group of introductory or navigational aids.'\n\t\t),\n\t\tmain: __(\n\t\t\t'The <main> element should be used for the primary content of your document only.'\n\t\t),\n\t\tsection: __(\n\t\t\t\"The <section> element should represent a standalone portion of the document that can't be better represented by another element.\"\n\t\t),\n\t\tarticle: __(\n\t\t\t'The <article> element should represent a self-contained, syndicatable portion of the document.'\n\t\t),\n\t\taside: __(\n\t\t\t\"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.\"\n\t\t),\n\t\tfooter: __(\n\t\t\t'The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).'\n\t\t),\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t{ !! url && (\n\t\t\t\t\t<PanelBody title={ __( 'Media settings' ) }>\n\t\t\t\t\t\t{ isImageBackground && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Fixed background' ) }\n\t\t\t\t\t\t\t\t\tchecked={ hasParallax }\n\t\t\t\t\t\t\t\t\tonChange={ toggleParallax }\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Repeated background' ) }\n\t\t\t\t\t\t\t\t\tchecked={ isRepeated }\n\t\t\t\t\t\t\t\t\tonChange={ toggleIsRepeated }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showFocalPointPicker && (\n\t\t\t\t\t\t\t<FocalPointPicker\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Focal point picker' ) }\n\t\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\t\tvalue={ focalPoint }\n\t\t\t\t\t\t\t\tonDragStart={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\tonDrag={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\tonChange={ ( newFocalPoint ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tfocalPoint: newFocalPoint,\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) }\n\t\t\t\t\t\t{ ! useFeaturedImage && url && ! isVideoBackground && (\n\t\t\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\t\tvalue={ alt }\n\t\t\t\t\t\t\t\tonChange={ ( newAlt ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( { alt: newAlt } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<ExternalLink href=\"https://www.w3.org/WAI/tutorials/images/decision-tree\">\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'Describe the purpose of the image.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t{ __( 'Leave empty if decorative.' ) }\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) }\n\t\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tclassName=\"block-library-cover__reset-button\"\n\t\t\t\t\t\t\t\tonClick={ onClearMedia }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Clear Media' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</PanelRow>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t</InspectorControls>\n\t\t\t{ colorGradientSettings.hasColorsOrGradients && (\n\t\t\t\t<InspectorControls group=\"color\">\n\t\t\t\t\t<ColorGradientSettingsDropdown\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\tsettings={ [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcolorValue: overlayColor.color,\n\t\t\t\t\t\t\t\tgradientValue,\n\t\t\t\t\t\t\t\tlabel: __( 'Overlay' ),\n\t\t\t\t\t\t\t\tonColorChange: setOverlayColor,\n\t\t\t\t\t\t\t\tonGradientChange: setGradient,\n\t\t\t\t\t\t\t\tisShownByDefault: true,\n\t\t\t\t\t\t\t\tresetAllFilter: () => ( {\n\t\t\t\t\t\t\t\t\toverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tcustomOverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tgradient: undefined,\n\t\t\t\t\t\t\t\t\tcustomGradient: undefined,\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t\t{ ...colorGradientSettings }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => {\n\t\t\t\t\t\t\t// If there's a media background the dimRatio will be\n\t\t\t\t\t\t\t// defaulted to 50 whereas it will be 100 for colors.\n\t\t\t\t\t\t\treturn dimRatio === undefined\n\t\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t\t: dimRatio !== ( url ? 50 : 100 );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\tonDeselect={ () => updateDimRatio( url ? 50 : 100 ) }\n\t\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\t\tdimRatio: url ? 50 : 100,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\t\tvalue={ dimRatio }\n\t\t\t\t\t\t\tonChange={ ( newDimRatio ) =>\n\t\t\t\t\t\t\t\tupdateDimRatio( newDimRatio )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\t\tstep={ 10 }\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<InspectorControls group=\"dimensions\">\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ () => !! minHeight }\n\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t} ) }\n\t\t\t\t\tisShownByDefault={ true }\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<CoverHeightInput\n\t\t\t\t\t\tvalue={ minHeight }\n\t\t\t\t\t\tunit={ minHeightUnit }\n\t\t\t\t\t\tonChange={ ( newMinHeight ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tminHeight: newMinHeight,\n\t\t\t\t\t\t\t\tstyle: cleanEmptyObject( {\n\t\t\t\t\t\t\t\t\t...attributes?.style,\n\t\t\t\t\t\t\t\t\tdimensions: {\n\t\t\t\t\t\t\t\t\t\t...attributes?.style?.dimensions,\n\t\t\t\t\t\t\t\t\t\taspectRatio: undefined, // Reset aspect ratio when minHeight is set.\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}\n\t\t\t\t\t\tonUnitChange={ ( nextUnit ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tminHeightUnit: nextUnit,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'HTML element' ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<div>)' ), value: 'div' },\n\t\t\t\t\t\t{ label: '<header>', value: 'header' },\n\t\t\t\t\t\t{ label: '<main>', value: 'main' },\n\t\t\t\t\t\t{ label: '<section>', value: 'section' },\n\t\t\t\t\t\t{ label: '<article>', value: 'article' },\n\t\t\t\t\t\t{ label: '<aside>', value: 'aside' },\n\t\t\t\t\t\t{ label: '<footer>', value: 'footer' },\n\t\t\t\t\t] }\n\t\t\t\t\tvalue={ tagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ htmlElementMessages[ tagName ] }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAeA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAQA,IAAAI,KAAA,GAAAJ,OAAA;AAKA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAlCA;AACA;AACA;;AA4BA;AACA;AACA;;AAIA,MAAM;EAAEO;AAAiB,CAAC,GAAG,IAAAC,kBAAM,EAAE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;MAAEe,OAAO,EAAEtD;IAAM,CAAE,CAClC;IACD8F,IAAI,EAAGpB,mBAAmB,CAAEpB,OAAO;EAAI,CACvC,CACiB,CAClB,CAAC;AAEL"}
|
package/build/cover/index.js
CHANGED
package/build/cover/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_icons","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","_transforms","_variations","metadata","$schema","apiVersion","name","title","category","description","textdomain","attributes","url","type","useFeaturedImage","id","alt","hasParallax","isRepeated","dimRatio","overlayColor","customOverlayColor","isUserOverlayColor","backgroundType","focalPoint","minHeight","minHeightUnit","gradient","customGradient","contentPosition","isDark","allowedBlocks","templateLock","tagName","usesContext","supports","anchor","align","html","spacing","padding","margin","blockGap","__experimentalDefaultControls","__experimentalBorder","color","radius","style","width","__experimentalDuotone","heading","text","background","__experimentalSkipSerialization","enableContrastChecker","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","layout","allowJustification","editorStyle","exports","settings","icon","example","innerBlocks","content","__","transforms","save","edit","deprecated","variations","init","initBlock"],"sources":["@wordpress/block-library/src/cover/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { cover as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\nimport variations from './variations';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tcustomOverlayColor: '#065174',\n\t\t\tdimRatio: 40,\n\t\t\turl: 'https://s.w.org/images/core/5.3/Windbuchencom.jpg',\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcontent: __( '<strong>Snow Patrol</strong>' ),\n\t\t\t\t\talign: 'center',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\ttypography: {\n\t\t\t\t\t\t\tfontSize: 48,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\ttext: 'white',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\ttransforms,\n\tsave,\n\tedit,\n\tdeprecated,\n\tvariations,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,KAAA,GAAAF,sBAAA,CAAAH,OAAA;AAEA,IAAAM,KAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,WAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,WAAA,GAAAL,sBAAA,CAAAH,OAAA;AAfA;AACA;AACA;AAIA;AACA;AACA;AAFA,MAAAS,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,GAAA;MAAAC,IAAA;IAAA;IAAAC,gBAAA;MAAAD,IAAA;MAAA;IAAA;IAAAE,EAAA;MAAAF,IAAA;IAAA;IAAAG,GAAA;MAAAH,IAAA;MAAA;IAAA;IAAAI,WAAA;MAAAJ,IAAA;MAAA;IAAA;IAAAK,UAAA;MAAAL,IAAA;MAAA;IAAA;IAAAM,QAAA;MAAAN,IAAA;MAAA;IAAA;IAAAO,YAAA;MAAAP,IAAA;IAAA;IAAAQ,kBAAA;MAAAR,IAAA;IAAA;IAAAS,kBAAA;MAAAT,IAAA;IAAA;IAAAU,cAAA;MAAAV,IAAA;MAAA;IAAA;IAAAW,UAAA;MAAAX,IAAA;IAAA;IAAAY,SAAA;MAAAZ,IAAA;IAAA;IAAAa,aAAA;MAAAb,IAAA;IAAA;IAAAc,QAAA;MAAAd,IAAA;IAAA;IAAAe,cAAA;MAAAf,IAAA;IAAA;IAAAgB,eAAA;MAAAhB,IAAA;IAAA;IAAAiB,MAAA;MAAAjB,IAAA;MAAA;IAAA;IAAAkB,aAAA;MAAAlB,IAAA;IAAA;IAAAmB,YAAA;MAAAnB,IAAA;MAAA;IAAA;IAAAoB,OAAA;MAAApB,IAAA;MAAA;IAAA;EAAA;EAAAqB,WAAA;EAAAC,QAAA;IAAAC,MAAA;IAAAC,KAAA;IAAAC,IAAA;IAAAC,OAAA;MAAAC,OAAA;MAAAC,MAAA;MAAAC,QAAA;MAAAC,6BAAA;QAAAH,OAAA;QAAAE,QAAA;MAAA;IAAA;IAAAE,oBAAA;MAAAC,KAAA;MAAAC,MAAA;MAAAC,KAAA;MAAAC,KAAA;MAAAL,6BAAA;QAAAE,KAAA;QAAAC,MAAA;QAAAC,KAAA;QAAAC,KAAA;MAAA;IAAA;IAAAH,KAAA;MAAAI,qBAAA;MAAAC,OAAA;MAAAC,IAAA;MAAAC,UAAA;MAAAC,+BAAA;MAAAC,qBAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;
|
|
1
|
+
{"version":3,"names":["_i18n","require","_icons","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","_transforms","_variations","metadata","$schema","apiVersion","name","title","category","description","textdomain","attributes","url","type","useFeaturedImage","id","alt","hasParallax","isRepeated","dimRatio","overlayColor","customOverlayColor","isUserOverlayColor","backgroundType","focalPoint","minHeight","minHeightUnit","gradient","customGradient","contentPosition","isDark","allowedBlocks","templateLock","tagName","usesContext","supports","anchor","align","html","spacing","padding","margin","blockGap","__experimentalDefaultControls","__experimentalBorder","color","radius","style","width","__experimentalDuotone","heading","text","background","__experimentalSkipSerialization","enableContrastChecker","dimensions","aspectRatio","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","layout","allowJustification","editorStyle","exports","settings","icon","example","innerBlocks","content","__","transforms","save","edit","deprecated","variations","init","initBlock"],"sources":["@wordpress/block-library/src/cover/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { cover as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\nimport variations from './variations';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tcustomOverlayColor: '#065174',\n\t\t\tdimRatio: 40,\n\t\t\turl: 'https://s.w.org/images/core/5.3/Windbuchencom.jpg',\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcontent: __( '<strong>Snow Patrol</strong>' ),\n\t\t\t\t\talign: 'center',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\ttypography: {\n\t\t\t\t\t\t\tfontSize: 48,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\ttext: 'white',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\ttransforms,\n\tsave,\n\tedit,\n\tdeprecated,\n\tvariations,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,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,IAAI,EAAE;UACP;QACD;MACD;IACD,CAAC;EAEH,CAAC;EACDyB,UAAU,EAAVA,mBAAU;EACVC,IAAI,EAAJA,aAAI;EACJC,IAAI,EAAJA,aAAI;EACJC,UAAU,EAAVA,mBAAU;EACVC,UAAU,EAAVA;AACD,CAAC;AAACX,OAAA,CAAAC,QAAA,GAAAA,QAAA;AAEK,MAAMW,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAE5E,IAAI;EAAEH,QAAQ;EAAEmE;AAAS,CAAE,CAAC;AAACD,OAAA,CAAAY,IAAA,GAAAA,IAAA"}
|
package/build/group/index.js
CHANGED
package/build/group/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_icons","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","_transforms","_variations","metadata","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","tagName","type","templateLock","allowedBlocks","supports","__experimentalOnEnter","__experimentalOnMerge","__experimentalSettings","align","anchor","ariaLabel","html","background","backgroundImage","backgroundSize","__experimentalDefaultControls","color","gradients","heading","button","link","text","spacing","margin","padding","blockGap","dimensions","minHeight","__experimentalBorder","radius","style","width","position","sticky","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","layout","allowSizingOnChildren","editorStyle","exports","settings","icon","example","innerBlocks","customTextColor","content","__","transforms","edit","save","deprecated","variations","init","initBlock"],"sources":["@wordpress/block-library/src/group/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { group as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\nimport variations from './variations';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tstyle: {\n\t\t\t\tcolor: {\n\t\t\t\t\ttext: '#000000',\n\t\t\t\t\tbackground: '#ffffff',\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#cf2e2e',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'One.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#ff6900',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Two.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#fcb900',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Three.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#00d084',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Four.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#0693e3',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Five.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#9b51e0',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Six.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tdeprecated,\n\tvariations,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,KAAA,GAAAF,sBAAA,CAAAH,OAAA;AAEA,IAAAM,KAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,WAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,WAAA,GAAAL,sBAAA,CAAAH,OAAA;AAfA;AACA;AACA;AAIA;AACA;AACA;AAFA,MAAAS,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,QAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,OAAA;MAAAC,IAAA;MAAA;IAAA;IAAAC,YAAA;MAAAD,IAAA;MAAA;IAAA;IAAAE,aAAA;MAAAF,IAAA;IAAA;EAAA;EAAAG,QAAA;IAAAC,qBAAA;IAAAC,qBAAA;IAAAC,sBAAA;IAAAC,KAAA;IAAAC,MAAA;IAAAC,SAAA;IAAAC,IAAA;IAAAC,UAAA;MAAAC,eAAA;MAAAC,cAAA;MAAAC,6BAAA;QAAAF,eAAA;MAAA;IAAA;IAAAG,KAAA;MAAAC,SAAA;MAAAC,OAAA;MAAAC,MAAA;MAAAC,IAAA;MAAAL,6BAAA;QAAAH,UAAA;QAAAS,IAAA;MAAA;IAAA;IAAAC,OAAA;MAAAC,MAAA;MAAAC,OAAA;MAAAC,QAAA;MAAAV,6BAAA;QAAAS,OAAA;QAAAC,QAAA;MAAA;IAAA;IAAAC,UAAA;MAAAC,SAAA;IAAA;IAAAC,oBAAA;
|
|
1
|
+
{"version":3,"names":["_i18n","require","_icons","_initBlock","_interopRequireDefault","_deprecated","_edit","_save","_transforms","_variations","metadata","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","tagName","type","templateLock","allowedBlocks","supports","__experimentalOnEnter","__experimentalOnMerge","__experimentalSettings","align","anchor","ariaLabel","html","background","backgroundImage","backgroundSize","__experimentalDefaultControls","color","gradients","heading","button","link","text","spacing","margin","padding","blockGap","dimensions","aspectRatio","minHeight","__experimentalBorder","radius","style","width","position","sticky","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","layout","allowSizingOnChildren","editorStyle","exports","settings","icon","example","innerBlocks","customTextColor","content","__","transforms","edit","save","deprecated","variations","init","initBlock"],"sources":["@wordpress/block-library/src/group/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { group as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\nimport variations from './variations';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tstyle: {\n\t\t\t\tcolor: {\n\t\t\t\t\ttext: '#000000',\n\t\t\t\t\tbackground: '#ffffff',\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#cf2e2e',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'One.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#ff6900',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Two.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#fcb900',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Three.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#00d084',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Four.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#0693e3',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Five.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#9b51e0',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Six.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tdeprecated,\n\tvariations,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,KAAA,GAAAF,sBAAA,CAAAH,OAAA;AAEA,IAAAM,KAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,WAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,WAAA,GAAAL,sBAAA,CAAAH,OAAA;AAfA;AACA;AACA;AAIA;AACA;AACA;AAFA,MAAAS,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAA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ACJC,IAAI,EAAJA,aAAI;EACJC,UAAU,EAAVA,mBAAU;EACVC,UAAU,EAAVA;AACD,CAAC;AAACZ,OAAA,CAAAC,QAAA,GAAAA,QAAA;AAEK,MAAMY,IAAI,GAAGA,CAAA,KAAM,IAAAC,kBAAS,EAAE;EAAEpE,IAAI;EAAEH,QAAQ;EAAE0D;AAAS,CAAE,CAAC;AAACD,OAAA,CAAAa,IAAA,GAAAA,IAAA"}
|
|
@@ -323,7 +323,8 @@ function CoverEdit({
|
|
|
323
323
|
minHeight: newMinHeight
|
|
324
324
|
});
|
|
325
325
|
},
|
|
326
|
-
|
|
326
|
+
// Hide the resize handle if an aspect ratio is set, as the aspect ratio takes precedence.
|
|
327
|
+
showHandle: !attributes.style?.dimensions?.aspectRatio ? true : false,
|
|
327
328
|
size: resizableBoxDimensions,
|
|
328
329
|
width
|
|
329
330
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","useEntityProp","store","coreStore","useEffect","useMemo","useRef","Placeholder","Spinner","compose","useResizeObserver","withColors","ColorPalette","useBlockProps","useSettings","useInnerBlocksProps","__experimentalUseGradient","blockEditorStore","__","useSelect","useDispatch","isBlobURL","noticesStore","attributesFromMedia","IMAGE_BACKGROUND_TYPE","VIDEO_BACKGROUND_TYPE","dimRatioToClass","isContentPositionCenter","getPositionClassName","mediaPosition","CoverInspectorControls","CoverBlockControls","CoverPlaceholder","ResizableCoverPopover","getMediaColor","compositeIsDark","DEFAULT_BACKGROUND_COLOR","DEFAULT_OVERLAY_COLOR","getInnerBlocksTemplate","attributes","align","placeholder","isTemporaryMedia","id","url","CoverEdit","clientId","isSelected","overlayColor","setAttributes","setOverlayColor","toggleSelection","context","postId","postType","contentPosition","originalUrl","backgroundType","originalBackgroundType","useFeaturedImage","dimRatio","focalPoint","hasParallax","isDark","isRepeated","minHeight","minHeightUnit","alt","allowedBlocks","templateLock","tagName","TagName","isUserOverlayColor","featuredImage","__unstableMarkNextChangeAsNotPersistent","media","select","getMedia","mediaUrl","source_url","averageBackgroundColor","newOverlayColor","color","newIsDark","replaceAll","createErrorNotice","gradientClass","gradientValue","onSelectMedia","newMedia","mediaAttributes","isImage","type","media_type","includes","undefined","newDimRatio","onClearMedia","onSetOverlayColor","onUpdateDimRatio","onUploadError","message","isUploadingMedia","isImageBackground","isVideoBackground","resizeListener","height","width","resizableBoxDimensions","minHeightWithUnit","isImgElement","style","backgroundImage","backgroundPosition","bgStyle","backgroundColor","mediaStyle","objectPosition","hasBackground","hasInnerBlocks","getBlock","innerBlocks","length","ref","blockProps","fontSizes","hasFontSizes","innerBlocksTemplate","fontSize","innerBlocksProps","className","template","templateInsertUpdatesSelection","dropZoneElement","current","mediaElement","currentSettings","toggleUseFeaturedImage","newUseFeaturedImage","blockControls","createElement","inspectorControls","coverRef","updateDimRatio","resizableCoverProps","onResizeStart","onResize","value","onResizeStop","newMinHeight","showHandle","size","Fragment","onError","disableCustomColors","onChange","clearable","classes","class","withIllustration","src","role","autoPlay","muted","loop","disableMediaButtons"],"sources":["@wordpress/block-library/src/cover/edit/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useEntityProp, store as coreStore } from '@wordpress/core-data';\nimport { useEffect, useMemo, useRef } from '@wordpress/element';\nimport { Placeholder, Spinner } from '@wordpress/components';\nimport { compose, useResizeObserver } from '@wordpress/compose';\nimport {\n\twithColors,\n\tColorPalette,\n\tuseBlockProps,\n\tuseSettings,\n\tuseInnerBlocksProps,\n\t__experimentalUseGradient,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { isBlobURL } from '@wordpress/blob';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport {\n\tattributesFromMedia,\n\tIMAGE_BACKGROUND_TYPE,\n\tVIDEO_BACKGROUND_TYPE,\n\tdimRatioToClass,\n\tisContentPositionCenter,\n\tgetPositionClassName,\n\tmediaPosition,\n} from '../shared';\nimport CoverInspectorControls from './inspector-controls';\nimport CoverBlockControls from './block-controls';\nimport CoverPlaceholder from './cover-placeholder';\nimport ResizableCoverPopover from './resizable-cover-popover';\nimport {\n\tgetMediaColor,\n\tcompositeIsDark,\n\tDEFAULT_BACKGROUND_COLOR,\n\tDEFAULT_OVERLAY_COLOR,\n} from './color-utils';\n\nfunction getInnerBlocksTemplate( attributes ) {\n\treturn [\n\t\t[\n\t\t\t'core/paragraph',\n\t\t\t{\n\t\t\t\talign: 'center',\n\t\t\t\tplaceholder: __( 'Write title…' ),\n\t\t\t\t...attributes,\n\t\t\t},\n\t\t],\n\t];\n}\n\n/**\n * Is the URL a temporary blob URL? A blob URL is one that is used temporarily while\n * the media (image or video) is being uploaded and will not have an id allocated yet.\n *\n * @param {number} id The id of the media.\n * @param {string} url The url of the media.\n *\n * @return {boolean} Is the URL a Blob URL.\n */\nconst isTemporaryMedia = ( id, url ) => ! id && isBlobURL( url );\n\nfunction CoverEdit( {\n\tattributes,\n\tclientId,\n\tisSelected,\n\toverlayColor,\n\tsetAttributes,\n\tsetOverlayColor,\n\ttoggleSelection,\n\tcontext: { postId, postType },\n} ) {\n\tconst {\n\t\tcontentPosition,\n\t\tid,\n\t\turl: originalUrl,\n\t\tbackgroundType: originalBackgroundType,\n\t\tuseFeaturedImage,\n\t\tdimRatio,\n\t\tfocalPoint,\n\t\thasParallax,\n\t\tisDark,\n\t\tisRepeated,\n\t\tminHeight,\n\t\tminHeightUnit,\n\t\talt,\n\t\tallowedBlocks,\n\t\ttemplateLock,\n\t\ttagName: TagName = 'div',\n\t\tisUserOverlayColor,\n\t} = attributes;\n\n\tconst [ featuredImage ] = useEntityProp(\n\t\t'postType',\n\t\tpostType,\n\t\t'featured_media',\n\t\tpostId\n\t);\n\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\tconst media = useSelect(\n\t\t( select ) =>\n\t\t\tfeaturedImage &&\n\t\t\tselect( coreStore ).getMedia( featuredImage, { context: 'view' } ),\n\t\t[ featuredImage ]\n\t);\n\tconst mediaUrl = media?.source_url;\n\n\t// User can change the featured image outside of the block, but we still\n\t// need to update the block when that happens. This effect should only\n\t// run when the featured image changes in that case. All other cases are\n\t// handled in their respective callbacks.\n\tuseEffect( () => {\n\t\t( async () => {\n\t\t\tif ( ! useFeaturedImage ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst averageBackgroundColor = await getMediaColor( mediaUrl );\n\n\t\t\tlet newOverlayColor = overlayColor.color;\n\t\t\tif ( ! isUserOverlayColor ) {\n\t\t\t\tnewOverlayColor = averageBackgroundColor;\n\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\tsetOverlayColor( newOverlayColor );\n\t\t\t}\n\n\t\t\tconst newIsDark = compositeIsDark(\n\t\t\t\tdimRatio,\n\t\t\t\tnewOverlayColor,\n\t\t\t\taverageBackgroundColor\n\t\t\t);\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( { isDark: newIsDark } );\n\t\t} )();\n\t\t// Disable reason: Update the block only when the featured image changes.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ mediaUrl ] );\n\n\t// instead of destructuring the attributes\n\t// we define the url and background type\n\t// depending on the value of the useFeaturedImage flag\n\t// to preview in edit the dynamic featured image\n\tconst url = useFeaturedImage\n\t\t? mediaUrl\n\t\t: // Ensure the url is not malformed due to sanitization through `wp_kses`.\n\t\t originalUrl?.replaceAll( '&', '&' );\n\tconst backgroundType = useFeaturedImage\n\t\t? IMAGE_BACKGROUND_TYPE\n\t\t: originalBackgroundType;\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst { gradientClass, gradientValue } = __experimentalUseGradient();\n\n\tconst onSelectMedia = async ( newMedia ) => {\n\t\tconst mediaAttributes = attributesFromMedia( newMedia );\n\t\tconst isImage = [ newMedia?.type, newMedia?.media_type ].includes(\n\t\t\tIMAGE_BACKGROUND_TYPE\n\t\t);\n\n\t\tconst averageBackgroundColor = await getMediaColor(\n\t\t\tisImage ? newMedia?.url : undefined\n\t\t);\n\n\t\tlet newOverlayColor = overlayColor.color;\n\t\tif ( ! isUserOverlayColor ) {\n\t\t\tnewOverlayColor = averageBackgroundColor;\n\t\t\tsetOverlayColor( newOverlayColor );\n\n\t\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t}\n\n\t\t// Only set a new dimRatio if there was no previous media selected\n\t\t// to avoid resetting to 50 if it has been explicitly set to 100.\n\t\t// See issue #52835 for context.\n\t\tconst newDimRatio =\n\t\t\toriginalUrl === undefined && dimRatio === 100 ? 50 : dimRatio;\n\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tnewDimRatio,\n\t\t\tnewOverlayColor,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\t...mediaAttributes,\n\t\t\tfocalPoint: undefined,\n\t\t\tuseFeaturedImage: undefined,\n\t\t\tdimRatio: newDimRatio,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onClearMedia = () => {\n\t\tlet newOverlayColor = overlayColor.color;\n\t\tif ( ! isUserOverlayColor ) {\n\t\t\tnewOverlayColor = DEFAULT_OVERLAY_COLOR;\n\t\t\tsetOverlayColor( undefined );\n\n\t\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t}\n\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tdimRatio,\n\t\t\tnewOverlayColor,\n\t\t\tDEFAULT_BACKGROUND_COLOR\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\turl: undefined,\n\t\t\tid: undefined,\n\t\t\tbackgroundType: undefined,\n\t\t\tfocalPoint: undefined,\n\t\t\thasParallax: undefined,\n\t\t\tisRepeated: undefined,\n\t\t\tuseFeaturedImage: undefined,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onSetOverlayColor = async ( newOverlayColor ) => {\n\t\tconst averageBackgroundColor = await getMediaColor( url );\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tdimRatio,\n\t\t\tnewOverlayColor,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetOverlayColor( newOverlayColor );\n\n\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\n\t\tsetAttributes( {\n\t\t\tisUserOverlayColor: true,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onUpdateDimRatio = async ( newDimRatio ) => {\n\t\tconst averageBackgroundColor = await getMediaColor( url );\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tnewDimRatio,\n\t\t\toverlayColor.color,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\tdimRatio: newDimRatio,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onUploadError = ( message ) => {\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t};\n\n\tconst isUploadingMedia = isTemporaryMedia( id, url );\n\n\tconst isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;\n\tconst isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;\n\n\tconst [ resizeListener, { height, width } ] = useResizeObserver();\n\tconst resizableBoxDimensions = useMemo( () => {\n\t\treturn {\n\t\t\theight: minHeightUnit === 'px' ? minHeight : 'auto',\n\t\t\twidth: 'auto',\n\t\t};\n\t}, [ minHeight, minHeightUnit ] );\n\n\tconst minHeightWithUnit =\n\t\tminHeight && minHeightUnit\n\t\t\t? `${ minHeight }${ minHeightUnit }`\n\t\t\t: minHeight;\n\n\tconst isImgElement = ! ( hasParallax || isRepeated );\n\n\tconst style = {\n\t\tminHeight: minHeightWithUnit || undefined,\n\t};\n\n\tconst backgroundImage = url ? `url(${ url })` : undefined;\n\n\tconst backgroundPosition = mediaPosition( focalPoint );\n\n\tconst bgStyle = { backgroundColor: overlayColor.color };\n\tconst mediaStyle = {\n\t\tobjectPosition:\n\t\t\tfocalPoint && isImgElement\n\t\t\t\t? mediaPosition( focalPoint )\n\t\t\t\t: undefined,\n\t};\n\n\tconst hasBackground = !! ( url || overlayColor.color || gradientValue );\n\n\tconst hasInnerBlocks = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getBlock( clientId ).innerBlocks.length >\n\t\t\t0,\n\t\t[ clientId ]\n\t);\n\n\tconst ref = useRef();\n\tconst blockProps = useBlockProps( { ref } );\n\n\t// Check for fontSize support before we pass a fontSize attribute to the innerBlocks.\n\tconst [ fontSizes ] = useSettings( 'typography.fontSizes' );\n\tconst hasFontSizes = fontSizes?.length > 0;\n\tconst innerBlocksTemplate = getInnerBlocksTemplate( {\n\t\tfontSize: hasFontSizes ? 'large' : undefined,\n\t} );\n\n\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{\n\t\t\tclassName: 'wp-block-cover__inner-container',\n\t\t},\n\t\t{\n\t\t\t// Avoid template sync when the `templateLock` value is `all` or `contentOnly`.\n\t\t\t// See: https://github.com/WordPress/gutenberg/pull/45632\n\t\t\ttemplate: ! hasInnerBlocks ? innerBlocksTemplate : undefined,\n\t\t\ttemplateInsertUpdatesSelection: true,\n\t\t\tallowedBlocks,\n\t\t\ttemplateLock,\n\t\t\tdropZoneElement: ref.current,\n\t\t}\n\t);\n\n\tconst mediaElement = useRef();\n\tconst currentSettings = {\n\t\tisVideoBackground,\n\t\tisImageBackground,\n\t\tmediaElement,\n\t\thasInnerBlocks,\n\t\turl,\n\t\tisImgElement,\n\t\toverlayColor,\n\t};\n\n\tconst toggleUseFeaturedImage = async () => {\n\t\tconst newUseFeaturedImage = ! useFeaturedImage;\n\n\t\tconst averageBackgroundColor = newUseFeaturedImage\n\t\t\t? await getMediaColor( mediaUrl )\n\t\t\t: DEFAULT_BACKGROUND_COLOR;\n\n\t\tconst newOverlayColor = ! isUserOverlayColor\n\t\t\t? averageBackgroundColor\n\t\t\t: overlayColor.color;\n\n\t\tif ( ! isUserOverlayColor ) {\n\t\t\tif ( newUseFeaturedImage ) {\n\t\t\t\tsetOverlayColor( newOverlayColor );\n\t\t\t} else {\n\t\t\t\tsetOverlayColor( undefined );\n\t\t\t}\n\n\t\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t}\n\n\t\tconst newDimRatio = dimRatio === 100 ? 50 : dimRatio;\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tnewDimRatio,\n\t\t\tnewOverlayColor,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\tid: undefined,\n\t\t\turl: undefined,\n\t\t\tuseFeaturedImage: newUseFeaturedImage,\n\t\t\tdimRatio: newDimRatio,\n\t\t\tbackgroundType: useFeaturedImage\n\t\t\t\t? IMAGE_BACKGROUND_TYPE\n\t\t\t\t: undefined,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst blockControls = (\n\t\t<CoverBlockControls\n\t\t\tattributes={ attributes }\n\t\t\tsetAttributes={ setAttributes }\n\t\t\tonSelectMedia={ onSelectMedia }\n\t\t\tcurrentSettings={ currentSettings }\n\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t/>\n\t);\n\n\tconst inspectorControls = (\n\t\t<CoverInspectorControls\n\t\t\tattributes={ attributes }\n\t\t\tsetAttributes={ setAttributes }\n\t\t\tclientId={ clientId }\n\t\t\tsetOverlayColor={ onSetOverlayColor }\n\t\t\tcoverRef={ ref }\n\t\t\tcurrentSettings={ currentSettings }\n\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\tupdateDimRatio={ onUpdateDimRatio }\n\t\t\tonClearMedia={ onClearMedia }\n\t\t/>\n\t);\n\n\tconst resizableCoverProps = {\n\t\tclassName: 'block-library-cover__resize-container',\n\t\tclientId,\n\t\theight,\n\t\tminHeight: minHeightWithUnit,\n\t\tonResizeStart: () => {\n\t\t\tsetAttributes( { minHeightUnit: 'px' } );\n\t\t\ttoggleSelection( false );\n\t\t},\n\t\tonResize: ( value ) => {\n\t\t\tsetAttributes( { minHeight: value } );\n\t\t},\n\t\tonResizeStop: ( newMinHeight ) => {\n\t\t\ttoggleSelection( true );\n\t\t\tsetAttributes( { minHeight: newMinHeight } );\n\t\t},\n\t\tshowHandle: true,\n\t\tsize: resizableBoxDimensions,\n\t\twidth,\n\t};\n\n\tif ( ! useFeaturedImage && ! hasInnerBlocks && ! hasBackground ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ blockControls }\n\t\t\t\t{ inspectorControls }\n\t\t\t\t{ isSelected && (\n\t\t\t\t\t<ResizableCoverPopover { ...resizableCoverProps } />\n\t\t\t\t) }\n\t\t\t\t<TagName\n\t\t\t\t\t{ ...blockProps }\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'is-placeholder',\n\t\t\t\t\t\tblockProps.className\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...blockProps.style,\n\t\t\t\t\t\tminHeight: minHeightWithUnit || undefined,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ resizeListener }\n\t\t\t\t\t<CoverPlaceholder\n\t\t\t\t\t\tonSelectMedia={ onSelectMedia }\n\t\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"wp-block-cover__placeholder-background-options\">\n\t\t\t\t\t\t\t<ColorPalette\n\t\t\t\t\t\t\t\tdisableCustomColors={ true }\n\t\t\t\t\t\t\t\tvalue={ overlayColor.color }\n\t\t\t\t\t\t\t\tonChange={ onSetOverlayColor }\n\t\t\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CoverPlaceholder>\n\t\t\t\t</TagName>\n\t\t\t</>\n\t\t);\n\t}\n\n\tconst classes = classnames(\n\t\t{\n\t\t\t'is-dark-theme': isDark,\n\t\t\t'is-light': ! isDark,\n\t\t\t'is-transient': isUploadingMedia,\n\t\t\t'has-parallax': hasParallax,\n\t\t\t'is-repeated': isRepeated,\n\t\t\t'has-custom-content-position':\n\t\t\t\t! isContentPositionCenter( contentPosition ),\n\t\t},\n\t\tgetPositionClassName( contentPosition )\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<TagName\n\t\t\t\t{ ...blockProps }\n\t\t\t\tclassName={ classnames( classes, blockProps.className ) }\n\t\t\t\tstyle={ { ...style, ...blockProps.style } }\n\t\t\t\tdata-url={ url }\n\t\t\t>\n\t\t\t\t{ resizeListener }\n\t\t\t\t{ ( ! useFeaturedImage || url ) && (\n\t\t\t\t\t<span\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'wp-block-cover__background',\n\t\t\t\t\t\t\tdimRatioToClass( dimRatio ),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t[ overlayColor.class ]: overlayColor.class,\n\t\t\t\t\t\t\t\t'has-background-dim': dimRatio !== undefined,\n\t\t\t\t\t\t\t\t// For backwards compatibility. Former versions of the Cover Block applied\n\t\t\t\t\t\t\t\t// `.wp-block-cover__gradient-background` in the presence of\n\t\t\t\t\t\t\t\t// media, a gradient and a dim.\n\t\t\t\t\t\t\t\t'wp-block-cover__gradient-background':\n\t\t\t\t\t\t\t\t\turl && gradientValue && dimRatio !== 0,\n\t\t\t\t\t\t\t\t'has-background-gradient': gradientValue,\n\t\t\t\t\t\t\t\t[ gradientClass ]: gradientClass,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tstyle={ { backgroundImage: gradientValue, ...bgStyle } }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ ! url && useFeaturedImage && (\n\t\t\t\t\t<Placeholder\n\t\t\t\t\t\tclassName=\"wp-block-cover__image--placeholder-image\"\n\t\t\t\t\t\twithIllustration={ true }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ url &&\n\t\t\t\t\tisImageBackground &&\n\t\t\t\t\t( isImgElement ? (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tref={ mediaElement }\n\t\t\t\t\t\t\tclassName=\"wp-block-cover__image-background\"\n\t\t\t\t\t\t\talt={ alt }\n\t\t\t\t\t\t\tsrc={ url }\n\t\t\t\t\t\t\tstyle={ mediaStyle }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tref={ mediaElement }\n\t\t\t\t\t\t\trole={ alt ? 'img' : undefined }\n\t\t\t\t\t\t\taria-label={ alt ? alt : undefined }\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\tclasses,\n\t\t\t\t\t\t\t\t'wp-block-cover__image-background'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tstyle={ { backgroundImage, backgroundPosition } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t{ url && isVideoBackground && (\n\t\t\t\t\t<video\n\t\t\t\t\t\tref={ mediaElement }\n\t\t\t\t\t\tclassName=\"wp-block-cover__video-background\"\n\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\tmuted\n\t\t\t\t\t\tloop\n\t\t\t\t\t\tsrc={ url }\n\t\t\t\t\t\tstyle={ mediaStyle }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ isUploadingMedia && <Spinner /> }\n\t\t\t\t<CoverPlaceholder\n\t\t\t\t\tdisableMediaButtons\n\t\t\t\t\tonSelectMedia={ onSelectMedia }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\t\t/>\n\t\t\t\t<div { ...innerBlocksProps } />\n\t\t\t</TagName>\n\t\t\t{ isSelected && (\n\t\t\t\t<ResizableCoverPopover { ...resizableCoverProps } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default compose( [\n\twithColors( { overlayColor: 'background-color' } ),\n] )( CoverEdit );\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,aAAa,EAAEC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACxE,SAASC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ,oBAAoB;AAC/D,SAASC,WAAW,EAAEC,OAAO,QAAQ,uBAAuB;AAC5D,SAASC,OAAO,EAAEC,iBAAiB,QAAQ,oBAAoB;AAC/D,SACCC,UAAU,EACVC,YAAY,EACZC,aAAa,EACbC,WAAW,EACXC,mBAAmB,EACnBC,yBAAyB,EACzBd,KAAK,IAAIe,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASnB,KAAK,IAAIoB,YAAY,QAAQ,oBAAoB;;AAE1D;AACA;AACA;AACA,SACCC,mBAAmB,EACnBC,qBAAqB,EACrBC,qBAAqB,EACrBC,eAAe,EACfC,uBAAuB,EACvBC,oBAAoB,EACpBC,aAAa,QACP,WAAW;AAClB,OAAOC,sBAAsB,MAAM,sBAAsB;AACzD,OAAOC,kBAAkB,MAAM,kBAAkB;AACjD,OAAOC,gBAAgB,MAAM,qBAAqB;AAClD,OAAOC,qBAAqB,MAAM,2BAA2B;AAC7D,SACCC,aAAa,EACbC,eAAe,EACfC,wBAAwB,EACxBC,qBAAqB,QACf,eAAe;AAEtB,SAASC,sBAAsBA,CAAEC,UAAU,EAAG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c;IACpBL,SAAS,EAAC,kCAAkC;IAC5CgC,QAAQ;IACRC,KAAK;IACLC,IAAI;IACJJ,GAAG,EAAGpH,GAAK;IACXmE,KAAK,EAAGK;EAAY,CACpB,CACD,EACCd,gBAAgB,IAAIsC,aAAA,CAACpI,OAAO,MAAE,CAAC,EACjCoI,aAAA,CAAC5G,gBAAgB;IAChBqI,mBAAmB;IACnB7E,aAAa,EAAGA,aAAe;IAC/BiE,OAAO,EAAGrD,aAAe;IACzBqC,sBAAsB,EAAGA;EAAwB,CACjD,CAAC,EACFG,aAAA;IAAA,GAAUX;EAAgB,CAAI,CACtB,CAAC,EACRlF,UAAU,IACX6F,aAAA,CAAC3G,qBAAqB;IAAA,GAAM+G;EAAmB,CAAI,CAEnD,CAAC;AAEL;AAEA,eAAevI,OAAO,CAAE,CACvBE,UAAU,CAAE;EAAEqC,YAAY,EAAE;AAAmB,CAAE,CAAC,CACjD,CAAC,CAAEH,SAAU,CAAC"}
|
|
1
|
+
{"version":3,"names":["classnames","useEntityProp","store","coreStore","useEffect","useMemo","useRef","Placeholder","Spinner","compose","useResizeObserver","withColors","ColorPalette","useBlockProps","useSettings","useInnerBlocksProps","__experimentalUseGradient","blockEditorStore","__","useSelect","useDispatch","isBlobURL","noticesStore","attributesFromMedia","IMAGE_BACKGROUND_TYPE","VIDEO_BACKGROUND_TYPE","dimRatioToClass","isContentPositionCenter","getPositionClassName","mediaPosition","CoverInspectorControls","CoverBlockControls","CoverPlaceholder","ResizableCoverPopover","getMediaColor","compositeIsDark","DEFAULT_BACKGROUND_COLOR","DEFAULT_OVERLAY_COLOR","getInnerBlocksTemplate","attributes","align","placeholder","isTemporaryMedia","id","url","CoverEdit","clientId","isSelected","overlayColor","setAttributes","setOverlayColor","toggleSelection","context","postId","postType","contentPosition","originalUrl","backgroundType","originalBackgroundType","useFeaturedImage","dimRatio","focalPoint","hasParallax","isDark","isRepeated","minHeight","minHeightUnit","alt","allowedBlocks","templateLock","tagName","TagName","isUserOverlayColor","featuredImage","__unstableMarkNextChangeAsNotPersistent","media","select","getMedia","mediaUrl","source_url","averageBackgroundColor","newOverlayColor","color","newIsDark","replaceAll","createErrorNotice","gradientClass","gradientValue","onSelectMedia","newMedia","mediaAttributes","isImage","type","media_type","includes","undefined","newDimRatio","onClearMedia","onSetOverlayColor","onUpdateDimRatio","onUploadError","message","isUploadingMedia","isImageBackground","isVideoBackground","resizeListener","height","width","resizableBoxDimensions","minHeightWithUnit","isImgElement","style","backgroundImage","backgroundPosition","bgStyle","backgroundColor","mediaStyle","objectPosition","hasBackground","hasInnerBlocks","getBlock","innerBlocks","length","ref","blockProps","fontSizes","hasFontSizes","innerBlocksTemplate","fontSize","innerBlocksProps","className","template","templateInsertUpdatesSelection","dropZoneElement","current","mediaElement","currentSettings","toggleUseFeaturedImage","newUseFeaturedImage","blockControls","createElement","inspectorControls","coverRef","updateDimRatio","resizableCoverProps","onResizeStart","onResize","value","onResizeStop","newMinHeight","showHandle","dimensions","aspectRatio","size","Fragment","onError","disableCustomColors","onChange","clearable","classes","class","withIllustration","src","role","autoPlay","muted","loop","disableMediaButtons"],"sources":["@wordpress/block-library/src/cover/edit/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useEntityProp, store as coreStore } from '@wordpress/core-data';\nimport { useEffect, useMemo, useRef } from '@wordpress/element';\nimport { Placeholder, Spinner } from '@wordpress/components';\nimport { compose, useResizeObserver } from '@wordpress/compose';\nimport {\n\twithColors,\n\tColorPalette,\n\tuseBlockProps,\n\tuseSettings,\n\tuseInnerBlocksProps,\n\t__experimentalUseGradient,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { isBlobURL } from '@wordpress/blob';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport {\n\tattributesFromMedia,\n\tIMAGE_BACKGROUND_TYPE,\n\tVIDEO_BACKGROUND_TYPE,\n\tdimRatioToClass,\n\tisContentPositionCenter,\n\tgetPositionClassName,\n\tmediaPosition,\n} from '../shared';\nimport CoverInspectorControls from './inspector-controls';\nimport CoverBlockControls from './block-controls';\nimport CoverPlaceholder from './cover-placeholder';\nimport ResizableCoverPopover from './resizable-cover-popover';\nimport {\n\tgetMediaColor,\n\tcompositeIsDark,\n\tDEFAULT_BACKGROUND_COLOR,\n\tDEFAULT_OVERLAY_COLOR,\n} from './color-utils';\n\nfunction getInnerBlocksTemplate( attributes ) {\n\treturn [\n\t\t[\n\t\t\t'core/paragraph',\n\t\t\t{\n\t\t\t\talign: 'center',\n\t\t\t\tplaceholder: __( 'Write title…' ),\n\t\t\t\t...attributes,\n\t\t\t},\n\t\t],\n\t];\n}\n\n/**\n * Is the URL a temporary blob URL? A blob URL is one that is used temporarily while\n * the media (image or video) is being uploaded and will not have an id allocated yet.\n *\n * @param {number} id The id of the media.\n * @param {string} url The url of the media.\n *\n * @return {boolean} Is the URL a Blob URL.\n */\nconst isTemporaryMedia = ( id, url ) => ! id && isBlobURL( url );\n\nfunction CoverEdit( {\n\tattributes,\n\tclientId,\n\tisSelected,\n\toverlayColor,\n\tsetAttributes,\n\tsetOverlayColor,\n\ttoggleSelection,\n\tcontext: { postId, postType },\n} ) {\n\tconst {\n\t\tcontentPosition,\n\t\tid,\n\t\turl: originalUrl,\n\t\tbackgroundType: originalBackgroundType,\n\t\tuseFeaturedImage,\n\t\tdimRatio,\n\t\tfocalPoint,\n\t\thasParallax,\n\t\tisDark,\n\t\tisRepeated,\n\t\tminHeight,\n\t\tminHeightUnit,\n\t\talt,\n\t\tallowedBlocks,\n\t\ttemplateLock,\n\t\ttagName: TagName = 'div',\n\t\tisUserOverlayColor,\n\t} = attributes;\n\n\tconst [ featuredImage ] = useEntityProp(\n\t\t'postType',\n\t\tpostType,\n\t\t'featured_media',\n\t\tpostId\n\t);\n\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\tconst media = useSelect(\n\t\t( select ) =>\n\t\t\tfeaturedImage &&\n\t\t\tselect( coreStore ).getMedia( featuredImage, { context: 'view' } ),\n\t\t[ featuredImage ]\n\t);\n\tconst mediaUrl = media?.source_url;\n\n\t// User can change the featured image outside of the block, but we still\n\t// need to update the block when that happens. This effect should only\n\t// run when the featured image changes in that case. All other cases are\n\t// handled in their respective callbacks.\n\tuseEffect( () => {\n\t\t( async () => {\n\t\t\tif ( ! useFeaturedImage ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst averageBackgroundColor = await getMediaColor( mediaUrl );\n\n\t\t\tlet newOverlayColor = overlayColor.color;\n\t\t\tif ( ! isUserOverlayColor ) {\n\t\t\t\tnewOverlayColor = averageBackgroundColor;\n\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\tsetOverlayColor( newOverlayColor );\n\t\t\t}\n\n\t\t\tconst newIsDark = compositeIsDark(\n\t\t\t\tdimRatio,\n\t\t\t\tnewOverlayColor,\n\t\t\t\taverageBackgroundColor\n\t\t\t);\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( { isDark: newIsDark } );\n\t\t} )();\n\t\t// Disable reason: Update the block only when the featured image changes.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ mediaUrl ] );\n\n\t// instead of destructuring the attributes\n\t// we define the url and background type\n\t// depending on the value of the useFeaturedImage flag\n\t// to preview in edit the dynamic featured image\n\tconst url = useFeaturedImage\n\t\t? mediaUrl\n\t\t: // Ensure the url is not malformed due to sanitization through `wp_kses`.\n\t\t originalUrl?.replaceAll( '&', '&' );\n\tconst backgroundType = useFeaturedImage\n\t\t? IMAGE_BACKGROUND_TYPE\n\t\t: originalBackgroundType;\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst { gradientClass, gradientValue } = __experimentalUseGradient();\n\n\tconst onSelectMedia = async ( newMedia ) => {\n\t\tconst mediaAttributes = attributesFromMedia( newMedia );\n\t\tconst isImage = [ newMedia?.type, newMedia?.media_type ].includes(\n\t\t\tIMAGE_BACKGROUND_TYPE\n\t\t);\n\n\t\tconst averageBackgroundColor = await getMediaColor(\n\t\t\tisImage ? newMedia?.url : undefined\n\t\t);\n\n\t\tlet newOverlayColor = overlayColor.color;\n\t\tif ( ! isUserOverlayColor ) {\n\t\t\tnewOverlayColor = averageBackgroundColor;\n\t\t\tsetOverlayColor( newOverlayColor );\n\n\t\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t}\n\n\t\t// Only set a new dimRatio if there was no previous media selected\n\t\t// to avoid resetting to 50 if it has been explicitly set to 100.\n\t\t// See issue #52835 for context.\n\t\tconst newDimRatio =\n\t\t\toriginalUrl === undefined && dimRatio === 100 ? 50 : dimRatio;\n\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tnewDimRatio,\n\t\t\tnewOverlayColor,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\t...mediaAttributes,\n\t\t\tfocalPoint: undefined,\n\t\t\tuseFeaturedImage: undefined,\n\t\t\tdimRatio: newDimRatio,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onClearMedia = () => {\n\t\tlet newOverlayColor = overlayColor.color;\n\t\tif ( ! isUserOverlayColor ) {\n\t\t\tnewOverlayColor = DEFAULT_OVERLAY_COLOR;\n\t\t\tsetOverlayColor( undefined );\n\n\t\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t}\n\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tdimRatio,\n\t\t\tnewOverlayColor,\n\t\t\tDEFAULT_BACKGROUND_COLOR\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\turl: undefined,\n\t\t\tid: undefined,\n\t\t\tbackgroundType: undefined,\n\t\t\tfocalPoint: undefined,\n\t\t\thasParallax: undefined,\n\t\t\tisRepeated: undefined,\n\t\t\tuseFeaturedImage: undefined,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onSetOverlayColor = async ( newOverlayColor ) => {\n\t\tconst averageBackgroundColor = await getMediaColor( url );\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tdimRatio,\n\t\t\tnewOverlayColor,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetOverlayColor( newOverlayColor );\n\n\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\n\t\tsetAttributes( {\n\t\t\tisUserOverlayColor: true,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onUpdateDimRatio = async ( newDimRatio ) => {\n\t\tconst averageBackgroundColor = await getMediaColor( url );\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tnewDimRatio,\n\t\t\toverlayColor.color,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\tdimRatio: newDimRatio,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst onUploadError = ( message ) => {\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t};\n\n\tconst isUploadingMedia = isTemporaryMedia( id, url );\n\n\tconst isImageBackground = IMAGE_BACKGROUND_TYPE === backgroundType;\n\tconst isVideoBackground = VIDEO_BACKGROUND_TYPE === backgroundType;\n\n\tconst [ resizeListener, { height, width } ] = useResizeObserver();\n\tconst resizableBoxDimensions = useMemo( () => {\n\t\treturn {\n\t\t\theight: minHeightUnit === 'px' ? minHeight : 'auto',\n\t\t\twidth: 'auto',\n\t\t};\n\t}, [ minHeight, minHeightUnit ] );\n\n\tconst minHeightWithUnit =\n\t\tminHeight && minHeightUnit\n\t\t\t? `${ minHeight }${ minHeightUnit }`\n\t\t\t: minHeight;\n\n\tconst isImgElement = ! ( hasParallax || isRepeated );\n\n\tconst style = {\n\t\tminHeight: minHeightWithUnit || undefined,\n\t};\n\n\tconst backgroundImage = url ? `url(${ url })` : undefined;\n\n\tconst backgroundPosition = mediaPosition( focalPoint );\n\n\tconst bgStyle = { backgroundColor: overlayColor.color };\n\tconst mediaStyle = {\n\t\tobjectPosition:\n\t\t\tfocalPoint && isImgElement\n\t\t\t\t? mediaPosition( focalPoint )\n\t\t\t\t: undefined,\n\t};\n\n\tconst hasBackground = !! ( url || overlayColor.color || gradientValue );\n\n\tconst hasInnerBlocks = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getBlock( clientId ).innerBlocks.length >\n\t\t\t0,\n\t\t[ clientId ]\n\t);\n\n\tconst ref = useRef();\n\tconst blockProps = useBlockProps( { ref } );\n\n\t// Check for fontSize support before we pass a fontSize attribute to the innerBlocks.\n\tconst [ fontSizes ] = useSettings( 'typography.fontSizes' );\n\tconst hasFontSizes = fontSizes?.length > 0;\n\tconst innerBlocksTemplate = getInnerBlocksTemplate( {\n\t\tfontSize: hasFontSizes ? 'large' : undefined,\n\t} );\n\n\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{\n\t\t\tclassName: 'wp-block-cover__inner-container',\n\t\t},\n\t\t{\n\t\t\t// Avoid template sync when the `templateLock` value is `all` or `contentOnly`.\n\t\t\t// See: https://github.com/WordPress/gutenberg/pull/45632\n\t\t\ttemplate: ! hasInnerBlocks ? innerBlocksTemplate : undefined,\n\t\t\ttemplateInsertUpdatesSelection: true,\n\t\t\tallowedBlocks,\n\t\t\ttemplateLock,\n\t\t\tdropZoneElement: ref.current,\n\t\t}\n\t);\n\n\tconst mediaElement = useRef();\n\tconst currentSettings = {\n\t\tisVideoBackground,\n\t\tisImageBackground,\n\t\tmediaElement,\n\t\thasInnerBlocks,\n\t\turl,\n\t\tisImgElement,\n\t\toverlayColor,\n\t};\n\n\tconst toggleUseFeaturedImage = async () => {\n\t\tconst newUseFeaturedImage = ! useFeaturedImage;\n\n\t\tconst averageBackgroundColor = newUseFeaturedImage\n\t\t\t? await getMediaColor( mediaUrl )\n\t\t\t: DEFAULT_BACKGROUND_COLOR;\n\n\t\tconst newOverlayColor = ! isUserOverlayColor\n\t\t\t? averageBackgroundColor\n\t\t\t: overlayColor.color;\n\n\t\tif ( ! isUserOverlayColor ) {\n\t\t\tif ( newUseFeaturedImage ) {\n\t\t\t\tsetOverlayColor( newOverlayColor );\n\t\t\t} else {\n\t\t\t\tsetOverlayColor( undefined );\n\t\t\t}\n\n\t\t\t// Make undo revert the next setAttributes and the previous setOverlayColor.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t}\n\n\t\tconst newDimRatio = dimRatio === 100 ? 50 : dimRatio;\n\t\tconst newIsDark = compositeIsDark(\n\t\t\tnewDimRatio,\n\t\t\tnewOverlayColor,\n\t\t\taverageBackgroundColor\n\t\t);\n\n\t\tsetAttributes( {\n\t\t\tid: undefined,\n\t\t\turl: undefined,\n\t\t\tuseFeaturedImage: newUseFeaturedImage,\n\t\t\tdimRatio: newDimRatio,\n\t\t\tbackgroundType: useFeaturedImage\n\t\t\t\t? IMAGE_BACKGROUND_TYPE\n\t\t\t\t: undefined,\n\t\t\tisDark: newIsDark,\n\t\t} );\n\t};\n\n\tconst blockControls = (\n\t\t<CoverBlockControls\n\t\t\tattributes={ attributes }\n\t\t\tsetAttributes={ setAttributes }\n\t\t\tonSelectMedia={ onSelectMedia }\n\t\t\tcurrentSettings={ currentSettings }\n\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t/>\n\t);\n\n\tconst inspectorControls = (\n\t\t<CoverInspectorControls\n\t\t\tattributes={ attributes }\n\t\t\tsetAttributes={ setAttributes }\n\t\t\tclientId={ clientId }\n\t\t\tsetOverlayColor={ onSetOverlayColor }\n\t\t\tcoverRef={ ref }\n\t\t\tcurrentSettings={ currentSettings }\n\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\tupdateDimRatio={ onUpdateDimRatio }\n\t\t\tonClearMedia={ onClearMedia }\n\t\t/>\n\t);\n\n\tconst resizableCoverProps = {\n\t\tclassName: 'block-library-cover__resize-container',\n\t\tclientId,\n\t\theight,\n\t\tminHeight: minHeightWithUnit,\n\t\tonResizeStart: () => {\n\t\t\tsetAttributes( { minHeightUnit: 'px' } );\n\t\t\ttoggleSelection( false );\n\t\t},\n\t\tonResize: ( value ) => {\n\t\t\tsetAttributes( { minHeight: value } );\n\t\t},\n\t\tonResizeStop: ( newMinHeight ) => {\n\t\t\ttoggleSelection( true );\n\t\t\tsetAttributes( { minHeight: newMinHeight } );\n\t\t},\n\t\t// Hide the resize handle if an aspect ratio is set, as the aspect ratio takes precedence.\n\t\tshowHandle: ! attributes.style?.dimensions?.aspectRatio ? true : false,\n\t\tsize: resizableBoxDimensions,\n\t\twidth,\n\t};\n\n\tif ( ! useFeaturedImage && ! hasInnerBlocks && ! hasBackground ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ blockControls }\n\t\t\t\t{ inspectorControls }\n\t\t\t\t{ isSelected && (\n\t\t\t\t\t<ResizableCoverPopover { ...resizableCoverProps } />\n\t\t\t\t) }\n\t\t\t\t<TagName\n\t\t\t\t\t{ ...blockProps }\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'is-placeholder',\n\t\t\t\t\t\tblockProps.className\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...blockProps.style,\n\t\t\t\t\t\tminHeight: minHeightWithUnit || undefined,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ resizeListener }\n\t\t\t\t\t<CoverPlaceholder\n\t\t\t\t\t\tonSelectMedia={ onSelectMedia }\n\t\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"wp-block-cover__placeholder-background-options\">\n\t\t\t\t\t\t\t<ColorPalette\n\t\t\t\t\t\t\t\tdisableCustomColors={ true }\n\t\t\t\t\t\t\t\tvalue={ overlayColor.color }\n\t\t\t\t\t\t\t\tonChange={ onSetOverlayColor }\n\t\t\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</CoverPlaceholder>\n\t\t\t\t</TagName>\n\t\t\t</>\n\t\t);\n\t}\n\n\tconst classes = classnames(\n\t\t{\n\t\t\t'is-dark-theme': isDark,\n\t\t\t'is-light': ! isDark,\n\t\t\t'is-transient': isUploadingMedia,\n\t\t\t'has-parallax': hasParallax,\n\t\t\t'is-repeated': isRepeated,\n\t\t\t'has-custom-content-position':\n\t\t\t\t! isContentPositionCenter( contentPosition ),\n\t\t},\n\t\tgetPositionClassName( contentPosition )\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<TagName\n\t\t\t\t{ ...blockProps }\n\t\t\t\tclassName={ classnames( classes, blockProps.className ) }\n\t\t\t\tstyle={ { ...style, ...blockProps.style } }\n\t\t\t\tdata-url={ url }\n\t\t\t>\n\t\t\t\t{ resizeListener }\n\t\t\t\t{ ( ! useFeaturedImage || url ) && (\n\t\t\t\t\t<span\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'wp-block-cover__background',\n\t\t\t\t\t\t\tdimRatioToClass( dimRatio ),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t[ overlayColor.class ]: overlayColor.class,\n\t\t\t\t\t\t\t\t'has-background-dim': dimRatio !== undefined,\n\t\t\t\t\t\t\t\t// For backwards compatibility. Former versions of the Cover Block applied\n\t\t\t\t\t\t\t\t// `.wp-block-cover__gradient-background` in the presence of\n\t\t\t\t\t\t\t\t// media, a gradient and a dim.\n\t\t\t\t\t\t\t\t'wp-block-cover__gradient-background':\n\t\t\t\t\t\t\t\t\turl && gradientValue && dimRatio !== 0,\n\t\t\t\t\t\t\t\t'has-background-gradient': gradientValue,\n\t\t\t\t\t\t\t\t[ gradientClass ]: gradientClass,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tstyle={ { backgroundImage: gradientValue, ...bgStyle } }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ ! url && useFeaturedImage && (\n\t\t\t\t\t<Placeholder\n\t\t\t\t\t\tclassName=\"wp-block-cover__image--placeholder-image\"\n\t\t\t\t\t\twithIllustration={ true }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ url &&\n\t\t\t\t\tisImageBackground &&\n\t\t\t\t\t( isImgElement ? (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tref={ mediaElement }\n\t\t\t\t\t\t\tclassName=\"wp-block-cover__image-background\"\n\t\t\t\t\t\t\talt={ alt }\n\t\t\t\t\t\t\tsrc={ url }\n\t\t\t\t\t\t\tstyle={ mediaStyle }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tref={ mediaElement }\n\t\t\t\t\t\t\trole={ alt ? 'img' : undefined }\n\t\t\t\t\t\t\taria-label={ alt ? alt : undefined }\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\tclasses,\n\t\t\t\t\t\t\t\t'wp-block-cover__image-background'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tstyle={ { backgroundImage, backgroundPosition } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t{ url && isVideoBackground && (\n\t\t\t\t\t<video\n\t\t\t\t\t\tref={ mediaElement }\n\t\t\t\t\t\tclassName=\"wp-block-cover__video-background\"\n\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\tmuted\n\t\t\t\t\t\tloop\n\t\t\t\t\t\tsrc={ url }\n\t\t\t\t\t\tstyle={ mediaStyle }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ isUploadingMedia && <Spinner /> }\n\t\t\t\t<CoverPlaceholder\n\t\t\t\t\tdisableMediaButtons\n\t\t\t\t\tonSelectMedia={ onSelectMedia }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\ttoggleUseFeaturedImage={ toggleUseFeaturedImage }\n\t\t\t\t/>\n\t\t\t\t<div { ...innerBlocksProps } />\n\t\t\t</TagName>\n\t\t\t{ isSelected && (\n\t\t\t\t<ResizableCoverPopover { ...resizableCoverProps } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default compose( [\n\twithColors( { overlayColor: 'background-color' } ),\n] )( CoverEdit );\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,aAAa,EAAEC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACxE,SAASC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ,oBAAoB;AAC/D,SAASC,WAAW,EAAEC,OAAO,QAAQ,uBAAuB;AAC5D,SAASC,OAAO,EAAEC,iBAAiB,QAAQ,oBAAoB;AAC/D,SACCC,UAAU,EACVC,YAAY,EACZC,aAAa,EACbC,WAAW,EACXC,mBAAmB,EACnBC,yBAAyB,EACzBd,KAAK,IAAIe,gBAAgB,QACnB,yBAAyB;AAChC,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASnB,KAAK,IAAIoB,YAAY,QAAQ,oBAAoB;;AAE1D;AACA;AACA;AACA,SACCC,mBAAmB,EACnBC,qBAAqB,EACrBC,qBAAqB,EACrBC,eAAe,EACfC,uBAAuB,EACvBC,oBAAoB,EACpBC,aAAa,QACP,WAAW;AAClB,OAAOC,sBAAsB,MAAM,sBAAsB;AACzD,OAAOC,kBAAkB,MAAM,kBAAkB;AACjD,OAAOC,gBAAgB,MAAM,qBAAqB;AAClD,OAAOC,qBAAqB,M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AAW;IACpCmC,SAAS,EAAGlI,UAAU,CACrB+J,OAAO,EACP,kCACD,CAAG;IACHhD,KAAK,EAAG;MAAEC,eAAe;MAAEC;IAAmB;EAAG,CACjD,CACD,CAAE,EACFrE,GAAG,IAAI4D,iBAAiB,IACzBoC,aAAA;IACCjB,GAAG,EAAGY,YAAc;IACpBL,SAAS,EAAC,kCAAkC;IAC5CkC,QAAQ;IACRC,KAAK;IACLC,IAAI;IACJJ,GAAG,EAAGtH,GAAK;IACXmE,KAAK,EAAGK;EAAY,CACpB,CACD,EACCd,gBAAgB,IAAIsC,aAAA,CAACpI,OAAO,MAAE,CAAC,EACjCoI,aAAA,CAAC5G,gBAAgB;IAChBuI,mBAAmB;IACnB/E,aAAa,EAAGA,aAAe;IAC/BmE,OAAO,EAAGvD,aAAe;IACzBqC,sBAAsB,EAAGA;EAAwB,CACjD,CAAC,EACFG,aAAA;IAAA,GAAUX;EAAgB,CAAI,CACtB,CAAC,EACRlF,UAAU,IACX6F,aAAA,CAAC3G,qBAAqB;IAAA,GAAM+G;EAAmB,CAAI,CAEnD,CAAC;AAEL;AAEA,eAAevI,OAAO,CAAE,CACvBE,UAAU,CAAE;EAAEqC,YAAY,EAAE;AAAmB,CAAE,CAAC,CACjD,CAAC,CAAEH,SAAU,CAAC"}
|
|
@@ -5,13 +5,17 @@ import { createElement, Fragment } from "react";
|
|
|
5
5
|
import { useMemo } from '@wordpress/element';
|
|
6
6
|
import { Button, ExternalLink, FocalPointPicker, PanelBody, PanelRow, RangeControl, TextareaControl, ToggleControl, SelectControl, __experimentalUseCustomUnits as useCustomUnits, __experimentalToolsPanelItem as ToolsPanelItem, __experimentalUnitControl as UnitControl, __experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue } from '@wordpress/components';
|
|
7
7
|
import { useInstanceId } from '@wordpress/compose';
|
|
8
|
-
import { InspectorControls, useSettings, __experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown, __experimentalUseGradient, __experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients } from '@wordpress/block-editor';
|
|
8
|
+
import { InspectorControls, useSettings, __experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown, __experimentalUseGradient, __experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients, privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
9
9
|
import { __ } from '@wordpress/i18n';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Internal dependencies
|
|
13
13
|
*/
|
|
14
14
|
import { COVER_MIN_HEIGHT, mediaPosition } from '../shared';
|
|
15
|
+
import { unlock } from '../../lock-unlock';
|
|
16
|
+
const {
|
|
17
|
+
cleanEmptyObject
|
|
18
|
+
} = unlock(blockEditorPrivateApis);
|
|
15
19
|
function CoverHeightInput({
|
|
16
20
|
onChange,
|
|
17
21
|
onUnitChange,
|
|
@@ -215,8 +219,16 @@ export default function CoverInspectorControls({
|
|
|
215
219
|
value: minHeight,
|
|
216
220
|
unit: minHeightUnit,
|
|
217
221
|
onChange: newMinHeight => setAttributes({
|
|
218
|
-
minHeight: newMinHeight
|
|
222
|
+
minHeight: newMinHeight,
|
|
223
|
+
style: cleanEmptyObject({
|
|
224
|
+
...attributes?.style,
|
|
225
|
+
dimensions: {
|
|
226
|
+
...attributes?.style?.dimensions,
|
|
227
|
+
aspectRatio: undefined // Reset aspect ratio when minHeight is set.
|
|
228
|
+
}
|
|
229
|
+
})
|
|
219
230
|
}),
|
|
231
|
+
|
|
220
232
|
onUnitChange: nextUnit => setAttributes({
|
|
221
233
|
minHeightUnit: nextUnit
|
|
222
234
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","Button","ExternalLink","FocalPointPicker","PanelBody","PanelRow","RangeControl","TextareaControl","ToggleControl","SelectControl","__experimentalUseCustomUnits","useCustomUnits","__experimentalToolsPanelItem","ToolsPanelItem","__experimentalUnitControl","UnitControl","__experimentalParseQuantityAndUnitFromRawValue","parseQuantityAndUnitFromRawValue","useInstanceId","InspectorControls","useSettings","__experimentalColorGradientSettingsDropdown","ColorGradientSettingsDropdown","__experimentalUseGradient","__experimentalUseMultipleOriginColorsAndGradients","useMultipleOriginColorsAndGradients","__","COVER_MIN_HEIGHT","mediaPosition","CoverHeightInput","onChange","onUnitChange","unit","value","instanceId","inputId","isPx","availableUnits","units","defaultValues","px","em","rem","vw","vh","handleOnChange","unprocessedValue","inputValue","parseFloat","undefined","isNaN","computedValue","parsedQuantity","join","min","createElement","label","id","isResetValueOnUnitChange","__unstableInputWidth","CoverInspectorControls","attributes","setAttributes","clientId","setOverlayColor","coverRef","currentSettings","updateDimRatio","onClearMedia","useFeaturedImage","dimRatio","focalPoint","hasParallax","isRepeated","minHeight","minHeightUnit","alt","tagName","isVideoBackground","isImageBackground","mediaElement","url","overlayColor","gradientValue","setGradient","toggleParallax","toggleIsRepeated","showFocalPointPicker","imperativeFocalPointPreview","styleOfRef","property","current","style","colorGradientSettings","htmlElementMessages","header","main","section","article","aside","footer","Fragment","title","__nextHasNoMarginBottom","checked","onDragStart","onDrag","newFocalPoint","newAlt","help","href","variant","size","className","onClick","hasColorsOrGradients","group","__experimentalIsRenderedInSidebar","settings","colorValue","color","onColorChange","onGradientChange","isShownByDefault","resetAllFilter","customOverlayColor","gradient","customGradient","panelId","hasValue","onDeselect","newDimRatio","max","step","required","__next40pxDefaultSize","newMinHeight","nextUnit","options"],"sources":["@wordpress/block-library/src/cover/edit/inspector-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport {\n\tButton,\n\tExternalLink,\n\tFocalPointPicker,\n\tPanelBody,\n\tPanelRow,\n\tRangeControl,\n\tTextareaControl,\n\tToggleControl,\n\tSelectControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tInspectorControls,\n\tuseSettings,\n\t__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,\n\t__experimentalUseGradient,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { COVER_MIN_HEIGHT, mediaPosition } from '../shared';\n\nfunction CoverHeightInput( {\n\tonChange,\n\tonUnitChange,\n\tunit = 'px',\n\tvalue = '',\n} ) {\n\tconst instanceId = useInstanceId( UnitControl );\n\tconst inputId = `block-cover-height-input-${ instanceId }`;\n\tconst isPx = unit === 'px';\n\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ 'px', 'em', 'rem', 'vw', 'vh' ],\n\t\tdefaultValues: { px: 430, '%': 20, em: 20, rem: 20, vw: 20, vh: 50 },\n\t} );\n\n\tconst handleOnChange = ( unprocessedValue ) => {\n\t\tconst inputValue =\n\t\t\tunprocessedValue !== ''\n\t\t\t\t? parseFloat( unprocessedValue )\n\t\t\t\t: undefined;\n\n\t\tif ( isNaN( inputValue ) && inputValue !== undefined ) {\n\t\t\treturn;\n\t\t}\n\t\tonChange( inputValue );\n\t};\n\n\tconst computedValue = useMemo( () => {\n\t\tconst [ parsedQuantity ] = parseQuantityAndUnitFromRawValue( value );\n\t\treturn [ parsedQuantity, unit ].join( '' );\n\t}, [ unit, value ] );\n\n\tconst min = isPx ? COVER_MIN_HEIGHT : 0;\n\n\treturn (\n\t\t<UnitControl\n\t\t\tlabel={ __( 'Minimum height of cover' ) }\n\t\t\tid={ inputId }\n\t\t\tisResetValueOnUnitChange\n\t\t\tmin={ min }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonUnitChange={ onUnitChange }\n\t\t\t__unstableInputWidth={ '80px' }\n\t\t\tunits={ units }\n\t\t\tvalue={ computedValue }\n\t\t/>\n\t);\n}\nexport default function CoverInspectorControls( {\n\tattributes,\n\tsetAttributes,\n\tclientId,\n\tsetOverlayColor,\n\tcoverRef,\n\tcurrentSettings,\n\tupdateDimRatio,\n\tonClearMedia,\n} ) {\n\tconst {\n\t\tuseFeaturedImage,\n\t\tdimRatio,\n\t\tfocalPoint,\n\t\thasParallax,\n\t\tisRepeated,\n\t\tminHeight,\n\t\tminHeightUnit,\n\t\talt,\n\t\ttagName,\n\t} = attributes;\n\tconst {\n\t\tisVideoBackground,\n\t\tisImageBackground,\n\t\tmediaElement,\n\t\turl,\n\t\toverlayColor,\n\t} = currentSettings;\n\n\tconst { gradientValue, setGradient } = __experimentalUseGradient();\n\n\tconst toggleParallax = () => {\n\t\tsetAttributes( {\n\t\t\thasParallax: ! hasParallax,\n\t\t\t...( ! hasParallax ? { focalPoint: undefined } : {} ),\n\t\t} );\n\t};\n\n\tconst toggleIsRepeated = () => {\n\t\tsetAttributes( {\n\t\t\tisRepeated: ! isRepeated,\n\t\t} );\n\t};\n\n\tconst showFocalPointPicker =\n\t\tisVideoBackground ||\n\t\t( isImageBackground && ( ! hasParallax || isRepeated ) );\n\n\tconst imperativeFocalPointPreview = ( value ) => {\n\t\tconst [ styleOfRef, property ] = mediaElement.current\n\t\t\t? [ mediaElement.current.style, 'objectPosition' ]\n\t\t\t: [ coverRef.current.style, 'backgroundPosition' ];\n\t\tstyleOfRef[ property ] = mediaPosition( value );\n\t};\n\n\tconst colorGradientSettings = useMultipleOriginColorsAndGradients();\n\n\tconst htmlElementMessages = {\n\t\theader: __(\n\t\t\t'The <header> element should represent introductory content, typically a group of introductory or navigational aids.'\n\t\t),\n\t\tmain: __(\n\t\t\t'The <main> element should be used for the primary content of your document only.'\n\t\t),\n\t\tsection: __(\n\t\t\t\"The <section> element should represent a standalone portion of the document that can't be better represented by another element.\"\n\t\t),\n\t\tarticle: __(\n\t\t\t'The <article> element should represent a self-contained, syndicatable portion of the document.'\n\t\t),\n\t\taside: __(\n\t\t\t\"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.\"\n\t\t),\n\t\tfooter: __(\n\t\t\t'The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).'\n\t\t),\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t{ !! url && (\n\t\t\t\t\t<PanelBody title={ __( 'Media settings' ) }>\n\t\t\t\t\t\t{ isImageBackground && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Fixed background' ) }\n\t\t\t\t\t\t\t\t\tchecked={ hasParallax }\n\t\t\t\t\t\t\t\t\tonChange={ toggleParallax }\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Repeated background' ) }\n\t\t\t\t\t\t\t\t\tchecked={ isRepeated }\n\t\t\t\t\t\t\t\t\tonChange={ toggleIsRepeated }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showFocalPointPicker && (\n\t\t\t\t\t\t\t<FocalPointPicker\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Focal point picker' ) }\n\t\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\t\tvalue={ focalPoint }\n\t\t\t\t\t\t\t\tonDragStart={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\tonDrag={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\tonChange={ ( newFocalPoint ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tfocalPoint: newFocalPoint,\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) }\n\t\t\t\t\t\t{ ! useFeaturedImage && url && ! isVideoBackground && (\n\t\t\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\t\tvalue={ alt }\n\t\t\t\t\t\t\t\tonChange={ ( newAlt ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( { alt: newAlt } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<ExternalLink href=\"https://www.w3.org/WAI/tutorials/images/decision-tree\">\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'Describe the purpose of the image.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t{ __( 'Leave empty if decorative.' ) }\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) }\n\t\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tclassName=\"block-library-cover__reset-button\"\n\t\t\t\t\t\t\t\tonClick={ onClearMedia }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Clear Media' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</PanelRow>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t</InspectorControls>\n\t\t\t{ colorGradientSettings.hasColorsOrGradients && (\n\t\t\t\t<InspectorControls group=\"color\">\n\t\t\t\t\t<ColorGradientSettingsDropdown\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\tsettings={ [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcolorValue: overlayColor.color,\n\t\t\t\t\t\t\t\tgradientValue,\n\t\t\t\t\t\t\t\tlabel: __( 'Overlay' ),\n\t\t\t\t\t\t\t\tonColorChange: setOverlayColor,\n\t\t\t\t\t\t\t\tonGradientChange: setGradient,\n\t\t\t\t\t\t\t\tisShownByDefault: true,\n\t\t\t\t\t\t\t\tresetAllFilter: () => ( {\n\t\t\t\t\t\t\t\t\toverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tcustomOverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tgradient: undefined,\n\t\t\t\t\t\t\t\t\tcustomGradient: undefined,\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t\t{ ...colorGradientSettings }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => {\n\t\t\t\t\t\t\t// If there's a media background the dimRatio will be\n\t\t\t\t\t\t\t// defaulted to 50 whereas it will be 100 for colors.\n\t\t\t\t\t\t\treturn dimRatio === undefined\n\t\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t\t: dimRatio !== ( url ? 50 : 100 );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\tonDeselect={ () => updateDimRatio( url ? 50 : 100 ) }\n\t\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\t\tdimRatio: url ? 50 : 100,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\t\tvalue={ dimRatio }\n\t\t\t\t\t\t\tonChange={ ( newDimRatio ) =>\n\t\t\t\t\t\t\t\tupdateDimRatio( newDimRatio )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\t\tstep={ 10 }\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<InspectorControls group=\"dimensions\">\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ () => !! minHeight }\n\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t} ) }\n\t\t\t\t\tisShownByDefault={ true }\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<CoverHeightInput\n\t\t\t\t\t\tvalue={ minHeight }\n\t\t\t\t\t\tunit={ minHeightUnit }\n\t\t\t\t\t\tonChange={ ( newMinHeight ) =>\n\t\t\t\t\t\t\tsetAttributes( { minHeight: newMinHeight } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonUnitChange={ ( nextUnit ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tminHeightUnit: nextUnit,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'HTML element' ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<div>)' ), value: 'div' },\n\t\t\t\t\t\t{ label: '<header>', value: 'header' },\n\t\t\t\t\t\t{ label: '<main>', value: 'main' },\n\t\t\t\t\t\t{ label: '<section>', value: 'section' },\n\t\t\t\t\t\t{ label: '<article>', value: 'article' },\n\t\t\t\t\t\t{ label: '<aside>', value: 'aside' },\n\t\t\t\t\t\t{ label: '<footer>', value: 'footer' },\n\t\t\t\t\t] }\n\t\t\t\t\tvalue={ tagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ htmlElementMessages[ tagName ] }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SACCC,MAAM,EACNC,YAAY,EACZC,gBAAgB,EAChBC,SAAS,EACTC,QAAQ,EACRC,YAAY,EACZC,eAAe,EACfC,aAAa,EACbC,aAAa,EACbC,4BAA4B,IAAIC,cAAc,EAC9CC,4BAA4B,IAAIC,cAAc,EAC9CC,yBAAyB,IAAIC,WAAW,EACxCC,8CAA8C,IAAIC,gCAAgC,QAC5E,uBAAuB;AAC9B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SACCC,iBAAiB,EACjBC,WAAW,EACXC,2CAA2C,IAAIC,6BAA6B,EAC5EC,yBAAyB,EACzBC,iDAAiD,IAAIC,mCAAmC,QAClF,yBAAyB;AAChC,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,gBAAgB,EAAEC,aAAa,QAAQ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MAAEuB,KAAK,EAAE,UAAU;MAAEvB,KAAK,EAAE;IAAS,CAAC,CACpC;IACHA,KAAK,EAAG4C,OAAS;IACjB/C,QAAQ,EAAKG,KAAK,IACjB6B,aAAa,CAAE;MAAEe,OAAO,EAAE5C;IAAM,CAAE,CAClC;IACD4E,IAAI,EAAGf,mBAAmB,CAAEjB,OAAO;EAAI,CACvC,CACiB,CAClB,CAAC;AAEL"}
|
|
1
|
+
{"version":3,"names":["useMemo","Button","ExternalLink","FocalPointPicker","PanelBody","PanelRow","RangeControl","TextareaControl","ToggleControl","SelectControl","__experimentalUseCustomUnits","useCustomUnits","__experimentalToolsPanelItem","ToolsPanelItem","__experimentalUnitControl","UnitControl","__experimentalParseQuantityAndUnitFromRawValue","parseQuantityAndUnitFromRawValue","useInstanceId","InspectorControls","useSettings","__experimentalColorGradientSettingsDropdown","ColorGradientSettingsDropdown","__experimentalUseGradient","__experimentalUseMultipleOriginColorsAndGradients","useMultipleOriginColorsAndGradients","privateApis","blockEditorPrivateApis","__","COVER_MIN_HEIGHT","mediaPosition","unlock","cleanEmptyObject","CoverHeightInput","onChange","onUnitChange","unit","value","instanceId","inputId","isPx","availableUnits","units","defaultValues","px","em","rem","vw","vh","handleOnChange","unprocessedValue","inputValue","parseFloat","undefined","isNaN","computedValue","parsedQuantity","join","min","createElement","label","id","isResetValueOnUnitChange","__unstableInputWidth","CoverInspectorControls","attributes","setAttributes","clientId","setOverlayColor","coverRef","currentSettings","updateDimRatio","onClearMedia","useFeaturedImage","dimRatio","focalPoint","hasParallax","isRepeated","minHeight","minHeightUnit","alt","tagName","isVideoBackground","isImageBackground","mediaElement","url","overlayColor","gradientValue","setGradient","toggleParallax","toggleIsRepeated","showFocalPointPicker","imperativeFocalPointPreview","styleOfRef","property","current","style","colorGradientSettings","htmlElementMessages","header","main","section","article","aside","footer","Fragment","title","__nextHasNoMarginBottom","checked","onDragStart","onDrag","newFocalPoint","newAlt","help","href","variant","size","className","onClick","hasColorsOrGradients","group","__experimentalIsRenderedInSidebar","settings","colorValue","color","onColorChange","onGradientChange","isShownByDefault","resetAllFilter","customOverlayColor","gradient","customGradient","panelId","hasValue","onDeselect","newDimRatio","max","step","required","__next40pxDefaultSize","newMinHeight","dimensions","aspectRatio","nextUnit","options"],"sources":["@wordpress/block-library/src/cover/edit/inspector-controls.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport {\n\tButton,\n\tExternalLink,\n\tFocalPointPicker,\n\tPanelBody,\n\tPanelRow,\n\tRangeControl,\n\tTextareaControl,\n\tToggleControl,\n\tSelectControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tInspectorControls,\n\tuseSettings,\n\t__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,\n\t__experimentalUseGradient,\n\t__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { COVER_MIN_HEIGHT, mediaPosition } from '../shared';\nimport { unlock } from '../../lock-unlock';\n\nconst { cleanEmptyObject } = unlock( blockEditorPrivateApis );\n\nfunction CoverHeightInput( {\n\tonChange,\n\tonUnitChange,\n\tunit = 'px',\n\tvalue = '',\n} ) {\n\tconst instanceId = useInstanceId( UnitControl );\n\tconst inputId = `block-cover-height-input-${ instanceId }`;\n\tconst isPx = unit === 'px';\n\n\tconst [ availableUnits ] = useSettings( 'spacing.units' );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: availableUnits || [ 'px', 'em', 'rem', 'vw', 'vh' ],\n\t\tdefaultValues: { px: 430, '%': 20, em: 20, rem: 20, vw: 20, vh: 50 },\n\t} );\n\n\tconst handleOnChange = ( unprocessedValue ) => {\n\t\tconst inputValue =\n\t\t\tunprocessedValue !== ''\n\t\t\t\t? parseFloat( unprocessedValue )\n\t\t\t\t: undefined;\n\n\t\tif ( isNaN( inputValue ) && inputValue !== undefined ) {\n\t\t\treturn;\n\t\t}\n\t\tonChange( inputValue );\n\t};\n\n\tconst computedValue = useMemo( () => {\n\t\tconst [ parsedQuantity ] = parseQuantityAndUnitFromRawValue( value );\n\t\treturn [ parsedQuantity, unit ].join( '' );\n\t}, [ unit, value ] );\n\n\tconst min = isPx ? COVER_MIN_HEIGHT : 0;\n\n\treturn (\n\t\t<UnitControl\n\t\t\tlabel={ __( 'Minimum height of cover' ) }\n\t\t\tid={ inputId }\n\t\t\tisResetValueOnUnitChange\n\t\t\tmin={ min }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonUnitChange={ onUnitChange }\n\t\t\t__unstableInputWidth={ '80px' }\n\t\t\tunits={ units }\n\t\t\tvalue={ computedValue }\n\t\t/>\n\t);\n}\nexport default function CoverInspectorControls( {\n\tattributes,\n\tsetAttributes,\n\tclientId,\n\tsetOverlayColor,\n\tcoverRef,\n\tcurrentSettings,\n\tupdateDimRatio,\n\tonClearMedia,\n} ) {\n\tconst {\n\t\tuseFeaturedImage,\n\t\tdimRatio,\n\t\tfocalPoint,\n\t\thasParallax,\n\t\tisRepeated,\n\t\tminHeight,\n\t\tminHeightUnit,\n\t\talt,\n\t\ttagName,\n\t} = attributes;\n\tconst {\n\t\tisVideoBackground,\n\t\tisImageBackground,\n\t\tmediaElement,\n\t\turl,\n\t\toverlayColor,\n\t} = currentSettings;\n\n\tconst { gradientValue, setGradient } = __experimentalUseGradient();\n\n\tconst toggleParallax = () => {\n\t\tsetAttributes( {\n\t\t\thasParallax: ! hasParallax,\n\t\t\t...( ! hasParallax ? { focalPoint: undefined } : {} ),\n\t\t} );\n\t};\n\n\tconst toggleIsRepeated = () => {\n\t\tsetAttributes( {\n\t\t\tisRepeated: ! isRepeated,\n\t\t} );\n\t};\n\n\tconst showFocalPointPicker =\n\t\tisVideoBackground ||\n\t\t( isImageBackground && ( ! hasParallax || isRepeated ) );\n\n\tconst imperativeFocalPointPreview = ( value ) => {\n\t\tconst [ styleOfRef, property ] = mediaElement.current\n\t\t\t? [ mediaElement.current.style, 'objectPosition' ]\n\t\t\t: [ coverRef.current.style, 'backgroundPosition' ];\n\t\tstyleOfRef[ property ] = mediaPosition( value );\n\t};\n\n\tconst colorGradientSettings = useMultipleOriginColorsAndGradients();\n\n\tconst htmlElementMessages = {\n\t\theader: __(\n\t\t\t'The <header> element should represent introductory content, typically a group of introductory or navigational aids.'\n\t\t),\n\t\tmain: __(\n\t\t\t'The <main> element should be used for the primary content of your document only.'\n\t\t),\n\t\tsection: __(\n\t\t\t\"The <section> element should represent a standalone portion of the document that can't be better represented by another element.\"\n\t\t),\n\t\tarticle: __(\n\t\t\t'The <article> element should represent a self-contained, syndicatable portion of the document.'\n\t\t),\n\t\taside: __(\n\t\t\t\"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.\"\n\t\t),\n\t\tfooter: __(\n\t\t\t'The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).'\n\t\t),\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t{ !! url && (\n\t\t\t\t\t<PanelBody title={ __( 'Media settings' ) }>\n\t\t\t\t\t\t{ isImageBackground && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Fixed background' ) }\n\t\t\t\t\t\t\t\t\tchecked={ hasParallax }\n\t\t\t\t\t\t\t\t\tonChange={ toggleParallax }\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Repeated background' ) }\n\t\t\t\t\t\t\t\t\tchecked={ isRepeated }\n\t\t\t\t\t\t\t\t\tonChange={ toggleIsRepeated }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showFocalPointPicker && (\n\t\t\t\t\t\t\t<FocalPointPicker\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Focal point picker' ) }\n\t\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\t\tvalue={ focalPoint }\n\t\t\t\t\t\t\t\tonDragStart={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\tonDrag={ imperativeFocalPointPreview }\n\t\t\t\t\t\t\t\tonChange={ ( newFocalPoint ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tfocalPoint: newFocalPoint,\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) }\n\t\t\t\t\t\t{ ! useFeaturedImage && url && ! isVideoBackground && (\n\t\t\t\t\t\t\t<TextareaControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Alternative text' ) }\n\t\t\t\t\t\t\t\tvalue={ alt }\n\t\t\t\t\t\t\t\tonChange={ ( newAlt ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( { alt: newAlt } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<ExternalLink href=\"https://www.w3.org/WAI/tutorials/images/decision-tree\">\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'Describe the purpose of the image.'\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t{ __( 'Leave empty if decorative.' ) }\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) }\n\t\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tclassName=\"block-library-cover__reset-button\"\n\t\t\t\t\t\t\t\tonClick={ onClearMedia }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Clear Media' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</PanelRow>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t</InspectorControls>\n\t\t\t{ colorGradientSettings.hasColorsOrGradients && (\n\t\t\t\t<InspectorControls group=\"color\">\n\t\t\t\t\t<ColorGradientSettingsDropdown\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\tsettings={ [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcolorValue: overlayColor.color,\n\t\t\t\t\t\t\t\tgradientValue,\n\t\t\t\t\t\t\t\tlabel: __( 'Overlay' ),\n\t\t\t\t\t\t\t\tonColorChange: setOverlayColor,\n\t\t\t\t\t\t\t\tonGradientChange: setGradient,\n\t\t\t\t\t\t\t\tisShownByDefault: true,\n\t\t\t\t\t\t\t\tresetAllFilter: () => ( {\n\t\t\t\t\t\t\t\t\toverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tcustomOverlayColor: undefined,\n\t\t\t\t\t\t\t\t\tgradient: undefined,\n\t\t\t\t\t\t\t\t\tcustomGradient: undefined,\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t\t{ ...colorGradientSettings }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => {\n\t\t\t\t\t\t\t// If there's a media background the dimRatio will be\n\t\t\t\t\t\t\t// defaulted to 50 whereas it will be 100 for colors.\n\t\t\t\t\t\t\treturn dimRatio === undefined\n\t\t\t\t\t\t\t\t? false\n\t\t\t\t\t\t\t\t: dimRatio !== ( url ? 50 : 100 );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\tonDeselect={ () => updateDimRatio( url ? 50 : 100 ) }\n\t\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\t\tdimRatio: url ? 50 : 100,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Overlay opacity' ) }\n\t\t\t\t\t\t\tvalue={ dimRatio }\n\t\t\t\t\t\t\tonChange={ ( newDimRatio ) =>\n\t\t\t\t\t\t\t\tupdateDimRatio( newDimRatio )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\t\tstep={ 10 }\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<InspectorControls group=\"dimensions\">\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ () => !! minHeight }\n\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tresetAllFilter={ () => ( {\n\t\t\t\t\t\tminHeight: undefined,\n\t\t\t\t\t\tminHeightUnit: undefined,\n\t\t\t\t\t} ) }\n\t\t\t\t\tisShownByDefault={ true }\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<CoverHeightInput\n\t\t\t\t\t\tvalue={ minHeight }\n\t\t\t\t\t\tunit={ minHeightUnit }\n\t\t\t\t\t\tonChange={ ( newMinHeight ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tminHeight: newMinHeight,\n\t\t\t\t\t\t\t\tstyle: cleanEmptyObject( {\n\t\t\t\t\t\t\t\t\t...attributes?.style,\n\t\t\t\t\t\t\t\t\tdimensions: {\n\t\t\t\t\t\t\t\t\t\t...attributes?.style?.dimensions,\n\t\t\t\t\t\t\t\t\t\taspectRatio: undefined, // Reset aspect ratio when minHeight is set.\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}\n\t\t\t\t\t\tonUnitChange={ ( nextUnit ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tminHeightUnit: nextUnit,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'HTML element' ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<div>)' ), value: 'div' },\n\t\t\t\t\t\t{ label: '<header>', value: 'header' },\n\t\t\t\t\t\t{ label: '<main>', value: 'main' },\n\t\t\t\t\t\t{ label: '<section>', value: 'section' },\n\t\t\t\t\t\t{ label: '<article>', value: 'article' },\n\t\t\t\t\t\t{ label: '<aside>', value: 'aside' },\n\t\t\t\t\t\t{ label: '<footer>', value: 'footer' },\n\t\t\t\t\t] }\n\t\t\t\t\tvalue={ tagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ htmlElementMessages[ tagName ] }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SACCC,MAAM,EACNC,YAAY,EACZC,gBAAgB,EAChBC,SAAS,EACTC,QAAQ,EACRC,YAAY,EACZC,eAAe,EACfC,aAAa,EACbC,aAAa,EACbC,4BAA4B,IAAIC,cAAc,EAC9CC,4BAA4B,IAAIC,cAAc,EAC9CC,yBAAyB,IAAIC,WAAW,EACxCC,8CAA8C,IAAIC,gCAAgC,QAC5E,uBAAuB;AAC9B,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SACCC,iBAAiB,EACjBC,WAAW,EACXC,2CAA2C,IAAIC,6BAA6B,EAC5EC,yBAAyB,EACzBC,iDAAiD,IAAIC,mCAAmC,EACxFC,WAAW,IAAIC,sBAAsB,QAC/B,yBAAyB;AAChC,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,gBAAgB,EAAEC,aAAa,QAAQ,WAAW;AAC3D,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EAAEC;AAAiB,CAAC,GAAGD,MAAM,CAAEJ,sBAAuB,CAAC;AAE7D,SAASM,gBAAgBA,CAAE;EAC1BC,QAAQ;EACRC,YAAY;EACZC,IAAI,GAAG,IAAI;EACXC,KAAK,GAAG;AACT,CAAC,EAAG;EACH,MAAMC,UAAU,GAAGpB,aAAa,CAAEH,WAAY,CAAC;EAC/C,MAAMwB,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C;MAAEuB,KAAK,EAAE,UAAU;MAAEvB,KAAK,EAAE;IAAS,CAAC,CACpC;IACHA,KAAK,EAAG4C,OAAS;IACjB/C,QAAQ,EAAKG,KAAK,IACjB6B,aAAa,CAAE;MAAEe,OAAO,EAAE5C;IAAM,CAAE,CAClC;IACD4E,IAAI,EAAGf,mBAAmB,CAAEjB,OAAO;EAAI,CACvC,CACiB,CAClB,CAAC;AAEL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","cover","icon","initBlock","deprecated","edit","metadata","$schema","apiVersion","name","title","category","description","textdomain","attributes","url","type","useFeaturedImage","id","alt","hasParallax","isRepeated","dimRatio","overlayColor","customOverlayColor","isUserOverlayColor","backgroundType","focalPoint","minHeight","minHeightUnit","gradient","customGradient","contentPosition","isDark","allowedBlocks","templateLock","tagName","usesContext","supports","anchor","align","html","spacing","padding","margin","blockGap","__experimentalDefaultControls","__experimentalBorder","color","radius","style","width","__experimentalDuotone","heading","text","background","__experimentalSkipSerialization","enableContrastChecker","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","layout","allowJustification","editorStyle","save","transforms","variations","settings","example","innerBlocks","content","init"],"sources":["@wordpress/block-library/src/cover/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { cover as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\nimport variations from './variations';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tcustomOverlayColor: '#065174',\n\t\t\tdimRatio: 40,\n\t\t\turl: 'https://s.w.org/images/core/5.3/Windbuchencom.jpg',\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcontent: __( '<strong>Snow Patrol</strong>' ),\n\t\t\t\t\talign: 'center',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\ttypography: {\n\t\t\t\t\t\t\tfontSize: 48,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\ttext: 'white',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\ttransforms,\n\tsave,\n\tedit,\n\tdeprecated,\n\tvariations,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,IAAIC,IAAI,QAAQ,kBAAkB;;AAEhD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAC3C,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,IAAI,MAAM,QAAQ;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,GAAA;MAAAC,IAAA;IAAA;IAAAC,gBAAA;MAAAD,IAAA;MAAA;IAAA;IAAAE,EAAA;MAAAF,IAAA;IAAA;IAAAG,GAAA;MAAAH,IAAA;MAAA;IAAA;IAAAI,WAAA;MAAAJ,IAAA;MAAA;IAAA;IAAAK,UAAA;MAAAL,IAAA;MAAA;IAAA;IAAAM,QAAA;MAAAN,IAAA;MAAA;IAAA;IAAAO,YAAA;MAAAP,IAAA;IAAA;IAAAQ,kBAAA;MAAAR,IAAA;IAAA;IAAAS,kBAAA;MAAAT,IAAA;IAAA;IAAAU,cAAA;MAAAV,IAAA;MAAA;IAAA;IAAAW,UAAA;MAAAX,IAAA;IAAA;IAAAY,SAAA;MAAAZ,IAAA;IAAA;IAAAa,aAAA;MAAAb,IAAA;IAAA;IAAAc,QAAA;MAAAd,IAAA;IAAA;IAAAe,cAAA;MAAAf,IAAA;IAAA;IAAAgB,eAAA;MAAAhB,IAAA;IAAA;IAAAiB,MAAA;MAAAjB,IAAA;MAAA;IAAA;IAAAkB,aAAA;MAAAlB,IAAA;IAAA;IAAAmB,YAAA;MAAAnB,IAAA;MAAA;IAAA;IAAAoB,OAAA;MAAApB,IAAA;MAAA;IAAA;EAAA;EAAAqB,WAAA;EAAAC,QAAA;IAAAC,MAAA;IAAAC,KAAA;IAAAC,IAAA;IAAAC,OAAA;MAAAC,OAAA;MAAAC,MAAA;MAAAC,QAAA;MAAAC,6BAAA;QAAAH,OAAA;QAAAE,QAAA;MAAA;IAAA;IAAAE,oBAAA;MAAAC,KAAA;MAAAC,MAAA;MAAAC,KAAA;MAAAC,KAAA;MAAAL,6BAAA;QAAAE,KAAA;QAAAC,MAAA;QAAAC,KAAA;QAAAC,KAAA;MAAA;IAAA;IAAAH,KAAA;MAAAI,qBAAA;MAAAC,OAAA;MAAAC,IAAA;MAAAC,UAAA;MAAAC,+BAAA;MAAAC,qBAAA;IAAA;IAAAC,UAAA;MAAAC,QAAA;MAAAC,UAAA;MAAAC,wBAAA;MAAAC,wBAAA;MAAAC,uBAAA;MAAAC,2BAAA;MAAAC,4BAAA;MAAAC,2BAAA;
|
|
1
|
+
{"version":3,"names":["__","cover","icon","initBlock","deprecated","edit","metadata","$schema","apiVersion","name","title","category","description","textdomain","attributes","url","type","useFeaturedImage","id","alt","hasParallax","isRepeated","dimRatio","overlayColor","customOverlayColor","isUserOverlayColor","backgroundType","focalPoint","minHeight","minHeightUnit","gradient","customGradient","contentPosition","isDark","allowedBlocks","templateLock","tagName","usesContext","supports","anchor","align","html","spacing","padding","margin","blockGap","__experimentalDefaultControls","__experimentalBorder","color","radius","style","width","__experimentalDuotone","heading","text","background","__experimentalSkipSerialization","enableContrastChecker","dimensions","aspectRatio","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","layout","allowJustification","editorStyle","save","transforms","variations","settings","example","innerBlocks","content","init"],"sources":["@wordpress/block-library/src/cover/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { cover as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\nimport variations from './variations';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tcustomOverlayColor: '#065174',\n\t\t\tdimRatio: 40,\n\t\t\turl: 'https://s.w.org/images/core/5.3/Windbuchencom.jpg',\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcontent: __( '<strong>Snow Patrol</strong>' ),\n\t\t\t\t\talign: 'center',\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\ttypography: {\n\t\t\t\t\t\t\tfontSize: 48,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\ttext: 'white',\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\ttransforms,\n\tsave,\n\tedit,\n\tdeprecated,\n\tvariations,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,IAAIC,IAAI,QAAQ,kBAAkB;;AAEhD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAC3C,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,IAAI,MAAM,QAAQ;AAAC,MAAAC,QAAA;EAAAC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name","title","category","description","keywords","textdomain","attributes","tagName","type","templateLock","allowedBlocks","supports","__experimentalOnEnter","__experimentalOnMerge","__experimentalSettings","align","anchor","ariaLabel","html","background","backgroundImage","backgroundSize","__experimentalDefaultControls","color","gradients","heading","button","link","text","spacing","margin","padding","blockGap","dimensions","minHeight","__experimentalBorder","radius","style","width","position","sticky","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","layout","allowSizingOnChildren","editorStyle","save","transforms","variations","settings","example","innerBlocks","customTextColor","content","init"],"sources":["@wordpress/block-library/src/group/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { group as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\nimport variations from './variations';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tstyle: {\n\t\t\t\tcolor: {\n\t\t\t\t\ttext: '#000000',\n\t\t\t\t\tbackground: '#ffffff',\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#cf2e2e',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'One.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#ff6900',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Two.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#fcb900',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Three.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#00d084',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Four.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#0693e3',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Five.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#9b51e0',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Six.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tdeprecated,\n\tvariations,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,IAAIC,IAAI,QAAQ,kBAAkB;;AAEhD;AACA;AACA;AACA,OAAOC,SAAS,MAAM,qBAAqB;AAC3C,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,IAAI,MAAM,QAAQ;AAAC,MAAAC,QAAA;EAAAC,OAAA;EAAAC,UAAA;EAAAC,IAAA;EAAAC,KAAA;EAAAC,QAAA;EAAAC,WAAA;EAAAC,QAAA;EAAAC,UAAA;EAAAC,UAAA;IAAAC,OAAA;MAAAC,IAAA;MAAA;IAAA;IAAAC,YAAA;MAAAD,IAAA;MAAA;IAAA;IAAAE,aAAA;MAAAF,IAAA;IAAA;EAAA;EAAAG,QAAA;IAAAC,qBAAA;IAAAC,qBAAA;IAAAC,sBAAA;IAAAC,KAAA;IAAAC,MAAA;IAAAC,SAAA;IAAAC,IAAA;IAAAC,UAAA;MAAAC,eAAA;MAAAC,cAAA;MAAAC,6BAAA;QAAAF,eAAA;MAAA;IAAA;IAAAG,KAAA;MAAAC,SAAA;MAAAC,OAAA;MAAAC,MAAA;MAAAC,IAAA;MAAAL,6BAAA;QAAAH,UAAA;QAAAS,IAAA;MAAA;IAAA;IAAAC,OAAA;MAAAC,MAAA;MAAAC,OAAA;MAAAC,QAAA;MAAAV,6BAAA;QAAAS,OAAA;QAAAC,QAAA;MAAA;IAAA;IAAAC,UAAA;MAAAC,SAAA;IAAA;IAAAC,oBAAA;
|
|
1
|
+
{"version":3,"names":["__","group","icon","initBlock","deprecated","edit","metadata","$schema","apiVersion","name","title","category","description","keywords","textdomain","attributes","tagName","type","templateLock","allowedBlocks","supports","__experimentalOnEnter","__experimentalOnMerge","__experimentalSettings","align","anchor","ariaLabel","html","background","backgroundImage","backgroundSize","__experimentalDefaultControls","color","gradients","heading","button","link","text","spacing","margin","padding","blockGap","dimensions","aspectRatio","minHeight","__experimentalBorder","radius","style","width","position","sticky","typography","fontSize","lineHeight","__experimentalFontFamily","__experimentalFontWeight","__experimentalFontStyle","__experimentalTextTransform","__experimentalTextDecoration","__experimentalLetterSpacing","layout","allowSizingOnChildren","editorStyle","save","transforms","variations","settings","example","innerBlocks","customTextColor","content","init"],"sources":["@wordpress/block-library/src/group/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { group as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\nimport variations from './variations';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tstyle: {\n\t\t\t\tcolor: {\n\t\t\t\t\ttext: '#000000',\n\t\t\t\t\tbackground: '#ffffff',\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#cf2e2e',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'One.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#ff6900',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Two.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#fcb900',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Three.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#00d084',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Four.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#0693e3',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Five.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcustomTextColor: '#9b51e0',\n\t\t\t\t\tfontSize: 'large',\n\t\t\t\t\tcontent: __( 'Six.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tdeprecated,\n\tvariations,\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ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,EAAEtE,EAAE,CAAE,OAAQ;MACtB;IACD,CAAC,EACD;MACCS,IAAI,EAAE,gBAAgB;MACtBM,UAAU,EAAE;QACXsD,eAAe,EAAE,SAAS;QAC1BjB,QAAQ,EAAE,OAAO;QACjBkB,OAAO,EAAEtE,EAAE,CAAE,MAAO;MACrB;IACD,CAAC;EAEH,CAAC;EACDgE,UAAU;EACV3D,IAAI;EACJ0D,IAAI;EACJ3D,UAAU;EACV6D;AACD,CAAC;AAED,OAAO,MAAMM,IAAI,GAAGA,CAAA,KAAMpE,SAAS,CAAE;EAAEM,IAAI;EAAEH,QAAQ;EAAE4D;AAAS,CAAE,CAAC"}
|
|
@@ -95,8 +95,7 @@
|
|
|
95
95
|
justify-content: center;
|
|
96
96
|
align-items: center;
|
|
97
97
|
padding: 1em;
|
|
98
|
-
overflow:
|
|
99
|
-
overflow: clip;
|
|
98
|
+
overflow-x: clip;
|
|
100
99
|
box-sizing: border-box; direction: ltr;
|
|
101
100
|
/**
|
|
102
101
|
* Set a default background color for has-background-dim _unless_ it includes another
|
|
@@ -613,8 +613,7 @@
|
|
|
613
613
|
justify-content: center;
|
|
614
614
|
align-items: center;
|
|
615
615
|
padding: 1em;
|
|
616
|
-
overflow:
|
|
617
|
-
overflow: clip;
|
|
616
|
+
overflow-x: clip;
|
|
618
617
|
box-sizing: border-box; direction: ltr;
|
|
619
618
|
/**
|
|
620
619
|
* Set a default background color for has-background-dim _unless_ it includes another
|
package/build-style/style.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "8.27.
|
|
3
|
+
"version": "8.27.1",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"@wordpress/api-fetch": "^6.47.0",
|
|
36
36
|
"@wordpress/autop": "^3.50.0",
|
|
37
37
|
"@wordpress/blob": "^3.50.0",
|
|
38
|
-
"@wordpress/block-editor": "^12.18.
|
|
39
|
-
"@wordpress/blocks": "^12.27.
|
|
38
|
+
"@wordpress/block-editor": "^12.18.1",
|
|
39
|
+
"@wordpress/blocks": "^12.27.1",
|
|
40
40
|
"@wordpress/components": "^25.16.0",
|
|
41
41
|
"@wordpress/compose": "^6.27.0",
|
|
42
|
-
"@wordpress/core-data": "^6.27.
|
|
42
|
+
"@wordpress/core-data": "^6.27.1",
|
|
43
43
|
"@wordpress/data": "^9.20.0",
|
|
44
44
|
"@wordpress/date": "^4.50.0",
|
|
45
45
|
"@wordpress/deprecated": "^3.50.0",
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"@wordpress/interactivity-router": "^1.0.0",
|
|
55
55
|
"@wordpress/keycodes": "^3.50.0",
|
|
56
56
|
"@wordpress/notices": "^4.18.0",
|
|
57
|
-
"@wordpress/patterns": "^1.11.
|
|
57
|
+
"@wordpress/patterns": "^1.11.1",
|
|
58
58
|
"@wordpress/primitives": "^3.48.0",
|
|
59
59
|
"@wordpress/private-apis": "^0.32.0",
|
|
60
|
-
"@wordpress/reusable-blocks": "^4.27.
|
|
60
|
+
"@wordpress/reusable-blocks": "^4.27.1",
|
|
61
61
|
"@wordpress/rich-text": "^6.27.0",
|
|
62
|
-
"@wordpress/server-side-render": "^4.27.
|
|
62
|
+
"@wordpress/server-side-render": "^4.27.1",
|
|
63
63
|
"@wordpress/url": "^3.51.0",
|
|
64
64
|
"@wordpress/viewport": "^5.27.0",
|
|
65
65
|
"@wordpress/wordcount": "^3.50.0",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "c2f6d07ffab7d68b9ac3c423ce7e11af91f6e45e"
|
|
84
84
|
}
|
package/src/cover/block.json
CHANGED
package/src/cover/edit/index.js
CHANGED
|
@@ -431,7 +431,8 @@ function CoverEdit( {
|
|
|
431
431
|
toggleSelection( true );
|
|
432
432
|
setAttributes( { minHeight: newMinHeight } );
|
|
433
433
|
},
|
|
434
|
-
|
|
434
|
+
// Hide the resize handle if an aspect ratio is set, as the aspect ratio takes precedence.
|
|
435
|
+
showHandle: ! attributes.style?.dimensions?.aspectRatio ? true : false,
|
|
435
436
|
size: resizableBoxDimensions,
|
|
436
437
|
width,
|
|
437
438
|
};
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,
|
|
25
25
|
__experimentalUseGradient,
|
|
26
26
|
__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,
|
|
27
|
+
privateApis as blockEditorPrivateApis,
|
|
27
28
|
} from '@wordpress/block-editor';
|
|
28
29
|
import { __ } from '@wordpress/i18n';
|
|
29
30
|
|
|
@@ -31,6 +32,9 @@ import { __ } from '@wordpress/i18n';
|
|
|
31
32
|
* Internal dependencies
|
|
32
33
|
*/
|
|
33
34
|
import { COVER_MIN_HEIGHT, mediaPosition } from '../shared';
|
|
35
|
+
import { unlock } from '../../lock-unlock';
|
|
36
|
+
|
|
37
|
+
const { cleanEmptyObject } = unlock( blockEditorPrivateApis );
|
|
34
38
|
|
|
35
39
|
function CoverHeightInput( {
|
|
36
40
|
onChange,
|
|
@@ -306,7 +310,16 @@ export default function CoverInspectorControls( {
|
|
|
306
310
|
value={ minHeight }
|
|
307
311
|
unit={ minHeightUnit }
|
|
308
312
|
onChange={ ( newMinHeight ) =>
|
|
309
|
-
setAttributes( {
|
|
313
|
+
setAttributes( {
|
|
314
|
+
minHeight: newMinHeight,
|
|
315
|
+
style: cleanEmptyObject( {
|
|
316
|
+
...attributes?.style,
|
|
317
|
+
dimensions: {
|
|
318
|
+
...attributes?.style?.dimensions,
|
|
319
|
+
aspectRatio: undefined, // Reset aspect ratio when minHeight is set.
|
|
320
|
+
},
|
|
321
|
+
} ),
|
|
322
|
+
} )
|
|
310
323
|
}
|
|
311
324
|
onUnitChange={ ( nextUnit ) =>
|
|
312
325
|
setAttributes( {
|
package/src/cover/style.scss
CHANGED
|
@@ -8,10 +8,9 @@
|
|
|
8
8
|
align-items: center;
|
|
9
9
|
padding: 1em;
|
|
10
10
|
// Prevent the `wp-block-cover__background` span from overflowing the container when border-radius is applied.
|
|
11
|
-
// `overflow: hidden` is provided as a fallback for browsers that don't support `overflow: clip`.
|
|
12
|
-
overflow: hidden;
|
|
13
11
|
// Use clip instead of overflow: hidden so that sticky position works on child elements.
|
|
14
|
-
overflow
|
|
12
|
+
// Use overflow-x instead of overflow so that aspect-ratio allows content to expand the area of the cover block.
|
|
13
|
+
overflow-x: clip;
|
|
15
14
|
// This block has customizable padding, border-box makes that more predictable.
|
|
16
15
|
box-sizing: border-box;
|
|
17
16
|
// Keep the flex layout direction to the physical direction (LTR) in RTL languages.
|
package/src/file/index.php
CHANGED
|
@@ -38,7 +38,7 @@ function render_block_core_file( $attributes, $content ) {
|
|
|
38
38
|
|
|
39
39
|
// If it's interactive, enqueue the script module and add the directives.
|
|
40
40
|
if ( ! empty( $attributes['displayPreview'] ) ) {
|
|
41
|
-
wp_enqueue_script_module( '@wordpress/block-library/file
|
|
41
|
+
wp_enqueue_script_module( '@wordpress/block-library/file' );
|
|
42
42
|
|
|
43
43
|
$processor = new WP_HTML_Tag_Processor( $content );
|
|
44
44
|
$processor->next_tag();
|
|
@@ -64,8 +64,8 @@ function register_block_core_file() {
|
|
|
64
64
|
);
|
|
65
65
|
|
|
66
66
|
wp_register_script_module(
|
|
67
|
-
'@wordpress/block-library/file
|
|
68
|
-
gutenberg_url( '/build/interactivity/file.min.js' ),
|
|
67
|
+
'@wordpress/block-library/file',
|
|
68
|
+
defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ? gutenberg_url( '/build/interactivity/file.min.js' ) : includes_url( 'blocks/file/view.min.js' ),
|
|
69
69
|
array( '@wordpress/interactivity' ),
|
|
70
70
|
defined( 'GUTENBERG_VERSION' ) ? GUTENBERG_VERSION : get_bloginfo( 'version' )
|
|
71
71
|
);
|
package/src/group/block.json
CHANGED
package/src/image/index.php
CHANGED
|
@@ -325,7 +325,7 @@ function register_block_core_image() {
|
|
|
325
325
|
|
|
326
326
|
wp_register_script_module(
|
|
327
327
|
'@wordpress/block-library/image',
|
|
328
|
-
gutenberg_url( '/build/interactivity/image.min.js' ),
|
|
328
|
+
defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ? gutenberg_url( '/build/interactivity/image.min.js' ) : includes_url( 'blocks/image/view.min.js' ),
|
|
329
329
|
array( '@wordpress/interactivity' ),
|
|
330
330
|
defined( 'GUTENBERG_VERSION' ) ? GUTENBERG_VERSION : get_bloginfo( 'version' )
|
|
331
331
|
);
|
package/src/navigation/index.php
CHANGED
|
@@ -567,7 +567,7 @@ class WP_Navigation_Block_Renderer {
|
|
|
567
567
|
*/
|
|
568
568
|
private static function handle_view_script_module_loading( $attributes, $block, $inner_blocks ) {
|
|
569
569
|
if ( static::is_interactive( $attributes, $inner_blocks ) ) {
|
|
570
|
-
wp_enqueue_script_module( '@wordpress/block-library/navigation
|
|
570
|
+
wp_enqueue_script_module( '@wordpress/block-library/navigation' );
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
573
|
|
|
@@ -1081,8 +1081,8 @@ function register_block_core_navigation() {
|
|
|
1081
1081
|
);
|
|
1082
1082
|
|
|
1083
1083
|
wp_register_script_module(
|
|
1084
|
-
'@wordpress/block-library/navigation
|
|
1085
|
-
gutenberg_url( '/build/interactivity/navigation.min.js' ),
|
|
1084
|
+
'@wordpress/block-library/navigation',
|
|
1085
|
+
defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ? gutenberg_url( '/build/interactivity/navigation.min.js' ) : includes_url( 'blocks/navigation/view.min.js' ),
|
|
1086
1086
|
array( '@wordpress/interactivity' ),
|
|
1087
1087
|
defined( 'GUTENBERG_VERSION' ) ? GUTENBERG_VERSION : get_bloginfo( 'version' )
|
|
1088
1088
|
);
|
package/src/query/index.php
CHANGED
|
@@ -101,7 +101,7 @@ function register_block_core_query() {
|
|
|
101
101
|
|
|
102
102
|
wp_register_script_module(
|
|
103
103
|
'@wordpress/block-library/query',
|
|
104
|
-
gutenberg_url( '/build/interactivity/query.min.js' ),
|
|
104
|
+
defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ? gutenberg_url( '/build/interactivity/query.min.js' ) : includes_url( 'blocks/query/view.min.js' ),
|
|
105
105
|
array(
|
|
106
106
|
array(
|
|
107
107
|
'id' => '@wordpress/interactivity',
|
package/src/search/index.php
CHANGED
|
@@ -80,7 +80,7 @@ function render_block_core_search( $attributes ) {
|
|
|
80
80
|
// If it's interactive, enqueue the script module and add the directives.
|
|
81
81
|
$is_expandable_searchfield = 'button-only' === $button_position;
|
|
82
82
|
if ( $is_expandable_searchfield ) {
|
|
83
|
-
wp_enqueue_script_module( '@wordpress/block-library/search
|
|
83
|
+
wp_enqueue_script_module( '@wordpress/block-library/search' );
|
|
84
84
|
|
|
85
85
|
$input->set_attribute( 'data-wp-bind--aria-hidden', '!context.isSearchInputVisible' );
|
|
86
86
|
$input->set_attribute( 'data-wp-bind--tabindex', 'state.tabindex' );
|
|
@@ -198,8 +198,8 @@ function register_block_core_search() {
|
|
|
198
198
|
);
|
|
199
199
|
|
|
200
200
|
wp_register_script_module(
|
|
201
|
-
'@wordpress/block-library/search
|
|
202
|
-
gutenberg_url( '/build/interactivity/search.min.js' ),
|
|
201
|
+
'@wordpress/block-library/search',
|
|
202
|
+
defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ? gutenberg_url( '/build/interactivity/search.min.js' ) : includes_url( 'blocks/search/view.min.js' ),
|
|
203
203
|
array( '@wordpress/interactivity' ),
|
|
204
204
|
defined( 'GUTENBERG_VERSION' ) ? GUTENBERG_VERSION : get_bloginfo( 'version' )
|
|
205
205
|
);
|