@lvce-editor/constants 1.4.0 → 1.5.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/dist/index.d.ts
CHANGED
|
@@ -309,6 +309,7 @@ declare const Label$1 = "label";
|
|
|
309
309
|
declare const Dt = "dt";
|
|
310
310
|
declare const ENOENT = "ENOENT";
|
|
311
311
|
declare const EXDEV = "EXDEV";
|
|
312
|
+
declare const getKeyCodeString: (keyCode: number) => string;
|
|
312
313
|
declare const InsertText = "insertText";
|
|
313
314
|
declare const DeleteContentBackward = "deleteContentBackward";
|
|
314
315
|
declare const DeleteContentForward = "deleteContentForward";
|
|
@@ -451,6 +452,71 @@ declare const Clear = 129;
|
|
|
451
452
|
declare const MaxValue = 130;
|
|
452
453
|
declare const Star = 131;
|
|
453
454
|
declare const Plus = 132;
|
|
455
|
+
declare const Unknown$1 = "Unknown";
|
|
456
|
+
declare const Backspace$1 = "Backspace";
|
|
457
|
+
declare const Tab$2 = "Tab";
|
|
458
|
+
declare const Enter$1 = "Enter";
|
|
459
|
+
declare const Escape$1 = "Escape";
|
|
460
|
+
declare const Space$1 = "Space";
|
|
461
|
+
declare const PageUp$1 = "PageUp";
|
|
462
|
+
declare const PageDown$1 = "PageDown";
|
|
463
|
+
declare const End$1 = "End";
|
|
464
|
+
declare const Home$1 = "Home";
|
|
465
|
+
declare const LeftArrow$1 = "LeftArrow";
|
|
466
|
+
declare const UpArrow$1 = "UpArrow";
|
|
467
|
+
declare const RightArrow$1 = "RightArrow";
|
|
468
|
+
declare const DownArrow$1 = "DownArrow";
|
|
469
|
+
declare const Insert$1 = "Insert";
|
|
470
|
+
declare const Delete$1 = "Delete";
|
|
471
|
+
declare const Digit0$1 = "0";
|
|
472
|
+
declare const Digit1$1 = "1";
|
|
473
|
+
declare const Digit2$1 = "2";
|
|
474
|
+
declare const Digit3$1 = "3";
|
|
475
|
+
declare const Digit4$1 = "4";
|
|
476
|
+
declare const Digit5$1 = "5";
|
|
477
|
+
declare const Digit6$1 = "6";
|
|
478
|
+
declare const Digit7$1 = "7";
|
|
479
|
+
declare const Digit8$1 = "8";
|
|
480
|
+
declare const Digit9$1 = "9";
|
|
481
|
+
declare const KeyA$1 = "a";
|
|
482
|
+
declare const KeyB$1 = "b";
|
|
483
|
+
declare const KeyC$1 = "c";
|
|
484
|
+
declare const KeyD$1 = "d";
|
|
485
|
+
declare const KeyE$1 = "e";
|
|
486
|
+
declare const KeyF$1 = "f";
|
|
487
|
+
declare const KeyG$1 = "g";
|
|
488
|
+
declare const KeyH$1 = "h";
|
|
489
|
+
declare const KeyI$1 = "i";
|
|
490
|
+
declare const KeyJ$1 = "j";
|
|
491
|
+
declare const KeyK$1 = "k";
|
|
492
|
+
declare const KeyL$1 = "l";
|
|
493
|
+
declare const KeyM$1 = "m";
|
|
494
|
+
declare const KeyN$1 = "n";
|
|
495
|
+
declare const KeyO$1 = "o";
|
|
496
|
+
declare const KeyP$1 = "p";
|
|
497
|
+
declare const KeyQ$1 = "q";
|
|
498
|
+
declare const KeyR$1 = "r";
|
|
499
|
+
declare const KeyS$1 = "s";
|
|
500
|
+
declare const KeyT$1 = "t";
|
|
501
|
+
declare const KeyU$1 = "u";
|
|
502
|
+
declare const KeyV$1 = "v";
|
|
503
|
+
declare const KeyW$1 = "w";
|
|
504
|
+
declare const KeyX$1 = "x";
|
|
505
|
+
declare const KeyY$1 = "y";
|
|
506
|
+
declare const KeyZ$1 = "z";
|
|
507
|
+
declare const F1$1 = "F1";
|
|
508
|
+
declare const F2$1 = "F2";
|
|
509
|
+
declare const F3$1 = "F3";
|
|
510
|
+
declare const F4$1 = "F4";
|
|
511
|
+
declare const F5$1 = "F5";
|
|
512
|
+
declare const F6$1 = "F6";
|
|
513
|
+
declare const Equal$1 = "=";
|
|
514
|
+
declare const Comma$1 = ",";
|
|
515
|
+
declare const Minus$1 = "Minus";
|
|
516
|
+
declare const Backquote$1 = "Backquote";
|
|
517
|
+
declare const Backslash$1 = "Backslash";
|
|
518
|
+
declare const Star$1 = "*";
|
|
519
|
+
declare const Plus$1 = "+";
|
|
454
520
|
declare const CtrlCmd: number;
|
|
455
521
|
declare const Shift: number;
|
|
456
522
|
declare const Alt$1: number;
|
|
@@ -634,12 +700,18 @@ declare namespace ElementTags {
|
|
|
634
700
|
declare namespace ErrorCodes {
|
|
635
701
|
export { ENOENT, EXDEV };
|
|
636
702
|
}
|
|
703
|
+
declare namespace GetKeyCodeString {
|
|
704
|
+
export { getKeyCodeString };
|
|
705
|
+
}
|
|
637
706
|
declare namespace InputEventType {
|
|
638
707
|
export { DeleteContentBackward, DeleteContentForward, DeleteWordBackward, DeleteWordForward, InsertCompositionText, InsertFromPaste, InsertLineBreak, InsertText };
|
|
639
708
|
}
|
|
640
709
|
declare namespace KeyCode {
|
|
641
710
|
export { ABNT_C1, ABNT_C2, Alt, AudioVolumeDown, AudioVolumeMute, AudioVolumeUp, Backquote, Backslash, Backspace, BracketLeft, BracketRight, BrowserBack, BrowserForward, BrowserHome, BrowserSearch, CapsLock, Clear, Comma, ContextMenu, Ctrl, Delete, Digit0, Digit1, Digit2, Digit3, Digit4, Digit5, Digit6, Digit7, Digit8, Digit9, DownArrow, End, Enter, Equal, Escape, F1, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F2, F20, F21, F22, F23, F24, F3, F4, F5, F6, F7, F8, F9, Home, Insert, IntlBackslash, KeyA, KeyB, KeyC, KeyD, KeyE, KeyF, KeyG, KeyH, KeyI, KeyInComposition, KeyJ, KeyK, KeyL, KeyM, KeyN, KeyO, KeyP, KeyQ, KeyR, KeyS, KeyT, KeyU, KeyV, KeyW, KeyX, KeyY, KeyZ, LaunchApp2, LaunchMail, LaunchMediaPlayer, LeftArrow, MaxValue, MediaPlayPause, MediaStop, MediaTrackNext, MediaTrackPrevious, Meta, Minus, NumLock, Numpad0, Numpad1, Numpad2, Numpad3, Numpad4, Numpad5, Numpad6, Numpad7, Numpad8, Numpad9, NumpadAdd, NumpadDecimal, NumpadDivide, NumpadMultiply, NumpadSeparator, NumpadSubtract, OEM_8, PageDown, PageUp, PauseBreak, Period, Plus, Quote, RightArrow, ScrollLock, SemiColon, Slash, Space, Star, Tab$1 as Tab, Unknown, UpArrow };
|
|
642
711
|
}
|
|
712
|
+
declare namespace KeyCodeString {
|
|
713
|
+
export { Backquote$1 as Backquote, Backslash$1 as Backslash, Backspace$1 as Backspace, Comma$1 as Comma, Delete$1 as Delete, Digit0$1 as Digit0, Digit1$1 as Digit1, Digit2$1 as Digit2, Digit3$1 as Digit3, Digit4$1 as Digit4, Digit5$1 as Digit5, Digit6$1 as Digit6, Digit7$1 as Digit7, Digit8$1 as Digit8, Digit9$1 as Digit9, DownArrow$1 as DownArrow, End$1 as End, Enter$1 as Enter, Equal$1 as Equal, Escape$1 as Escape, F1$1 as F1, F2$1 as F2, F3$1 as F3, F4$1 as F4, F5$1 as F5, F6$1 as F6, Home$1 as Home, Insert$1 as Insert, KeyA$1 as KeyA, KeyB$1 as KeyB, KeyC$1 as KeyC, KeyD$1 as KeyD, KeyE$1 as KeyE, KeyF$1 as KeyF, KeyG$1 as KeyG, KeyH$1 as KeyH, KeyI$1 as KeyI, KeyJ$1 as KeyJ, KeyK$1 as KeyK, KeyL$1 as KeyL, KeyM$1 as KeyM, KeyN$1 as KeyN, KeyO$1 as KeyO, KeyP$1 as KeyP, KeyQ$1 as KeyQ, KeyR$1 as KeyR, KeyS$1 as KeyS, KeyT$1 as KeyT, KeyU$1 as KeyU, KeyV$1 as KeyV, KeyW$1 as KeyW, KeyX$1 as KeyX, KeyY$1 as KeyY, KeyZ$1 as KeyZ, LeftArrow$1 as LeftArrow, Minus$1 as Minus, PageDown$1 as PageDown, PageUp$1 as PageUp, Plus$1 as Plus, RightArrow$1 as RightArrow, Space$1 as Space, Star$1 as Star, Tab$2 as Tab, Unknown$1 as Unknown, UpArrow$1 as UpArrow };
|
|
714
|
+
}
|
|
643
715
|
declare namespace KeyModifier {
|
|
644
716
|
export { Alt$1 as Alt, CtrlCmd, Shift, WinCtrl };
|
|
645
717
|
}
|
|
@@ -671,8 +743,10 @@ export {
|
|
|
671
743
|
ElementTagMap,
|
|
672
744
|
ElementTags,
|
|
673
745
|
ErrorCodes,
|
|
746
|
+
GetKeyCodeString,
|
|
674
747
|
InputEventType,
|
|
675
748
|
KeyCode,
|
|
749
|
+
KeyCodeString,
|
|
676
750
|
KeyModifier,
|
|
677
751
|
MouseEventType,
|
|
678
752
|
RpcId,
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import * as KeyCode from "../KeyCode/KeyCode.js";
|
|
2
|
+
import * as KeyCodeString from "../KeyCodeString/KeyCodeString.js";
|
|
3
|
+
export const getKeyCodeString = (keyCode) => {
|
|
4
|
+
switch (keyCode) {
|
|
5
|
+
case KeyCode.Backspace:
|
|
6
|
+
return KeyCodeString.Backspace;
|
|
7
|
+
case KeyCode.Tab:
|
|
8
|
+
return KeyCodeString.Tab;
|
|
9
|
+
case KeyCode.Escape:
|
|
10
|
+
return KeyCodeString.Escape;
|
|
11
|
+
case KeyCode.Enter:
|
|
12
|
+
return KeyCodeString.Enter;
|
|
13
|
+
case KeyCode.Space:
|
|
14
|
+
return KeyCodeString.Space;
|
|
15
|
+
case KeyCode.PageUp:
|
|
16
|
+
return KeyCodeString.PageUp;
|
|
17
|
+
case KeyCode.PageDown:
|
|
18
|
+
return KeyCodeString.PageDown;
|
|
19
|
+
case KeyCode.End:
|
|
20
|
+
return KeyCodeString.End;
|
|
21
|
+
case KeyCode.Home:
|
|
22
|
+
return KeyCodeString.Home;
|
|
23
|
+
case KeyCode.LeftArrow:
|
|
24
|
+
return KeyCodeString.LeftArrow;
|
|
25
|
+
case KeyCode.UpArrow:
|
|
26
|
+
return KeyCodeString.UpArrow;
|
|
27
|
+
case KeyCode.RightArrow:
|
|
28
|
+
return KeyCodeString.RightArrow;
|
|
29
|
+
case KeyCode.DownArrow:
|
|
30
|
+
return KeyCodeString.DownArrow;
|
|
31
|
+
case KeyCode.Insert:
|
|
32
|
+
return KeyCodeString.Insert;
|
|
33
|
+
case KeyCode.Delete:
|
|
34
|
+
return KeyCodeString.Delete;
|
|
35
|
+
case KeyCode.Digit0:
|
|
36
|
+
return KeyCodeString.Digit0;
|
|
37
|
+
case KeyCode.Digit1:
|
|
38
|
+
return KeyCodeString.Digit1;
|
|
39
|
+
case KeyCode.Digit2:
|
|
40
|
+
return KeyCodeString.Digit2;
|
|
41
|
+
case KeyCode.Digit3:
|
|
42
|
+
return KeyCodeString.Digit3;
|
|
43
|
+
case KeyCode.Digit4:
|
|
44
|
+
return KeyCodeString.Digit4;
|
|
45
|
+
case KeyCode.Digit5:
|
|
46
|
+
return KeyCodeString.Digit5;
|
|
47
|
+
case KeyCode.Digit6:
|
|
48
|
+
return KeyCodeString.Digit6;
|
|
49
|
+
case KeyCode.Digit7:
|
|
50
|
+
return KeyCodeString.Digit7;
|
|
51
|
+
case KeyCode.Digit8:
|
|
52
|
+
return KeyCodeString.Digit8;
|
|
53
|
+
case KeyCode.Digit9:
|
|
54
|
+
return KeyCodeString.Digit9;
|
|
55
|
+
case KeyCode.KeyA:
|
|
56
|
+
return KeyCodeString.KeyA;
|
|
57
|
+
case KeyCode.KeyB:
|
|
58
|
+
return KeyCodeString.KeyB;
|
|
59
|
+
case KeyCode.KeyC:
|
|
60
|
+
return KeyCodeString.KeyC;
|
|
61
|
+
case KeyCode.KeyD:
|
|
62
|
+
return KeyCodeString.KeyD;
|
|
63
|
+
case KeyCode.KeyE:
|
|
64
|
+
return KeyCodeString.KeyE;
|
|
65
|
+
case KeyCode.KeyF:
|
|
66
|
+
return KeyCodeString.KeyF;
|
|
67
|
+
case KeyCode.KeyG:
|
|
68
|
+
return KeyCodeString.KeyG;
|
|
69
|
+
case KeyCode.KeyH:
|
|
70
|
+
return KeyCodeString.KeyH;
|
|
71
|
+
case KeyCode.KeyI:
|
|
72
|
+
return KeyCodeString.KeyI;
|
|
73
|
+
case KeyCode.KeyJ:
|
|
74
|
+
return KeyCodeString.KeyJ;
|
|
75
|
+
case KeyCode.KeyK:
|
|
76
|
+
return KeyCodeString.KeyK;
|
|
77
|
+
case KeyCode.KeyL:
|
|
78
|
+
return KeyCodeString.KeyL;
|
|
79
|
+
case KeyCode.KeyM:
|
|
80
|
+
return KeyCodeString.KeyM;
|
|
81
|
+
case KeyCode.KeyN:
|
|
82
|
+
return KeyCodeString.KeyN;
|
|
83
|
+
case KeyCode.KeyO:
|
|
84
|
+
return KeyCodeString.KeyO;
|
|
85
|
+
case KeyCode.KeyP:
|
|
86
|
+
return KeyCodeString.KeyP;
|
|
87
|
+
case KeyCode.KeyQ:
|
|
88
|
+
return KeyCodeString.KeyQ;
|
|
89
|
+
case KeyCode.KeyR:
|
|
90
|
+
return KeyCodeString.KeyR;
|
|
91
|
+
case KeyCode.KeyS:
|
|
92
|
+
return KeyCodeString.KeyS;
|
|
93
|
+
case KeyCode.KeyT:
|
|
94
|
+
return KeyCodeString.KeyT;
|
|
95
|
+
case KeyCode.KeyU:
|
|
96
|
+
return KeyCodeString.KeyU;
|
|
97
|
+
case KeyCode.KeyV:
|
|
98
|
+
return KeyCodeString.KeyV;
|
|
99
|
+
case KeyCode.KeyW:
|
|
100
|
+
return KeyCodeString.KeyW;
|
|
101
|
+
case KeyCode.KeyX:
|
|
102
|
+
return KeyCodeString.KeyX;
|
|
103
|
+
case KeyCode.KeyY:
|
|
104
|
+
return KeyCodeString.KeyY;
|
|
105
|
+
case KeyCode.KeyZ:
|
|
106
|
+
return KeyCodeString.KeyZ;
|
|
107
|
+
case KeyCode.F1:
|
|
108
|
+
return KeyCodeString.F1;
|
|
109
|
+
case KeyCode.F2:
|
|
110
|
+
return KeyCodeString.F2;
|
|
111
|
+
case KeyCode.F3:
|
|
112
|
+
return KeyCodeString.F3;
|
|
113
|
+
case KeyCode.F4:
|
|
114
|
+
return KeyCodeString.F4;
|
|
115
|
+
case KeyCode.F5:
|
|
116
|
+
return KeyCodeString.F5;
|
|
117
|
+
case KeyCode.F6:
|
|
118
|
+
return KeyCodeString.F6;
|
|
119
|
+
case KeyCode.Backslash:
|
|
120
|
+
return KeyCodeString.Backslash;
|
|
121
|
+
case KeyCode.Equal:
|
|
122
|
+
return KeyCodeString.Equal;
|
|
123
|
+
case KeyCode.Comma:
|
|
124
|
+
return KeyCodeString.Comma;
|
|
125
|
+
case KeyCode.Backquote:
|
|
126
|
+
return KeyCodeString.Backquote;
|
|
127
|
+
case KeyCode.Plus:
|
|
128
|
+
return KeyCodeString.Plus;
|
|
129
|
+
case KeyCode.Star:
|
|
130
|
+
return KeyCodeString.Star;
|
|
131
|
+
case KeyCode.Minus:
|
|
132
|
+
return KeyCodeString.Minus;
|
|
133
|
+
default:
|
|
134
|
+
return KeyCodeString.Unknown;
|
|
135
|
+
}
|
|
136
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export const Unknown = 'Unknown';
|
|
2
|
+
export const Backspace = 'Backspace';
|
|
3
|
+
export const Tab = 'Tab';
|
|
4
|
+
export const Enter = 'Enter';
|
|
5
|
+
export const Escape = 'Escape';
|
|
6
|
+
export const Space = 'Space';
|
|
7
|
+
export const PageUp = 'PageUp';
|
|
8
|
+
export const PageDown = 'PageDown';
|
|
9
|
+
export const End = 'End';
|
|
10
|
+
export const Home = 'Home';
|
|
11
|
+
export const LeftArrow = 'LeftArrow';
|
|
12
|
+
export const UpArrow = 'UpArrow';
|
|
13
|
+
export const RightArrow = 'RightArrow';
|
|
14
|
+
export const DownArrow = 'DownArrow';
|
|
15
|
+
export const Insert = 'Insert';
|
|
16
|
+
export const Delete = 'Delete';
|
|
17
|
+
export const Digit0 = '0';
|
|
18
|
+
export const Digit1 = '1';
|
|
19
|
+
export const Digit2 = '2';
|
|
20
|
+
export const Digit3 = '3';
|
|
21
|
+
export const Digit4 = '4';
|
|
22
|
+
export const Digit5 = '5';
|
|
23
|
+
export const Digit6 = '6';
|
|
24
|
+
export const Digit7 = '7';
|
|
25
|
+
export const Digit8 = '8';
|
|
26
|
+
export const Digit9 = '9';
|
|
27
|
+
export const KeyA = 'a';
|
|
28
|
+
export const KeyB = 'b';
|
|
29
|
+
export const KeyC = 'c';
|
|
30
|
+
export const KeyD = 'd';
|
|
31
|
+
export const KeyE = 'e';
|
|
32
|
+
export const KeyF = 'f';
|
|
33
|
+
export const KeyG = 'g';
|
|
34
|
+
export const KeyH = 'h';
|
|
35
|
+
export const KeyI = 'i';
|
|
36
|
+
export const KeyJ = 'j';
|
|
37
|
+
export const KeyK = 'k';
|
|
38
|
+
export const KeyL = 'l';
|
|
39
|
+
export const KeyM = 'm';
|
|
40
|
+
export const KeyN = 'n';
|
|
41
|
+
export const KeyO = 'o';
|
|
42
|
+
export const KeyP = 'p';
|
|
43
|
+
export const KeyQ = 'q';
|
|
44
|
+
export const KeyR = 'r';
|
|
45
|
+
export const KeyS = 's';
|
|
46
|
+
export const KeyT = 't';
|
|
47
|
+
export const KeyU = 'u';
|
|
48
|
+
export const KeyV = 'v';
|
|
49
|
+
export const KeyW = 'w';
|
|
50
|
+
export const KeyX = 'x';
|
|
51
|
+
export const KeyY = 'y';
|
|
52
|
+
export const KeyZ = 'z';
|
|
53
|
+
export const F1 = 'F1';
|
|
54
|
+
export const F2 = 'F2';
|
|
55
|
+
export const F3 = 'F3';
|
|
56
|
+
export const F4 = 'F4';
|
|
57
|
+
export const F5 = 'F5';
|
|
58
|
+
export const F6 = 'F6';
|
|
59
|
+
export const Equal = '=';
|
|
60
|
+
export const Comma = ',';
|
|
61
|
+
export const Minus = 'Minus';
|
|
62
|
+
export const Backquote = 'Backquote';
|
|
63
|
+
export const Backslash = 'Backslash';
|
|
64
|
+
export const Star = '*';
|
|
65
|
+
export const Plus = '+';
|
package/dist/parts/Main/Main.js
CHANGED
|
@@ -3,8 +3,10 @@ export * as ClassNames from "../ClassNames/ClassNames.js";
|
|
|
3
3
|
export * as ElementTagMap from "../ElementTagMap/ElementTagMap.js";
|
|
4
4
|
export * as ElementTags from "../ElementTags/ElementTags.js";
|
|
5
5
|
export * as ErrorCodes from "../ErrorCodes/ErrorCodes.js";
|
|
6
|
+
export * as GetKeyCodeString from "../GetKeyCodeString/GetKeyCodeString.js";
|
|
6
7
|
export * as InputEventType from "../InputEventType/InputEventType.js";
|
|
7
8
|
export * as KeyCode from "../KeyCode/KeyCode.js";
|
|
9
|
+
export * as KeyCodeString from "../KeyCodeString/KeyCodeString.js";
|
|
8
10
|
export * as KeyModifier from "../KeyModifier/KeyModifier.js";
|
|
9
11
|
export * as MouseEventType from "../MouseEventType/MouseEventType.js";
|
|
10
12
|
export * as RpcId from "../RpcId/RpcId.js";
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/constants",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Constants",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Lvce Editor",
|
|
7
|
+
"sideEffects": false,
|
|
7
8
|
"type": "module",
|
|
8
9
|
"main": "dist/index.js",
|
|
9
10
|
"types": "dist/index.d.ts"
|