@wordpress/block-directory 5.57.0 → 6.1.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 (109) hide show
  1. package/build/components/auto-block-uninstaller/index.cjs +26 -47
  2. package/build/components/auto-block-uninstaller/index.cjs.map +1 -7
  3. package/build/components/block-ratings/index.cjs +28 -34
  4. package/build/components/block-ratings/index.cjs.map +1 -7
  5. package/build/components/block-ratings/stars.cjs +35 -71
  6. package/build/components/block-ratings/stars.cjs.map +1 -7
  7. package/build/components/compact-list/index.cjs +45 -43
  8. package/build/components/compact-list/index.cjs.map +1 -7
  9. package/build/components/downloadable-block-icon/index.cjs +20 -29
  10. package/build/components/downloadable-block-icon/index.cjs.map +1 -7
  11. package/build/components/downloadable-block-list-item/index.cjs +95 -161
  12. package/build/components/downloadable-block-list-item/index.cjs.map +1 -7
  13. package/build/components/downloadable-block-notice/index.cjs +23 -46
  14. package/build/components/downloadable-block-notice/index.cjs.map +1 -7
  15. package/build/components/downloadable-blocks-list/index.cjs +50 -70
  16. package/build/components/downloadable-blocks-list/index.cjs.map +1 -7
  17. package/build/components/downloadable-blocks-panel/index.cjs +79 -119
  18. package/build/components/downloadable-blocks-panel/index.cjs.map +1 -7
  19. package/build/components/downloadable-blocks-panel/inserter-panel.cjs +37 -61
  20. package/build/components/downloadable-blocks-panel/inserter-panel.cjs.map +1 -7
  21. package/build/components/downloadable-blocks-panel/no-results.cjs +27 -39
  22. package/build/components/downloadable-blocks-panel/no-results.cjs.map +1 -7
  23. package/build/index.cjs +11 -29
  24. package/build/plugins/get-install-missing/index.cjs +80 -122
  25. package/build/plugins/get-install-missing/index.cjs.map +1 -7
  26. package/build/plugins/get-install-missing/install-button.cjs +33 -70
  27. package/build/plugins/get-install-missing/install-button.cjs.map +1 -7
  28. package/build/plugins/index.cjs +45 -45
  29. package/build/plugins/index.cjs.map +1 -7
  30. package/build/plugins/inserter-menu-downloadable-blocks-panel/index.cjs +40 -52
  31. package/build/plugins/inserter-menu-downloadable-blocks-panel/index.cjs.map +1 -7
  32. package/build/plugins/installed-blocks-pre-publish-panel/index.cjs +38 -62
  33. package/build/plugins/installed-blocks-pre-publish-panel/index.cjs.map +1 -7
  34. package/build/store/actions.cjs +233 -205
  35. package/build/store/actions.cjs.map +1 -7
  36. package/build/store/index.cjs +56 -45
  37. package/build/store/index.cjs.map +1 -7
  38. package/build/store/load-assets.cjs +62 -63
  39. package/build/store/load-assets.cjs.map +1 -7
  40. package/build/store/reducer.cjs +90 -101
  41. package/build/store/reducer.cjs.map +1 -7
  42. package/build/store/resolvers.cjs +34 -54
  43. package/build/store/resolvers.cjs.map +1 -7
  44. package/build/store/selectors.cjs +111 -107
  45. package/build/store/selectors.cjs.map +1 -7
  46. package/build/store/utils/get-plugin-url.cjs +19 -32
  47. package/build/store/utils/get-plugin-url.cjs.map +1 -7
  48. package/build-module/components/auto-block-uninstaller/index.mjs +19 -25
  49. package/build-module/components/auto-block-uninstaller/index.mjs.map +1 -7
  50. package/build-module/components/block-ratings/index.mjs +8 -8
  51. package/build-module/components/block-ratings/index.mjs.map +1 -7
  52. package/build-module/components/block-ratings/stars.mjs +28 -49
  53. package/build-module/components/block-ratings/stars.mjs.map +1 -7
  54. package/build-module/components/compact-list/index.mjs +24 -19
  55. package/build-module/components/compact-list/index.mjs.map +1 -7
  56. package/build-module/components/downloadable-block-icon/index.mjs +14 -8
  57. package/build-module/components/downloadable-block-icon/index.mjs.map +1 -7
  58. package/build-module/components/downloadable-block-list-item/index.mjs +64 -130
  59. package/build-module/components/downloadable-block-list-item/index.mjs.map +1 -7
  60. package/build-module/components/downloadable-block-notice/index.mjs +15 -20
  61. package/build-module/components/downloadable-block-notice/index.mjs.map +1 -7
  62. package/build-module/components/downloadable-blocks-list/index.mjs +26 -43
  63. package/build-module/components/downloadable-blocks-list/index.mjs.map +1 -7
  64. package/build-module/components/downloadable-blocks-panel/index.mjs +51 -90
  65. package/build-module/components/downloadable-blocks-panel/index.mjs.map +1 -7
  66. package/build-module/components/downloadable-blocks-panel/inserter-panel.mjs +29 -38
  67. package/build-module/components/downloadable-blocks-panel/inserter-panel.mjs.map +1 -7
  68. package/build-module/components/downloadable-blocks-panel/no-results.mjs +21 -18
  69. package/build-module/components/downloadable-blocks-panel/no-results.mjs.map +1 -7
  70. package/build-module/index.mjs +1 -6
  71. package/build-module/plugins/get-install-missing/index.mjs +55 -98
  72. package/build-module/plugins/get-install-missing/index.mjs.map +1 -7
  73. package/build-module/plugins/get-install-missing/install-button.mjs +25 -47
  74. package/build-module/plugins/get-install-missing/install-button.mjs.map +1 -7
  75. package/build-module/plugins/index.mjs +16 -23
  76. package/build-module/plugins/index.mjs.map +1 -7
  77. package/build-module/plugins/inserter-menu-downloadable-blocks-panel/index.mjs +17 -26
  78. package/build-module/plugins/inserter-menu-downloadable-blocks-panel/index.mjs.map +1 -7
  79. package/build-module/plugins/installed-blocks-pre-publish-panel/index.mjs +15 -36
  80. package/build-module/plugins/installed-blocks-pre-publish-panel/index.mjs.map +1 -7
  81. package/build-module/store/actions.mjs +201 -170
  82. package/build-module/store/actions.mjs.map +1 -7
  83. package/build-module/store/index.mjs +28 -13
  84. package/build-module/store/index.mjs.map +1 -7
  85. package/build-module/store/load-assets.mjs +42 -36
  86. package/build-module/store/load-assets.mjs.map +1 -7
  87. package/build-module/store/reducer.mjs +81 -74
  88. package/build-module/store/reducer.mjs.map +1 -7
  89. package/build-module/store/resolvers.mjs +13 -26
  90. package/build-module/store/resolvers.mjs.map +1 -7
  91. package/build-module/store/selectors.mjs +99 -76
  92. package/build-module/store/selectors.mjs.map +1 -7
  93. package/build-module/store/utils/get-plugin-url.mjs +14 -12
  94. package/build-module/store/utils/get-plugin-url.mjs.map +1 -7
  95. package/build-style/style-rtl.css +6 -12
  96. package/build-style/style.css +6 -12
  97. package/package.json +25 -27
  98. package/src/components/downloadable-block-list-item/index.jsx +2 -2
  99. package/src/components/downloadable-block-list-item/style.scss +6 -6
  100. package/src/components/downloadable-blocks-panel/index.jsx +2 -2
  101. package/src/components/downloadable-blocks-panel/no-results.jsx +15 -8
  102. package/CHANGELOG.md +0 -295
  103. package/build/index.cjs.map +0 -7
  104. package/build/lock-unlock.cjs +0 -36
  105. package/build/lock-unlock.cjs.map +0 -7
  106. package/build-module/index.mjs.map +0 -7
  107. package/build-module/lock-unlock.mjs +0 -11
  108. package/build-module/lock-unlock.mjs.map +0 -7
  109. package/src/lock-unlock.js +0 -7
