@minecraft/server-editor 0.1.0-beta.1.21.60-preview.28 → 0.1.0-beta.1.21.70-preview.20
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.
- package/index.d.ts +217 -4
- package/package.json +2 -2
- package/.eslintrc.json +0 -23
- package/tsconfig.json +0 -20
package/index.d.ts
CHANGED
|
@@ -850,6 +850,31 @@ export declare enum KeyboardKey {
|
|
|
850
850
|
QUOTE = 222,
|
|
851
851
|
}
|
|
852
852
|
|
|
853
|
+
/**
|
|
854
|
+
* Determines how key binding should be processed to fire
|
|
855
|
+
* actions
|
|
856
|
+
*/
|
|
857
|
+
export declare enum KeyProcessingState {
|
|
858
|
+
/**
|
|
859
|
+
* @remarks
|
|
860
|
+
* Consume key input event and prevent propagation
|
|
861
|
+
*
|
|
862
|
+
*/
|
|
863
|
+
Consume = 0,
|
|
864
|
+
/**
|
|
865
|
+
* @remarks
|
|
866
|
+
* Pass key input event to parent context after processing it
|
|
867
|
+
*
|
|
868
|
+
*/
|
|
869
|
+
Passthrough = 1,
|
|
870
|
+
/**
|
|
871
|
+
* @remarks
|
|
872
|
+
* Skip key input event processing
|
|
873
|
+
*
|
|
874
|
+
*/
|
|
875
|
+
Disabled = 2,
|
|
876
|
+
}
|
|
877
|
+
|
|
853
878
|
/**
|
|
854
879
|
* Alignment options for UI elements
|
|
855
880
|
*/
|
|
@@ -972,6 +997,14 @@ export enum PrimitiveType {
|
|
|
972
997
|
AxialSphere = 5,
|
|
973
998
|
}
|
|
974
999
|
|
|
1000
|
+
/**
|
|
1001
|
+
* The possible variants of a ProgressIndicator property item.
|
|
1002
|
+
*/
|
|
1003
|
+
export declare enum ProgressIndicatorPropertyItemVariant {
|
|
1004
|
+
Spinner = 0,
|
|
1005
|
+
ProgressBar = 1,
|
|
1006
|
+
}
|
|
1007
|
+
|
|
975
1008
|
export enum ProjectExportType {
|
|
976
1009
|
PlayableWorld = 0,
|
|
977
1010
|
ProjectBackup = 1,
|
|
@@ -991,7 +1024,9 @@ export declare enum PropertyItemType {
|
|
|
991
1024
|
Divider = 'editorUI:Divider',
|
|
992
1025
|
Dropdown = 'editorUI:Dropdown',
|
|
993
1026
|
Image = 'editorUI:Image',
|
|
1027
|
+
Link = 'editorUI:Link',
|
|
994
1028
|
Number = 'editorUI:Number',
|
|
1029
|
+
ProgressIndicator = 'editorUI:ProgressIndicator',
|
|
995
1030
|
String = 'editorUI:String',
|
|
996
1031
|
SubPane = 'editorUI:SubPane',
|
|
997
1032
|
Table = 'editorUI:Table',
|
|
@@ -1179,6 +1214,16 @@ export type IDropdownPropertyItem_deprecated<
|
|
|
1179
1214
|
Prop extends keyof T & string,
|
|
1180
1215
|
> = IPropertyItem<T, Prop> & IDropdownPropertyItemMixIn;
|
|
1181
1216
|
|
|
1217
|
+
/**
|
|
1218
|
+
* Animation properties for a horizontally laid out sprite
|
|
1219
|
+
* sheet image
|
|
1220
|
+
*/
|
|
1221
|
+
export declare type ImageAnimationData = {
|
|
1222
|
+
frames: number;
|
|
1223
|
+
duration?: number;
|
|
1224
|
+
delay?: number;
|
|
1225
|
+
};
|
|
1226
|
+
|
|
1182
1227
|
export declare type ImageResourceData = {
|
|
1183
1228
|
path: string;
|
|
1184
1229
|
type: ImageResourceType;
|
|
@@ -4415,6 +4460,12 @@ export interface IActionBarItemCreationParams {
|
|
|
4415
4460
|
*
|
|
4416
4461
|
*/
|
|
4417
4462
|
icon: string;
|
|
4463
|
+
/**
|
|
4464
|
+
* @remarks
|
|
4465
|
+
* Animation data for sprite sheet icon image
|
|
4466
|
+
*
|
|
4467
|
+
*/
|
|
4468
|
+
iconAnimation?: ImageAnimationData;
|
|
4418
4469
|
/**
|
|
4419
4470
|
* @remarks
|
|
4420
4471
|
* Text label for item.
|
|
@@ -5024,7 +5075,7 @@ export interface IGlobalInputManager {
|
|
|
5024
5075
|
action: SupportedKeyboardActionTypes,
|
|
5025
5076
|
binding: KeyBinding,
|
|
5026
5077
|
info?: KeyBindingInfo,
|
|
5027
|
-
):
|
|
5078
|
+
): IRegisteredKeyBinding;
|
|
5028
5079
|
}
|
|
5029
5080
|
|
|
5030
5081
|
/**
|
|
@@ -5093,6 +5144,56 @@ export interface IImagePropertyItemOptions extends IPropertyItemOptionsBase {
|
|
|
5093
5144
|
onClick?: (x: number, y: number) => void;
|
|
5094
5145
|
}
|
|
5095
5146
|
|
|
5147
|
+
/**
|
|
5148
|
+
* A property item which supports Link properties
|
|
5149
|
+
*/
|
|
5150
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5151
|
+
export interface ILinkPropertyItem extends IPropertyItemBase {
|
|
5152
|
+
/**
|
|
5153
|
+
* @remarks
|
|
5154
|
+
* Current value of the property item.
|
|
5155
|
+
*
|
|
5156
|
+
*/
|
|
5157
|
+
readonly value: Readonly<string>;
|
|
5158
|
+
/**
|
|
5159
|
+
* @remarks
|
|
5160
|
+
* Sets title of the property item.
|
|
5161
|
+
*
|
|
5162
|
+
*/
|
|
5163
|
+
setTitle(title: LocalizedString | undefined): void;
|
|
5164
|
+
/**
|
|
5165
|
+
* @remarks
|
|
5166
|
+
* Sets tooltip description of the property item.
|
|
5167
|
+
*
|
|
5168
|
+
*/
|
|
5169
|
+
setTooltip(tooltip: LocalizedString | undefined): void;
|
|
5170
|
+
}
|
|
5171
|
+
|
|
5172
|
+
/**
|
|
5173
|
+
* Optional properties for Link property item
|
|
5174
|
+
*/
|
|
5175
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5176
|
+
export interface ILinkPropertyItemOptions extends IPropertyItemOptionsBase {
|
|
5177
|
+
/**
|
|
5178
|
+
* @remarks
|
|
5179
|
+
* Hides the link icon. If undefined, it will default to false.
|
|
5180
|
+
*
|
|
5181
|
+
*/
|
|
5182
|
+
hideIcon?: boolean;
|
|
5183
|
+
/**
|
|
5184
|
+
* @remarks
|
|
5185
|
+
* Localized title of the text item.
|
|
5186
|
+
*
|
|
5187
|
+
*/
|
|
5188
|
+
title?: LocalizedString;
|
|
5189
|
+
/**
|
|
5190
|
+
* @remarks
|
|
5191
|
+
* Tooltip description of the property item
|
|
5192
|
+
*
|
|
5193
|
+
*/
|
|
5194
|
+
tooltip?: LocalizedString;
|
|
5195
|
+
}
|
|
5196
|
+
|
|
5096
5197
|
export interface IMenu {
|
|
5097
5198
|
/**
|
|
5098
5199
|
* @remarks
|
|
@@ -5193,7 +5294,11 @@ export interface IModalTool {
|
|
|
5193
5294
|
*/
|
|
5194
5295
|
onModalToolActivation: EventSink<ModalToolLifecycleEventPayload>;
|
|
5195
5296
|
bindPropertyPane(pane: IRootPropertyPane): void;
|
|
5196
|
-
registerKeyBinding(
|
|
5297
|
+
registerKeyBinding(
|
|
5298
|
+
action: SupportedKeyboardActionTypes,
|
|
5299
|
+
binding: KeyBinding,
|
|
5300
|
+
info?: KeyBindingInfo,
|
|
5301
|
+
): IRegisteredKeyBinding;
|
|
5197
5302
|
registerMouseButtonBinding(action: SupportedMouseActionTypes): void;
|
|
5198
5303
|
registerMouseDragBinding(action: SupportedMouseActionTypes): void;
|
|
5199
5304
|
registerMouseWheelBinding(action: SupportedMouseActionTypes): void;
|
|
@@ -5375,6 +5480,74 @@ export interface IPlayerLogger {
|
|
|
5375
5480
|
warning(message: string): void;
|
|
5376
5481
|
}
|
|
5377
5482
|
|
|
5483
|
+
/**
|
|
5484
|
+
* A property item which supports ProgressIndicator properties
|
|
5485
|
+
*/
|
|
5486
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5487
|
+
export interface IProgressIndicatorPropertyItem extends IPropertyItemBase {
|
|
5488
|
+
/**
|
|
5489
|
+
* @remarks
|
|
5490
|
+
* Current progress of the property item.
|
|
5491
|
+
*
|
|
5492
|
+
*/
|
|
5493
|
+
readonly progress: Readonly<number> | undefined;
|
|
5494
|
+
/**
|
|
5495
|
+
* @remarks
|
|
5496
|
+
* Updates title of the property item.
|
|
5497
|
+
*
|
|
5498
|
+
* @param title
|
|
5499
|
+
* New title.
|
|
5500
|
+
*/
|
|
5501
|
+
setTitle(title: LocalizedString | undefined): void;
|
|
5502
|
+
/**
|
|
5503
|
+
* @remarks
|
|
5504
|
+
* Updates tooltip description of property item.
|
|
5505
|
+
*
|
|
5506
|
+
* @param tooltip
|
|
5507
|
+
* New tooltip.
|
|
5508
|
+
*/
|
|
5509
|
+
setTooltip(tooltip: LocalizedString | undefined): void;
|
|
5510
|
+
}
|
|
5511
|
+
|
|
5512
|
+
/**
|
|
5513
|
+
* Optional properties for progress indicator property item
|
|
5514
|
+
*/
|
|
5515
|
+
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5516
|
+
export interface IProgressIndicatorPropertyItemOptions extends IPropertyItemOptionsBase {
|
|
5517
|
+
/**
|
|
5518
|
+
* @remarks
|
|
5519
|
+
* If true label text will be hidden. If undefined, the label
|
|
5520
|
+
* will be visible by default.
|
|
5521
|
+
*
|
|
5522
|
+
*/
|
|
5523
|
+
hiddenLabel?: boolean;
|
|
5524
|
+
/**
|
|
5525
|
+
* @remarks
|
|
5526
|
+
* Normalized loading progress (0 to 1).
|
|
5527
|
+
*
|
|
5528
|
+
*/
|
|
5529
|
+
progress?: IObservableProp<number>;
|
|
5530
|
+
/**
|
|
5531
|
+
* @remarks
|
|
5532
|
+
* Localized title of the property item.
|
|
5533
|
+
*
|
|
5534
|
+
*/
|
|
5535
|
+
title?: LocalizedString;
|
|
5536
|
+
/**
|
|
5537
|
+
* @remarks
|
|
5538
|
+
* Tooltip description of the property item.
|
|
5539
|
+
*
|
|
5540
|
+
*/
|
|
5541
|
+
tooltip?: LocalizedString;
|
|
5542
|
+
/**
|
|
5543
|
+
* @remarks
|
|
5544
|
+
* Determines how we display progress indicator. If undefined,
|
|
5545
|
+
* it will default to Spinner.
|
|
5546
|
+
*
|
|
5547
|
+
*/
|
|
5548
|
+
variant?: ProgressIndicatorPropertyItemVariant;
|
|
5549
|
+
}
|
|
5550
|
+
|
|
5378
5551
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
5379
5552
|
export interface IPropertyItem<T extends PropertyBag, Prop extends keyof T & string> extends IPropertyItemBase {
|
|
5380
5553
|
/**
|
|
@@ -5735,6 +5908,12 @@ export interface IPropertyPane {
|
|
|
5735
5908
|
value: IObservableProp<string | ImageResourceData>,
|
|
5736
5909
|
options?: IImagePropertyItemOptions,
|
|
5737
5910
|
): IImagePropertyItem;
|
|
5911
|
+
/**
|
|
5912
|
+
* @remarks
|
|
5913
|
+
* Adds a multiline Text item to the pane.
|
|
5914
|
+
*
|
|
5915
|
+
*/
|
|
5916
|
+
addLink(value: IObservableProp<string>, options?: ILinkPropertyItemOptions): ILinkPropertyItem;
|
|
5738
5917
|
/**
|
|
5739
5918
|
* @remarks
|
|
5740
5919
|
* Adds a number item to the pane.
|
|
@@ -5751,6 +5930,12 @@ export interface IPropertyPane {
|
|
|
5751
5930
|
property: Prop,
|
|
5752
5931
|
options?: IPropertyItemOptionsNumber,
|
|
5753
5932
|
): IPropertyItem<T, Prop>;
|
|
5933
|
+
/**
|
|
5934
|
+
* @remarks
|
|
5935
|
+
* Adds a Progress Indicator item to the pane.
|
|
5936
|
+
*
|
|
5937
|
+
*/
|
|
5938
|
+
addProgressIndicator(options?: IProgressIndicatorPropertyItemOptions): IProgressIndicatorPropertyItem;
|
|
5754
5939
|
/**
|
|
5755
5940
|
* @remarks
|
|
5756
5941
|
*/
|
|
@@ -5878,6 +6063,33 @@ export interface IPropertyTableCellItem {
|
|
|
5878
6063
|
text?: string;
|
|
5879
6064
|
}
|
|
5880
6065
|
|
|
6066
|
+
/**
|
|
6067
|
+
* Key binding that is registered to an input context
|
|
6068
|
+
*/
|
|
6069
|
+
export interface IRegisteredKeyBinding {
|
|
6070
|
+
/**
|
|
6071
|
+
* @remarks
|
|
6072
|
+
* Unique identifier for the binding.
|
|
6073
|
+
*
|
|
6074
|
+
*/
|
|
6075
|
+
readonly id: string;
|
|
6076
|
+
/**
|
|
6077
|
+
* @remarks
|
|
6078
|
+
* Returns current processing state of the binding.
|
|
6079
|
+
*
|
|
6080
|
+
*/
|
|
6081
|
+
getProcessingState(): KeyProcessingState;
|
|
6082
|
+
/**
|
|
6083
|
+
* @remarks
|
|
6084
|
+
* Updates how the key input will be processed for this
|
|
6085
|
+
* binding. If undefined, it will be consumed.
|
|
6086
|
+
*
|
|
6087
|
+
* @param newState
|
|
6088
|
+
* New binding processing state.
|
|
6089
|
+
*/
|
|
6090
|
+
setProcessingState(newState: KeyProcessingState | undefined): void;
|
|
6091
|
+
}
|
|
6092
|
+
|
|
5881
6093
|
/**
|
|
5882
6094
|
* Optional parameter definition for RegisterEditorExtension
|
|
5883
6095
|
* function Allows the extension registrar to specify optional
|
|
@@ -6669,7 +6881,7 @@ export interface ISubPanePropertyItemOptions extends IPropertyPaneOptions {
|
|
|
6669
6881
|
}
|
|
6670
6882
|
|
|
6671
6883
|
/**
|
|
6672
|
-
* A property item which supports
|
|
6884
|
+
* A property item which supports Text properties
|
|
6673
6885
|
*/
|
|
6674
6886
|
// @ts-ignore Class inheritance allowed for native defined classes
|
|
6675
6887
|
export interface ITextPropertyItem extends IPropertyItemBase {
|
|
@@ -7152,7 +7364,8 @@ export declare function executeLargeOperationFromIterator(
|
|
|
7152
7364
|
/**
|
|
7153
7365
|
* @remarks
|
|
7154
7366
|
* Returns a string array of the default block types for editor
|
|
7155
|
-
* operations. Can be used to further filter blocks.
|
|
7367
|
+
* operations. Can be used to further filter blocks. This will
|
|
7368
|
+
* throw if called in early execution.
|
|
7156
7369
|
*
|
|
7157
7370
|
* @returns
|
|
7158
7371
|
* Default allowed block list
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server-editor",
|
|
3
|
-
"version": "0.1.0-beta.1.21.
|
|
3
|
+
"version": "0.1.0-beta.1.21.70-preview.20",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@minecraft/common": "^1.0.0",
|
|
17
|
-
"@minecraft/server": "^
|
|
17
|
+
"@minecraft/server": "^2.0.0-beta.1.21.70-preview.20"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|
package/.eslintrc.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"browser": true,
|
|
4
|
-
"es2021": true
|
|
5
|
-
},
|
|
6
|
-
"extends": [
|
|
7
|
-
"eslint:recommended",
|
|
8
|
-
"plugin:@typescript-eslint/recommended"
|
|
9
|
-
],
|
|
10
|
-
"overrides": [
|
|
11
|
-
],
|
|
12
|
-
"parser": "@typescript-eslint/parser",
|
|
13
|
-
"parserOptions": {
|
|
14
|
-
"ecmaVersion": "latest",
|
|
15
|
-
"sourceType": "module"
|
|
16
|
-
},
|
|
17
|
-
"plugins": [
|
|
18
|
-
"@typescript-eslint"
|
|
19
|
-
],
|
|
20
|
-
"rules": {
|
|
21
|
-
"@typescript-eslint/no-explicit-any": "off"
|
|
22
|
-
}
|
|
23
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "commonjs",
|
|
4
|
-
"lib": ["es6"],
|
|
5
|
-
"target": "es6",
|
|
6
|
-
"forceConsistentCasingInFileNames": true,
|
|
7
|
-
"noEmit": true,
|
|
8
|
-
"noImplicitAny": true,
|
|
9
|
-
"noImplicitThis": true,
|
|
10
|
-
"strictFunctionTypes": true,
|
|
11
|
-
"strictNullChecks": true,
|
|
12
|
-
"baseUrl": "../",
|
|
13
|
-
"typeRoots": ["../"],
|
|
14
|
-
"types": []
|
|
15
|
-
},
|
|
16
|
-
"files": [
|
|
17
|
-
"index.d.ts",
|
|
18
|
-
"tests.ts"
|
|
19
|
-
]
|
|
20
|
-
}
|