@minecraft/server-editor 0.1.0-beta.1.21.20-preview.24 → 0.1.0-beta.1.21.30-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 +1219 -179
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -62,12 +62,21 @@ export declare enum ButtonPropertyItemVariant {
62
62
  /**
63
63
  * The possible variants of a color picker.
64
64
  */
65
- export declare enum ColorPickerVariant {
65
+ export declare enum ColorPickerPropertyItemVariant {
66
66
  Default = 0,
67
67
  Inline = 1,
68
68
  Expanded = 2,
69
69
  }
70
70
 
71
+ /**
72
+ * The possible data types supported by ComboBox property item.
73
+ */
74
+ export declare enum ComboBoxPropertyItemDataType {
75
+ Custom = 0,
76
+ Block = 1,
77
+ Entity = 2,
78
+ }
79
+
71
80
  /**
72
81
  * Predefined action bar items
73
82
  */
@@ -876,6 +885,20 @@ export declare enum MouseInputType {
876
885
  DragEnd = 7,
877
886
  }
878
887
 
888
+ /**
889
+ * The possible variants of a Number property item.
890
+ */
891
+ export declare enum NumberPropertyItemVariant {
892
+ InputField = 0,
893
+ InputFieldAndSlider = 1,
894
+ }
895
+
896
+ export enum Plane {
897
+ XY = 'XY',
898
+ XZ = 'XZ',
899
+ YZ = 'YZ',
900
+ }
901
+
879
902
  export enum PlayerPermissionLevel {
880
903
  Visitor = 0,
881
904
  Member = 1,
@@ -898,6 +921,14 @@ export enum PlaytestSessionResult {
898
921
  UnspecifiedError = 11,
899
922
  }
900
923
 
924
+ export enum PrimitiveType {
925
+ AxialSphere = 'AxialSphere',
926
+ Box = 'Box',
927
+ Disc = 'Disc',
928
+ Line = 'Line',
929
+ Text = 'Text',
930
+ }
931
+
901
932
  export enum ProjectExportType {
902
933
  PlayableWorld = 0,
903
934
  ProjectBackup = 1,
@@ -909,10 +940,10 @@ export enum ProjectExportType {
909
940
  */
910
941
  export declare enum PropertyItemType {
911
942
  BlockList = 'editorUI:BlockList',
912
- BlockPicker = 'editorUI:BlockPicker',
913
943
  Boolean = 'editorUI:Boolean',
914
944
  Button = 'editorUI:Button',
915
945
  ColorPicker = 'editorUI:ColorPicker',
946
+ ComboBox = 'editorUI:ComboBox',
916
947
  Divider = 'editorUI:Divider',
917
948
  Dropdown = 'editorUI:Dropdown',
918
949
  Image = 'editorUI:Image',
@@ -934,6 +965,11 @@ export declare enum SimpleToolStatusBarVisibility {
934
965
  VisibleWhenActive = 1,
935
966
  }
936
967
 
968
+ export enum SplineType {
969
+ Hermite = 'Hermite',
970
+ Line = 'Line',
971
+ }
972
+
937
973
  export enum ThemeSettingsColorKey {
938
974
  ControlsGeneralFill = 'ControlsGeneralFill',
939
975
  ControlsGeneralHighlight = 'ControlsGeneralHighlight',
@@ -950,6 +986,15 @@ export enum ThemeSettingsColorKey {
950
986
  SelectionVolumeFill = 'SelectionVolumeFill',
951
987
  }
952
988
 
989
+ export enum WidgetComponentType {
990
+ Entity = 'Entity',
991
+ Gizmo = 'Gizmo',
992
+ Guide = 'Guide',
993
+ RenderPrim = 'RenderPrim',
994
+ Spline = 'Spline',
995
+ Text = 'Text',
996
+ }
997
+
953
998
  export enum WidgetGroupSelectionMode {
954
999
  Multiple = 'Multiple',
955
1000
  None = 'None',
@@ -1001,7 +1046,7 @@ export type IBlockListPropertyItem<T extends PropertyBag, Prop extends keyof T &
1001
1046
  /**
1002
1047
  * A property item which supports Dropdown properties
1003
1048
  */
1004
- export type IDropdownPropertyItem<
1049
+ export type IDropdownPropertyItem_deprecated<
1005
1050
  T extends Omit<PropertyBag, Prop> & {
1006
1051
  [key in Prop]: number;
1007
1052
  },
@@ -1245,6 +1290,28 @@ export declare class BedrockEventSubscriptionCache {
1245
1290
  teardown(): void;
1246
1291
  }
1247
1292
 
1293
+ /**
1294
+ * Validates observable objects that support string as
1295
+ * BlockType
1296
+ */
1297
+ export declare class BlockIdentifierObservableValidator implements ObservableValidator<string> {
1298
+ /**
1299
+ * @remarks
1300
+ * This property can't be edited in read-only mode.
1301
+ *
1302
+ */
1303
+ protected _defaultValue: string;
1304
+ get defaultValue(): string;
1305
+ /**
1306
+ * @remarks
1307
+ * Constructs a new instance of the
1308
+ * `BlockIdentifierObservableValidator` class
1309
+ *
1310
+ */
1311
+ constructor(defaultName: string);
1312
+ validate(newValue: string): string;
1313
+ }
1314
+
1248
1315
  export class BlockPalette {
1249
1316
  /**
1250
1317
  * @throws This function can throw errors.
@@ -1764,33 +1831,26 @@ export class CursorPropertyChangeAfterEventSignal {
1764
1831
  unsubscribe(callback: (arg: CursorPropertiesChangeAfterEvent) => void): void;
1765
1832
  }
1766
1833
 
1767
- // @ts-ignore Class inheritance allowed for native defined classes
1768
- export class CustomWidget extends Widget {
1769
- private constructor();
1770
- readonly location: minecraftserver.Vector3;
1771
- readonly rotation: minecraftserver.Vector2;
1772
- readonly showTextOnlyWhenSelected: boolean;
1773
- getText(): string;
1834
+ /**
1835
+ * Validates observable objects that support string as
1836
+ * EntityType
1837
+ */
1838
+ export declare class EntityIdentifierObservableValidator implements ObservableValidator<string> {
1774
1839
  /**
1775
1840
  * @remarks
1776
- * This function can't be called in read-only mode.
1841
+ * This property can't be edited in read-only mode.
1777
1842
  *
1778
1843
  */
1779
- moveBy(delta: minecraftserver.Vector3): void;
1844
+ protected _defaultValue: string;
1845
+ get defaultValue(): string;
1780
1846
  /**
1781
1847
  * @remarks
1782
- * This function can't be called in read-only mode.
1848
+ * Constructs a new instance of the
1849
+ * `EntityIdentifierObservableValidator` class
1783
1850
  *
1784
1851
  */
1785
- setText(text: string): void;
1786
- }
1787
-
1788
- export class CustomWidgetMoveEventData {
1789
- private constructor();
1790
- readonly group: WidgetGroup;
1791
- readonly location?: minecraftserver.Vector3;
1792
- readonly rotation?: minecraftserver.Vector2;
1793
- readonly widget: CustomWidget;
1852
+ constructor(defaultValue: string);
1853
+ validate(newValue: string): string;
1794
1854
  }
1795
1855
 
1796
1856
  export class ExportManager {
@@ -2037,11 +2097,6 @@ export class IBlockPaletteItem {
2037
2097
  setBlock(block: minecraftserver.BlockPermutation | minecraftserver.BlockType | string): void;
2038
2098
  }
2039
2099
 
2040
- // @ts-ignore Class inheritance allowed for native defined classes
2041
- export class LineWidget extends Widget {
2042
- private constructor();
2043
- }
2044
-
2045
2100
  /**
2046
2101
  * The logger class is a utility class which allows editor
2047
2102
  * extensions to communicate with the player from the server to
@@ -2179,11 +2234,45 @@ export class ModeChangeAfterEventSignal {
2179
2234
  unsubscribe(callback: (arg: ModeChangeAfterEvent) => void): void;
2180
2235
  }
2181
2236
 
2237
+ /**
2238
+ * Validates min/max limits of observable objects that support
2239
+ * number
2240
+ */
2241
+ export declare class NumberLimitObservableValidator implements ObservableValidator<number> {
2242
+ /**
2243
+ * @remarks
2244
+ * This property can't be edited in read-only mode.
2245
+ *
2246
+ */
2247
+ protected _isInteger?: boolean;
2248
+ /**
2249
+ * @remarks
2250
+ * This property can't be edited in read-only mode.
2251
+ *
2252
+ */
2253
+ protected _max?: number;
2254
+ /**
2255
+ * @remarks
2256
+ * This property can't be edited in read-only mode.
2257
+ *
2258
+ */
2259
+ protected _min?: number;
2260
+ /**
2261
+ * @remarks
2262
+ * Constructs a new instance of the
2263
+ * `NumberLimitObservableValidator` class
2264
+ *
2265
+ */
2266
+ constructor(min: number | undefined, max: number | undefined, isInteger?: boolean);
2267
+ updateLimits(min: number | undefined, max: number | undefined): void;
2268
+ validate(newValue: number): number;
2269
+ }
2270
+
2182
2271
  /**
2183
2272
  * Used for validating an observable value before it gets set
2184
2273
  */
2185
2274
  export declare abstract class ObservableValidator<T> {
2186
- abstract validate(newValue: T): T;
2275
+ abstract validate(newValue: T): T | undefined;
2187
2276
  }
2188
2277
 
2189
2278
  export class PlaytestManager {
@@ -2599,6 +2688,25 @@ export class SimulationState {
2599
2688
 
2600
2689
  export class ThemeSettings {
2601
2690
  private constructor();
2691
+ /**
2692
+ * @remarks
2693
+ * This function can't be called in read-only mode.
2694
+ *
2695
+ * @throws This function can throw errors.
2696
+ *
2697
+ * {@link Error}
2698
+ */
2699
+ addNewTheme(name: string): void;
2700
+ /**
2701
+ * @remarks
2702
+ * This function can't be called in read-only mode.
2703
+ *
2704
+ * @throws This function can throw errors.
2705
+ *
2706
+ * {@link Error}
2707
+ */
2708
+ deleteTheme(name: string): void;
2709
+ getCurrentTheme(): string;
2602
2710
  getThemeList(): string[];
2603
2711
  resolveColorKey(key: ThemeSettingsColorKey): minecraftserver.RGBA | undefined;
2604
2712
  /**
@@ -2610,6 +2718,15 @@ export class ThemeSettings {
2610
2718
  * {@link Error}
2611
2719
  */
2612
2720
  setCurrentTheme(name: string): void;
2721
+ /**
2722
+ * @remarks
2723
+ * This function can't be called in read-only mode.
2724
+ *
2725
+ * @throws This function can throw errors.
2726
+ *
2727
+ * {@link Error}
2728
+ */
2729
+ updateThemeColor(name: string, key: ThemeSettingsColorKey, newColor: minecraftserver.RGBA): void;
2613
2730
  }
2614
2731
 
2615
2732
  /**
@@ -2901,6 +3018,12 @@ export class UserDefinedTransactionHandlerId {
2901
3018
  * Vector3
2902
3019
  */
2903
3020
  export declare class Vector3LimitObservableValidator implements ObservableValidator<minecraftserver.Vector3> {
3021
+ /**
3022
+ * @remarks
3023
+ * This property can't be edited in read-only mode.
3024
+ *
3025
+ */
3026
+ protected _isInteger?: boolean;
2904
3027
  /**
2905
3028
  * @remarks
2906
3029
  * This property can't be edited in read-only mode.
@@ -2919,180 +3042,592 @@ export declare class Vector3LimitObservableValidator implements ObservableValida
2919
3042
  * `Vector3LimitObservableValidator` class
2920
3043
  *
2921
3044
  */
2922
- constructor(min: Partial<minecraftserver.Vector3>, max: Partial<minecraftserver.Vector3>);
3045
+ constructor(min: Partial<minecraftserver.Vector3>, max: Partial<minecraftserver.Vector3>, isInteger?: boolean);
2923
3046
  updateLimits(min: Partial<minecraftserver.Vector3>, max: Partial<minecraftserver.Vector3>): void;
2924
3047
  validate(newValue: minecraftserver.Vector3): minecraftserver.Vector3;
2925
3048
  }
2926
3049
 
2927
3050
  export class Widget {
2928
3051
  private constructor();
2929
- readonly valid: boolean;
2930
3052
  /**
2931
3053
  * @remarks
2932
- * This function can't be called in read-only mode.
3054
+ * This property can't be edited in read-only mode.
2933
3055
  *
2934
3056
  */
2935
- deleteWidget(): void;
2936
- getIsSelected(): boolean;
2937
- getIsVisible(): boolean;
3057
+ collisionOffset: minecraftserver.Vector3;
2938
3058
  /**
2939
3059
  * @remarks
2940
- * This function can't be called in read-only mode.
3060
+ * This property can't be edited in read-only mode.
3061
+ *
3062
+ */
3063
+ collisionRadius: number;
3064
+ /**
3065
+ * @remarks
3066
+ * This property can't be edited in read-only mode.
3067
+ *
3068
+ */
3069
+ location: minecraftserver.Vector3;
3070
+ /**
3071
+ * @throws This property can throw when used.
3072
+ *
3073
+ * {@link InvalidWidgetError}
3074
+ */
3075
+ readonly selectable: boolean;
3076
+ selected: boolean;
3077
+ showBoundingBox: boolean;
3078
+ showCollisionRadius: boolean;
3079
+ /**
3080
+ * @remarks
3081
+ * This property can't be edited in read-only mode.
2941
3082
  *
2942
- * @throws This function can throw errors.
2943
3083
  */
2944
- setIsSelected(isSelected: boolean): void;
3084
+ snapToBlockLocation: boolean;
3085
+ visible: boolean;
2945
3086
  /**
2946
3087
  * @remarks
2947
3088
  * This function can't be called in read-only mode.
2948
3089
  *
3090
+ * @throws This function can throw errors.
3091
+ *
3092
+ * {@link Error}
3093
+ *
3094
+ * {@link InvalidWidgetError}
2949
3095
  */
2950
- setIsVisible(isVisible: boolean): void;
2951
- }
2952
-
2953
- export class WidgetGroup {
2954
- private constructor();
2955
- readonly valid: boolean;
3096
+ addEntityComponent(
3097
+ componentName: string,
3098
+ actorNameId: string,
3099
+ options?: WidgetComponentEntityOptions,
3100
+ ): WidgetComponentEntity;
2956
3101
  /**
2957
3102
  * @remarks
2958
3103
  * This function can't be called in read-only mode.
2959
3104
  *
3105
+ * @throws This function can throw errors.
3106
+ *
3107
+ * {@link Error}
3108
+ *
3109
+ * {@link InvalidWidgetError}
2960
3110
  */
2961
- areAnySelected(): boolean;
3111
+ addGizmoComponent(componentName: string, options?: WidgetComponentGizmoOptions): WidgetComponentGizmo;
2962
3112
  /**
2963
3113
  * @remarks
2964
3114
  * This function can't be called in read-only mode.
2965
3115
  *
2966
3116
  * @throws This function can throw errors.
3117
+ *
3118
+ * {@link Error}
3119
+ *
3120
+ * {@link InvalidWidgetError}
2967
3121
  */
2968
- createCustomWidget(
2969
- customEntityName: string,
2970
- location: minecraftserver.Vector3,
2971
- rotation?: minecraftserver.Vector2,
2972
- options?: CustomWidgetCreateOptions,
2973
- ): CustomWidget;
3122
+ addGuideComponent(componentName: string, options?: WidgetComponentGuideOptions): WidgetComponentGuide;
2974
3123
  /**
2975
3124
  * @remarks
2976
3125
  * This function can't be called in read-only mode.
2977
3126
  *
2978
3127
  * @throws This function can throw errors.
3128
+ *
3129
+ * {@link Error}
3130
+ *
3131
+ * {@link InvalidWidgetError}
2979
3132
  */
2980
- deleteWidget(widgetToDelete: Widget): void;
3133
+ addRenderPrimitiveComponent(
3134
+ componentName: string,
3135
+ primitiveType:
3136
+ | WidgetComponentRenderPrimitiveAxialSphere
3137
+ | WidgetComponentRenderPrimitiveBox
3138
+ | WidgetComponentRenderPrimitiveDisc
3139
+ | WidgetComponentRenderPrimitiveLine,
3140
+ options?: WidgetComponentRenderPrimitiveOptions,
3141
+ ): WidgetComponentRenderPrimitive;
2981
3142
  /**
2982
3143
  * @remarks
2983
3144
  * This function can't be called in read-only mode.
2984
3145
  *
3146
+ * @throws This function can throw errors.
3147
+ *
3148
+ * {@link Error}
3149
+ *
3150
+ * {@link InvalidWidgetError}
2985
3151
  */
2986
- deselectAllWidgets(): void;
3152
+ addSplineComponent(componentName: string, options?: WidgetComponentSplineOptions): WidgetComponentSpline;
2987
3153
  /**
2988
3154
  * @remarks
2989
3155
  * This function can't be called in read-only mode.
2990
3156
  *
3157
+ * @throws This function can throw errors.
3158
+ *
3159
+ * {@link Error}
3160
+ *
3161
+ * {@link InvalidWidgetError}
2991
3162
  */
2992
- getIsVisible(): boolean;
3163
+ addTextComponent(componentName: string, label: string, options?: WidgetComponentTextOptions): WidgetComponentText;
2993
3164
  /**
2994
3165
  * @remarks
2995
3166
  * This function can't be called in read-only mode.
2996
3167
  *
3168
+ * @throws This function can throw errors.
3169
+ *
3170
+ * {@link Error}
3171
+ *
3172
+ * {@link InvalidWidgetError}
3173
+ *
3174
+ * {@link InvalidWidgetGroupError}
2997
3175
  */
2998
- moveSelectedWidgets(delta: minecraftserver.Vector3): void;
3176
+ delete(): void;
2999
3177
  /**
3000
3178
  * @remarks
3001
3179
  * This function can't be called in read-only mode.
3002
3180
  *
3181
+ * @throws This function can throw errors.
3182
+ *
3183
+ * {@link Error}
3184
+ *
3185
+ * {@link InvalidWidgetComponentError}
3186
+ *
3187
+ * {@link InvalidWidgetError}
3003
3188
  */
3004
- selectAllWidgets(): void;
3189
+ deleteComponent(componentOrName: string | WidgetComponentBase): void;
3005
3190
  /**
3006
3191
  * @remarks
3007
3192
  * This function can't be called in read-only mode.
3008
3193
  *
3194
+ * @throws This function can throw errors.
3195
+ *
3196
+ * {@link Error}
3197
+ *
3198
+ * {@link InvalidWidgetError}
3009
3199
  */
3010
- setIsVisible(isVisible: boolean): void;
3011
- }
3012
-
3013
- export class WidgetManager {
3014
- private constructor();
3200
+ getComponent(componentName: string): WidgetComponentBase;
3015
3201
  /**
3016
3202
  * @remarks
3017
3203
  * This function can't be called in read-only mode.
3018
3204
  *
3019
3205
  * @throws This function can throw errors.
3206
+ *
3207
+ * {@link InvalidWidgetError}
3020
3208
  */
3021
- createGroup(options?: WidgetGroupCreateOptions): WidgetGroup;
3209
+ getComponents(): WidgetComponentBase[];
3022
3210
  /**
3023
3211
  * @remarks
3024
3212
  * This function can't be called in read-only mode.
3025
3213
  *
3026
3214
  * @throws This function can throw errors.
3215
+ *
3216
+ * {@link InvalidWidgetError}
3217
+ *
3218
+ * {@link InvalidWidgetError}
3027
3219
  */
3028
- deleteGroup(groupToDelete: WidgetGroup): void;
3220
+ setStateChangeEvent(eventFunction?: (arg: WidgetStateChangeEventData) => void): void;
3029
3221
  }
3030
3222
 
3031
- export class WidgetStateChangeEventData {
3223
+ export class WidgetComponentBase {
3032
3224
  private constructor();
3033
- readonly group: WidgetGroup;
3034
- readonly isSelected?: boolean;
3035
- readonly isVisible?: boolean;
3036
- readonly widget: Widget;
3037
- }
3038
-
3039
- export interface BrushPipelineOperation {
3040
- blockTypes: minecraftserver.BlockType[];
3041
- operation: BrushPipelineOperationType;
3042
- }
3043
-
3044
- export interface BrushShape {
3045
- icon: string;
3046
- name: string;
3047
- }
3048
-
3049
- /**
3050
- * Interface used to specify the options when a clipboard item
3051
- * is being written to the world
3052
- */
3053
- export interface ClipboardWriteOptions {
3225
+ /**
3226
+ * @throws This property can throw when used.
3227
+ *
3228
+ * {@link InvalidWidgetComponentError}
3229
+ */
3230
+ readonly componentType: WidgetComponentType;
3231
+ /**
3232
+ * @throws This property can throw when used.
3233
+ *
3234
+ * {@link minecraftserver.InvalidWidgetComponentError}
3235
+ */
3236
+ readonly location: minecraftserver.Vector3;
3237
+ /**
3238
+ * @throws This property can throw when used.
3239
+ *
3240
+ * {@link InvalidWidgetComponentError}
3241
+ */
3242
+ readonly name: string;
3054
3243
  /**
3055
3244
  * @remarks
3056
- * The anchor is a unit vector representation of the side or
3057
- * corner of the Clipboard Item to be written to the world.
3058
- * `{0, 0, 0}` represents the center of the Clipboard item,
3059
- * `{0, 1, 0}` represents the top, `{-1, -1, -1}` represents
3060
- * the bottom/back/left corner, etc
3061
- * The anchor is used in conjunction with the item size to
3062
- * determine the object relative anchor point where the object
3063
- * will be applied in the world.
3064
- * Values for the X/Y/Z components should be within the range
3065
- * `(-1 <= X/Y/Z <=1)`
3245
+ * This property can't be edited in read-only mode.
3066
3246
  *
3067
3247
  */
3068
- anchor?: minecraftserver.Vector3;
3248
+ offset: minecraftserver.Vector3;
3249
+ readonly valid: boolean;
3250
+ visible: boolean;
3251
+ /**
3252
+ * @throws This property can throw when used.
3253
+ *
3254
+ * {@link InvalidWidgetComponentError}
3255
+ */
3256
+ readonly widget: Widget;
3069
3257
  /**
3070
3258
  * @remarks
3071
- * An enum which represents the axis (or combination of axis')
3072
- * along which the item should be mirrored
3073
- * - X
3074
- * - Z
3075
- * - XZ
3259
+ * This function can't be called in read-only mode.
3260
+ *
3261
+ * @throws This function can throw errors.
3076
3262
  *
3263
+ * {@link InvalidWidgetComponentError}
3077
3264
  */
3078
- mirror?: minecraftserver.StructureMirrorAxis;
3265
+ delete(): void;
3266
+ }
3267
+
3268
+ // @ts-ignore Class inheritance allowed for native defined classes
3269
+ export class WidgetComponentEntity extends WidgetComponentBase {
3270
+ private constructor();
3079
3271
  /**
3080
3272
  * @remarks
3081
- * A position offset which should be applied to the paste
3082
- * location while the clipboard item is being written
3273
+ * This property can't be edited in read-only mode.
3083
3274
  *
3084
3275
  */
3085
- offset?: minecraftserver.Vector3;
3276
+ clickable: boolean;
3086
3277
  /**
3087
3278
  * @remarks
3088
- * An enum representing the rotation around the Y-Axis which
3089
- * should be applied while the clipboard item is being written
3279
+ * This function can't be called in read-only mode.
3090
3280
  *
3281
+ * @throws This function can throw errors.
3282
+ *
3283
+ * {@link InvalidWidgetComponentError}
3091
3284
  */
3092
- rotation?: minecraftserver.StructureRotation;
3285
+ playAnimation(animationName: string): void;
3093
3286
  }
3094
3287
 
3095
- export interface CursorAttachmentProperties {
3288
+ // @ts-ignore Class inheritance allowed for native defined classes
3289
+ export class WidgetComponentGizmo extends WidgetComponentBase {
3290
+ private constructor();
3291
+ }
3292
+
3293
+ // @ts-ignore Class inheritance allowed for native defined classes
3294
+ export class WidgetComponentGuide extends WidgetComponentBase {
3295
+ private constructor();
3296
+ }
3297
+
3298
+ // @ts-ignore Class inheritance allowed for native defined classes
3299
+ export class WidgetComponentRenderPrimitive extends WidgetComponentBase {
3300
+ private constructor();
3301
+ /**
3302
+ * @remarks
3303
+ * This function can't be called in read-only mode.
3304
+ *
3305
+ * @throws This function can throw errors.
3306
+ *
3307
+ * {@link InvalidWidgetComponentError}
3308
+ *
3309
+ * {@link InvalidWidgetError}
3310
+ */
3311
+ setPrimitive(
3312
+ primitive:
3313
+ | WidgetComponentRenderPrimitiveAxialSphere
3314
+ | WidgetComponentRenderPrimitiveBox
3315
+ | WidgetComponentRenderPrimitiveDisc
3316
+ | WidgetComponentRenderPrimitiveLine,
3317
+ ): void;
3318
+ }
3319
+
3320
+ export class WidgetComponentRenderPrimitiveAxialSphere {
3321
+ /**
3322
+ * @remarks
3323
+ * This property can't be edited in read-only mode.
3324
+ *
3325
+ */
3326
+ center: minecraftserver.Vector3;
3327
+ /**
3328
+ * @remarks
3329
+ * This property can't be edited in read-only mode.
3330
+ *
3331
+ */
3332
+ color?: minecraftserver.RGBA;
3333
+ /**
3334
+ * @remarks
3335
+ * This property can't be edited in read-only mode.
3336
+ *
3337
+ */
3338
+ radius: number;
3339
+ constructor(center: minecraftserver.Vector3, radius: number, color?: minecraftserver.RGBA);
3340
+ }
3341
+
3342
+ export class WidgetComponentRenderPrimitiveBox {
3343
+ /**
3344
+ * @remarks
3345
+ * This property can't be edited in read-only mode.
3346
+ *
3347
+ */
3348
+ center: minecraftserver.Vector3;
3349
+ /**
3350
+ * @remarks
3351
+ * This property can't be edited in read-only mode.
3352
+ *
3353
+ */
3354
+ color: minecraftserver.RGBA;
3355
+ /**
3356
+ * @remarks
3357
+ * This property can't be edited in read-only mode.
3358
+ *
3359
+ */
3360
+ size?: minecraftserver.Vector3;
3361
+ constructor(center: minecraftserver.Vector3, color: minecraftserver.RGBA, size?: minecraftserver.Vector3);
3362
+ }
3363
+
3364
+ export class WidgetComponentRenderPrimitiveDisc {
3365
+ /**
3366
+ * @remarks
3367
+ * This property can't be edited in read-only mode.
3368
+ *
3369
+ */
3370
+ center: minecraftserver.Vector3;
3371
+ /**
3372
+ * @remarks
3373
+ * This property can't be edited in read-only mode.
3374
+ *
3375
+ */
3376
+ color: minecraftserver.RGBA;
3377
+ /**
3378
+ * @remarks
3379
+ * This property can't be edited in read-only mode.
3380
+ *
3381
+ */
3382
+ radius: number;
3383
+ constructor(center: minecraftserver.Vector3, radius: number, color: minecraftserver.RGBA);
3384
+ }
3385
+
3386
+ export class WidgetComponentRenderPrimitiveLine {
3387
+ /**
3388
+ * @remarks
3389
+ * This property can't be edited in read-only mode.
3390
+ *
3391
+ */
3392
+ color: minecraftserver.RGBA;
3393
+ /**
3394
+ * @remarks
3395
+ * This property can't be edited in read-only mode.
3396
+ *
3397
+ */
3398
+ end: minecraftserver.Vector3;
3399
+ /**
3400
+ * @remarks
3401
+ * This property can't be edited in read-only mode.
3402
+ *
3403
+ */
3404
+ start: minecraftserver.Vector3;
3405
+ constructor(start: minecraftserver.Vector3, end: minecraftserver.Vector3, color: minecraftserver.RGBA);
3406
+ }
3407
+
3408
+ // @ts-ignore Class inheritance allowed for native defined classes
3409
+ export class WidgetComponentSpline extends WidgetComponentBase {
3410
+ private constructor();
3411
+ /**
3412
+ * @remarks
3413
+ * This property can't be edited in read-only mode.
3414
+ *
3415
+ */
3416
+ splineType: SplineType;
3417
+ /**
3418
+ * @remarks
3419
+ * This function can't be called in read-only mode.
3420
+ *
3421
+ * @throws This function can throw errors.
3422
+ *
3423
+ * {@link Error}
3424
+ *
3425
+ * {@link InvalidWidgetComponentError}
3426
+ *
3427
+ * {@link InvalidWidgetError}
3428
+ */
3429
+ getControlPoints(): Widget[];
3430
+ /**
3431
+ * @remarks
3432
+ * This function can't be called in read-only mode.
3433
+ *
3434
+ * @throws This function can throw errors.
3435
+ *
3436
+ * {@link Error}
3437
+ *
3438
+ * {@link InvalidWidgetComponentError}
3439
+ *
3440
+ * {@link InvalidWidgetError}
3441
+ */
3442
+ getInterpolatedPoints(maxPointsPerControlSegment?: number): minecraftserver.Vector3[];
3443
+ /**
3444
+ * @remarks
3445
+ * This function can't be called in read-only mode.
3446
+ *
3447
+ * @throws This function can throw errors.
3448
+ *
3449
+ * {@link InvalidWidgetComponentError}
3450
+ *
3451
+ * {@link InvalidWidgetError}
3452
+ */
3453
+ setControlPoints(widgetList: Widget[]): void;
3454
+ }
3455
+
3456
+ // @ts-ignore Class inheritance allowed for native defined classes
3457
+ export class WidgetComponentText extends WidgetComponentBase {
3458
+ private constructor();
3459
+ /**
3460
+ * @remarks
3461
+ * This property can't be edited in read-only mode.
3462
+ *
3463
+ */
3464
+ color: minecraftserver.RGBA;
3465
+ /**
3466
+ * @remarks
3467
+ * This property can't be edited in read-only mode.
3468
+ *
3469
+ */
3470
+ label: string;
3471
+ }
3472
+
3473
+ export class WidgetGroup {
3474
+ private constructor();
3475
+ /**
3476
+ * @throws This property can throw when used.
3477
+ *
3478
+ * {@link InvalidWidgetGroupError}
3479
+ */
3480
+ readonly selectedWidgetCount: number;
3481
+ /**
3482
+ * @remarks
3483
+ * This property can't be edited in read-only mode.
3484
+ *
3485
+ */
3486
+ visible: boolean;
3487
+ /**
3488
+ * @remarks
3489
+ * This property can't be edited in read-only mode.
3490
+ *
3491
+ */
3492
+ visibleBounds: boolean;
3493
+ /**
3494
+ * @remarks
3495
+ * This function can't be called in read-only mode.
3496
+ *
3497
+ * @throws This function can throw errors.
3498
+ *
3499
+ * {@link InvalidWidgetGroupError}
3500
+ */
3501
+ createWidget(location: minecraftserver.Vector3, options?: WidgetCreateOptions): Widget;
3502
+ /**
3503
+ * @remarks
3504
+ * This function can't be called in read-only mode.
3505
+ *
3506
+ */
3507
+ delete(): void;
3508
+ /**
3509
+ * @remarks
3510
+ * This function can't be called in read-only mode.
3511
+ *
3512
+ * @throws This function can throw errors.
3513
+ *
3514
+ * {@link Error}
3515
+ *
3516
+ * {@link InvalidWidgetError}
3517
+ *
3518
+ * {@link InvalidWidgetGroupError}
3519
+ */
3520
+ deleteWidget(widgetToDelete: Widget): void;
3521
+ /**
3522
+ * @remarks
3523
+ * This function can't be called in read-only mode.
3524
+ *
3525
+ * @throws This function can throw errors.
3526
+ *
3527
+ * {@link InvalidWidgetGroupError}
3528
+ */
3529
+ deselectAllWidgets(): void;
3530
+ /**
3531
+ * @remarks
3532
+ * This function can't be called in read-only mode.
3533
+ *
3534
+ * @throws This function can throw errors.
3535
+ *
3536
+ * {@link InvalidWidgetGroupError}
3537
+ */
3538
+ selectAllWidgets(): void;
3539
+ }
3540
+
3541
+ export class WidgetManager {
3542
+ private constructor();
3543
+ /**
3544
+ * @remarks
3545
+ * This function can't be called in read-only mode.
3546
+ *
3547
+ * @throws This function can throw errors.
3548
+ *
3549
+ * {@link Error}
3550
+ */
3551
+ createGroup(options?: WidgetGroupCreateOptions): WidgetGroup;
3552
+ /**
3553
+ * @remarks
3554
+ * This function can't be called in read-only mode.
3555
+ *
3556
+ * @throws This function can throw errors.
3557
+ *
3558
+ * {@link Error}
3559
+ *
3560
+ * {@link InvalidWidgetGroupError}
3561
+ */
3562
+ deleteGroup(groupToDelete: WidgetGroup): void;
3563
+ }
3564
+
3565
+ export class WidgetStateChangeEventData {
3566
+ private constructor();
3567
+ readonly group: WidgetGroup;
3568
+ readonly location?: minecraftserver.Vector3;
3569
+ readonly selected?: boolean;
3570
+ readonly visible?: boolean;
3571
+ readonly widget: Widget;
3572
+ }
3573
+
3574
+ export interface BrushPipelineOperation {
3575
+ blockTypes: minecraftserver.BlockType[];
3576
+ operation: BrushPipelineOperationType;
3577
+ }
3578
+
3579
+ export interface BrushShape {
3580
+ icon: string;
3581
+ name: string;
3582
+ }
3583
+
3584
+ /**
3585
+ * Interface used to specify the options when a clipboard item
3586
+ * is being written to the world
3587
+ */
3588
+ export interface ClipboardWriteOptions {
3589
+ /**
3590
+ * @remarks
3591
+ * The anchor is a unit vector representation of the side or
3592
+ * corner of the Clipboard Item to be written to the world.
3593
+ * `{0, 0, 0}` represents the center of the Clipboard item,
3594
+ * `{0, 1, 0}` represents the top, `{-1, -1, -1}` represents
3595
+ * the bottom/back/left corner, etc
3596
+ * The anchor is used in conjunction with the item size to
3597
+ * determine the object relative anchor point where the object
3598
+ * will be applied in the world.
3599
+ * Values for the X/Y/Z components should be within the range
3600
+ * `(-1 <= X/Y/Z <=1)`
3601
+ *
3602
+ */
3603
+ anchor?: minecraftserver.Vector3;
3604
+ /**
3605
+ * @remarks
3606
+ * An enum which represents the axis (or combination of axis')
3607
+ * along which the item should be mirrored
3608
+ * - X
3609
+ * - Z
3610
+ * - XZ
3611
+ *
3612
+ */
3613
+ mirror?: minecraftserver.StructureMirrorAxis;
3614
+ /**
3615
+ * @remarks
3616
+ * A position offset which should be applied to the paste
3617
+ * location while the clipboard item is being written
3618
+ *
3619
+ */
3620
+ offset?: minecraftserver.Vector3;
3621
+ /**
3622
+ * @remarks
3623
+ * An enum representing the rotation around the Y-Axis which
3624
+ * should be applied while the clipboard item is being written
3625
+ *
3626
+ */
3627
+ rotation?: minecraftserver.StructureRotation;
3628
+ }
3629
+
3630
+ export interface CursorAttachmentProperties {
3096
3631
  boundsFillColor?: minecraftserver.RGBA;
3097
3632
  boundsVisible?: boolean;
3098
3633
  boundsWireframeColor?: minecraftserver.RGBA;
@@ -3174,14 +3709,6 @@ export interface CursorProperties {
3174
3709
  visible?: boolean;
3175
3710
  }
3176
3711
 
3177
- // @ts-ignore Class inheritance allowed for native defined classes
3178
- export interface CustomWidgetCreateOptions extends WidgetCreateOptions {
3179
- moveEvent?: (arg: CustomWidgetMoveEventData) => void;
3180
- showTextOnlyWhenSelected?: boolean;
3181
- text?: string;
3182
- visualOffset?: minecraftserver.Vector3;
3183
- }
3184
-
3185
3712
  /**
3186
3713
  * An interface which defines the set of optional parameters
3187
3714
  * which can be used when calling the `registerEditorExtension`
@@ -3310,14 +3837,42 @@ export interface WeightedBlock {
3310
3837
  weight: number;
3311
3838
  }
3312
3839
 
3313
- export interface WidgetCreateOptions {
3314
- initialVisibility?: boolean;
3315
- isSelectable?: boolean;
3316
- stateChangeEvent?: (arg: WidgetStateChangeEventData) => void;
3840
+ export interface WidgetComponentBaseOptions {
3841
+ offset?: minecraftserver.Vector3;
3842
+ visible?: boolean;
3843
+ }
3844
+
3845
+ // @ts-ignore Class inheritance allowed for native defined classes
3846
+ export interface WidgetComponentEntityOptions extends WidgetComponentBaseOptions {
3847
+ deselectedAnimation?: string;
3848
+ isClickable?: boolean;
3849
+ selectedAnimation?: string;
3850
+ }
3851
+
3852
+ // @ts-ignore Class inheritance allowed for native defined classes
3853
+ export interface WidgetComponentGizmoOptions extends WidgetComponentBaseOptions {}
3854
+
3855
+ // @ts-ignore Class inheritance allowed for native defined classes
3856
+ export interface WidgetComponentGuideOptions extends WidgetComponentBaseOptions {}
3857
+
3858
+ // @ts-ignore Class inheritance allowed for native defined classes
3859
+ export interface WidgetComponentRenderPrimitiveOptions extends WidgetComponentBaseOptions {}
3860
+
3861
+ // @ts-ignore Class inheritance allowed for native defined classes
3862
+ export interface WidgetComponentSplineOptions extends WidgetComponentBaseOptions {
3863
+ controlPoints: Widget[];
3864
+ splineType?: SplineType;
3865
+ }
3866
+
3867
+ // @ts-ignore Class inheritance allowed for native defined classes
3868
+ export interface WidgetComponentTextOptions extends WidgetComponentBaseOptions {
3869
+ color?: minecraftserver.RGBA;
3317
3870
  }
3318
3871
 
3319
3872
  export interface WidgetGroupCreateOptions {
3320
3873
  groupSelectionMode?: WidgetGroupSelectionMode;
3874
+ showBounds?: boolean;
3875
+ visible?: boolean;
3321
3876
  }
3322
3877
 
3323
3878
  /**
@@ -3626,46 +4181,292 @@ export interface IButtonPropertyItemOptions extends IPropertyItemOptionsBase {
3626
4181
  * Localized title of the property item.
3627
4182
  *
3628
4183
  */
3629
- title?: LocalizedString;
4184
+ title?: LocalizedString;
4185
+ /**
4186
+ * @remarks
4187
+ * Tooltip description of the property item.
4188
+ *
4189
+ */
4190
+ tooltip?: LocalizedString;
4191
+ /**
4192
+ * @remarks
4193
+ * The variant for the button. By default it is Primary.
4194
+ *
4195
+ */
4196
+ variant?: ButtonPropertyItemVariant;
4197
+ }
4198
+
4199
+ /**
4200
+ * A property item which supports Color Picker properties
4201
+ */
4202
+ // @ts-ignore Class inheritance allowed for native defined classes
4203
+ export interface IColorPickerPropertyItem extends IPropertyItemBase {
4204
+ /**
4205
+ * @remarks
4206
+ * Current value of the property item.
4207
+ *
4208
+ */
4209
+ readonly value: minecraftserver.RGBA;
4210
+ /**
4211
+ * @remarks
4212
+ * Updates title of the property item.
4213
+ *
4214
+ * @param title
4215
+ * New title.
4216
+ */
4217
+ setTitle(title: LocalizedString | undefined): void;
4218
+ /**
4219
+ * @remarks
4220
+ * Updates tooltip of the property item.
4221
+ *
4222
+ * @param tooltip
4223
+ * New tooltip.
4224
+ */
4225
+ setTooltip(tooltip: LocalizedString | undefined): void;
4226
+ }
4227
+
4228
+ /**
4229
+ * Optional properties for Color Picker property item
4230
+ */
4231
+ // @ts-ignore Class inheritance allowed for native defined classes
4232
+ export interface IColorPickerPropertyItemOptions extends IPropertyItemOptionsBase {
4233
+ /**
4234
+ * @remarks
4235
+ * If true alpha control will be hidden. If undefined, it will
4236
+ * default to false.
4237
+ *
4238
+ */
4239
+ hiddenAlpha?: boolean;
4240
+ /**
4241
+ * @remarks
4242
+ * If true label text will be hidden. It will be visible by
4243
+ * default.
4244
+ *
4245
+ */
4246
+ hiddenLabel?: boolean;
4247
+ /**
4248
+ * @remarks
4249
+ * This callback is called when UI control value is changed.
4250
+ *
4251
+ */
4252
+ onChange?: (newValue: minecraftserver.RGBA, oldValue: minecraftserver.RGBA) => void;
4253
+ /**
4254
+ * @remarks
4255
+ * Localized title of the property item.
4256
+ *
4257
+ */
4258
+ title?: LocalizedString;
4259
+ /**
4260
+ * @remarks
4261
+ * Tooltip description of the property item.
4262
+ *
4263
+ */
4264
+ tooltip?: LocalizedString;
4265
+ /**
4266
+ * @remarks
4267
+ * The variant for the button. By default it is Primary.
4268
+ *
4269
+ */
4270
+ variant?: ColorPickerPropertyItemVariant;
4271
+ }
4272
+
4273
+ /**
4274
+ * A property item which supports Combo Box properties
4275
+ */
4276
+ // @ts-ignore Class inheritance allowed for native defined classes
4277
+ export interface IComboBoxPropertyItem extends IPropertyItemBase {
4278
+ /**
4279
+ * @remarks
4280
+ * Current value of the property item.
4281
+ *
4282
+ */
4283
+ readonly value: string;
4284
+ /**
4285
+ * @remarks
4286
+ * Updates title of the property item.
4287
+ *
4288
+ * @param title
4289
+ * New title.
4290
+ */
4291
+ setTitle(title: LocalizedString | undefined): void;
4292
+ /**
4293
+ * @remarks
4294
+ * Updates tooltip of the property item.
4295
+ *
4296
+ * @param tooltip
4297
+ * New tooltip.
4298
+ */
4299
+ setTooltip(tooltip: LocalizedString | undefined): void;
4300
+ }
4301
+
4302
+ /**
4303
+ * Optional properties for ComboBox property item
4304
+ */
4305
+ // @ts-ignore Class inheritance allowed for native defined classes
4306
+ export interface IComboBoxPropertyItemOptions extends IPropertyItemOptionsBase {
4307
+ /**
4308
+ * @remarks
4309
+ * Possible data types supported by combo box. If undefined, it
4310
+ * will be Custom by default.
4311
+ *
4312
+ */
4313
+ dataType?: ComboBoxPropertyItemDataType;
4314
+ /**
4315
+ * @remarks
4316
+ * Default value to fall back to if entry is not found. If
4317
+ * undefined, data type will determine the default value (empty
4318
+ * string for Custom data type).
4319
+ *
4320
+ */
4321
+ defaultValue?: string;
4322
+ /**
4323
+ * @remarks
4324
+ * List of combo box entries. If undefined, data type will
4325
+ * determine the default list (empty list for Custom data
4326
+ * type).
4327
+ *
4328
+ */
4329
+ entries?: string[];
4330
+ /**
4331
+ * @remarks
4332
+ * If true label text will be hidden. It will be visible by
4333
+ * default.
4334
+ *
4335
+ */
4336
+ hiddenLabel?: boolean;
4337
+ /**
4338
+ * @remarks
4339
+ * This callback is called when UI control value is changed.
4340
+ *
4341
+ */
4342
+ onChange?: (newValue: string, oldValue: string) => void;
4343
+ /**
4344
+ * @remarks
4345
+ * If true the image for the selected value will be displayed
4346
+ * (if data type supports it). If undefined, it will default to
4347
+ * false.
4348
+ *
4349
+ */
4350
+ showImage?: boolean;
4351
+ /**
4352
+ * @remarks
4353
+ * Localized title of the property item.
4354
+ *
4355
+ */
4356
+ title?: LocalizedString;
4357
+ /**
4358
+ * @remarks
4359
+ * Tooltip description of the property item.
4360
+ *
4361
+ */
4362
+ tooltip?: LocalizedString;
4363
+ }
4364
+
4365
+ /**
4366
+ * Simple abstraction for disposable objects.
4367
+ */
4368
+ export interface IDisposable {
4369
+ /**
4370
+ * @remarks
4371
+ * Initiates the teardown and cleanup of this disposable item.
4372
+ *
4373
+ */
4374
+ teardown(): void;
4375
+ }
4376
+
4377
+ /**
4378
+ * Properties of dropdown property item children
4379
+ */
4380
+ export interface IDropdownItem {
4381
+ /**
4382
+ * @remarks
4383
+ * Localized display text of the dropdown item.
4384
+ *
4385
+ */
4386
+ readonly label: string;
4387
+ /**
4388
+ * @remarks
4389
+ * The selectable value of the dropdown item.
4390
+ *
4391
+ */
4392
+ readonly value: number;
4393
+ }
4394
+
4395
+ /**
4396
+ * A property item which supports Dropdown properties
4397
+ */
4398
+ // @ts-ignore Class inheritance allowed for native defined classes
4399
+ export interface IDropdownPropertyItem extends IPropertyItemBase {
4400
+ /**
4401
+ * @remarks
4402
+ * Current selected entry value of the property item list.
4403
+ *
4404
+ */
4405
+ readonly value: number;
4406
+ /**
4407
+ * @remarks
4408
+ * Find a dropdown entry at an index in the dropdown list.
4409
+ *
4410
+ * @param index
4411
+ * Index of the dropdown entry in the list.
4412
+ */
4413
+ getEntryByIndex(index: number): IDropdownPropertyItemEntry | undefined;
4414
+ /**
4415
+ * @remarks
4416
+ * Find a dropdown entry with a specific value associated with
4417
+ * property item.
4418
+ *
4419
+ * @param value
4420
+ * Value of the dropdown entry in the list.
4421
+ */
4422
+ getEntryByValue(value: number): IDropdownPropertyItemEntry | undefined;
4423
+ /**
4424
+ * @remarks
4425
+ * Updates title of the property item.
4426
+ *
4427
+ * @param title
4428
+ * New title.
4429
+ */
4430
+ setTitle(title: LocalizedString | undefined): void;
3630
4431
  /**
3631
4432
  * @remarks
3632
- * Tooltip description of the property item.
4433
+ * Updates tooltip of the property item.
3633
4434
  *
4435
+ * @param tooltip
4436
+ * New tooltip.
3634
4437
  */
3635
- tooltip?: LocalizedString;
4438
+ setTooltip(tooltip: LocalizedString | undefined): void;
3636
4439
  /**
3637
4440
  * @remarks
3638
- * The variant for the button. By default it is Primary.
4441
+ * Update list of dropdown entries.
3639
4442
  *
4443
+ * @param entries
4444
+ * New list of updated entries.
4445
+ * @param newValue
4446
+ * New value value to use for the dropdown.
3640
4447
  */
3641
- variant?: ButtonPropertyItemVariant;
4448
+ updateEntries(entries: IDropdownPropertyItemEntry[], newValue?: number): void;
3642
4449
  }
3643
4450
 
3644
4451
  /**
3645
- * Simple abstraction for disposable objects.
4452
+ * Properties of dropdown property item menu entry
3646
4453
  */
3647
- export interface IDisposable {
4454
+ export interface IDropdownPropertyItemEntry {
3648
4455
  /**
3649
4456
  * @remarks
3650
- * Initiates the teardown and cleanup of this disposable item.
4457
+ * Optional image of the dropdown entry.
3651
4458
  *
3652
4459
  */
3653
- teardown(): void;
3654
- }
3655
-
3656
- /**
3657
- * Properties of dropdown property item children
3658
- */
3659
- export interface IDropdownItem {
4460
+ readonly imageData?: ImageResourceData;
3660
4461
  /**
3661
4462
  * @remarks
3662
- * Localized display text of the dropdown item.
4463
+ * Localized display text of the entry.
3663
4464
  *
3664
4465
  */
3665
4466
  readonly label: string;
3666
4467
  /**
3667
4468
  * @remarks
3668
- * The selectable value of the dropdown item.
4469
+ * The selectable value of the entry.
3669
4470
  *
3670
4471
  */
3671
4472
  readonly value: number;
@@ -3685,6 +4486,45 @@ export interface IDropdownPropertyItemMixIn {
3685
4486
  updateDropdownItems(dropdownItems: IDropdownItem[], newValue: number): void;
3686
4487
  }
3687
4488
 
4489
+ /**
4490
+ * Optional properties for Dropdown property item
4491
+ */
4492
+ // @ts-ignore Class inheritance allowed for native defined classes
4493
+ export interface IDropdownPropertyItemOptions extends IPropertyItemOptionsBase {
4494
+ /**
4495
+ * @remarks
4496
+ * List of dropdown entries associated with the property item.
4497
+ * If undefined, list will be empty.
4498
+ *
4499
+ */
4500
+ entries?: IDropdownPropertyItemEntry[];
4501
+ /**
4502
+ * @remarks
4503
+ * If true label text will be hidden. It will be visible by
4504
+ * default.
4505
+ *
4506
+ */
4507
+ hiddenLabel?: boolean;
4508
+ /**
4509
+ * @remarks
4510
+ * This callback is called when UI control value is changed.
4511
+ *
4512
+ */
4513
+ onChange?: (newValue: number, oldValue: number, items: IDropdownPropertyItemEntry[]) => void;
4514
+ /**
4515
+ * @remarks
4516
+ * Localized title of the property item.
4517
+ *
4518
+ */
4519
+ title?: LocalizedString;
4520
+ /**
4521
+ * @remarks
4522
+ * Tooltip description of the property item.
4523
+ *
4524
+ */
4525
+ tooltip?: LocalizedString;
4526
+ }
4527
+
3688
4528
  /**
3689
4529
  * Returned from an event subscription. Provides functionality
3690
4530
  * for cleaning up listeners
@@ -3904,6 +4744,101 @@ export interface IModalToolContainer {
3904
4744
  show(): void;
3905
4745
  }
3906
4746
 
4747
+ /**
4748
+ * A property item which supports Number properties
4749
+ */
4750
+ // @ts-ignore Class inheritance allowed for native defined classes
4751
+ export interface INumberPropertyItem extends IPropertyItemBase {
4752
+ /**
4753
+ * @remarks
4754
+ * Current value of the property item.
4755
+ *
4756
+ */
4757
+ readonly value: Readonly<number>;
4758
+ /**
4759
+ * @remarks
4760
+ * Updates title of the property item.
4761
+ *
4762
+ * @param title
4763
+ * New title.
4764
+ */
4765
+ setTitle(title: LocalizedString | undefined): void;
4766
+ /**
4767
+ * @remarks
4768
+ * Updates tooltip description of property item.
4769
+ *
4770
+ * @param tooltip
4771
+ * New tooltip.
4772
+ */
4773
+ setTooltip(tooltip: LocalizedString | undefined): void;
4774
+ /**
4775
+ * @remarks
4776
+ * Updates number limits and clamps the current value.
4777
+ *
4778
+ */
4779
+ updateLimits(limits: { min?: number; max?: number }): void;
4780
+ }
4781
+
4782
+ /**
4783
+ * Optional properties for Number property item
4784
+ */
4785
+ // @ts-ignore Class inheritance allowed for native defined classes
4786
+ export interface INumberPropertyItemOptions extends IPropertyItemOptionsBase {
4787
+ /**
4788
+ * @remarks
4789
+ * If true label text will be hidden. If undefined, the label
4790
+ * will be visible by default.
4791
+ *
4792
+ */
4793
+ hiddenLabel?: boolean;
4794
+ /**
4795
+ * @remarks
4796
+ * If we should treat the number as integer. By default is
4797
+ * false.
4798
+ *
4799
+ */
4800
+ isInteger?: boolean;
4801
+ /**
4802
+ * @remarks
4803
+ * The min possible number. If undefined,
4804
+ * Number.MAX_SAFE_INTEGER will be used.
4805
+ *
4806
+ */
4807
+ max?: number;
4808
+ /**
4809
+ * @remarks
4810
+ * The min possible number. If undefined,
4811
+ * Number.MIN_SAFE_INTEGER will be used.
4812
+ *
4813
+ */
4814
+ min?: number;
4815
+ /**
4816
+ * @remarks
4817
+ * This callback is called when UI control value is changed.
4818
+ *
4819
+ */
4820
+ onChange?: (newValue: number, oldValue: number) => void;
4821
+ /**
4822
+ * @remarks
4823
+ * Localized title of the property item.
4824
+ *
4825
+ */
4826
+ title?: LocalizedString;
4827
+ /**
4828
+ * @remarks
4829
+ * Tooltip description of the property item.
4830
+ *
4831
+ */
4832
+ tooltip?: LocalizedString;
4833
+ /**
4834
+ * @remarks
4835
+ * Determines how we display bool as a UI element. If
4836
+ * undefined, it will default to InputField.
4837
+ *
4838
+ */
4839
+ variant?: NumberPropertyItemVariant;
4840
+ }
4841
+
3907
4842
  /**
3908
4843
  * Represents a stateful value that can be observed by
3909
4844
  * different objects.
@@ -4092,19 +5027,9 @@ export interface IPropertyItemOptionsBool extends IPropertyItemOptions {
4092
5027
  }
4093
5028
 
4094
5029
  // @ts-ignore Class inheritance allowed for native defined classes
4095
- export interface IPropertyItemOptionsColorPicker extends IPropertyItemOptions {
5030
+ export interface IPropertyItemOptionsColorPicker_deprecated extends IPropertyItemOptions {
4096
5031
  showAlpha?: boolean;
4097
- variant?: ColorPickerVariant;
4098
- }
4099
-
4100
- // @ts-ignore Class inheritance allowed for native defined classes
4101
- export interface IPropertyItemOptionsDataPicker extends IPropertyItemOptions {
4102
- /**
4103
- * @remarks
4104
- * Used to hold the entries allowed in the block/entity picker
4105
- *
4106
- */
4107
- allowedEntries?: string[];
5032
+ variant?: ColorPickerPropertyItemVariant;
4108
5033
  }
4109
5034
 
4110
5035
  // @ts-ignore Class inheritance allowed for native defined classes
@@ -4267,16 +5192,6 @@ export interface IPropertyPane {
4267
5192
  },
4268
5193
  'EMPTY'
4269
5194
  >;
4270
- /**
4271
- * @remarks
4272
- * Adds a BlockPicker item to the pane.
4273
- *
4274
- */
4275
- addBlockPicker<T extends PropertyBag, Prop extends keyof T & string>(
4276
- obj: T,
4277
- property: Prop,
4278
- options?: IPropertyItemOptionsDataPicker,
4279
- ): IPropertyItem<T, Prop>;
4280
5195
  /**
4281
5196
  * @remarks
4282
5197
  */
@@ -4306,23 +5221,44 @@ export interface IPropertyPane {
4306
5221
  * Adds a color picker item to the pane.
4307
5222
  *
4308
5223
  */
4309
- addColorPicker<T extends PropertyBag, Prop extends keyof T & string>(
5224
+ addColorPicker(
5225
+ value: IObservableProp<minecraftserver.RGBA>,
5226
+ options?: IColorPickerPropertyItemOptions,
5227
+ ): IColorPickerPropertyItem;
5228
+ /**
5229
+ * @remarks
5230
+ * Adds a color picker item to the pane.
5231
+ *
5232
+ */
5233
+ addColorPicker_deprecated<T extends PropertyBag, Prop extends keyof T & string>(
4310
5234
  obj: T,
4311
5235
  property: Prop,
4312
- options?: IPropertyItemOptionsColorPicker,
5236
+ options?: IPropertyItemOptionsColorPicker_deprecated,
4313
5237
  ): IPropertyItem<T, Prop>;
5238
+ /**
5239
+ * @remarks
5240
+ * Adds a combo box item to the pane.
5241
+ *
5242
+ */
5243
+ addComboBox(value: IObservableProp<string>, options?: IComboBoxPropertyItemOptions): IComboBoxPropertyItem;
4314
5244
  /**
4315
5245
  * @remarks
4316
5246
  * Adds an divider item to the pane.
4317
5247
  *
4318
5248
  */
4319
5249
  addDivider(): IPropertyItemBase;
5250
+ /**
5251
+ * @remarks
5252
+ * Adds an Dropdown item to the pane.
5253
+ *
5254
+ */
5255
+ addDropdown(value: IObservableProp<number>, options?: IDropdownPropertyItemOptions): IDropdownPropertyItem;
4320
5256
  /**
4321
5257
  * @remarks
4322
5258
  * Adds an DropDown item to the pane.
4323
5259
  *
4324
5260
  */
4325
- addDropdown<
5261
+ addDropdown_deprecated<
4326
5262
  T extends Omit<PropertyBag, Prop> & {
4327
5263
  [key in Prop]: number;
4328
5264
  },
@@ -4331,17 +5267,7 @@ export interface IPropertyPane {
4331
5267
  obj: T,
4332
5268
  property: Prop,
4333
5269
  options?: IPropertyItemOptionsDropdown,
4334
- ): IDropdownPropertyItem<T, Prop>;
4335
- /**
4336
- * @remarks
4337
- * Adds an EntityPicker item to the pane.
4338
- *
4339
- */
4340
- addEntityPicker<T extends PropertyBag, Prop extends keyof T & string>(
4341
- obj: T,
4342
- property: Prop,
4343
- options?: IPropertyItemOptionsDataPicker,
4344
- ): IPropertyItem<T, Prop>;
5270
+ ): IDropdownPropertyItem_deprecated<T, Prop>;
4345
5271
  /**
4346
5272
  * @remarks
4347
5273
  * Adds an image item to the pane.
@@ -4356,17 +5282,27 @@ export interface IPropertyPane {
4356
5282
  * Adds a number item to the pane.
4357
5283
  *
4358
5284
  */
4359
- addNumber<T extends PropertyBag, Prop extends keyof T & string>(
5285
+ addNumber(value: IObservableProp<number>, options?: INumberPropertyItemOptions): INumberPropertyItem;
5286
+ /**
5287
+ * @remarks
5288
+ * Adds a number item to the pane.
5289
+ *
5290
+ */
5291
+ addNumber_deprecated<T extends PropertyBag, Prop extends keyof T & string>(
4360
5292
  obj: T,
4361
5293
  property: Prop,
4362
5294
  options?: IPropertyItemOptionsNumber,
4363
5295
  ): IPropertyItem<T, Prop>;
5296
+ /**
5297
+ * @remarks
5298
+ */
5299
+ addString(value: IObservableProp<string>, options?: IStringPropertyItemOptions): IStringPropertyItem;
4364
5300
  /**
4365
5301
  * @remarks
4366
5302
  * Adds a string item to the pane
4367
5303
  *
4368
5304
  */
4369
- addString<T extends PropertyBag, Prop extends keyof T & string>(
5305
+ addString_deprecated<T extends PropertyBag, Prop extends keyof T & string>(
4370
5306
  obj: T,
4371
5307
  property: Prop,
4372
5308
  options?: IPropertyItemOptions,
@@ -5001,6 +5937,73 @@ export interface IStatusBarItem {
5001
5937
  show(): void;
5002
5938
  }
5003
5939
 
5940
+ /**
5941
+ * A property item which supports String properties
5942
+ */
5943
+ // @ts-ignore Class inheritance allowed for native defined classes
5944
+ export interface IStringPropertyItem extends IPropertyItemBase {
5945
+ /**
5946
+ * @remarks
5947
+ * Current value of the property item.
5948
+ *
5949
+ */
5950
+ readonly value: Readonly<string>;
5951
+ /**
5952
+ * @remarks
5953
+ * Updates title of the property item.
5954
+ *
5955
+ * @param title
5956
+ * New title.
5957
+ */
5958
+ setTitle(title: LocalizedString | undefined): void;
5959
+ /**
5960
+ * @remarks
5961
+ * Updates tooltip description of property item.
5962
+ *
5963
+ * @param tooltip
5964
+ * New tooltip.
5965
+ */
5966
+ setTooltip(tooltip: LocalizedString | undefined): void;
5967
+ }
5968
+
5969
+ /**
5970
+ * Optional properties for String property item
5971
+ */
5972
+ // @ts-ignore Class inheritance allowed for native defined classes
5973
+ export interface IStringPropertyItemOptions extends IPropertyItemOptionsBase {
5974
+ /**
5975
+ * @remarks
5976
+ * If true label text will be hidden. If undefined, the label
5977
+ * will be visible by default.
5978
+ *
5979
+ */
5980
+ hiddenLabel?: boolean;
5981
+ /**
5982
+ * @remarks
5983
+ * This callback is called when UI control value is changed.
5984
+ *
5985
+ */
5986
+ onChange?: (newValue: string, oldValue: string) => void;
5987
+ /**
5988
+ * @remarks
5989
+ * Optional regular expression pattern to validate string.
5990
+ *
5991
+ */
5992
+ regexPattern?: string;
5993
+ /**
5994
+ * @remarks
5995
+ * Localized title of the property item.
5996
+ *
5997
+ */
5998
+ title?: LocalizedString;
5999
+ /**
6000
+ * @remarks
6001
+ * Tooltip description of the property item.
6002
+ *
6003
+ */
6004
+ tooltip?: LocalizedString;
6005
+ }
6006
+
5004
6007
  /**
5005
6008
  * A property item which supports Vector3 properties
5006
6009
  */
@@ -5064,6 +6067,22 @@ export interface IVector3PropertyItem extends IPropertyItemBase {
5064
6067
  *
5065
6068
  */
5066
6069
  readonly value: Readonly<minecraftserver.Vector3>;
6070
+ /**
6071
+ * @remarks
6072
+ * Updates title of the button.
6073
+ *
6074
+ * @param title
6075
+ * New button title.
6076
+ */
6077
+ setTitle(title: LocalizedString | undefined): void;
6078
+ /**
6079
+ * @remarks
6080
+ * Updates tooltip description of the button.
6081
+ *
6082
+ * @param tooltip
6083
+ * New button tooltip.
6084
+ */
6085
+ setTooltip(tooltip: LocalizedString | undefined): void;
5067
6086
  /**
5068
6087
  * @remarks
5069
6088
  * Updates Vector3 limits and clamps the current value.
@@ -5084,6 +6103,13 @@ export interface IVector3PropertyItemOptions extends IPropertyItemOptionsBase {
5084
6103
  *
5085
6104
  */
5086
6105
  hiddenLabel?: boolean;
6106
+ /**
6107
+ * @remarks
6108
+ * If we should treat the Vector3 properties as integer values.
6109
+ * By default is false.
6110
+ *
6111
+ */
6112
+ isInteger?: boolean;
5087
6113
  /**
5088
6114
  * @remarks
5089
6115
  * The min possible limits. If undefined,
@@ -5154,6 +6180,21 @@ export interface ModalToolCreationParameters {
5154
6180
  tooltip?: string;
5155
6181
  }
5156
6182
 
6183
+ // @ts-ignore Class inheritance allowed for native defined classes
6184
+ export class InvalidWidgetComponentError extends Error {
6185
+ private constructor();
6186
+ }
6187
+
6188
+ // @ts-ignore Class inheritance allowed for native defined classes
6189
+ export class InvalidWidgetError extends Error {
6190
+ private constructor();
6191
+ }
6192
+
6193
+ // @ts-ignore Class inheritance allowed for native defined classes
6194
+ export class InvalidWidgetGroupError extends Error {
6195
+ private constructor();
6196
+ }
6197
+
5157
6198
  /**
5158
6199
  * @remarks
5159
6200
  * Takes the input object (a property bag of values) and bind
@@ -5200,14 +6241,13 @@ export declare function executeLargeOperationFromIterator(
5200
6241
  ): Promise<void>;
5201
6242
  /**
5202
6243
  * @remarks
5203
- * Returns a string array of the default block types for the
5204
- * Block picker control. Can be used to further filter blocks
5205
- * from the Block picker.
6244
+ * Returns a string array of the default block types for editor
6245
+ * operations. Can be used to further filter blocks.
5206
6246
  *
5207
6247
  * @returns
5208
6248
  * Default allowed block list
5209
6249
  */
5210
- export declare function getBlockPickerDefaultAllowBlockList(): string[];
6250
+ export declare function getDefaultAllowBlockList(): string[];
5211
6251
  /**
5212
6252
  * @remarks
5213
6253
  * Creates an observable object that stores a value state.