@@ -1,89 +1,112 @@
1
+ import { createRegistrySelector, createSelector } from "@wordpress/data";
2
+ import { store } from "@wordpress/block-editor";
1
3
  // packages/block-directory/src/store/selectors.js
2
- import { createSelector, createRegistrySelector } from "@wordpress/data";
3
- import { store as blockEditorStore } from "@wordpress/block-editor";
4
- var EMPTY_ARRAY = [];
4
+ const EMPTY_ARRAY = [];
5
+ /**
6
+ * Returns true if application is requesting for downloadable blocks.
7
+ *
8
+ * @param {Object} state Global application state.
9
+ * @param {string} filterValue Search string.
10
+ *
11
+ * @return {boolean} Whether a request is in progress for the blocks list.
12
+ */
5
13
  function isRequestingDownloadableBlocks(state, filterValue) {
6
- return state.downloadableBlocks[filterValue]?.isRequesting ?? false;
14
+ return state.downloadableBlocks[filterValue]?.isRequesting ?? false;
7
15
  }
16
+ /**
17
+ * Returns the available uninstalled blocks.
18
+ *
19
+ * @param {Object} state Global application state.
20
+ * @param {string} filterValue Search string.
21
+ *
22
+ * @return {Array} Downloadable blocks.
23
+ */
8
24
  function getDownloadableBlocks(state, filterValue) {
9
- return state.downloadableBlocks[filterValue]?.results ?? EMPTY_ARRAY;
25
+ return state.downloadableBlocks[filterValue]?.results ?? EMPTY_ARRAY;
10
26
  }
27
+ /**
28
+ * Returns the block types that have been installed on the server in this
29
+ * session.
30
+ *
31
+ * @param {Object} state Global application state.
32
+ *
33
+ * @return {Array} Block type items
34
+ */
11
35
  function getInstalledBlockTypes(state) {
12
- return state.blockManagement.installedBlockTypes;
36
+ return state.blockManagement.installedBlockTypes;
13
37
  }
