Skip to content

Commit

Permalink
Block Directory: Remove 'edit-post' package dependency (WordPress#63349)
Browse files Browse the repository at this point in the history
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
  • Loading branch information
3 people authored and carstingaxion committed Jul 18, 2024
1 parent 768db44 commit 24a6d45
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/block-directory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"@wordpress/compose": "file:../compose",
"@wordpress/core-data": "file:../core-data",
"@wordpress/data": "file:../data",
"@wordpress/edit-post": "file:../edit-post",
"@wordpress/editor": "file:../editor",
"@wordpress/element": "file:../element",
"@wordpress/hooks": "file:../hooks",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@
import { _n, sprintf } from '@wordpress/i18n';
import { useSelect } from '@wordpress/data';
import { blockDefault } from '@wordpress/icons';
import { PluginPrePublishPanel } from '@wordpress/editor';

/**
* Internal dependencies
*/
import CompactList from '../../components/compact-list';
import { store as blockDirectoryStore } from '../../store';

// We shouldn't import the editor package directly
// because it would include the wp-editor in all pages loading the block-directory script.
const { PluginPrePublishPanel } = window?.wp?.editor ?? {};

export default function InstalledBlocksPrePublishPanel() {
const newBlockTypes = useSelect(
( select ) => select( blockDirectoryStore ).getNewBlockTypes(),
Expand Down

0 comments on commit 24a6d45

Please sign in to comment.