Comparing version 1.8.0 to 1.8.1
@@ -72,3 +72,3 @@ declare const Consts: { | ||
'#': number; | ||
'$': number; | ||
$: number; | ||
'%': number; | ||
@@ -97,3 +97,3 @@ '&': number; | ||
'^': number; | ||
'_': number; | ||
_: number; | ||
'`': number; | ||
@@ -210,6 +210,6 @@ '{': number; | ||
id2shortcut: { | ||
0b1_00000000: string; | ||
0b10_00000000: string; | ||
0b100_00000000: string; | ||
0b1000_00000000: string; | ||
256: string; | ||
512: string; | ||
1024: string; | ||
2048: string; | ||
1: string; | ||
@@ -335,6 +335,6 @@ 2: string; | ||
id2accelerator: { | ||
0b1_00000000: string; | ||
0b10_00000000: string; | ||
0b100_00000000: string; | ||
0b1000_00000000: string; | ||
256: string; | ||
512: string; | ||
1024: string; | ||
2048: string; | ||
1: string; | ||
@@ -460,6 +460,6 @@ 2: string; | ||
id2symbol: { | ||
0b1_00000000: string; | ||
0b10_00000000: string; | ||
0b100_00000000: string; | ||
0b1000_00000000: string; | ||
256: string; | ||
512: string; | ||
1024: string; | ||
2048: string; | ||
1: string; | ||
@@ -466,0 +466,0 @@ 2: string; |
@@ -619,5 +619,5 @@ "use strict"; | ||
triggerKeyBitmask: 255, | ||
shortcutRe: /^\s*?(?:(?:^|\s|\+)(?:alt|option|cmd|command|meta|ctrl|control|shift|cmdorctrl|commandorcontrol|backspace|capslock|del|delete|down|end|enter|return|esc|escape|home|insert|left|pagedown|pageup|right|space|spacebar|tab|up|plus|\d|[a-z]|f(?:\d|1\d|2[0-4])|numpad\d|[!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-]))+\s*$/i // Regex that matches a shortcut | ||
shortcutRe: /^\s*?(?:(?:^-?|\s|\+)(?:alt|option|cmd|command|meta|ctrl|control|shift|cmdorctrl|commandorcontrol|backspace|capslock|del|delete|down|end|enter|return|esc|escape|home|insert|left|pagedown|pageup|right|space|spacebar|tab|up|plus|\d|[a-z]|f(?:\d|1\d|2[0-4])|numpad\d|[!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-]))+\s*$/i // Regex that matches a shortcut | ||
}; | ||
/* EXPORT */ | ||
exports.default = Consts; |
"use strict"; | ||
/* ENUMS */ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ListenerResult = void 0; | ||
var ListenerResult; | ||
@@ -5,0 +6,0 @@ (function (ListenerResult) { |
"use strict"; | ||
/* IMPORT */ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Shortcuts = exports.Shortcut = void 0; | ||
var shortcut_1 = require("./shortcut"); | ||
@@ -5,0 +6,0 @@ exports.Shortcut = shortcut_1.default; |
"use strict"; | ||
/* IMPORT */ | ||
var __spreadArrays = (this && this.__spreadArrays) || function () { | ||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; | ||
for (var r = Array(s), k = 0, i = 0; i < il; i++) | ||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) | ||
r[k] = a[j]; | ||
return r; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -75,3 +82,3 @@ var enums_1 = require("./enums"); | ||
shortcutID.splice.apply(// Changing the current shortcut | ||
shortcutID, [0, Infinity].concat(result)); | ||
shortcutID, __spreadArrays([0, Infinity], result)); | ||
} | ||
@@ -78,0 +85,0 @@ if (!isKeyup) { |
@@ -1,26 +0,26 @@ | ||
import { Shortcut } from './types'; | ||
import { Chord, ChordID, Shortcut, ShortcutID } from './types'; | ||
declare const Shortcut: { | ||
getModifierKey: (id: number) => number; | ||
hasModifierKey: (id: number) => boolean; | ||
getTriggerKey: (id: number) => number; | ||
hasTriggerKey: (id: number) => boolean; | ||
event2id: (event: KeyboardEvent | MouseEvent) => number; | ||
event2shortcut: (event: KeyboardEvent | MouseEvent) => string; | ||
event2accelerator: (event: KeyboardEvent | MouseEvent) => string; | ||
event2symbols: (event: KeyboardEvent | MouseEvent) => string; | ||
chord2id: (chord: string) => number; | ||
chord2accelerator: (chord: string) => string; | ||
chord2symbols: (chord: string) => string; | ||
isValidShortcut: (shortcut: string) => boolean; | ||
checkValidShortcut: (shortcut: string) => boolean; | ||
shortcut2id: (shortcut: string) => number[]; | ||
shortcut2accelerator: (shortcut: string) => string; | ||
shortcut2symbols: (shortcut: string) => string; | ||
isValidID: (id: number[]) => boolean; | ||
checkValidID: (id: number[]) => boolean; | ||
id2output: (id: number[], outputMap?: {}, chordSeparator?: string, sequenceSeparator?: string) => string; | ||
id2shortcut: (id: number[]) => string; | ||
id2accelerator: (id: number[]) => string; | ||
id2symbols: (id: number[]) => string; | ||
getModifierKey: (id: ChordID) => ChordID; | ||
hasModifierKey: (id: ChordID) => boolean; | ||
getTriggerKey: (id: ChordID) => ChordID; | ||
hasTriggerKey: (id: ChordID) => boolean; | ||
event2id: (event: MouseEvent | KeyboardEvent) => ChordID; | ||
event2shortcut: (event: MouseEvent | KeyboardEvent) => Shortcut; | ||
event2accelerator: (event: MouseEvent | KeyboardEvent) => string; | ||
event2symbols: (event: MouseEvent | KeyboardEvent) => string; | ||
chord2id: (chord: Chord) => ChordID; | ||
chord2accelerator: (chord: Chord) => string; | ||
chord2symbols: (chord: Chord) => string; | ||
isValidShortcut: (shortcut: Shortcut) => boolean; | ||
checkValidShortcut: (shortcut: Shortcut) => boolean; | ||
shortcut2id: (shortcut: Shortcut) => ShortcutID; | ||
shortcut2accelerator: (shortcut: Shortcut) => string; | ||
shortcut2symbols: (shortcut: Shortcut) => string; | ||
isValidID: (id: ShortcutID) => boolean; | ||
checkValidID: (id: ShortcutID) => boolean; | ||
id2output: (id: ShortcutID, outputMap?: {}, chordSeparator?: string, sequenceSeparator?: string) => string; | ||
id2shortcut: (id: ShortcutID) => string; | ||
id2accelerator: (id: ShortcutID) => string; | ||
id2symbols: (id: ShortcutID) => string; | ||
}; | ||
export default Shortcut; |
{ | ||
"name": "shortcuts", | ||
"description": "Super performant and feature rich shortcuts management library.", | ||
"version": "1.8.0", | ||
"version": "1.8.1", | ||
"main": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "types": "dist/index.d.ts", |
@@ -627,3 +627,3 @@ | ||
triggerKeyBitmask: 0b11111111, // Bitmask that includes all trigger keys and none of the modifiers | ||
shortcutRe: /^\s*?(?:(?:^|\s|\+)(?:alt|option|cmd|command|meta|ctrl|control|shift|cmdorctrl|commandorcontrol|backspace|capslock|del|delete|down|end|enter|return|esc|escape|home|insert|left|pagedown|pageup|right|space|spacebar|tab|up|plus|\d|[a-z]|f(?:\d|1\d|2[0-4])|numpad\d|[!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-]))+\s*$/i // Regex that matches a shortcut | ||
shortcutRe: /^\s*?(?:(?:^-?|\s|\+)(?:alt|option|cmd|command|meta|ctrl|control|shift|cmdorctrl|commandorcontrol|backspace|capslock|del|delete|down|end|enter|return|esc|escape|home|insert|left|pagedown|pageup|right|space|spacebar|tab|up|plus|\d|[a-z]|f(?:\d|1\d|2[0-4])|numpad\d|[!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-]))+\s*$/i // Regex that matches a shortcut | ||
@@ -630,0 +630,0 @@ }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
107070
3387