@wordpress/block-directory 6.1.0 → 6.3.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 (106) hide show
  1. package/build/components/auto-block-uninstaller/index.cjs.map +1 -1
  2. package/build/components/block-ratings/index.cjs +9 -7
  3. package/build/components/block-ratings/index.cjs.map +1 -1
  4. package/build/components/block-ratings/stars.cjs +5 -1
  5. package/build/components/block-ratings/stars.cjs.map +1 -1
  6. package/build/components/compact-list/index.cjs +14 -8
  7. package/build/components/compact-list/index.cjs.map +1 -1
  8. package/build/components/downloadable-block-list-item/index.cjs +45 -16
  9. package/build/components/downloadable-block-list-item/index.cjs.map +1 -1
  10. package/build/components/downloadable-block-notice/index.cjs +2 -3
  11. package/build/components/downloadable-block-notice/index.cjs.map +1 -1
  12. package/build/components/downloadable-blocks-list/index.cjs +9 -7
  13. package/build/components/downloadable-blocks-list/index.cjs.map +1 -1
  14. package/build/components/downloadable-blocks-panel/index.cjs +11 -9
  15. package/build/components/downloadable-blocks-panel/index.cjs.map +1 -1
  16. package/build/components/downloadable-blocks-panel/inserter-panel.cjs +5 -1
  17. package/build/components/downloadable-blocks-panel/inserter-panel.cjs.map +1 -1
  18. package/build/plugins/get-install-missing/index.cjs +19 -9
  19. package/build/plugins/get-install-missing/index.cjs.map +1 -1
  20. package/build/plugins/get-install-missing/install-button.cjs +5 -1
  21. package/build/plugins/get-install-missing/install-button.cjs.map +1 -1
  22. package/build/plugins/index.cjs +12 -10
  23. package/build/plugins/index.cjs.map +1 -1
  24. package/build/plugins/inserter-menu-downloadable-blocks-panel/index.cjs +9 -7
  25. package/build/plugins/inserter-menu-downloadable-blocks-panel/index.cjs.map +1 -1
  26. package/build/plugins/installed-blocks-pre-publish-panel/index.cjs +15 -9
  27. package/build/plugins/installed-blocks-pre-publish-panel/index.cjs.map +1 -1
  28. package/build/store/actions.cjs +14 -8
  29. package/build/store/actions.cjs.map +1 -1
  30. package/build/store/index.cjs +11 -9
  31. package/build/store/index.cjs.map +1 -1
  32. package/build/store/load-assets.cjs +8 -6
  33. package/build/store/load-assets.cjs.map +1 -1
  34. package/build/store/resolvers.cjs +9 -7
  35. package/build/store/resolvers.cjs.map +1 -1
  36. package/build-module/components/block-ratings/stars.mjs +5 -1
  37. package/build-module/components/block-ratings/stars.mjs.map +1 -1
  38. package/build-module/components/compact-list/index.mjs +5 -1
  39. package/build-module/components/compact-list/index.mjs.map +1 -1
  40. package/build-module/components/downloadable-block-list-item/index.mjs +33 -6
  41. package/build-module/components/downloadable-block-list-item/index.mjs.map +1 -1
  42. package/build-module/components/downloadable-block-notice/index.mjs +3 -4
  43. package/build-module/components/downloadable-block-notice/index.mjs.map +1 -1
  44. package/build-module/components/downloadable-blocks-panel/inserter-panel.mjs +5 -1
  45. package/build-module/components/downloadable-blocks-panel/inserter-panel.mjs.map +1 -1
  46. package/build-module/plugins/get-install-missing/index.mjs +10 -2
  47. package/build-module/plugins/get-install-missing/index.mjs.map +1 -1
  48. package/build-module/plugins/get-install-missing/install-button.mjs +5 -1
  49. package/build-module/plugins/get-install-missing/install-button.mjs.map +1 -1
  50. package/build-module/plugins/installed-blocks-pre-publish-panel/index.mjs +7 -3
  51. package/build-module/plugins/installed-blocks-pre-publish-panel/index.mjs.map +1 -1
  52. package/build-module/store/actions.mjs +5 -1
  53. package/build-module/store/actions.mjs.map +1 -1
  54. package/build-style/style-rtl.css +7 -7
  55. package/build-style/style.css +7 -7
  56. package/build-types/components/auto-block-uninstaller/index.d.ts +2 -0
  57. package/build-types/components/auto-block-uninstaller/index.d.ts.map +1 -0
  58. package/build-types/components/block-ratings/index.d.ts +5 -0
  59. package/build-types/components/block-ratings/index.d.ts.map +1 -0
  60. package/build-types/components/block-ratings/stars.d.ts +5 -0
  61. package/build-types/components/block-ratings/stars.d.ts.map +1 -0
  62. package/build-types/components/compact-list/index.d.ts +4 -0
  63. package/build-types/components/compact-list/index.d.ts.map +1 -0
  64. package/build-types/components/downloadable-block-icon/index.d.ts +5 -0
  65. package/build-types/components/downloadable-block-icon/index.d.ts.map +1 -0
  66. package/build-types/components/downloadable-block-list-item/index.d.ts +6 -0
  67. package/build-types/components/downloadable-block-list-item/index.d.ts.map +1 -0
  68. package/build-types/components/downloadable-block-notice/index.d.ts +5 -0
  69. package/build-types/components/downloadable-block-notice/index.d.ts.map +1 -0
  70. package/build-types/components/downloadable-blocks-list/index.d.ts +8 -0
  71. package/build-types/components/downloadable-blocks-list/index.d.ts.map +1 -0
  72. package/build-types/components/downloadable-blocks-panel/index.d.ts +8 -0
  73. package/build-types/components/downloadable-blocks-panel/index.d.ts.map +1 -0
  74. package/build-types/components/downloadable-blocks-panel/inserter-panel.d.ts +7 -0
  75. package/build-types/components/downloadable-blocks-panel/inserter-panel.d.ts.map +1 -0
  76. package/build-types/components/downloadable-blocks-panel/no-results.d.ts +3 -0
  77. package/build-types/components/downloadable-blocks-panel/no-results.d.ts.map +1 -0
  78. package/build-types/index.d.ts +3 -0
  79. package/build-types/index.d.ts.map +1 -0
  80. package/build-types/plugins/get-install-missing/index.d.ts +3 -0
  81. package/build-types/plugins/get-install-missing/index.d.ts.map +1 -0
  82. package/build-types/plugins/get-install-missing/install-button.d.ts +6 -0
  83. package/build-types/plugins/get-install-missing/install-button.d.ts.map +1 -0
  84. package/build-types/plugins/index.d.ts +2 -0
  85. package/build-types/plugins/index.d.ts.map +1 -0
  86. package/build-types/plugins/inserter-menu-downloadable-blocks-panel/index.d.ts +3 -0
  87. package/build-types/plugins/inserter-menu-downloadable-blocks-panel/index.d.ts.map +1 -0
  88. package/build-types/plugins/installed-blocks-pre-publish-panel/index.d.ts +2 -0
  89. package/build-types/plugins/installed-blocks-pre-publish-panel/index.d.ts.map +1 -0
  90. package/build-types/store/actions.d.ts +82 -0
  91. package/build-types/store/actions.d.ts.map +1 -0
  92. package/build-types/store/index.d.ts +17 -0
  93. package/build-types/store/index.d.ts.map +1 -0
  94. package/build-types/store/load-assets.d.ts +16 -0
  95. package/build-types/store/load-assets.d.ts.map +1 -0
  96. package/build-types/store/reducer.d.ts +38 -0
  97. package/build-types/store/reducer.d.ts.map +1 -0
  98. package/build-types/store/resolvers.d.ts +4 -0
  99. package/build-types/store/resolvers.d.ts.map +1 -0
  100. package/build-types/store/selectors.d.ts +80 -0
  101. package/build-types/store/selectors.d.ts.map +1 -0
  102. package/build-types/store/utils/get-plugin-url.d.ts +9 -0
  103. package/build-types/store/utils/get-plugin-url.d.ts.map +1 -0
  104. package/package.json +23 -23
  105. package/src/components/downloadable-block-notice/index.jsx +0 -4
  106. package/src/plugins/installed-blocks-pre-publish-panel/index.jsx +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"inserter-panel.mjs","names":[],"sources":["../../../src/components/downloadable-blocks-panel/inserter-panel.jsx"],"sourcesContent":["import { __, _n, sprintf } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\n\nfunction DownloadableBlocksInserterPanel( {\n\tchildren,\n\tdownloadableItems,\n\thasLocalBlocks,\n} ) {\n\tconst count = downloadableItems.length;\n\tuseEffect( () => {\n\t\tspeak(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %d: number of available blocks. */\n\t\t\t\t_n(\n\t\t\t\t\t'%d additional block is available to install.',\n\t\t\t\t\t'%d additional blocks are available to install.',\n\t\t\t\t\tcount\n\t\t\t\t),\n\t\t\t\tcount\n\t\t\t)\n\t\t);\n\t}, [ count ] );\n\n\treturn (\n\t\t<>\n\t\t\t{ ! hasLocalBlocks && (\n\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__no-local\">\n\t\t\t\t\t{ __( 'No results available from your installed blocks.' ) }\n\t\t\t\t</p>\n\t\t\t) }\n\n\t\t\t<div className=\"block-editor-inserter__quick-inserter-separator\" />\n\n\t\t\t<div className=\"block-directory-downloadable-blocks-panel\">\n\t\t\t\t<div className=\"block-directory-downloadable-blocks-panel__header\">\n\t\t\t\t\t<h2 className=\"block-directory-downloadable-blocks-panel__title\">\n\t\t\t\t\t\t{ __( 'Available to install' ) }\n\t\t\t\t\t</h2>\n\t\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__description\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Select a block to install and add it to your post.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default DownloadableBlocksInserterPanel;\n"],"mappings":";;;;;AAIA,SAAS,gCAAiC,EACzC,UACA,mBACA,kBACG;CACH,MAAM,QAAQ,kBAAkB;CAChC,gBAAiB;EAChB,MACC,QAEC,GACC,gDACA,kDACA,KACD,GACA,KACD,CACD;CACD,GAAG,CAAE,KAAM,CAAE;CAEb,OACC,qBAAA,UAAA,EAAA,UAAA;EACG,CAAE,kBACH,oBAAC,KAAD;GAAG,WAAU;GACV,UAAA,GAAI,kDAAmD;EACvD,CAAA;EAGJ,oBAAC,OAAD,EAAK,WAAU,kDAAmD,CAAA;EAElE,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACC,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACC,oBAAC,MAAD;KAAI,WAAU;KACX,UAAA,GAAI,sBAAuB;IAC1B,CAAA,GACJ,oBAAC,KAAD;KAAG,WAAU;KACV,UAAA,GACD,oDACD;IACE,CAAA,CACC;GACH,CAAA,GAAA,QACE;;CACJ,EAAA,CAAA;AAEJ"}
