@wordpress/block-directory 5.32.0 → 5.32.1-next.b8c8708f3.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 (110) hide show
  1. package/build/components/auto-block-uninstaller/index.js +37 -31
  2. package/build/components/auto-block-uninstaller/index.js.map +7 -1
  3. package/build/components/block-ratings/index.js +40 -22
  4. package/build/components/block-ratings/index.js.map +7 -1
  5. package/build/components/block-ratings/stars.js +66 -40
  6. package/build/components/block-ratings/stars.js.map +7 -1
  7. package/build/components/compact-list/index.js +47 -46
  8. package/build/components/compact-list/index.js.map +7 -1
  9. package/build/components/downloadable-block-icon/index.js +28 -26
  10. package/build/components/downloadable-block-icon/index.js.map +7 -1
  11. package/build/components/downloadable-block-list-item/index.js +113 -127
  12. package/build/components/downloadable-block-list-item/index.js.map +7 -1
  13. package/build/components/downloadable-block-notice/index.js +41 -31
  14. package/build/components/downloadable-block-notice/index.js.map +7 -1
  15. package/build/components/downloadable-blocks-list/index.js +72 -56
  16. package/build/components/downloadable-blocks-list/index.js.map +7 -1
  17. package/build/components/downloadable-blocks-panel/index.js +108 -95
  18. package/build/components/downloadable-blocks-panel/index.js.map +7 -1
  19. package/build/components/downloadable-blocks-panel/inserter-panel.js +52 -38
  20. package/build/components/downloadable-blocks-panel/inserter-panel.js.map +7 -1
  21. package/build/components/downloadable-blocks-panel/no-results.js +37 -30
  22. package/build/components/downloadable-blocks-panel/no-results.js.map +7 -1
  23. package/build/index.js +27 -12
  24. package/build/index.js.map +7 -1
  25. package/build/lock-unlock.js +31 -15
  26. package/build/lock-unlock.js.map +7 -1
  27. package/build/plugins/get-install-missing/index.js +123 -102
  28. package/build/plugins/get-install-missing/index.js.map +7 -1
  29. package/build/plugins/get-install-missing/install-button.js +68 -50
  30. package/build/plugins/get-install-missing/install-button.js.map +7 -1
  31. package/build/plugins/index.js +46 -29
  32. package/build/plugins/index.js.map +7 -1
  33. package/build/plugins/inserter-menu-downloadable-blocks-panel/index.js +55 -42
  34. package/build/plugins/inserter-menu-downloadable-blocks-panel/index.js.map +7 -1
  35. package/build/plugins/installed-blocks-pre-publish-panel/index.js +65 -34
  36. package/build/plugins/installed-blocks-pre-publish-panel/index.js.map +7 -1
  37. package/build/store/actions.js +142 -188
  38. package/build/store/actions.js.map +7 -1
  39. package/build/store/index.js +48 -46
  40. package/build/store/index.js.map +7 -1
  41. package/build/store/load-assets.js +48 -55
  42. package/build/store/load-assets.js.map +7 -1
  43. package/build/store/reducer.js +48 -54
  44. package/build/store/reducer.js.map +7 -1
  45. package/build/store/resolvers.js +52 -31
  46. package/build/store/resolvers.js.map +7 -1
  47. package/build/store/selectors.js +100 -127
  48. package/build/store/selectors.js.map +7 -1
  49. package/build/store/utils/get-plugin-url.js +23 -14
  50. package/build/store/utils/get-plugin-url.js.map +7 -1
  51. package/build-module/components/auto-block-uninstaller/index.js +18 -24
  52. package/build-module/components/auto-block-uninstaller/index.js.map +7 -1
  53. package/build-module/components/block-ratings/index.js +9 -15
  54. package/build-module/components/block-ratings/index.js.map +7 -1
  55. package/build-module/components/block-ratings/stars.js +48 -34
  56. package/build-module/components/block-ratings/stars.js.map +7 -1
  57. package/build-module/components/compact-list/index.js +19 -39
  58. package/build-module/components/compact-list/index.js.map +7 -1
  59. package/build-module/components/downloadable-block-icon/index.js +10 -20
  60. package/build-module/components/downloadable-block-icon/index.js.map +7 -1
  61. package/build-module/components/downloadable-block-list-item/index.js +89 -120
  62. package/build-module/components/downloadable-block-list-item/index.js.map +7 -1
  63. package/build-module/components/downloadable-block-notice/index.js +19 -24
  64. package/build-module/components/downloadable-block-notice/index.js.map +7 -1
  65. package/build-module/components/downloadable-blocks-list/index.js +44 -49
  66. package/build-module/components/downloadable-blocks-list/index.js.map +7 -1
  67. package/build-module/components/downloadable-blocks-panel/index.js +81 -89
  68. package/build-module/components/downloadable-blocks-panel/index.js.map +7 -1
  69. package/build-module/components/downloadable-blocks-panel/inserter-panel.js +33 -31
  70. package/build-module/components/downloadable-blocks-panel/inserter-panel.js.map +7 -1
  71. package/build-module/components/downloadable-blocks-panel/no-results.js +19 -24
  72. package/build-module/components/downloadable-blocks-panel/no-results.js.map +7 -1
  73. package/build-module/index.js +6 -6
  74. package/build-module/index.js.map +7 -1
  75. package/build-module/lock-unlock.js +8 -7
  76. package/build-module/lock-unlock.js.map +7 -1
  77. package/build-module/plugins/get-install-missing/index.js +99 -95
  78. package/build-module/plugins/get-install-missing/index.js.map +7 -1
  79. package/build-module/plugins/get-install-missing/install-button.js +50 -44
  80. package/build-module/plugins/get-install-missing/install-button.js.map +7 -1
  81. package/build-module/plugins/index.js +24 -25
  82. package/build-module/plugins/index.js.map +7 -1
  83. package/build-module/plugins/inserter-menu-downloadable-blocks-panel/index.js +26 -34
  84. package/build-module/plugins/inserter-menu-downloadable-blocks-panel/index.js.map +7 -1
  85. package/build-module/plugins/installed-blocks-pre-publish-panel/index.js +38 -28
  86. package/build-module/plugins/installed-blocks-pre-publish-panel/index.js.map +7 -1
  87. package/build-module/store/actions.js +100 -168
  88. package/build-module/store/actions.js.map +7 -1
  89. package/build-module/store/index.js +13 -36
  90. package/build-module/store/index.js.map +7 -1
  91. package/build-module/store/load-assets.js +15 -47
  92. package/build-module/store/load-assets.js.map +7 -1
  93. package/build-module/store/reducer.js +27 -49
  94. package/build-module/store/reducer.js.map +7 -1
  95. package/build-module/store/resolvers.js +16 -19
  96. package/build-module/store/resolvers.js.map +7 -1
  97. package/build-module/store/selectors.js +77 -121
  98. package/build-module/store/selectors.js.map +7 -1
  99. package/build-module/store/utils/get-plugin-url.js +6 -10
  100. package/build-module/store/utils/get-plugin-url.js.map +7 -1
  101. package/build-style/style-rtl.css +9 -142
  102. package/build-style/style.css +9 -142
  103. package/package.json +28 -21
  104. package/src/components/block-ratings/style.scss +2 -0
  105. package/src/components/compact-list/style.scss +3 -0
  106. package/src/components/downloadable-block-icon/style.scss +3 -0
  107. package/src/components/downloadable-block-list-item/style.scss +4 -0
  108. package/src/components/downloadable-block-notice/style.scss +3 -0
  109. package/src/components/downloadable-blocks-panel/style.scss +3 -1
  110. package/src/style.scss +8 -7
