@wordpress/edit-site 5.33.0 → 5.34.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-page/index.js +3 -0
- package/build/components/add-new-page/index.js.map +1 -1
- package/build/components/add-new-pattern/index.js +8 -7
- package/build/components/add-new-pattern/index.js.map +1 -1
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js +3 -0
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
- package/build/components/add-new-template/add-custom-template-modal-content.js +3 -1
- package/build/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build/components/block-editor/resize-handle.js +20 -5
- package/build/components/block-editor/resize-handle.js.map +1 -1
- package/build/components/create-template-part-modal/index.js +3 -0
- package/build/components/create-template-part-modal/index.js.map +1 -1
- package/build/components/editor/index.js +28 -5
- package/build/components/editor/index.js.map +1 -1
- package/build/components/global-styles/font-library-modal/context.js +9 -3
- package/build/components/global-styles/font-library-modal/context.js.map +1 -1
- package/build/components/global-styles/font-library-modal/font-collection.js +7 -2
- package/build/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build/components/global-styles/font-library-modal/installed-fonts.js +22 -20
- package/build/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js +6 -2
- package/build/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
- package/build/components/global-styles/style-variations-container.js +8 -2
- package/build/components/global-styles/style-variations-container.js.map +1 -1
- package/build/components/header-edit-mode/index.js +33 -49
- package/build/components/header-edit-mode/index.js.map +1 -1
- package/build/components/header-edit-mode/more-menu/index.js +3 -97
- package/build/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/register.js +0 -49
- package/build/components/keyboard-shortcuts/register.js.map +1 -1
- package/build/components/layout/index.js +7 -4
- package/build/components/layout/index.js.map +1 -1
- package/build/components/layout/router.js +9 -38
- package/build/components/layout/router.js.map +1 -1
- package/build/components/page-pages/index.js +4 -3
- package/build/components/page-pages/index.js.map +1 -1
- package/build/components/page-patterns/dataviews-pattern-actions.js +11 -7
- package/build/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
- package/build/components/page-patterns/header.js +3 -1
- package/build/components/page-patterns/header.js.map +1 -1
- package/build/components/page-patterns/index.js +20 -49
- package/build/components/page-patterns/index.js.map +1 -1
- package/build/components/page-patterns/use-patterns.js +1 -0
- package/build/components/page-patterns/use-patterns.js.map +1 -1
- package/build/components/page-templates/hooks.js.map +1 -0
- package/build/components/{page-templates-template-parts → page-templates}/index.js +67 -80
- package/build/components/page-templates/index.js.map +1 -0
- package/build/components/pattern-modal/duplicate.js +7 -5
- package/build/components/pattern-modal/duplicate.js.map +1 -1
- package/build/components/plugin-template-setting-panel/index.js +9 -0
- package/build/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build/components/resizable-frame/index.js +9 -6
- package/build/components/resizable-frame/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/index.js +3 -2
- package/build/components/sidebar-edit-mode/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/index.js +40 -9
- package/build/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js +24 -17
- package/build/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
- package/build/components/sidebar-edit-mode/template-panel/index.js +2 -5
- package/build/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-page/index.js +39 -8
- package/build/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/index.js +6 -13
- package/build/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +3 -1
- package/build/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
- package/build/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/category-item.js +3 -2
- package/build/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build/components/sidebar-navigation-screen-patterns/index.js +34 -28
- package/build/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/index.js +1 -1
- package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
- package/build/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js +5 -35
- package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +0 -8
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build/components/template-actions/index.js +1 -1
- package/build/components/template-actions/index.js.map +1 -1
- package/build/deprecated.js +55 -0
- package/build/deprecated.js.map +1 -0
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +35 -4
- package/build/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build/index.js +18 -18
- package/build/index.js.map +1 -1
- package/build/utils/constants.js +1 -2
- package/build/utils/constants.js.map +1 -1
- package/build-module/components/add-new-page/index.js +3 -0
- package/build-module/components/add-new-page/index.js.map +1 -1
- package/build-module/components/add-new-pattern/index.js +8 -7
- package/build-module/components/add-new-pattern/index.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +3 -0
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-template-modal-content.js +3 -1
- package/build-module/components/add-new-template/add-custom-template-modal-content.js.map +1 -1
- package/build-module/components/block-editor/resize-handle.js +21 -6
- package/build-module/components/block-editor/resize-handle.js.map +1 -1
- package/build-module/components/create-template-part-modal/index.js +3 -0
- package/build-module/components/create-template-part-modal/index.js.map +1 -1
- package/build-module/components/editor/index.js +28 -5
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/context.js +9 -3
- 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 +7 -2
- package/build-module/components/global-styles/font-library-modal/font-collection.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js +22 -20
- package/build-module/components/global-styles/font-library-modal/installed-fonts.js.map +1 -1
- package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js +6 -2
- package/build-module/components/global-styles/font-library-modal/utils/sort-font-faces.js.map +1 -1
- package/build-module/components/global-styles/style-variations-container.js +8 -2
- package/build-module/components/global-styles/style-variations-container.js.map +1 -1
- package/build-module/components/header-edit-mode/index.js +39 -55
- package/build-module/components/header-edit-mode/index.js.map +1 -1
- package/build-module/components/header-edit-mode/more-menu/index.js +5 -99
- package/build-module/components/header-edit-mode/more-menu/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/register.js +0 -49
- package/build-module/components/keyboard-shortcuts/register.js.map +1 -1
- package/build-module/components/layout/index.js +7 -4
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/layout/router.js +9 -38
- package/build-module/components/layout/router.js.map +1 -1
- package/build-module/components/page-pages/index.js +5 -4
- package/build-module/components/page-pages/index.js.map +1 -1
- package/build-module/components/page-patterns/dataviews-pattern-actions.js +11 -7
- package/build-module/components/page-patterns/dataviews-pattern-actions.js.map +1 -1
- package/build-module/components/page-patterns/header.js +3 -1
- package/build-module/components/page-patterns/header.js.map +1 -1
- package/build-module/components/page-patterns/index.js +22 -51
- package/build-module/components/page-patterns/index.js.map +1 -1
- package/build-module/components/page-patterns/use-patterns.js +1 -0
- package/build-module/components/page-patterns/use-patterns.js.map +1 -1
- package/build-module/components/page-templates/hooks.js.map +1 -0
- package/build-module/components/{page-templates-template-parts → page-templates}/index.js +67 -80
- package/build-module/components/page-templates/index.js.map +1 -0
- package/build-module/components/pattern-modal/duplicate.js +7 -5
- package/build-module/components/pattern-modal/duplicate.js.map +1 -1
- package/build-module/components/plugin-template-setting-panel/index.js +8 -0
- package/build-module/components/plugin-template-setting-panel/index.js.map +1 -1
- package/build-module/components/resizable-frame/index.js +9 -6
- package/build-module/components/resizable-frame/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/index.js +4 -3
- package/build-module/components/sidebar-edit-mode/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/index.js +43 -12
- package/build-module/components/sidebar-edit-mode/page-panels/index.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js +25 -17
- package/build-module/components/sidebar-edit-mode/page-panels/page-summary.js.map +1 -1
- package/build-module/components/sidebar-edit-mode/template-panel/index.js +3 -6
- package/build-module/components/sidebar-edit-mode/template-panel/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-page/index.js +40 -9
- package/build-module/components/sidebar-navigation-screen-page/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/index.js +6 -13
- package/build-module/components/sidebar-navigation-screen-pattern/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +3 -1
- package/build-module/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
- package/build-module/components/sidebar-navigation-screen-pattern/use-pattern-details.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js +3 -2
- package/build-module/components/sidebar-navigation-screen-patterns/category-item.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-patterns/index.js +35 -29
- package/build-module/components/sidebar-navigation-screen-patterns/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-template/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
- package/build-module/components/sidebar-navigation-screen-templates-browse/content.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +5 -35
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js +0 -8
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build-module/components/template-actions/index.js +1 -1
- package/build-module/components/template-actions/index.js.map +1 -1
- package/build-module/deprecated.js +45 -0
- package/build-module/deprecated.js.map +1 -0
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +34 -4
- package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js.map +1 -1
- package/build-module/index.js +2 -4
- package/build-module/index.js.map +1 -1
- package/build-module/utils/constants.js +0 -1
- package/build-module/utils/constants.js.map +1 -1
- package/build-style/style-rtl.css +79 -125
- package/build-style/style.css +79 -125
- package/package.json +42 -42
- package/src/components/add-new-page/index.js +7 -1
- package/src/components/add-new-pattern/index.js +15 -12
- package/src/components/add-new-template/add-custom-generic-template-modal-content.js +3 -0
- package/src/components/add-new-template/add-custom-template-modal-content.js +3 -1
- package/src/components/block-editor/resize-handle.js +30 -11
- package/src/components/block-editor/style.scss +10 -15
- package/src/components/create-template-part-modal/index.js +3 -0
- package/src/components/editor/index.js +42 -3
- package/src/components/editor/style.scss +6 -1
- package/src/components/global-styles/font-library-modal/context.js +9 -3
- package/src/components/global-styles/font-library-modal/font-collection.js +31 -12
- package/src/components/global-styles/font-library-modal/installed-fonts.js +82 -54
- package/src/components/global-styles/font-library-modal/style.scss +17 -0
- package/src/components/global-styles/font-library-modal/utils/sort-font-faces.js +6 -2
- package/src/components/global-styles/style-variations-container.js +11 -2
- package/src/components/header-edit-mode/index.js +56 -76
- package/src/components/header-edit-mode/more-menu/index.js +8 -145
- package/src/components/header-edit-mode/style.scss +13 -85
- package/src/components/keyboard-shortcuts/register.js +0 -58
- package/src/components/layout/index.js +11 -2
- package/src/components/layout/router.js +9 -49
- package/src/components/page-pages/index.js +14 -4
- package/src/components/page-pages/style.scss +11 -0
- package/src/components/page-patterns/dataviews-pattern-actions.js +8 -9
- package/src/components/page-patterns/header.js +3 -1
- package/src/components/page-patterns/index.js +17 -76
- package/src/components/page-patterns/style.scss +14 -1
- package/src/components/page-patterns/use-patterns.js +1 -0
- package/src/components/{page-templates-template-parts → page-templates}/index.js +23 -46
- package/src/components/{page-templates-template-parts → page-templates}/style.scss +2 -2
- package/src/components/pattern-modal/duplicate.js +4 -3
- package/src/components/plugin-template-setting-panel/index.js +8 -0
- package/src/components/resizable-frame/index.js +4 -3
- package/src/components/sidebar-edit-mode/index.js +13 -2
- package/src/components/sidebar-edit-mode/page-panels/index.js +49 -21
- package/src/components/sidebar-edit-mode/page-panels/page-summary.js +31 -19
- package/src/components/sidebar-edit-mode/template-panel/index.js +2 -12
- package/src/components/sidebar-navigation-screen-page/index.js +48 -9
- package/src/components/sidebar-navigation-screen-pattern/index.js +6 -11
- package/src/components/sidebar-navigation-screen-pattern/template-part-navigation-menus.js +3 -1
- package/src/components/sidebar-navigation-screen-pattern/use-pattern-details.js +1 -1
- package/src/components/sidebar-navigation-screen-patterns/category-item.js +2 -1
- package/src/components/sidebar-navigation-screen-patterns/index.js +30 -38
- package/src/components/sidebar-navigation-screen-template/index.js +1 -1
- package/src/components/sidebar-navigation-screen-templates-browse/content.js +3 -3
- package/src/components/sidebar-navigation-screen-templates-browse/index.js +7 -39
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +0 -4
- package/src/components/template-actions/index.js +1 -1
- package/src/deprecated.js +42 -0
- package/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js +69 -16
- package/src/index.js +2 -9
- package/src/style.scss +1 -5
- package/src/utils/constants.js +1 -1
- package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js +0 -59
- package/build/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +0 -1
- package/build/components/header-edit-mode/tools-more-menu-group/index.js +0 -23
- package/build/components/header-edit-mode/tools-more-menu-group/index.js.map +0 -1
- package/build/components/keyboard-shortcuts/edit-mode.js +0 -56
- package/build/components/keyboard-shortcuts/edit-mode.js.map +0 -1
- package/build/components/page-templates-template-parts/add-new-template-part.js +0 -65
- package/build/components/page-templates-template-parts/add-new-template-part.js.map +0 -1
- package/build/components/page-templates-template-parts/hooks.js.map +0 -1
- package/build/components/page-templates-template-parts/index.js.map +0 -1
- package/build/components/sidebar-edit-mode/page-panels/page-status.js +0 -188
- package/build/components/sidebar-edit-mode/page-panels/page-status.js.map +0 -1
- package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js +0 -52
- package/build-module/components/header-edit-mode/more-menu/copy-content-menu-item.js.map +0 -1
- package/build-module/components/header-edit-mode/tools-more-menu-group/index.js +0 -16
- package/build-module/components/header-edit-mode/tools-more-menu-group/index.js.map +0 -1
- package/build-module/components/keyboard-shortcuts/edit-mode.js +0 -49
- package/build-module/components/keyboard-shortcuts/edit-mode.js.map +0 -1
- package/build-module/components/page-templates-template-parts/add-new-template-part.js +0 -57
- package/build-module/components/page-templates-template-parts/add-new-template-part.js.map +0 -1
- package/build-module/components/page-templates-template-parts/hooks.js.map +0 -1
- package/build-module/components/page-templates-template-parts/index.js.map +0 -1
- package/build-module/components/sidebar-edit-mode/page-panels/page-status.js +0 -180
- package/build-module/components/sidebar-edit-mode/page-panels/page-status.js.map +0 -1
- package/src/components/header-edit-mode/more-menu/copy-content-menu-item.js +0 -51
- package/src/components/header-edit-mode/tools-more-menu-group/index.js +0 -16
- package/src/components/keyboard-shortcuts/edit-mode.js +0 -59
- package/src/components/page-templates-template-parts/add-new-template-part.js +0 -62
- package/src/components/sidebar-edit-mode/page-panels/page-status.js +0 -249
- package/src/components/sidebar-edit-mode/page-panels/style.scss +0 -34
- /package/build/components/{page-templates-template-parts → page-templates}/hooks.js +0 -0
- /package/build-module/components/{page-templates-template-parts → page-templates}/hooks.js +0 -0
- /package/src/components/{page-templates-template-parts → page-templates}/hooks.js +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { createElement } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* WordPress dependencies
|
|
4
|
+
*/
|
|
5
|
+
import { PluginMoreMenuItem as EditorPluginMoreMenuItem, PluginSidebar as EditorPluginSidebar, PluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem } from '@wordpress/editor';
|
|
6
|
+
import deprecated from '@wordpress/deprecated';
|
|
7
|
+
const deprecateSlot = name => {
|
|
8
|
+
deprecated(`wp.editPost.${name}`, {
|
|
9
|
+
since: '6.6',
|
|
10
|
+
alternative: `wp.editor.${name}`
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/* eslint-disable jsdoc/require-param */
|
|
15
|
+
/**
|
|
16
|
+
* @see PluginMoreMenuItem in @wordpress/editor package.
|
|
17
|
+
*/
|
|
18
|
+
export function PluginMoreMenuItem(props) {
|
|
19
|
+
deprecateSlot('PluginMoreMenuItem');
|
|
20
|
+
return createElement(EditorPluginMoreMenuItem, {
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @see PluginSidebar in @wordpress/editor package.
|
|
27
|
+
*/
|
|
28
|
+
export function PluginSidebar(props) {
|
|
29
|
+
deprecateSlot('PluginSidebar');
|
|
30
|
+
return createElement(EditorPluginSidebar, {
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @see PluginSidebarMoreMenuItem in @wordpress/editor package.
|
|
37
|
+
*/
|
|
38
|
+
export function PluginSidebarMoreMenuItem(props) {
|
|
39
|
+
deprecateSlot('PluginSidebarMoreMenuItem');
|
|
40
|
+
return createElement(EditorPluginSidebarMoreMenuItem, {
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/* eslint-enable jsdoc/require-param */
|
|
45
|
+
//# sourceMappingURL=deprecated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PluginMoreMenuItem","EditorPluginMoreMenuItem","PluginSidebar","EditorPluginSidebar","PluginSidebarMoreMenuItem","EditorPluginSidebarMoreMenuItem","deprecated","deprecateSlot","name","since","alternative","props","createElement"],"sources":["@wordpress/edit-site/src/deprecated.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPluginMoreMenuItem as EditorPluginMoreMenuItem,\n\tPluginSidebar as EditorPluginSidebar,\n\tPluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem,\n} from '@wordpress/editor';\nimport deprecated from '@wordpress/deprecated';\n\nconst deprecateSlot = ( name ) => {\n\tdeprecated( `wp.editPost.${ name }`, {\n\t\tsince: '6.6',\n\t\talternative: `wp.editor.${ name }`,\n\t} );\n};\n\n/* eslint-disable jsdoc/require-param */\n/**\n * @see PluginMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginMoreMenuItem( props ) {\n\tdeprecateSlot( 'PluginMoreMenuItem' );\n\treturn <EditorPluginMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginSidebar in @wordpress/editor package.\n */\nexport function PluginSidebar( props ) {\n\tdeprecateSlot( 'PluginSidebar' );\n\treturn <EditorPluginSidebar { ...props } />;\n}\n\n/**\n * @see PluginSidebarMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginSidebarMoreMenuItem( props ) {\n\tdeprecateSlot( 'PluginSidebarMoreMenuItem' );\n\treturn <EditorPluginSidebarMoreMenuItem { ...props } />;\n}\n/* eslint-enable jsdoc/require-param */\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,kBAAkB,IAAIC,wBAAwB,EAC9CC,aAAa,IAAIC,mBAAmB,EACpCC,yBAAyB,IAAIC,+BAA+B,QACtD,mBAAmB;AAC1B,OAAOC,UAAU,MAAM,uBAAuB;AAE9C,MAAMC,aAAa,GAAKC,IAAI,IAAM;EACjCF,UAAU,CAAG,eAAeE,IAAM,EAAC,EAAE;IACpCC,KAAK,EAAE,KAAK;IACZC,WAAW,EAAG,aAAaF,IAAM;EAClC,CAAE,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,SAASR,kBAAkBA,CAAEW,KAAK,EAAG;EAC3CJ,aAAa,CAAE,oBAAqB,CAAC;EACrC,OAAOK,aAAA,CAACX,wBAAwB;IAAA,GAAMU;EAAK,CAAI,CAAC;AACjD;;AAEA;AACA;AACA;AACA,OAAO,SAAST,aAAaA,CAAES,KAAK,EAAG;EACtCJ,aAAa,CAAE,eAAgB,CAAC;EAChC,OAAOK,aAAA,CAACT,mBAAmB;IAAA,GAAMQ;EAAK,CAAI,CAAC;AAC5C;;AAEA;AACA;AACA;AACA,OAAO,SAASP,yBAAyBA,CAAEO,KAAK,EAAG;EAClDJ,aAAa,CAAE,2BAA4B,CAAC;EAC5C,OAAOK,aAAA,CAACP,+BAA+B;IAAA,GAAMM;EAAK,CAAI,CAAC;AACxD;AACA","ignoreList":[]}
|
package/build-module/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js
CHANGED
|
@@ -133,9 +133,14 @@ export default function useThemeStyleVariationsByProperty({
|
|
|
133
133
|
return variations;
|
|
134
134
|
}
|
|
135
135
|
const clonedBaseVariation = typeof baseVariation === 'object' && Object.keys(baseVariation).length > 0 ? cloneDeep(baseVariation) : null;
|
|
136
|
-
let processedStyleVariations = variations.
|
|
136
|
+
let processedStyleVariations = variations.reduce((accumulator, variation) => {
|
|
137
|
+
const variationFilteredByProperty = filterObjectByProperty(cloneDeep(variation), property);
|
|
138
|
+
// Remove variations that are empty once the property is filtered out.
|
|
139
|
+
if (Object.keys(variationFilteredByProperty).length === 0) {
|
|
140
|
+
return accumulator;
|
|
141
|
+
}
|
|
137
142
|
let result = {
|
|
138
|
-
...
|
|
143
|
+
...variationFilteredByProperty,
|
|
139
144
|
title: variation?.title,
|
|
140
145
|
description: variation?.description
|
|
141
146
|
};
|
|
@@ -146,12 +151,37 @@ export default function useThemeStyleVariationsByProperty({
|
|
|
146
151
|
*/
|
|
147
152
|
result = mergeBaseAndUserConfigs(clonedBaseVariation, result);
|
|
148
153
|
}
|
|
149
|
-
|
|
150
|
-
|
|
154
|
+
|
|
155
|
+
// Detect if this is a duplicate variation.
|
|
156
|
+
const isDuplicate = accumulator.some(item => {
|
|
157
|
+
return JSON.stringify(item.styles) === JSON.stringify(result?.styles) && JSON.stringify(item.settings) === JSON.stringify(result?.settings);
|
|
158
|
+
});
|
|
159
|
+
if (isDuplicate) {
|
|
160
|
+
return accumulator;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// If the variation is not a duplicate, add it to the accumulator.
|
|
164
|
+
accumulator.push(result);
|
|
165
|
+
return accumulator;
|
|
166
|
+
}, [] // Initial accumulator value.
|
|
167
|
+
);
|
|
151
168
|
if ('function' === typeof filter) {
|
|
152
169
|
processedStyleVariations = processedStyleVariations.filter(filter);
|
|
153
170
|
}
|
|
154
171
|
return processedStyleVariations;
|
|
155
172
|
}, [variations, property, baseVariation, filter]);
|
|
156
173
|
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Compares a style variation to the same variation filtered by a single property.
|
|
177
|
+
* Returns true if the variation contains only the property specified.
|
|
178
|
+
*
|
|
179
|
+
* @param {Object} variation The variation to compare.
|
|
180
|
+
* @param {string} property The property to compare.
|
|
181
|
+
* @return {boolean} Whether the variation contains only a single property.
|
|
182
|
+
*/
|
|
183
|
+
export function isVariationWithSingleProperty(variation, property) {
|
|
184
|
+
const variationWithProperty = filterObjectByProperty(cloneDeep(variation), property);
|
|
185
|
+
return JSON.stringify(variationWithProperty?.styles) === JSON.stringify(variation?.styles) && JSON.stringify(variationWithProperty?.settings) === JSON.stringify(variation?.settings);
|
|
186
|
+
}
|
|
157
187
|
//# sourceMappingURL=use-theme-style-variations-by-property.js.map
|
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","__","mergeBaseAndUserConfigs","cloneDeep","unlock","GlobalStylesContext","removePropertyFromObject","object","property","Object","keys","length","key","useCurrentMergeThemeStyleVariationsWithUserConfig","filter","variationsFromTheme","select","_variationsFromTheme","__experimentalGetCurrentThemeGlobalStylesVariations","user","baseVariation","variations","title","settings","styles","useThemeStyleVariationsByProperty","filterObjectByProperty","newObject","forEach","newFilter","clonedBaseVariation","processedStyleVariations","map","variation","result","description"],"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 { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from '../../components/global-styles/global-styles-provider';\nimport cloneDeep from '../../utils/clone-deep';\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\n\n/**\n * Removes all instances of a property from an object.\n *\n * @param {Object} object The object to remove the property from.\n * @param {string} property The property to remove.\n * @return {Object} The modified object.\n */\nexport function removePropertyFromObject( object, property ) {\n\tif ( ! property || typeof property !== 'string' ) {\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 ( key === property ) {\n\t\t\tdelete object[ key ];\n\t\t} else if ( typeof object[ key ] === 'object' ) {\n\t\t\tremovePropertyFromObject( object[ key ], property );\n\t\t}\n\t}\n\treturn object;\n}\n\n/**\n * A convenience wrapper for `useThemeStyleVariationsByProperty()` that fetches the current theme style variations,\n * and user-defined global style/settings object.\n *\n * @param {Object} props Object of hook args.\n * @param {string} props.property The property to filter by.\n * @param {Function} props.filter Optional. The filter function to apply to the variations.\n * @return {Object[]|*} The merged object.\n */\nexport function useCurrentMergeThemeStyleVariationsWithUserConfig( {\n\tproperty,\n\tfilter,\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: baseVariation } = useContext( GlobalStylesContext );\n\n\tconst variations = useMemo( () => {\n\t\treturn [\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...variationsFromTheme,\n\t\t];\n\t}, [ variationsFromTheme ] );\n\n\treturn useThemeStyleVariationsByProperty( {\n\t\tvariations,\n\t\tproperty,\n\t\tfilter,\n\t\tbaseVariation: removePropertyFromObject(\n\t\t\tcloneDeep( baseVariation ),\n\t\t\tproperty\n\t\t),\n\t} );\n}\n\n/**\n * Returns a new object, with properties specified in `property`,\n * maintain the original object tree structure.\n * The function is recursive, so it will perform a deep search for the given property.\n * E.g., the function will return `{ a: { b: { c: { test: 1 } } } }` if the property is `test`.\n *\n * @param {Object} object The object to filter\n * @param {Object} property The property to filter by\n * @return {Object} The merged object.\n */\nexport const filterObjectByProperty = ( object, property ) => {\n\tif ( ! object ) {\n\t\treturn {};\n\t}\n\n\tconst newObject = {};\n\tObject.keys( object ).forEach( ( key ) => {\n\t\tif ( key === property ) {\n\t\t\tnewObject[ key ] = object[ key ];\n\t\t} else if ( typeof object[ key ] === 'object' ) {\n\t\t\tconst newFilter = filterObjectByProperty( object[ key ], property );\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 * Returns a new object with only the properties specified in `property`.\n * Optional merges the baseVariation object with the variation object.\n * Note: this function will only overwrite the specified property in baseVariation if it exists.\n * The baseVariation will not be otherwise modified. To strip a property from the baseVariation object, use `removePropertyFromObject`.\n * See useCurrentMergeThemeStyleVariationsWithUserConfig for an example of how to use this function.\n *\n * @param {Object} props Object of hook args.\n * @param {Object[]} props.variations The theme style variations to filter.\n * @param {string} props.property The property to filter by.\n * @param {Function} props.filter Optional. The filter function to apply to the variations.\n * @param {Object} props.baseVariation Optional. Base or user settings to be updated with variation properties.\n * @return {Object[]|*} The merged object.\n */\nexport default function useThemeStyleVariationsByProperty( {\n\tvariations,\n\tproperty,\n\tfilter,\n\tbaseVariation,\n} ) {\n\treturn useMemo( () => {\n\t\tif ( ! property || ! variations || variations?.length === 0 ) {\n\t\t\treturn variations;\n\t\t}\n\n\t\tconst clonedBaseVariation =\n\t\t\ttypeof baseVariation === 'object' &&\n\t\t\tObject.keys( baseVariation ).length > 0\n\t\t\t\t? cloneDeep( baseVariation )\n\t\t\t\t: null;\n\n\t\tlet processedStyleVariations = variations.map( ( variation ) => {\n\t\t\tlet result = {\n\t\t\t\t...filterObjectByProperty( cloneDeep( variation ), property ),\n\t\t\t\ttitle: variation?.title,\n\t\t\t\tdescription: variation?.description,\n\t\t\t};\n\n\t\t\tif ( clonedBaseVariation ) {\n\t\t\t\t/*\n\t\t\t\t * Overwrites all baseVariation object `styleProperty` properties\n\t\t\t\t * with the theme variation `styleProperty` properties.\n\t\t\t\t */\n\t\t\t\tresult = mergeBaseAndUserConfigs( clonedBaseVariation, result );\n\t\t\t}\n\t\t\treturn result;\n\t\t} );\n\n\t\tif ( 'function' === typeof filter ) {\n\t\t\tprocessedStyleVariations =\n\t\t\t\tprocessedStyleVariations.filter( filter );\n\t\t}\n\n\t\treturn processedStyleVariations;\n\t}, [ variations, property, baseVariation, filter ] );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS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AAEb,QAAQ,EAAEY,aAAa,EAAEN,MAAM,CAAG,CAAC;AACrD","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["useSelect","store","coreStore","useContext","useMemo","privateApis","blockEditorPrivateApis","__","mergeBaseAndUserConfigs","cloneDeep","unlock","GlobalStylesContext","removePropertyFromObject","object","property","Object","keys","length","key","useCurrentMergeThemeStyleVariationsWithUserConfig","filter","variationsFromTheme","select","_variationsFromTheme","__experimentalGetCurrentThemeGlobalStylesVariations","user","baseVariation","variations","title","settings","styles","useThemeStyleVariationsByProperty","filterObjectByProperty","newObject","forEach","newFilter","clonedBaseVariation","processedStyleVariations","reduce","accumulator","variation","variationFilteredByProperty","result","description","isDuplicate","some","item","JSON","stringify","push","isVariationWithSingleProperty","variationWithProperty"],"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 { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { mergeBaseAndUserConfigs } from '../../components/global-styles/global-styles-provider';\nimport cloneDeep from '../../utils/clone-deep';\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\n\n/**\n * Removes all instances of a property from an object.\n *\n * @param {Object} object The object to remove the property from.\n * @param {string} property The property to remove.\n * @return {Object} The modified object.\n */\nexport function removePropertyFromObject( object, property ) {\n\tif ( ! property || typeof property !== 'string' ) {\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 ( key === property ) {\n\t\t\tdelete object[ key ];\n\t\t} else if ( typeof object[ key ] === 'object' ) {\n\t\t\tremovePropertyFromObject( object[ key ], property );\n\t\t}\n\t}\n\treturn object;\n}\n\n/**\n * A convenience wrapper for `useThemeStyleVariationsByProperty()` that fetches the current theme style variations,\n * and user-defined global style/settings object.\n *\n * @param {Object} props Object of hook args.\n * @param {string} props.property The property to filter by.\n * @param {Function} props.filter Optional. The filter function to apply to the variations.\n * @return {Object[]|*} The merged object.\n */\nexport function useCurrentMergeThemeStyleVariationsWithUserConfig( {\n\tproperty,\n\tfilter,\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: baseVariation } = useContext( GlobalStylesContext );\n\n\tconst variations = useMemo( () => {\n\t\treturn [\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...variationsFromTheme,\n\t\t];\n\t}, [ variationsFromTheme ] );\n\n\treturn useThemeStyleVariationsByProperty( {\n\t\tvariations,\n\t\tproperty,\n\t\tfilter,\n\t\tbaseVariation: removePropertyFromObject(\n\t\t\tcloneDeep( baseVariation ),\n\t\t\tproperty\n\t\t),\n\t} );\n}\n\n/**\n * Returns a new object, with properties specified in `property`,\n * maintain the original object tree structure.\n * The function is recursive, so it will perform a deep search for the given property.\n * E.g., the function will return `{ a: { b: { c: { test: 1 } } } }` if the property is `test`.\n *\n * @param {Object} object The object to filter\n * @param {Object} property The property to filter by\n * @return {Object} The merged object.\n */\nexport const filterObjectByProperty = ( object, property ) => {\n\tif ( ! object ) {\n\t\treturn {};\n\t}\n\n\tconst newObject = {};\n\tObject.keys( object ).forEach( ( key ) => {\n\t\tif ( key === property ) {\n\t\t\tnewObject[ key ] = object[ key ];\n\t\t} else if ( typeof object[ key ] === 'object' ) {\n\t\t\tconst newFilter = filterObjectByProperty( object[ key ], property );\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 * Returns a new object with only the properties specified in `property`.\n * Optional merges the baseVariation object with the variation object.\n * Note: this function will only overwrite the specified property in baseVariation if it exists.\n * The baseVariation will not be otherwise modified. To strip a property from the baseVariation object, use `removePropertyFromObject`.\n * See useCurrentMergeThemeStyleVariationsWithUserConfig for an example of how to use this function.\n *\n * @param {Object} props Object of hook args.\n * @param {Object[]} props.variations The theme style variations to filter.\n * @param {string} props.property The property to filter by.\n * @param {Function} props.filter Optional. The filter function to apply to the variations.\n * @param {Object} props.baseVariation Optional. Base or user settings to be updated with variation properties.\n * @return {Object[]|*} The merged object.\n */\nexport default function useThemeStyleVariationsByProperty( {\n\tvariations,\n\tproperty,\n\tfilter,\n\tbaseVariation,\n} ) {\n\treturn useMemo( () => {\n\t\tif ( ! property || ! variations || variations?.length === 0 ) {\n\t\t\treturn variations;\n\t\t}\n\n\t\tconst clonedBaseVariation =\n\t\t\ttypeof baseVariation === 'object' &&\n\t\t\tObject.keys( baseVariation ).length > 0\n\t\t\t\t? cloneDeep( baseVariation )\n\t\t\t\t: null;\n\n\t\tlet processedStyleVariations = variations.reduce(\n\t\t\t( accumulator, variation ) => {\n\t\t\t\tconst variationFilteredByProperty = filterObjectByProperty(\n\t\t\t\t\tcloneDeep( variation ),\n\t\t\t\t\tproperty\n\t\t\t\t);\n\t\t\t\t// Remove variations that are empty once the property is filtered out.\n\t\t\t\tif ( Object.keys( variationFilteredByProperty ).length === 0 ) {\n\t\t\t\t\treturn accumulator;\n\t\t\t\t}\n\n\t\t\t\tlet result = {\n\t\t\t\t\t...variationFilteredByProperty,\n\t\t\t\t\ttitle: variation?.title,\n\t\t\t\t\tdescription: variation?.description,\n\t\t\t\t};\n\n\t\t\t\tif ( clonedBaseVariation ) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Overwrites all baseVariation object `styleProperty` properties\n\t\t\t\t\t * with the theme variation `styleProperty` properties.\n\t\t\t\t\t */\n\t\t\t\t\tresult = mergeBaseAndUserConfigs(\n\t\t\t\t\t\tclonedBaseVariation,\n\t\t\t\t\t\tresult\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Detect if this is a duplicate variation.\n\t\t\t\tconst isDuplicate = accumulator.some( ( item ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tJSON.stringify( item.styles ) ===\n\t\t\t\t\t\t\tJSON.stringify( result?.styles ) &&\n\t\t\t\t\t\tJSON.stringify( item.settings ) ===\n\t\t\t\t\t\t\tJSON.stringify( result?.settings )\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t\tif ( isDuplicate ) {\n\t\t\t\t\treturn accumulator;\n\t\t\t\t}\n\n\t\t\t\t// If the variation is not a duplicate, add it to the accumulator.\n\t\t\t\taccumulator.push( result );\n\t\t\t\treturn accumulator;\n\t\t\t},\n\t\t\t[] // Initial accumulator value.\n\t\t);\n\n\t\tif ( 'function' === typeof filter ) {\n\t\t\tprocessedStyleVariations =\n\t\t\t\tprocessedStyleVariations.filter( filter );\n\t\t}\n\n\t\treturn processedStyleVariations;\n\t}, [ variations, property, baseVariation, filter ] );\n}\n\n/**\n * Compares a style variation to the same variation filtered by a single property.\n * Returns true if the variation contains only the property specified.\n *\n * @param {Object} variation The variation to compare.\n * @param {string} property The property to compare.\n * @return {boolean} Whether the variation contains only a single property.\n */\nexport function isVariationWithSingleProperty( variation, property ) {\n\tconst variationWithProperty = filterObjectByProperty(\n\t\tcloneDeep( variation ),\n\t\tproperty\n\t);\n\n\treturn (\n\t\tJSON.stringify( variationWithProperty?.styles ) ===\n\t\t\tJSON.stringify( variation?.styles ) &&\n\t\tJSON.stringify( variationWithProperty?.settings ) ===\n\t\t\tJSON.stringify( variation?.settings )\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA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W,GAAGL,WAAW,CAACM,IAAI,CAAIC,IAAI,IAAM;QACjD,OACCC,IAAI,CAACC,SAAS,CAAEF,IAAI,CAAChB,MAAO,CAAC,KAC5BiB,IAAI,CAACC,SAAS,CAAEN,MAAM,EAAEZ,MAAO,CAAC,IACjCiB,IAAI,CAACC,SAAS,CAAEF,IAAI,CAACjB,QAAS,CAAC,KAC9BkB,IAAI,CAACC,SAAS,CAAEN,MAAM,EAAEb,QAAS,CAAC;MAErC,CAAE,CAAC;MACH,IAAKe,WAAW,EAAG;QAClB,OAAOL,WAAW;MACnB;;MAEA;MACAA,WAAW,CAACU,IAAI,CAAEP,MAAO,CAAC;MAC1B,OAAOH,WAAW;IACnB,CAAC,EACD,EAAE,CAAC;IACJ,CAAC;IAED,IAAK,UAAU,KAAK,OAAOnB,MAAM,EAAG;MACnCiB,wBAAwB,GACvBA,wBAAwB,CAACjB,MAAM,CAAEA,MAAO,CAAC;IAC3C;IAEA,OAAOiB,wBAAwB;EAChC,CAAC,EAAE,CAAEV,UAAU,EAAEb,QAAQ,EAAEY,aAAa,EAAEN,MAAM,CAAG,CAAC;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS8B,6BAA6BA,CAAEV,SAAS,EAAE1B,QAAQ,EAAG;EACpE,MAAMqC,qBAAqB,GAAGnB,sBAAsB,CACnDvB,SAAS,CAAE+B,SAAU,CAAC,EACtB1B,QACD,CAAC;EAED,OACCiC,IAAI,CAACC,SAAS,CAAEG,qBAAqB,EAAErB,MAAO,CAAC,KAC9CiB,IAAI,CAACC,SAAS,CAAER,SAAS,EAAEV,MAAO,CAAC,IACpCiB,IAAI,CAACC,SAAS,CAAEG,qBAAqB,EAAEtB,QAAS,CAAC,KAChDkB,IAAI,CAACC,SAAS,CAAER,SAAS,EAAEX,QAAS,CAAC;AAExC","ignoreList":[]}
|
package/build-module/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { registerCoreBlocks, __experimentalGetCoreBlocks, __experimentalRegister
|
|
|
7
7
|
import { dispatch } from '@wordpress/data';
|
|
8
8
|
import deprecated from '@wordpress/deprecated';
|
|
9
9
|
import { createRoot } from '@wordpress/element';
|
|
10
|
-
import {
|
|
10
|
+
import { store as editorStore } from '@wordpress/editor';
|
|
11
11
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
12
12
|
import { registerLegacyWidgetBlock, registerWidgetGroupBlock } from '@wordpress/widgets';
|
|
13
13
|
|
|
@@ -88,9 +88,7 @@ export function reinitializeEditor() {
|
|
|
88
88
|
version: '6.3'
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
export { PluginMoreMenuItem };
|
|
92
|
-
export { PluginSidebar };
|
|
93
|
-
export { PluginSidebarMoreMenuItem };
|
|
94
91
|
export { default as PluginTemplateSettingPanel } from './components/plugin-template-setting-panel';
|
|
95
92
|
export { store } from './store';
|
|
93
|
+
export * from './deprecated';
|
|
96
94
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalGetCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","dispatch","deprecated","createRoot","
|
|
1
|
+
{"version":3,"names":["store","blocksStore","registerCoreBlocks","__experimentalGetCoreBlocks","__experimentalRegisterExperimentalCoreBlocks","dispatch","deprecated","createRoot","editorStore","preferencesStore","registerLegacyWidgetBlock","registerWidgetGroupBlock","editSiteStore","App","initializeEditor","id","settings","target","document","getElementById","root","reapplyBlockTypeFilters","coreBlocks","filter","name","setFreeformFallbackBlockName","inserter","process","env","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","createElement","reinitializeEditor","since","version","default","PluginTemplateSettingPanel"],"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 } from '@wordpress/element';\nimport { store as editorStore } 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 App from './components/app';\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\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( process.env.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( <App /> );\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"],"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,QAAQ,oBAAoB;AAC/C,SAASP,KAAK,IAAIQ,WAAW,QAAQ,mBAAmB;AACxD,SAASR,KAAK,IAAIS,gBAAgB,QAAQ,wBAAwB;AAClE,SACCC,yBAAyB,EACzBC,wBAAwB,QAClB,oBAAoB;;AA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AAK;IACnBC,SAAS,EAAE,KAAK;IAChBC,cAAc,EAAE,EAAE;IAClBC,oBAAoB,EAAE,KAAK;IAC3BC,UAAU,EAAE,CAAE,aAAa,CAAE;IAC7BC,oBAAoB,EAAE,IAAI;IAC1BC,qBAAqB,EAAE;EACxB,CAAE,CAAC;EAEHxC,QAAQ,CAAEO,aAAc,CAAC,CAACkC,cAAc,CAAE9B,QAAS,CAAC;;EAEpD;EACA;EACA;EACA;EACAX,QAAQ,CAAEG,WAAY,CAAC,CAACuC,oBAAoB,CAAE;IAC7CC,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,CAAEC,aAAA,CAAC1C,GAAG,MAAE,CAAE,CAAC;EAEtB,OAAOO,IAAI;AACZ;AAEA,OAAO,SAASoC,kBAAkBA,CAAA,EAAG;EACpClD,UAAU,CAAE,gCAAgC,EAAE;IAC7CmD,KAAK,EAAE,KAAK;IACZC,OAAO,EAAE;EACV,CAAE,CAAC;AACJ;AAEA,SAASC,OAAO,IAAIC,0BAA0B,QAAQ,4CAA4C;AAClG,SAAS5D,KAAK,QAAQ,SAAS;AAC/B,cAAc,cAAc","ignoreList":[]}
|
|
@@ -45,7 +45,6 @@ export const POST_TYPE_LABELS = {
|
|
|
45
45
|
export const LAYOUT_GRID = 'grid';
|
|
46
46
|
export const LAYOUT_TABLE = 'table';
|
|
47
47
|
export const LAYOUT_LIST = 'list';
|
|
48
|
-
export const ENUMERATION_TYPE = 'enumeration';
|
|
49
48
|
export const OPERATOR_IS = 'is';
|
|
50
49
|
export const OPERATOR_IS_NOT = 'isNot';
|
|
51
50
|
export const OPERATOR_IS_ANY = 'isAny';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__","privateApis","patternPrivateApis","unlock","NAVIGATION_POST_TYPE","TEMPLATE_POST_TYPE","TEMPLATE_PART_POST_TYPE","TEMPLATE_ORIGINS","custom","theme","plugin","TEMPLATE_PART_AREA_DEFAULT_CATEGORY","TEMPLATE_PART_ALL_AREAS_CATEGORY","PATTERN_TYPES","PATTERN_DEFAULT_CATEGORY","PATTERN_USER_CATEGORY","EXCLUDED_PATTERN_SOURCES","PATTERN_SYNC_TYPES","FOCUSABLE_ENTITIES","user","POST_TYPE_LABELS","LAYOUT_GRID","LAYOUT_TABLE","LAYOUT_LIST","
|
|
1
|
+
{"version":3,"names":["__","privateApis","patternPrivateApis","unlock","NAVIGATION_POST_TYPE","TEMPLATE_POST_TYPE","TEMPLATE_PART_POST_TYPE","TEMPLATE_ORIGINS","custom","theme","plugin","TEMPLATE_PART_AREA_DEFAULT_CATEGORY","TEMPLATE_PART_ALL_AREAS_CATEGORY","PATTERN_TYPES","PATTERN_DEFAULT_CATEGORY","PATTERN_USER_CATEGORY","EXCLUDED_PATTERN_SOURCES","PATTERN_SYNC_TYPES","FOCUSABLE_ENTITIES","user","POST_TYPE_LABELS","LAYOUT_GRID","LAYOUT_TABLE","LAYOUT_LIST","OPERATOR_IS","OPERATOR_IS_NOT","OPERATOR_IS_ANY","OPERATOR_IS_NONE"],"sources":["@wordpress/edit-site/src/utils/constants.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as patternPrivateApis } from '@wordpress/patterns';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\n\n// Navigation\nexport const NAVIGATION_POST_TYPE = 'wp_navigation';\n\n// Templates.\nexport const TEMPLATE_POST_TYPE = 'wp_template';\nexport const TEMPLATE_PART_POST_TYPE = 'wp_template_part';\nexport const TEMPLATE_ORIGINS = {\n\tcustom: 'custom',\n\ttheme: 'theme',\n\tplugin: 'plugin',\n};\nexport const TEMPLATE_PART_AREA_DEFAULT_CATEGORY = 'uncategorized';\nexport const TEMPLATE_PART_ALL_AREAS_CATEGORY = 'all-parts';\n\n// Patterns.\nexport const {\n\tPATTERN_TYPES,\n\tPATTERN_DEFAULT_CATEGORY,\n\tPATTERN_USER_CATEGORY,\n\tEXCLUDED_PATTERN_SOURCES,\n\tPATTERN_SYNC_TYPES,\n} = unlock( patternPrivateApis );\n\n// Entities that are editable in focus mode.\nexport const FOCUSABLE_ENTITIES = [\n\tTEMPLATE_PART_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n\tPATTERN_TYPES.user,\n];\n\nexport const POST_TYPE_LABELS = {\n\t[ TEMPLATE_POST_TYPE ]: __( 'Template' ),\n\t[ TEMPLATE_PART_POST_TYPE ]: __( 'Template part' ),\n\t[ PATTERN_TYPES.user ]: __( 'Pattern' ),\n\t[ NAVIGATION_POST_TYPE ]: __( 'Navigation' ),\n};\n\n// DataViews constants\nexport const LAYOUT_GRID = 'grid';\nexport const LAYOUT_TABLE = 'table';\nexport const LAYOUT_LIST = 'list';\n\nexport const OPERATOR_IS = 'is';\nexport const OPERATOR_IS_NOT = 'isNot';\nexport const OPERATOR_IS_ANY = 'isAny';\nexport const OPERATOR_IS_NONE = 'isNone';\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,WAAW,IAAIC,kBAAkB,QAAQ,qBAAqB;;AAEvE;AACA;AACA;AACA,SAASC,MAAM,QAAQ,gBAAgB;;AAEvC;AACA,OAAO,MAAMC,oBAAoB,GAAG,eAAe;;AAEnD;AACA,OAAO,MAAMC,kBAAkB,GAAG,aAAa;AAC/C,OAAO,MAAMC,uBAAuB,GAAG,kBAAkB;AACzD,OAAO,MAAMC,gBAAgB,GAAG;EAC/BC,MAAM,EAAE,QAAQ;EAChBC,KAAK,EAAE,OAAO;EACdC,MAAM,EAAE;AACT,CAAC;AACD,OAAO,MAAMC,mCAAmC,GAAG,eAAe;AAClE,OAAO,MAAMC,gCAAgC,GAAG,WAAW;;AAE3D;AACA,OAAO,MAAM;EACZC,aAAa;EACbC,wBAAwB;EACxBC,qBAAqB;EACrBC,wBAAwB;EACxBC;AACD,CAAC,GAAGd,MAAM,CAAED,kBAAmB,CAAC;;AAEhC;AACA,OAAO,MAAMgB,kBAAkB,GAAG,CACjCZ,uBAAuB,EACvBF,oBAAoB,EACpBS,aAAa,CAACM,IAAI,CAClB;AAED,OAAO,MAAMC,gBAAgB,GAAG;EAC/B,CAAEf,kBAAkB,GAAIL,EAAE,CAAE,UAAW,CAAC;EACxC,CAAEM,uBAAuB,GAAIN,EAAE,CAAE,eAAgB,CAAC;EAClD,CAAEa,aAAa,CAACM,IAAI,GAAInB,EAAE,CAAE,SAAU,CAAC;EACvC,CAAEI,oBAAoB,GAAIJ,EAAE,CAAE,YAAa;AAC5C,CAAC;;AAED;AACA,OAAO,MAAMqB,WAAW,GAAG,MAAM;AACjC,OAAO,MAAMC,YAAY,GAAG,OAAO;AACnC,OAAO,MAAMC,WAAW,GAAG,MAAM;AAEjC,OAAO,MAAMC,WAAW,GAAG,IAAI;AAC/B,OAAO,MAAMC,eAAe,GAAG,OAAO;AACtC,OAAO,MAAMC,eAAe,GAAG,OAAO;AACtC,OAAO,MAAMC,gBAAgB,GAAG,QAAQ","ignoreList":[]}
|
|
@@ -371,37 +371,46 @@
|
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
.dataviews-view-grid .dataviews-view-grid__card {
|
|
374
|
-
border-radius: 4px;
|
|
375
|
-
border: 1px solid #e0e0e0;
|
|
376
374
|
height: 100%;
|
|
377
375
|
justify-content: flex-start;
|
|
378
376
|
}
|
|
379
377
|
.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__title-actions {
|
|
380
|
-
padding:
|
|
378
|
+
padding: 8px 0 4px;
|
|
381
379
|
}
|
|
382
380
|
.dataviews-view-grid .dataviews-view-grid__card .dataviews-view-grid__primary-field {
|
|
383
|
-
min-height:
|
|
384
|
-
}
|
|
385
|
-
.dataviews-view-grid .dataviews-view-grid__card.is-selected {
|
|
386
|
-
border-color: var(--wp-admin-theme-color);
|
|
387
|
-
background-color: rgba(var(--wp-admin-theme-color--rgb), 0.04);
|
|
381
|
+
min-height: 32px;
|
|
388
382
|
}
|
|
389
383
|
.dataviews-view-grid .dataviews-view-grid__card.is-selected .dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-value {
|
|
390
384
|
color: #1e1e1e;
|
|
391
385
|
}
|
|
386
|
+
.dataviews-view-grid .dataviews-view-grid__card.is-selected .page-pages-preview-field__button::after {
|
|
387
|
+
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
388
|
+
background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
|
|
389
|
+
}
|
|
392
390
|
.dataviews-view-grid .dataviews-view-grid__media {
|
|
393
391
|
width: 100%;
|
|
394
392
|
min-height: 200px;
|
|
395
393
|
aspect-ratio: 1/1;
|
|
396
|
-
border-bottom: 1px solid #e0e0e0;
|
|
397
394
|
background-color: #f0f0f0;
|
|
398
|
-
border-radius:
|
|
395
|
+
border-radius: 4px;
|
|
396
|
+
overflow: hidden;
|
|
397
|
+
position: relative;
|
|
399
398
|
}
|
|
400
399
|
.dataviews-view-grid .dataviews-view-grid__media img {
|
|
401
400
|
object-fit: cover;
|
|
402
401
|
width: 100%;
|
|
403
402
|
height: 100%;
|
|
404
403
|
}
|
|
404
|
+
.dataviews-view-grid .dataviews-view-grid__media::after {
|
|
405
|
+
content: "";
|
|
406
|
+
position: absolute;
|
|
407
|
+
top: 0;
|
|
408
|
+
right: 0;
|
|
409
|
+
width: 100%;
|
|
410
|
+
height: 100%;
|
|
411
|
+
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
|
|
412
|
+
border-radius: 4px;
|
|
413
|
+
}
|
|
405
414
|
.dataviews-view-grid .dataviews-view-grid__fields {
|
|
406
415
|
position: relative;
|
|
407
416
|
font-size: 12px;
|
|
@@ -410,7 +419,6 @@
|
|
|
410
419
|
.dataviews-view-grid .dataviews-view-grid__fields:not(:empty) {
|
|
411
420
|
padding: 12px 0;
|
|
412
421
|
padding-top: 0;
|
|
413
|
-
margin: 0 12px;
|
|
414
422
|
}
|
|
415
423
|
.dataviews-view-grid .dataviews-view-grid__fields .dataviews-view-grid__field {
|
|
416
424
|
align-items: flex-start;
|
|
@@ -431,8 +439,7 @@
|
|
|
431
439
|
color: #757575;
|
|
432
440
|
}
|
|
433
441
|
.dataviews-view-grid .dataviews-view-grid__badge-fields:not(:empty) {
|
|
434
|
-
padding: 12px;
|
|
435
|
-
padding-top: 0;
|
|
442
|
+
padding-bottom: 12px;
|
|
436
443
|
}
|
|
437
444
|
.dataviews-view-grid .dataviews-view-grid__badge-fields .dataviews-view-grid__field-value {
|
|
438
445
|
width: -moz-fit-content;
|
|
@@ -595,10 +602,6 @@
|
|
|
595
602
|
flex-shrink: 0;
|
|
596
603
|
}
|
|
597
604
|
|
|
598
|
-
.dataviews-view-grid__title-actions .dataviews-view-table-selection-checkbox {
|
|
599
|
-
margin-right: 8px;
|
|
600
|
-
}
|
|
601
|
-
|
|
602
605
|
.dataviews-filter-summary__popover .components-popover__content {
|
|
603
606
|
width: 230px;
|
|
604
607
|
padding: 0;
|
|
@@ -1006,7 +1009,6 @@
|
|
|
1006
1009
|
display: block;
|
|
1007
1010
|
width: 100%;
|
|
1008
1011
|
height: 100%;
|
|
1009
|
-
background: #fff;
|
|
1010
1012
|
}
|
|
1011
1013
|
.edit-site-visual-editor .edit-site-visual-editor__editor-canvas.is-focused {
|
|
1012
1014
|
outline: calc(2 * var(--wp-admin-border-width-focus)) solid var(--wp-admin-theme-color);
|
|
@@ -1072,32 +1074,26 @@
|
|
|
1072
1074
|
}
|
|
1073
1075
|
.resizable-editor__drag-handle::after {
|
|
1074
1076
|
position: absolute;
|
|
1075
|
-
top:
|
|
1077
|
+
top: 16px;
|
|
1076
1078
|
right: 4px;
|
|
1077
1079
|
left: 0;
|
|
1078
|
-
bottom:
|
|
1080
|
+
bottom: 16px;
|
|
1079
1081
|
content: "";
|
|
1080
1082
|
width: 4px;
|
|
1081
|
-
background:
|
|
1083
|
+
background-color: rgba(117, 117, 117, 0.4);
|
|
1082
1084
|
border-radius: 2px;
|
|
1083
1085
|
}
|
|
1084
1086
|
.resizable-editor__drag-handle.is-left {
|
|
1085
|
-
right: -
|
|
1087
|
+
right: -18px;
|
|
1086
1088
|
}
|
|
1087
1089
|
.resizable-editor__drag-handle.is-right {
|
|
1088
|
-
left: -
|
|
1090
|
+
left: -18px;
|
|
1089
1091
|
}
|
|
1090
|
-
.resizable-editor__drag-handle:hover, .resizable-editor__drag-handle:active {
|
|
1092
|
+
.resizable-editor__drag-handle:hover, .resizable-editor__drag-handle:focus, .resizable-editor__drag-handle:active {
|
|
1091
1093
|
opacity: 1;
|
|
1092
1094
|
}
|
|
1093
|
-
.resizable-editor__drag-handle:hover.
|
|
1094
|
-
background:
|
|
1095
|
-
}
|
|
1096
|
-
.resizable-editor__drag-handle:hover.is-variation-separator::after, .resizable-editor__drag-handle:active.is-variation-separator::after {
|
|
1097
|
-
background: var(--wp-admin-theme-color);
|
|
1098
|
-
}
|
|
1099
|
-
.resizable-editor__drag-handle:focus::after {
|
|
1100
|
-
box-shadow: 0 0 0 1px #2f2f2f, 0 0 0 calc(var(--wp-admin-border-width-focus) + 1px) var(--wp-admin-theme-color);
|
|
1095
|
+
.resizable-editor__drag-handle:hover::after, .resizable-editor__drag-handle:focus::after, .resizable-editor__drag-handle:active::after {
|
|
1096
|
+
background-color: var(--wp-admin-theme-color);
|
|
1101
1097
|
}
|
|
1102
1098
|
.resizable-editor__drag-handle.is-variation-separator:focus::after {
|
|
1103
1099
|
border-radius: 2px;
|
|
@@ -1579,6 +1575,13 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|
|
1579
1575
|
border-bottom: 1px solid #e0e0e0;
|
|
1580
1576
|
padding-right: 60px;
|
|
1581
1577
|
}
|
|
1578
|
+
.edit-site-header-edit-mode.show-block-toolbar .edit-site-header-edit-mode__start,
|
|
1579
|
+
.edit-site-header-edit-mode.show-block-toolbar .edit-site-header-edit-mode__end {
|
|
1580
|
+
flex-basis: auto;
|
|
1581
|
+
}
|
|
1582
|
+
.edit-site-header-edit-mode.show-block-toolbar .edit-site-header-edit-mode__center {
|
|
1583
|
+
display: none;
|
|
1584
|
+
}
|
|
1582
1585
|
.edit-site-header-edit-mode .edit-site-header-edit-mode__start {
|
|
1583
1586
|
display: flex;
|
|
1584
1587
|
border: none;
|
|
@@ -1716,68 +1719,6 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|
|
1716
1719
|
right: calc(50% + 1px);
|
|
1717
1720
|
}
|
|
1718
1721
|
|
|
1719
|
-
.has-fixed-toolbar .selected-block-tools-wrapper {
|
|
1720
|
-
overflow: hidden;
|
|
1721
|
-
display: flex;
|
|
1722
|
-
align-items: center;
|
|
1723
|
-
height: 60px;
|
|
1724
|
-
}
|
|
1725
|
-
.has-fixed-toolbar .selected-block-tools-wrapper .block-editor-block-contextual-toolbar {
|
|
1726
|
-
border-bottom: 0;
|
|
1727
|
-
height: 100%;
|
|
1728
|
-
}
|
|
1729
|
-
.has-fixed-toolbar .selected-block-tools-wrapper .block-editor-block-toolbar {
|
|
1730
|
-
height: 100%;
|
|
1731
|
-
padding-top: 15px;
|
|
1732
|
-
}
|
|
1733
|
-
.has-fixed-toolbar .selected-block-tools-wrapper .block-editor-block-toolbar .components-button:not(.block-editor-block-mover-button) {
|
|
1734
|
-
height: 32px;
|
|
1735
|
-
}
|
|
1736
|
-
.has-fixed-toolbar .selected-block-tools-wrapper::after {
|
|
1737
|
-
content: "";
|
|
1738
|
-
width: 1px;
|
|
1739
|
-
height: 24px;
|
|
1740
|
-
background-color: #ddd;
|
|
1741
|
-
margin-right: 8px;
|
|
1742
|
-
}
|
|
1743
|
-
.has-fixed-toolbar .selected-block-tools-wrapper .components-toolbar-group,
|
|
1744
|
-
.has-fixed-toolbar .selected-block-tools-wrapper .components-toolbar {
|
|
1745
|
-
border-left: none;
|
|
1746
|
-
}
|
|
1747
|
-
.has-fixed-toolbar .selected-block-tools-wrapper .components-toolbar-group::after,
|
|
1748
|
-
.has-fixed-toolbar .selected-block-tools-wrapper .components-toolbar::after {
|
|
1749
|
-
content: "";
|
|
1750
|
-
width: 1px;
|
|
1751
|
-
height: 24px;
|
|
1752
|
-
background-color: #ddd;
|
|
1753
|
-
margin-top: 4px;
|
|
1754
|
-
margin-right: 8px;
|
|
1755
|
-
}
|
|
1756
|
-
.has-fixed-toolbar .selected-block-tools-wrapper .components-toolbar-group .components-toolbar-group.components-toolbar-group::after,
|
|
1757
|
-
.has-fixed-toolbar .selected-block-tools-wrapper .components-toolbar .components-toolbar-group.components-toolbar-group::after {
|
|
1758
|
-
display: none;
|
|
1759
|
-
}
|
|
1760
|
-
.has-fixed-toolbar .selected-block-tools-wrapper .block-editor-block-mover.is-horizontal .block-editor-block-mover-button {
|
|
1761
|
-
height: 32px;
|
|
1762
|
-
overflow: visible;
|
|
1763
|
-
}
|
|
1764
|
-
@media (min-width: 600px) {
|
|
1765
|
-
.has-fixed-toolbar .selected-block-tools-wrapper .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container {
|
|
1766
|
-
position: relative;
|
|
1767
|
-
top: -10px;
|
|
1768
|
-
}
|
|
1769
|
-
}
|
|
1770
|
-
.has-fixed-toolbar .selected-block-tools-wrapper.is-collapsed {
|
|
1771
|
-
display: none;
|
|
1772
|
-
}
|
|
1773
|
-
.has-fixed-toolbar .edit-site-header-edit-mode__center.is-collapsed {
|
|
1774
|
-
display: none;
|
|
1775
|
-
}
|
|
1776
|
-
|
|
1777
|
-
.edit-site-header-edit-mode__block-tools-toggle {
|
|
1778
|
-
margin-right: 2px;
|
|
1779
|
-
}
|
|
1780
|
-
|
|
1781
1722
|
.components-popover.more-menu-dropdown__content {
|
|
1782
1723
|
z-index: 99998;
|
|
1783
1724
|
}
|
|
@@ -1864,6 +1805,15 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|
|
1864
1805
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
1865
1806
|
outline: 2px solid transparent;
|
|
1866
1807
|
}
|
|
1808
|
+
.page-pages-preview-field__button::after {
|
|
1809
|
+
content: "";
|
|
1810
|
+
height: 100%;
|
|
1811
|
+
right: 0;
|
|
1812
|
+
position: absolute;
|
|
1813
|
+
top: 0;
|
|
1814
|
+
width: 100%;
|
|
1815
|
+
z-index: 1;
|
|
1816
|
+
}
|
|
1867
1817
|
|
|
1868
1818
|
.edit-site-patterns__header {
|
|
1869
1819
|
position: sticky;
|
|
@@ -1907,9 +1857,16 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|
|
1907
1857
|
border-radius: 3px 3px 0 0;
|
|
1908
1858
|
}
|
|
1909
1859
|
.edit-site-page-patterns-dataviews .page-patterns-preview-field.is-viewtype-grid .block-editor-block-preview__container {
|
|
1910
|
-
height: 100%;
|
|
1911
1860
|
border-radius: 3px 3px 0 0;
|
|
1912
1861
|
}
|
|
1862
|
+
.edit-site-page-patterns-dataviews .page-patterns-preview-field.is-viewtype-table {
|
|
1863
|
+
width: 96px;
|
|
1864
|
+
flex-grow: 0;
|
|
1865
|
+
border-radius: 2px;
|
|
1866
|
+
}
|
|
1867
|
+
.edit-site-page-patterns-dataviews .page-patterns-preview-field.is-viewtype-table .page-patterns-preview-field__button {
|
|
1868
|
+
border-radius: 2px;
|
|
1869
|
+
}
|
|
1913
1870
|
.edit-site-page-patterns-dataviews .page-patterns-preview-field .page-patterns-preview-field__button {
|
|
1914
1871
|
box-shadow: none;
|
|
1915
1872
|
border: none;
|
|
@@ -1925,6 +1882,9 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|
|
1925
1882
|
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
1926
1883
|
outline: 2px solid transparent;
|
|
1927
1884
|
}
|
|
1885
|
+
.edit-site-page-patterns-dataviews .page-patterns-preview-field .page-patterns-preview-field__button[aria-disabled=true] {
|
|
1886
|
+
cursor: default;
|
|
1887
|
+
}
|
|
1928
1888
|
.edit-site-page-patterns-dataviews .edit-site-patterns__pattern-icon {
|
|
1929
1889
|
fill: var(--wp-block-synced-color);
|
|
1930
1890
|
flex-shrink: 0;
|
|
@@ -2008,7 +1968,7 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|
|
2008
1968
|
height: 120px;
|
|
2009
1969
|
}
|
|
2010
1970
|
.page-templates-preview-field.is-viewtype-grid .block-editor-block-preview__container {
|
|
2011
|
-
height:
|
|
1971
|
+
height: 100%;
|
|
2012
1972
|
}
|
|
2013
1973
|
.page-templates-preview-field.is-viewtype-grid .page-templates-preview-field__button {
|
|
2014
1974
|
border-radius: 3px 3px 0 0;
|
|
@@ -2032,7 +1992,7 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|
|
2032
1992
|
white-space: normal;
|
|
2033
1993
|
}
|
|
2034
1994
|
|
|
2035
|
-
.edit-site-page-
|
|
1995
|
+
.edit-site-page-templates .dataviews-pagination {
|
|
2036
1996
|
z-index: 2;
|
|
2037
1997
|
}
|
|
2038
1998
|
|
|
@@ -2222,30 +2182,6 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|
|
2222
2182
|
margin-top: -1px;
|
|
2223
2183
|
}
|
|
2224
2184
|
|
|
2225
|
-
.edit-site-change-status__content .components-popover__content {
|
|
2226
|
-
min-width: 320px;
|
|
2227
|
-
padding: 16px;
|
|
2228
|
-
}
|
|
2229
|
-
.edit-site-change-status__content .edit-site-change-status__options .components-base-control__field > .components-v-stack {
|
|
2230
|
-
gap: 8px;
|
|
2231
|
-
}
|
|
2232
|
-
.edit-site-change-status__content .edit-site-change-status__options label .components-text {
|
|
2233
|
-
display: block;
|
|
2234
|
-
}
|
|
2235
|
-
.edit-site-change-status__content .edit-site-change-status__password-legend {
|
|
2236
|
-
padding: 0;
|
|
2237
|
-
margin-bottom: 8px;
|
|
2238
|
-
}
|
|
2239
|
-
|
|
2240
|
-
.edit-site-summary-field__trigger {
|
|
2241
|
-
max-width: 100%;
|
|
2242
|
-
display: block;
|
|
2243
|
-
text-align: right;
|
|
2244
|
-
white-space: nowrap;
|
|
2245
|
-
overflow: hidden;
|
|
2246
|
-
text-overflow: ellipsis;
|
|
2247
|
-
}
|
|
2248
|
-
|
|
2249
2185
|
.components-panel__header.edit-site-sidebar-edit-mode__panel-tabs {
|
|
2250
2186
|
padding-right: 0;
|
|
2251
2187
|
padding-left: 16px;
|
|
@@ -2302,10 +2238,14 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
|
|
|
2302
2238
|
justify-content: center;
|
|
2303
2239
|
}
|
|
2304
2240
|
|
|
2241
|
+
.edit-site .has-block-breadcrumbs.is-full-canvas .components-editor-notices__snackbar {
|
|
2242
|
+
bottom: 40px;
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2305
2245
|
.edit-site .components-editor-notices__snackbar {
|
|
2306
2246
|
position: absolute;
|
|
2307
2247
|
left: 0;
|
|
2308
|
-
bottom:
|
|
2248
|
+
bottom: 16px;
|
|
2309
2249
|
padding-right: 16px;
|
|
2310
2250
|
padding-left: 16px;
|
|
2311
2251
|
}
|
|
@@ -3567,6 +3507,23 @@ body:has(.edit-site-resizable-frame__inner.is-resizing) {
|
|
|
3567
3507
|
margin-bottom: 0;
|
|
3568
3508
|
}
|
|
3569
3509
|
|
|
3510
|
+
.font-library-modal__fonts-title {
|
|
3511
|
+
text-transform: uppercase;
|
|
3512
|
+
font-size: 11px;
|
|
3513
|
+
font-weight: 600;
|
|
3514
|
+
margin-top: 0;
|
|
3515
|
+
margin-bottom: 0;
|
|
3516
|
+
}
|
|
3517
|
+
|
|
3518
|
+
.font-library-modal__fonts-list {
|
|
3519
|
+
margin-top: 0;
|
|
3520
|
+
margin-bottom: 0;
|
|
3521
|
+
}
|
|
3522
|
+
|
|
3523
|
+
.font-library-modal__fonts-list-item {
|
|
3524
|
+
margin-bottom: 0;
|
|
3525
|
+
}
|
|
3526
|
+
|
|
3570
3527
|
.font-library-modal__font-card {
|
|
3571
3528
|
border: 1px solid #e0e0e0;
|
|
3572
3529
|
width: 100%;
|
|
@@ -3794,9 +3751,6 @@ body.js.site-editor-php {
|
|
|
3794
3751
|
.edit-site .interface-complementary-area__pin-unpin-item.components-button {
|
|
3795
3752
|
display: none;
|
|
3796
3753
|
}
|
|
3797
|
-
.edit-site .interface-interface-skeleton__content {
|
|
3798
|
-
background-color: #ddd;
|
|
3799
|
-
}
|
|
3800
3754
|
|
|
3801
3755
|
/**
|
|
3802
3756
|
* Animations
|