14
- var getNewBlockTypes = createRegistrySelector(
15
- (select) => createSelector(
16
- (state) => {
17
- const installedBlockTypes = getInstalledBlockTypes(state);
18
- if (!installedBlockTypes.length) {
19
- return EMPTY_ARRAY;
20
- }
21
- const { getBlockName, getClientIdsWithDescendants } = select(blockEditorStore);
22
- const installedBlockNames = installedBlockTypes.map(
23
- (blockType) => blockType.name
24
- );
25
- const foundBlockNames = getClientIdsWithDescendants().flatMap(
26
- (clientId) => {
27
- const blockName = getBlockName(clientId);
28
- return installedBlockNames.includes(blockName) ? blockName : [];
29
- }
30
- );
31
- const newBlockTypes = installedBlockTypes.filter(
32
- (blockType) => foundBlockNames.includes(blockType.name)
33
- );
34
- return newBlockTypes.length > 0 ? newBlockTypes : EMPTY_ARRAY;
35
- },
36
- (state) => [
37
- getInstalledBlockTypes(state),
38
- select(blockEditorStore).getClientIdsWithDescendants()
39
- ]
40
- )
41
- );
42
- var getUnusedBlockTypes = createRegistrySelector(
43
- (select) => createSelector(
44
- (state) => {
45
- const installedBlockTypes = getInstalledBlockTypes(state);
46
- if (!installedBlockTypes.length) {
47
- return EMPTY_ARRAY;
48
- }
49
- const { getBlockName, getClientIdsWithDescendants } = select(blockEditorStore);
50
- const installedBlockNames = installedBlockTypes.map(
51
- (blockType) => blockType.name
52
- );
53
- const foundBlockNames = getClientIdsWithDescendants().flatMap(
54
- (clientId) => {
55
- const blockName = getBlockName(clientId);
56
- return installedBlockNames.includes(blockName) ? blockName : [];
57
- }
58
- );
59
- const unusedBlockTypes = installedBlockTypes.filter(
60
- (blockType) => !foundBlockNames.includes(blockType.name)
61
- );
62
- return unusedBlockTypes.length > 0 ? unusedBlockTypes : EMPTY_ARRAY;
63
- },
64
- (state) => [
65
- getInstalledBlockTypes(state),
66
- select(blockEditorStore).getClientIdsWithDescendants()
67
- ]
68
- )
69
- );
38
+ /**
39
+ * Returns block types that have been installed on the server and used in the
40
+ * current post.
41
+ *
42
+ * @param {Object} state Global application state.
43
+ *
44
+ * @return {Array} Block type items.
45
+ */
46
+ const getNewBlockTypes = createRegistrySelector((select) => createSelector((state) => {
47
+ const installedBlockTypes = getInstalledBlockTypes(state);
48
+ if (!installedBlockTypes.length) return EMPTY_ARRAY;
49
+ const { getBlockName, getClientIdsWithDescendants } = select(store);
50
+ const installedBlockNames = installedBlockTypes.map((blockType) => blockType.name);
51
+ const foundBlockNames = getClientIdsWithDescendants().flatMap((clientId) => {
52
+ const blockName = getBlockName(clientId);
53
+ return installedBlockNames.includes(blockName) ? blockName : [];
54
+ });
55
+ const newBlockTypes = installedBlockTypes.filter((blockType) => foundBlockNames.includes(blockType.name));
56
+ return newBlockTypes.length > 0 ? newBlockTypes : EMPTY_ARRAY;
57
+ }, (state) => [getInstalledBlockTypes(state), select(store).getClientIdsWithDescendants()]));
58
+ /**
59
+ * Returns the block types that have been installed on the server but are not
60
+ * used in the current post.
61
+ *
62
+ * @param {Object} state Global application state.
63
+ *
64
+ * @return {Array} Block type items.
65
+ */
66
+ const getUnusedBlockTypes = createRegistrySelector((select) => createSelector((state) => {
67
+ const installedBlockTypes = getInstalledBlockTypes(state);
68
+ if (!installedBlockTypes.length) return EMPTY_ARRAY;
69
+ const { getBlockName, getClientIdsWithDescendants } = select(store);
70
+ const installedBlockNames = installedBlockTypes.map((blockType) => blockType.name);
71
+ const foundBlockNames = getClientIdsWithDescendants().flatMap((clientId) => {
72
+ const blockName = getBlockName(clientId);
73
+ return installedBlockNames.includes(blockName) ? blockName : [];
74
+ });
75
+ const unusedBlockTypes = installedBlockTypes.filter((blockType) => !foundBlockNames.includes(blockType.name));
76
+ return unusedBlockTypes.length > 0 ? unusedBlockTypes : EMPTY_ARRAY;
77
+ }, (state) => [getInstalledBlockTypes(state), select(store).getClientIdsWithDescendants()]));
78
+ /**
79
+ * Returns true if a block plugin install is in progress.
80
+ *
81
+ * @param {Object} state Global application state.
82
+ * @param {string} blockId Id of the block.
83
+ *
84
+ * @return {boolean} Whether this block is currently being installed.
85
+ */
70
86
  function isInstalling(state, blockId) {
71
- return state.blockManagement.isInstalling[blockId] || false;
87
+ return state.blockManagement.isInstalling[blockId] || false;
72
88
  }
89
+ /**
90
+ * Returns all block error notices.
91
+ *
92
+ * @param {Object} state Global application state.
93
+ *
94
+ * @return {Object} Object with error notices.
95
+ */
73
96
  function getErrorNotices(state) {
74
- return state.errorNotices;
97
+ return state.errorNotices;
75
98
  }
99
+ /**
100
+ * Returns the error notice for a given block.
101
+ *
102
+ * @param {Object} state Global application state.
103
+ * @param {string} blockId The ID of the block plugin. eg: my-block
104
+ *
105
+ * @return {string|boolean} The error text, or false if no error.
106
+ */
76
107
  function getErrorNoticeForBlock(state, blockId) {
77
- return state.errorNotices[blockId];
108
+ return state.errorNotices[blockId];
78
109
  }
