@lvce-editor/constants 1.20.0 → 1.22.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
@@ -348,16 +348,27 @@ declare const Label$1 = "label";
348
348
  declare const Dt = "dt";
349
349
  declare const ENOENT = "ENOENT";
350
350
  declare const EXDEV = "EXDEV";
351
- declare const TargetValue = "event.target.value";
351
+ declare const AltKey = "event.altKey";
352
+ declare const Button$3 = "event.button";
352
353
  declare const ClientX = "event.clientX";
353
354
  declare const ClientY = "event.clientY";
354
- declare const Button$3 = "event.button";
355
+ declare const CtrlKey = "event.ctrlKey";
356
+ declare const ShiftKey = "event.shiftKey";
355
357
  declare const DeltaMode = "event.deltaMode";
356
358
  declare const DeltaY = "event.deltaY";
357
- declare const TargetName = "event.target.name";
358
- declare const AltKey = "event.altKey";
359
- declare const CtrlKey = "event.ctrlKey";
359
+ declare const EventTargetClassName = "event.target.className";
360
+ declare const IsTrusted = "event.isTrusted";
360
361
  declare const Key = "event.key";
362
+ declare const TargetName = "event.target.name";
363
+ declare const TargetValue = "event.target.value";
364
+ declare const DefaultPrevented = "event.defaultPrevented";
365
+ declare const DataTransferFiles2 = "event.dataTransfer.files2";
366
+ declare const DataTransferFiles = "event.dataTransfer.files";
367
+ declare const None$1 = 0;
368
+ declare const CreateFile = 1;
369
+ declare const CreateFolder = 2;
370
+ declare const Rename$1 = 3;
371
+ declare const getKeyCode: (key: string) => number;
361
372
  declare const getKeyCodeString: (keyCode: number) => string;
362
373
  declare const getWhenExpressionText: (whenExpression: number) => string;
363
374
  declare const getWidgetName: (widgetId: number) => string;
@@ -613,7 +624,7 @@ declare const ProblemsFilter = 25;
613
624
  declare const KeyBindingsTable = 26;
614
625
  declare const E2eTests = 27;
615
626
  declare const Separator = 1;
616
- declare const None$1 = 0;
627
+ declare const None$2 = 0;
617
628
  declare const SubMenu = 4;
618
629
  declare const Checked = 2;
619
630
  declare const Unchecked = 3;
@@ -794,7 +805,7 @@ declare const Completion = 3;
794
805
  declare const CompletionDetail = 4;
795
806
  declare const Find = 5;
796
807
  declare const Hover = 6;
797
- declare const Rename$1 = 7;
808
+ declare const Rename$2 = 7;
798
809
  declare const SourceAction = 8;
799
810
  declare const EditorHover = "EditorHover";
800
811
  declare const EditorCodeGenerator = "EditorCodeGenerator";
@@ -830,7 +841,13 @@ declare namespace ErrorCodes {
830
841
  export { ENOENT, EXDEV };
831
842
  }
832
843
  declare namespace EventExpression {
833
- export { AltKey, Button$3 as Button, ClientX, ClientY, CtrlKey, DeltaMode, DeltaY, Key, TargetName, TargetValue };
844
+ export { AltKey, Button$3 as Button, ClientX, ClientY, CtrlKey, DataTransferFiles, DataTransferFiles2, DefaultPrevented, DeltaMode, DeltaY, EventTargetClassName, IsTrusted, Key, ShiftKey, TargetName, TargetValue };
845
+ }
846
+ declare namespace ExplorerEditingType {
847
+ export { CreateFile, CreateFolder, None$1 as None, Rename$1 as Rename };
848
+ }
849
+ declare namespace GetKeyCode {
850
+ export { getKeyCode };
834
851
  }
