@wordpress/block-library 9.18.0 → 9.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/cover/edit/index.js +3 -1
- package/build/cover/edit/index.js.map +1 -1
- package/build/form/edit.js +4 -2
- package/build/form/edit.js.map +1 -1
- package/build/image/view.js +4 -4
- package/build/image/view.js.map +1 -1
- package/build/navigation/view.js +2 -2
- package/build/navigation/view.js.map +1 -1
- package/build/navigation-link/edit.js +2 -1
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +2 -1
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/post-comments-count/index.js +8 -1
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-navigation-link/edit.js +1 -1
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/query/view.js +2 -2
- package/build/query/view.js.map +1 -1
- package/build/search/view.js +2 -2
- package/build/search/view.js.map +1 -1
- package/build/site-logo/edit.js +2 -5
- package/build/site-logo/edit.js.map +1 -1
- package/build/video/edit-common-settings.js +10 -3
- package/build/video/edit-common-settings.js.map +1 -1
- package/build-module/cover/edit/index.js +3 -1
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/form/edit.js +4 -2
- package/build-module/form/edit.js.map +1 -1
- package/build-module/image/view.js +5 -5
- package/build-module/image/view.js.map +1 -1
- package/build-module/navigation/view.js +3 -3
- package/build-module/navigation/view.js.map +1 -1
- package/build-module/navigation-link/edit.js +2 -1
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +2 -1
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/post-comments-count/index.js +8 -1
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +1 -1
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/query/view.js +3 -3
- package/build-module/query/view.js.map +1 -1
- package/build-module/search/view.js +3 -3
- package/build-module/search/view.js.map +1 -1
- package/build-module/site-logo/edit.js +2 -5
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/video/edit-common-settings.js +10 -3
- package/build-module/video/edit-common-settings.js.map +1 -1
- package/build-style/editor-rtl.css +6 -9
- package/build-style/editor.css +6 -9
- package/build-style/navigation-link/editor-rtl.css +5 -9
- package/build-style/navigation-link/editor.css +5 -9
- package/build-style/post-comments-count/style-rtl.css +103 -0
- package/build-style/post-comments-count/style.css +103 -0
- package/build-style/pullquote/style-rtl.css +4 -0
- package/build-style/pullquote/style.css +4 -0
- package/build-style/social-link/editor-rtl.css +1 -0
- package/build-style/social-link/editor.css +1 -0
- package/build-style/style-rtl.css +8 -0
- package/build-style/style.css +8 -0
- package/package.json +35 -35
- package/src/cover/edit/index.js +2 -0
- package/src/cover/test/edit.js +6 -6
- package/src/form/edit.js +2 -0
- package/src/image/view.js +10 -5
- package/src/navigation/view.js +8 -3
- package/src/navigation-link/edit.js +1 -0
- package/src/navigation-link/editor.scss +3 -24
- package/src/navigation-submenu/edit.js +1 -0
- package/src/post-comments-count/block.json +8 -1
- package/src/post-comments-count/style.scss +4 -0
- package/src/post-navigation-link/edit.js +1 -1
- package/src/pullquote/style.scss +4 -0
- package/src/query/view.js +8 -3
- package/src/query-total/index.php +2 -0
- package/src/search/view.js +8 -3
- package/src/site-logo/edit.js +1 -5
- package/src/social-link/editor.scss +1 -0
- package/src/style.scss +1 -0
- package/src/template-part/index.php +3 -1
- package/src/video/edit-common-settings.js +11 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["clsx","isBlobURL","createInterpolateElement","useEffect","useState","__","isRTL","PanelBody","RangeControl","ResizableBox","Spinner","ToggleControl","ToolbarButton","Placeholder","Button","DropZone","FlexItem","__experimentalItemGroup","ItemGroup","__experimentalHStack","HStack","__experimentalTruncate","Truncate","useViewportMatch","BlockControls","InspectorControls","MediaPlaceholder","MediaReplaceFlow","useBlockProps","store","blockEditorStore","__experimentalImageEditor","ImageEditor","useSelect","useDispatch","coreStore","crop","upload","noticesStore","MIN_SIZE","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","ALLOWED_MEDIA_TYPES","ACCEPT_MEDIA_STRING","SiteLogo","alt","attributes","align","width","height","isLink","linkTarget","shouldSyncIcon","isSelected","setAttributes","setLogo","logoUrl","siteUrl","logoId","iconId","setIcon","canUserEdit","isLargeViewport","isWideAligned","includes","isResizable","naturalWidth","naturalHeight","setNaturalSize","isEditingImage","setIsEditingImage","toggleSelection","imageEditing","maxWidth","title","select","settings","getSettings","siteEntities","getEntityRecord","name","onResizeStart","onResizeStop","img","children","className","src","onLoad","event","target","imgWrapper","href","rel","onClick","preventDefault","style","defaultWidth","currentWidth","ratio","currentHeight","minWidth","Math","ceil","minHeight","maxWidthBuffer","showRightHandle","showLeftHandle","canEditImage","imgEdit","id","url","onSaveImage","imageAttributes","onFinishEditing","size","showHandle","maxHeight","lockAspectRatio","enable","top","right","bottom","left","direction","elt","delta","parseInt","shouldUseNewUrl","window","__experimentalUseCustomizerSiteLogoUrl","siteIconSettingsUrl","syncSiteIconHelpText","a","__nextHasNoMarginBottom","__next40pxDefaultSize","label","onChange","newWidth","min","max","initialPosition","value","disabled","checked","undefined","help","group","icon","SiteLogoReplaceFlow","mediaURL","mediaReplaceProps","allowedTypes","accept","InspectorLogoPreview","media","itemGroupProps","alt_text","source_url","slug","logoSlug","media_details","logoMediaDetails","logoLabel","sizes","full","file","as","justify","numberOfLines","LogoEdit","siteLogoId","siteIconId","mediaItemData","isRequestingMediaItem","canUser","getEditedEntityRecord","_canUserEdit","kind","siteSettings","siteData","_siteLogoId","site_logo","_siteIconId","site_icon","mediaItem","getMedia","context","_isRequestingMediaItem","hasFinishedResolution","home","temporaryURL","setTemporaryURL","editEntityRecord","newValue","shouldForceSync","onInitialSelectLogo","onSelectLogo","onRemoveLogo","createErrorNotice","onUploadError","message","type","onFilesDrop","filesList","length","mediaUpload","onFileChange","image","onError","mediaReplaceFlowProps","onSelect","onReset","controls","logoImage","isLoading","placeholder","content","placeholderClassName","preview","withIllustration","classes","blockProps","mediaInspectorPanel","isBordered","renderToggle","props","mediaLibraryButton","open","variant","showTooltip","tooltipPosition"],"sources":["@wordpress/block-library/src/site-logo/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { isBlobURL } from '@wordpress/blob';\nimport {\n\tcreateInterpolateElement,\n\tuseEffect,\n\tuseState,\n} from '@wordpress/element';\nimport { __, isRTL } from '@wordpress/i18n';\nimport {\n\tPanelBody,\n\tRangeControl,\n\tResizableBox,\n\tSpinner,\n\tToggleControl,\n\tToolbarButton,\n\tPlaceholder,\n\tButton,\n\tDropZone,\n\tFlexItem,\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalTruncate as Truncate,\n} from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\tBlockControls,\n\tInspectorControls,\n\tMediaPlaceholder,\n\tMediaReplaceFlow,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n\t__experimentalImageEditor as ImageEditor,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { crop, upload } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { MIN_SIZE } from '../image/constants';\n\nconst ALLOWED_MEDIA_TYPES = [ 'image' ];\nconst ACCEPT_MEDIA_STRING = 'image/*';\n\nconst SiteLogo = ( {\n\talt,\n\tattributes: { align, width, height, isLink, linkTarget, shouldSyncIcon },\n\tisSelected,\n\tsetAttributes,\n\tsetLogo,\n\tlogoUrl,\n\tsiteUrl,\n\tlogoId,\n\ticonId,\n\tsetIcon,\n\tcanUserEdit,\n} ) => {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isWideAligned = [ 'wide', 'full' ].includes( align );\n\tconst isResizable = ! isWideAligned && isLargeViewport;\n\tconst [ { naturalWidth, naturalHeight }, setNaturalSize ] = useState( {} );\n\tconst [ isEditingImage, setIsEditingImage ] = useState( false );\n\tconst { toggleSelection } = useDispatch( blockEditorStore );\n\tconst { imageEditing, maxWidth, title } = useSelect( ( select ) => {\n\t\tconst settings = select( blockEditorStore ).getSettings();\n\t\tconst siteEntities = select( coreStore ).getEntityRecord(\n\t\t\t'root',\n\t\t\t'__unstableBase'\n\t\t);\n\t\treturn {\n\t\t\ttitle: siteEntities?.name,\n\t\t\timageEditing: settings.imageEditing,\n\t\t\tmaxWidth: settings.maxWidth,\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\t// Turn the `Use as site icon` toggle off if it is on but the logo and icon have\n\t\t// fallen out of sync. This can happen if the toggle is saved in the `on` position,\n\t\t// but changes are later made to the site icon in the Customizer.\n\t\tif ( shouldSyncIcon && logoId !== iconId ) {\n\t\t\tsetAttributes( { shouldSyncIcon: false } );\n\t\t}\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( ! isSelected ) {\n\t\t\tsetIsEditingImage( false );\n\t\t}\n\t}, [ isSelected ] );\n\n\tfunction onResizeStart() {\n\t\ttoggleSelection( false );\n\t}\n\n\tfunction onResizeStop() {\n\t\ttoggleSelection( true );\n\t}\n\n\tconst img = (\n\t\t<>\n\t\t\t<img\n\t\t\t\tclassName=\"custom-logo\"\n\t\t\t\tsrc={ logoUrl }\n\t\t\t\talt={ alt }\n\t\t\t\tonLoad={ ( event ) => {\n\t\t\t\t\tsetNaturalSize( {\n\t\t\t\t\t\tnaturalWidth: event.target.naturalWidth,\n\t\t\t\t\t\tnaturalHeight: event.target.naturalHeight,\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t{ isBlobURL( logoUrl ) && <Spinner /> }\n\t\t</>\n\t);\n\n\tlet imgWrapper = img;\n\n\t// Disable reason: Image itself is not meant to be interactive, but\n\t// should direct focus to block.\n\tif ( isLink ) {\n\t\timgWrapper = (\n\t\t\t/* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */\n\t\t\t<a\n\t\t\t\thref={ siteUrl }\n\t\t\t\tclassName=\"custom-logo-link\"\n\t\t\t\trel=\"home\"\n\t\t\t\ttitle={ title }\n\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t>\n\t\t\t\t{ img }\n\t\t\t</a>\n\t\t\t/* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */\n\t\t);\n\t}\n\n\tif ( ! isResizable || ! naturalWidth || ! naturalHeight ) {\n\t\treturn <div style={ { width, height } }>{ imgWrapper }</div>;\n\t}\n\n\t// Set the default width to a responsible size.\n\t// Note that this width is also set in the attached frontend CSS file.\n\tconst defaultWidth = 120;\n\n\tconst currentWidth = width || defaultWidth;\n\tconst ratio = naturalWidth / naturalHeight;\n\tconst currentHeight = currentWidth / ratio;\n\tconst minWidth =\n\t\tnaturalWidth < naturalHeight ? MIN_SIZE : Math.ceil( MIN_SIZE * ratio );\n\tconst minHeight =\n\t\tnaturalHeight < naturalWidth ? MIN_SIZE : Math.ceil( MIN_SIZE / ratio );\n\n\t// With the current implementation of ResizableBox, an image needs an\n\t// explicit pixel value for the max-width. In absence of being able to\n\t// set the content-width, this max-width is currently dictated by the\n\t// vanilla editor style. The following variable adds a buffer to this\n\t// vanilla style, so 3rd party themes have some wiggleroom. This does,\n\t// in most cases, allow you to scale the image beyond the width of the\n\t// main column, though not infinitely.\n\t// @todo It would be good to revisit this once a content-width variable\n\t// becomes available.\n\tconst maxWidthBuffer = maxWidth * 2.5;\n\n\tlet showRightHandle = false;\n\tlet showLeftHandle = false;\n\n\t/* eslint-disable no-lonely-if */\n\t// See https://github.com/WordPress/gutenberg/issues/7584.\n\tif ( align === 'center' ) {\n\t\t// When the image is centered, show both handles.\n\t\tshowRightHandle = true;\n\t\tshowLeftHandle = true;\n\t} else if ( isRTL() ) {\n\t\t// In RTL mode the image is on the right by default.\n\t\t// Show the right handle and hide the left handle only when it is\n\t\t// aligned left. Otherwise always show the left handle.\n\t\tif ( align === 'left' ) {\n\t\t\tshowRightHandle = true;\n\t\t} else {\n\t\t\tshowLeftHandle = true;\n\t\t}\n\t} else {\n\t\t// Show the left handle and hide the right handle only when the\n\t\t// image is aligned right. Otherwise always show the right handle.\n\t\tif ( align === 'right' ) {\n\t\t\tshowLeftHandle = true;\n\t\t} else {\n\t\t\tshowRightHandle = true;\n\t\t}\n\t}\n\t/* eslint-enable no-lonely-if */\n\n\tconst canEditImage =\n\t\tlogoId && naturalWidth && naturalHeight && imageEditing;\n\n\tconst imgEdit =\n\t\tcanEditImage && isEditingImage ? (\n\t\t\t<ImageEditor\n\t\t\t\tid={ logoId }\n\t\t\t\turl={ logoUrl }\n\t\t\t\twidth={ currentWidth }\n\t\t\t\theight={ currentHeight }\n\t\t\t\tnaturalHeight={ naturalHeight }\n\t\t\t\tnaturalWidth={ naturalWidth }\n\t\t\t\tonSaveImage={ ( imageAttributes ) => {\n\t\t\t\t\tsetLogo( imageAttributes.id );\n\t\t\t\t} }\n\t\t\t\tonFinishEditing={ () => {\n\t\t\t\t\tsetIsEditingImage( false );\n\t\t\t\t} }\n\t\t\t/>\n\t\t) : (\n\t\t\t<ResizableBox\n\t\t\t\tsize={ {\n\t\t\t\t\twidth: currentWidth,\n\t\t\t\t\theight: currentHeight,\n\t\t\t\t} }\n\t\t\t\tshowHandle={ isSelected }\n\t\t\t\tminWidth={ minWidth }\n\t\t\t\tmaxWidth={ maxWidthBuffer }\n\t\t\t\tminHeight={ minHeight }\n\t\t\t\tmaxHeight={ maxWidthBuffer / ratio }\n\t\t\t\tlockAspectRatio\n\t\t\t\tenable={ {\n\t\t\t\t\ttop: false,\n\t\t\t\t\tright: showRightHandle,\n\t\t\t\t\tbottom: true,\n\t\t\t\t\tleft: showLeftHandle,\n\t\t\t\t} }\n\t\t\t\tonResizeStart={ onResizeStart }\n\t\t\t\tonResizeStop={ ( event, direction, elt, delta ) => {\n\t\t\t\t\tonResizeStop();\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\twidth: parseInt( currentWidth + delta.width, 10 ),\n\t\t\t\t\t\theight: parseInt( currentHeight + delta.height, 10 ),\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ imgWrapper }\n\t\t\t</ResizableBox>\n\t\t);\n\n\t// Support the previous location for the Site Icon settings. To be removed\n\t// when the required WP core version for Gutenberg is >= 6.5.0.\n\tconst shouldUseNewUrl = ! window?.__experimentalUseCustomizerSiteLogoUrl;\n\n\tconst siteIconSettingsUrl = shouldUseNewUrl\n\t\t? siteUrl + '/wp-admin/options-general.php'\n\t\t: siteUrl + '/wp-admin/customize.php?autofocus[section]=title_tagline';\n\n\tconst syncSiteIconHelpText = createInterpolateElement(\n\t\t__(\n\t\t\t'Site Icons are what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. To use a custom icon that is different from your site logo, use the <a>Site Icon settings</a>.'\n\t\t),\n\t\t{\n\t\t\ta: (\n\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t<a\n\t\t\t\t\thref={ siteIconSettingsUrl }\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t/>\n\t\t\t),\n\t\t}\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ __( 'Image width' ) }\n\t\t\t\t\t\tonChange={ ( newWidth ) =>\n\t\t\t\t\t\t\tsetAttributes( { width: newWidth } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmin={ minWidth }\n\t\t\t\t\t\tmax={ maxWidthBuffer }\n\t\t\t\t\t\tinitialPosition={ Math.min(\n\t\t\t\t\t\t\tdefaultWidth,\n\t\t\t\t\t\t\tmaxWidthBuffer\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ width || '' }\n\t\t\t\t\t\tdisabled={ ! isResizable }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Link image to home' ) }\n\t\t\t\t\t\tonChange={ () => setAttributes( { isLink: ! isLink } ) }\n\t\t\t\t\t\tchecked={ isLink }\n\t\t\t\t\t/>\n\t\t\t\t\t{ isLink && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tlinkTarget: value ? '_blank' : '_self',\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\tchecked={ linkTarget === '_blank' }\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\t{ canUserEdit && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Use as Site Icon' ) }\n\t\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\t\tsetAttributes( { shouldSyncIcon: value } );\n\t\t\t\t\t\t\t\t\tsetIcon( value ? logoId : undefined );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tchecked={ !! shouldSyncIcon }\n\t\t\t\t\t\t\t\thelp={ syncSiteIconHelpText }\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</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t{ canEditImage && ! isEditingImage && (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tonClick={ () => setIsEditingImage( true ) }\n\t\t\t\t\t\ticon={ crop }\n\t\t\t\t\t\tlabel={ __( 'Crop' ) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</BlockControls>\n\t\t\t{ imgEdit }\n\t\t</>\n\t);\n};\n\n// This is a light wrapper around MediaReplaceFlow because the block has two\n// different MediaReplaceFlows, one for the inspector and one for the toolbar.\nfunction SiteLogoReplaceFlow( { mediaURL, ...mediaReplaceProps } ) {\n\treturn (\n\t\t<MediaReplaceFlow\n\t\t\t{ ...mediaReplaceProps }\n\t\t\tmediaURL={ mediaURL }\n\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\taccept={ ACCEPT_MEDIA_STRING }\n\t\t/>\n\t);\n}\n\nconst InspectorLogoPreview = ( { media, itemGroupProps } ) => {\n\tconst {\n\t\talt_text: alt,\n\t\tsource_url: logoUrl,\n\t\tslug: logoSlug,\n\t\tmedia_details: logoMediaDetails,\n\t} = media ?? {};\n\tconst logoLabel = logoMediaDetails?.sizes?.full?.file || logoSlug;\n\treturn (\n\t\t<ItemGroup { ...itemGroupProps } as=\"span\">\n\t\t\t<HStack justify=\"flex-start\" as=\"span\">\n\t\t\t\t<img src={ logoUrl } alt={ alt } />\n\t\t\t\t<FlexItem as=\"span\">\n\t\t\t\t\t<Truncate\n\t\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\t\tclassName=\"block-library-site-logo__inspector-media-replace-title\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ logoLabel }\n\t\t\t\t\t</Truncate>\n\t\t\t\t</FlexItem>\n\t\t\t</HStack>\n\t\t</ItemGroup>\n\t);\n};\n\nexport default function LogoEdit( {\n\tattributes,\n\tclassName,\n\tsetAttributes,\n\tisSelected,\n} ) {\n\tconst { width, shouldSyncIcon } = attributes;\n\tconst {\n\t\tsiteLogoId,\n\t\tcanUserEdit,\n\t\turl,\n\t\tsiteIconId,\n\t\tmediaItemData,\n\t\tisRequestingMediaItem,\n\t} = useSelect( ( select ) => {\n\t\tconst { canUser, getEntityRecord, getEditedEntityRecord } =\n\t\t\tselect( coreStore );\n\t\tconst _canUserEdit = canUser( 'update', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} );\n\t\tconst siteSettings = _canUserEdit\n\t\t\t? getEditedEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\t\tconst siteData = getEntityRecord( 'root', '__unstableBase' );\n\t\tconst _siteLogoId = _canUserEdit\n\t\t\t? siteSettings?.site_logo\n\t\t\t: siteData?.site_logo;\n\t\tconst _siteIconId = siteSettings?.site_icon;\n\t\tconst mediaItem =\n\t\t\t_siteLogoId &&\n\t\t\tselect( coreStore ).getMedia( _siteLogoId, {\n\t\t\t\tcontext: 'view',\n\t\t\t} );\n\t\tconst _isRequestingMediaItem =\n\t\t\t!! _siteLogoId &&\n\t\t\t! select( coreStore ).hasFinishedResolution( 'getMedia', [\n\t\t\t\t_siteLogoId,\n\t\t\t\t{ context: 'view' },\n\t\t\t] );\n\n\t\treturn {\n\t\t\tsiteLogoId: _siteLogoId,\n\t\t\tcanUserEdit: _canUserEdit,\n\t\t\turl: siteData?.home,\n\t\t\tmediaItemData: mediaItem,\n\t\t\tisRequestingMediaItem: _isRequestingMediaItem,\n\t\t\tsiteIconId: _siteIconId,\n\t\t};\n\t}, [] );\n\tconst { getSettings } = useSelect( blockEditorStore );\n\tconst [ temporaryURL, setTemporaryURL ] = useState();\n\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\n\tconst setLogo = ( newValue, shouldForceSync = false ) => {\n\t\t// `shouldForceSync` is used to force syncing when the attribute\n\t\t// may not have updated yet.\n\t\tif ( shouldSyncIcon || shouldForceSync ) {\n\t\t\tsetIcon( newValue );\n\t\t}\n\n\t\teditEntityRecord( 'root', 'site', undefined, {\n\t\t\tsite_logo: newValue,\n\t\t} );\n\t};\n\n\tconst setIcon = ( newValue ) =>\n\t\t// The new value needs to be `null` to reset the Site Icon.\n\t\teditEntityRecord( 'root', 'site', undefined, {\n\t\t\tsite_icon: newValue ?? null,\n\t\t} );\n\n\tconst { alt_text: alt, source_url: logoUrl } = mediaItemData ?? {};\n\n\tconst onInitialSelectLogo = ( media ) => {\n\t\t// Initialize the syncSiteIcon toggle. If we currently have no Site logo and no\n\t\t// site icon, automatically sync the logo to the icon.\n\t\tif ( shouldSyncIcon === undefined ) {\n\t\t\tconst shouldForceSync = ! siteIconId;\n\t\t\tsetAttributes( { shouldSyncIcon: shouldForceSync } );\n\n\t\t\t// Because we cannot rely on the `shouldSyncIcon` attribute to have updated by\n\t\t\t// the time `setLogo` is called, pass an argument to force the syncing.\n\t\t\tonSelectLogo( media, shouldForceSync );\n\t\t\treturn;\n\t\t}\n\n\t\tonSelectLogo( media );\n\t};\n\n\tconst onSelectLogo = ( media, shouldForceSync = false ) => {\n\t\tif ( ! media ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! media.id && media.url ) {\n\t\t\t// This is a temporary blob image.\n\t\t\tsetTemporaryURL( media.url );\n\t\t\tsetLogo( undefined );\n\t\t\treturn;\n\t\t}\n\n\t\tsetLogo( media.id, shouldForceSync );\n\t};\n\n\tconst onRemoveLogo = () => {\n\t\tsetLogo( null );\n\t\tsetAttributes( { width: undefined } );\n\t};\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst onUploadError = ( message ) => {\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t\tsetTemporaryURL();\n\t};\n\n\tconst onFilesDrop = ( filesList ) => {\n\t\tif ( filesList?.length > 1 ) {\n\t\t\tonUploadError( __( 'Only one image can be used as a site logo.' ) );\n\t\t\treturn;\n\t\t}\n\n\t\tgetSettings().mediaUpload( {\n\t\t\tallowedTypes: ALLOWED_MEDIA_TYPES,\n\t\t\tfilesList,\n\t\t\tonFileChange( [ image ] ) {\n\t\t\t\tif ( isBlobURL( image?.url ) ) {\n\t\t\t\t\tsetTemporaryURL( image.url );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tonInitialSelectLogo( image );\n\t\t\t},\n\t\t\tonError: onUploadError,\n\t\t} );\n\t};\n\n\tconst mediaReplaceFlowProps = {\n\t\tmediaURL: logoUrl,\n\t\tname: ! logoUrl ? __( 'Choose logo' ) : __( 'Replace' ),\n\t\tonSelect: onSelectLogo,\n\t\tonError: onUploadError,\n\t\tonReset: onRemoveLogo,\n\t};\n\tconst controls = canUserEdit && (\n\t\t<BlockControls group=\"other\">\n\t\t\t<SiteLogoReplaceFlow { ...mediaReplaceFlowProps } />\n\t\t</BlockControls>\n\t);\n\n\tlet logoImage;\n\tconst isLoading = siteLogoId === undefined || isRequestingMediaItem;\n\tif ( isLoading ) {\n\t\tlogoImage = <Spinner />;\n\t}\n\n\t// Reset temporary url when logoUrl is available.\n\tuseEffect( () => {\n\t\tif ( logoUrl && temporaryURL ) {\n\t\t\tsetTemporaryURL();\n\t\t}\n\t}, [ logoUrl, temporaryURL ] );\n\n\tif ( !! logoUrl || !! temporaryURL ) {\n\t\tlogoImage = (\n\t\t\t<>\n\t\t\t\t<SiteLogo\n\t\t\t\t\talt={ alt }\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tclassName={ className }\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tlogoUrl={ temporaryURL || logoUrl }\n\t\t\t\t\tsetLogo={ setLogo }\n\t\t\t\t\tlogoId={ mediaItemData?.id || siteLogoId }\n\t\t\t\t\tsiteUrl={ url }\n\t\t\t\t\tsetIcon={ setIcon }\n\t\t\t\t\ticonId={ siteIconId }\n\t\t\t\t\tcanUserEdit={ canUserEdit }\n\t\t\t\t/>\n\t\t\t\t{ canUserEdit && <DropZone onFilesDrop={ onFilesDrop } /> }\n\t\t\t</>\n\t\t);\n\t}\n\tconst placeholder = ( content ) => {\n\t\tconst placeholderClassName = clsx(\n\t\t\t'block-editor-media-placeholder',\n\t\t\tclassName\n\t\t);\n\n\t\treturn (\n\t\t\t<Placeholder\n\t\t\t\tclassName={ placeholderClassName }\n\t\t\t\tpreview={ logoImage }\n\t\t\t\twithIllustration\n\t\t\t\tstyle={ {\n\t\t\t\t\twidth,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ content }\n\t\t\t</Placeholder>\n\t\t);\n\t};\n\n\tconst classes = clsx( className, {\n\t\t'is-default-size': ! width,\n\t\t'is-transient': temporaryURL,\n\t} );\n\n\tconst blockProps = useBlockProps( { className: classes } );\n\n\tconst mediaInspectorPanel = ( canUserEdit || logoUrl ) && (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Media' ) }>\n\t\t\t\t<div className=\"block-library-site-logo__inspector-media-replace-container\">\n\t\t\t\t\t{ ! canUserEdit ? (\n\t\t\t\t\t\t<InspectorLogoPreview\n\t\t\t\t\t\t\tmedia={ mediaItemData }\n\t\t\t\t\t\t\titemGroupProps={ {\n\t\t\t\t\t\t\t\tisBordered: true,\n\t\t\t\t\t\t\t\tclassName:\n\t\t\t\t\t\t\t\t\t'block-library-site-logo__inspector-readonly-logo-preview',\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\t\t<>\n\t\t\t\t\t\t\t<SiteLogoReplaceFlow\n\t\t\t\t\t\t\t\t{ ...mediaReplaceFlowProps }\n\t\t\t\t\t\t\t\tname={\n\t\t\t\t\t\t\t\t\t!! logoUrl ? (\n\t\t\t\t\t\t\t\t\t\t<InspectorLogoPreview\n\t\t\t\t\t\t\t\t\t\t\tmedia={ mediaItemData }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t__( 'Choose logo' )\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\trenderToggle={ ( props ) => (\n\t\t\t\t\t\t\t\t\t<Button { ...props } __next40pxDefaultSize>\n\t\t\t\t\t\t\t\t\t\t{ temporaryURL ? (\n\t\t\t\t\t\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\tprops.children\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<DropZone onFilesDrop={ onFilesDrop } />\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t{ controls }\n\t\t\t{ mediaInspectorPanel }\n\t\t\t{ ( !! logoUrl || !! temporaryURL ) && logoImage }\n\t\t\t{ ( isLoading ||\n\t\t\t\t( ! temporaryURL && ! logoUrl && ! canUserEdit ) ) && (\n\t\t\t\t<Placeholder className=\"site-logo_placeholder\" withIllustration>\n\t\t\t\t\t{ isLoading && (\n\t\t\t\t\t\t<span className=\"components-placeholder__preview\">\n\t\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t</Placeholder>\n\t\t\t) }\n\t\t\t{ ! isLoading && ! temporaryURL && ! logoUrl && canUserEdit && (\n\t\t\t\t<MediaPlaceholder\n\t\t\t\t\tonSelect={ onInitialSelectLogo }\n\t\t\t\t\taccept={ ACCEPT_MEDIA_STRING }\n\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\tmediaLibraryButton={ ( { open } ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\ticon={ upload }\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Choose logo' ) }\n\t\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\t\ttooltipPosition=\"middle right\"\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\topen();\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} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SACCC,wBAAwB,EACxBC,SAAS,EACTC,QAAQ,QACF,oBAAoB;AAC3B,SAASC,EAAE,EAAEC,KAAK,QAAQ,iBAAiB;AAC3C,SACCC,SAAS,EACTC,YAAY,EACZC,YAAY,EACZC,OAAO,EACPC,aAAa,EACbC,aAAa,EACbC,WAAW,EACXC,MAAM,EACNC,QAAQ,EACRC,QAAQ,EACRC,uBAAuB,IAAIC,SAAS,EACpCC,oBAAoB,IAAIC,MAAM,EAC9BC,sBAAsB,IAAIC,QAAQ,QAC5B,uBAAuB;AAC9B,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SACCC,aAAa,EACbC,iBAAiB,EACjBC,gBAAgB,EAChBC,gBAAgB,EAChBC,aAAa,EACbC,KAAK,IAAIC,gBAAgB,EACzBC,yBAAyB,IAAIC,WAAW,QAClC,yBAAyB;AAChC,SAASC,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASL,KAAK,IAAIM,SAAS,QAAQ,sBAAsB;AACzD,SAASC,IAAI,EAAEC,MAAM,QAAQ,kBAAkB;AAC/C,SAASR,KAAK,IAAIS,YAAY,QAAQ,oBAAoB;;AAE1D;AACA;AACA;AACA,SAASC,QAAQ,QAAQ,o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C7BoO,WAAW;UACXC,eAAe,EAAC,cAAc;UAC9BzI,OAAO,EAAGA,CAAA,KAAM;YACfsI,IAAI,CAAC,CAAC;UACP;QAAG,CACH,CAAC;MAEJ;IAAG,CACH,CACD;EAAA,CACG,CAAC;AAER","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["clsx","isBlobURL","createInterpolateElement","useEffect","useState","__","isRTL","PanelBody","RangeControl","ResizableBox","Spinner","ToggleControl","ToolbarButton","Placeholder","Button","DropZone","FlexItem","__experimentalItemGroup","ItemGroup","__experimentalHStack","HStack","__experimentalTruncate","Truncate","useViewportMatch","BlockControls","InspectorControls","MediaPlaceholder","MediaReplaceFlow","useBlockProps","store","blockEditorStore","__experimentalImageEditor","ImageEditor","useSelect","useDispatch","coreStore","crop","upload","noticesStore","MIN_SIZE","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","ALLOWED_MEDIA_TYPES","ACCEPT_MEDIA_STRING","SiteLogo","alt","attributes","align","width","height","isLink","linkTarget","shouldSyncIcon","isSelected","setAttributes","setLogo","logoUrl","siteUrl","logoId","iconId","setIcon","canUserEdit","isLargeViewport","isWideAligned","includes","isResizable","naturalWidth","naturalHeight","setNaturalSize","isEditingImage","setIsEditingImage","toggleSelection","imageEditing","maxWidth","title","select","settings","getSettings","siteEntities","getEntityRecord","name","onResizeStart","onResizeStop","img","children","className","src","onLoad","event","target","imgWrapper","href","rel","onClick","preventDefault","style","defaultWidth","currentWidth","ratio","currentHeight","minWidth","Math","ceil","minHeight","maxWidthBuffer","showRightHandle","showLeftHandle","canEditImage","imgEdit","id","url","onSaveImage","imageAttributes","onFinishEditing","size","showHandle","maxHeight","lockAspectRatio","enable","top","right","bottom","left","direction","elt","delta","parseInt","shouldUseNewUrl","window","__experimentalUseCustomizerSiteLogoUrl","siteIconSettingsUrl","syncSiteIconHelpText","a","__nextHasNoMarginBottom","__next40pxDefaultSize","label","onChange","newWidth","min","max","initialPosition","value","disabled","checked","undefined","help","group","icon","SiteLogoReplaceFlow","mediaURL","mediaReplaceProps","allowedTypes","accept","InspectorLogoPreview","media","itemGroupProps","alt_text","source_url","slug","logoSlug","media_details","logoMediaDetails","logoLabel","sizes","full","file","as","justify","numberOfLines","LogoEdit","siteLogoId","siteIconId","mediaItemData","isRequestingMediaItem","canUser","getEditedEntityRecord","_canUserEdit","kind","siteSettings","siteData","_siteLogoId","site_logo","_siteIconId","site_icon","mediaItem","getMedia","context","_isRequestingMediaItem","hasFinishedResolution","home","temporaryURL","setTemporaryURL","editEntityRecord","newValue","shouldForceSync","onInitialSelectLogo","onSelectLogo","onRemoveLogo","createErrorNotice","onUploadError","message","type","onFilesDrop","filesList","mediaUpload","onFileChange","image","onError","multiple","mediaReplaceFlowProps","onSelect","onReset","controls","logoImage","isLoading","placeholder","content","placeholderClassName","preview","withIllustration","classes","blockProps","mediaInspectorPanel","isBordered","renderToggle","props","mediaLibraryButton","open","variant","showTooltip","tooltipPosition"],"sources":["@wordpress/block-library/src/site-logo/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { isBlobURL } from '@wordpress/blob';\nimport {\n\tcreateInterpolateElement,\n\tuseEffect,\n\tuseState,\n} from '@wordpress/element';\nimport { __, isRTL } from '@wordpress/i18n';\nimport {\n\tPanelBody,\n\tRangeControl,\n\tResizableBox,\n\tSpinner,\n\tToggleControl,\n\tToolbarButton,\n\tPlaceholder,\n\tButton,\n\tDropZone,\n\tFlexItem,\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalTruncate as Truncate,\n} from '@wordpress/components';\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\tBlockControls,\n\tInspectorControls,\n\tMediaPlaceholder,\n\tMediaReplaceFlow,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n\t__experimentalImageEditor as ImageEditor,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { crop, upload } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { MIN_SIZE } from '../image/constants';\n\nconst ALLOWED_MEDIA_TYPES = [ 'image' ];\nconst ACCEPT_MEDIA_STRING = 'image/*';\n\nconst SiteLogo = ( {\n\talt,\n\tattributes: { align, width, height, isLink, linkTarget, shouldSyncIcon },\n\tisSelected,\n\tsetAttributes,\n\tsetLogo,\n\tlogoUrl,\n\tsiteUrl,\n\tlogoId,\n\ticonId,\n\tsetIcon,\n\tcanUserEdit,\n} ) => {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isWideAligned = [ 'wide', 'full' ].includes( align );\n\tconst isResizable = ! isWideAligned && isLargeViewport;\n\tconst [ { naturalWidth, naturalHeight }, setNaturalSize ] = useState( {} );\n\tconst [ isEditingImage, setIsEditingImage ] = useState( false );\n\tconst { toggleSelection } = useDispatch( blockEditorStore );\n\tconst { imageEditing, maxWidth, title } = useSelect( ( select ) => {\n\t\tconst settings = select( blockEditorStore ).getSettings();\n\t\tconst siteEntities = select( coreStore ).getEntityRecord(\n\t\t\t'root',\n\t\t\t'__unstableBase'\n\t\t);\n\t\treturn {\n\t\t\ttitle: siteEntities?.name,\n\t\t\timageEditing: settings.imageEditing,\n\t\t\tmaxWidth: settings.maxWidth,\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\t// Turn the `Use as site icon` toggle off if it is on but the logo and icon have\n\t\t// fallen out of sync. This can happen if the toggle is saved in the `on` position,\n\t\t// but changes are later made to the site icon in the Customizer.\n\t\tif ( shouldSyncIcon && logoId !== iconId ) {\n\t\t\tsetAttributes( { shouldSyncIcon: false } );\n\t\t}\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( ! isSelected ) {\n\t\t\tsetIsEditingImage( false );\n\t\t}\n\t}, [ isSelected ] );\n\n\tfunction onResizeStart() {\n\t\ttoggleSelection( false );\n\t}\n\n\tfunction onResizeStop() {\n\t\ttoggleSelection( true );\n\t}\n\n\tconst img = (\n\t\t<>\n\t\t\t<img\n\t\t\t\tclassName=\"custom-logo\"\n\t\t\t\tsrc={ logoUrl }\n\t\t\t\talt={ alt }\n\t\t\t\tonLoad={ ( event ) => {\n\t\t\t\t\tsetNaturalSize( {\n\t\t\t\t\t\tnaturalWidth: event.target.naturalWidth,\n\t\t\t\t\t\tnaturalHeight: event.target.naturalHeight,\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t{ isBlobURL( logoUrl ) && <Spinner /> }\n\t\t</>\n\t);\n\n\tlet imgWrapper = img;\n\n\t// Disable reason: Image itself is not meant to be interactive, but\n\t// should direct focus to block.\n\tif ( isLink ) {\n\t\timgWrapper = (\n\t\t\t/* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */\n\t\t\t<a\n\t\t\t\thref={ siteUrl }\n\t\t\t\tclassName=\"custom-logo-link\"\n\t\t\t\trel=\"home\"\n\t\t\t\ttitle={ title }\n\t\t\t\tonClick={ ( event ) => event.preventDefault() }\n\t\t\t>\n\t\t\t\t{ img }\n\t\t\t</a>\n\t\t\t/* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */\n\t\t);\n\t}\n\n\tif ( ! isResizable || ! naturalWidth || ! naturalHeight ) {\n\t\treturn <div style={ { width, height } }>{ imgWrapper }</div>;\n\t}\n\n\t// Set the default width to a responsible size.\n\t// Note that this width is also set in the attached frontend CSS file.\n\tconst defaultWidth = 120;\n\n\tconst currentWidth = width || defaultWidth;\n\tconst ratio = naturalWidth / naturalHeight;\n\tconst currentHeight = currentWidth / ratio;\n\tconst minWidth =\n\t\tnaturalWidth < naturalHeight ? MIN_SIZE : Math.ceil( MIN_SIZE * ratio );\n\tconst minHeight =\n\t\tnaturalHeight < naturalWidth ? MIN_SIZE : Math.ceil( MIN_SIZE / ratio );\n\n\t// With the current implementation of ResizableBox, an image needs an\n\t// explicit pixel value for the max-width. In absence of being able to\n\t// set the content-width, this max-width is currently dictated by the\n\t// vanilla editor style. The following variable adds a buffer to this\n\t// vanilla style, so 3rd party themes have some wiggleroom. This does,\n\t// in most cases, allow you to scale the image beyond the width of the\n\t// main column, though not infinitely.\n\t// @todo It would be good to revisit this once a content-width variable\n\t// becomes available.\n\tconst maxWidthBuffer = maxWidth * 2.5;\n\n\tlet showRightHandle = false;\n\tlet showLeftHandle = false;\n\n\t/* eslint-disable no-lonely-if */\n\t// See https://github.com/WordPress/gutenberg/issues/7584.\n\tif ( align === 'center' ) {\n\t\t// When the image is centered, show both handles.\n\t\tshowRightHandle = true;\n\t\tshowLeftHandle = true;\n\t} else if ( isRTL() ) {\n\t\t// In RTL mode the image is on the right by default.\n\t\t// Show the right handle and hide the left handle only when it is\n\t\t// aligned left. Otherwise always show the left handle.\n\t\tif ( align === 'left' ) {\n\t\t\tshowRightHandle = true;\n\t\t} else {\n\t\t\tshowLeftHandle = true;\n\t\t}\n\t} else {\n\t\t// Show the left handle and hide the right handle only when the\n\t\t// image is aligned right. Otherwise always show the right handle.\n\t\tif ( align === 'right' ) {\n\t\t\tshowLeftHandle = true;\n\t\t} else {\n\t\t\tshowRightHandle = true;\n\t\t}\n\t}\n\t/* eslint-enable no-lonely-if */\n\n\tconst canEditImage =\n\t\tlogoId && naturalWidth && naturalHeight && imageEditing;\n\n\tconst imgEdit =\n\t\tcanEditImage && isEditingImage ? (\n\t\t\t<ImageEditor\n\t\t\t\tid={ logoId }\n\t\t\t\turl={ logoUrl }\n\t\t\t\twidth={ currentWidth }\n\t\t\t\theight={ currentHeight }\n\t\t\t\tnaturalHeight={ naturalHeight }\n\t\t\t\tnaturalWidth={ naturalWidth }\n\t\t\t\tonSaveImage={ ( imageAttributes ) => {\n\t\t\t\t\tsetLogo( imageAttributes.id );\n\t\t\t\t} }\n\t\t\t\tonFinishEditing={ () => {\n\t\t\t\t\tsetIsEditingImage( false );\n\t\t\t\t} }\n\t\t\t/>\n\t\t) : (\n\t\t\t<ResizableBox\n\t\t\t\tsize={ {\n\t\t\t\t\twidth: currentWidth,\n\t\t\t\t\theight: currentHeight,\n\t\t\t\t} }\n\t\t\t\tshowHandle={ isSelected }\n\t\t\t\tminWidth={ minWidth }\n\t\t\t\tmaxWidth={ maxWidthBuffer }\n\t\t\t\tminHeight={ minHeight }\n\t\t\t\tmaxHeight={ maxWidthBuffer / ratio }\n\t\t\t\tlockAspectRatio\n\t\t\t\tenable={ {\n\t\t\t\t\ttop: false,\n\t\t\t\t\tright: showRightHandle,\n\t\t\t\t\tbottom: true,\n\t\t\t\t\tleft: showLeftHandle,\n\t\t\t\t} }\n\t\t\t\tonResizeStart={ onResizeStart }\n\t\t\t\tonResizeStop={ ( event, direction, elt, delta ) => {\n\t\t\t\t\tonResizeStop();\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\twidth: parseInt( currentWidth + delta.width, 10 ),\n\t\t\t\t\t\theight: parseInt( currentHeight + delta.height, 10 ),\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ imgWrapper }\n\t\t\t</ResizableBox>\n\t\t);\n\n\t// Support the previous location for the Site Icon settings. To be removed\n\t// when the required WP core version for Gutenberg is >= 6.5.0.\n\tconst shouldUseNewUrl = ! window?.__experimentalUseCustomizerSiteLogoUrl;\n\n\tconst siteIconSettingsUrl = shouldUseNewUrl\n\t\t? siteUrl + '/wp-admin/options-general.php'\n\t\t: siteUrl + '/wp-admin/customize.php?autofocus[section]=title_tagline';\n\n\tconst syncSiteIconHelpText = createInterpolateElement(\n\t\t__(\n\t\t\t'Site Icons are what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. To use a custom icon that is different from your site logo, use the <a>Site Icon settings</a>.'\n\t\t),\n\t\t{\n\t\t\ta: (\n\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t<a\n\t\t\t\t\thref={ siteIconSettingsUrl }\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t/>\n\t\t\t),\n\t\t}\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ __( 'Image width' ) }\n\t\t\t\t\t\tonChange={ ( newWidth ) =>\n\t\t\t\t\t\t\tsetAttributes( { width: newWidth } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmin={ minWidth }\n\t\t\t\t\t\tmax={ maxWidthBuffer }\n\t\t\t\t\t\tinitialPosition={ Math.min(\n\t\t\t\t\t\t\tdefaultWidth,\n\t\t\t\t\t\t\tmaxWidthBuffer\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ width || '' }\n\t\t\t\t\t\tdisabled={ ! isResizable }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Link image to home' ) }\n\t\t\t\t\t\tonChange={ () => setAttributes( { isLink: ! isLink } ) }\n\t\t\t\t\t\tchecked={ isLink }\n\t\t\t\t\t/>\n\t\t\t\t\t{ isLink && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tlinkTarget: value ? '_blank' : '_self',\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\tchecked={ linkTarget === '_blank' }\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\t{ canUserEdit && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Use as Site Icon' ) }\n\t\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\t\tsetAttributes( { shouldSyncIcon: value } );\n\t\t\t\t\t\t\t\t\tsetIcon( value ? logoId : undefined );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tchecked={ !! shouldSyncIcon }\n\t\t\t\t\t\t\t\thelp={ syncSiteIconHelpText }\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</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t{ canEditImage && ! isEditingImage && (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tonClick={ () => setIsEditingImage( true ) }\n\t\t\t\t\t\ticon={ crop }\n\t\t\t\t\t\tlabel={ __( 'Crop' ) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</BlockControls>\n\t\t\t{ imgEdit }\n\t\t</>\n\t);\n};\n\n// This is a light wrapper around MediaReplaceFlow because the block has two\n// different MediaReplaceFlows, one for the inspector and one for the toolbar.\nfunction SiteLogoReplaceFlow( { mediaURL, ...mediaReplaceProps } ) {\n\treturn (\n\t\t<MediaReplaceFlow\n\t\t\t{ ...mediaReplaceProps }\n\t\t\tmediaURL={ mediaURL }\n\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\taccept={ ACCEPT_MEDIA_STRING }\n\t\t/>\n\t);\n}\n\nconst InspectorLogoPreview = ( { media, itemGroupProps } ) => {\n\tconst {\n\t\talt_text: alt,\n\t\tsource_url: logoUrl,\n\t\tslug: logoSlug,\n\t\tmedia_details: logoMediaDetails,\n\t} = media ?? {};\n\tconst logoLabel = logoMediaDetails?.sizes?.full?.file || logoSlug;\n\treturn (\n\t\t<ItemGroup { ...itemGroupProps } as=\"span\">\n\t\t\t<HStack justify=\"flex-start\" as=\"span\">\n\t\t\t\t<img src={ logoUrl } alt={ alt } />\n\t\t\t\t<FlexItem as=\"span\">\n\t\t\t\t\t<Truncate\n\t\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\t\tclassName=\"block-library-site-logo__inspector-media-replace-title\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ logoLabel }\n\t\t\t\t\t</Truncate>\n\t\t\t\t</FlexItem>\n\t\t\t</HStack>\n\t\t</ItemGroup>\n\t);\n};\n\nexport default function LogoEdit( {\n\tattributes,\n\tclassName,\n\tsetAttributes,\n\tisSelected,\n} ) {\n\tconst { width, shouldSyncIcon } = attributes;\n\tconst {\n\t\tsiteLogoId,\n\t\tcanUserEdit,\n\t\turl,\n\t\tsiteIconId,\n\t\tmediaItemData,\n\t\tisRequestingMediaItem,\n\t} = useSelect( ( select ) => {\n\t\tconst { canUser, getEntityRecord, getEditedEntityRecord } =\n\t\t\tselect( coreStore );\n\t\tconst _canUserEdit = canUser( 'update', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} );\n\t\tconst siteSettings = _canUserEdit\n\t\t\t? getEditedEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\t\tconst siteData = getEntityRecord( 'root', '__unstableBase' );\n\t\tconst _siteLogoId = _canUserEdit\n\t\t\t? siteSettings?.site_logo\n\t\t\t: siteData?.site_logo;\n\t\tconst _siteIconId = siteSettings?.site_icon;\n\t\tconst mediaItem =\n\t\t\t_siteLogoId &&\n\t\t\tselect( coreStore ).getMedia( _siteLogoId, {\n\t\t\t\tcontext: 'view',\n\t\t\t} );\n\t\tconst _isRequestingMediaItem =\n\t\t\t!! _siteLogoId &&\n\t\t\t! select( coreStore ).hasFinishedResolution( 'getMedia', [\n\t\t\t\t_siteLogoId,\n\t\t\t\t{ context: 'view' },\n\t\t\t] );\n\n\t\treturn {\n\t\t\tsiteLogoId: _siteLogoId,\n\t\t\tcanUserEdit: _canUserEdit,\n\t\t\turl: siteData?.home,\n\t\t\tmediaItemData: mediaItem,\n\t\t\tisRequestingMediaItem: _isRequestingMediaItem,\n\t\t\tsiteIconId: _siteIconId,\n\t\t};\n\t}, [] );\n\tconst { getSettings } = useSelect( blockEditorStore );\n\tconst [ temporaryURL, setTemporaryURL ] = useState();\n\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\n\tconst setLogo = ( newValue, shouldForceSync = false ) => {\n\t\t// `shouldForceSync` is used to force syncing when the attribute\n\t\t// may not have updated yet.\n\t\tif ( shouldSyncIcon || shouldForceSync ) {\n\t\t\tsetIcon( newValue );\n\t\t}\n\n\t\teditEntityRecord( 'root', 'site', undefined, {\n\t\t\tsite_logo: newValue,\n\t\t} );\n\t};\n\n\tconst setIcon = ( newValue ) =>\n\t\t// The new value needs to be `null` to reset the Site Icon.\n\t\teditEntityRecord( 'root', 'site', undefined, {\n\t\t\tsite_icon: newValue ?? null,\n\t\t} );\n\n\tconst { alt_text: alt, source_url: logoUrl } = mediaItemData ?? {};\n\n\tconst onInitialSelectLogo = ( media ) => {\n\t\t// Initialize the syncSiteIcon toggle. If we currently have no Site logo and no\n\t\t// site icon, automatically sync the logo to the icon.\n\t\tif ( shouldSyncIcon === undefined ) {\n\t\t\tconst shouldForceSync = ! siteIconId;\n\t\t\tsetAttributes( { shouldSyncIcon: shouldForceSync } );\n\n\t\t\t// Because we cannot rely on the `shouldSyncIcon` attribute to have updated by\n\t\t\t// the time `setLogo` is called, pass an argument to force the syncing.\n\t\t\tonSelectLogo( media, shouldForceSync );\n\t\t\treturn;\n\t\t}\n\n\t\tonSelectLogo( media );\n\t};\n\n\tconst onSelectLogo = ( media, shouldForceSync = false ) => {\n\t\tif ( ! media ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! media.id && media.url ) {\n\t\t\t// This is a temporary blob image.\n\t\t\tsetTemporaryURL( media.url );\n\t\t\tsetLogo( undefined );\n\t\t\treturn;\n\t\t}\n\n\t\tsetLogo( media.id, shouldForceSync );\n\t};\n\n\tconst onRemoveLogo = () => {\n\t\tsetLogo( null );\n\t\tsetAttributes( { width: undefined } );\n\t};\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst onUploadError = ( message ) => {\n\t\tcreateErrorNotice( message, { type: 'snackbar' } );\n\t\tsetTemporaryURL();\n\t};\n\n\tconst onFilesDrop = ( filesList ) => {\n\t\tgetSettings().mediaUpload( {\n\t\t\tallowedTypes: ALLOWED_MEDIA_TYPES,\n\t\t\tfilesList,\n\t\t\tonFileChange( [ image ] ) {\n\t\t\t\tif ( isBlobURL( image?.url ) ) {\n\t\t\t\t\tsetTemporaryURL( image.url );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tonInitialSelectLogo( image );\n\t\t\t},\n\t\t\tonError: onUploadError,\n\t\t\tmultiple: false,\n\t\t} );\n\t};\n\n\tconst mediaReplaceFlowProps = {\n\t\tmediaURL: logoUrl,\n\t\tname: ! logoUrl ? __( 'Choose logo' ) : __( 'Replace' ),\n\t\tonSelect: onSelectLogo,\n\t\tonError: onUploadError,\n\t\tonReset: onRemoveLogo,\n\t};\n\tconst controls = canUserEdit && (\n\t\t<BlockControls group=\"other\">\n\t\t\t<SiteLogoReplaceFlow { ...mediaReplaceFlowProps } />\n\t\t</BlockControls>\n\t);\n\n\tlet logoImage;\n\tconst isLoading = siteLogoId === undefined || isRequestingMediaItem;\n\tif ( isLoading ) {\n\t\tlogoImage = <Spinner />;\n\t}\n\n\t// Reset temporary url when logoUrl is available.\n\tuseEffect( () => {\n\t\tif ( logoUrl && temporaryURL ) {\n\t\t\tsetTemporaryURL();\n\t\t}\n\t}, [ logoUrl, temporaryURL ] );\n\n\tif ( !! logoUrl || !! temporaryURL ) {\n\t\tlogoImage = (\n\t\t\t<>\n\t\t\t\t<SiteLogo\n\t\t\t\t\talt={ alt }\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tclassName={ className }\n\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tlogoUrl={ temporaryURL || logoUrl }\n\t\t\t\t\tsetLogo={ setLogo }\n\t\t\t\t\tlogoId={ mediaItemData?.id || siteLogoId }\n\t\t\t\t\tsiteUrl={ url }\n\t\t\t\t\tsetIcon={ setIcon }\n\t\t\t\t\ticonId={ siteIconId }\n\t\t\t\t\tcanUserEdit={ canUserEdit }\n\t\t\t\t/>\n\t\t\t\t{ canUserEdit && <DropZone onFilesDrop={ onFilesDrop } /> }\n\t\t\t</>\n\t\t);\n\t}\n\tconst placeholder = ( content ) => {\n\t\tconst placeholderClassName = clsx(\n\t\t\t'block-editor-media-placeholder',\n\t\t\tclassName\n\t\t);\n\n\t\treturn (\n\t\t\t<Placeholder\n\t\t\t\tclassName={ placeholderClassName }\n\t\t\t\tpreview={ logoImage }\n\t\t\t\twithIllustration\n\t\t\t\tstyle={ {\n\t\t\t\t\twidth,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ content }\n\t\t\t</Placeholder>\n\t\t);\n\t};\n\n\tconst classes = clsx( className, {\n\t\t'is-default-size': ! width,\n\t\t'is-transient': temporaryURL,\n\t} );\n\n\tconst blockProps = useBlockProps( { className: classes } );\n\n\tconst mediaInspectorPanel = ( canUserEdit || logoUrl ) && (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Media' ) }>\n\t\t\t\t<div className=\"block-library-site-logo__inspector-media-replace-container\">\n\t\t\t\t\t{ ! canUserEdit ? (\n\t\t\t\t\t\t<InspectorLogoPreview\n\t\t\t\t\t\t\tmedia={ mediaItemData }\n\t\t\t\t\t\t\titemGroupProps={ {\n\t\t\t\t\t\t\t\tisBordered: true,\n\t\t\t\t\t\t\t\tclassName:\n\t\t\t\t\t\t\t\t\t'block-library-site-logo__inspector-readonly-logo-preview',\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\t\t<>\n\t\t\t\t\t\t\t<SiteLogoReplaceFlow\n\t\t\t\t\t\t\t\t{ ...mediaReplaceFlowProps }\n\t\t\t\t\t\t\t\tname={\n\t\t\t\t\t\t\t\t\t!! logoUrl ? (\n\t\t\t\t\t\t\t\t\t\t<InspectorLogoPreview\n\t\t\t\t\t\t\t\t\t\t\tmedia={ mediaItemData }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t__( 'Choose logo' )\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\trenderToggle={ ( props ) => (\n\t\t\t\t\t\t\t\t\t<Button { ...props } __next40pxDefaultSize>\n\t\t\t\t\t\t\t\t\t\t{ temporaryURL ? (\n\t\t\t\t\t\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\tprops.children\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<DropZone onFilesDrop={ onFilesDrop } />\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t{ controls }\n\t\t\t{ mediaInspectorPanel }\n\t\t\t{ ( !! logoUrl || !! temporaryURL ) && logoImage }\n\t\t\t{ ( isLoading ||\n\t\t\t\t( ! temporaryURL && ! logoUrl && ! canUserEdit ) ) && (\n\t\t\t\t<Placeholder className=\"site-logo_placeholder\" withIllustration>\n\t\t\t\t\t{ isLoading && (\n\t\t\t\t\t\t<span className=\"components-placeholder__preview\">\n\t\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t</Placeholder>\n\t\t\t) }\n\t\t\t{ ! isLoading && ! temporaryURL && ! logoUrl && canUserEdit && (\n\t\t\t\t<MediaPlaceholder\n\t\t\t\t\tonSelect={ onInitialSelectLogo }\n\t\t\t\t\taccept={ ACCEPT_MEDIA_STRING }\n\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\tonError={ onUploadError }\n\t\t\t\t\tplaceholder={ placeholder }\n\t\t\t\t\tmediaLibraryButton={ ( { open } ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\ticon={ upload }\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Choose logo' ) }\n\t\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\t\ttooltipPosition=\"middle right\"\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\topen();\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} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SACCC,wBAAwB,EACxBC,SAAS,EACTC,QAAQ,QACF,oBAAoB;AAC3B,SAASC,EAAE,EAAEC,KAAK,QAAQ,iBAAiB;AAC3C,SACCC,SAAS,EACTC,YAAY,EACZC,YAAY,EACZC,OAAO,EACPC,aAAa,EACbC,aAAa,EACbC,WAAW,EACXC,MAAM,EACNC,QAAQ,EACRC,QAAQ,EACRC,uBAAuB,IAAIC,SAAS,EACpCC,oBAAoB,IAAIC,MAAM,EAC9BC,sBAAsB,IAAIC,QAAQ,QAC5B,uBAAuB;AAC9B,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD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AAY,EAAG7G,mBAAqB;MACpCqK,OAAO,EAAGR,aAAe;MACzBgB,WAAW,EAAGA,WAAa;MAC3BW,kBAAkB,EAAGA,CAAE;QAAEC;MAAK,CAAC,KAAM;QACpC,oBACC9L,IAAA,CAAC3B,MAAM;UACN4H,qBAAqB;UACrBa,IAAI,EAAGlH,MAAQ;UACfmM,OAAO,EAAC,SAAS;UACjB7F,KAAK,EAAGtI,EAAE,CAAE,aAAc,CAAG;UAC7BoO,WAAW;UACXC,eAAe,EAAC,cAAc;UAC9BzI,OAAO,EAAGA,CAAA,KAAM;YACfsI,IAAI,CAAC,CAAC;UACP;QAAG,CACH,CAAC;MAEJ;IAAG,CACH,CACD;EAAA,CACG,CAAC;AAER","ignoreList":[]}
|
|
@@ -38,7 +38,11 @@ const VideoSettings = ({
|
|
|
38
38
|
const toggleAttribute = attribute => {
|
|
39
39
|
return newValue => {
|
|
40
40
|
setAttributes({
|
|
41
|
-
[attribute]: newValue
|
|
41
|
+
[attribute]: newValue,
|
|
42
|
+
// Set muted when autoplay changes
|
|
43
|
+
...(attribute === 'autoplay' && {
|
|
44
|
+
muted: newValue
|
|
45
|
+
})
|
|
42
46
|
});
|
|
43
47
|
};
|
|
44
48
|
};
|
|
@@ -62,7 +66,8 @@ const VideoSettings = ({
|
|
|
62
66
|
hasValue: () => !!autoplay,
|
|
63
67
|
onDeselect: () => {
|
|
64
68
|
setAttributes({
|
|
65
|
-
autoplay: false
|
|
69
|
+
autoplay: false,
|
|
70
|
+
muted: false
|
|
66
71
|
});
|
|
67
72
|
},
|
|
68
73
|
children: /*#__PURE__*/_jsx(ToggleControl, {
|
|
@@ -100,7 +105,9 @@ const VideoSettings = ({
|
|
|
100
105
|
__nextHasNoMarginBottom: true,
|
|
101
106
|
label: __('Muted'),
|
|
102
107
|
onChange: toggleFactory.muted,
|
|
103
|
-
checked: !!muted
|
|
108
|
+
checked: !!muted,
|
|
109
|
+
disabled: autoplay,
|
|
110
|
+
help: autoplay ? __('Muted because of Autoplay.') : null
|
|
104
111
|
})
|
|
105
112
|
}), /*#__PURE__*/_jsx(ToolsPanelItem, {
|
|
106
113
|
label: __('Playback controls'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","_x","ToggleControl","SelectControl","__experimentalToolsPanelItem","ToolsPanelItem","useMemo","useCallback","Platform","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","options","value","label","VideoSettings","setAttributes","attributes","autoplay","controls","loop","muted","playsInline","preload","autoPlayHelpText","getAutoplayHelp","select","web","checked","native","toggleFactory","toggleAttribute","attribute","newValue","onChangePreload","children","isShownByDefault","hasValue","onDeselect","__nextHasNoMarginBottom","onChange","help","__next40pxDefaultSize","hideCancelButton"],"sources":["@wordpress/block-library/src/video/edit-common-settings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tToggleControl,\n\tSelectControl,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { useMemo, useCallback, Platform } from '@wordpress/element';\n\nconst options = [\n\t{ value: 'auto', label: __( 'Auto' ) },\n\t{ value: 'metadata', label: __( 'Metadata' ) },\n\t{ value: 'none', label: _x( 'None', 'Preload value' ) },\n];\n\nconst VideoSettings = ( { setAttributes, attributes } ) => {\n\tconst { autoplay, controls, loop, muted, playsInline, preload } =\n\t\tattributes;\n\n\tconst autoPlayHelpText = __(\n\t\t'Autoplay may cause usability issues for some users.'\n\t);\n\tconst getAutoplayHelp = Platform.select( {\n\t\tweb: useCallback( ( checked ) => {\n\t\t\treturn checked ? autoPlayHelpText : null;\n\t\t}, [] ),\n\t\tnative: autoPlayHelpText,\n\t} );\n\n\tconst toggleFactory = useMemo( () => {\n\t\tconst toggleAttribute = ( attribute ) => {\n\t\t\treturn ( newValue ) => {\n\t\t\t\tsetAttributes( {
|
|
1
|
+
{"version":3,"names":["__","_x","ToggleControl","SelectControl","__experimentalToolsPanelItem","ToolsPanelItem","useMemo","useCallback","Platform","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","options","value","label","VideoSettings","setAttributes","attributes","autoplay","controls","loop","muted","playsInline","preload","autoPlayHelpText","getAutoplayHelp","select","web","checked","native","toggleFactory","toggleAttribute","attribute","newValue","onChangePreload","children","isShownByDefault","hasValue","onDeselect","__nextHasNoMarginBottom","onChange","help","disabled","__next40pxDefaultSize","hideCancelButton"],"sources":["@wordpress/block-library/src/video/edit-common-settings.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tToggleControl,\n\tSelectControl,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { useMemo, useCallback, Platform } from '@wordpress/element';\n\nconst options = [\n\t{ value: 'auto', label: __( 'Auto' ) },\n\t{ value: 'metadata', label: __( 'Metadata' ) },\n\t{ value: 'none', label: _x( 'None', 'Preload value' ) },\n];\n\nconst VideoSettings = ( { setAttributes, attributes } ) => {\n\tconst { autoplay, controls, loop, muted, playsInline, preload } =\n\t\tattributes;\n\n\tconst autoPlayHelpText = __(\n\t\t'Autoplay may cause usability issues for some users.'\n\t);\n\n\tconst getAutoplayHelp = Platform.select( {\n\t\tweb: useCallback( ( checked ) => {\n\t\t\treturn checked ? autoPlayHelpText : null;\n\t\t}, [] ),\n\t\tnative: autoPlayHelpText,\n\t} );\n\n\tconst toggleFactory = useMemo( () => {\n\t\tconst toggleAttribute = ( attribute ) => {\n\t\t\treturn ( newValue ) => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\t[ attribute ]: newValue,\n\t\t\t\t\t// Set muted when autoplay changes\n\t\t\t\t\t...( attribute === 'autoplay' && { muted: newValue } ),\n\t\t\t\t} );\n\t\t\t};\n\t\t};\n\n\t\treturn {\n\t\t\tautoplay: toggleAttribute( 'autoplay' ),\n\t\t\tloop: toggleAttribute( 'loop' ),\n\t\t\tmuted: toggleAttribute( 'muted' ),\n\t\t\tcontrols: toggleAttribute( 'controls' ),\n\t\t\tplaysInline: toggleAttribute( 'playsInline' ),\n\t\t};\n\t}, [] );\n\n\tconst onChangePreload = useCallback( ( value ) => {\n\t\tsetAttributes( { preload: value } );\n\t}, [] );\n\n\treturn (\n\t\t<>\n\t\t\t<ToolsPanelItem\n\t\t\t\tlabel={ __( 'Autoplay' ) }\n\t\t\t\tisShownByDefault\n\t\t\t\thasValue={ () => !! autoplay }\n\t\t\t\tonDeselect={ () => {\n\t\t\t\t\tsetAttributes( { autoplay: false, muted: false } );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Autoplay' ) }\n\t\t\t\t\tonChange={ toggleFactory.autoplay }\n\t\t\t\t\tchecked={ !! autoplay }\n\t\t\t\t\thelp={ getAutoplayHelp }\n\t\t\t\t/>\n\t\t\t</ToolsPanelItem>\n\t\t\t<ToolsPanelItem\n\t\t\t\tlabel={ __( 'Loop' ) }\n\t\t\t\tisShownByDefault\n\t\t\t\thasValue={ () => !! loop }\n\t\t\t\tonDeselect={ () => {\n\t\t\t\t\tsetAttributes( { loop: false } );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Loop' ) }\n\t\t\t\t\tonChange={ toggleFactory.loop }\n\t\t\t\t\tchecked={ !! loop }\n\t\t\t\t/>\n\t\t\t</ToolsPanelItem>\n\t\t\t<ToolsPanelItem\n\t\t\t\tlabel={ __( 'Muted' ) }\n\t\t\t\tisShownByDefault\n\t\t\t\thasValue={ () => !! muted }\n\t\t\t\tonDeselect={ () => {\n\t\t\t\t\tsetAttributes( { muted: false } );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Muted' ) }\n\t\t\t\t\tonChange={ toggleFactory.muted }\n\t\t\t\t\tchecked={ !! muted }\n\t\t\t\t\tdisabled={ autoplay }\n\t\t\t\t\thelp={\n\t\t\t\t\t\tautoplay ? __( 'Muted because of Autoplay.' ) : null\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</ToolsPanelItem>\n\t\t\t<ToolsPanelItem\n\t\t\t\tlabel={ __( 'Playback controls' ) }\n\t\t\t\tisShownByDefault\n\t\t\t\thasValue={ () => ! controls }\n\t\t\t\tonDeselect={ () => {\n\t\t\t\t\tsetAttributes( { controls: true } );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Playback controls' ) }\n\t\t\t\t\tonChange={ toggleFactory.controls }\n\t\t\t\t\tchecked={ !! controls }\n\t\t\t\t/>\n\t\t\t</ToolsPanelItem>\n\t\t\t<ToolsPanelItem\n\t\t\t\tlabel={ __( 'Play inline' ) }\n\t\t\t\tisShownByDefault\n\t\t\t\thasValue={ () => !! playsInline }\n\t\t\t\tonDeselect={ () => {\n\t\t\t\t\tsetAttributes( { playsInline: false } );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<ToggleControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t/* translators: Setting to play videos within the webpage on mobile browsers rather than opening in a fullscreen player. */\n\t\t\t\t\tlabel={ __( 'Play inline' ) }\n\t\t\t\t\tonChange={ toggleFactory.playsInline }\n\t\t\t\t\tchecked={ !! playsInline }\n\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t'When enabled, videos will play directly within the webpage on mobile browsers, instead of opening in a fullscreen player.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</ToolsPanelItem>\n\t\t\t<ToolsPanelItem\n\t\t\t\tlabel={ __( 'Preload' ) }\n\t\t\t\tisShownByDefault\n\t\t\t\thasValue={ () => preload !== 'metadata' }\n\t\t\t\tonDeselect={ () => {\n\t\t\t\t\tsetAttributes( { preload: 'metadata' } );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<SelectControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Preload' ) }\n\t\t\t\t\tvalue={ preload }\n\t\t\t\t\tonChange={ onChangePreload }\n\t\t\t\t\toptions={ options }\n\t\t\t\t\thideCancelButton\n\t\t\t\t/>\n\t\t\t</ToolsPanelItem>\n\t\t</>\n\t);\n};\n\nexport default VideoSettings;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SACCC,aAAa,EACbC,aAAa,EACbC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SAASC,OAAO,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAEpE,MAAMC,OAAO,GAAG,CACf;EAAEC,KAAK,EAAE,MAAM;EAAEC,KAAK,EAAEjB,EAAE,CAAE,MAAO;AAAE,CAAC,EACtC;EAAEgB,KAAK,EAAE,UAAU;EAAEC,KAAK,EAAEjB,EAAE,CAAE,UAAW;AAAE,CAAC,EAC9C;EAAEgB,KAAK,EAAE,MAAM;EAAEC,KAAK,EAAEhB,EAAE,CAAE,MAAM,EAAE,eAAgB;AAAE,CAAC,CACvD;AAED,MAAMiB,aAAa,GAAGA,CAAE;EAAEC,aAAa;EAAEC;AAAW,CAAC,KAAM;EAC1D,MAAM;IAAEC,QAAQ;IAAEC,QAAQ;IAAEC,IAAI;IAAEC,KAAK;IAAEC,WAAW;IAAEC;EAAQ,CAAC,GAC9DN,UAAU;EAEX,MAAMO,gBAAgB,GAAG3B,EAAE,CAC1B,qDACD,CAAC;EAED,MAAM4B,eAAe,GAAGpB,QAAQ,CAACqB,MAAM,CAAE;IACxCC,GAAG,EAAEvB,WAAW,CAAIwB,OAAO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ACzBgB,KAAK,EAAGU,OAAS;QACjBiB,QAAQ,EAAGN,eAAiB;QAC5BtB,OAAO,EAAGA,OAAS;QACnBgC,gBAAgB;MAAA,CAChB;IAAC,CACa,CAAC;EAAA,CAChB,CAAC;AAEL,CAAC;AAED,eAAe7B,aAAa","ignoreList":[]}
|
|
@@ -1960,15 +1960,11 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
1960
1960
|
background-image: none !important;
|
|
1961
1961
|
}
|
|
1962
1962
|
.wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text span {
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
padding-bottom: 0.1em;
|
|
1969
|
-
}
|
|
1970
|
-
.wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text.is-invalid span, .wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text.is-draft span {
|
|
1971
|
-
--wp-underline-color: #cc1818;
|
|
1963
|
+
-webkit-text-decoration: wavy underline;
|
|
1964
|
+
text-decoration: wavy underline;
|
|
1965
|
+
-webkit-text-decoration-skip-ink: none;
|
|
1966
|
+
text-decoration-skip-ink: none;
|
|
1967
|
+
text-underline-offset: 0.25rem;
|
|
1972
1968
|
}
|
|
1973
1969
|
.wp-block-navigation-link__placeholder.wp-block-navigation-item__content {
|
|
1974
1970
|
cursor: pointer;
|
|
@@ -2360,6 +2356,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2360
2356
|
height: auto;
|
|
2361
2357
|
font-weight: inherit;
|
|
2362
2358
|
font-family: inherit;
|
|
2359
|
+
margin: 0;
|
|
2363
2360
|
opacity: 1;
|
|
2364
2361
|
padding: 0.25em;
|
|
2365
2362
|
}
|
package/build-style/editor.css
CHANGED
|
@@ -1969,15 +1969,11 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
1969
1969
|
background-image: none !important;
|
|
1970
1970
|
}
|
|
1971
1971
|
.wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text span {
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
padding-bottom: 0.1em;
|
|
1978
|
-
}
|
|
1979
|
-
.wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text.is-invalid span, .wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text.is-draft span {
|
|
1980
|
-
--wp-underline-color: #cc1818;
|
|
1972
|
+
-webkit-text-decoration: wavy underline;
|
|
1973
|
+
text-decoration: wavy underline;
|
|
1974
|
+
-webkit-text-decoration-skip-ink: none;
|
|
1975
|
+
text-decoration-skip-ink: none;
|
|
1976
|
+
text-underline-offset: 0.25rem;
|
|
1981
1977
|
}
|
|
1982
1978
|
.wp-block-navigation-link__placeholder.wp-block-navigation-item__content {
|
|
1983
1979
|
cursor: pointer;
|
|
@@ -2369,6 +2365,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
2369
2365
|
height: auto;
|
|
2370
2366
|
font-weight: inherit;
|
|
2371
2367
|
font-family: inherit;
|
|
2368
|
+
margin: 0;
|
|
2372
2369
|
opacity: 1;
|
|
2373
2370
|
padding: 0.25em;
|
|
2374
2371
|
}
|
|
@@ -156,15 +156,11 @@
|
|
|
156
156
|
background-image: none !important;
|
|
157
157
|
}
|
|
158
158
|
.wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text span {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
padding-bottom: 0.1em;
|
|
165
|
-
}
|
|
166
|
-
.wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text.is-invalid span, .wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text.is-draft span {
|
|
167
|
-
--wp-underline-color: #cc1818;
|
|
159
|
+
-webkit-text-decoration: wavy underline;
|
|
160
|
+
text-decoration: wavy underline;
|
|
161
|
+
-webkit-text-decoration-skip-ink: none;
|
|
162
|
+
text-decoration-skip-ink: none;
|
|
163
|
+
text-underline-offset: 0.25rem;
|
|
168
164
|
}
|
|
169
165
|
.wp-block-navigation-link__placeholder.wp-block-navigation-item__content {
|
|
170
166
|
cursor: pointer;
|
|
@@ -156,15 +156,11 @@
|
|
|
156
156
|
background-image: none !important;
|
|
157
157
|
}
|
|
158
158
|
.wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text span {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
padding-bottom: 0.1em;
|
|
165
|
-
}
|
|
166
|
-
.wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text.is-invalid span, .wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text.is-draft span {
|
|
167
|
-
--wp-underline-color: #cc1818;
|
|
159
|
+
-webkit-text-decoration: wavy underline;
|
|
160
|
+
text-decoration: wavy underline;
|
|
161
|
+
-webkit-text-decoration-skip-ink: none;
|
|
162
|
+
text-decoration-skip-ink: none;
|
|
163
|
+
text-underline-offset: 0.25rem;
|
|
168
164
|
}
|
|
169
165
|
.wp-block-navigation-link__placeholder.wp-block-navigation-item__content {
|
|
170
166
|
cursor: pointer;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a hex value into the rgb equivalent.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} hex - the hexadecimal value to convert
|
|
5
|
+
* @return {string} comma separated rgb values
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Colors
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Breakpoints & Media Queries
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* SCSS Variables.
|
|
15
|
+
*
|
|
16
|
+
* Please use variables from this sheet to ensure consistency across the UI.
|
|
17
|
+
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
|
18
|
+
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Converts a hex value into the rgb equivalent.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} hex - the hexadecimal value to convert
|
|
24
|
+
* @return {string} comma separated rgb values
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Colors
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* Fonts & basic variables.
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* Typography
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* Grid System.
|
|
37
|
+
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* Radius scale.
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* Elevation scale.
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* Dimensions.
|
|
47
|
+
*/
|
|
48
|
+
/**
|
|
49
|
+
* Mobile specific styles
|
|
50
|
+
*/
|
|
51
|
+
/**
|
|
52
|
+
* Editor styles.
|
|
53
|
+
*/
|
|
54
|
+
/**
|
|
55
|
+
* Block & Editor UI.
|
|
56
|
+
*/
|
|
57
|
+
/**
|
|
58
|
+
* Block paddings.
|
|
59
|
+
*/
|
|
60
|
+
/**
|
|
61
|
+
* React Native specific.
|
|
62
|
+
* These variables do not appear to be used anywhere else.
|
|
63
|
+
*/
|
|
64
|
+
/**
|
|
65
|
+
* Converts a hex value into the rgb equivalent.
|
|
66
|
+
*
|
|
67
|
+
* @param {string} hex - the hexadecimal value to convert
|
|
68
|
+
* @return {string} comma separated rgb values
|
|
69
|
+
*/
|
|
70
|
+
/**
|
|
71
|
+
* Long content fade mixin
|
|
72
|
+
*
|
|
73
|
+
* Creates a fading overlay to signify that the content is longer
|
|
74
|
+
* than the space allows.
|
|
75
|
+
*/
|
|
76
|
+
/**
|
|
77
|
+
* Typography
|
|
78
|
+
*/
|
|
79
|
+
/**
|
|
80
|
+
* Breakpoint mixins
|
|
81
|
+
*/
|
|
82
|
+
/**
|
|
83
|
+
* Focus styles.
|
|
84
|
+
*/
|
|
85
|
+
/**
|
|
86
|
+
* Applies editor left position to the selector passed as argument
|
|
87
|
+
*/
|
|
88
|
+
/**
|
|
89
|
+
* Styles that are reused verbatim in a few places
|
|
90
|
+
*/
|
|
91
|
+
/**
|
|
92
|
+
* Allows users to opt-out of animations via OS-level preferences.
|
|
93
|
+
*/
|
|
94
|
+
/**
|
|
95
|
+
* Reset default styles for JavaScript UI based pages.
|
|
96
|
+
* This is a WP-admin agnostic reset
|
|
97
|
+
*/
|
|
98
|
+
/**
|
|
99
|
+
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
100
|
+
*/
|
|
101
|
+
.wp-block-post-comments-count {
|
|
102
|
+
box-sizing: border-box;
|
|
103
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a hex value into the rgb equivalent.
|
|
3
|
+
*
|
|
4
|
+
* @param {string} hex - the hexadecimal value to convert
|
|
5
|
+
* @return {string} comma separated rgb values
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Colors
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Breakpoints & Media Queries
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* SCSS Variables.
|
|
15
|
+
*
|
|
16
|
+
* Please use variables from this sheet to ensure consistency across the UI.
|
|
17
|
+
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
|
18
|
+
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Converts a hex value into the rgb equivalent.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} hex - the hexadecimal value to convert
|
|
24
|
+
* @return {string} comma separated rgb values
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Colors
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* Fonts & basic variables.
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* Typography
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* Grid System.
|
|
37
|
+
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* Radius scale.
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* Elevation scale.
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* Dimensions.
|
|
47
|
+
*/
|
|
48
|
+
/**
|
|
49
|
+
* Mobile specific styles
|
|
50
|
+
*/
|
|
51
|
+
/**
|
|
52
|
+
* Editor styles.
|
|
53
|
+
*/
|
|
54
|
+
/**
|
|
55
|
+
* Block & Editor UI.
|
|
56
|
+
*/
|
|
57
|
+
/**
|
|
58
|
+
* Block paddings.
|
|
59
|
+
*/
|
|
60
|
+
/**
|
|
61
|
+
* React Native specific.
|
|
62
|
+
* These variables do not appear to be used anywhere else.
|
|
63
|
+
*/
|
|
64
|
+
/**
|
|
65
|
+
* Converts a hex value into the rgb equivalent.
|
|
66
|
+
*
|
|
67
|
+
* @param {string} hex - the hexadecimal value to convert
|
|
68
|
+
* @return {string} comma separated rgb values
|
|
69
|
+
*/
|
|
70
|
+
/**
|
|
71
|
+
* Long content fade mixin
|
|
72
|
+
*
|
|
73
|
+
* Creates a fading overlay to signify that the content is longer
|
|
74
|
+
* than the space allows.
|
|
75
|
+
*/
|
|
76
|
+
/**
|
|
77
|
+
* Typography
|
|
78
|
+
*/
|
|
79
|
+
/**
|
|
80
|
+
* Breakpoint mixins
|
|
81
|
+
*/
|
|
82
|
+
/**
|
|
83
|
+
* Focus styles.
|
|
84
|
+
*/
|
|
85
|
+
/**
|
|
86
|
+
* Applies editor left position to the selector passed as argument
|
|
87
|
+
*/
|
|
88
|
+
/**
|
|
89
|
+
* Styles that are reused verbatim in a few places
|
|
90
|
+
*/
|
|
91
|
+
/**
|
|
92
|
+
* Allows users to opt-out of animations via OS-level preferences.
|
|
93
|
+
*/
|
|
94
|
+
/**
|
|
95
|
+
* Reset default styles for JavaScript UI based pages.
|
|
96
|
+
* This is a WP-admin agnostic reset
|
|
97
|
+
*/
|
|
98
|
+
/**
|
|
99
|
+
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
100
|
+
*/
|
|
101
|
+
.wp-block-post-comments-count {
|
|
102
|
+
box-sizing: border-box;
|
|
103
|
+
}
|