79
- export {
80
- getDownloadableBlocks,
81
- getErrorNoticeForBlock,
82
- getErrorNotices,
83
- getInstalledBlockTypes,
84
- getNewBlockTypes,
85
- getUnusedBlockTypes,
86
- isInstalling,
87
- isRequestingDownloadableBlocks
88
- };
89
- //# sourceMappingURL=selectors.mjs.map
110
+ export { getDownloadableBlocks, getErrorNoticeForBlock, getErrorNotices, getInstalledBlockTypes, getNewBlockTypes, getUnusedBlockTypes, isInstalling, isRequestingDownloadableBlocks };
111
+
112
+ //# sourceMappingURL=selectors.mjs.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/store/selectors.js"],
4
- "sourcesContent": ["import { createSelector, createRegistrySelector } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\nconst EMPTY_ARRAY = [];\n\n/**\n * Returns true if application is requesting for downloadable blocks.\n *\n * @param {Object} state Global application state.\n * @param {string} filterValue Search string.\n *\n * @return {boolean} Whether a request is in progress for the blocks list.\n */\nexport function isRequestingDownloadableBlocks( state, filterValue ) {\n\treturn state.downloadableBlocks[ filterValue ]?.isRequesting ?? false;\n}\n\n/**\n * Returns the available uninstalled blocks.\n *\n * @param {Object} state Global application state.\n * @param {string} filterValue Search string.\n *\n * @return {Array} Downloadable blocks.\n */\nexport function getDownloadableBlocks( state, filterValue ) {\n\treturn state.downloadableBlocks[ filterValue ]?.results ?? EMPTY_ARRAY;\n}\n\n/**\n * Returns the block types that have been installed on the server in this\n * session.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Block type items\n */\nexport function getInstalledBlockTypes( state ) {\n\treturn state.blockManagement.installedBlockTypes;\n}\n\n/**\n * Returns block types that have been installed on the server and used in the\n * current post.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Block type items.\n */\nexport const getNewBlockTypes = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state ) => {\n\t\t\tconst installedBlockTypes = getInstalledBlockTypes( state );\n\t\t\tif ( ! installedBlockTypes.length ) {\n\t\t\t\treturn EMPTY_ARRAY;\n\t\t\t}\n\n\t\t\tconst { getBlockName, getClientIdsWithDescendants } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst installedBlockNames = installedBlockTypes.map(\n\t\t\t\t( blockType ) => blockType.name\n\t\t\t);\n\t\t\tconst foundBlockNames = getClientIdsWithDescendants().flatMap(\n\t\t\t\t( clientId ) => {\n\t\t\t\t\tconst blockName = getBlockName( clientId );\n\t\t\t\t\treturn installedBlockNames.includes( blockName )\n\t\t\t\t\t\t? blockName\n\t\t\t\t\t\t: [];\n\t\t\t\t}\n\t\t\t);\n\t\t\tconst newBlockTypes = installedBlockTypes.filter( ( blockType ) =>\n\t\t\t\tfoundBlockNames.includes( blockType.name )\n\t\t\t);\n\n\t\t\treturn newBlockTypes.length > 0 ? newBlockTypes : EMPTY_ARRAY;\n\t\t},\n\t\t( state ) => [\n\t\t\tgetInstalledBlockTypes( state ),\n\t\t\tselect( blockEditorStore ).getClientIdsWithDescendants(),\n\t\t]\n\t)\n);\n\n/**\n * Returns the block types that have been installed on the server but are not\n * used in the current post.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Block type items.\n */\nexport const getUnusedBlockTypes = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state ) => {\n\t\t\tconst installedBlockTypes = getInstalledBlockTypes( state );\n\t\t\tif ( ! installedBlockTypes.length ) {\n\t\t\t\treturn EMPTY_ARRAY;\n\t\t\t}\n\n\t\t\tconst { getBlockName, getClientIdsWithDescendants } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst installedBlockNames = installedBlockTypes.map(\n\t\t\t\t( blockType ) => blockType.name\n\t\t\t);\n\t\t\tconst foundBlockNames = getClientIdsWithDescendants().flatMap(\n\t\t\t\t( clientId ) => {\n\t\t\t\t\tconst blockName = getBlockName( clientId );\n\t\t\t\t\treturn installedBlockNames.includes( blockName )\n\t\t\t\t\t\t? blockName\n\t\t\t\t\t\t: [];\n\t\t\t\t}\n\t\t\t);\n\t\t\tconst unusedBlockTypes = installedBlockTypes.filter(\n\t\t\t\t( blockType ) => ! foundBlockNames.includes( blockType.name )\n\t\t\t);\n\n\t\t\treturn unusedBlockTypes.length > 0 ? unusedBlockTypes : EMPTY_ARRAY;\n\t\t},\n\t\t( state ) => [\n\t\t\tgetInstalledBlockTypes( state ),\n\t\t\tselect( blockEditorStore ).getClientIdsWithDescendants(),\n\t\t]\n\t)\n);\n\n/**\n * Returns true if a block plugin install is in progress.\n *\n * @param {Object} state Global application state.\n * @param {string} blockId Id of the block.\n *\n * @return {boolean} Whether this block is currently being installed.\n */\nexport function isInstalling( state, blockId ) {\n\treturn state.blockManagement.isInstalling[ blockId ] || false;\n}\n\n/**\n * Returns all block error notices.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Object with error notices.\n */\nexport function getErrorNotices( state ) {\n\treturn state.errorNotices;\n}\n\n/**\n * Returns the error notice for a given block.\n *\n * @param {Object} state Global application state.\n * @param {string} blockId The ID of the block plugin. eg: my-block\n *\n * @return {string|boolean} The error text, or false if no error.\n */\nexport function getErrorNoticeForBlock( state, blockId ) {\n\treturn state.errorNotices[ blockId ];\n}\n"],
5
- "mappings": ";AAAA,SAAS,gBAAgB,8BAA8B;AACvD,SAAS,SAAS,wBAAwB;AAE1C,IAAM,cAAc,CAAC;AAUd,SAAS,+BAAgC,OAAO,aAAc;AACpE,SAAO,MAAM,mBAAoB,WAAY,GAAG,gBAAgB;AACjE;AAUO,SAAS,sBAAuB,OAAO,aAAc;AAC3D,SAAO,MAAM,mBAAoB,WAAY,GAAG,WAAW;AAC5D;AAUO,SAAS,uBAAwB,OAAQ;AAC/C,SAAO,MAAM,gBAAgB;AAC9B;AAUO,IAAM,mBAAmB;AAAA,EAAwB,CAAE,WACzD;AAAA,IACC,CAAE,UAAW;AACZ,YAAM,sBAAsB,uBAAwB,KAAM;AAC1D,UAAK,CAAE,oBAAoB,QAAS;AACnC,eAAO;AAAA,MACR;AAEA,YAAM,EAAE,cAAc,4BAA4B,IACjD,OAAQ,gBAAiB;AAC1B,YAAM,sBAAsB,oBAAoB;AAAA,QAC/C,CAAE,cAAe,UAAU;AAAA,MAC5B;AACA,YAAM,kBAAkB,4BAA4B,EAAE;AAAA,QACrD,CAAE,aAAc;AACf,gBAAM,YAAY,aAAc,QAAS;AACzC,iBAAO,oBAAoB,SAAU,SAAU,IAC5C,YACA,CAAC;AAAA,QACL;AAAA,MACD;AACA,YAAM,gBAAgB,oBAAoB;AAAA,QAAQ,CAAE,cACnD,gBAAgB,SAAU,UAAU,IAAK;AAAA,MAC1C;AAEA,aAAO,cAAc,SAAS,IAAI,gBAAgB;AAAA,IACnD;AAAA,IACA,CAAE,UAAW;AAAA,MACZ,uBAAwB,KAAM;AAAA,MAC9B,OAAQ,gBAAiB,EAAE,4BAA4B;AAAA,IACxD;AAAA,EACD;AACD;AAUO,IAAM,sBAAsB;AAAA,EAAwB,CAAE,WAC5D;AAAA,IACC,CAAE,UAAW;AACZ,YAAM,sBAAsB,uBAAwB,KAAM;AAC1D,UAAK,CAAE,oBAAoB,QAAS;AACnC,eAAO;AAAA,MACR;AAEA,YAAM,EAAE,cAAc,4BAA4B,IACjD,OAAQ,gBAAiB;AAC1B,YAAM,sBAAsB,oBAAoB;AAAA,QAC/C,CAAE,cAAe,UAAU;AAAA,MAC5B;AACA,YAAM,kBAAkB,4BAA4B,EAAE;AAAA,QACrD,CAAE,aAAc;AACf,gBAAM,YAAY,aAAc,QAAS;AACzC,iBAAO,oBAAoB,SAAU,SAAU,IAC5C,YACA,CAAC;AAAA,QACL;AAAA,MACD;AACA,YAAM,mBAAmB,oBAAoB;AAAA,QAC5C,CAAE,cAAe,CAAE,gBAAgB,SAAU,UAAU,IAAK;AAAA,MAC7D;AAEA,aAAO,iBAAiB,SAAS,IAAI,mBAAmB;AAAA,IACzD;AAAA,IACA,CAAE,UAAW;AAAA,MACZ,uBAAwB,KAAM;AAAA,MAC9B,OAAQ,gBAAiB,EAAE,4BAA4B;AAAA,IACxD;AAAA,EACD;AACD;AAUO,SAAS,aAAc,OAAO,SAAU;AAC9C,SAAO,MAAM,gBAAgB,aAAc,OAAQ,KAAK;AACzD;AASO,SAAS,gBAAiB,OAAQ;AACxC,SAAO,MAAM;AACd;AAUO,SAAS,uBAAwB,OAAO,SAAU;AACxD,SAAO,MAAM,aAAc,OAAQ;AACpC;",
6
- "names": []
7
- }
1
+ {"version":3,"file":"selectors.mjs","names":["blockEditorStore"],"sources":["../../src/store/selectors.js"],"sourcesContent":["import { createSelector, createRegistrySelector } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\nconst EMPTY_ARRAY = [];\n\n/**\n * Returns true if application is requesting for downloadable blocks.\n *\n * @param {Object} state Global application state.\n * @param {string} filterValue Search string.\n *\n * @return {boolean} Whether a request is in progress for the blocks list.\n */\nexport function isRequestingDownloadableBlocks( state, filterValue ) {\n\treturn state.downloadableBlocks[ filterValue ]?.isRequesting ?? false;\n}\n\n/**\n * Returns the available uninstalled blocks.\n *\n * @param {Object} state Global application state.\n * @param {string} filterValue Search string.\n *\n * @return {Array} Downloadable blocks.\n */\nexport function getDownloadableBlocks( state, filterValue ) {\n\treturn state.downloadableBlocks[ filterValue ]?.results ?? EMPTY_ARRAY;\n}\n\n/**\n * Returns the block types that have been installed on the server in this\n * session.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Block type items\n */\nexport function getInstalledBlockTypes( state ) {\n\treturn state.blockManagement.installedBlockTypes;\n}\n\n/**\n * Returns block types that have been installed on the server and used in the\n * current post.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Block type items.\n */\nexport const getNewBlockTypes = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state ) => {\n\t\t\tconst installedBlockTypes = getInstalledBlockTypes( state );\n\t\t\tif ( ! installedBlockTypes.length ) {\n\t\t\t\treturn EMPTY_ARRAY;\n\t\t\t}\n\n\t\t\tconst { getBlockName, getClientIdsWithDescendants } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst installedBlockNames = installedBlockTypes.map(\n\t\t\t\t( blockType ) => blockType.name\n\t\t\t);\n\t\t\tconst foundBlockNames = getClientIdsWithDescendants().flatMap(\n\t\t\t\t( clientId ) => {\n\t\t\t\t\tconst blockName = getBlockName( clientId );\n\t\t\t\t\treturn installedBlockNames.includes( blockName )\n\t\t\t\t\t\t? blockName\n\t\t\t\t\t\t: [];\n\t\t\t\t}\n\t\t\t);\n\t\t\tconst newBlockTypes = installedBlockTypes.filter( ( blockType ) =>\n\t\t\t\tfoundBlockNames.includes( blockType.name )\n\t\t\t);\n\n\t\t\treturn newBlockTypes.length > 0 ? newBlockTypes : EMPTY_ARRAY;\n\t\t},\n\t\t( state ) => [\n\t\t\tgetInstalledBlockTypes( state ),\n\t\t\tselect( blockEditorStore ).getClientIdsWithDescendants(),\n\t\t]\n\t)\n);\n\n/**\n * Returns the block types that have been installed on the server but are not\n * used in the current post.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Block type items.\n */\nexport const getUnusedBlockTypes = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state ) => {\n\t\t\tconst installedBlockTypes = getInstalledBlockTypes( state );\n\t\t\tif ( ! installedBlockTypes.length ) {\n\t\t\t\treturn EMPTY_ARRAY;\n\t\t\t}\n\n\t\t\tconst { getBlockName, getClientIdsWithDescendants } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst installedBlockNames = installedBlockTypes.map(\n\t\t\t\t( blockType ) => blockType.name\n\t\t\t);\n\t\t\tconst foundBlockNames = getClientIdsWithDescendants().flatMap(\n\t\t\t\t( clientId ) => {\n\t\t\t\t\tconst blockName = getBlockName( clientId );\n\t\t\t\t\treturn installedBlockNames.includes( blockName )\n\t\t\t\t\t\t? blockName\n\t\t\t\t\t\t: [];\n\t\t\t\t}\n\t\t\t);\n\t\t\tconst unusedBlockTypes = installedBlockTypes.filter(\n\t\t\t\t( blockType ) => ! foundBlockNames.includes( blockType.name )\n\t\t\t);\n\n\t\t\treturn unusedBlockTypes.length > 0 ? unusedBlockTypes : EMPTY_ARRAY;\n\t\t},\n\t\t( state ) => [\n\t\t\tgetInstalledBlockTypes( state ),\n\t\t\tselect( blockEditorStore ).getClientIdsWithDescendants(),\n\t\t]\n\t)\n);\n\n/**\n * Returns true if a block plugin install is in progress.\n *\n * @param {Object} state Global application state.\n * @param {string} blockId Id of the block.\n *\n * @return {boolean} Whether this block is currently being installed.\n */\nexport function isInstalling( state, blockId ) {\n\treturn state.blockManagement.isInstalling[ blockId ] || false;\n}\n\n/**\n * Returns all block error notices.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Object with error notices.\n */\nexport function getErrorNotices( state ) {\n\treturn state.errorNotices;\n}\n\n/**\n * Returns the error notice for a given block.\n *\n * @param {Object} state Global application state.\n * @param {string} blockId The ID of the block plugin. eg: my-block\n *\n * @return {string|boolean} The error text, or false if no error.\n */\nexport function getErrorNoticeForBlock( state, blockId ) {\n\treturn state.errorNotices[ blockId ];\n}\n"],"mappings":";;;AAGA,MAAM,cAAc,CAAC;;;;;;;;;AAUrB,SAAgB,+BAAgC,OAAO,aAAc;CACpE,OAAO,MAAM,mBAAoB,YAAa,EAAE,gBAAgB;AACjE;;;;;;;;;AAUA,SAAgB,sBAAuB,OAAO,aAAc;CAC3D,OAAO,MAAM,mBAAoB,YAAa,EAAE,WAAW;AAC5D;;;;;;;;;AAUA,SAAgB,uBAAwB,OAAQ;CAC/C,OAAO,MAAM,gBAAgB;AAC9B;;;;;;;;;AAUA,MAAa,mBAAmB,wBAA0B,WACzD,gBACG,UAAW;CACZ,MAAM,sBAAsB,uBAAwB,KAAM;CAC1D,IAAK,CAAE,oBAAoB,QAC1B,OAAO;CAGR,MAAM,EAAE,cAAc,gCACrB,OAAQA,KAAiB;CAC1B,MAAM,sBAAsB,oBAAoB,KAC7C,cAAe,UAAU,IAC5B;CACA,MAAM,kBAAkB,4BAA4B,CAAC,CAAC,SACnD,aAAc;EACf,MAAM,YAAY,aAAc,QAAS;EACzC,OAAO,oBAAoB,SAAU,SAAU,IAC5C,YACA,CAAC;CACL,CACD;CACA,MAAM,gBAAgB,oBAAoB,QAAU,cACnD,gBAAgB,SAAU,UAAU,IAAK,CAC1C;CAEA,OAAO,cAAc,SAAS,IAAI,gBAAgB;AACnD,IACE,UAAW,CACZ,uBAAwB,KAAM,GAC9B,OAAQA,KAAiB,CAAC,CAAC,4BAA4B,CACxD,CACD,CACD;;;;;;;;;AAUA,MAAa,sBAAsB,wBAA0B,WAC5D,gBACG,UAAW;CACZ,MAAM,sBAAsB,uBAAwB,KAAM;CAC1D,IAAK,CAAE,oBAAoB,QAC1B,OAAO;CAGR,MAAM,EAAE,cAAc,gCACrB,OAAQA,KAAiB;CAC1B,MAAM,sBAAsB,oBAAoB,KAC7C,cAAe,UAAU,IAC5B;CACA,MAAM,kBAAkB,4BAA4B,CAAC,CAAC,SACnD,aAAc;EACf,MAAM,YAAY,aAAc,QAAS;EACzC,OAAO,oBAAoB,SAAU,SAAU,IAC5C,YACA,CAAC;CACL,CACD;CACA,MAAM,mBAAmB,oBAAoB,QAC1C,cAAe,CAAE,gBAAgB,SAAU,UAAU,IAAK,CAC7D;CAEA,OAAO,iBAAiB,SAAS,IAAI,mBAAmB;AACzD,IACE,UAAW,CACZ,uBAAwB,KAAM,GAC9B,OAAQA,KAAiB,CAAC,CAAC,4BAA4B,CACxD,CACD,CACD;;;;;;;;;AAUA,SAAgB,aAAc,OAAO,SAAU;CAC9C,OAAO,MAAM,gBAAgB,aAAc,YAAa;AACzD;;;;;;;;AASA,SAAgB,gBAAiB,OAAQ;CACxC,OAAO,MAAM;AACd;;;;;;;;;AAUA,SAAgB,uBAAwB,OAAO,SAAU;CACxD,OAAO,MAAM,aAAc;AAC5B"}
@@ -1,15 +1,17 @@
1
1
  // packages/block-directory/src/store/utils/get-plugin-url.js
