@minecraft/server-editor 0.1.0-beta.1.21.70-preview.24 → 0.1.0-beta.1.21.70-preview.25

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 +109 -101
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -119,6 +119,7 @@ export declare enum CoreActionBarItemType {
119
119
  Export = 'editor:actionBarItem:export',
120
120
  Locate = 'editor:actionBarItem:locate',
121
121
  Playtest = 'editor:actionBarItem:playtest',
122
+ Realms = 'editor:actionBarItem:realms',
122
123
  Redo = 'editor:actionBarItem:redo',
123
124
  Settings = 'editor:actionBarItem:settings',
124
125
  Undo = 'editor:actionBarItem:undo',
@@ -1030,6 +1031,7 @@ export declare enum PropertyItemType {
1030
1031
  ButtonPane = 'editorUI:ButtonPane',
1031
1032
  ColorPicker = 'editorUI:ColorPicker',
1032
1033
  ComboBox = 'editorUI:ComboBox',
1034
+ DataTable = 'editorUI:DataTable',
1033
1035
  Divider = 'editorUI:Divider',
1034
1036
  Dropdown = 'editorUI:Dropdown',
1035
1037
  Image = 'editorUI:Image',
@@ -1038,7 +1040,6 @@ export declare enum PropertyItemType {
1038
1040
  ProgressIndicator = 'editorUI:ProgressIndicator',
1039
1041
  String = 'editorUI:String',
1040
1042
  SubPane = 'editorUI:SubPane',
1041
- Table = 'editorUI:Table',
1042
1043
  Text = 'editorUI:Text',
1043
1044
  ToggleGroup = 'editorUI:ToggleGroup',
1044
1045
  Vector3 = 'editorUI:Vector3',
@@ -1211,13 +1212,6 @@ export type GraphicsSettingsPropertyTypeMap = {
1211
1212
  [GraphicsSettingsProperty.NightVision]?: boolean;
1212
1213
  };
1213
1214
 
1214
- /**
1215
- * A property item which supports BlockList properties
1216
- */
1217
- export type IBlockListPropertyItem<T extends PropertyBag, Prop extends keyof T & string> = IPropertyItem<T, Prop> & {
1218
- updateBlockList(newBlockList: string[]): void;
1219
- };
1220
-
1221
1215
  /**
1222
1216
  * A property item which supports Dropdown properties
1223
1217
  */
@@ -1276,15 +1270,6 @@ export type IPlayerUISession<PerPlayerStorage = Record<string, never>> = {
1276
1270
  scratchStorage: PerPlayerStorage | undefined;
1277
1271
  };
1278
1272
 
1279
- /**
1280
- * A property item which supports Table properties
1281
- */
1282
- export type ITablePropertyItem<T extends PropertyBag, Prop extends keyof T & string> = IPropertyItem<T, Prop> & {
1283
- updateCell(dataCell: IPropertyTableCellItem, row: number, column: number): void;
1284
- updateRow(dataRow: IPropertyTableCellItem[], row: number): void;
1285
- updateTable(newData: IPropertyTableCellItem[][]): void;
1286
- };
1287
-
1288
1273
  /**
1289
1274
  * A property item which supports Vector3 properties
1290
1275
  */
@@ -1511,6 +1496,14 @@ export declare class BedrockEventSubscriptionCache {
1511
1496
  teardown(): void;
1512
1497
  }
1513
1498
 
1499
+ /**
1500
+ * Validates observable objects that support string list as
1501
+ * BlockType
1502
+ */
1503
+ export declare class BlockIdentifierListObservableValidator implements ObservableValidator<string[]> {
1504
+ validate(newValue: string[]): string[];
1505
+ }
1506
+
1514
1507
  /**
1515
1508
  * Validates observable objects that support string as
1516
1509
  * BlockType
@@ -2497,8 +2490,6 @@ export class GraphicsSettings {
2497
2490
  * @remarks
2498
2491
  * Retrieves a graphics settings property value.
2499
2492
  *
2500
- * This function can't be called in read-only mode.
2501
- *
2502
2493
  * @param property
2503
2494
  * Property identifier.
2504
2495
  * @returns
@@ -2510,8 +2501,6 @@ export class GraphicsSettings {
2510
2501
  * @remarks
2511
2502
  * Retrieves all graphics settings properties and their values.
2512
2503
  *
2513
- * This function can't be called in read-only mode.
2514
- *
2515
2504
  * @returns
2516
2505
  * Returns a property value map for all available properties.
2517
2506
  */
@@ -2786,11 +2775,6 @@ export class PrimarySelectionChangedEvent {
2786
2775
 
2787
2776
  // @ts-ignore Class inheritance allowed for native defined classes
2788
2777
  export class ProbabilityBlockPaletteItem extends IBlockPaletteItem {
2789
- /**
2790
- * @remarks
2791
- * This function can't be called in read-only mode.
2792
- *
2793
- */
2794
2778
  constructor(displayName?: string);
2795
2779
  /**
2796
2780
  * @remarks
@@ -3084,11 +3068,6 @@ export class SettingsUIElement {
3084
3068
  readonly name: string;
3085
3069
  readonly onChange: (arg0: boolean | number | string | minecraftserver.Vector3) => void;
3086
3070
  readonly options: SettingsUIElementOptions;
3087
- /**
3088
- * @remarks
3089
- * This function can't be called in read-only mode.
3090
- *
3091
- */
3092
3071
  constructor(
3093
3072
  name: string,
3094
3073
  initialValue: boolean | number | string | minecraftserver.Vector3,
@@ -3099,11 +3078,6 @@ export class SettingsUIElement {
3099
3078
 
3100
3079
  // @ts-ignore Class inheritance allowed for native defined classes
3101
3080
  export class SimpleBlockPaletteItem extends IBlockPaletteItem {
3102
- /**
3103
- * @remarks
3104
- * This function can't be called in read-only mode.
3105
- *
3106
- */
3107
3081
  constructor(displayName?: string);
3108
3082
  }
3109
3083
 
@@ -3174,17 +3148,7 @@ export class SimulationState {
3174
3148
 
3175
3149
  export class SpeedSettings {
3176
3150
  private constructor();
3177
- /**
3178
- * @remarks
3179
- * This function can't be called in read-only mode.
3180
- *
3181
- */
3182
3151
  get<T extends keyof SpeedSettingsPropertyTypeMap>(property: T): SpeedSettingsPropertyTypeMap[T] | undefined;
3183
- /**
3184
- * @remarks
3185
- * This function can't be called in read-only mode.
3186
- *
3187
- */
3188
3152
  getAll(): SpeedSettingsPropertyTypeMap;
3189
3153
  /**
3190
3154
  * @remarks
@@ -3931,11 +3895,6 @@ export class WidgetComponentRenderPrimitiveTypeAxialSphere extends WidgetCompone
3931
3895
  *
3932
3896
  */
3933
3897
  radius: number;
3934
- /**
3935
- * @remarks
3936
- * This function can't be called in read-only mode.
3937
- *
3938
- */
3939
3898
  constructor(center: minecraftserver.Vector3, radius: number, color?: minecraftserver.RGBA);
3940
3899
  }
3941
3900
 
@@ -3964,11 +3923,6 @@ export class WidgetComponentRenderPrimitiveTypeBox extends WidgetComponentRender
3964
3923
  *
3965
3924
  */
3966
3925
  size?: minecraftserver.Vector3;
3967
- /**
3968
- * @remarks
3969
- * This function can't be called in read-only mode.
3970
- *
3971
- */
3972
3926
  constructor(center: minecraftserver.Vector3, color: minecraftserver.RGBA, size?: minecraftserver.Vector3);
3973
3927
  }
3974
3928
 
@@ -3992,11 +3946,6 @@ export class WidgetComponentRenderPrimitiveTypeDisc extends WidgetComponentRende
3992
3946
  *
3993
3947
  */
3994
3948
  radius: number;
3995
- /**
3996
- * @remarks
3997
- * This function can't be called in read-only mode.
3998
- *
3999
- */
4000
3949
  constructor(center: minecraftserver.Vector3, radius: number, color: minecraftserver.RGBA);
4001
3950
  }
4002
3951
 
@@ -4020,11 +3969,6 @@ export class WidgetComponentRenderPrimitiveTypeLine extends WidgetComponentRende
4020
3969
  *
4021
3970
  */
4022
3971
  start: minecraftserver.Vector3;
4023
- /**
4024
- * @remarks
4025
- * This function can't be called in read-only mode.
4026
- *
4027
- */
4028
3972
  constructor(start: minecraftserver.Vector3, end: minecraftserver.Vector3, color: minecraftserver.RGBA);
4029
3973
  }
4030
3974
 
@@ -4622,6 +4566,32 @@ export interface IActionBarItemCreationParams {
4622
4566
  tooltipTitle?: string;
4623
4567
  }
4624
4568
 
4569
+ /**
4570
+ * A property item which supports block list properties
4571
+ */
4572
+ // @ts-ignore Class inheritance allowed for native defined classes
4573
+ export interface IBlockListPropertyItem extends IPropertyItemBase {
4574
+ /**
4575
+ * @remarks
4576
+ * Current value of the property item.
4577
+ *
4578
+ */
4579
+ readonly value: ReadonlyArray<string>;
4580
+ }
4581
+
4582
+ /**
4583
+ * Optional properties for Bool property item
4584
+ */
4585
+ // @ts-ignore Class inheritance allowed for native defined classes
4586
+ export interface IBlockListPropertyItemOptions extends IPropertyItemOptionsBase {
4587
+ /**
4588
+ * @remarks
4589
+ * This callback is called when UI control value is changed.
4590
+ *
4591
+ */
4592
+ onChange?: (newValue: ReadonlyArray<string>, oldValue: ReadonlyArray<string>) => void;
4593
+ }
4594
+
4625
4595
  /**
4626
4596
  * Block Table Entry info for block table property item
4627
4597
  */
@@ -4723,7 +4693,7 @@ export interface IBlockTablePropertyItemOptions extends IPropertyItemOptionsBase
4723
4693
  }
4724
4694
 
4725
4695
  /**
4726
- * A property item which supports Vector3 properties
4696
+ * A property item which supports boolean properties
4727
4697
  */
4728
4698
  // @ts-ignore Class inheritance allowed for native defined classes
4729
4699
  export interface IBoolPropertyItem extends IPropertyItemBase {
@@ -5059,6 +5029,71 @@ export interface IComboBoxPropertyItemOptions extends IPropertyItemOptionsBase {
5059
5029
  tooltip?: LocalizedString;
5060
5030
  }
5061
5031
 
5032
+ /**
5033
+ * A property item which supports data entries displayed in a
5034
+ * table
5035
+ */
5036
+ // @ts-ignore Class inheritance allowed for native defined classes
5037
+ export interface IDataTablePropertyItem extends IPropertyItemBase {
5038
+ /**
5039
+ * @remarks
5040
+ * Update table entries
5041
+ *
5042
+ * @param data
5043
+ * New data entries.
5044
+ */
5045
+ updateEntries(data: IDataTablePropertyItemEntry[][]): void;
5046
+ /**
5047
+ * @remarks
5048
+ * Update table cell entry
5049
+ *
5050
+ * @param data
5051
+ * New data entry.
5052
+ * @param row
5053
+ * Cell row index.
5054
+ * @param column
5055
+ * Cell column index.
5056
+ */
5057
+ updateEntry(data: IDataTablePropertyItemEntry, row: number, column: number): void;
5058
+ /**
5059
+ * @remarks
5060
+ * Update table row entries
5061
+ *
5062
+ * @param data
5063
+ * New data entries.
5064
+ * @param row
5065
+ * Cell row index.
5066
+ */
5067
+ updateRow(data: IDataTablePropertyItemEntry[], row: number): void;
5068
+ }
5069
+
5070
+ /**
5071
+ * Properties of data table property item menu entry
5072
+ */
5073
+ export interface IDataTablePropertyItemEntry {
5074
+ image?: ImageResourceData;
5075
+ text?: LocalizedString;
5076
+ }
5077
+
5078
+ /**
5079
+ * Properties of data table item
5080
+ */
5081
+ // @ts-ignore Class inheritance allowed for native defined classes
5082
+ export interface IDataTablePropertyItemOptions extends IPropertyItemOptionsBase {
5083
+ /**
5084
+ * @remarks
5085
+ * List of default data table entries
5086
+ *
5087
+ */
5088
+ entries?: IDataTablePropertyItemEntry[][];
5089
+ /**
5090
+ * @remarks
5091
+ * Localized title of the property item.
5092
+ *
5093
+ */
5094
+ title?: LocalizedString;
5095
+ }
5096
+
5062
5097
  /**
5063
5098
  * Simple abstraction for disposable objects.
5064
5099
  */
@@ -5916,11 +5951,6 @@ export interface IPropertyItemOptionsBase {
5916
5951
  visible?: boolean;
5917
5952
  }
5918
5953
 
5919
- // @ts-ignore Class inheritance allowed for native defined classes
5920
- export interface IPropertyItemOptionsBlockList extends IPropertyItemOptions {
5921
- blockList: string[];
5922
- }
5923
-
5924
5954
  // @ts-ignore Class inheritance allowed for native defined classes
5925
5955
  export interface IPropertyItemOptionsBool extends IPropertyItemOptions {
5926
5956
  /**
@@ -5986,12 +6016,6 @@ export interface IPropertyItemOptionsSubPane extends IPropertyItemOptions {
5986
6016
  pane: IPropertyPane;
5987
6017
  }
5988
6018
 
5989
- // @ts-ignore Class inheritance allowed for native defined classes
5990
- export interface IPropertyItemOptionsTable extends IPropertyItemOptions {
5991
- defaultData: IPropertyTableCellItem[][];
5992
- titleId?: string;
5993
- }
5994
-
5995
6019
  // @ts-ignore Class inheritance allowed for native defined classes
5996
6020
  export interface IPropertyItemOptionsVector3 extends IPropertyItemOptions {
5997
6021
  /**
@@ -6062,12 +6086,7 @@ export interface IPropertyPane extends IPane {
6062
6086
  * Adds a block list to the pane.
6063
6087
  *
6064
6088
  */
6065
- addBlockList(options?: IPropertyItemOptionsBlockList): IBlockListPropertyItem<
6066
- {
6067
- EMPTY: undefined;
6068
- },
6069
- 'EMPTY'
6070
- >;
6089
+ addBlockList(value: IObservableProp<string[]>, options?: IBlockListPropertyItemOptions): IBlockListPropertyItem;
6071
6090
  /**
6072
6091
  * @remarks
6073
6092
  * Adds a block table to the pane.
@@ -6131,6 +6150,12 @@ export interface IPropertyPane extends IPane {
6131
6150
  *
6132
6151
  */
6133
6152
  addComboBox(value: IObservableProp<string>, options?: IComboBoxPropertyItemOptions): IComboBoxPropertyItem;
6153
+ /**
6154
+ * @remarks
6155
+ * Adds a data table to the pane.
6156
+ *
6157
+ */
6158
+ addDataTable(options?: IDataTablePropertyItemOptions): IDataTablePropertyItem;
6134
6159
  /**
6135
6160
  * @remarks
6136
6161
  * Adds an divider item to the pane.
@@ -6211,17 +6236,6 @@ export interface IPropertyPane extends IPane {
6211
6236
  property: Prop,
6212
6237
  options?: IPropertyItemOptions,
6213
6238
  ): IPropertyItem<T, Prop>;
6214
- /**
6215
- * @remarks
6216
- * Adds a table to the pane.
6217
- *
6218
- */
6219
- addTable(options?: IPropertyItemOptionsTable): ITablePropertyItem<
6220
- {
6221
- EMPTY: undefined;
6222
- },
6223
- 'EMPTY'
6224
- >;
6225
6239
  /**
6226
6240
  * @remarks
6227
6241
  * Adds a multiline Text item to the pane.
@@ -6300,12 +6314,6 @@ export interface IPropertyPaneOptions {
6300
6314
  title?: LocalizedString;
6301
6315
  }
6302
6316
 
6303
- export interface IPropertyTableCellItem {
6304
- block?: string;
6305
- icon?: string;
6306
- text?: string;
6307
- }
6308
-
6309
6317
  /**
6310
6318
  * Key binding that is registered to an input context
6311
6319
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server-editor",
3
- "version": "0.1.0-beta.1.21.70-preview.24",
3
+ "version": "0.1.0-beta.1.21.70-preview.25",
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": "^2.0.0-beta.1.21.70-preview.24"
17
+ "@minecraft/server": "^2.0.0-beta.1.21.70-preview.25"
18
18
  },
19
19
  "license": "MIT"
20
20
  }