@@ -1,145 +1,118 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var selectors_exports = {};
19
+ __export(selectors_exports, {
20
+ getDownloadableBlocks: () => getDownloadableBlocks,
21
+ getErrorNoticeForBlock: () => getErrorNoticeForBlock,
22
+ getErrorNotices: () => getErrorNotices,
23
+ getInstalledBlockTypes: () => getInstalledBlockTypes,
24
+ getNewBlockTypes: () => getNewBlockTypes,
25
+ getUnusedBlockTypes: () => getUnusedBlockTypes,
26
+ isInstalling: () => isInstalling,
27
+ isRequestingDownloadableBlocks: () => isRequestingDownloadableBlocks
5
28
  });
6
- exports.getDownloadableBlocks = getDownloadableBlocks;
7
- exports.getErrorNoticeForBlock = getErrorNoticeForBlock;
8
- exports.getErrorNotices = getErrorNotices;
9
- exports.getInstalledBlockTypes = getInstalledBlockTypes;
10
- exports.getUnusedBlockTypes = exports.getNewBlockTypes = void 0;
11
- exports.isInstalling = isInstalling;
12
- exports.isRequestingDownloadableBlocks = isRequestingDownloadableBlocks;
13
- var _data = require("@wordpress/data");
14
- var _blockEditor = require("@wordpress/block-editor");
15
- /**
16
- * WordPress dependencies
17
- */
18
-
29
+ module.exports = __toCommonJS(selectors_exports);
30
+ var import_data = require("@wordpress/data");
31
+ var import_block_editor = require("@wordpress/block-editor");
19
32
  const EMPTY_ARRAY = [];
20
-
21
- /**
22
- * Returns true if application is requesting for downloadable blocks.
23
- *
24
- * @param {Object} state Global application state.
25
- * @param {string} filterValue Search string.
26
- *
27
- * @return {boolean} Whether a request is in progress for the blocks list.
28
- */
29
33
  function isRequestingDownloadableBlocks(state, filterValue) {
30
- var _state$downloadableBl;
31
- return (_state$downloadableBl = state.downloadableBlocks[filterValue]?.isRequesting) !== null && _state$downloadableBl !== void 0 ? _state$downloadableBl : false;
34
+ return state.downloadableBlocks[filterValue]?.isRequesting ?? false;
32
35
  }
33
-
34
- /**
35
- * Returns the available uninstalled blocks.
36
- *
37
- * @param {Object} state Global application state.
38
- * @param {string} filterValue Search string.
39
- *
40
- * @return {Array} Downloadable blocks.
41
- */
42
36
  function getDownloadableBlocks(state, filterValue) {
43
- var _state$downloadableBl2;
44
- return (_state$downloadableBl2 = state.downloadableBlocks[filterValue]?.results) !== null && _state$downloadableBl2 !== void 0 ? _state$downloadableBl2 : EMPTY_ARRAY;
37
+ return state.downloadableBlocks[filterValue]?.results ?? EMPTY_ARRAY;
45
38
  }
46
-
47
- /**
48
- * Returns the block types that have been installed on the server in this
49
- * session.
50
- *
51
- * @param {Object} state Global application state.
52
- *
53
- * @return {Array} Block type items
54
- */
55
39
  function getInstalledBlockTypes(state) {
56
40
  return state.blockManagement.installedBlockTypes;
57
41
  }
