@vicinae/api 0.14.1 → 0.14.3
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.
|
@@ -7,7 +7,12 @@ import { Form } from "./form";
|
|
|
7
7
|
export type BaseActionProps = {
|
|
8
8
|
title: string;
|
|
9
9
|
icon?: ImageLike;
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* The shortcut to bind this action to.
|
|
12
|
+
* It is highly recommended to use named shortcuts such as
|
|
13
|
+
* Keyboard.Shortcut.Common.Copy as they will respect user preferences.
|
|
14
|
+
*/
|
|
15
|
+
shortcut?: Keyboard.Shortcut | Keyboard.Shortcut.Common;
|
|
11
16
|
autoFocus?: boolean;
|
|
12
17
|
style?: "regular" | "destructive";
|
|
13
18
|
};
|
package/dist/api/keyboard.d.ts
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
export type KeyEquivalent = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "." | "," | ";" | "=" | "+" | "-" | "[" | "]" | "{" | "}" | "«" | "»" | "(" | ")" | "/" | "\\" | "'" | "`" | "§" | "^" | "@" | "$" | "return" | "delete" | "deleteForward" | "tab" | "arrowUp" | "arrowDown" | "arrowLeft" | "arrowRight" | "pageUp" | "pageDown" | "home" | "end" | "space" | "escape" | "enter" | "backspace";
|
|
2
|
+
export type KeyModifier = "cmd" | "ctrl" | "opt" | "shift";
|
|
2
3
|
export declare namespace Keyboard {
|
|
4
|
+
namespace Shortcut {
|
|
5
|
+
type Common = 'copy' | 'copy-deeplink' | 'copy-name' | 'copy-path' | 'save' | 'duplicate' | 'edit' | 'move-down' | 'move-up' | 'new' | 'open' | 'open-with' | 'pin' | 'refresh' | 'remove' | 'remove-all';
|
|
6
|
+
const Common: {
|
|
7
|
+
Copy: string;
|
|
8
|
+
CopyDeeplink: string;
|
|
9
|
+
CopyName: string;
|
|
10
|
+
CopyPath: string;
|
|
11
|
+
Save: string;
|
|
12
|
+
Duplicate: string;
|
|
13
|
+
Edit: string;
|
|
14
|
+
MoveDown: string;
|
|
15
|
+
MoveUp: string;
|
|
16
|
+
New: string;
|
|
17
|
+
Open: string;
|
|
18
|
+
OpenWith: string;
|
|
19
|
+
Pin: string;
|
|
20
|
+
Refresh: string;
|
|
21
|
+
Remove: string;
|
|
22
|
+
RemoveAll: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
3
25
|
type Shortcut = {
|
|
4
26
|
key: KeyEquivalent;
|
|
5
27
|
modifiers: KeyModifier[];
|
|
6
28
|
};
|
|
7
29
|
}
|
|
8
|
-
export type KeyModifier = "cmd" | "ctrl" | "opt" | "shift";
|
|
9
|
-
export declare const Keyboard: {
|
|
10
|
-
Shortcut: {
|
|
11
|
-
Common: {
|
|
12
|
-
Copy: Keyboard.Shortcut;
|
|
13
|
-
CopyName: Keyboard.Shortcut;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
};
|
package/dist/api/keyboard.js
CHANGED
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Keyboard = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
var Keyboard;
|
|
5
|
+
(function (Keyboard) {
|
|
6
|
+
let Shortcut;
|
|
7
|
+
(function (Shortcut) {
|
|
8
|
+
Shortcut.Common = {
|
|
9
|
+
Copy: "copy",
|
|
10
|
+
CopyDeeplink: 'copy',
|
|
11
|
+
CopyName: 'copy',
|
|
12
|
+
CopyPath: 'copy',
|
|
13
|
+
Save: 'save',
|
|
14
|
+
Duplicate: 'duplicate',
|
|
15
|
+
Edit: 'edit',
|
|
16
|
+
MoveDown: 'move-down',
|
|
17
|
+
MoveUp: 'move-up',
|
|
18
|
+
New: 'new',
|
|
19
|
+
Open: 'open',
|
|
20
|
+
OpenWith: 'open-with',
|
|
21
|
+
Pin: 'pin',
|
|
22
|
+
Refresh: 'refresh',
|
|
23
|
+
Remove: 'remove',
|
|
24
|
+
RemoveAll: 'remove-all',
|
|
25
|
+
};
|
|
26
|
+
})(Shortcut = Keyboard.Shortcut || (Keyboard.Shortcut = {}));
|
|
27
|
+
;
|
|
28
|
+
})(Keyboard || (exports.Keyboard = Keyboard = {}));
|
|
29
|
+
;
|