@wordpress/edit-site 5.4.0 → 5.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-template/add-custom-template-modal.js +12 -3
- package/build/components/add-new-template/add-custom-template-modal.js.map +1 -1
- package/build/components/add-new-template/new-template-part.js +8 -7
- package/build/components/add-new-template/new-template-part.js.map +1 -1
- package/build/components/add-new-template/new-template.js +19 -16
- package/build/components/add-new-template/new-template.js.map +1 -1
- package/build/components/app/index.js +4 -2
- package/build/components/app/index.js.map +1 -1
- package/build/components/block-editor/editor-canvas.js +2 -1
- package/build/components/block-editor/editor-canvas.js.map +1 -1
- package/build/components/editor/index.js +5 -7
- package/build/components/editor/index.js.map +1 -1
- package/build/components/global-styles/border-panel.js +20 -159
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/context-menu.js +13 -11
- package/build/components/global-styles/context-menu.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +41 -487
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/duotone-panel.js +78 -0
- package/build/components/global-styles/duotone-panel.js.map +1 -0
- package/build/components/global-styles/filter-utils.js +17 -0
- package/build/components/global-styles/filter-utils.js.map +1 -0
- package/build/components/global-styles/hooks.js +11 -26
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/preview.js +9 -5
- package/build/components/global-styles/preview.js.map +1 -1
- package/build/components/global-styles/screen-block-list.js +6 -11
- package/build/components/global-styles/screen-block-list.js.map +1 -1
- package/build/components/global-styles/screen-border.js +14 -6
- package/build/components/global-styles/screen-border.js.map +1 -1
- package/build/components/global-styles/screen-filters.js +46 -0
- package/build/components/global-styles/screen-filters.js.map +1 -0
- package/build/components/global-styles/screen-layout.js +13 -5
- package/build/components/global-styles/screen-layout.js.map +1 -1
- package/build/components/global-styles/screen-root.js +2 -1
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/screen-style-variations.js +2 -1
- package/build/components/global-styles/screen-style-variations.js.map +1 -1
- package/build/components/global-styles/screen-variations.js +1 -1
- package/build/components/global-styles/screen-variations.js.map +1 -1
- package/build/components/global-styles/shadow-panel.js +6 -4
- package/build/components/global-styles/shadow-panel.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +2 -5
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/ui.js +7 -1
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +12 -0
- package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build/components/keyboard-shortcuts/edit-mode.js +124 -0
- package/build/components/keyboard-shortcuts/edit-mode.js.map +1 -0
- package/build/components/keyboard-shortcuts/global.js +48 -0
- package/build/components/keyboard-shortcuts/global.js.map +1 -0
- package/build/components/keyboard-shortcuts/index.js +67 -0
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/register.js +153 -0
- package/build/components/keyboard-shortcuts/register.js.map +1 -0
- package/build/components/layout/index.js +12 -1
- package/build/components/layout/index.js.map +1 -1
- package/build/components/list/added-by.js +127 -136
- package/build/components/list/added-by.js.map +1 -1
- package/build/components/list/index.js +2 -1
- package/build/components/list/index.js.map +1 -1
- package/build/components/list/table.js +9 -7
- package/build/components/list/table.js.map +1 -1
- package/build/components/routes/link.js +4 -1
- package/build/components/routes/link.js.map +1 -1
- package/build/components/save-hub/index.js +82 -0
- package/build/components/save-hub/index.js.map +1 -0
- package/build/components/save-panel/index.js +11 -1
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/sidebar/index.js +27 -17
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-button/index.js +30 -0
- package/build/components/sidebar-button/index.js.map +1 -0
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js +8 -2
- package/build/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +14 -11
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-main/index.js +16 -16
- package/build/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-item/index.js +22 -26
- package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +97 -14
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-menus/loader.js +19 -0
- package/build/components/sidebar-navigation-screen-navigation-menus/loader.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +77 -0
- package/build/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -0
- package/build/components/sidebar-navigation-screen-template/index.js +66 -27
- package/build/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates/index.js +30 -17
- package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js +14 -10
- package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build/components/site-hub/index.js +3 -1
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/style-book/index.js +151 -21
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +36 -34
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +24 -8
- package/build/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
- package/build/components/sync-state-with-url/use-sync-path-with-url.js +67 -18
- package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build/components/template-details/index.js +5 -10
- package/build/components/template-details/index.js.map +1 -1
- package/build/components/template-part-converter/convert-to-regular.js +8 -12
- package/build/components/template-part-converter/convert-to-regular.js.map +1 -1
- package/build/components/template-part-converter/convert-to-template-part.js +2 -2
- package/build/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build/components/template-part-converter/index.js +19 -14
- package/build/components/template-part-converter/index.js.map +1 -1
- package/build/components/use-edited-entity-record/index.js +6 -6
- package/build/components/use-edited-entity-record/index.js.map +1 -1
- package/build/index.js +13 -22
- package/build/index.js.map +1 -1
- package/build/store/actions.js +2 -2
- package/build/store/actions.js.map +1 -1
- package/build/utils/get-is-list-page.js +1 -1
- package/build/utils/get-is-list-page.js.map +1 -1
- package/build/utils/history.js +8 -2
- package/build/utils/history.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-template-modal.js +13 -4
- package/build-module/components/add-new-template/add-custom-template-modal.js.map +1 -1
- package/build-module/components/add-new-template/new-template-part.js +8 -7
- package/build-module/components/add-new-template/new-template-part.js.map +1 -1
- package/build-module/components/add-new-template/new-template.js +21 -17
- package/build-module/components/add-new-template/new-template.js.map +1 -1
- package/build-module/components/app/index.js +3 -2
- package/build-module/components/app/index.js.map +1 -1
- package/build-module/components/block-editor/editor-canvas.js +2 -1
- package/build-module/components/block-editor/editor-canvas.js.map +1 -1
- package/build-module/components/editor/index.js +5 -6
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +21 -157
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/context-menu.js +14 -11
- package/build-module/components/global-styles/context-menu.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +43 -480
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/duotone-panel.js +67 -0
- package/build-module/components/global-styles/duotone-panel.js.map +1 -0
- package/build-module/components/global-styles/filter-utils.js +9 -0
- package/build-module/components/global-styles/filter-utils.js.map +1 -0
- package/build-module/components/global-styles/hooks.js +11 -26
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/preview.js +10 -6
- package/build-module/components/global-styles/preview.js.map +1 -1
- package/build-module/components/global-styles/screen-block-list.js +6 -8
- package/build-module/components/global-styles/screen-block-list.js.map +1 -1
- package/build-module/components/global-styles/screen-border.js +12 -3
- package/build-module/components/global-styles/screen-border.js.map +1 -1
- package/build-module/components/global-styles/screen-filters.js +33 -0
- package/build-module/components/global-styles/screen-filters.js.map +1 -0
- package/build-module/components/global-styles/screen-layout.js +11 -2
- package/build-module/components/global-styles/screen-layout.js.map +1 -1
- package/build-module/components/global-styles/screen-root.js +2 -1
- package/build-module/components/global-styles/screen-root.js.map +1 -1
- package/build-module/components/global-styles/screen-style-variations.js +2 -1
- package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
- package/build-module/components/global-styles/screen-variations.js +1 -1
- package/build-module/components/global-styles/screen-variations.js.map +1 -1
- package/build-module/components/global-styles/shadow-panel.js +6 -4
- package/build-module/components/global-styles/shadow-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +2 -5
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/ui.js +6 -1
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +12 -0
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/edit-mode.js +108 -0
- package/build-module/components/keyboard-shortcuts/edit-mode.js.map +1 -0
- package/build-module/components/keyboard-shortcuts/global.js +37 -0
- package/build-module/components/keyboard-shortcuts/global.js.map +1 -0
- package/build-module/components/keyboard-shortcuts/index.js +65 -0
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/register.js +141 -0
- package/build-module/components/keyboard-shortcuts/register.js.map +1 -0
- package/build-module/components/layout/index.js +10 -1
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/list/added-by.js +126 -138
- package/build-module/components/list/added-by.js.map +1 -1
- package/build-module/components/list/index.js +2 -1
- package/build-module/components/list/index.js.map +1 -1
- package/build-module/components/list/table.js +9 -7
- package/build-module/components/list/table.js.map +1 -1
- package/build-module/components/routes/link.js +5 -2
- package/build-module/components/routes/link.js.map +1 -1
- package/build-module/components/save-hub/index.js +68 -0
- package/build-module/components/save-hub/index.js.map +1 -0
- package/build-module/components/save-panel/index.js +8 -1
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/sidebar/index.js +24 -19
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-button/index.js +18 -0
- package/build-module/components/sidebar-button/index.js.map +1 -0
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js +8 -2
- package/build-module/components/sidebar-edit-mode/global-styles-sidebar.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +12 -12
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-main/index.js +16 -16
- package/build-module/components/sidebar-navigation-screen-main/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +24 -30
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +91 -14
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-menus/loader.js +11 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menus/loader.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +66 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-template/index.js +67 -30
- package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates/index.js +28 -18
- package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +13 -10
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -1
- package/build-module/components/site-hub/index.js +3 -1
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/style-book/index.js +152 -25
- 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 +36 -34
- package/build-module/components/sync-state-with-url/use-init-edited-entity-from-url.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +24 -8
- package/build-module/components/sync-state-with-url/use-sync-canvas-mode-with-url.js.map +1 -1
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js +65 -18
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -1
- package/build-module/components/template-details/index.js +5 -9
- package/build-module/components/template-details/index.js.map +1 -1
- package/build-module/components/template-part-converter/convert-to-regular.js +9 -13
- package/build-module/components/template-part-converter/convert-to-regular.js.map +1 -1
- package/build-module/components/template-part-converter/convert-to-template-part.js +3 -3
- package/build-module/components/template-part-converter/convert-to-template-part.js.map +1 -1
- package/build-module/components/template-part-converter/index.js +20 -15
- package/build-module/components/template-part-converter/index.js.map +1 -1
- package/build-module/components/use-edited-entity-record/index.js +6 -6
- package/build-module/components/use-edited-entity-record/index.js.map +1 -1
- package/build-module/index.js +16 -23
- package/build-module/index.js.map +1 -1
- package/build-module/store/actions.js +2 -2
- package/build-module/store/actions.js.map +1 -1
- package/build-module/utils/get-is-list-page.js +1 -1
- package/build-module/utils/get-is-list-page.js.map +1 -1
- package/build-module/utils/history.js +9 -3
- package/build-module/utils/history.js.map +1 -1
- package/build-style/style-rtl.css +203 -143
- package/build-style/style.css +203 -143
- package/package.json +31 -31
- package/src/components/add-new-template/add-custom-template-modal.js +14 -10
- package/src/components/add-new-template/new-template-part.js +7 -9
- package/src/components/add-new-template/new-template.js +60 -38
- package/src/components/add-new-template/style.scss +12 -6
- package/src/components/app/index.js +9 -6
- package/src/components/block-editor/editor-canvas.js +2 -1
- package/src/components/block-editor/style.scss +1 -1
- package/src/components/editor/index.js +62 -65
- package/src/components/editor/style.scss +0 -6
- package/src/components/global-styles/border-panel.js +24 -199
- package/src/components/global-styles/context-menu.js +18 -12
- package/src/components/global-styles/dimensions-panel.js +43 -577
- package/src/components/global-styles/duotone-panel.js +82 -0
- package/src/components/global-styles/filter-utils.js +9 -0
- package/src/components/global-styles/hooks.js +12 -36
- package/src/components/global-styles/preview.js +155 -140
- package/src/components/global-styles/screen-block-list.js +6 -11
- package/src/components/global-styles/screen-border.js +10 -3
- package/src/components/global-styles/screen-filters.js +27 -0
- package/src/components/global-styles/screen-layout.js +9 -2
- package/src/components/global-styles/screen-root.js +1 -1
- package/src/components/global-styles/screen-style-variations.js +5 -1
- package/src/components/global-styles/screen-variations.js +0 -1
- package/src/components/global-styles/shadow-panel.js +4 -3
- package/src/components/global-styles/style.scss +10 -0
- package/src/components/global-styles/typography-panel.js +5 -7
- package/src/components/global-styles/ui.js +6 -1
- package/src/components/keyboard-shortcut-help-modal/config.js +10 -0
- package/src/components/keyboard-shortcuts/edit-mode.js +116 -0
- package/src/components/keyboard-shortcuts/global.js +35 -0
- package/src/components/keyboard-shortcuts/index.js +70 -0
- package/src/components/keyboard-shortcuts/register.js +157 -0
- package/src/components/layout/index.js +19 -0
- package/src/components/layout/style.scss +9 -4
- package/src/components/list/added-by.js +152 -155
- package/src/components/list/index.js +3 -1
- package/src/components/list/style.scss +5 -13
- package/src/components/list/table.js +11 -9
- package/src/components/routes/link.js +9 -2
- package/src/components/save-hub/index.js +78 -0
- package/src/components/save-hub/style.scss +15 -0
- package/src/components/save-panel/index.js +8 -1
- package/src/components/sidebar/index.js +33 -16
- package/src/components/sidebar/style.scss +4 -3
- package/src/components/sidebar-button/index.js +21 -0
- package/src/components/sidebar-button/style.scss +24 -0
- package/src/components/sidebar-edit-mode/global-styles-sidebar.js +3 -7
- package/src/components/sidebar-edit-mode/style.scss +16 -0
- package/src/components/sidebar-navigation-item/style.scss +1 -23
- package/src/components/sidebar-navigation-screen/index.js +37 -38
- package/src/components/sidebar-navigation-screen/style.scss +16 -9
- package/src/components/sidebar-navigation-screen-main/index.js +24 -11
- package/src/components/sidebar-navigation-screen-navigation-item/index.js +39 -26
- package/src/components/sidebar-navigation-screen-navigation-menus/index.js +99 -12
- package/src/components/sidebar-navigation-screen-navigation-menus/loader.js +9 -0
- package/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js +78 -0
- package/src/components/sidebar-navigation-screen-navigation-menus/style.scss +108 -1
- package/src/components/sidebar-navigation-screen-template/index.js +89 -30
- package/src/components/sidebar-navigation-screen-template/style.scss +25 -0
- package/src/components/sidebar-navigation-screen-templates/index.js +29 -14
- package/src/components/sidebar-navigation-screen-templates/style.scss +0 -5
- package/src/components/sidebar-navigation-screen-templates-browse/index.js +12 -6
- package/src/components/site-hub/index.js +5 -1
- package/src/components/site-hub/style.scss +5 -1
- package/src/components/style-book/index.js +234 -55
- package/src/components/style-book/style.scss +1 -45
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +28 -23
- package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +38 -8
- package/src/components/sync-state-with-url/use-sync-path-with-url.js +77 -17
- package/src/components/template-details/index.js +4 -8
- package/src/components/template-part-converter/convert-to-regular.js +10 -17
- package/src/components/template-part-converter/convert-to-template-part.js +9 -16
- package/src/components/template-part-converter/index.js +28 -12
- package/src/components/use-edited-entity-record/index.js +26 -18
- package/src/index.js +11 -22
- package/src/store/actions.js +2 -2
- package/src/store/test/actions.js +0 -2
- package/src/style.scss +3 -1
- package/src/utils/get-is-list-page.js +1 -1
- package/src/utils/history.js +13 -9
- package/build/components/navigation-inspector/index.js +0 -161
- package/build/components/navigation-inspector/index.js.map +0 -1
- package/build/components/navigation-inspector/navigation-menu.js +0 -62
- package/build/components/navigation-inspector/navigation-menu.js.map +0 -1
- package/build-module/components/navigation-inspector/index.js +0 -146
- package/build-module/components/navigation-inspector/index.js.map +0 -1
- package/build-module/components/navigation-inspector/navigation-menu.js +0 -52
- package/build-module/components/navigation-inspector/navigation-menu.js.map +0 -1
- package/src/components/navigation-inspector/index.js +0 -191
- package/src/components/navigation-inspector/navigation-menu.js +0 -66
- package/src/components/navigation-inspector/style.scss +0 -46
|
@@ -2,18 +2,16 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
5
|
-
import { useMemo } from '@wordpress/element';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* Internal dependencies
|
|
9
8
|
*/
|
|
10
9
|
import { unlock } from '../../private-apis';
|
|
11
|
-
import { useSupportedStyles } from './hooks';
|
|
12
10
|
|
|
13
11
|
const {
|
|
14
12
|
useGlobalStyle,
|
|
15
13
|
useGlobalSetting,
|
|
16
|
-
|
|
14
|
+
useSettingsForBlockElement,
|
|
17
15
|
TypographyPanel: StylesTypographyPanel,
|
|
18
16
|
} = unlock( blockEditorPrivateApis );
|
|
19
17
|
|
|
@@ -40,10 +38,10 @@ export default function TypographyPanel( {
|
|
|
40
38
|
} );
|
|
41
39
|
const [ rawSettings ] = useGlobalSetting( '', name );
|
|
42
40
|
const usedElement = element === 'heading' ? headingLevel : element;
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
const settings = useSettingsForBlockElement(
|
|
42
|
+
rawSettings,
|
|
43
|
+
name,
|
|
44
|
+
usedElement
|
|
47
45
|
);
|
|
48
46
|
|
|
49
47
|
return (
|
|
@@ -24,6 +24,7 @@ import ScreenBlockList from './screen-block-list';
|
|
|
24
24
|
import ScreenBlock from './screen-block';
|
|
25
25
|
import ScreenTypography from './screen-typography';
|
|
26
26
|
import ScreenTypographyElement from './screen-typography-element';
|
|
27
|
+
import ScreenFilters from './screen-filters';
|
|
27
28
|
import ScreenColors from './screen-colors';
|
|
28
29
|
import ScreenColorPalette from './screen-color-palette';
|
|
29
30
|
import ScreenBackgroundColor from './screen-background-color';
|
|
@@ -68,7 +69,7 @@ function GlobalStylesActionMenu() {
|
|
|
68
69
|
<GlobalStylesMenuFill>
|
|
69
70
|
<DropdownMenu
|
|
70
71
|
icon={ moreVertical }
|
|
71
|
-
label={ __( '
|
|
72
|
+
label={ __( 'Styles actions' ) }
|
|
72
73
|
controls={ [
|
|
73
74
|
{
|
|
74
75
|
title: __( 'Reset to defaults' ),
|
|
@@ -205,6 +206,10 @@ function ContextScreens( { name, parentMenu = '', variation = '' } ) {
|
|
|
205
206
|
<ScreenBackgroundColor name={ name } variation={ variation } />
|
|
206
207
|
</GlobalStylesNavigationScreen>
|
|
207
208
|
|
|
209
|
+
<GlobalStylesNavigationScreen path={ parentMenu + '/filters' }>
|
|
210
|
+
<ScreenFilters name={ name } />
|
|
211
|
+
</GlobalStylesNavigationScreen>
|
|
212
|
+
|
|
208
213
|
<GlobalStylesNavigationScreen path={ parentMenu + '/colors/text' }>
|
|
209
214
|
<ScreenTextColor name={ name } variation={ variation } />
|
|
210
215
|
</GlobalStylesNavigationScreen>
|
|
@@ -36,4 +36,14 @@ export const textFormattingShortcuts = [
|
|
|
36
36
|
keyCombination: { modifier: 'access', character: 'x' },
|
|
37
37
|
description: __( 'Make the selected text inline code.' ),
|
|
38
38
|
},
|
|
39
|
+
{
|
|
40
|
+
keyCombination: { modifier: 'access', character: '0' },
|
|
41
|
+
description: __( 'Convert the current heading to a paragraph.' ),
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
keyCombination: { modifier: 'access', character: '1-6' },
|
|
45
|
+
description: __(
|
|
46
|
+
'Convert the current paragraph or heading to a heading of level 1 to 6.'
|
|
47
|
+
),
|
|
48
|
+
},
|
|
39
49
|
];
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { useShortcut } from '@wordpress/keyboard-shortcuts';
|
|
5
|
+
import { useDispatch, useSelect } from '@wordpress/data';
|
|
6
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
7
|
+
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
8
|
+
import { store as interfaceStore } from '@wordpress/interface';
|
|
9
|
+
import { createBlock } from '@wordpress/blocks';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Internal dependencies
|
|
13
|
+
*/
|
|
14
|
+
import { store as editSiteStore } from '../../store';
|
|
15
|
+
import { SIDEBAR_BLOCK } from '../sidebar-edit-mode/constants';
|
|
16
|
+
import { STORE_NAME } from '../../store/constants';
|
|
17
|
+
|
|
18
|
+
function KeyboardShortcutsEditMode() {
|
|
19
|
+
const { getEditorMode } = useSelect( editSiteStore );
|
|
20
|
+
const isListViewOpen = useSelect(
|
|
21
|
+
( select ) => select( editSiteStore ).isListViewOpened(),
|
|
22
|
+
[]
|
|
23
|
+
);
|
|
24
|
+
const isBlockInspectorOpen = useSelect(
|
|
25
|
+
( select ) =>
|
|
26
|
+
select( interfaceStore ).getActiveComplementaryArea(
|
|
27
|
+
editSiteStore.name
|
|
28
|
+
) === SIDEBAR_BLOCK,
|
|
29
|
+
[]
|
|
30
|
+
);
|
|
31
|
+
const { redo, undo } = useDispatch( coreStore );
|
|
32
|
+
const { setIsListViewOpened, switchEditorMode } =
|
|
33
|
+
useDispatch( editSiteStore );
|
|
34
|
+
const { enableComplementaryArea, disableComplementaryArea } =
|
|
35
|
+
useDispatch( interfaceStore );
|
|
36
|
+
|
|
37
|
+
const { replaceBlocks } = useDispatch( blockEditorStore );
|
|
38
|
+
const { getBlockName, getSelectedBlockClientId, getBlockAttributes } =
|
|
39
|
+
useSelect( blockEditorStore );
|
|
40
|
+
|
|
41
|
+
const handleTextLevelShortcut = ( event, level ) => {
|
|
42
|
+
event.preventDefault();
|
|
43
|
+
const destinationBlockName =
|
|
44
|
+
level === 0 ? 'core/paragraph' : 'core/heading';
|
|
45
|
+
const currentClientId = getSelectedBlockClientId();
|
|
46
|
+
if ( currentClientId === null ) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const blockName = getBlockName( currentClientId );
|
|
50
|
+
if ( blockName !== 'core/paragraph' && blockName !== 'core/heading' ) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const attributes = getBlockAttributes( currentClientId );
|
|
54
|
+
const textAlign =
|
|
55
|
+
blockName === 'core/paragraph' ? 'align' : 'textAlign';
|
|
56
|
+
const destinationTextAlign =
|
|
57
|
+
destinationBlockName === 'core/paragraph' ? 'align' : 'textAlign';
|
|
58
|
+
|
|
59
|
+
replaceBlocks(
|
|
60
|
+
currentClientId,
|
|
61
|
+
createBlock( destinationBlockName, {
|
|
62
|
+
level,
|
|
63
|
+
content: attributes.content,
|
|
64
|
+
...{ [ destinationTextAlign ]: attributes[ textAlign ] },
|
|
65
|
+
} )
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
useShortcut( 'core/edit-site/undo', ( event ) => {
|
|
70
|
+
undo();
|
|
71
|
+
event.preventDefault();
|
|
72
|
+
} );
|
|
73
|
+
|
|
74
|
+
useShortcut( 'core/edit-site/redo', ( event ) => {
|
|
75
|
+
redo();
|
|
76
|
+
event.preventDefault();
|
|
77
|
+
} );
|
|
78
|
+
|
|
79
|
+
useShortcut( 'core/edit-site/toggle-list-view', () => {
|
|
80
|
+
setIsListViewOpened( ! isListViewOpen );
|
|
81
|
+
} );
|
|
82
|
+
|
|
83
|
+
useShortcut( 'core/edit-site/toggle-block-settings-sidebar', ( event ) => {
|
|
84
|
+
// This shortcut has no known clashes, but use preventDefault to prevent any
|
|
85
|
+
// obscure shortcuts from triggering.
|
|
86
|
+
event.preventDefault();
|
|
87
|
+
|
|
88
|
+
if ( isBlockInspectorOpen ) {
|
|
89
|
+
disableComplementaryArea( STORE_NAME );
|
|
90
|
+
} else {
|
|
91
|
+
enableComplementaryArea( STORE_NAME, SIDEBAR_BLOCK );
|
|
92
|
+
}
|
|
93
|
+
} );
|
|
94
|
+
|
|
95
|
+
useShortcut( 'core/edit-site/toggle-mode', () => {
|
|
96
|
+
switchEditorMode( getEditorMode() === 'visual' ? 'text' : 'visual' );
|
|
97
|
+
} );
|
|
98
|
+
|
|
99
|
+
useShortcut( 'core/edit-site/transform-heading-to-paragraph', ( event ) =>
|
|
100
|
+
handleTextLevelShortcut( event, 0 )
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
[ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => {
|
|
104
|
+
//the loop is based off on a constant therefore
|
|
105
|
+
//the hook will execute the same way every time
|
|
106
|
+
//eslint-disable-next-line react-hooks/rules-of-hooks
|
|
107
|
+
useShortcut(
|
|
108
|
+
`core/edit-site/transform-paragraph-to-heading-${ level }`,
|
|
109
|
+
( event ) => handleTextLevelShortcut( event, level )
|
|
110
|
+
);
|
|
111
|
+
} );
|
|
112
|
+
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export default KeyboardShortcutsEditMode;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { useShortcut } from '@wordpress/keyboard-shortcuts';
|
|
5
|
+
import { useDispatch, useSelect } from '@wordpress/data';
|
|
6
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Internal dependencies
|
|
10
|
+
*/
|
|
11
|
+
import { store as editSiteStore } from '../../store';
|
|
12
|
+
|
|
13
|
+
function KeyboardShortcutsGlobal() {
|
|
14
|
+
const { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } =
|
|
15
|
+
useSelect( coreStore );
|
|
16
|
+
const { setIsSaveViewOpened } = useDispatch( editSiteStore );
|
|
17
|
+
|
|
18
|
+
useShortcut( 'core/edit-site/save', ( event ) => {
|
|
19
|
+
event.preventDefault();
|
|
20
|
+
|
|
21
|
+
const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
|
|
22
|
+
const isDirty = !! dirtyEntityRecords.length;
|
|
23
|
+
const isSaving = dirtyEntityRecords.some( ( record ) =>
|
|
24
|
+
isSavingEntityRecord( record.kind, record.name, record.key )
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
if ( ! isSaving && isDirty ) {
|
|
28
|
+
setIsSaveViewOpened( true );
|
|
29
|
+
}
|
|
30
|
+
} );
|
|
31
|
+
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default KeyboardShortcutsGlobal;
|
|
@@ -10,7 +10,9 @@ import { isAppleOS } from '@wordpress/keycodes';
|
|
|
10
10
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
11
11
|
import { __ } from '@wordpress/i18n';
|
|
12
12
|
import { store as coreStore } from '@wordpress/core-data';
|
|
13
|
+
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
13
14
|
import { store as interfaceStore } from '@wordpress/interface';
|
|
15
|
+
import { createBlock } from '@wordpress/blocks';
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
18
|
* Internal dependencies
|
|
@@ -41,6 +43,38 @@ function KeyboardShortcuts() {
|
|
|
41
43
|
useDispatch( interfaceStore );
|
|
42
44
|
const { setIsSaveViewOpened } = useDispatch( editSiteStore );
|
|
43
45
|
|
|
46
|
+
const { replaceBlocks } = useDispatch( blockEditorStore );
|
|
47
|
+
const { getBlockName, getSelectedBlockClientId, getBlockAttributes } =
|
|
48
|
+
useSelect( blockEditorStore );
|
|
49
|
+
|
|
50
|
+
const handleTextLevelShortcut = ( event, level ) => {
|
|
51
|
+
event.preventDefault();
|
|
52
|
+
const destinationBlockName =
|
|
53
|
+
level === 0 ? 'core/paragraph' : 'core/heading';
|
|
54
|
+
const currentClientId = getSelectedBlockClientId();
|
|
55
|
+
if ( currentClientId === null ) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const blockName = getBlockName( currentClientId );
|
|
59
|
+
if ( blockName !== 'core/paragraph' && blockName !== 'core/heading' ) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const attributes = getBlockAttributes( currentClientId );
|
|
63
|
+
const textAlign =
|
|
64
|
+
blockName === 'core/paragraph' ? 'align' : 'textAlign';
|
|
65
|
+
const destinationTextAlign =
|
|
66
|
+
destinationBlockName === 'core/paragraph' ? 'align' : 'textAlign';
|
|
67
|
+
|
|
68
|
+
replaceBlocks(
|
|
69
|
+
currentClientId,
|
|
70
|
+
createBlock( destinationBlockName, {
|
|
71
|
+
level,
|
|
72
|
+
content: attributes.content,
|
|
73
|
+
...{ [ destinationTextAlign ]: attributes[ textAlign ] },
|
|
74
|
+
} )
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
|
|
44
78
|
useShortcut( 'core/edit-site/save', ( event ) => {
|
|
45
79
|
event.preventDefault();
|
|
46
80
|
|
|
@@ -85,6 +119,20 @@ function KeyboardShortcuts() {
|
|
|
85
119
|
switchEditorMode( getEditorMode() === 'visual' ? 'text' : 'visual' );
|
|
86
120
|
} );
|
|
87
121
|
|
|
122
|
+
useShortcut( 'core/edit-site/transform-heading-to-paragraph', ( event ) =>
|
|
123
|
+
handleTextLevelShortcut( event, 0 )
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
[ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => {
|
|
127
|
+
//the loop is based off on a constant therefore
|
|
128
|
+
//the hook will execute the same way every time
|
|
129
|
+
//eslint-disable-next-line react-hooks/rules-of-hooks
|
|
130
|
+
useShortcut(
|
|
131
|
+
`core/edit-site/transform-paragraph-to-heading-${ level }`,
|
|
132
|
+
( event ) => handleTextLevelShortcut( event, level )
|
|
133
|
+
);
|
|
134
|
+
} );
|
|
135
|
+
|
|
88
136
|
return null;
|
|
89
137
|
}
|
|
90
138
|
|
|
@@ -208,6 +256,28 @@ function KeyboardShortcutsRegister() {
|
|
|
208
256
|
character: 'm',
|
|
209
257
|
},
|
|
210
258
|
} );
|
|
259
|
+
|
|
260
|
+
registerShortcut( {
|
|
261
|
+
name: `core/edit-site/transform-heading-to-paragraph`,
|
|
262
|
+
category: 'block-library',
|
|
263
|
+
description: __( 'Transform heading to paragraph.' ),
|
|
264
|
+
keyCombination: {
|
|
265
|
+
modifier: 'access',
|
|
266
|
+
character: `0`,
|
|
267
|
+
},
|
|
268
|
+
} );
|
|
269
|
+
|
|
270
|
+
[ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => {
|
|
271
|
+
registerShortcut( {
|
|
272
|
+
name: `core/edit-site/transform-paragraph-to-heading-${ level }`,
|
|
273
|
+
category: 'block-library',
|
|
274
|
+
description: __( 'Transform paragraph to heading.' ),
|
|
275
|
+
keyCombination: {
|
|
276
|
+
modifier: 'access',
|
|
277
|
+
character: `${ level }`,
|
|
278
|
+
},
|
|
279
|
+
} );
|
|
280
|
+
} );
|
|
211
281
|
}, [ registerShortcut ] );
|
|
212
282
|
|
|
213
283
|
return null;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { useEffect } from '@wordpress/element';
|
|
5
|
+
import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
|
|
6
|
+
import { isAppleOS } from '@wordpress/keycodes';
|
|
7
|
+
import { useDispatch } from '@wordpress/data';
|
|
8
|
+
import { __ } from '@wordpress/i18n';
|
|
9
|
+
|
|
10
|
+
function KeyboardShortcutsRegister() {
|
|
11
|
+
// Registering the shortcuts.
|
|
12
|
+
const { registerShortcut } = useDispatch( keyboardShortcutsStore );
|
|
13
|
+
useEffect( () => {
|
|
14
|
+
registerShortcut( {
|
|
15
|
+
name: 'core/edit-site/save',
|
|
16
|
+
category: 'global',
|
|
17
|
+
description: __( 'Save your changes.' ),
|
|
18
|
+
keyCombination: {
|
|
19
|
+
modifier: 'primary',
|
|
20
|
+
character: 's',
|
|
21
|
+
},
|
|
22
|
+
} );
|
|
23
|
+
|
|
24
|
+
registerShortcut( {
|
|
25
|
+
name: 'core/edit-site/undo',
|
|
26
|
+
category: 'global',
|
|
27
|
+
description: __( 'Undo your last changes.' ),
|
|
28
|
+
keyCombination: {
|
|
29
|
+
modifier: 'primary',
|
|
30
|
+
character: 'z',
|
|
31
|
+
},
|
|
32
|
+
} );
|
|
33
|
+
|
|
34
|
+
registerShortcut( {
|
|
35
|
+
name: 'core/edit-site/redo',
|
|
36
|
+
category: 'global',
|
|
37
|
+
description: __( 'Redo your last undo.' ),
|
|
38
|
+
keyCombination: {
|
|
39
|
+
modifier: 'primaryShift',
|
|
40
|
+
character: 'z',
|
|
41
|
+
},
|
|
42
|
+
// Disable on Apple OS because it conflicts with the browser's
|
|
43
|
+
// history shortcut. It's a fine alias for both Windows and Linux.
|
|
44
|
+
// Since there's no conflict for Ctrl+Shift+Z on both Windows and
|
|
45
|
+
// Linux, we keep it as the default for consistency.
|
|
46
|
+
aliases: isAppleOS()
|
|
47
|
+
? []
|
|
48
|
+
: [
|
|
49
|
+
{
|
|
50
|
+
modifier: 'primary',
|
|
51
|
+
character: 'y',
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
} );
|
|
55
|
+
|
|
56
|
+
registerShortcut( {
|
|
57
|
+
name: 'core/edit-site/toggle-list-view',
|
|
58
|
+
category: 'global',
|
|
59
|
+
description: __( 'Open the block list view.' ),
|
|
60
|
+
keyCombination: {
|
|
61
|
+
modifier: 'access',
|
|
62
|
+
character: 'o',
|
|
63
|
+
},
|
|
64
|
+
} );
|
|
65
|
+
|
|
66
|
+
registerShortcut( {
|
|
67
|
+
name: 'core/edit-site/toggle-block-settings-sidebar',
|
|
68
|
+
category: 'global',
|
|
69
|
+
description: __( 'Show or hide the block settings sidebar.' ),
|
|
70
|
+
keyCombination: {
|
|
71
|
+
modifier: 'primaryShift',
|
|
72
|
+
character: ',',
|
|
73
|
+
},
|
|
74
|
+
} );
|
|
75
|
+
|
|
76
|
+
registerShortcut( {
|
|
77
|
+
name: 'core/edit-site/keyboard-shortcuts',
|
|
78
|
+
category: 'main',
|
|
79
|
+
description: __( 'Display these keyboard shortcuts.' ),
|
|
80
|
+
keyCombination: {
|
|
81
|
+
modifier: 'access',
|
|
82
|
+
character: 'h',
|
|
83
|
+
},
|
|
84
|
+
} );
|
|
85
|
+
|
|
86
|
+
registerShortcut( {
|
|
87
|
+
name: 'core/edit-site/next-region',
|
|
88
|
+
category: 'global',
|
|
89
|
+
description: __( 'Navigate to the next part of the editor.' ),
|
|
90
|
+
keyCombination: {
|
|
91
|
+
modifier: 'ctrl',
|
|
92
|
+
character: '`',
|
|
93
|
+
},
|
|
94
|
+
aliases: [
|
|
95
|
+
{
|
|
96
|
+
modifier: 'access',
|
|
97
|
+
character: 'n',
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
} );
|
|
101
|
+
|
|
102
|
+
registerShortcut( {
|
|
103
|
+
name: 'core/edit-site/previous-region',
|
|
104
|
+
category: 'global',
|
|
105
|
+
description: __( 'Navigate to the previous part of the editor.' ),
|
|
106
|
+
keyCombination: {
|
|
107
|
+
modifier: 'ctrlShift',
|
|
108
|
+
character: '`',
|
|
109
|
+
},
|
|
110
|
+
aliases: [
|
|
111
|
+
{
|
|
112
|
+
modifier: 'access',
|
|
113
|
+
character: 'p',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
modifier: 'ctrlShift',
|
|
117
|
+
character: '~',
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
} );
|
|
121
|
+
registerShortcut( {
|
|
122
|
+
name: 'core/edit-site/toggle-mode',
|
|
123
|
+
category: 'global',
|
|
124
|
+
description: __( 'Switch between visual editor and code editor.' ),
|
|
125
|
+
keyCombination: {
|
|
126
|
+
modifier: 'secondary',
|
|
127
|
+
character: 'm',
|
|
128
|
+
},
|
|
129
|
+
} );
|
|
130
|
+
|
|
131
|
+
registerShortcut( {
|
|
132
|
+
name: `core/edit-site/transform-heading-to-paragraph`,
|
|
133
|
+
category: 'block-library',
|
|
134
|
+
description: __( 'Transform heading to paragraph.' ),
|
|
135
|
+
keyCombination: {
|
|
136
|
+
modifier: 'access',
|
|
137
|
+
character: `0`,
|
|
138
|
+
},
|
|
139
|
+
} );
|
|
140
|
+
|
|
141
|
+
[ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => {
|
|
142
|
+
registerShortcut( {
|
|
143
|
+
name: `core/edit-site/transform-paragraph-to-heading-${ level }`,
|
|
144
|
+
category: 'block-library',
|
|
145
|
+
description: __( 'Transform paragraph to heading.' ),
|
|
146
|
+
keyCombination: {
|
|
147
|
+
modifier: 'access',
|
|
148
|
+
character: `${ level }`,
|
|
149
|
+
},
|
|
150
|
+
} );
|
|
151
|
+
} );
|
|
152
|
+
}, [ registerShortcut ] );
|
|
153
|
+
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export default KeyboardShortcutsRegister;
|
|
@@ -40,6 +40,8 @@ import ResizeHandle from '../block-editor/resize-handle';
|
|
|
40
40
|
import useSyncCanvasModeWithURL from '../sync-state-with-url/use-sync-canvas-mode-with-url';
|
|
41
41
|
import { unlock } from '../../private-apis';
|
|
42
42
|
import SavePanel from '../save-panel';
|
|
43
|
+
import KeyboardShortcutsRegister from '../keyboard-shortcuts/register';
|
|
44
|
+
import KeyboardShortcutsGlobal from '../keyboard-shortcuts/global';
|
|
43
45
|
|
|
44
46
|
const ANIMATION_DURATION = 0.5;
|
|
45
47
|
const emptyResizeHandleStyles = {
|
|
@@ -121,6 +123,8 @@ export default function Layout() {
|
|
|
121
123
|
|
|
122
124
|
return (
|
|
123
125
|
<>
|
|
126
|
+
<KeyboardShortcutsRegister />
|
|
127
|
+
<KeyboardShortcutsGlobal />
|
|
124
128
|
{ fullResizer }
|
|
125
129
|
<div
|
|
126
130
|
{ ...navigateRegionsProps }
|
|
@@ -273,6 +277,21 @@ export default function Layout() {
|
|
|
273
277
|
{ canvasResizer }
|
|
274
278
|
{ !! canvasSize.width && (
|
|
275
279
|
<motion.div
|
|
280
|
+
whileHover={
|
|
281
|
+
isEditorPage && canvasMode === 'view'
|
|
282
|
+
? {
|
|
283
|
+
scale: 1.005,
|
|
284
|
+
transition: {
|
|
285
|
+
duration:
|
|
286
|
+
disableMotion ||
|
|
287
|
+
isResizing
|
|
288
|
+
? 0
|
|
289
|
+
: 0.5,
|
|
290
|
+
ease: 'easeOut',
|
|
291
|
+
},
|
|
292
|
+
}
|
|
293
|
+
: {}
|
|
294
|
+
}
|
|
276
295
|
initial={ false }
|
|
277
296
|
layout="position"
|
|
278
297
|
className="edit-site-layout__canvas"
|
|
@@ -49,11 +49,9 @@
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.edit-site-layout__content {
|
|
52
|
+
height: 100%;
|
|
52
53
|
flex-grow: 1;
|
|
53
54
|
display: flex;
|
|
54
|
-
|
|
55
|
-
// Hide scrollbars during the edit/view animation.
|
|
56
|
-
overflow: hidden;
|
|
57
55
|
}
|
|
58
56
|
|
|
59
57
|
.edit-site-layout__sidebar {
|
|
@@ -207,10 +205,17 @@
|
|
|
207
205
|
|
|
208
206
|
&:focus,
|
|
209
207
|
&:focus-within {
|
|
210
|
-
top:
|
|
208
|
+
top: auto;
|
|
211
209
|
bottom: 0;
|
|
212
210
|
}
|
|
213
211
|
|
|
212
|
+
&.is-entity-save-view-open {
|
|
213
|
+
&:focus,
|
|
214
|
+
&:focus-within {
|
|
215
|
+
top: 0;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
214
219
|
@include break-medium {
|
|
215
220
|
border-left: $border-width solid $gray-300;
|
|
216
221
|
}
|