@wordpress/keyboard-shortcuts 5.37.0 → 5.37.1-next.79a2f3cdd.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/CHANGELOG.md +0 -2
- package/LICENSE.md +1 -1
- package/build/components/{shortcut-provider.js → shortcut-provider.cjs} +2 -2
- package/build/{context.js → context.cjs} +1 -1
- package/build/hooks/{use-shortcut-event-match.js → use-shortcut-event-match.cjs} +2 -2
- package/build/hooks/{use-shortcut.js → use-shortcut.cjs} +3 -3
- package/build/{index.js → index.cjs} +5 -5
- package/build/store/{actions.js → actions.cjs} +1 -1
- package/build/store/{index.js → index.cjs} +4 -4
- package/build/store/{reducer.js → reducer.cjs} +1 -1
- package/build/store/{selectors.js → selectors.cjs} +1 -1
- package/build-module/components/{shortcut-provider.js → shortcut-provider.mjs} +2 -2
- package/build-module/{context.js → context.mjs} +1 -1
- package/build-module/hooks/{use-shortcut-event-match.js → use-shortcut-event-match.mjs} +2 -2
- package/build-module/hooks/{use-shortcut.js → use-shortcut.mjs} +3 -3
- package/build-module/{index.js → index.mjs} +5 -5
- package/build-module/store/{actions.js → actions.mjs} +1 -1
- package/build-module/store/{index.js → index.mjs} +4 -4
- package/build-module/store/{reducer.js → reducer.mjs} +1 -1
- package/build-module/store/{selectors.js → selectors.mjs} +1 -1
- package/package.json +16 -9
- /package/build/components/{shortcut-provider.js.map → shortcut-provider.cjs.map} +0 -0
- /package/build/{context.js.map → context.cjs.map} +0 -0
- /package/build/hooks/{use-shortcut-event-match.js.map → use-shortcut-event-match.cjs.map} +0 -0
- /package/build/hooks/{use-shortcut.js.map → use-shortcut.cjs.map} +0 -0
- /package/build/{index.js.map → index.cjs.map} +0 -0
- /package/build/store/{actions.js.map → actions.cjs.map} +0 -0
- /package/build/store/{index.js.map → index.cjs.map} +0 -0
- /package/build/store/{reducer.js.map → reducer.cjs.map} +0 -0
- /package/build/store/{selectors.js.map → selectors.cjs.map} +0 -0
- /package/build-module/components/{shortcut-provider.js.map → shortcut-provider.mjs.map} +0 -0
- /package/build-module/{context.js.map → context.mjs.map} +0 -0
- /package/build-module/hooks/{use-shortcut-event-match.js.map → use-shortcut-event-match.mjs.map} +0 -0
- /package/build-module/hooks/{use-shortcut.js.map → use-shortcut.mjs.map} +0 -0
- /package/build-module/{index.js.map → index.mjs.map} +0 -0
- /package/build-module/store/{actions.js.map → actions.mjs.map} +0 -0
- /package/build-module/store/{index.js.map → index.mjs.map} +0 -0
- /package/build-module/store/{reducer.js.map → reducer.mjs.map} +0 -0
- /package/build-module/store/{selectors.js.map → selectors.mjs.map} +0 -0
package/CHANGELOG.md
CHANGED
package/LICENSE.md
CHANGED
|
@@ -23,7 +23,7 @@ __export(shortcut_provider_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(shortcut_provider_exports);
|
|
25
25
|
var import_element = require("@wordpress/element");
|
|
26
|
-
var import_context = require("../context");
|
|
26
|
+
var import_context = require("../context.cjs");
|
|
27
27
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
28
28
|
var { Provider } = import_context.context;
|
|
29
29
|
function ShortcutProvider(props) {
|
|
@@ -42,4 +42,4 @@ function ShortcutProvider(props) {
|
|
|
42
42
|
0 && (module.exports = {
|
|
43
43
|
ShortcutProvider
|
|
44
44
|
});
|
|
45
|
-
//# sourceMappingURL=shortcut-provider.
|
|
45
|
+
//# sourceMappingURL=shortcut-provider.cjs.map
|
|
@@ -24,7 +24,7 @@ __export(use_shortcut_event_match_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(use_shortcut_event_match_exports);
|
|
25
25
|
var import_data = require("@wordpress/data");
|
|
26
26
|
var import_keycodes = require("@wordpress/keycodes");
|
|
27
|
-
var import_store = require("../store");
|
|
27
|
+
var import_store = require("../store/index.cjs");
|
|
28
28
|
function useShortcutEventMatch() {
|
|
29
29
|
const { getAllShortcutKeyCombinations } = (0, import_data.useSelect)(
|
|
30
30
|
import_store.store
|
|
@@ -38,4 +38,4 @@ function useShortcutEventMatch() {
|
|
|
38
38
|
}
|
|
39
39
|
return isMatch;
|
|
40
40
|
}
|
|
41
|
-
//# sourceMappingURL=use-shortcut-event-match.
|
|
41
|
+
//# sourceMappingURL=use-shortcut-event-match.cjs.map
|
|
@@ -33,8 +33,8 @@ __export(use_shortcut_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(use_shortcut_exports);
|
|
35
35
|
var import_element = require("@wordpress/element");
|
|
36
|
-
var import_use_shortcut_event_match = __toESM(require("./use-shortcut-event-match"));
|
|
37
|
-
var import_context = require("../context");
|
|
36
|
+
var import_use_shortcut_event_match = __toESM(require("./use-shortcut-event-match.cjs"));
|
|
37
|
+
var import_context = require("../context.cjs");
|
|
38
38
|
function useShortcut(name, callback, { isDisabled = false } = {}) {
|
|
39
39
|
const shortcuts = (0, import_element.useContext)(import_context.context);
|
|
40
40
|
const isMatch = (0, import_use_shortcut_event_match.default)();
|
|
@@ -57,4 +57,4 @@ function useShortcut(name, callback, { isDisabled = false } = {}) {
|
|
|
57
57
|
};
|
|
58
58
|
}, [name, isDisabled, shortcuts]);
|
|
59
59
|
}
|
|
60
|
-
//# sourceMappingURL=use-shortcut.
|
|
60
|
+
//# sourceMappingURL=use-shortcut.cjs.map
|
|
@@ -35,10 +35,10 @@ __export(index_exports, {
|
|
|
35
35
|
useShortcut: () => import_use_shortcut.default
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(index_exports);
|
|
38
|
-
var import_store = require("./store");
|
|
39
|
-
var import_use_shortcut = __toESM(require("./hooks/use-shortcut"));
|
|
40
|
-
var import_shortcut_provider = require("./components/shortcut-provider");
|
|
41
|
-
var import_use_shortcut_event_match = __toESM(require("./hooks/use-shortcut-event-match"));
|
|
38
|
+
var import_store = require("./store/index.cjs");
|
|
39
|
+
var import_use_shortcut = __toESM(require("./hooks/use-shortcut.cjs"));
|
|
40
|
+
var import_shortcut_provider = require("./components/shortcut-provider.cjs");
|
|
41
|
+
var import_use_shortcut_event_match = __toESM(require("./hooks/use-shortcut-event-match.cjs"));
|
|
42
42
|
// Annotate the CommonJS export names for ESM import in node:
|
|
43
43
|
0 && (module.exports = {
|
|
44
44
|
ShortcutProvider,
|
|
@@ -46,4 +46,4 @@ var import_use_shortcut_event_match = __toESM(require("./hooks/use-shortcut-even
|
|
|
46
46
|
store,
|
|
47
47
|
useShortcut
|
|
48
48
|
});
|
|
49
|
-
//# sourceMappingURL=index.
|
|
49
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -33,9 +33,9 @@ __export(store_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(store_exports);
|
|
35
35
|
var import_data = require("@wordpress/data");
|
|
36
|
-
var import_reducer = __toESM(require("./reducer"));
|
|
37
|
-
var actions = __toESM(require("./actions"));
|
|
38
|
-
var selectors = __toESM(require("./selectors"));
|
|
36
|
+
var import_reducer = __toESM(require("./reducer.cjs"));
|
|
37
|
+
var actions = __toESM(require("./actions.cjs"));
|
|
38
|
+
var selectors = __toESM(require("./selectors.cjs"));
|
|
39
39
|
var STORE_NAME = "core/keyboard-shortcuts";
|
|
40
40
|
var store = (0, import_data.createReduxStore)(STORE_NAME, {
|
|
41
41
|
reducer: import_reducer.default,
|
|
@@ -47,4 +47,4 @@ var store = (0, import_data.createReduxStore)(STORE_NAME, {
|
|
|
47
47
|
0 && (module.exports = {
|
|
48
48
|
store
|
|
49
49
|
});
|
|
50
|
-
//# sourceMappingURL=index.
|
|
50
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// packages/keyboard-shortcuts/src/components/shortcut-provider.js
|
|
2
2
|
import { useState } from "@wordpress/element";
|
|
3
|
-
import { context } from "../context";
|
|
3
|
+
import { context } from "../context.mjs";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
var { Provider } = context;
|
|
6
6
|
function ShortcutProvider(props) {
|
|
@@ -18,4 +18,4 @@ function ShortcutProvider(props) {
|
|
|
18
18
|
export {
|
|
19
19
|
ShortcutProvider
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=shortcut-provider.
|
|
21
|
+
//# sourceMappingURL=shortcut-provider.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// packages/keyboard-shortcuts/src/hooks/use-shortcut-event-match.js
|
|
2
2
|
import { useSelect } from "@wordpress/data";
|
|
3
3
|
import { isKeyboardEvent } from "@wordpress/keycodes";
|
|
4
|
-
import { store as keyboardShortcutsStore } from "../store";
|
|
4
|
+
import { store as keyboardShortcutsStore } from "../store/index.mjs";
|
|
5
5
|
function useShortcutEventMatch() {
|
|
6
6
|
const { getAllShortcutKeyCombinations } = useSelect(
|
|
7
7
|
keyboardShortcutsStore
|
|
@@ -18,4 +18,4 @@ function useShortcutEventMatch() {
|
|
|
18
18
|
export {
|
|
19
19
|
useShortcutEventMatch as default
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=use-shortcut-event-match.
|
|
21
|
+
//# sourceMappingURL=use-shortcut-event-match.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// packages/keyboard-shortcuts/src/hooks/use-shortcut.js
|
|
2
2
|
import { useContext, useEffect, useRef } from "@wordpress/element";
|
|
3
|
-
import useShortcutEventMatch from "./use-shortcut-event-match";
|
|
4
|
-
import { context } from "../context";
|
|
3
|
+
import useShortcutEventMatch from "./use-shortcut-event-match.mjs";
|
|
4
|
+
import { context } from "../context.mjs";
|
|
5
5
|
function useShortcut(name, callback, { isDisabled = false } = {}) {
|
|
6
6
|
const shortcuts = useContext(context);
|
|
7
7
|
const isMatch = useShortcutEventMatch();
|
|
@@ -27,4 +27,4 @@ function useShortcut(name, callback, { isDisabled = false } = {}) {
|
|
|
27
27
|
export {
|
|
28
28
|
useShortcut as default
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=use-shortcut.
|
|
30
|
+
//# sourceMappingURL=use-shortcut.mjs.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// packages/keyboard-shortcuts/src/index.js
|
|
2
|
-
import { store } from "./store";
|
|
3
|
-
import { default as default2 } from "./hooks/use-shortcut";
|
|
4
|
-
import { ShortcutProvider } from "./components/shortcut-provider";
|
|
5
|
-
import { default as default3 } from "./hooks/use-shortcut-event-match";
|
|
2
|
+
import { store } from "./store/index.mjs";
|
|
3
|
+
import { default as default2 } from "./hooks/use-shortcut.mjs";
|
|
4
|
+
import { ShortcutProvider } from "./components/shortcut-provider.mjs";
|
|
5
|
+
import { default as default3 } from "./hooks/use-shortcut-event-match.mjs";
|
|
6
6
|
export {
|
|
7
7
|
ShortcutProvider,
|
|
8
8
|
default3 as __unstableUseShortcutEventMatch,
|
|
9
9
|
store,
|
|
10
10
|
default2 as useShortcut
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=index.
|
|
12
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// packages/keyboard-shortcuts/src/store/index.js
|
|
2
2
|
import { createReduxStore, register } from "@wordpress/data";
|
|
3
|
-
import reducer from "./reducer";
|
|
4
|
-
import * as actions from "./actions";
|
|
5
|
-
import * as selectors from "./selectors";
|
|
3
|
+
import reducer from "./reducer.mjs";
|
|
4
|
+
import * as actions from "./actions.mjs";
|
|
5
|
+
import * as selectors from "./selectors.mjs";
|
|
6
6
|
var STORE_NAME = "core/keyboard-shortcuts";
|
|
7
7
|
var store = createReduxStore(STORE_NAME, {
|
|
8
8
|
reducer,
|
|
@@ -13,4 +13,4 @@ register(store);
|
|
|
13
13
|
export {
|
|
14
14
|
store
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=index.
|
|
16
|
+
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/keyboard-shortcuts",
|
|
3
|
-
"version": "5.37.0",
|
|
3
|
+
"version": "5.37.1-next.79a2f3cdd.0",
|
|
4
4
|
"description": "Handling keyboard shortcuts.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -22,21 +22,28 @@
|
|
|
22
22
|
"node": ">=18.12.0",
|
|
23
23
|
"npm": ">=8.19.2"
|
|
24
24
|
},
|
|
25
|
-
"
|
|
26
|
-
|
|
25
|
+
"files": [
|
|
26
|
+
"src",
|
|
27
|
+
"build",
|
|
28
|
+
"build-module",
|
|
29
|
+
"build-types",
|
|
30
|
+
"*.md"
|
|
31
|
+
],
|
|
32
|
+
"main": "build/index.cjs",
|
|
33
|
+
"module": "build-module/index.mjs",
|
|
27
34
|
"exports": {
|
|
28
35
|
".": {
|
|
29
|
-
"import": "./build-module/index.
|
|
30
|
-
"require": "./build/index.
|
|
36
|
+
"import": "./build-module/index.mjs",
|
|
37
|
+
"require": "./build/index.cjs"
|
|
31
38
|
},
|
|
32
39
|
"./package.json": "./package.json"
|
|
33
40
|
},
|
|
34
41
|
"react-native": "src/index",
|
|
35
42
|
"wpScript": true,
|
|
36
43
|
"dependencies": {
|
|
37
|
-
"@wordpress/data": "^10.37.0",
|
|
38
|
-
"@wordpress/element": "^6.37.0",
|
|
39
|
-
"@wordpress/keycodes": "^4.
|
|
44
|
+
"@wordpress/data": "^10.37.1-next.79a2f3cdd.0",
|
|
45
|
+
"@wordpress/element": "^6.37.1-next.79a2f3cdd.0",
|
|
46
|
+
"@wordpress/keycodes": "^4.38.1-next.79a2f3cdd.0"
|
|
40
47
|
},
|
|
41
48
|
"peerDependencies": {
|
|
42
49
|
"react": "^18.0.0"
|
|
@@ -44,5 +51,5 @@
|
|
|
44
51
|
"publishConfig": {
|
|
45
52
|
"access": "public"
|
|
46
53
|
},
|
|
47
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "6a324496a37d9a333a11d4d7fe5fb93b8152a5ba"
|
|
48
55
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/build-module/hooks/{use-shortcut-event-match.js.map → use-shortcut-event-match.mjs.map}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|