@wordpress/block-directory 4.31.0 → 4.33.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/components/auto-block-uninstaller/index.js.map +1 -1
  3. package/build/components/block-ratings/index.js.map +1 -1
  4. package/build/components/block-ratings/stars.js.map +1 -1
  5. package/build/components/compact-list/index.js.map +1 -1
  6. package/build/components/downloadable-block-icon/index.js.map +1 -1
  7. package/build/components/downloadable-block-list-item/index.js.map +1 -1
  8. package/build/components/downloadable-block-notice/index.js.map +1 -1
  9. package/build/components/downloadable-blocks-list/index.js.map +1 -1
  10. package/build/components/downloadable-blocks-panel/index.js.map +1 -1
  11. package/build/components/downloadable-blocks-panel/inserter-panel.js.map +1 -1
  12. package/build/components/downloadable-blocks-panel/no-results.js.map +1 -1
  13. package/build/index.js.map +1 -1
  14. package/build/lock-unlock.js.map +1 -1
  15. package/build/plugins/get-install-missing/index.js.map +1 -1
  16. package/build/plugins/get-install-missing/install-button.js.map +1 -1
  17. package/build/plugins/index.js.map +1 -1
  18. package/build/plugins/inserter-menu-downloadable-blocks-panel/index.js.map +1 -1
  19. package/build/plugins/installed-blocks-pre-publish-panel/index.js +6 -0
  20. package/build/plugins/installed-blocks-pre-publish-panel/index.js.map +1 -1
  21. package/build/store/actions.js.map +1 -1
  22. package/build/store/index.js +1 -1
  23. package/build/store/index.js.map +1 -1
  24. package/build/store/load-assets.js.map +1 -1
  25. package/build/store/reducer.js.map +1 -1
  26. package/build/store/resolvers.js.map +1 -1
  27. package/build/store/selectors.js.map +1 -1
  28. package/build/store/utils/get-plugin-url.js.map +1 -1
  29. package/build/store/utils/has-block-type.js.map +1 -1
  30. package/build-module/components/auto-block-uninstaller/index.js.map +1 -1
  31. package/build-module/components/block-ratings/index.js.map +1 -1
  32. package/build-module/components/block-ratings/stars.js.map +1 -1
  33. package/build-module/components/compact-list/index.js.map +1 -1
  34. package/build-module/components/downloadable-block-icon/index.js.map +1 -1
  35. package/build-module/components/downloadable-block-list-item/index.js.map +1 -1
  36. package/build-module/components/downloadable-block-notice/index.js.map +1 -1
  37. package/build-module/components/downloadable-blocks-list/index.js.map +1 -1
  38. package/build-module/components/downloadable-blocks-panel/index.js.map +1 -1
  39. package/build-module/components/downloadable-blocks-panel/inserter-panel.js.map +1 -1
  40. package/build-module/components/downloadable-blocks-panel/no-results.js.map +1 -1
  41. package/build-module/index.js.map +1 -1
  42. package/build-module/lock-unlock.js.map +1 -1
  43. package/build-module/plugins/get-install-missing/index.js.map +1 -1
  44. package/build-module/plugins/get-install-missing/install-button.js.map +1 -1
  45. package/build-module/plugins/index.js.map +1 -1
  46. package/build-module/plugins/inserter-menu-downloadable-blocks-panel/index.js.map +1 -1
  47. package/build-module/plugins/installed-blocks-pre-publish-panel/index.js.map +1 -1
  48. package/build-module/store/actions.js.map +1 -1
  49. package/build-module/store/index.js.map +1 -1
  50. package/build-module/store/load-assets.js.map +1 -1
  51. package/build-module/store/reducer.js.map +1 -1
  52. package/build-module/store/resolvers.js.map +1 -1
  53. package/build-module/store/selectors.js.map +1 -1
  54. package/build-module/store/utils/get-plugin-url.js.map +1 -1
  55. package/build-module/store/utils/has-block-type.js.map +1 -1
  56. package/build-style/style-rtl.css +1 -1
  57. package/build-style/style.css +1 -1
  58. package/package.json +21 -21
