@minecraft/server-editor 0.1.0-beta.1.21.70-preview.23 → 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 +154 -60
  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
@@ -1518,7 +1511,7 @@ export declare class BedrockEventSubscriptionCache {
1518
1511
  export declare class BlockIdentifierObservableValidator implements ObservableValidator<string> {
1519
1512
  /**
1520
1513
  * @remarks
1521
- * This property can't be edited in read-only mode.
1514
+ * This property can't be used in read-only mode.
1522
1515
  *
1523
1516
  */
1524
1517
  protected _defaultValue: string;
@@ -2262,7 +2255,7 @@ export class EditorStructureManager {
2262
2255
  export declare class EntityIdentifierObservableValidator implements ObservableValidator<string> {
2263
2256
  /**
2264
2257
  * @remarks
2265
- * This property can't be edited in read-only mode.
2258
+ * This property can't be used in read-only mode.
2266
2259
  *
2267
2260
  */
2268
2261
  protected _defaultValue: string;
@@ -2446,17 +2439,44 @@ export class ExtensionContext {
2446
2439
  */
2447
2440
  export class ExtensionContextAfterEvents {
2448
2441
  private constructor();
2442
+ /**
2443
+ * @remarks
2444
+ * This property can be read in early-execution mode.
2445
+ *
2446
+ */
2449
2447
  readonly clipboardChange: ClipboardChangeAfterEventSignal;
2448
+ /**
2449
+ * @remarks
2450
+ * This property can be read in early-execution mode.
2451
+ *
2452
+ */
2450
2453
  readonly currentThemeChange: CurrentThemeChangeAfterEventSignal;
2454
+ /**
2455
+ * @remarks
2456
+ * This property can be read in early-execution mode.
2457
+ *
2458
+ */
2451
2459
  readonly currentThemeColorChange: CurrentThemeColorChangeAfterEventSignal;
2460
+ /**
2461
+ * @remarks
2462
+ * This property can be read in early-execution mode.
2463
+ *
2464
+ */
2452
2465
  readonly cursorPropertyChange: CursorPropertyChangeAfterEventSignal;
2453
2466
  /**
2454
2467
  * @remarks
2455
2468
  * This event triggers when the editor mode changes for the
2456
2469
  * player.
2457
2470
  *
2471
+ * This property can be read in early-execution mode.
2472
+ *
2458
2473
  */
2459
2474
  readonly modeChange: ModeChangeAfterEventSignal;
2475
+ /**
2476
+ * @remarks
2477
+ * This property can be read in early-execution mode.
2478
+ *
2479
+ */
2460
2480
  readonly primarySelectionChange: PrimarySelectionChangeAfterEventSignal;
2461
2481
  }
2462
2482
 
@@ -2489,6 +2509,8 @@ export class GraphicsSettings {
2489
2509
  * @remarks
2490
2510
  * Modifies a graphics settings property value.
2491
2511
  *
2512
+ * This function can't be called in read-only mode.
2513
+ *
2492
2514
  * @param property
2493
2515
  * Property identifier.
2494
2516
  * @param value
@@ -2500,6 +2522,8 @@ export class GraphicsSettings {
2500
2522
  * @remarks
2501
2523
  * Modify multiple graphics settings properties.
2502
2524
  *
2525
+ * This function can't be called in read-only mode.
2526
+ *
2503
2527
  * @param properties
2504
2528
  * Property map to set available property values. If the
2505
2529
  * property is not defined in the map, it will not be modified.
@@ -2672,19 +2696,19 @@ export class ModeChangeAfterEventSignal {
2672
2696
  export declare class NumberLimitObservableValidator implements ObservableValidator<number> {
2673
2697
  /**
2674
2698
  * @remarks
2675
- * This property can't be edited in read-only mode.
2699
+ * This property can't be used in read-only mode.
2676
2700
  *
2677
2701
  */
2678
2702
  protected _isInteger?: boolean;
2679
2703
  /**
2680
2704
  * @remarks
2681
- * This property can't be edited in read-only mode.
2705
+ * This property can't be used in read-only mode.
2682
2706
  *
2683
2707
  */
2684
2708
  protected _max?: number;
2685
2709
  /**
2686
2710
  * @remarks
2687
- * This property can't be edited in read-only mode.
2711
+ * This property can't be used in read-only mode.
2688
2712
  *
2689
2713
  */
2690
2714
  protected _min?: number;
@@ -3127,10 +3151,16 @@ export class SpeedSettings {
3127
3151
  get<T extends keyof SpeedSettingsPropertyTypeMap>(property: T): SpeedSettingsPropertyTypeMap[T] | undefined;
3128
3152
  getAll(): SpeedSettingsPropertyTypeMap;
3129
3153
  /**
3154
+ * @remarks
3155
+ * This function can't be called in read-only mode.
3156
+ *
3130
3157
  * @throws This function can throw errors.
3131
3158
  */
3132
3159
  set<T extends keyof SpeedSettingsPropertyTypeMap>(property: T, value: SpeedSettingsPropertyTypeMap[T]): void;
3133
3160
  /**
3161
+ * @remarks
3162
+ * This function can't be called in read-only mode.
3163
+ *
3134
3164
  * @throws This function can throw errors.
3135
3165
  */
3136
3166
  setAll(properties: SpeedSettingsPropertyTypeMap): void;
@@ -3487,19 +3517,19 @@ export class UserDefinedTransactionHandlerId {
3487
3517
  export declare class Vector3LimitObservableValidator implements ObservableValidator<minecraftserver.Vector3> {
3488
3518
  /**
3489
3519
  * @remarks
3490
- * This property can't be edited in read-only mode.
3520
+ * This property can't be used in read-only mode.
3491
3521
  *
3492
3522
  */
3493
3523
  protected _isInteger?: boolean;
3494
3524
  /**
3495
3525
  * @remarks
3496
- * This property can't be edited in read-only mode.
3526
+ * This property can't be used in read-only mode.
3497
3527
  *
3498
3528
  */
3499
3529
  protected _max: Partial<minecraftserver.Vector3>;
3500
3530
  /**
3501
3531
  * @remarks
3502
- * This property can't be edited in read-only mode.
3532
+ * This property can't be used in read-only mode.
3503
3533
  *
3504
3534
  */
3505
3535
  protected _min: Partial<minecraftserver.Vector3>;
@@ -4536,6 +4566,32 @@ export interface IActionBarItemCreationParams {
4536
4566
  tooltipTitle?: string;
4537
4567
  }
4538
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
+
4539
4595
  /**
4540
4596
  * Block Table Entry info for block table property item
4541
4597
  */
@@ -4637,7 +4693,7 @@ export interface IBlockTablePropertyItemOptions extends IPropertyItemOptionsBase
4637
4693
  }
4638
4694
 
4639
4695
  /**
4640
- * A property item which supports Vector3 properties
4696
+ * A property item which supports boolean properties
4641
4697
  */
4642
4698
  // @ts-ignore Class inheritance allowed for native defined classes
4643
4699
  export interface IBoolPropertyItem extends IPropertyItemBase {
@@ -4973,6 +5029,71 @@ export interface IComboBoxPropertyItemOptions extends IPropertyItemOptionsBase {
4973
5029
  tooltip?: LocalizedString;
4974
5030
  }
4975
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
+
4976
5097
  /**
4977
5098
  * Simple abstraction for disposable objects.
4978
5099
  */
@@ -5830,11 +5951,6 @@ export interface IPropertyItemOptionsBase {
5830
5951
  visible?: boolean;
5831
5952
  }
5832
5953
 
5833
- // @ts-ignore Class inheritance allowed for native defined classes
5834
- export interface IPropertyItemOptionsBlockList extends IPropertyItemOptions {
5835
- blockList: string[];
5836
- }
5837
-
5838
5954
  // @ts-ignore Class inheritance allowed for native defined classes
5839
5955
  export interface IPropertyItemOptionsBool extends IPropertyItemOptions {
5840
5956
  /**
@@ -5900,12 +6016,6 @@ export interface IPropertyItemOptionsSubPane extends IPropertyItemOptions {
5900
6016
  pane: IPropertyPane;
5901
6017
  }
5902
6018
 
5903
- // @ts-ignore Class inheritance allowed for native defined classes
5904
- export interface IPropertyItemOptionsTable extends IPropertyItemOptions {
5905
- defaultData: IPropertyTableCellItem[][];
5906
- titleId?: string;
5907
- }
5908
-
5909
6019
  // @ts-ignore Class inheritance allowed for native defined classes
5910
6020
  export interface IPropertyItemOptionsVector3 extends IPropertyItemOptions {
5911
6021
  /**
@@ -5976,12 +6086,7 @@ export interface IPropertyPane extends IPane {
5976
6086
  * Adds a block list to the pane.
5977
6087
  *
5978
6088
  */
5979
- addBlockList(options?: IPropertyItemOptionsBlockList): IBlockListPropertyItem<
5980
- {
5981
- EMPTY: undefined;
5982
- },
5983
- 'EMPTY'
5984
- >;
6089
+ addBlockList(value: IObservableProp<string[]>, options?: IBlockListPropertyItemOptions): IBlockListPropertyItem;
5985
6090
  /**
5986
6091
  * @remarks
5987
6092
  * Adds a block table to the pane.
@@ -6045,6 +6150,12 @@ export interface IPropertyPane extends IPane {
6045
6150
  *
6046
6151
  */
6047
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;
6048
6159
  /**
6049
6160
  * @remarks
6050
6161
  * Adds an divider item to the pane.
@@ -6125,17 +6236,6 @@ export interface IPropertyPane extends IPane {
6125
6236
  property: Prop,
6126
6237
  options?: IPropertyItemOptions,
6127
6238
  ): IPropertyItem<T, Prop>;
6128
- /**
6129
- * @remarks
6130
- * Adds a table to the pane.
6131
- *
6132
- */
6133
- addTable(options?: IPropertyItemOptionsTable): ITablePropertyItem<
6134
- {
6135
- EMPTY: undefined;
6136
- },
6137
- 'EMPTY'
6138
- >;
6139
6239
  /**
6140
6240
  * @remarks
6141
6241
  * Adds a multiline Text item to the pane.
@@ -6214,12 +6314,6 @@ export interface IPropertyPaneOptions {
6214
6314
  title?: LocalizedString;
6215
6315
  }
6216
6316
 
6217
- export interface IPropertyTableCellItem {
6218
- block?: string;
6219
- icon?: string;
6220
- text?: string;
6221
- }
6222
-
6223
6317
  /**
6224
6318
  * Key binding that is registered to an input context
6225
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.23",
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.23"
17
+ "@minecraft/server": "^2.0.0-beta.1.21.70-preview.25"
18
18
  },
19
19
  "license": "MIT"
20
20
  }