diff --git a/packages/block-editor/src/components/block-list/use-block-props/index.js b/packages/block-editor/src/components/block-list/use-block-props/index.js index 45fc1d9eb5ea12..25b9a21f0d2867 100644 --- a/packages/block-editor/src/components/block-list/use-block-props/index.js +++ b/packages/block-editor/src/components/block-list/use-block-props/index.js @@ -25,7 +25,6 @@ import { } from '../../block-edit/context'; import { useFocusHandler } from './use-focus-handler'; import { useEventHandlers } from './use-selected-block-event-handlers'; -import { useZoomOutModeExit } from './use-zoom-out-mode-exit'; import { useBlockRefProvider } from './use-block-refs'; import { useIntersectionObserver } from './use-intersection-observer'; import { useScrollIntoView } from './use-scroll-into-view'; @@ -112,7 +111,6 @@ export function useBlockProps( props = {}, { __unstableIsHtml } = {} ) { useBlockRefProvider( clientId ), useFocusHandler( clientId ), useEventHandlers( { clientId, isSelected } ), - useZoomOutModeExit(), useIsHovered( { clientId } ), useIntersectionObserver(), useMovingAnimation( { triggerAnimationOnChange: index, clientId } ), diff --git a/packages/block-editor/src/private-apis.js b/packages/block-editor/src/private-apis.js index 98dd326a3ebb34..7205bef5798ec1 100644 --- a/packages/block-editor/src/private-apis.js +++ b/packages/block-editor/src/private-apis.js @@ -32,7 +32,6 @@ import { usesContextKey } from './components/rich-text/format-edit'; import { ExperimentalBlockCanvas } from './components/block-canvas'; import { getDuotoneFilter } from './components/duotone/utils'; import { useFlashEditableBlocks } from './components/use-flash-editable-blocks'; -import { useZoomOutModeExit } from './components/block-list/use-block-props/use-zoom-out-mode-exit'; import { selectBlockPatternsKey, reusableBlocksSelectKey, @@ -79,7 +78,6 @@ lock( privateApis, { TextAlignmentControl, usesContextKey, useFlashEditableBlocks, - useZoomOutModeExit, globalStylesDataKey, globalStylesLinksDataKey, selectBlockPatternsKey, diff --git a/packages/editor/src/components/visual-editor/index.js b/packages/editor/src/components/visual-editor/index.js index 6462c4a3f83682..133057d9f388f1 100644 --- a/packages/editor/src/components/visual-editor/index.js +++ b/packages/editor/src/components/visual-editor/index.js @@ -41,6 +41,7 @@ import { TEMPLATE_PART_POST_TYPE, TEMPLATE_POST_TYPE, } from '../../store/constants'; +import { useZoomOutModeExit } from './use-zoom-out-mode-exit'; const { LayoutStyle, @@ -48,7 +49,6 @@ const { useLayoutStyles, ExperimentalBlockCanvas: BlockCanvas, useFlashEditableBlocks, - useZoomOutModeExit, } = unlock( blockEditorPrivateApis ); /** diff --git a/packages/block-editor/src/components/block-list/use-block-props/use-zoom-out-mode-exit.js b/packages/editor/src/components/visual-editor/use-zoom-out-mode-exit.js similarity index 90% rename from packages/block-editor/src/components/block-list/use-block-props/use-zoom-out-mode-exit.js rename to packages/editor/src/components/visual-editor/use-zoom-out-mode-exit.js index d77af3ef89c1ec..5a2bb49dbb832e 100644 --- a/packages/block-editor/src/components/block-list/use-block-props/use-zoom-out-mode-exit.js +++ b/packages/editor/src/components/visual-editor/use-zoom-out-mode-exit.js @@ -3,12 +3,12 @@ */ import { useSelect, useDispatch } from '@wordpress/data'; import { useRefEffect } from '@wordpress/compose'; +import { store as blockEditorStore } from '@wordpress/block-editor'; /** * Internal dependencies */ -import { store as blockEditorStore } from '../../../store'; -import { unlock } from '../../../lock-unlock'; +import { unlock } from '../../lock-unlock'; /** * Allows Zoom Out mode to be exited by double clicking in the selected block.