2
+ /**
3
+ * Get the plugin's direct API link out of a block-directory response.
4
+ *
5
+ * @param {Object} block The block object
6
+ *
7
+ * @return {string} The plugin URL, if exists.
8
+ */
2
9
  function getPluginUrl(block) {
3
- if (!block) {
4
- return false;
5
- }
6
- const link = block.links["wp:plugin"] || block.links.self;
7
- if (link && link.length) {
8
- return link[0].href;
9
- }
10
- return false;
10
+ if (!block) return false;
11
+ const link = block.links["wp:plugin"] || block.links.self;
12
+ if (link && link.length) return link[0].href;
13
+ return false;
11
14
  }
12
- export {
13
- getPluginUrl as default
14
- };
15
- //# sourceMappingURL=get-plugin-url.mjs.map
15
+ export { getPluginUrl as default };
16
+
17
+ //# sourceMappingURL=get-plugin-url.mjs.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/store/utils/get-plugin-url.js"],
4
- "sourcesContent": ["/**\n * Get the plugin's direct API link out of a block-directory response.\n *\n * @param {Object} block The block object\n *\n * @return {string} The plugin URL, if exists.\n */\nexport default function getPluginUrl( block ) {\n\tif ( ! block ) {\n\t\treturn false;\n\t}\n\tconst link = block.links[ 'wp:plugin' ] || block.links.self;\n\tif ( link && link.length ) {\n\t\treturn link[ 0 ].href;\n\t}\n\treturn false;\n}\n"],
5
- "mappings": ";AAOe,SAAR,aAA+B,OAAQ;AAC7C,MAAK,CAAE,OAAQ;AACd,WAAO;AAAA,EACR;AACA,QAAM,OAAO,MAAM,MAAO,WAAY,KAAK,MAAM,MAAM;AACvD,MAAK,QAAQ,KAAK,QAAS;AAC1B,WAAO,KAAM,CAAE,EAAE;AAAA,EAClB;AACA,SAAO;AACR;",
6
- "names": []
7
- }
1
+ {"version":3,"file":"get-plugin-url.mjs","names":[],"sources":["../../../src/store/utils/get-plugin-url.js"],"sourcesContent":["/**\n * Get the plugin's direct API link out of a block-directory response.\n *\n * @param {Object} block The block object\n *\n * @return {string} The plugin URL, if exists.\n */\nexport default function getPluginUrl( block ) {\n\tif ( ! block ) {\n\t\treturn false;\n\t}\n\tconst link = block.links[ 'wp:plugin' ] || block.links.self;\n\tif ( link && link.length ) {\n\t\treturn link[ 0 ].href;\n\t}\n\treturn false;\n}\n"],"mappings":";;;;;;;;AAOA,SAAwB,aAAc,OAAQ;CAC7C,IAAK,CAAE,OACN,OAAO;CAER,MAAM,OAAO,MAAM,MAAO,gBAAiB,MAAM,MAAM;CACvD,IAAK,QAAQ,KAAK,QACjB,OAAO,KAAM,EAAG,CAAC;CAElB,OAAO;AACR"}
@@ -187,26 +187,20 @@ body.admin-color-fresh {
187
187
  appearance: none;
188
188
  background: none;
189
189
  border: 0;
190
+ border-radius: var(--wpds-border-radius-sm, 2px);
190
191
  text-align: right;
191
- }
192
- @media not (prefers-reduced-motion) {
193
- .block-directory-downloadable-block-list-item {
194
- transition: box-shadow 0.1s linear;
195
- }
196
- }
197
- .block-directory-downloadable-block-list-item {
192
+ scroll-margin: 4px;
198
193
  position: relative;
199
194
  }
