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

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 +164 -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,
@@ -232,6 +227,7 @@ export enum GamePublishSetting {
232
227
  * properties.
233
228
  */
234
229
  export enum GraphicsSettingsProperty {
230
+ ShowChunkBoundaries = 'ShowChunkBoundaries',
235
231
  /**
236
232
  * @remarks
237
233
  * Manages rendering of invisible blocks (e.g., barrier, light,
@@ -970,20 +966,77 @@ export enum SplineType {
970
966
  Line = 'Line',
971
967
  }
972
968
 
969
+ /**
970
+ * Position for items on the status bar
971
+ */
972
+ export declare enum StatusBarAlignment {
973
+ Right = 0,
974
+ Left = 1,
975
+ }
976
+
973
977
  export enum ThemeSettingsColorKey {
978
+ Caret = 'Caret',
979
+ Confirm1 = 'Confirm1',
980
+ Confirm2 = 'Confirm2',
981
+ Confirm3 = 'Confirm3',
982
+ ConfirmFill = 'ConfirmFill',
974
983
  ControlsGeneralFill = 'ControlsGeneralFill',
975
984
  ControlsGeneralHighlight = 'ControlsGeneralHighlight',
985
+ Coordinate1 = 'Coordinate1',
986
+ Coordinate2 = 'Coordinate2',
987
+ Coordinate3 = 'Coordinate3',
976
988
  CoordinateControlX = 'CoordinateControlX',
977
989
  CoordinateControlY = 'CoordinateControlY',
978
990
  CoordinateControlZ = 'CoordinateControlZ',
979
991
  CursorVolumeBorder = 'CursorVolumeBorder',
980
992
  CursorVolumeFill = 'CursorVolumeFill',
993
+ Destroy1 = 'Destroy1',
994
+ Destroy2 = 'Destroy2',
995
+ Destroy3 = 'Destroy3',
996
+ DestroyFill = 'DestroyFill',
997
+ DisableBackground = 'DisableBackground',
998
+ DisableFill = 'DisableFill',
999
+ DisableOutline = 'DisableOutline',
1000
+ DisableText = 'DisableText',
1001
+ DropDown1 = 'DropDown1',
1002
+ DropDown2 = 'DropDown2',
1003
+ DropDown3 = 'DropDown3',
1004
+ ElementBorder = 'ElementBorder',
1005
+ Error = 'Error',
1006
+ FocusOutline = 'FocusOutline',
1007
+ HeaderBackground = 'HeaderBackground',
1008
+ HotbarOutline = 'HotbarOutline',
1009
+ Info1 = 'Info1',
1010
+ Info2 = 'Info2',
1011
+ Info3 = 'Info3',
1012
+ InfoFill = 'InfoFill',
1013
+ PanelBackground = 'PanelBackground',
1014
+ PanelBorder = 'PanelBorder',
981
1015
  PlacementVolumeBorder = 'PlacementVolumeBorder',
982
1016
  PlacementVolumeFill = 'PlacementVolumeFill',
983
1017
  PrefillVolumeBorder = 'PrefillVolumeBorder',
984
1018
  PrefillVolumeFill = 'PrefillVolumeFill',
1019
+ PrimaryActive = 'PrimaryActive',
1020
+ PrimaryBackground1 = 'PrimaryBackground1',
1021
+ PrimaryBackground2 = 'PrimaryBackground2',
1022
+ PrimaryBackground3 = 'PrimaryBackground3',
1023
+ PrimaryBackground4 = 'PrimaryBackground4',
1024
+ PrimaryDefault = 'PrimaryDefault',
1025
+ PrimaryDisable = 'PrimaryDisable',
1026
+ PrimaryMute = 'PrimaryMute',
1027
+ ScrollBar = 'ScrollBar',
1028
+ SecondaryActive = 'SecondaryActive',
1029
+ SecondaryBackground1 = 'SecondaryBackground1',
1030
+ SecondaryBackground2 = 'SecondaryBackground2',
1031
+ SecondaryBackground3 = 'SecondaryBackground3',
1032
+ SecondaryDefault = 'SecondaryDefault',
1033
+ SecondaryDisable = 'SecondaryDisable',
1034
+ SecondaryMute = 'SecondaryMute',
985
1035
  SelectionVolumeBorder = 'SelectionVolumeBorder',
986
1036
  SelectionVolumeFill = 'SelectionVolumeFill',
1037
+ TitleBarBackground = 'TitleBarBackground',
1038
+ ViewportOutline = 'ViewportOutline',
1039
+ Warning = 'Warning',
987
1040
  }
988
1041
 
989
1042
  export enum WidgetComponentType {
@@ -1006,6 +1059,7 @@ export enum WidgetGroupSelectionMode {
1006
1059
  */
1007
1060
  export type GraphicsSettingsPropertyTypeMap = {
1008
1061
  [GraphicsSettingsProperty.ShowInvisibleBlocks]?: boolean;
1062
+ [GraphicsSettingsProperty.ShowChunkBoundaries]?: boolean;
1009
1063
  };
1010
1064
 
1011
1065
  /**
@@ -1077,12 +1131,12 @@ export type IObservableProp<T> = IObservable<T> | T;
1077
1131
  * of the UI object.
1078
1132
  */
1079
1133
  export type IPlayerUISession<PerPlayerStorage = Record<string, never>> = {
1080
- createStatusBarItem(alignment: EditorStatusBarAlignment, size: number): IStatusBarItem;
1081
1134
  createPropertyPane(options: IRootPropertyPaneOptions): IRootPropertyPane;
1082
1135
  readonly actionManager: ActionManager;
1083
1136
  readonly inputManager: IGlobalInputManager;
1084
1137
  readonly menuBar: IMenuContainer;
1085
1138
  readonly actionBar: IActionBar;
1139
+ readonly statusBar: IStatusBar;
1086
1140
  readonly toolRail: IModalToolContainer;
1087
1141
  readonly log: IPlayerLogger;
1088
1142
  readonly extensionContext: ExtensionContext;
@@ -1505,12 +1559,16 @@ export class ClipboardChangeAfterEventSignal {
1505
1559
  * @remarks
1506
1560
  * This function can't be called in read-only mode.
1507
1561
  *
1562
+ * This function can be called in early-execution mode.
1563
+ *
1508
1564
  */
1509
1565
  subscribe(callback: (arg: ClipboardChangeAfterEvent) => void): (arg: ClipboardChangeAfterEvent) => void;
1510
1566
  /**
1511
1567
  * @remarks
1512
1568
  * This function can't be called in read-only mode.
1513
1569
  *
1570
+ * This function can be called in early-execution mode.
1571
+ *
1514
1572
  */
1515
1573
  unsubscribe(callback: (arg: ClipboardChangeAfterEvent) => void): void;
1516
1574
  }
@@ -1694,7 +1752,7 @@ export class ClipboardManager {
1694
1752
 
1695
1753
  export class CurrentThemeChangeAfterEvent {
1696
1754
  private constructor();
1697
- readonly name: string;
1755
+ readonly id: string;
1698
1756
  }
1699
1757
 
1700
1758
  export class CurrentThemeChangeAfterEventSignal {
@@ -1703,12 +1761,16 @@ export class CurrentThemeChangeAfterEventSignal {
1703
1761
  * @remarks
1704
1762
  * This function can't be called in read-only mode.
1705
1763
  *
1764
+ * This function can be called in early-execution mode.
1765
+ *
1706
1766
  */
1707
1767
  subscribe(callback: (arg: CurrentThemeChangeAfterEvent) => void): (arg: CurrentThemeChangeAfterEvent) => void;
1708
1768
  /**
1709
1769
  * @remarks
1710
1770
  * This function can't be called in read-only mode.
1711
1771
  *
1772
+ * This function can be called in early-execution mode.
1773
+ *
1712
1774
  */
1713
1775
  unsubscribe(callback: (arg: CurrentThemeChangeAfterEvent) => void): void;
1714
1776
  }
@@ -1716,7 +1778,7 @@ export class CurrentThemeChangeAfterEventSignal {
1716
1778
  export class CurrentThemeColorChangeAfterEvent {
1717
1779
  private constructor();
1718
1780
  readonly color: minecraftserver.RGBA;
1719
- readonly colorKey: ThemeSettingsColorKey;
1781
+ readonly colorKey: string;
1720
1782
  }
1721
1783
 
1722
1784
  export class CurrentThemeColorChangeAfterEventSignal {
@@ -1725,6 +1787,8 @@ export class CurrentThemeColorChangeAfterEventSignal {
1725
1787
  * @remarks
1726
1788
  * This function can't be called in read-only mode.
1727
1789
  *
1790
+ * This function can be called in early-execution mode.
1791
+ *
1728
1792
  */
1729
1793
  subscribe(
1730
1794
  callback: (arg: CurrentThemeColorChangeAfterEvent) => void,
@@ -1733,6 +1797,8 @@ export class CurrentThemeColorChangeAfterEventSignal {
1733
1797
  * @remarks
1734
1798
  * This function can't be called in read-only mode.
1735
1799
  *
1800
+ * This function can be called in early-execution mode.
1801
+ *
1736
1802
  */
1737
1803
  unsubscribe(callback: (arg: CurrentThemeColorChangeAfterEvent) => void): void;
1738
1804
  }
@@ -1899,6 +1965,8 @@ export class CursorAttachmentPropertyChangeAfterEventSignal {
1899
1965
  * @remarks
1900
1966
  * This function can't be called in read-only mode.
1901
1967
  *
1968
+ * This function can be called in early-execution mode.
1969
+ *
1902
1970
  */
1903
1971
  subscribe(
1904
1972
  callback: (arg: CursorAttachmentPropertiesChangeAfterEvent) => void,
@@ -1907,6 +1975,8 @@ export class CursorAttachmentPropertyChangeAfterEventSignal {
1907
1975
  * @remarks
1908
1976
  * This function can't be called in read-only mode.
1909
1977
  *
1978
+ * This function can be called in early-execution mode.
1979
+ *
1910
1980
  */
1911
1981
  unsubscribe(callback: (arg: CursorAttachmentPropertiesChangeAfterEvent) => void): void;
1912
1982
  }
@@ -1922,6 +1992,8 @@ export class CursorPropertyChangeAfterEventSignal {
1922
1992
  * @remarks
1923
1993
  * This function can't be called in read-only mode.
1924
1994
  *
1995
+ * This function can be called in early-execution mode.
1996
+ *
1925
1997
  */
1926
1998
  subscribe(
1927
1999
  callback: (arg: CursorPropertiesChangeAfterEvent) => void,
@@ -1930,6 +2002,8 @@ export class CursorPropertyChangeAfterEventSignal {
1930
2002
  * @remarks
1931
2003
  * This function can't be called in read-only mode.
1932
2004
  *
2005
+ * This function can be called in early-execution mode.
2006
+ *
1933
2007
  */
1934
2008
  unsubscribe(callback: (arg: CursorPropertiesChangeAfterEvent) => void): void;
1935
2009
  }
@@ -2366,6 +2440,8 @@ export class ModeChangeAfterEventSignal {
2366
2440
  *
2367
2441
  * This function can't be called in read-only mode.
2368
2442
  *
2443
+ * This function can be called in early-execution mode.
2444
+ *
2369
2445
  */
2370
2446
  subscribe(callback: (arg: ModeChangeAfterEvent) => void): (arg: ModeChangeAfterEvent) => void;
2371
2447
  /**
@@ -2375,6 +2451,8 @@ export class ModeChangeAfterEventSignal {
2375
2451
  *
2376
2452
  * This function can't be called in read-only mode.
2377
2453
  *
2454
+ * This function can be called in early-execution mode.
2455
+ *
2378
2456
  */
2379
2457
  unsubscribe(callback: (arg: ModeChangeAfterEvent) => void): void;
2380
2458
  }
@@ -2444,12 +2522,16 @@ export class PrimarySelectionChangeAfterEventSignal {
2444
2522
  * @remarks
2445
2523
  * This function can't be called in read-only mode.
2446
2524
  *
2525
+ * This function can be called in early-execution mode.
2526
+ *
2447
2527
  */
2448
2528
  subscribe(callback: (arg: SelectionEventAfterEvent) => void): (arg: SelectionEventAfterEvent) => void;
2449
2529
  /**
2450
2530
  * @remarks
2451
2531
  * This function can't be called in read-only mode.
2452
2532
  *
2533
+ * This function can be called in early-execution mode.
2534
+ *
2453
2535
  */
2454
2536
  unsubscribe(callback: (arg: SelectionEventAfterEvent) => void): void;
2455
2537
  }
@@ -2841,8 +2923,8 @@ export class ThemeSettings {
2841
2923
  *
2842
2924
  * {@link Error}
2843
2925
  */
2844
- addNewTheme(name: string): void;
2845
- canThemeBeModified(name: string): boolean;
2926
+ addNewTheme(id: string): void;
2927
+ canThemeBeModified(id: string): boolean;
2846
2928
  /**
2847
2929
  * @remarks
2848
2930
  * This function can't be called in read-only mode.
@@ -2851,7 +2933,7 @@ export class ThemeSettings {
2851
2933
  *
2852
2934
  * {@link Error}
2853
2935
  */
2854
- deleteTheme(name: string): void;
2936
+ deleteTheme(id: string): void;
2855
2937
  getCurrentTheme(): string;
2856
2938
  getThemeList(): string[];
2857
2939
  resolveColorKey(key: ThemeSettingsColorKey): minecraftserver.RGBA;
@@ -2863,7 +2945,7 @@ export class ThemeSettings {
2863
2945
  *
2864
2946
  * {@link Error}
2865
2947
  */
2866
- setCurrentTheme(name: string): void;
2948
+ setCurrentTheme(id: string): void;
2867
2949
  /**
2868
2950
  * @remarks
2869
2951
  * This function can't be called in read-only mode.
@@ -2872,7 +2954,7 @@ export class ThemeSettings {
2872
2954
  *
2873
2955
  * {@link Error}
2874
2956
  */
2875
- updateThemeColor(name: string, key: ThemeSettingsColorKey, newColor: minecraftserver.RGBA): void;
2957
+ updateThemeColor(id: string, key: ThemeSettingsColorKey, newColor: minecraftserver.RGBA): void;
2876
2958
  }
2877
2959
 
2878
2960
  /**
@@ -6082,13 +6164,7 @@ export interface ISimpleToolStatusBarOptions {
6082
6164
  * status bar container
6083
6165
  *
6084
6166
  */
6085
- alignment: EditorStatusBarAlignment;
6086
- /**
6087
- * @remarks
6088
- * The text for the status bar item
6089
- *
6090
- */
6091
- displayAltText: string;
6167
+ alignment: StatusBarAlignment;
6092
6168
  onFinalize?: (statusBar: ISimpleToolStatusBarComponent) => void;
6093
6169
  onHide?: (statusBar: ISimpleToolStatusBarComponent) => void;
6094
6170
  onShow?: (statusBar: ISimpleToolStatusBarComponent) => void;
@@ -6100,6 +6176,12 @@ export interface ISimpleToolStatusBarOptions {
6100
6176
  *
6101
6177
  */
6102
6178
  size: number;
6179
+ /**
6180
+ * @remarks
6181
+ * The text for the status bar item
6182
+ *
6183
+ */
6184
+ text: LocalizedString;
6103
6185
  /**
6104
6186
  * @remarks
6105
6187
  * Determine the status bar visibility based on the existence
@@ -6109,6 +6191,28 @@ export interface ISimpleToolStatusBarOptions {
6109
6191
  visibility?: SimpleToolStatusBarVisibility;
6110
6192
  }
6111
6193
 
6194
+ /**
6195
+ * Manager and container for IStatusBarItem objects
6196
+ */
6197
+ export interface IStatusBar {
6198
+ /**
6199
+ * @remarks
6200
+ * Create a item in status bar
6201
+ *
6202
+ * @param props
6203
+ * Properties to create status bar item
6204
+ */
6205
+ createItem(props: IStatusBarItemCreationParams): IStatusBarItem;
6206
+ /**
6207
+ * @remarks
6208
+ * Remove an existing status bar item
6209
+ *
6210
+ * @param id
6211
+ * Status bar item identifier
6212
+ */
6213
+ removeItem(id: string): void;
6214
+ }
6215
+
6112
6216
  export interface IStatusBarItem {
6113
6217
  /**
6114
6218
  * @remarks
@@ -6116,14 +6220,50 @@ export interface IStatusBarItem {
6116
6220
  *
6117
6221
  */
6118
6222
  readonly id: string;
6223
+ getText(): LocalizedString;
6224
+ hide(): void;
6225
+ setText(text: LocalizedString): void;
6226
+ show(): void;
6227
+ }
6228
+
6229
+ /**
6230
+ * Properties required to create a status bar item
6231
+ */
6232
+ export interface IStatusBarItemCreationParams {
6119
6233
  /**
6120
6234
  * @remarks
6121
- * Text to display.
6235
+ * Alignment of item within status bar. If undefined, it will
6236
+ * be left aligned.
6122
6237
  *
6123
6238
  */
6124
- text: string;
6125
- hide(): void;
6126
- show(): void;
6239
+ alignment?: StatusBarAlignment;
6240
+ /**
6241
+ * @remarks
6242
+ * Optional icon image resource of the item.
6243
+ *
6244
+ */
6245
+ icon?: string;
6246
+ /**
6247
+ * @remarks
6248
+ * Size of the status bar item. If undefined, it will wrap text
6249
+ * content.
6250
+ *
6251
+ */
6252
+ size?: number;
6253
+ /**
6254
+ * @remarks
6255
+ * Default localized display text of the item. If undefined, it
6256
+ * will be empty string.
6257
+ *
6258
+ */
6259
+ text?: LocalizedString;
6260
+ /**
6261
+ * @remarks
6262
+ * Default visibility of the item. If undefined, it will be
6263
+ * true.
6264
+ *
6265
+ */
6266
+ visible?: boolean;
6127
6267
  }
6128
6268
 
6129
6269
  /**
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.21",
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.21"
18
18
  },
19
19
  "license": "MIT"
20
20
  }