@wordpress/block-editor 12.18.0 → 12.18.2
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/components/dimensions-tool/aspect-ratio-tool.js +2 -1
- package/build/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +30 -5
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/hooks.js +10 -9
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +14 -31
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/use-global-styles-output.js +6 -0
- package/build/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build/components/rich-text/index.js +1 -1
- package/build/components/rich-text/index.js.map +1 -1
- package/build/components/url-popover/image-url-input-ui.js +55 -34
- package/build/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build/components/url-popover/index.js +3 -1
- package/build/components/url-popover/index.js.map +1 -1
- package/build/components/url-popover/link-editor.js +2 -1
- package/build/components/url-popover/link-editor.js.map +1 -1
- package/build/components/url-popover/link-viewer.js +2 -1
- package/build/components/url-popover/link-viewer.js.map +1 -1
- package/build/hooks/dimensions.js +71 -1
- package/build/hooks/dimensions.js.map +1 -1
- package/build/hooks/index.js +2 -8
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/index.native.js +0 -6
- package/build/hooks/index.native.js.map +1 -1
- package/build/hooks/style.js +3 -0
- package/build/hooks/style.js.map +1 -1
- package/build/hooks/use-bindings-attributes.js +2 -2
- package/build/hooks/use-bindings-attributes.js.map +1 -1
- package/build/hooks/use-shadow-props.js +0 -15
- package/build/hooks/use-shadow-props.js.map +1 -1
- package/build/hooks/utils.js +4 -6
- package/build/hooks/utils.js.map +1 -1
- package/build/index.js +0 -7
- package/build/index.js.map +1 -1
- package/build/utils/object.js +0 -17
- package/build/utils/object.js.map +1 -1
- package/build-module/components/dimensions-tool/aspect-ratio-tool.js +2 -1
- package/build-module/components/dimensions-tool/aspect-ratio-tool.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +30 -5
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +10 -9
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +15 -32
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/use-global-styles-output.js +6 -0
- package/build-module/components/global-styles/use-global-styles-output.js.map +1 -1
- package/build-module/components/rich-text/index.js +1 -1
- package/build-module/components/rich-text/index.js.map +1 -1
- package/build-module/components/url-popover/image-url-input-ui.js +57 -36
- package/build-module/components/url-popover/image-url-input-ui.js.map +1 -1
- package/build-module/components/url-popover/index.js +3 -1
- package/build-module/components/url-popover/index.js.map +1 -1
- package/build-module/components/url-popover/link-editor.js +2 -1
- package/build-module/components/url-popover/link-editor.js.map +1 -1
- package/build-module/components/url-popover/link-viewer.js +2 -1
- package/build-module/components/url-popover/link-viewer.js.map +1 -1
- package/build-module/hooks/dimensions.js +70 -2
- package/build-module/hooks/dimensions.js.map +1 -1
- package/build-module/hooks/index.js +3 -2
- package/build-module/hooks/index.js.map +1 -1
- package/build-module/hooks/index.native.js +1 -1
- package/build-module/hooks/index.native.js.map +1 -1
- package/build-module/hooks/style.js +3 -0
- package/build-module/hooks/style.js.map +1 -1
- package/build-module/hooks/use-bindings-attributes.js +2 -2
- package/build-module/hooks/use-bindings-attributes.js.map +1 -1
- package/build-module/hooks/use-shadow-props.js +0 -14
- package/build-module/hooks/use-shadow-props.js.map +1 -1
- package/build-module/hooks/utils.js +4 -6
- package/build-module/hooks/utils.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/utils/object.js +0 -16
- package/build-module/utils/object.js.map +1 -1
- package/build-style/style-rtl.css +48 -31
- package/build-style/style.css +48 -31
- package/package.json +4 -4
- package/src/components/block-canvas/style.scss +2 -2
- package/src/components/dimensions-tool/aspect-ratio-tool.js +4 -1
- package/src/components/global-styles/dimensions-panel.js +50 -1
- package/src/components/global-styles/hooks.js +9 -8
- package/src/components/global-styles/typography-panel.js +13 -45
- package/src/components/global-styles/use-global-styles-output.js +6 -0
- package/src/components/media-replace-flow/style.scss +1 -1
- package/src/components/rich-text/index.js +1 -2
- package/src/components/url-popover/image-url-input-ui.js +86 -37
- package/src/components/url-popover/index.js +2 -0
- package/src/components/url-popover/link-editor.js +1 -0
- package/src/components/url-popover/link-viewer.js +1 -0
- package/src/components/url-popover/style.scss +51 -31
- package/src/hooks/dimensions.js +74 -3
- package/src/hooks/index.js +3 -1
- package/src/hooks/index.native.js +1 -1
- package/src/hooks/style.js +4 -0
- package/src/hooks/use-bindings-attributes.js +2 -5
- package/src/hooks/use-shadow-props.js +0 -14
- package/src/hooks/utils.js +8 -16
- package/src/index.js +0 -1
- package/src/utils/object.js +0 -16
package/build/hooks/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blocks","require","_element","_data","_compose","_hooks","_context","_components","_hooks2","_object","_store","_lockUnlock","_classnames","_interopRequireDefault","cleanEmptyObject","object","Array","isArray","cleanedNestedObjects","Object","entries","map","key","value","filter","undefined","length","fromEntries","exports","transformStyles","activeSupports","migrationPaths","result","source","index","results","values","every","isActive","innerBlocks","referenceBlockAttributes","attributes","returnBlock","forEach","support","path","styleValue","getValueFromObjectPath","setImmutably","shouldSkipSerialization","blockNameOrType","featureSet","feature","getBlockSupport","skipSerialization","__experimentalSkipSerialization","includes","useStyleOverride","id","css","assets","__unstableType","setStyleOverride","deleteStyleOverride","unlock","useDispatch","blockEditorStore","fallbackId","useId","useEffect","_id","useBlockSettings","name","parentLayout","backgroundImage","backgroundSize","fontFamilies","userFontSizes","themeFontSizes","defaultFontSizes","defaultFontSizesEnabled","customFontSize","fontStyle","fontWeight","lineHeight","textColumns","textDecoration","writingMode","textTransform","letterSpacing","padding","margin","blockGap","spacingSizes","units","minHeight","layout","borderColor","borderRadius","borderStyle","borderWidth","customColorsEnabled","customColors","customDuotone","themeColors","defaultColors","defaultPalette","defaultDuotone","userDuotonePalette","themeDuotonePalette","defaultDuotonePalette","userGradientPalette","themeGradientPalette","defaultGradientPalette","defaultGradients","areCustomGradientsEnabled","isBackgroundEnabled","isLinkEnabled","isTextEnabled","isHeadingEnabled","isButtonEnabled","shadow","useSettings","rawSettings","useMemo","background","color","palette","custom","theme","default","gradients","duotone","customGradient","link","heading","button","text","typography","fontSizes","spacing","border","radius","style","width","dimensions","useSettingsForBlockElement","createBlockEditFilter","features","settings","Edit","memo","edit","withBlockEditHooks","createHigherOrderComponent","OriginalBlockEdit","props","context","useBlockEditContext","i","hasSupport","attributeKeys","shareWithChildBlocks","shouldDisplayControls","mayDisplayControlsKey","mayDisplayParentControlsKey","neededProps","_react","createElement","isSelected","clientId","setAttributes","__unstableParentLayout","addFilter","BlockProps","useBlockProps","setAllWrapperProps","wrapperProps","setWrapperProps","next","prev","nextAll","BlockPropsPure","createBlockListBlockFilter","withBlockListBlockHooks","BlockListBlock","allWrapperProps","useState","fill","keys","Boolean","reduce","acc","className","classnames","createBlockSaveFilter","extraPropsFromHooks","accu","addSaveProps","neededAttributes","hasOwnProperty"],"sources":["@wordpress/block-editor/src/hooks/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport } from '@wordpress/blocks';\nimport { memo, useMemo, useEffect, useId, useState } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseBlockEditContext,\n\tmayDisplayControlsKey,\n\tmayDisplayParentControlsKey,\n} from '../components/block-edit/context';\nimport { useSettings } from '../components';\nimport { useSettingsForBlockElement } from '../components/global-styles/hooks';\nimport { getValueFromObjectPath, setImmutably } from '../utils/object';\nimport { store as blockEditorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Removed falsy values from nested object.\n *\n * @param {*} object\n * @return {*} Object cleaned from falsy values\n */\nexport const cleanEmptyObject = ( object ) => {\n\tif (\n\t\tobject === null ||\n\t\ttypeof object !== 'object' ||\n\t\tArray.isArray( object )\n\t) {\n\t\treturn object;\n\t}\n\n\tconst cleanedNestedObjects = Object.entries( object )\n\t\t.map( ( [ key, value ] ) => [ key, cleanEmptyObject( value ) ] )\n\t\t.filter( ( [ , value ] ) => value !== undefined );\n\treturn ! cleanedNestedObjects.length\n\t\t? undefined\n\t\t: Object.fromEntries( cleanedNestedObjects );\n};\n\nexport function transformStyles(\n\tactiveSupports,\n\tmigrationPaths,\n\tresult,\n\tsource,\n\tindex,\n\tresults\n) {\n\t// If there are no active supports return early.\n\tif (\n\t\tObject.values( activeSupports ?? {} ).every(\n\t\t\t( isActive ) => ! isActive\n\t\t)\n\t) {\n\t\treturn result;\n\t}\n\t// If the condition verifies we are probably in the presence of a wrapping transform\n\t// e.g: nesting paragraphs in a group or columns and in that case the styles should not be transformed.\n\tif ( results.length === 1 && result.innerBlocks.length === source.length ) {\n\t\treturn result;\n\t}\n\t// For cases where we have a transform from one block to multiple blocks\n\t// or multiple blocks to one block we apply the styles of the first source block\n\t// to the result(s).\n\tlet referenceBlockAttributes = source[ 0 ]?.attributes;\n\t// If we are in presence of transform between more than one block in the source\n\t// that has more than one block in the result\n\t// we apply the styles on source N to the result N,\n\t// if source N does not exists we do nothing.\n\tif ( results.length > 1 && source.length > 1 ) {\n\t\tif ( source[ index ] ) {\n\t\t\treferenceBlockAttributes = source[ index ]?.attributes;\n\t\t} else {\n\t\t\treturn result;\n\t\t}\n\t}\n\tlet returnBlock = result;\n\tObject.entries( activeSupports ).forEach( ( [ support, isActive ] ) => {\n\t\tif ( isActive ) {\n\t\t\tmigrationPaths[ support ].forEach( ( path ) => {\n\t\t\t\tconst styleValue = getValueFromObjectPath(\n\t\t\t\t\treferenceBlockAttributes,\n\t\t\t\t\tpath\n\t\t\t\t);\n\t\t\t\tif ( styleValue ) {\n\t\t\t\t\treturnBlock = {\n\t\t\t\t\t\t...returnBlock,\n\t\t\t\t\t\tattributes: setImmutably(\n\t\t\t\t\t\t\treturnBlock.attributes,\n\t\t\t\t\t\t\tpath,\n\t\t\t\t\t\t\tstyleValue\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\treturn returnBlock;\n}\n\n/**\n * Check whether serialization of specific block support feature or set should\n * be skipped.\n *\n * @param {string|Object} blockNameOrType Block name or block type object.\n * @param {string} featureSet Name of block support feature set.\n * @param {string} feature Name of the individual feature to check.\n *\n * @return {boolean} Whether serialization should occur.\n */\nexport function shouldSkipSerialization(\n\tblockNameOrType,\n\tfeatureSet,\n\tfeature\n) {\n\tconst support = getBlockSupport( blockNameOrType, featureSet );\n\tconst skipSerialization = support?.__experimentalSkipSerialization;\n\n\tif ( Array.isArray( skipSerialization ) ) {\n\t\treturn skipSerialization.includes( feature );\n\t}\n\n\treturn skipSerialization;\n}\n\nexport function useStyleOverride( { id, css, assets, __unstableType } = {} ) {\n\tconst { setStyleOverride, deleteStyleOverride } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\tconst fallbackId = useId();\n\tuseEffect( () => {\n\t\t// Unmount if there is CSS and assets are empty.\n\t\tif ( ! css && ! assets ) return;\n\t\tconst _id = id || fallbackId;\n\t\tsetStyleOverride( _id, {\n\t\t\tid,\n\t\t\tcss,\n\t\t\tassets,\n\t\t\t__unstableType,\n\t\t} );\n\t\treturn () => {\n\t\t\tdeleteStyleOverride( _id );\n\t\t};\n\t}, [\n\t\tid,\n\t\tcss,\n\t\tassets,\n\t\t__unstableType,\n\t\tfallbackId,\n\t\tsetStyleOverride,\n\t\tdeleteStyleOverride,\n\t] );\n}\n\n/**\n * Based on the block and its context, returns an object of all the block settings.\n * This object can be passed as a prop to all the Styles UI components\n * (TypographyPanel, DimensionsPanel...).\n *\n * @param {string} name Block name.\n * @param {*} parentLayout Parent layout.\n *\n * @return {Object} Settings object.\n */\nexport function useBlockSettings( name, parentLayout ) {\n\tconst [\n\t\tbackgroundImage,\n\t\tbackgroundSize,\n\t\tfontFamilies,\n\t\tuserFontSizes,\n\t\tthemeFontSizes,\n\t\tdefaultFontSizes,\n\t\tdefaultFontSizesEnabled,\n\t\tcustomFontSize,\n\t\tfontStyle,\n\t\tfontWeight,\n\t\tlineHeight,\n\t\ttextColumns,\n\t\ttextDecoration,\n\t\twritingMode,\n\t\ttextTransform,\n\t\tletterSpacing,\n\t\tpadding,\n\t\tmargin,\n\t\tblockGap,\n\t\tspacingSizes,\n\t\tunits,\n\t\tminHeight,\n\t\tlayout,\n\t\tborderColor,\n\t\tborderRadius,\n\t\tborderStyle,\n\t\tborderWidth,\n\t\tcustomColorsEnabled,\n\t\tcustomColors,\n\t\tcustomDuotone,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tdefaultPalette,\n\t\tdefaultDuotone,\n\t\tuserDuotonePalette,\n\t\tthemeDuotonePalette,\n\t\tdefaultDuotonePalette,\n\t\tuserGradientPalette,\n\t\tthemeGradientPalette,\n\t\tdefaultGradientPalette,\n\t\tdefaultGradients,\n\t\tareCustomGradientsEnabled,\n\t\tisBackgroundEnabled,\n\t\tisLinkEnabled,\n\t\tisTextEnabled,\n\t\tisHeadingEnabled,\n\t\tisButtonEnabled,\n\t\tshadow,\n\t] = useSettings(\n\t\t'background.backgroundImage',\n\t\t'background.backgroundSize',\n\t\t'typography.fontFamilies',\n\t\t'typography.fontSizes.custom',\n\t\t'typography.fontSizes.theme',\n\t\t'typography.fontSizes.default',\n\t\t'typography.defaultFontSizes',\n\t\t'typography.customFontSize',\n\t\t'typography.fontStyle',\n\t\t'typography.fontWeight',\n\t\t'typography.lineHeight',\n\t\t'typography.textColumns',\n\t\t'typography.textDecoration',\n\t\t'typography.writingMode',\n\t\t'typography.textTransform',\n\t\t'typography.letterSpacing',\n\t\t'spacing.padding',\n\t\t'spacing.margin',\n\t\t'spacing.blockGap',\n\t\t'spacing.spacingSizes',\n\t\t'spacing.units',\n\t\t'dimensions.minHeight',\n\t\t'layout',\n\t\t'border.color',\n\t\t'border.radius',\n\t\t'border.style',\n\t\t'border.width',\n\t\t'color.custom',\n\t\t'color.palette.custom',\n\t\t'color.customDuotone',\n\t\t'color.palette.theme',\n\t\t'color.palette.default',\n\t\t'color.defaultPalette',\n\t\t'color.defaultDuotone',\n\t\t'color.duotone.custom',\n\t\t'color.duotone.theme',\n\t\t'color.duotone.default',\n\t\t'color.gradients.custom',\n\t\t'color.gradients.theme',\n\t\t'color.gradients.default',\n\t\t'color.defaultGradients',\n\t\t'color.customGradient',\n\t\t'color.background',\n\t\t'color.link',\n\t\t'color.text',\n\t\t'color.heading',\n\t\t'color.button',\n\t\t'shadow'\n\t);\n\n\tconst rawSettings = useMemo( () => {\n\t\treturn {\n\t\t\tbackground: {\n\t\t\t\tbackgroundImage,\n\t\t\t\tbackgroundSize,\n\t\t\t},\n\t\t\tcolor: {\n\t\t\t\tpalette: {\n\t\t\t\t\tcustom: customColors,\n\t\t\t\t\ttheme: themeColors,\n\t\t\t\t\tdefault: defaultColors,\n\t\t\t\t},\n\t\t\t\tgradients: {\n\t\t\t\t\tcustom: userGradientPalette,\n\t\t\t\t\ttheme: themeGradientPalette,\n\t\t\t\t\tdefault: defaultGradientPalette,\n\t\t\t\t},\n\t\t\t\tduotone: {\n\t\t\t\t\tcustom: userDuotonePalette,\n\t\t\t\t\ttheme: themeDuotonePalette,\n\t\t\t\t\tdefault: defaultDuotonePalette,\n\t\t\t\t},\n\t\t\t\tdefaultGradients,\n\t\t\t\tdefaultPalette,\n\t\t\t\tdefaultDuotone,\n\t\t\t\tcustom: customColorsEnabled,\n\t\t\t\tcustomGradient: areCustomGradientsEnabled,\n\t\t\t\tcustomDuotone,\n\t\t\t\tbackground: isBackgroundEnabled,\n\t\t\t\tlink: isLinkEnabled,\n\t\t\t\theading: isHeadingEnabled,\n\t\t\t\tbutton: isButtonEnabled,\n\t\t\t\ttext: isTextEnabled,\n\t\t\t},\n\t\t\ttypography: {\n\t\t\t\tfontFamilies: {\n\t\t\t\t\tcustom: fontFamilies,\n\t\t\t\t},\n\t\t\t\tfontSizes: {\n\t\t\t\t\tcustom: userFontSizes,\n\t\t\t\t\ttheme: themeFontSizes,\n\t\t\t\t\tdefault: defaultFontSizes,\n\t\t\t\t},\n\t\t\t\tcustomFontSize,\n\t\t\t\tdefaultFontSizes: defaultFontSizesEnabled,\n\t\t\t\tfontStyle,\n\t\t\t\tfontWeight,\n\t\t\t\tlineHeight,\n\t\t\t\ttextColumns,\n\t\t\t\ttextDecoration,\n\t\t\t\ttextTransform,\n\t\t\t\tletterSpacing,\n\t\t\t\twritingMode,\n\t\t\t},\n\t\t\tspacing: {\n\t\t\t\tspacingSizes: {\n\t\t\t\t\tcustom: spacingSizes,\n\t\t\t\t},\n\t\t\t\tpadding,\n\t\t\t\tmargin,\n\t\t\t\tblockGap,\n\t\t\t\tunits,\n\t\t\t},\n\t\t\tborder: {\n\t\t\t\tcolor: borderColor,\n\t\t\t\tradius: borderRadius,\n\t\t\t\tstyle: borderStyle,\n\t\t\t\twidth: borderWidth,\n\t\t\t},\n\t\t\tdimensions: {\n\t\t\t\tminHeight,\n\t\t\t},\n\t\t\tlayout,\n\t\t\tparentLayout,\n\t\t\tshadow,\n\t\t};\n\t}, [\n\t\tbackgroundImage,\n\t\tbackgroundSize,\n\t\tfontFamilies,\n\t\tuserFontSizes,\n\t\tthemeFontSizes,\n\t\tdefaultFontSizes,\n\t\tdefaultFontSizesEnabled,\n\t\tcustomFontSize,\n\t\tfontStyle,\n\t\tfontWeight,\n\t\tlineHeight,\n\t\ttextColumns,\n\t\ttextDecoration,\n\t\ttextTransform,\n\t\tletterSpacing,\n\t\twritingMode,\n\t\tpadding,\n\t\tmargin,\n\t\tblockGap,\n\t\tspacingSizes,\n\t\tunits,\n\t\tminHeight,\n\t\tlayout,\n\t\tparentLayout,\n\t\tborderColor,\n\t\tborderRadius,\n\t\tborderStyle,\n\t\tborderWidth,\n\t\tcustomColorsEnabled,\n\t\tcustomColors,\n\t\tcustomDuotone,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tdefaultPalette,\n\t\tdefaultDuotone,\n\t\tuserDuotonePalette,\n\t\tthemeDuotonePalette,\n\t\tdefaultDuotonePalette,\n\t\tuserGradientPalette,\n\t\tthemeGradientPalette,\n\t\tdefaultGradientPalette,\n\t\tdefaultGradients,\n\t\tareCustomGradientsEnabled,\n\t\tisBackgroundEnabled,\n\t\tisLinkEnabled,\n\t\tisTextEnabled,\n\t\tisHeadingEnabled,\n\t\tisButtonEnabled,\n\t\tshadow,\n\t] );\n\n\treturn useSettingsForBlockElement( rawSettings, name );\n}\n\nexport function createBlockEditFilter( features ) {\n\t// We don't want block controls to re-render when typing inside a block.\n\t// `memo` will prevent re-renders unless props change, so only pass the\n\t// needed props and not the whole attributes object.\n\tfeatures = features.map( ( settings ) => {\n\t\treturn { ...settings, Edit: memo( settings.edit ) };\n\t} );\n\tconst withBlockEditHooks = createHigherOrderComponent(\n\t\t( OriginalBlockEdit ) => ( props ) => {\n\t\t\tconst context = useBlockEditContext();\n\t\t\t// CAUTION: code added before this line will be executed for all\n\t\t\t// blocks, not just those that support the feature! Code added\n\t\t\t// above this line should be carefully evaluated for its impact on\n\t\t\t// performance.\n\t\t\treturn [\n\t\t\t\t...features.map( ( feature, i ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\tEdit,\n\t\t\t\t\t\thasSupport,\n\t\t\t\t\t\tattributeKeys = [],\n\t\t\t\t\t\tshareWithChildBlocks,\n\t\t\t\t\t} = feature;\n\t\t\t\t\tconst shouldDisplayControls =\n\t\t\t\t\t\tcontext[ mayDisplayControlsKey ] ||\n\t\t\t\t\t\t( context[ mayDisplayParentControlsKey ] &&\n\t\t\t\t\t\t\tshareWithChildBlocks );\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! shouldDisplayControls ||\n\t\t\t\t\t\t! hasSupport( props.name )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst neededProps = {};\n\t\t\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\t\t\tif ( props.attributes[ key ] ) {\n\t\t\t\t\t\t\tneededProps[ key ] = props.attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Edit\n\t\t\t\t\t\t\t// We can use the index because the array length\n\t\t\t\t\t\t\t// is fixed per page load right now.\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tname={ props.name }\n\t\t\t\t\t\t\tisSelected={ props.isSelected }\n\t\t\t\t\t\t\tclientId={ props.clientId }\n\t\t\t\t\t\t\tsetAttributes={ props.setAttributes }\n\t\t\t\t\t\t\t__unstableParentLayout={\n\t\t\t\t\t\t\t\tprops.__unstableParentLayout\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// This component is pure, so only pass needed\n\t\t\t\t\t\t\t// props!!!\n\t\t\t\t\t\t\t{ ...neededProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ),\n\t\t\t\t<OriginalBlockEdit key=\"edit\" { ...props } />,\n\t\t\t];\n\t\t},\n\t\t'withBlockEditHooks'\n\t);\n\taddFilter( 'editor.BlockEdit', 'core/editor/hooks', withBlockEditHooks );\n}\n\nfunction BlockProps( { index, useBlockProps, setAllWrapperProps, ...props } ) {\n\tconst wrapperProps = useBlockProps( props );\n\tconst setWrapperProps = ( next ) =>\n\t\tsetAllWrapperProps( ( prev ) => {\n\t\t\tconst nextAll = [ ...prev ];\n\t\t\tnextAll[ index ] = next;\n\t\t\treturn nextAll;\n\t\t} );\n\t// Setting state after every render is fine because this component is\n\t// pure and will only re-render when needed props change.\n\tuseEffect( () => {\n\t\t// We could shallow compare the props, but since this component only\n\t\t// changes when needed attributes change, the benefit is probably small.\n\t\tsetWrapperProps( wrapperProps );\n\t\treturn () => {\n\t\t\tsetWrapperProps( undefined );\n\t\t};\n\t} );\n\treturn null;\n}\n\nconst BlockPropsPure = memo( BlockProps );\n\nexport function createBlockListBlockFilter( features ) {\n\tconst withBlockListBlockHooks = createHigherOrderComponent(\n\t\t( BlockListBlock ) => ( props ) => {\n\t\t\tconst [ allWrapperProps, setAllWrapperProps ] = useState(\n\t\t\t\tArray( features.length ).fill( undefined )\n\t\t\t);\n\t\t\treturn [\n\t\t\t\t...features.map( ( feature, i ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\thasSupport,\n\t\t\t\t\t\tattributeKeys = [],\n\t\t\t\t\t\tuseBlockProps,\n\t\t\t\t\t} = feature;\n\n\t\t\t\t\tconst neededProps = {};\n\t\t\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\t\t\tif ( props.attributes[ key ] ) {\n\t\t\t\t\t\t\tneededProps[ key ] = props.attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip rendering if none of the needed attributes are\n\t\t\t\t\t\t// set.\n\t\t\t\t\t\t! Object.keys( neededProps ).length ||\n\t\t\t\t\t\t! hasSupport( props.name )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<BlockPropsPure\n\t\t\t\t\t\t\t// We can use the index because the array length\n\t\t\t\t\t\t\t// is fixed per page load right now.\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tindex={ i }\n\t\t\t\t\t\t\tuseBlockProps={ useBlockProps }\n\t\t\t\t\t\t\t// This component is pure, so we must pass a stable\n\t\t\t\t\t\t\t// function reference.\n\t\t\t\t\t\t\tsetAllWrapperProps={ setAllWrapperProps }\n\t\t\t\t\t\t\tname={ props.name }\n\t\t\t\t\t\t\t// This component is pure, so only pass needed\n\t\t\t\t\t\t\t// props!!!\n\t\t\t\t\t\t\t{ ...neededProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ),\n\t\t\t\t<BlockListBlock\n\t\t\t\t\tkey=\"edit\"\n\t\t\t\t\t{ ...props }\n\t\t\t\t\twrapperProps={ allWrapperProps\n\t\t\t\t\t\t.filter( Boolean )\n\t\t\t\t\t\t.reduce( ( acc, wrapperProps ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t...acc,\n\t\t\t\t\t\t\t\t...wrapperProps,\n\t\t\t\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t\t\t\tacc.className,\n\t\t\t\t\t\t\t\t\twrapperProps.className\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\t...acc.style,\n\t\t\t\t\t\t\t\t\t...wrapperProps.style,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}, props.wrapperProps || {} ) }\n\t\t\t\t/>,\n\t\t\t];\n\t\t},\n\t\t'withBlockListBlockHooks'\n\t);\n\taddFilter(\n\t\t'editor.BlockListBlock',\n\t\t'core/editor/hooks',\n\t\twithBlockListBlockHooks\n\t);\n}\n\nexport function createBlockSaveFilter( features ) {\n\tfunction extraPropsFromHooks( props, name, attributes ) {\n\t\treturn features.reduce( ( accu, feature ) => {\n\t\t\tconst { hasSupport, attributeKeys = [], addSaveProps } = feature;\n\n\t\t\tconst neededAttributes = {};\n\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\tif ( attributes[ key ] ) {\n\t\t\t\t\tneededAttributes[ key ] = attributes[ key ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t// Skip rendering if none of the needed attributes are\n\t\t\t\t// set.\n\t\t\t\t! Object.keys( neededAttributes ).length ||\n\t\t\t\t! hasSupport( name )\n\t\t\t) {\n\t\t\t\treturn accu;\n\t\t\t}\n\n\t\t\treturn addSaveProps( accu, name, neededAttributes );\n\t\t}, props );\n\t}\n\taddFilter(\n\t\t'blocks.getSaveContent.extraProps',\n\t\t'core/editor/hooks',\n\t\textraPropsFromHooks,\n\t\t0\n\t);\n\taddFilter(\n\t\t'blocks.getSaveContent.extraProps',\n\t\t'core/editor/hooks',\n\t\t( props ) => {\n\t\t\t// Previously we had a filter deleting the className if it was an empty\n\t\t\t// string. That filter is no longer running, so now we need to delete it\n\t\t\t// here.\n\t\t\tif ( props.hasOwnProperty( 'className' ) && ! props.className ) {\n\t\t\t\tdelete props.className;\n\t\t\t}\n\n\t\t\treturn props;\n\t\t}\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAKA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AAIA,IAAAW,WAAA,GAAAC,sBAAA,CAAAZ,OAAA;AAzBA;AACA;AACA;;AAOA;AACA;AACA;;AAWA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMa,gBAAgB,GAAKC,MAAM,IAAM;EAC7C,IACCA,MAAM,KAAK,IAAI,IACf,OAAOA,MAAM,KAAK,QAAQ,IAC1BC,KAAK,CAACC,OAAO,CAAEF,MAAO,CAAC,EACtB;IACD,OAAOA,MAAM;EACd;EAEA,MAAMG,oBAAoB,GAAGC,MAAM,CAACC,OAAO,CAAEL,MAAO,CAAC,CACnDM,GAAG,CAAE,CAAE,CAAEC,GAAG,EAAEC,KAAK,CAAE,KAAM,CAAED,GAAG,E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,gBAAS,EACR,kCAAkC,EAClC,mBAAmB,EACjBjB,KAAK,IAAM;IACZ;IACA;IACA;IACA,IAAKA,KAAK,CAAC4C,cAAc,CAAE,WAAY,CAAC,IAAI,CAAE5C,KAAK,CAACqC,SAAS,EAAG;MAC/D,OAAOrC,KAAK,CAACqC,SAAS;IACvB;IAEA,OAAOrC,KAAK;EACb,CACD,CAAC;AACF"}
|
|
1
|
+
{"version":3,"names":["_blocks","require","_element","_data","_compose","_hooks","_context","_components","_hooks2","_object","_store","_lockUnlock","_classnames","_interopRequireDefault","cleanEmptyObject","object","Array","isArray","cleanedNestedObjects","Object","entries","map","key","value","filter","undefined","length","fromEntries","exports","transformStyles","activeSupports","migrationPaths","result","source","index","results","values","every","isActive","innerBlocks","referenceBlockAttributes","attributes","returnBlock","forEach","support","path","styleValue","getValueFromObjectPath","setImmutably","shouldSkipSerialization","blockNameOrType","featureSet","feature","getBlockSupport","skipSerialization","__experimentalSkipSerialization","includes","useStyleOverride","id","css","assets","__unstableType","setStyleOverride","deleteStyleOverride","unlock","useDispatch","blockEditorStore","fallbackId","useId","useEffect","_id","useBlockSettings","name","parentLayout","backgroundImage","backgroundSize","fontFamilies","fontSizes","customFontSize","fontStyle","fontWeight","lineHeight","textColumns","textDecoration","writingMode","textTransform","letterSpacing","padding","margin","blockGap","spacingSizes","units","aspectRatio","minHeight","layout","borderColor","borderRadius","borderStyle","borderWidth","customColorsEnabled","customColors","customDuotone","themeColors","defaultColors","defaultPalette","defaultDuotone","userDuotonePalette","themeDuotonePalette","defaultDuotonePalette","userGradientPalette","themeGradientPalette","defaultGradientPalette","defaultGradients","areCustomGradientsEnabled","isBackgroundEnabled","isLinkEnabled","isTextEnabled","isHeadingEnabled","isButtonEnabled","shadow","useSettings","rawSettings","useMemo","background","color","palette","custom","theme","default","gradients","duotone","customGradient","link","heading","button","text","typography","spacing","border","radius","style","width","dimensions","useSettingsForBlockElement","createBlockEditFilter","features","settings","Edit","memo","edit","withBlockEditHooks","createHigherOrderComponent","OriginalBlockEdit","props","context","useBlockEditContext","i","hasSupport","attributeKeys","shareWithChildBlocks","shouldDisplayControls","mayDisplayControlsKey","mayDisplayParentControlsKey","neededProps","_react","createElement","isSelected","clientId","setAttributes","__unstableParentLayout","addFilter","BlockProps","useBlockProps","setAllWrapperProps","wrapperProps","setWrapperProps","next","prev","nextAll","BlockPropsPure","createBlockListBlockFilter","withBlockListBlockHooks","BlockListBlock","allWrapperProps","useState","fill","keys","Boolean","reduce","acc","className","classnames","createBlockSaveFilter","extraPropsFromHooks","accu","addSaveProps","neededAttributes","hasOwnProperty"],"sources":["@wordpress/block-editor/src/hooks/utils.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockSupport } from '@wordpress/blocks';\nimport { memo, useMemo, useEffect, useId, useState } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseBlockEditContext,\n\tmayDisplayControlsKey,\n\tmayDisplayParentControlsKey,\n} from '../components/block-edit/context';\nimport { useSettings } from '../components';\nimport { useSettingsForBlockElement } from '../components/global-styles/hooks';\nimport { getValueFromObjectPath, setImmutably } from '../utils/object';\nimport { store as blockEditorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Removed falsy values from nested object.\n *\n * @param {*} object\n * @return {*} Object cleaned from falsy values\n */\nexport const cleanEmptyObject = ( object ) => {\n\tif (\n\t\tobject === null ||\n\t\ttypeof object !== 'object' ||\n\t\tArray.isArray( object )\n\t) {\n\t\treturn object;\n\t}\n\n\tconst cleanedNestedObjects = Object.entries( object )\n\t\t.map( ( [ key, value ] ) => [ key, cleanEmptyObject( value ) ] )\n\t\t.filter( ( [ , value ] ) => value !== undefined );\n\treturn ! cleanedNestedObjects.length\n\t\t? undefined\n\t\t: Object.fromEntries( cleanedNestedObjects );\n};\n\nexport function transformStyles(\n\tactiveSupports,\n\tmigrationPaths,\n\tresult,\n\tsource,\n\tindex,\n\tresults\n) {\n\t// If there are no active supports return early.\n\tif (\n\t\tObject.values( activeSupports ?? {} ).every(\n\t\t\t( isActive ) => ! isActive\n\t\t)\n\t) {\n\t\treturn result;\n\t}\n\t// If the condition verifies we are probably in the presence of a wrapping transform\n\t// e.g: nesting paragraphs in a group or columns and in that case the styles should not be transformed.\n\tif ( results.length === 1 && result.innerBlocks.length === source.length ) {\n\t\treturn result;\n\t}\n\t// For cases where we have a transform from one block to multiple blocks\n\t// or multiple blocks to one block we apply the styles of the first source block\n\t// to the result(s).\n\tlet referenceBlockAttributes = source[ 0 ]?.attributes;\n\t// If we are in presence of transform between more than one block in the source\n\t// that has more than one block in the result\n\t// we apply the styles on source N to the result N,\n\t// if source N does not exists we do nothing.\n\tif ( results.length > 1 && source.length > 1 ) {\n\t\tif ( source[ index ] ) {\n\t\t\treferenceBlockAttributes = source[ index ]?.attributes;\n\t\t} else {\n\t\t\treturn result;\n\t\t}\n\t}\n\tlet returnBlock = result;\n\tObject.entries( activeSupports ).forEach( ( [ support, isActive ] ) => {\n\t\tif ( isActive ) {\n\t\t\tmigrationPaths[ support ].forEach( ( path ) => {\n\t\t\t\tconst styleValue = getValueFromObjectPath(\n\t\t\t\t\treferenceBlockAttributes,\n\t\t\t\t\tpath\n\t\t\t\t);\n\t\t\t\tif ( styleValue ) {\n\t\t\t\t\treturnBlock = {\n\t\t\t\t\t\t...returnBlock,\n\t\t\t\t\t\tattributes: setImmutably(\n\t\t\t\t\t\t\treturnBlock.attributes,\n\t\t\t\t\t\t\tpath,\n\t\t\t\t\t\t\tstyleValue\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\treturn returnBlock;\n}\n\n/**\n * Check whether serialization of specific block support feature or set should\n * be skipped.\n *\n * @param {string|Object} blockNameOrType Block name or block type object.\n * @param {string} featureSet Name of block support feature set.\n * @param {string} feature Name of the individual feature to check.\n *\n * @return {boolean} Whether serialization should occur.\n */\nexport function shouldSkipSerialization(\n\tblockNameOrType,\n\tfeatureSet,\n\tfeature\n) {\n\tconst support = getBlockSupport( blockNameOrType, featureSet );\n\tconst skipSerialization = support?.__experimentalSkipSerialization;\n\n\tif ( Array.isArray( skipSerialization ) ) {\n\t\treturn skipSerialization.includes( feature );\n\t}\n\n\treturn skipSerialization;\n}\n\nexport function useStyleOverride( { id, css, assets, __unstableType } = {} ) {\n\tconst { setStyleOverride, deleteStyleOverride } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\tconst fallbackId = useId();\n\tuseEffect( () => {\n\t\t// Unmount if there is CSS and assets are empty.\n\t\tif ( ! css && ! assets ) return;\n\t\tconst _id = id || fallbackId;\n\t\tsetStyleOverride( _id, {\n\t\t\tid,\n\t\t\tcss,\n\t\t\tassets,\n\t\t\t__unstableType,\n\t\t} );\n\t\treturn () => {\n\t\t\tdeleteStyleOverride( _id );\n\t\t};\n\t}, [\n\t\tid,\n\t\tcss,\n\t\tassets,\n\t\t__unstableType,\n\t\tfallbackId,\n\t\tsetStyleOverride,\n\t\tdeleteStyleOverride,\n\t] );\n}\n\n/**\n * Based on the block and its context, returns an object of all the block settings.\n * This object can be passed as a prop to all the Styles UI components\n * (TypographyPanel, DimensionsPanel...).\n *\n * @param {string} name Block name.\n * @param {*} parentLayout Parent layout.\n *\n * @return {Object} Settings object.\n */\nexport function useBlockSettings( name, parentLayout ) {\n\tconst [\n\t\tbackgroundImage,\n\t\tbackgroundSize,\n\t\tfontFamilies,\n\t\tfontSizes,\n\t\tcustomFontSize,\n\t\tfontStyle,\n\t\tfontWeight,\n\t\tlineHeight,\n\t\ttextColumns,\n\t\ttextDecoration,\n\t\twritingMode,\n\t\ttextTransform,\n\t\tletterSpacing,\n\t\tpadding,\n\t\tmargin,\n\t\tblockGap,\n\t\tspacingSizes,\n\t\tunits,\n\t\taspectRatio,\n\t\tminHeight,\n\t\tlayout,\n\t\tborderColor,\n\t\tborderRadius,\n\t\tborderStyle,\n\t\tborderWidth,\n\t\tcustomColorsEnabled,\n\t\tcustomColors,\n\t\tcustomDuotone,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tdefaultPalette,\n\t\tdefaultDuotone,\n\t\tuserDuotonePalette,\n\t\tthemeDuotonePalette,\n\t\tdefaultDuotonePalette,\n\t\tuserGradientPalette,\n\t\tthemeGradientPalette,\n\t\tdefaultGradientPalette,\n\t\tdefaultGradients,\n\t\tareCustomGradientsEnabled,\n\t\tisBackgroundEnabled,\n\t\tisLinkEnabled,\n\t\tisTextEnabled,\n\t\tisHeadingEnabled,\n\t\tisButtonEnabled,\n\t\tshadow,\n\t] = useSettings(\n\t\t'background.backgroundImage',\n\t\t'background.backgroundSize',\n\t\t'typography.fontFamilies',\n\t\t'typography.fontSizes',\n\t\t'typography.customFontSize',\n\t\t'typography.fontStyle',\n\t\t'typography.fontWeight',\n\t\t'typography.lineHeight',\n\t\t'typography.textColumns',\n\t\t'typography.textDecoration',\n\t\t'typography.writingMode',\n\t\t'typography.textTransform',\n\t\t'typography.letterSpacing',\n\t\t'spacing.padding',\n\t\t'spacing.margin',\n\t\t'spacing.blockGap',\n\t\t'spacing.spacingSizes',\n\t\t'spacing.units',\n\t\t'dimensions.aspectRatio',\n\t\t'dimensions.minHeight',\n\t\t'layout',\n\t\t'border.color',\n\t\t'border.radius',\n\t\t'border.style',\n\t\t'border.width',\n\t\t'color.custom',\n\t\t'color.palette.custom',\n\t\t'color.customDuotone',\n\t\t'color.palette.theme',\n\t\t'color.palette.default',\n\t\t'color.defaultPalette',\n\t\t'color.defaultDuotone',\n\t\t'color.duotone.custom',\n\t\t'color.duotone.theme',\n\t\t'color.duotone.default',\n\t\t'color.gradients.custom',\n\t\t'color.gradients.theme',\n\t\t'color.gradients.default',\n\t\t'color.defaultGradients',\n\t\t'color.customGradient',\n\t\t'color.background',\n\t\t'color.link',\n\t\t'color.text',\n\t\t'color.heading',\n\t\t'color.button',\n\t\t'shadow'\n\t);\n\n\tconst rawSettings = useMemo( () => {\n\t\treturn {\n\t\t\tbackground: {\n\t\t\t\tbackgroundImage,\n\t\t\t\tbackgroundSize,\n\t\t\t},\n\t\t\tcolor: {\n\t\t\t\tpalette: {\n\t\t\t\t\tcustom: customColors,\n\t\t\t\t\ttheme: themeColors,\n\t\t\t\t\tdefault: defaultColors,\n\t\t\t\t},\n\t\t\t\tgradients: {\n\t\t\t\t\tcustom: userGradientPalette,\n\t\t\t\t\ttheme: themeGradientPalette,\n\t\t\t\t\tdefault: defaultGradientPalette,\n\t\t\t\t},\n\t\t\t\tduotone: {\n\t\t\t\t\tcustom: userDuotonePalette,\n\t\t\t\t\ttheme: themeDuotonePalette,\n\t\t\t\t\tdefault: defaultDuotonePalette,\n\t\t\t\t},\n\t\t\t\tdefaultGradients,\n\t\t\t\tdefaultPalette,\n\t\t\t\tdefaultDuotone,\n\t\t\t\tcustom: customColorsEnabled,\n\t\t\t\tcustomGradient: areCustomGradientsEnabled,\n\t\t\t\tcustomDuotone,\n\t\t\t\tbackground: isBackgroundEnabled,\n\t\t\t\tlink: isLinkEnabled,\n\t\t\t\theading: isHeadingEnabled,\n\t\t\t\tbutton: isButtonEnabled,\n\t\t\t\ttext: isTextEnabled,\n\t\t\t},\n\t\t\ttypography: {\n\t\t\t\tfontFamilies: {\n\t\t\t\t\tcustom: fontFamilies,\n\t\t\t\t},\n\t\t\t\tfontSizes: {\n\t\t\t\t\tcustom: fontSizes,\n\t\t\t\t},\n\t\t\t\tcustomFontSize,\n\t\t\t\tfontStyle,\n\t\t\t\tfontWeight,\n\t\t\t\tlineHeight,\n\t\t\t\ttextColumns,\n\t\t\t\ttextDecoration,\n\t\t\t\ttextTransform,\n\t\t\t\tletterSpacing,\n\t\t\t\twritingMode,\n\t\t\t},\n\t\t\tspacing: {\n\t\t\t\tspacingSizes: {\n\t\t\t\t\tcustom: spacingSizes,\n\t\t\t\t},\n\t\t\t\tpadding,\n\t\t\t\tmargin,\n\t\t\t\tblockGap,\n\t\t\t\tunits,\n\t\t\t},\n\t\t\tborder: {\n\t\t\t\tcolor: borderColor,\n\t\t\t\tradius: borderRadius,\n\t\t\t\tstyle: borderStyle,\n\t\t\t\twidth: borderWidth,\n\t\t\t},\n\t\t\tdimensions: {\n\t\t\t\taspectRatio,\n\t\t\t\tminHeight,\n\t\t\t},\n\t\t\tlayout,\n\t\t\tparentLayout,\n\t\t\tshadow,\n\t\t};\n\t}, [\n\t\tbackgroundImage,\n\t\tbackgroundSize,\n\t\tfontFamilies,\n\t\tfontSizes,\n\t\tcustomFontSize,\n\t\tfontStyle,\n\t\tfontWeight,\n\t\tlineHeight,\n\t\ttextColumns,\n\t\ttextDecoration,\n\t\ttextTransform,\n\t\tletterSpacing,\n\t\twritingMode,\n\t\tpadding,\n\t\tmargin,\n\t\tblockGap,\n\t\tspacingSizes,\n\t\tunits,\n\t\taspectRatio,\n\t\tminHeight,\n\t\tlayout,\n\t\tparentLayout,\n\t\tborderColor,\n\t\tborderRadius,\n\t\tborderStyle,\n\t\tborderWidth,\n\t\tcustomColorsEnabled,\n\t\tcustomColors,\n\t\tcustomDuotone,\n\t\tthemeColors,\n\t\tdefaultColors,\n\t\tdefaultPalette,\n\t\tdefaultDuotone,\n\t\tuserDuotonePalette,\n\t\tthemeDuotonePalette,\n\t\tdefaultDuotonePalette,\n\t\tuserGradientPalette,\n\t\tthemeGradientPalette,\n\t\tdefaultGradientPalette,\n\t\tdefaultGradients,\n\t\tareCustomGradientsEnabled,\n\t\tisBackgroundEnabled,\n\t\tisLinkEnabled,\n\t\tisTextEnabled,\n\t\tisHeadingEnabled,\n\t\tisButtonEnabled,\n\t\tshadow,\n\t] );\n\n\treturn useSettingsForBlockElement( rawSettings, name );\n}\n\nexport function createBlockEditFilter( features ) {\n\t// We don't want block controls to re-render when typing inside a block.\n\t// `memo` will prevent re-renders unless props change, so only pass the\n\t// needed props and not the whole attributes object.\n\tfeatures = features.map( ( settings ) => {\n\t\treturn { ...settings, Edit: memo( settings.edit ) };\n\t} );\n\tconst withBlockEditHooks = createHigherOrderComponent(\n\t\t( OriginalBlockEdit ) => ( props ) => {\n\t\t\tconst context = useBlockEditContext();\n\t\t\t// CAUTION: code added before this line will be executed for all\n\t\t\t// blocks, not just those that support the feature! Code added\n\t\t\t// above this line should be carefully evaluated for its impact on\n\t\t\t// performance.\n\t\t\treturn [\n\t\t\t\t...features.map( ( feature, i ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\tEdit,\n\t\t\t\t\t\thasSupport,\n\t\t\t\t\t\tattributeKeys = [],\n\t\t\t\t\t\tshareWithChildBlocks,\n\t\t\t\t\t} = feature;\n\t\t\t\t\tconst shouldDisplayControls =\n\t\t\t\t\t\tcontext[ mayDisplayControlsKey ] ||\n\t\t\t\t\t\t( context[ mayDisplayParentControlsKey ] &&\n\t\t\t\t\t\t\tshareWithChildBlocks );\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! shouldDisplayControls ||\n\t\t\t\t\t\t! hasSupport( props.name )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst neededProps = {};\n\t\t\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\t\t\tif ( props.attributes[ key ] ) {\n\t\t\t\t\t\t\tneededProps[ key ] = props.attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Edit\n\t\t\t\t\t\t\t// We can use the index because the array length\n\t\t\t\t\t\t\t// is fixed per page load right now.\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tname={ props.name }\n\t\t\t\t\t\t\tisSelected={ props.isSelected }\n\t\t\t\t\t\t\tclientId={ props.clientId }\n\t\t\t\t\t\t\tsetAttributes={ props.setAttributes }\n\t\t\t\t\t\t\t__unstableParentLayout={\n\t\t\t\t\t\t\t\tprops.__unstableParentLayout\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// This component is pure, so only pass needed\n\t\t\t\t\t\t\t// props!!!\n\t\t\t\t\t\t\t{ ...neededProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ),\n\t\t\t\t<OriginalBlockEdit key=\"edit\" { ...props } />,\n\t\t\t];\n\t\t},\n\t\t'withBlockEditHooks'\n\t);\n\taddFilter( 'editor.BlockEdit', 'core/editor/hooks', withBlockEditHooks );\n}\n\nfunction BlockProps( { index, useBlockProps, setAllWrapperProps, ...props } ) {\n\tconst wrapperProps = useBlockProps( props );\n\tconst setWrapperProps = ( next ) =>\n\t\tsetAllWrapperProps( ( prev ) => {\n\t\t\tconst nextAll = [ ...prev ];\n\t\t\tnextAll[ index ] = next;\n\t\t\treturn nextAll;\n\t\t} );\n\t// Setting state after every render is fine because this component is\n\t// pure and will only re-render when needed props change.\n\tuseEffect( () => {\n\t\t// We could shallow compare the props, but since this component only\n\t\t// changes when needed attributes change, the benefit is probably small.\n\t\tsetWrapperProps( wrapperProps );\n\t\treturn () => {\n\t\t\tsetWrapperProps( undefined );\n\t\t};\n\t} );\n\treturn null;\n}\n\nconst BlockPropsPure = memo( BlockProps );\n\nexport function createBlockListBlockFilter( features ) {\n\tconst withBlockListBlockHooks = createHigherOrderComponent(\n\t\t( BlockListBlock ) => ( props ) => {\n\t\t\tconst [ allWrapperProps, setAllWrapperProps ] = useState(\n\t\t\t\tArray( features.length ).fill( undefined )\n\t\t\t);\n\t\t\treturn [\n\t\t\t\t...features.map( ( feature, i ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\thasSupport,\n\t\t\t\t\t\tattributeKeys = [],\n\t\t\t\t\t\tuseBlockProps,\n\t\t\t\t\t} = feature;\n\n\t\t\t\t\tconst neededProps = {};\n\t\t\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\t\t\tif ( props.attributes[ key ] ) {\n\t\t\t\t\t\t\tneededProps[ key ] = props.attributes[ key ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip rendering if none of the needed attributes are\n\t\t\t\t\t\t// set.\n\t\t\t\t\t\t! Object.keys( neededProps ).length ||\n\t\t\t\t\t\t! hasSupport( props.name )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<BlockPropsPure\n\t\t\t\t\t\t\t// We can use the index because the array length\n\t\t\t\t\t\t\t// is fixed per page load right now.\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tindex={ i }\n\t\t\t\t\t\t\tuseBlockProps={ useBlockProps }\n\t\t\t\t\t\t\t// This component is pure, so we must pass a stable\n\t\t\t\t\t\t\t// function reference.\n\t\t\t\t\t\t\tsetAllWrapperProps={ setAllWrapperProps }\n\t\t\t\t\t\t\tname={ props.name }\n\t\t\t\t\t\t\t// This component is pure, so only pass needed\n\t\t\t\t\t\t\t// props!!!\n\t\t\t\t\t\t\t{ ...neededProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ),\n\t\t\t\t<BlockListBlock\n\t\t\t\t\tkey=\"edit\"\n\t\t\t\t\t{ ...props }\n\t\t\t\t\twrapperProps={ allWrapperProps\n\t\t\t\t\t\t.filter( Boolean )\n\t\t\t\t\t\t.reduce( ( acc, wrapperProps ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t...acc,\n\t\t\t\t\t\t\t\t...wrapperProps,\n\t\t\t\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t\t\t\tacc.className,\n\t\t\t\t\t\t\t\t\twrapperProps.className\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\t...acc.style,\n\t\t\t\t\t\t\t\t\t...wrapperProps.style,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}, props.wrapperProps || {} ) }\n\t\t\t\t/>,\n\t\t\t];\n\t\t},\n\t\t'withBlockListBlockHooks'\n\t);\n\taddFilter(\n\t\t'editor.BlockListBlock',\n\t\t'core/editor/hooks',\n\t\twithBlockListBlockHooks\n\t);\n}\n\nexport function createBlockSaveFilter( features ) {\n\tfunction extraPropsFromHooks( props, name, attributes ) {\n\t\treturn features.reduce( ( accu, feature ) => {\n\t\t\tconst { hasSupport, attributeKeys = [], addSaveProps } = feature;\n\n\t\t\tconst neededAttributes = {};\n\t\t\tfor ( const key of attributeKeys ) {\n\t\t\t\tif ( attributes[ key ] ) {\n\t\t\t\t\tneededAttributes[ key ] = attributes[ key ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t// Skip rendering if none of the needed attributes are\n\t\t\t\t// set.\n\t\t\t\t! Object.keys( neededAttributes ).length ||\n\t\t\t\t! hasSupport( name )\n\t\t\t) {\n\t\t\t\treturn accu;\n\t\t\t}\n\n\t\t\treturn addSaveProps( accu, name, neededAttributes );\n\t\t}, props );\n\t}\n\taddFilter(\n\t\t'blocks.getSaveContent.extraProps',\n\t\t'core/editor/hooks',\n\t\textraPropsFromHooks,\n\t\t0\n\t);\n\taddFilter(\n\t\t'blocks.getSaveContent.extraProps',\n\t\t'core/editor/hooks',\n\t\t( props ) => {\n\t\t\t// Previously we had a filter deleting the className if it was an empty\n\t\t\t// string. That filter is no longer running, so now we need to delete it\n\t\t\t// here.\n\t\t\tif ( props.hasOwnProperty( 'className' ) && ! props.className ) {\n\t\t\t\tdelete props.className;\n\t\t\t}\n\n\t\t\treturn props;\n\t\t}\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAKA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAA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CAAE,GAAGmB,UAAU,CAAEnB,GAAG,CAAE;QAC5C;MACD;MAEA;MACC;MACA;MACA,CAAEH,MAAM,CAACuK,IAAI,CAAEU,gBAAiB,CAAC,CAAC1K,MAAM,IACxC,CAAEmI,UAAU,CAAErF,IAAK,CAAC,EACnB;QACD,OAAO0H,IAAI;MACZ;MAEA,OAAOC,YAAY,CAAED,IAAI,EAAE1H,IAAI,EAAE4H,gBAAiB,CAAC;IACpD,CAAC,EAAE3C,KAAM,CAAC;EACX;EACA,IAAAiB,gBAAS,EACR,kCAAkC,EAClC,mBAAmB,EACnBuB,mBAAmB,EACnB,CACD,CAAC;EACD,IAAAvB,gBAAS,EACR,kCAAkC,EAClC,mBAAmB,EACjBjB,KAAK,IAAM;IACZ;IACA;IACA;IACA,IAAKA,KAAK,CAAC4C,cAAc,CAAE,WAAY,CAAC,IAAI,CAAE5C,KAAK,CAACqC,SAAS,EAAG;MAC/D,OAAOrC,KAAK,CAACqC,SAAS;IACvB;IAEA,OAAOrC,KAAK;EACb,CACD,CAAC;AACF"}
|
package/build/index.js
CHANGED
|
@@ -13,7 +13,6 @@ var _exportNames = {
|
|
|
13
13
|
__experimentalGetSpacingClassesAndStyles: true,
|
|
14
14
|
__experimentalGetGapCSSValue: true,
|
|
15
15
|
__experimentalGetShadowClassesAndStyles: true,
|
|
16
|
-
__experimentalUseShadowProps: true,
|
|
17
16
|
useCachedTruthy: true,
|
|
18
17
|
storeConfig: true,
|
|
19
18
|
store: true,
|
|
@@ -74,12 +73,6 @@ Object.defineProperty(exports, "__experimentalUseCustomSides", {
|
|
|
74
73
|
return _hooks.useCustomSides;
|
|
75
74
|
}
|
|
76
75
|
});
|
|
77
|
-
Object.defineProperty(exports, "__experimentalUseShadowProps", {
|
|
78
|
-
enumerable: true,
|
|
79
|
-
get: function () {
|
|
80
|
-
return _hooks.useShadowProps;
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
76
|
Object.defineProperty(exports, "getTypographyClassesAndStyles", {
|
|
84
77
|
enumerable: true,
|
|
85
78
|
get: function () {
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_hooks","require","_components","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_elements","_utils","_store","_defaults","_privateApis"],"sources":["@wordpress/block-editor/src/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport './hooks';\nexport {\n\tgetBorderClassesAndStyles as __experimentalGetBorderClassesAndStyles,\n\tuseBorderProps as __experimentalUseBorderProps,\n\tgetColorClassesAndStyles as __experimentalGetColorClassesAndStyles,\n\tgetTypographyClassesAndStyles,\n\tuseColorProps as __experimentalUseColorProps,\n\tuseCustomSides as __experimentalUseCustomSides,\n\tgetSpacingClassesAndStyles as __experimentalGetSpacingClassesAndStyles,\n\tgetGapCSSValue as __experimentalGetGapCSSValue,\n\tgetShadowClassesAndStyles as __experimentalGetShadowClassesAndStyles,\n\
|
|
1
|
+
{"version":3,"names":["_hooks","require","_components","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_elements","_utils","_store","_defaults","_privateApis"],"sources":["@wordpress/block-editor/src/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport './hooks';\nexport {\n\tgetBorderClassesAndStyles as __experimentalGetBorderClassesAndStyles,\n\tuseBorderProps as __experimentalUseBorderProps,\n\tgetColorClassesAndStyles as __experimentalGetColorClassesAndStyles,\n\tgetTypographyClassesAndStyles,\n\tuseColorProps as __experimentalUseColorProps,\n\tuseCustomSides as __experimentalUseCustomSides,\n\tgetSpacingClassesAndStyles as __experimentalGetSpacingClassesAndStyles,\n\tgetGapCSSValue as __experimentalGetGapCSSValue,\n\tgetShadowClassesAndStyles as __experimentalGetShadowClassesAndStyles,\n\tuseCachedTruthy,\n} from './hooks';\nexport * from './components';\nexport * from './elements';\nexport * from './utils';\nexport { storeConfig, store } from './store';\nexport { SETTINGS_DEFAULTS } from './store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AAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAU,MAAA,CAAAV,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,MAAA,CAAAV,GAAA;IAAA;EAAA;AAAA;AACA,IAAAW,MAAA,GAAAhB,OAAA;AACA,IAAAiB,SAAA,GAAAjB,OAAA;AACA,IAAAkB,YAAA,GAAAlB,OAAA"}
|
package/build/utils/object.js
CHANGED
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getValueFromObjectPath = void 0;
|
|
7
7
|
exports.setImmutably = setImmutably;
|
|
8
|
-
exports.uniqByProperty = uniqByProperty;
|
|
9
8
|
/**
|
|
10
9
|
* Immutably sets a value inside an object. Like `lodash#set`, but returning a
|
|
11
10
|
* new object. Treats nullish initial values as empty objects. Clones any
|
|
@@ -59,21 +58,5 @@ const getValueFromObjectPath = (object, path, defaultValue) => {
|
|
|
59
58
|
});
|
|
60
59
|
return (_value = value) !== null && _value !== void 0 ? _value : defaultValue;
|
|
61
60
|
};
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Helper util to filter out objects with duplicate values for a given property.
|
|
65
|
-
*
|
|
66
|
-
* @param {Object[]} array Array of objects to filter.
|
|
67
|
-
* @param {string} property Property to filter unique values by.
|
|
68
|
-
*
|
|
69
|
-
* @return {Object[]} Array of objects with unique values for the specified property.
|
|
70
|
-
*/
|
|
71
61
|
exports.getValueFromObjectPath = getValueFromObjectPath;
|
|
72
|
-
function uniqByProperty(array, property) {
|
|
73
|
-
const seen = new Set();
|
|
74
|
-
return array.filter(item => {
|
|
75
|
-
const value = item[property];
|
|
76
|
-
return seen.has(value) ? false : seen.add(value);
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
62
|
//# sourceMappingURL=object.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["setImmutably","object","path","value","Array","isArray","leaf","pop","prev","key","lvl","getValueFromObjectPath","defaultValue","_value","arrayPath","split","forEach","fieldName","exports"
|
|
1
|
+
{"version":3,"names":["setImmutably","object","path","value","Array","isArray","leaf","pop","prev","key","lvl","getValueFromObjectPath","defaultValue","_value","arrayPath","split","forEach","fieldName","exports"],"sources":["@wordpress/block-editor/src/utils/object.js"],"sourcesContent":["/**\n * Immutably sets a value inside an object. Like `lodash#set`, but returning a\n * new object. Treats nullish initial values as empty objects. Clones any\n * nested objects. Supports arrays, too.\n *\n * @param {Object} object Object to set a value in.\n * @param {number|string|Array} path Path in the object to modify.\n * @param {*} value New value to set.\n * @return {Object} Cloned object with the new value set.\n */\nexport function setImmutably( object, path, value ) {\n\t// Normalize path\n\tpath = Array.isArray( path ) ? [ ...path ] : [ path ];\n\n\t// Shallowly clone the base of the object\n\tobject = Array.isArray( object ) ? [ ...object ] : { ...object };\n\n\tconst leaf = path.pop();\n\n\t// Traverse object from root to leaf, shallowly cloning at each level\n\tlet prev = object;\n\tfor ( const key of path ) {\n\t\tconst lvl = prev[ key ];\n\t\tprev = prev[ key ] = Array.isArray( lvl ) ? [ ...lvl ] : { ...lvl };\n\t}\n\n\tprev[ leaf ] = value;\n\n\treturn object;\n}\n\n/**\n * Helper util to return a value from a certain path of the object.\n * Path is specified as either:\n * - a string of properties, separated by dots, for example: \"x.y\".\n * - an array of properties, for example `[ 'x', 'y' ]`.\n * You can also specify a default value in case the result is nullish.\n *\n * @param {Object} object Input object.\n * @param {string|Array} path Path to the object property.\n * @param {*} defaultValue Default value if the value at the specified path is nullish.\n * @return {*} Value of the object property at the specified path.\n */\nexport const getValueFromObjectPath = ( object, path, defaultValue ) => {\n\tconst arrayPath = Array.isArray( path ) ? path : path.split( '.' );\n\tlet value = object;\n\tarrayP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IACnCd,KAAK,GAAGA,KAAK,GAAIc,SAAS,CAAE;EAC7B,CAAE,CAAC;EACH,QAAAJ,MAAA,GAAOV,KAAK,cAAAU,MAAA,cAAAA,MAAA,GAAID,YAAY;AAC7B,CAAC;AAACM,OAAA,CAAAP,sBAAA,GAAAA,sBAAA"}
|
|
@@ -65,12 +65,13 @@ export default function AspectRatioTool({
|
|
|
65
65
|
onChange = () => {},
|
|
66
66
|
options = DEFAULT_ASPECT_RATIO_OPTIONS,
|
|
67
67
|
defaultValue = DEFAULT_ASPECT_RATIO_OPTIONS[0].value,
|
|
68
|
+
hasValue,
|
|
68
69
|
isShownByDefault = true
|
|
69
70
|
}) {
|
|
70
71
|
// Match the CSS default so if the value is used directly in CSS it will look correct in the control.
|
|
71
72
|
const displayValue = value !== null && value !== void 0 ? value : 'auto';
|
|
72
73
|
return createElement(ToolsPanelItem, {
|
|
73
|
-
hasValue: () => displayValue !== defaultValue,
|
|
74
|
+
hasValue: hasValue ? hasValue : () => displayValue !== defaultValue,
|
|
74
75
|
label: __('Aspect ratio'),
|
|
75
76
|
onDeselect: () => onChange(undefined),
|
|
76
77
|
isShownByDefault: isShownByDefault,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SelectControl","__experimentalToolsPanelItem","ToolsPanelItem","__","_x","DEFAULT_ASPECT_RATIO_OPTIONS","label","value","disabled","hidden","AspectRatioTool","panelId","onChange","options","defaultValue","isShownByDefault","displayValue","createElement","
|
|
1
|
+
{"version":3,"names":["SelectControl","__experimentalToolsPanelItem","ToolsPanelItem","__","_x","DEFAULT_ASPECT_RATIO_OPTIONS","label","value","disabled","hidden","AspectRatioTool","panelId","onChange","options","defaultValue","hasValue","isShownByDefault","displayValue","createElement","onDeselect","undefined","size","__nextHasNoMarginBottom"],"sources":["@wordpress/block-editor/src/components/dimensions-tool/aspect-ratio-tool.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tSelectControl,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\n\n/**\n * @typedef {import('@wordpress/components/build-types/select-control/types').SelectControlProps} SelectControlProps\n */\n\n/**\n * @type {SelectControlProps[]}\n */\nexport const DEFAULT_ASPECT_RATIO_OPTIONS = [\n\t{\n\t\tlabel: _x( 'Original', 'Aspect ratio option for dimensions control' ),\n\t\tvalue: 'auto',\n\t},\n\t{\n\t\tlabel: _x(\n\t\t\t'Square - 1:1',\n\t\t\t'Aspect ratio option for dimensions control'\n\t\t),\n\t\tvalue: '1',\n\t},\n\t{\n\t\tlabel: _x(\n\t\t\t'Standard - 4:3',\n\t\t\t'Aspect ratio option for dimensions control'\n\t\t),\n\t\tvalue: '4/3',\n\t},\n\t{\n\t\tlabel: _x(\n\t\t\t'Portrait - 3:4',\n\t\t\t'Aspect ratio option for dimensions control'\n\t\t),\n\t\tvalue: '3/4',\n\t},\n\t{\n\t\tlabel: _x(\n\t\t\t'Classic - 3:2',\n\t\t\t'Aspect ratio option for dimensions control'\n\t\t),\n\t\tvalue: '3/2',\n\t},\n\t{\n\t\tlabel: _x(\n\t\t\t'Classic Portrait - 2:3',\n\t\t\t'Aspect ratio option for dimensions control'\n\t\t),\n\t\tvalue: '2/3',\n\t},\n\t{\n\t\tlabel: _x(\n\t\t\t'Wide - 16:9',\n\t\t\t'Aspect ratio option for dimensions control'\n\t\t),\n\t\tvalue: '16/9',\n\t},\n\t{\n\t\tlabel: _x(\n\t\t\t'Tall - 9:16',\n\t\t\t'Aspect ratio option for dimensions control'\n\t\t),\n\t\tvalue: '9/16',\n\t},\n\t{\n\t\tlabel: _x( 'Custom', 'Aspect ratio option for dimensions control' ),\n\t\tvalue: 'custom',\n\t\tdisabled: true,\n\t\thidden: true,\n\t},\n];\n\n/**\n * @callback AspectRatioToolPropsOnChange\n * @param {string} [value] New aspect ratio value.\n * @return {void} No return.\n */\n\n/**\n * @typedef {Object} AspectRatioToolProps\n * @property {string} [panelId] ID of the panel this tool is associated with.\n * @property {string} [value] Current aspect ratio value.\n * @property {AspectRatioToolPropsOnChange} [onChange] Callback to update the aspect ratio value.\n * @property {SelectControlProps[]} [options] Aspect ratio options.\n * @property {string} [defaultValue] Default aspect ratio value.\n * @property {boolean} [isShownByDefault] Whether the tool is shown by default.\n */\n\nexport default function AspectRatioTool( {\n\tpanelId,\n\tvalue,\n\tonChange = () => {},\n\toptions = DEFAULT_ASPECT_RATIO_OPTIONS,\n\tdefaultValue = DEFAULT_ASPECT_RATIO_OPTIONS[ 0 ].value,\n\thasValue,\n\tisShownByDefault = true,\n} ) {\n\t// Match the CSS default so if the value is used directly in CSS it will look correct in the control.\n\tconst displayValue = value ?? 'auto';\n\n\treturn (\n\t\t<ToolsPanelItem\n\t\t\thasValue={\n\t\t\t\thasValue ? hasValue : () => displayValue !== defaultValue\n\t\t\t}\n\t\t\tlabel={ __( 'Aspect ratio' ) }\n\t\t\tonDeselect={ () => onChange( undefined ) }\n\t\t\tisShownByDefault={ isShownByDefault }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t<SelectControl\n\t\t\t\tlabel={ __( 'Aspect ratio' ) }\n\t\t\t\tvalue={ displayValue }\n\t\t\t\toptions={ options }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tsize={ '__unstable-large' }\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t/>\n\t\t</ToolsPanelItem>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,aAAa,EACbC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SAASC,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;;AAExC;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,CAC3C;EACCC,KAAK,EAAEF,EAAE,CAAE,UAAU,EAAE,4CAA6C,CAAC;EACrEG,KAAK,EAAE;AACR,CAAC,EACD;EACCD,KAAK,EAAEF,EAAE,CACR,cAAc,EACd,4CACD,CAAC;EACDG,KAAK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G;IAC9BgB,UAAU,EAAGA,CAAA,KAAMP,QAAQ,CAAEQ,SAAU,CAAG;IAC1CJ,gBAAgB,EAAGA,gBAAkB;IACrCL,OAAO,EAAGA;EAAS,GAEnBO,aAAA,CAAClB,aAAa;IACbM,KAAK,EAAGH,EAAE,CAAE,cAAe,CAAG;IAC9BI,KAAK,EAAGU,YAAc;IACtBJ,OAAO,EAAGA,OAAS;IACnBD,QAAQ,EAAGA,QAAU;IACrBS,IAAI,EAAG,kBAAoB;IAC3BC,uBAAuB;EAAA,CACvB,CACc,CAAC;AAEnB"}
|
|
@@ -19,6 +19,7 @@ import { getValueFromVariable, TOOLSPANEL_DROPDOWNMENU_PROPS } from './utils';
|
|
|
19
19
|
import SpacingSizesControl from '../spacing-sizes-control';
|
|
20
20
|
import HeightControl from '../height-control';
|
|
21
21
|
import ChildLayoutControl from '../child-layout-control';
|
|
22
|
+
import AspectRatioTool from '../dimensions-tool/aspect-ratio-tool';
|
|
22
23
|
import { cleanEmptyObject } from '../../hooks/utils';
|
|
23
24
|
import { setImmutably } from '../../utils/object';
|
|
24
25
|
const AXIAL_SIDES = ['horizontal', 'vertical'];
|
|
@@ -29,8 +30,9 @@ export function useHasDimensionsPanel(settings) {
|
|
|
29
30
|
const hasMargin = useHasMargin(settings);
|
|
30
31
|
const hasGap = useHasGap(settings);
|
|
31
32
|
const hasMinHeight = useHasMinHeight(settings);
|
|
33
|
+
const hasAspectRatio = useHasAspectRatio(settings);
|
|
32
34
|
const hasChildLayout = useHasChildLayout(settings);
|
|
33
|
-
return Platform.OS === 'web' && (hasContentSize || hasWideSize || hasPadding || hasMargin || hasGap || hasMinHeight || hasChildLayout);
|
|
35
|
+
return Platform.OS === 'web' && (hasContentSize || hasWideSize || hasPadding || hasMargin || hasGap || hasMinHeight || hasAspectRatio || hasChildLayout);
|
|
34
36
|
}
|
|
35
37
|
function useHasContentSize(settings) {
|
|
36
38
|
return settings?.layout?.contentSize;
|
|
@@ -50,6 +52,9 @@ function useHasGap(settings) {
|
|
|
50
52
|
function useHasMinHeight(settings) {
|
|
51
53
|
return settings?.dimensions?.minHeight;
|
|
52
54
|
}
|
|
55
|
+
function useHasAspectRatio(settings) {
|
|
56
|
+
return settings?.dimensions?.aspectRatio;
|
|
57
|
+
}
|
|
53
58
|
function useHasChildLayout(settings) {
|
|
54
59
|
var _settings$parentLayou;
|
|
55
60
|
const {
|
|
@@ -149,6 +154,7 @@ const DEFAULT_CONTROLS = {
|
|
|
149
154
|
margin: true,
|
|
150
155
|
blockGap: true,
|
|
151
156
|
minHeight: true,
|
|
157
|
+
aspectRatio: true,
|
|
152
158
|
childLayout: true
|
|
153
159
|
};
|
|
154
160
|
export default function DimensionsPanel({
|
|
@@ -164,7 +170,7 @@ export default function DimensionsPanel({
|
|
|
164
170
|
// in global styles but not in block inspector.
|
|
165
171
|
includeLayoutControls = false
|
|
166
172
|
}) {
|
|
167
|
-
var _settings$parentLayou2, _defaultControls$cont, _defaultControls$wide, _defaultControls$padd, _defaultControls$marg, _defaultControls$bloc, _defaultControls$minH, _defaultControls$chil;
|
|
173
|
+
var _settings$parentLayou2, _defaultControls$cont, _defaultControls$wide, _defaultControls$padd, _defaultControls$marg, _defaultControls$bloc, _defaultControls$minH, _defaultControls$aspe, _defaultControls$chil;
|
|
168
174
|
const {
|
|
169
175
|
dimensions,
|
|
170
176
|
spacing
|
|
@@ -269,13 +275,25 @@ export default function DimensionsPanel({
|
|
|
269
275
|
const showMinHeightControl = useHasMinHeight(settings);
|
|
270
276
|
const minHeightValue = decodeValue(inheritedValue?.dimensions?.minHeight);
|
|
271
277
|
const setMinHeightValue = newValue => {
|
|
272
|
-
|
|
278
|
+
const tempValue = setImmutably(value, ['dimensions', 'minHeight'], newValue);
|
|
279
|
+
// Apply min-height, while removing any applied aspect ratio.
|
|
280
|
+
onChange(setImmutably(tempValue, ['dimensions', 'aspectRatio'], undefined));
|
|
273
281
|
};
|
|
274
282
|
const resetMinHeightValue = () => {
|
|
275
283
|
setMinHeightValue(undefined);
|
|
276
284
|
};
|
|
277
285
|
const hasMinHeightValue = () => !!value?.dimensions?.minHeight;
|
|
278
286
|
|
|
287
|
+
// Aspect Ratio
|
|
288
|
+
const showAspectRatioControl = useHasAspectRatio(settings);
|
|
289
|
+
const aspectRatioValue = decodeValue(inheritedValue?.dimensions?.aspectRatio);
|
|
290
|
+
const setAspectRatioValue = newValue => {
|
|
291
|
+
const tempValue = setImmutably(value, ['dimensions', 'aspectRatio'], newValue);
|
|
292
|
+
// Apply aspect-ratio, while removing any applied min-height.
|
|
293
|
+
onChange(setImmutably(tempValue, ['dimensions', 'minHeight'], undefined));
|
|
294
|
+
};
|
|
295
|
+
const hasAspectRatioValue = () => !!value?.dimensions?.aspectRatio;
|
|
296
|
+
|
|
279
297
|
// Child Layout
|
|
280
298
|
const showChildLayoutControl = useHasChildLayout(settings);
|
|
281
299
|
const childLayout = inheritedValue?.layout;
|
|
@@ -317,7 +335,8 @@ export default function DimensionsPanel({
|
|
|
317
335
|
},
|
|
318
336
|
dimensions: {
|
|
319
337
|
...previousValue?.dimensions,
|
|
320
|
-
minHeight: undefined
|
|
338
|
+
minHeight: undefined,
|
|
339
|
+
aspectRatio: undefined
|
|
321
340
|
}
|
|
322
341
|
};
|
|
323
342
|
}, []);
|
|
@@ -471,7 +490,13 @@ export default function DimensionsPanel({
|
|
|
471
490
|
label: __('Minimum height'),
|
|
472
491
|
value: minHeightValue,
|
|
473
492
|
onChange: setMinHeightValue
|
|
474
|
-
})),
|
|
493
|
+
})), showAspectRatioControl && createElement(AspectRatioTool, {
|
|
494
|
+
hasValue: hasAspectRatioValue,
|
|
495
|
+
value: aspectRatioValue,
|
|
496
|
+
onChange: setAspectRatioValue,
|
|
497
|
+
panelId: panelId,
|
|
498
|
+
isShownByDefault: (_defaultControls$aspe = defaultControls.aspectRatio) !== null && _defaultControls$aspe !== void 0 ? _defaultControls$aspe : DEFAULT_CONTROLS.aspectRatio
|
|
499
|
+
}), showChildLayoutControl && createElement(VStack, {
|
|
475
500
|
as: ToolsPanelItem,
|
|
476
501
|
spacing: 2,
|
|
477
502
|
hasValue: hasChildLayoutValue,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","__","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","__experimentalBoxControl","BoxControl","__experimentalHStack","HStack","__experimentalVStack","VStack","__experimentalUnitControl","UnitControl","__experimentalUseCustomUnits","useCustomUnits","__experimentalView","View","Icon","positionCenter","stretchWide","useCallback","Platform","getValueFromVariable","TOOLSPANEL_DROPDOWNMENU_PROPS","SpacingSizesControl","HeightControl","ChildLayoutControl","cleanEmptyObject","setImmutably","AXIAL_SIDES","useHasDimensionsPanel","settings","hasContentSize","useHasContentSize","hasWideSize","useHasWideSize","hasPadding","useHasPadding","hasMargin","useHasMargin","hasGap","useHasGap","hasMinHeight","useHasMinHeight","hasChildLayout","useHasChildLayout","OS","layout","contentSize","wideSize","spacing","padding","margin","blockGap","dimensions","minHeight","_settings$parentLayou","type","parentLayoutType","default","defaultParentLayoutType","allowSizingOnChildren","parentLayout","support","useHasSpacingPresets","_ref","_ref2","custom","theme","defaultPresets","spacingSizes","presets","length","filterValuesBySides","values","sides","filteredValues","forEach","side","top","bottom","left","right","splitStyleValue","value","splitGapValue","DimensionsToolsPanel","resetAllFilter","onChange","panelId","children","resetAll","updatedValue","createElement","label","dropdownMenuProps","DEFAULT_CONTROLS","childLayout","DimensionsPanel","as","Wrapper","inheritedValue","defaultControls","onVisualize","includeLayoutControls","_settings$parentLayou2","_defaultControls$cont","_defaultControls$wide","_defaultControls$padd","_defaultControls$marg","_defaultControls$bloc","_defaultControls$minH","_defaultControls$chil","decodeValue","rawValue","Object","keys","reduce","acc","key","showSpacingPresetsControl","units","availableUnits","showContentSizeControl","contentSizeValue","setContentSizeValue","newValue","undefined","hasUserSetContentSizeValue","resetContentSizeValue","showWideSizeControl","wideSizeValue","setWideSizeValue","hasUserSetWideSizeValue","resetWideSizeValue","showPaddingControl","rawPadding","paddingValues","paddingSides","Array","isArray","isAxialPadding","some","includes","setPaddingValues","newPaddingValues","hasPaddingValue","resetPaddingValue","onMouseOverPadding","showMarginControl","rawMargin","marginValues","marginSides","isAxialMargin","setMarginValues","newMarginValues","hasMarginValue","resetMarginValue","onMouseOverMargin","showGapControl","gapValue","gapValues","gapSides","isAxialGap","setGapValue","newGapValue","setGapValues","nextBoxGapValue","hasOwnProperty","resetGapValue","hasGapValue","showMinHeightControl","minHeightValue","setMinHeightValue","resetMinHeightValue","hasMinHeightValue","showChildLayoutControl","orientation","childLayoutOrientationLabel","setChildLayout","newChildLayout","resetChildLayoutValue","selfStretch","flexSize","hasChildLayoutValue","previousValue","onMouseLeaveControls","className","hasValue","onDeselect","isShownByDefault","alignment","justify","labelPosition","__unstableInputWidth","nextContentSize","icon","nextWideSize","allowReset","splitOnAxis","onMouseOver","onMouseOut","min","showSideInLabel"],"sources":["@wordpress/block-editor/src/components/global-styles/dimensions-panel.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalBoxControl as BoxControl,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalView as View,\n} from '@wordpress/components';\nimport { Icon, positionCenter, stretchWide } from '@wordpress/icons';\nimport { useCallback, Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getValueFromVariable, TOOLSPANEL_DROPDOWNMENU_PROPS } from './utils';\nimport SpacingSizesControl from '../spacing-sizes-control';\nimport HeightControl from '../height-control';\nimport ChildLayoutControl from '../child-layout-control';\nimport { cleanEmptyObject } from '../../hooks/utils';\nimport { setImmutably } from '../../utils/object';\n\nconst AXIAL_SIDES = [ 'horizontal', 'vertical' ];\n\nexport function useHasDimensionsPanel( settings ) {\n\tconst hasContentSize = useHasContentSize( settings );\n\tconst hasWideSize = useHasWideSize( settings );\n\tconst hasPadding = useHasPadding( settings );\n\tconst hasMargin = useHasMargin( settings );\n\tconst hasGap = useHasGap( settings );\n\tconst hasMinHeight = useHasMinHeight( settings );\n\tconst hasChildLayout = useHasChildLayout( settings );\n\n\treturn (\n\t\tPlatform.OS === 'web' &&\n\t\t( hasContentSize ||\n\t\t\thasWideSize ||\n\t\t\thasPadding ||\n\t\t\thasMargin ||\n\t\t\thasGap ||\n\t\t\thasMinHeight ||\n\t\t\thasChildLayout )\n\t);\n}\n\nfunction useHasContentSize( settings ) {\n\treturn settings?.layout?.contentSize;\n}\n\nfunction useHasWideSize( settings ) {\n\treturn settings?.layout?.wideSize;\n}\n\nfunction useHasPadding( settings ) {\n\treturn settings?.spacing?.padding;\n}\n\nfunction useHasMargin( settings ) {\n\treturn settings?.spacing?.margin;\n}\n\nfunction useHasGap( settings ) {\n\treturn settings?.spacing?.blockGap;\n}\n\nfunction useHasMinHeight( settings ) {\n\treturn settings?.dimensions?.minHeight;\n}\n\nfunction useHasChildLayout( settings ) {\n\tconst {\n\t\ttype: parentLayoutType = 'default',\n\t\tdefault: { type: defaultParentLayoutType = 'default' } = {},\n\t\tallowSizingOnChildren = false,\n\t} = settings?.parentLayout ?? {};\n\n\tconst support =\n\t\t( defaultParentLayoutType === 'flex' || parentLayoutType === 'flex' ) &&\n\t\tallowSizingOnChildren;\n\n\treturn !! settings?.layout && support;\n}\n\nfunction useHasSpacingPresets( settings ) {\n\tconst {\n\t\tcustom,\n\t\ttheme,\n\t\tdefault: defaultPresets,\n\t} = settings?.spacing?.spacingSizes || {};\n\tconst presets = custom ?? theme ?? defaultPresets ?? [];\n\n\treturn presets.length > 0;\n}\n\nfunction filterValuesBySides( values, sides ) {\n\t// If no custom side configuration, all sides are opted into by default.\n\t// Without any values, we have nothing to filter either.\n\tif ( ! sides || ! values ) {\n\t\treturn values;\n\t}\n\n\t// Only include sides opted into within filtered values.\n\tconst filteredValues = {};\n\tsides.forEach( ( side ) => {\n\t\tif ( side === 'vertical' ) {\n\t\t\tfilteredValues.top = values.top;\n\t\t\tfilteredValues.bottom = values.bottom;\n\t\t}\n\t\tif ( side === 'horizontal' ) {\n\t\t\tfilteredValues.left = values.left;\n\t\t\tfilteredValues.right = values.right;\n\t\t}\n\t\tfilteredValues[ side ] = values?.[ side ];\n\t} );\n\n\treturn filteredValues;\n}\n\nfunction splitStyleValue( value ) {\n\t// Check for shorthand value (a string value).\n\tif ( value && typeof value === 'string' ) {\n\t\t// Convert to value for individual sides for BoxControl.\n\t\treturn {\n\t\t\ttop: value,\n\t\t\tright: value,\n\t\t\tbottom: value,\n\t\t\tleft: value,\n\t\t};\n\t}\n\n\treturn value;\n}\n\nfunction splitGapValue( value ) {\n\t// Check for shorthand value (a string value).\n\tif ( value && typeof value === 'string' ) {\n\t\t// If the value is a string, treat it as a single side (top) for the spacing controls.\n\t\treturn {\n\t\t\ttop: value,\n\t\t};\n\t}\n\n\tif ( value ) {\n\t\treturn {\n\t\t\t...value,\n\t\t\tright: value?.left,\n\t\t\tbottom: value?.top,\n\t\t};\n\t}\n\n\treturn value;\n}\n\nfunction DimensionsToolsPanel( {\n\tresetAllFilter,\n\tonChange,\n\tvalue,\n\tpanelId,\n\tchildren,\n} ) {\n\tconst resetAll = () => {\n\t\tconst updatedValue = resetAllFilter( value );\n\t\tonChange( updatedValue );\n\t};\n\n\treturn (\n\t\t<ToolsPanel\n\t\t\tlabel={ __( 'Dimensions' ) }\n\t\t\tresetAll={ resetAll }\n\t\t\tpanelId={ panelId }\n\t\t\tdropdownMenuProps={ TOOLSPANEL_DROPDOWNMENU_PROPS }\n\t\t>\n\t\t\t{ children }\n\t\t</ToolsPanel>\n\t);\n}\n\nconst DEFAULT_CONTROLS = {\n\tcontentSize: true,\n\twideSize: true,\n\tpadding: true,\n\tmargin: true,\n\tblockGap: true,\n\tminHeight: true,\n\tchildLayout: true,\n};\n\nexport default function DimensionsPanel( {\n\tas: Wrapper = DimensionsToolsPanel,\n\tvalue,\n\tonChange,\n\tinheritedValue = value,\n\tsettings,\n\tpanelId,\n\tdefaultControls = DEFAULT_CONTROLS,\n\tonVisualize = () => {},\n\t// Special case because the layout controls are not part of the dimensions panel\n\t// in global styles but not in block inspector.\n\tincludeLayoutControls = false,\n} ) {\n\tconst { dimensions, spacing } = settings;\n\n\tconst decodeValue = ( rawValue ) => {\n\t\tif ( rawValue && typeof rawValue === 'object' ) {\n\t\t\treturn Object.keys( rawValue ).reduce( ( acc, key ) => {\n\t\t\t\tacc[ key ] = getValueFromVariable(\n\t\t\t\t\t{ settings: { dimensions, spacing } },\n\t\t\t\t\t'',\n\t\t\t\t\trawValue[ key ]\n\t\t\t\t);\n\t\t\t\treturn acc;\n\t\t\t}, {} );\n\t\t}\n\t\treturn getValueFromVariable(\n\t\t\t{ settings: { dimensions, spacing } },\n\t\t\t'',\n\t\t\trawValue\n\t\t);\n\t};\n\n\tconst showSpacingPresetsControl = useHasSpacingPresets( settings );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: settings?.spacing?.units || [\n\t\t\t'%',\n\t\t\t'px',\n\t\t\t'em',\n\t\t\t'rem',\n\t\t\t'vw',\n\t\t],\n\t} );\n\n\t// Content Size\n\tconst showContentSizeControl =\n\t\tuseHasContentSize( settings ) && includeLayoutControls;\n\tconst contentSizeValue = decodeValue( inheritedValue?.layout?.contentSize );\n\tconst setContentSizeValue = ( newValue ) => {\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\tvalue,\n\t\t\t\t[ 'layout', 'contentSize' ],\n\t\t\t\tnewValue || undefined\n\t\t\t)\n\t\t);\n\t};\n\tconst hasUserSetContentSizeValue = () => !! value?.layout?.contentSize;\n\tconst resetContentSizeValue = () => setContentSizeValue( undefined );\n\n\t// Wide Size\n\tconst showWideSizeControl =\n\t\tuseHasWideSize( settings ) && includeLayoutControls;\n\tconst wideSizeValue = decodeValue( inheritedValue?.layout?.wideSize );\n\tconst setWideSizeValue = ( newValue ) => {\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\tvalue,\n\t\t\t\t[ 'layout', 'wideSize' ],\n\t\t\t\tnewValue || undefined\n\t\t\t)\n\t\t);\n\t};\n\tconst hasUserSetWideSizeValue = () => !! value?.layout?.wideSize;\n\tconst resetWideSizeValue = () => setWideSizeValue( undefined );\n\n\t// Padding\n\tconst showPaddingControl = useHasPadding( settings );\n\tconst rawPadding = decodeValue( inheritedValue?.spacing?.padding );\n\tconst paddingValues = splitStyleValue( rawPadding );\n\tconst paddingSides = Array.isArray( settings?.spacing?.padding )\n\t\t? settings?.spacing?.padding\n\t\t: settings?.spacing?.padding?.sides;\n\tconst isAxialPadding =\n\t\tpaddingSides &&\n\t\tpaddingSides.some( ( side ) => AXIAL_SIDES.includes( side ) );\n\tconst setPaddingValues = ( newPaddingValues ) => {\n\t\tconst padding = filterValuesBySides( newPaddingValues, paddingSides );\n\t\tonChange( setImmutably( value, [ 'spacing', 'padding' ], padding ) );\n\t};\n\tconst hasPaddingValue = () =>\n\t\t!! value?.spacing?.padding &&\n\t\tObject.keys( value?.spacing?.padding ).length;\n\tconst resetPaddingValue = () => setPaddingValues( undefined );\n\tconst onMouseOverPadding = () => onVisualize( 'padding' );\n\n\t// Margin\n\tconst showMarginControl = useHasMargin( settings );\n\tconst rawMargin = decodeValue( inheritedValue?.spacing?.margin );\n\tconst marginValues = splitStyleValue( rawMargin );\n\tconst marginSides = Array.isArray( settings?.spacing?.margin )\n\t\t? settings?.spacing?.margin\n\t\t: settings?.spacing?.margin?.sides;\n\tconst isAxialMargin =\n\t\tmarginSides &&\n\t\tmarginSides.some( ( side ) => AXIAL_SIDES.includes( side ) );\n\tconst setMarginValues = ( newMarginValues ) => {\n\t\tconst margin = filterValuesBySides( newMarginValues, marginSides );\n\t\tonChange( setImmutably( value, [ 'spacing', 'margin' ], margin ) );\n\t};\n\tconst hasMarginValue = () =>\n\t\t!! value?.spacing?.margin &&\n\t\tObject.keys( value?.spacing?.margin ).length;\n\tconst resetMarginValue = () => setMarginValues( undefined );\n\tconst onMouseOverMargin = () => onVisualize( 'margin' );\n\n\t// Block Gap\n\tconst showGapControl = useHasGap( settings );\n\tconst gapValue = decodeValue( inheritedValue?.spacing?.blockGap );\n\tconst gapValues = splitGapValue( gapValue );\n\tconst gapSides = Array.isArray( settings?.spacing?.blockGap )\n\t\t? settings?.spacing?.blockGap\n\t\t: settings?.spacing?.blockGap?.sides;\n\tconst isAxialGap =\n\t\tgapSides && gapSides.some( ( side ) => AXIAL_SIDES.includes( side ) );\n\tconst setGapValue = ( newGapValue ) => {\n\t\tonChange(\n\t\t\tsetImmutably( value, [ 'spacing', 'blockGap' ], newGapValue )\n\t\t);\n\t};\n\tconst setGapValues = ( nextBoxGapValue ) => {\n\t\tif ( ! nextBoxGapValue ) {\n\t\t\tsetGapValue( null );\n\t\t}\n\t\t// If axial gap is not enabled, treat the 'top' value as the shorthand gap value.\n\t\tif ( ! isAxialGap && nextBoxGapValue?.hasOwnProperty( 'top' ) ) {\n\t\t\tsetGapValue( nextBoxGapValue.top );\n\t\t} else {\n\t\t\tsetGapValue( {\n\t\t\t\ttop: nextBoxGapValue?.top,\n\t\t\t\tleft: nextBoxGapValue?.left,\n\t\t\t} );\n\t\t}\n\t};\n\tconst resetGapValue = () => setGapValue( undefined );\n\tconst hasGapValue = () => !! value?.spacing?.blockGap;\n\n\t// Min Height\n\tconst showMinHeightControl = useHasMinHeight( settings );\n\tconst minHeightValue = decodeValue( inheritedValue?.dimensions?.minHeight );\n\tconst setMinHeightValue = ( newValue ) => {\n\t\tonChange(\n\t\t\tsetImmutably( value, [ 'dimensions', 'minHeight' ], newValue )\n\t\t);\n\t};\n\tconst resetMinHeightValue = () => {\n\t\tsetMinHeightValue( undefined );\n\t};\n\tconst hasMinHeightValue = () => !! value?.dimensions?.minHeight;\n\n\t// Child Layout\n\tconst showChildLayoutControl = useHasChildLayout( settings );\n\tconst childLayout = inheritedValue?.layout;\n\tconst { orientation = 'horizontal' } = settings?.parentLayout ?? {};\n\tconst childLayoutOrientationLabel =\n\t\torientation === 'horizontal' ? __( 'Width' ) : __( 'Height' );\n\tconst setChildLayout = ( newChildLayout ) => {\n\t\tonChange( {\n\t\t\t...value,\n\t\t\tlayout: {\n\t\t\t\t...value?.layout,\n\t\t\t\t...newChildLayout,\n\t\t\t},\n\t\t} );\n\t};\n\tconst resetChildLayoutValue = () => {\n\t\tsetChildLayout( {\n\t\t\tselfStretch: undefined,\n\t\t\tflexSize: undefined,\n\t\t} );\n\t};\n\tconst hasChildLayoutValue = () => !! value?.layout;\n\n\tconst resetAllFilter = useCallback( ( previousValue ) => {\n\t\treturn {\n\t\t\t...previousValue,\n\t\t\tlayout: cleanEmptyObject( {\n\t\t\t\t...previousValue?.layout,\n\t\t\t\tcontentSize: undefined,\n\t\t\t\twideSize: undefined,\n\t\t\t\tselfStretch: undefined,\n\t\t\t\tflexSize: undefined,\n\t\t\t} ),\n\t\t\tspacing: {\n\t\t\t\t...previousValue?.spacing,\n\t\t\t\tpadding: undefined,\n\t\t\t\tmargin: undefined,\n\t\t\t\tblockGap: undefined,\n\t\t\t},\n\t\t\tdimensions: {\n\t\t\t\t...previousValue?.dimensions,\n\t\t\t\tminHeight: undefined,\n\t\t\t},\n\t\t};\n\t}, [] );\n\n\tconst onMouseLeaveControls = () => onVisualize( false );\n\n\treturn (\n\t\t<Wrapper\n\t\t\tresetAllFilter={ resetAllFilter }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t{ ( showContentSizeControl || showWideSizeControl ) && (\n\t\t\t\t<span className=\"span-columns\">\n\t\t\t\t\t{ __( 'Set the width of the main content area.' ) }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t\t{ showContentSizeControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tclassName=\"single-column\"\n\t\t\t\t\tlabel={ __( 'Content size' ) }\n\t\t\t\t\thasValue={ hasUserSetContentSizeValue }\n\t\t\t\t\tonDeselect={ resetContentSizeValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.contentSize ??\n\t\t\t\t\t\tDEFAULT_CONTROLS.contentSize\n\t\t\t\t\t}\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<HStack alignment=\"flex-end\" justify=\"flex-start\">\n\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\tlabel={ __( 'Content' ) }\n\t\t\t\t\t\t\tlabelPosition=\"top\"\n\t\t\t\t\t\t\t__unstableInputWidth=\"80px\"\n\t\t\t\t\t\t\tvalue={ contentSizeValue || '' }\n\t\t\t\t\t\t\tonChange={ ( nextContentSize ) => {\n\t\t\t\t\t\t\t\tsetContentSizeValue( nextContentSize );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<View>\n\t\t\t\t\t\t\t<Icon icon={ positionCenter } />\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</HStack>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showWideSizeControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tclassName=\"single-column\"\n\t\t\t\t\tlabel={ __( 'Wide size' ) }\n\t\t\t\t\thasValue={ hasUserSetWideSizeValue }\n\t\t\t\t\tonDeselect={ resetWideSizeValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.wideSize ?? DEFAULT_CONTROLS.wideSize\n\t\t\t\t\t}\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<HStack alignment=\"flex-end\" justify=\"flex-start\">\n\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\tlabel={ __( 'Wide' ) }\n\t\t\t\t\t\t\tlabelPosition=\"top\"\n\t\t\t\t\t\t\t__unstableInputWidth=\"80px\"\n\t\t\t\t\t\t\tvalue={ wideSizeValue || '' }\n\t\t\t\t\t\t\tonChange={ ( nextWideSize ) => {\n\t\t\t\t\t\t\t\tsetWideSizeValue( nextWideSize );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<View>\n\t\t\t\t\t\t\t<Icon icon={ stretchWide } />\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</HStack>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showPaddingControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ hasPaddingValue }\n\t\t\t\t\tlabel={ __( 'Padding' ) }\n\t\t\t\t\tonDeselect={ resetPaddingValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.padding ?? DEFAULT_CONTROLS.padding\n\t\t\t\t\t}\n\t\t\t\t\tclassName={ classnames( {\n\t\t\t\t\t\t'tools-panel-item-spacing': showSpacingPresetsControl,\n\t\t\t\t\t} ) }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t{ ! showSpacingPresetsControl && (\n\t\t\t\t\t\t<BoxControl\n\t\t\t\t\t\t\tvalues={ paddingValues }\n\t\t\t\t\t\t\tonChange={ setPaddingValues }\n\t\t\t\t\t\t\tlabel={ __( 'Padding' ) }\n\t\t\t\t\t\t\tsides={ paddingSides }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\tsplitOnAxis={ isAxialPadding }\n\t\t\t\t\t\t\tonMouseOver={ onMouseOverPadding }\n\t\t\t\t\t\t\tonMouseOut={ onMouseLeaveControls }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showSpacingPresetsControl && (\n\t\t\t\t\t\t<SpacingSizesControl\n\t\t\t\t\t\t\tvalues={ paddingValues }\n\t\t\t\t\t\t\tonChange={ setPaddingValues }\n\t\t\t\t\t\t\tlabel={ __( 'Padding' ) }\n\t\t\t\t\t\t\tsides={ paddingSides }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\tonMouseOver={ onMouseOverPadding }\n\t\t\t\t\t\t\tonMouseOut={ onMouseLeaveControls }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showMarginControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ hasMarginValue }\n\t\t\t\t\tlabel={ __( 'Margin' ) }\n\t\t\t\t\tonDeselect={ resetMarginValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.margin ?? DEFAULT_CONTROLS.margin\n\t\t\t\t\t}\n\t\t\t\t\tclassName={ classnames( {\n\t\t\t\t\t\t'tools-panel-item-spacing': showSpacingPresetsControl,\n\t\t\t\t\t} ) }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t{ ! showSpacingPresetsControl && (\n\t\t\t\t\t\t<BoxControl\n\t\t\t\t\t\t\tvalues={ marginValues }\n\t\t\t\t\t\t\tonChange={ setMarginValues }\n\t\t\t\t\t\t\tlabel={ __( 'Margin' ) }\n\t\t\t\t\t\t\tsides={ marginSides }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\tsplitOnAxis={ isAxialMargin }\n\t\t\t\t\t\t\tonMouseOver={ onMouseOverMargin }\n\t\t\t\t\t\t\tonMouseOut={ onMouseLeaveControls }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showSpacingPresetsControl && (\n\t\t\t\t\t\t<SpacingSizesControl\n\t\t\t\t\t\t\tvalues={ marginValues }\n\t\t\t\t\t\t\tonChange={ setMarginValues }\n\t\t\t\t\t\t\tlabel={ __( 'Margin' ) }\n\t\t\t\t\t\t\tsides={ marginSides }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\tonMouseOver={ onMouseOverMargin }\n\t\t\t\t\t\t\tonMouseOut={ onMouseLeaveControls }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showGapControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ hasGapValue }\n\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\tonDeselect={ resetGapValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.blockGap ?? DEFAULT_CONTROLS.blockGap\n\t\t\t\t\t}\n\t\t\t\t\tclassName={ classnames( {\n\t\t\t\t\t\t'tools-panel-item-spacing': showSpacingPresetsControl,\n\t\t\t\t\t} ) }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t{ ! showSpacingPresetsControl &&\n\t\t\t\t\t\t( isAxialGap ? (\n\t\t\t\t\t\t\t<BoxControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\t\tonChange={ setGapValues }\n\t\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\t\tsides={ gapSides }\n\t\t\t\t\t\t\t\tvalues={ gapValues }\n\t\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\t\tsplitOnAxis={ isAxialGap }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\t\t\t\t__unstableInputWidth=\"80px\"\n\t\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\t\tonChange={ setGapValue }\n\t\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\t\tvalue={ gapValue }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t{ showSpacingPresetsControl && (\n\t\t\t\t\t\t<SpacingSizesControl\n\t\t\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tonChange={ setGapValues }\n\t\t\t\t\t\t\tshowSideInLabel={ false }\n\t\t\t\t\t\t\tsides={ isAxialGap ? gapSides : [ 'top' ] } // Use 'top' as the shorthand property in non-axial configurations.\n\t\t\t\t\t\t\tvalues={ gapValues }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showMinHeightControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ hasMinHeightValue }\n\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\tonDeselect={ resetMinHeightValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.minHeight ?? DEFAULT_CONTROLS.minHeight\n\t\t\t\t\t}\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<HeightControl\n\t\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\t\tvalue={ minHeightValue }\n\t\t\t\t\t\tonChange={ setMinHeightValue }\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showChildLayoutControl && (\n\t\t\t\t<VStack\n\t\t\t\t\tas={ ToolsPanelItem }\n\t\t\t\t\tspacing={ 2 }\n\t\t\t\t\thasValue={ hasChildLayoutValue }\n\t\t\t\t\tlabel={ childLayoutOrientationLabel }\n\t\t\t\t\tonDeselect={ resetChildLayoutValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.childLayout ??\n\t\t\t\t\t\tDEFAULT_CONTROLS.childLayout\n\t\t\t\t\t}\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<ChildLayoutControl\n\t\t\t\t\t\tvalue={ childLayout }\n\t\t\t\t\t\tonChange={ setChildLayout }\n\t\t\t\t\t\tparentLayout={ settings?.parentLayout }\n\t\t\t\t\t/>\n\t\t\t\t</VStack>\n\t\t\t) }\n\t\t</Wrapper>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,wBAAwB,IAAIC,UAAU,EACtCC,4BAA4B,IAAIC,cAAc,EAC9CC,wBAAwB,IAAIC,UAAU,EACtCC,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,yBAAyB,IAAIC,WAAW,EACxCC,4BAA4B,IAAIC,cAAc,EAC9CC,kBAAkB,IAAIC,IAAI,QACpB,uBAAuB;AAC9B,SAASC,IAAI,EAAEC,cAAc,EAAEC,WAAW,QAAQ,kBAAkB;AACpE,SAASC,WAAW,EAAEC,QAAQ,QAAQ,oBAAoB;;AAE1D;AACA;AACA;AACA,SAASC,oBAAoB,EAAEC,6BAA6B,QAAQ,SAAS;AAC7E,OAAOC,mBAAmB,MAAM,0BAA0B;AAC1D,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,kBAAkB,MAAM,yBAAyB;AACxD,SAASC,gBAAgB,QAAQ,mBAAmB;AACpD,SAASC,YAAY,QAAQ,oBAAoB;AAEjD,MAAMC,WAAW,GAAG,CAAE,YAAY,EAAE,UAAU,CAAE;AAEhD,OAAO,SAASC,qBAAqBA,CAAEC,QAAQ,EAAG;EACjD,MAAMC,cAAc,GAAGC,iBAAiB,CAAEF,QAAS,CAAC;EACpD,MAAMG,WAAW,GAAGC,cAAc,CAAEJ,QAAS,CAAC;EAC9C,MAAMK,UAAU,GAAGC,aA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,EAAGa,WAAa;IACrBT,QAAQ,EAAG2F,cAAgB;IAC3BrH,YAAY,EAAG/B,QAAQ,EAAE+B;EAAc,CACvC,CACM,CAED,CAAC;AAEZ"}
|
|
1
|
+
{"version":3,"names":["classnames","__","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","__experimentalBoxControl","BoxControl","__experimentalHStack","HStack","__experimentalVStack","VStack","__experimentalUnitControl","UnitControl","__experimentalUseCustomUnits","useCustomUnits","__experimentalView","View","Icon","positionCenter","stretchWide","useCallback","Platform","getValueFromVariable","TOOLSPANEL_DROPDOWNMENU_PROPS","SpacingSizesControl","HeightControl","ChildLayoutControl","AspectRatioTool","cleanEmptyObject","setImmutably","AXIAL_SIDES","useHasDimensionsPanel","settings","hasContentSize","useHasContentSize","hasWideSize","useHasWideSize","hasPadding","useHasPadding","hasMargin","useHasMargin","hasGap","useHasGap","hasMinHeight","useHasMinHeight","hasAspectRatio","useHasAspectRatio","hasChildLayout","useHasChildLayout","OS","layout","contentSize","wideSize","spacing","padding","margin","blockGap","dimensions","minHeight","aspectRatio","_settings$parentLayou","type","parentLayoutType","default","defaultParentLayoutType","allowSizingOnChildren","parentLayout","support","useHasSpacingPresets","_ref","_ref2","custom","theme","defaultPresets","spacingSizes","presets","length","filterValuesBySides","values","sides","filteredValues","forEach","side","top","bottom","left","right","splitStyleValue","value","splitGapValue","DimensionsToolsPanel","resetAllFilter","onChange","panelId","children","resetAll","updatedValue","createElement","label","dropdownMenuProps","DEFAULT_CONTROLS","childLayout","DimensionsPanel","as","Wrapper","inheritedValue","defaultControls","onVisualize","includeLayoutControls","_settings$parentLayou2","_defaultControls$cont","_defaultControls$wide","_defaultControls$padd","_defaultControls$marg","_defaultControls$bloc","_defaultControls$minH","_defaultControls$aspe","_defaultControls$chil","decodeValue","rawValue","Object","keys","reduce","acc","key","showSpacingPresetsControl","units","availableUnits","showContentSizeControl","contentSizeValue","setContentSizeValue","newValue","undefined","hasUserSetContentSizeValue","resetContentSizeValue","showWideSizeControl","wideSizeValue","setWideSizeValue","hasUserSetWideSizeValue","resetWideSizeValue","showPaddingControl","rawPadding","paddingValues","paddingSides","Array","isArray","isAxialPadding","some","includes","setPaddingValues","newPaddingValues","hasPaddingValue","resetPaddingValue","onMouseOverPadding","showMarginControl","rawMargin","marginValues","marginSides","isAxialMargin","setMarginValues","newMarginValues","hasMarginValue","resetMarginValue","onMouseOverMargin","showGapControl","gapValue","gapValues","gapSides","isAxialGap","setGapValue","newGapValue","setGapValues","nextBoxGapValue","hasOwnProperty","resetGapValue","hasGapValue","showMinHeightControl","minHeightValue","setMinHeightValue","tempValue","resetMinHeightValue","hasMinHeightValue","showAspectRatioControl","aspectRatioValue","setAspectRatioValue","hasAspectRatioValue","showChildLayoutControl","orientation","childLayoutOrientationLabel","setChildLayout","newChildLayout","resetChildLayoutValue","selfStretch","flexSize","hasChildLayoutValue","previousValue","onMouseLeaveControls","className","hasValue","onDeselect","isShownByDefault","alignment","justify","labelPosition","__unstableInputWidth","nextContentSize","icon","nextWideSize","allowReset","splitOnAxis","onMouseOver","onMouseOut","min","showSideInLabel"],"sources":["@wordpress/block-editor/src/components/global-styles/dimensions-panel.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalBoxControl as BoxControl,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalView as View,\n} from '@wordpress/components';\nimport { Icon, positionCenter, stretchWide } from '@wordpress/icons';\nimport { useCallback, Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getValueFromVariable, TOOLSPANEL_DROPDOWNMENU_PROPS } from './utils';\nimport SpacingSizesControl from '../spacing-sizes-control';\nimport HeightControl from '../height-control';\nimport ChildLayoutControl from '../child-layout-control';\nimport AspectRatioTool from '../dimensions-tool/aspect-ratio-tool';\nimport { cleanEmptyObject } from '../../hooks/utils';\nimport { setImmutably } from '../../utils/object';\n\nconst AXIAL_SIDES = [ 'horizontal', 'vertical' ];\n\nexport function useHasDimensionsPanel( settings ) {\n\tconst hasContentSize = useHasContentSize( settings );\n\tconst hasWideSize = useHasWideSize( settings );\n\tconst hasPadding = useHasPadding( settings );\n\tconst hasMargin = useHasMargin( settings );\n\tconst hasGap = useHasGap( settings );\n\tconst hasMinHeight = useHasMinHeight( settings );\n\tconst hasAspectRatio = useHasAspectRatio( settings );\n\tconst hasChildLayout = useHasChildLayout( settings );\n\n\treturn (\n\t\tPlatform.OS === 'web' &&\n\t\t( hasContentSize ||\n\t\t\thasWideSize ||\n\t\t\thasPadding ||\n\t\t\thasMargin ||\n\t\t\thasGap ||\n\t\t\thasMinHeight ||\n\t\t\thasAspectRatio ||\n\t\t\thasChildLayout )\n\t);\n}\n\nfunction useHasContentSize( settings ) {\n\treturn settings?.layout?.contentSize;\n}\n\nfunction useHasWideSize( settings ) {\n\treturn settings?.layout?.wideSize;\n}\n\nfunction useHasPadding( settings ) {\n\treturn settings?.spacing?.padding;\n}\n\nfunction useHasMargin( settings ) {\n\treturn settings?.spacing?.margin;\n}\n\nfunction useHasGap( settings ) {\n\treturn settings?.spacing?.blockGap;\n}\n\nfunction useHasMinHeight( settings ) {\n\treturn settings?.dimensions?.minHeight;\n}\n\nfunction useHasAspectRatio( settings ) {\n\treturn settings?.dimensions?.aspectRatio;\n}\n\nfunction useHasChildLayout( settings ) {\n\tconst {\n\t\ttype: parentLayoutType = 'default',\n\t\tdefault: { type: defaultParentLayoutType = 'default' } = {},\n\t\tallowSizingOnChildren = false,\n\t} = settings?.parentLayout ?? {};\n\n\tconst support =\n\t\t( defaultParentLayoutType === 'flex' || parentLayoutType === 'flex' ) &&\n\t\tallowSizingOnChildren;\n\n\treturn !! settings?.layout && support;\n}\n\nfunction useHasSpacingPresets( settings ) {\n\tconst {\n\t\tcustom,\n\t\ttheme,\n\t\tdefault: defaultPresets,\n\t} = settings?.spacing?.spacingSizes || {};\n\tconst presets = custom ?? theme ?? defaultPresets ?? [];\n\n\treturn presets.length > 0;\n}\n\nfunction filterValuesBySides( values, sides ) {\n\t// If no custom side configuration, all sides are opted into by default.\n\t// Without any values, we have nothing to filter either.\n\tif ( ! sides || ! values ) {\n\t\treturn values;\n\t}\n\n\t// Only include sides opted into within filtered values.\n\tconst filteredValues = {};\n\tsides.forEach( ( side ) => {\n\t\tif ( side === 'vertical' ) {\n\t\t\tfilteredValues.top = values.top;\n\t\t\tfilteredValues.bottom = values.bottom;\n\t\t}\n\t\tif ( side === 'horizontal' ) {\n\t\t\tfilteredValues.left = values.left;\n\t\t\tfilteredValues.right = values.right;\n\t\t}\n\t\tfilteredValues[ side ] = values?.[ side ];\n\t} );\n\n\treturn filteredValues;\n}\n\nfunction splitStyleValue( value ) {\n\t// Check for shorthand value (a string value).\n\tif ( value && typeof value === 'string' ) {\n\t\t// Convert to value for individual sides for BoxControl.\n\t\treturn {\n\t\t\ttop: value,\n\t\t\tright: value,\n\t\t\tbottom: value,\n\t\t\tleft: value,\n\t\t};\n\t}\n\n\treturn value;\n}\n\nfunction splitGapValue( value ) {\n\t// Check for shorthand value (a string value).\n\tif ( value && typeof value === 'string' ) {\n\t\t// If the value is a string, treat it as a single side (top) for the spacing controls.\n\t\treturn {\n\t\t\ttop: value,\n\t\t};\n\t}\n\n\tif ( value ) {\n\t\treturn {\n\t\t\t...value,\n\t\t\tright: value?.left,\n\t\t\tbottom: value?.top,\n\t\t};\n\t}\n\n\treturn value;\n}\n\nfunction DimensionsToolsPanel( {\n\tresetAllFilter,\n\tonChange,\n\tvalue,\n\tpanelId,\n\tchildren,\n} ) {\n\tconst resetAll = () => {\n\t\tconst updatedValue = resetAllFilter( value );\n\t\tonChange( updatedValue );\n\t};\n\n\treturn (\n\t\t<ToolsPanel\n\t\t\tlabel={ __( 'Dimensions' ) }\n\t\t\tresetAll={ resetAll }\n\t\t\tpanelId={ panelId }\n\t\t\tdropdownMenuProps={ TOOLSPANEL_DROPDOWNMENU_PROPS }\n\t\t>\n\t\t\t{ children }\n\t\t</ToolsPanel>\n\t);\n}\n\nconst DEFAULT_CONTROLS = {\n\tcontentSize: true,\n\twideSize: true,\n\tpadding: true,\n\tmargin: true,\n\tblockGap: true,\n\tminHeight: true,\n\taspectRatio: true,\n\tchildLayout: true,\n};\n\nexport default function DimensionsPanel( {\n\tas: Wrapper = DimensionsToolsPanel,\n\tvalue,\n\tonChange,\n\tinheritedValue = value,\n\tsettings,\n\tpanelId,\n\tdefaultControls = DEFAULT_CONTROLS,\n\tonVisualize = () => {},\n\t// Special case because the layout controls are not part of the dimensions panel\n\t// in global styles but not in block inspector.\n\tincludeLayoutControls = false,\n} ) {\n\tconst { dimensions, spacing } = settings;\n\n\tconst decodeValue = ( rawValue ) => {\n\t\tif ( rawValue && typeof rawValue === 'object' ) {\n\t\t\treturn Object.keys( rawValue ).reduce( ( acc, key ) => {\n\t\t\t\tacc[ key ] = getValueFromVariable(\n\t\t\t\t\t{ settings: { dimensions, spacing } },\n\t\t\t\t\t'',\n\t\t\t\t\trawValue[ key ]\n\t\t\t\t);\n\t\t\t\treturn acc;\n\t\t\t}, {} );\n\t\t}\n\t\treturn getValueFromVariable(\n\t\t\t{ settings: { dimensions, spacing } },\n\t\t\t'',\n\t\t\trawValue\n\t\t);\n\t};\n\n\tconst showSpacingPresetsControl = useHasSpacingPresets( settings );\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: settings?.spacing?.units || [\n\t\t\t'%',\n\t\t\t'px',\n\t\t\t'em',\n\t\t\t'rem',\n\t\t\t'vw',\n\t\t],\n\t} );\n\n\t// Content Size\n\tconst showContentSizeControl =\n\t\tuseHasContentSize( settings ) && includeLayoutControls;\n\tconst contentSizeValue = decodeValue( inheritedValue?.layout?.contentSize );\n\tconst setContentSizeValue = ( newValue ) => {\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\tvalue,\n\t\t\t\t[ 'layout', 'contentSize' ],\n\t\t\t\tnewValue || undefined\n\t\t\t)\n\t\t);\n\t};\n\tconst hasUserSetContentSizeValue = () => !! value?.layout?.contentSize;\n\tconst resetContentSizeValue = () => setContentSizeValue( undefined );\n\n\t// Wide Size\n\tconst showWideSizeControl =\n\t\tuseHasWideSize( settings ) && includeLayoutControls;\n\tconst wideSizeValue = decodeValue( inheritedValue?.layout?.wideSize );\n\tconst setWideSizeValue = ( newValue ) => {\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\tvalue,\n\t\t\t\t[ 'layout', 'wideSize' ],\n\t\t\t\tnewValue || undefined\n\t\t\t)\n\t\t);\n\t};\n\tconst hasUserSetWideSizeValue = () => !! value?.layout?.wideSize;\n\tconst resetWideSizeValue = () => setWideSizeValue( undefined );\n\n\t// Padding\n\tconst showPaddingControl = useHasPadding( settings );\n\tconst rawPadding = decodeValue( inheritedValue?.spacing?.padding );\n\tconst paddingValues = splitStyleValue( rawPadding );\n\tconst paddingSides = Array.isArray( settings?.spacing?.padding )\n\t\t? settings?.spacing?.padding\n\t\t: settings?.spacing?.padding?.sides;\n\tconst isAxialPadding =\n\t\tpaddingSides &&\n\t\tpaddingSides.some( ( side ) => AXIAL_SIDES.includes( side ) );\n\tconst setPaddingValues = ( newPaddingValues ) => {\n\t\tconst padding = filterValuesBySides( newPaddingValues, paddingSides );\n\t\tonChange( setImmutably( value, [ 'spacing', 'padding' ], padding ) );\n\t};\n\tconst hasPaddingValue = () =>\n\t\t!! value?.spacing?.padding &&\n\t\tObject.keys( value?.spacing?.padding ).length;\n\tconst resetPaddingValue = () => setPaddingValues( undefined );\n\tconst onMouseOverPadding = () => onVisualize( 'padding' );\n\n\t// Margin\n\tconst showMarginControl = useHasMargin( settings );\n\tconst rawMargin = decodeValue( inheritedValue?.spacing?.margin );\n\tconst marginValues = splitStyleValue( rawMargin );\n\tconst marginSides = Array.isArray( settings?.spacing?.margin )\n\t\t? settings?.spacing?.margin\n\t\t: settings?.spacing?.margin?.sides;\n\tconst isAxialMargin =\n\t\tmarginSides &&\n\t\tmarginSides.some( ( side ) => AXIAL_SIDES.includes( side ) );\n\tconst setMarginValues = ( newMarginValues ) => {\n\t\tconst margin = filterValuesBySides( newMarginValues, marginSides );\n\t\tonChange( setImmutably( value, [ 'spacing', 'margin' ], margin ) );\n\t};\n\tconst hasMarginValue = () =>\n\t\t!! value?.spacing?.margin &&\n\t\tObject.keys( value?.spacing?.margin ).length;\n\tconst resetMarginValue = () => setMarginValues( undefined );\n\tconst onMouseOverMargin = () => onVisualize( 'margin' );\n\n\t// Block Gap\n\tconst showGapControl = useHasGap( settings );\n\tconst gapValue = decodeValue( inheritedValue?.spacing?.blockGap );\n\tconst gapValues = splitGapValue( gapValue );\n\tconst gapSides = Array.isArray( settings?.spacing?.blockGap )\n\t\t? settings?.spacing?.blockGap\n\t\t: settings?.spacing?.blockGap?.sides;\n\tconst isAxialGap =\n\t\tgapSides && gapSides.some( ( side ) => AXIAL_SIDES.includes( side ) );\n\tconst setGapValue = ( newGapValue ) => {\n\t\tonChange(\n\t\t\tsetImmutably( value, [ 'spacing', 'blockGap' ], newGapValue )\n\t\t);\n\t};\n\tconst setGapValues = ( nextBoxGapValue ) => {\n\t\tif ( ! nextBoxGapValue ) {\n\t\t\tsetGapValue( null );\n\t\t}\n\t\t// If axial gap is not enabled, treat the 'top' value as the shorthand gap value.\n\t\tif ( ! isAxialGap && nextBoxGapValue?.hasOwnProperty( 'top' ) ) {\n\t\t\tsetGapValue( nextBoxGapValue.top );\n\t\t} else {\n\t\t\tsetGapValue( {\n\t\t\t\ttop: nextBoxGapValue?.top,\n\t\t\t\tleft: nextBoxGapValue?.left,\n\t\t\t} );\n\t\t}\n\t};\n\tconst resetGapValue = () => setGapValue( undefined );\n\tconst hasGapValue = () => !! value?.spacing?.blockGap;\n\n\t// Min Height\n\tconst showMinHeightControl = useHasMinHeight( settings );\n\tconst minHeightValue = decodeValue( inheritedValue?.dimensions?.minHeight );\n\tconst setMinHeightValue = ( newValue ) => {\n\t\tconst tempValue = setImmutably(\n\t\t\tvalue,\n\t\t\t[ 'dimensions', 'minHeight' ],\n\t\t\tnewValue\n\t\t);\n\t\t// Apply min-height, while removing any applied aspect ratio.\n\t\tonChange(\n\t\t\tsetImmutably(\n\t\t\t\ttempValue,\n\t\t\t\t[ 'dimensions', 'aspectRatio' ],\n\t\t\t\tundefined\n\t\t\t)\n\t\t);\n\t};\n\tconst resetMinHeightValue = () => {\n\t\tsetMinHeightValue( undefined );\n\t};\n\tconst hasMinHeightValue = () => !! value?.dimensions?.minHeight;\n\n\t// Aspect Ratio\n\tconst showAspectRatioControl = useHasAspectRatio( settings );\n\tconst aspectRatioValue = decodeValue(\n\t\tinheritedValue?.dimensions?.aspectRatio\n\t);\n\tconst setAspectRatioValue = ( newValue ) => {\n\t\tconst tempValue = setImmutably(\n\t\t\tvalue,\n\t\t\t[ 'dimensions', 'aspectRatio' ],\n\t\t\tnewValue\n\t\t);\n\t\t// Apply aspect-ratio, while removing any applied min-height.\n\t\tonChange(\n\t\t\tsetImmutably( tempValue, [ 'dimensions', 'minHeight' ], undefined )\n\t\t);\n\t};\n\tconst hasAspectRatioValue = () => !! value?.dimensions?.aspectRatio;\n\n\t// Child Layout\n\tconst showChildLayoutControl = useHasChildLayout( settings );\n\tconst childLayout = inheritedValue?.layout;\n\tconst { orientation = 'horizontal' } = settings?.parentLayout ?? {};\n\tconst childLayoutOrientationLabel =\n\t\torientation === 'horizontal' ? __( 'Width' ) : __( 'Height' );\n\tconst setChildLayout = ( newChildLayout ) => {\n\t\tonChange( {\n\t\t\t...value,\n\t\t\tlayout: {\n\t\t\t\t...value?.layout,\n\t\t\t\t...newChildLayout,\n\t\t\t},\n\t\t} );\n\t};\n\tconst resetChildLayoutValue = () => {\n\t\tsetChildLayout( {\n\t\t\tselfStretch: undefined,\n\t\t\tflexSize: undefined,\n\t\t} );\n\t};\n\tconst hasChildLayoutValue = () => !! value?.layout;\n\n\tconst resetAllFilter = useCallback( ( previousValue ) => {\n\t\treturn {\n\t\t\t...previousValue,\n\t\t\tlayout: cleanEmptyObject( {\n\t\t\t\t...previousValue?.layout,\n\t\t\t\tcontentSize: undefined,\n\t\t\t\twideSize: undefined,\n\t\t\t\tselfStretch: undefined,\n\t\t\t\tflexSize: undefined,\n\t\t\t} ),\n\t\t\tspacing: {\n\t\t\t\t...previousValue?.spacing,\n\t\t\t\tpadding: undefined,\n\t\t\t\tmargin: undefined,\n\t\t\t\tblockGap: undefined,\n\t\t\t},\n\t\t\tdimensions: {\n\t\t\t\t...previousValue?.dimensions,\n\t\t\t\tminHeight: undefined,\n\t\t\t\taspectRatio: undefined,\n\t\t\t},\n\t\t};\n\t}, [] );\n\n\tconst onMouseLeaveControls = () => onVisualize( false );\n\n\treturn (\n\t\t<Wrapper\n\t\t\tresetAllFilter={ resetAllFilter }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tpanelId={ panelId }\n\t\t>\n\t\t\t{ ( showContentSizeControl || showWideSizeControl ) && (\n\t\t\t\t<span className=\"span-columns\">\n\t\t\t\t\t{ __( 'Set the width of the main content area.' ) }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t\t{ showContentSizeControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tclassName=\"single-column\"\n\t\t\t\t\tlabel={ __( 'Content size' ) }\n\t\t\t\t\thasValue={ hasUserSetContentSizeValue }\n\t\t\t\t\tonDeselect={ resetContentSizeValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.contentSize ??\n\t\t\t\t\t\tDEFAULT_CONTROLS.contentSize\n\t\t\t\t\t}\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<HStack alignment=\"flex-end\" justify=\"flex-start\">\n\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\tlabel={ __( 'Content' ) }\n\t\t\t\t\t\t\tlabelPosition=\"top\"\n\t\t\t\t\t\t\t__unstableInputWidth=\"80px\"\n\t\t\t\t\t\t\tvalue={ contentSizeValue || '' }\n\t\t\t\t\t\t\tonChange={ ( nextContentSize ) => {\n\t\t\t\t\t\t\t\tsetContentSizeValue( nextContentSize );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<View>\n\t\t\t\t\t\t\t<Icon icon={ positionCenter } />\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</HStack>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showWideSizeControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tclassName=\"single-column\"\n\t\t\t\t\tlabel={ __( 'Wide size' ) }\n\t\t\t\t\thasValue={ hasUserSetWideSizeValue }\n\t\t\t\t\tonDeselect={ resetWideSizeValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.wideSize ?? DEFAULT_CONTROLS.wideSize\n\t\t\t\t\t}\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<HStack alignment=\"flex-end\" justify=\"flex-start\">\n\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\tlabel={ __( 'Wide' ) }\n\t\t\t\t\t\t\tlabelPosition=\"top\"\n\t\t\t\t\t\t\t__unstableInputWidth=\"80px\"\n\t\t\t\t\t\t\tvalue={ wideSizeValue || '' }\n\t\t\t\t\t\t\tonChange={ ( nextWideSize ) => {\n\t\t\t\t\t\t\t\tsetWideSizeValue( nextWideSize );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<View>\n\t\t\t\t\t\t\t<Icon icon={ stretchWide } />\n\t\t\t\t\t\t</View>\n\t\t\t\t\t</HStack>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showPaddingControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ hasPaddingValue }\n\t\t\t\t\tlabel={ __( 'Padding' ) }\n\t\t\t\t\tonDeselect={ resetPaddingValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.padding ?? DEFAULT_CONTROLS.padding\n\t\t\t\t\t}\n\t\t\t\t\tclassName={ classnames( {\n\t\t\t\t\t\t'tools-panel-item-spacing': showSpacingPresetsControl,\n\t\t\t\t\t} ) }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t{ ! showSpacingPresetsControl && (\n\t\t\t\t\t\t<BoxControl\n\t\t\t\t\t\t\tvalues={ paddingValues }\n\t\t\t\t\t\t\tonChange={ setPaddingValues }\n\t\t\t\t\t\t\tlabel={ __( 'Padding' ) }\n\t\t\t\t\t\t\tsides={ paddingSides }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\tsplitOnAxis={ isAxialPadding }\n\t\t\t\t\t\t\tonMouseOver={ onMouseOverPadding }\n\t\t\t\t\t\t\tonMouseOut={ onMouseLeaveControls }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showSpacingPresetsControl && (\n\t\t\t\t\t\t<SpacingSizesControl\n\t\t\t\t\t\t\tvalues={ paddingValues }\n\t\t\t\t\t\t\tonChange={ setPaddingValues }\n\t\t\t\t\t\t\tlabel={ __( 'Padding' ) }\n\t\t\t\t\t\t\tsides={ paddingSides }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\tonMouseOver={ onMouseOverPadding }\n\t\t\t\t\t\t\tonMouseOut={ onMouseLeaveControls }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showMarginControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ hasMarginValue }\n\t\t\t\t\tlabel={ __( 'Margin' ) }\n\t\t\t\t\tonDeselect={ resetMarginValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.margin ?? DEFAULT_CONTROLS.margin\n\t\t\t\t\t}\n\t\t\t\t\tclassName={ classnames( {\n\t\t\t\t\t\t'tools-panel-item-spacing': showSpacingPresetsControl,\n\t\t\t\t\t} ) }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t{ ! showSpacingPresetsControl && (\n\t\t\t\t\t\t<BoxControl\n\t\t\t\t\t\t\tvalues={ marginValues }\n\t\t\t\t\t\t\tonChange={ setMarginValues }\n\t\t\t\t\t\t\tlabel={ __( 'Margin' ) }\n\t\t\t\t\t\t\tsides={ marginSides }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\tsplitOnAxis={ isAxialMargin }\n\t\t\t\t\t\t\tonMouseOver={ onMouseOverMargin }\n\t\t\t\t\t\t\tonMouseOut={ onMouseLeaveControls }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showSpacingPresetsControl && (\n\t\t\t\t\t\t<SpacingSizesControl\n\t\t\t\t\t\t\tvalues={ marginValues }\n\t\t\t\t\t\t\tonChange={ setMarginValues }\n\t\t\t\t\t\t\tlabel={ __( 'Margin' ) }\n\t\t\t\t\t\t\tsides={ marginSides }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\tonMouseOver={ onMouseOverMargin }\n\t\t\t\t\t\t\tonMouseOut={ onMouseLeaveControls }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showGapControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ hasGapValue }\n\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\tonDeselect={ resetGapValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.blockGap ?? DEFAULT_CONTROLS.blockGap\n\t\t\t\t\t}\n\t\t\t\t\tclassName={ classnames( {\n\t\t\t\t\t\t'tools-panel-item-spacing': showSpacingPresetsControl,\n\t\t\t\t\t} ) }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t{ ! showSpacingPresetsControl &&\n\t\t\t\t\t\t( isAxialGap ? (\n\t\t\t\t\t\t\t<BoxControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\t\tonChange={ setGapValues }\n\t\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\t\tsides={ gapSides }\n\t\t\t\t\t\t\t\tvalues={ gapValues }\n\t\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\t\tsplitOnAxis={ isAxialGap }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\t\t\t\t__unstableInputWidth=\"80px\"\n\t\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\t\tonChange={ setGapValue }\n\t\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\t\tvalue={ gapValue }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t{ showSpacingPresetsControl && (\n\t\t\t\t\t\t<SpacingSizesControl\n\t\t\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tonChange={ setGapValues }\n\t\t\t\t\t\t\tshowSideInLabel={ false }\n\t\t\t\t\t\t\tsides={ isAxialGap ? gapSides : [ 'top' ] } // Use 'top' as the shorthand property in non-axial configurations.\n\t\t\t\t\t\t\tvalues={ gapValues }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showMinHeightControl && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ hasMinHeightValue }\n\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\tonDeselect={ resetMinHeightValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.minHeight ?? DEFAULT_CONTROLS.minHeight\n\t\t\t\t\t}\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t>\n\t\t\t\t\t<HeightControl\n\t\t\t\t\t\tlabel={ __( 'Minimum height' ) }\n\t\t\t\t\t\tvalue={ minHeightValue }\n\t\t\t\t\t\tonChange={ setMinHeightValue }\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ showAspectRatioControl && (\n\t\t\t\t<AspectRatioTool\n\t\t\t\t\thasValue={ hasAspectRatioValue }\n\t\t\t\t\tvalue={ aspectRatioValue }\n\t\t\t\t\tonChange={ setAspectRatioValue }\n\t\t\t\t\tpanelId={ panelId }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.aspectRatio ??\n\t\t\t\t\t\tDEFAULT_CONTROLS.aspectRatio\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ showChildLayoutControl && (\n\t\t\t\t<VStack\n\t\t\t\t\tas={ ToolsPanelItem }\n\t\t\t\t\tspacing={ 2 }\n\t\t\t\t\thasValue={ hasChildLayoutValue }\n\t\t\t\t\tlabel={ childLayoutOrientationLabel }\n\t\t\t\t\tonDeselect={ resetChildLayoutValue }\n\t\t\t\t\tisShownByDefault={\n\t\t\t\t\t\tdefaultControls.childLayout ??\n\t\t\t\t\t\tDEFAULT_CONTROLS.childLayout\n\t\t\t\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