200
195
  .block-directory-downloadable-block-list-item:not([aria-disabled=true]) {
201
196
  cursor: var(--wpds-cursor-control, pointer);
202
197
  }
203
- .block-directory-downloadable-block-list-item:hover {
204
- box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
205
- outline: 2px solid transparent;
198
+ .block-directory-downloadable-block-list-item:hover:not([aria-disabled=true]) {
199
+ background-color: var(--wpds-color-background-interactive-neutral-weak-active, #ededed);
206
200
  }
207
201
  .block-directory-downloadable-block-list-item[data-focus-visible] {
208
- box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
209
- outline: 2px solid transparent;
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)));
203
+ outline-offset: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px));
210
204
  }
211
205
  .block-directory-downloadable-block-list-item.is-installing .block-directory-downloadable-block-list-item__author {
212
206
  display: none;
@@ -187,26 +187,20 @@ body.admin-color-fresh {
187
187
  appearance: none;
188
188
  background: none;
189
189
  border: 0;
190
+ border-radius: var(--wpds-border-radius-sm, 2px);
190
191
  text-align: left;
191
- }
192
- @media not (prefers-reduced-motion) {
193
- .block-directory-downloadable-block-list-item {
194
- transition: box-shadow 0.1s linear;
195
- }
196
- }
197
- .block-directory-downloadable-block-list-item {
192
+ scroll-margin: 4px;
198
193
  position: relative;
199
194
  }
200
195
  .block-directory-downloadable-block-list-item:not([aria-disabled=true]) {
201
196
  cursor: var(--wpds-cursor-control, pointer);
202
197
  }
203
- .block-directory-downloadable-block-list-item:hover {
204
- box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
205
- outline: 2px solid transparent;
198
+ .block-directory-downloadable-block-list-item:hover:not([aria-disabled=true]) {
199
+ background-color: var(--wpds-color-background-interactive-neutral-weak-active, #ededed);
206
200
  }
207
201
  .block-directory-downloadable-block-list-item[data-focus-visible] {
208
- box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
209
- outline: 2px solid transparent;
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)));
203
+ outline-offset: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px));
210
204
  }
