@minecraft/server-editor 0.1.0-beta.1.21.30-preview.25 → 0.1.0-beta.1.21.40-preview.20

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.
Files changed (2) hide show
  1. package/index.d.ts +134 -24
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -198,11 +198,6 @@ export enum EditorMode {
198
198
  Tool = 'Tool',
199
199
  }
200
200
 
201
- export declare enum EditorStatusBarAlignment {
202
- Right = 0,
203
- Left = 1,
204
- }
205
-
206
201
  export enum EntityOperationType {
207
202
  Create = 0,
208
203
  Delete = 1,
@@ -970,20 +965,77 @@ export enum SplineType {
970
965
  Line = 'Line',
971
966
  }
972
967
 
968
+ /**
969
+ * Position for items on the status bar
970
+ */
971
+ export declare enum StatusBarAlignment {
972
+ Right = 0,
973
+ Left = 1,
974
+ }
975
+
973
976
  export enum ThemeSettingsColorKey {
977
+ Caret = 'Caret',
978
+ Confirm1 = 'Confirm1',
979
+ Confirm2 = 'Confirm2',
980
+ Confirm3 = 'Confirm3',
981
+ ConfirmFill = 'ConfirmFill',
974
982
  ControlsGeneralFill = 'ControlsGeneralFill',
975
983
  ControlsGeneralHighlight = 'ControlsGeneralHighlight',
984
+ Coordinate1 = 'Coordinate1',
985
+ Coordinate2 = 'Coordinate2',
986
+ Coordinate3 = 'Coordinate3',
976
987
  CoordinateControlX = 'CoordinateControlX',
977
988
  CoordinateControlY = 'CoordinateControlY',
978
989
  CoordinateControlZ = 'CoordinateControlZ',
979
990
  CursorVolumeBorder = 'CursorVolumeBorder',
980
991
  CursorVolumeFill = 'CursorVolumeFill',
992
+ Destroy1 = 'Destroy1',
993
+ Destroy2 = 'Destroy2',
994
+ Destroy3 = 'Destroy3',
995
+ DestroyFill = 'DestroyFill',
996
+ DisableBackground = 'DisableBackground',
997
+ DisableFill = 'DisableFill',
998
+ DisableOutline = 'DisableOutline',
999
+ DisableText = 'DisableText',
1000
+ DropDown1 = 'DropDown1',
1001
+ DropDown2 = 'DropDown2',
1002
+ DropDown3 = 'DropDown3',
1003
+ ElementBorder = 'ElementBorder',
1004
+ Error = 'Error',
1005
+ FocusOutline = 'FocusOutline',
1006
+ HeaderBackground = 'HeaderBackground',
1007
+ HotbarOutline = 'HotbarOutline',
1008
+ Info1 = 'Info1',
1009
+ Info2 = 'Info2',
1010
+ Info3 = 'Info3',
1011
+ InfoFill = 'InfoFill',
1012
+ PanelBackground = 'PanelBackground',
1013
+ PanelBorder = 'PanelBorder',
981
1014
  PlacementVolumeBorder = 'PlacementVolumeBorder',
982
1015
  PlacementVolumeFill = 'PlacementVolumeFill',
983
1016
  PrefillVolumeBorder = 'PrefillVolumeBorder',
984
1017
  PrefillVolumeFill = 'PrefillVolumeFill',
1018
+ PrimaryActive = 'PrimaryActive',
1019
+ PrimaryBackground1 = 'PrimaryBackground1',
1020
+ PrimaryBackground2 = 'PrimaryBackground2',
1021
+ PrimaryBackground3 = 'PrimaryBackground3',
1022
+ PrimaryBackground4 = 'PrimaryBackground4',
1023
+ PrimaryDefault = 'PrimaryDefault',
1024
+ PrimaryDisable = 'PrimaryDisable',
1025
+ PrimaryMute = 'PrimaryMute',
1026
+ ScrollBar = 'ScrollBar',
1027
+ SecondaryActive = 'SecondaryActive',
1028
+ SecondaryBackground1 = 'SecondaryBackground1',
1029
+ SecondaryBackground2 = 'SecondaryBackground2',
1030
+ SecondaryBackground3 = 'SecondaryBackground3',
1031
+ SecondaryDefault = 'SecondaryDefault',
1032
+ SecondaryDisable = 'SecondaryDisable',
1033
+ SecondaryMute = 'SecondaryMute',
985
1034
  SelectionVolumeBorder = 'SelectionVolumeBorder',
986
1035
  SelectionVolumeFill = 'SelectionVolumeFill',
1036
+ TitleBarBackground = 'TitleBarBackground',
1037
+ ViewportOutline = 'ViewportOutline',
1038
+ Warning = 'Warning',
987
1039
  }
988
1040
 
989
1041
  export enum WidgetComponentType {
@@ -1077,12 +1129,12 @@ export type IObservableProp<T> = IObservable<T> | T;
1077
1129
  * of the UI object.
1078
1130
  */
1079
1131
  export type IPlayerUISession<PerPlayerStorage = Record<string, never>> = {
1080
- createStatusBarItem(alignment: EditorStatusBarAlignment, size: number): IStatusBarItem;
1081
1132
  createPropertyPane(options: IRootPropertyPaneOptions): IRootPropertyPane;
1082
1133
  readonly actionManager: ActionManager;
1083
1134
  readonly inputManager: IGlobalInputManager;
1084
1135
  readonly menuBar: IMenuContainer;
1085
1136
  readonly actionBar: IActionBar;
1137
+ readonly statusBar: IStatusBar;
1086
1138
  readonly toolRail: IModalToolContainer;
1087
1139
  readonly log: IPlayerLogger;
1088
1140
  readonly extensionContext: ExtensionContext;
@@ -1694,7 +1746,7 @@ export class ClipboardManager {
1694
1746
 
1695
1747
  export class CurrentThemeChangeAfterEvent {
1696
1748
  private constructor();
1697
- readonly name: string;
1749
+ readonly id: string;
1698
1750
  }
1699
1751
 
1700
1752
  export class CurrentThemeChangeAfterEventSignal {
@@ -1716,7 +1768,7 @@ export class CurrentThemeChangeAfterEventSignal {
1716
1768
  export class CurrentThemeColorChangeAfterEvent {
1717
1769
  private constructor();
1718
1770
  readonly color: minecraftserver.RGBA;
1719
- readonly colorKey: ThemeSettingsColorKey;
1771
+ readonly colorKey: string;
1720
1772
  }
1721
1773
 
1722
1774
  export class CurrentThemeColorChangeAfterEventSignal {
@@ -2841,8 +2893,8 @@ export class ThemeSettings {
2841
2893
  *
2842
2894
  * {@link Error}
2843
2895
  */
2844
- addNewTheme(name: string): void;
2845
- canThemeBeModified(name: string): boolean;
2896
+ addNewTheme(id: string): void;
2897
+ canThemeBeModified(id: string): boolean;
2846
2898
  /**
2847
2899
  * @remarks
2848
2900
  * This function can't be called in read-only mode.
@@ -2851,7 +2903,7 @@ export class ThemeSettings {
2851
2903
  *
2852
2904
  * {@link Error}
2853
2905
  */
2854
- deleteTheme(name: string): void;
2906
+ deleteTheme(id: string): void;
2855
2907
  getCurrentTheme(): string;
2856
2908
  getThemeList(): string[];
2857
2909
  resolveColorKey(key: ThemeSettingsColorKey): minecraftserver.RGBA;
@@ -2863,7 +2915,7 @@ export class ThemeSettings {
2863
2915
  *
2864
2916
  * {@link Error}
2865
2917
  */
2866
- setCurrentTheme(name: string): void;
2918
+ setCurrentTheme(id: string): void;
2867
2919
  /**
2868
2920
  * @remarks
2869
2921
  * This function can't be called in read-only mode.
@@ -2872,7 +2924,7 @@ export class ThemeSettings {
2872
2924
  *
2873
2925
  * {@link Error}
2874
2926
  */
2875
- updateThemeColor(name: string, key: ThemeSettingsColorKey, newColor: minecraftserver.RGBA): void;
2927
+ updateThemeColor(id: string, key: ThemeSettingsColorKey, newColor: minecraftserver.RGBA): void;
2876
2928
  }
2877
2929
 
2878
2930
  /**
@@ -6082,13 +6134,7 @@ export interface ISimpleToolStatusBarOptions {
6082
6134
  * status bar container
6083
6135
  *
6084
6136
  */
6085
- alignment: EditorStatusBarAlignment;
6086
- /**
6087
- * @remarks
6088
- * The text for the status bar item
6089
- *
6090
- */
6091
- displayAltText: string;
6137
+ alignment: StatusBarAlignment;
6092
6138
  onFinalize?: (statusBar: ISimpleToolStatusBarComponent) => void;
6093
6139
  onHide?: (statusBar: ISimpleToolStatusBarComponent) => void;
6094
6140
  onShow?: (statusBar: ISimpleToolStatusBarComponent) => void;
@@ -6100,6 +6146,12 @@ export interface ISimpleToolStatusBarOptions {
6100
6146
  *
6101
6147
  */
6102
6148
  size: number;
6149
+ /**
6150
+ * @remarks
6151
+ * The text for the status bar item
6152
+ *
6153
+ */
6154
+ text: LocalizedString;
6103
6155
  /**
6104
6156
  * @remarks
6105
6157
  * Determine the status bar visibility based on the existence
@@ -6109,6 +6161,28 @@ export interface ISimpleToolStatusBarOptions {
6109
6161
  visibility?: SimpleToolStatusBarVisibility;
6110
6162
  }
6111
6163
 
6164
+ /**
6165
+ * Manager and container for IStatusBarItem objects
6166
+ */
6167
+ export interface IStatusBar {
6168
+ /**
6169
+ * @remarks
6170
+ * Create a item in status bar
6171
+ *
6172
+ * @param props
6173
+ * Properties to create status bar item
6174
+ */
6175
+ createItem(props: IStatusBarItemCreationParams): IStatusBarItem;
6176
+ /**
6177
+ * @remarks
6178
+ * Remove an existing status bar item
6179
+ *
6180
+ * @param id
6181
+ * Status bar item identifier
6182
+ */
6183
+ removeItem(id: string): void;
6184
+ }
6185
+
6112
6186
  export interface IStatusBarItem {
6113
6187
  /**
6114
6188
  * @remarks
@@ -6116,14 +6190,50 @@ export interface IStatusBarItem {
6116
6190
  *
6117
6191
  */
6118
6192
  readonly id: string;
6193
+ getText(): LocalizedString;
6194
+ hide(): void;
6195
+ setText(text: LocalizedString): void;
6196
+ show(): void;
6197
+ }
6198
+
6199
+ /**
6200
+ * Properties required to create a status bar item
6201
+ */
6202
+ export interface IStatusBarItemCreationParams {
6119
6203
  /**
6120
6204
  * @remarks
6121
- * Text to display.
6205
+ * Alignment of item within status bar. If undefined, it will
6206
+ * be left aligned.
6122
6207
  *
6123
6208
  */
6124
- text: string;
6125
- hide(): void;
6126
- show(): void;
6209
+ alignment?: StatusBarAlignment;
6210
+ /**
6211
+ * @remarks
6212
+ * Optional icon image resource of the item.
6213
+ *
6214
+ */
6215
+ icon?: string;
6216
+ /**
6217
+ * @remarks
6218
+ * Size of the status bar item. If undefined, it will wrap text
6219
+ * content.
6220
+ *
6221
+ */
6222
+ size?: number;
6223
+ /**
6224
+ * @remarks
6225
+ * Default localized display text of the item. If undefined, it
6226
+ * will be empty string.
6227
+ *
6228
+ */
6229
+ text?: LocalizedString;
6230
+ /**
6231
+ * @remarks
6232
+ * Default visibility of the item. If undefined, it will be
6233
+ * true.
6234
+ *
6235
+ */
6236
+ visible?: boolean;
6127
6237
  }
6128
6238
 
6129
6239
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server-editor",
3
- "version": "0.1.0-beta.1.21.30-preview.25",
3
+ "version": "0.1.0-beta.1.21.40-preview.20",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {
@@ -14,7 +14,7 @@
14
14
  ],
15
15
  "dependencies": {
16
16
  "@minecraft/common": "^1.0.0",
17
- "@minecraft/server": "^1.15.0-beta.1.21.30-preview.25"
17
+ "@minecraft/server": "^1.16.0-beta.1.21.40-preview.20"
18
18
  },
19
19
  "license": "MIT"
20
20
  }