@wordpress/block-editor 15.6.1-next.36001005c.0 → 15.6.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/background-image-control/index.js +2 -2
- package/build/components/background-image-control/index.js.map +2 -2
- package/build/components/block-list/block.js +3 -3
- package/build/components/block-list/block.js.map +2 -2
- package/build/components/block-list/index.js +2 -2
- package/build/components/block-list/index.js.map +1 -1
- package/build/components/block-quick-navigation/index.js +0 -1
- package/build/components/block-quick-navigation/index.js.map +2 -2
- package/build/components/global-styles/border-panel.js +1 -2
- package/build/components/global-styles/border-panel.js.map +2 -2
- package/build/components/global-styles/color-panel.js +1 -2
- package/build/components/global-styles/color-panel.js.map +2 -2
- package/build/components/global-styles/dimensions-panel.js +2 -3
- package/build/components/global-styles/dimensions-panel.js.map +2 -2
- package/build/components/global-styles/filters-panel.js +1 -2
- package/build/components/global-styles/filters-panel.js.map +2 -2
- package/build/components/global-styles/get-block-css-selector.js +78 -0
- package/build/components/global-styles/get-block-css-selector.js.map +7 -0
- package/build/components/global-styles/hooks.js +95 -23
- package/build/components/global-styles/hooks.js.map +2 -2
- package/build/components/global-styles/index.js +14 -0
- package/build/components/global-styles/index.js.map +2 -2
- package/build/components/global-styles/typography-panel.js +19 -3
- package/build/components/global-styles/typography-panel.js.map +2 -2
- package/build/components/global-styles/typography-utils.js +49 -2
- package/build/components/global-styles/typography-utils.js.map +2 -2
- package/build/components/global-styles/use-global-styles-output.js +998 -0
- package/build/components/global-styles/use-global-styles-output.js.map +7 -0
- package/build/components/global-styles/utils.js +377 -0
- package/build/components/global-styles/utils.js.map +2 -2
- package/build/components/rich-text/index.js +8 -7
- package/build/components/rich-text/index.js.map +2 -2
- package/build/hooks/allowed-blocks.js +50 -1
- package/build/hooks/allowed-blocks.js.map +2 -2
- package/build/hooks/block-bindings.js +111 -170
- package/build/hooks/block-bindings.js.map +2 -2
- package/build/hooks/block-style-variation.js +10 -6
- package/build/hooks/block-style-variation.js.map +2 -2
- package/build/hooks/custom-class-name.js +1 -1
- package/build/hooks/custom-class-name.js.map +1 -1
- package/build/hooks/duotone.js +3 -3
- package/build/hooks/duotone.js.map +2 -2
- package/build/hooks/fit-text.js +33 -20
- package/build/hooks/fit-text.js.map +2 -2
- package/build/hooks/font-size.js +6 -5
- package/build/hooks/font-size.js.map +2 -2
- package/build/hooks/metadata.js +48 -2
- package/build/hooks/metadata.js.map +2 -2
- package/build/hooks/typography.js +11 -4
- package/build/hooks/typography.js.map +3 -3
- package/build/hooks/use-typography-props.js +2 -2
- package/build/hooks/use-typography-props.js.map +2 -2
- package/build/store/private-selectors.js +3 -3
- package/build/store/private-selectors.js.map +2 -2
- package/build/store/selectors.js +38 -13
- package/build/store/selectors.js.map +2 -2
- package/build/store/utils.js +2 -1
- package/build/store/utils.js.map +2 -2
- package/build/utils/fit-text-utils.js +4 -4
- package/build/utils/fit-text-utils.js.map +2 -2
- package/build-module/components/background-image-control/index.js +1 -1
- package/build-module/components/background-image-control/index.js.map +2 -2
- package/build-module/components/block-list/block.js +3 -3
- package/build-module/components/block-list/block.js.map +2 -2
- package/build-module/components/block-list/index.js +2 -2
- package/build-module/components/block-list/index.js.map +1 -1
- package/build-module/components/block-quick-navigation/index.js +0 -1
- package/build-module/components/block-quick-navigation/index.js.map +2 -2
- package/build-module/components/global-styles/border-panel.js +1 -2
- package/build-module/components/global-styles/border-panel.js.map +2 -2
- package/build-module/components/global-styles/color-panel.js +1 -2
- package/build-module/components/global-styles/color-panel.js.map +2 -2
- package/build-module/components/global-styles/dimensions-panel.js +1 -2
- package/build-module/components/global-styles/dimensions-panel.js.map +2 -2
- package/build-module/components/global-styles/filters-panel.js +1 -2
- package/build-module/components/global-styles/filters-panel.js.map +2 -2
- package/build-module/components/global-styles/get-block-css-selector.js +54 -0
- package/build-module/components/global-styles/get-block-css-selector.js.map +7 -0
- package/build-module/components/global-styles/hooks.js +95 -27
- package/build-module/components/global-styles/hooks.js.map +2 -2
- package/build-module/components/global-styles/index.js +14 -0
- package/build-module/components/global-styles/index.js.map +2 -2
- package/build-module/components/global-styles/typography-panel.js +19 -3
- package/build-module/components/global-styles/typography-panel.js.map +2 -2
- package/build-module/components/global-styles/typography-utils.js +49 -1
- package/build-module/components/global-styles/typography-utils.js.map +2 -2
- package/build-module/components/global-styles/use-global-styles-output.js +979 -0
- package/build-module/components/global-styles/use-global-styles-output.js.map +7 -0
- package/build-module/components/global-styles/utils.js +364 -0
- package/build-module/components/global-styles/utils.js.map +2 -2
- package/build-module/components/rich-text/index.js +8 -7
- package/build-module/components/rich-text/index.js.map +2 -2
- package/build-module/hooks/allowed-blocks.js +49 -1
- package/build-module/hooks/allowed-blocks.js.map +2 -2
- package/build-module/hooks/block-bindings.js +112 -172
- package/build-module/hooks/block-bindings.js.map +2 -2
- package/build-module/hooks/block-style-variation.js +12 -4
- package/build-module/hooks/block-style-variation.js.map +2 -2
- package/build-module/hooks/custom-class-name.js +1 -1
- package/build-module/hooks/custom-class-name.js.map +1 -1
- package/build-module/hooks/duotone.js +3 -3
- package/build-module/hooks/duotone.js.map +2 -2
- package/build-module/hooks/fit-text.js +34 -21
- package/build-module/hooks/fit-text.js.map +2 -2
- package/build-module/hooks/font-size.js +5 -4
- package/build-module/hooks/font-size.js.map +2 -2
- package/build-module/hooks/metadata.js +46 -1
- package/build-module/hooks/metadata.js.map +2 -2
- package/build-module/hooks/typography.js +11 -4
- package/build-module/hooks/typography.js.map +3 -3
- package/build-module/hooks/use-typography-props.js +1 -1
- package/build-module/hooks/use-typography-props.js.map +2 -2
- package/build-module/store/private-selectors.js +2 -2
- package/build-module/store/private-selectors.js.map +2 -2
- package/build-module/store/selectors.js +39 -14
- package/build-module/store/selectors.js.map +2 -2
- package/build-module/store/utils.js +3 -2
- package/build-module/store/utils.js.map +2 -2
- package/build-module/utils/fit-text-utils.js +4 -4
- package/build-module/utils/fit-text-utils.js.map +2 -2
- package/build-style/style-rtl.css +6 -10
- package/build-style/style.css +6 -10
- package/package.json +35 -36
- package/src/components/background-image-control/index.js +1 -1
- package/src/components/block-card/style.scss +1 -1
- package/src/components/block-list/block.js +1 -1
- package/src/components/block-list/index.js +2 -2
- package/src/components/block-navigation/style.scss +1 -1
- package/src/components/block-quick-navigation/index.js +0 -1
- package/src/components/block-switcher/style.scss +1 -1
- package/src/components/color-palette/test/__snapshots__/control.js.snap +1 -1
- package/src/components/global-styles/border-panel.js +1 -2
- package/src/components/global-styles/color-panel.js +1 -2
- package/src/components/global-styles/color-panel.native.js +1 -1
- package/src/components/global-styles/dimensions-panel.js +1 -2
- package/src/components/global-styles/filters-panel.js +1 -2
- package/src/components/global-styles/get-block-css-selector.js +114 -0
- package/src/components/global-styles/hooks.js +108 -29
- package/src/components/global-styles/index.js +8 -0
- package/src/components/global-styles/test/typography-utils.js +806 -0
- package/src/components/global-styles/test/use-global-styles-output.js +1131 -0
- package/src/components/global-styles/test/utils.js +442 -1
- package/src/components/global-styles/typography-panel.js +27 -3
- package/src/components/global-styles/typography-utils.js +133 -0
- package/src/components/global-styles/use-global-styles-output.js +1487 -0
- package/src/components/global-styles/utils.js +537 -0
- package/src/components/inserter/style.scss +2 -2
- package/src/components/multi-selection-inspector/style.scss +1 -1
- package/src/components/rich-text/index.js +8 -14
- package/src/hooks/allowed-blocks.js +89 -1
- package/src/hooks/block-bindings.js +79 -153
- package/src/hooks/block-style-variation.js +12 -4
- package/src/hooks/custom-class-name.js +1 -1
- package/src/hooks/duotone.js +3 -3
- package/src/hooks/fit-text.js +39 -30
- package/src/hooks/font-size.js +8 -4
- package/src/hooks/metadata.js +89 -0
- package/src/hooks/test/allowed-blocks.js +278 -0
- package/src/hooks/test/metadata.js +316 -0
- package/src/hooks/typography.js +15 -4
- package/src/hooks/use-typography-props.js +1 -1
- package/src/store/private-selectors.js +2 -2
- package/src/store/selectors.js +59 -21
- package/src/store/test/selectors.js +1 -1
- package/src/store/utils.js +2 -1
- package/src/style.scss +0 -1
- package/src/utils/fit-text-utils.js +4 -16
- package/tsconfig.json +0 -1
- package/src/components/block-quick-navigation/style.scss +0 -5
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/global-styles/use-global-styles-output.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\t__EXPERIMENTAL_STYLE_PROPERTY as STYLE_PROPERTY,\n\t__EXPERIMENTAL_ELEMENTS as ELEMENTS,\n\tgetBlockSupport,\n\tgetBlockTypes,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { useContext, useMemo } from '@wordpress/element';\nimport { getCSSRules, getCSSValueFromRawStyle } from '@wordpress/style-engine';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport {\n\tPRESET_METADATA,\n\tROOT_BLOCK_SELECTOR,\n\tROOT_CSS_PROPERTIES_SELECTOR,\n\tscopeSelector,\n\tscopeFeatureSelectors,\n\tappendToSelector,\n\tgetBlockStyleVariationSelector,\n\tgetResolvedValue,\n} from './utils';\nimport { getBlockCSSSelector } from './get-block-css-selector';\nimport { getTypographyFontSizeValue } from './typography-utils';\nimport { GlobalStylesContext } from './context';\nimport { useGlobalSetting } from './hooks';\nimport { getDuotoneFilter } from '../duotone/utils';\nimport { getGapCSSValue } from '../../hooks/gap';\nimport { setBackgroundStyleDefaults } from '../../hooks/background';\nimport { store as blockEditorStore } from '../../store';\nimport { LAYOUT_DEFINITIONS } from '../../layouts/definitions';\nimport { getValueFromObjectPath, setImmutably } from '../../utils/object';\nimport { unlock } from '../../lock-unlock';\n\n// Elements that rely on class names in their selectors.\nconst ELEMENT_CLASS_NAMES = {\n\tbutton: 'wp-element-button',\n\tcaption: 'wp-element-caption',\n};\n\n// List of block support features that can have their related styles\n// generated under their own feature level selector rather than the block's.\nconst BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS = {\n\t__experimentalBorder: 'border',\n\tcolor: 'color',\n\tspacing: 'spacing',\n\ttypography: 'typography',\n};\nconst { kebabCase } = unlock( componentsPrivateApis );\n\n/**\n * Transform given preset tree into a set of style declarations.\n *\n * @param {Object} blockPresets\n * @param {Object} mergedSettings Merged theme.json settings.\n *\n * @return {Array<Object>} An array of style declarations.\n */\nfunction getPresetsDeclarations( blockPresets = {}, mergedSettings ) {\n\treturn PRESET_METADATA.reduce(\n\t\t( declarations, { path, valueKey, valueFunc, cssVarInfix } ) => {\n\t\t\tconst presetByOrigin = getValueFromObjectPath(\n\t\t\t\tblockPresets,\n\t\t\t\tpath,\n\t\t\t\t[]\n\t\t\t);\n\t\t\t[ 'default', 'theme', 'custom' ].forEach( ( origin ) => {\n\t\t\t\tif ( presetByOrigin[ origin ] ) {\n\t\t\t\t\tpresetByOrigin[ origin ].forEach( ( value ) => {\n\t\t\t\t\t\tif ( valueKey && ! valueFunc ) {\n\t\t\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t\t\t`--wp--preset--${ cssVarInfix }--${ kebabCase(\n\t\t\t\t\t\t\t\t\tvalue.slug\n\t\t\t\t\t\t\t\t) }: ${ value[ valueKey ] }`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\tvalueFunc &&\n\t\t\t\t\t\t\ttypeof valueFunc === 'function'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t\t\t`--wp--preset--${ cssVarInfix }--${ kebabCase(\n\t\t\t\t\t\t\t\t\tvalue.slug\n\t\t\t\t\t\t\t\t) }: ${ valueFunc( value, mergedSettings ) }`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\treturn declarations;\n\t\t},\n\t\t[]\n\t);\n}\n\n/**\n * Transform given preset tree into a set of preset class declarations.\n *\n * @param {?string} blockSelector\n * @param {Object} blockPresets\n * @return {string} CSS declarations for the preset classes.\n */\nfunction getPresetsClasses( blockSelector = '*', blockPresets = {} ) {\n\treturn PRESET_METADATA.reduce(\n\t\t( declarations, { path, cssVarInfix, classes } ) => {\n\t\t\tif ( ! classes ) {\n\t\t\t\treturn declarations;\n\t\t\t}\n\n\t\t\tconst presetByOrigin = getValueFromObjectPath(\n\t\t\t\tblockPresets,\n\t\t\t\tpath,\n\t\t\t\t[]\n\t\t\t);\n\t\t\t[ 'default', 'theme', 'custom' ].forEach( ( origin ) => {\n\t\t\t\tif ( presetByOrigin[ origin ] ) {\n\t\t\t\t\tpresetByOrigin[ origin ].forEach( ( { slug } ) => {\n\t\t\t\t\t\tclasses.forEach( ( { classSuffix, propertyName } ) => {\n\t\t\t\t\t\t\tconst classSelectorToUse = `.has-${ kebabCase(\n\t\t\t\t\t\t\t\tslug\n\t\t\t\t\t\t\t) }-${ classSuffix }`;\n\t\t\t\t\t\t\tconst selectorToUse = blockSelector\n\t\t\t\t\t\t\t\t.split( ',' ) // Selector can be \"h1, h2, h3\"\n\t\t\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t\t\t( selector ) =>\n\t\t\t\t\t\t\t\t\t\t`${ selector }${ classSelectorToUse }`\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t.join( ',' );\n\t\t\t\t\t\t\tconst value = `var(--wp--preset--${ cssVarInfix }--${ kebabCase(\n\t\t\t\t\t\t\t\tslug\n\t\t\t\t\t\t\t) })`;\n\t\t\t\t\t\t\tdeclarations += `${ selectorToUse }{${ propertyName }: ${ value } !important;}`;\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\treturn declarations;\n\t\t},\n\t\t''\n\t);\n}\n\nfunction getPresetsSvgFilters( blockPresets = {} ) {\n\treturn PRESET_METADATA.filter(\n\t\t// Duotone are the only type of filters for now.\n\t\t( metadata ) => metadata.path.at( -1 ) === 'duotone'\n\t).flatMap( ( metadata ) => {\n\t\tconst presetByOrigin = getValueFromObjectPath(\n\t\t\tblockPresets,\n\t\t\tmetadata.path,\n\t\t\t{}\n\t\t);\n\t\treturn [ 'default', 'theme' ]\n\t\t\t.filter( ( origin ) => presetByOrigin[ origin ] )\n\t\t\t.flatMap( ( origin ) =>\n\t\t\t\tpresetByOrigin[ origin ].map( ( preset ) =>\n\t\t\t\t\tgetDuotoneFilter(\n\t\t\t\t\t\t`wp-duotone-${ preset.slug }`,\n\t\t\t\t\t\tpreset.colors\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t\t.join( '' );\n\t} );\n}\n\nfunction flattenTree( input = {}, prefix, token ) {\n\tlet result = [];\n\tObject.keys( input ).forEach( ( key ) => {\n\t\tconst newKey = prefix + kebabCase( key.replace( '/', '-' ) );\n\t\tconst newLeaf = input[ key ];\n\n\t\tif ( newLeaf instanceof Object ) {\n\t\t\tconst newPrefix = newKey + token;\n\t\t\tresult = [ ...result, ...flattenTree( newLeaf, newPrefix, token ) ];\n\t\t} else {\n\t\t\tresult.push( `${ newKey }: ${ newLeaf }` );\n\t\t}\n\t} );\n\treturn result;\n}\n\n/**\n * Gets variation selector string from feature selector.\n *\n * @param {string} featureSelector The feature selector.\n *\n * @param {string} styleVariationSelector The style variation selector.\n * @return {string} Combined selector string.\n */\nfunction concatFeatureVariationSelectorString(\n\tfeatureSelector,\n\tstyleVariationSelector\n) {\n\tconst featureSelectors = featureSelector.split( ',' );\n\tconst combinedSelectors = [];\n\tfeatureSelectors.forEach( ( selector ) => {\n\t\tcombinedSelectors.push(\n\t\t\t`${ styleVariationSelector.trim() }${ selector.trim() }`\n\t\t);\n\t} );\n\treturn combinedSelectors.join( ', ' );\n}\n\n/**\n * Generate style declarations for a block's custom feature and subfeature\n * selectors.\n *\n * NOTE: The passed `styles` object will be mutated by this function.\n *\n * @param {Object} selectors Custom selectors object for a block.\n * @param {Object} styles A block's styles object.\n *\n * @return {Object} Style declarations.\n */\nconst getFeatureDeclarations = ( selectors, styles ) => {\n\tconst declarations = {};\n\n\tObject.entries( selectors ).forEach( ( [ feature, selector ] ) => {\n\t\t// We're only processing features/subfeatures that have styles.\n\t\tif ( feature === 'root' || ! styles?.[ feature ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isShorthand = typeof selector === 'string';\n\n\t\t// If we have a selector object instead of shorthand process it.\n\t\tif ( ! isShorthand ) {\n\t\t\tObject.entries( selector ).forEach(\n\t\t\t\t( [ subfeature, subfeatureSelector ] ) => {\n\t\t\t\t\t// Don't process root feature selector yet or any\n\t\t\t\t\t// subfeature that doesn't have a style.\n\t\t\t\t\tif (\n\t\t\t\t\t\tsubfeature === 'root' ||\n\t\t\t\t\t\t! styles?.[ feature ][ subfeature ]\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Create a temporary styles object and build\n\t\t\t\t\t// declarations for subfeature.\n\t\t\t\t\tconst subfeatureStyles = {\n\t\t\t\t\t\t[ feature ]: {\n\t\t\t\t\t\t\t[ subfeature ]: styles[ feature ][ subfeature ],\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t\tconst newDeclarations =\n\t\t\t\t\t\tgetStylesDeclarations( subfeatureStyles );\n\n\t\t\t\t\t// Merge new declarations in with any others that\n\t\t\t\t\t// share the same selector.\n\t\t\t\t\tdeclarations[ subfeatureSelector ] = [\n\t\t\t\t\t\t...( declarations[ subfeatureSelector ] || [] ),\n\t\t\t\t\t\t...newDeclarations,\n\t\t\t\t\t];\n\n\t\t\t\t\t// Remove the subfeature's style now it will be\n\t\t\t\t\t// included under its own selector not the block's.\n\t\t\t\t\tdelete styles[ feature ][ subfeature ];\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\t// Now subfeatures have been processed and removed, we can\n\t\t// process root, or shorthand, feature selectors.\n\t\tif ( isShorthand || selector.root ) {\n\t\t\tconst featureSelector = isShorthand ? selector : selector.root;\n\n\t\t\t// Create temporary style object and build declarations for feature.\n\t\t\tconst featureStyles = { [ feature ]: styles[ feature ] };\n\t\t\tconst newDeclarations = getStylesDeclarations( featureStyles );\n\n\t\t\t// Merge new declarations with any others that share the selector.\n\t\t\tdeclarations[ featureSelector ] = [\n\t\t\t\t...( declarations[ featureSelector ] || [] ),\n\t\t\t\t...newDeclarations,\n\t\t\t];\n\n\t\t\t// Remove the feature from the block's styles now as it will be\n\t\t\t// included under its own selector not the block's.\n\t\t\tdelete styles[ feature ];\n\t\t}\n\t} );\n\n\treturn declarations;\n};\n\n/**\n * Transform given style tree into a set of style declarations.\n *\n * @param {Object} blockStyles Block styles.\n *\n * @param {string} selector The selector these declarations should attach to.\n *\n * @param {boolean} useRootPaddingAlign Whether to use CSS custom properties in root selector.\n *\n * @param {Object} tree A theme.json tree containing layout definitions.\n *\n * @param {boolean} disableRootPadding Whether to force disable the root padding styles.\n * @return {Array} An array of style declarations.\n */\nexport function getStylesDeclarations(\n\tblockStyles = {},\n\tselector = '',\n\tuseRootPaddingAlign,\n\ttree = {},\n\tdisableRootPadding = false\n) {\n\tconst isRoot = ROOT_BLOCK_SELECTOR === selector;\n\tconst output = Object.entries( STYLE_PROPERTY ).reduce(\n\t\t(\n\t\t\tdeclarations,\n\t\t\t[ key, { value, properties, useEngine, rootOnly } ]\n\t\t) => {\n\t\t\tif ( rootOnly && ! isRoot ) {\n\t\t\t\treturn declarations;\n\t\t\t}\n\t\t\tconst pathToValue = value;\n\t\t\tif ( pathToValue[ 0 ] === 'elements' || useEngine ) {\n\t\t\t\treturn declarations;\n\t\t\t}\n\n\t\t\tconst styleValue = getValueFromObjectPath(\n\t\t\t\tblockStyles,\n\t\t\t\tpathToValue\n\t\t\t);\n\n\t\t\t// Root-level padding styles don't currently support strings with CSS shorthand values.\n\t\t\t// This may change: https://github.com/WordPress/gutenberg/issues/40132.\n\t\t\tif (\n\t\t\t\tkey === '--wp--style--root--padding' &&\n\t\t\t\t( typeof styleValue === 'string' || ! useRootPaddingAlign )\n\t\t\t) {\n\t\t\t\treturn declarations;\n\t\t\t}\n\n\t\t\tif ( properties && typeof styleValue !== 'string' ) {\n\t\t\t\tObject.entries( properties ).forEach( ( entry ) => {\n\t\t\t\t\tconst [ name, prop ] = entry;\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! getValueFromObjectPath( styleValue, [ prop ], false )\n\t\t\t\t\t) {\n\t\t\t\t\t\t// Do not create a declaration\n\t\t\t\t\t\t// for sub-properties that don't have any value.\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst cssProperty = name.startsWith( '--' )\n\t\t\t\t\t\t? name\n\t\t\t\t\t\t: kebabCase( name );\n\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t`${ cssProperty }: ${ getCSSValueFromRawStyle(\n\t\t\t\t\t\t\tgetValueFromObjectPath( styleValue, [ prop ] )\n\t\t\t\t\t\t) }`\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t} else if (\n\t\t\t\tgetValueFromObjectPath( blockStyles, pathToValue, false )\n\t\t\t) {\n\t\t\t\tconst cssProperty = key.startsWith( '--' )\n\t\t\t\t\t? key\n\t\t\t\t\t: kebabCase( key );\n\t\t\t\tdeclarations.push(\n\t\t\t\t\t`${ cssProperty }: ${ getCSSValueFromRawStyle(\n\t\t\t\t\t\tgetValueFromObjectPath( blockStyles, pathToValue )\n\t\t\t\t\t) }`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn declarations;\n\t\t},\n\t\t[]\n\t);\n\n\t/*\n\t * Preprocess background image values.\n\t *\n\t * Note: As we absorb more and more styles into the engine, we could simplify this function.\n\t * A refactor is for the style engine to handle ref resolution (and possibly defaults)\n\t * via a public util used internally and externally. Theme.json tree and defaults could be passed\n\t * as options.\n\t */\n\tif ( !! blockStyles.background ) {\n\t\t/*\n\t\t * Resolve dynamic values before they are compiled by the style engine,\n\t\t * which doesn't (yet) resolve dynamic values.\n\t\t */\n\t\tif ( blockStyles.background?.backgroundImage ) {\n\t\t\tblockStyles.background.backgroundImage = getResolvedValue(\n\t\t\t\tblockStyles.background.backgroundImage,\n\t\t\t\ttree\n\t\t\t);\n\t\t}\n\n\t\t/*\n\t\t * Set default values for block background styles.\n\t\t * Top-level styles are an exception as they are applied to the body.\n\t\t */\n\t\tif ( ! isRoot && !! blockStyles.background?.backgroundImage?.id ) {\n\t\t\tblockStyles = {\n\t\t\t\t...blockStyles,\n\t\t\t\tbackground: {\n\t\t\t\t\t...blockStyles.background,\n\t\t\t\t\t...setBackgroundStyleDefaults( blockStyles.background ),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t}\n\n\tconst extraRules = getCSSRules( blockStyles );\n\textraRules.forEach( ( rule ) => {\n\t\t// Don't output padding properties if padding variables are set or if we're not editing a full template.\n\t\tif (\n\t\t\tisRoot &&\n\t\t\t( useRootPaddingAlign || disableRootPadding ) &&\n\t\t\trule.key.startsWith( 'padding' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst cssProperty = rule.key.startsWith( '--' )\n\t\t\t? rule.key\n\t\t\t: kebabCase( rule.key );\n\n\t\tlet ruleValue = getResolvedValue( rule.value, tree, null );\n\n\t\t// Calculate fluid typography rules where available.\n\t\tif ( cssProperty === 'font-size' ) {\n\t\t\t/*\n\t\t\t * getTypographyFontSizeValue() will check\n\t\t\t * if fluid typography has been activated and also\n\t\t\t * whether the incoming value can be converted to a fluid value.\n\t\t\t * Values that already have a \"clamp()\" function will not pass the test,\n\t\t\t * and therefore the original $value will be returned.\n\t\t\t */\n\t\t\truleValue = getTypographyFontSizeValue(\n\t\t\t\t{ size: ruleValue },\n\t\t\t\ttree?.settings\n\t\t\t);\n\t\t}\n\n\t\t// For aspect ratio to work, other dimensions rules (and Cover block defaults) must be unset.\n\t\t// This ensures that a fixed height does not override the aspect ratio.\n\t\tif ( cssProperty === 'aspect-ratio' ) {\n\t\t\toutput.push( 'min-height: unset' );\n\t\t}\n\n\t\toutput.push( `${ cssProperty }: ${ ruleValue }` );\n\t} );\n\n\treturn output;\n}\n\n/**\n * Get generated CSS for layout styles by looking up layout definitions provided\n * in theme.json, and outputting common layout styles, and specific blockGap values.\n *\n * @param {Object} props\n * @param {Object} props.layoutDefinitions Layout definitions, keyed by layout type.\n * @param {Object} props.style A style object containing spacing values.\n * @param {string} props.selector Selector used to group together layout styling rules.\n * @param {boolean} props.hasBlockGapSupport Whether or not the theme opts-in to blockGap support.\n * @param {boolean} props.hasFallbackGapSupport Whether or not the theme allows fallback gap styles.\n * @param {?string} props.fallbackGapValue An optional fallback gap value if no real gap value is available.\n * @return {string} Generated CSS rules for the layout styles.\n */\nexport function getLayoutStyles( {\n\tlayoutDefinitions = LAYOUT_DEFINITIONS,\n\tstyle,\n\tselector,\n\thasBlockGapSupport,\n\thasFallbackGapSupport,\n\tfallbackGapValue,\n} ) {\n\tlet ruleset = '';\n\tlet gapValue = hasBlockGapSupport\n\t\t? getGapCSSValue( style?.spacing?.blockGap )\n\t\t: '';\n\n\t// Ensure a fallback gap value for the root layout definitions,\n\t// and use a fallback value if one is provided for the current block.\n\tif ( hasFallbackGapSupport ) {\n\t\tif ( selector === ROOT_BLOCK_SELECTOR ) {\n\t\t\tgapValue = ! gapValue ? '0.5em' : gapValue;\n\t\t} else if ( ! hasBlockGapSupport && fallbackGapValue ) {\n\t\t\tgapValue = fallbackGapValue;\n\t\t}\n\t}\n\n\tif ( gapValue && layoutDefinitions ) {\n\t\tObject.values( layoutDefinitions ).forEach(\n\t\t\t( { className, name, spacingStyles } ) => {\n\t\t\t\t// Allow outputting fallback gap styles for flex layout type when block gap support isn't available.\n\t\t\t\tif (\n\t\t\t\t\t! hasBlockGapSupport &&\n\t\t\t\t\t'flex' !== name &&\n\t\t\t\t\t'grid' !== name\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( spacingStyles?.length ) {\n\t\t\t\t\tspacingStyles.forEach( ( spacingStyle ) => {\n\t\t\t\t\t\tconst declarations = [];\n\n\t\t\t\t\t\tif ( spacingStyle.rules ) {\n\t\t\t\t\t\t\tObject.entries( spacingStyle.rules ).forEach(\n\t\t\t\t\t\t\t\t( [ cssProperty, cssValue ] ) => {\n\t\t\t\t\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t\t\t\t\t`${ cssProperty }: ${\n\t\t\t\t\t\t\t\t\t\t\tcssValue ? cssValue : gapValue\n\t\t\t\t\t\t\t\t\t\t}`\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( declarations.length ) {\n\t\t\t\t\t\t\tlet combinedSelector = '';\n\n\t\t\t\t\t\t\tif ( ! hasBlockGapSupport ) {\n\t\t\t\t\t\t\t\t// For fallback gap styles, use lower specificity, to ensure styles do not unintentionally override theme styles.\n\t\t\t\t\t\t\t\tcombinedSelector =\n\t\t\t\t\t\t\t\t\tselector === ROOT_BLOCK_SELECTOR\n\t\t\t\t\t\t\t\t\t\t? `:where(.${ className }${\n\t\t\t\t\t\t\t\t\t\t\t\tspacingStyle?.selector || ''\n\t\t\t\t\t\t\t\t\t\t })`\n\t\t\t\t\t\t\t\t\t\t: `:where(${ selector }.${ className }${\n\t\t\t\t\t\t\t\t\t\t\t\tspacingStyle?.selector || ''\n\t\t\t\t\t\t\t\t\t\t })`;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcombinedSelector =\n\t\t\t\t\t\t\t\t\tselector === ROOT_BLOCK_SELECTOR\n\t\t\t\t\t\t\t\t\t\t? `:root :where(.${ className })${\n\t\t\t\t\t\t\t\t\t\t\t\tspacingStyle?.selector || ''\n\t\t\t\t\t\t\t\t\t\t }`\n\t\t\t\t\t\t\t\t\t\t: `:root :where(${ selector }-${ className })${\n\t\t\t\t\t\t\t\t\t\t\t\tspacingStyle?.selector || ''\n\t\t\t\t\t\t\t\t\t\t }`;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\truleset += `${ combinedSelector } { ${ declarations.join(\n\t\t\t\t\t\t\t\t'; '\n\t\t\t\t\t\t\t) }; }`;\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t\t// For backwards compatibility, ensure the legacy block gap CSS variable is still available.\n\t\tif ( selector === ROOT_BLOCK_SELECTOR && hasBlockGapSupport ) {\n\t\t\truleset += `${ ROOT_CSS_PROPERTIES_SELECTOR } { --wp--style--block-gap: ${ gapValue }; }`;\n\t\t}\n\t}\n\n\t// Output base styles\n\tif ( selector === ROOT_BLOCK_SELECTOR && layoutDefinitions ) {\n\t\tconst validDisplayModes = [ 'block', 'flex', 'grid' ];\n\t\tObject.values( layoutDefinitions ).forEach(\n\t\t\t( { className, displayMode, baseStyles } ) => {\n\t\t\t\tif (\n\t\t\t\t\tdisplayMode &&\n\t\t\t\t\tvalidDisplayModes.includes( displayMode )\n\t\t\t\t) {\n\t\t\t\t\truleset += `${ selector } .${ className } { display:${ displayMode }; }`;\n\t\t\t\t}\n\n\t\t\t\tif ( baseStyles?.length ) {\n\t\t\t\t\tbaseStyles.forEach( ( baseStyle ) => {\n\t\t\t\t\t\tconst declarations = [];\n\n\t\t\t\t\t\tif ( baseStyle.rules ) {\n\t\t\t\t\t\t\tObject.entries( baseStyle.rules ).forEach(\n\t\t\t\t\t\t\t\t( [ cssProperty, cssValue ] ) => {\n\t\t\t\t\t\t\t\t\tdeclarations.push(\n\t\t\t\t\t\t\t\t\t\t`${ cssProperty }: ${ cssValue }`\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( declarations.length ) {\n\t\t\t\t\t\t\tconst combinedSelector = `.${ className }${\n\t\t\t\t\t\t\t\tbaseStyle?.selector || ''\n\t\t\t\t\t\t\t}`;\n\t\t\t\t\t\t\truleset += `${ combinedSelector } { ${ declarations.join(\n\t\t\t\t\t\t\t\t'; '\n\t\t\t\t\t\t\t) }; }`;\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\treturn ruleset;\n}\n\nconst STYLE_KEYS = [\n\t'border',\n\t'color',\n\t'dimensions',\n\t'spacing',\n\t'typography',\n\t'filter',\n\t'outline',\n\t'shadow',\n\t'background',\n];\n\nfunction pickStyleKeys( treeToPickFrom ) {\n\tif ( ! treeToPickFrom ) {\n\t\treturn {};\n\t}\n\tconst entries = Object.entries( treeToPickFrom );\n\tconst pickedEntries = entries.filter( ( [ key ] ) =>\n\t\tSTYLE_KEYS.includes( key )\n\t);\n\t// clone the style objects so that `getFeatureDeclarations` can remove consumed keys from it\n\tconst clonedEntries = pickedEntries.map( ( [ key, style ] ) => [\n\t\tkey,\n\t\tJSON.parse( JSON.stringify( style ) ),\n\t] );\n\treturn Object.fromEntries( clonedEntries );\n}\n\nexport const getNodesWithStyles = ( tree, blockSelectors ) => {\n\tconst nodes = [];\n\n\tif ( ! tree?.styles ) {\n\t\treturn nodes;\n\t}\n\n\t// Top-level.\n\tconst styles = pickStyleKeys( tree.styles );\n\tif ( styles ) {\n\t\tnodes.push( {\n\t\t\tstyles,\n\t\t\tselector: ROOT_BLOCK_SELECTOR,\n\t\t\t// Root selector (body) styles should not be wrapped in `:root where()` to keep\n\t\t\t// specificity at (0,0,1) and maintain backwards compatibility.\n\t\t\tskipSelectorWrapper: true,\n\t\t} );\n\t}\n\n\tObject.entries( ELEMENTS ).forEach( ( [ name, selector ] ) => {\n\t\tif ( tree.styles?.elements?.[ name ] ) {\n\t\t\tnodes.push( {\n\t\t\t\tstyles: tree.styles?.elements?.[ name ],\n\t\t\t\tselector,\n\t\t\t\t// Top level elements that don't use a class name should not receive the\n\t\t\t\t// `:root :where()` wrapper to maintain backwards compatibility.\n\t\t\t\tskipSelectorWrapper: ! ELEMENT_CLASS_NAMES[ name ],\n\t\t\t} );\n\t\t}\n\t} );\n\n\t// Iterate over blocks: they can have styles & elements.\n\tObject.entries( tree.styles?.blocks ?? {} ).forEach(\n\t\t( [ blockName, node ] ) => {\n\t\t\tconst blockStyles = pickStyleKeys( node );\n\n\t\t\tif ( node?.variations ) {\n\t\t\t\tconst variations = {};\n\t\t\t\tObject.entries( node.variations ).forEach(\n\t\t\t\t\t( [ variationName, variation ] ) => {\n\t\t\t\t\t\tvariations[ variationName ] =\n\t\t\t\t\t\t\tpickStyleKeys( variation );\n\t\t\t\t\t\tif ( variation?.css ) {\n\t\t\t\t\t\t\tvariations[ variationName ].css = variation.css;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst variationSelector =\n\t\t\t\t\t\t\tblockSelectors[ blockName ]\n\t\t\t\t\t\t\t\t?.styleVariationSelectors?.[ variationName ];\n\n\t\t\t\t\t\t// Process the variation's inner element styles.\n\t\t\t\t\t\t// This comes before the inner block styles so the\n\t\t\t\t\t\t// element styles within the block type styles take\n\t\t\t\t\t\t// precedence over these.\n\t\t\t\t\t\tObject.entries( variation?.elements ?? {} ).forEach(\n\t\t\t\t\t\t\t( [ element, elementStyles ] ) => {\n\t\t\t\t\t\t\t\tif ( elementStyles && ELEMENTS[ element ] ) {\n\t\t\t\t\t\t\t\t\tnodes.push( {\n\t\t\t\t\t\t\t\t\t\tstyles: elementStyles,\n\t\t\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\t\t\tvariationSelector,\n\t\t\t\t\t\t\t\t\t\t\tELEMENTS[ element ]\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// Process the variations inner block type styles.\n\t\t\t\t\t\tObject.entries( variation?.blocks ?? {} ).forEach(\n\t\t\t\t\t\t\t( [\n\t\t\t\t\t\t\t\tvariationBlockName,\n\t\t\t\t\t\t\t\tvariationBlockStyles,\n\t\t\t\t\t\t\t] ) => {\n\t\t\t\t\t\t\t\tconst variationBlockSelector = scopeSelector(\n\t\t\t\t\t\t\t\t\tvariationSelector,\n\t\t\t\t\t\t\t\t\tblockSelectors[ variationBlockName ]\n\t\t\t\t\t\t\t\t\t\t?.selector\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tconst variationDuotoneSelector = scopeSelector(\n\t\t\t\t\t\t\t\t\tvariationSelector,\n\t\t\t\t\t\t\t\t\tblockSelectors[ variationBlockName ]\n\t\t\t\t\t\t\t\t\t\t?.duotoneSelector\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tconst variationFeatureSelectors =\n\t\t\t\t\t\t\t\t\tscopeFeatureSelectors(\n\t\t\t\t\t\t\t\t\t\tvariationSelector,\n\t\t\t\t\t\t\t\t\t\tblockSelectors[ variationBlockName ]\n\t\t\t\t\t\t\t\t\t\t\t?.featureSelectors\n\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tconst variationBlockStyleNodes =\n\t\t\t\t\t\t\t\t\tpickStyleKeys( variationBlockStyles );\n\n\t\t\t\t\t\t\t\tif ( variationBlockStyles?.css ) {\n\t\t\t\t\t\t\t\t\tvariationBlockStyleNodes.css =\n\t\t\t\t\t\t\t\t\t\tvariationBlockStyles.css;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tnodes.push( {\n\t\t\t\t\t\t\t\t\tselector: variationBlockSelector,\n\t\t\t\t\t\t\t\t\tduotoneSelector: variationDuotoneSelector,\n\t\t\t\t\t\t\t\t\tfeatureSelectors: variationFeatureSelectors,\n\t\t\t\t\t\t\t\t\tfallbackGapValue:\n\t\t\t\t\t\t\t\t\t\tblockSelectors[ variationBlockName ]\n\t\t\t\t\t\t\t\t\t\t\t?.fallbackGapValue,\n\t\t\t\t\t\t\t\t\thasLayoutSupport:\n\t\t\t\t\t\t\t\t\t\tblockSelectors[ variationBlockName ]\n\t\t\t\t\t\t\t\t\t\t\t?.hasLayoutSupport,\n\t\t\t\t\t\t\t\t\tstyles: variationBlockStyleNodes,\n\t\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t\t\t// Process element styles for the inner blocks\n\t\t\t\t\t\t\t\t// of the variation.\n\t\t\t\t\t\t\t\tObject.entries(\n\t\t\t\t\t\t\t\t\tvariationBlockStyles.elements ?? {}\n\t\t\t\t\t\t\t\t).forEach(\n\t\t\t\t\t\t\t\t\t( [\n\t\t\t\t\t\t\t\t\t\tvariationBlockElement,\n\t\t\t\t\t\t\t\t\t\tvariationBlockElementStyles,\n\t\t\t\t\t\t\t\t\t] ) => {\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\tvariationBlockElementStyles &&\n\t\t\t\t\t\t\t\t\t\t\tELEMENTS[ variationBlockElement ]\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tnodes.push( {\n\t\t\t\t\t\t\t\t\t\t\t\tstyles: variationBlockElementStyles,\n\t\t\t\t\t\t\t\t\t\t\t\tselector: scopeSelector(\n\t\t\t\t\t\t\t\t\t\t\t\t\tvariationBlockSelector,\n\t\t\t\t\t\t\t\t\t\t\t\t\tELEMENTS[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariationBlockElement\n\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\tblockStyles.variations = variations;\n\t\t\t}\n\n\t\t\tif ( blockSelectors?.[ blockName ]?.selector ) {\n\t\t\t\tnodes.push( {\n\t\t\t\t\tduotoneSelector:\n\t\t\t\t\t\tblockSelectors[ blockName ].duotoneSelector,\n\t\t\t\t\tfallbackGapValue:\n\t\t\t\t\t\tblockSelectors[ blockName ].fallbackGapValue,\n\t\t\t\t\thasLayoutSupport:\n\t\t\t\t\t\tblockSelectors[ blockName ].hasLayoutSupport,\n\t\t\t\t\tselector: blockSelectors[ blockName ].selector,\n\t\t\t\t\tstyles: blockStyles,\n\t\t\t\t\tfeatureSelectors:\n\t\t\t\t\t\tblockSelectors[ blockName ].featureSelectors,\n\t\t\t\t\tstyleVariationSelectors:\n\t\t\t\t\t\tblockSelectors[ blockName ].styleVariationSelectors,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tObject.entries( node?.elements ?? {} ).forEach(\n\t\t\t\t( [ elementName, value ] ) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\tvalue &&\n\t\t\t\t\t\tblockSelectors?.[ blockName ] &&\n\t\t\t\t\t\tELEMENTS[ elementName ]\n\t\t\t\t\t) {\n\t\t\t\t\t\tnodes.push( {\n\t\t\t\t\t\t\tstyles: value,\n\t\t\t\t\t\t\tselector: blockSelectors[ blockName ]?.selector\n\t\t\t\t\t\t\t\t.split( ',' )\n\t\t\t\t\t\t\t\t.map( ( sel ) => {\n\t\t\t\t\t\t\t\t\tconst elementSelectors =\n\t\t\t\t\t\t\t\t\t\tELEMENTS[ elementName ].split( ',' );\n\t\t\t\t\t\t\t\t\treturn elementSelectors.map(\n\t\t\t\t\t\t\t\t\t\t( elementSelector ) =>\n\t\t\t\t\t\t\t\t\t\t\tsel + ' ' + elementSelector\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t.join( ',' ),\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\n\treturn nodes;\n};\n\nexport const getNodesWithSettings = ( tree, blockSelectors ) => {\n\tconst nodes = [];\n\n\tif ( ! tree?.settings ) {\n\t\treturn nodes;\n\t}\n\n\tconst pickPresets = ( treeToPickFrom ) => {\n\t\tlet presets = {};\n\t\tPRESET_METADATA.forEach( ( { path } ) => {\n\t\t\tconst value = getValueFromObjectPath( treeToPickFrom, path, false );\n\t\t\tif ( value !== false ) {\n\t\t\t\tpresets = setImmutably( presets, path, value );\n\t\t\t}\n\t\t} );\n\t\treturn presets;\n\t};\n\n\t// Top-level.\n\tconst presets = pickPresets( tree.settings );\n\tconst custom = tree.settings?.custom;\n\tif ( Object.keys( presets ).length > 0 || custom ) {\n\t\tnodes.push( {\n\t\t\tpresets,\n\t\t\tcustom,\n\t\t\tselector: ROOT_CSS_PROPERTIES_SELECTOR,\n\t\t} );\n\t}\n\n\t// Blocks.\n\tObject.entries( tree.settings?.blocks ?? {} ).forEach(\n\t\t( [ blockName, node ] ) => {\n\t\t\tconst blockPresets = pickPresets( node );\n\t\t\tconst blockCustom = node.custom;\n\t\t\tif ( Object.keys( blockPresets ).length > 0 || blockCustom ) {\n\t\t\t\tnodes.push( {\n\t\t\t\t\tpresets: blockPresets,\n\t\t\t\t\tcustom: blockCustom,\n\t\t\t\t\tselector: blockSelectors[ blockName ]?.selector,\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t);\n\n\treturn nodes;\n};\n\nexport const toCustomProperties = ( tree, blockSelectors ) => {\n\tconst settings = getNodesWithSettings( tree, blockSelectors );\n\tlet ruleset = '';\n\tsettings.forEach( ( { presets, custom, selector } ) => {\n\t\tconst declarations = getPresetsDeclarations( presets, tree?.settings );\n\t\tconst customProps = flattenTree( custom, '--wp--custom--', '--' );\n\t\tif ( customProps.length > 0 ) {\n\t\t\tdeclarations.push( ...customProps );\n\t\t}\n\n\t\tif ( declarations.length > 0 ) {\n\t\t\truleset += `${ selector }{${ declarations.join( ';' ) };}`;\n\t\t}\n\t} );\n\n\treturn ruleset;\n};\n\nexport const toStyles = (\n\ttree,\n\tblockSelectors,\n\thasBlockGapSupport,\n\thasFallbackGapSupport,\n\tdisableLayoutStyles = false,\n\tdisableRootPadding = false,\n\tstyleOptions = undefined\n) => {\n\t// These allow opting out of certain sets of styles.\n\tconst options = {\n\t\tblockGap: true,\n\t\tblockStyles: true,\n\t\tlayoutStyles: true,\n\t\tmarginReset: true,\n\t\tpresets: true,\n\t\trootPadding: true,\n\t\tvariationStyles: false,\n\t\t...styleOptions,\n\t};\n\tconst nodesWithStyles = getNodesWithStyles( tree, blockSelectors );\n\tconst nodesWithSettings = getNodesWithSettings( tree, blockSelectors );\n\tconst useRootPaddingAlign = tree?.settings?.useRootPaddingAwareAlignments;\n\tconst { contentSize, wideSize } = tree?.settings?.layout || {};\n\tconst hasBodyStyles =\n\t\toptions.marginReset || options.rootPadding || options.layoutStyles;\n\n\tlet ruleset = '';\n\n\tif ( options.presets && ( contentSize || wideSize ) ) {\n\t\truleset += `${ ROOT_CSS_PROPERTIES_SELECTOR } {`;\n\t\truleset = contentSize\n\t\t\t? ruleset + ` --wp--style--global--content-size: ${ contentSize };`\n\t\t\t: ruleset;\n\t\truleset = wideSize\n\t\t\t? ruleset + ` --wp--style--global--wide-size: ${ wideSize };`\n\t\t\t: ruleset;\n\t\truleset += '}';\n\t}\n\n\tif ( hasBodyStyles ) {\n\t\t/*\n\t\t * Reset default browser margin on the body element.\n\t\t * This is set on the body selector **before** generating the ruleset\n\t\t * from the `theme.json`. This is to ensure that if the `theme.json` declares\n\t\t * `margin` in its `spacing` declaration for the `body` element then these\n\t\t * user-generated values take precedence in the CSS cascade.\n\t\t * @link https://github.com/WordPress/gutenberg/issues/36147.\n\t\t */\n\t\truleset += ':where(body) {margin: 0;';\n\n\t\t// Root padding styles should be output for full templates, patterns and template parts.\n\t\tif ( options.rootPadding && useRootPaddingAlign ) {\n\t\t\t/*\n\t\t\t * These rules reproduce the ones from https://github.com/WordPress/gutenberg/blob/79103f124925d1f457f627e154f52a56228ed5ad/lib/class-wp-theme-json-gutenberg.php#L2508\n\t\t\t * almost exactly, but for the selectors that target block wrappers in the front end. This code only runs in the editor, so it doesn't need those selectors.\n\t\t\t */\n\t\t\truleset += `padding-right: 0; padding-left: 0; padding-top: var(--wp--style--root--padding-top); padding-bottom: var(--wp--style--root--padding-bottom) }\n\t\t\t\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\t\t\t.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }\n\t\t\t\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }\n\t\t\t\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;\n\t\t\t\t`;\n\t\t}\n\n\t\truleset += '}';\n\t}\n\n\tif ( options.blockStyles ) {\n\t\tnodesWithStyles.forEach(\n\t\t\t( {\n\t\t\t\tselector,\n\t\t\t\tduotoneSelector,\n\t\t\t\tstyles,\n\t\t\t\tfallbackGapValue,\n\t\t\t\thasLayoutSupport,\n\t\t\t\tfeatureSelectors,\n\t\t\t\tstyleVariationSelectors,\n\t\t\t\tskipSelectorWrapper,\n\t\t\t} ) => {\n\t\t\t\t// Process styles for block support features with custom feature level\n\t\t\t\t// CSS selectors set.\n\t\t\t\tif ( featureSelectors ) {\n\t\t\t\t\tconst featureDeclarations = getFeatureDeclarations(\n\t\t\t\t\t\tfeatureSelectors,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t);\n\n\t\t\t\t\tObject.entries( featureDeclarations ).forEach(\n\t\t\t\t\t\t( [ cssSelector, declarations ] ) => {\n\t\t\t\t\t\t\tif ( declarations.length ) {\n\t\t\t\t\t\t\t\tconst rules = declarations.join( ';' );\n\t\t\t\t\t\t\t\truleset += `:root :where(${ cssSelector }){${ rules };}`;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Process duotone styles.\n\t\t\t\tif ( duotoneSelector ) {\n\t\t\t\t\tconst duotoneStyles = {};\n\t\t\t\t\tif ( styles?.filter ) {\n\t\t\t\t\t\tduotoneStyles.filter = styles.filter;\n\t\t\t\t\t\tdelete styles.filter;\n\t\t\t\t\t}\n\t\t\t\t\tconst duotoneDeclarations =\n\t\t\t\t\t\tgetStylesDeclarations( duotoneStyles );\n\t\t\t\t\tif ( duotoneDeclarations.length ) {\n\t\t\t\t\t\truleset += `${ duotoneSelector }{${ duotoneDeclarations.join(\n\t\t\t\t\t\t\t';'\n\t\t\t\t\t\t) };}`;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Process blockGap and layout styles.\n\t\t\t\tif (\n\t\t\t\t\t! disableLayoutStyles &&\n\t\t\t\t\t( ROOT_BLOCK_SELECTOR === selector || hasLayoutSupport )\n\t\t\t\t) {\n\t\t\t\t\truleset += getLayoutStyles( {\n\t\t\t\t\t\tstyle: styles,\n\t\t\t\t\t\tselector,\n\t\t\t\t\t\thasBlockGapSupport,\n\t\t\t\t\t\thasFallbackGapSupport,\n\t\t\t\t\t\tfallbackGapValue,\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\t// Process the remaining block styles (they use either normal block class or __experimentalSelector).\n\t\t\t\tconst styleDeclarations = getStylesDeclarations(\n\t\t\t\t\tstyles,\n\t\t\t\t\tselector,\n\t\t\t\t\tuseRootPaddingAlign,\n\t\t\t\t\ttree,\n\t\t\t\t\tdisableRootPadding\n\t\t\t\t);\n\t\t\t\tif ( styleDeclarations?.length ) {\n\t\t\t\t\tconst generalSelector = skipSelectorWrapper\n\t\t\t\t\t\t? selector\n\t\t\t\t\t\t: `:root :where(${ selector })`;\n\t\t\t\t\truleset += `${ generalSelector }{${ styleDeclarations.join(\n\t\t\t\t\t\t';'\n\t\t\t\t\t) };}`;\n\t\t\t\t}\n\t\t\t\tif ( styles?.css ) {\n\t\t\t\t\truleset += processCSSNesting(\n\t\t\t\t\t\tstyles.css,\n\t\t\t\t\t\t`:root :where(${ selector })`\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ( options.variationStyles && styleVariationSelectors ) {\n\t\t\t\t\tObject.entries( styleVariationSelectors ).forEach(\n\t\t\t\t\t\t( [ styleVariationName, styleVariationSelector ] ) => {\n\t\t\t\t\t\t\tconst styleVariations =\n\t\t\t\t\t\t\t\tstyles?.variations?.[ styleVariationName ];\n\t\t\t\t\t\t\tif ( styleVariations ) {\n\t\t\t\t\t\t\t\t// If the block uses any custom selectors for block support, add those first.\n\t\t\t\t\t\t\t\tif ( featureSelectors ) {\n\t\t\t\t\t\t\t\t\tconst featureDeclarations =\n\t\t\t\t\t\t\t\t\t\tgetFeatureDeclarations(\n\t\t\t\t\t\t\t\t\t\t\tfeatureSelectors,\n\t\t\t\t\t\t\t\t\t\t\tstyleVariations\n\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\tObject.entries(\n\t\t\t\t\t\t\t\t\t\tfeatureDeclarations\n\t\t\t\t\t\t\t\t\t).forEach(\n\t\t\t\t\t\t\t\t\t\t( [ baseSelector, declarations ] ) => {\n\t\t\t\t\t\t\t\t\t\t\tif ( declarations.length ) {\n\t\t\t\t\t\t\t\t\t\t\t\tconst cssSelector =\n\t\t\t\t\t\t\t\t\t\t\t\t\tconcatFeatureVariationSelectorString(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbaseSelector,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstyleVariationSelector\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\tconst rules =\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeclarations.join( ';' );\n\t\t\t\t\t\t\t\t\t\t\t\truleset += `:root :where(${ cssSelector }){${ rules };}`;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Otherwise add regular selectors.\n\t\t\t\t\t\t\t\tconst styleVariationDeclarations =\n\t\t\t\t\t\t\t\t\tgetStylesDeclarations(\n\t\t\t\t\t\t\t\t\t\tstyleVariations,\n\t\t\t\t\t\t\t\t\t\tstyleVariationSelector,\n\t\t\t\t\t\t\t\t\t\tuseRootPaddingAlign,\n\t\t\t\t\t\t\t\t\t\ttree\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tif ( styleVariationDeclarations.length ) {\n\t\t\t\t\t\t\t\t\truleset += `:root :where(${ styleVariationSelector }){${ styleVariationDeclarations.join(\n\t\t\t\t\t\t\t\t\t\t';'\n\t\t\t\t\t\t\t\t\t) };}`;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( styleVariations?.css ) {\n\t\t\t\t\t\t\t\t\truleset += processCSSNesting(\n\t\t\t\t\t\t\t\t\t\tstyleVariations.css,\n\t\t\t\t\t\t\t\t\t\t`:root :where(${ styleVariationSelector })`\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Check for pseudo selector in `styles` and handle separately.\n\t\t\t\tconst pseudoSelectorStyles = Object.entries( styles ).filter(\n\t\t\t\t\t( [ key ] ) => key.startsWith( ':' )\n\t\t\t\t);\n\n\t\t\t\tif ( pseudoSelectorStyles?.length ) {\n\t\t\t\t\tpseudoSelectorStyles.forEach(\n\t\t\t\t\t\t( [ pseudoKey, pseudoStyle ] ) => {\n\t\t\t\t\t\t\tconst pseudoDeclarations =\n\t\t\t\t\t\t\t\tgetStylesDeclarations( pseudoStyle );\n\n\t\t\t\t\t\t\tif ( ! pseudoDeclarations?.length ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// `selector` may be provided in a form\n\t\t\t\t\t\t\t// where block level selectors have sub element\n\t\t\t\t\t\t\t// selectors appended to them as a comma separated\n\t\t\t\t\t\t\t// string.\n\t\t\t\t\t\t\t// e.g. `h1 a,h2 a,h3 a,h4 a,h5 a,h6 a`;\n\t\t\t\t\t\t\t// Split and append pseudo selector to create\n\t\t\t\t\t\t\t// the proper rules to target the elements.\n\t\t\t\t\t\t\tconst _selector = selector\n\t\t\t\t\t\t\t\t.split( ',' )\n\t\t\t\t\t\t\t\t.map( ( sel ) => sel + pseudoKey )\n\t\t\t\t\t\t\t\t.join( ',' );\n\n\t\t\t\t\t\t\t// As pseudo classes such as :hover, :focus etc. have class-level\n\t\t\t\t\t\t\t// specificity, they must use the `:root :where()` wrapper. This.\n\t\t\t\t\t\t\t// caps the specificity at `0-1-0` to allow proper nesting of variations\n\t\t\t\t\t\t\t// and block type element styles.\n\t\t\t\t\t\t\tconst pseudoRule = `:root :where(${ _selector }){${ pseudoDeclarations.join(\n\t\t\t\t\t\t\t\t';'\n\t\t\t\t\t\t\t) };}`;\n\n\t\t\t\t\t\t\truleset += pseudoRule;\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\n\tif ( options.layoutStyles ) {\n\t\t/* Add alignment / layout styles */\n\t\truleset =\n\t\t\truleset +\n\t\t\t'.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }';\n\t\truleset =\n\t\t\truleset +\n\t\t\t'.wp-site-blocks > .alignright { float: right; margin-left: 2em; }';\n\t\truleset =\n\t\t\truleset +\n\t\t\t'.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }';\n\t}\n\n\tif ( options.blockGap && hasBlockGapSupport ) {\n\t\t// Use fallback of `0.5em` just in case, however if there is blockGap support, there should nearly always be a real value.\n\t\tconst gapValue =\n\t\t\tgetGapCSSValue( tree?.styles?.spacing?.blockGap ) || '0.5em';\n\t\truleset =\n\t\t\truleset +\n\t\t\t`:root :where(.wp-site-blocks) > * { margin-block-start: ${ gapValue }; margin-block-end: 0; }`;\n\t\truleset =\n\t\t\truleset +\n\t\t\t':root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }';\n\t\truleset =\n\t\t\truleset +\n\t\t\t':root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }';\n\t}\n\n\tif ( options.presets ) {\n\t\tnodesWithSettings.forEach( ( { selector, presets } ) => {\n\t\t\tif (\n\t\t\t\tROOT_BLOCK_SELECTOR === selector ||\n\t\t\t\tROOT_CSS_PROPERTIES_SELECTOR === selector\n\t\t\t) {\n\t\t\t\t// Do not add extra specificity for top-level classes.\n\t\t\t\tselector = '';\n\t\t\t}\n\n\t\t\tconst classes = getPresetsClasses( selector, presets );\n\t\t\tif ( classes.length > 0 ) {\n\t\t\t\truleset += classes;\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn ruleset;\n};\n\nexport function toSvgFilters( tree, blockSelectors ) {\n\tconst nodesWithSettings = getNodesWithSettings( tree, blockSelectors );\n\treturn nodesWithSettings.flatMap( ( { presets } ) => {\n\t\treturn getPresetsSvgFilters( presets );\n\t} );\n}\n\nconst getSelectorsConfig = ( blockType, rootSelector ) => {\n\tif (\n\t\tblockType?.selectors &&\n\t\tObject.keys( blockType.selectors ).length > 0\n\t) {\n\t\treturn blockType.selectors;\n\t}\n\n\tconst config = { root: rootSelector };\n\tObject.entries( BLOCK_SUPPORT_FEATURE_LEVEL_SELECTORS ).forEach(\n\t\t( [ featureKey, featureName ] ) => {\n\t\t\tconst featureSelector = getBlockCSSSelector(\n\t\t\t\tblockType,\n\t\t\t\tfeatureKey\n\t\t\t);\n\n\t\t\tif ( featureSelector ) {\n\t\t\t\tconfig[ featureName ] = featureSelector;\n\t\t\t}\n\t\t}\n\t);\n\n\treturn config;\n};\n\nexport const getBlockSelectors = (\n\tblockTypes,\n\tgetBlockStyles,\n\tvariationInstanceId\n) => {\n\tconst result = {};\n\tblockTypes.forEach( ( blockType ) => {\n\t\tconst name = blockType.name;\n\t\tconst selector = getBlockCSSSelector( blockType );\n\t\tlet duotoneSelector = getBlockCSSSelector(\n\t\t\tblockType,\n\t\t\t'filter.duotone'\n\t\t);\n\n\t\t// Keep backwards compatibility for support.color.__experimentalDuotone.\n\t\tif ( ! duotoneSelector ) {\n\t\t\tconst rootSelector = getBlockCSSSelector( blockType );\n\t\t\tconst duotoneSupport = getBlockSupport(\n\t\t\t\tblockType,\n\t\t\t\t'color.__experimentalDuotone',\n\t\t\t\tfalse\n\t\t\t);\n\t\t\tduotoneSelector =\n\t\t\t\tduotoneSupport && scopeSelector( rootSelector, duotoneSupport );\n\t\t}\n\n\t\tconst hasLayoutSupport =\n\t\t\t!! blockType?.supports?.layout ||\n\t\t\t!! blockType?.supports?.__experimentalLayout;\n\t\tconst fallbackGapValue =\n\t\t\tblockType?.supports?.spacing?.blockGap?.__experimentalDefault;\n\n\t\tconst blockStyleVariations = getBlockStyles( name );\n\t\tconst styleVariationSelectors = {};\n\t\tblockStyleVariations?.forEach( ( variation ) => {\n\t\t\tconst variationSuffix = variationInstanceId\n\t\t\t\t? `-${ variationInstanceId }`\n\t\t\t\t: '';\n\t\t\tconst variationName = `${ variation.name }${ variationSuffix }`;\n\t\t\tconst styleVariationSelector = getBlockStyleVariationSelector(\n\t\t\t\tvariationName,\n\t\t\t\tselector\n\t\t\t);\n\n\t\t\tstyleVariationSelectors[ variationName ] = styleVariationSelector;\n\t\t} );\n\n\t\t// For each block support feature add any custom selectors.\n\t\tconst featureSelectors = getSelectorsConfig( blockType, selector );\n\n\t\tresult[ name ] = {\n\t\t\tduotoneSelector,\n\t\t\tfallbackGapValue,\n\t\t\tfeatureSelectors: Object.keys( featureSelectors ).length\n\t\t\t\t? featureSelectors\n\t\t\t\t: undefined,\n\t\t\thasLayoutSupport,\n\t\t\tname,\n\t\t\tselector,\n\t\t\tstyleVariationSelectors: blockStyleVariations?.length\n\t\t\t\t? styleVariationSelectors\n\t\t\t\t: undefined,\n\t\t};\n\t} );\n\n\treturn result;\n};\n\n/**\n * If there is a separator block whose color is defined in theme.json via background,\n * update the separator color to the same value by using border color.\n *\n * @param {Object} config Theme.json configuration file object.\n * @return {Object} configTheme.json configuration file object updated.\n */\nfunction updateConfigWithSeparator( config ) {\n\tconst needsSeparatorStyleUpdate =\n\t\tconfig.styles?.blocks?.[ 'core/separator' ] &&\n\t\tconfig.styles?.blocks?.[ 'core/separator' ].color?.background &&\n\t\t! config.styles?.blocks?.[ 'core/separator' ].color?.text &&\n\t\t! config.styles?.blocks?.[ 'core/separator' ].border?.color;\n\tif ( needsSeparatorStyleUpdate ) {\n\t\treturn {\n\t\t\t...config,\n\t\t\tstyles: {\n\t\t\t\t...config.styles,\n\t\t\t\tblocks: {\n\t\t\t\t\t...config.styles.blocks,\n\t\t\t\t\t'core/separator': {\n\t\t\t\t\t\t...config.styles.blocks[ 'core/separator' ],\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t...config.styles.blocks[ 'core/separator' ].color,\n\t\t\t\t\t\t\ttext: config.styles?.blocks[ 'core/separator' ]\n\t\t\t\t\t\t\t\t.color.background,\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 config;\n}\n\nexport function processCSSNesting( css, blockSelector ) {\n\tlet processedCSS = '';\n\n\tif ( ! css || css.trim() === '' ) {\n\t\treturn processedCSS;\n\t}\n\n\t// Split CSS nested rules.\n\tconst parts = css.split( '&' );\n\tparts.forEach( ( part ) => {\n\t\tif ( ! part || part.trim() === '' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isRootCss = ! part.includes( '{' );\n\t\tif ( isRootCss ) {\n\t\t\t// If the part doesn't contain braces, it applies to the root level.\n\t\t\tprocessedCSS += `:root :where(${ blockSelector }){${ part.trim() }}`;\n\t\t} else {\n\t\t\t// If the part contains braces, it's a nested CSS rule.\n\t\t\tconst splitPart = part.replace( '}', '' ).split( '{' );\n\t\t\tif ( splitPart.length !== 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst [ nestedSelector, cssValue ] = splitPart;\n\n\t\t\t// Handle pseudo elements such as ::before, ::after, etc. Regex will also\n\t\t\t// capture any leading combinator such as >, +, or ~, as well as spaces.\n\t\t\t// This allows pseudo elements as descendants e.g. `.parent ::before`.\n\t\t\tconst matches = nestedSelector.match( /([>+~\\s]*::[a-zA-Z-]+)/ );\n\t\t\tconst pseudoPart = matches ? matches[ 1 ] : '';\n\t\t\tconst withoutPseudoElement = matches\n\t\t\t\t? nestedSelector.replace( pseudoPart, '' ).trim()\n\t\t\t\t: nestedSelector.trim();\n\n\t\t\tlet combinedSelector;\n\t\t\tif ( withoutPseudoElement === '' ) {\n\t\t\t\t// Only contained a pseudo element to use the block selector to form\n\t\t\t\t// the final `:root :where()` selector.\n\t\t\t\tcombinedSelector = blockSelector;\n\t\t\t} else {\n\t\t\t\t// If the nested selector is a descendant of the block scope it with the\n\t\t\t\t// block selector. Otherwise append it to the block selector.\n\t\t\t\tcombinedSelector = nestedSelector.startsWith( ' ' )\n\t\t\t\t\t? scopeSelector( blockSelector, withoutPseudoElement )\n\t\t\t\t\t: appendToSelector( blockSelector, withoutPseudoElement );\n\t\t\t}\n\n\t\t\t// Build final rule, re-adding any pseudo element outside the `:where()`\n\t\t\t// to maintain valid CSS selector.\n\t\t\tprocessedCSS += `:root :where(${ combinedSelector })${ pseudoPart }{${ cssValue.trim() }}`;\n\t\t}\n\t} );\n\treturn processedCSS;\n}\n\n/**\n * Returns the global styles output using a global styles configuration.\n * If wishing to generate global styles and settings based on the\n * global styles config loaded in the editor context, use `useGlobalStylesOutput()`.\n * The use case for a custom config is to generate bespoke styles\n * and settings for previews, or other out-of-editor experiences.\n *\n * @param {Object} mergedConfig Global styles configuration.\n * @param {boolean} disableRootPadding Disable root padding styles.\n *\n * @return {Array} Array of stylesheets and settings.\n */\nexport function useGlobalStylesOutputWithConfig(\n\tmergedConfig = {},\n\tdisableRootPadding\n) {\n\tconst [ blockGap ] = useGlobalSetting( 'spacing.blockGap' );\n\tconst hasBlockGapSupport = blockGap !== null;\n\tconst hasFallbackGapSupport = ! hasBlockGapSupport; // This setting isn't useful yet: it exists as a placeholder for a future explicit fallback styles support.\n\tconst disableLayoutStyles = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn !! getSettings().disableLayoutStyles;\n\t} );\n\n\tconst { getBlockStyles } = useSelect( blocksStore );\n\n\treturn useMemo( () => {\n\t\tif ( ! mergedConfig?.styles || ! mergedConfig?.settings ) {\n\t\t\treturn [];\n\t\t}\n\t\tconst updatedConfig = updateConfigWithSeparator( mergedConfig );\n\n\t\tconst blockSelectors = getBlockSelectors(\n\t\t\tgetBlockTypes(),\n\t\t\tgetBlockStyles\n\t\t);\n\n\t\tconst customProperties = toCustomProperties(\n\t\t\tupdatedConfig,\n\t\t\tblockSelectors\n\t\t);\n\n\t\tconst globalStyles = toStyles(\n\t\t\tupdatedConfig,\n\t\t\tblockSelectors,\n\t\t\thasBlockGapSupport,\n\t\t\thasFallbackGapSupport,\n\t\t\tdisableLayoutStyles,\n\t\t\tdisableRootPadding\n\t\t);\n\t\tconst svgs = toSvgFilters( updatedConfig, blockSelectors );\n\n\t\tconst styles = [\n\t\t\t{\n\t\t\t\tcss: customProperties,\n\t\t\t\tisGlobalStyles: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tcss: globalStyles,\n\t\t\t\tisGlobalStyles: true,\n\t\t\t},\n\t\t\t// Load custom CSS in own stylesheet so that any invalid CSS entered in the input won't break all the global styles in the editor.\n\t\t\t{\n\t\t\t\tcss: updatedConfig.styles.css ?? '',\n\t\t\t\tisGlobalStyles: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tassets: svgs,\n\t\t\t\t__unstableType: 'svg',\n\t\t\t\tisGlobalStyles: true,\n\t\t\t},\n\t\t];\n\n\t\t// Loop through the blocks to check if there are custom CSS values.\n\t\t// If there are, get the block selector and push the selector together with\n\t\t// the CSS value to the 'stylesheets' array.\n\t\tgetBlockTypes().forEach( ( blockType ) => {\n\t\t\tif ( updatedConfig.styles.blocks[ blockType.name ]?.css ) {\n\t\t\t\tconst selector = blockSelectors[ blockType.name ].selector;\n\t\t\t\tstyles.push( {\n\t\t\t\t\tcss: processCSSNesting(\n\t\t\t\t\t\tupdatedConfig.styles.blocks[ blockType.name ]?.css,\n\t\t\t\t\t\tselector\n\t\t\t\t\t),\n\t\t\t\t\tisGlobalStyles: true,\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\treturn [ styles, updatedConfig.settings ];\n\t}, [\n\t\thasBlockGapSupport,\n\t\thasFallbackGapSupport,\n\t\tmergedConfig,\n\t\tdisableLayoutStyles,\n\t\tdisableRootPadding,\n\t\tgetBlockStyles,\n\t] );\n}\n\n/**\n * Returns the global styles output based on the current state of global styles config loaded in the editor context.\n *\n * @param {boolean} disableRootPadding Disable root padding styles.\n *\n * @return {Array} Array of stylesheets and settings.\n */\nexport function useGlobalStylesOutput( disableRootPadding = false ) {\n\tconst { merged: mergedConfig } = useContext( GlobalStylesContext );\n\treturn useGlobalStylesOutputWithConfig( mergedConfig, disableRootPadding );\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAMO;AACP,kBAA0B;AAC1B,qBAAoC;AACpC,0BAAqD;AACrD,wBAAqD;AAKrD,mBASO;AACP,oCAAoC;AACpC,8BAA2C;AAC3C,qBAAoC;AACpC,mBAAiC;AACjC,IAAAA,gBAAiC;AACjC,iBAA+B;AAC/B,wBAA2C;AAC3C,mBAA0C;AAC1C,yBAAmC;AACnC,oBAAqD;AACrD,yBAAuB;AAGvB,MAAM,sBAAsB;AAAA,EAC3B,QAAQ;AAAA,EACR,SAAS;AACV;AAIA,MAAM,wCAAwC;AAAA,EAC7C,sBAAsB;AAAA,EACtB,OAAO;AAAA,EACP,SAAS;AAAA,EACT,YAAY;AACb;AACA,MAAM,EAAE,UAAU,QAAI,2BAAQ,kBAAAC,WAAsB;AAUpD,SAAS,uBAAwB,eAAe,CAAC,GAAG,g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SAAO,gCAAiC,cAAc,kBAAmB;AAC1E;",
|
|
6
|
+
"names": ["import_utils", "componentsPrivateApis", "STYLE_PROPERTY", "ELEMENTS", "presets", "blockEditorStore", "blocksStore"]
|
|
7
|
+
}
|
|
@@ -28,13 +28,154 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var utils_exports = {};
|
|
30
30
|
__export(utils_exports, {
|
|
31
|
+
PRESET_METADATA: () => PRESET_METADATA,
|
|
32
|
+
ROOT_BLOCK_SELECTOR: () => ROOT_BLOCK_SELECTOR,
|
|
33
|
+
ROOT_CSS_PROPERTIES_SELECTOR: () => ROOT_CSS_PROPERTIES_SELECTOR,
|
|
34
|
+
STYLE_PATH_TO_CSS_VAR_INFIX: () => STYLE_PATH_TO_CSS_VAR_INFIX,
|
|
35
|
+
STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE: () => STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE,
|
|
36
|
+
appendToSelector: () => appendToSelector,
|
|
31
37
|
areGlobalStyleConfigsEqual: () => areGlobalStyleConfigsEqual,
|
|
38
|
+
getBlockStyleVariationSelector: () => getBlockStyleVariationSelector,
|
|
39
|
+
getPresetVariableFromValue: () => getPresetVariableFromValue,
|
|
40
|
+
getResolvedRefValue: () => getResolvedRefValue,
|
|
41
|
+
getResolvedThemeFilePath: () => getResolvedThemeFilePath,
|
|
42
|
+
getResolvedValue: () => getResolvedValue,
|
|
43
|
+
getValueFromVariable: () => getValueFromVariable,
|
|
44
|
+
scopeFeatureSelectors: () => scopeFeatureSelectors,
|
|
32
45
|
scopeSelector: () => scopeSelector,
|
|
33
46
|
useToolsPanelDropdownMenuProps: () => useToolsPanelDropdownMenuProps
|
|
34
47
|
});
|
|
35
48
|
module.exports = __toCommonJS(utils_exports);
|
|
36
49
|
var import_es6 = __toESM(require("fast-deep-equal/es6"));
|
|
37
50
|
var import_compose = require("@wordpress/compose");
|
|
51
|
+
var import_style_engine = require("@wordpress/style-engine");
|
|
52
|
+
var import_typography_utils = require("./typography-utils");
|
|
53
|
+
var import_object = require("../../utils/object");
|
|
54
|
+
const ROOT_BLOCK_SELECTOR = "body";
|
|
55
|
+
const ROOT_CSS_PROPERTIES_SELECTOR = ":root";
|
|
56
|
+
const PRESET_METADATA = [
|
|
57
|
+
{
|
|
58
|
+
path: ["color", "palette"],
|
|
59
|
+
valueKey: "color",
|
|
60
|
+
cssVarInfix: "color",
|
|
61
|
+
classes: [
|
|
62
|
+
{ classSuffix: "color", propertyName: "color" },
|
|
63
|
+
{
|
|
64
|
+
classSuffix: "background-color",
|
|
65
|
+
propertyName: "background-color"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
classSuffix: "border-color",
|
|
69
|
+
propertyName: "border-color"
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
path: ["color", "gradients"],
|
|
75
|
+
valueKey: "gradient",
|
|
76
|
+
cssVarInfix: "gradient",
|
|
77
|
+
classes: [
|
|
78
|
+
{
|
|
79
|
+
classSuffix: "gradient-background",
|
|
80
|
+
propertyName: "background"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
path: ["color", "duotone"],
|
|
86
|
+
valueKey: "colors",
|
|
87
|
+
cssVarInfix: "duotone",
|
|
88
|
+
valueFunc: ({ slug }) => `url( '#wp-duotone-${slug}' )`,
|
|
89
|
+
classes: []
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
path: ["shadow", "presets"],
|
|
93
|
+
valueKey: "shadow",
|
|
94
|
+
cssVarInfix: "shadow",
|
|
95
|
+
classes: []
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
path: ["typography", "fontSizes"],
|
|
99
|
+
valueFunc: (preset, settings) => (0, import_typography_utils.getTypographyFontSizeValue)(preset, settings),
|
|
100
|
+
valueKey: "size",
|
|
101
|
+
cssVarInfix: "font-size",
|
|
102
|
+
classes: [{ classSuffix: "font-size", propertyName: "font-size" }]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
path: ["typography", "fontFamilies"],
|
|
106
|
+
valueKey: "fontFamily",
|
|
107
|
+
cssVarInfix: "font-family",
|
|
108
|
+
classes: [
|
|
109
|
+
{ classSuffix: "font-family", propertyName: "font-family" }
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
path: ["spacing", "spacingSizes"],
|
|
114
|
+
valueKey: "size",
|
|
115
|
+
cssVarInfix: "spacing",
|
|
116
|
+
classes: []
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
path: ["border", "radiusSizes"],
|
|
120
|
+
valueKey: "size",
|
|
121
|
+
cssVarInfix: "border-radius",
|
|
122
|
+
classes: []
|
|
123
|
+
}
|
|
124
|
+
];
|
|
125
|
+
const STYLE_PATH_TO_CSS_VAR_INFIX = {
|
|
126
|
+
"color.background": "color",
|
|
127
|
+
"color.text": "color",
|
|
128
|
+
"filter.duotone": "duotone",
|
|
129
|
+
"elements.link.color.text": "color",
|
|
130
|
+
"elements.link.:hover.color.text": "color",
|
|
131
|
+
"elements.link.typography.fontFamily": "font-family",
|
|
132
|
+
"elements.link.typography.fontSize": "font-size",
|
|
133
|
+
"elements.button.color.text": "color",
|
|
134
|
+
"elements.button.color.background": "color",
|
|
135
|
+
"elements.caption.color.text": "color",
|
|
136
|
+
"elements.button.typography.fontFamily": "font-family",
|
|
137
|
+
"elements.button.typography.fontSize": "font-size",
|
|
138
|
+
"elements.heading.color": "color",
|
|
139
|
+
"elements.heading.color.background": "color",
|
|
140
|
+
"elements.heading.typography.fontFamily": "font-family",
|
|
141
|
+
"elements.heading.gradient": "gradient",
|
|
142
|
+
"elements.heading.color.gradient": "gradient",
|
|
143
|
+
"elements.h1.color": "color",
|
|
144
|
+
"elements.h1.color.background": "color",
|
|
145
|
+
"elements.h1.typography.fontFamily": "font-family",
|
|
146
|
+
"elements.h1.color.gradient": "gradient",
|
|
147
|
+
"elements.h2.color": "color",
|
|
148
|
+
"elements.h2.color.background": "color",
|
|
149
|
+
"elements.h2.typography.fontFamily": "font-family",
|
|
150
|
+
"elements.h2.color.gradient": "gradient",
|
|
151
|
+
"elements.h3.color": "color",
|
|
152
|
+
"elements.h3.color.background": "color",
|
|
153
|
+
"elements.h3.typography.fontFamily": "font-family",
|
|
154
|
+
"elements.h3.color.gradient": "gradient",
|
|
155
|
+
"elements.h4.color": "color",
|
|
156
|
+
"elements.h4.color.background": "color",
|
|
157
|
+
"elements.h4.typography.fontFamily": "font-family",
|
|
158
|
+
"elements.h4.color.gradient": "gradient",
|
|
159
|
+
"elements.h5.color": "color",
|
|
160
|
+
"elements.h5.color.background": "color",
|
|
161
|
+
"elements.h5.typography.fontFamily": "font-family",
|
|
162
|
+
"elements.h5.color.gradient": "gradient",
|
|
163
|
+
"elements.h6.color": "color",
|
|
164
|
+
"elements.h6.color.background": "color",
|
|
165
|
+
"elements.h6.typography.fontFamily": "font-family",
|
|
166
|
+
"elements.h6.color.gradient": "gradient",
|
|
167
|
+
"color.gradient": "gradient",
|
|
168
|
+
shadow: "shadow",
|
|
169
|
+
"typography.fontSize": "font-size",
|
|
170
|
+
"typography.fontFamily": "font-family"
|
|
171
|
+
};
|
|
172
|
+
const STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE = {
|
|
173
|
+
"color.background": "backgroundColor",
|
|
174
|
+
"color.text": "textColor",
|
|
175
|
+
"color.gradient": "gradient",
|
|
176
|
+
"typography.fontSize": "fontSize",
|
|
177
|
+
"typography.fontFamily": "fontFamily"
|
|
178
|
+
};
|
|
38
179
|
function useToolsPanelDropdownMenuProps() {
|
|
39
180
|
const isMobile = (0, import_compose.useViewportMatch)("medium", "<");
|
|
40
181
|
return !isMobile ? {
|
|
@@ -45,6 +186,143 @@ function useToolsPanelDropdownMenuProps() {
|
|
|
45
186
|
}
|
|
46
187
|
} : {};
|
|
47
188
|
}
|
|
189
|
+
function findInPresetsBy(features, blockName, presetPath, presetProperty, presetValueValue) {
|
|
190
|
+
const orderedPresetsByOrigin = [
|
|
191
|
+
(0, import_object.getValueFromObjectPath)(features, [
|
|
192
|
+
"blocks",
|
|
193
|
+
blockName,
|
|
194
|
+
...presetPath
|
|
195
|
+
]),
|
|
196
|
+
(0, import_object.getValueFromObjectPath)(features, presetPath)
|
|
197
|
+
];
|
|
198
|
+
for (const presetByOrigin of orderedPresetsByOrigin) {
|
|
199
|
+
if (presetByOrigin) {
|
|
200
|
+
const origins = ["custom", "theme", "default"];
|
|
201
|
+
for (const origin of origins) {
|
|
202
|
+
const presets = presetByOrigin[origin];
|
|
203
|
+
if (presets) {
|
|
204
|
+
const presetObject = presets.find(
|
|
205
|
+
(preset) => preset[presetProperty] === presetValueValue
|
|
206
|
+
);
|
|
207
|
+
if (presetObject) {
|
|
208
|
+
if (presetProperty === "slug") {
|
|
209
|
+
return presetObject;
|
|
210
|
+
}
|
|
211
|
+
const highestPresetObjectWithSameSlug = findInPresetsBy(
|
|
212
|
+
features,
|
|
213
|
+
blockName,
|
|
214
|
+
presetPath,
|
|
215
|
+
"slug",
|
|
216
|
+
presetObject.slug
|
|
217
|
+
);
|
|
218
|
+
if (highestPresetObjectWithSameSlug[presetProperty] === presetObject[presetProperty]) {
|
|
219
|
+
return presetObject;
|
|
220
|
+
}
|
|
221
|
+
return void 0;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
function getPresetVariableFromValue(features, blockName, variableStylePath, presetPropertyValue) {
|
|
229
|
+
if (!presetPropertyValue) {
|
|
230
|
+
return presetPropertyValue;
|
|
231
|
+
}
|
|
232
|
+
const cssVarInfix = STYLE_PATH_TO_CSS_VAR_INFIX[variableStylePath];
|
|
233
|
+
const metadata = PRESET_METADATA.find(
|
|
234
|
+
(data) => data.cssVarInfix === cssVarInfix
|
|
235
|
+
);
|
|
236
|
+
if (!metadata) {
|
|
237
|
+
return presetPropertyValue;
|
|
238
|
+
}
|
|
239
|
+
const { valueKey, path } = metadata;
|
|
240
|
+
const presetObject = findInPresetsBy(
|
|
241
|
+
features,
|
|
242
|
+
blockName,
|
|
243
|
+
path,
|
|
244
|
+
valueKey,
|
|
245
|
+
presetPropertyValue
|
|
246
|
+
);
|
|
247
|
+
if (!presetObject) {
|
|
248
|
+
return presetPropertyValue;
|
|
249
|
+
}
|
|
250
|
+
return `var:preset|${cssVarInfix}|${presetObject.slug}`;
|
|
251
|
+
}
|
|
252
|
+
function getValueFromPresetVariable(features, blockName, variable, [presetType, slug]) {
|
|
253
|
+
const metadata = PRESET_METADATA.find(
|
|
254
|
+
(data) => data.cssVarInfix === presetType
|
|
255
|
+
);
|
|
256
|
+
if (!metadata) {
|
|
257
|
+
return variable;
|
|
258
|
+
}
|
|
259
|
+
const presetObject = findInPresetsBy(
|
|
260
|
+
features.settings,
|
|
261
|
+
blockName,
|
|
262
|
+
metadata.path,
|
|
263
|
+
"slug",
|
|
264
|
+
slug
|
|
265
|
+
);
|
|
266
|
+
if (presetObject) {
|
|
267
|
+
const { valueKey } = metadata;
|
|
268
|
+
const result = presetObject[valueKey];
|
|
269
|
+
return getValueFromVariable(features, blockName, result);
|
|
270
|
+
}
|
|
271
|
+
return variable;
|
|
272
|
+
}
|
|
273
|
+
function getValueFromCustomVariable(features, blockName, variable, path) {
|
|
274
|
+
const result = (0, import_object.getValueFromObjectPath)(features.settings, [
|
|
275
|
+
"blocks",
|
|
276
|
+
blockName,
|
|
277
|
+
"custom",
|
|
278
|
+
...path
|
|
279
|
+
]) ?? (0, import_object.getValueFromObjectPath)(features.settings, ["custom", ...path]);
|
|
280
|
+
if (!result) {
|
|
281
|
+
return variable;
|
|
282
|
+
}
|
|
283
|
+
return getValueFromVariable(features, blockName, result);
|
|
284
|
+
}
|
|
285
|
+
function getValueFromVariable(features, blockName, variable) {
|
|
286
|
+
if (!variable || typeof variable !== "string") {
|
|
287
|
+
if (typeof variable?.ref === "string") {
|
|
288
|
+
variable = (0, import_object.getValueFromObjectPath)(features, variable.ref);
|
|
289
|
+
if (!variable || !!variable?.ref) {
|
|
290
|
+
return variable;
|
|
291
|
+
}
|
|
292
|
+
} else {
|
|
293
|
+
return variable;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
const USER_VALUE_PREFIX = "var:";
|
|
297
|
+
const THEME_VALUE_PREFIX = "var(--wp--";
|
|
298
|
+
const THEME_VALUE_SUFFIX = ")";
|
|
299
|
+
let parsedVar;
|
|
300
|
+
if (variable.startsWith(USER_VALUE_PREFIX)) {
|
|
301
|
+
parsedVar = variable.slice(USER_VALUE_PREFIX.length).split("|");
|
|
302
|
+
} else if (variable.startsWith(THEME_VALUE_PREFIX) && variable.endsWith(THEME_VALUE_SUFFIX)) {
|
|
303
|
+
parsedVar = variable.slice(THEME_VALUE_PREFIX.length, -THEME_VALUE_SUFFIX.length).split("--");
|
|
304
|
+
} else {
|
|
305
|
+
return variable;
|
|
306
|
+
}
|
|
307
|
+
const [type, ...path] = parsedVar;
|
|
308
|
+
if (type === "preset") {
|
|
309
|
+
return getValueFromPresetVariable(
|
|
310
|
+
features,
|
|
311
|
+
blockName,
|
|
312
|
+
variable,
|
|
313
|
+
path
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
if (type === "custom") {
|
|
317
|
+
return getValueFromCustomVariable(
|
|
318
|
+
features,
|
|
319
|
+
blockName,
|
|
320
|
+
variable,
|
|
321
|
+
path
|
|
322
|
+
);
|
|
323
|
+
}
|
|
324
|
+
return variable;
|
|
325
|
+
}
|
|
48
326
|
function scopeSelector(scope, selector) {
|
|
49
327
|
if (!scope || !selector) {
|
|
50
328
|
return selector;
|
|
@@ -59,15 +337,114 @@ function scopeSelector(scope, selector) {
|
|
|
59
337
|
});
|
|
60
338
|
return selectorsScoped.join(", ");
|
|
61
339
|
}
|
|
340
|
+
function scopeFeatureSelectors(scope, selectors) {
|
|
341
|
+
if (!scope || !selectors) {
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
const featureSelectors = {};
|
|
345
|
+
Object.entries(selectors).forEach(([feature, selector]) => {
|
|
346
|
+
if (typeof selector === "string") {
|
|
347
|
+
featureSelectors[feature] = scopeSelector(scope, selector);
|
|
348
|
+
}
|
|
349
|
+
if (typeof selector === "object") {
|
|
350
|
+
featureSelectors[feature] = {};
|
|
351
|
+
Object.entries(selector).forEach(
|
|
352
|
+
([subfeature, subfeatureSelector]) => {
|
|
353
|
+
featureSelectors[feature][subfeature] = scopeSelector(
|
|
354
|
+
scope,
|
|
355
|
+
subfeatureSelector
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
return featureSelectors;
|
|
362
|
+
}
|
|
363
|
+
function appendToSelector(selector, toAppend) {
|
|
364
|
+
if (!selector.includes(",")) {
|
|
365
|
+
return selector + toAppend;
|
|
366
|
+
}
|
|
367
|
+
const selectors = selector.split(",");
|
|
368
|
+
const newSelectors = selectors.map((sel) => sel + toAppend);
|
|
369
|
+
return newSelectors.join(",");
|
|
370
|
+
}
|
|
62
371
|
function areGlobalStyleConfigsEqual(original, variation) {
|
|
63
372
|
if (typeof original !== "object" || typeof variation !== "object") {
|
|
64
373
|
return original === variation;
|
|
65
374
|
}
|
|
66
375
|
return (0, import_es6.default)(original?.styles, variation?.styles) && (0, import_es6.default)(original?.settings, variation?.settings);
|
|
67
376
|
}
|
|
377
|
+
function getBlockStyleVariationSelector(variation, blockSelector) {
|
|
378
|
+
const variationClass = `.is-style-${variation}`;
|
|
379
|
+
if (!blockSelector) {
|
|
380
|
+
return variationClass;
|
|
381
|
+
}
|
|
382
|
+
const ancestorRegex = /((?::\([^)]+\))?\s*)([^\s:]+)/;
|
|
383
|
+
const addVariationClass = (_match, group1, group2) => {
|
|
384
|
+
return group1 + group2 + variationClass;
|
|
385
|
+
};
|
|
386
|
+
const result = blockSelector.split(",").map((part) => part.replace(ancestorRegex, addVariationClass));
|
|
387
|
+
return result.join(",");
|
|
388
|
+
}
|
|
389
|
+
function getResolvedThemeFilePath(file, themeFileURIs) {
|
|
390
|
+
if (!file || !themeFileURIs || !Array.isArray(themeFileURIs)) {
|
|
391
|
+
return file;
|
|
392
|
+
}
|
|
393
|
+
const uri = themeFileURIs.find(
|
|
394
|
+
(themeFileUri) => themeFileUri?.name === file
|
|
395
|
+
);
|
|
396
|
+
if (!uri?.href) {
|
|
397
|
+
return file;
|
|
398
|
+
}
|
|
399
|
+
return uri?.href;
|
|
400
|
+
}
|
|
401
|
+
function getResolvedRefValue(ruleValue, tree) {
|
|
402
|
+
if (!ruleValue || !tree) {
|
|
403
|
+
return ruleValue;
|
|
404
|
+
}
|
|
405
|
+
if (typeof ruleValue !== "string" && ruleValue?.ref) {
|
|
406
|
+
const resolvedRuleValue = (0, import_style_engine.getCSSValueFromRawStyle)(
|
|
407
|
+
(0, import_object.getValueFromObjectPath)(tree, ruleValue.ref)
|
|
408
|
+
);
|
|
409
|
+
if (resolvedRuleValue?.ref) {
|
|
410
|
+
return void 0;
|
|
411
|
+
}
|
|
412
|
+
if (resolvedRuleValue === void 0) {
|
|
413
|
+
return ruleValue;
|
|
414
|
+
}
|
|
415
|
+
return resolvedRuleValue;
|
|
416
|
+
}
|
|
417
|
+
return ruleValue;
|
|
418
|
+
}
|
|
419
|
+
function getResolvedValue(ruleValue, tree) {
|
|
420
|
+
if (!ruleValue || !tree) {
|
|
421
|
+
return ruleValue;
|
|
422
|
+
}
|
|
423
|
+
const resolvedValue = getResolvedRefValue(ruleValue, tree);
|
|
424
|
+
if (resolvedValue?.url) {
|
|
425
|
+
resolvedValue.url = getResolvedThemeFilePath(
|
|
426
|
+
resolvedValue.url,
|
|
427
|
+
tree?._links?.["wp:theme-file"]
|
|
428
|
+
);
|
|
429
|
+
}
|
|
430
|
+
return resolvedValue;
|
|
431
|
+
}
|
|
68
432
|
// Annotate the CommonJS export names for ESM import in node:
|
|
69
433
|
0 && (module.exports = {
|
|
434
|
+
PRESET_METADATA,
|
|
435
|
+
ROOT_BLOCK_SELECTOR,
|
|
436
|
+
ROOT_CSS_PROPERTIES_SELECTOR,
|
|
437
|
+
STYLE_PATH_TO_CSS_VAR_INFIX,
|
|
438
|
+
STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE,
|
|
439
|
+
appendToSelector,
|
|
70
440
|
areGlobalStyleConfigsEqual,
|
|
441
|
+
getBlockStyleVariationSelector,
|
|
442
|
+
getPresetVariableFromValue,
|
|
443
|
+
getResolvedRefValue,
|
|
444
|
+
getResolvedThemeFilePath,
|
|
445
|
+
getResolvedValue,
|
|
446
|
+
getValueFromVariable,
|
|
447
|
+
scopeFeatureSelectors,
|
|
71
448
|
scopeSelector,
|
|
72
449
|
useToolsPanelDropdownMenuProps
|
|
73
450
|
});
|