211
205
  .block-directory-downloadable-block-list-item.is-installing .block-directory-downloadable-block-list-item__author {
212
206
  display: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-directory",
3
- "version": "5.57.0",
3
+ "version": "6.1.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",
@@ -19,15 +19,14 @@
19
19
  "url": "https://github.com/WordPress/gutenberg/issues"
20
20
  },
21
21
  "engines": {
22
- "node": ">=18.12.0"
22
+ "node": ">=22.13.0"
23
23
  },
24
24
  "files": [
25
25
  "src",
26
26
  "build",
27
27
  "build-module",
28
28
  "build-style",
29
- "build-types",
30
- "*.md"
29
+ "build-types"
31
30
  ],
32
31
  "main": "build/index.cjs",
33
32
  "module": "build-module/index.mjs",
@@ -40,35 +39,34 @@
40
39
  },
41
40
  "wpScript": true,
42
41
  "dependencies": {
43
- "@wordpress/a11y": "^4.57.0",
44
- "@wordpress/api-fetch": "^7.57.0",
45
- "@wordpress/base-styles": "^13.3.0",
46
- "@wordpress/block-editor": "^18.1.0",
47
- "@wordpress/blocks": "^16.2.0",
48
- "@wordpress/components": "^42.0.0",
49
- "@wordpress/compose": "^8.10.0",
50
- "@wordpress/core-data": "^8.2.0",
51
- "@wordpress/data": "^10.57.0",
52
- "@wordpress/editor": "^15.2.0",
53
- "@wordpress/element": "^9.0.0",
54
- "@wordpress/hooks": "^4.57.0",
55
- "@wordpress/html-entities": "^4.57.0",
56
- "@wordpress/i18n": "^6.30.0",
57
- "@wordpress/icons": "^18.0.0",
58
- "@wordpress/notices": "^5.57.0",
59
- "@wordpress/plugins": "^7.57.0",
60
- "@wordpress/private-apis": "^2.0.0",
61
- "@wordpress/ui": "^0.24.0",
62
- "@wordpress/url": "^4.57.0",
42
+ "@wordpress/a11y": "^5.1.0",
43
+ "@wordpress/api-fetch": "^8.1.0",
44
+ "@wordpress/base-styles": "^15.0.0",
45
+ "@wordpress/block-editor": "^20.0.0",
46
+ "@wordpress/blocks": "^17.1.0",
47
+ "@wordpress/components": "^44.0.0",
48
+ "@wordpress/compose": "^9.1.0",
49
+ "@wordpress/core-data": "^9.1.0",
50
+ "@wordpress/data": "^11.1.0",
51
+ "@wordpress/editor": "^16.1.0",
52
+ "@wordpress/element": "^10.1.0",
53
+ "@wordpress/hooks": "^5.1.0",
54
+ "@wordpress/html-entities": "^5.1.0",
55
+ "@wordpress/i18n": "^7.1.0",
56
+ "@wordpress/icons": "^20.0.0",
57
+ "@wordpress/notices": "^6.1.0",
58
+ "@wordpress/plugins": "^8.1.0",
59
+ "@wordpress/ui": "^0.26.0",
60
+ "@wordpress/url": "^5.1.0",
63
61
  "change-case": "^4.1.2",
64
62
  "clsx": "^2.1.1"
65
63
  },
