@wordpress/edit-site 6.4.0 → 6.6.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 +4 -0
- package/build/components/add-new-pattern/index.js +6 -1
- package/build/components/add-new-pattern/index.js.map +1 -1
- package/build/components/add-new-post/index.js +2 -1
- package/build/components/add-new-post/index.js.map +1 -1
- package/build/components/add-new-template/utils.js +2 -2
- package/build/components/add-new-template/utils.js.map +1 -1
- package/build/components/editor/index.js +71 -20
- package/build/components/editor/index.js.map +1 -1
- package/build/components/global-styles/background-panel.js +1 -4
- package/build/components/global-styles/background-panel.js.map +1 -1
- package/build/components/global-styles/font-families.js +3 -4
- package/build/components/global-styles/font-families.js.map +1 -1
- package/build/components/global-styles/font-library-modal/context.js +0 -5
- package/build/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-collection.js +25 -5
- package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build/components/global-styles/font-library-modal/index.js +1 -8
- package/build/components/global-styles/font-library-modal/index.js.map +1 -1
- package/build/components/global-styles/font-library-modal/installed-fonts.js +23 -7
- package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/upload-fonts.js +2 -3
- package/build/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
- package/build/components/global-styles/screen-block.js +5 -7
- package/build/components/global-styles/screen-block.js.map +1 -1
- package/build/components/global-styles/screen-css.js +1 -1
- package/build/components/global-styles/screen-css.js.map +1 -1
- package/build/components/global-styles/screen-typeset.js +40 -0
- package/build/components/global-styles/screen-typeset.js.map +1 -0
- package/build/components/global-styles/screen-typography-element.js +14 -0
- package/build/components/global-styles/screen-typography-element.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +4 -6
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/shadows-edit-panel.js +51 -59
- package/build/components/global-styles/shadows-edit-panel.js.map +1 -1
- package/build/components/global-styles/size-control/index.js +10 -5
- package/build/components/global-styles/size-control/index.js.map +1 -1
- package/build/components/global-styles/typeset-button.js +97 -0
- package/build/components/global-styles/typeset-button.js.map +1 -0
- package/build/components/global-styles/typeset.js +80 -0
- package/build/components/global-styles/typeset.js.map +1 -0
- package/build/components/global-styles/ui.js +4 -0
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles/utils.js +10 -1
- package/build/components/global-styles/utils.js.map +1 -1
- package/build/components/page-patterns/fields.js +230 -0
- package/build/components/page-patterns/fields.js.map +1 -0
- package/build/components/page-patterns/index.js +13 -228
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +29 -1
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/page-templates/fields.js +169 -0
- package/build/components/page-templates/fields.js.map +1 -0
- package/build/components/page-templates/index.js +10 -177
- package/build/components/page-templates/index.js.map +1 -1
- package/build/components/post-edit/index.js +46 -34
- package/build/components/post-edit/index.js.map +1 -1
- package/build/components/post-fields/index.js +50 -28
- package/build/components/post-fields/index.js.map +1 -1
- package/build/components/post-list/index.js +126 -68
- package/build/components/post-list/index.js.map +1 -1
- package/build/components/sidebar-dataviews/add-new-view.js +3 -2
- package/build/components/sidebar-dataviews/add-new-view.js.map +1 -1
- package/build/components/sidebar-dataviews/custom-dataviews-list.js +1 -0
- package/build/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
- package/build/components/sidebar-dataviews/dataview-item.js +2 -3
- package/build/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build/components/sidebar-dataviews/default-views.js +81 -81
- package/build/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build/components/sidebar-dataviews/index.js +3 -42
- package/build/components/sidebar-dataviews/index.js.map +1 -1
- package/build/components/site-hub/index.js +6 -3
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/style-book/index.js +22 -25
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +5 -0
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build/hooks/push-changes-to-global-styles/index.js +3 -3
- package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -4
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build/index.js +0 -2
- package/build/index.js.map +1 -1
- package/build/utils/is-template-removable.js +2 -2
- package/build/utils/is-template-removable.js.map +1 -1
- package/build/utils/is-template-revertable.js +1 -1
- package/build/utils/is-template-revertable.js.map +1 -1
- package/build-module/components/add-new-pattern/index.js +6 -1
- package/build-module/components/add-new-pattern/index.js.map +1 -1
- package/build-module/components/add-new-post/index.js +2 -1
- package/build-module/components/add-new-post/index.js.map +1 -1
- package/build-module/components/add-new-template/utils.js +2 -2
- package/build-module/components/add-new-template/utils.js.map +1 -1
- package/build-module/components/editor/index.js +73 -22
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/global-styles/background-panel.js +1 -4
- package/build-module/components/global-styles/background-panel.js.map +1 -1
- package/build-module/components/global-styles/font-families.js +3 -4
- package/build-module/components/global-styles/font-families.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/context.js +0 -5
- package/build-module/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/font-collection.js +26 -6
- package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/index.js +1 -8
- 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 +23 -7
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js +2 -3
- package/build-module/components/global-styles/font-library-modal/upload-fonts.js.map +1 -1
- package/build-module/components/global-styles/screen-block.js +5 -7
- package/build-module/components/global-styles/screen-block.js.map +1 -1
- package/build-module/components/global-styles/screen-css.js +1 -1
- package/build-module/components/global-styles/screen-css.js.map +1 -1
- package/build-module/components/global-styles/screen-typeset.js +34 -0
- package/build-module/components/global-styles/screen-typeset.js.map +1 -0
- package/build-module/components/global-styles/screen-typography-element.js +14 -0
- package/build-module/components/global-styles/screen-typography-element.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +4 -6
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/shadows-edit-panel.js +52 -60
- package/build-module/components/global-styles/shadows-edit-panel.js.map +1 -1
- package/build-module/components/global-styles/size-control/index.js +10 -5
- package/build-module/components/global-styles/size-control/index.js.map +1 -1
- package/build-module/components/global-styles/typeset-button.js +89 -0
- package/build-module/components/global-styles/typeset-button.js.map +1 -0
- package/build-module/components/global-styles/typeset.js +71 -0
- package/build-module/components/global-styles/typeset.js.map +1 -0
- package/build-module/components/global-styles/ui.js +4 -0
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles/utils.js +10 -1
- package/build-module/components/global-styles/utils.js.map +1 -1
- package/build-module/components/page-patterns/fields.js +223 -0
- package/build-module/components/page-patterns/fields.js.map +1 -0
- package/build-module/components/page-patterns/index.js +14 -231
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +26 -0
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/page-templates/fields.js +160 -0
- package/build-module/components/page-templates/fields.js.map +1 -0
- package/build-module/components/page-templates/index.js +12 -178
- package/build-module/components/page-templates/index.js.map +1 -1
- package/build-module/components/post-edit/index.js +49 -37
- package/build-module/components/post-edit/index.js.map +1 -1
- package/build-module/components/post-fields/index.js +50 -28
- package/build-module/components/post-fields/index.js.map +1 -1
- package/build-module/components/post-list/index.js +128 -70
- package/build-module/components/post-list/index.js.map +1 -1
- package/build-module/components/sidebar-dataviews/add-new-view.js +3 -2
- package/build-module/components/sidebar-dataviews/add-new-view.js.map +1 -1
- package/build-module/components/sidebar-dataviews/custom-dataviews-list.js +1 -0
- package/build-module/components/sidebar-dataviews/custom-dataviews-list.js.map +1 -1
- package/build-module/components/sidebar-dataviews/dataview-item.js +2 -3
- package/build-module/components/sidebar-dataviews/dataview-item.js.map +1 -1
- package/build-module/components/sidebar-dataviews/default-views.js +81 -81
- package/build-module/components/sidebar-dataviews/default-views.js.map +1 -1
- package/build-module/components/sidebar-dataviews/index.js +3 -42
- package/build-module/components/sidebar-dataviews/index.js.map +1 -1
- package/build-module/components/site-hub/index.js +7 -4
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/style-book/index.js +23 -26
- package/build-module/components/style-book/index.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +5 -0
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js +3 -3
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -3
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build-module/index.js +0 -2
- package/build-module/index.js.map +1 -1
- package/build-module/utils/is-template-removable.js +2 -2
- package/build-module/utils/is-template-removable.js.map +1 -1
- package/build-module/utils/is-template-revertable.js +1 -1
- package/build-module/utils/is-template-revertable.js.map +1 -1
- package/build-style/posts-rtl.css +201 -25
- package/build-style/posts.css +201 -25
- package/build-style/style-rtl.css +307 -69
- package/build-style/style.css +307 -69
- package/package.json +41 -41
- package/src/components/add-new-pattern/index.js +8 -3
- package/src/components/add-new-post/index.js +2 -1
- package/src/components/add-new-template/style.scss +1 -1
- package/src/components/add-new-template/utils.js +10 -6
- package/src/components/editor/index.js +80 -22
- package/src/components/editor/style.scss +60 -2
- package/src/components/global-styles/background-panel.js +0 -3
- package/src/components/global-styles/font-families.js +3 -5
- package/src/components/global-styles/font-library-modal/context.js +0 -5
- package/src/components/global-styles/font-library-modal/font-collection.js +34 -10
- package/src/components/global-styles/font-library-modal/index.js +2 -7
- package/src/components/global-styles/font-library-modal/installed-fonts.js +26 -6
- package/src/components/global-styles/font-library-modal/style.scss +2 -2
- package/src/components/global-styles/font-library-modal/upload-fonts.js +2 -2
- package/src/components/global-styles/screen-block.js +2 -4
- package/src/components/global-styles/screen-css.js +3 -1
- package/src/components/global-styles/screen-typeset.js +42 -0
- package/src/components/global-styles/screen-typography-element.js +14 -0
- package/src/components/global-styles/screen-typography.js +4 -4
- package/src/components/global-styles/shadows-edit-panel.js +67 -73
- package/src/components/global-styles/size-control/index.js +9 -6
- package/src/components/global-styles/style.scss +4 -7
- package/src/components/global-styles/typeset-button.js +93 -0
- package/src/components/global-styles/typeset.js +73 -0
- package/src/components/global-styles/ui.js +5 -0
- package/src/components/global-styles/utils.js +13 -1
- package/src/components/layout/style.scss +8 -0
- package/src/components/page-patterns/fields.js +251 -0
- package/src/components/page-patterns/index.js +19 -246
- package/src/components/page-patterns/style.scss +82 -85
- package/src/components/page-patterns/use-patterns.js +33 -0
- package/src/components/page-templates/fields.js +157 -0
- package/src/components/page-templates/index.js +19 -170
- package/src/components/page-templates/style.scss +14 -5
- package/src/components/post-edit/index.js +58 -35
- package/src/components/post-fields/index.js +88 -25
- package/src/components/post-list/index.js +135 -79
- package/src/components/sidebar-dataviews/add-new-view.js +3 -4
- package/src/components/sidebar-dataviews/custom-dataviews-list.js +1 -0
- package/src/components/sidebar-dataviews/dataview-item.js +2 -2
- package/src/components/sidebar-dataviews/default-views.js +95 -95
- package/src/components/sidebar-dataviews/index.js +3 -37
- package/src/components/site-hub/index.js +11 -2
- package/src/components/site-icon/style.scss +4 -1
- package/src/components/style-book/index.js +27 -32
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +5 -0
- package/src/hooks/push-changes-to-global-styles/index.js +3 -3
- package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +2 -3
- package/src/index.js +0 -2
- package/src/utils/is-template-removable.js +4 -2
- package/src/utils/is-template-revertable.js +2 -1
- package/build/utils/clone-deep.js +0 -15
- package/build/utils/clone-deep.js.map +0 -1
- package/build-module/utils/clone-deep.js +0 -9
- package/build-module/utils/clone-deep.js.map +0 -1
- package/src/utils/clone-deep.js +0 -8
package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useSelect","store","coreStore","useContext","useMemo","privateApis","blockEditorPrivateApis","editorPrivateApis","__","
|
|
1
|
+
{"version":3,"names":["useSelect","store","coreStore","useContext","useMemo","privateApis","blockEditorPrivateApis","editorPrivateApis","__","unlock","GlobalStylesContext","areGlobalStyleConfigsEqual","mergeBaseAndUserConfigs","removePropertiesFromObject","object","properties","length","Object","keys","key","includes","hasThemeVariation","title","settings","styles","useCurrentMergeThemeStyleVariationsWithUserConfig","variationsFromTheme","select","_variationsFromTheme","__experimentalGetCurrentThemeGlobalStylesVariations","user","userVariation","propertiesAsString","toString","clonedUserVariation","structuredClone","userVariationWithoutProperties","variationsWithPropertiesAndBase","filter","variation","isVariationWithProperties","map","variationsByProperties","filterObjectByProperties","newObject","forEach","newFilter","variationWithProperties"],"sources":["@wordpress/edit-site/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useContext, useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\nconst { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );\n\n/**\n * Removes all instances of properties from an object.\n *\n * @param {Object} object The object to remove the properties from.\n * @param {string[]} properties The properties to remove.\n * @return {Object} The modified object.\n */\nexport function removePropertiesFromObject( object, properties ) {\n\tif ( ! properties?.length ) {\n\t\treturn object;\n\t}\n\n\tif (\n\t\ttypeof object !== 'object' ||\n\t\t! object ||\n\t\t! Object.keys( object ).length\n\t) {\n\t\treturn object;\n\t}\n\n\tfor ( const key in object ) {\n\t\tif ( properties.includes( key ) ) {\n\t\t\tdelete object[ key ];\n\t\t} else if ( typeof object[ key ] === 'object' ) {\n\t\t\tremovePropertiesFromObject( object[ key ], properties );\n\t\t}\n\t}\n\treturn object;\n}\n\n/**\n * Checks whether a style variation is empty.\n *\n * @param {Object} variation A style variation object.\n * @param {string} variation.title The title of the variation.\n * @param {Object} variation.settings The settings of the variation.\n * @param {Object} variation.styles The styles of the variation.\n * @return {boolean} Whether the variation is empty.\n */\nfunction hasThemeVariation( { title, settings, styles } ) {\n\treturn (\n\t\ttitle === __( 'Default' ) || // Always preserve the default variation.\n\t\tObject.keys( settings ).length > 0 ||\n\t\tObject.keys( styles ).length > 0\n\t);\n}\n\n/**\n * Fetches the current theme style variations that contain only the specified properties\n * and merges them with the user config.\n *\n * @param {string[]} properties The properties to filter by.\n * @return {Object[]|*} The merged object.\n */\nexport function useCurrentMergeThemeStyleVariationsWithUserConfig(\n\tproperties = []\n) {\n\tconst { variationsFromTheme } = useSelect( ( select ) => {\n\t\tconst _variationsFromTheme =\n\t\t\tselect(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations();\n\n\t\treturn {\n\t\t\tvariationsFromTheme: _variationsFromTheme || [],\n\t\t};\n\t}, [] );\n\tconst { user: userVariation } = useContext( GlobalStylesContext );\n\n\tconst propertiesAsString = properties.toString();\n\n\treturn useMemo( () => {\n\t\tconst clonedUserVariation = structuredClone( userVariation );\n\n\t\t// Get user variation and remove the settings for the given property.\n\t\tconst userVariationWithoutProperties = removePropertiesFromObject(\n\t\t\tclonedUserVariation,\n\t\t\tproperties\n\t\t);\n\t\tuserVariationWithoutProperties.title = __( 'Default' );\n\n\t\tconst variationsWithPropertiesAndBase = variationsFromTheme\n\t\t\t.filter( ( variation ) => {\n\t\t\t\treturn isVariationWithProperties( variation, properties );\n\t\t\t} )\n\t\t\t.map( ( variation ) => {\n\t\t\t\treturn mergeBaseAndUserConfigs(\n\t\t\t\t\tuserVariationWithoutProperties,\n\t\t\t\t\tvariation\n\t\t\t\t);\n\t\t\t} );\n\n\t\tconst variationsByProperties = [\n\t\t\tuserVariationWithoutProperties,\n\t\t\t...variationsWithPropertiesAndBase,\n\t\t];\n\n\t\t/*\n\t\t * Filter out variations with no settings or styles.\n\t\t */\n\t\treturn variationsByProperties?.length\n\t\t\t? variationsByProperties.filter( hasThemeVariation )\n\t\t\t: [];\n\t}, [ propertiesAsString, userVariation, variationsFromTheme ] );\n}\n\n/**\n * Returns a new object, with properties specified in `properties` array.,\n * maintain the original object tree structure.\n * The function is recursive, so it will perform a deep search for the given properties.\n * E.g., the function will return `{ a: { b: { c: { test: 1 } } } }` if the properties are `[ 'test' ]`.\n *\n * @param {Object} object The object to filter\n * @param {string[]} properties The properties to filter by\n * @return {Object} The merged object.\n */\nexport const filterObjectByProperties = ( object, properties ) => {\n\tif ( ! object || ! properties?.length ) {\n\t\treturn {};\n\t}\n\n\tconst newObject = {};\n\tObject.keys( object ).forEach( ( key ) => {\n\t\tif ( properties.includes( key ) ) {\n\t\t\tnewObject[ key ] = object[ key ];\n\t\t} else if ( typeof object[ key ] === 'object' ) {\n\t\t\tconst newFilter = filterObjectByProperties(\n\t\t\t\tobject[ key ],\n\t\t\t\tproperties\n\t\t\t);\n\t\t\tif ( Object.keys( newFilter ).length ) {\n\t\t\t\tnewObject[ key ] = newFilter;\n\t\t\t}\n\t\t}\n\t} );\n\treturn newObject;\n};\n\n/**\n * Compares a style variation to the same variation filtered by the specified properties.\n * Returns true if the variation contains only the properties specified.\n *\n * @param {Object} variation The variation to compare.\n * @param {string[]} properties The properties to compare.\n * @return {boolean} Whether the variation contains only the specified properties.\n */\nexport function isVariationWithProperties( variation, properties ) {\n\tconst variationWithProperties = filterObjectByProperties(\n\t\tstructuredClone( variation ),\n\t\tproperties\n\t);\n\n\treturn areGlobalStyleConfigsEqual( variationWithProperties, variation );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,KAAK,IAAIC,SAAS,QAAQ,sBAAsB;AACzD,SAASC,UAAU,EAAEC,OAAO,QAAQ,oBAAoB;AACxD,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;AAC/E,SAASD,WAAW,IAAIE,iBAAiB,QAAQ,mBAAmB;AACpE,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAE1C,MAAM;EAAEC,mBAAmB;EAAEC;AAA2B,CAAC,GAAGF,MAAM,CACjEH,sBACD,CAAC;AACD,MAAM;EAAEM;AAAwB,CAAC,GAAGH,MAAM,CAAEF,iBAAkB,CAAC;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASM,0BAA0BA,CAAEC,MAAM,EAAEC,UAAU,EAAG;EAChE,IAAK,CAAEA,UAAU,EAAEC,MAAM,EAAG;IAC3B,OAAOF,MAAM;EACd;EAEA,IACC,OAAOA,MAAM,KAAK,QAAQ,IAC1B,CAAEA,MAAM,IACR,CAAEG,MAAM,CAACC,IAAI,CAAEJ,MAAO,CAAC,CAACE,MAAM,EAC7B;IACD,OAAOF,MAAM;EACd;EAEA,KAAM,MAAMK,GAAG,IAAIL,MAAM,EAAG;IAC3B,IAAKC,UAAU,CAACK,QAAQ,CAAED,GAAI,CAAC,EAAG;MACjC,OAAOL,MAAM,CAAEK,GAAG,CAAE;IACrB,CAAC,MAAM,IAAK,OAAOL,MAAM,CAAEK,GAAG,CAAE,KAAK,QAAQ,EAAG;MAC/CN,0BAA0B,CAAEC,MAAM,CAAEK,GAAG,CAA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J,yBAAyBA,CAAED,SAAS,EAAExB,UAAU,EAAG;EAClE,MAAMgC,uBAAuB,GAAGJ,wBAAwB,CACvDR,eAAe,CAAEI,SAAU,CAAC,EAC5BxB,UACD,CAAC;EAED,OAAOJ,0BAA0B,CAAEoC,uBAAuB,EAAER,SAAU,CAAC;AACxE","ignoreList":[]}
|
package/build-module/index.js
CHANGED
|
@@ -19,7 +19,6 @@ import { unlock } from './lock-unlock';
|
|
|
19
19
|
import App from './components/app';
|
|
20
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
21
|
const {
|
|
22
|
-
registerDefaultActions,
|
|
23
22
|
registerCoreBlockBindingsSources,
|
|
24
23
|
bootstrapBlockBindingsSourcesFromServer
|
|
25
24
|
} = unlock(editorPrivateApis);
|
|
@@ -52,7 +51,6 @@ export function initializeEditor(id, settings) {
|
|
|
52
51
|
enableFSEBlocks: true
|
|
53
52
|
});
|
|
54
53
|
}
|
|
55
|
-
registerDefaultActions();
|
|
56
54
|
|
|
57
55
|
// We dispatch actions and update the store synchronously before rendering
|
|
58
56
|
// so that we won't trigger unnecessary re-renders with useEffect.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalGetCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","dispatch","deprecated","createRoot","StrictMode","editorStore","privateApis","editorPrivateApis","preferencesStore","registerLegacyWidgetBlock","registerWidgetGroupBlock","editSiteStore","unlock","App","jsx","_jsx","
|
|
1
|
+
{"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalGetCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","dispatch","deprecated","createRoot","StrictMode","editorStore","privateApis","editorPrivateApis","preferencesStore","registerLegacyWidgetBlock","registerWidgetGroupBlock","editSiteStore","unlock","App","jsx","_jsx","registerCoreBlockBindingsSources","bootstrapBlockBindingsSourcesFromServer","initializeEditor","id","settings","target","document","getElementById","root","reapplyBlockTypeFilters","coreBlocks","filter","name","blockBindingsSources","setFreeformFallbackBlockName","inserter","globalThis","IS_GUTENBERG_PLUGIN","enableFSEBlocks","setDefaults","welcomeGuide","welcomeGuideStyles","welcomeGuidePage","welcomeGuideTemplate","allowRightClickOverrides","distractionFree","editorMode","fixedToolbar","focusMode","inactivePanels","keepCaretInsideBlock","openPanels","showBlockBreadcrumbs","showListViewByDefault","updateSettings","updateEditorSettings","defaultTemplateTypes","defaultTemplatePartAreas","window","addEventListener","e","preventDefault","render","children","reinitializeEditor","since","version","default","PluginTemplateSettingPanel","initializePostsDashboard"],"sources":["@wordpress/edit-site/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport { store as editSiteStore } from './store';\nimport { unlock } from './lock-unlock';\nimport App from './components/app';\n\nconst {\n\tregisterCoreBlockBindingsSources,\n\tbootstrapBlockBindingsSourcesFromServer,\n} = unlock( editorPrivateApis );\n\n/**\n * Initializes the site editor screen.\n *\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tbootstrapBlockBindingsSourcesFromServer( settings?.blockBindingsSources );\n\tregisterCoreBlockBindingsSources();\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t} );\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Keep the defaultTemplateTypes in the core/editor settings too,\n\t// so that they can be selected with core/editor selectors in any editor.\n\t// This is needed because edit-site doesn't initialize with EditorProvider,\n\t// which internally uses updateEditorSettings as well.\n\tdispatch( editorStore ).updateEditorSettings( {\n\t\tdefaultTemplateTypes: settings.defaultTemplateTypes,\n\t\tdefaultTemplatePartAreas: settings.defaultTemplatePartAreas,\n\t} );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<App />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editSite.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as PluginTemplateSettingPanel } from './components/plugin-template-setting-panel';\nexport { store } from './store';\nexport * from './deprecated';\n\n// Temporary: While the posts dashboard is being iterated on\n// it's being built in the same package as the site editor.\nexport { initializePostsDashboard } from './posts';\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;AACxD,SACCC,kBAAkB,EAClBC,2BAA2B,EAC3BC,4CAA4C,QACtC,0BAA0B;AACjC,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,UAAU,EAAEC,UAAU,QAAQ,oBAAoB;AAC3D,SACCR,KAAK,IAAIS,WAAW,EACpBC,WAAW,IAAIC,iBAAiB,QAC1B,mBAAmB;AAC1B,SAASX,KAAK,IAAIY,gBAAgB,QAAQ,wBAAwB;AAClE,SACCC,yBAAyB,EACzBC,wBAAwB,QAClB,oBAAoB;;AAE3B;AACA;AACA;AACA,OAAO,SAAS;AAChB,SAASd,KAAK,IAAIe,aAAa,QAAQ,SAAS;AAChD,SAASC,MAAM,QAAQ,eAAe;AACtC,OAAOC,GAAG,MAAM,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnC,MAAM;EACLC,gCAAgC;EAChCC;AACD,CAAC,GAAGL,MAAM,CAAEL,iBAAkB,CAAC;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASW,gBAAgBA,CAAEC,EAAE,EAAEC,QAAQ,EAAG;EAChD,MAAMC,MAAM,GAAGC,QAAQ,CAACC,cAAc,CAAEJ,EAAG,CAAC;EAC5C,MAAMK,IAAI,GAAGrB,UAAU,CAAEkB,MAAO,CAAC;EAEjCpB,QAAQ,CAAEJ,WAAY,CAAC,CAAC4B,uBAAuB,CAAC,CAAC;EACjD,MAAMC,UAAU,GAAG3B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AC7CC,oBAAoB,EAAEhC,QAAQ,CAACgC,oBAAoB;IACnDC,wBAAwB,EAAEjC,QAAQ,CAACiC;EACpC,CAAE,CAAC;;EAEH;EACAC,MAAM,CAACC,gBAAgB,CAAE,UAAU,EAAIC,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EACzEH,MAAM,CAACC,gBAAgB,CAAE,MAAM,EAAIC,CAAC,IAAMA,CAAC,CAACC,cAAc,CAAC,CAAC,EAAE,KAAM,CAAC;EAErEjC,IAAI,CAACkC,MAAM,eACV3C,IAAA,CAACX,UAAU;IAAAuD,QAAA,eACV5C,IAAA,CAACF,GAAG,IAAE;EAAC,CACI,CACb,CAAC;EAED,OAAOW,IAAI;AACZ;AAEA,OAAO,SAASoC,kBAAkBA,CAAA,EAAG;EACpC1D,UAAU,CAAE,gCAAgC,EAAE;IAC7C2D,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;AAEA,SAASC,OAAO,IAAIC,0BAA0B,QAAQ,4CAA4C;AAClG,SAASpE,KAAK,QAAQ,SAAS;AAC/B,cAAc,cAAc;;AAE5B;AACA;AACA,SAASqE,wBAAwB,QAAQ,SAAS","ignoreList":[]}
|
|
@@ -7,12 +7,12 @@ import { TEMPLATE_ORIGINS } from './constants';
|
|
|
7
7
|
* Check if a template is removable.
|
|
8
8
|
*
|
|
9
9
|
* @param {Object} template The template entity to check.
|
|
10
|
-
* @return {boolean} Whether the template is
|
|
10
|
+
* @return {boolean} Whether the template is removable.
|
|
11
11
|
*/
|
|
12
12
|
export default function isTemplateRemovable(template) {
|
|
13
13
|
if (!template) {
|
|
14
14
|
return false;
|
|
15
15
|
}
|
|
16
|
-
return template.source === TEMPLATE_ORIGINS.custom && !template.has_theme_file;
|
|
16
|
+
return template.source === TEMPLATE_ORIGINS.custom && !Boolean(template.plugin) && !template.has_theme_file;
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=is-template-removable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TEMPLATE_ORIGINS","isTemplateRemovable","template","source","custom","has_theme_file"],"sources":["@wordpress/edit-site/src/utils/is-template-removable.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { TEMPLATE_ORIGINS } from './constants';\n\n/**\n * Check if a template is removable.\n *\n * @param {Object} template The template entity to check.\n * @return {boolean} Whether the template is
|
|
1
|
+
{"version":3,"names":["TEMPLATE_ORIGINS","isTemplateRemovable","template","source","custom","Boolean","plugin","has_theme_file"],"sources":["@wordpress/edit-site/src/utils/is-template-removable.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { TEMPLATE_ORIGINS } from './constants';\n\n/**\n * Check if a template is removable.\n *\n * @param {Object} template The template entity to check.\n * @return {boolean} Whether the template is removable.\n */\nexport default function isTemplateRemovable( template ) {\n\tif ( ! template ) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\ttemplate.source === TEMPLATE_ORIGINS.custom &&\n\t\t! Boolean( template.plugin ) &&\n\t\t! template.has_theme_file\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAgB,QAAQ,aAAa;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,mBAAmBA,CAAEC,QAAQ,EAAG;EACvD,IAAK,CAAEA,QAAQ,EAAG;IACjB,OAAO,KAAK;EACb;EAEA,OACCA,QAAQ,CAACC,MAAM,KAAKH,gBAAgB,CAACI,MAAM,IAC3C,CAAEC,OAAO,CAAEH,QAAQ,CAACI,MAAO,CAAC,IAC5B,CAAEJ,QAAQ,CAACK,cAAc;AAE3B","ignoreList":[]}
|
|
@@ -14,7 +14,7 @@ export default function isTemplateRevertable(template) {
|
|
|
14
14
|
return false;
|
|
15
15
|
}
|
|
16
16
|
/* eslint-disable camelcase */
|
|
17
|
-
return template?.source === TEMPLATE_ORIGINS.custom && template?.has_theme_file;
|
|
17
|
+
return template?.source === TEMPLATE_ORIGINS.custom && (Boolean(template?.plugin) || template?.has_theme_file);
|
|
18
18
|
/* eslint-enable camelcase */
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=is-template-revertable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TEMPLATE_ORIGINS","isTemplateRevertable","template","source","custom","has_theme_file"],"sources":["@wordpress/edit-site/src/utils/is-template-revertable.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { TEMPLATE_ORIGINS } from './constants';\n\n/**\n * Check if a template is revertable to its original theme-provided template file.\n *\n * @param {Object} template The template entity to check.\n * @return {boolean} Whether the template is revertable.\n */\nexport default function isTemplateRevertable( template ) {\n\tif ( ! template ) {\n\t\treturn false;\n\t}\n\t/* eslint-disable camelcase */\n\treturn (\n\t\ttemplate?.source === TEMPLATE_ORIGINS.custom
|
|
1
|
+
{"version":3,"names":["TEMPLATE_ORIGINS","isTemplateRevertable","template","source","custom","Boolean","plugin","has_theme_file"],"sources":["@wordpress/edit-site/src/utils/is-template-revertable.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { TEMPLATE_ORIGINS } from './constants';\n\n/**\n * Check if a template is revertable to its original theme-provided template file.\n *\n * @param {Object} template The template entity to check.\n * @return {boolean} Whether the template is revertable.\n */\nexport default function isTemplateRevertable( template ) {\n\tif ( ! template ) {\n\t\treturn false;\n\t}\n\t/* eslint-disable camelcase */\n\treturn (\n\t\ttemplate?.source === TEMPLATE_ORIGINS.custom &&\n\t\t( Boolean( template?.plugin ) || template?.has_theme_file )\n\t);\n\t/* eslint-enable camelcase */\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAgB,QAAQ,aAAa;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,oBAAoBA,CAAEC,QAAQ,EAAG;EACxD,IAAK,CAAEA,QAAQ,EAAG;IACjB,OAAO,KAAK;EACb;EACA;EACA,OACCA,QAAQ,EAAEC,MAAM,KAAKH,gBAAgB,CAACI,MAAM,KAC1CC,OAAO,CAAEH,QAAQ,EAAEI,MAAO,CAAC,IAAIJ,QAAQ,EAAEK,cAAc,CAAE;EAE5D;AACD","ignoreList":[]}
|
|
@@ -35,10 +35,13 @@
|
|
|
35
35
|
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
|
36
36
|
*/
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Radius scale.
|
|
39
|
+
*/
|
|
40
|
+
/**
|
|
41
|
+
* Elevation scale.
|
|
39
42
|
*/
|
|
40
43
|
/**
|
|
41
|
-
*
|
|
44
|
+
* Dimensions.
|
|
42
45
|
*/
|
|
43
46
|
/**
|
|
44
47
|
* Editor widths.
|
|
@@ -116,7 +119,8 @@
|
|
|
116
119
|
flex-direction: column;
|
|
117
120
|
}
|
|
118
121
|
|
|
119
|
-
.dataviews__view-actions
|
|
122
|
+
.dataviews__view-actions,
|
|
123
|
+
.dataviews-filters__container {
|
|
120
124
|
box-sizing: border-box;
|
|
121
125
|
padding: 16px 48px;
|
|
122
126
|
flex-shrink: 0;
|
|
@@ -125,14 +129,12 @@
|
|
|
125
129
|
transition: padding ease-out 0.1s;
|
|
126
130
|
}
|
|
127
131
|
@media (prefers-reduced-motion: reduce) {
|
|
128
|
-
.dataviews__view-actions
|
|
132
|
+
.dataviews__view-actions,
|
|
133
|
+
.dataviews-filters__container {
|
|
129
134
|
transition-duration: 0s;
|
|
130
135
|
transition-delay: 0s;
|
|
131
136
|
}
|
|
132
137
|
}
|
|
133
|
-
.dataviews__view-actions .components-search-control .components-base-control__field {
|
|
134
|
-
max-width: 240px;
|
|
135
|
-
}
|
|
136
138
|
|
|
137
139
|
.dataviews-view-list__primary-field,
|
|
138
140
|
.dataviews-view-grid__primary-field,
|
|
@@ -204,12 +206,10 @@
|
|
|
204
206
|
|
|
205
207
|
/* stylelint-disable-next-line scss/at-rule-no-unknown -- '@container' not globally permitted */
|
|
206
208
|
@container (max-width: 430px) {
|
|
207
|
-
.dataviews__view-actions
|
|
209
|
+
.dataviews__view-actions,
|
|
210
|
+
.dataviews-filters__container {
|
|
208
211
|
padding: 12px 24px;
|
|
209
212
|
}
|
|
210
|
-
.dataviews__view-actions .components-search-control .components-base-control__field {
|
|
211
|
-
max-width: 112px;
|
|
212
|
-
}
|
|
213
213
|
|
|
214
214
|
.dataviews-view-grid,
|
|
215
215
|
.dataviews-no-results,
|
|
@@ -271,6 +271,10 @@
|
|
|
271
271
|
position: relative;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
+
.dataviews-filters__container {
|
|
275
|
+
padding-top: 0;
|
|
276
|
+
}
|
|
277
|
+
|
|
274
278
|
.dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true], .dataviews-filters__reset-button.dataviews-filters__reset-button[aria-disabled=true]:hover {
|
|
275
279
|
opacity: 0;
|
|
276
280
|
}
|
|
@@ -504,6 +508,33 @@
|
|
|
504
508
|
width: 24px;
|
|
505
509
|
}
|
|
506
510
|
|
|
511
|
+
.dataviews-filters__container-visibility-toggle {
|
|
512
|
+
position: relative;
|
|
513
|
+
flex-shrink: 0;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.dataviews-filters-toggle__count {
|
|
517
|
+
position: absolute;
|
|
518
|
+
top: 0;
|
|
519
|
+
left: 0;
|
|
520
|
+
transform: translate(-50%, -50%);
|
|
521
|
+
background: var(--wp-admin-theme-color, #3858e9);
|
|
522
|
+
height: 16px;
|
|
523
|
+
min-width: 16px;
|
|
524
|
+
line-height: 16px;
|
|
525
|
+
padding: 0 4px;
|
|
526
|
+
text-align: center;
|
|
527
|
+
border-radius: 8px;
|
|
528
|
+
font-size: 11px;
|
|
529
|
+
outline: var(--wp-admin-border-width-focus) solid #fff;
|
|
530
|
+
color: #fff;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.dataviews-search {
|
|
534
|
+
width: -moz-fit-content;
|
|
535
|
+
width: fit-content;
|
|
536
|
+
}
|
|
537
|
+
|
|
507
538
|
.dataviews-pagination {
|
|
508
539
|
position: sticky;
|
|
509
540
|
bottom: 0;
|
|
@@ -511,7 +542,6 @@
|
|
|
511
542
|
background-color: #fff;
|
|
512
543
|
padding: 12px 48px;
|
|
513
544
|
border-top: 1px solid #f0f0f0;
|
|
514
|
-
color: #757575;
|
|
515
545
|
flex-shrink: 0;
|
|
516
546
|
transition: padding ease-out 0.1s;
|
|
517
547
|
}
|
|
@@ -522,11 +552,16 @@
|
|
|
522
552
|
}
|
|
523
553
|
}
|
|
524
554
|
|
|
525
|
-
.dataviews-pagination__page-
|
|
555
|
+
.dataviews-pagination__page-select {
|
|
526
556
|
font-size: 11px;
|
|
527
|
-
text-transform: uppercase;
|
|
528
557
|
font-weight: 500;
|
|
529
|
-
|
|
558
|
+
text-transform: uppercase;
|
|
559
|
+
}
|
|
560
|
+
@media (min-width: 600px) {
|
|
561
|
+
.dataviews-pagination__page-select .components-select-control__input {
|
|
562
|
+
font-size: 11px !important;
|
|
563
|
+
font-weight: 500;
|
|
564
|
+
}
|
|
530
565
|
}
|
|
531
566
|
|
|
532
567
|
/* stylelint-disable-next-line scss/at-rule-no-unknown -- '@container' not globally permitted */
|
|
@@ -553,6 +588,50 @@
|
|
|
553
588
|
margin: 0;
|
|
554
589
|
}
|
|
555
590
|
|
|
591
|
+
.dataviews-view-config {
|
|
592
|
+
width: 320px;
|
|
593
|
+
/* stylelint-disable-next-line property-no-unknown -- the linter needs to be updated to accepted the container-type property */
|
|
594
|
+
container-type: inline-size;
|
|
595
|
+
padding: 16px;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.dataviews-view-config__sort-direction .components-toggle-group-control-option-base {
|
|
599
|
+
text-transform: uppercase;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
.dataviews-settings-section__title.dataviews-settings-section__title {
|
|
603
|
+
line-height: 24px;
|
|
604
|
+
font-size: 15px;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
.dataviews-settings-section__sidebar {
|
|
608
|
+
grid-column: span 4;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
.dataviews-settings-section__content,
|
|
612
|
+
.dataviews-settings-section__content > * {
|
|
613
|
+
grid-column: span 8;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.dataviews-settings-section__content .is-divided-in-two {
|
|
617
|
+
display: contents;
|
|
618
|
+
}
|
|
619
|
+
.dataviews-settings-section__content .is-divided-in-two > * {
|
|
620
|
+
grid-column: span 4;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/* stylelint-disable-next-line scss/at-rule-no-unknown -- '@container' not globally permitted */
|
|
624
|
+
@container (max-width: 500px) {
|
|
625
|
+
.dataviews-settings-section.dataviews-settings-section {
|
|
626
|
+
grid-template-columns: repeat(2, 1fr);
|
|
627
|
+
}
|
|
628
|
+
.dataviews-settings-section.dataviews-settings-section .dataviews-settings-section__sidebar {
|
|
629
|
+
grid-column: span 2;
|
|
630
|
+
}
|
|
631
|
+
.dataviews-settings-section.dataviews-settings-section .dataviews-settings-section__content {
|
|
632
|
+
grid-column: span 2;
|
|
633
|
+
}
|
|
634
|
+
}
|
|
556
635
|
.dataviews-view-grid {
|
|
557
636
|
margin-bottom: auto;
|
|
558
637
|
grid-template-rows: max-content;
|
|
@@ -568,6 +647,7 @@
|
|
|
568
647
|
.dataviews-view-grid .dataviews-view-grid__card {
|
|
569
648
|
height: 100%;
|
|
570
649
|
justify-content: flex-start;
|
|
650
|
+
position: relative;
|
|
571
651
|
}
|
|
572
652
|
.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-actions {
|
|
573
653
|
padding: 8px 0 4px;
|
|
@@ -578,6 +658,10 @@
|
|
|
578
658
|
.dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-value {
|
|
579
659
|
color: #1e1e1e;
|
|
580
660
|
}
|
|
661
|
+
.dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__media::after {
|
|
662
|
+
background-color: rgba(var(--wp-admin-theme-color--rgb), 0.08);
|
|
663
|
+
box-shadow: inset 0 0 0 1px var(--wp-admin-theme-color);
|
|
664
|
+
}
|
|
581
665
|
.dataviews-view-grid .dataviews-view-grid__media {
|
|
582
666
|
width: 100%;
|
|
583
667
|
min-height: 200px;
|
|
@@ -610,10 +694,18 @@
|
|
|
610
694
|
.dataviews-view-grid .dataviews-view-grid__fields:not(:empty) {
|
|
611
695
|
padding: 0 0 12px;
|
|
612
696
|
}
|
|
697
|
+
.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field-value:not(:empty) {
|
|
698
|
+
min-height: 24px;
|
|
699
|
+
line-height: 20px;
|
|
700
|
+
padding-top: 2px;
|
|
701
|
+
}
|
|
613
702
|
.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field {
|
|
614
703
|
align-items: flex-start;
|
|
615
704
|
min-height: 24px;
|
|
616
705
|
}
|
|
706
|
+
.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field:not(:has(.dataviews-view-grid__field-value:not(:empty))) {
|
|
707
|
+
display: none;
|
|
708
|
+
}
|
|
617
709
|
.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field:not(.is-column) {
|
|
618
710
|
align-items: center;
|
|
619
711
|
}
|
|
@@ -671,15 +763,24 @@
|
|
|
671
763
|
}
|
|
672
764
|
}
|
|
673
765
|
|
|
674
|
-
.dataviews-density-picker__range-control {
|
|
675
|
-
width: 200px;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
766
|
.dataviews-view-grid__field-value:empty,
|
|
679
767
|
.dataviews-view-grid__field:empty {
|
|
680
768
|
display: none;
|
|
681
769
|
}
|
|
682
770
|
|
|
771
|
+
.dataviews-view-grid__card .dataviews-selection-checkbox {
|
|
772
|
+
position: absolute;
|
|
773
|
+
top: -9999em;
|
|
774
|
+
right: 8px;
|
|
775
|
+
z-index: 1;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
.dataviews-view-grid__card:hover .dataviews-selection-checkbox,
|
|
779
|
+
.dataviews-view-grid__card:focus-within .dataviews-selection-checkbox,
|
|
780
|
+
.dataviews-view-grid__card.is-selected .dataviews-selection-checkbox {
|
|
781
|
+
top: 8px;
|
|
782
|
+
}
|
|
783
|
+
|
|
683
784
|
.dataviews-view-list {
|
|
684
785
|
margin: 0 0 auto;
|
|
685
786
|
}
|
|
@@ -820,7 +921,10 @@
|
|
|
820
921
|
display: none;
|
|
821
922
|
}
|
|
822
923
|
.dataviews-view-list .dataviews-view-list__fields .dataviews-view-list__field-value {
|
|
823
|
-
|
|
924
|
+
min-height: 24px;
|
|
925
|
+
line-height: 20px;
|
|
926
|
+
display: flex;
|
|
927
|
+
align-items: center;
|
|
824
928
|
}
|
|
825
929
|
.dataviews-view-list + .dataviews-pagination {
|
|
826
930
|
justify-content: space-between;
|
|
@@ -997,6 +1101,68 @@
|
|
|
997
1101
|
}
|
|
998
1102
|
}
|
|
999
1103
|
|
|
1104
|
+
.dataviews-controls__datetime {
|
|
1105
|
+
border: none;
|
|
1106
|
+
padding: 0;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
.dataforms-layouts-panel__field {
|
|
1110
|
+
width: 100%;
|
|
1111
|
+
min-height: 32px;
|
|
1112
|
+
justify-content: flex-start !important;
|
|
1113
|
+
align-items: flex-start !important;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
.dataforms-layouts-panel__field-label {
|
|
1117
|
+
width: 38%;
|
|
1118
|
+
flex-shrink: 0;
|
|
1119
|
+
min-height: 32px;
|
|
1120
|
+
display: flex;
|
|
1121
|
+
align-items: center;
|
|
1122
|
+
padding: 6px 0;
|
|
1123
|
+
line-height: 20px;
|
|
1124
|
+
-webkit-hyphens: auto;
|
|
1125
|
+
hyphens: auto;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
.dataforms-layouts-panel__field-control {
|
|
1129
|
+
flex-grow: 1;
|
|
1130
|
+
min-height: 32px;
|
|
1131
|
+
display: flex;
|
|
1132
|
+
align-items: center;
|
|
1133
|
+
}
|
|
1134
|
+
.dataforms-layouts-panel__field-control .components-button {
|
|
1135
|
+
max-width: 100%;
|
|
1136
|
+
text-align: right;
|
|
1137
|
+
white-space: normal;
|
|
1138
|
+
text-wrap: balance;
|
|
1139
|
+
text-wrap: pretty;
|
|
1140
|
+
min-height: 32px;
|
|
1141
|
+
}
|
|
1142
|
+
.dataforms-layouts-panel__field-control .components-dropdown {
|
|
1143
|
+
max-width: 100%;
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
.dataforms-layouts-panel__field-dropdown .components-popover__content {
|
|
1147
|
+
min-width: 320px;
|
|
1148
|
+
padding: 16px;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
.dataforms-layouts-panel__dropdown-header {
|
|
1152
|
+
margin-bottom: 16px;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
[class].dataforms-layouts-panel__dropdown-header-action {
|
|
1156
|
+
height: 24px;
|
|
1157
|
+
}
|
|
1158
|
+
[class].dataforms-layouts-panel__dropdown-header-action.has-icon {
|
|
1159
|
+
min-width: 24px;
|
|
1160
|
+
padding: 0;
|
|
1161
|
+
}
|
|
1162
|
+
[class].dataforms-layouts-panel__dropdown-header-action:not(.has-icon) {
|
|
1163
|
+
text-decoration: underline;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1000
1166
|
.edit-site-layout {
|
|
1001
1167
|
height: 100%;
|
|
1002
1168
|
background: #1e1e1e;
|
|
@@ -1132,6 +1298,13 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
1132
1298
|
animation-delay: 255ms;
|
|
1133
1299
|
}
|
|
1134
1300
|
|
|
1301
|
+
@media (prefers-reduced-motion) {
|
|
1302
|
+
::view-transition-group(*),
|
|
1303
|
+
::view-transition-old(*),
|
|
1304
|
+
::view-transition-new(*) {
|
|
1305
|
+
animation: none !important;
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1135
1308
|
/* stylelint-enable */
|
|
1136
1309
|
.edit-site-layout.is-full-canvas .edit-site-layout__sidebar-region .edit-site-layout__view-mode-toggle {
|
|
1137
1310
|
display: none;
|
|
@@ -1340,7 +1513,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
1340
1513
|
contain: content;
|
|
1341
1514
|
}
|
|
1342
1515
|
|
|
1343
|
-
@keyframes
|
|
1516
|
+
@keyframes _qeulx_slide-from-right {
|
|
1344
1517
|
from {
|
|
1345
1518
|
transform: translateX(-50px);
|
|
1346
1519
|
opacity: 0;
|
|
@@ -1350,7 +1523,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
1350
1523
|
opacity: 1;
|
|
1351
1524
|
}
|
|
1352
1525
|
}
|
|
1353
|
-
@keyframes
|
|
1526
|
+
@keyframes _qeulx_slide-from-left {
|
|
1354
1527
|
from {
|
|
1355
1528
|
transform: translateX(50px);
|
|
1356
1529
|
opacity: 0;
|
|
@@ -1406,10 +1579,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
1406
1579
|
}
|
|
1407
1580
|
}
|
|
1408
1581
|
.edit-site-sidebar__screen-wrapper.slide-from-left {
|
|
1409
|
-
animation-name:
|
|
1582
|
+
animation-name: _qeulx_slide-from-left;
|
|
1410
1583
|
}
|
|
1411
1584
|
.edit-site-sidebar__screen-wrapper.slide-from-right {
|
|
1412
|
-
animation-name:
|
|
1585
|
+
animation-name: _qeulx_slide-from-right;
|
|
1413
1586
|
}
|
|
1414
1587
|
|
|
1415
1588
|
.edit-site-site-hub {
|
|
@@ -1485,9 +1658,11 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
1485
1658
|
|
|
1486
1659
|
.edit-site-site-icon__icon {
|
|
1487
1660
|
fill: currentColor;
|
|
1661
|
+
width: 100%;
|
|
1662
|
+
height: 100%;
|
|
1488
1663
|
}
|
|
1489
1664
|
.edit-site-layout.is-full-canvas .edit-site-site-icon__icon {
|
|
1490
|
-
padding:
|
|
1665
|
+
padding: 12px;
|
|
1491
1666
|
}
|
|
1492
1667
|
|
|
1493
1668
|
.edit-site-site-icon__image {
|
|
@@ -1495,6 +1670,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
1495
1670
|
height: 100%;
|
|
1496
1671
|
object-fit: cover;
|
|
1497
1672
|
background: #333;
|
|
1673
|
+
aspect-ratio: 1/1;
|
|
1498
1674
|
}
|
|
1499
1675
|
.edit-site-layout.is-full-canvas .edit-site-site-icon__image {
|
|
1500
1676
|
border-radius: 0;
|