835
852
  declare namespace GetKeyCodeString {
836
853
  export { getKeyCodeString };
@@ -863,7 +880,7 @@ declare namespace MenuEntryId {
863
880
  export { ActivityBar, ActivityBarAdditionalViews, E2eTests, Edit, Editor, EditorImage, Explorer, ExtensionDetailReadme, File$1 as File, Go, Help, KeyBindingsTable, Main, ManageExtension, OpenRecent, Problems$1 as Problems, ProblemsFilter, Run, Search$2 as Search, Selection, Settings, SimpleBrowser, SourceControl, Tab$3 as Tab, Terminal, TitleBar, View };
864
881
  }
865
882
  declare namespace MenuItemFlags {
866
- export { Checked, Disabled, Ignore, None$1 as None, RestoreFocus, Separator, SubMenu, Unchecked };
883
+ export { Checked, Disabled, Ignore, None$2 as None, RestoreFocus, Separator, SubMenu, Unchecked };
867
884
  }
868
885
  declare namespace MouseEventType {
869
886
  export { Keyboard, LeftClick };
@@ -890,7 +907,7 @@ declare namespace WhenExpression {
890
907
  export { BrowserChromium, BrowserElectron, BrowserFirefox, Empty$1 as Empty, FocusAbout, FocusActivityBar, FocusColorPicker, FocusConfirm, FocusDebugConsoleInput, FocusDebugInput, FocusDebugScope, FocusDialog, FocusEditor, FocusEditorCodeGenerator, FocusEditorCompletions, FocusEditorHover, FocusEditorImage, FocusEditorRename, FocusEditorText, FocusExplorer, FocusExplorerEditBox, FocusExtensions, FocusFindWidget, FocusFindWidgetCloseButton, FocusFindWidgetMatchCase, FocusFindWidgetNextMatchButton, FocusFindWidgetPreviousMatchButton, FocusFindWidgetRegex, FocusFindWidgetReplace, FocusFindWidgetReplaceAllButton, FocusFindWidgetReplaceButton, FocusFindWidgetToggleReplace, FocusIgnoreFiles, FocusKeyBindingsTable, FocusKeyBindingsWhenExpression, FocusLocationList, FocusMenu, FocusOutput, FocusProblems, FocusQuickPickInput, FocusSearch, FocusSearchExcludeInput, FocusSearchIncludeInput, FocusSearchInput, FocusSearchMatchCase, FocusSearchOpenEditors, FocusSearchPreserveCase, FocusSearchRegex, FocusSearchReplaceAll, FocusSearchReplaceInput, FocusSearchResults, FocusSearchWholeWord, FocusSimpleBrowser, FocusSimpleBrowserInput, FocusSourceActions, FocusSourceControlInput, FocusTerminal, FocusTitleBarMenuBar, FocusToggleDetails, FocusToggleReplace, FocusViewletList };
891
908
  }
892
909
  declare namespace WidgetId {
893
- export { CodeGenerator, ColorPicker$1 as ColorPicker, Completion, CompletionDetail, Find, Hover, Rename$1 as Rename, SourceAction };
910
+ export { CodeGenerator, ColorPicker$1 as ColorPicker, Completion, CompletionDetail, Find, Hover, Rename$2 as Rename, SourceAction };
894
911
  }
895
912
 
896
913
  export {
@@ -902,6 +919,8 @@ export {
902
919
  ElementTags,
903
920
  ErrorCodes,
904
921
  EventExpression,
922
+ ExplorerEditingType,
923
+ GetKeyCode,
905
924
  GetKeyCodeString,
906
925
  GetWhenExpressionText,
907
926
  GetWidgetName,
@@ -1,10 +1,16 @@
1
- export const TargetValue = 'event.target.value';
1
+ export const AltKey = 'event.altKey';
2
+ export const Button = 'event.button';
2
3
  export const ClientX = 'event.clientX';
3
4
  export const ClientY = 'event.clientY';
4
- export const Button = 'event.button';
5
+ export const CtrlKey = 'event.ctrlKey';
6
+ export const ShiftKey = 'event.shiftKey';
5
7
  export const DeltaMode = 'event.deltaMode';
6
8
  export const DeltaY = 'event.deltaY';
7
- export const TargetName = 'event.target.name';
8
- export const AltKey = 'event.altKey';
9
- export const CtrlKey = 'event.ctrlKey';
9
+ export const EventTargetClassName = 'event.target.className';
10
+ export const IsTrusted = 'event.isTrusted';
10
11
  export const Key = 'event.key';
12
+ export const TargetName = 'event.target.name';
13
+ export const TargetValue = 'event.target.value';
14
+ export const DefaultPrevented = 'event.defaultPrevented';
15
+ export const DataTransferFiles2 = 'event.dataTransfer.files2';
16
+ export const DataTransferFiles = 'event.dataTransfer.files';
@@ -0,0 +1,4 @@
1
+ export const None = 0;
2
+ export const CreateFile = 1;
3
+ export const CreateFolder = 2;
4
+ export const Rename = 3;
@@ -0,0 +1,184 @@
1
+ import * as Key from "../Key/Key.js";
2
+ import * as KeyCode from "../KeyCode/KeyCode.js";
3
+ export const getKeyCode = (key) => {
4
+ switch (key) {
5
+ case Key.Backspace:
6
+ return KeyCode.Backspace;
7
+ case Key.Tab:
8
+ return KeyCode.Tab;
9
+ case Key.Escape:
10
+ return KeyCode.Escape;
11
+ case Key.Enter:
12
+ return KeyCode.Enter;
13
+ case Key.Space:
14
+ return KeyCode.Space;
15
+ case Key.PageUp:
16
+ return KeyCode.PageUp;
17
+ case Key.PageDown:
18
+ return KeyCode.PageDown;
19
+ case Key.End:
20
+ return KeyCode.End;
21
+ case Key.Home:
22
+ return KeyCode.Home;
23
+ case Key.LeftArrow:
24
+ return KeyCode.LeftArrow;
25
+ case Key.UpArrow:
26
+ return KeyCode.UpArrow;
27
+ case Key.RightArrow:
28
+ return KeyCode.RightArrow;
29
+ case Key.DownArrow:
30
+ return KeyCode.DownArrow;
31
+ case Key.Insert:
32
+ return KeyCode.Insert;
33
+ case Key.Delete:
34
+ return KeyCode.Delete;
35
+ case Key.Digit0:
36
+ return KeyCode.Digit0;
37
+ case Key.Digit1:
38
+ return KeyCode.Digit1;
39
+ case Key.Digit2:
40
+ return KeyCode.Digit2;
41
+ case Key.Digit3:
42
+ return KeyCode.Digit3;
43
+ case Key.Digit4:
44
+ return KeyCode.Digit4;
45
+ case Key.Digit5:
46
+ return KeyCode.Digit5;
47
+ case Key.Digit6:
48
+ return KeyCode.Digit6;
49
+ case Key.Digit7:
50
+ return KeyCode.Digit7;
51
+ case Key.Digit8:
52
+ return KeyCode.Digit8;
53
+ case Key.Digit9:
54
+ return KeyCode.Digit9;
55
+ case Key.KeyA:
56
+ return KeyCode.KeyA;
57
+ case Key.KeyB:
58
+ return KeyCode.KeyB;
59
+ case Key.KeyC:
60
+ return KeyCode.KeyC;
61
+ case Key.KeyD:
62
+ return KeyCode.KeyD;
63
+ case Key.KeyE:
64
+ return KeyCode.KeyE;
65
+ case Key.KeyF:
66
+ return KeyCode.KeyF;
67
+ case Key.KeyG:
68
+ return KeyCode.KeyG;
69
+ case Key.KeyH:
70
+ return KeyCode.KeyH;
71
+ case Key.KeyI:
72
+ return KeyCode.KeyI;
73
+ case Key.KeyJ:
74
+ return KeyCode.KeyJ;
75
+ case Key.KeyK:
76
+ return KeyCode.KeyK;
77
+ case Key.KeyL:
78
+ return KeyCode.KeyL;
79
+ case Key.KeyM:
80
+ return KeyCode.KeyM;
81
+ case Key.KeyN:
82
+ return KeyCode.KeyN;
83
+ case Key.KeyO:
84
+ return KeyCode.KeyO;
85
+ case Key.KeyP:
86
+ return KeyCode.KeyP;
87
+ case Key.KeyQ:
88
+ return KeyCode.KeyQ;
89
+ case Key.KeyR:
90
+ return KeyCode.KeyR;
91
+ case Key.KeyS:
92
+ return KeyCode.KeyS;
93
+ case Key.KeyT:
94
+ return KeyCode.KeyT;
95
+ case Key.KeyU:
96
+ return KeyCode.KeyU;
97
+ case Key.KeyV:
98
+ return KeyCode.KeyV;
99
+ case Key.KeyW:
100
+ return KeyCode.KeyW;
101
+ case Key.KeyX:
102
+ return KeyCode.KeyX;
103
+ case Key.KeyY:
104
+ return KeyCode.KeyY;
105
+ case Key.KeyZ:
106
+ return KeyCode.KeyZ;
107
+ case Key.F1:
108
+ return KeyCode.F1;
109
+ case Key.F2:
110
+ return KeyCode.F2;
111
+ case Key.F3:
112
+ return KeyCode.F3;
113
+ case Key.F4:
114
+ return KeyCode.F4;
115
+ case Key.F5:
116
+ return KeyCode.F5;
117
+ case Key.F6:
118
+ return KeyCode.F6;
119
+ case Key.F7:
120
+ return KeyCode.F7;
121
+ case Key.F8:
122
+ return KeyCode.F8;
123
+ case Key.F9:
124
+ return KeyCode.F9;
125
+ case Key.F10:
126
+ return KeyCode.F10;
127
+ case Key.F11:
128
+ return KeyCode.F11;
129
+ case Key.F12:
130
+ return KeyCode.F12;
131
+ case Key.F13:
132
+ return KeyCode.F13;
133
+ case Key.F14:
134
+ return KeyCode.F14;
135
+ case Key.F15:
136
+ return KeyCode.F15;
137
+ case Key.F16:
138
+ return KeyCode.F16;
139
+ case Key.F17:
140
+ return KeyCode.F17;
141
+ case Key.F18:
142
+ return KeyCode.F18;
143
+ case Key.F19:
144
+ return KeyCode.F19;
145
+ case Key.F20:
146
+ return KeyCode.F20;
147
+ case Key.F21:
148
+ return KeyCode.F21;
149
+ case Key.F22:
150
+ return KeyCode.F22;
151
+ case Key.F23:
152
+ return KeyCode.F23;
153
+ case Key.F24:
154
+ return KeyCode.F24;
155
+ case Key.SemiColon:
156
+ return KeyCode.SemiColon;
157
+ case Key.Equal:
158
+ return KeyCode.Equal;
159
+ case Key.Comma:
160
+ return KeyCode.Comma;
161
+ case Key.Minus:
162
+ return KeyCode.Minus;
163
+ case Key.Period:
164
+ return KeyCode.Period;
165
+ case Key.Slash:
166
+ return KeyCode.Slash;
167
+ case Key.Backquote:
168
+ return KeyCode.Backquote;
169
+ case Key.BracketLeft:
170
+ return KeyCode.BracketLeft;
171
+ case Key.Backslash:
172
+ return KeyCode.Backslash;
173
+ case Key.BracketRight:
174
+ return KeyCode.BracketRight;
175
+ case Key.Quote:
176
+ return KeyCode.Quote;
177
+ case Key.Star:
178
+ return KeyCode.Star;
179
+ case Key.Plus:
180
+ return KeyCode.Plus;
181
+ default:
182
+ return KeyCode.Unknown;
183
+ }
184
+ };
@@ -0,0 +1,88 @@
1
+ export const Backspace = 'Backspace';
2
+ export const Tab = 'Tab';
3
+ export const Space = ' ';
4
+ export const Enter = 'Enter';
5
+ export const Escape = 'Escape';
6
+ export const PageUp = 'PageUp';
7
+ export const PageDown = 'PageDown';
8
+ export const Home = 'Home';
9
+ export const End = 'End';
10
+ export const LeftArrow = 'ArrowLeft';
11
+ export const RightArrow = 'ArrowRight';
12
+ export const UpArrow = 'ArrowUp';
13
+ export const DownArrow = 'ArrowDown';
14
+ export const Insert = 'Insert';
15
+ export const Delete = 'Delete';
16
+ export const Digit0 = '0';
17
+ export const Digit1 = '1';
18
+ export const Digit2 = '2';
19
+ export const Digit3 = '3';
20
+ export const Digit4 = '4';
21
+ export const Digit5 = '5';
22
+ export const Digit6 = '6';
23
+ export const Digit7 = '7';
24
+ export const Digit8 = '8';
25
+ export const Digit9 = '9';
26
+ export const KeyA = 'a';
27
+ export const KeyB = 'b';
28
+ export const KeyC = 'c';
29
+ export const KeyD = 'd';
30
+ export const KeyE = 'e';
31
+ export const KeyF = 'f';
32
+ export const KeyG = 'g';
33
+ export const KeyH = 'h';
34
+ export const KeyI = 'i';
35
+ export const KeyJ = 'j';
36
+ export const KeyK = 'k';
37
+ export const KeyL = 'l';
38
+ export const KeyM = 'm';
39
+ export const KeyN = 'n';
40
+ export const KeyO = 'o';
41
+ export const KeyP = 'p';
42
+ export const KeyQ = 'q';
43
+ export const KeyR = 'r';
44
+ export const KeyS = 's';
45
+ export const KeyT = 't';
46
+ export const KeyU = 'u';
47
+ export const KeyV = 'v';
48
+ export const KeyW = 'w';
49
+ export const KeyX = 'x';
50
+ export const KeyY = 'y';
51
+ export const KeyZ = 'z';
52
+ export const F1 = 'F1';
53
+ export const F2 = 'F2';
54
+ export const F3 = 'F3';
55
+ export const F4 = 'F4';
56
+ export const F5 = 'F5';
57
+ export const F6 = 'F6';
58
+ export const F7 = 'F7';
59
+ export const F8 = 'F8';
60
+ export const F9 = 'F9';
61
+ export const F10 = 'F10';
62
+ export const F11 = 'F11';
63
+ export const F12 = 'F12';
64
+ export const F13 = 'F13';
65
+ export const F14 = 'F14';
66
+ export const F15 = 'F15';
67
+ export const F16 = 'F16';
68
+ export const F17 = 'F17';
69
+ export const F18 = 'F18';
70
+ export const F19 = 'F19';
71
+ export const F20 = 'F20';
72
+ export const F21 = 'F21';
73
+ export const F22 = 'F22';
74
+ export const F23 = 'F23';
75
+ export const F24 = 'F24';
76
+ export const SemiColon = ';';
77
+ export const Equal = '=';
78
+ export const Comma = ',';
79
+ export const Minus = '-';
80
+ export const Period = '.';
81
+ export const Slash = '/';
82
+ export const Backquote = '`';
83
+ export const BracketLeft = '[';
84
+ export const Backslash = '\\';
85
+ export const BracketRight = ']';
86
+ export const Quote = `'`;
87
+ export const Star = '*';
88
+ export const Plus = '+';
@@ -6,6 +6,8 @@ export * as ElementTagMap from "../ElementTagMap/ElementTagMap.js";
6
6
  export * as ElementTags from "../ElementTags/ElementTags.js";
7
7
  export * as ErrorCodes from "../ErrorCodes/ErrorCodes.js";
8
8
  export * as EventExpression from "../EventExpression/EventExpression.js";
9
+ export * as ExplorerEditingType from "../ExplorerEditingType/ExplorerEditingType.js";
10
+ export * as GetKeyCode from "../GetKeyCode/GetKeyCode.js";
9
11
  export * as GetKeyCodeString from "../GetKeyCodeString/GetKeyCodeString.js";
10
12
  export * as GetWhenExpressionText from "../GetWhenExpressionText/GetWhenExpressionText.js";
11
13
  export * as GetWidgetName from "../GetWidgetName/GetWidgetName.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/constants",
3
- "version": "1.20.0",
3
+ "version": "1.22.0",
4
4
  "description": "Constants",
5
5
  "license": "MIT",
6
6
  "author": "Lvce Editor",