66
64
  "devDependencies": {
67
65
  "@testing-library/dom": "^10.4.2",
68
66
  "@testing-library/react": "^16.3.3",
69
- "@testing-library/user-event": "^14.6.1",
67
+ "@testing-library/user-event": "^14.6.8",
70
68
  "deep-freeze": "^0.0.1",
71
- "vitest": "^5.0.3"
69
+ "vitest": "^5.0.5"
72
70
  },
73
71
  "peerDependencies": {
74
72
  "react": "^18 || ^19",
@@ -77,5 +75,5 @@
77
75
  "publishConfig": {
78
76
  "access": "public"
79
77
  },
80
- "gitHead": "12441e2520c78b2254a792a8cba40c34110be060"
78
+ "gitHead": "9b70363b9f93cff0583a1f3153738d383cf5a49e"
81
79
  }
@@ -1,6 +1,6 @@
1
1
  import clsx from 'clsx';
2
2
  import { __, _n, sprintf } from '@wordpress/i18n';
3
- import { Spinner, Composite } from '@wordpress/components';
3
+ import { Spinner as WCSpinner, Composite } from '@wordpress/components';
4
4
  import { createInterpolateElement } from '@wordpress/element';
5
5
  import { decodeEntities } from '@wordpress/html-entities';
6
6
  import { getBlockType } from '@wordpress/blocks';
@@ -123,7 +123,7 @@ function DownloadableBlockListItem( { item, onClick } ) {
123
123
  />
124
124
  { isInstalling ? (
125
125
  <span className="block-directory-downloadable-block-list-item__spinner">
126
- <Spinner />
126
+ <WCSpinner />
127
127
  </span>
128
128
  ) : (
129
129
  <BlockRatings rating={ rating } />
@@ -18,11 +18,11 @@
18
18
  appearance: none;
19
19
  background: none;
20
20
  border: 0;
21
+ border-radius: var(--wpds-border-radius-sm);
21
22
  text-align: left;
22
23
 
23
- @media not (prefers-reduced-motion) {
24
- transition: box-shadow 0.1s linear;
25
- }
24
+ // Keep the focus ring visible when keyboard navigation scrolls an item into view.
25
+ scroll-margin: $grid-unit-05;
26
26
 
27
27
  // The item contains absolutely positioned items.
28
28
  // Set `position: relative` on the parent to prevent overflow issues
@@ -35,12 +35,12 @@
35
35
  cursor: var(--wpds-cursor-control);
36
36
  }
37
37
 
38
- &:hover {
39
- @include button-style__focus();
38
+ &:hover:not([aria-disabled="true"]) {
39
+ background-color: var(--wpds-color-background-interactive-neutral-weak-active);
40
40
  }
41
41
 
42
42
  &[data-focus-visible] {
43
- @include button-style__focus();
43
+ @include outset-ring__focus();
44
44
  }
45
45
 
46
46
  &.is-installing {
@@ -1,5 +1,5 @@
1
1
  import { __ } from '@wordpress/i18n';
2
- import { Spinner } from '@wordpress/components';
2
+ import { Spinner as WCSpinner } from '@wordpress/components';
3
3
  import { store as coreStore } from '@wordpress/core-data';
4
4
  import { useSelect } from '@wordpress/data';
5
5
  import { getBlockType } from '@wordpress/blocks';
@@ -88,7 +88,7 @@ export default function DownloadableBlocksPanel( {
88
88
  </>
89
89
  ) }
90
90
  <div className="block-directory-downloadable-blocks-panel has-blocks-loading">
91
- <Spinner />
91
+ <WCSpinner />
92
92
  </div>
93
93
  </>
94
94
  );
@@ -1,5 +1,6 @@
1
1
  import { __ } from '@wordpress/i18n';
2
- import { Tip, ExternalLink } from '@wordpress/components';
2
+ import { tip } from '@wordpress/icons';
3
+ import { Notice } from '@wordpress/ui';
3
4
 
4
5
  function DownloadableBlocksNoResults() {
5
6
  return (
@@ -8,13 +9,19 @@ function DownloadableBlocksNoResults() {
8
9
  <p>{ __( 'No results found.' ) }</p>
9
10
  </div>
10
11
  <div className="block-editor-inserter__tips">
11
- <Tip>
12
- { __( 'Interested in creating your own block?' ) }
13
- <br />
14
- <ExternalLink href="https://developer.wordpress.org/block-editor/">
15
- { __( 'Get started here' ) }.
16
- </ExternalLink>
17
- </Tip>
12
+ <Notice.Root intent="info" icon={ tip }>
13
+ <Notice.Description>
14
+ { __( 'Interested in creating your own block?' ) }
15
+ </Notice.Description>
16
+ <Notice.Actions>
17
+ <Notice.ActionLink
18
+ href="https://developer.wordpress.org/block-editor/"
19
+ openInNewTab
20
+ >
21
+ { __( 'Get started here' ) }.
22
+ </Notice.ActionLink>
23
+ </Notice.Actions>
24
+ </Notice.Root>
18
25
  </div>
19
26
  </>
20
27
  );