diff --git a/packages/block-editor/src/components/colors-gradients/control.js b/packages/block-editor/src/components/colors-gradients/control.js index e820bf73284882..88b33379e04de3 100644 --- a/packages/block-editor/src/components/colors-gradients/control.js +++ b/packages/block-editor/src/components/colors-gradients/control.js @@ -21,6 +21,7 @@ import { import { useSettings } from '../use-settings'; import { unlock } from '../../lock-unlock'; +const { Tabs } = unlock( componentsPrivateApis ); const colorsAndGradientKeys = [ 'colors', 'disableCustomColors', @@ -106,11 +107,6 @@ function ColorGradientControlInner( { ); - // Unlocking `Tabs` too early causes the `unlock` method to receive an empty - // object, due to circular dependencies. - // See https://github.com/WordPress/gutenberg/issues/52692 - const { Tabs } = unlock( componentsPrivateApis ); - return ( ( @@ -207,10 +209,6 @@ function ColorPanelDropdown( { panelId, } ) { const currentTab = tabs.find( ( tab ) => tab.userValue !== undefined ); - // Unlocking `Tabs` too early causes the `unlock` method to receive an empty - // object, due to circular dependencies. - // See https://github.com/WordPress/gutenberg/issues/52692 - const { Tabs } = unlock( componentsPrivateApis ); return ( { const blockEditorSettings = { @@ -283,8 +284,7 @@ function useBlockEditorSettings( settings, postType, postId, renderingMode ) { ? patterns : undefined; }, - [ unlock( privateApis ).reusableBlocksSelectKey ]: - __experimentalReusableBlocksSelect, + [ reusableBlocksSelectKey ]: __experimentalReusableBlocksSelect, __experimentalBlockPatternCategories: blockPatternCategories, __experimentalUserPatternCategories: userPatternCategories, __experimentalFetchLinkSuggestions: ( search, searchOptions ) => @@ -340,8 +340,6 @@ function useBlockEditorSettings( settings, postType, postId, renderingMode ) { setIsInserterOpened, sectionRootClientId, globalStylesData, - globalStylesDataKey, - selectBlockPatternsKey, ] ); }