@minecraft/server-editor 0.1.0-beta.1.21.20-preview.21 → 0.1.0-beta.1.21.20-preview.23

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 +1087 -189
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -36,11 +36,29 @@ export enum BlockPaletteItemType {
36
36
  Probability = 1,
37
37
  }
38
38
 
39
+ /**
40
+ * The possible variants of a bool.
41
+ */
42
+ export declare enum BoolPropertyItemVariant {
43
+ Checkbox = 0,
44
+ ToggleSwitch = 1,
45
+ }
46
+
39
47
  export enum BrushPipelineOperationType {
40
48
  Include = 0,
41
49
  Exclude = 1,
42
50
  }
43
51
 
52
+ /**
53
+ * The possible variants of a Button property item.
54
+ */
55
+ export declare enum ButtonPropertyItemVariant {
56
+ Primary = 0,
57
+ Secondary = 1,
58
+ Confirmation = 2,
59
+ Destructive = 3,
60
+ }
61
+
44
62
  /**
45
63
  * The possible variants of a color picker.
46
64
  */
@@ -143,26 +161,6 @@ export enum DaylightCycle {
143
161
  LockTime = 2,
144
162
  }
145
163
 
146
- /**
147
- * Type of item that can be added to the property pane
148
- */
149
- export declare enum EDITOR_PANE_PROPERTY_ITEM_TYPE {
150
- Action = 'editorUI:Action',
151
- BlockList = 'editorUI:BlockList',
152
- BlockPicker = 'editorUI:BlockPicker',
153
- Boolean = 'editorUI:Boolean',
154
- ColorPicker = 'editorUI:ColorPicker',
155
- Divider = 'editorUI:Divider',
156
- Dropdown = 'editorUI:Dropdown',
157
- Image = 'editorUI:Image',
158
- Number = 'editorUI:Number',
159
- String = 'editorUI:String',
160
- SubPane = 'editorUI:SubPane',
161
- Table = 'editorUI:Table',
162
- Text = 'editorUI:Text',
163
- Vec3 = 'editorUI:Vec3',
164
- }
165
-
166
164
  /**
167
165
  * Global editor input contexts
168
166
  */
@@ -196,6 +194,11 @@ export declare enum EditorStatusBarAlignment {
196
194
  Left = 1,
197
195
  }
198
196
 
