@wordpress/edit-site 6.3.0 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/components/add-new-pattern/index.js +8 -2
- package/build/components/add-new-pattern/index.js.map +1 -1
- package/build/components/add-new-template/index.js +3 -1
- package/build/components/add-new-template/index.js.map +1 -1
- package/build/components/block-editor/use-site-editor-settings.js +1 -82
- package/build/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build/components/global-styles/block-preview-panel.js +14 -5
- package/build/components/global-styles/block-preview-panel.js.map +1 -1
- package/build/components/global-styles/font-families.js +42 -23
- package/build/components/global-styles/font-families.js.map +1 -1
- package/build/components/global-styles/font-library-modal/index.js +4 -4
- package/build/components/global-styles/font-library-modal/index.js.map +1 -1
- package/build/components/global-styles/font-library-modal/installed-fonts.js +58 -10
- package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +39 -0
- package/build/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +1 -0
- package/build/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +39 -0
- package/build/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js.map +1 -0
- package/build/components/global-styles/font-sizes/font-size-preview.js +44 -0
- package/build/components/global-styles/font-sizes/font-size-preview.js.map +1 -0
- package/build/components/global-styles/font-sizes/font-size.js +213 -0
- package/build/components/global-styles/font-sizes/font-size.js.map +1 -0
- package/build/components/global-styles/font-sizes/font-sizes-count.js +50 -0
- package/build/components/global-styles/font-sizes/font-sizes-count.js.map +1 -0
- package/build/components/global-styles/font-sizes/font-sizes.js +163 -0
- package/build/components/global-styles/font-sizes/font-sizes.js.map +1 -0
- package/build/components/global-styles/font-sizes/rename-font-size-dialog.js +67 -0
- package/build/components/global-styles/font-sizes/rename-font-size-dialog.js.map +1 -0
- package/build/components/global-styles/screen-block.js +10 -8
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-style-variations.js +2 -2
- package/build/components/global-styles/screen-style-variations.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +3 -2
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/size-control/index.js +85 -0
- package/build/components/global-styles/size-control/index.js.map +1 -0
- package/build/components/global-styles/style-variations-container.js +3 -0
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/global-styles/ui.js +8 -0
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/variations/variations-color.js.map +1 -1
- package/build/components/global-styles/variations/variations-typography.js +1 -1
- package/build/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build/components/layout/index.js +6 -0
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/router.js +14 -6
- package/build/components/layout/router.js.map +1 -1
- package/build/components/page-patterns/header.js +1 -1
- package/build/components/page-patterns/header.js.map +1 -1
- package/build/components/page-patterns/index.js +23 -11
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/page-templates/index.js +41 -34
- package/build/components/page-templates/index.js.map +1 -1
- package/build/components/post-edit/index.js +105 -0
- package/build/components/post-edit/index.js.map +1 -0
- package/build/components/post-fields/index.js +314 -0
- package/build/components/post-fields/index.js.map +1 -0
- package/build/components/post-list/index.js +281 -0
- package/build/components/post-list/index.js.map +1 -0
- package/build/components/posts-app/router.js +3 -3
- package/build/components/posts-app/router.js.map +1 -1
- package/build/components/sidebar-dataviews/default-views.js +22 -10
- package/build/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build/components/sidebar-dataviews/index.js +40 -1
- package/build/components/sidebar-dataviews/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-global-styles/content.js +64 -0
- package/build/components/sidebar-navigation-screen-global-styles/content.js.map +1 -0
- package/build/components/sidebar-navigation-screen-global-styles/index.js +2 -47
- package/build/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build/hooks/push-changes-to-global-styles/index.js +1 -1
- package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build/index.js +5 -1
- package/build/index.js.map +1 -1
- package/build/store/selectors.js +34 -6
- package/build/store/selectors.js.map +1 -1
- package/build/utils/get-filtered-template-parts.js +64 -0
- package/build/utils/get-filtered-template-parts.js.map +1 -0
- package/build-module/components/add-new-pattern/index.js +8 -2
- package/build-module/components/add-new-pattern/index.js.map +1 -1
- package/build-module/components/add-new-template/index.js +3 -1
- package/build-module/components/add-new-template/index.js.map +1 -1
- package/build-module/components/block-editor/use-site-editor-settings.js +1 -82
- package/build-module/components/block-editor/use-site-editor-settings.js.map +1 -1
- package/build-module/components/global-styles/block-preview-panel.js +14 -5
- package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
- package/build-module/components/global-styles/font-families.js +44 -25
- package/build-module/components/global-styles/font-families.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/index.js +4 -4
- package/build-module/components/global-styles/font-library-modal/index.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js +61 -13
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +32 -0
- package/build-module/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js.map +1 -0
- package/build-module/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +32 -0
- package/build-module/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js.map +1 -0
- package/build-module/components/global-styles/font-sizes/font-size-preview.js +37 -0
- package/build-module/components/global-styles/font-sizes/font-size-preview.js.map +1 -0
- package/build-module/components/global-styles/font-sizes/font-size.js +207 -0
- package/build-module/components/global-styles/font-sizes/font-size.js.map +1 -0
- package/build-module/components/global-styles/font-sizes/font-sizes-count.js +43 -0
- package/build-module/components/global-styles/font-sizes/font-sizes-count.js.map +1 -0
- package/build-module/components/global-styles/font-sizes/font-sizes.js +157 -0
- package/build-module/components/global-styles/font-sizes/font-sizes.js.map +1 -0
- package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js +61 -0
- package/build-module/components/global-styles/font-sizes/rename-font-size-dialog.js.map +1 -0
- package/build-module/components/global-styles/screen-block.js +10 -8
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-style-variations.js +2 -2
- package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +3 -2
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/size-control/index.js +79 -0
- package/build-module/components/global-styles/size-control/index.js.map +1 -0
- package/build-module/components/global-styles/style-variations-container.js +3 -0
- package/build-module/components/global-styles/style-variations-container.js.map +1 -1
- package/build-module/components/global-styles/ui.js +8 -0
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-color.js +1 -1
- package/build-module/components/global-styles/variations/variations-color.js.map +1 -1
- package/build-module/components/global-styles/variations/variations-typography.js +1 -2
- package/build-module/components/global-styles/variations/variations-typography.js.map +1 -1
- package/build-module/components/layout/index.js +6 -0
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/router.js +14 -6
- package/build-module/components/layout/router.js.map +1 -1
- package/build-module/components/page-patterns/header.js +1 -1
- package/build-module/components/page-patterns/header.js.map +1 -1
- package/build-module/components/page-patterns/index.js +23 -11
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/page-templates/index.js +43 -37
- package/build-module/components/page-templates/index.js.map +1 -1
- package/build-module/components/post-edit/index.js +98 -0
- package/build-module/components/post-edit/index.js.map +1 -0
- package/build-module/components/post-fields/index.js +306 -0
- package/build-module/components/post-fields/index.js.map +1 -0
- package/build-module/components/post-list/index.js +275 -0
- package/build-module/components/post-list/index.js.map +1 -0
- package/build-module/components/posts-app/router.js +3 -3
- package/build-module/components/posts-app/router.js.map +1 -1
- package/build-module/components/sidebar-dataviews/default-views.js +21 -9
- package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build-module/components/sidebar-dataviews/index.js +42 -3
- package/build-module/components/sidebar-dataviews/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-global-styles/content.js +57 -0
- package/build-module/components/sidebar-navigation-screen-global-styles/content.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js +2 -47
- package/build-module/components/sidebar-navigation-screen-global-styles/index.js.map +1 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js +1 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build-module/index.js +5 -1
- package/build-module/index.js.map +1 -1
- package/build-module/store/selectors.js +35 -7
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/get-filtered-template-parts.js +57 -0
- package/build-module/utils/get-filtered-template-parts.js.map +1 -0
- package/build-style/posts-rtl.css +581 -503
- package/build-style/posts.css +581 -503
- package/build-style/style-rtl.css +621 -519
- package/build-style/style.css +621 -519
- package/package.json +41 -41
- package/src/components/add-new-pattern/index.js +8 -2
- package/src/components/add-new-template/index.js +4 -1
- package/src/components/add-new-template/style.scss +4 -6
- package/src/components/block-editor/use-site-editor-settings.js +15 -111
- package/src/components/global-styles/block-preview-panel.js +22 -9
- package/src/components/global-styles/font-families.js +66 -31
- package/src/components/global-styles/font-library-modal/index.js +4 -2
- package/src/components/global-styles/font-library-modal/installed-fonts.js +92 -11
- package/src/components/global-styles/font-library-modal/style.scss +9 -0
- package/src/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js +43 -0
- package/src/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js +37 -0
- package/src/components/global-styles/font-sizes/font-size-preview.js +43 -0
- package/src/components/global-styles/font-sizes/font-size.js +250 -0
- package/src/components/global-styles/font-sizes/font-sizes-count.js +40 -0
- package/src/components/global-styles/font-sizes/font-sizes.js +263 -0
- package/src/components/global-styles/font-sizes/rename-font-size-dialog.js +70 -0
- package/src/components/global-styles/screen-block.js +12 -14
- package/src/components/global-styles/screen-style-variations.js +2 -2
- package/src/components/global-styles/screen-typography.js +3 -2
- package/src/components/global-styles/size-control/index.js +86 -0
- package/src/components/global-styles/style-variations-container.js +4 -0
- package/src/components/global-styles/style.scss +13 -3
- package/src/components/global-styles/ui.js +10 -0
- package/src/components/global-styles/variations/variations-color.js +1 -1
- package/src/components/global-styles/variations/variations-typography.js +1 -2
- package/src/components/layout/index.js +11 -0
- package/src/components/layout/router.js +13 -5
- package/src/components/layout/style.scss +26 -8
- package/src/components/page-patterns/header.js +1 -1
- package/src/components/page-patterns/index.js +15 -8
- package/src/components/page-templates/index.js +51 -46
- package/src/components/page-templates/style.scss +5 -3
- package/src/components/post-edit/index.js +96 -0
- package/src/components/post-edit/style.scss +9 -0
- package/src/components/post-fields/index.js +345 -0
- package/src/components/post-list/index.js +326 -0
- package/src/components/{posts-app → post-list}/style.scss +12 -9
- package/src/components/posts-app/router.js +3 -3
- package/src/components/sidebar-dataviews/default-views.js +21 -9
- package/src/components/sidebar-dataviews/index.js +36 -1
- package/src/components/sidebar-navigation-screen-global-styles/content.js +55 -0
- package/src/components/sidebar-navigation-screen-global-styles/index.js +1 -55
- package/src/hooks/push-changes-to-global-styles/index.js +1 -1
- package/src/index.js +7 -1
- package/src/posts.scss +1 -1
- package/src/store/selectors.js +53 -14
- package/src/store/test/selectors.js +1 -26
- package/src/style.scss +2 -1
- package/src/utils/get-filtered-template-parts.js +61 -0
- package/src/utils/test/get-filtered-template-parts.js +127 -0
- package/build/components/global-styles/screen-background.js +0 -36
- package/build/components/global-styles/screen-background.js.map +0 -1
- package/build/components/posts-app/posts-list.js +0 -568
- package/build/components/posts-app/posts-list.js.map +0 -1
- package/build-module/components/global-styles/screen-background.js +0 -30
- package/build-module/components/global-styles/screen-background.js.map +0 -1
- package/build-module/components/posts-app/posts-list.js +0 -560
- package/build-module/components/posts-app/posts-list.js.map +0 -1
- package/src/components/global-styles/screen-background.js +0 -29
- package/src/components/posts-app/posts-list.js +0 -651
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blocks","require","_blockEditor","_element","_data","_coreData","_components","_i18n","_header","_interopRequireDefault","_blockPreviewPanel","_lockUnlock","_subtitle","_variationsPanel","_jsxRuntime","BACKGROUND_BLOCK_DEFAULT_VALUES","backgroundSize","applyFallbackStyle","border","hasColorOrWidth","color","width","style","undefined","applyAllFallbackStyles","hasSplitBorders","top","right","bottom","left","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useHasFiltersPanel","useHasImageSettingsPanel","useGlobalStyle","useHasBackgroundPanel","BackgroundPanel","StylesBackgroundPanel","BorderPanel","StylesBorderPanel","ColorPanel","StylesColorPanel","TypographyPanel","StylesTypographyPanel","DimensionsPanel","StylesDimensionsPanel","FiltersPanel","StylesFiltersPanel","ImageSettingsPanel","AdvancedPanel","StylesAdvancedPanel","unlock","blockEditorPrivateApis","ScreenBlock","name","variation","prefixParts","concat","prefix","join","shouldDecodeEncode","inheritedStyle","setStyle","userSettings","rawSettings","setSettings","settings","blockType","getBlockType","spacing","blockGap","supports","__experimentalSkipSerialization","some","spacingType","dimensions","aspectRatio","blockVariations","useBlockVariations","hasBackgroundPanel","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasFiltersPanel","hasImageSettingsPanel","hasVariationsPanel","length","canEditCSS","useSelect","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","_links","currentBlockStyle","find","s","inheritedStyleWithLayout","useMemo","layout","styleWithLayout","onChangeDimensions","newStyle","updatedStyle","onChangeLightbox","newSetting","lightbox","onChangeBorders","radius","newBorder","updatedBorder","jsxs","Fragment","children","jsx","default","title","label","className","__experimentalVStack","__","VariationsPanel","inheritedValue","value","onChange","includeLayoutControls","defaultValues","defaultControls","background","__experimentalDefaultControls","PanelBody","initialOpen","sprintf","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-block.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tPanelBody,\n\t__experimentalVStack as VStack,\n\t__experimentalHasSplitBorders as hasSplitBorders,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport {\n\tuseBlockVariations,\n\tVariationsPanel,\n} from './variations/variations-panel';\n\n// Initial control values where no block style is set.\nconst BACKGROUND_BLOCK_DEFAULT_VALUES = {\n\tbackgroundSize: 'cover',\n};\n\nfunction applyFallbackStyle( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tconst hasColorOrWidth = border.color || border.width;\n\n\tif ( ! border.style && hasColorOrWidth ) {\n\t\treturn { ...border, style: 'solid' };\n\t}\n\n\tif ( border.style && ! hasColorOrWidth ) {\n\t\treturn undefined;\n\t}\n\n\treturn border;\n}\n\nfunction applyAllFallbackStyles( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tif ( hasSplitBorders( border ) ) {\n\t\treturn {\n\t\t\ttop: applyFallbackStyle( border.top ),\n\t\t\tright: applyFallbackStyle( border.right ),\n\t\t\tbottom: applyFallbackStyle( border.bottom ),\n\t\t\tleft: applyFallbackStyle( border.left ),\n\t\t};\n\t}\n\n\treturn applyFallbackStyle( border );\n}\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n\tuseHasFiltersPanel,\n\tuseHasImageSettingsPanel,\n\tuseGlobalStyle,\n\tuseHasBackgroundPanel,\n\tBackgroundPanel: StylesBackgroundPanel,\n\tBorderPanel: StylesBorderPanel,\n\tColorPanel: StylesColorPanel,\n\tTypographyPanel: StylesTypographyPanel,\n\tDimensionsPanel: StylesDimensionsPanel,\n\tFiltersPanel: StylesFiltersPanel,\n\tImageSettingsPanel,\n\tAdvancedPanel: StylesAdvancedPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenBlock( { name, variation } ) {\n\tlet prefixParts = [];\n\tif ( variation ) {\n\t\tprefixParts = [ 'variations', variation ].concat( prefixParts );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, name, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( prefix, name, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ userSettings ] = useGlobalSetting( '', name, 'user' );\n\tconst [ rawSettings, setSettings ] = useGlobalSetting( '', name );\n\tconst settings = useSettingsForBlockElement( rawSettings, name );\n\tconst blockType = getBlockType( name );\n\n\t// Only allow `blockGap` support if serialization has not been skipped, to be sure global spacing can be applied.\n\tif (\n\t\tsettings?.spacing?.blockGap &&\n\t\tblockType?.supports?.spacing?.blockGap &&\n\t\t( blockType?.supports?.spacing?.__experimentalSkipSerialization ===\n\t\t\ttrue ||\n\t\t\tblockType?.supports?.spacing?.__experimentalSkipSerialization?.some?.(\n\t\t\t\t( spacingType ) => spacingType === 'blockGap'\n\t\t\t) )\n\t) {\n\t\tsettings.spacing.blockGap = false;\n\t}\n\n\t// Only allow `aspectRatio` support if the block is not the grouping block.\n\t// The grouping block allows the user to use Group, Row and Stack variations,\n\t// and it is highly likely that the user will not want to set an aspect ratio\n\t// for all three at once. Until there is the ability to set a different aspect\n\t// ratio for each variation, we disable the aspect ratio controls for the\n\t// grouping block in global styles.\n\tif ( settings?.dimensions?.aspectRatio && name === 'core/group' ) {\n\t\tsettings.dimensions.aspectRatio = false;\n\t}\n\n\tconst blockVariations = useBlockVariations( name );\n\tconst hasBackgroundPanel = useHasBackgroundPanel( settings );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasFiltersPanel = useHasFiltersPanel( settings );\n\tconst hasImageSettingsPanel = useHasImageSettingsPanel(\n\t\tname,\n\t\tuserSettings,\n\t\tsettings\n\t);\n\tconst hasVariationsPanel = !! blockVariations?.length && ! variation;\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst currentBlockStyle = variation\n\t\t? blockVariations.find( ( s ) => s.name === variation )\n\t\t: null;\n\n\t// These intermediary objects are needed because the \"layout\" property is stored\n\t// in settings rather than styles.\n\tconst inheritedStyleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...inheritedStyle,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ inheritedStyle, settings.layout ] );\n\tconst styleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...style,\n\t\t\tlayout: userSettings.layout,\n\t\t};\n\t}, [ style, userSettings.layout ] );\n\tconst onChangeDimensions = ( newStyle ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== userSettings.layout ) {\n\t\t\tsetSettings( {\n\t\t\t\t...userSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeLightbox = ( newSetting ) => {\n\t\t// If the newSetting is undefined, this means that the user has deselected\n\t\t// (reset) the lightbox setting.\n\t\tif ( newSetting === undefined ) {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: undefined,\n\t\t\t} );\n\n\t\t\t// Otherwise, we simply set the lightbox setting to the new value but\n\t\t\t// taking care of not overriding the other lightbox settings.\n\t\t} else {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: {\n\t\t\t\t\t...rawSettings.lightbox,\n\t\t\t\t\t...newSetting,\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeBorders = ( newStyle ) => {\n\t\tif ( ! newStyle?.border ) {\n\t\t\tsetStyle( newStyle );\n\t\t\treturn;\n\t\t}\n\n\t\t// As Global Styles can't conditionally generate styles based on if\n\t\t// other style properties have been set, we need to force split\n\t\t// border definitions for user set global border styles. Border\n\t\t// radius is derived from the same property i.e. `border.radius` if\n\t\t// it is a string that is used. The longhand border radii styles are\n\t\t// only generated if that property is an object.\n\t\t//\n\t\t// For borders (color, style, and width) those are all properties on\n\t\t// the `border` style property. This means if the theme.json defined\n\t\t// split borders and the user condenses them into a flat border or\n\t\t// vice-versa we'd get both sets of styles which would conflict.\n\t\tconst { radius, ...newBorder } = newStyle.border;\n\t\tconst border = applyAllFallbackStyles( newBorder );\n\t\tconst updatedBorder = ! hasSplitBorders( border )\n\t\t\t? {\n\t\t\t\t\ttop: border,\n\t\t\t\t\tright: border,\n\t\t\t\t\tbottom: border,\n\t\t\t\t\tleft: border,\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tcolor: null,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twidth: null,\n\t\t\t\t\t...border,\n\t\t\t };\n\n\t\tsetStyle( { ...newStyle, border: { ...updatedBorder, radius } } );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ variation ? currentBlockStyle?.label : blockType.title }\n\t\t\t/>\n\t\t\t<BlockPreviewPanel name={ name } variation={ variation } />\n\t\t\t{ hasVariationsPanel && (\n\t\t\t\t<div className=\"edit-site-global-styles-screen-variations\">\n\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t<Subtitle>{ __( 'Style Variations' ) }</Subtitle>\n\t\t\t\t\t\t<VariationsPanel name={ name } />\n\t\t\t\t\t</VStack>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ hasColorPanel && (\n\t\t\t\t<StylesColorPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasTypographyPanel && (\n\t\t\t\t<StylesTypographyPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasDimensionsPanel && (\n\t\t\t\t<StylesDimensionsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ onChangeDimensions }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBorderPanel && (\n\t\t\t\t<StylesBorderPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ onChangeBorders }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasFiltersPanel && (\n\t\t\t\t<StylesFiltersPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasImageSettingsPanel && (\n\t\t\t\t<ImageSettingsPanel\n\t\t\t\t\tonChange={ onChangeLightbox }\n\t\t\t\t\tvalue={ userSettings }\n\t\t\t\t\tinheritedValue={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ hasBackgroundPanel && (\n\t\t\t\t<StylesBackgroundPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tdefaultValues={ BACKGROUND_BLOCK_DEFAULT_VALUES }\n\t\t\t\t\tdefaultControls={\n\t\t\t\t\t\tblockType?.supports?.background\n\t\t\t\t\t\t\t?.__experimentalDefaultControls\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ canEditCSS && (\n\t\t\t\t<PanelBody title={ __( 'Advanced' ) } initialOpen={ false }>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tblockType?.title\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenBlock;\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,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A;QAAAD,QAAA,EACG,IAAAmB,aAAO;QACR;QACA,IAAAZ,QAAE,EACD,2IACD,CAAC,EACDxD,SAAS,EAAEoD,KACZ;MAAC,CACC,CAAC,eACJ,IAAA7G,WAAA,CAAA2G,GAAA,EAACnE,mBAAmB;QACnB4E,KAAK,EAAG5G,KAAO;QACf6G,QAAQ,EAAGjE,QAAU;QACrB+D,cAAc,EAAGhE;MAAgB,CACjC,CAAC;IAAA,CACQ,CACX;EAAA,CACA,CAAC;AAEL;AAAC,IAAA2E,QAAA,GAAAC,OAAA,CAAAnB,OAAA,GAEcjE,WAAW","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_blocks","require","_blockEditor","_element","_data","_coreData","_components","_i18n","_header","_interopRequireDefault","_blockPreviewPanel","_lockUnlock","_subtitle","_variationsPanel","_jsxRuntime","BACKGROUND_BLOCK_DEFAULT_VALUES","backgroundSize","applyFallbackStyle","border","hasColorOrWidth","color","width","style","undefined","applyAllFallbackStyles","hasSplitBorders","top","right","bottom","left","useHasDimensionsPanel","useHasTypographyPanel","useHasBorderPanel","useGlobalSetting","useSettingsForBlockElement","useHasColorPanel","useHasFiltersPanel","useHasImageSettingsPanel","useGlobalStyle","useHasBackgroundPanel","BackgroundPanel","StylesBackgroundPanel","BorderPanel","StylesBorderPanel","ColorPanel","StylesColorPanel","TypographyPanel","StylesTypographyPanel","DimensionsPanel","StylesDimensionsPanel","FiltersPanel","StylesFiltersPanel","ImageSettingsPanel","AdvancedPanel","StylesAdvancedPanel","useGlobalStyleLinks","unlock","blockEditorPrivateApis","ScreenBlock","name","variation","prefixParts","concat","prefix","join","shouldDecodeEncode","inheritedStyle","setStyle","userSettings","rawSettings","setSettings","settings","blockType","getBlockType","_links","spacing","blockGap","supports","__experimentalSkipSerialization","some","spacingType","dimensions","aspectRatio","blockVariations","useBlockVariations","hasBackgroundPanel","hasTypographyPanel","hasColorPanel","hasBorderPanel","hasDimensionsPanel","hasFiltersPanel","hasImageSettingsPanel","hasVariationsPanel","length","canEditCSS","useSelect","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","currentBlockStyle","find","s","inheritedStyleWithLayout","useMemo","layout","styleWithLayout","onChangeDimensions","newStyle","updatedStyle","onChangeLightbox","newSetting","lightbox","onChangeBorders","radius","newBorder","updatedBorder","jsxs","Fragment","children","jsx","default","title","label","className","__experimentalVStack","__","VariationsPanel","inheritedValue","value","onChange","defaultValues","themeFileURIs","includeLayoutControls","PanelBody","initialOpen","sprintf","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-block.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tPanelBody,\n\t__experimentalVStack as VStack,\n\t__experimentalHasSplitBorders as hasSplitBorders,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport {\n\tuseBlockVariations,\n\tVariationsPanel,\n} from './variations/variations-panel';\n\n// Initial control values where no block style is set.\nconst BACKGROUND_BLOCK_DEFAULT_VALUES = {\n\tbackgroundSize: 'cover',\n};\n\nfunction applyFallbackStyle( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tconst hasColorOrWidth = border.color || border.width;\n\n\tif ( ! border.style && hasColorOrWidth ) {\n\t\treturn { ...border, style: 'solid' };\n\t}\n\n\tif ( border.style && ! hasColorOrWidth ) {\n\t\treturn undefined;\n\t}\n\n\treturn border;\n}\n\nfunction applyAllFallbackStyles( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tif ( hasSplitBorders( border ) ) {\n\t\treturn {\n\t\t\ttop: applyFallbackStyle( border.top ),\n\t\t\tright: applyFallbackStyle( border.right ),\n\t\t\tbottom: applyFallbackStyle( border.bottom ),\n\t\t\tleft: applyFallbackStyle( border.left ),\n\t\t};\n\t}\n\n\treturn applyFallbackStyle( border );\n}\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n\tuseHasFiltersPanel,\n\tuseHasImageSettingsPanel,\n\tuseGlobalStyle,\n\tuseHasBackgroundPanel,\n\tBackgroundPanel: StylesBackgroundPanel,\n\tBorderPanel: StylesBorderPanel,\n\tColorPanel: StylesColorPanel,\n\tTypographyPanel: StylesTypographyPanel,\n\tDimensionsPanel: StylesDimensionsPanel,\n\tFiltersPanel: StylesFiltersPanel,\n\tImageSettingsPanel,\n\tAdvancedPanel: StylesAdvancedPanel,\n\tuseGlobalStyleLinks,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenBlock( { name, variation } ) {\n\tlet prefixParts = [];\n\tif ( variation ) {\n\t\tprefixParts = [ 'variations', variation ].concat( prefixParts );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, name, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( prefix, name, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ userSettings ] = useGlobalSetting( '', name, 'user' );\n\tconst [ rawSettings, setSettings ] = useGlobalSetting( '', name );\n\tconst settings = useSettingsForBlockElement( rawSettings, name );\n\tconst blockType = getBlockType( name );\n\tconst _links = useGlobalStyleLinks();\n\n\t// Only allow `blockGap` support if serialization has not been skipped, to be sure global spacing can be applied.\n\tif (\n\t\tsettings?.spacing?.blockGap &&\n\t\tblockType?.supports?.spacing?.blockGap &&\n\t\t( blockType?.supports?.spacing?.__experimentalSkipSerialization ===\n\t\t\ttrue ||\n\t\t\tblockType?.supports?.spacing?.__experimentalSkipSerialization?.some?.(\n\t\t\t\t( spacingType ) => spacingType === 'blockGap'\n\t\t\t) )\n\t) {\n\t\tsettings.spacing.blockGap = false;\n\t}\n\n\t// Only allow `aspectRatio` support if the block is not the grouping block.\n\t// The grouping block allows the user to use Group, Row and Stack variations,\n\t// and it is highly likely that the user will not want to set an aspect ratio\n\t// for all three at once. Until there is the ability to set a different aspect\n\t// ratio for each variation, we disable the aspect ratio controls for the\n\t// grouping block in global styles.\n\tif ( settings?.dimensions?.aspectRatio && name === 'core/group' ) {\n\t\tsettings.dimensions.aspectRatio = false;\n\t}\n\n\tconst blockVariations = useBlockVariations( name );\n\tconst hasBackgroundPanel = useHasBackgroundPanel( settings );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasFiltersPanel = useHasFiltersPanel( settings );\n\tconst hasImageSettingsPanel = useHasImageSettingsPanel(\n\t\tname,\n\t\tuserSettings,\n\t\tsettings\n\t);\n\tconst hasVariationsPanel = !! blockVariations?.length && ! variation;\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst currentBlockStyle = variation\n\t\t? blockVariations.find( ( s ) => s.name === variation )\n\t\t: null;\n\n\t// These intermediary objects are needed because the \"layout\" property is stored\n\t// in settings rather than styles.\n\tconst inheritedStyleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...inheritedStyle,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ inheritedStyle, settings.layout ] );\n\tconst styleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...style,\n\t\t\tlayout: userSettings.layout,\n\t\t};\n\t}, [ style, userSettings.layout ] );\n\tconst onChangeDimensions = ( newStyle ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== userSettings.layout ) {\n\t\t\tsetSettings( {\n\t\t\t\t...userSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeLightbox = ( newSetting ) => {\n\t\t// If the newSetting is undefined, this means that the user has deselected\n\t\t// (reset) the lightbox setting.\n\t\tif ( newSetting === undefined ) {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: undefined,\n\t\t\t} );\n\n\t\t\t// Otherwise, we simply set the lightbox setting to the new value but\n\t\t\t// taking care of not overriding the other lightbox settings.\n\t\t} else {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: {\n\t\t\t\t\t...rawSettings.lightbox,\n\t\t\t\t\t...newSetting,\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeBorders = ( newStyle ) => {\n\t\tif ( ! newStyle?.border ) {\n\t\t\tsetStyle( newStyle );\n\t\t\treturn;\n\t\t}\n\n\t\t// As Global Styles can't conditionally generate styles based on if\n\t\t// other style properties have been set, we need to force split\n\t\t// border definitions for user set global border styles. Border\n\t\t// radius is derived from the same property i.e. `border.radius` if\n\t\t// it is a string that is used. The longhand border radii styles are\n\t\t// only generated if that property is an object.\n\t\t//\n\t\t// For borders (color, style, and width) those are all properties on\n\t\t// the `border` style property. This means if the theme.json defined\n\t\t// split borders and the user condenses them into a flat border or\n\t\t// vice-versa we'd get both sets of styles which would conflict.\n\t\tconst { radius, ...newBorder } = newStyle.border;\n\t\tconst border = applyAllFallbackStyles( newBorder );\n\t\tconst updatedBorder = ! hasSplitBorders( border )\n\t\t\t? {\n\t\t\t\t\ttop: border,\n\t\t\t\t\tright: border,\n\t\t\t\t\tbottom: border,\n\t\t\t\t\tleft: border,\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tcolor: null,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twidth: null,\n\t\t\t\t\t...border,\n\t\t\t };\n\n\t\tsetStyle( { ...newStyle, border: { ...updatedBorder, radius } } );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ variation ? currentBlockStyle?.label : blockType.title }\n\t\t\t/>\n\t\t\t<BlockPreviewPanel name={ name } variation={ variation } />\n\t\t\t{ hasVariationsPanel && (\n\t\t\t\t<div className=\"edit-site-global-styles-screen-variations\">\n\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t<Subtitle>{ __( 'Style Variations' ) }</Subtitle>\n\t\t\t\t\t\t<VariationsPanel name={ name } />\n\t\t\t\t\t</VStack>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ hasColorPanel && (\n\t\t\t\t<StylesColorPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBackgroundPanel && (\n\t\t\t\t<StylesBackgroundPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tdefaultValues={ BACKGROUND_BLOCK_DEFAULT_VALUES }\n\t\t\t\t\tthemeFileURIs={ _links?.[ 'wp:theme-file' ] }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasTypographyPanel && (\n\t\t\t\t<StylesTypographyPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasDimensionsPanel && (\n\t\t\t\t<StylesDimensionsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ onChangeDimensions }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBorderPanel && (\n\t\t\t\t<StylesBorderPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ onChangeBorders }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasFiltersPanel && (\n\t\t\t\t<StylesFiltersPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasImageSettingsPanel && (\n\t\t\t\t<ImageSettingsPanel\n\t\t\t\t\tonChange={ onChangeLightbox }\n\t\t\t\t\tvalue={ userSettings }\n\t\t\t\t\tinheritedValue={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ canEditCSS && (\n\t\t\t\t<PanelBody title={ __( 'Advanced' ) } initialOpen={ false }>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tblockType?.title\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenBlock;\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAKA,IAAAM,KAAA,GAAAN,OAAA;AAKA,IAAAO,OAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAD,sBAAA,CAAAR,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AACA,IAAAW,SAAA,GAAAH,sBAAA,CAAAR,OAAA;AACA,IAAAY,gBAAA,GAAAZ,OAAA;AAGuC,IAAAa,WAAA,GAAAb,OAAA;AAzBvC;AACA;AACA;;AAaA;AACA;AACA;;AAUA;AACA,MAAMc,+BAA+B,GAAG;EACvCC,cAAc,EAAE;AACjB,CAAC;AAED,SAASC,kBAAkBA,CAAEC,MAAM,EAAG;EACrC,IAAK,CAAEA,MAAM,EAAG;IACf,OAAOA,MAAM;EACd;EAEA,MAAMC,eAAe,GAAGD,MAAM,CAACE,KAAK,IAAIF,MAAM,CAACG,KAAK;EAEpD,IAAK,CAAEH,MAAM,CAACI,KAAK,IAAIH,eAAe,EAAG;IACxC,OAAO;MAAE,GAAGD,MAAM;MAAEI,KAAK,EAAE;IAAQ,CAAC;EACrC;EAEA,IAAKJ,MAAM,CAACI,KAAK,IAAI,CAAEH,eAAe,EAAG;IACxC,OAAOI,SAAS;EACjB;EAEA,OAAO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AAU;MACrBI,QAAQ,EAAGA,QAAU;MACrBgE,qBAAqB;IAAA,CACrB,CACD,EACC5C,qBAAqB,iBACtB,IAAA7E,WAAA,CAAA4G,GAAA,EAACtE,kBAAkB;MAClBgF,QAAQ,EAAGpB,gBAAkB;MAC7BmB,KAAK,EAAG/D,YAAc;MACtB8D,cAAc,EAAG3D;IAAU,CAC3B,CACD,EAECuB,UAAU,iBACX,IAAAhF,WAAA,CAAAyG,IAAA,EAACjH,WAAA,CAAAkI,SAAS;MAACZ,KAAK,EAAG,IAAAI,QAAE,EAAE,UAAW,CAAG;MAACS,WAAW,EAAG,KAAO;MAAAhB,QAAA,gBAC1D,IAAA3G,WAAA,CAAA4G,GAAA;QAAAD,QAAA,EACG,IAAAiB,aAAO;QACR;QACA,IAAAV,QAAE,EACD,2IACD,CAAC,EACDxD,SAAS,EAAEoD,KACZ;MAAC,CACC,CAAC,eACJ,IAAA9G,WAAA,CAAA4G,GAAA,EAACpE,mBAAmB;QACnB6E,KAAK,EAAG7G,KAAO;QACf8G,QAAQ,EAAGjE,QAAU;QACrB+D,cAAc,EAAGhE;MAAgB,CACjC,CAAC;IAAA,CACQ,CACX;EAAA,CACA,CAAC;AAEL;AAAC,IAAAyE,QAAA,GAAAC,OAAA,CAAAjB,OAAA,GAEcjE,WAAW","ignoreList":[]}
|
|
@@ -9,7 +9,7 @@ var _components = require("@wordpress/components");
|
|
|
9
9
|
var _i18n = require("@wordpress/i18n");
|
|
10
10
|
var _blockEditor = require("@wordpress/block-editor");
|
|
11
11
|
var _header = _interopRequireDefault(require("./header"));
|
|
12
|
-
var
|
|
12
|
+
var _content = _interopRequireDefault(require("../sidebar-navigation-screen-global-styles/content"));
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
/**
|
|
15
15
|
* WordPress dependencies
|
|
@@ -32,7 +32,7 @@ function ScreenStyleVariations() {
|
|
|
32
32
|
isBorderless: true,
|
|
33
33
|
className: "edit-site-global-styles-screen-style-variations",
|
|
34
34
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.CardBody, {
|
|
35
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
35
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_content.default, {})
|
|
36
36
|
})
|
|
37
37
|
})]
|
|
38
38
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_i18n","_blockEditor","_header","_interopRequireDefault","
|
|
1
|
+
{"version":3,"names":["_components","require","_i18n","_blockEditor","_header","_interopRequireDefault","_content","_jsxRuntime","ScreenStyleVariations","useZoomOut","jsxs","Fragment","children","jsx","default","title","__","description","Card","size","isBorderless","className","CardBody","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-style-variations.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Card, CardBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useZoomOut } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport SidebarNavigationScreenGlobalStylesContent from '../sidebar-navigation-screen-global-styles/content';\n\nfunction ScreenStyleVariations() {\n\t// Move to zoom out mode when this component is mounted\n\t// and back to the previous mode when unmounted.\n\tuseZoomOut();\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Browse styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a variation to change the look of the site.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<Card\n\t\t\t\tsize=\"small\"\n\t\t\t\tisBorderless\n\t\t\t\tclassName=\"edit-site-global-styles-screen-style-variations\"\n\t\t\t>\n\t\t\t\t<CardBody>\n\t\t\t\t\t<SidebarNavigationScreenGlobalStylesContent />\n\t\t\t\t</CardBody>\n\t\t\t</Card>\n\t\t</>\n\t);\n}\n\nexport default ScreenStyleVariations;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAKA,IAAAG,OAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAD,sBAAA,CAAAJ,OAAA;AAA4G,IAAAM,WAAA,GAAAN,OAAA;AAX5G;AACA;AACA;;AAKA;AACA;AACA;;AAIA,SAASO,qBAAqBA,CAAA,EAAG;EAChC;EACA;EACA,IAAAC,uBAAU,EAAC,CAAC;EAEZ,oBACC,IAAAF,WAAA,CAAAG,IAAA,EAAAH,WAAA,CAAAI,QAAA;IAAAC,QAAA,gBACC,IAAAL,WAAA,CAAAM,GAAA,EAACT,OAAA,CAAAU,OAAY;MACZC,KAAK,EAAG,IAAAC,QAAE,EAAE,eAAgB,CAAG;MAC/BC,WAAW,EAAG,IAAAD,QAAE,EACf,oDACD;IAAG,CACH,CAAC,eAEF,IAAAT,WAAA,CAAAM,GAAA,EAACb,WAAA,CAAAkB,IAAI;MACJC,IAAI,EAAC,OAAO;MACZC,YAAY;MACZC,SAAS,EAAC,iDAAiD;MAAAT,QAAA,eAE3D,IAAAL,WAAA,CAAAM,GAAA,EAACb,WAAA,CAAAsB,QAAQ;QAAAV,QAAA,eACR,IAAAL,WAAA,CAAAM,GAAA,EAACP,QAAA,CAAAQ,OAA0C,IAAE;MAAC,CACrC;IAAC,CACN,CAAC;EAAA,CACN,CAAC;AAEL;AAAC,IAAAS,QAAA,GAAAC,OAAA,CAAAV,OAAA,GAEcN,qBAAqB","ignoreList":[]}
|
|
@@ -13,6 +13,7 @@ var _typographyElements = _interopRequireDefault(require("./typography-elements"
|
|
|
13
13
|
var _variationsTypography = _interopRequireDefault(require("./variations/variations-typography"));
|
|
14
14
|
var _fontFamilies = _interopRequireDefault(require("./font-families"));
|
|
15
15
|
var _header = _interopRequireDefault(require("./header"));
|
|
16
|
+
var _fontSizesCount = _interopRequireDefault(require("./font-sizes/font-sizes-count"));
|
|
16
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
18
|
/**
|
|
18
19
|
* WordPress dependencies
|
|
@@ -32,9 +33,9 @@ function ScreenTypography() {
|
|
|
32
33
|
className: "edit-site-global-styles-screen",
|
|
33
34
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalVStack, {
|
|
34
35
|
spacing: 7,
|
|
35
|
-
children: [
|
|
36
|
+
children: [fontLibraryEnabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_fontFamilies.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typographyElements.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_variationsTypography.default, {
|
|
36
37
|
title: (0, _i18n.__)('Presets')
|
|
37
|
-
})]
|
|
38
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_fontSizesCount.default, {})]
|
|
38
39
|
})
|
|
39
40
|
})]
|
|
40
41
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_components","_editor","_data","_typographyElements","_interopRequireDefault","_variationsTypography","_fontFamilies","_header","_jsxRuntime","ScreenTypography","fontLibraryEnabled","useSelect","select","editorStore","getEditorSettings","jsxs","Fragment","children","jsx","default","title","__","description","className","__experimentalVStack","spacing","
|
|
1
|
+
{"version":3,"names":["_i18n","require","_components","_editor","_data","_typographyElements","_interopRequireDefault","_variationsTypography","_fontFamilies","_header","_fontSizesCount","_jsxRuntime","ScreenTypography","fontLibraryEnabled","useSelect","select","editorStore","getEditorSettings","jsxs","Fragment","children","jsx","default","title","__","description","className","__experimentalVStack","spacing","_default","exports"],"sources":["@wordpress/edit-site/src/components/global-styles/screen-typography.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { store as editorStore } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport TypographyElements from './typography-elements';\nimport TypographyVariations from './variations/variations-typography';\nimport FontFamilies from './font-families';\nimport ScreenHeader from './header';\nimport FontSizesCount from './font-sizes/font-sizes-count';\n\nfunction ScreenTypography() {\n\tconst fontLibraryEnabled = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditorSettings().fontLibraryEnabled,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Typography styles and the application of those styles on site elements.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen\">\n\t\t\t\t<VStack spacing={ 7 }>\n\t\t\t\t\t{ fontLibraryEnabled && <FontFamilies /> }\n\t\t\t\t\t<TypographyElements />\n\t\t\t\t\t<TypographyVariations title={ __( 'Presets' ) } />\n\t\t\t\t\t<FontSizesCount />\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenTypography;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,mBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAD,sBAAA,CAAAL,OAAA;AACA,IAAAO,aAAA,GAAAF,sBAAA,CAAAL,OAAA;AACA,IAAAQ,OAAA,GAAAH,sBAAA,CAAAL,OAAA;AACA,IAAAS,eAAA,GAAAJ,sBAAA,CAAAL,OAAA;AAA2D,IAAAU,WAAA,GAAAV,OAAA;AAf3D;AACA;AACA;;AAMA;AACA;AACA;;AAOA,SAASW,gBAAgBA,CAAA,EAAG;EAC3B,MAAMC,kBAAkB,GAAG,IAAAC,eAAS,EACjCC,MAAM,IACPA,MAAM,CAAEC,aAAY,CAAC,CAACC,iBAAiB,CAAC,CAAC,CAACJ,kBAAkB,EAC7D,EACD,CAAC;EAED,oBACC,IAAAF,WAAA,CAAAO,IAAA,EAAAP,WAAA,CAAAQ,QAAA;IAAAC,QAAA,gBACC,IAAAT,WAAA,CAAAU,GAAA,EAACZ,OAAA,CAAAa,OAAY;MACZC,KAAK,EAAG,IAAAC,QAAE,EAAE,YAAa,CAAG;MAC5BC,WAAW,EAAG,IAAAD,QAAE,EACf,yEACD;IAAG,CACH,CAAC,eACF,IAAAb,WAAA,CAAAU,GAAA;MAAKK,SAAS,EAAC,gCAAgC;MAAAN,QAAA,eAC9C,IAAAT,WAAA,CAAAO,IAAA,EAAChB,WAAA,CAAAyB,oBAAM;QAACC,OAAO,EAAG,CAAG;QAAAR,QAAA,GAClBP,kBAAkB,iBAAI,IAAAF,WAAA,CAAAU,GAAA,EAACb,aAAA,CAAAc,OAAY,IAAE,CAAC,eACxC,IAAAX,WAAA,CAAAU,GAAA,EAAChB,mBAAA,CAAAiB,OAAkB,IAAE,CAAC,eACtB,IAAAX,WAAA,CAAAU,GAAA,EAACd,qBAAA,CAAAe,OAAoB;UAACC,KAAK,EAAG,IAAAC,QAAE,EAAE,SAAU;QAAG,CAAE,CAAC,eAClD,IAAAb,WAAA,CAAAU,GAAA,EAACX,eAAA,CAAAY,OAAc,IAAE,CAAC;MAAA,CACX;IAAC,CACL,CAAC;EAAA,CACL,CAAC;AAEL;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAR,OAAA,GAEcV,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _i18n = require("@wordpress/i18n");
|
|
8
|
+
var _components = require("@wordpress/components");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
/**
|
|
11
|
+
* WordPress dependencies
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Internal dependencies
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const DEFAULT_UNITS = ['px', 'em', 'rem', 'vw', 'vh'];
|
|
19
|
+
function SizeControl(props) {
|
|
20
|
+
const {
|
|
21
|
+
baseControlProps
|
|
22
|
+
} = (0, _components.useBaseControlProps)(props);
|
|
23
|
+
const {
|
|
24
|
+
value,
|
|
25
|
+
onChange,
|
|
26
|
+
fallbackValue,
|
|
27
|
+
disabled
|
|
28
|
+
} = props;
|
|
29
|
+
const units = (0, _components.__experimentalUseCustomUnits)({
|
|
30
|
+
availableUnits: DEFAULT_UNITS
|
|
31
|
+
});
|
|
32
|
+
const [valueQuantity, valueUnit = 'px'] = (0, _components.__experimentalParseQuantityAndUnitFromRawValue)(value, units);
|
|
33
|
+
const isValueUnitRelative = !!valueUnit && ['em', 'rem', 'vw', 'vh'].includes(valueUnit);
|
|
34
|
+
|
|
35
|
+
// Receives the new value from the UnitControl component as a string containing the value and unit.
|
|
36
|
+
const handleUnitControlChange = newValue => {
|
|
37
|
+
onChange(newValue);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// Receives the new value from the RangeControl component as a number.
|
|
41
|
+
const handleRangeControlChange = newValue => {
|
|
42
|
+
onChange?.(newValue + valueUnit);
|
|
43
|
+
};
|
|
44
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.BaseControl, {
|
|
45
|
+
...baseControlProps,
|
|
46
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Flex, {
|
|
47
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FlexItem, {
|
|
48
|
+
isBlock: true,
|
|
49
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalUnitControl, {
|
|
50
|
+
__next40pxDefaultSize: true,
|
|
51
|
+
__nextHasNoMarginBottom: true,
|
|
52
|
+
label: (0, _i18n.__)('Custom'),
|
|
53
|
+
hideLabelFromVision: true,
|
|
54
|
+
value: value,
|
|
55
|
+
onChange: handleUnitControlChange,
|
|
56
|
+
units: units,
|
|
57
|
+
min: 0,
|
|
58
|
+
disabled: disabled
|
|
59
|
+
})
|
|
60
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.FlexItem, {
|
|
61
|
+
isBlock: true,
|
|
62
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalSpacer, {
|
|
63
|
+
marginX: 2,
|
|
64
|
+
marginBottom: 0,
|
|
65
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.RangeControl, {
|
|
66
|
+
__next40pxDefaultSize: true,
|
|
67
|
+
__nextHasNoMarginBottom: true,
|
|
68
|
+
label: (0, _i18n.__)('Custom Size'),
|
|
69
|
+
hideLabelFromVision: true,
|
|
70
|
+
value: valueQuantity,
|
|
71
|
+
initialPosition: fallbackValue,
|
|
72
|
+
withInputField: false,
|
|
73
|
+
onChange: handleRangeControlChange,
|
|
74
|
+
min: 0,
|
|
75
|
+
max: isValueUnitRelative ? 10 : 100,
|
|
76
|
+
step: isValueUnitRelative ? 0.1 : 1,
|
|
77
|
+
disabled: disabled
|
|
78
|
+
})
|
|
79
|
+
})
|
|
80
|
+
})]
|
|
81
|
+
})
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
var _default = exports.default = SizeControl;
|
|
85
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_i18n","require","_components","_jsxRuntime","DEFAULT_UNITS","SizeControl","props","baseControlProps","useBaseControlProps","value","onChange","fallbackValue","disabled","units","useCustomUnits","availableUnits","valueQuantity","valueUnit","parseQuantityAndUnitFromRawValue","isValueUnitRelative","includes","handleUnitControlChange","newValue","handleRangeControlChange","jsx","BaseControl","children","jsxs","Flex","FlexItem","isBlock","__experimentalUnitControl","__next40pxDefaultSize","__nextHasNoMarginBottom","label","__","hideLabelFromVision","min","__experimentalSpacer","marginX","marginBottom","RangeControl","initialPosition","withInputField","max","step","_default","exports","default"],"sources":["@wordpress/edit-site/src/components/global-styles/size-control/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tBaseControl,\n\tRangeControl,\n\tFlex,\n\tFlexItem,\n\tuseBaseControlProps,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalSpacer as Spacer,\n} from '@wordpress/components';\n\nconst DEFAULT_UNITS = [ 'px', 'em', 'rem', 'vw', 'vh' ];\n\nfunction SizeControl( props ) {\n\tconst { baseControlProps } = useBaseControlProps( props );\n\tconst { value, onChange, fallbackValue, disabled } = props;\n\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: DEFAULT_UNITS,\n\t} );\n\n\tconst [ valueQuantity, valueUnit = 'px' ] =\n\t\tparseQuantityAndUnitFromRawValue( value, units );\n\n\tconst isValueUnitRelative =\n\t\t!! valueUnit && [ 'em', 'rem', 'vw', 'vh' ].includes( valueUnit );\n\n\t// Receives the new value from the UnitControl component as a string containing the value and unit.\n\tconst handleUnitControlChange = ( newValue ) => {\n\t\tonChange( newValue );\n\t};\n\n\t// Receives the new value from the RangeControl component as a number.\n\tconst handleRangeControlChange = ( newValue ) => {\n\t\tonChange?.( newValue + valueUnit );\n\t};\n\n\treturn (\n\t\t<BaseControl { ...baseControlProps }>\n\t\t\t<Flex>\n\t\t\t\t<FlexItem isBlock>\n\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Custom' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ handleUnitControlChange }\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t/>\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem isBlock>\n\t\t\t\t\t<Spacer marginX={ 2 } marginBottom={ 0 }>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Custom Size' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\tvalue={ valueQuantity }\n\t\t\t\t\t\t\tinitialPosition={ fallbackValue }\n\t\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t\t\tonChange={ handleRangeControlChange }\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ isValueUnitRelative ? 10 : 100 }\n\t\t\t\t\t\t\tstep={ isValueUnitRelative ? 0.1 : 1 }\n\t\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Spacer>\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\t\t</BaseControl>\n\t);\n}\n\nexport default SizeControl;\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAU+B,IAAAE,WAAA,GAAAF,OAAA;AAlB/B;AACA;AACA;;AAGA;AACA;AACA;;AAaA,MAAMG,aAAa,GAAG,CAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAE;AAEvD,SAASC,WAAWA,CAAEC,KAAK,EAAG;EAC7B,MAAM;IAAEC;EAAiB,CAAC,GAAG,IAAAC,+BAAmB,EAAEF,KAAM,CAAC;EACzD,MAAM;IAAEG,KAAK;IAAEC,QAAQ;IAAEC,aAAa;IAAEC;EAAS,CAAC,GAAGN,KAAK;EAE1D,MAAMO,KAAK,GAAG,IAAAC,wCAAc,EAAE;IAC7BC,cAAc,EAA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AG,CAAG;UAACC,YAAY,EAAG,CAAG;UAAAd,QAAA,eACvC,IAAAvB,WAAA,CAAAqB,GAAA,EAACtB,WAAA,CAAAuC,YAAY;YACZT,qBAAqB;YACrBC,uBAAuB;YACvBC,KAAK,EAAG,IAAAC,QAAE,EAAE,aAAc,CAAG;YAC7BC,mBAAmB;YACnB3B,KAAK,EAAGO,aAAe;YACvB0B,eAAe,EAAG/B,aAAe;YACjCgC,cAAc,EAAG,KAAO;YACxBjC,QAAQ,EAAGa,wBAA0B;YACrCc,GAAG,EAAG,CAAG;YACTO,GAAG,EAAGzB,mBAAmB,GAAG,EAAE,GAAG,GAAK;YACtC0B,IAAI,EAAG1B,mBAAmB,GAAG,GAAG,GAAG,CAAG;YACtCP,QAAQ,EAAGA;UAAU,CACrB;QAAC,CACK;MAAC,CACA,CAAC;IAAA,CACN;EAAC,CACK,CAAC;AAEhB;AAAC,IAAAkC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc3C,WAAW","ignoreList":[]}
|
|
@@ -95,6 +95,9 @@ function StyleVariationsContainer({
|
|
|
95
95
|
};
|
|
96
96
|
})];
|
|
97
97
|
}, [fullStyleVariations, userStyles?.blocks, userStyles?.css]);
|
|
98
|
+
if (!fullStyleVariations || fullStyleVariations?.length < 1) {
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
98
101
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalGrid, {
|
|
99
102
|
columns: 2,
|
|
100
103
|
className: "edit-site-global-styles-style-variations-container",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_coreData","require","_data","_element","_components","_i18n","_blockEditor","_previewStyles","_interopRequireDefault","_variation","_useThemeStyleVariationsByProperty","_lockUnlock","_jsxRuntime","GlobalStylesContext","unlock","blockEditorPrivateApis","StyleVariationsContainer","gap","user","useContext","currentUserStyles","setCurrentUserStyles","useState","userStyles","styles","useEffect","variations","useSelect","select","coreStore","__experimentalGetCurrentThemeGlobalStylesVariations","fullStyleVariations","filter","variation","isVariationWithProperties","themeVariations","useMemo","withEmptyVariation","title","__","settings","map","_variation$settings","blockStyles","blocks","Object","keys","forEach","blockName","css","variationBlockStyles","customCSS","trim","length","jsx","__experimentalGrid","columns","className","children","index","default","isFocused","label","withHoverView"],"sources":["@wordpress/edit-site/src/components/global-styles/style-variations-container.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useContext, useEffect, useMemo, useState } from '@wordpress/element';\nimport { __experimentalGrid as Grid } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport PreviewStyles from './preview-styles';\nimport Variation from './variations/variation';\nimport { isVariationWithProperties } from '../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\n\nexport default function StyleVariationsContainer( { gap = 2 } ) {\n\tconst { user } = useContext( GlobalStylesContext );\n\tconst [ currentUserStyles, setCurrentUserStyles ] = useState( user );\n\tconst userStyles = currentUserStyles?.styles;\n\n\tuseEffect( () => {\n\t\tsetCurrentUserStyles( user );\n\t}, [ user ] );\n\n\tconst variations = useSelect( ( select ) => {\n\t\treturn select(\n\t\t\tcoreStore\n\t\t).__experimentalGetCurrentThemeGlobalStylesVariations();\n\t}, [] );\n\n\t// Filter out variations that are color or typography variations.\n\tconst fullStyleVariations = variations?.filter( ( variation ) => {\n\t\treturn (\n\t\t\t! isVariationWithProperties( variation, [ 'color' ] ) &&\n\t\t\t! isVariationWithProperties( variation, [\n\t\t\t\t'typography',\n\t\t\t\t'spacing',\n\t\t\t] )\n\t\t);\n\t} );\n\n\tconst themeVariations = useMemo( () => {\n\t\tconst withEmptyVariation = [\n\t\t\t{\n\t\t\t\ttitle: __( 'Default' ),\n\t\t\t\tsettings: {},\n\t\t\t\tstyles: {},\n\t\t\t},\n\t\t\t...( fullStyleVariations ?? [] ),\n\t\t];\n\t\treturn [\n\t\t\t...withEmptyVariation.map( ( variation ) => {\n\t\t\t\tconst blockStyles = { ...variation?.styles?.blocks } || {};\n\n\t\t\t\t// We need to copy any user custom CSS to the variation to prevent it being lost\n\t\t\t\t// when switching variations.\n\t\t\t\tif ( userStyles?.blocks ) {\n\t\t\t\t\tObject.keys( userStyles.blocks ).forEach( ( blockName ) => {\n\t\t\t\t\t\t// First get any block specific custom CSS from the current user styles and merge with any custom CSS for\n\t\t\t\t\t\t// that block in the variation.\n\t\t\t\t\t\tif ( userStyles.blocks[ blockName ].css ) {\n\t\t\t\t\t\t\tconst variationBlockStyles =\n\t\t\t\t\t\t\t\tblockStyles[ blockName ] || {};\n\t\t\t\t\t\t\tconst customCSS = {\n\t\t\t\t\t\t\t\tcss: `${\n\t\t\t\t\t\t\t\t\tblockStyles[ blockName ]?.css || ''\n\t\t\t\t\t\t\t\t} ${\n\t\t\t\t\t\t\t\t\tuserStyles.blocks[ blockName ].css.trim() ||\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\tblockStyles[ blockName ] = {\n\t\t\t\t\t\t\t\t...variationBlockStyles,\n\t\t\t\t\t\t\t\t...customCSS,\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\t// Now merge any global custom CSS from current user styles with global custom CSS in the variation.\n\t\t\t\tconst css =\n\t\t\t\t\tuserStyles?.css || variation.styles?.css\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tcss: `${ variation.styles?.css || '' } ${\n\t\t\t\t\t\t\t\t\tuserStyles?.css || ''\n\t\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {};\n\n\t\t\t\tconst blocks =\n\t\t\t\t\tObject.keys( blockStyles ).length > 0\n\t\t\t\t\t\t? { blocks: blockStyles }\n\t\t\t\t\t\t: {};\n\n\t\t\t\tconst styles = {\n\t\t\t\t\t...variation.styles,\n\t\t\t\t\t...css,\n\t\t\t\t\t...blocks,\n\t\t\t\t};\n\t\t\t\treturn {\n\t\t\t\t\t...variation,\n\t\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\t\tstyles,\n\t\t\t\t};\n\t\t\t} ),\n\t\t];\n\t}, [ fullStyleVariations, userStyles?.blocks, userStyles?.css ] );\n\n\treturn (\n\t\t<Grid\n\t\t\tcolumns={ 2 }\n\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t\tgap={ gap }\n\t\t>\n\t\t\t{ themeVariations.map( ( variation, index ) => (\n\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t{ ( isFocused ) => (\n\t\t\t\t\t\t<PreviewStyles\n\t\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\t\twithHoverView\n\t\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Variation>\n\t\t\t) ) }\n\t\t</Grid>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAKA,IAAAM,cAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,UAAA,GAAAD,sBAAA,CAAAP,OAAA;AACA,IAAAS,kCAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AAA2C,IAAAW,WAAA,GAAAX,OAAA;AAhB3C;AACA;AACA;;AAQA;AACA;AACA;;AAMA,MAAM;EAAEY;AAAoB,CAAC,GAAG,I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,cAAAE,mBAAA,cAAAA,mBAAA,GAAI,CAAC,CAAC;QAClClB;MACD,CAAC;IACF,CAAE,CAAC,CACH;EACF,CAAC,EAAE,CAAEO,mBAAmB,EAAER,UAAU,EAAEqB,MAAM,EAAErB,UAAU,EAAE0B,GAAG,CAAG,CAAC;EAEjE,oBACC,
|
|
1
|
+
{"version":3,"names":["_coreData","require","_data","_element","_components","_i18n","_blockEditor","_previewStyles","_interopRequireDefault","_variation","_useThemeStyleVariationsByProperty","_lockUnlock","_jsxRuntime","GlobalStylesContext","unlock","blockEditorPrivateApis","StyleVariationsContainer","gap","user","useContext","currentUserStyles","setCurrentUserStyles","useState","userStyles","styles","useEffect","variations","useSelect","select","coreStore","__experimentalGetCurrentThemeGlobalStylesVariations","fullStyleVariations","filter","variation","isVariationWithProperties","themeVariations","useMemo","withEmptyVariation","title","__","settings","map","_variation$settings","blockStyles","blocks","Object","keys","forEach","blockName","css","variationBlockStyles","customCSS","trim","length","jsx","__experimentalGrid","columns","className","children","index","default","isFocused","label","withHoverView"],"sources":["@wordpress/edit-site/src/components/global-styles/style-variations-container.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useContext, useEffect, useMemo, useState } from '@wordpress/element';\nimport { __experimentalGrid as Grid } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport PreviewStyles from './preview-styles';\nimport Variation from './variations/variation';\nimport { isVariationWithProperties } from '../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\n\nexport default function StyleVariationsContainer( { gap = 2 } ) {\n\tconst { user } = useContext( GlobalStylesContext );\n\tconst [ currentUserStyles, setCurrentUserStyles ] = useState( user );\n\tconst userStyles = currentUserStyles?.styles;\n\n\tuseEffect( () => {\n\t\tsetCurrentUserStyles( user );\n\t}, [ user ] );\n\n\tconst variations = useSelect( ( select ) => {\n\t\treturn select(\n\t\t\tcoreStore\n\t\t).__experimentalGetCurrentThemeGlobalStylesVariations();\n\t}, [] );\n\n\t// Filter out variations that are color or typography variations.\n\tconst fullStyleVariations = variations?.filter( ( variation ) => {\n\t\treturn (\n\t\t\t! isVariationWithProperties( variation, [ 'color' ] ) &&\n\t\t\t! isVariationWithProperties( variation, [\n\t\t\t\t'typography',\n\t\t\t\t'spacing',\n\t\t\t] )\n\t\t);\n\t} );\n\n\tconst themeVariations = useMemo( () => {\n\t\tconst withEmptyVariation = [\n\t\t\t{\n\t\t\t\ttitle: __( 'Default' ),\n\t\t\t\tsettings: {},\n\t\t\t\tstyles: {},\n\t\t\t},\n\t\t\t...( fullStyleVariations ?? [] ),\n\t\t];\n\t\treturn [\n\t\t\t...withEmptyVariation.map( ( variation ) => {\n\t\t\t\tconst blockStyles = { ...variation?.styles?.blocks } || {};\n\n\t\t\t\t// We need to copy any user custom CSS to the variation to prevent it being lost\n\t\t\t\t// when switching variations.\n\t\t\t\tif ( userStyles?.blocks ) {\n\t\t\t\t\tObject.keys( userStyles.blocks ).forEach( ( blockName ) => {\n\t\t\t\t\t\t// First get any block specific custom CSS from the current user styles and merge with any custom CSS for\n\t\t\t\t\t\t// that block in the variation.\n\t\t\t\t\t\tif ( userStyles.blocks[ blockName ].css ) {\n\t\t\t\t\t\t\tconst variationBlockStyles =\n\t\t\t\t\t\t\t\tblockStyles[ blockName ] || {};\n\t\t\t\t\t\t\tconst customCSS = {\n\t\t\t\t\t\t\t\tcss: `${\n\t\t\t\t\t\t\t\t\tblockStyles[ blockName ]?.css || ''\n\t\t\t\t\t\t\t\t} ${\n\t\t\t\t\t\t\t\t\tuserStyles.blocks[ blockName ].css.trim() ||\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\tblockStyles[ blockName ] = {\n\t\t\t\t\t\t\t\t...variationBlockStyles,\n\t\t\t\t\t\t\t\t...customCSS,\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\t// Now merge any global custom CSS from current user styles with global custom CSS in the variation.\n\t\t\t\tconst css =\n\t\t\t\t\tuserStyles?.css || variation.styles?.css\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tcss: `${ variation.styles?.css || '' } ${\n\t\t\t\t\t\t\t\t\tuserStyles?.css || ''\n\t\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {};\n\n\t\t\t\tconst blocks =\n\t\t\t\t\tObject.keys( blockStyles ).length > 0\n\t\t\t\t\t\t? { blocks: blockStyles }\n\t\t\t\t\t\t: {};\n\n\t\t\t\tconst styles = {\n\t\t\t\t\t...variation.styles,\n\t\t\t\t\t...css,\n\t\t\t\t\t...blocks,\n\t\t\t\t};\n\t\t\t\treturn {\n\t\t\t\t\t...variation,\n\t\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\t\tstyles,\n\t\t\t\t};\n\t\t\t} ),\n\t\t];\n\t}, [ fullStyleVariations, userStyles?.blocks, userStyles?.css ] );\n\n\tif ( ! fullStyleVariations || fullStyleVariations?.length < 1 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Grid\n\t\t\tcolumns={ 2 }\n\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t\tgap={ gap }\n\t\t>\n\t\t\t{ themeVariations.map( ( variation, index ) => (\n\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t{ ( isFocused ) => (\n\t\t\t\t\t\t<PreviewStyles\n\t\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\t\twithHoverView\n\t\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n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KAAK,EAAG7B,SAAS,EAAEK,KAAO;QAC1ByB,aAAa;QACbF,SAAS,EAAGA,SAAW;QACvB5B,SAAS,EAAGA;MAAW,CACvB;IACD,GARe0B,KASN,CACV;EAAC,CACE,CAAC;AAET","ignoreList":[]}
|
|
@@ -19,6 +19,8 @@ var _screenBlockList = _interopRequireWildcard(require("./screen-block-list"));
|
|
|
19
19
|
var _screenBlock = _interopRequireDefault(require("./screen-block"));
|
|
20
20
|
var _screenTypography = _interopRequireDefault(require("./screen-typography"));
|
|
21
21
|
var _screenTypographyElement = _interopRequireDefault(require("./screen-typography-element"));
|
|
22
|
+
var _fontSize = _interopRequireDefault(require("./font-sizes/font-size"));
|
|
23
|
+
var _fontSizes = _interopRequireDefault(require("./font-sizes/font-sizes"));
|
|
22
24
|
var _screenColors = _interopRequireDefault(require("./screen-colors"));
|
|
23
25
|
var _screenColorPalette = _interopRequireDefault(require("./screen-color-palette"));
|
|
24
26
|
var _screenShadows = require("./screen-shadows");
|
|
@@ -277,6 +279,12 @@ function GlobalStylesUI() {
|
|
|
277
279
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(GlobalStylesNavigationScreen, {
|
|
278
280
|
path: "/typography",
|
|
279
281
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_screenTypography.default, {})
|
|
282
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(GlobalStylesNavigationScreen, {
|
|
283
|
+
path: "/typography/font-sizes/",
|
|
284
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_fontSizes.default, {})
|
|
285
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(GlobalStylesNavigationScreen, {
|
|
286
|
+
path: "/typography/font-sizes/:origin/:slug",
|
|
287
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_fontSize.default, {})
|
|
280
288
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(GlobalStylesNavigationScreen, {
|
|
281
289
|
path: "/typography/text",
|
|
282
290
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_screenTypographyElement.default, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_blocks","_data","_blockEditor","_i18n","_preferences","_icons","_coreData","_element","_screenRoot","_interopRequireDefault","_screenBlockList","_interopRequireWildcard","_screenBlock","_screenTypography","_screenTypographyElement","_screenColors","_screenColorPalette","_screenShadows","_screenLayout","_screenStyleVariations","_styleBook","_screenCss","_screenRevisions","_lockUnlock","_store","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","SLOT_FILL_NAME","useGlobalStylesReset","unlock","blockEditorPrivateApis","Slot","GlobalStylesMenuSlot","Fill","GlobalStylesMenuFill","createSlotFill","exports","GlobalStylesActionMenu","canReset","onReset","toggle","useDispatch","preferencesStore","canEditCSS","useSelect","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","undefined","_links","setEditorCanvasContainerView","editSiteStore","goTo","useNavigator","loadCustomCSS","jsx","children","DropdownMenu","icon","moreVertical","label","__","toggleProps","size","onClose","jsxs","Fragment","MenuGroup","MenuItem","onClick","disabled","GlobalStylesNavigationScreen","className","props","__experimentalNavigatorScreen","filter","Boolean","join","BlockStylesNavigationScreens","parentMenu","blockStyles","blockName","map","style","index","path","name","variation","ContextScreens","blockStyleVariations","getBlockStyles","blocksStore","length","GlobalStylesStyleBook","navigator","location","isSelected","encodeURIComponent","startsWith","onSelect","GlobalStylesBlockLink","selectedBlockName","selectedBlockClientId","getSelectedBlockClientId","getBlockName","blockEditorStore","clientId","blockHasGlobalStyles","useBlockHasGlobalStyles","useEffect","currentPath","newPath","skipFocus","GlobalStylesEditorCanvasContainerLink","editorCanvasContainerView","getEditorCanvasContainerView","isRevisionsOpen","GlobalStylesUI","blocks","getBlockTypes","__experimentalNavigatorProvider","initialPath","element","ScreenShadows","ScreenShadowsEdit","block","_default"],"sources":["@wordpress/edit-site/src/components/global-styles/ui.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n\t__experimentalUseNavigator as useNavigator,\n\tcreateSlotFill,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n} from '@wordpress/components';\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport {\n\tuseBlockHasGlobalStyles,\n\tdefault as ScreenBlockList,\n} from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenTypographyElement from './screen-typography-element';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport { ScreenShadows, ScreenShadowsEdit } from './screen-shadows';\nimport ScreenLayout from './screen-layout';\nimport ScreenStyleVariations from './screen-style-variations';\nimport StyleBook from '../style-book';\nimport ScreenCSS from './screen-css';\nimport ScreenRevisions from './screen-revisions';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst SLOT_FILL_NAME = 'GlobalStylesMenu';\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { goTo } = useNavigator();\n\tconst loadCustomCSS = () => {\n\t\tsetEditorCanvasContainerView( 'global-styles-css' );\n\t\tgoTo( '/css' );\n\t};\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'More' ) }\n\t\t\t\ttoggleProps={ { size: 'compact' } }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ canEditCSS && (\n\t\t\t\t\t\t\t\t<MenuItem onClick={ loadCustomCSS }>\n\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tdisabled={ ! canReset }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset styles' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction GlobalStylesNavigationScreen( { className, ...props } ) {\n\treturn (\n\t\t<NavigatorScreen\n\t\t\tclassName={ [\n\t\t\t\t'edit-site-global-styles-sidebar__navigator-screen',\n\t\t\t\tclassName,\n\t\t\t]\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction BlockStylesNavigationScreens( {\n\tparentMenu,\n\tblockStyles,\n\tblockName,\n} ) {\n\treturn blockStyles.map( ( style, index ) => (\n\t\t<GlobalStylesNavigationScreen\n\t\t\tkey={ index }\n\t\t\tpath={ parentMenu + '/variations/' + style.name }\n\t\t>\n\t\t\t<ScreenBlock name={ blockName } variation={ style.name } />\n\t\t</GlobalStylesNavigationScreen>\n\t) );\n}\n\nfunction ContextScreens( { name, parentMenu = '' } ) {\n\tconst blockStyleVariations = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\tpath={ parentMenu + '/colors/palette' }\n\t\t\t>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ !! blockStyleVariations?.length && (\n\t\t\t\t<BlockStylesNavigationScreens\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\tblockStyles={ blockStyleVariations }\n\t\t\t\t\tblockName={ name }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesStyleBook() {\n\tconst navigator = useNavigator();\n\tconst { path } = navigator.location;\n\treturn (\n\t\t<StyleBook\n\t\t\tisSelected={ ( blockName ) =>\n\t\t\t\t// Match '/blocks/core%2Fbutton' and\n\t\t\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t\t\t// '/blocks/core%2Fbuttons'.\n\t\t\t\tpath === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\t\tpath.startsWith(\n\t\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t\t)\n\t\t\t}\n\t\t\tonSelect={ ( blockName ) => {\n\t\t\t\t// Now go to the selected block.\n\t\t\t\tnavigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction GlobalStylesBlockLink() {\n\tconst navigator = useNavigator();\n\tconst { selectedBlockName, selectedBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSelectedBlockClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tselectedBlockName: getBlockName( clientId ),\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPath = navigator.location.path;\n\t\tif (\n\t\t\tcurrentPath !== '/blocks' &&\n\t\t\t! currentPath.startsWith( '/blocks/' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst newPath = '/blocks/' + encodeURIComponent( selectedBlockName );\n\t\t// Avoid navigating to the same path. This can happen when selecting\n\t\t// a new block of the same type.\n\t\tif ( newPath !== currentPath ) {\n\t\t\tnavigator.goTo( newPath, { skipFocus: true } );\n\t\t}\n\t}, [ selectedBlockClientId, selectedBlockName, blockHasGlobalStyles ] );\n}\n\nfunction GlobalStylesEditorCanvasContainerLink() {\n\tconst { goTo, location } = useNavigator();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\tconst path = location?.path;\n\tconst isRevisionsOpen = path === '/revisions';\n\n\t// If the user switches the editor canvas container view, redirect\n\t// to the appropriate screen. This effectively allows deep linking to the\n\t// desired screens from outside the global styles navigation provider.\n\tuseEffect( () => {\n\t\tswitch ( editorCanvasContainerView ) {\n\t\t\tcase 'global-styles-revisions':\n\t\t\tcase 'global-styles-revisions:style-book':\n\t\t\t\tgoTo( '/revisions' );\n\t\t\t\tbreak;\n\t\t\tcase 'global-styles-css':\n\t\t\t\tgoTo( '/css' );\n\t\t\t\tbreak;\n\t\t\tcase 'style-book':\n\t\t\t\t/*\n\t\t\t\t * The stand-alone style book is open\n\t\t\t\t * and the revisions panel is open,\n\t\t\t\t * close the revisions panel.\n\t\t\t\t * Otherwise keep the style book open while\n\t\t\t\t * browsing global styles panel.\n\t\t\t\t */\n\t\t\t\tif ( isRevisionsOpen ) {\n\t\t\t\t\tgoTo( '/' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t/*\n\t\t\t\t * Example: the user has navigated to \"Browse styles\" or elsewhere\n\t\t\t\t * and changes the editorCanvasContainerView, e.g., closes the style book.\n\t\t\t\t * The panel should not be affected.\n\t\t\t\t * Exclude revisions panel from this behavior,\n\t\t\t\t * as it should close when the editorCanvasContainerView doesn't correspond.\n\t\t\t\t */\n\t\t\t\tif ( path !== '/' && ! isRevisionsOpen ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgoTo( '/' );\n\t\t\t\tbreak;\n\t\t}\n\t}, [ editorCanvasContainerView, isRevisionsOpen, goTo ] );\n}\n\nfunction GlobalStylesUI() {\n\tconst blocks = getBlockTypes();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\treturn (\n\t\t<NavigatorProvider\n\t\t\tclassName=\"edit-site-global-styles-sidebar__navigator-provider\"\n\t\t\tinitialPath=\"/\"\n\t\t>\n\t\t\t<GlobalStylesNavigationScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/variations\">\n\t\t\t\t<ScreenStyleVariations />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography\">\n\t\t\t\t<ScreenTypography />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/text\">\n\t\t\t\t<ScreenTypographyElement element=\"text\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/link\">\n\t\t\t\t<ScreenTypographyElement element=\"link\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/heading\">\n\t\t\t\t<ScreenTypographyElement element=\"heading\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/caption\">\n\t\t\t\t<ScreenTypographyElement element=\"caption\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/button\">\n\t\t\t\t<ScreenTypographyElement element=\"button\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/colors\">\n\t\t\t\t<ScreenColors />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/shadows\">\n\t\t\t\t<ScreenShadows />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/shadows/edit/:category/:slug\">\n\t\t\t\t<ScreenShadowsEdit />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/layout\">\n\t\t\t\t<ScreenLayout />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/css\">\n\t\t\t\t<ScreenCSS />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/revisions\">\n\t\t\t\t<ScreenRevisions />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t\tparentMenu={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t/>\n\t\t\t) ) }\n\n\t\t\t{ 'style-book' === editorCanvasContainerView && (\n\t\t\t\t<GlobalStylesStyleBook />\n\t\t\t) }\n\n\t\t\t<GlobalStylesActionMenu />\n\t\t\t<GlobalStylesBlockLink />\n\t\t\t<GlobalStylesE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CAAI2C,KAAK,iBACpB,IAAA1H,WAAA,CAAAoD,GAAA,EAACiC,cAAc;MAEdF,IAAI,EAAGuC,KAAK,CAACvC,IAAM;MACnBP,UAAU,EAAG,UAAU,GAAGkB,kBAAkB,CAAE4B,KAAK,CAACvC,IAAK;IAAG,GAFtD,gBAAgB,GAAGuC,KAAK,CAACvC,IAG/B,CACA,CAAC,EAED,YAAY,KAAK4B,yBAAyB,iBAC3C,IAAA/G,WAAA,CAAAoD,GAAA,EAACsC,qBAAqB,IAAE,CACxB,eAED,IAAA1F,WAAA,CAAAoD,GAAA,EAACrB,sBAAsB,IAAE,CAAC,eAC1B,IAAA/B,WAAA,CAAAoD,GAAA,EAAC6C,qBAAqB,IAAE,CAAC,eACzB,IAAAjG,WAAA,CAAAoD,GAAA,EAAC0D,qCAAqC,IAAE,CAAC;EAAA,CACvB,CAAC;AAEtB;AAAC,IAAAa,QAAA,GAAA7F,OAAA,CAAAvB,OAAA,GAEc2G,cAAc","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_components","require","_blocks","_data","_blockEditor","_i18n","_preferences","_icons","_coreData","_element","_screenRoot","_interopRequireDefault","_screenBlockList","_interopRequireWildcard","_screenBlock","_screenTypography","_screenTypographyElement","_fontSize","_fontSizes","_screenColors","_screenColorPalette","_screenShadows","_screenLayout","_screenStyleVariations","_styleBook","_screenCss","_screenRevisions","_lockUnlock","_store","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","SLOT_FILL_NAME","useGlobalStylesReset","unlock","blockEditorPrivateApis","Slot","GlobalStylesMenuSlot","Fill","GlobalStylesMenuFill","createSlotFill","exports","GlobalStylesActionMenu","canReset","onReset","toggle","useDispatch","preferencesStore","canEditCSS","useSelect","select","getEntityRecord","__experimentalGetCurrentGlobalStylesId","coreStore","globalStylesId","globalStyles","undefined","_links","setEditorCanvasContainerView","editSiteStore","goTo","useNavigator","loadCustomCSS","jsx","children","DropdownMenu","icon","moreVertical","label","__","toggleProps","size","onClose","jsxs","Fragment","MenuGroup","MenuItem","onClick","disabled","GlobalStylesNavigationScreen","className","props","__experimentalNavigatorScreen","filter","Boolean","join","BlockStylesNavigationScreens","parentMenu","blockStyles","blockName","map","style","index","path","name","variation","ContextScreens","blockStyleVariations","getBlockStyles","blocksStore","length","GlobalStylesStyleBook","navigator","location","isSelected","encodeURIComponent","startsWith","onSelect","GlobalStylesBlockLink","selectedBlockName","selectedBlockClientId","getSelectedBlockClientId","getBlockName","blockEditorStore","clientId","blockHasGlobalStyles","useBlockHasGlobalStyles","useEffect","currentPath","newPath","skipFocus","GlobalStylesEditorCanvasContainerLink","editorCanvasContainerView","getEditorCanvasContainerView","isRevisionsOpen","GlobalStylesUI","blocks","getBlockTypes","__experimentalNavigatorProvider","initialPath","element","ScreenShadows","ScreenShadowsEdit","block","_default"],"sources":["@wordpress/edit-site/src/components/global-styles/ui.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n\t__experimentalUseNavigator as useNavigator,\n\tcreateSlotFill,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n} from '@wordpress/components';\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport {\n\tuseBlockHasGlobalStyles,\n\tdefault as ScreenBlockList,\n} from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenTypographyElement from './screen-typography-element';\nimport FontSize from './font-sizes/font-size';\nimport FontSizes from './font-sizes/font-sizes';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport { ScreenShadows, ScreenShadowsEdit } from './screen-shadows';\nimport ScreenLayout from './screen-layout';\nimport ScreenStyleVariations from './screen-style-variations';\nimport StyleBook from '../style-book';\nimport ScreenCSS from './screen-css';\nimport ScreenRevisions from './screen-revisions';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst SLOT_FILL_NAME = 'GlobalStylesMenu';\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { goTo } = useNavigator();\n\tconst loadCustomCSS = () => {\n\t\tsetEditorCanvasContainerView( 'global-styles-css' );\n\t\tgoTo( '/css' );\n\t};\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'More' ) }\n\t\t\t\ttoggleProps={ { size: 'compact' } }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ canEditCSS && (\n\t\t\t\t\t\t\t\t<MenuItem onClick={ loadCustomCSS }>\n\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tdisabled={ ! canReset }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset styles' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction GlobalStylesNavigationScreen( { className, ...props } ) {\n\treturn (\n\t\t<NavigatorScreen\n\t\t\tclassName={ [\n\t\t\t\t'edit-site-global-styles-sidebar__navigator-screen',\n\t\t\t\tclassName,\n\t\t\t]\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction BlockStylesNavigationScreens( {\n\tparentMenu,\n\tblockStyles,\n\tblockName,\n} ) {\n\treturn blockStyles.map( ( style, index ) => (\n\t\t<GlobalStylesNavigationScreen\n\t\t\tkey={ index }\n\t\t\tpath={ parentMenu + '/variations/' + style.name }\n\t\t>\n\t\t\t<ScreenBlock name={ blockName } variation={ style.name } />\n\t\t</GlobalStylesNavigationScreen>\n\t) );\n}\n\nfunction ContextScreens( { name, parentMenu = '' } ) {\n\tconst blockStyleVariations = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\tpath={ parentMenu + '/colors/palette' }\n\t\t\t>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ !! blockStyleVariations?.length && (\n\t\t\t\t<BlockStylesNavigationScreens\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\tblockStyles={ blockStyleVariations }\n\t\t\t\t\tblockName={ name }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesStyleBook() {\n\tconst navigator = useNavigator();\n\tconst { path } = navigator.location;\n\treturn (\n\t\t<StyleBook\n\t\t\tisSelected={ ( blockName ) =>\n\t\t\t\t// Match '/blocks/core%2Fbutton' and\n\t\t\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t\t\t// '/blocks/core%2Fbuttons'.\n\t\t\t\tpath === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\t\tpath.startsWith(\n\t\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t\t)\n\t\t\t}\n\t\t\tonSelect={ ( blockName ) => {\n\t\t\t\t// Now go to the selected block.\n\t\t\t\tnavigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction GlobalStylesBlockLink() {\n\tconst navigator = useNavigator();\n\tconst { selectedBlockName, selectedBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSelectedBlockClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tselectedBlockName: getBlockName( clientId ),\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPath = navigator.location.path;\n\t\tif (\n\t\t\tcurrentPath !== '/blocks' &&\n\t\t\t! currentPath.startsWith( '/blocks/' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst newPath = '/blocks/' + encodeURIComponent( selectedBlockName );\n\t\t// Avoid navigating to the same path. This can happen when selecting\n\t\t// a new block of the same type.\n\t\tif ( newPath !== currentPath ) {\n\t\t\tnavigator.goTo( newPath, { skipFocus: true } );\n\t\t}\n\t}, [ selectedBlockClientId, selectedBlockName, blockHasGlobalStyles ] );\n}\n\nfunction GlobalStylesEditorCanvasContainerLink() {\n\tconst { goTo, location } = useNavigator();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\tconst path = location?.path;\n\tconst isRevisionsOpen = path === '/revisions';\n\n\t// If the user switches the editor canvas container view, redirect\n\t// to the appropriate screen. This effectively allows deep linking to the\n\t// desired screens from outside the global styles navigation provider.\n\tuseEffect( () => {\n\t\tswitch ( editorCanvasContainerView ) {\n\t\t\tcase 'global-styles-revisions':\n\t\t\tcase 'global-styles-revisions:style-book':\n\t\t\t\tgoTo( '/revisions' );\n\t\t\t\tbreak;\n\t\t\tcase 'global-styles-css':\n\t\t\t\tgoTo( '/css' );\n\t\t\t\tbreak;\n\t\t\tcase 'style-book':\n\t\t\t\t/*\n\t\t\t\t * The stand-alone style book is open\n\t\t\t\t * and the revisions panel is open,\n\t\t\t\t * close the revisions panel.\n\t\t\t\t * Otherwise keep the style book open while\n\t\t\t\t * browsing global styles panel.\n\t\t\t\t */\n\t\t\t\tif ( isRevisionsOpen ) {\n\t\t\t\t\tgoTo( '/' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t/*\n\t\t\t\t * Example: the user has navigated to \"Browse styles\" or elsewhere\n\t\t\t\t * and changes the editorCanvasContainerView, e.g., closes the style book.\n\t\t\t\t * The panel should not be affected.\n\t\t\t\t * Exclude revisions panel from this behavior,\n\t\t\t\t * as it should close when the editorCanvasContainerView doesn't correspond.\n\t\t\t\t */\n\t\t\t\tif ( path !== '/' && ! isRevisionsOpen ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgoTo( '/' );\n\t\t\t\tbreak;\n\t\t}\n\t}, [ editorCanvasContainerView, isRevisionsOpen, goTo ] );\n}\n\nfunction GlobalStylesUI() {\n\tconst blocks = getBlockTypes();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\treturn (\n\t\t<NavigatorProvider\n\t\t\tclassName=\"edit-site-global-styles-sidebar__navigator-provider\"\n\t\t\tinitialPath=\"/\"\n\t\t>\n\t\t\t<GlobalStylesNavigationScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/variations\">\n\t\t\t\t<ScreenStyleVariations />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography\">\n\t\t\t\t<ScreenTypography />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/font-sizes/\">\n\t\t\t\t<FontSizes />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/font-sizes/:origin/:slug\">\n\t\t\t\t<FontSize />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/text\">\n\t\t\t\t<ScreenTypographyElement element=\"text\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/link\">\n\t\t\t\t<ScreenTypographyElement element=\"link\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/heading\">\n\t\t\t\t<ScreenTypographyElement element=\"heading\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/caption\">\n\t\t\t\t<ScreenTypographyElement element=\"caption\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/button\">\n\t\t\t\t<ScreenTypographyElement element=\"button\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/colors\">\n\t\t\t\t<ScreenColors />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/shadows\">\n\t\t\t\t<ScreenShadows />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/shadows/edit/:category/:slug\">\n\t\t\t\t<ScreenShadowsEdit />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/layout\">\n\t\t\t\t<ScreenLayout />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/css\">\n\t\t\t\t<ScreenCSS />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/revisions\">\n\t\t\t\t<ScreenRevisions />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t\tparentMenu={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t/>\n\t\t\t) ) }\n\n\t\t\t{ 'style-book' === editorCanvasContainerView && (\n\t\t\t\t<GlobalStylesStyleBook />\n\t\t\t) }\n\n\t\t\t<GlobalStylesActionMenu />\n\t\t\t<GlobalStylesBlockLink />\n\t\t\t<GlobalStylesEditorCanvasContainerLink />\n\t\t</NavigatorProvider>\n\t);\n}\nexport { GlobalStylesMenuSlot };\nexport default GlobalStylesUI;\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AASA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAIA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAKA,IAAAS,WAAA,GAAAC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B8B,MAAM,CAACpC,GAAG,CAAI2C,KAAK,iBACpB,IAAA1H,WAAA,CAAAoD,GAAA,EAACiC,cAAc;MAEdF,IAAI,EAAGuC,KAAK,CAACvC,IAAM;MACnBP,UAAU,EAAG,UAAU,GAAGkB,kBAAkB,CAAE4B,KAAK,CAACvC,IAAK;IAAG,GAFtD,gBAAgB,GAAGuC,KAAK,CAACvC,IAG/B,CACA,CAAC,EAED,YAAY,KAAK4B,yBAAyB,iBAC3C,IAAA/G,WAAA,CAAAoD,GAAA,EAACsC,qBAAqB,IAAE,CACxB,eAED,IAAA1F,WAAA,CAAAoD,GAAA,EAACrB,sBAAsB,IAAE,CAAC,eAC1B,IAAA/B,WAAA,CAAAoD,GAAA,EAAC6C,qBAAqB,IAAE,CAAC,eACzB,IAAAjG,WAAA,CAAAoD,GAAA,EAAC0D,qCAAqC,IAAE,CAAC;EAAA,CACvB,CAAC;AAEtB;AAAC,IAAAa,QAAA,GAAA7F,OAAA,CAAAvB,OAAA,GAEc2G,cAAc","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_previewColors","_interopRequireDefault","_useThemeStyleVariationsByProperty","_subtitle","_variation","_jsxRuntime","ColorVariations","title","gap","propertiesToFilter","colorVariations","useCurrentMergeThemeStyleVariationsWithUserConfig","length","jsxs","__experimentalVStack","spacing","children","jsx","default","level","__experimentalGrid","map","variation","index","isPill","properties","showTooltip"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-color.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\
|
|
1
|
+
{"version":3,"names":["_components","require","_previewColors","_interopRequireDefault","_useThemeStyleVariationsByProperty","_subtitle","_variation","_jsxRuntime","ColorVariations","title","gap","propertiesToFilter","colorVariations","useCurrentMergeThemeStyleVariationsWithUserConfig","length","jsxs","__experimentalVStack","spacing","children","jsx","default","level","__experimentalGrid","map","variation","index","isPill","properties","showTooltip"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-color.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport StylesPreviewColors from '../preview-colors';\nimport { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\nimport Subtitle from '../subtitle';\nimport Variation from './variation';\n\nexport default function ColorVariations( { title, gap = 2 } ) {\n\tconst propertiesToFilter = [ 'color' ];\n\tconst colorVariations =\n\t\tuseCurrentMergeThemeStyleVariationsWithUserConfig( propertiesToFilter );\n\n\t// Return null if there is only one variation (the default).\n\tif ( colorVariations?.length <= 1 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }\n\t\t\t<Grid spacing={ gap }>\n\t\t\t\t{ colorVariations.map( ( variation, index ) => (\n\t\t\t\t\t<Variation\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\tisPill\n\t\t\t\t\t\tproperties={ propertiesToFilter }\n\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t>\n\t\t\t\t\t\t{ () => <StylesPreviewColors /> }\n\t\t\t\t\t</Variation>\n\t\t\t\t) ) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,cAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,kCAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,UAAA,GAAAH,sBAAA,CAAAF,OAAA;AAAoC,IAAAM,WAAA,GAAAN,OAAA;AAdpC;AACA;AACA;;AAMA;AACA;AACA;;AAMe,SAASO,eAAeA,CAAE;EAAEC,KAAK;EAAEC,GAAG,GAAG;AAAE,CAAC,EAAG;EAC7D,MAAMC,kBAAkB,GAAG,CAAE,OAAO,CAAE;EACtC,MAAMC,eAAe,GACpB,IAAAC,oFAAiD,EAAEF,kBAAmB,CAAC;;EAExE;EACA,IAAKC,eAAe,EAAEE,MAAM,IAAI,CAAC,EAAG;IACnC,OAAO,IAAI;EACZ;EAEA,oBACC,IAAAP,WAAA,CAAAQ,IAAA,EAACf,WAAA,CAAAgB,oBAAM;IAACC,OAAO,EAAG,CAAG;IAAAC,QAAA,GAClBT,KAAK,iBAAI,IAAAF,WAAA,CAAAY,GAAA,EAACd,SAAA,CAAAe,OAAQ;MAACC,KAAK,EAAG,CAAG;MAAAH,QAAA,EAAGT;IAAK,CAAY,CAAC,eACrD,IAAAF,WAAA,CAAAY,GAAA,EAACnB,WAAA,CAAAsB,kBAAI;MAACL,OAAO,EAAGP,GAAK;MAAAQ,QAAA,EAClBN,eAAe,CAACW,GAAG,CAAE,CAAEC,SAAS,EAAEC,KAAK,kBACxC,IAAAlB,WAAA,CAAAY,GAAA,EAACb,UAAA,CAAAc,OAAS;QAETI,SAAS,EAAGA,SAAW;QACvBE,MAAM;QACNC,UAAU,EAAGhB,kBAAoB;QACjCiB,WAAW;QAAAV,QAAA,EAETA,CAAA,kBAAM,IAAAX,WAAA,CAAAY,GAAA,EAACjB,cAAA,CAAAkB,OAAmB,IAAE;MAAC,GANzBK,KAOI,CACV;IAAC,CACE,CAAC;EAAA,CACA,CAAC;AAEX","ignoreList":[]}
|
|
@@ -8,8 +8,8 @@ exports.default = TypographyVariations;
|
|
|
8
8
|
var _components = require("@wordpress/components");
|
|
9
9
|
var _previewTypography = _interopRequireDefault(require("../preview-typography"));
|
|
10
10
|
var _useThemeStyleVariationsByProperty = require("../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property");
|
|
11
|
-
var _variation = _interopRequireDefault(require("./variation"));
|
|
12
11
|
var _subtitle = _interopRequireDefault(require("../subtitle"));
|
|
12
|
+
var _variation = _interopRequireDefault(require("./variation"));
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
/**
|
|
15
15
|
* WordPress dependencies
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_previewTypography","_interopRequireDefault","_useThemeStyleVariationsByProperty","
|
|
1
|
+
{"version":3,"names":["_components","require","_previewTypography","_interopRequireDefault","_useThemeStyleVariationsByProperty","_subtitle","_variation","_jsxRuntime","TypographyVariations","title","gap","propertiesToFilter","typographyVariations","useCurrentMergeThemeStyleVariationsWithUserConfig","length","jsxs","__experimentalVStack","spacing","children","jsx","default","level","__experimentalGrid","columns","className","map","variation","index","properties","showTooltip"],"sources":["@wordpress/edit-site/src/components/global-styles/variations/variations-typography.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport StylesPreviewTypography from '../preview-typography';\nimport { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\nimport Subtitle from '../subtitle';\nimport Variation from './variation';\n\nexport default function TypographyVariations( { title, gap = 2 } ) {\n\tconst propertiesToFilter = [ 'typography' ];\n\tconst typographyVariations =\n\t\tuseCurrentMergeThemeStyleVariationsWithUserConfig( propertiesToFilter );\n\n\t// Return null if there is only one variation (the default).\n\tif ( typographyVariations?.length <= 1 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }\n\t\t\t<Grid\n\t\t\t\tcolumns={ 3 }\n\t\t\t\tgap={ gap }\n\t\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t\t>\n\t\t\t\t{ typographyVariations.map( ( variation, index ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Variation\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t\tproperties={ propertiesToFilter }\n\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ () => (\n\t\t\t\t\t\t\t\t<StylesPreviewTypography\n\t\t\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Variation>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAQA,IAAAC,kBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,kCAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,UAAA,GAAAH,sBAAA,CAAAF,OAAA;AAAoC,IAAAM,WAAA,GAAAN,OAAA;AAdpC;AACA;AACA;;AAMA;AACA;AACA;;AAMe,SAASO,oBAAoBA,CAAE;EAAEC,KAAK;EAAEC,GAAG,GAAG;AAAE,CAAC,EAAG;EAClE,MAAMC,kBAAkB,GAAG,CAAE,YAAY,CAAE;EAC3C,MAAMC,oBAAoB,GACzB,IAAAC,oFAAiD,EAAEF,kBAAmB,CAAC;;EAExE;EACA,IAAKC,oBAAoB,EAAEE,MAAM,IAAI,CAAC,EAAG;IACxC,OAAO,IAAI;EACZ;EAEA,oBACC,IAAAP,WAAA,CAAAQ,IAAA,EAACf,WAAA,CAAAgB,oBAAM;IAACC,OAAO,EAAG,CAAG;IAAAC,QAAA,GAClBT,KAAK,iBAAI,IAAAF,WAAA,CAAAY,GAAA,EAACd,SAAA,CAAAe,OAAQ;MAACC,KAAK,EAAG,CAAG;MAAAH,QAAA,EAAGT;IAAK,CAAY,CAAC,eACrD,IAAAF,WAAA,CAAAY,GAAA,EAACnB,WAAA,CAAAsB,kBAAI;MACJC,OAAO,EAAG,CAAG;MACbb,GAAG,EAAGA,GAAK;MACXc,SAAS,EAAC,oDAAoD;MAAAN,QAAA,EAE5DN,oBAAoB,CAACa,GAAG,CAAE,CAAEC,SAAS,EAAEC,KAAK,KAAM;QACnD,oBACC,IAAApB,WAAA,CAAAY,GAAA,EAACb,UAAA,CAAAc,OAAS;UAETM,SAAS,EAAGA,SAAW;UACvBE,UAAU,EAAGjB,kBAAoB;UACjCkB,WAAW;UAAAX,QAAA,EAETA,CAAA,kBACD,IAAAX,WAAA,CAAAY,GAAA,EAACjB,kBAAA,CAAAkB,OAAuB;YACvBM,SAAS,EAAGA;UAAW,CACvB;QACD,GATKC,KAUI,CAAC;MAEd,CAAE;IAAC,CACE,CAAC;EAAA,CACA,CAAC;AAEX","ignoreList":[]}
|
|
@@ -167,6 +167,12 @@ function Layout({
|
|
|
167
167
|
maxWidth: widths?.content
|
|
168
168
|
},
|
|
169
169
|
children: areas.content
|
|
170
|
+
}), !isMobileViewport && areas.edit && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
171
|
+
className: "edit-site-layout__area",
|
|
172
|
+
style: {
|
|
173
|
+
maxWidth: widths?.edit
|
|
174
|
+
},
|
|
175
|
+
children: areas.edit
|
|
170
176
|
}), !isMobileViewport && areas.preview && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
171
177
|
className: "edit-site-layout__canvas-container",
|
|
172
178
|
children: [canvasResizer, !!canvasSize.width && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|