@wordpress/block-directory 6.2.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 (101) 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-blocks-list/index.cjs +9 -7
  11. package/build/components/downloadable-blocks-list/index.cjs.map +1 -1
  12. package/build/components/downloadable-blocks-panel/index.cjs +11 -9
  13. package/build/components/downloadable-blocks-panel/index.cjs.map +1 -1
  14. package/build/components/downloadable-blocks-panel/inserter-panel.cjs +5 -1
  15. package/build/components/downloadable-blocks-panel/inserter-panel.cjs.map +1 -1
  16. package/build/plugins/get-install-missing/index.cjs +19 -9
  17. package/build/plugins/get-install-missing/index.cjs.map +1 -1
  18. package/build/plugins/get-install-missing/install-button.cjs +5 -1
  19. package/build/plugins/get-install-missing/install-button.cjs.map +1 -1
  20. package/build/plugins/index.cjs +12 -10
  21. package/build/plugins/index.cjs.map +1 -1
  22. package/build/plugins/inserter-menu-downloadable-blocks-panel/index.cjs +9 -7
  23. package/build/plugins/inserter-menu-downloadable-blocks-panel/index.cjs.map +1 -1
  24. package/build/plugins/installed-blocks-pre-publish-panel/index.cjs +15 -9
  25. package/build/plugins/installed-blocks-pre-publish-panel/index.cjs.map +1 -1
  26. package/build/store/actions.cjs +14 -8
  27. package/build/store/actions.cjs.map +1 -1
  28. package/build/store/index.cjs +11 -9
  29. package/build/store/index.cjs.map +1 -1
  30. package/build/store/load-assets.cjs +8 -6
  31. package/build/store/load-assets.cjs.map +1 -1
  32. package/build/store/resolvers.cjs +9 -7
  33. package/build/store/resolvers.cjs.map +1 -1
  34. package/build-module/components/block-ratings/stars.mjs +5 -1
  35. package/build-module/components/block-ratings/stars.mjs.map +1 -1
  36. package/build-module/components/compact-list/index.mjs +5 -1
  37. package/build-module/components/compact-list/index.mjs.map +1 -1
  38. package/build-module/components/downloadable-block-list-item/index.mjs +33 -6
  39. package/build-module/components/downloadable-block-list-item/index.mjs.map +1 -1
  40. package/build-module/components/downloadable-blocks-panel/inserter-panel.mjs +5 -1
  41. package/build-module/components/downloadable-blocks-panel/inserter-panel.mjs.map +1 -1
  42. package/build-module/plugins/get-install-missing/index.mjs +10 -2
  43. package/build-module/plugins/get-install-missing/index.mjs.map +1 -1
  44. package/build-module/plugins/get-install-missing/install-button.mjs +5 -1
  45. package/build-module/plugins/get-install-missing/install-button.mjs.map +1 -1
  46. package/build-module/plugins/installed-blocks-pre-publish-panel/index.mjs +7 -3
  47. package/build-module/plugins/installed-blocks-pre-publish-panel/index.mjs.map +1 -1
  48. package/build-module/store/actions.mjs +5 -1
  49. package/build-module/store/actions.mjs.map +1 -1
  50. package/build-style/style-rtl.css +6 -6
  51. package/build-style/style.css +6 -6
  52. package/build-types/components/auto-block-uninstaller/index.d.ts +2 -0
  53. package/build-types/components/auto-block-uninstaller/index.d.ts.map +1 -0
  54. package/build-types/components/block-ratings/index.d.ts +5 -0
  55. package/build-types/components/block-ratings/index.d.ts.map +1 -0
  56. package/build-types/components/block-ratings/stars.d.ts +5 -0
  57. package/build-types/components/block-ratings/stars.d.ts.map +1 -0
  58. package/build-types/components/compact-list/index.d.ts +4 -0
  59. package/build-types/components/compact-list/index.d.ts.map +1 -0
  60. package/build-types/components/downloadable-block-icon/index.d.ts +5 -0
  61. package/build-types/components/downloadable-block-icon/index.d.ts.map +1 -0
  62. package/build-types/components/downloadable-block-list-item/index.d.ts +6 -0
  63. package/build-types/components/downloadable-block-list-item/index.d.ts.map +1 -0
  64. package/build-types/components/downloadable-block-notice/index.d.ts +5 -0
  65. package/build-types/components/downloadable-block-notice/index.d.ts.map +1 -0
  66. package/build-types/components/downloadable-blocks-list/index.d.ts +8 -0
  67. package/build-types/components/downloadable-blocks-list/index.d.ts.map +1 -0
  68. package/build-types/components/downloadable-blocks-panel/index.d.ts +8 -0
  69. package/build-types/components/downloadable-blocks-panel/index.d.ts.map +1 -0
  70. package/build-types/components/downloadable-blocks-panel/inserter-panel.d.ts +7 -0
  71. package/build-types/components/downloadable-blocks-panel/inserter-panel.d.ts.map +1 -0
  72. package/build-types/components/downloadable-blocks-panel/no-results.d.ts +3 -0
  73. package/build-types/components/downloadable-blocks-panel/no-results.d.ts.map +1 -0
  74. package/build-types/index.d.ts +3 -0
  75. package/build-types/index.d.ts.map +1 -0
  76. package/build-types/plugins/get-install-missing/index.d.ts +3 -0
  77. package/build-types/plugins/get-install-missing/index.d.ts.map +1 -0
  78. package/build-types/plugins/get-install-missing/install-button.d.ts +6 -0
  79. package/build-types/plugins/get-install-missing/install-button.d.ts.map +1 -0
  80. package/build-types/plugins/index.d.ts +2 -0
  81. package/build-types/plugins/index.d.ts.map +1 -0
  82. package/build-types/plugins/inserter-menu-downloadable-blocks-panel/index.d.ts +3 -0
  83. package/build-types/plugins/inserter-menu-downloadable-blocks-panel/index.d.ts.map +1 -0
  84. package/build-types/plugins/installed-blocks-pre-publish-panel/index.d.ts +2 -0
  85. package/build-types/plugins/installed-blocks-pre-publish-panel/index.d.ts.map +1 -0
  86. package/build-types/store/actions.d.ts +82 -0
  87. package/build-types/store/actions.d.ts.map +1 -0
  88. package/build-types/store/index.d.ts +17 -0
  89. package/build-types/store/index.d.ts.map +1 -0
  90. package/build-types/store/load-assets.d.ts +16 -0
  91. package/build-types/store/load-assets.d.ts.map +1 -0
  92. package/build-types/store/reducer.d.ts +38 -0
  93. package/build-types/store/reducer.d.ts.map +1 -0
  94. package/build-types/store/resolvers.d.ts +4 -0
  95. package/build-types/store/resolvers.d.ts.map +1 -0
  96. package/build-types/store/selectors.d.ts +80 -0
  97. package/build-types/store/selectors.d.ts.map +1 -0
  98. package/build-types/store/utils/get-plugin-url.d.ts +9 -0
  99. package/build-types/store/utils/get-plugin-url.d.ts.map +1 -0
  100. package/package.json +23 -23
  101. package/src/plugins/installed-blocks-pre-publish-panel/index.jsx +6 -6
