@peter.naydenov/shortcuts 3.5.1 → 3.5.2
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 +5 -0
- package/dist/plugins/click/index.d.ts +26 -0
- package/dist/plugins/form/index.d.ts +26 -0
- package/dist/plugins/key/index.d.ts +26 -0
- package/package.json +1 -1
- package/src/plugins/click/index.js +10 -0
- package/src/plugins/form/index.js +10 -0
- package/src/plugins/key/index.js +10 -0
package/Changelog.md
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
export default pluginClick;
|
|
2
|
+
export type PluginAPI = {
|
|
3
|
+
/**
|
|
4
|
+
* - Get plugin prefix
|
|
5
|
+
*/
|
|
6
|
+
getPrefix: () => string;
|
|
7
|
+
/**
|
|
8
|
+
* - Format shortcut name
|
|
9
|
+
*/
|
|
10
|
+
shortcutName: (arg0: string) => string;
|
|
11
|
+
/**
|
|
12
|
+
* - Handle context change
|
|
13
|
+
*/
|
|
14
|
+
contextChange: (arg0: string) => void;
|
|
15
|
+
/**
|
|
16
|
+
* - Mute the plugin
|
|
17
|
+
*/
|
|
18
|
+
mute: () => void;
|
|
19
|
+
/**
|
|
20
|
+
* - Unmute the plugin
|
|
21
|
+
*/
|
|
22
|
+
unmute: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* - Destroy the plugin
|
|
25
|
+
*/
|
|
26
|
+
destroy: () => void;
|
|
27
|
+
};
|
|
2
28
|
/**
|
|
3
29
|
* @function pluginClick
|
|
4
30
|
* @description Plugin for mouse click shortcuts
|
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
export default pluginForm;
|
|
2
|
+
export type PluginAPI = {
|
|
3
|
+
/**
|
|
4
|
+
* - Get plugin prefix
|
|
5
|
+
*/
|
|
6
|
+
getPrefix: () => string;
|
|
7
|
+
/**
|
|
8
|
+
* - Format shortcut name
|
|
9
|
+
*/
|
|
10
|
+
shortcutName: (arg0: string) => string;
|
|
11
|
+
/**
|
|
12
|
+
* - Handle context change
|
|
13
|
+
*/
|
|
14
|
+
contextChange: (arg0: string) => void;
|
|
15
|
+
/**
|
|
16
|
+
* - Mute the plugin
|
|
17
|
+
*/
|
|
18
|
+
mute: () => void;
|
|
19
|
+
/**
|
|
20
|
+
* - Unmute the plugin
|
|
21
|
+
*/
|
|
22
|
+
unmute: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* - Destroy the plugin
|
|
25
|
+
*/
|
|
26
|
+
destroy: () => void;
|
|
27
|
+
};
|
|
2
28
|
/**
|
|
3
29
|
* @function pluginForm
|
|
4
30
|
* @description Plugin for form element shortcuts
|
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
export default pluginKey;
|
|
2
|
+
export type PluginAPI = {
|
|
3
|
+
/**
|
|
4
|
+
* - Get plugin prefix
|
|
5
|
+
*/
|
|
6
|
+
getPrefix: () => string;
|
|
7
|
+
/**
|
|
8
|
+
* - Format shortcut name
|
|
9
|
+
*/
|
|
10
|
+
shortcutName: (arg0: string) => string;
|
|
11
|
+
/**
|
|
12
|
+
* - Handle context change
|
|
13
|
+
*/
|
|
14
|
+
contextChange: (arg0: string) => void;
|
|
15
|
+
/**
|
|
16
|
+
* - Mute the plugin
|
|
17
|
+
*/
|
|
18
|
+
mute: () => void;
|
|
19
|
+
/**
|
|
20
|
+
* - Unmute the plugin
|
|
21
|
+
*/
|
|
22
|
+
unmute: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* - Destroy the plugin
|
|
25
|
+
*/
|
|
26
|
+
destroy: () => void;
|
|
27
|
+
};
|
|
2
28
|
/**
|
|
3
29
|
* @function pluginKey
|
|
4
30
|
* @description Plugin for keyboard shortcuts
|
package/package.json
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {Object} PluginAPI
|
|
5
|
+
* @property {function(): string} getPrefix - Get plugin prefix
|
|
6
|
+
* @property {function(string): string} shortcutName - Format shortcut name
|
|
7
|
+
* @property {function(string): void} contextChange - Handle context change
|
|
8
|
+
* @property {function(): void} mute - Mute the plugin
|
|
9
|
+
* @property {function(): void} unmute - Unmute the plugin
|
|
10
|
+
* @property {function(): void} destroy - Destroy the plugin
|
|
11
|
+
*/
|
|
12
|
+
|
|
3
13
|
import _findTarget from "./_findTarget"
|
|
4
14
|
import _listenDOM from "./_listenDOM"
|
|
5
15
|
import _normalizeShortcutName from "./_normalizeShortcutName"
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {Object} PluginAPI
|
|
5
|
+
* @property {function(): string} getPrefix - Get plugin prefix
|
|
6
|
+
* @property {function(string): string} shortcutName - Format shortcut name
|
|
7
|
+
* @property {function(string): void} contextChange - Handle context change
|
|
8
|
+
* @property {function(): void} mute - Mute the plugin
|
|
9
|
+
* @property {function(): void} unmute - Unmute the plugin
|
|
10
|
+
* @property {function(): void} destroy - Destroy the plugin
|
|
11
|
+
*/
|
|
12
|
+
|
|
3
13
|
// import all plugin files here
|
|
4
14
|
import _listenDOM from './_listenDOM.js'
|
|
5
15
|
import _normalizeShortcutName from './_normalizeShortcutName.js'
|
package/src/plugins/key/index.js
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @typedef {Object} PluginAPI
|
|
5
|
+
* @property {function(): string} getPrefix - Get plugin prefix
|
|
6
|
+
* @property {function(string): string} shortcutName - Format shortcut name
|
|
7
|
+
* @property {function(string): void} contextChange - Handle context change
|
|
8
|
+
* @property {function(): void} mute - Mute the plugin
|
|
9
|
+
* @property {function(): void} unmute - Unmute the plugin
|
|
10
|
+
* @property {function(): void} destroy - Destroy the plugin
|
|
11
|
+
*/
|
|
12
|
+
|
|
3
13
|
// import all plugin files here
|
|
4
14
|
import _listenDOM from './_listenDOM.js'
|
|
5
15
|
import _normalizeShortcutName from './_normalizeShortcutName.js'
|