197
+ export enum EntityOperationType {
198
+ Create = 0,
199
+ Delete = 1,
200
+ }
201
+
199
202
  export enum ExportResult {
200
203
  ValidWorldExport = 0,
201
204
  LevelFetchFailed = 1,
@@ -229,6 +232,15 @@ export enum GraphicsSettingsProperty {
229
232
  ShowInvisibleBlocks = 'ShowInvisibleBlocks',
230
233
  }
231
234
 
235
+ /**
236
+ * Supported image types.
237
+ */
238
+ export declare enum ImageResourceType {
239
+ Default = 0,
240
+ Block = 1,
241
+ Icon = 2,
242
+ }
243
+
232
244
  /**
233
245
  * Input modifier flags to create chorded bindings
234
246
  */
@@ -246,100 +258,569 @@ export declare enum InputModifier {
246
258
  */
247
259
  export declare enum KeyboardKey {
248
260
  UNDEFINED = 0,
261
+ /**
262
+ * @remarks
263
+ * KeyboardEvent.DOM_VK_BACK_SPACE
264
+ *
265
+ */
249
266
  BACKSPACE = 8,
267
+ /**
268
+ * @remarks
269
+ * KeyboardEvent.DOM_VK_TAB
270
+ *
271
+ */
250
272
  TAB = 9,
273
+ /**
274
+ * @remarks
275
+ * KeyboardEvent.DOM_VK_RETURN
276
+ *
277
+ */
251
278
  ENTER = 13,
279
+ /**
280
+ * @remarks
281
+ * KeyboardEvent.DOM_VK_SHIFT
282
+ *
283
+ */
252
284
  SHIFT = 16,
285
+ /**
286
+ * @remarks
287
+ * KeyboardEvent.DOM_VK_CONTROL
288
+ *
289
+ */
253
290
  CTRL = 17,
291
+ /**
292
+ * @remarks
293
+ * KeyboardEvent.DOM_VK_ALT
294
+ *
295
+ */
254
296
  ALT = 18,
297
+ /**
298
+ * @remarks
299
+ * KeyboardEvent.DOM_VK_CAPS_LOCK
300
+ *
301
+ */
255
302
  CAPS_LOCK = 20,
303
+ /**
304
+ * @remarks
305
+ * KeyboardEvent.DOM_VK_ESCAPE
306
+ *
307
+ */
256
308
  ESCAPE = 27,
309
+ /**
310
+ * @remarks
311
+ * KeyboardEvent.DOM_VK_SPACE
312
+ *
313
+ */
257
314
  SPACE = 32,
315
+ /**
316
+ * @remarks
317
+ * KeyboardEvent.DOM_VK_PAGE_UP
318
+ *
319
+ */
258
320
  PAGE_UP = 33,
321
+ /**
322
+ * @remarks
323
+ * KeyboardEvent.DOM_VK_PAGE_DOWN
324
+ *
325
+ */
259
326
  PAGE_DOWN = 34,
327
+ /**
328
+ * @remarks
329
+ * KeyboardEvent.DOM_VK_END
330
+ *
331
+ */
260
332
  END = 35,
333
+ /**
334
+ * @remarks
335
+ * KeyboardEvent.DOM_VK_HOME
336
+ *
337
+ */
261
338
  HOME = 36,
339
+ /**
340
+ * @remarks
341
+ * KeyboardEvent.DOM_VK_LEFT
342
+ *
343
+ */
262
344
  LEFT = 37,
345
+ /**
346
+ * @remarks
347
+ * KeyboardEvent.DOM_VK_UP
348
+ *
349
+ */
263
350
  UP = 38,
351
+ /**
352
+ * @remarks
353
+ * KeyboardEvent.DOM_VK_RIGHT
354
+ *
355
+ */
264
356
  RIGHT = 39,
357
+ /**
358
+ * @remarks
359
+ * KeyboardEvent.DOM_VK_DOWN
360
+ *
361
+ */
265
362
  DOWN = 40,
363
+ /**
364
+ * @remarks
365
+ * KeyboardEvent.DOM_VK_PRINTSCREEN
366
+ *
367
+ */
266
368
  PRINT_SCREEN = 44,
369
+ /**
370
+ * @remarks
371
+ * KeyboardEvent.DOM_VK_INSERT
372
+ *
373
+ */
267
374
  INSERT = 45,
375
+ /**
376
+ * @remarks
377
+ * KeyboardEvent.DOM_VK_DELETE
378
+ *
379
+ */
268
380
  DELETE = 46,
381
+ /**
382
+ * @remarks
383
+ * KeyboardEvent.DOM_VK_0
384
+ *
385
+ */
269
386
  KEY_0 = 48,
387
+ /**
388
+ * @remarks
389
+ * KeyboardEvent.DOM_VK_1
390
+ *
391
+ */
270
392
  KEY_1 = 49,
393
+ /**
394
+ * @remarks
395
+ * KeyboardEvent.DOM_VK_2
396
+ *
397
+ */
271
398
  KEY_2 = 50,
399
+ /**
400
+ * @remarks
401
+ * KeyboardEvent.DOM_VK_3
402
+ *
403
+ */
272
404
  KEY_3 = 51,
405
+ /**
406
+ * @remarks
407
+ * KeyboardEvent.DOM_VK_4
408
+ *
409
+ */
273
410
  KEY_4 = 52,
411
+ /**
412
+ * @remarks
413
+ * KeyboardEvent.DOM_VK_5
414
+ *
415
+ */
274
416
  KEY_5 = 53,
417
+ /**
418
+ * @remarks
419
+ * KeyboardEvent.DOM_VK_6
420
+ *
421
+ */
275
422
  KEY_6 = 54,
423
+ /**
424
+ * @remarks
425
+ * KeyboardEvent.DOM_VK_7
426
+ *
427
+ */
276
428
  KEY_7 = 55,
429
+ /**
430
+ * @remarks
431
+ * KeyboardEvent.DOM_VK_8
432
+ *
433
+ */
277
434
  KEY_8 = 56,
435
+ /**
436
+ * @remarks
437
+ * KeyboardEvent.DOM_VK_9
438
+ *
439
+ */
278
440
  KEY_9 = 57,
441
+ /**
442
+ * @remarks
443
+ * KeyboardEvent.DOM_VK_A
444
+ *
445
+ */
279
446
  KEY_A = 65,
447
+ /**
448
+ * @remarks
449
+ * KeyboardEvent.DOM_VK_B
450
+ *
451
+ */
280
452
  KEY_B = 66,
453
+ /**
454
+ * @remarks
455
+ * KeyboardEvent.DOM_VK_C
456
+ *
457
+ */
281
458
  KEY_C = 67,
459
+ /**
460
+ * @remarks
461
+ * KeyboardEvent.DOM_VK_D
462
+ *
463
+ */
282
464
  KEY_D = 68,
465
+ /**
466
+ * @remarks
467
+ * KeyboardEvent.DOM_VK_E
468
+ *
469
+ */
283
470
  KEY_E = 69,
471
+ /**
472
+ * @remarks
473
+ * KeyboardEvent.DOM_VK_F
474
+ *
475
+ */
284
476
  KEY_F = 70,
477
+ /**
478
+ * @remarks
479
+ * KeyboardEvent.DOM_VK_G
480
+ *
481
+ */
285
482
  KEY_G = 71,
483
+ /**
484
+ * @remarks
485
+ * KeyboardEvent.DOM_VK_H
486
+ *
487
+ */
286
488
  KEY_H = 72,
489
+ /**
490
+ * @remarks
491
+ * KeyboardEvent.DOM_VK_I
492
+ *
493
+ */
287
494
  KEY_I = 73,
495
+ /**
496
+ * @remarks
497
+ * KeyboardEvent.DOM_VK_J
498
+ *
499
+ */
288
500
  KEY_J = 74,
501
+ /**
502
+ * @remarks
503
+ * KeyboardEvent.DOM_VK_K
504
+ *
505
+ */
289
506
  KEY_K = 75,
507
+ /**
508
+ * @remarks
509
+ * KeyboardEvent.DOM_VK_L
510
+ *
511
+ */
290
512
  KEY_L = 76,
513
+ /**
514
+ * @remarks
515
+ * KeyboardEvent.DOM_VK_M
516
+ *
517
+ */
291
518
  KEY_M = 77,
519
+ /**
520
+ * @remarks
521
+ * KeyboardEvent.DOM_VK_N
522
+ *
523
+ */
292
524
  KEY_N = 78,
525
+ /**
526
+ * @remarks
527
+ * KeyboardEvent.DOM_VK_O
528
+ *
529
+ */
293
530
  KEY_O = 79,
531
+ /**
532
+ * @remarks
533
+ * KeyboardEvent.DOM_VK_P
534
+ *
535
+ */
294
536
  KEY_P = 80,
537
+ /**
538
+ * @remarks
539
+ * KeyboardEvent.DOM_VK_Q
540
+ *
541
+ */
295
542
  KEY_Q = 81,
543
+ /**
544
+ * @remarks
545
+ * KeyboardEvent.DOM_VK_R
546
+ *
547
+ */
296
548
  KEY_R = 82,
549
+ /**
550
+ * @remarks
551
+ * KeyboardEvent.DOM_VK_S
552
+ *
553
+ */
297
554
  KEY_S = 83,
555
+ /**
556
+ * @remarks
557
+ * KeyboardEvent.DOM_VK_T
558
+ *
559
+ */
298
560
  KEY_T = 84,
561
+ /**
562
+ * @remarks
563
+ * KeyboardEvent.DOM_VK_U
564
+ *
565
+ */
299
566
  KEY_U = 85,
567
+ /**
568
+ * @remarks
569
+ * KeyboardEvent.DOM_VK_V
570
+ *
571
+ */
300
572
  KEY_V = 86,
573
+ /**
574
+ * @remarks
575
+ * KeyboardEvent.DOM_VK_W
576
+ *
577
+ */
301
578
  KEY_W = 87,
579
+ /**
580
+ * @remarks
581
+ * KeyboardEvent.DOM_VK_X
582
+ *
583
+ */
302
584
  KEY_X = 88,
585
+ /**
586
+ * @remarks
587
+ * KeyboardEvent.DOM_VK_Y
588
+ *
589
+ */
303
590
  KEY_Y = 89,
591
+ /**
592
+ * @remarks
593
+ * KeyboardEvent.DOM_VK_Z
594
+ *
595
+ */
304
596
  KEY_Z = 90,
597
+ /**
598
+ * @remarks
599
+ * KeyboardEvent.DOM_VK_NUMPAD0
600
+ *
601
+ */
305
602
  NUMPAD_0 = 96,
603
+ /**
604
+ * @remarks
605
+ * KeyboardEvent.DOM_VK_NUMPAD1
606
+ *
607
+ */
306
608
  NUMPAD_1 = 97,
609
+ /**
610
+ * @remarks
611
+ * KeyboardEvent.DOM_VK_NUMPAD2
612
+ *
613
+ */
307
614
  NUMPAD_2 = 98,
615
+ /**
616
+ * @remarks
617
+ * KeyboardEvent.DOM_VK_NUMPAD3
618
+ *
619
+ */
308
620
  NUMPAD_3 = 99,
621
+ /**
622
+ * @remarks
623
+ * KeyboardEvent.DOM_VK_NUMPAD4
624
+ *
625
+ */
309
626
  NUMPAD_4 = 100,
627
+ /**
628
+ * @remarks
629
+ * KeyboardEvent.DOM_VK_NUMPAD5
630
+ *
631
+ */
310
632
  NUMPAD_5 = 101,
633
+ /**
634
+ * @remarks
635
+ * KeyboardEvent.DOM_VK_NUMPAD6
636
+ *
637
+ */
311
638
  NUMPAD_6 = 102,
639
+ /**
640
+ * @remarks
641
+ * KeyboardEvent.DOM_VK_NUMPAD7
642
+ *
643
+ */
312
644
  NUMPAD_7 = 103,
645
+ /**
646
+ * @remarks
647
+ * KeyboardEvent.DOM_VK_NUMPAD8
648
+ *
649
+ */
313
650
  NUMPAD_8 = 104,
651
+ /**
652
+ * @remarks
653
+ * KeyboardEvent.DOM_VK_NUMPAD9
654
+ *
655
+ */
314
656
  NUMPAD_9 = 105,
657
+ /**
658
+ * @remarks
659
+ * KeyboardEvent.DOM_VK_MULTIPLY
660
+ *
661
+ */
315
662
  NUMPAD_MULTIPLY = 106,
663
+ /**
664
+ * @remarks
665
+ * KeyboardEvent.DOM_VK_ADD
666
+ *
667
+ */
316
668
  NUMPAD_ADD = 107,
669
+ /**
670
+ * @remarks
671
+ * KeyboardEvent.DOM_VK_SEPARATOR
672
+ *
673
+ */
317
674
  NUMPAD_SEPARATOR = 108,
675
+ /**
676
+ * @remarks
677
+ * KeyboardEvent.DOM_VK_SUBTRACT
678
+ *
679
+ */
318
680
  NUMPAD_SUBTRACT = 109,
681
+ /**
682
+ * @remarks
683
+ * KeyboardEvent.DOM_VK_DECIMAL
684
+ *
685
+ */
319
686
  NUMPAD_DECIMAL = 110,
687
+ /**
688
+ * @remarks
689
+ * KeyboardEvent.DOM_VK_DIVIDE
690
+ *
691
+ */
320
692
  NUMPAD_DIVIDE = 111,
693
+ /**
694
+ * @remarks
695
+ * KeyboardEvent.DOM_VK_F1
696
+ *
697
+ */
321
698
  F1 = 112,
699
+ /**
700
+ * @remarks
701
+ * KeyboardEvent.DOM_VK_F2
702
+ *
703
+ */
322
704
  F2 = 113,
705
+ /**
706
+ * @remarks
707
+ * KeyboardEvent.DOM_VK_F3
708
+ *
709
+ */
323
710
  F3 = 114,
711
+ /**
712
+ * @remarks
713
+ * KeyboardEvent.DOM_VK_F4
714
+ *
715
+ */
324
716
  F4 = 115,
717
+ /**
718
+ * @remarks
719
+ * KeyboardEvent.DOM_VK_F5
720
+ *
721
+ */
325
722
  F5 = 116,
723
+ /**
724
+ * @remarks
725
+ * KeyboardEvent.DOM_VK_F6
726
+ *
727
+ */
326
728
  F6 = 117,
729
+ /**
730
+ * @remarks
731
+ * KeyboardEvent.DOM_VK_F7
732
+ *
733
+ */
327
734
  F7 = 118,
735
+ /**
736
+ * @remarks
737
+ * KeyboardEvent.DOM_VK_F8
738
+ *
739
+ */
328
740
  F8 = 119,
741
+ /**
742
+ * @remarks
743
+ * KeyboardEvent.DOM_VK_F9
744
+ *
745
+ */
329
746
  F9 = 120,
747
+ /**
748
+ * @remarks
749
+ * KeyboardEvent.DOM_VK_F10
750
+ *
751
+ */
330
752
  F10 = 121,
753
+ /**
754
+ * @remarks
755
+ * KeyboardEvent.DOM_VK_F11
756
+ *
757
+ */
331
758
  F11 = 122,
759
+ /**
760
+ * @remarks
761
+ * KeyboardEvent.DOM_VK_F12
762
+ *
763
+ */
332
764
  F12 = 123,
765
+ /**
766
+ * @remarks
767
+ * KeyboardEvent.DOM_VK_COMMA, ie. ','
768
+ *
769
+ */
333
770
  COMMA = 188,
771
+ /**
772
+ * @remarks
773
+ * KeyboardEvent.DOM_VK_PERIOD, ie. '.'
774
+ *
775
+ */
334
776
  PERIOD = 190,
777
+ /**
778
+ * @remarks
779
+ * KeyboardEvent.DOM_VK_SLASH, ie. '/'
780
+ *
781
+ */
335
782
  SLASH = 191,
783
+ /**
784
+ * @remarks
785
+ * KeyboardEvent.DOM_VK_BACK_QUOTE, ie. '`'
786
+ *
787
+ */
336
788
  BACK_QUOTE = 192,
789
+ /**
790
+ * @remarks
791
+ * KeyboardEvent.DOM_VK_OPEN_BRACKET, ie. '['
792
+ *
793
+ */
337
794
  BRACKET_OPEN = 219,
795
+ /**
796
+ * @remarks
797
+ * KeyboardEvent.DOM_VK_BACK_SLASH, ie. '\'
798
+ *
799
+ */
338
800
  BACK_SLASH = 220,
801
+ /**
802
+ * @remarks
803
+ * KeyboardEvent.DOM_VK_CLOSE_BRACKET, ie. ']'
804
+ *
805
+ */
339
806
  BRACKET_CLOSE = 221,
807
+ /**
808
+ * @remarks
809
+ * KeyboardEvent.DOM_VK_BACK_QUOTE, ie. '"'
810
+ *
811
+ */
340
812
  QUOTE = 222,
341
813
  }
342
814
 
815
+ /**
816
+ * Alignment options for UI elements
817
+ */
818
+ export declare enum LayoutAlignment {
819
+ Left = 0,
820
+ Center = 1,
821
+ Right = 2,
822
+ }
823
+
343
824
  /**
344
825
  * Layout directions for property panes.
345
826
  */
@@ -423,6 +904,26 @@ export enum ProjectExportType {
423
904
  WorldTemplate = 2,
424
905
  }
425
906
 
907
+ /**
908
+ * Type of item that can be added to the property pane
909
+ */
910
+ export declare enum PropertyItemType {
911
+ BlockList = 'editorUI:BlockList',
912
+ BlockPicker = 'editorUI:BlockPicker',
913
+ Boolean = 'editorUI:Boolean',
914
+ Button = 'editorUI:Button',
915
+ ColorPicker = 'editorUI:ColorPicker',
916
+ Divider = 'editorUI:Divider',
917
+ Dropdown = 'editorUI:Dropdown',
918
+ Image = 'editorUI:Image',
919
+ Number = 'editorUI:Number',
920
+ String = 'editorUI:String',
921
+ SubPane = 'editorUI:SubPane',
922
+ Table = 'editorUI:Table',
923
+ Text = 'editorUI:Text',
924
+ Vector3 = 'editorUI:Vector3',
925
+ }
926
+
426
927
  /**
427
928
  * Define the visibility of the status bar item If the tool
428
929
  * does not have an `ISimpleToolPropertyPane` component, then
@@ -433,6 +934,22 @@ export declare enum SimpleToolStatusBarVisibility {
433
934
  VisibleWhenActive = 1,
434
935
  }
435
936
 
937
+ export enum ThemeSettingsColorKey {
938
+ ControlsGeneralFill = 'ControlsGeneralFill',
939
+ ControlsGeneralHighlight = 'ControlsGeneralHighlight',
940
+ CoordinateControlX = 'CoordinateControlX',
941
+ CoordinateControlY = 'CoordinateControlY',
942
+ CoordinateControlZ = 'CoordinateControlZ',
943
+ CursorVolumeBorder = 'CursorVolumeBorder',
944
+ CursorVolumeFill = 'CursorVolumeFill',
945
+ PlacementVolumeBorder = 'PlacementVolumeBorder',
946
+ PlacementVolumeFill = 'PlacementVolumeFill',
947
+ PrefillVolumeBorder = 'PrefillVolumeBorder',
948
+ PrefillVolumeFill = 'PrefillVolumeFill',
949
+ SelectionVolumeBorder = 'SelectionVolumeBorder',
950
+ SelectionVolumeFill = 'SelectionVolumeFill',
951
+ }
952
+
436
953
  export enum WidgetGroupSelectionMode {
437
954
  Multiple = 'Multiple',
438
955
  None = 'None',
@@ -469,24 +986,11 @@ export type ActivationFunctionType<PerPlayerStorageType> = (
469
986
  uiSession: IPlayerUISession<PerPlayerStorageType>,
470
987
  ) => IDisposable[];
471
988
 
472
- /**
473
- * The possible variants of a button.
474
- */
475
- export declare type ButtonVariant = 'secondary' | 'primary' | 'destructive' | 'hero';
476
-
477
989
  /**
478
990
  * A generic handler for an event sink.
479
991
  */
480
992
  export declare type EventHandler<T> = (eventArg: T) => void;
481
993
 
482
- /**
483
- * A property item which supports bound actions and replacing
484
- * the bound action
485
- */
486
- export type IActionPropertyItem<T extends PropertyBag, Prop extends keyof T & string> = IPropertyItem<T, Prop> & {
487
- replaceBoundAction(action: RegisteredAction<NoArgsAction> | undefined): void;
488
- };
489
-
490
994
  /**
491
995
  * A property item which supports BlockList properties
492
996
  */
@@ -504,6 +1008,16 @@ export type IDropdownPropertyItem<
504
1008
  Prop extends keyof T & string,
505
1009
  > = IPropertyItem<T, Prop> & IDropdownPropertyItemMixIn;
506
1010
 
1011
+ export declare type ImageResourceData = {
1012
+ path: string;
1013
+ type: ImageResourceType;
1014
+ };
1015
+
1016
+ /**
1017
+ * Type that can be an observable or a value.
1018
+ */
1019
+ export type IObservableProp<T> = IObservable<T> | T;
1020
+
507
1021
  /**
508
1022
  * The IPlayerUISession represents the editor user interface
509
1023
  * for a given player and given extension. Extensions
@@ -544,7 +1058,10 @@ export type ITablePropertyItem<T extends PropertyBag, Prop extends keyof T & str
544
1058
  /**
545
1059
  * A property item which supports Vector3 properties
546
1060
  */
547
- export type IVector3PropertyItem<T extends PropertyBag, Prop extends keyof T & string> = IPropertyItem<T, Prop> & {
1061
+ export type IVector3PropertyItem_deprecated<T extends PropertyBag, Prop extends keyof T & string> = IPropertyItem<
1062
+ T,
1063
+ Prop
1064
+ > & {
548
1065
  updateAxisLimits(limits: {
549
1066
  minX?: number;
550
1067
  maxX?: number;
@@ -572,6 +1089,17 @@ export type KeyBindingInfo = {
572
1089
  tooltip?: string;
573
1090
  };
574
1091
 
1092
+ /**
1093
+ * Represents a localized string or an object with a localized
1094
+ * string and optional properties
1095
+ */
1096
+ export declare type LocalizedString =
1097
+ | string
1098
+ | {
1099
+ id: string;
1100
+ props?: string[];
1101
+ };
1102
+
575
1103
  /**
576
1104
  * Modal tool lifecycle event payload
577
1105
  */
@@ -1287,6 +1815,15 @@ export class ExportManager {
1287
1815
  *
1288
1816
  */
1289
1817
  getGameOptions(useDefault?: boolean): GameOptions;
1818
+ /**
1819
+ * @remarks
1820
+ * This function can't be called in read-only mode.
1821
+ *
1822
+ * @throws This function can throw errors.
1823
+ *
1824
+ * {@link Error}
1825
+ */
1826
+ getGameVersion(): string;
1290
1827
  }
1291
1828
 
1292
1829
  /**
@@ -1642,6 +2179,13 @@ export class ModeChangeAfterEventSignal {
1642
2179
  unsubscribe(callback: (arg: ModeChangeAfterEvent) => void): void;
1643
2180
  }
1644
2181
 
2182
+ /**
2183
+ * Used for validating an observable value before it gets set
2184
+ */
2185
+ export declare abstract class ObservableValidator<T> {
2186
+ abstract validate(newValue: T): T;
2187
+ }
2188
+
1645
2189
  export class PlaytestManager {
1646
2190
  private constructor();
1647
2191
  /**
@@ -1693,6 +2237,7 @@ export class ProbabilityBlockPaletteItem extends IBlockPaletteItem {
1693
2237
  * {@link Error}
1694
2238
  */
1695
2239
  addBlock(block: minecraftserver.BlockPermutation | minecraftserver.BlockType | string, weight: number): void;
2240
+ getBlocks(): WeightedBlock[];
1696
2241
  /**
1697
2242
  * @remarks
1698
2243
  * This function can't be called in read-only mode.
@@ -1966,6 +2511,7 @@ export class SettingsManager {
1966
2511
  *
1967
2512
  */
1968
2513
  readonly graphics: GraphicsSettings;
2514
+ readonly theme: ThemeSettings;
1969
2515
  }
1970
2516
 
1971
2517
  export class SettingsUIElement {
@@ -2051,6 +2597,21 @@ export class SimulationState {
2051
2597
  setPaused(isPaused: boolean): void;
2052
2598
  }
2053
2599
 
2600
+ export class ThemeSettings {
2601
+ private constructor();
2602
+ getThemeList(): string[];
2603
+ resolveColorKey(key: ThemeSettingsColorKey): minecraftserver.RGBA | undefined;
2604
+ /**
2605
+ * @remarks
2606
+ * This function can't be called in read-only mode.
2607
+ *
2608
+ * @throws This function can throw errors.
2609
+ *
2610
+ * {@link Error}
2611
+ */
2612
+ setCurrentTheme(name: string): void;
2613
+ }
2614
+
2054
2615
  /**
2055
2616
  * The Transaction Manager is responsible for tracking and
2056
2617
  * managing all of the registered transaction operations which
@@ -2065,6 +2626,15 @@ export class SimulationState {
2065
2626
  */
2066
2627
  export class TransactionManager {
2067
2628
  private constructor();
2629
+ /**
2630
+ * @remarks
2631
+ * This function can't be called in read-only mode.
2632
+ *
2633
+ * @throws This function can throw errors.
2634
+ *
2635
+ * {@link Error}
2636
+ */
2637
+ addEntityOperation(entity: minecraftserver.Entity, type: EntityOperationType): boolean;
2068
2638
  /**
2069
2639
  * @remarks
2070
2640
  * This function can't be called in read-only mode.
@@ -2326,6 +2896,34 @@ export class UserDefinedTransactionHandlerId {
2326
2896
  private constructor();
2327
2897
  }
2328
2898
 
2899
+ /**
2900
+ * Validates min/max limits of observable objects that support
2901
+ * Vector3
2902
+ */
2903
+ export declare class Vector3LimitObservableValidator implements ObservableValidator<minecraftserver.Vector3> {
2904
+ /**
2905
+ * @remarks
2906
+ * This property can't be edited in read-only mode.
2907
+ *
2908
+ */
2909
+ protected _max: Partial<minecraftserver.Vector3>;
2910
+ /**
2911
+ * @remarks
2912
+ * This property can't be edited in read-only mode.
2913
+ *
2914
+ */
2915
+ protected _min: Partial<minecraftserver.Vector3>;
2916
+ /**
2917
+ * @remarks
2918
+ * Constructs a new instance of the
2919
+ * `Vector3LimitObservableValidator` class
2920
+ *
2921
+ */
2922
+ constructor(min: Partial<minecraftserver.Vector3>, max: Partial<minecraftserver.Vector3>);
2923
+ updateLimits(min: Partial<minecraftserver.Vector3>, max: Partial<minecraftserver.Vector3>): void;
2924
+ validate(newValue: minecraftserver.Vector3): minecraftserver.Vector3;
2925
+ }
2926
+
2329
2927
  export class Widget {
2330
2928
  private constructor();
2331
2929
  readonly valid: boolean;
@@ -2707,6 +3305,11 @@ export interface SettingsUIElementOptions {
2707
3305
  refreshOnChange?: boolean;
2708
3306
  }
2709
3307
 
3308
+ export interface WeightedBlock {
3309
+ block: minecraftserver.BlockType;
3310
+ weight: number;
3311
+ }
3312
+
2710
3313
  export interface WidgetCreateOptions {
2711
3314
  initialVisibility?: boolean;
2712
3315
  isSelectable?: boolean;
@@ -2891,10 +3494,151 @@ export interface IActionBarItemCreationParams {
2891
3494
  tooltipDescription?: string;
2892
3495
  /**
2893
3496
  * @remarks
2894
- * Tooltip title for the item.
3497
+ * Tooltip title for the item.
3498
+ *
3499
+ */
3500
+ tooltipTitle?: string;
3501
+ }
3502
+
3503
+ /**
3504
+ * A property item which supports Vector3 properties
3505
+ */
3506
+ // @ts-ignore Class inheritance allowed for native defined classes
3507
+ export interface IBoolPropertyItem extends IPropertyItemBase {
3508
+ /**
3509
+ * @remarks
3510
+ * Current value of the property item.
3511
+ *
3512
+ */
3513
+ readonly value: boolean;
3514
+ /**
3515
+ * @remarks
3516
+ * Sets title of the property item.
3517
+ *
3518
+ */
3519
+ setTitle(title: LocalizedString | undefined): void;
3520
+ /**
3521
+ * @remarks
3522
+ * Sets tooltip description of the property item.
3523
+ *
3524
+ */
3525
+ setTooltip(title: LocalizedString | undefined): void;
3526
+ }
3527
+
3528
+ /**
3529
+ * Optional properties for Bool property item
3530
+ */
3531
+ // @ts-ignore Class inheritance allowed for native defined classes
3532
+ export interface IBoolPropertyItemOptions extends IPropertyItemOptionsBase {
3533
+ /**
3534
+ * @remarks
3535
+ * If true label text will be hidden. It will be visible by
3536
+ * default.
3537
+ *
3538
+ */
3539
+ hiddenLabel?: boolean;
3540
+ /**
3541
+ * @remarks
3542
+ * This callback is called when UI control value is changed.
3543
+ *
3544
+ */
3545
+ onChange?: (newValue: boolean, oldValue: boolean) => void;
3546
+ /**
3547
+ * @remarks
3548
+ * Localized title of the text item.
3549
+ *
3550
+ */
3551
+ title?: LocalizedString;
3552
+ /**
3553
+ * @remarks
3554
+ * Tooltip description of the property item
3555
+ *
3556
+ */
3557
+ tooltip?: LocalizedString;
3558
+ /**
3559
+ * @remarks
3560
+ * Determines how we display bool as a UI element. If
3561
+ * undefined, it will default to Checkbox.
3562
+ *
3563
+ */
3564
+ variant?: BoolPropertyItemVariant;
3565
+ }
3566
+
3567
+ /**
3568
+ * A property item which supports Button properties
3569
+ */
3570
+ // @ts-ignore Class inheritance allowed for native defined classes
3571
+ export interface IButtonPropertyItem extends IPropertyItemBase {
3572
+ /**
3573
+ * @remarks
3574
+ * Replace action assigned to the button.
3575
+ *
3576
+ * @param action
3577
+ * New action to replace the existing with.
3578
+ */
3579
+ replaceAction(action: RegisteredAction<NoArgsAction>): void;
3580
+ /**
3581
+ * @remarks
3582
+ * Updates icon of the button.
3583
+ *
3584
+ * @param icon
3585
+ * New button icon.
3586
+ */
3587
+ setIcon(icon: string | undefined): void;
3588
+ /**
3589
+ * @remarks
3590
+ * Updates title of the button.
3591
+ *
3592
+ * @param title
3593
+ * New button title.
3594
+ */
3595
+ setTitle(title: LocalizedString | undefined): void;
3596
+ /**
3597
+ * @remarks
3598
+ * Updates tooltip description of the button.
3599
+ *
3600
+ * @param tooltip
3601
+ * New button tooltip.
3602
+ */
3603
+ setTooltip(tooltip: LocalizedString | undefined): void;
3604
+ }
3605
+
3606
+ /**
3607
+ * Optional properties for Button property item
3608
+ */
3609
+ // @ts-ignore Class inheritance allowed for native defined classes
3610
+ export interface IButtonPropertyItemOptions extends IPropertyItemOptionsBase {
3611
+ /**
3612
+ * @remarks
3613
+ * If true label text will be hidden. It will be visible by
3614
+ * default.
3615
+ *
3616
+ */
3617
+ hiddenLabel?: boolean;
3618
+ /**
3619
+ * @remarks
3620
+ * Icon image of the property item.
3621
+ *
3622
+ */
3623
+ icon?: string;
3624
+ /**
3625
+ * @remarks
3626
+ * Localized title of the property item.
3627
+ *
3628
+ */
3629
+ title?: LocalizedString;
3630
+ /**
3631
+ * @remarks
3632
+ * Tooltip description of the property item.
3633
+ *
3634
+ */
3635
+ tooltip?: LocalizedString;
3636
+ /**
3637
+ * @remarks
3638
+ * The variant for the button. By default it is Primary.
2895
3639
  *
2896
3640
  */
2897
- tooltipTitle?: string;
3641
+ variant?: ButtonPropertyItemVariant;
2898
3642
  }
2899
3643
 
2900
3644
  /**
@@ -2909,22 +3653,19 @@ export interface IDisposable {
2909
3653
  teardown(): void;
2910
3654
  }
2911
3655
 
3656
+ /**
3657
+ * Properties of dropdown property item children
3658
+ */
2912
3659
  export interface IDropdownItem {
2913
3660
  /**
2914
3661
  * @remarks
2915
- * Fallback display text if no loc ID
2916
- *
2917
- */
2918
- readonly displayAltText: string;
2919
- /**
2920
- * @remarks
2921
- * Loc ID (resolved on client)
3662
+ * Localized display text of the dropdown item.
2922
3663
  *
2923
3664
  */
2924
- readonly displayStringId: string;
3665
+ readonly label: string;
2925
3666
  /**
2926
3667
  * @remarks
2927
- * The selectable value of the DropDown item.
3668
+ * The selectable value of the dropdown item.
2928
3669
  *
2929
3670
  */
2930
3671
  readonly value: number;
@@ -2966,6 +3707,72 @@ export interface IGlobalInputManager {
2966
3707
  ): void;
2967
3708
  }
2968
3709
 
3710
+ /**
3711
+ * A property item which supports Image properties
3712
+ */
3713
+ // @ts-ignore Class inheritance allowed for native defined classes
3714
+ export interface IImagePropertyItem extends IPropertyItemBase {
3715
+ /**
3716
+ * @remarks
3717
+ * Height of the image.
3718
+ *
3719
+ */
3720
+ readonly imageHeight: number;
3721
+ /**
3722
+ * @remarks
3723
+ * Width of the image.
3724
+ *
3725
+ */
3726
+ readonly imageWidth: number;
3727
+ /**
3728
+ * @remarks
3729
+ * Current value of the property item.
3730
+ *
3731
+ */
3732
+ readonly value: Readonly<string | ImageResourceData>;
3733
+ /**
3734
+ * @remarks
3735
+ * Updates the size of the image.
3736
+ *
3737
+ * @param width
3738
+ * New width of the image.
3739
+ * @param height
3740
+ * New height of the image.
3741
+ */
3742
+ resizeImage(width: number, height: number): void;
3743
+ }
3744
+
3745
+ /**
3746
+ * Optional properties for Image property item
3747
+ */
3748
+ // @ts-ignore Class inheritance allowed for native defined classes
3749
+ export interface IImagePropertyItemOptions extends IPropertyItemOptionsBase {
3750
+ /**
3751
+ * @remarks
3752
+ * Alignment of the image in the container. If not defined,
3753
+ * LayoutAlignment.Left is used.
3754
+ *
3755
+ */
3756
+ alignment?: LayoutAlignment;
3757
+ /**
3758
+ * @remarks
3759
+ * Size of the image. If undefined, defaults to 10.
3760
+ *
3761
+ */
3762
+ imageSize?:
3763
+ | number
3764
+ | {
3765
+ width: number;
3766
+ height: number;
3767
+ };
3768
+ /**
3769
+ * @remarks
3770
+ * Called when image is clicked.
3771
+ *
3772
+ */
3773
+ onClick?: (x: number, y: number) => void;
3774
+ }
3775
+
2969
3776
  export interface IMenu {
2970
3777
  /**
2971
3778
  * @remarks
@@ -3032,12 +3839,6 @@ export interface IMenuCreationParams {
3032
3839
  *
3033
3840
  */
3034
3841
  checked?: boolean;
3035
- /**
3036
- * @remarks
3037
- * Loc ID (resolved on client)
3038
- *
3039
- */
3040
- displayStringId?: string;
3041
3842
  /**
3042
3843
  * @remarks
3043
3844
  * Whether the menu should be enabled or disabled
@@ -3046,10 +3847,10 @@ export interface IMenuCreationParams {
3046
3847
  enabled?: boolean;
3047
3848
  /**
3048
3849
  * @remarks
3049
- * The name of the menu
3850
+ * Localized display text of the menu
3050
3851
  *
3051
3852
  */
3052
- name: string;
3853
+ label: string;
3053
3854
  /**
3054
3855
  * @remarks
3055
3856
  * Custom unique identifier that will replace random id
@@ -3103,6 +3904,34 @@ export interface IModalToolContainer {
3103
3904
  show(): void;
3104
3905
  }
3105
3906
 
3907
+ /**
3908
+ * Represents a stateful value that can be observed by
3909
+ * different objects.
3910
+ */
3911
+ export interface IObservable<T> {
3912
+ /**
3913
+ * @remarks
3914
+ * Optional validator that will pre-process the new value.
3915
+ *
3916
+ */
3917
+ readonly validator?: ObservableValidator<T>;
3918
+ /**
3919
+ * @remarks
3920
+ * Current value of the observable.
3921
+ *
3922
+ */
3923
+ readonly value: Readonly<T>;
3924
+ /**
3925
+ * @remarks
3926
+ * Updates the value and notifies dependent objects.
3927
+ *
3928
+ * @param newValue
3929
+ * New value to be set (will be processed by the validator if
3930
+ * it exists).
3931
+ */
3932
+ set(newValue: T): boolean;
3933
+ }
3934
+
3106
3935
  /**
3107
3936
  * Log helper interface for Player.
3108
3937
  */
@@ -3141,56 +3970,63 @@ export interface IPlayerLogger {
3141
3970
  warning(message: string): void;
3142
3971
  }
3143
3972
 
3144
- export interface IPropertyItem<T extends PropertyBag, Prop extends keyof T & string> {
3973
+ // @ts-ignore Class inheritance allowed for native defined classes
3974
+ export interface IPropertyItem<T extends PropertyBag, Prop extends keyof T & string> extends IPropertyItemBase {
3145
3975
  /**
3146
3976
  * @remarks
3147
- * If the item is enabled in the UI.
3977
+ * The object associated.
3148
3978
  *
3149
3979
  */
3150
- enable: boolean;
3980
+ readonly obj: T;
3151
3981
  /**
3152
3982
  * @remarks
3153
- * Unique ID for the property item.
3983
+ * The target property of the object associated.
3154
3984
  *
3155
3985
  */
3156
- readonly id: string;
3986
+ readonly property: Prop;
3157
3987
  /**
3158
3988
  * @remarks
3159
- * The object associated.
3989
+ * The value of the property.
3160
3990
  *
3161
3991
  */
3162
- readonly obj: T;
3992
+ readonly value: T[Prop];
3993
+ dispose(): void;
3994
+ }
3995
+
3996
+ /**
3997
+ * Common base for all property items
3998
+ */
3999
+ export interface IPropertyItemBase {
3163
4000
  /**
3164
4001
  * @remarks
3165
- * The parent pane id.
4002
+ * If the item is enabled in the UI.
3166
4003
  *
3167
4004
  */
3168
- readonly paneId: string;
4005
+ enable: boolean;
3169
4006
  /**
3170
4007
  * @remarks
3171
- * The target property of the object associated.
4008
+ * Unique ID for the property item.
3172
4009
  *
3173
4010
  */
3174
- readonly property: Prop;
4011
+ readonly id: string;
3175
4012
  /**
3176
4013
  * @remarks
3177
- * The type name of the target property.
4014
+ * The parent pane id.
3178
4015
  *
3179
4016
  */
3180
- readonly typeName: EDITOR_PANE_PROPERTY_ITEM_TYPE;
4017
+ readonly paneId: string;
3181
4018
  /**
3182
4019
  * @remarks
3183
- * The value of the property.
4020
+ * The type name of the target property.
3184
4021
  *
3185
4022
  */
3186
- readonly value: T[Prop];
4023
+ readonly typeName: PropertyItemType;
3187
4024
  /**
3188
4025
  * @remarks
3189
4026
  * If the item should be visible in the UI.
3190
4027
  *
3191
4028
  */
3192
4029
  visible: boolean;
3193
- dispose(): void;
3194
4030
  }
3195
4031
 
3196
4032
  export interface IPropertyItemOptions {
@@ -3208,19 +4044,33 @@ export interface IPropertyItemOptions {
3208
4044
  onChange?: OnChangeCallback<PropertyBag, string>;
3209
4045
  /**
3210
4046
  * @remarks
3211
- * Fallback display text if no loc ID
4047
+ * Localized title of the property item
3212
4048
  *
3213
4049
  */
3214
- titleAltText?: string;
4050
+ title?: string;
3215
4051
  /**
3216
4052
  * @remarks
3217
- * Loc ID (resolved on client)
4053
+ * If the item should be visible in the UI.
3218
4054
  *
3219
4055
  */
3220
- titleStringId?: string;
4056
+ visible?: boolean;
4057
+ }
4058
+
4059
+ /**
4060
+ * Common optional properties for property items
4061
+ */
4062
+ export interface IPropertyItemOptionsBase {
3221
4063
  /**
3222
4064
  * @remarks
3223
- * If the item should be visible in the UI.
4065
+ * Initial enabled state of property item. If undefined, it
4066
+ * will default to true.
4067
+ *
4068
+ */
4069
+ enable?: boolean;
4070
+ /**
4071
+ * @remarks
4072
+ * Initial visibility state of property item. If undefined, it
4073
+ * will default to true.
3224
4074
  *
3225
4075
  */
3226
4076
  visible?: boolean;
@@ -3241,17 +4091,6 @@ export interface IPropertyItemOptionsBool extends IPropertyItemOptions {
3241
4091
  displayAsToggleSwitch?: boolean;
3242
4092
  }
3243
4093
 
3244
- // @ts-ignore Class inheritance allowed for native defined classes
3245
- export interface IPropertyItemOptionsButton extends IPropertyItemOptions {
3246
- icon?: string;
3247
- /**
3248
- * @remarks
3249
- * The variant for the button. By default it is "primary"
3250
- *
3251
- */
3252
- variant?: ButtonVariant;
3253
- }
3254
-
3255
4094
  // @ts-ignore Class inheritance allowed for native defined classes
3256
4095
  export interface IPropertyItemOptionsColorPicker extends IPropertyItemOptions {
3257
4096
  showAlpha?: boolean;
@@ -3278,14 +4117,15 @@ export interface IPropertyItemOptionsDropdown extends IPropertyItemOptions {
3278
4117
  dropdownItems: IDropdownItem[];
3279
4118
  }
3280
4119
 
3281
- // @ts-ignore Class inheritance allowed for native defined classes
3282
- export interface IPropertyItemOptionsImage extends IPropertyItemOptions {
3283
- imageHeight: number;
3284
- imageWidth: number;
3285
- }
3286
-
3287
4120
  // @ts-ignore Class inheritance allowed for native defined classes
3288
4121
  export interface IPropertyItemOptionsNumber extends IPropertyItemOptions {
4122
+ /**
4123
+ * @remarks
4124
+ * If we should treat the number as floating point. By default
4125
+ * is false
4126
+ *
4127
+ */
4128
+ isFloat?: boolean;
3289
4129
  /**
3290
4130
  * @remarks
3291
4131
  * The min possible value for the number.
@@ -3322,16 +4162,6 @@ export interface IPropertyItemOptionsTable extends IPropertyItemOptions {
3322
4162
  titleId?: string;
3323
4163
  }
3324
4164
 
3325
- /**
3326
- * Localization string id and border enable boolean for
3327
- * multiline text component.
3328
- */
3329
- // @ts-ignore Class inheritance allowed for native defined classes
3330
- export interface IPropertyItemOptionsText extends IPropertyItemOptions {
3331
- border: boolean;
3332
- valueStringId: string;
3333
- }
3334
-
3335
4165
  // @ts-ignore Class inheritance allowed for native defined classes
3336
4166
  export interface IPropertyItemOptionsVector3 extends IPropertyItemOptions {
3337
4167
  /**
@@ -3410,16 +4240,10 @@ export interface IPropertyPane {
3410
4240
  readonly parentPaneId?: string;
3411
4241
  /**
3412
4242
  * @remarks
3413
- * Fallback display text if no loc ID
3414
- *
3415
- */
3416
- titleAltText: string;
3417
- /**
3418
- * @remarks
3419
- * Loc ID (resolved on client)
4243
+ * Localized title of the property pane
3420
4244
  *
3421
4245
  */
3422
- titleStringId: string;
4246
+ title: string;
3423
4247
  /**
3424
4248
  * @remarks
3425
4249
  * Check visibility of the pane
@@ -3453,12 +4277,16 @@ export interface IPropertyPane {
3453
4277
  property: Prop,
3454
4278
  options?: IPropertyItemOptionsDataPicker,
3455
4279
  ): IPropertyItem<T, Prop>;
4280
+ /**
4281
+ * @remarks
4282
+ */
4283
+ addBool(value: IObservableProp<boolean>, options?: IBoolPropertyItemOptions): IBoolPropertyItem;
3456
4284
  /**
3457
4285
  * @remarks
3458
4286
  * Adds a boolean item to the pane.
3459
4287
  *
3460
4288
  */
3461
- addBool<T extends PropertyBag, Prop extends keyof T & string>(
4289
+ addBool_deprecated<T extends PropertyBag, Prop extends keyof T & string>(
3462
4290
  obj: T,
3463
4291
  property: Prop,
3464
4292
  options?: IPropertyItemOptionsBool,
@@ -3470,14 +4298,9 @@ export interface IPropertyPane {
3470
4298
  *
3471
4299
  */
3472
4300
  addButton(
3473
- action: RegisteredAction<NoArgsAction>,
3474
- options?: IPropertyItemOptionsButton,
3475
- ): IActionPropertyItem<
3476
- {
3477
- EMPTY: undefined;
3478
- },
3479
- 'EMPTY'
3480
- >;
4301
+ action: (() => void) | RegisteredAction<NoArgsAction>,
4302
+ options?: IButtonPropertyItemOptions,
4303
+ ): IButtonPropertyItem;
3481
4304
  /**
3482
4305
  * @remarks
3483
4306
  * Adds a color picker item to the pane.
@@ -3493,7 +4316,7 @@ export interface IPropertyPane {
3493
4316
  * Adds an divider item to the pane.
3494
4317
  *
3495
4318
  */
3496
- addDivider(): IPropertyItem<PropertyBag, string>;
4319
+ addDivider(): IPropertyItemBase;
3497
4320
  /**
3498
4321
  * @remarks
3499
4322
  * Adds an DropDown item to the pane.
@@ -3524,11 +4347,10 @@ export interface IPropertyPane {
3524
4347
  * Adds an image item to the pane.
3525
4348
  *
3526
4349
  */
3527
- addImage<T extends PropertyBag, Prop extends keyof T & string>(
3528
- obj: T,
3529
- property: Prop,
3530
- options?: IPropertyItemOptionsImage,
3531
- ): IPropertyItem<T, Prop>;
4350
+ addImage(
4351
+ value: IObservableProp<string | ImageResourceData>,
4352
+ options?: IImagePropertyItemOptions,
4353
+ ): IImagePropertyItem;
3532
4354
  /**
3533
4355
  * @remarks
3534
4356
  * Adds a number item to the pane.
@@ -3565,21 +4387,26 @@ export interface IPropertyPane {
3565
4387
  * Adds a multiline Text item to the pane.
3566
4388
  *
3567
4389
  */
3568
- addText<T extends PropertyBag, Prop extends keyof T & string>(
3569
- obj: T,
3570
- property: Prop,
3571
- options?: IPropertyItemOptionsText,
3572
- ): IPropertyItem<T, Prop>;
4390
+ addText(value: IObservableProp<LocalizedString>, options?: ITextPropertyItemOptions): ITextPropertyItem;
4391
+ /**
4392
+ * @remarks
4393
+ * Adds a Vec3 item to the pane.
4394
+ *
4395
+ */
4396
+ addVector3(
4397
+ value: IObservableProp<minecraftserver.Vector3>,
4398
+ options?: IVector3PropertyItemOptions,
4399
+ ): IVector3PropertyItem;
3573
4400
  /**
3574
4401
  * @remarks
3575
4402
  * Adds a Vec3 item to the pane.
3576
4403
  *
3577
4404
  */
3578
- addVector3<T extends PropertyBag, Prop extends keyof T & string>(
4405
+ addVector3_deprecated<T extends PropertyBag, Prop extends keyof T & string>(
3579
4406
  obj: T,
3580
4407
  property: Prop,
3581
4408
  options?: IPropertyItemOptionsVector3,
3582
- ): IVector3PropertyItem<T, Prop>;
4409
+ ): IVector3PropertyItem_deprecated<T, Prop>;
3583
4410
  /**
3584
4411
  * @remarks
3585
4412
  * Collapse the pane.
@@ -3631,23 +4458,10 @@ export interface IPropertyPaneOptions {
3631
4458
  direction?: LayoutDirection;
3632
4459
  /**
3633
4460
  * @remarks
3634
- * Fallback display text if no loc ID
3635
- *
3636
- */
3637
- titleAltText: string;
3638
- /**
3639
- * @remarks
3640
- * Loc ID (resolved on client)
3641
- *
3642
- */
3643
- titleStringId: string;
3644
- /**
3645
- * @remarks
3646
- * Width of the panel in rem. This property is ignored in case
3647
- * of sub panes
4461
+ * Localized title of the property pane
3648
4462
  *
3649
4463
  */
3650
- width?: number;
4464
+ title: string;
3651
4465
  }
3652
4466
 
3653
4467
  export interface IPropertyTableCellItem {
@@ -4055,15 +4869,7 @@ export interface ISimpleToolPaneOptions {
4055
4869
  * bar of the pane.
4056
4870
  *
4057
4871
  */
4058
- titleAltText: string;
4059
- /**
4060
- * @remarks
4061
- * The string id of the title of the pane. This will be
4062
- * displayed in the title bar of the pane if it exists in the
4063
- * language file, otherwise the titleAltText will be used.
4064
- *
4065
- */
4066
- titleStringId?: string;
4872
+ title: string;
4067
4873
  }
4068
4874
 
4069
4875
  export interface ISimpleToolRailComponent {
@@ -4104,19 +4910,6 @@ export interface ISimpleToolRailComponent {
4104
4910
  * gameplay interaction
4105
4911
  */
4106
4912
  export interface ISimpleToolRailOptions {
4107
- /**
4108
- * @remarks
4109
- * The text for the tool description
4110
- *
4111
- */
4112
- displayAltText: string;
4113
- /**
4114
- * @remarks
4115
- * The string ID for the tool description if it is in the
4116
- * localization language file.
4117
- *
4118
- */
4119
- displayStringId?: string;
4120
4913
  /**
4121
4914
  * @remarks
4122
4915
  * The icon for the tool rail button. This is generally a URL
@@ -4131,21 +4924,18 @@ export interface ISimpleToolRailOptions {
4131
4924
  onTeardown?: (component: ISimpleToolRailComponent) => void;
4132
4925
  /**
4133
4926
  * @remarks
4134
- * The tooltip string for the tool rail button. Note: if an
4135
- * activation key binding was added to `ISimpleToolOptions`,
4136
- * then the key binding will be appended to the tooltip string.
4927
+ * The text for the tool title
4137
4928
  *
4138
4929
  */
4139
- tooltipAltText: string;
4930
+ title: string;
4140
4931
  /**
4141
4932
  * @remarks
4142
- * The string ID for the tooltip string if it is in the
4143
- * localization language file. Note: if an activation key
4144
- * binding was added to `ISimpleToolOptions`, then the key
4933
+ * The tooltip description for the tool. Note: if an activation
4934
+ * key binding was added to `ISimpleToolOptions`, then the key
4145
4935
  * binding will be appended to the tooltip string.
4146
4936
  *
4147
4937
  */
4148
- tooltipStringId?: string;
4938
+ tooltip: string;
4149
4939
  }
4150
4940
 
4151
4941
  export interface ISimpleToolStatusBarComponent {
@@ -4212,21 +5002,126 @@ export interface IStatusBarItem {
4212
5002
  }
4213
5003
 
4214
5004
  /**
4215
- * Parameters for creating a modal tool in the tool container
5005
+ * A property item which supports Vector3 properties
4216
5006
  */
4217
- export interface ModalToolCreationParameters {
5007
+ // @ts-ignore Class inheritance allowed for native defined classes
5008
+ export interface ITextPropertyItem extends IPropertyItemBase {
4218
5009
  /**
4219
5010
  * @remarks
4220
- * The displayed string for the tool
5011
+ * Current value of the property item.
4221
5012
  *
4222
5013
  */
4223
- displayAltText: string;
5014
+ readonly value: Readonly<LocalizedString>;
5015
+ /**
5016
+ * @remarks
5017
+ * Gets layout alignment of the property item.
5018
+ *
5019
+ */
5020
+ setAlignment(alignment: LayoutAlignment): void;
5021
+ /**
5022
+ * @remarks
5023
+ * Sets title of the property item.
5024
+ *
5025
+ */
5026
+ setTitle(title: LocalizedString | undefined): void;
5027
+ }
5028
+
5029
+ /**
5030
+ * Optional properties for Text property item
5031
+ */
5032
+ // @ts-ignore Class inheritance allowed for native defined classes
5033
+ export interface ITextPropertyItemOptions extends IPropertyItemOptionsBase {
5034
+ /**
5035
+ * @remarks
5036
+ * Determines alignment of the text. If undefined, it will
5037
+ * default to left aligned.
5038
+ *
5039
+ */
5040
+ alignment?: LayoutAlignment;
5041
+ /**
5042
+ * @remarks
5043
+ * Adds a border around the text. If undefined, it will default
5044
+ * to true.
5045
+ *
5046
+ */
5047
+ border?: boolean;
5048
+ /**
5049
+ * @remarks
5050
+ * Localized title of the text item.
5051
+ *
5052
+ */
5053
+ title?: LocalizedString;
5054
+ }
5055
+
5056
+ /**
5057
+ * A property item which supports Vector3 properties
5058
+ */
5059
+ // @ts-ignore Class inheritance allowed for native defined classes
5060
+ export interface IVector3PropertyItem extends IPropertyItemBase {
5061
+ /**
5062
+ * @remarks
5063
+ * Current value of the property item.
5064
+ *
5065
+ */
5066
+ readonly value: Readonly<minecraftserver.Vector3>;
5067
+ /**
5068
+ * @remarks
5069
+ * Updates Vector3 limits and clamps the current value.
5070
+ *
5071
+ */
5072
+ updateAxisLimits(limits: { min?: Partial<minecraftserver.Vector3>; max?: Partial<minecraftserver.Vector3> }): void;
5073
+ }
5074
+
5075
+ /**
5076
+ * Optional properties for Vector3 property item
5077
+ */
5078
+ // @ts-ignore Class inheritance allowed for native defined classes
5079
+ export interface IVector3PropertyItemOptions extends IPropertyItemOptionsBase {
5080
+ /**
5081
+ * @remarks
5082
+ * If true label text will be hidden. It will be visible by
5083
+ * default.
5084
+ *
5085
+ */
5086
+ hiddenLabel?: boolean;
5087
+ /**
5088
+ * @remarks
5089
+ * The min possible limits. If undefined,
5090
+ * Number.MAX_SAFE_INTEGER will be used.
5091
+ *
5092
+ */
5093
+ max?: Partial<minecraftserver.Vector3>;
5094
+ /**
5095
+ * @remarks
5096
+ * The min possible limits. If undefined,
5097
+ * Number.MIN_SAFE_INTEGER will be used.
5098
+ *
5099
+ */
5100
+ min?: Partial<minecraftserver.Vector3>;
5101
+ /**
5102
+ * @remarks
5103
+ * This callback is called when UI control is changed.
5104
+ *
5105
+ */
5106
+ onChange?: (newValue: minecraftserver.Vector3, oldValue: minecraftserver.Vector3) => void;
5107
+ /**
5108
+ * @remarks
5109
+ * Localized title of the property item
5110
+ *
5111
+ */
5112
+ title?: LocalizedString;
4224
5113
  /**
4225
5114
  * @remarks
4226
- * Loc ID (resolved on client)
5115
+ * Tooltip description of the property item
4227
5116
  *
4228
5117
  */
4229
- displayStringId?: string;
5118
+ tooltip?: LocalizedString;
5119
+ }
5120
+
5121
+ /**
5122
+ * Parameters for creating a modal tool in the tool container
5123
+ */
5124
+ export interface ModalToolCreationParameters {
4230
5125
  /**
4231
5126
  * @remarks
4232
5127
  * Icon, if any (from resource pack on client)
@@ -4247,16 +5142,16 @@ export interface ModalToolCreationParameters {
4247
5142
  inputContextLabel?: string;
4248
5143
  /**
4249
5144
  * @remarks
4250
- * tooltipAltText alt text, if any
5145
+ * Title of the tool
4251
5146
  *
4252
5147
  */
4253
- tooltipAltText?: string;
5148
+ title: string;
4254
5149
  /**
4255
5150
  * @remarks
4256
- * Tooltip localization string ID
5151
+ * Tooltip description of the toll
4257
5152
  *
4258
5153
  */
4259
- tooltipStringId?: string;
5154
+ tooltip?: string;
4260
5155
  }
4261
5156
 
4262
5157
  /**
@@ -4315,11 +5210,14 @@ export declare function executeLargeOperationFromIterator(
4315
5210
  export declare function getBlockPickerDefaultAllowBlockList(): string[];
4316
5211
  /**
4317
5212
  * @remarks
4318
- * Adds the resource pack editor prefix and returns the full
4319
- * localization ID
5213
+ * Creates an observable object that stores a value state.
4320
5214
  *
5215
+ * @param initialValue
5216
+ * Initial value of the observable.
5217
+ * @param validator
5218
+ * Optional validator to use for the setter.
4321
5219
  */
4322
- export declare function getLocalizationId(locId: string): string;
5220
+ export declare function makeObservable<T>(initialValue: T, validator?: ObservableValidator<T>): IObservable<T>;
4323
5221
  /**
4324
5222
  * @remarks
4325
5223
  * Registers an editor extension into Minecraft. This function