@@ -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":"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"}
@@ -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) {
@@ -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) {
@@ -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"}
@@ -0,0 +1,4 @@
1
+ export declare const getDownloadableBlocks: (filterValue: any) => ({ dispatch }: {
2
+ dispatch: any;
3
+ }) => Promise<void>;
4
+ //# sourceMappingURL=resolvers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../src/store/resolvers.js"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB;;mBAyBhC,CAAC"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Returns true if application is requesting for downloadable blocks.
3
+ *
4
+ * @param {Object} state Global application state.
5
+ * @param {string} filterValue Search string.
6
+ *
7
+ * @return {boolean} Whether a request is in progress for the blocks list.
8
+ */
9
+ export declare function isRequestingDownloadableBlocks(state: Object, filterValue: string): boolean;
10
+ /**
11
+ * Returns the available uninstalled blocks.
12
+ *
13
+ * @param {Object} state Global application state.
14
+ * @param {string} filterValue Search string.
15
+ *
16
+ * @return {Array} Downloadable blocks.
17
+ */
18
+ export declare function getDownloadableBlocks(state: Object, filterValue: string): any[];
19
+ /**
20
+ * Returns the block types that have been installed on the server in this
21
+ * session.
22
+ *
23
+ * @param {Object} state Global application state.
24
+ *
25
+ * @return {Array} Block type items
26
+ */
27
+ export declare function getInstalledBlockTypes(state: Object): any[];
28
+ /**
29
+ * Returns block types that have been installed on the server and used in the
30
+ * current post.
31
+ *
32
+ * @param {Object} state Global application state.
33
+ *
34
+ * @return {Array} Block type items.
35
+ */
36
+ export declare const getNewBlockTypes: {
37
+ (state: any): any[];
38
+ isRegistrySelector?: boolean;
39
+ registry?: any;
40
+ };
41
+ /**
42
+ * Returns the block types that have been installed on the server but are not
43
+ * used in the current post.
44
+ *
45
+ * @param {Object} state Global application state.
46
+ *
47
+ * @return {Array} Block type items.
48
+ */
49
+ export declare const getUnusedBlockTypes: {
50
+ (state: any): any[];
51
+ isRegistrySelector?: boolean;
52
+ registry?: any;
53
+ };
54
+ /**
55
+ * Returns true if a block plugin install is in progress.
56
+ *
57
+ * @param {Object} state Global application state.
58
+ * @param {string} blockId Id of the block.
59
+ *
60
+ * @return {boolean} Whether this block is currently being installed.
61
+ */
62
+ export declare function isInstalling(state: Object, blockId: string): boolean;
63
+ /**
64
+ * Returns all block error notices.
65
+ *
66
+ * @param {Object} state Global application state.
67
+ *
68
+ * @return {Object} Object with error notices.
69
+ */
70
+ export declare function getErrorNotices(state: Object): Object;
71
+ /**
72
+ * Returns the error notice for a given block.
73
+ *
74
+ * @param {Object} state Global application state.
75
+ * @param {string} blockId The ID of the block plugin. eg: my-block
76
+ *
77
+ * @return {string|boolean} The error text, or false if no error.
78
+ */
79
+ export declare function getErrorNoticeForBlock(state: Object, blockId: string): string | boolean;
80
+ //# sourceMappingURL=selectors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selectors.d.ts","sourceRoot":"","sources":["../../src/store/selectors.js"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,wBAAgB,8BAA8B,CAAE,KAAK,EAL1C,MAK0C,EAAE,WAAW,EAJvD,MAIuD,GAFtD,OAAO,CAIlB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAE,KAAK,EALjC,MAKiC,EAAE,WAAW,EAJ9C,MAI8C,SAExD;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAE,KAAK,EAJlC,MAIkC,SAE5C;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB;;;;CAgC5B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;;;;CAgC/B,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAE,KAAK,EALxB,MAKwB,EAAE,OAAO,EAJjC,MAIiC,GAFhC,OAAO,CAIlB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAE,KAAK,EAJ3B,MAI2B,GAF1B,MAAM,CAIjB;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAE,KAAK,EALlC,MAKkC,EAAE,OAAO,EAJ3C,MAI2C,GAF1C,MAAM,GAAC,OAAO,CAIzB"}