@wordpress/edit-site 5.3.2 → 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 +25 -23
- package/build/components/editor/index.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/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-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-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 +2 -2
- 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 +3 -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 +10 -23
- 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 +4 -3
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/sidebar/index.js +17 -3
- 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 +25 -24
- package/build-module/components/editor/index.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/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-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-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 +3 -3
- 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 +4 -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 +10 -23
- 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 +3 -2
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/sidebar/index.js +14 -3
- 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 +18 -37
- package/build-style/style.css +18 -37
- 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 +29 -28
- 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/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-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-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 +3 -3
- package/src/components/global-styles/style.scss +2 -1
- 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 +3 -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 +35 -48
- package/src/components/layout/style.scss +11 -23
- 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 +4 -1
- package/src/components/sidebar/index.js +10 -2
- 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 -11
- 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/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
|
@@ -9,15 +9,15 @@ import { mergeWith, isEmpty, mapValues } from 'lodash';
|
|
|
9
9
|
import { useMemo, useCallback } from '@wordpress/element';
|
|
10
10
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
11
11
|
import { store as coreStore } from '@wordpress/core-data';
|
|
12
|
-
import {
|
|
12
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Internal dependencies
|
|
16
16
|
*/
|
|
17
17
|
import CanvasSpinner from '../canvas-spinner';
|
|
18
|
-
import { unlock } from '../../
|
|
18
|
+
import { unlock } from '../../private-apis';
|
|
19
19
|
|
|
20
|
-
const { GlobalStylesContext } = unlock(
|
|
20
|
+
const { GlobalStylesContext } = unlock( blockEditorPrivateApis );
|
|
21
21
|
|
|
22
22
|
function mergeTreesCustomizer( _, srcValue ) {
|
|
23
23
|
// We only pass as arrays the presets,
|
|
@@ -8,15 +8,15 @@ import {
|
|
|
8
8
|
DuotonePicker,
|
|
9
9
|
} from '@wordpress/components';
|
|
10
10
|
import { __ } from '@wordpress/i18n';
|
|
11
|
-
import {
|
|
11
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Internal dependencies
|
|
15
15
|
*/
|
|
16
16
|
import Subtitle from './subtitle';
|
|
17
|
-
import { unlock } from '../../
|
|
17
|
+
import { unlock } from '../../private-apis';
|
|
18
18
|
|
|
19
|
-
const { useGlobalSetting } = unlock(
|
|
19
|
+
const { useGlobalSetting } = unlock( blockEditorPrivateApis );
|
|
20
20
|
|
|
21
21
|
const noop = () => {};
|
|
22
22
|
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
__experimentalSpacer as Spacer,
|
|
8
8
|
__experimentalHeading as Heading,
|
|
9
9
|
__experimentalView as View,
|
|
10
|
-
|
|
10
|
+
__experimentalNavigatorToParentButton as NavigatorToParentButton,
|
|
11
11
|
} from '@wordpress/components';
|
|
12
12
|
import { isRTL, __ } from '@wordpress/i18n';
|
|
13
13
|
import { chevronRight, chevronLeft } from '@wordpress/icons';
|
|
@@ -18,7 +18,7 @@ function ScreenHeader( { title, description } ) {
|
|
|
18
18
|
<View>
|
|
19
19
|
<Spacer marginBottom={ 0 } paddingX={ 4 } paddingY={ 3 }>
|
|
20
20
|
<HStack spacing={ 2 }>
|
|
21
|
-
<
|
|
21
|
+
<NavigatorToParentButton
|
|
22
22
|
style={
|
|
23
23
|
// TODO: This style override is also used in ToolsPanelHeader.
|
|
24
24
|
// It should be supported out-of-the-box by Button.
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
getBlockType,
|
|
15
15
|
__EXPERIMENTAL_STYLE_PROPERTY as STYLE_PROPERTY,
|
|
16
16
|
} from '@wordpress/blocks';
|
|
17
|
-
import {
|
|
17
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Internal dependencies
|
|
21
21
|
*/
|
|
22
|
-
import { unlock } from '../../
|
|
22
|
+
import { unlock } from '../../private-apis';
|
|
23
23
|
|
|
24
|
-
const { useGlobalSetting } = unlock(
|
|
24
|
+
const { useGlobalSetting } = unlock( blockEditorPrivateApis );
|
|
25
25
|
|
|
26
26
|
// Enable colord's a11y plugin.
|
|
27
27
|
extend( [ a11yPlugin ] );
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import {
|
|
5
5
|
__experimentalNavigatorButton as NavigatorButton,
|
|
6
|
-
|
|
6
|
+
__experimentalNavigatorToParentButton as NavigatorToParentButton,
|
|
7
7
|
__experimentalItem as Item,
|
|
8
8
|
FlexItem,
|
|
9
9
|
__experimentalHStack as HStack,
|
|
@@ -33,7 +33,9 @@ function NavigationButtonAsItem( props ) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
function NavigationBackButtonAsItem( props ) {
|
|
36
|
-
return
|
|
36
|
+
return (
|
|
37
|
+
<NavigatorToParentButton as={ GenericNavigationButton } { ...props } />
|
|
38
|
+
);
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
export { NavigationButtonAsItem, NavigationBackButtonAsItem };
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import { __, _n, sprintf } from '@wordpress/i18n';
|
|
14
14
|
import { shuffle } from '@wordpress/icons';
|
|
15
15
|
import { useMemo } from '@wordpress/element';
|
|
16
|
-
import {
|
|
16
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Internal dependencies
|
|
@@ -22,9 +22,9 @@ import Subtitle from './subtitle';
|
|
|
22
22
|
import { NavigationButtonAsItem } from './navigation-button';
|
|
23
23
|
import { useColorRandomizer } from './hooks';
|
|
24
24
|
import ColorIndicatorWrapper from './color-indicator-wrapper';
|
|
25
|
-
import { unlock } from '../../
|
|
25
|
+
import { unlock } from '../../private-apis';
|
|
26
26
|
|
|
27
|
-
const { useGlobalSetting } = unlock(
|
|
27
|
+
const { useGlobalSetting } = unlock( blockEditorPrivateApis );
|
|
28
28
|
|
|
29
29
|
const EMPTY_COLORS = [];
|
|
30
30
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import {
|
|
5
5
|
__unstableIframe as Iframe,
|
|
6
6
|
__unstableEditorStyles as EditorStyles,
|
|
7
|
-
|
|
7
|
+
privateApis as blockEditorPrivateApis,
|
|
8
8
|
} from '@wordpress/block-editor';
|
|
9
9
|
import {
|
|
10
10
|
__unstableMotion as motion,
|
|
@@ -17,10 +17,10 @@ import { useState, useMemo } from '@wordpress/element';
|
|
|
17
17
|
/**
|
|
18
18
|
* Internal dependencies
|
|
19
19
|
*/
|
|
20
|
-
import { unlock } from '../../
|
|
20
|
+
import { unlock } from '../../private-apis';
|
|
21
21
|
|
|
22
22
|
const { useGlobalSetting, useGlobalStyle, useGlobalStylesOutput } = unlock(
|
|
23
|
-
|
|
23
|
+
blockEditorPrivateApis
|
|
24
24
|
);
|
|
25
25
|
|
|
26
26
|
const firstFrame = {
|
|
@@ -9,7 +9,7 @@ import classnames from 'classnames';
|
|
|
9
9
|
import { __ } from '@wordpress/i18n';
|
|
10
10
|
import {
|
|
11
11
|
__experimentalColorGradientControl as ColorGradientControl,
|
|
12
|
-
|
|
12
|
+
privateApis as blockEditorPrivateApis,
|
|
13
13
|
} from '@wordpress/block-editor';
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -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 ScreenBackgroundColor( { 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
|
|
|
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 ScreenButtonColor( { name, variation = '' } ) {
|
|
20
20
|
const prefix = variation ? `variations.${ variation }.` : '';
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
FlexItem,
|
|
11
11
|
ColorIndicator,
|
|
12
12
|
} from '@wordpress/components';
|
|
13
|
-
import {
|
|
13
|
+
import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Internal dependencies
|
|
@@ -23,9 +23,9 @@ import Subtitle from './subtitle';
|
|
|
23
23
|
import ColorIndicatorWrapper from './color-indicator-wrapper';
|
|
24
24
|
import BlockPreviewPanel from './block-preview-panel';
|
|
25
25
|
import { getVariationClassName } from './utils';
|
|
26
|
-
import { unlock } from '../../
|
|
26
|
+
import { unlock } from '../../private-apis';
|
|
27
27
|
|
|
28
|
-
const { useGlobalStyle } = unlock(
|
|
28
|
+
const { useGlobalStyle } = unlock( blockEditorPrivateApis );
|
|
29
29
|
|
|
30
30
|
function BackgroundColorItem( { name, parentMenu, variation = '' } ) {
|
|
31
31
|
const prefix = variation ? `variations.${ variation }.` : '';
|
|
@@ -32,13 +32,20 @@ function ScreenCSS( { name } ) {
|
|
|
32
32
|
|
|
33
33
|
return (
|
|
34
34
|
<>
|
|
35
|
-
<ScreenHeader
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
<ScreenHeader
|
|
36
|
+
title={ __( 'CSS' ) }
|
|
37
|
+
description={
|
|
38
|
+
<>
|
|
39
|
+
{ description }
|
|
40
|
+
<ExternalLink
|
|
41
|
+
href="https://wordpress.org/support/article/css/"
|
|
42
|
+
className="edit-site-global-styles-screen-css-help-link"
|
|
43
|
+
>
|
|
44
|
+
{ __( 'Learn more about CSS' ) }
|
|
45
|
+
</ExternalLink>
|
|
46
|
+
</>
|
|
47
|
+
}
|
|
48
|
+
/>
|
|
42
49
|
<div className="edit-site-global-styles-screen-css">
|
|
43
50
|
<CustomCSSControl blockName={ name } />
|
|
44
51
|
</div>
|
|
@@ -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 );
|
|
@@ -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,7 @@ 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
41
|
import ScreenEffects from './screen-effects';
|
|
42
42
|
|
|
43
43
|
const SLOT_FILL_NAME = 'GlobalStylesMenu';
|
|
@@ -60,7 +60,7 @@ function GlobalStylesActionMenu() {
|
|
|
60
60
|
!! globalStyles?._links?.[ 'wp:action-edit-css' ] ?? false,
|
|
61
61
|
};
|
|
62
62
|
}, [] );
|
|
63
|
-
const { useGlobalStylesReset } = unlock(
|
|
63
|
+
const { useGlobalStylesReset } = unlock( blockEditorPrivateApis );
|
|
64
64
|
const [ canReset, onReset ] = useGlobalStylesReset();
|
|
65
65
|
const { goTo } = useNavigator();
|
|
66
66
|
const loadCustomCSS = () => goTo( '/css' );
|
|
@@ -267,11 +267,6 @@ function GlobalStylesStyleBook( { onClose } ) {
|
|
|
267
267
|
)
|
|
268
268
|
}
|
|
269
269
|
onSelect={ ( blockName ) => {
|
|
270
|
-
// Clear navigator history by going back to the root.
|
|
271
|
-
const depth = path.match( /\//g ).length;
|
|
272
|
-
for ( let i = 0; i < depth; i++ ) {
|
|
273
|
-
navigator.goBack();
|
|
274
|
-
}
|
|
275
270
|
// Now go to the selected block.
|
|
276
271
|
navigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );
|
|
277
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' },
|