58
-
59
- /**
60
- * Returns block types that have been installed on the server and used in the
61
- * current post.
62
- *
63
- * @param {Object} state Global application state.
64
- *
65
- * @return {Array} Block type items.
66
- */
67
- const getNewBlockTypes = exports.getNewBlockTypes = (0, _data.createRegistrySelector)(select => (0, _data.createSelector)(state => {
68
- const installedBlockTypes = getInstalledBlockTypes(state);
69
- if (!installedBlockTypes.length) {
70
- return EMPTY_ARRAY;
71
- }
72
- const {
73
- getBlockName,
74
- getClientIdsWithDescendants
75
- } = select(_blockEditor.store);
76
- const installedBlockNames = installedBlockTypes.map(blockType => blockType.name);
77
- const foundBlockNames = getClientIdsWithDescendants().flatMap(clientId => {
78
- const blockName = getBlockName(clientId);
79
- return installedBlockNames.includes(blockName) ? blockName : [];
80
- });
81
- const newBlockTypes = installedBlockTypes.filter(blockType => foundBlockNames.includes(blockType.name));
82
- return newBlockTypes.length > 0 ? newBlockTypes : EMPTY_ARRAY;
83
- }, state => [getInstalledBlockTypes(state), select(_blockEditor.store).getClientIdsWithDescendants()]));
84
-
85
- /**
86
- * Returns the block types that have been installed on the server but are not
87
- * used in the current post.
88
- *
89
- * @param {Object} state Global application state.
90
- *
91
- * @return {Array} Block type items.
92
- */
93
- const getUnusedBlockTypes = exports.getUnusedBlockTypes = (0, _data.createRegistrySelector)(select => (0, _data.createSelector)(state => {
94
- const installedBlockTypes = getInstalledBlockTypes(state);
95
- if (!installedBlockTypes.length) {
96
- return EMPTY_ARRAY;
97
- }
98
- const {
99
- getBlockName,
100
- getClientIdsWithDescendants
101
- } = select(_blockEditor.store);
102
- const installedBlockNames = installedBlockTypes.map(blockType => blockType.name);
103
- const foundBlockNames = getClientIdsWithDescendants().flatMap(clientId => {
104
- const blockName = getBlockName(clientId);
105
- return installedBlockNames.includes(blockName) ? blockName : [];
106
- });
107
- const unusedBlockTypes = installedBlockTypes.filter(blockType => !foundBlockNames.includes(blockType.name));
108
- return unusedBlockTypes.length > 0 ? unusedBlockTypes : EMPTY_ARRAY;
109
- }, state => [getInstalledBlockTypes(state), select(_blockEditor.store).getClientIdsWithDescendants()]));
110
-
111
- /**
112
- * Returns true if a block plugin install is in progress.
113
- *
114
- * @param {Object} state Global application state.
115
- * @param {string} blockId Id of the block.
116
- *
117
- * @return {boolean} Whether this block is currently being installed.
118
- */
42
+ const getNewBlockTypes = (0, import_data.createRegistrySelector)(
43
+ (select) => (0, import_data.createSelector)(
44
+ (state) => {
45
+ const installedBlockTypes = getInstalledBlockTypes(state);
46
+ if (!installedBlockTypes.length) {
47
+ return EMPTY_ARRAY;
48
+ }
49
+ const { getBlockName, getClientIdsWithDescendants } = select(import_block_editor.store);
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 newBlockTypes = installedBlockTypes.filter(
60
+ (blockType) => foundBlockNames.includes(blockType.name)
61
+ );
62
+ return newBlockTypes.length > 0 ? newBlockTypes : EMPTY_ARRAY;
63
+ },
64
+ (state) => [
65
+ getInstalledBlockTypes(state),
66
+ select(import_block_editor.store).getClientIdsWithDescendants()
67
+ ]
68
+ )
69
+ );
70
+ const getUnusedBlockTypes = (0, import_data.createRegistrySelector)(
71
+ (select) => (0, import_data.createSelector)(
72
+ (state) => {
73
+ const installedBlockTypes = getInstalledBlockTypes(state);
74
+ if (!installedBlockTypes.length) {
75
+ return EMPTY_ARRAY;
76
+ }
77
+ const { getBlockName, getClientIdsWithDescendants } = select(import_block_editor.store);
78
+ const installedBlockNames = installedBlockTypes.map(
79
+ (blockType) => blockType.name
80
+ );
81
+ const foundBlockNames = getClientIdsWithDescendants().flatMap(
82
+ (clientId) => {
83
+ const blockName = getBlockName(clientId);
84
+ return installedBlockNames.includes(blockName) ? blockName : [];
85
+ }
86
+ );
87
+ const unusedBlockTypes = installedBlockTypes.filter(
88
+ (blockType) => !foundBlockNames.includes(blockType.name)
89
+ );
90
+ return unusedBlockTypes.length > 0 ? unusedBlockTypes : EMPTY_ARRAY;
91
+ },
92
+ (state) => [
93
+ getInstalledBlockTypes(state),
94
+ select(import_block_editor.store).getClientIdsWithDescendants()
95
+ ]
96
+ )
97
+ );
119
98
  function isInstalling(state, blockId) {
120
99
  return state.blockManagement.isInstalling[blockId] || false;
121
100
  }
122
-
123
- /**
124
- * Returns all block error notices.
125
- *
126
- * @param {Object} state Global application state.
127
- *
128
- * @return {Object} Object with error notices.
129
- */
130
101
  function getErrorNotices(state) {
131
102
  return state.errorNotices;
132
103
  }
133
-
134
- /**
135
- * Returns the error notice for a given block.
136
- *
137
- * @param {Object} state Global application state.
138
- * @param {string} blockId The ID of the block plugin. eg: my-block
139
- *
140
- * @return {string|boolean} The error text, or false if no error.
141
- */
142
104
  function getErrorNoticeForBlock(state, blockId) {
143
105
  return state.errorNotices[blockId];
144
106
  }
