@wordpress/block-directory 4.33.0 → 4.35.0

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 CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 4.35.0 (2024-05-16)
6
+
7
+ ## 4.34.0 (2024-05-02)
8
+
5
9
  ## 4.33.0 (2024-04-19)
6
10
 
7
11
  ## 4.32.0 (2024-04-03)
@@ -11,18 +11,18 @@ var _data = require("@wordpress/data");
11
11
  var _icons = require("@wordpress/icons");
12
12
  var _compactList = _interopRequireDefault(require("../../components/compact-list"));
13
13
  var _store = require("../../store");
14
- var _window$wp$editPost;
14
+ var _window$wp$editor;
15
15
  /**
16
16
  * WordPress dependencies
17
17
  */
18
18
  /**
19
19
  * Internal dependencies
20
20
  */
21
- // We shouldn't import the edit-post package directly
22
- // because it would include the wp-edit-post in all pages loading the block-directory script.
21
+ // We shouldn't import the editor package directly
22
+ // because it would include the wp-editor in all pages loading the block-directory script.
23
23
  const {
24
24
  PluginPrePublishPanel
25
- } = (_window$wp$editPost = window?.wp?.editPost) !== null && _window$wp$editPost !== void 0 ? _window$wp$editPost : {};
25
+ } = (_window$wp$editor = window?.wp?.editor) !== null && _window$wp$editor !== void 0 ? _window$wp$editor : {};
26
26
  function InstalledBlocksPrePublishPanel() {
27
27
  const newBlockTypes = (0, _data.useSelect)(select => select(_store.store).getNewBlockTypes(), []);
28
28
  if (!newBlockTypes.length) {
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_data","_icons","_compactList","_interopRequireDefault","_store","_window$wp$editPost","PluginPrePublishPanel","window","wp","editPost","InstalledBlocksPrePublishPanel","newBlockTypes","useSelect","select","blockDirectoryStore","getNewBlockTypes","length","_react","createElement","icon","blockDefault","title","sprintf","_n","initialOpen","className","default","items"],"sources":["@wordpress/block-directory/src/plugins/installed-blocks-pre-publish-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { _n, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { blockDefault } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport CompactList from '../../components/compact-list';\nimport { store as blockDirectoryStore } from '../../store';\n\n// We shouldn't import the edit-post package directly\n// because it would include the wp-edit-post in all pages loading the block-directory script.\nconst { PluginPrePublishPanel } = window?.wp?.editPost ?? {};\n\nexport default function InstalledBlocksPrePublishPanel() {\n\tconst newBlockTypes = useSelect(\n\t\t( select ) => select( blockDirectoryStore ).getNewBlockTypes(),\n\t\t[]\n\t);\n\n\tif ( ! newBlockTypes.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PluginPrePublishPanel\n\t\t\ticon={ blockDefault }\n\t\t\ttitle={ sprintf(\n\t\t\t\t// translators: %d: number of blocks (number).\n\t\t\t\t_n(\n\t\t\t\t\t'Added: %d block',\n\t\t\t\t\t'Added: %d blocks',\n\t\t\t\t\tnewBlockTypes.length\n\t\t\t\t),\n\t\t\t\tnewBlockTypes.length\n\t\t\t) }\n\t\t\tinitialOpen\n\t\t>\n\t\t\t<p className=\"installed-blocks-pre-publish-panel__copy\">\n\t\t\t\t{ _n(\n\t\t\t\t\t'The following block has been added to your site.',\n\t\t\t\t\t'The following blocks have been added to your site.',\n\t\t\t\t\tnewBlockTypes.length\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<CompactList items={ newBlockTypes } />\n\t\t</PluginPrePublishPanel>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAKA,IAAAG,YAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAA2D,IAAAM,mBAAA;AAX3D;AACA;AACA;AAKA;AACA;AACA;AAIA;AACA;AACA,MAAM;EAAEC;AAAsB,CAAC,IAAAD,mBAAA,GAAGE,MAAM,EAAEC,EAAE,EAAEC,QAAQ,cAAAJ,mBAAA,cAAAA,mBAAA,GAAI,CAAC,CAAC;AAE7C,SAASK,8BAA8BA,CAAA,EAAG;EACxD,MAAMC,aAAa,GAAG,IAAAC,eAAS,EAC5BC,MAAM,IAAMA,MAAM,CAAEC,YAAoB,CAAC,CAACC,gBAAgB,CAAC,CAAC,EAC9D,EACD,CAAC;EAED,IAAK,CAAEJ,aAAa,CAACK,MAAM,EAAG;IAC7B,OAAO,IAAI;EACZ;EAEA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACZ,qBAAqB;IACrBa,IAAI,EAAGC,mBAAc;IACrBC,KAAK,EAAG,IAAAC,aAAO;IACd;IACA,IAAAC,QAAE,EACD,iBAAiB,EACjB,kBAAkB,EAClBZ,aAAa,CAACK,MACf,CAAC,EACDL,aAAa,CAACK,MACf,CAAG;IACHQ,WAAW;EAAA,GAEX,IAAAP,MAAA,CAAAC,aAAA;IAAGO,SAAS,EAAC;EAA0C,GACpD,IAAAF,QAAE,EACH,kDAAkD,EAClD,oDAAoD,EACpDZ,aAAa,CAACK,MACf,CACE,CAAC,EACJ,IAAAC,MAAA,CAAAC,aAAA,EAAChB,YAAA,CAAAwB,OAAW;IAACC,KAAK,EAAGhB;EAAe,CAAE,CAChB,CAAC;AAE1B","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_data","_icons","_compactList","_interopRequireDefault","_store","_window$wp$editor","PluginPrePublishPanel","window","wp","editor","InstalledBlocksPrePublishPanel","newBlockTypes","useSelect","select","blockDirectoryStore","getNewBlockTypes","length","_react","createElement","icon","blockDefault","title","sprintf","_n","initialOpen","className","default","items"],"sources":["@wordpress/block-directory/src/plugins/installed-blocks-pre-publish-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { _n, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { blockDefault } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport CompactList from '../../components/compact-list';\nimport { store as blockDirectoryStore } from '../../store';\n\n// We shouldn't import the editor package directly\n// because it would include the wp-editor in all pages loading the block-directory script.\nconst { PluginPrePublishPanel } = window?.wp?.editor ?? {};\n\nexport default function InstalledBlocksPrePublishPanel() {\n\tconst newBlockTypes = useSelect(\n\t\t( select ) => select( blockDirectoryStore ).getNewBlockTypes(),\n\t\t[]\n\t);\n\n\tif ( ! newBlockTypes.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PluginPrePublishPanel\n\t\t\ticon={ blockDefault }\n\t\t\ttitle={ sprintf(\n\t\t\t\t// translators: %d: number of blocks (number).\n\t\t\t\t_n(\n\t\t\t\t\t'Added: %d block',\n\t\t\t\t\t'Added: %d blocks',\n\t\t\t\t\tnewBlockTypes.length\n\t\t\t\t),\n\t\t\t\tnewBlockTypes.length\n\t\t\t) }\n\t\t\tinitialOpen\n\t\t>\n\t\t\t<p className=\"installed-blocks-pre-publish-panel__copy\">\n\t\t\t\t{ _n(\n\t\t\t\t\t'The following block has been added to your site.',\n\t\t\t\t\t'The following blocks have been added to your site.',\n\t\t\t\t\tnewBlockTypes.length\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<CompactList items={ newBlockTypes } />\n\t\t</PluginPrePublishPanel>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAKA,IAAAG,YAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAA2D,IAAAM,iBAAA;AAX3D;AACA;AACA;AAKA;AACA;AACA;AAIA;AACA;AACA,MAAM;EAAEC;AAAsB,CAAC,IAAAD,iBAAA,GAAGE,MAAM,EAAEC,EAAE,EAAEC,MAAM,cAAAJ,iBAAA,cAAAA,iBAAA,GAAI,CAAC,CAAC;AAE3C,SAASK,8BAA8BA,CAAA,EAAG;EACxD,MAAMC,aAAa,GAAG,IAAAC,eAAS,EAC5BC,MAAM,IAAMA,MAAM,CAAEC,YAAoB,CAAC,CAACC,gBAAgB,CAAC,CAAC,EAC9D,EACD,CAAC;EAED,IAAK,CAAEJ,aAAa,CAACK,MAAM,EAAG;IAC7B,OAAO,IAAI;EACZ;EAEA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACZ,qBAAqB;IACrBa,IAAI,EAAGC,mBAAc;IACrBC,KAAK,EAAG,IAAAC,aAAO;IACd;IACA,IAAAC,QAAE,EACD,iBAAiB,EACjB,kBAAkB,EAClBZ,aAAa,CAACK,MACf,CAAC,EACDL,aAAa,CAACK,MACf,CAAG;IACHQ,WAAW;EAAA,GAEX,IAAAP,MAAA,CAAAC,aAAA;IAAGO,SAAS,EAAC;EAA0C,GACpD,IAAAF,QAAE,EACH,kDAAkD,EAClD,oDAAoD,EACpDZ,aAAa,CAACK,MACf,CACE,CAAC,EACJ,IAAAC,MAAA,CAAAC,aAAA,EAAChB,YAAA,CAAAwB,OAAW;IAACC,KAAK,EAAGhB;EAAe,CAAE,CAChB,CAAC;AAE1B","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- var _window$wp$editPost;
1
+ var _window$wp$editor;
2
2
  import { createElement } from "react";
3
3
  /**
4
4
  * WordPress dependencies
@@ -13,11 +13,11 @@ import { blockDefault } from '@wordpress/icons';
13
13
  import CompactList from '../../components/compact-list';
14
14
  import { store as blockDirectoryStore } from '../../store';
15
15
 
16
- // We shouldn't import the edit-post package directly
17
- // because it would include the wp-edit-post in all pages loading the block-directory script.
16
+ // We shouldn't import the editor package directly
17
+ // because it would include the wp-editor in all pages loading the block-directory script.
18
18
  const {
19
19
  PluginPrePublishPanel
20
- } = (_window$wp$editPost = window?.wp?.editPost) !== null && _window$wp$editPost !== void 0 ? _window$wp$editPost : {};
20
+ } = (_window$wp$editor = window?.wp?.editor) !== null && _window$wp$editor !== void 0 ? _window$wp$editor : {};
21
21
  export default function InstalledBlocksPrePublishPanel() {
22
22
  const newBlockTypes = useSelect(select => select(blockDirectoryStore).getNewBlockTypes(), []);
23
23
  if (!newBlockTypes.length) {
@@ -1 +1 @@
1
- {"version":3,"names":["_n","sprintf","useSelect","blockDefault","CompactList","store","blockDirectoryStore","PluginPrePublishPanel","_window$wp$editPost","window","wp","editPost","InstalledBlocksPrePublishPanel","newBlockTypes","select","getNewBlockTypes","length","createElement","icon","title","initialOpen","className","items"],"sources":["@wordpress/block-directory/src/plugins/installed-blocks-pre-publish-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { _n, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { blockDefault } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport CompactList from '../../components/compact-list';\nimport { store as blockDirectoryStore } from '../../store';\n\n// We shouldn't import the edit-post package directly\n// because it would include the wp-edit-post in all pages loading the block-directory script.\nconst { PluginPrePublishPanel } = window?.wp?.editPost ?? {};\n\nexport default function InstalledBlocksPrePublishPanel() {\n\tconst newBlockTypes = useSelect(\n\t\t( select ) => select( blockDirectoryStore ).getNewBlockTypes(),\n\t\t[]\n\t);\n\n\tif ( ! newBlockTypes.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PluginPrePublishPanel\n\t\t\ticon={ blockDefault }\n\t\t\ttitle={ sprintf(\n\t\t\t\t// translators: %d: number of blocks (number).\n\t\t\t\t_n(\n\t\t\t\t\t'Added: %d block',\n\t\t\t\t\t'Added: %d blocks',\n\t\t\t\t\tnewBlockTypes.length\n\t\t\t\t),\n\t\t\t\tnewBlockTypes.length\n\t\t\t) }\n\t\t\tinitialOpen\n\t\t>\n\t\t\t<p className=\"installed-blocks-pre-publish-panel__copy\">\n\t\t\t\t{ _n(\n\t\t\t\t\t'The following block has been added to your site.',\n\t\t\t\t\t'The following blocks have been added to your site.',\n\t\t\t\t\tnewBlockTypes.length\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<CompactList items={ newBlockTypes } />\n\t\t</PluginPrePublishPanel>\n\t);\n}\n"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,YAAY,QAAQ,kBAAkB;;AAE/C;AACA;AACA;AACA,OAAOC,WAAW,MAAM,+BAA+B;AACvD,SAASC,KAAK,IAAIC,mBAAmB,QAAQ,aAAa;;AAE1D;AACA;AACA,MAAM;EAAEC;AAAsB,CAAC,IAAAC,mBAAA,GAAGC,MAAM,EAAEC,EAAE,EAAEC,QAAQ,cAAAH,mBAAA,cAAAA,mBAAA,GAAI,CAAC,CAAC;AAE5D,eAAe,SAASI,8BAA8BA,CAAA,EAAG;EACxD,MAAMC,aAAa,GAAGX,SAAS,CAC5BY,MAAM,IAAMA,MAAM,CAAER,mBAAoB,CAAC,CAACS,gBAAgB,CAAC,CAAC,EAC9D,EACD,CAAC;EAED,IAAK,CAAEF,aAAa,CAACG,MAAM,EAAG;IAC7B,OAAO,IAAI;EACZ;EAEA,OACCC,aAAA,CAACV,qBAAqB;IACrBW,IAAI,EAAGf,YAAc;IACrBgB,KAAK,EAAGlB,OAAO;IACd;IACAD,EAAE,CACD,iBAAiB,EACjB,kBAAkB,EAClBa,aAAa,CAACG,MACf,CAAC,EACDH,aAAa,CAACG,MACf,CAAG;IACHI,WAAW;EAAA,GAEXH,aAAA;IAAGI,SAAS,EAAC;EAA0C,GACpDrB,EAAE,CACH,kDAAkD,EAClD,oDAAoD,EACpDa,aAAa,CAACG,MACf,CACE,CAAC,EACJC,aAAA,CAACb,WAAW;IAACkB,KAAK,EAAGT;EAAe,CAAE,CAChB,CAAC;AAE1B","ignoreList":[]}
1
+ {"version":3,"names":["_n","sprintf","useSelect","blockDefault","CompactList","store","blockDirectoryStore","PluginPrePublishPanel","_window$wp$editor","window","wp","editor","InstalledBlocksPrePublishPanel","newBlockTypes","select","getNewBlockTypes","length","createElement","icon","title","initialOpen","className","items"],"sources":["@wordpress/block-directory/src/plugins/installed-blocks-pre-publish-panel/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { _n, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { blockDefault } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport CompactList from '../../components/compact-list';\nimport { store as blockDirectoryStore } from '../../store';\n\n// We shouldn't import the editor package directly\n// because it would include the wp-editor in all pages loading the block-directory script.\nconst { PluginPrePublishPanel } = window?.wp?.editor ?? {};\n\nexport default function InstalledBlocksPrePublishPanel() {\n\tconst newBlockTypes = useSelect(\n\t\t( select ) => select( blockDirectoryStore ).getNewBlockTypes(),\n\t\t[]\n\t);\n\n\tif ( ! newBlockTypes.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PluginPrePublishPanel\n\t\t\ticon={ blockDefault }\n\t\t\ttitle={ sprintf(\n\t\t\t\t// translators: %d: number of blocks (number).\n\t\t\t\t_n(\n\t\t\t\t\t'Added: %d block',\n\t\t\t\t\t'Added: %d blocks',\n\t\t\t\t\tnewBlockTypes.length\n\t\t\t\t),\n\t\t\t\tnewBlockTypes.length\n\t\t\t) }\n\t\t\tinitialOpen\n\t\t>\n\t\t\t<p className=\"installed-blocks-pre-publish-panel__copy\">\n\t\t\t\t{ _n(\n\t\t\t\t\t'The following block has been added to your site.',\n\t\t\t\t\t'The following blocks have been added to your site.',\n\t\t\t\t\tnewBlockTypes.length\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<CompactList items={ newBlockTypes } />\n\t\t</PluginPrePublishPanel>\n\t);\n}\n"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,YAAY,QAAQ,kBAAkB;;AAE/C;AACA;AACA;AACA,OAAOC,WAAW,MAAM,+BAA+B;AACvD,SAASC,KAAK,IAAIC,mBAAmB,QAAQ,aAAa;;AAE1D;AACA;AACA,MAAM;EAAEC;AAAsB,CAAC,IAAAC,iBAAA,GAAGC,MAAM,EAAEC,EAAE,EAAEC,MAAM,cAAAH,iBAAA,cAAAA,iBAAA,GAAI,CAAC,CAAC;AAE1D,eAAe,SAASI,8BAA8BA,CAAA,EAAG;EACxD,MAAMC,aAAa,GAAGX,SAAS,CAC5BY,MAAM,IAAMA,MAAM,CAAER,mBAAoB,CAAC,CAACS,gBAAgB,CAAC,CAAC,EAC9D,EACD,CAAC;EAED,IAAK,CAAEF,aAAa,CAACG,MAAM,EAAG;IAC7B,OAAO,IAAI;EACZ;EAEA,OACCC,aAAA,CAACV,qBAAqB;IACrBW,IAAI,EAAGf,YAAc;IACrBgB,KAAK,EAAGlB,OAAO;IACd;IACAD,EAAE,CACD,iBAAiB,EACjB,kBAAkB,EAClBa,aAAa,CAACG,MACf,CAAC,EACDH,aAAa,CAACG,MACf,CAAG;IACHI,WAAW;EAAA,GAEXH,aAAA;IAAGI,SAAS,EAAC;EAA0C,GACpDrB,EAAE,CACH,kDAAkD,EAClD,oDAAoD,EACpDa,aAAa,CAACG,MACf,CACE,CAAC,EACJC,aAAA,CAACb,WAAW;IAACkB,KAAK,EAAGT;EAAe,CAAE,CAChB,CAAC;AAE1B","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-directory",
3
- "version": "4.33.0",
3
+ "version": "4.35.0",
4
4
  "description": "Extend editor with block directory features to search, download and install blocks.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -26,25 +26,25 @@
26
26
  "react-native": "src/index",
27
27
  "dependencies": {
28
28
  "@babel/runtime": "^7.16.0",
29
- "@wordpress/a11y": "^3.56.0",
30
- "@wordpress/api-fetch": "^6.53.0",
31
- "@wordpress/block-editor": "^12.24.0",
32
- "@wordpress/blocks": "^12.33.0",
33
- "@wordpress/components": "^27.4.0",
34
- "@wordpress/compose": "^6.33.0",
35
- "@wordpress/core-data": "^6.33.0",
36
- "@wordpress/data": "^9.26.0",
37
- "@wordpress/edit-post": "^7.33.0",
38
- "@wordpress/editor": "^13.33.0",
39
- "@wordpress/element": "^5.33.0",
40
- "@wordpress/hooks": "^3.56.0",
41
- "@wordpress/html-entities": "^3.56.0",
42
- "@wordpress/i18n": "^4.56.0",
43
- "@wordpress/icons": "^9.47.0",
44
- "@wordpress/notices": "^4.24.0",
45
- "@wordpress/plugins": "^6.24.0",
46
- "@wordpress/private-apis": "^0.38.0",
47
- "@wordpress/url": "^3.57.0",
29
+ "@wordpress/a11y": "^3.58.0",
30
+ "@wordpress/api-fetch": "^6.55.0",
31
+ "@wordpress/block-editor": "^12.26.0",
32
+ "@wordpress/blocks": "^12.35.0",
33
+ "@wordpress/components": "^27.6.0",
34
+ "@wordpress/compose": "^6.35.0",
35
+ "@wordpress/core-data": "^6.35.0",
36
+ "@wordpress/data": "^9.28.0",
37
+ "@wordpress/edit-post": "^7.35.0",
38
+ "@wordpress/editor": "^13.35.0",
39
+ "@wordpress/element": "^5.35.0",
40
+ "@wordpress/hooks": "^3.58.0",
41
+ "@wordpress/html-entities": "^3.58.0",
42
+ "@wordpress/i18n": "^4.58.0",
43
+ "@wordpress/icons": "^9.49.0",
44
+ "@wordpress/notices": "^4.26.0",
45
+ "@wordpress/plugins": "^6.26.0",
46
+ "@wordpress/private-apis": "^0.40.0",
47
+ "@wordpress/url": "^3.59.0",
48
48
  "change-case": "^4.1.2"
49
49
  },
50
50
  "peerDependencies": {
@@ -54,5 +54,5 @@
54
54
  "publishConfig": {
55
55
  "access": "public"
56
56
  },
57
- "gitHead": "280403b4c1cf6cc2c55a6c4d56f9ef91145e4191"
57
+ "gitHead": "42f38f287506a6b3ed8ccba839b18ad066821044"
58
58
  }
@@ -11,9 +11,9 @@ import { blockDefault } from '@wordpress/icons';
11
11
  import CompactList from '../../components/compact-list';
12
12
  import { store as blockDirectoryStore } from '../../store';
13
13
 
14
- // We shouldn't import the edit-post package directly
15
- // because it would include the wp-edit-post in all pages loading the block-directory script.
16
- const { PluginPrePublishPanel } = window?.wp?.editPost ?? {};
14
+ // We shouldn't import the editor package directly
15
+ // because it would include the wp-editor in all pages loading the block-directory script.
16
+ const { PluginPrePublishPanel } = window?.wp?.editor ?? {};
17
17
 
18
18
  export default function InstalledBlocksPrePublishPanel() {
19
19
  const newBlockTypes = useSelect(