@@ -1 +1 @@
1
- {"version":3,"names":["camelCase","apiFetch","fetchDownloadableBlocks","receiveDownloadableBlocks","getDownloadableBlocks","filterValue","dispatch","results","path","blocks","map","result","Object","fromEntries","entries","key","value"],"sources":["@wordpress/block-directory/src/store/resolvers.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { camelCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Internal dependencies\n */\nimport { fetchDownloadableBlocks, receiveDownloadableBlocks } from './actions';\n\nexport const getDownloadableBlocks =\n\t( filterValue ) =>\n\tasync ( { dispatch } ) => {\n\t\tif ( ! filterValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tdispatch( fetchDownloadableBlocks( filterValue ) );\n\t\t\tconst results = await apiFetch( {\n\t\t\t\tpath: `wp/v2/block-directory/search?term=${ filterValue }`,\n\t\t\t} );\n\t\t\tconst blocks = results.map( ( result ) =>\n\t\t\t\tObject.fromEntries(\n\t\t\t\t\tObject.entries( result ).map( ( [ key, value ] ) => [\n\t\t\t\t\t\tcamelCase( key ),\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t] )\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tdispatch( receiveDownloadableBlocks( blocks, filterValue ) );\n\t\t} catch {}\n\t};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,aAAa;;AAEvC;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,sBAAsB;;AAE3C;AACA;AACA;AACA,SAASC,uBAAuB,EAAEC,yBAAyB,QAAQ,WAAW;AAE9E,OAAO,MAAMC,qBAAqB,GAC/BC,WAAW,IACb,OAAQ;EAAEC;AAAS,CAAC,KAAM;EACzB,IAAK,CAAED,WAAW,EAAG;IACpB;EACD;EAEA,IAAI;IACHC,QAAQ,CAAEJ,uBAAuB,CAAEG,WAAY,CAAE,CAAC;IAClD,MAAME,OAAO,GAAG,MAAMN,QAAQ,CAAE;MAC/BO,IAAI,EAAG,qCAAqCH,WAAa;IAC1D,CAAE,CAAC;IACH,MAAMI,MAAM,GAAGF,OAAO,CAACG,GAAG,CAAIC,MAAM,IACnCC,MAAM,CAACC,WAAW,CACjBD,MAAM,CAACE,OAAO,CAAEH,MAAO,CAAC,CAACD,GAAG,CAAE,CAAE,CAAEK,GAAG,EAAEC,KAAK,CAAE,KAAM,CACnDhB,SAAS,CAAEe,GAAI,CAAC,EAChBC,KAAK,CACJ,CACH,CACD,CAAC;IAEDV,QAAQ,CAAEH,yBAAyB,CAAEM,MAAM,EAAEJ,WAAY,CAAE,CAAC;EAC7D,CAAC,CAAC,MAAM,CAAC;AACV,CAAC"}
1
+ {"version":3,"names":["camelCase","apiFetch","fetchDownloadableBlocks","receiveDownloadableBlocks","getDownloadableBlocks","filterValue","dispatch","results","path","blocks","map","result","Object","fromEntries","entries","key","value"],"sources":["@wordpress/block-directory/src/store/resolvers.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { camelCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Internal dependencies\n */\nimport { fetchDownloadableBlocks, receiveDownloadableBlocks } from './actions';\n\nexport const getDownloadableBlocks =\n\t( filterValue ) =>\n\tasync ( { dispatch } ) => {\n\t\tif ( ! filterValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tdispatch( fetchDownloadableBlocks( filterValue ) );\n\t\t\tconst results = await apiFetch( {\n\t\t\t\tpath: `wp/v2/block-directory/search?term=${ filterValue }`,\n\t\t\t} );\n\t\t\tconst blocks = results.map( ( result ) =>\n\t\t\t\tObject.fromEntries(\n\t\t\t\t\tObject.entries( result ).map( ( [ key, value ] ) => [\n\t\t\t\t\t\tcamelCase( key ),\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t] )\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tdispatch( receiveDownloadableBlocks( blocks, filterValue ) );\n\t\t} catch {}\n\t};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,aAAa;;AAEvC;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,sBAAsB;;AAE3C;AACA;AACA;AACA,SAASC,uBAAuB,EAAEC,yBAAyB,QAAQ,WAAW;AAE9E,OAAO,MAAMC,qBAAqB,GAC/BC,WAAW,IACb,OAAQ;EAAEC;AAAS,CAAC,KAAM;EACzB,IAAK,CAAED,WAAW,EAAG;IACpB;EACD;EAEA,IAAI;IACHC,QAAQ,CAAEJ,uBAAuB,CAAEG,WAAY,CAAE,CAAC;IAClD,MAAME,OAAO,GAAG,MAAMN,QAAQ,CAAE;MAC/BO,IAAI,EAAG,qCAAqCH,WAAa;IAC1D,CAAE,CAAC;IACH,MAAMI,MAAM,GAAGF,OAAO,CAACG,GAAG,CAAIC,MAAM,IACnCC,MAAM,CAACC,WAAW,CACjBD,MAAM,CAACE,OAAO,CAAEH,MAAO,CAAC,CAACD,GAAG,CAAE,CAAE,CAAEK,GAAG,EAAEC,KAAK,CAAE,KAAM,CACnDhB,SAAS,CAAEe,GAAI,CAAC,EAChBC,KAAK,CACJ,CACH,CACD,CAAC;IAEDV,QAAQ,CAAEH,yBAAyB,CAAEM,MAAM,EAAEJ,WAAY,CAAE,CAAC;EAC7D,CAAC,CAAC,MAAM,CAAC;AACV,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["createRegistrySelector","store","blockEditorStore","hasBlockType","isRequestingDownloadableBlocks","state","filterValue","_state$downloadableBl","downloadableBlocks","isRequesting","getDownloadableBlocks","_state$downloadableBl2","results","getInstalledBlockTypes","blockManagement","installedBlockTypes","getNewBlockTypes","select","usedBlockTree","getBlocks","filter","blockType","getUnusedBlockTypes","isInstalling","blockId","getErrorNotices","errorNotices","getErrorNoticeForBlock"],"sources":["@wordpress/block-directory/src/store/selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport hasBlockType from './utils/has-block-type';\n\n/**\n * Returns true if application is requesting for downloadable blocks.\n *\n * @param {Object} state Global application state.\n * @param {string} filterValue Search string.\n *\n * @return {boolean} Whether a request is in progress for the blocks list.\n */\nexport function isRequestingDownloadableBlocks( state, filterValue ) {\n\treturn state.downloadableBlocks[ filterValue ]?.isRequesting ?? false;\n}\n\n/**\n * Returns the available uninstalled blocks.\n *\n * @param {Object} state Global application state.\n * @param {string} filterValue Search string.\n *\n * @return {Array} Downloadable blocks.\n */\nexport function getDownloadableBlocks( state, filterValue ) {\n\treturn state.downloadableBlocks[ filterValue ]?.results ?? [];\n}\n\n/**\n * Returns the block types that have been installed on the server in this\n * session.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Block type items\n */\nexport function getInstalledBlockTypes( state ) {\n\treturn state.blockManagement.installedBlockTypes;\n}\n\n/**\n * Returns block types that have been installed on the server and used in the\n * current post.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Block type items.\n */\nexport const getNewBlockTypes = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst usedBlockTree = select( blockEditorStore ).getBlocks();\n\t\tconst installedBlockTypes = getInstalledBlockTypes( state );\n\n\t\treturn installedBlockTypes.filter( ( blockType ) =>\n\t\t\thasBlockType( blockType, usedBlockTree )\n\t\t);\n\t}\n);\n\n/**\n * Returns the block types that have been installed on the server but are not\n * used in the current post.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Block type items.\n */\nexport const getUnusedBlockTypes = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst usedBlockTree = select( blockEditorStore ).getBlocks();\n\t\tconst installedBlockTypes = getInstalledBlockTypes( state );\n\n\t\treturn installedBlockTypes.filter(\n\t\t\t( blockType ) => ! hasBlockType( blockType, usedBlockTree )\n\t\t);\n\t}\n);\n\n/**\n * Returns true if a block plugin install is in progress.\n *\n * @param {Object} state Global application state.\n * @param {string} blockId Id of the block.\n *\n * @return {boolean} Whether this block is currently being installed.\n */\nexport function isInstalling( state, blockId ) {\n\treturn state.blockManagement.isInstalling[ blockId ] || false;\n}\n\n/**\n * Returns all block error notices.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Object with error notices.\n */\nexport function getErrorNotices( state ) {\n\treturn state.errorNotices;\n}\n\n/**\n * Returns the error notice for a given block.\n *\n * @param {Object} state Global application state.\n * @param {string} blockId The ID of the block plugin. eg: my-block\n *\n * @return {string|boolean} The error text, or false if no error.\n */\nexport function getErrorNoticeForBlock( state, blockId ) {\n\treturn state.errorNotices[ blockId ];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,sBAAsB,QAAQ,iBAAiB;AACxD,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;;AAEnE;AACA;AACA;AACA,OAAOC,YAAY,MAAM,wBAAwB;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,8BAA8BA,CAAEC,KAAK,EAAEC,WAAW,EAAG;EAAA,IAAAC,qBAAA;EACpE,QAAAA,qBAAA,GAAOF,KAAK,CAACG,kBAAkB,CAAEF,WAAW,CAAE,EAAEG,YAAY,cAAAF,qBAAA,cAAAA,qBAAA,GAAI,KAAK;AACtE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,qBAAqBA,CAAEL,KAAK,EAAEC,WAAW,EAAG;EAAA,IAAAK,sBAAA;EAC3D,QAAAA,sBAAA,GAAON,KAAK,CAACG,kBAAkB,CAAEF,WAAW,CAAE,EAAEM,OAAO,cAAAD,sBAAA,cAAAA,sBAAA,GAAI,EAAE;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,sBAAsBA,CAAER,KAAK,EAAG;EAC/C,OAAOA,KAAK,CAACS,eAAe,CAACC,mBAAmB;AACjD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAGhB,sBAAsB,CACnDiB,MAAM,IAAQZ,KAAK,IAAM;EAC1B,MAAMa,aAAa,GAAGD,MAAM,CAAEf,gBAAiB,CAAC,CAACiB,SAAS,CAAC,CAAC;EAC5D,MAAMJ,mBAAmB,GAAGF,sBAAsB,CAAER,KAAM,CAAC;EAE3D,OAAOU,mBAAmB,CAACK,MAAM,CAAIC,SAAS,IAC7ClB,YAAY,CAAEkB,SAAS,EAAEH,aAAc,CACxC,CAAC;AACF,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,mBAAmB,GAAGtB,sBAAsB,CACtDiB,MAAM,IAAQZ,KAAK,IAAM;EAC1B,MAAMa,aAAa,GAAGD,MAAM,CAAEf,gBAAiB,CAAC,CAACiB,SAAS,CAAC,CAAC;EAC5D,MAAMJ,mBAAmB,GAAGF,sBAAsB,CAAER,KAAM,CAAC;EAE3D,OAAOU,mBAAmB,CAACK,MAAM,CAC9BC,SAAS,IAAM,CAAElB,YAAY,CAAEkB,SAAS,EAAEH,aAAc,CAC3D,CAAC;AACF,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASK,YAAYA,CAAElB,KAAK,EAAEmB,OAAO,EAAG;EAC9C,OAAOnB,KAAK,CAACS,eAAe,CAACS,YAAY,CAAEC,OAAO,CAAE,IAAI,KAAK;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAAEpB,KAAK,EAAG;EACxC,OAAOA,KAAK,CAACqB,YAAY;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAAEtB,KAAK,EAAEmB,OAAO,EAAG;EACxD,OAAOnB,KAAK,CAACqB,YAAY,CAAEF,OAAO,CAAE;AACrC"}
1
+ {"version":3,"names":["createRegistrySelector","store","blockEditorStore","hasBlockType","isRequestingDownloadableBlocks","state","filterValue","_state$downloadableBl","downloadableBlocks","isRequesting","getDownloadableBlocks","_state$downloadableBl2","results","getInstalledBlockTypes","blockManagement","installedBlockTypes","getNewBlockTypes","select","usedBlockTree","getBlocks","filter","blockType","getUnusedBlockTypes","isInstalling","blockId","getErrorNotices","errorNotices","getErrorNoticeForBlock"],"sources":["@wordpress/block-directory/src/store/selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport hasBlockType from './utils/has-block-type';\n\n/**\n * Returns true if application is requesting for downloadable blocks.\n *\n * @param {Object} state Global application state.\n * @param {string} filterValue Search string.\n *\n * @return {boolean} Whether a request is in progress for the blocks list.\n */\nexport function isRequestingDownloadableBlocks( state, filterValue ) {\n\treturn state.downloadableBlocks[ filterValue ]?.isRequesting ?? false;\n}\n\n/**\n * Returns the available uninstalled blocks.\n *\n * @param {Object} state Global application state.\n * @param {string} filterValue Search string.\n *\n * @return {Array} Downloadable blocks.\n */\nexport function getDownloadableBlocks( state, filterValue ) {\n\treturn state.downloadableBlocks[ filterValue ]?.results ?? [];\n}\n\n/**\n * Returns the block types that have been installed on the server in this\n * session.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Block type items\n */\nexport function getInstalledBlockTypes( state ) {\n\treturn state.blockManagement.installedBlockTypes;\n}\n\n/**\n * Returns block types that have been installed on the server and used in the\n * current post.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Block type items.\n */\nexport const getNewBlockTypes = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst usedBlockTree = select( blockEditorStore ).getBlocks();\n\t\tconst installedBlockTypes = getInstalledBlockTypes( state );\n\n\t\treturn installedBlockTypes.filter( ( blockType ) =>\n\t\t\thasBlockType( blockType, usedBlockTree )\n\t\t);\n\t}\n);\n\n/**\n * Returns the block types that have been installed on the server but are not\n * used in the current post.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Block type items.\n */\nexport const getUnusedBlockTypes = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst usedBlockTree = select( blockEditorStore ).getBlocks();\n\t\tconst installedBlockTypes = getInstalledBlockTypes( state );\n\n\t\treturn installedBlockTypes.filter(\n\t\t\t( blockType ) => ! hasBlockType( blockType, usedBlockTree )\n\t\t);\n\t}\n);\n\n/**\n * Returns true if a block plugin install is in progress.\n *\n * @param {Object} state Global application state.\n * @param {string} blockId Id of the block.\n *\n * @return {boolean} Whether this block is currently being installed.\n */\nexport function isInstalling( state, blockId ) {\n\treturn state.blockManagement.isInstalling[ blockId ] || false;\n}\n\n/**\n * Returns all block error notices.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Object with error notices.\n */\nexport function getErrorNotices( state ) {\n\treturn state.errorNotices;\n}\n\n/**\n * Returns the error notice for a given block.\n *\n * @param {Object} state Global application state.\n * @param {string} blockId The ID of the block plugin. eg: my-block\n *\n * @return {string|boolean} The error text, or false if no error.\n */\nexport function getErrorNoticeForBlock( state, blockId ) {\n\treturn state.errorNotices[ blockId ];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,sBAAsB,QAAQ,iBAAiB;AACxD,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,yBAAyB;;AAEnE;AACA;AACA;AACA,OAAOC,YAAY,MAAM,wBAAwB;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,8BAA8BA,CAAEC,KAAK,EAAEC,WAAW,EAAG;EAAA,IAAAC,qBAAA;EACpE,QAAAA,qBAAA,GAAOF,KAAK,CAACG,kBAAkB,CAAEF,WAAW,CAAE,EAAEG,YAAY,cAAAF,qBAAA,cAAAA,qBAAA,GAAI,KAAK;AACtE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,qBAAqBA,CAAEL,KAAK,EAAEC,WAAW,EAAG;EAAA,IAAAK,sBAAA;EAC3D,QAAAA,sBAAA,GAAON,KAAK,CAACG,kBAAkB,CAAEF,WAAW,CAAE,EAAEM,OAAO,cAAAD,sBAAA,cAAAA,sBAAA,GAAI,EAAE;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,sBAAsBA,CAAER,KAAK,EAAG;EAC/C,OAAOA,KAAK,CAACS,eAAe,CAACC,mBAAmB;AACjD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAGhB,sBAAsB,CACnDiB,MAAM,IAAQZ,KAAK,IAAM;EAC1B,MAAMa,aAAa,GAAGD,MAAM,CAAEf,gBAAiB,CAAC,CAACiB,SAAS,CAAC,CAAC;EAC5D,MAAMJ,mBAAmB,GAAGF,sBAAsB,CAAER,KAAM,CAAC;EAE3D,OAAOU,mBAAmB,CAACK,MAAM,CAAIC,SAAS,IAC7ClB,YAAY,CAAEkB,SAAS,EAAEH,aAAc,CACxC,CAAC;AACF,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,mBAAmB,GAAGtB,sBAAsB,CACtDiB,MAAM,IAAQZ,KAAK,IAAM;EAC1B,MAAMa,aAAa,GAAGD,MAAM,CAAEf,gBAAiB,CAAC,CAACiB,SAAS,CAAC,CAAC;EAC5D,MAAMJ,mBAAmB,GAAGF,sBAAsB,CAAER,KAAM,CAAC;EAE3D,OAAOU,mBAAmB,CAACK,MAAM,CAC9BC,SAAS,IAAM,CAAElB,YAAY,CAAEkB,SAAS,EAAEH,aAAc,CAC3D,CAAC;AACF,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASK,YAAYA,CAAElB,KAAK,EAAEmB,OAAO,EAAG;EAC9C,OAAOnB,KAAK,CAACS,eAAe,CAACS,YAAY,CAAEC,OAAO,CAAE,IAAI,KAAK;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAAEpB,KAAK,EAAG;EACxC,OAAOA,KAAK,CAACqB,YAAY;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAAEtB,KAAK,EAAEmB,OAAO,EAAG;EACxD,OAAOnB,KAAK,CAACqB,YAAY,CAAEF,OAAO,CAAE;AACrC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["getPluginUrl","block","link","links","self","length","href"],"sources":["@wordpress/block-directory/src/store/utils/get-plugin-url.js"],"sourcesContent":["/**\n * Get the plugin's direct API link out of a block-directory response.\n *\n * @param {Object} block The block object\n *\n * @return {string} The plugin URL, if exists.\n */\nexport default function getPluginUrl( block ) {\n\tif ( ! block ) {\n\t\treturn false;\n\t}\n\tconst link = block.links[ 'wp:plugin' ] || block.links.self;\n\tif ( link && link.length ) {\n\t\treturn link[ 0 ].href;\n\t}\n\treturn false;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,YAAYA,CAAEC,KAAK,EAAG;EAC7C,IAAK,CAAEA,KAAK,EAAG;IACd,OAAO,KAAK;EACb;EACA,MAAMC,IAAI,GAAGD,KAAK,CAACE,KAAK,CAAE,WAAW,CAAE,IAAIF,KAAK,CAACE,KAAK,CAACC,IAAI;EAC3D,IAAKF,IAAI,IAAIA,IAAI,CAACG,MAAM,EAAG;IAC1B,OAAOH,IAAI,CAAE,CAAC,CAAE,CAACI,IAAI;EACtB;EACA,OAAO,KAAK;AACb"}
1
+ {"version":3,"names":["getPluginUrl","block","link","links","self","length","href"],"sources":["@wordpress/block-directory/src/store/utils/get-plugin-url.js"],"sourcesContent":["/**\n * Get the plugin's direct API link out of a block-directory response.\n *\n * @param {Object} block The block object\n *\n * @return {string} The plugin URL, if exists.\n */\nexport default function getPluginUrl( block ) {\n\tif ( ! block ) {\n\t\treturn false;\n\t}\n\tconst link = block.links[ 'wp:plugin' ] || block.links.self;\n\tif ( link && link.length ) {\n\t\treturn link[ 0 ].href;\n\t}\n\treturn false;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,YAAYA,CAAEC,KAAK,EAAG;EAC7C,IAAK,CAAEA,KAAK,EAAG;IACd,OAAO,KAAK;EACb;EACA,MAAMC,IAAI,GAAGD,KAAK,CAACE,KAAK,CAAE,WAAW,CAAE,IAAIF,KAAK,CAACE,KAAK,CAACC,IAAI;EAC3D,IAAKF,IAAI,IAAIA,IAAI,CAACG,MAAM,EAAG;IAC1B,OAAOH,IAAI,CAAE,CAAC,CAAE,CAACI,IAAI;EACtB;EACA,OAAO,KAAK;AACb","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["hasBlockType","blockType","blocks","length","some","name","i","innerBlocks"],"sources":["@wordpress/block-directory/src/store/utils/has-block-type.js"],"sourcesContent":["/**\n * Check if a block list contains a specific block type. Recursively searches\n * through `innerBlocks` if they exist.\n *\n * @param {Object} blockType A block object to search for.\n * @param {Object[]} blocks The list of blocks to look through.\n *\n * @return {boolean} Whether the blockType is found.\n */\nexport default function hasBlockType( blockType, blocks = [] ) {\n\tif ( ! blocks.length ) {\n\t\treturn false;\n\t}\n\tif ( blocks.some( ( { name } ) => name === blockType.name ) ) {\n\t\treturn true;\n\t}\n\tfor ( let i = 0; i < blocks.length; i++ ) {\n\t\tif ( hasBlockType( blockType, blocks[ i ].innerBlocks ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,YAAYA,CAAEC,SAAS,EAAEC,MAAM,GAAG,EAAE,EAAG;EAC9D,IAAK,CAAEA,MAAM,CAACC,MAAM,EAAG;IACtB,OAAO,KAAK;EACb;EACA,IAAKD,MAAM,CAACE,IAAI,CAAE,CAAE;IAAEC;EAAK,CAAC,KAAMA,IAAI,KAAKJ,SAAS,CAACI,IAAK,CAAC,EAAG;IAC7D,OAAO,IAAI;EACZ;EACA,KAAM,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGJ,MAAM,CAACC,MAAM,EAAEG,CAAC,EAAE,EAAG;IACzC,IAAKN,YAAY,CAAEC,SAAS,EAAEC,MAAM,CAAEI,CAAC,CAAE,CAACC,WAAY,CAAC,EAAG;MACzD,OAAO,IAAI;IACZ;EACD;EAEA,OAAO,KAAK;AACb"}
1
+ {"version":3,"names":["hasBlockType","blockType","blocks","length","some","name","i","innerBlocks"],"sources":["@wordpress/block-directory/src/store/utils/has-block-type.js"],"sourcesContent":["/**\n * Check if a block list contains a specific block type. Recursively searches\n * through `innerBlocks` if they exist.\n *\n * @param {Object} blockType A block object to search for.\n * @param {Object[]} blocks The list of blocks to look through.\n *\n * @return {boolean} Whether the blockType is found.\n */\nexport default function hasBlockType( blockType, blocks = [] ) {\n\tif ( ! blocks.length ) {\n\t\treturn false;\n\t}\n\tif ( blocks.some( ( { name } ) => name === blockType.name ) ) {\n\t\treturn true;\n\t}\n\tfor ( let i = 0; i < blocks.length; i++ ) {\n\t\tif ( hasBlockType( blockType, blocks[ i ].innerBlocks ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,YAAYA,CAAEC,SAAS,EAAEC,MAAM,GAAG,EAAE,EAAG;EAC9D,IAAK,CAAEA,MAAM,CAACC,MAAM,EAAG;IACtB,OAAO,KAAK;EACb;EACA,IAAKD,MAAM,CAACE,IAAI,CAAE,CAAE;IAAEC;EAAK,CAAC,KAAMA,IAAI,KAAKJ,SAAS,CAACI,IAAK,CAAC,EAAG;IAC7D,OAAO,IAAI;EACZ;EACA,KAAM,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGJ,MAAM,CAACC,MAAM,EAAEG,CAAC,EAAE,EAAG;IACzC,IAAKN,YAAY,CAAEC,SAAS,EAAEC,MAAM,CAAEI,CAAC,CAAE,CAACC,WAAY,CAAC,EAAG;MACzD,OAAO,IAAI;IACZ;EACD;EAEA,OAAO,KAAK;AACb","ignoreList":[]}
@@ -96,7 +96,7 @@
96
96
  --wp-admin-border-width-focus: 2px;
97
97
  --wp-block-synced-color: #7a00df;
98
98
  --wp-block-synced-color--rgb: 122, 0, 223;
99
- --wp-bound-block-color: #9747ff;
99
+ --wp-bound-block-color: var(--wp-block-synced-color);
100
100
  }
101
101
  @media (min-resolution: 192dpi) {
102
102
  :root {
@@ -96,7 +96,7 @@
96
96
  --wp-admin-border-width-focus: 2px;
97
97
  --wp-block-synced-color: #7a00df;
98
98
  --wp-block-synced-color--rgb: 122, 0, 223;
99
- --wp-bound-block-color: #9747ff;
99
+ --wp-bound-block-color: var(--wp-block-synced-color);
100
100
  }
101
101
  @media (min-resolution: 192dpi) {
102
102
  :root {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-directory",
3
- "version": "4.31.0",
3
+ "version": "4.33.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.54.0",
30
- "@wordpress/api-fetch": "^6.51.0",
31
- "@wordpress/block-editor": "^12.22.0",
32
- "@wordpress/blocks": "^12.31.0",
33
- "@wordpress/components": "^27.2.0",
34
- "@wordpress/compose": "^6.31.0",
35
- "@wordpress/core-data": "^6.31.0",
36
- "@wordpress/data": "^9.24.0",
37
- "@wordpress/edit-post": "^7.31.0",
38
- "@wordpress/editor": "^13.31.0",
39
- "@wordpress/element": "^5.31.0",
40
- "@wordpress/hooks": "^3.54.0",
41
- "@wordpress/html-entities": "^3.54.0",
42
- "@wordpress/i18n": "^4.54.0",
43
- "@wordpress/icons": "^9.45.0",
44
- "@wordpress/notices": "^4.22.0",
45
- "@wordpress/plugins": "^6.22.0",
46
- "@wordpress/private-apis": "^0.36.0",
47
- "@wordpress/url": "^3.55.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",
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": "ffc07735d0abfb3f69e91d48f25b7fe8d1ef92d2"
57
+ "gitHead": "280403b4c1cf6cc2c55a6c4d56f9ef91145e4191"
58
58
  }