145
- //# sourceMappingURL=selectors.js.map
107
+ // Annotate the CommonJS export names for ESM import in node:
108
+ 0 && (module.exports = {
109
+ getDownloadableBlocks,
110
+ getErrorNoticeForBlock,
111
+ getErrorNotices,
112
+ getInstalledBlockTypes,
113
+ getNewBlockTypes,
114
+ getUnusedBlockTypes,
115
+ isInstalling,
116
+ isRequestingDownloadableBlocks
117
+ });
118
+ //# sourceMappingURL=selectors.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["_data","require","_blockEditor","EMPTY_ARRAY","isRequestingDownloadableBlocks","state","filterValue","_state$downloadableBl","downloadableBlocks","isRequesting","getDownloadableBlocks","_state$downloadableBl2","results","getInstalledBlockTypes","blockManagement","installedBlockTypes","getNewBlockTypes","exports","createRegistrySelector","select","createSelector","length","getBlockName","getClientIdsWithDescendants","blockEditorStore","installedBlockNames","map","blockType","name","foundBlockNames","flatMap","clientId","blockName","includes","newBlockTypes","filter","getUnusedBlockTypes","unusedBlockTypes","isInstalling","blockId","getErrorNotices","errorNotices","getErrorNoticeForBlock"],"sources":["@wordpress/block-directory/src/store/selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { 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":"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","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/store/selectors.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { 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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAuD;AACvD,0BAA0C;AAE1C,MAAM,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,MAAM,uBAAmB;AAAA,EAAwB,CAAE,eACzD;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,oBAAAA,KAAiB;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,oBAAAA,KAAiB,EAAE,4BAA4B;AAAA,IACxD;AAAA,EACD;AACD;AAUO,MAAM,0BAAsB;AAAA,EAAwB,CAAE,eAC5D;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,oBAAAA,KAAiB;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,oBAAAA,KAAiB,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": ["blockEditorStore"]
7
+ }
@@ -1,24 +1,33 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var get_plugin_url_exports = {};
19
+ __export(get_plugin_url_exports, {
20
+ default: () => getPluginUrl
5
21
  });
6
- exports.default = getPluginUrl;
7
- /**
8
- * Get the plugin's direct API link out of a block-directory response.
9
- *
10
- * @param {Object} block The block object
11
- *
12
- * @return {string} The plugin URL, if exists.
13
- */
22
+ module.exports = __toCommonJS(get_plugin_url_exports);
14
23
  function getPluginUrl(block) {
15
24
  if (!block) {
16
25
  return false;
17
26
  }
18
- const link = block.links['wp:plugin'] || block.links.self;
27
+ const link = block.links["wp:plugin"] || block.links.self;
19
28
  if (link && link.length) {
20
29
  return link[0].href;
21
30
  }
22
31
  return false;
23
32
  }