1
+ {"version":3,"file":"inserter-panel.mjs","names":[],"sources":["../../../src/components/downloadable-blocks-panel/inserter-panel.jsx"],"sourcesContent":["import { __, _n, sprintf } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\n\nfunction DownloadableBlocksInserterPanel( {\n\tchildren,\n\tdownloadableItems,\n\thasLocalBlocks,\n} ) {\n\tconst count = downloadableItems.length;\n\tuseEffect( () => {\n\t\tspeak(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %d: number of available blocks. */\n\t\t\t\t_n(\n\t\t\t\t\t'%d additional block is available to install.',\n\t\t\t\t\t'%d additional blocks are available to install.',\n\t\t\t\t\tcount\n\t\t\t\t),\n\t\t\t\tcount\n\t\t\t)\n\t\t);\n\t}, [ count ] );\n\n\treturn (\n\t\t<>\n\t\t\t{ ! hasLocalBlocks && (\n\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__no-local\">\n\t\t\t\t\t{ __( 'No results available from your installed blocks.' ) }\n\t\t\t\t</p>\n\t\t\t) }\n\n\t\t\t<div className=\"block-editor-inserter__quick-inserter-separator\" />\n\n\t\t\t<div className=\"block-directory-downloadable-blocks-panel\">\n\t\t\t\t<div className=\"block-directory-downloadable-blocks-panel__header\">\n\t\t\t\t\t<h2 className=\"block-directory-downloadable-blocks-panel__title\">\n\t\t\t\t\t\t{ __( 'Available to install' ) }\n\t\t\t\t\t</h2>\n\t\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__description\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Select a block to install and add it to your post.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default DownloadableBlocksInserterPanel;\n"],"mappings":";;;;;AAIA,SAAS,gCAAiC,EACzC,UACA,mBACA,kBACG;CACH,MAAM,QAAQ,kBAAkB;CAChC,gBAAiB;EAChB,MACC;;GAEC,GACC,gDACA,kDACA,KACD;GACA;EACD,CACD;CACD,GAAG,CAAE,KAAM,CAAE;CAEb,OACC,qBAAA,UAAA,EAAA,UAAA;EACG,CAAE,kBACH,oBAAC,KAAD;GAAG,WAAU;GACV,UAAA,GAAI,kDAAmD;EACvD,CAAA;EAGJ,oBAAC,OAAD,EAAK,WAAU,kDAAmD,CAAA;EAElE,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACC,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACC,oBAAC,MAAD;KAAI,WAAU;KACX,UAAA,GAAI,sBAAuB;IAC1B,CAAA,GACJ,oBAAC,KAAD;KAAG,WAAU;KACV,UAAA,GACD,oDACD;IACE,CAAA,CACC;GACH,CAAA,GAAA,QACE;;CACJ,EAAA,CAAA;AAEJ"}
@@ -36,14 +36,22 @@ const ModifiedWarning = ({ originalBlock, ...props }) => {
36
36
  const { canInsertBlockType, getBlockRootClientId } = select(store$1);
37
37
  return canInsertBlockType("core/html", getBlockRootClientId(clientId));
38
38
  }, [clientId]);
39
- let messageHTML = sprintf(__("Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely."), originalBlock.title || originalName);
39
+ let messageHTML = sprintf(
40
+ /** translators: %s: block name */
41
+ __("Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely."),
42
+ originalBlock.title || originalName
43
+ );
40
44
  const actions = [/* @__PURE__ */ jsx(InstallButton, {
41
45
  block: originalBlock,
42
46
  attributes: props.attributes,
43
47
  clientId: props.clientId
44
48
  }, "install")];
