@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.
- package/build/components/auto-block-uninstaller/index.cjs.map +1 -1
- package/build/components/block-ratings/index.cjs +9 -7
- package/build/components/block-ratings/index.cjs.map +1 -1
- package/build/components/block-ratings/stars.cjs +5 -1
- package/build/components/block-ratings/stars.cjs.map +1 -1
- package/build/components/compact-list/index.cjs +14 -8
- package/build/components/compact-list/index.cjs.map +1 -1
- package/build/components/downloadable-block-list-item/index.cjs +45 -16
- package/build/components/downloadable-block-list-item/index.cjs.map +1 -1
- package/build/components/downloadable-block-notice/index.cjs +2 -3
- package/build/components/downloadable-block-notice/index.cjs.map +1 -1
- package/build/components/downloadable-blocks-list/index.cjs +9 -7
- package/build/components/downloadable-blocks-list/index.cjs.map +1 -1
- package/build/components/downloadable-blocks-panel/index.cjs +11 -9
- package/build/components/downloadable-blocks-panel/index.cjs.map +1 -1
- package/build/components/downloadable-blocks-panel/inserter-panel.cjs +5 -1
- package/build/components/downloadable-blocks-panel/inserter-panel.cjs.map +1 -1
- package/build/plugins/get-install-missing/index.cjs +19 -9
- package/build/plugins/get-install-missing/index.cjs.map +1 -1
- package/build/plugins/get-install-missing/install-button.cjs +5 -1
- package/build/plugins/get-install-missing/install-button.cjs.map +1 -1
- package/build/plugins/index.cjs +12 -10
- package/build/plugins/index.cjs.map +1 -1
- package/build/plugins/inserter-menu-downloadable-blocks-panel/index.cjs +9 -7
- package/build/plugins/inserter-menu-downloadable-blocks-panel/index.cjs.map +1 -1
- package/build/plugins/installed-blocks-pre-publish-panel/index.cjs +15 -9
- package/build/plugins/installed-blocks-pre-publish-panel/index.cjs.map +1 -1
- package/build/store/actions.cjs +14 -8
- package/build/store/actions.cjs.map +1 -1
- package/build/store/index.cjs +11 -9
- package/build/store/index.cjs.map +1 -1
- package/build/store/load-assets.cjs +8 -6
- package/build/store/load-assets.cjs.map +1 -1
- package/build/store/resolvers.cjs +9 -7
- package/build/store/resolvers.cjs.map +1 -1
- package/build-module/components/block-ratings/stars.mjs +5 -1
- package/build-module/components/block-ratings/stars.mjs.map +1 -1
- package/build-module/components/compact-list/index.mjs +5 -1
- package/build-module/components/compact-list/index.mjs.map +1 -1
- package/build-module/components/downloadable-block-list-item/index.mjs +33 -6
- package/build-module/components/downloadable-block-list-item/index.mjs.map +1 -1
- package/build-module/components/downloadable-block-notice/index.mjs +3 -4
- package/build-module/components/downloadable-block-notice/index.mjs.map +1 -1
- package/build-module/components/downloadable-blocks-panel/inserter-panel.mjs +5 -1
- package/build-module/components/downloadable-blocks-panel/inserter-panel.mjs.map +1 -1
- package/build-module/plugins/get-install-missing/index.mjs +10 -2
- package/build-module/plugins/get-install-missing/index.mjs.map +1 -1
- package/build-module/plugins/get-install-missing/install-button.mjs +5 -1
- package/build-module/plugins/get-install-missing/install-button.mjs.map +1 -1
- package/build-module/plugins/installed-blocks-pre-publish-panel/index.mjs +7 -3
- package/build-module/plugins/installed-blocks-pre-publish-panel/index.mjs.map +1 -1
- package/build-module/store/actions.mjs +5 -1
- package/build-module/store/actions.mjs.map +1 -1
- package/build-style/style-rtl.css +7 -7
- package/build-style/style.css +7 -7
- package/build-types/components/auto-block-uninstaller/index.d.ts +2 -0
- package/build-types/components/auto-block-uninstaller/index.d.ts.map +1 -0
- package/build-types/components/block-ratings/index.d.ts +5 -0
- package/build-types/components/block-ratings/index.d.ts.map +1 -0
- package/build-types/components/block-ratings/stars.d.ts +5 -0
- package/build-types/components/block-ratings/stars.d.ts.map +1 -0
- package/build-types/components/compact-list/index.d.ts +4 -0
- package/build-types/components/compact-list/index.d.ts.map +1 -0
- package/build-types/components/downloadable-block-icon/index.d.ts +5 -0
- package/build-types/components/downloadable-block-icon/index.d.ts.map +1 -0
- package/build-types/components/downloadable-block-list-item/index.d.ts +6 -0
- package/build-types/components/downloadable-block-list-item/index.d.ts.map +1 -0
- package/build-types/components/downloadable-block-notice/index.d.ts +5 -0
- package/build-types/components/downloadable-block-notice/index.d.ts.map +1 -0
- package/build-types/components/downloadable-blocks-list/index.d.ts +8 -0
- package/build-types/components/downloadable-blocks-list/index.d.ts.map +1 -0
- package/build-types/components/downloadable-blocks-panel/index.d.ts +8 -0
- package/build-types/components/downloadable-blocks-panel/index.d.ts.map +1 -0
- package/build-types/components/downloadable-blocks-panel/inserter-panel.d.ts +7 -0
- package/build-types/components/downloadable-blocks-panel/inserter-panel.d.ts.map +1 -0
- package/build-types/components/downloadable-blocks-panel/no-results.d.ts +3 -0
- package/build-types/components/downloadable-blocks-panel/no-results.d.ts.map +1 -0
- package/build-types/index.d.ts +3 -0
- package/build-types/index.d.ts.map +1 -0
- package/build-types/plugins/get-install-missing/index.d.ts +3 -0
- package/build-types/plugins/get-install-missing/index.d.ts.map +1 -0
- package/build-types/plugins/get-install-missing/install-button.d.ts +6 -0
- package/build-types/plugins/get-install-missing/install-button.d.ts.map +1 -0
- package/build-types/plugins/index.d.ts +2 -0
- package/build-types/plugins/index.d.ts.map +1 -0
- package/build-types/plugins/inserter-menu-downloadable-blocks-panel/index.d.ts +3 -0
- package/build-types/plugins/inserter-menu-downloadable-blocks-panel/index.d.ts.map +1 -0
- package/build-types/plugins/installed-blocks-pre-publish-panel/index.d.ts +2 -0
- package/build-types/plugins/installed-blocks-pre-publish-panel/index.d.ts.map +1 -0
- package/build-types/store/actions.d.ts +82 -0
- package/build-types/store/actions.d.ts.map +1 -0
- package/build-types/store/index.d.ts +17 -0
- package/build-types/store/index.d.ts.map +1 -0
- package/build-types/store/load-assets.d.ts +16 -0
- package/build-types/store/load-assets.d.ts.map +1 -0
- package/build-types/store/reducer.d.ts +38 -0
- package/build-types/store/reducer.d.ts.map +1 -0
- package/build-types/store/resolvers.d.ts +4 -0
- package/build-types/store/resolvers.d.ts.map +1 -0
- package/build-types/store/selectors.d.ts +80 -0
- package/build-types/store/selectors.d.ts.map +1 -0
- package/build-types/store/utils/get-plugin-url.d.ts +9 -0
- package/build-types/store/utils/get-plugin-url.d.ts.map +1 -0
- package/package.json +23 -23
- package/src/components/downloadable-block-notice/index.jsx +0 -4
- package/src/plugins/installed-blocks-pre-publish-panel/index.jsx +6 -6
|
@@ -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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the plugin's direct API link out of a block-directory response.
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} block The block object
|
|
5
|
+
*
|
|
6
|
+
* @return {string} The plugin URL, if exists.
|
|
7
|
+
*/
|
|
8
|
+
export default function getPluginUrl(block: Object): string;
|
|
9
|
+
//# sourceMappingURL=get-plugin-url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-plugin-url.d.ts","sourceRoot":"","sources":["../../../src/store/utils/get-plugin-url.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,KAAK,EAJhC,MAIgC,GAF/B,MAAM,CAWjB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-directory",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "Extend editor with block directory features to search, download and install blocks.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -39,34 +39,34 @@
|
|
|
39
39
|
},
|
|
40
40
|
"wpScript": true,
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@wordpress/a11y": "^5.
|
|
43
|
-
"@wordpress/api-fetch": "^8.
|
|
44
|
-
"@wordpress/base-styles": "^15.
|
|
45
|
-
"@wordpress/block-editor": "^20.
|
|
46
|
-
"@wordpress/blocks": "^17.
|
|
47
|
-
"@wordpress/components": "^
|
|
48
|
-
"@wordpress/compose": "^9.
|
|
49
|
-
"@wordpress/core-data": "^9.
|
|
50
|
-
"@wordpress/data": "^11.
|
|
51
|
-
"@wordpress/editor": "^16.
|
|
52
|
-
"@wordpress/element": "^10.
|
|
53
|
-
"@wordpress/hooks": "^5.
|
|
54
|
-
"@wordpress/html-entities": "^5.
|
|
55
|
-
"@wordpress/i18n": "^7.
|
|
56
|
-
"@wordpress/icons": "^
|
|
57
|
-
"@wordpress/notices": "^6.
|
|
58
|
-
"@wordpress/plugins": "^8.
|
|
59
|
-
"@wordpress/ui": "^0.
|
|
60
|
-
"@wordpress/url": "^5.
|
|
42
|
+
"@wordpress/a11y": "^5.3.0",
|
|
43
|
+
"@wordpress/api-fetch": "^8.3.0",
|
|
44
|
+
"@wordpress/base-styles": "^15.2.0",
|
|
45
|
+
"@wordpress/block-editor": "^20.2.0",
|
|
46
|
+
"@wordpress/blocks": "^17.3.0",
|
|
47
|
+
"@wordpress/components": "^45.1.0",
|
|
48
|
+
"@wordpress/compose": "^9.3.0",
|
|
49
|
+
"@wordpress/core-data": "^9.3.0",
|
|
50
|
+
"@wordpress/data": "^11.3.0",
|
|
51
|
+
"@wordpress/editor": "^16.3.0",
|
|
52
|
+
"@wordpress/element": "^10.3.0",
|
|
53
|
+
"@wordpress/hooks": "^5.3.0",
|
|
54
|
+
"@wordpress/html-entities": "^5.3.0",
|
|
55
|
+
"@wordpress/i18n": "^7.3.0",
|
|
56
|
+
"@wordpress/icons": "^21.1.0",
|
|
57
|
+
"@wordpress/notices": "^6.3.0",
|
|
58
|
+
"@wordpress/plugins": "^8.3.0",
|
|
59
|
+
"@wordpress/ui": "^0.28.0",
|
|
60
|
+
"@wordpress/url": "^5.3.0",
|
|
61
61
|
"change-case": "^4.1.2",
|
|
62
62
|
"clsx": "^2.1.1"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@testing-library/dom": "^10.4.2",
|
|
66
66
|
"@testing-library/react": "^16.3.3",
|
|
67
|
-
"@testing-library/user-event": "^14.6.
|
|
67
|
+
"@testing-library/user-event": "^14.6.13",
|
|
68
68
|
"deep-freeze": "^0.0.1",
|
|
69
|
-
"vitest": "^5.
|
|
69
|
+
"vitest": "^5.1.1"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"react": "^18 || ^19",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "7f19202f61aeba8f4bdce892a1a0df485ad76e2b"
|
|
79
79
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __ } from '@wordpress/i18n';
|
|
2
1
|
import { useSelect } from '@wordpress/data';
|
|
3
2
|
import { store as blockDirectoryStore } from '../../store';
|
|
4
3
|
|
|
@@ -17,9 +16,6 @@ export const DownloadableBlockNotice = ( { block } ) => {
|
|
|
17
16
|
<div className="block-directory-downloadable-block-notice">
|
|
18
17
|
<div className="block-directory-downloadable-block-notice__content">
|
|
19
18
|
{ errorNotice.message }
|
|
20
|
-
{ errorNotice.isFatal
|
|
21
|
-
? ' ' + __( 'Try reloading the page.' )
|
|
22
|
-
: null }
|
|
23
19
|
</div>
|
|
24
20
|
</div>
|
|
25
21
|
);
|
|
@@ -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';
|
|
@@ -28,11 +28,11 @@ export default function InstalledBlocksPrePublishPanel() {
|
|
|
28
28
|
initialOpen
|
|
29
29
|
>
|
|
30
30
|
<p className="installed-blocks-pre-publish-panel__copy">
|
|
31
|
-
{
|
|
32
|
-
'The following block has been added to your site.'
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
{ newBlockTypes.length === 1
|
|
32
|
+
? __( 'The following block has been added to your site.' )
|
|
33
|
+
: __(
|
|
34
|
+
'The following blocks have been added to your site.'
|
|
35
|
+
) }
|
|
36
36
|
</p>
|
|
37
37
|
<CompactList items={ newBlockTypes } />
|
|
38
38
|
</PluginPrePublishPanel>
|