24
- //# sourceMappingURL=get-plugin-url.js.map
33
+ //# sourceMappingURL=get-plugin-url.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["getPluginUrl","block","link","links","self","length","href"],"sources":["@wordpress/block-directory/src/store/utils/get-plugin-url.js"],"sourcesContent":["/**\n * Get the plugin's direct API link out of a block-directory response.\n *\n * @param {Object} block The block object\n *\n * @return {string} The plugin URL, if exists.\n */\nexport default function getPluginUrl( block ) {\n\tif ( ! block ) {\n\t\treturn false;\n\t}\n\tconst link = block.links[ 'wp:plugin' ] || block.links.self;\n\tif ( link && link.length ) {\n\t\treturn link[ 0 ].href;\n\t}\n\treturn false;\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,YAAYA,CAAEC,KAAK,EAAG;EAC7C,IAAK,CAAEA,KAAK,EAAG;IACd,OAAO,KAAK;EACb;EACA,MAAMC,IAAI,GAAGD,KAAK,CAACE,KAAK,CAAE,WAAW,CAAE,IAAIF,KAAK,CAACE,KAAK,CAACC,IAAI;EAC3D,IAAKF,IAAI,IAAIA,IAAI,CAACG,MAAM,EAAG;IAC1B,OAAOH,IAAI,CAAE,CAAC,CAAE,CAACI,IAAI;EACtB;EACA,OAAO,KAAK;AACb","ignoreList":[]}
1
+ {
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": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;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,30 +1,21 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { unregisterBlockType } from '@wordpress/blocks';
5
- import { useDispatch, useSelect } from '@wordpress/data';
6
- import { useEffect } from '@wordpress/element';
7
- import { store as editorStore } from '@wordpress/editor';
8
-
9
- /**
10
- * Internal dependencies
11
- */
12
- import { store as blockDirectoryStore } from '../../store';
13
- export default function AutoBlockUninstaller() {
14
- const {
15
- uninstallBlockType
16
- } = useDispatch(blockDirectoryStore);
17
- const shouldRemoveBlockTypes = useSelect(select => {
18
- const {
19
- isAutosavingPost,
20
- isSavingPost
21
- } = select(editorStore);
1
+ import { unregisterBlockType } from "@wordpress/blocks";
2
+ import { useDispatch, useSelect } from "@wordpress/data";
3
+ import { useEffect } from "@wordpress/element";
4
+ import { store as editorStore } from "@wordpress/editor";
5
+ import { store as blockDirectoryStore } from "../../store";
6
+ function AutoBlockUninstaller() {
7
+ const { uninstallBlockType } = useDispatch(blockDirectoryStore);
8
+ const shouldRemoveBlockTypes = useSelect((select) => {
9
+ const { isAutosavingPost, isSavingPost } = select(editorStore);
22
10
  return isSavingPost() && !isAutosavingPost();
23
11
  }, []);
24
- const unusedBlockTypes = useSelect(select => select(blockDirectoryStore).getUnusedBlockTypes(), []);
12
+ const unusedBlockTypes = useSelect(
13
+ (select) => select(blockDirectoryStore).getUnusedBlockTypes(),
14
+ []
15
+ );
25
16
  useEffect(() => {
26
17
  if (shouldRemoveBlockTypes && unusedBlockTypes.length) {
27
- unusedBlockTypes.forEach(blockType => {
18
+ unusedBlockTypes.forEach((blockType) => {
28
19
  uninstallBlockType(blockType);
29
20
  unregisterBlockType(blockType.name);
30
21
  });
@@ -32,4 +23,7 @@ export default function AutoBlockUninstaller() {
32
23
  }, [shouldRemoveBlockTypes]);
33
24
  return null;
34
25
  }
35
- //# sourceMappingURL=index.js.map
26
+ export {
27
+ AutoBlockUninstaller as default
28
+ };
29
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["unregisterBlockType","useDispatch","useSelect","useEffect","store","editorStore","blockDirectoryStore","AutoBlockUninstaller","uninstallBlockType","shouldRemoveBlockTypes","select","isAutosavingPost","isSavingPost","unusedBlockTypes","getUnusedBlockTypes","length","forEach","blockType","name"],"sources":["@wordpress/block-directory/src/components/auto-block-uninstaller/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { unregisterBlockType } from '@wordpress/blocks';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as blockDirectoryStore } from '../../store';\n\nexport default function AutoBlockUninstaller() {\n\tconst { uninstallBlockType } = useDispatch( blockDirectoryStore );\n\n\tconst shouldRemoveBlockTypes = useSelect( ( select ) => {\n\t\tconst { isAutosavingPost, isSavingPost } = select( editorStore );\n\t\treturn isSavingPost() && ! isAutosavingPost();\n\t}, [] );\n\n\tconst unusedBlockTypes = useSelect(\n\t\t( select ) => select( blockDirectoryStore ).getUnusedBlockTypes(),\n\t\t[]\n\t);\n\n\tuseEffect( () => {\n\t\tif ( shouldRemoveBlockTypes && unusedBlockTypes.length ) {\n\t\t\tunusedBlockTypes.forEach( ( blockType ) => {\n\t\t\t\tuninstallBlockType( blockType );\n\t\t\t\tunregisterBlockType( blockType.name );\n\t\t\t} );\n\t\t}\n\t}, [ shouldRemoveBlockTypes ] );\n\n\treturn null;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,mBAAmB,QAAQ,mBAAmB;AACvD,SAASC,WAAW,EAAEC,SAAS,QAAQ,iBAAiB;AACxD,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,KAAK,IAAIC,WAAW,QAAQ,mBAAmB;;AAExD;AACA;AACA;AACA,SAASD,KAAK,IAAIE,mBAAmB,QAAQ,aAAa;AAE1D,eAAe,SAASC,oBAAoBA,CAAA,EAAG;EAC9C,MAAM;IAAEC;EAAmB,CAAC,GAAGP,WAAW,CAAEK,mBAAoB,CAAC;EAEjE,MAAMG,sBAAsB,GAAGP,SAAS,CAAIQ,MAAM,IAAM;IACvD,MAAM;MAAEC,gBAAgB;MAAEC;IAAa,CAAC,GAAGF,MAAM,CAAEL,WAAY,CAAC;IAChE,OAAOO,YAAY,CAAC,CAAC,IAAI,CAAED,gBAAgB,CAAC,CAAC;EAC9C,CAAC,EAAE,EAAG,CAAC;EAEP,MAAME,gBAAgB,GAAGX,SAAS,CAC/BQ,MAAM,IAAMA,MAAM,CAAEJ,mBAAoB,CAAC,CAACQ,mBAAmB,CAAC,CAAC,EACjE,EACD,CAAC;EAEDX,SAAS,CAAE,MAAM;IAChB,IAAKM,sBAAsB,IAAII,gBAAgB,CAACE,MAAM,EAAG;MACxDF,gBAAgB,CAACG,OAAO,CAAIC,SAAS,IAAM;QAC1CT,kBAAkB,CAAES,SAAU,CAAC;QAC/BjB,mBAAmB,CAAEiB,SAAS,CAACC,IAAK,CAAC;MACtC,CAAE,CAAC;IACJ;EACD,CAAC,EAAE,CAAET,sBAAsB,CAAG,CAAC;EAE/B,OAAO,IAAI;AACZ","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/auto-block-uninstaller/index.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { unregisterBlockType } from '@wordpress/blocks';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as blockDirectoryStore } from '../../store';\n\nexport default function AutoBlockUninstaller() {\n\tconst { uninstallBlockType } = useDispatch( blockDirectoryStore );\n\n\tconst shouldRemoveBlockTypes = useSelect( ( select ) => {\n\t\tconst { isAutosavingPost, isSavingPost } = select( editorStore );\n\t\treturn isSavingPost() && ! isAutosavingPost();\n\t}, [] );\n\n\tconst unusedBlockTypes = useSelect(\n\t\t( select ) => select( blockDirectoryStore ).getUnusedBlockTypes(),\n\t\t[]\n\t);\n\n\tuseEffect( () => {\n\t\tif ( shouldRemoveBlockTypes && unusedBlockTypes.length ) {\n\t\t\tunusedBlockTypes.forEach( ( blockType ) => {\n\t\t\t\tuninstallBlockType( blockType );\n\t\t\t\tunregisterBlockType( blockType.name );\n\t\t\t} );\n\t\t}\n\t}, [ shouldRemoveBlockTypes ] );\n\n\treturn null;\n}\n"],
5
+ "mappings": "AAGA,SAAS,2BAA2B;AACpC,SAAS,aAAa,iBAAiB;AACvC,SAAS,iBAAiB;AAC1B,SAAS,SAAS,mBAAmB;AAKrC,SAAS,SAAS,2BAA2B;AAE9B,SAAR,uBAAwC;AAC9C,QAAM,EAAE,mBAAmB,IAAI,YAAa,mBAAoB;AAEhE,QAAM,yBAAyB,UAAW,CAAE,WAAY;AACvD,UAAM,EAAE,kBAAkB,aAAa,IAAI,OAAQ,WAAY;AAC/D,WAAO,aAAa,KAAK,CAAE,iBAAiB;AAAA,EAC7C,GAAG,CAAC,CAAE;AAEN,QAAM,mBAAmB;AAAA,IACxB,CAAE,WAAY,OAAQ,mBAAoB,EAAE,oBAAoB;AAAA,IAChE,CAAC;AAAA,EACF;AAEA,YAAW,MAAM;AAChB,QAAK,0BAA0B,iBAAiB,QAAS;AACxD,uBAAiB,QAAS,CAAE,cAAe;AAC1C,2BAAoB,SAAU;AAC9B,4BAAqB,UAAU,IAAK;AAAA,MACrC,CAAE;AAAA,IACH;AAAA,EACD,GAAG,CAAE,sBAAuB,CAAE;AAE9B,SAAO;AACR;",
6
+ "names": []
7
+ }
@@ -1,15 +1,9 @@
1
- /**
2
- * Internal dependencies
3
- */
4
- import Stars from './stars';
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- export const BlockRatings = ({
7
- rating
8
- }) => /*#__PURE__*/_jsx("span", {
9
- className: "block-directory-block-ratings",
10
- children: /*#__PURE__*/_jsx(Stars, {
11
- rating: rating
12
- })
13
- });
14
- export default BlockRatings;
15
- //# sourceMappingURL=index.js.map
1
+ import { jsx } from "react/jsx-runtime";
2
+ import Stars from "./stars";
3
+ const BlockRatings = ({ rating }) => /* @__PURE__ */ jsx("span", { className: "block-directory-block-ratings", children: /* @__PURE__ */ jsx(Stars, { rating }) });
4
+ var block_ratings_default = BlockRatings;
5
+ export {
6
+ BlockRatings,
7
+ block_ratings_default as default
8
+ };
9
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["Stars","jsx","_jsx","BlockRatings","rating","className","children"],"sources":["@wordpress/block-directory/src/components/block-ratings/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport Stars from './stars';\n\nexport const BlockRatings = ( { rating } ) => (\n\t<span className=\"block-directory-block-ratings\">\n\t\t<Stars rating={ rating } />\n\t</span>\n);\n\nexport default BlockRatings;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,SAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE5B,OAAO,MAAMC,YAAY,GAAGA,CAAE;EAAEC;AAAO,CAAC,kBACvCF,IAAA;EAAMG,SAAS,EAAC,+BAA+B;EAAAC,QAAA,eAC9CJ,IAAA,CAACF,KAAK;IAACI,MAAM,EAAGA;EAAQ,CAAE;AAAC,CACtB,CACN;AAED,eAAeD,YAAY","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/block-ratings/index.js"],
4
+ "sourcesContent": ["/**\n * Internal dependencies\n */\nimport Stars from './stars';\n\nexport const BlockRatings = ( { rating } ) => (\n\t<span className=\"block-directory-block-ratings\">\n\t\t<Stars rating={ rating } />\n\t</span>\n);\n\nexport default BlockRatings;\n"],
5
+ "mappings": "AAOE;AAJF,OAAO,WAAW;AAEX,MAAM,eAAe,CAAE,EAAE,OAAO,MACtC,oBAAC,UAAK,WAAU,iCACf,8BAAC,SAAM,QAAkB,GAC1B;AAGD,IAAO,wBAAQ;",
6
+ "names": []
7
+ }
@@ -1,39 +1,53 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { __, sprintf } from '@wordpress/i18n';
5
- import { Icon, starEmpty, starFilled, starHalf } from '@wordpress/icons';
6
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
- function Stars({
8
- rating
9
- }) {
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { __, sprintf } from "@wordpress/i18n";
3
+ import { Icon, starEmpty, starFilled, starHalf } from "@wordpress/icons";
4
+ function Stars({ rating }) {
10
5
  const stars = Math.round(rating / 0.5) * 0.5;
11
6
  const fullStarCount = Math.floor(rating);
12
7
  const halfStarCount = Math.ceil(rating - fullStarCount);
13
8
  const emptyStarCount = 5 - (fullStarCount + halfStarCount);
14
- return /*#__PURE__*/_jsxs("span", {
15
- "aria-label": sprintf(/* translators: %s: number of stars. */
16
- __('%s out of 5 stars'), stars),
17
- children: [Array.from({
18
- length: fullStarCount
19
- }).map((_, i) => /*#__PURE__*/_jsx(Icon, {
20
- className: "block-directory-block-ratings__star-full",
21
- icon: starFilled,
22
- size: 16
23
- }, `full_stars_${i}`)), Array.from({
24
- length: halfStarCount
25
- }).map((_, i) => /*#__PURE__*/_jsx(Icon, {
26
- className: "block-directory-block-ratings__star-half-full",
27
- icon: starHalf,
28
- size: 16
29
- }, `half_stars_${i}`)), Array.from({
30
- length: emptyStarCount
31
- }).map((_, i) => /*#__PURE__*/_jsx(Icon, {
32
- className: "block-directory-block-ratings__star-empty",
33
- icon: starEmpty,
34
- size: 16
35
- }, `empty_stars_${i}`))]
36
- });
9
+ return /* @__PURE__ */ jsxs(
10
+ "span",
11
+ {
12
+ "aria-label": sprintf(
13
+ /* translators: %s: number of stars. */
14
+ __("%s out of 5 stars"),
15
+ stars
16
+ ),
17
+ children: [
18
+ Array.from({ length: fullStarCount }).map((_, i) => /* @__PURE__ */ jsx(
19
+ Icon,
20
+ {
21
+ className: "block-directory-block-ratings__star-full",
22
+ icon: starFilled,
23
+ size: 16
24
+ },
25
+ `full_stars_${i}`
26
+ )),
27
+ Array.from({ length: halfStarCount }).map((_, i) => /* @__PURE__ */ jsx(
28
+ Icon,
29
+ {
30
+ className: "block-directory-block-ratings__star-half-full",
31
+ icon: starHalf,
32
+ size: 16
33
+ },
34
+ `half_stars_${i}`
35
+ )),
36
+ Array.from({ length: emptyStarCount }).map((_, i) => /* @__PURE__ */ jsx(
37
+ Icon,
38
+ {
39
+ className: "block-directory-block-ratings__star-empty",
40
+ icon: starEmpty,
41
+ size: 16
42
+ },
43
+ `empty_stars_${i}`
44
+ ))
45
+ ]
46
+ }
47
+ );
37
48
  }
38
- export default Stars;
39
- //# sourceMappingURL=stars.js.map
49
+ var stars_default = Stars;
50
+ export {
51
+ stars_default as default
52
+ };
53
+ //# sourceMappingURL=stars.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["__","sprintf","Icon","starEmpty","starFilled","starHalf","jsx","_jsx","jsxs","_jsxs","Stars","rating","stars","Math","round","fullStarCount","floor","halfStarCount","ceil","emptyStarCount","children","Array","from","length","map","_","i","className","icon","size"],"sources":["@wordpress/block-directory/src/components/block-ratings/stars.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Icon, starEmpty, starFilled, starHalf } from '@wordpress/icons';\n\nfunction Stars( { rating } ) {\n\tconst stars = Math.round( rating / 0.5 ) * 0.5;\n\n\tconst fullStarCount = Math.floor( rating );\n\tconst halfStarCount = Math.ceil( rating - fullStarCount );\n\tconst emptyStarCount = 5 - ( fullStarCount + halfStarCount );\n\n\treturn (\n\t\t<span\n\t\t\taria-label={ sprintf(\n\t\t\t\t/* translators: %s: number of stars. */\n\t\t\t\t__( '%s out of 5 stars' ),\n\t\t\t\tstars\n\t\t\t) }\n\t\t>\n\t\t\t{ Array.from( { length: fullStarCount } ).map( ( _, i ) => (\n\t\t\t\t<Icon\n\t\t\t\t\tkey={ `full_stars_${ i }` }\n\t\t\t\t\tclassName=\"block-directory-block-ratings__star-full\"\n\t\t\t\t\ticon={ starFilled }\n\t\t\t\t\tsize={ 16 }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t\t{ Array.from( { length: halfStarCount } ).map( ( _, i ) => (\n\t\t\t\t<Icon\n\t\t\t\t\tkey={ `half_stars_${ i }` }\n\t\t\t\t\tclassName=\"block-directory-block-ratings__star-half-full\"\n\t\t\t\t\ticon={ starHalf }\n\t\t\t\t\tsize={ 16 }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t\t{ Array.from( { length: emptyStarCount } ).map( ( _, i ) => (\n\t\t\t\t<Icon\n\t\t\t\t\tkey={ `empty_stars_${ i }` }\n\t\t\t\t\tclassName=\"block-directory-block-ratings__star-empty\"\n\t\t\t\t\ticon={ starEmpty }\n\t\t\t\t\tsize={ 16 }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</span>\n\t);\n}\n\nexport default Stars;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,IAAI,EAAEC,SAAS,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEzE,SAASC,KAAKA,CAAE;EAAEC;AAAO,CAAC,EAAG;EAC5B,MAAMC,KAAK,GAAGC,IAAI,CAACC,KAAK,CAAEH,MAAM,GAAG,GAAI,CAAC,GAAG,GAAG;EAE9C,MAAMI,aAAa,GAAGF,IAAI,CAACG,KAAK,CAAEL,MAAO,CAAC;EAC1C,MAAMM,aAAa,GAAGJ,IAAI,CAACK,IAAI,CAAEP,MAAM,GAAGI,aAAc,CAAC;EACzD,MAAMI,cAAc,GAAG,CAAC,IAAKJ,aAAa,GAAGE,aAAa,CAAE;EAE5D,oBACCR,KAAA;IACC,cAAaR,OAAO,CACnB;IACAD,EAAE,CAAE,mBAAoB,CAAC,EACzBY,KACD,CAAG;IAAAQ,QAAA,GAEDC,KAAK,CAACC,IAAI,CAAE;MAAEC,MAAM,EAAER;IAAc,CAAE,CAAC,CAACS,GAAG,CAAE,CAAEC,CAAC,EAAEC,CAAC,kBACpDnB,IAAA,CAACL,IAAI;MAEJyB,SAAS,EAAC,0CAA0C;MACpDC,IAAI,EAAGxB,UAAY;MACnByB,IAAI,EAAG;IAAI,GAHL,cAAeH,CAAC,EAItB,CACA,CAAC,EACDL,KAAK,CAACC,IAAI,CAAE;MAAEC,MAAM,EAAEN;IAAc,CAAE,CAAC,CAACO,GAAG,CAAE,CAAEC,CAAC,EAAEC,CAAC,kBACpDnB,IAAA,CAACL,IAAI;MAEJyB,SAAS,EAAC,+CAA+C;MACzDC,IAAI,EAAGvB,QAAU;MACjBwB,IAAI,EAAG;IAAI,GAHL,cAAeH,CAAC,EAItB,CACA,CAAC,EACDL,KAAK,CAACC,IAAI,CAAE;MAAEC,MAAM,EAAEJ;IAAe,CAAE,CAAC,CAACK,GAAG,CAAE,CAAEC,CAAC,EAAEC,CAAC,kBACrDnB,IAAA,CAACL,IAAI;MAEJyB,SAAS,EAAC,2CAA2C;MACrDC,IAAI,EAAGzB,SAAW;MAClB0B,IAAI,EAAG;IAAI,GAHL,eAAgBH,CAAC,EAIvB,CACA,CAAC;EAAA,CACE,CAAC;AAET;AAEA,eAAehB,KAAK","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/block-ratings/stars.js"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Icon, starEmpty, starFilled, starHalf } from '@wordpress/icons';\n\nfunction Stars( { rating } ) {\n\tconst stars = Math.round( rating / 0.5 ) * 0.5;\n\n\tconst fullStarCount = Math.floor( rating );\n\tconst halfStarCount = Math.ceil( rating - fullStarCount );\n\tconst emptyStarCount = 5 - ( fullStarCount + halfStarCount );\n\n\treturn (\n\t\t<span\n\t\t\taria-label={ sprintf(\n\t\t\t\t/* translators: %s: number of stars. */\n\t\t\t\t__( '%s out of 5 stars' ),\n\t\t\t\tstars\n\t\t\t) }\n\t\t>\n\t\t\t{ Array.from( { length: fullStarCount } ).map( ( _, i ) => (\n\t\t\t\t<Icon\n\t\t\t\t\tkey={ `full_stars_${ i }` }\n\t\t\t\t\tclassName=\"block-directory-block-ratings__star-full\"\n\t\t\t\t\ticon={ starFilled }\n\t\t\t\t\tsize={ 16 }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t\t{ Array.from( { length: halfStarCount } ).map( ( _, i ) => (\n\t\t\t\t<Icon\n\t\t\t\t\tkey={ `half_stars_${ i }` }\n\t\t\t\t\tclassName=\"block-directory-block-ratings__star-half-full\"\n\t\t\t\t\ticon={ starHalf }\n\t\t\t\t\tsize={ 16 }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t\t{ Array.from( { length: emptyStarCount } ).map( ( _, i ) => (\n\t\t\t\t<Icon\n\t\t\t\t\tkey={ `empty_stars_${ i }` }\n\t\t\t\t\tclassName=\"block-directory-block-ratings__star-empty\"\n\t\t\t\t\ticon={ starEmpty }\n\t\t\t\t\tsize={ 16 }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</span>\n\t);\n}\n\nexport default Stars;\n"],
5
+ "mappings": "AAcE,SAQE,KARF;AAXF,SAAS,IAAI,eAAe;AAC5B,SAAS,MAAM,WAAW,YAAY,gBAAgB;AAEtD,SAAS,MAAO,EAAE,OAAO,GAAI;AAC5B,QAAM,QAAQ,KAAK,MAAO,SAAS,GAAI,IAAI;AAE3C,QAAM,gBAAgB,KAAK,MAAO,MAAO;AACzC,QAAM,gBAAgB,KAAK,KAAM,SAAS,aAAc;AACxD,QAAM,iBAAiB,KAAM,gBAAgB;AAE7C,SACC;AAAA,IAAC;AAAA;AAAA,MACA,cAAa;AAAA;AAAA,QAEZ,GAAI,mBAAoB;AAAA,QACxB;AAAA,MACD;AAAA,MAEE;AAAA,cAAM,KAAM,EAAE,QAAQ,cAAc,CAAE,EAAE,IAAK,CAAE,GAAG,MACnD;AAAA,UAAC;AAAA;AAAA,YAEA,WAAU;AAAA,YACV,MAAO;AAAA,YACP,MAAO;AAAA;AAAA,UAHD,cAAe,CAAE;AAAA,QAIxB,CACC;AAAA,QACA,MAAM,KAAM,EAAE,QAAQ,cAAc,CAAE,EAAE,IAAK,CAAE,GAAG,MACnD;AAAA,UAAC;AAAA;AAAA,YAEA,WAAU;AAAA,YACV,MAAO;AAAA,YACP,MAAO;AAAA;AAAA,UAHD,cAAe,CAAE;AAAA,QAIxB,CACC;AAAA,QACA,MAAM,KAAM,EAAE,QAAQ,eAAe,CAAE,EAAE,IAAK,CAAE,GAAG,MACpD;AAAA,UAAC;AAAA;AAAA,YAEA,WAAU;AAAA,YACV,MAAO;AAAA,YACP,MAAO;AAAA;AAAA,UAHD,eAAgB,CAAE;AAAA,QAIzB,CACC;AAAA;AAAA;AAAA,EACH;AAEF;AAEA,IAAO,gBAAQ;",
6
+ "names": []
7
+ }
@@ -1,43 +1,23 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { __, sprintf } from '@wordpress/i18n';
5
-
6
- /**
7
- * Internal dependencies
8
- */
9
- import DownloadableBlockIcon from '../downloadable-block-icon';
10
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
- export default function CompactList({
12
- items
13
- }) {
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { __, sprintf } from "@wordpress/i18n";
3
+ import DownloadableBlockIcon from "../downloadable-block-icon";
4
+ function CompactList({ items }) {
14
5
  if (!items.length) {
15
6
  return null;
16
7
  }
17
- return /*#__PURE__*/_jsx("ul", {
18
- className: "block-directory-compact-list",
19
- children: items.map(({
20
- icon,
21
- id,
22
- title,
23
- author
24
- }) => /*#__PURE__*/_jsxs("li", {
25
- className: "block-directory-compact-list__item",
26
- children: [/*#__PURE__*/_jsx(DownloadableBlockIcon, {
27
- icon: icon,
28
- title: title
29
- }), /*#__PURE__*/_jsxs("div", {
30
- className: "block-directory-compact-list__item-details",
31
- children: [/*#__PURE__*/_jsx("div", {
32
- className: "block-directory-compact-list__item-title",
33
- children: title
34
- }), /*#__PURE__*/_jsx("div", {
35
- className: "block-directory-compact-list__item-author",
36
- children: sprintf(/* translators: %s: Name of the block author. */
37
- __('By %s'), author)
38
- })]
39
- })]
40
- }, id))
41
- });
8
+ return /* @__PURE__ */ jsx("ul", { className: "block-directory-compact-list", children: items.map(({ icon, id, title, author }) => /* @__PURE__ */ jsxs("li", { className: "block-directory-compact-list__item", children: [
9
+ /* @__PURE__ */ jsx(DownloadableBlockIcon, { icon, title }),
10
+ /* @__PURE__ */ jsxs("div", { className: "block-directory-compact-list__item-details", children: [
11
+ /* @__PURE__ */ jsx("div", { className: "block-directory-compact-list__item-title", children: title }),
12
+ /* @__PURE__ */ jsx("div", { className: "block-directory-compact-list__item-author", children: sprintf(
13
+ /* translators: %s: Name of the block author. */
14
+ __("By %s"),
15
+ author
16
+ ) })
17
+ ] })
18
+ ] }, id)) });
42
19
  }
43
- //# sourceMappingURL=index.js.map
20
+ export {
21
+ CompactList as default
22
+ };
23
+ //# sourceMappingURL=index.js.map