45
49
  if (hasContent && hasHTMLBlock) {
46
- messageHTML = sprintf(__("Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely."), originalBlock.title || originalName);
50
+ messageHTML = sprintf(
51
+ /** translators: %s: block name */
52
+ __("Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely."),
53
+ originalBlock.title || originalName
54
+ );
47
55
  actions.push(/* @__PURE__ */ jsx(Button, {
48
56
  __next40pxDefaultSize: true,
49
57
  onClick: convertToHTML,
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["blockDirectoryStore","coreStore","blockEditorStore"],"sources":["../../../src/plugins/get-install-missing/index.jsx"],"sourcesContent":["import { __, sprintf } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { createBlock } from '@wordpress/blocks';\nimport { RawHTML } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tWarning,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport InstallButton from './install-button';\nimport { store as blockDirectoryStore } from '../../store';\n\nconst getInstallMissing = ( OriginalComponent ) => ( props ) => {\n\tconst { originalName } = props.attributes;\n\tconst { block, hasPermission } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getDownloadableBlocks } = select( blockDirectoryStore );\n\t\t\tconst blocks = getDownloadableBlocks(\n\t\t\t\t'block:' + originalName\n\t\t\t).filter( ( { name } ) => originalName === name );\n\t\t\treturn {\n\t\t\t\thasPermission: select( coreStore ).canUser(\n\t\t\t\t\t'read',\n\t\t\t\t\t'block-directory/search'\n\t\t\t\t),\n\t\t\t\tblock: blocks.length && blocks[ 0 ],\n\t\t\t};\n\t\t},\n\t\t[ originalName ]\n\t);\n\n\t// The user can't install blocks, or the block isn't available for download.\n\tif ( ! hasPermission || ! block ) {\n\t\treturn <OriginalComponent { ...props } />;\n\t}\n\n\treturn <ModifiedWarning { ...props } originalBlock={ block } />;\n};\n\nconst ModifiedWarning = ( { originalBlock, ...props } ) => {\n\tconst { originalName, originalUndelimitedContent, clientId } =\n\t\tprops.attributes;\n\tconst { replaceBlock } = useDispatch( blockEditorStore );\n\tconst convertToHTML = () => {\n\t\treplaceBlock(\n\t\t\tprops.clientId,\n\t\t\tcreateBlock( 'core/html', {}, [], [ originalUndelimitedContent ] )\n\t\t);\n\t};\n\n\tconst hasContent = !! originalUndelimitedContent;\n\tconst hasHTMLBlock = useSelect(\n\t\t( select ) => {\n\t\t\tconst { canInsertBlockType, getBlockRootClientId } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\treturn canInsertBlockType(\n\t\t\t\t'core/html',\n\t\t\t\tgetBlockRootClientId( clientId )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tlet messageHTML = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__(\n\t\t\t'Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely.'\n\t\t),\n\t\toriginalBlock.title || originalName\n\t);\n\tconst actions = [\n\t\t<InstallButton\n\t\t\tkey=\"install\"\n\t\t\tblock={ originalBlock }\n\t\t\tattributes={ props.attributes }\n\t\t\tclientId={ props.clientId }\n\t\t/>,\n\t];\n\n\tif ( hasContent && hasHTMLBlock ) {\n\t\tmessageHTML = sprintf(\n\t\t\t/* translators: %s: block name */\n\t\t\t__(\n\t\t\t\t'Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely.'\n\t\t\t),\n\t\t\toriginalBlock.title || originalName\n\t\t);\n\t\tactions.push(\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tkey=\"convert\"\n\t\t\t\tonClick={ convertToHTML }\n\t\t\t\tvariant=\"tertiary\"\n\t\t\t>\n\t\t\t\t{ __( 'Keep as HTML' ) }\n\t\t\t</Button>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div { ...useBlockProps() }>\n\t\t\t<Warning actions={ actions }>{ messageHTML }</Warning>\n\t\t\t<RawHTML>{ originalUndelimitedContent }</RawHTML>\n\t\t</div>\n\t);\n};\n\nexport default getInstallMissing;\n"],"mappings":";;;;;;;;;;;AAcA,MAAM,qBAAsB,uBAAyB,UAAW;CAC/D,MAAM,EAAE,iBAAiB,MAAM;CAC/B,MAAM,EAAE,OAAO,kBAAkB,WAC9B,WAAY;EACb,MAAM,EAAE,0BAA0B,OAAQA,OAAoB;EAC9D,MAAM,SAAS,sBACd,WAAW,YACZ,CAAC,CAAC,QAAU,EAAE,WAAY,iBAAiB,IAAK;EAChD,OAAO;GACN,eAAe,OAAQC,KAAU,CAAC,CAAC,QAClC,QACA,wBACD;GACA,OAAO,OAAO,UAAU,OAAQ;EACjC;CACD,GACA,CAAE,YAAa,CAChB;CAGA,IAAK,CAAE,iBAAiB,CAAE,OACzB,OAAO,oBAAC,mBAAD,EAAmB,GAAK,MAAS,CAAA;CAGzC,OAAO,oBAAC,iBAAD;EAAiB,GAAK;EAAQ,eAAgB;CAAS,CAAA;AAC/D;AAEA,MAAM,mBAAoB,EAAE,eAAe,GAAG,YAAa;CAC1D,MAAM,EAAE,cAAc,4BAA4B,aACjD,MAAM;CACP,MAAM,EAAE,iBAAiB,YAAaC,OAAiB;CACvD,MAAM,sBAAsB;EAC3B,aACC,MAAM,UACN,YAAa,aAAa,CAAC,GAAG,CAAC,GAAG,CAAE,0BAA2B,CAAE,CAClE;CACD;CAEA,MAAM,aAAa,CAAC,CAAE;CACtB,MAAM,eAAe,WAClB,WAAY;EACb,MAAM,EAAE,oBAAoB,yBAC3B,OAAQA,OAAiB;EAE1B,OAAO,mBACN,aACA,qBAAsB,QAAS,CAChC;CACD,GACA,CAAE,QAAS,CACZ;CAEA,IAAI,cAAc,QAEjB,GACC,6GACD,GACA,cAAc,SAAS,YACxB;CACA,MAAM,UAAU,CACf,oBAAC,eAAD;EAEC,OAAQ;EACR,YAAa,MAAM;EACnB,UAAW,MAAM;CACjB,GAJI,SAIJ,CACF;CAEA,IAAK,cAAc,cAAe;EACjC,cAAc,QAEb,GACC,iJACD,GACA,cAAc,SAAS,YACxB;EACA,QAAQ,KACP,oBAAC,QAAD;GACC,uBAAA;GAEA,SAAU;GACV,SAAQ;GAEN,UAAA,GAAI,cAAe;EACd,GALH,SAKG,CACT;CACD;CAEA,OACC,qBAAC,OAAD;EAAK,GAAK,cAAc;EAAxB,UAAA,CACC,oBAAC,SAAD;GAAmB;GAAY,UAAA;EAAsB,CAAA,GACrD,oBAAC,SAAD,EAAA,UAAW,2BAAqC,CAAA,CAC5C;;AAEP"}
1
+ {"version":3,"file":"index.mjs","names":["blockDirectoryStore","coreStore","blockEditorStore"],"sources":["../../../src/plugins/get-install-missing/index.jsx"],"sourcesContent":["import { __, sprintf } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { createBlock } from '@wordpress/blocks';\nimport { RawHTML } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tWarning,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport InstallButton from './install-button';\nimport { store as blockDirectoryStore } from '../../store';\n\nconst getInstallMissing = ( OriginalComponent ) => ( props ) => {\n\tconst { originalName } = props.attributes;\n\tconst { block, hasPermission } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getDownloadableBlocks } = select( blockDirectoryStore );\n\t\t\tconst blocks = getDownloadableBlocks(\n\t\t\t\t'block:' + originalName\n\t\t\t).filter( ( { name } ) => originalName === name );\n\t\t\treturn {\n\t\t\t\thasPermission: select( coreStore ).canUser(\n\t\t\t\t\t'read',\n\t\t\t\t\t'block-directory/search'\n\t\t\t\t),\n\t\t\t\tblock: blocks.length && blocks[ 0 ],\n\t\t\t};\n\t\t},\n\t\t[ originalName ]\n\t);\n\n\t// The user can't install blocks, or the block isn't available for download.\n\tif ( ! hasPermission || ! block ) {\n\t\treturn <OriginalComponent { ...props } />;\n\t}\n\n\treturn <ModifiedWarning { ...props } originalBlock={ block } />;\n};\n\nconst ModifiedWarning = ( { originalBlock, ...props } ) => {\n\tconst { originalName, originalUndelimitedContent, clientId } =\n\t\tprops.attributes;\n\tconst { replaceBlock } = useDispatch( blockEditorStore );\n\tconst convertToHTML = () => {\n\t\treplaceBlock(\n\t\t\tprops.clientId,\n\t\t\tcreateBlock( 'core/html', {}, [], [ originalUndelimitedContent ] )\n\t\t);\n\t};\n\n\tconst hasContent = !! originalUndelimitedContent;\n\tconst hasHTMLBlock = useSelect(\n\t\t( select ) => {\n\t\t\tconst { canInsertBlockType, getBlockRootClientId } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\treturn canInsertBlockType(\n\t\t\t\t'core/html',\n\t\t\t\tgetBlockRootClientId( clientId )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tlet messageHTML = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__(\n\t\t\t'Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely.'\n\t\t),\n\t\toriginalBlock.title || originalName\n\t);\n\tconst actions = [\n\t\t<InstallButton\n\t\t\tkey=\"install\"\n\t\t\tblock={ originalBlock }\n\t\t\tattributes={ props.attributes }\n\t\t\tclientId={ props.clientId }\n\t\t/>,\n\t];\n\n\tif ( hasContent && hasHTMLBlock ) {\n\t\tmessageHTML = sprintf(\n\t\t\t/* translators: %s: block name */\n\t\t\t__(\n\t\t\t\t'Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely.'\n\t\t\t),\n\t\t\toriginalBlock.title || originalName\n\t\t);\n\t\tactions.push(\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tkey=\"convert\"\n\t\t\t\tonClick={ convertToHTML }\n\t\t\t\tvariant=\"tertiary\"\n\t\t\t>\n\t\t\t\t{ __( 'Keep as HTML' ) }\n\t\t\t</Button>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div { ...useBlockProps() }>\n\t\t\t<Warning actions={ actions }>{ messageHTML }</Warning>\n\t\t\t<RawHTML>{ originalUndelimitedContent }</RawHTML>\n\t\t</div>\n\t);\n};\n\nexport default getInstallMissing;\n"],"mappings":";;;;;;;;;;;AAcA,MAAM,qBAAsB,uBAAyB,UAAW;CAC/D,MAAM,EAAE,iBAAiB,MAAM;CAC/B,MAAM,EAAE,OAAO,kBAAkB,WAC9B,WAAY;EACb,MAAM,EAAE,0BAA0B,OAAQA,OAAoB;EAC9D,MAAM,SAAS,sBACd,WAAW,YACZ,CAAC,CAAC,QAAU,EAAE,WAAY,iBAAiB,IAAK;EAChD,OAAO;GACN,eAAe,OAAQC,KAAU,CAAC,CAAC,QAClC,QACA,wBACD;GACA,OAAO,OAAO,UAAU,OAAQ;EACjC;CACD,GACA,CAAE,YAAa,CAChB;CAGA,IAAK,CAAE,iBAAiB,CAAE,OACzB,OAAO,oBAAC,mBAAD,EAAmB,GAAK,MAAS,CAAA;CAGzC,OAAO,oBAAC,iBAAD;EAAiB,GAAK;EAAQ,eAAgB;CAAS,CAAA;AAC/D;AAEA,MAAM,mBAAoB,EAAE,eAAe,GAAG,YAAa;CAC1D,MAAM,EAAE,cAAc,4BAA4B,aACjD,MAAM;CACP,MAAM,EAAE,iBAAiB,YAAaC,OAAiB;CACvD,MAAM,sBAAsB;EAC3B,aACC,MAAM,UACN,YAAa,aAAa,CAAC,GAAG,CAAC,GAAG,CAAE,0BAA2B,CAAE,CAClE;CACD;CAEA,MAAM,aAAa,CAAC,CAAE;CACtB,MAAM,eAAe,WAClB,WAAY;EACb,MAAM,EAAE,oBAAoB,yBAC3B,OAAQA,OAAiB;EAE1B,OAAO,mBACN,aACA,qBAAsB,QAAS,CAChC;CACD,GACA,CAAE,QAAS,CACZ;CAEA,IAAI,cAAc;;EAEjB,GACC,6GACD;EACA,cAAc,SAAS;CACxB;CACA,MAAM,UAAU,CACf,oBAAC,eAAD;EAEC,OAAQ;EACR,YAAa,MAAM;EACnB,UAAW,MAAM;CACjB,GAJI,SAIJ,CACF;CAEA,IAAK,cAAc,cAAe;EACjC,cAAc;;GAEb,GACC,iJACD;GACA,cAAc,SAAS;EACxB;EACA,QAAQ,KACP,oBAAC,QAAD;GACC,uBAAA;GAEA,SAAU;GACV,SAAQ;GAEN,UAAA,GAAI,cAAe;EACd,GALH,SAKG,CACT;CACD;CAEA,OACC,qBAAC,OAAD;EAAK,GAAK,cAAc;EAAxB,UAAA,CACC,oBAAC,SAAD;GAAmB;GAAY,UAAA;EAAsB,CAAA,GACrD,oBAAC,SAAD,EAAA,UAAW,2BAAqC,CAAA,CAC5C;;AAEP"}
@@ -23,7 +23,11 @@ function InstallButton({ attributes, block, clientId }) {
23
23
  disabled: isInstallingBlock,
24
24
  isBusy: isInstallingBlock,
25
25
  variant: "primary",
26
- children: sprintf(__("Install %s"), block.title)
26
+ children: sprintf(
27
+ /** translators: %s: block name */
28
+ __("Install %s"),
29
+ block.title
30
+ )
27
31
  });
28
32
  }
29
33
  export { InstallButton as default };
@@ -1 +1 @@
1
- {"version":3,"file":"install-button.mjs","names":["blockDirectoryStore","blockEditorStore"],"sources":["../../../src/plugins/get-install-missing/install-button.jsx"],"sourcesContent":["import { __, sprintf } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { createBlock, getBlockType, parse } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as blockDirectoryStore } from '../../store';\n\nexport default function InstallButton( { attributes, block, clientId } ) {\n\tconst isInstallingBlock = useSelect(\n\t\t( select ) => select( blockDirectoryStore ).isInstalling( block.id ),\n\t\t[ block.id ]\n\t);\n\tconst { installBlockType } = useDispatch( blockDirectoryStore );\n\tconst { replaceBlock } = useDispatch( blockEditorStore );\n\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\tonClick={ () =>\n\t\t\t\tinstallBlockType( block ).then( ( success ) => {\n\t\t\t\t\tif ( success ) {\n\t\t\t\t\t\tconst blockType = getBlockType( block.name );\n\t\t\t\t\t\tconst [ originalBlock ] = parse(\n\t\t\t\t\t\t\tattributes.originalContent\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( originalBlock && blockType ) {\n\t\t\t\t\t\t\treplaceBlock(\n\t\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\t\tcreateBlock(\n\t\t\t\t\t\t\t\t\tblockType.name,\n\t\t\t\t\t\t\t\t\toriginalBlock.attributes,\n\t\t\t\t\t\t\t\t\toriginalBlock.innerBlocks\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t}\n\t\t\taccessibleWhenDisabled\n\t\t\tdisabled={ isInstallingBlock }\n\t\t\tisBusy={ isInstallingBlock }\n\t\t\tvariant=\"primary\"\n\t\t>\n\t\t\t{ sprintf(\n\t\t\t\t/* translators: %s: block name */\n\t\t\t\t__( 'Install %s' ),\n\t\t\t\tblock.title\n\t\t\t) }\n\t\t</Button>\n\t);\n}\n"],"mappings":";;;;;;;;AAOA,SAAwB,cAAe,EAAE,YAAY,OAAO,YAAa;CACxE,MAAM,oBAAoB,WACvB,WAAY,OAAQA,OAAoB,CAAC,CAAC,aAAc,MAAM,EAAG,GACnE,CAAE,MAAM,EAAG,CACZ;CACA,MAAM,EAAE,qBAAqB,YAAaA,OAAoB;CAC9D,MAAM,EAAE,iBAAiB,YAAaC,KAAiB;CAEvD,OACC,oBAAC,QAAD;EACC,uBAAA;EACA,eACC,iBAAkB,KAAM,CAAC,CAAC,MAAQ,YAAa;GAC9C,IAAK,SAAU;IACd,MAAM,YAAY,aAAc,MAAM,IAAK;IAC3C,MAAM,CAAE,iBAAkB,MACzB,WAAW,eACZ;IACA,IAAK,iBAAiB,WACrB,aACC,UACA,YACC,UAAU,MACV,cAAc,YACd,cAAc,WACf,CACD;GAEF;EACD,CAAE;EAEH,wBAAA;EACA,UAAW;EACX,QAAS;EACT,SAAQ;EAEN,UAAA,QAED,GAAI,YAAa,GACjB,MAAM,KACP;CACO,CAAA;AAEV"}
1
+ {"version":3,"file":"install-button.mjs","names":["blockDirectoryStore","blockEditorStore"],"sources":["../../../src/plugins/get-install-missing/install-button.jsx"],"sourcesContent":["import { __, sprintf } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { createBlock, getBlockType, parse } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as blockDirectoryStore } from '../../store';\n\nexport default function InstallButton( { attributes, block, clientId } ) {\n\tconst isInstallingBlock = useSelect(\n\t\t( select ) => select( blockDirectoryStore ).isInstalling( block.id ),\n\t\t[ block.id ]\n\t);\n\tconst { installBlockType } = useDispatch( blockDirectoryStore );\n\tconst { replaceBlock } = useDispatch( blockEditorStore );\n\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\tonClick={ () =>\n\t\t\t\tinstallBlockType( block ).then( ( success ) => {\n\t\t\t\t\tif ( success ) {\n\t\t\t\t\t\tconst blockType = getBlockType( block.name );\n\t\t\t\t\t\tconst [ originalBlock ] = parse(\n\t\t\t\t\t\t\tattributes.originalContent\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif ( originalBlock && blockType ) {\n\t\t\t\t\t\t\treplaceBlock(\n\t\t\t\t\t\t\t\tclientId,\n\t\t\t\t\t\t\t\tcreateBlock(\n\t\t\t\t\t\t\t\t\tblockType.name,\n\t\t\t\t\t\t\t\t\toriginalBlock.attributes,\n\t\t\t\t\t\t\t\t\toriginalBlock.innerBlocks\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t}\n\t\t\taccessibleWhenDisabled\n\t\t\tdisabled={ isInstallingBlock }\n\t\t\tisBusy={ isInstallingBlock }\n\t\t\tvariant=\"primary\"\n\t\t>\n\t\t\t{ sprintf(\n\t\t\t\t/* translators: %s: block name */\n\t\t\t\t__( 'Install %s' ),\n\t\t\t\tblock.title\n\t\t\t) }\n\t\t</Button>\n\t);\n}\n"],"mappings":";;;;;;;;AAOA,SAAwB,cAAe,EAAE,YAAY,OAAO,YAAa;CACxE,MAAM,oBAAoB,WACvB,WAAY,OAAQA,OAAoB,CAAC,CAAC,aAAc,MAAM,EAAG,GACnE,CAAE,MAAM,EAAG,CACZ;CACA,MAAM,EAAE,qBAAqB,YAAaA,OAAoB;CAC9D,MAAM,EAAE,iBAAiB,YAAaC,KAAiB;CAEvD,OACC,oBAAC,QAAD;EACC,uBAAA;EACA,eACC,iBAAkB,KAAM,CAAC,CAAC,MAAQ,YAAa;GAC9C,IAAK,SAAU;IACd,MAAM,YAAY,aAAc,MAAM,IAAK;IAC3C,MAAM,CAAE,iBAAkB,MACzB,WAAW,eACZ;IACA,IAAK,iBAAiB,WACrB,aACC,UACA,YACC,UAAU,MACV,cAAc,YACd,cAAc,WACf,CACD;GAEF;EACD,CAAE;EAEH,wBAAA;EACA,UAAW;EACX,QAAS;EACT,SAAQ;EAEN,UAAA;;GAED,GAAI,YAAa;GACjB,MAAM;EACP;CACO,CAAA;AAEV"}
@@ -1,4 +1,4 @@
1
- import { _n, sprintf } from "@wordpress/i18n";
1
+ import { __, _n, sprintf } from "@wordpress/i18n";
2
2
  import { useSelect } from "@wordpress/data";
3
3
  import { PluginPrePublishPanel } from "@wordpress/editor";
4
4
  import CompactList from "../../components/compact-list/index.mjs";
@@ -9,11 +9,15 @@ function InstalledBlocksPrePublishPanel() {
9
9
  const newBlockTypes = useSelect((select) => select(store).getNewBlockTypes(), []);
10
10
  if (!newBlockTypes.length) return null;
11
11
  return /* @__PURE__ */ jsxs(PluginPrePublishPanel, {
12
- title: sprintf(_n("Added: %d block", "Added: %d blocks", newBlockTypes.length), newBlockTypes.length),
12
+ title: sprintf(
13
+ /** translators: %d: number of blocks (number). */
14
+ _n("Added: %d block", "Added: %d blocks", newBlockTypes.length),
15
+ newBlockTypes.length
16
+ ),
13
17
  initialOpen: true,
14
18
  children: [/* @__PURE__ */ jsx("p", {
15
19
  className: "installed-blocks-pre-publish-panel__copy",
16
- children: _n("The following block has been added to your site.", "The following blocks have been added to your site.", newBlockTypes.length)
20
+ children: newBlockTypes.length === 1 ? __("The following block has been added to your site.") : __("The following blocks have been added to your site.")
17
21
  }), /* @__PURE__ */ jsx(CompactList, { items: newBlockTypes })]
18
22
  });
19
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["blockDirectoryStore"],"sources":["../../../src/plugins/installed-blocks-pre-publish-panel/index.jsx"],"sourcesContent":["import { _n, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { PluginPrePublishPanel } from '@wordpress/editor';\nimport CompactList from '../../components/compact-list';\nimport { store as blockDirectoryStore } from '../../store';\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\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":";;;;;;;AAMA,SAAwB,iCAAiC;CACxD,MAAM,gBAAgB,WACnB,WAAY,OAAQA,KAAoB,CAAC,CAAC,iBAAiB,GAC7D,CAAC,CACF;CAEA,IAAK,CAAE,cAAc,QACpB,OAAO;CAGR,OACC,qBAAC,uBAAD;EACC,OAAQ,QAEP,GACC,mBACA,oBACA,cAAc,MACf,GACA,cAAc,MACf;EACA,aAAA;EAVD,UAAA,CAYC,oBAAC,KAAD;GAAG,WAAU;GACV,UAAA,GACD,oDACA,sDACA,cAAc,MACf;EACE,CAAA,GACH,oBAAC,aAAD,EAAa,OAAQ,cAAiB,CAAA,CAChB;;AAEzB"}
1
+ {"version":3,"file":"index.mjs","names":["blockDirectoryStore"],"sources":["../../../src/plugins/installed-blocks-pre-publish-panel/index.jsx"],"sourcesContent":["import { __, _n, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { PluginPrePublishPanel } from '@wordpress/editor';\nimport CompactList from '../../components/compact-list';\nimport { store as blockDirectoryStore } from '../../store';\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\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{ newBlockTypes.length === 1\n\t\t\t\t\t? __( 'The following block has been added to your site.' )\n\t\t\t\t\t: __(\n\t\t\t\t\t\t\t'The following blocks have been added to your site.'\n\t\t\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":";;;;;;;AAMA,SAAwB,iCAAiC;CACxD,MAAM,gBAAgB,WACnB,WAAY,OAAQA,KAAoB,CAAC,CAAC,iBAAiB,GAC7D,CAAC,CACF;CAEA,IAAK,CAAE,cAAc,QACpB,OAAO;CAGR,OACC,qBAAC,uBAAD;EACC,OAAQ;;GAEP,GACC,mBACA,oBACA,cAAc,MACf;GACA,cAAc;EACf;EACA,aAAA;EAVD,UAAA,CAYC,oBAAC,KAAD;GAAG,WAAU;GACV,UAAA,cAAc,WAAW,IACxB,GAAI,kDAAmD,IACvD,GACA,oDACD;EACA,CAAA,GACH,oBAAC,aAAD,EAAa,OAAQ,cAAiB,CAAA,CAChB;;AAEzB"}
@@ -97,7 +97,11 @@ const installBlockType = (block) => async ({ registry, dispatch }) => {
97
97
  });
98
98
  await loadAssets();
99
99
  if (!registry.select(store).getBlockTypes().some((i) => i.name === name)) throw new Error(__("Error registering block. Try reloading the page."));
100
- registry.dispatch(store$1).createInfoNotice(sprintf(__("Block %s installed and added."), block.title), {
100
+ registry.dispatch(store$1).createInfoNotice(sprintf(
101
+ /** translators: %s is the block title. */
102
+ __("Block %s installed and added."),
103
+ block.title
104
+ ), {
101
105
  speak: true,
102
106
  type: "snackbar"
103
107
  });
@@ -1 +1 @@
1
- {"version":3,"file":"actions.mjs","names":["blocksStore","noticesStore"],"sources":["../../src/store/actions.js"],"sourcesContent":["import {\n\tstore as blocksStore,\n\tunstable__bootstrapServerSideBlockDefinitions, // eslint-disable-line camelcase\n} from '@wordpress/blocks';\nimport { __, sprintf } from '@wordpress/i18n';\nimport apiFetch from '@wordpress/api-fetch';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { addQueryArgs } from '@wordpress/url';\nimport { loadAssets } from './load-assets';\nimport getPluginUrl from './utils/get-plugin-url';\n\n/**\n * Returns an action object used in signalling that the downloadable blocks\n * have been requested and are loading.\n *\n * @param {string} filterValue Search string.\n *\n * @return {Object} Action object.\n */\nexport function fetchDownloadableBlocks( filterValue ) {\n\treturn { type: 'FETCH_DOWNLOADABLE_BLOCKS', filterValue };\n}\n\n/**\n * Returns an action object used in signalling that the downloadable blocks\n * have been updated.\n *\n * @param {Array} downloadableBlocks Downloadable blocks.\n * @param {string} filterValue Search string.\n *\n * @return {Object} Action object.\n */\nexport function receiveDownloadableBlocks( downloadableBlocks, filterValue ) {\n\treturn {\n\t\ttype: 'RECEIVE_DOWNLOADABLE_BLOCKS',\n\t\tdownloadableBlocks,\n\t\tfilterValue,\n\t};\n}\n\n/**\n * Action triggered to install a block plugin.\n *\n * @param {Object} block The block item returned by search.\n *\n * @return {boolean} Whether the block was successfully installed & loaded.\n */\nexport const installBlockType =\n\t( block ) =>\n\tasync ( { registry, dispatch } ) => {\n\t\tconst { id, name } = block;\n\t\tlet success = false;\n\t\tdispatch.clearErrorNotice( id );\n\t\ttry {\n\t\t\tdispatch.setIsInstalling( id, true );\n\n\t\t\t// If we have a wp:plugin link, the plugin is installed but inactive.\n\t\t\tconst url = getPluginUrl( block );\n\t\t\tlet links = {};\n\t\t\tif ( url ) {\n\t\t\t\tawait apiFetch( {\n\t\t\t\t\tmethod: 'PUT',\n\t\t\t\t\turl,\n\t\t\t\t\tdata: { status: 'active' },\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tconst response = await apiFetch( {\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\tpath: 'wp/v2/plugins',\n\t\t\t\t\tdata: { slug: id, status: 'active' },\n\t\t\t\t} );\n\t\t\t\t// Add the `self` link for newly-installed blocks.\n\t\t\t\tlinks = response._links;\n\t\t\t}\n\n\t\t\tdispatch.addInstalledBlockType( {\n\t\t\t\t...block,\n\t\t\t\tlinks: { ...block.links, ...links },\n\t\t\t} );\n\n\t\t\t// Ensures that the block metadata is propagated to the editor when registered on the server.\n\t\t\tconst metadataFields = [\n\t\t\t\t'api_version',\n\t\t\t\t'title',\n\t\t\t\t'category',\n\t\t\t\t'parent',\n\t\t\t\t'ancestor',\n\t\t\t\t'icon',\n\t\t\t\t'description',\n\t\t\t\t'keywords',\n\t\t\t\t'attributes',\n\t\t\t\t'provides_context',\n\t\t\t\t'uses_context',\n\t\t\t\t'selectors',\n\t\t\t\t'supports',\n\t\t\t\t'styles',\n\t\t\t\t'example',\n\t\t\t\t'variations',\n\t\t\t\t'allowed_blocks',\n\t\t\t\t'block_hooks',\n\t\t\t];\n\t\t\tawait apiFetch( {\n\t\t\t\tpath: addQueryArgs( `/wp/v2/block-types/${ name }`, {\n\t\t\t\t\t_fields: metadataFields,\n\t\t\t\t} ),\n\t\t\t} )\n\t\t\t\t// Ignore when the block is not registered on the server.\n\t\t\t\t.catch( () => {} )\n\t\t\t\t.then( ( response ) => {\n\t\t\t\t\tif ( ! response ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tunstable__bootstrapServerSideBlockDefinitions( {\n\t\t\t\t\t\t[ name ]: Object.fromEntries(\n\t\t\t\t\t\t\tObject.entries( response ).filter( ( [ key ] ) =>\n\t\t\t\t\t\t\t\tmetadataFields.includes( key )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t} );\n\t\t\t\t} );\n\n\t\t\tawait loadAssets();\n\t\t\tconst registeredBlocks = registry\n\t\t\t\t.select( blocksStore )\n\t\t\t\t.getBlockTypes();\n\t\t\tif ( ! registeredBlocks.some( ( i ) => i.name === name ) ) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t__( 'Error registering block. Try reloading the page.' )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tregistry.dispatch( noticesStore ).createInfoNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s is the block title.\n\t\t\t\t\t__( 'Block %s installed and added.' ),\n\t\t\t\t\tblock.title\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\tspeak: true,\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t\tsuccess = true;\n\t\t} catch ( error ) {\n\t\t\tlet message = error.message || __( 'An error occurred.' );\n\n\t\t\t// Errors we throw are fatal.\n\t\t\tlet isFatal = error instanceof Error;\n\n\t\t\t// Specific API errors that are fatal.\n\t\t\tconst fatalAPIErrors = {\n\t\t\t\tfolder_exists: __(\n\t\t\t\t\t'This block is already installed. Try reloading the page.'\n\t\t\t\t),\n\t\t\t\tunable_to_connect_to_filesystem: __(\n\t\t\t\t\t'Error installing block. You can reload the page and try again.'\n\t\t\t\t),\n\t\t\t};\n\n\t\t\tif ( fatalAPIErrors[ error.code ] ) {\n\t\t\t\tisFatal = true;\n\t\t\t\tmessage = fatalAPIErrors[ error.code ];\n\t\t\t}\n\n\t\t\tdispatch.setErrorNotice( id, message, isFatal );\n\t\t\tregistry.dispatch( noticesStore ).createErrorNotice( message, {\n\t\t\t\tspeak: true,\n\t\t\t\tisDismissible: true,\n\t\t\t} );\n\t\t}\n\t\tdispatch.setIsInstalling( id, false );\n\t\treturn success;\n\t};\n\n/**\n * Action triggered to uninstall a block plugin.\n *\n * @param {Object} block The blockType object.\n */\nexport const uninstallBlockType =\n\t( block ) =>\n\tasync ( { registry, dispatch } ) => {\n\t\ttry {\n\t\t\tconst url = getPluginUrl( block );\n\t\t\tawait apiFetch( {\n\t\t\t\tmethod: 'PUT',\n\t\t\t\turl,\n\t\t\t\tdata: { status: 'inactive' },\n\t\t\t} );\n\t\t\tawait apiFetch( {\n\t\t\t\tmethod: 'DELETE',\n\t\t\t\turl,\n\t\t\t} );\n\t\t\tdispatch.removeInstalledBlockType( block );\n\t\t} catch ( error ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice(\n\t\t\t\t\terror.message || __( 'An error occurred.' )\n\t\t\t\t);\n\t\t}\n\t};\n\n/**\n * Returns an action object used to add a block type to the \"newly installed\"\n * tracking list.\n *\n * @param {Object} item The block item with the block id and name.\n *\n * @return {Object} Action object.\n */\nexport function addInstalledBlockType( item ) {\n\treturn {\n\t\ttype: 'ADD_INSTALLED_BLOCK_TYPE',\n\t\titem,\n\t};\n}\n\n/**\n * Returns an action object used to remove a block type from the \"newly installed\"\n * tracking list.\n *\n * @param {string} item The block item with the block id and name.\n *\n * @return {Object} Action object.\n */\nexport function removeInstalledBlockType( item ) {\n\treturn {\n\t\ttype: 'REMOVE_INSTALLED_BLOCK_TYPE',\n\t\titem,\n\t};\n}\n\n/**\n * Returns an action object used to indicate install in progress.\n *\n * @param {string} blockId\n * @param {boolean} isInstalling\n *\n * @return {Object} Action object.\n */\nexport function setIsInstalling( blockId, isInstalling ) {\n\treturn {\n\t\ttype: 'SET_INSTALLING_BLOCK',\n\t\tblockId,\n\t\tisInstalling,\n\t};\n}\n\n/**\n * Sets an error notice to be displayed to the user for a given block.\n *\n * @param {string} blockId The ID of the block plugin. eg: my-block\n * @param {string} message The message shown in the notice.\n * @param {boolean} isFatal Whether the user can recover from the error.\n *\n * @return {Object} Action object.\n */\nexport function setErrorNotice( blockId, message, isFatal = false ) {\n\treturn {\n\t\ttype: 'SET_ERROR_NOTICE',\n\t\tblockId,\n\t\tmessage,\n\t\tisFatal,\n\t};\n}\n\n/**\n * Sets the error notice to empty for specific block.\n *\n * @param {string} blockId The ID of the block plugin. eg: my-block\n *\n * @return {Object} Action object.\n */\nexport function clearErrorNotice( blockId ) {\n\treturn {\n\t\ttype: 'CLEAR_ERROR_NOTICE',\n\t\tblockId,\n\t};\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"actions.mjs","names":["blocksStore","noticesStore"],"sources":["../../src/store/actions.js"],"sourcesContent":["import {\n\tstore as blocksStore,\n\tunstable__bootstrapServerSideBlockDefinitions, // eslint-disable-line camelcase\n} from '@wordpress/blocks';\nimport { __, sprintf } from '@wordpress/i18n';\nimport apiFetch from '@wordpress/api-fetch';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { addQueryArgs } from '@wordpress/url';\nimport { loadAssets } from './load-assets';\nimport getPluginUrl from './utils/get-plugin-url';\n\n/**\n * Returns an action object used in signalling that the downloadable blocks\n * have been requested and are loading.\n *\n * @param {string} filterValue Search string.\n *\n * @return {Object} Action object.\n */\nexport function fetchDownloadableBlocks( filterValue ) {\n\treturn { type: 'FETCH_DOWNLOADABLE_BLOCKS', filterValue };\n}\n\n/**\n * Returns an action object used in signalling that the downloadable blocks\n * have been updated.\n *\n * @param {Array} downloadableBlocks Downloadable blocks.\n * @param {string} filterValue Search string.\n *\n * @return {Object} Action object.\n */\nexport function receiveDownloadableBlocks( downloadableBlocks, filterValue ) {\n\treturn {\n\t\ttype: 'RECEIVE_DOWNLOADABLE_BLOCKS',\n\t\tdownloadableBlocks,\n\t\tfilterValue,\n\t};\n}\n\n/**\n * Action triggered to install a block plugin.\n *\n * @param {Object} block The block item returned by search.\n *\n * @return {boolean} Whether the block was successfully installed & loaded.\n */\nexport const installBlockType =\n\t( block ) =>\n\tasync ( { registry, dispatch } ) => {\n\t\tconst { id, name } = block;\n\t\tlet success = false;\n\t\tdispatch.clearErrorNotice( id );\n\t\ttry {\n\t\t\tdispatch.setIsInstalling( id, true );\n\n\t\t\t// If we have a wp:plugin link, the plugin is installed but inactive.\n\t\t\tconst url = getPluginUrl( block );\n\t\t\tlet links = {};\n\t\t\tif ( url ) {\n\t\t\t\tawait apiFetch( {\n\t\t\t\t\tmethod: 'PUT',\n\t\t\t\t\turl,\n\t\t\t\t\tdata: { status: 'active' },\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tconst response = await apiFetch( {\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\tpath: 'wp/v2/plugins',\n\t\t\t\t\tdata: { slug: id, status: 'active' },\n\t\t\t\t} );\n\t\t\t\t// Add the `self` link for newly-installed blocks.\n\t\t\t\tlinks = response._links;\n\t\t\t}\n\n\t\t\tdispatch.addInstalledBlockType( {\n\t\t\t\t...block,\n\t\t\t\tlinks: { ...block.links, ...links },\n\t\t\t} );\n\n\t\t\t// Ensures that the block metadata is propagated to the editor when registered on the server.\n\t\t\tconst metadataFields = [\n\t\t\t\t'api_version',\n\t\t\t\t'title',\n\t\t\t\t'category',\n\t\t\t\t'parent',\n\t\t\t\t'ancestor',\n\t\t\t\t'icon',\n\t\t\t\t'description',\n\t\t\t\t'keywords',\n\t\t\t\t'attributes',\n\t\t\t\t'provides_context',\n\t\t\t\t'uses_context',\n\t\t\t\t'selectors',\n\t\t\t\t'supports',\n\t\t\t\t'styles',\n\t\t\t\t'example',\n\t\t\t\t'variations',\n\t\t\t\t'allowed_blocks',\n\t\t\t\t'block_hooks',\n\t\t\t];\n\t\t\tawait apiFetch( {\n\t\t\t\tpath: addQueryArgs( `/wp/v2/block-types/${ name }`, {\n\t\t\t\t\t_fields: metadataFields,\n\t\t\t\t} ),\n\t\t\t} )\n\t\t\t\t// Ignore when the block is not registered on the server.\n\t\t\t\t.catch( () => {} )\n\t\t\t\t.then( ( response ) => {\n\t\t\t\t\tif ( ! response ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tunstable__bootstrapServerSideBlockDefinitions( {\n\t\t\t\t\t\t[ name ]: Object.fromEntries(\n\t\t\t\t\t\t\tObject.entries( response ).filter( ( [ key ] ) =>\n\t\t\t\t\t\t\t\tmetadataFields.includes( key )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t} );\n\t\t\t\t} );\n\n\t\t\tawait loadAssets();\n\t\t\tconst registeredBlocks = registry\n\t\t\t\t.select( blocksStore )\n\t\t\t\t.getBlockTypes();\n\t\t\tif ( ! registeredBlocks.some( ( i ) => i.name === name ) ) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t__( 'Error registering block. Try reloading the page.' )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tregistry.dispatch( noticesStore ).createInfoNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s is the block title.\n\t\t\t\t\t__( 'Block %s installed and added.' ),\n\t\t\t\t\tblock.title\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\tspeak: true,\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t\tsuccess = true;\n\t\t} catch ( error ) {\n\t\t\tlet message = error.message || __( 'An error occurred.' );\n\n\t\t\t// Errors we throw are fatal.\n\t\t\tlet isFatal = error instanceof Error;\n\n\t\t\t// Specific API errors that are fatal.\n\t\t\tconst fatalAPIErrors = {\n\t\t\t\tfolder_exists: __(\n\t\t\t\t\t'This block is already installed. Try reloading the page.'\n\t\t\t\t),\n\t\t\t\tunable_to_connect_to_filesystem: __(\n\t\t\t\t\t'Error installing block. You can reload the page and try again.'\n\t\t\t\t),\n\t\t\t};\n\n\t\t\tif ( fatalAPIErrors[ error.code ] ) {\n\t\t\t\tisFatal = true;\n\t\t\t\tmessage = fatalAPIErrors[ error.code ];\n\t\t\t}\n\n\t\t\tdispatch.setErrorNotice( id, message, isFatal );\n\t\t\tregistry.dispatch( noticesStore ).createErrorNotice( message, {\n\t\t\t\tspeak: true,\n\t\t\t\tisDismissible: true,\n\t\t\t} );\n\t\t}\n\t\tdispatch.setIsInstalling( id, false );\n\t\treturn success;\n\t};\n\n/**\n * Action triggered to uninstall a block plugin.\n *\n * @param {Object} block The blockType object.\n */\nexport const uninstallBlockType =\n\t( block ) =>\n\tasync ( { registry, dispatch } ) => {\n\t\ttry {\n\t\t\tconst url = getPluginUrl( block );\n\t\t\tawait apiFetch( {\n\t\t\t\tmethod: 'PUT',\n\t\t\t\turl,\n\t\t\t\tdata: { status: 'inactive' },\n\t\t\t} );\n\t\t\tawait apiFetch( {\n\t\t\t\tmethod: 'DELETE',\n\t\t\t\turl,\n\t\t\t} );\n\t\t\tdispatch.removeInstalledBlockType( block );\n\t\t} catch ( error ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice(\n\t\t\t\t\terror.message || __( 'An error occurred.' )\n\t\t\t\t);\n\t\t}\n\t};\n\n/**\n * Returns an action object used to add a block type to the \"newly installed\"\n * tracking list.\n *\n * @param {Object} item The block item with the block id and name.\n *\n * @return {Object} Action object.\n */\nexport function addInstalledBlockType( item ) {\n\treturn {\n\t\ttype: 'ADD_INSTALLED_BLOCK_TYPE',\n\t\titem,\n\t};\n}\n\n/**\n * Returns an action object used to remove a block type from the \"newly installed\"\n * tracking list.\n *\n * @param {string} item The block item with the block id and name.\n *\n * @return {Object} Action object.\n */\nexport function removeInstalledBlockType( item ) {\n\treturn {\n\t\ttype: 'REMOVE_INSTALLED_BLOCK_TYPE',\n\t\titem,\n\t};\n}\n\n/**\n * Returns an action object used to indicate install in progress.\n *\n * @param {string} blockId\n * @param {boolean} isInstalling\n *\n * @return {Object} Action object.\n */\nexport function setIsInstalling( blockId, isInstalling ) {\n\treturn {\n\t\ttype: 'SET_INSTALLING_BLOCK',\n\t\tblockId,\n\t\tisInstalling,\n\t};\n}\n\n/**\n * Sets an error notice to be displayed to the user for a given block.\n *\n * @param {string} blockId The ID of the block plugin. eg: my-block\n * @param {string} message The message shown in the notice.\n * @param {boolean} isFatal Whether the user can recover from the error.\n *\n * @return {Object} Action object.\n */\nexport function setErrorNotice( blockId, message, isFatal = false ) {\n\treturn {\n\t\ttype: 'SET_ERROR_NOTICE',\n\t\tblockId,\n\t\tmessage,\n\t\tisFatal,\n\t};\n}\n\n/**\n * Sets the error notice to empty for specific block.\n *\n * @param {string} blockId The ID of the block plugin. eg: my-block\n *\n * @return {Object} Action object.\n */\nexport function clearErrorNotice( blockId ) {\n\treturn {\n\t\ttype: 'CLEAR_ERROR_NOTICE',\n\t\tblockId,\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAmBA,SAAgB,wBAAyB,aAAc;CACtD,OAAO;EAAE,MAAM;EAA6B;CAAY;AACzD;;;;;;;;;;AAWA,SAAgB,0BAA2B,oBAAoB,aAAc;CAC5E,OAAO;EACN,MAAM;EACN;EACA;CACD;AACD;;;;;;;;AASA,MAAa,oBACV,UACF,OAAQ,EAAE,UAAU,eAAgB;CACnC,MAAM,EAAE,IAAI,SAAS;CACrB,IAAI,UAAU;CACd,SAAS,iBAAkB,EAAG;CAC9B,IAAI;EACH,SAAS,gBAAiB,IAAI,IAAK;EAGnC,MAAM,MAAM,aAAc,KAAM;EAChC,IAAI,QAAQ,CAAC;EACb,IAAK,KACJ,MAAM,SAAU;GACf,QAAQ;GACR;GACA,MAAM,EAAE,QAAQ,SAAS;EAC1B,CAAE;OAQF,SAAQ,MANe,SAAU;GAChC,QAAQ;GACR,MAAM;GACN,MAAM;IAAE,MAAM;IAAI,QAAQ;GAAS;EACpC,CAAE,EAAA,CAEe;EAGlB,SAAS,sBAAuB;GAC/B,GAAG;GACH,OAAO;IAAE,GAAG,MAAM;IAAO,GAAG;GAAM;EACnC,CAAE;EAGF,MAAM,iBAAiB;GACtB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA,MAAM,SAAU,EACf,MAAM,aAAc,sBAAuB,QAAS,EACnD,SAAS,eACV,CAAE,EACH,CAAE,CAAA,CAEA,YAAa,CAAC,CAAE,CAAA,CAChB,MAAQ,aAAc;GACtB,IAAK,CAAE,UACN;GAED,8CAA+C,GAC5C,OAAQ,OAAO,YAChB,OAAO,QAAS,QAAS,CAAC,CAAC,QAAU,CAAE,SACtC,eAAe,SAAU,GAAI,CAC9B,CACD,EACD,CAAE;EACH,CAAE;EAEH,MAAM,WAAW;EAIjB,IAAK,CAHoB,SACvB,OAAQA,KAAY,CAAA,CACpB,cACK,CAAgB,CAAC,MAAQ,MAAO,EAAE,SAAS,IAAK,GACtD,MAAM,IAAI,MACT,GAAI,kDAAmD,CACxD;EAGD,SAAS,SAAUC,OAAa,CAAC,CAAC,iBACjC;;GAEC,GAAI,+BAAgC;GACpC,MAAM;EACP,GACA;GACC,OAAO;GACP,MAAM;EACP,CACD;EACA,UAAU;CACX,SAAU,OAAQ;EACjB,IAAI,UAAU,MAAM,WAAW,GAAI,oBAAqB;EAGxD,IAAI,UAAU,iBAAiB;EAG/B,MAAM,iBAAiB;GACtB,eAAe,GACd,0DACD;GACA,iCAAiC,GAChC,gEACD;EACD;EAEA,IAAK,eAAgB,MAAM,OAAS;GACnC,UAAU;GACV,UAAU,eAAgB,MAAM;EACjC;EAEA,SAAS,eAAgB,IAAI,SAAS,OAAQ;EAC9C,SAAS,SAAUA,OAAa,CAAC,CAAC,kBAAmB,SAAS;GAC7D,OAAO;GACP,eAAe;EAChB,CAAE;CACH;CACA,SAAS,gBAAiB,IAAI,KAAM;CACpC,OAAO;AACR;;;;;;AAOD,MAAa,sBACV,UACF,OAAQ,EAAE,UAAU,eAAgB;CACnC,IAAI;EACH,MAAM,MAAM,aAAc,KAAM;EAChC,MAAM,SAAU;GACf,QAAQ;GACR;GACA,MAAM,EAAE,QAAQ,WAAW;EAC5B,CAAE;EACF,MAAM,SAAU;GACf,QAAQ;GACR;EACD,CAAE;EACF,SAAS,yBAA0B,KAAM;CAC1C,SAAU,OAAQ;EACjB,SACE,SAAUA,OAAa,CAAA,CACvB,kBACA,MAAM,WAAW,GAAI,oBAAqB,CAC3C;CACF;AACD;;;;;;;;;AAUD,SAAgB,sBAAuB,MAAO;CAC7C,OAAO;EACN,MAAM;EACN;CACD;AACD;;;;;;;;;AAUA,SAAgB,yBAA0B,MAAO;CAChD,OAAO;EACN,MAAM;EACN;CACD;AACD;;;;;;;;;AAUA,SAAgB,gBAAiB,SAAS,cAAe;CACxD,OAAO;EACN,MAAM;EACN;EACA;CACD;AACD;;;;;;;;;;AAWA,SAAgB,eAAgB,SAAS,SAAS,UAAU,OAAQ;CACnE,OAAO;EACN,MAAM;EACN;EACA;EACA;CACD;AACD;;;;;;;;AASA,SAAgB,iBAAkB,SAAU;CAC3C,OAAO;EACN,MAAM;EACN;CACD;AACD"}
@@ -113,12 +113,12 @@
113
113
  }
114
114
 
115
115
  body.admin-color-fresh {
116
- --wp-admin-theme-color: #007cba;
117
- --wp-admin-theme-color--rgb: 0, 124, 186;
118
- --wp-admin-theme-color-darker-10: rgb(0, 107, 160.5);
119
- --wp-admin-theme-color-darker-10--rgb: 0, 107, 160.5;
120
- --wp-admin-theme-color-darker-20: #005a87;
121
- --wp-admin-theme-color-darker-20--rgb: 0, 90, 135;
116
+ --wp-admin-theme-color: #006daa;
117
+ --wp-admin-theme-color--rgb: 0, 109, 170;
118
+ --wp-admin-theme-color-darker-10: rgb(0, 92.65, 144.5);
119
+ --wp-admin-theme-color-darker-10--rgb: 0, 92.65, 144.5;
120
+ --wp-admin-theme-color-darker-20: rgb(0, 76.3, 119);
121
+ --wp-admin-theme-color-darker-20--rgb: 0, 76.3, 119;
122
122
  --wp-admin-border-width-focus: 2px;
123
123
  }
124
124
  @media (min-resolution: 192dpi) {
@@ -196,7 +196,7 @@ body.admin-color-fresh {
196
196
  cursor: var(--wpds-cursor-control, pointer);
197
197
  }
198
198
  .block-directory-downloadable-block-list-item:hover:not([aria-disabled=true]) {
199
- background-color: var(--wpds-color-background-interactive-neutral-weak-active, #ededed);
199
+ background-color: var(--wpds-color-background-interactive-neutral-weak-active, #ececec);
200
200
  }
201
201
  .block-directory-downloadable-block-list-item[data-focus-visible] {
202
202
  outline: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)) solid var(--focus-color, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
@@ -113,12 +113,12 @@
113
113
  }
114
114
 
115
115
  body.admin-color-fresh {
116
- --wp-admin-theme-color: #007cba;
117
- --wp-admin-theme-color--rgb: 0, 124, 186;
118
- --wp-admin-theme-color-darker-10: rgb(0, 107, 160.5);
119
- --wp-admin-theme-color-darker-10--rgb: 0, 107, 160.5;
120
- --wp-admin-theme-color-darker-20: #005a87;
121
- --wp-admin-theme-color-darker-20--rgb: 0, 90, 135;
116
+ --wp-admin-theme-color: #006daa;
117
+ --wp-admin-theme-color--rgb: 0, 109, 170;
118
+ --wp-admin-theme-color-darker-10: rgb(0, 92.65, 144.5);
119
+ --wp-admin-theme-color-darker-10--rgb: 0, 92.65, 144.5;
120
+ --wp-admin-theme-color-darker-20: rgb(0, 76.3, 119);
121
+ --wp-admin-theme-color-darker-20--rgb: 0, 76.3, 119;
122
122
  --wp-admin-border-width-focus: 2px;
123
123
  }
124
124
  @media (min-resolution: 192dpi) {
@@ -196,7 +196,7 @@ body.admin-color-fresh {
196
196
  cursor: var(--wpds-cursor-control, pointer);
197
197
  }
198
198
  .block-directory-downloadable-block-list-item:hover:not([aria-disabled=true]) {
199
- background-color: var(--wpds-color-background-interactive-neutral-weak-active, #ededed);
199
+ background-color: var(--wpds-color-background-interactive-neutral-weak-active, #ececec);
200
200
  }
201
201
  .block-directory-downloadable-block-list-item[data-focus-visible] {
202
202
  outline: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)) solid var(--focus-color, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
@@ -0,0 +1,2 @@
1
+ export default function AutoBlockUninstaller(): null;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/auto-block-uninstaller/index.js"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,oBAAoB,SAuB3C"}
@@ -0,0 +1,5 @@
1
+ export declare const BlockRatings: ({ rating }: {
2
+ rating: any;
3
+ }) => import("react").JSX.Element;
4
+ export default BlockRatings;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/block-ratings/index.jsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;iCAIxB,CAAC;eAEa,YAAY"}
@@ -0,0 +1,5 @@
1
+ declare function Stars({ rating }: {
2
+ rating: any;
3
+ }): import("react").JSX.Element;
4
+ export default Stars;
5
+ //# sourceMappingURL=stars.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stars.d.ts","sourceRoot":"","sources":["../../../src/components/block-ratings/stars.jsx"],"names":[],"mappings":"AAGA,iBAAS,KAAK,CAAE,EAAE,MAAM,EAAE;;CAAA,+BAyCzB;eAEc,KAAK"}
@@ -0,0 +1,4 @@
1
+ export default function CompactList({ items }: {
2
+ items: any;
3
+ }): import("react").JSX.Element | null;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/compact-list/index.jsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAE,EAAE,KAAK,EAAE;;CAAA,sCA2B7C"}
@@ -0,0 +1,5 @@
1
+ declare function DownloadableBlockIcon({ icon }: {
2
+ icon: any;
3
+ }): import("react").JSX.Element;
4
+ export default DownloadableBlockIcon;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/downloadable-block-icon/index.jsx"],"names":[],"mappings":"AAEA,iBAAS,qBAAqB,CAAE,EAAE,IAAI,EAAE;;CAAA,+BAOvC;eAEc,qBAAqB"}
@@ -0,0 +1,6 @@
1
+ declare function DownloadableBlockListItem({ item, onClick }: {
2
+ item: any;
3
+ onClick: any;
4
+ }): import("react").JSX.Element;
5
+ export default DownloadableBlockListItem;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/downloadable-block-list-item/index.jsx"],"names":[],"mappings":"AAkEA,iBAAS,yBAAyB,CAAE,EAAE,IAAI,EAAE,OAAO,EAAE;;;CAAA,+BAyGpD;eAEc,yBAAyB"}
@@ -0,0 +1,5 @@
1
+ export declare const DownloadableBlockNotice: ({ block }: {
2
+ block: any;
3
+ }) => import("react").JSX.Element | null;
4
+ export default DownloadableBlockNotice;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/downloadable-block-notice/index.jsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB;;wCAkBnC,CAAC;eAEa,uBAAuB"}
@@ -0,0 +1,8 @@
1
+ declare const noop: () => void;
2
+ declare function DownloadableBlocksList({ items, onHover, onSelect }: {
3
+ items: any;
4
+ onHover?: typeof noop | undefined;
5
+ onSelect: any;
6
+ }): import("react").JSX.Element | null;
7
+ export default DownloadableBlocksList;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/downloadable-blocks-list/index.jsx"],"names":[],"mappings":"AAOA,QAAA,MAAM,IAAI,YAAW,CAAC;AAEtB,iBAAS,sBAAsB,CAAE,EAAE,KAAK,EAAE,OAAc,EAAE,QAAQ,EAAE;;;;CAAA,sCAuCnE;eAEc,sBAAsB"}
@@ -0,0 +1,8 @@
1
+ export default function DownloadableBlocksPanel({ onSelect, onHover, hasLocalBlocks, isTyping, filterValue, }: {
2
+ filterValue: any;
3
+ hasLocalBlocks: any;
4
+ isTyping: any;
5
+ onHover: any;
6
+ onSelect: any;
7
+ }): import("react").JSX.Element | null;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/downloadable-blocks-panel/index.jsx"],"names":[],"mappings":"AAkEA,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAE,EAChD,QAAQ,EACR,OAAO,EACP,cAAc,EACd,QAAQ,EACR,WAAW,GACX;;;;;;CAAA,sCAgDA"}
@@ -0,0 +1,7 @@
1
+ declare function DownloadableBlocksInserterPanel({ children, downloadableItems, hasLocalBlocks, }: {
2
+ children: any;
3
+ downloadableItems: any;
4
+ hasLocalBlocks: any;
5
+ }): import("react").JSX.Element;
6
+ export default DownloadableBlocksInserterPanel;
7
+ //# sourceMappingURL=inserter-panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inserter-panel.d.ts","sourceRoot":"","sources":["../../../src/components/downloadable-blocks-panel/inserter-panel.jsx"],"names":[],"mappings":"AAIA,iBAAS,+BAA+B,CAAE,EACzC,QAAQ,EACR,iBAAiB,EACjB,cAAc,GACd;;;;CAAA,+BAyCA;eAEc,+BAA+B"}
@@ -0,0 +1,3 @@
1
+ declare function DownloadableBlocksNoResults(): import("react").JSX.Element;
2
+ export default DownloadableBlocksNoResults;
3
+ //# sourceMappingURL=no-results.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"no-results.d.ts","sourceRoot":"","sources":["../../../src/components/downloadable-blocks-panel/no-results.jsx"],"names":[],"mappings":"AAIA,iBAAS,2BAA2B,gCAuBnC;eAEc,2BAA2B"}
@@ -0,0 +1,3 @@
1
+ import './plugins';
2
+ export { store } from './store';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"AAAA,OAAO,WAAW,CAAC;AAEnB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const getInstallMissing: (OriginalComponent: any) => (props: any) => import("react").JSX.Element;
2
+ export default getInstallMissing;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/get-install-missing/index.jsx"],"names":[],"mappings":"AAcA,QAAA,MAAM,iBAAiB,yEAyBtB,CAAC;eAuEa,iBAAiB"}
@@ -0,0 +1,6 @@
1
+ export default function InstallButton({ attributes, block, clientId }: {
2
+ attributes: any;
3
+ block: any;
4
+ clientId: any;
5
+ }): import("react").JSX.Element;
6
+ //# sourceMappingURL=install-button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install-button.d.ts","sourceRoot":"","sources":["../../../src/plugins/get-install-missing/install-button.jsx"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,aAAa,CAAE,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE;;;;CAAA,+BA2CrE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.jsx"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ declare function InserterMenuDownloadableBlocksPanel(): import("react").JSX.Element;
2
+ export default InserterMenuDownloadableBlocksPanel;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/inserter-menu-downloadable-blocks-panel/index.jsx"],"names":[],"mappings":"AAKA,iBAAS,mCAAmC,gCA2B3C;eAEc,mCAAmC"}
@@ -0,0 +1,2 @@
1
+ export default function InstalledBlocksPrePublishPanel(): import("react").JSX.Element | null;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/installed-blocks-pre-publish-panel/index.jsx"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,8BAA8B,uCAiCrD"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Returns an action object used in signalling that the downloadable blocks
3
+ * have been requested and are loading.
4
+ *
5
+ * @param {string} filterValue Search string.
6
+ *
7
+ * @return {Object} Action object.
8
+ */
9
+ export declare function fetchDownloadableBlocks(filterValue: string): Object;
10
+ /**
11
+ * Returns an action object used in signalling that the downloadable blocks
12
+ * have been updated.
13
+ *
14
+ * @param {Array} downloadableBlocks Downloadable blocks.
15
+ * @param {string} filterValue Search string.
16
+ *
17
+ * @return {Object} Action object.
18
+ */
19
+ export declare function receiveDownloadableBlocks(downloadableBlocks: any[], filterValue: string): Object;
20
+ /**
21
+ * Action triggered to install a block plugin.
22
+ *
23
+ * @param {Object} block The block item returned by search.
24
+ *
25
+ * @return {boolean} Whether the block was successfully installed & loaded.
26
+ */
27
+ export declare const installBlockType: (block: Object) => boolean;
28
+ /**
29
+ * Action triggered to uninstall a block plugin.
30
+ *
31
+ * @param {Object} block The blockType object.
32
+ */
33
+ export declare const uninstallBlockType: (block: Object) => ({ registry, dispatch }: {
34
+ dispatch: any;
35
+ registry: any;
36
+ }) => Promise<void>;
37
+ /**
38
+ * Returns an action object used to add a block type to the "newly installed"
39
+ * tracking list.
40
+ *
41
+ * @param {Object} item The block item with the block id and name.
42
+ *
43
+ * @return {Object} Action object.
44
+ */
45
+ export declare function addInstalledBlockType(item: Object): Object;
46
+ /**
47
+ * Returns an action object used to remove a block type from the "newly installed"
48
+ * tracking list.
49
+ *
50
+ * @param {string} item The block item with the block id and name.
51
+ *
52
+ * @return {Object} Action object.
53
+ */
54
+ export declare function removeInstalledBlockType(item: string): Object;
55
+ /**
56
+ * Returns an action object used to indicate install in progress.
57
+ *
58
+ * @param {string} blockId
59
+ * @param {boolean} isInstalling
60
+ *
61
+ * @return {Object} Action object.
62
+ */
63
+ export declare function setIsInstalling(blockId: string, isInstalling: boolean): Object;
64
+ /**
65
+ * Sets an error notice to be displayed to the user for a given block.
66
+ *
67
+ * @param {string} blockId The ID of the block plugin. eg: my-block
68
+ * @param {string} message The message shown in the notice.
69
+ * @param {boolean} isFatal Whether the user can recover from the error.
70
+ *
71
+ * @return {Object} Action object.
72
+ */
73
+ export declare function setErrorNotice(blockId: string, message: string, isFatal?: boolean): Object;
74
+ /**
75
+ * Sets the error notice to empty for specific block.
76
+ *
77
+ * @param {string} blockId The ID of the block plugin. eg: my-block
78
+ *
79
+ * @return {Object} Action object.
80
+ */
81
+ export declare function clearErrorNotice(blockId: string): Object;
82
+ //# sourceMappingURL=actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/store/actions.js"],"names":[],"mappings":"AAWA;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAE,WAAW,EAJzC,MAIyC,GAFxC,MAAM,CAIjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAE,kBAAkB,OAAA,EAAE,WAAW,EAJ/D,MAI+D,GAF9D,MAAM,CAQjB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,UAJlB,MAAM,KAEL,OA+HV,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,UAFpB,MAAM;;;mBAwBf,CAAC;AAEH;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAE,IAAI,EAJhC,MAIgC,GAF/B,MAAM,CAOjB;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAE,IAAI,EAJnC,MAImC,GAFlC,MAAM,CAOjB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAE,OAAO,EAL7B,MAK6B,EAAE,YAAY,EAJ3C,OAI2C,GAF1C,MAAM,CAQjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAE,OAAO,EAN5B,MAM4B,EAAE,OAAO,EALrC,MAKqC,EAAE,OAAO,GAJ9C,OAIsD,GAFrD,MAAM,CASjB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAE,OAAO,EAJ9B,MAI8B,GAF7B,MAAM,CAOjB"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Block editor data store configuration.
3
+ *
4
+ * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore
5
+ *
6
+ * @type {Object}
7
+ */
8
+ export declare const storeConfig: Object;
9
+ /**
10
+ * Store definition for the block directory namespace.
11
+ *
12
+ * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
13
+ *
14
+ * @type {Object}
15
+ */
16
+ export declare const store: Object;
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.js"],"names":[],"mappings":"AAWA;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,EAFd,MAOT,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,EAFR,MAEsD,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Load an asset for a block.
3
+ *
4
+ * This function returns a Promise that will resolve once the asset is loaded,
5
+ * or in the case of Stylesheets and Inline JavaScript, will resolve immediately.
6
+ *
7
+ * @param {HTMLElement} el A HTML Element asset to inject.
8
+ *
9
+ * @return {Promise} Promise which will resolve when the asset is loaded.
10
+ */
11
+ export declare const loadAsset: (el: HTMLElement) => Promise<any>;
12
+ /**
13
+ * Load the asset files for a block
14
+ */
15
+ export declare function loadAssets(): Promise<void>;
16
+ //# sourceMappingURL=load-assets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-assets.d.ts","sourceRoot":"","sources":["../../src/store/load-assets.js"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,OAJX,WAAW,iBAoCrB,CAAC;AAEF;;GAEG;AACH,wBAAsB,UAAU,kBA4B/B"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Reducer returning an array of downloadable blocks.
3
+ *
4
+ * @param {Object} state Current state.
5
+ * @param {Object} action Dispatched action.
6
+ *
7
+ * @return {Object} Updated state.
8
+ */
9
+ export declare const downloadableBlocks: (state: Object | undefined, action: Object) => Object;
10
+ /**
11
+ * Reducer managing the installation and deletion of blocks.
12
+ *
13
+ * @param {Object} state Current state.
14
+ * @param {Object} action Dispatched action.
15
+ *
16
+ * @return {Object} Updated state.
17
+ */
18
+ export declare const blockManagement: (state: Object | undefined, action: Object) => Object;
19
+ /**
20
+ * Reducer returning an object of error notices.
21
+ *
22
+ * @param {Object} state Current state.
23
+ * @param {Object} action Dispatched action.
24
+ *
25
+ * @return {Object} Updated state.
26
+ */
27
+ export declare const errorNotices: (state: Object | undefined, action: Object) => Object;
28
+ declare const _default: import("redux").Reducer<{
29
+ downloadableBlocks: Object;
30
+ blockManagement: Object;
31
+ errorNotices: Object;
32
+ }, import("redux").Action<string>, Partial<{
33
+ downloadableBlocks: Object | undefined;
34
+ blockManagement: Object | undefined;
35
+ errorNotices: Object | undefined;
36
+ }>>;
37
+ export default _default;
38
+ //# sourceMappingURL=reducer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../src/store/reducer.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,UALpB,MAAM,sBACN,MAAM,KAEL,MAqBX,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,UALjB,MAAM,sBACN,MAAM,KAEL,MAmCX,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,UALd,MAAM,sBACN,MAAM,KAEL,MAiBX,CAAC"}