@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.
- package/build/components/auto-block-uninstaller/index.js +37 -31
- package/build/components/auto-block-uninstaller/index.js.map +7 -1
- package/build/components/block-ratings/index.js +40 -22
- package/build/components/block-ratings/index.js.map +7 -1
- package/build/components/block-ratings/stars.js +66 -40
- package/build/components/block-ratings/stars.js.map +7 -1
- package/build/components/compact-list/index.js +47 -46
- package/build/components/compact-list/index.js.map +7 -1
- package/build/components/downloadable-block-icon/index.js +28 -26
- package/build/components/downloadable-block-icon/index.js.map +7 -1
- package/build/components/downloadable-block-list-item/index.js +113 -127
- package/build/components/downloadable-block-list-item/index.js.map +7 -1
- package/build/components/downloadable-block-notice/index.js +41 -31
- package/build/components/downloadable-block-notice/index.js.map +7 -1
- package/build/components/downloadable-blocks-list/index.js +72 -56
- package/build/components/downloadable-blocks-list/index.js.map +7 -1
- package/build/components/downloadable-blocks-panel/index.js +108 -95
- package/build/components/downloadable-blocks-panel/index.js.map +7 -1
- package/build/components/downloadable-blocks-panel/inserter-panel.js +52 -38
- package/build/components/downloadable-blocks-panel/inserter-panel.js.map +7 -1
- package/build/components/downloadable-blocks-panel/no-results.js +37 -30
- package/build/components/downloadable-blocks-panel/no-results.js.map +7 -1
- package/build/index.js +27 -12
- package/build/index.js.map +7 -1
- package/build/lock-unlock.js +31 -15
- package/build/lock-unlock.js.map +7 -1
- package/build/plugins/get-install-missing/index.js +123 -102
- package/build/plugins/get-install-missing/index.js.map +7 -1
- package/build/plugins/get-install-missing/install-button.js +68 -50
- package/build/plugins/get-install-missing/install-button.js.map +7 -1
- package/build/plugins/index.js +46 -29
- package/build/plugins/index.js.map +7 -1
- package/build/plugins/inserter-menu-downloadable-blocks-panel/index.js +55 -42
- package/build/plugins/inserter-menu-downloadable-blocks-panel/index.js.map +7 -1
- package/build/plugins/installed-blocks-pre-publish-panel/index.js +65 -34
- package/build/plugins/installed-blocks-pre-publish-panel/index.js.map +7 -1
- package/build/store/actions.js +142 -188
- package/build/store/actions.js.map +7 -1
- package/build/store/index.js +48 -46
- package/build/store/index.js.map +7 -1
- package/build/store/load-assets.js +48 -55
- package/build/store/load-assets.js.map +7 -1
- package/build/store/reducer.js +48 -54
- package/build/store/reducer.js.map +7 -1
- package/build/store/resolvers.js +52 -31
- package/build/store/resolvers.js.map +7 -1
- package/build/store/selectors.js +100 -127
- package/build/store/selectors.js.map +7 -1
- package/build/store/utils/get-plugin-url.js +23 -14
- package/build/store/utils/get-plugin-url.js.map +7 -1
- package/build-module/components/auto-block-uninstaller/index.js +18 -24
- package/build-module/components/auto-block-uninstaller/index.js.map +7 -1
- package/build-module/components/block-ratings/index.js +9 -15
- package/build-module/components/block-ratings/index.js.map +7 -1
- package/build-module/components/block-ratings/stars.js +48 -34
- package/build-module/components/block-ratings/stars.js.map +7 -1
- package/build-module/components/compact-list/index.js +19 -39
- package/build-module/components/compact-list/index.js.map +7 -1
- package/build-module/components/downloadable-block-icon/index.js +10 -20
- package/build-module/components/downloadable-block-icon/index.js.map +7 -1
- package/build-module/components/downloadable-block-list-item/index.js +89 -120
- package/build-module/components/downloadable-block-list-item/index.js.map +7 -1
- package/build-module/components/downloadable-block-notice/index.js +19 -24
- package/build-module/components/downloadable-block-notice/index.js.map +7 -1
- package/build-module/components/downloadable-blocks-list/index.js +44 -49
- package/build-module/components/downloadable-blocks-list/index.js.map +7 -1
- package/build-module/components/downloadable-blocks-panel/index.js +81 -89
- package/build-module/components/downloadable-blocks-panel/index.js.map +7 -1
- package/build-module/components/downloadable-blocks-panel/inserter-panel.js +33 -31
- package/build-module/components/downloadable-blocks-panel/inserter-panel.js.map +7 -1
- package/build-module/components/downloadable-blocks-panel/no-results.js +19 -24
- package/build-module/components/downloadable-blocks-panel/no-results.js.map +7 -1
- package/build-module/index.js +6 -6
- package/build-module/index.js.map +7 -1
- package/build-module/lock-unlock.js +8 -7
- package/build-module/lock-unlock.js.map +7 -1
- package/build-module/plugins/get-install-missing/index.js +99 -95
- package/build-module/plugins/get-install-missing/index.js.map +7 -1
- package/build-module/plugins/get-install-missing/install-button.js +50 -44
- package/build-module/plugins/get-install-missing/install-button.js.map +7 -1
- package/build-module/plugins/index.js +24 -25
- package/build-module/plugins/index.js.map +7 -1
- package/build-module/plugins/inserter-menu-downloadable-blocks-panel/index.js +26 -34
- package/build-module/plugins/inserter-menu-downloadable-blocks-panel/index.js.map +7 -1
- package/build-module/plugins/installed-blocks-pre-publish-panel/index.js +38 -28
- package/build-module/plugins/installed-blocks-pre-publish-panel/index.js.map +7 -1
- package/build-module/store/actions.js +100 -168
- package/build-module/store/actions.js.map +7 -1
- package/build-module/store/index.js +13 -36
- package/build-module/store/index.js.map +7 -1
- package/build-module/store/load-assets.js +15 -47
- package/build-module/store/load-assets.js.map +7 -1
- package/build-module/store/reducer.js +27 -49
- package/build-module/store/reducer.js.map +7 -1
- package/build-module/store/resolvers.js +16 -19
- package/build-module/store/resolvers.js.map +7 -1
- package/build-module/store/selectors.js +77 -121
- package/build-module/store/selectors.js.map +7 -1
- package/build-module/store/utils/get-plugin-url.js +6 -10
- package/build-module/store/utils/get-plugin-url.js.map +7 -1
- package/build-style/style-rtl.css +9 -142
- package/build-style/style.css +9 -142
- package/package.json +28 -21
- package/src/components/block-ratings/style.scss +2 -0
- package/src/components/compact-list/style.scss +3 -0
- package/src/components/downloadable-block-icon/style.scss +3 -0
- package/src/components/downloadable-block-list-item/style.scss +4 -0
- package/src/components/downloadable-block-notice/style.scss +3 -0
- package/src/components/downloadable-blocks-panel/style.scss +3 -1
- package/src/style.scss +8 -7
|
@@ -1,70 +1,85 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
Object.
|
|
5
|
-
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var downloadable_blocks_panel_exports = {};
|
|
29
|
+
__export(downloadable_blocks_panel_exports, {
|
|
30
|
+
default: () => DownloadableBlocksPanel
|
|
6
31
|
});
|
|
7
|
-
exports
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
/**
|
|
19
|
-
* WordPress dependencies
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Internal dependencies
|
|
24
|
-
*/
|
|
25
|
-
|
|
32
|
+
module.exports = __toCommonJS(downloadable_blocks_panel_exports);
|
|
33
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
+
var import_i18n = require("@wordpress/i18n");
|
|
35
|
+
var import_components = require("@wordpress/components");
|
|
36
|
+
var import_core_data = require("@wordpress/core-data");
|
|
37
|
+
var import_data = require("@wordpress/data");
|
|
38
|
+
var import_blocks = require("@wordpress/blocks");
|
|
39
|
+
var import_downloadable_blocks_list = __toESM(require("../downloadable-blocks-list"));
|
|
40
|
+
var import_inserter_panel = __toESM(require("./inserter-panel"));
|
|
41
|
+
var import_no_results = __toESM(require("./no-results"));
|
|
42
|
+
var import_store = require("../../store");
|
|
26
43
|
const EMPTY_ARRAY = [];
|
|
27
|
-
const useDownloadableBlocks = filterValue => (0,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
downloadableBlocks
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
// Return identical empty array when there are no blocks
|
|
58
|
-
if (downloadableBlocks.length === 0) {
|
|
59
|
-
downloadableBlocks = EMPTY_ARRAY;
|
|
44
|
+
const useDownloadableBlocks = (filterValue) => (0, import_data.useSelect)(
|
|
45
|
+
(select) => {
|
|
46
|
+
const {
|
|
47
|
+
getDownloadableBlocks,
|
|
48
|
+
isRequestingDownloadableBlocks,
|
|
49
|
+
getInstalledBlockTypes
|
|
50
|
+
} = select(import_store.store);
|
|
51
|
+
const hasPermission = select(import_core_data.store).canUser(
|
|
52
|
+
"read",
|
|
53
|
+
"block-directory/search"
|
|
54
|
+
);
|
|
55
|
+
let downloadableBlocks = EMPTY_ARRAY;
|
|
56
|
+
if (hasPermission) {
|
|
57
|
+
downloadableBlocks = getDownloadableBlocks(filterValue);
|
|
58
|
+
const installedBlockTypes = getInstalledBlockTypes();
|
|
59
|
+
const installableBlocks = downloadableBlocks.filter(
|
|
60
|
+
({ name }) => {
|
|
61
|
+
const isJustInstalled = installedBlockTypes.some(
|
|
62
|
+
(blockType) => blockType.name === name
|
|
63
|
+
);
|
|
64
|
+
const isPreviouslyInstalled = (0, import_blocks.getBlockType)(name);
|
|
65
|
+
return isJustInstalled || !isPreviouslyInstalled;
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
if (installableBlocks.length !== downloadableBlocks.length) {
|
|
69
|
+
downloadableBlocks = installableBlocks;
|
|
70
|
+
}
|
|
71
|
+
if (downloadableBlocks.length === 0) {
|
|
72
|
+
downloadableBlocks = EMPTY_ARRAY;
|
|
73
|
+
}
|
|
60
74
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
75
|
+
return {
|
|
76
|
+
hasPermission,
|
|
77
|
+
downloadableBlocks,
|
|
78
|
+
isLoading: isRequestingDownloadableBlocks(filterValue)
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
[filterValue]
|
|
82
|
+
);
|
|
68
83
|
function DownloadableBlocksPanel({
|
|
69
84
|
onSelect,
|
|
70
85
|
onHover,
|
|
@@ -72,43 +87,41 @@ function DownloadableBlocksPanel({
|
|
|
72
87
|
isTyping,
|
|
73
88
|
filterValue
|
|
74
89
|
}) {
|
|
75
|
-
const {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
87
|
-
className: "block-editor-inserter__quick-inserter-separator"
|
|
88
|
-
})]
|
|
89
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
90
|
-
className: "block-directory-downloadable-blocks-panel has-blocks-loading",
|
|
91
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Spinner, {})
|
|
92
|
-
})]
|
|
93
|
-
});
|
|
90
|
+
const { hasPermission, downloadableBlocks, isLoading } = useDownloadableBlocks(filterValue);
|
|
91
|
+
if (hasPermission === void 0 || isLoading || isTyping) {
|
|
92
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
93
|
+
hasPermission && !hasLocalBlocks && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
94
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "block-directory-downloadable-blocks-panel__no-local", children: (0, import_i18n.__)(
|
|
95
|
+
"No results available from your installed blocks."
|
|
96
|
+
) }),
|
|
97
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "block-editor-inserter__quick-inserter-separator" })
|
|
98
|
+
] }),
|
|
99
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "block-directory-downloadable-blocks-panel has-blocks-loading", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.Spinner, {}) })
|
|
100
|
+
] });
|
|
94
101
|
}
|
|
95
102
|
if (false === hasPermission) {
|
|
96
103
|
if (!hasLocalBlocks) {
|
|
97
|
-
return
|
|
104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_no_results.default, {});
|
|
98
105
|
}
|
|
99
106
|
return null;
|
|
100
107
|
}
|
|
101
108
|
if (downloadableBlocks.length === 0) {
|
|
102
|
-
return hasLocalBlocks ? null :
|
|
109
|
+
return hasLocalBlocks ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_no_results.default, {});
|
|
103
110
|
}
|
|
104
|
-
return
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
112
|
+
import_inserter_panel.default,
|
|
113
|
+
{
|
|
114
|
+
downloadableItems: downloadableBlocks,
|
|
115
|
+
hasLocalBlocks,
|
|
116
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
117
|
+
import_downloadable_blocks_list.default,
|
|
118
|
+
{
|
|
119
|
+
items: downloadableBlocks,
|
|
120
|
+
onSelect,
|
|
121
|
+
onHover
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
}
|
|
125
|
+
);
|
|
113
126
|
}
|
|
114
|
-
//# sourceMappingURL=index.js.map
|
|
127
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/downloadable-blocks-panel/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Spinner } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { getBlockType } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport DownloadableBlocksList from '../downloadable-blocks-list';\nimport DownloadableBlocksInserterPanel from './inserter-panel';\nimport DownloadableBlocksNoResults from './no-results';\nimport { store as blockDirectoryStore } from '../../store';\n\nconst EMPTY_ARRAY = [];\n\nconst useDownloadableBlocks = ( filterValue ) =>\n\tuseSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetDownloadableBlocks,\n\t\t\t\tisRequestingDownloadableBlocks,\n\t\t\t\tgetInstalledBlockTypes,\n\t\t\t} = select( blockDirectoryStore );\n\n\t\t\tconst hasPermission = select( coreStore ).canUser(\n\t\t\t\t'read',\n\t\t\t\t'block-directory/search'\n\t\t\t);\n\n\t\t\tlet downloadableBlocks = EMPTY_ARRAY;\n\t\t\tif ( hasPermission ) {\n\t\t\t\tdownloadableBlocks = getDownloadableBlocks( filterValue );\n\n\t\t\t\t// Filter out blocks that are already installed.\n\t\t\t\tconst installedBlockTypes = getInstalledBlockTypes();\n\t\t\t\tconst installableBlocks = downloadableBlocks.filter(\n\t\t\t\t\t( { name } ) => {\n\t\t\t\t\t\t// Check if the block has just been installed, in which case it\n\t\t\t\t\t\t// should still show in the list to avoid suddenly disappearing.\n\t\t\t\t\t\t// `installedBlockTypes` only returns blocks stored in state\n\t\t\t\t\t\t// immediately after installation, not all installed blocks.\n\t\t\t\t\t\tconst isJustInstalled = installedBlockTypes.some(\n\t\t\t\t\t\t\t( blockType ) => blockType.name === name\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst isPreviouslyInstalled = getBlockType( name );\n\t\t\t\t\t\treturn isJustInstalled || ! isPreviouslyInstalled;\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\t// Keep identity of the `downloadableBlocks` array if nothing was filtered out\n\t\t\t\tif ( installableBlocks.length !== downloadableBlocks.length ) {\n\t\t\t\t\tdownloadableBlocks = installableBlocks;\n\t\t\t\t}\n\n\t\t\t\t// Return identical empty array when there are no blocks\n\t\t\t\tif ( downloadableBlocks.length === 0 ) {\n\t\t\t\t\tdownloadableBlocks = EMPTY_ARRAY;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\thasPermission,\n\t\t\t\tdownloadableBlocks,\n\t\t\t\tisLoading: isRequestingDownloadableBlocks( filterValue ),\n\t\t\t};\n\t\t},\n\t\t[ filterValue ]\n\t);\n\nexport default function DownloadableBlocksPanel( {\n\tonSelect,\n\tonHover,\n\thasLocalBlocks,\n\tisTyping,\n\tfilterValue,\n} ) {\n\tconst { hasPermission, downloadableBlocks, isLoading } =\n\t\tuseDownloadableBlocks( filterValue );\n\n\tif ( hasPermission === undefined || isLoading || isTyping ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ hasPermission && ! hasLocalBlocks && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__no-local\">\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'No results available from your installed blocks.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<div className=\"block-editor-inserter__quick-inserter-separator\" />\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t<div className=\"block-directory-downloadable-blocks-panel has-blocks-loading\">\n\t\t\t\t\t<Spinner />\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n\n\tif ( false === hasPermission ) {\n\t\tif ( ! hasLocalBlocks ) {\n\t\t\treturn <DownloadableBlocksNoResults />;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tif ( downloadableBlocks.length === 0 ) {\n\t\treturn hasLocalBlocks ? null : <DownloadableBlocksNoResults />;\n\t}\n\n\treturn (\n\t\t<DownloadableBlocksInserterPanel\n\t\t\tdownloadableItems={ downloadableBlocks }\n\t\t\thasLocalBlocks={ hasLocalBlocks }\n\t\t>\n\t\t\t<DownloadableBlocksList\n\t\t\t\titems={ downloadableBlocks }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t\tonHover={ onHover }\n\t\t\t/>\n\t\t</DownloadableBlocksInserterPanel>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAuFK;AApFL,kBAAmB;AACnB,wBAAwB;AACxB,uBAAmC;AACnC,kBAA0B;AAC1B,oBAA6B;AAK7B,sCAAmC;AACnC,4BAA4C;AAC5C,wBAAwC;AACxC,mBAA6C;AAE7C,MAAM,cAAc,CAAC;AAErB,MAAM,wBAAwB,CAAE,oBAC/B;AAAA,EACC,CAAE,WAAY;AACb,UAAM;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACD,IAAI,OAAQ,aAAAA,KAAoB;AAEhC,UAAM,gBAAgB,OAAQ,iBAAAC,KAAU,EAAE;AAAA,MACzC;AAAA,MACA;AAAA,IACD;AAEA,QAAI,qBAAqB;AACzB,QAAK,eAAgB;AACpB,2BAAqB,sBAAuB,WAAY;AAGxD,YAAM,sBAAsB,uBAAuB;AACnD,YAAM,oBAAoB,mBAAmB;AAAA,QAC5C,CAAE,EAAE,KAAK,MAAO;AAKf,gBAAM,kBAAkB,oBAAoB;AAAA,YAC3C,CAAE,cAAe,UAAU,SAAS;AAAA,UACrC;AACA,gBAAM,4BAAwB,4BAAc,IAAK;AACjD,iBAAO,mBAAmB,CAAE;AAAA,QAC7B;AAAA,MACD;AAGA,UAAK,kBAAkB,WAAW,mBAAmB,QAAS;AAC7D,6BAAqB;AAAA,MACtB;AAGA,UAAK,mBAAmB,WAAW,GAAI;AACtC,6BAAqB;AAAA,MACtB;AAAA,IACD;AAEA,WAAO;AAAA,MACN;AAAA,MACA;AAAA,MACA,WAAW,+BAAgC,WAAY;AAAA,IACxD;AAAA,EACD;AAAA,EACA,CAAE,WAAY;AACf;AAEc,SAAR,wBAA0C;AAAA,EAChD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,EAAE,eAAe,oBAAoB,UAAU,IACpD,sBAAuB,WAAY;AAEpC,MAAK,kBAAkB,UAAa,aAAa,UAAW;AAC3D,WACC,4EACG;AAAA,uBAAiB,CAAE,kBACpB,4EACC;AAAA,oDAAC,OAAE,WAAU,uDACV;AAAA,UACD;AAAA,QACD,GACD;AAAA,QACA,4CAAC,SAAI,WAAU,mDAAkD;AAAA,SAClE;AAAA,MAED,4CAAC,SAAI,WAAU,gEACd,sDAAC,6BAAQ,GACV;AAAA,OACD;AAAA,EAEF;AAEA,MAAK,UAAU,eAAgB;AAC9B,QAAK,CAAE,gBAAiB;AACvB,aAAO,4CAAC,kBAAAC,SAAA,EAA4B;AAAA,IACrC;AAEA,WAAO;AAAA,EACR;AAEA,MAAK,mBAAmB,WAAW,GAAI;AACtC,WAAO,iBAAiB,OAAO,4CAAC,kBAAAA,SAAA,EAA4B;AAAA,EAC7D;AAEA,SACC;AAAA,IAAC,sBAAAC;AAAA,IAAA;AAAA,MACA,mBAAoB;AAAA,MACpB;AAAA,MAEA;AAAA,QAAC,gCAAAC;AAAA,QAAA;AAAA,UACA,OAAQ;AAAA,UACR;AAAA,UACA;AAAA;AAAA,MACD;AAAA;AAAA,EACD;AAEF;",
|
|
6
|
+
"names": ["blockDirectoryStore", "coreStore", "DownloadableBlocksNoResults", "DownloadableBlocksInserterPanel", "DownloadableBlocksList"]
|
|
7
|
+
}
|
|
@@ -1,47 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
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 inserter_panel_exports = {};
|
|
19
|
+
__export(inserter_panel_exports, {
|
|
20
|
+
default: () => inserter_panel_default
|
|
5
21
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
/**
|
|
12
|
-
* WordPress dependencies
|
|
13
|
-
*/
|
|
14
|
-
|
|
22
|
+
module.exports = __toCommonJS(inserter_panel_exports);
|
|
23
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
|
+
var import_i18n = require("@wordpress/i18n");
|
|
25
|
+
var import_element = require("@wordpress/element");
|
|
26
|
+
var import_a11y = require("@wordpress/a11y");
|
|
15
27
|
function DownloadableBlocksInserterPanel({
|
|
16
28
|
children,
|
|
17
29
|
downloadableItems,
|
|
18
30
|
hasLocalBlocks
|
|
19
31
|
}) {
|
|
20
32
|
const count = downloadableItems.length;
|
|
21
|
-
(0,
|
|
22
|
-
(0,
|
|
23
|
-
|
|
33
|
+
(0, import_element.useEffect)(() => {
|
|
34
|
+
(0, import_a11y.speak)(
|
|
35
|
+
(0, import_i18n.sprintf)(
|
|
36
|
+
/* translators: %d: number of available blocks. */
|
|
37
|
+
(0, import_i18n._n)(
|
|
38
|
+
"%d additional block is available to install.",
|
|
39
|
+
"%d additional blocks are available to install.",
|
|
40
|
+
count
|
|
41
|
+
),
|
|
42
|
+
count
|
|
43
|
+
)
|
|
44
|
+
);
|
|
24
45
|
}, [count]);
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
39
|
-
className: "block-directory-downloadable-blocks-panel__description",
|
|
40
|
-
children: (0, _i18n.__)('Select a block to install and add it to your post.')
|
|
41
|
-
})]
|
|
42
|
-
}), children]
|
|
43
|
-
})]
|
|
44
|
-
});
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
47
|
+
!hasLocalBlocks && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "block-directory-downloadable-blocks-panel__no-local", children: (0, import_i18n.__)("No results available from your installed blocks.") }),
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "block-editor-inserter__quick-inserter-separator" }),
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "block-directory-downloadable-blocks-panel", children: [
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "block-directory-downloadable-blocks-panel__header", children: [
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "block-directory-downloadable-blocks-panel__title", children: (0, import_i18n.__)("Available to install") }),
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "block-directory-downloadable-blocks-panel__description", children: (0, import_i18n.__)(
|
|
53
|
+
"Select a block to install and add it to your post."
|
|
54
|
+
) })
|
|
55
|
+
] }),
|
|
56
|
+
children
|
|
57
|
+
] })
|
|
58
|
+
] });
|
|
45
59
|
}
|
|
46
|
-
var
|
|
47
|
-
//# sourceMappingURL=inserter-panel.js.map
|
|
60
|
+
var inserter_panel_default = DownloadableBlocksInserterPanel;
|
|
61
|
+
//# sourceMappingURL=inserter-panel.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/downloadable-blocks-panel/inserter-panel.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\n\nfunction DownloadableBlocksInserterPanel( {\n\tchildren,\n\tdownloadableItems,\n\thasLocalBlocks,\n} ) {\n\tconst count = downloadableItems.length;\n\tuseEffect( () => {\n\t\tspeak(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %d: number of available blocks. */\n\t\t\t\t_n(\n\t\t\t\t\t'%d additional block is available to install.',\n\t\t\t\t\t'%d additional blocks are available to install.',\n\t\t\t\t\tcount\n\t\t\t\t),\n\t\t\t\tcount\n\t\t\t)\n\t\t);\n\t}, [ count ] );\n\n\treturn (\n\t\t<>\n\t\t\t{ ! hasLocalBlocks && (\n\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__no-local\">\n\t\t\t\t\t{ __( 'No results available from your installed blocks.' ) }\n\t\t\t\t</p>\n\t\t\t) }\n\n\t\t\t<div className=\"block-editor-inserter__quick-inserter-separator\" />\n\n\t\t\t<div className=\"block-directory-downloadable-blocks-panel\">\n\t\t\t\t<div className=\"block-directory-downloadable-blocks-panel__header\">\n\t\t\t\t\t<h2 className=\"block-directory-downloadable-blocks-panel__title\">\n\t\t\t\t\t\t{ __( 'Available to install' ) }\n\t\t\t\t\t</h2>\n\t\t\t\t\t<p className=\"block-directory-downloadable-blocks-panel__description\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Select a block to install and add it to your post.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default DownloadableBlocksInserterPanel;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA4BE;AAzBF,kBAAgC;AAChC,qBAA0B;AAC1B,kBAAsB;AAEtB,SAAS,gCAAiC;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,QAAQ,kBAAkB;AAChC,gCAAW,MAAM;AAChB;AAAA,UACC;AAAA;AAAA,YAEC;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,QACD;AAAA,QACA;AAAA,MACD;AAAA,IACD;AAAA,EACD,GAAG,CAAE,KAAM,CAAE;AAEb,SACC,4EACG;AAAA,KAAE,kBACH,4CAAC,OAAE,WAAU,uDACV,8BAAI,kDAAmD,GAC1D;AAAA,IAGD,4CAAC,SAAI,WAAU,mDAAkD;AAAA,IAEjE,6CAAC,SAAI,WAAU,6CACd;AAAA,mDAAC,SAAI,WAAU,qDACd;AAAA,oDAAC,QAAG,WAAU,oDACX,8BAAI,sBAAuB,GAC9B;AAAA,QACA,4CAAC,OAAE,WAAU,0DACV;AAAA,UACD;AAAA,QACD,GACD;AAAA,SACD;AAAA,MACE;AAAA,OACH;AAAA,KACD;AAEF;AAEA,IAAO,yBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,33 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
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 no_results_exports = {};
|
|
19
|
+
__export(no_results_exports, {
|
|
20
|
+
default: () => no_results_default
|
|
5
21
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
/**
|
|
11
|
-
* WordPress dependencies
|
|
12
|
-
*/
|
|
13
|
-
|
|
22
|
+
module.exports = __toCommonJS(no_results_exports);
|
|
23
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
|
+
var import_i18n = require("@wordpress/i18n");
|
|
25
|
+
var import_components = require("@wordpress/components");
|
|
14
26
|
function DownloadableBlocksNoResults() {
|
|
15
|
-
return
|
|
16
|
-
children:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
children: [(0, _i18n.__)('Get started here'), "."]
|
|
27
|
-
})]
|
|
28
|
-
})
|
|
29
|
-
})]
|
|
30
|
-
});
|
|
27
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
28
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "block-editor-inserter__no-results", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: (0, import_i18n.__)("No results found.") }) }),
|
|
29
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "block-editor-inserter__tips", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.Tip, { children: [
|
|
30
|
+
(0, import_i18n.__)("Interested in creating your own block?"),
|
|
31
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
|
|
32
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.ExternalLink, { href: "https://developer.wordpress.org/block-editor/", children: [
|
|
33
|
+
(0, import_i18n.__)("Get started here"),
|
|
34
|
+
"."
|
|
35
|
+
] })
|
|
36
|
+
] }) })
|
|
37
|
+
] });
|
|
31
38
|
}
|
|
32
|
-
var
|
|
33
|
-
//# sourceMappingURL=no-results.js.map
|
|
39
|
+
var no_results_default = DownloadableBlocksNoResults;
|
|
40
|
+
//# sourceMappingURL=no-results.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/downloadable-blocks-panel/no-results.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Tip, ExternalLink } from '@wordpress/components';\n\nfunction DownloadableBlocksNoResults() {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"block-editor-inserter__no-results\">\n\t\t\t\t<p>{ __( 'No results found.' ) }</p>\n\t\t\t</div>\n\t\t\t<div className=\"block-editor-inserter__tips\">\n\t\t\t\t<Tip>\n\t\t\t\t\t{ __( 'Interested in creating your own block?' ) }\n\t\t\t\t\t<br />\n\t\t\t\t\t<ExternalLink href=\"https://developer.wordpress.org/block-editor/\">\n\t\t\t\t\t\t{ __( 'Get started here' ) }.\n\t\t\t\t\t</ExternalLink>\n\t\t\t\t</Tip>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default DownloadableBlocksNoResults;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQE;AALF,kBAAmB;AACnB,wBAAkC;AAElC,SAAS,8BAA8B;AACtC,SACC,4EACC;AAAA,gDAAC,SAAI,WAAU,qCACd,sDAAC,OAAI,8BAAI,mBAAoB,GAAG,GACjC;AAAA,IACA,4CAAC,SAAI,WAAU,+BACd,uDAAC,yBACE;AAAA,0BAAI,wCAAyC;AAAA,MAC/C,4CAAC,QAAG;AAAA,MACJ,6CAAC,kCAAa,MAAK,iDAChB;AAAA,4BAAI,kBAAmB;AAAA,QAAG;AAAA,SAC7B;AAAA,OACD,GACD;AAAA,KACD;AAEF;AAEA,IAAO,qBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/build/index.js
CHANGED
|
@@ -1,14 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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 });
|
|
10
14
|
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var index_exports = {};
|
|
19
|
+
__export(index_exports, {
|
|
20
|
+
store: () => import_store.store
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(index_exports);
|
|
23
|
+
var import_plugins = require("./plugins");
|
|
24
|
+
var import_store = require("./store");
|
|
25
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
26
|
+
0 && (module.exports = {
|
|
27
|
+
store
|
|
11
28
|
});
|
|
12
|
-
|
|
13
|
-
var _store = require("./store");
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/index.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport './plugins';\n\nexport { store } from './store';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAO;AAEP,mBAAsB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/build/lock-unlock.js
CHANGED
|
@@ -1,18 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
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 lock_unlock_exports = {};
|
|
19
|
+
__export(lock_unlock_exports, {
|
|
20
|
+
lock: () => lock,
|
|
21
|
+
unlock: () => unlock
|
|
5
22
|
});
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
23
|
+
module.exports = __toCommonJS(lock_unlock_exports);
|
|
24
|
+
var import_private_apis = require("@wordpress/private-apis");
|
|
25
|
+
const { lock, unlock } = (0, import_private_apis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)(
|
|
26
|
+
"I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.",
|
|
27
|
+
"@wordpress/block-directory"
|
|
28
|
+
);
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
13
31
|
lock,
|
|
14
32
|
unlock
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
exports.lock = lock;
|
|
18
|
-
//# sourceMappingURL=lock-unlock.js.map
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=lock-unlock.js.map
|
package/build/lock-unlock.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/lock-unlock.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/block-directory'\n\t);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,0BAAiE;AAE1D,MAAM,EAAE,MAAM,OAAO,QAC3B;AAAA,EACC;AAAA,EACA;AACD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|