@lvce-editor/constants 1.12.0 → 1.14.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
@@ -341,6 +341,7 @@ declare const CtrlKey = "event.ctrlKey";
341
341
  declare const Key = "event.key";
342
342
  declare const getKeyCodeString: (keyCode: number) => string;
343
343
  declare const getWhenExpressionText: (whenExpression: number) => string;
344
+ declare const getWidgetName: (widgetId: number) => string;
344
345
  declare const Blank = "Blank";
345
346
  declare const Check = "Check";
346
347
  declare const ClearAll = "ClearAll";
@@ -361,7 +362,7 @@ declare const InsertLineBreak$1 = "insertLineBreak";
361
362
  declare const InsertCompositionText = "insertCompositionText";
362
363
  declare const InsertFromPaste = "insertFromPaste";
363
364
  declare const User = 1;
364
- declare const Script = 1;
365
+ declare const Script = 2;
365
366
  declare const Unknown$1 = 0;
366
367
  declare const Backspace = 1;
367
368
  declare const Tab$1 = 2;
@@ -732,9 +733,10 @@ declare const EditorCompletion = "EditorCompletion";
732
733
  declare const FindWidget$1 = "FindWidget";
733
734
  declare const EditorRename = "EditorRename";
734
735
  declare const EditorSourceActions$1 = "EditorSourceActions";
736
+ declare const ColorPicker$2 = "ColorPicker";
735
737
 
736
738
  declare namespace WidgetName {
737
- export { EditorCodeGenerator, EditorCompletion, EditorCompletionDetails, EditorHover, EditorRename, EditorSourceActions$1 as EditorSourceActions, FindWidget$1 as FindWidget };
739
+ export { ColorPicker$2 as ColorPicker, EditorCodeGenerator, EditorCompletion, EditorCompletionDetails, EditorHover, EditorRename, EditorSourceActions$1 as EditorSourceActions, FindWidget$1 as FindWidget };
738
740
  }
739
741
  declare namespace AriaRoles {
740
742
  export { Alert, Button, CheckBox, ComboBox, Document, Group, ListBox, Log, None, Option, Panel, ScrollBar, Status, Tab, TabList, ToolBar, Tree, TreeItem };
@@ -763,6 +765,9 @@ declare namespace GetKeyCodeString {
763
765
  declare namespace GetWhenExpressionText {
764
766
  export { getWhenExpressionText };
765
767
  }
768
+ declare namespace GetWidgetName {
769
+ export { getWidgetName };
770
+ }
766
771
  declare namespace Icons {
767
772
  export { Blank, Check, ClearAll, CollapseAll, DebugAlt2, Filter$1 as Filter, ListFlat, ListTree, NewFile, NewFolder, Refresh };
768
773
  }
@@ -813,6 +818,7 @@ export {
813
818
  EventExpression,
814
819
  GetKeyCodeString,
815
820
  GetWhenExpressionText,
821
+ GetWidgetName,
816
822
  Icons,
817
823
  InputEventType,
818
824
  InputSource,
@@ -0,0 +1,16 @@
1
+ import * as WidgetId from "../WidgetId/WidgetId.js";
2
+ import * as WidgetName from "../WidgetName/WidgetName.js";
3
+ export const getWidgetName = (widgetId) => {
4
+ switch (widgetId) {
5
+ case WidgetId.Find:
6
+ return WidgetName.FindWidget;
7
+ case WidgetId.ColorPicker:
8
+ return WidgetName.ColorPicker;
9
+ case WidgetId.Completion:
10
+ return WidgetName.EditorCompletion;
11
+ case WidgetId.SourceAction:
12
+ return WidgetName.EditorSourceActions;
13
+ default:
14
+ return '';
15
+ }
16
+ };
@@ -1,2 +1,2 @@
1
1
  export const User = 1;
2
- export const Script = 1;
2
+ export const Script = 2;
@@ -7,6 +7,7 @@ export * as ErrorCodes from "../ErrorCodes/ErrorCodes.js";
7
7
  export * as EventExpression from "../EventExpression/EventExpression.js";
8
8
  export * as GetKeyCodeString from "../GetKeyCodeString/GetKeyCodeString.js";
9
9
  export * as GetWhenExpressionText from "../GetWhenExpressionText/GetWhenExpressionText.js";
10
+ export * as GetWidgetName from "../GetWidgetName/GetWidgetName.js";
10
11
  export * as Icons from "../Icons/Icons.js";
11
12
  export * as InputEventType from "../InputEventType/InputEventType.js";
12
13
  export * as InputSource from "../InputSource/InputSource.js";
@@ -5,3 +5,4 @@ export const EditorCompletion = 'EditorCompletion';
5
5
  export const FindWidget = 'FindWidget';
6
6
  export const EditorRename = 'EditorRename';
7
7
  export const EditorSourceActions = 'EditorSourceActions';
8
+ export const ColorPicker = 'ColorPicker';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/constants",
3
- "version": "1.12.0",
3
+ "version": "1.14.0",
4
4
  "description": "Constants",
5
5
  "license": "MIT",
6
6
  "author": "Lvce Editor",