@wordpress/core-commands 1.32.0 → 1.32.1-next.ff1cebbba.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/admin-navigation-commands.js +59 -40
- package/build/admin-navigation-commands.js.map +7 -1
- package/build/index.js +45 -56
- package/build/index.js.map +7 -1
- package/build/lock-unlock.js +31 -15
- package/build/lock-unlock.js.map +7 -1
- package/build/private-apis.js +33 -17
- package/build/private-apis.js.map +7 -1
- package/build/site-editor-navigation-commands.js +294 -266
- package/build/site-editor-navigation-commands.js.map +7 -1
- package/build/utils/order-entity-records-by-search.js +27 -7
- package/build/utils/order-entity-records-by-search.js.map +7 -1
- package/build-module/admin-navigation-commands.js +34 -31
- package/build-module/admin-navigation-commands.js.map +7 -1
- package/build-module/index.js +22 -44
- 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/private-apis.js +8 -8
- package/build-module/private-apis.js.map +7 -1
- package/build-module/site-editor-navigation-commands.js +256 -235
- package/build-module/site-editor-navigation-commands.js.map +7 -1
- package/build-module/utils/order-entity-records-by-search.js +5 -2
- package/build-module/utils/order-entity-records-by-search.js.map +7 -1
- package/package.json +22 -16
|
@@ -1,39 +1,53 @@
|
|
|
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 admin_navigation_commands_exports = {};
|
|
19
|
+
__export(admin_navigation_commands_exports, {
|
|
20
|
+
useAdminNavigationCommands: () => useAdminNavigationCommands
|
|
5
21
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
/**
|
|
14
|
-
* WordPress dependencies
|
|
15
|
-
*/
|
|
16
|
-
|
|
22
|
+
module.exports = __toCommonJS(admin_navigation_commands_exports);
|
|
23
|
+
var import_commands = require("@wordpress/commands");
|
|
24
|
+
var import_i18n = require("@wordpress/i18n");
|
|
25
|
+
var import_icons = require("@wordpress/icons");
|
|
26
|
+
var import_element = require("@wordpress/element");
|
|
27
|
+
var import_core_data = require("@wordpress/core-data");
|
|
28
|
+
var import_data = require("@wordpress/data");
|
|
17
29
|
const getViewSiteCommand = () => function useViewSiteCommand() {
|
|
18
|
-
const homeUrl = (0,
|
|
19
|
-
|
|
20
|
-
|
|
30
|
+
const homeUrl = (0, import_data.useSelect)((select) => {
|
|
31
|
+
return select(import_core_data.store).getEntityRecord(
|
|
32
|
+
"root",
|
|
33
|
+
"__unstableBase"
|
|
34
|
+
)?.home;
|
|
21
35
|
}, []);
|
|
22
|
-
const commands = (0,
|
|
36
|
+
const commands = (0, import_element.useMemo)(() => {
|
|
23
37
|
if (!homeUrl) {
|
|
24
38
|
return [];
|
|
25
39
|
}
|
|
26
|
-
return [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
close
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
return [
|
|
41
|
+
{
|
|
42
|
+
name: "core/view-site",
|
|
43
|
+
label: (0, import_i18n.__)("View site"),
|
|
44
|
+
icon: import_icons.external,
|
|
45
|
+
callback: ({ close }) => {
|
|
46
|
+
close();
|
|
47
|
+
window.open(homeUrl, "_blank");
|
|
48
|
+
}
|
|
35
49
|
}
|
|
36
|
-
|
|
50
|
+
];
|
|
37
51
|
}, [homeUrl]);
|
|
38
52
|
return {
|
|
39
53
|
isLoading: false,
|
|
@@ -41,27 +55,32 @@ const getViewSiteCommand = () => function useViewSiteCommand() {
|
|
|
41
55
|
};
|
|
42
56
|
};
|
|
43
57
|
function useAdminNavigationCommands(menuCommands) {
|
|
44
|
-
const commands = (0,
|
|
45
|
-
return (menuCommands
|
|
46
|
-
const label = (0,
|
|
47
|
-
|
|
58
|
+
const commands = (0, import_element.useMemo)(() => {
|
|
59
|
+
return (menuCommands ?? []).map((menuCommand) => {
|
|
60
|
+
const label = (0, import_i18n.sprintf)(
|
|
61
|
+
/* translators: %s: menu label */
|
|
62
|
+
(0, import_i18n.__)("Go to: %s"),
|
|
63
|
+
menuCommand.label
|
|
64
|
+
);
|
|
48
65
|
return {
|
|
49
66
|
name: menuCommand.name,
|
|
50
67
|
label,
|
|
51
68
|
searchLabel: label,
|
|
52
|
-
callback: ({
|
|
53
|
-
close
|
|
54
|
-
}) => {
|
|
69
|
+
callback: ({ close }) => {
|
|
55
70
|
document.location = menuCommand.url;
|
|
56
71
|
close();
|
|
57
72
|
}
|
|
58
73
|
};
|
|
59
74
|
});
|
|
60
75
|
}, [menuCommands]);
|
|
61
|
-
(0,
|
|
62
|
-
(0,
|
|
63
|
-
name:
|
|
76
|
+
(0, import_commands.useCommands)(commands);
|
|
77
|
+
(0, import_commands.useCommandLoader)({
|
|
78
|
+
name: "core/view-site",
|
|
64
79
|
hook: getViewSiteCommand()
|
|
65
80
|
});
|
|
66
81
|
}
|
|
67
|
-
|
|
82
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
83
|
+
0 && (module.exports = {
|
|
84
|
+
useAdminNavigationCommands
|
|
85
|
+
});
|
|
86
|
+
//# sourceMappingURL=admin-navigation-commands.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/admin-navigation-commands.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useCommandLoader, useCommands } from '@wordpress/commands';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { external } from '@wordpress/icons';\nimport { useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\nconst getViewSiteCommand = () =>\n\tfunction useViewSiteCommand() {\n\t\tconst homeUrl = useSelect( ( select ) => {\n\t\t\t// Site index.\n\t\t\treturn select( coreStore ).getEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'__unstableBase'\n\t\t\t)?.home;\n\t\t}, [] );\n\n\t\tconst commands = useMemo( () => {\n\t\t\tif ( ! homeUrl ) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tname: 'core/view-site',\n\t\t\t\t\tlabel: __( 'View site' ),\n\t\t\t\t\ticon: external,\n\t\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\t\tclose();\n\t\t\t\t\t\twindow.open( homeUrl, '_blank' );\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t];\n\t\t}, [ homeUrl ] );\n\n\t\treturn {\n\t\t\tisLoading: false,\n\t\t\tcommands,\n\t\t};\n\t};\n\nexport function useAdminNavigationCommands( menuCommands ) {\n\tconst commands = useMemo( () => {\n\t\treturn ( menuCommands ?? [] ).map( ( menuCommand ) => {\n\t\t\tconst label = sprintf(\n\t\t\t\t/* translators: %s: menu label */\n\t\t\t\t__( 'Go to: %s' ),\n\t\t\t\tmenuCommand.label\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tname: menuCommand.name,\n\t\t\t\tlabel,\n\t\t\t\tsearchLabel: label,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tdocument.location = menuCommand.url;\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t};\n\t\t} );\n\t}, [ menuCommands ] );\n\tuseCommands( commands );\n\n\tuseCommandLoader( {\n\t\tname: 'core/view-site',\n\t\thook: getViewSiteCommand(),\n\t} );\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,sBAA8C;AAC9C,kBAA4B;AAC5B,mBAAyB;AACzB,qBAAwB;AACxB,uBAAmC;AACnC,kBAA0B;AAE1B,MAAM,qBAAqB,MAC1B,SAAS,qBAAqB;AAC7B,QAAM,cAAU,uBAAW,CAAE,WAAY;AAExC,WAAO,OAAQ,iBAAAA,KAAU,EAAE;AAAA,MAC1B;AAAA,MACA;AAAA,IACD,GAAG;AAAA,EACJ,GAAG,CAAC,CAAE;AAEN,QAAM,eAAW,wBAAS,MAAM;AAC/B,QAAK,CAAE,SAAU;AAChB,aAAO,CAAC;AAAA,IACT;AAEA,WAAO;AAAA,MACN;AAAA,QACC,MAAM;AAAA,QACN,WAAO,gBAAI,WAAY;AAAA,QACvB,MAAM;AAAA,QACN,UAAU,CAAE,EAAE,MAAM,MAAO;AAC1B,gBAAM;AACN,iBAAO,KAAM,SAAS,QAAS;AAAA,QAChC;AAAA,MACD;AAAA,IACD;AAAA,EACD,GAAG,CAAE,OAAQ,CAAE;AAEf,SAAO;AAAA,IACN,WAAW;AAAA,IACX;AAAA,EACD;AACD;AAEM,SAAS,2BAA4B,cAAe;AAC1D,QAAM,eAAW,wBAAS,MAAM;AAC/B,YAAS,gBAAgB,CAAC,GAAI,IAAK,CAAE,gBAAiB;AACrD,YAAM,YAAQ;AAAA;AAAA,YAEb,gBAAI,WAAY;AAAA,QAChB,YAAY;AAAA,MACb;AACA,aAAO;AAAA,QACN,MAAM,YAAY;AAAA,QAClB;AAAA,QACA,aAAa;AAAA,QACb,UAAU,CAAE,EAAE,MAAM,MAAO;AAC1B,mBAAS,WAAW,YAAY;AAChC,gBAAM;AAAA,QACP;AAAA,MACD;AAAA,IACD,CAAE;AAAA,EACH,GAAG,CAAE,YAAa,CAAE;AACpB,mCAAa,QAAS;AAEtB,wCAAkB;AAAA,IACjB,MAAM;AAAA,IACN,MAAM,mBAAmB;AAAA,EAC1B,CAAE;AACH;",
|
|
6
|
+
"names": ["coreStore"]
|
|
7
|
+
}
|
package/build/index.js
CHANGED
|
@@ -1,62 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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 });
|
|
11
14
|
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var index_exports = {};
|
|
19
|
+
__export(index_exports, {
|
|
20
|
+
initializeCommandPalette: () => initializeCommandPalette,
|
|
21
|
+
privateApis: () => import_private_apis.privateApis
|
|
12
22
|
});
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
const {
|
|
30
|
-
RouterProvider
|
|
31
|
-
} = (0, _lockUnlock.unlock)(_router.privateApis);
|
|
32
|
-
|
|
33
|
-
// Register core commands and render the Command Palette.
|
|
34
|
-
function CommandPalette({
|
|
35
|
-
settings
|
|
36
|
-
}) {
|
|
37
|
-
const {
|
|
38
|
-
menu_commands: menuCommands
|
|
39
|
-
} = settings;
|
|
40
|
-
(0, _adminNavigationCommands.useAdminNavigationCommands)(menuCommands);
|
|
41
|
-
(0, _siteEditorNavigationCommands.useSiteEditorNavigationCommands)();
|
|
42
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(RouterProvider, {
|
|
43
|
-
pathArg: "p",
|
|
44
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_commands.CommandMenu, {})
|
|
45
|
-
});
|
|
23
|
+
module.exports = __toCommonJS(index_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_element = require("@wordpress/element");
|
|
26
|
+
var import_router = require("@wordpress/router");
|
|
27
|
+
var import_commands = require("@wordpress/commands");
|
|
28
|
+
var import_admin_navigation_commands = require("./admin-navigation-commands");
|
|
29
|
+
var import_site_editor_navigation_commands = require("./site-editor-navigation-commands");
|
|
30
|
+
var import_lock_unlock = require("./lock-unlock");
|
|
31
|
+
var import_private_apis = require("./private-apis");
|
|
32
|
+
const { RouterProvider } = (0, import_lock_unlock.unlock)(import_router.privateApis);
|
|
33
|
+
function CommandPalette({ settings }) {
|
|
34
|
+
const { menu_commands: menuCommands } = settings;
|
|
35
|
+
(0, import_admin_navigation_commands.useAdminNavigationCommands)(menuCommands);
|
|
36
|
+
(0, import_site_editor_navigation_commands.useSiteEditorNavigationCommands)();
|
|
37
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RouterProvider, { pathArg: "p", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_commands.CommandMenu, {}) });
|
|
46
38
|
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Initializes the Command Palette.
|
|
50
|
-
*
|
|
51
|
-
* @param {Object} settings Command palette settings.
|
|
52
|
-
*/
|
|
53
39
|
function initializeCommandPalette(settings) {
|
|
54
|
-
const root = document.createElement(
|
|
40
|
+
const root = document.createElement("div");
|
|
55
41
|
document.body.appendChild(root);
|
|
56
|
-
(0,
|
|
57
|
-
children:
|
|
58
|
-
|
|
59
|
-
})
|
|
60
|
-
}));
|
|
42
|
+
(0, import_element.createRoot)(root).render(
|
|
43
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_element.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CommandPalette, { settings }) })
|
|
44
|
+
);
|
|
61
45
|
}
|
|
62
|
-
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
initializeCommandPalette,
|
|
49
|
+
privateApis
|
|
50
|
+
});
|
|
51
|
+
//# 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 * WordPress dependencies\n */\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { CommandMenu } from '@wordpress/commands';\n\n/**\n * Internal dependencies\n */\nimport { useAdminNavigationCommands } from './admin-navigation-commands';\nimport { useSiteEditorNavigationCommands } from './site-editor-navigation-commands';\nimport { unlock } from './lock-unlock';\nexport { privateApis } from './private-apis';\n\nconst { RouterProvider } = unlock( routerPrivateApis );\n\n// Register core commands and render the Command Palette.\nfunction CommandPalette( { settings } ) {\n\tconst { menu_commands: menuCommands } = settings;\n\tuseAdminNavigationCommands( menuCommands );\n\tuseSiteEditorNavigationCommands();\n\treturn (\n\t\t<RouterProvider pathArg=\"p\">\n\t\t\t<CommandMenu />\n\t\t</RouterProvider>\n\t);\n}\n\n/**\n * Initializes the Command Palette.\n *\n * @param {Object} settings Command palette settings.\n */\nexport function initializeCommandPalette( settings ) {\n\tconst root = document.createElement( 'div' );\n\tdocument.body.appendChild( root );\n\tcreateRoot( root ).render(\n\t\t<StrictMode>\n\t\t\t<CommandPalette settings={ settings } />\n\t\t</StrictMode>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBG;AArBH,qBAAuC;AACvC,oBAAiD;AACjD,sBAA4B;AAK5B,uCAA2C;AAC3C,6CAAgD;AAChD,yBAAuB;AACvB,0BAA4B;AAE5B,MAAM,EAAE,eAAe,QAAI,2BAAQ,cAAAA,WAAkB;AAGrD,SAAS,eAAgB,EAAE,SAAS,GAAI;AACvC,QAAM,EAAE,eAAe,aAAa,IAAI;AACxC,mEAA4B,YAAa;AACzC,8EAAgC;AAChC,SACC,4CAAC,kBAAe,SAAQ,KACvB,sDAAC,+BAAY,GACd;AAEF;AAOO,SAAS,yBAA0B,UAAW;AACpD,QAAM,OAAO,SAAS,cAAe,KAAM;AAC3C,WAAS,KAAK,YAAa,IAAK;AAChC,iCAAY,IAAK,EAAE;AAAA,IAClB,4CAAC,6BACA,sDAAC,kBAAe,UAAsB,GACvC;AAAA,EACD;AACD;",
|
|
6
|
+
"names": ["routerPrivateApis"]
|
|
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/core-commands"
|
|
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/core-commands'\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
|
+
}
|
package/build/private-apis.js
CHANGED
|
@@ -1,22 +1,38 @@
|
|
|
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 private_apis_exports = {};
|
|
19
|
+
__export(private_apis_exports, {
|
|
20
|
+
privateApis: () => privateApis
|
|
5
21
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
/**
|
|
11
|
-
* Internal dependencies
|
|
12
|
-
*/
|
|
13
|
-
|
|
22
|
+
module.exports = __toCommonJS(private_apis_exports);
|
|
23
|
+
var import_admin_navigation_commands = require("./admin-navigation-commands");
|
|
24
|
+
var import_site_editor_navigation_commands = require("./site-editor-navigation-commands");
|
|
25
|
+
var import_lock_unlock = require("./lock-unlock");
|
|
14
26
|
function useCommands() {
|
|
15
|
-
(0,
|
|
16
|
-
(0,
|
|
27
|
+
(0, import_admin_navigation_commands.useAdminNavigationCommands)();
|
|
28
|
+
(0, import_site_editor_navigation_commands.useSiteEditorNavigationCommands)();
|
|
17
29
|
}
|
|
18
|
-
const privateApis =
|
|
19
|
-
(0,
|
|
30
|
+
const privateApis = {};
|
|
31
|
+
(0, import_lock_unlock.lock)(privateApis, {
|
|
20
32
|
useCommands
|
|
21
33
|
});
|
|
22
|
-
|
|
34
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
+
0 && (module.exports = {
|
|
36
|
+
privateApis
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=private-apis.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/private-apis.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport { useAdminNavigationCommands } from './admin-navigation-commands';\nimport { useSiteEditorNavigationCommands } from './site-editor-navigation-commands';\nimport { lock } from './lock-unlock';\n\nfunction useCommands() {\n\tuseAdminNavigationCommands();\n\tuseSiteEditorNavigationCommands();\n}\n\nexport const privateApis = {};\nlock( privateApis, {\n\tuseCommands,\n} );\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,uCAA2C;AAC3C,6CAAgD;AAChD,yBAAqB;AAErB,SAAS,cAAc;AACtB,mEAA2B;AAC3B,8EAAgC;AACjC;AAEO,MAAM,cAAc,CAAC;AAAA,IAC5B,yBAAM,aAAa;AAAA,EAClB;AACD,CAAE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|