@wordpress/edit-site 5.3.1 → 5.3.3
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 +1 -0
- package/build/components/add-new-template/new-template-part.js +8 -5
- package/build/components/add-new-template/new-template-part.js.map +1 -1
- package/build/components/add-new-template/new-template.js +8 -5
- package/build/components/add-new-template/new-template.js.map +1 -1
- package/build/components/block-editor/editor-canvas.js +3 -3
- package/build/components/block-editor/editor-canvas.js.map +1 -1
- package/build/components/block-editor/index.js +3 -3
- package/build/components/block-editor/index.js.map +1 -1
- package/build/components/editor/index.js +26 -38
- package/build/components/editor/index.js.map +1 -1
- package/build/components/global-styles/block-preview-panel.js +10 -12
- package/build/components/global-styles/block-preview-panel.js.map +1 -1
- package/build/components/global-styles/border-panel.js +2 -2
- package/build/components/global-styles/border-panel.js.map +1 -1
- package/build/components/global-styles/color-palette-panel.js +2 -2
- package/build/components/global-styles/color-palette-panel.js.map +1 -1
- package/build/components/global-styles/context-menu.js +9 -2
- package/build/components/global-styles/context-menu.js.map +1 -1
- package/build/components/global-styles/custom-css.js +2 -2
- package/build/components/global-styles/custom-css.js.map +1 -1
- package/build/components/global-styles/dimensions-panel.js +2 -2
- package/build/components/global-styles/dimensions-panel.js.map +1 -1
- package/build/components/global-styles/global-styles-provider.js +2 -2
- package/build/components/global-styles/global-styles-provider.js.map +1 -1
- package/build/components/global-styles/gradients-palette-panel.js +2 -2
- package/build/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build/components/global-styles/header.js +1 -1
- package/build/components/global-styles/header.js.map +1 -1
- package/build/components/global-styles/hooks.js +2 -2
- package/build/components/global-styles/hooks.js.map +1 -1
- package/build/components/global-styles/navigation-button.js +1 -1
- package/build/components/global-styles/navigation-button.js.map +1 -1
- package/build/components/global-styles/palette.js +2 -2
- package/build/components/global-styles/palette.js.map +1 -1
- package/build/components/global-styles/preview.js +2 -2
- package/build/components/global-styles/preview.js.map +1 -1
- package/build/components/global-styles/screen-background-color.js +2 -2
- package/build/components/global-styles/screen-background-color.js.map +1 -1
- package/build/components/global-styles/screen-border.js +0 -6
- package/build/components/global-styles/screen-border.js.map +1 -1
- package/build/components/global-styles/screen-button-color.js +2 -2
- package/build/components/global-styles/screen-button-color.js.map +1 -1
- package/build/components/global-styles/screen-colors.js +2 -2
- package/build/components/global-styles/screen-colors.js.map +1 -1
- package/build/components/global-styles/screen-css.js +5 -5
- package/build/components/global-styles/screen-css.js.map +1 -1
- package/build/components/global-styles/screen-effects.js +53 -0
- package/build/components/global-styles/screen-effects.js.map +1 -0
- package/build/components/global-styles/screen-heading-color.js +2 -2
- package/build/components/global-styles/screen-heading-color.js.map +1 -1
- package/build/components/global-styles/screen-link-color.js +2 -2
- package/build/components/global-styles/screen-link-color.js.map +1 -1
- package/build/components/global-styles/screen-root.js +2 -2
- package/build/components/global-styles/screen-root.js.map +1 -1
- package/build/components/global-styles/screen-style-variations.js +2 -2
- package/build/components/global-styles/screen-style-variations.js.map +1 -1
- package/build/components/global-styles/screen-text-color.js +2 -2
- package/build/components/global-styles/screen-text-color.js.map +1 -1
- package/build/components/global-styles/screen-typography.js +2 -2
- package/build/components/global-styles/screen-typography.js.map +1 -1
- package/build/components/global-styles/shadow-panel.js +3 -3
- package/build/components/global-styles/shadow-panel.js.map +1 -1
- package/build/components/global-styles/typography-panel.js +2 -2
- package/build/components/global-styles/typography-panel.js.map +1 -1
- package/build/components/global-styles/typography-preview.js +2 -2
- package/build/components/global-styles/typography-preview.js.map +1 -1
- package/build/components/global-styles/ui.js +10 -10
- package/build/components/global-styles/ui.js.map +1 -1
- package/build/components/global-styles-renderer/index.js +2 -2
- package/build/components/global-styles-renderer/index.js.map +1 -1
- package/build/components/header-edit-mode/index.js +6 -3
- package/build/components/header-edit-mode/index.js.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +1 -1
- package/build/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build/components/layout/index.js +13 -24
- package/build/components/layout/index.js.map +1 -1
- package/build/components/list/actions/rename-menu-item.js +1 -1
- package/build/components/list/actions/rename-menu-item.js.map +1 -1
- package/build/components/list/table.js +1 -0
- package/build/components/list/table.js.map +1 -1
- package/build/components/navigation-inspector/navigation-menu.js +2 -2
- package/build/components/navigation-inspector/navigation-menu.js.map +1 -1
- package/build/components/save-panel/index.js +78 -0
- package/build/components/save-panel/index.js.map +1 -0
- package/build/components/sidebar/index.js +42 -5
- package/build/components/sidebar/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +28 -7
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-navigation-item/index.js +72 -0
- package/build/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js +2 -2
- package/build/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-template/index.js +70 -0
- package/build/components/sidebar-navigation-screen-template/index.js.map +1 -0
- package/build/components/sidebar-navigation-screen-templates/index.js +32 -82
- package/build/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen-templates-browse/index.js +43 -0
- package/build/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -0
- package/build/components/site-hub/index.js +14 -49
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/style-book/index.js +10 -3
- package/build/components/style-book/index.js.map +1 -1
- package/build/components/sync-state-with-url/use-init-edited-entity-from-url.js +55 -20
- 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 +3 -3
- 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-sidebar-path-with-url.js → use-sync-path-with-url.js} +12 -12
- package/build/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -0
- package/build/components/use-edited-entity-record/index.js +6 -2
- package/build/components/use-edited-entity-record/index.js.map +1 -1
- package/build/hooks/push-changes-to-global-styles/index.js +2 -2
- package/build/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build/{experiments.js → private-apis.js} +3 -3
- package/build/private-apis.js.map +1 -0
- package/build/store/index.js +3 -3
- package/build/store/index.js.map +1 -1
- package/build/utils/get-is-list-page.js +5 -6
- package/build/utils/get-is-list-page.js.map +1 -1
- package/build-module/components/add-new-template/new-template-part.js +7 -4
- package/build-module/components/add-new-template/new-template-part.js.map +1 -1
- package/build-module/components/add-new-template/new-template.js +7 -4
- package/build-module/components/add-new-template/new-template.js.map +1 -1
- package/build-module/components/block-editor/editor-canvas.js +1 -1
- package/build-module/components/block-editor/editor-canvas.js.map +1 -1
- package/build-module/components/block-editor/index.js +3 -3
- package/build-module/components/block-editor/index.js.map +1 -1
- package/build-module/components/editor/index.js +28 -41
- package/build-module/components/editor/index.js.map +1 -1
- package/build-module/components/global-styles/block-preview-panel.js +10 -11
- package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
- package/build-module/components/global-styles/border-panel.js +3 -3
- package/build-module/components/global-styles/border-panel.js.map +1 -1
- package/build-module/components/global-styles/color-palette-panel.js +3 -3
- package/build-module/components/global-styles/color-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/context-menu.js +9 -3
- package/build-module/components/global-styles/context-menu.js.map +1 -1
- package/build-module/components/global-styles/custom-css.js +3 -3
- package/build-module/components/global-styles/custom-css.js.map +1 -1
- package/build-module/components/global-styles/dimensions-panel.js +3 -3
- package/build-module/components/global-styles/dimensions-panel.js.map +1 -1
- package/build-module/components/global-styles/global-styles-provider.js +3 -3
- package/build-module/components/global-styles/global-styles-provider.js.map +1 -1
- package/build-module/components/global-styles/gradients-palette-panel.js +3 -3
- package/build-module/components/global-styles/gradients-palette-panel.js.map +1 -1
- package/build-module/components/global-styles/header.js +2 -2
- package/build-module/components/global-styles/header.js.map +1 -1
- package/build-module/components/global-styles/hooks.js +3 -3
- package/build-module/components/global-styles/hooks.js.map +1 -1
- package/build-module/components/global-styles/navigation-button.js +2 -2
- package/build-module/components/global-styles/navigation-button.js.map +1 -1
- package/build-module/components/global-styles/palette.js +3 -3
- package/build-module/components/global-styles/palette.js.map +1 -1
- package/build-module/components/global-styles/preview.js +3 -3
- package/build-module/components/global-styles/preview.js.map +1 -1
- package/build-module/components/global-styles/screen-background-color.js +3 -3
- package/build-module/components/global-styles/screen-background-color.js.map +1 -1
- package/build-module/components/global-styles/screen-border.js +0 -5
- package/build-module/components/global-styles/screen-border.js.map +1 -1
- package/build-module/components/global-styles/screen-button-color.js +3 -3
- package/build-module/components/global-styles/screen-button-color.js.map +1 -1
- package/build-module/components/global-styles/screen-colors.js +3 -3
- package/build-module/components/global-styles/screen-colors.js.map +1 -1
- package/build-module/components/global-styles/screen-css.js +5 -5
- package/build-module/components/global-styles/screen-css.js.map +1 -1
- package/build-module/components/global-styles/screen-effects.js +35 -0
- package/build-module/components/global-styles/screen-effects.js.map +1 -0
- package/build-module/components/global-styles/screen-heading-color.js +3 -3
- package/build-module/components/global-styles/screen-heading-color.js.map +1 -1
- package/build-module/components/global-styles/screen-link-color.js +3 -3
- package/build-module/components/global-styles/screen-link-color.js.map +1 -1
- package/build-module/components/global-styles/screen-root.js +3 -3
- package/build-module/components/global-styles/screen-root.js.map +1 -1
- package/build-module/components/global-styles/screen-style-variations.js +3 -3
- package/build-module/components/global-styles/screen-style-variations.js.map +1 -1
- package/build-module/components/global-styles/screen-text-color.js +3 -3
- package/build-module/components/global-styles/screen-text-color.js.map +1 -1
- package/build-module/components/global-styles/screen-typography.js +3 -3
- package/build-module/components/global-styles/screen-typography.js.map +1 -1
- package/build-module/components/global-styles/shadow-panel.js +4 -4
- package/build-module/components/global-styles/shadow-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-panel.js +3 -3
- package/build-module/components/global-styles/typography-panel.js.map +1 -1
- package/build-module/components/global-styles/typography-preview.js +3 -3
- package/build-module/components/global-styles/typography-preview.js.map +1 -1
- package/build-module/components/global-styles/ui.js +10 -11
- package/build-module/components/global-styles/ui.js.map +1 -1
- package/build-module/components/global-styles-renderer/index.js +3 -3
- package/build-module/components/global-styles-renderer/index.js.map +1 -1
- package/build-module/components/header-edit-mode/index.js +6 -3
- package/build-module/components/header-edit-mode/index.js.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +1 -1
- package/build-module/components/layout/index.js +12 -24
- package/build-module/components/layout/index.js.map +1 -1
- package/build-module/components/list/actions/rename-menu-item.js +1 -1
- package/build-module/components/list/actions/rename-menu-item.js.map +1 -1
- package/build-module/components/list/table.js +1 -0
- package/build-module/components/list/table.js.map +1 -1
- package/build-module/components/navigation-inspector/navigation-menu.js +3 -3
- package/build-module/components/navigation-inspector/navigation-menu.js.map +1 -1
- package/build-module/components/save-panel/index.js +64 -0
- package/build-module/components/save-panel/index.js.map +1 -0
- package/build-module/components/sidebar/index.js +36 -5
- package/build-module/components/sidebar/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +27 -9
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js +55 -0
- package/build-module/components/sidebar-navigation-screen-navigation-item/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js +2 -2
- package/build-module/components/sidebar-navigation-screen-navigation-menus/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-template/index.js +53 -0
- package/build-module/components/sidebar-navigation-screen-template/index.js.map +1 -0
- package/build-module/components/sidebar-navigation-screen-templates/index.js +34 -81
- package/build-module/components/sidebar-navigation-screen-templates/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js +31 -0
- package/build-module/components/sidebar-navigation-screen-templates-browse/index.js.map +1 -0
- package/build-module/components/site-hub/index.js +14 -46
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/style-book/index.js +11 -4
- 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 +55 -21
- 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 +1 -1
- 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-sidebar-path-with-url.js → use-sync-path-with-url.js} +11 -11
- package/build-module/components/sync-state-with-url/use-sync-path-with-url.js.map +1 -0
- package/build-module/components/use-edited-entity-record/index.js +6 -2
- package/build-module/components/use-edited-entity-record/index.js.map +1 -1
- package/build-module/hooks/push-changes-to-global-styles/index.js +3 -3
- package/build-module/hooks/push-changes-to-global-styles/index.js.map +1 -1
- package/build-module/{experiments.js → private-apis.js} +2 -2
- package/build-module/private-apis.js.map +1 -0
- package/build-module/store/index.js +1 -1
- package/build-module/store/index.js.map +1 -1
- package/build-module/utils/get-is-list-page.js +5 -6
- package/build-module/utils/get-is-list-page.js.map +1 -1
- package/build-style/style-rtl.css +100 -62
- package/build-style/style.css +100 -62
- package/package.json +20 -20
- package/src/components/add-new-template/new-template-part.js +7 -4
- package/src/components/add-new-template/new-template.js +8 -6
- package/src/components/block-editor/editor-canvas.js +1 -1
- package/src/components/block-editor/index.js +3 -3
- package/src/components/editor/index.js +32 -71
- package/src/components/editor/style.scss +2 -2
- package/src/components/global-styles/block-preview-panel.js +8 -12
- package/src/components/global-styles/border-panel.js +3 -3
- package/src/components/global-styles/color-palette-panel.js +3 -3
- package/src/components/global-styles/context-menu.js +14 -2
- package/src/components/global-styles/custom-css.js +3 -3
- package/src/components/global-styles/dimensions-panel.js +3 -3
- package/src/components/global-styles/global-styles-provider.js +3 -3
- package/src/components/global-styles/gradients-palette-panel.js +3 -3
- package/src/components/global-styles/header.js +2 -2
- package/src/components/global-styles/hooks.js +3 -3
- package/src/components/global-styles/navigation-button.js +4 -2
- package/src/components/global-styles/palette.js +3 -3
- package/src/components/global-styles/preview.js +3 -3
- package/src/components/global-styles/screen-background-color.js +3 -3
- package/src/components/global-styles/screen-border.js +0 -5
- package/src/components/global-styles/screen-button-color.js +3 -3
- package/src/components/global-styles/screen-colors.js +3 -3
- package/src/components/global-styles/screen-css.js +14 -7
- package/src/components/global-styles/screen-effects.js +28 -0
- package/src/components/global-styles/screen-heading-color.js +3 -3
- package/src/components/global-styles/screen-link-color.js +3 -3
- package/src/components/global-styles/screen-root.js +3 -3
- package/src/components/global-styles/screen-style-variations.js +3 -3
- package/src/components/global-styles/screen-text-color.js +3 -3
- package/src/components/global-styles/screen-typography.js +3 -3
- package/src/components/global-styles/shadow-panel.js +4 -4
- package/src/components/global-styles/style.scss +2 -5
- package/src/components/global-styles/typography-panel.js +3 -3
- package/src/components/global-styles/typography-preview.js +3 -3
- package/src/components/global-styles/ui.js +8 -8
- package/src/components/global-styles-renderer/index.js +3 -3
- package/src/components/header-edit-mode/index.js +6 -3
- package/src/components/keyboard-shortcut-help-modal/config.js +1 -1
- package/src/components/layout/index.js +38 -48
- package/src/components/layout/style.scss +36 -26
- package/src/components/list/actions/rename-menu-item.js +1 -1
- package/src/components/list/table.js +4 -0
- package/src/components/navigation-inspector/navigation-menu.js +3 -3
- package/src/components/save-panel/index.js +68 -0
- package/src/components/save-panel/style.scss +5 -0
- package/src/components/sidebar/index.js +36 -8
- package/src/components/sidebar/style.scss +15 -0
- package/src/components/sidebar-navigation-screen/index.js +27 -11
- package/src/components/sidebar-navigation-screen/style.scss +4 -6
- package/src/components/sidebar-navigation-screen-navigation-item/index.js +52 -0
- package/src/components/sidebar-navigation-screen-navigation-menus/index.js +1 -1
- package/src/components/sidebar-navigation-screen-template/index.js +52 -0
- package/src/components/sidebar-navigation-screen-templates/index.js +49 -83
- package/src/components/sidebar-navigation-screen-templates-browse/index.js +31 -0
- package/src/components/site-hub/index.js +67 -122
- package/src/components/site-hub/style.scss +1 -10
- package/src/components/style-book/index.js +11 -7
- package/src/components/sync-state-with-url/use-init-edited-entity-from-url.js +48 -14
- package/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js +1 -1
- package/src/components/sync-state-with-url/{use-sync-sidebar-path-with-url.js → use-sync-path-with-url.js} +10 -10
- package/src/components/use-edited-entity-record/index.js +6 -2
- package/src/hooks/push-changes-to-global-styles/index.js +3 -3
- package/src/{experiments.js → private-apis.js} +1 -1
- package/src/store/index.js +1 -1
- package/src/style.scss +1 -0
- package/src/utils/get-is-list-page.js +5 -5
- package/build/components/sync-state-with-url/use-sync-sidebar-path-with-url.js.map +0 -1
- package/build/experiments.js.map +0 -1
- package/build-module/components/sync-state-with-url/use-sync-sidebar-path-with-url.js.map +0 -1
- package/build-module/experiments.js.map +0 -1
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from '@wordpress/components';
|
|
9
9
|
import {
|
|
10
10
|
__experimentalColorGradientControl as ColorGradientControl,
|
|
11
|
-
|
|
11
|
+
privateApis as blockEditorPrivateApis,
|
|
12
12
|
} from '@wordpress/block-editor';
|
|
13
13
|
import { useState } from '@wordpress/element';
|
|
14
14
|
|
|
@@ -21,9 +21,9 @@ import {
|
|
|
21
21
|
useColorsPerOrigin,
|
|
22
22
|
useGradientsPerOrigin,
|
|
23
23
|
} from './hooks';
|
|
24
|
-
import { unlock } from '../../
|
|
24
|
+
import { unlock } from '../../private-apis';
|
|
25
25
|
|
|
26
|
-
const { useGlobalSetting, useGlobalStyle } = unlock(
|
|
26
|
+
const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorPrivateApis );
|
|
27
27
|
|
|
28
28
|
function ScreenHeadingColor( { name, variation = '' } ) {
|
|
29
29
|
const prefix = variation ? `variations.${ variation }.` : '';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
5
|
import {
|
|
6
6
|
__experimentalColorGradientControl as ColorGradientControl,
|
|
7
|
-
|
|
7
|
+
privateApis as blockEditorPrivateApis,
|
|
8
8
|
} from '@wordpress/block-editor';
|
|
9
9
|
import { TabPanel } from '@wordpress/components';
|
|
10
10
|
|
|
@@ -13,9 +13,9 @@ import { TabPanel } from '@wordpress/components';
|
|
|
13
13
|
*/
|
|
14
14
|
import ScreenHeader from './header';
|
|
15
15
|
import { getSupportedGlobalStylesPanels, useColorsPerOrigin } from './hooks';
|
|
16
|
-
import { unlock } from '../../
|
|
16
|
+
import { unlock } from '../../private-apis';
|
|
17
17
|
|
|
18
|
-
const { useGlobalSetting, useGlobalStyle } = unlock(
|
|
18
|
+
const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorPrivateApis );
|
|
19
19
|
|
|
20
20
|
function ScreenLinkColor( { name, variation = '' } ) {
|
|
21
21
|
const prefix = variation ? `variations.${ variation }.` : '';
|
|
@@ -16,7 +16,7 @@ import { isRTL, __ } from '@wordpress/i18n';
|
|
|
16
16
|
import { chevronLeft, chevronRight } from '@wordpress/icons';
|
|
17
17
|
import { useSelect } from '@wordpress/data';
|
|
18
18
|
import { store as coreStore } from '@wordpress/core-data';
|
|
19
|
-
import {
|
|
19
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Internal dependencies
|
|
@@ -25,10 +25,10 @@ import { IconWithCurrentColor } from './icon-with-current-color';
|
|
|
25
25
|
import { NavigationButtonAsItem } from './navigation-button';
|
|
26
26
|
import ContextMenu from './context-menu';
|
|
27
27
|
import StylesPreview from './preview';
|
|
28
|
-
import { unlock } from '../../
|
|
28
|
+
import { unlock } from '../../private-apis';
|
|
29
29
|
|
|
30
30
|
function ScreenRoot() {
|
|
31
|
-
const { useGlobalStyle } = unlock(
|
|
31
|
+
const { useGlobalStyle } = unlock( blockEditorPrivateApis );
|
|
32
32
|
const [ customCSS ] = useGlobalStyle( 'css' );
|
|
33
33
|
|
|
34
34
|
const { variations, canEditCSS } = useSelect( ( select ) => {
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
import { __ } from '@wordpress/i18n';
|
|
26
26
|
import {
|
|
27
27
|
store as blockEditorStore,
|
|
28
|
-
|
|
28
|
+
privateApis as blockEditorPrivateApis,
|
|
29
29
|
} from '@wordpress/block-editor';
|
|
30
30
|
|
|
31
31
|
/**
|
|
@@ -34,9 +34,9 @@ import {
|
|
|
34
34
|
import { mergeBaseAndUserConfigs } from './global-styles-provider';
|
|
35
35
|
import StylesPreview from './preview';
|
|
36
36
|
import ScreenHeader from './header';
|
|
37
|
-
import { unlock } from '../../
|
|
37
|
+
import { unlock } from '../../private-apis';
|
|
38
38
|
|
|
39
|
-
const { GlobalStylesContext } = unlock(
|
|
39
|
+
const { GlobalStylesContext } = unlock( blockEditorPrivateApis );
|
|
40
40
|
|
|
41
41
|
function compareVariations( a, b ) {
|
|
42
42
|
return (
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
5
|
import {
|
|
6
6
|
__experimentalColorGradientControl as ColorGradientControl,
|
|
7
|
-
|
|
7
|
+
privateApis as blockEditorPrivateApis,
|
|
8
8
|
} from '@wordpress/block-editor';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
*/
|
|
13
13
|
import ScreenHeader from './header';
|
|
14
14
|
import { getSupportedGlobalStylesPanels, useColorsPerOrigin } from './hooks';
|
|
15
|
-
import { unlock } from '../../
|
|
15
|
+
import { unlock } from '../../private-apis';
|
|
16
16
|
|
|
17
|
-
const { useGlobalSetting, useGlobalStyle } = unlock(
|
|
17
|
+
const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorPrivateApis );
|
|
18
18
|
|
|
19
19
|
function ScreenTextColor( { name, variation = '' } ) {
|
|
20
20
|
const prefix = variation ? `variations.${ variation }.` : '';
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
__experimentalHStack as HStack,
|
|
9
9
|
FlexItem,
|
|
10
10
|
} from '@wordpress/components';
|
|
11
|
-
import {
|
|
11
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Internal dependencies
|
|
@@ -19,9 +19,9 @@ import Subtitle from './subtitle';
|
|
|
19
19
|
import TypographyPanel from './typography-panel';
|
|
20
20
|
import BlockPreviewPanel from './block-preview-panel';
|
|
21
21
|
import { getVariationClassName } from './utils';
|
|
22
|
-
import { unlock } from '../../
|
|
22
|
+
import { unlock } from '../../private-apis';
|
|
23
23
|
|
|
24
|
-
const { useGlobalStyle } = unlock(
|
|
24
|
+
const { useGlobalStyle } = unlock( blockEditorPrivateApis );
|
|
25
25
|
|
|
26
26
|
function Item( { name, parentMenu, element, label } ) {
|
|
27
27
|
const hasSupport = ! name;
|
|
@@ -22,16 +22,16 @@ import {
|
|
|
22
22
|
import { __ } from '@wordpress/i18n';
|
|
23
23
|
import { shadow as shadowIcon, Icon, check } from '@wordpress/icons';
|
|
24
24
|
import { useCallback } from '@wordpress/element';
|
|
25
|
-
import {
|
|
25
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Internal dependencies
|
|
29
29
|
*/
|
|
30
30
|
import { getSupportedGlobalStylesPanels } from './hooks';
|
|
31
31
|
import { IconWithCurrentColor } from './icon-with-current-color';
|
|
32
|
-
import { unlock } from '../../
|
|
32
|
+
import { unlock } from '../../private-apis';
|
|
33
33
|
|
|
34
|
-
const { useGlobalSetting, useGlobalStyle } = unlock(
|
|
34
|
+
const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorPrivateApis );
|
|
35
35
|
|
|
36
36
|
export function useHasShadowControl( name ) {
|
|
37
37
|
const supports = getSupportedGlobalStylesPanels( name );
|
|
@@ -129,7 +129,7 @@ function ShadowPopoverContainer( { shadow, onShadowChange } ) {
|
|
|
129
129
|
return (
|
|
130
130
|
<div className="edit-site-global-styles__shadow-panel">
|
|
131
131
|
<VStack spacing={ 4 }>
|
|
132
|
-
<Heading level={ 5 }>{ __( '
|
|
132
|
+
<Heading level={ 5 }>{ __( 'Shadow' ) }</Heading>
|
|
133
133
|
<ShadowPresets
|
|
134
134
|
presets={ shadows }
|
|
135
135
|
activeShadow={ shadow }
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// Variables
|
|
2
|
-
$block-preview-height: 150px;
|
|
3
|
-
|
|
4
1
|
.edit-site-global-styles-preview {
|
|
5
2
|
display: flex;
|
|
6
3
|
align-items: center;
|
|
@@ -130,7 +127,6 @@ $block-preview-height: 150px;
|
|
|
130
127
|
.edit-site-global-styles__block-preview-panel {
|
|
131
128
|
position: relative;
|
|
132
129
|
width: 100%;
|
|
133
|
-
height: $block-preview-height + 2 * $border-width;
|
|
134
130
|
overflow: auto;
|
|
135
131
|
border: $gray-200 $border-width solid;
|
|
136
132
|
border-radius: $radius-block-ui;
|
|
@@ -185,7 +181,8 @@ $block-preview-height: 150px;
|
|
|
185
181
|
}
|
|
186
182
|
|
|
187
183
|
.edit-site-global-styles-screen-css-help-link {
|
|
188
|
-
|
|
184
|
+
display: block;
|
|
185
|
+
margin-top: $grid-unit-10;
|
|
189
186
|
}
|
|
190
187
|
.edit-site-global-styles-screen-variations {
|
|
191
188
|
margin-top: $grid-unit-20;
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
__experimentalLetterSpacingControl as LetterSpacingControl,
|
|
9
9
|
__experimentalTextTransformControl as TextTransformControl,
|
|
10
10
|
__experimentalTextDecorationControl as TextDecorationControl,
|
|
11
|
-
|
|
11
|
+
privateApis as blockEditorPrivateApis,
|
|
12
12
|
} from '@wordpress/block-editor';
|
|
13
13
|
import {
|
|
14
14
|
FontSizePicker,
|
|
@@ -21,9 +21,9 @@ import { __ } from '@wordpress/i18n';
|
|
|
21
21
|
* Internal dependencies
|
|
22
22
|
*/
|
|
23
23
|
import { getSupportedGlobalStylesPanels } from './hooks';
|
|
24
|
-
import { unlock } from '../../
|
|
24
|
+
import { unlock } from '../../private-apis';
|
|
25
25
|
|
|
26
|
-
const { useGlobalSetting, useGlobalStyle } = unlock(
|
|
26
|
+
const { useGlobalSetting, useGlobalStyle } = unlock( blockEditorPrivateApis );
|
|
27
27
|
|
|
28
28
|
export function useHasTypographyPanel( name ) {
|
|
29
29
|
const hasFontFamily = useHasFontFamilyControl( name );
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
|
-
import { unlock } from '../../
|
|
9
|
+
import { unlock } from '../../private-apis';
|
|
10
10
|
|
|
11
|
-
const { useGlobalStyle } = unlock(
|
|
11
|
+
const { useGlobalStyle } = unlock( blockEditorPrivateApis );
|
|
12
12
|
|
|
13
13
|
export default function TypographyPreview( { name, element, headingLevel } ) {
|
|
14
14
|
let prefix = '';
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from '@wordpress/components';
|
|
11
11
|
import { getBlockTypes, store as blocksStore } from '@wordpress/blocks';
|
|
12
12
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
13
|
-
import {
|
|
13
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
14
14
|
import { __ } from '@wordpress/i18n';
|
|
15
15
|
import { store as preferencesStore } from '@wordpress/preferences';
|
|
16
16
|
import { moreVertical } from '@wordpress/icons';
|
|
@@ -37,7 +37,8 @@ import { ScreenVariation } from './screen-variations';
|
|
|
37
37
|
import ScreenBorder from './screen-border';
|
|
38
38
|
import StyleBook from '../style-book';
|
|
39
39
|
import ScreenCSS from './screen-css';
|
|
40
|
-
import { unlock } from '../../
|
|
40
|
+
import { unlock } from '../../private-apis';
|
|
41
|
+
import ScreenEffects from './screen-effects';
|
|
41
42
|
|
|
42
43
|
const SLOT_FILL_NAME = 'GlobalStylesMenu';
|
|
43
44
|
const { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =
|
|
@@ -59,7 +60,7 @@ function GlobalStylesActionMenu() {
|
|
|
59
60
|
!! globalStyles?._links?.[ 'wp:action-edit-css' ] ?? false,
|
|
60
61
|
};
|
|
61
62
|
}, [] );
|
|
62
|
-
const { useGlobalStylesReset } = unlock(
|
|
63
|
+
const { useGlobalStylesReset } = unlock( blockEditorPrivateApis );
|
|
63
64
|
const [ canReset, onReset ] = useGlobalStylesReset();
|
|
64
65
|
const { goTo } = useNavigator();
|
|
65
66
|
const loadCustomCSS = () => goTo( '/css' );
|
|
@@ -228,6 +229,10 @@ function ContextScreens( { name, parentMenu = '', variation = '' } ) {
|
|
|
228
229
|
<ScreenBorder name={ name } variation={ variation } />
|
|
229
230
|
</GlobalStylesNavigationScreen>
|
|
230
231
|
|
|
232
|
+
<GlobalStylesNavigationScreen path={ parentMenu + '/effects' }>
|
|
233
|
+
<ScreenEffects name={ name } variation={ variation } />
|
|
234
|
+
</GlobalStylesNavigationScreen>
|
|
235
|
+
|
|
231
236
|
<GlobalStylesNavigationScreen path={ parentMenu + '/layout' }>
|
|
232
237
|
<ScreenLayout name={ name } variation={ variation } />
|
|
233
238
|
</GlobalStylesNavigationScreen>
|
|
@@ -262,11 +267,6 @@ function GlobalStylesStyleBook( { onClose } ) {
|
|
|
262
267
|
)
|
|
263
268
|
}
|
|
264
269
|
onSelect={ ( blockName ) => {
|
|
265
|
-
// Clear navigator history by going back to the root.
|
|
266
|
-
const depth = path.match( /\//g ).length;
|
|
267
|
-
for ( let i = 0; i < depth; i++ ) {
|
|
268
|
-
navigator.goBack();
|
|
269
|
-
}
|
|
270
270
|
// Now go to the selected block.
|
|
271
271
|
navigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );
|
|
272
272
|
} }
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { useEffect } from '@wordpress/element';
|
|
5
5
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
6
|
-
import {
|
|
6
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Internal dependencies
|
|
10
10
|
*/
|
|
11
11
|
import { store as editSiteStore } from '../../store';
|
|
12
|
-
import { unlock } from '../../
|
|
12
|
+
import { unlock } from '../../private-apis';
|
|
13
13
|
|
|
14
|
-
const { useGlobalStylesOutput } = unlock(
|
|
14
|
+
const { useGlobalStylesOutput } = unlock( blockEditorPrivateApis );
|
|
15
15
|
|
|
16
16
|
function useGlobalStylesRenderer() {
|
|
17
17
|
const [ styles, settings, svgFilters ] = useGlobalStylesOutput();
|
|
@@ -100,10 +100,13 @@ export default function HeaderEditMode() {
|
|
|
100
100
|
|
|
101
101
|
const isLargeViewport = useViewportMatch( 'medium' );
|
|
102
102
|
|
|
103
|
-
const
|
|
103
|
+
const toggleInserter = useCallback( () => {
|
|
104
104
|
if ( isInserterOpen ) {
|
|
105
|
-
// Focusing the inserter button
|
|
105
|
+
// Focusing the inserter button should close the inserter popover.
|
|
106
|
+
// However, there are some cases it won't close when the focus is lost.
|
|
107
|
+
// See https://github.com/WordPress/gutenberg/issues/43090 for more details.
|
|
106
108
|
inserterButton.current.focus();
|
|
109
|
+
setIsInserterOpened( false );
|
|
107
110
|
} else {
|
|
108
111
|
setIsInserterOpened( true );
|
|
109
112
|
}
|
|
@@ -148,7 +151,7 @@ export default function HeaderEditMode() {
|
|
|
148
151
|
variant="primary"
|
|
149
152
|
isPressed={ isInserterOpen }
|
|
150
153
|
onMouseDown={ preventDefault }
|
|
151
|
-
onClick={
|
|
154
|
+
onClick={ toggleInserter }
|
|
152
155
|
disabled={ ! isVisualMode }
|
|
153
156
|
icon={ plus }
|
|
154
157
|
label={ showIconLabels ? shortLabel : longLabel }
|
|
@@ -22,7 +22,7 @@ export const textFormattingShortcuts = [
|
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
keyCombination: { character: '[[' },
|
|
25
|
-
description: __( 'Insert a link to a post or page' ),
|
|
25
|
+
description: __( 'Insert a link to a post or page.' ),
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
keyCombination: { modifier: 'primary', character: 'u' },
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
useResizeObserver,
|
|
20
20
|
} from '@wordpress/compose';
|
|
21
21
|
import { __ } from '@wordpress/i18n';
|
|
22
|
-
import { useState,
|
|
22
|
+
import { useState, useRef } from '@wordpress/element';
|
|
23
23
|
import { NavigableRegion } from '@wordpress/interface';
|
|
24
24
|
import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
|
|
25
25
|
|
|
@@ -38,7 +38,8 @@ import useInitEditedEntityFromURL from '../sync-state-with-url/use-init-edited-e
|
|
|
38
38
|
import SiteHub from '../site-hub';
|
|
39
39
|
import ResizeHandle from '../block-editor/resize-handle';
|
|
40
40
|
import useSyncCanvasModeWithURL from '../sync-state-with-url/use-sync-canvas-mode-with-url';
|
|
41
|
-
import { unlock } from '../../
|
|
41
|
+
import { unlock } from '../../private-apis';
|
|
42
|
+
import SavePanel from '../save-panel';
|
|
42
43
|
|
|
43
44
|
const ANIMATION_DURATION = 0.5;
|
|
44
45
|
const emptyResizeHandleStyles = {
|
|
@@ -86,21 +87,20 @@ export default function Layout() {
|
|
|
86
87
|
} );
|
|
87
88
|
const disableMotion = useReducedMotion();
|
|
88
89
|
const isMobileViewport = useViewportMatch( 'medium', '<' );
|
|
89
|
-
const [ isMobileCanvasVisible, setIsMobileCanvasVisible ] =
|
|
90
|
-
useState( false );
|
|
91
90
|
const canvasPadding = isMobileViewport ? 0 : 24;
|
|
92
91
|
const showSidebar =
|
|
93
|
-
( isMobileViewport && !
|
|
92
|
+
( isMobileViewport && ! isListPage ) ||
|
|
94
93
|
( ! isMobileViewport && ( canvasMode === 'view' || ! isEditorPage ) );
|
|
95
94
|
const showCanvas =
|
|
96
|
-
( isMobileViewport &&
|
|
95
|
+
( isMobileViewport && isEditorPage && canvasMode === 'edit' ) ||
|
|
96
|
+
! isMobileViewport ||
|
|
97
|
+
! isEditorPage;
|
|
97
98
|
const showFrame =
|
|
98
|
-
! isEditorPage
|
|
99
|
-
|
|
99
|
+
( ! isEditorPage && ! isMobileViewport ) ||
|
|
100
|
+
( ! isMobileViewport && isEditorPage && canvasMode === 'view' );
|
|
100
101
|
const isFullCanvas =
|
|
101
|
-
(
|
|
102
|
-
|
|
103
|
-
// Ideally this effect could be removed if we move the "isMobileCanvasVisible" into the store.
|
|
102
|
+
( isMobileViewport && isListPage ) ||
|
|
103
|
+
( isEditorPage && canvasMode === 'edit' );
|
|
104
104
|
const [ canvasResizer, canvasSize ] = useResizeObserver();
|
|
105
105
|
const [ fullResizer, fullSize ] = useResizeObserver();
|
|
106
106
|
const [ forcedWidth, setForcedWidth ] = useState( null );
|
|
@@ -111,15 +111,6 @@ export default function Layout() {
|
|
|
111
111
|
if ( showFrame && ! isResizing ) {
|
|
112
112
|
canvasWidth = canvasSize.width - canvasPadding;
|
|
113
113
|
}
|
|
114
|
-
useEffect( () => {
|
|
115
|
-
if ( canvasMode === 'view' && isMobileViewport ) {
|
|
116
|
-
setIsMobileCanvasVisible( false );
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if ( canvasMode === 'edit' && isMobileViewport ) {
|
|
120
|
-
setIsMobileCanvasVisible( true );
|
|
121
|
-
}
|
|
122
|
-
}, [ canvasMode, isMobileViewport ] );
|
|
123
114
|
|
|
124
115
|
// Synchronizing the URL with the store value of canvasMode happens in an effect
|
|
125
116
|
// This condition ensures the component is only rendered after the synchronization happens
|
|
@@ -152,37 +143,34 @@ export default function Layout() {
|
|
|
152
143
|
? forcedWidth - 48
|
|
153
144
|
: undefined,
|
|
154
145
|
} }
|
|
155
|
-
isMobileCanvasVisible={ isMobileCanvasVisible }
|
|
156
|
-
setIsMobileCanvasVisible={ setIsMobileCanvasVisible }
|
|
157
146
|
/>
|
|
158
147
|
|
|
159
148
|
<AnimatePresence initial={ false }>
|
|
160
|
-
{ isEditorPage &&
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
) }
|
|
149
|
+
{ isEditorPage && canvasMode === 'edit' && (
|
|
150
|
+
<NavigableRegion
|
|
151
|
+
className="edit-site-layout__header"
|
|
152
|
+
ariaLabel={ __( 'Editor top bar' ) }
|
|
153
|
+
as={ motion.div }
|
|
154
|
+
animate={ {
|
|
155
|
+
y: 0,
|
|
156
|
+
} }
|
|
157
|
+
initial={ {
|
|
158
|
+
y: '-100%',
|
|
159
|
+
} }
|
|
160
|
+
exit={ {
|
|
161
|
+
y: '-100%',
|
|
162
|
+
} }
|
|
163
|
+
transition={ {
|
|
164
|
+
type: 'tween',
|
|
165
|
+
duration: disableMotion
|
|
166
|
+
? 0
|
|
167
|
+
: ANIMATION_DURATION,
|
|
168
|
+
ease: 'easeOut',
|
|
169
|
+
} }
|
|
170
|
+
>
|
|
171
|
+
{ canvasMode === 'edit' && <Header /> }
|
|
172
|
+
</NavigableRegion>
|
|
173
|
+
) }
|
|
186
174
|
</AnimatePresence>
|
|
187
175
|
|
|
188
176
|
<div className="edit-site-layout__content">
|
|
@@ -267,6 +255,8 @@ export default function Layout() {
|
|
|
267
255
|
) }
|
|
268
256
|
</AnimatePresence>
|
|
269
257
|
|
|
258
|
+
<SavePanel />
|
|
259
|
+
|
|
270
260
|
{ showCanvas && (
|
|
271
261
|
<div
|
|
272
262
|
className={ classnames(
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
$hub-height: $grid-unit-20 * 2 + $button-size;
|
|
2
|
-
|
|
3
1
|
.edit-site-layout {
|
|
4
2
|
height: 100%;
|
|
5
3
|
background: $gray-900;
|
|
@@ -10,24 +8,23 @@ $hub-height: $grid-unit-20 * 2 + $button-size;
|
|
|
10
8
|
|
|
11
9
|
.edit-site-layout__hub {
|
|
12
10
|
position: fixed;
|
|
13
|
-
top:
|
|
14
|
-
left:
|
|
11
|
+
top: 0;
|
|
12
|
+
left: 0;
|
|
15
13
|
width: calc(100vw - #{$canvas-padding * 2});
|
|
16
|
-
height: $
|
|
14
|
+
height: $header-height;
|
|
17
15
|
z-index: z-index(".edit-site-layout__hub");
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
.edit-site-layout.is-full-canvas.is-edit-mode & {
|
|
18
|
+
width: auto;
|
|
19
|
+
padding-right: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@include break-medium {
|
|
23
|
+
width: calc(#{$nav-sidebar-width} - #{$canvas-padding * 2});
|
|
24
|
+
}
|
|
24
25
|
|
|
25
26
|
.edit-site-layout.is-full-canvas & {
|
|
26
|
-
top: 0;
|
|
27
|
-
left: 0;
|
|
28
|
-
padding: 0;
|
|
29
27
|
padding-right: $grid-unit-20;
|
|
30
|
-
height: $header-height;
|
|
31
28
|
border-radius: 0;
|
|
32
29
|
width: 100vw;
|
|
33
30
|
box-shadow: none;
|
|
@@ -37,15 +34,6 @@ $hub-height: $grid-unit-20 * 2 + $button-size;
|
|
|
37
34
|
padding-right: 0;
|
|
38
35
|
}
|
|
39
36
|
}
|
|
40
|
-
|
|
41
|
-
.edit-site-layout.is-full-canvas.is-edit-mode & {
|
|
42
|
-
width: auto;
|
|
43
|
-
padding-right: 0;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
@include break-medium {
|
|
47
|
-
width: calc(#{$nav-sidebar-width} - #{$canvas-padding * 2});
|
|
48
|
-
}
|
|
49
37
|
}
|
|
50
38
|
|
|
51
39
|
.edit-site-layout__header {
|
|
@@ -85,9 +73,9 @@ $hub-height: $grid-unit-20 * 2 + $button-size;
|
|
|
85
73
|
}
|
|
86
74
|
|
|
87
75
|
> div {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
height: 100%;
|
|
91
79
|
}
|
|
92
80
|
|
|
93
81
|
.resizable-editor__drag-handle {
|
|
@@ -205,3 +193,25 @@ $hub-height: $grid-unit-20 * 2 + $button-size;
|
|
|
205
193
|
border-radius: $radius-block-ui;
|
|
206
194
|
}
|
|
207
195
|
}
|
|
196
|
+
|
|
197
|
+
.edit-site-layout__actions {
|
|
198
|
+
z-index: z-index(".edit-site-layout__actions");
|
|
199
|
+
position: fixed !important; // Need to override the default relative positioning
|
|
200
|
+
top: -9999em;
|
|
201
|
+
bottom: auto;
|
|
202
|
+
left: auto;
|
|
203
|
+
right: 0;
|
|
204
|
+
width: $sidebar-width;
|
|
205
|
+
color: $gray-900;
|
|
206
|
+
background: $white;
|
|
207
|
+
|
|
208
|
+
&:focus,
|
|
209
|
+
&:focus-within {
|
|
210
|
+
top: 0;
|
|
211
|
+
bottom: 0;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@include break-medium {
|
|
215
|
+
border-left: $border-width solid $gray-300;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
@@ -24,7 +24,7 @@ export default function RenameMenuItem( { template, onClose } ) {
|
|
|
24
24
|
const { createSuccessNotice, createErrorNotice } =
|
|
25
25
|
useDispatch( noticesStore );
|
|
26
26
|
|
|
27
|
-
if ( ! template.is_custom ) {
|
|
27
|
+
if ( template.type === 'wp_template' && ! template.is_custom ) {
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -84,6 +84,10 @@ export default function Table( { templateType } ) {
|
|
|
84
84
|
<Heading level={ 4 }>
|
|
85
85
|
<Link
|
|
86
86
|
params={ {
|
|
87
|
+
path:
|
|
88
|
+
template.type === 'wp_template'
|
|
89
|
+
? '/templates/single'
|
|
90
|
+
: '/template-parts/single',
|
|
87
91
|
postId: template.id,
|
|
88
92
|
postType: template.type,
|
|
89
93
|
} }
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
privateApis as blockEditorPrivateApis,
|
|
6
6
|
store as blockEditorStore,
|
|
7
7
|
} from '@wordpress/block-editor';
|
|
8
8
|
import { useEffect } from '@wordpress/element';
|
|
@@ -11,7 +11,7 @@ import { useDispatch } from '@wordpress/data';
|
|
|
11
11
|
/**
|
|
12
12
|
* Internal dependencies
|
|
13
13
|
*/
|
|
14
|
-
import { unlock } from '../../
|
|
14
|
+
import { unlock } from '../../private-apis';
|
|
15
15
|
|
|
16
16
|
const ALLOWED_BLOCKS = {
|
|
17
17
|
'core/navigation': [
|
|
@@ -39,7 +39,7 @@ const ALLOWED_BLOCKS = {
|
|
|
39
39
|
export default function NavigationMenu( { innerBlocks, onSelect } ) {
|
|
40
40
|
const { updateBlockListSettings } = useDispatch( blockEditorStore );
|
|
41
41
|
|
|
42
|
-
const { OffCanvasEditor } = unlock(
|
|
42
|
+
const { OffCanvasEditor } = unlock( blockEditorPrivateApis );
|
|
43
43
|
|
|
44
44
|
//TODO: Block settings are normally updated as a side effect of rendering InnerBlocks in BlockList
|
|
45
45
|
//Think through a better way of doing this, possible with adding allowed blocks to block library metadata
|