@minecraft/server-editor 0.1.0-beta.1.21.90-preview.21 → 0.1.0-beta.1.21.90-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 +367 -7
  2. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -1039,6 +1039,7 @@ export declare enum PropertyItemType {
1039
1039
  Button = 'editorUI:Button',
1040
1040
  ButtonPane = 'editorUI:ButtonPane',
1041
1041
  ColorPicker = 'editorUI:ColorPicker',
1042
+ ColorTimeline = 'editorUI:ColorTimeline',
1042
1043
  ComboBox = 'editorUI:ComboBox',
1043
1044
  DataTable = 'editorUI:DataTable',
1044
1045
  Divider = 'editorUI:Divider',
@@ -1046,6 +1047,7 @@ export declare enum PropertyItemType {
1046
1047
  Image = 'editorUI:Image',
1047
1048
  Link = 'editorUI:Link',
1048
1049
  Number = 'editorUI:Number',
1050
+ NumberTimeline = 'editorUI:NumberTimeline',
1049
1051
  ProgressIndicator = 'editorUI:ProgressIndicator',
1050
1052
  String = 'editorUI:String',
1051
1053
  SubPane = 'editorUI:SubPane',
@@ -1625,6 +1627,14 @@ export class BlockUtilities {
1625
1627
  volume: minecraftserver.BlockVolumeBase | minecraftserver.CompoundBlockVolume | RelativeVolumeListBlockVolume,
1626
1628
  block?: minecraftserver.BlockPermutation | minecraftserver.BlockType | string,
1627
1629
  ): void;
1630
+ /**
1631
+ * @remarks
1632
+ * This function can't be called in read-only mode.
1633
+ *
1634
+ */
1635
+ findObscuredBlocksWithinVolume(
1636
+ volume: minecraftserver.BlockVolumeBase | RelativeVolumeListBlockVolume,
1637
+ ): RelativeVolumeListBlockVolume;
1628
1638
  /**
1629
1639
  * @remarks
1630
1640
  * This function can't be called in read-only mode.
@@ -5040,6 +5050,144 @@ export interface IColorPickerPropertyItemOptions extends IPropertyItemOptionsBas
5040
5050
  variant?: ColorPickerPropertyItemVariant;
5041
5051
  }
5042
5052
 
5053
+ /**
5054
+ * A property item which supports Color Timeline properties
5055
+ */
5056
+ // @ts-ignore Class inheritance allowed for native defined classes
5057
+ export interface IColorTimelinePropertyItem extends IPropertyItemBase {
5058
+ /**
5059
+ * @remarks
5060
+ * Update color timeline entry
5061
+ *
5062
+ * @param data
5063
+ * New color node.
5064
+ */
5065
+ addNode(data: IColorTimelinePropertyItemEntry): void;
5066
+ /**
5067
+ * @remarks
5068
+ * Get the list of nodes in the property item.
5069
+ *
5070
+ */
5071
+ getData(): IColorTimelinePropertyItemEntry[];
5072
+ /**
5073
+ * @remarks
5074
+ * Get time current time value on the slider.
5075
+ *
5076
+ */
5077
+ getTime(): number;
5078
+ /**
5079
+ * @remarks
5080
+ * Remove color node
5081
+ *
5082
+ * @param data
5083
+ * Node to be removed.
5084
+ */
5085
+ removeNode(data: IColorTimelinePropertyItemEntry): void;
5086
+ /**
5087
+ * @remarks
5088
+ * Set custom decimal precision for the calculations
5089
+ *
5090
+ */
5091
+ setPrecision(precision: number): void;
5092
+ /**
5093
+ * @remarks
5094
+ * Set time line slider value to a new value
5095
+ *
5096
+ * @param time
5097
+ * The new time value.
5098
+ */
5099
+ setTime(time: number): void;
5100
+ /**
5101
+ * @remarks
5102
+ * Updates title of the property item.
5103
+ *
5104
+ * @param title
5105
+ * New title.
5106
+ */
5107
+ setTitle(title: LocalizedString): void;
5108
+ /**
5109
+ * @remarks
5110
+ * Update node value
5111
+ *
5112
+ * @param data
5113
+ * Node to be updated.
5114
+ */
5115
+ updateNode(data: IColorTimelinePropertyItemEntry): void;
5116
+ }
5117
+
5118
+ /**
5119
+ * Properties of color timeline property item entry
5120
+ */
5121
+ export interface IColorTimelinePropertyItemEntry {
5122
+ id: string;
5123
+ time: number;
5124
+ value: minecraftserver.RGBA;
5125
+ }
5126
+
5127
+ /**
5128
+ * Optional properties for Color Timeline property item
5129
+ */
5130
+ // @ts-ignore Class inheritance allowed for native defined classes
5131
+ export interface IColorTimelinePropertyItemOptions extends IPropertyItemOptionsBase {
5132
+ /**
5133
+ * @remarks
5134
+ * Custom precision for the calculations
5135
+ *
5136
+ */
5137
+ decimalPrecision?: number;
5138
+ /**
5139
+ * @remarks
5140
+ * If true, nodes cannot be added or removed
5141
+ *
5142
+ */
5143
+ disableAddRemoveNodes?: boolean;
5144
+ /**
5145
+ * @remarks
5146
+ * List of nodes entries in the color timeline.
5147
+ *
5148
+ */
5149
+ entries?: IColorTimelinePropertyItemEntry[];
5150
+ /**
5151
+ * @remarks
5152
+ * True means nodes cannot be dragged or modified
5153
+ *
5154
+ */
5155
+ isGraphReadOnly?: boolean;
5156
+ /**
5157
+ * @remarks
5158
+ * Callback triggered when a new RGBA node is added to the
5159
+ * timeline.
5160
+ *
5161
+ */
5162
+ onNodeAdded?: (node: IColorTimelinePropertyItemEntry) => void;
5163
+ /**
5164
+ * @remarks
5165
+ * Callback triggered when a timeline node's RGBA value
5166
+ * changes.
5167
+ *
5168
+ */
5169
+ onNodeChanged?: (node: IColorTimelinePropertyItemEntry) => void;
5170
+ /**
5171
+ * @remarks
5172
+ * Callback triggered when an RGBA node is removed from the
5173
+ * timeline. *
5174
+ *
5175
+ */
5176
+ onNodeRemoved?: (node: IColorTimelinePropertyItemEntry) => void;
5177
+ /**
5178
+ * @remarks
5179
+ * This callback is called when UI control time is changed.
5180
+ *
5181
+ */
5182
+ onTimeChanged?: (current: number, prev: number) => void;
5183
+ /**
5184
+ * @remarks
5185
+ * Localized title of the property item
5186
+ *
5187
+ */
5188
+ title?: LocalizedString;
5189
+ }
5190
+
5043
5191
  /**
5044
5192
  * A property item which supports Combo Box properties
5045
5193
  */
@@ -5585,12 +5733,24 @@ export interface IMenuCreationParams {
5585
5733
  *
5586
5734
  */
5587
5735
  enabled?: boolean;
5736
+ /**
5737
+ * @remarks
5738
+ * Whether the menu should have an icon.
5739
+ *
5740
+ */
5741
+ icon?: string;
5588
5742
  /**
5589
5743
  * @remarks
5590
5744
  * Localized display text of the menu
5591
5745
  *
5592
5746
  */
5593
5747
  label: string;
5748
+ /**
5749
+ * @remarks
5750
+ * Whether the menu should have a tooltip.
5751
+ *
5752
+ */
5753
+ tooltip?: string;
5594
5754
  /**
5595
5755
  * @remarks
5596
5756
  * Custom unique identifier that will replace random id
@@ -5884,6 +6044,182 @@ export interface INumberPropertyItemOptions extends IPropertyItemOptionsBase {
5884
6044
  variant?: NumberPropertyItemVariant;
5885
6045
  }
5886
6046
 
6047
+ /**
6048
+ * A property item which supports Number Timeline properties
6049
+ */
6050
+ // @ts-ignore Class inheritance allowed for native defined classes
6051
+ export interface INumberTimelinePropertyItem extends IPropertyItemBase {
6052
+ /**
6053
+ * @remarks
6054
+ * Update color timeline entry
6055
+ *
6056
+ * @param data
6057
+ * New color node.
6058
+ */
6059
+ addNode(data: INumberTimelinePropertyItemEntry): void;
6060
+ /**
6061
+ * @remarks
6062
+ * Get the list of nodes in the property item.
6063
+ *
6064
+ */
6065
+ getData(): INumberTimelinePropertyItemEntry[];
6066
+ /**
6067
+ * @remarks
6068
+ * Get time current time value on the slider.
6069
+ *
6070
+ */
6071
+ getTime(): number;
6072
+ /**
6073
+ * @remarks
6074
+ * Remove color node
6075
+ *
6076
+ * @param data
6077
+ * Node to be removed.
6078
+ */
6079
+ removeNode(data: INumberTimelinePropertyItemEntry): void;
6080
+ /**
6081
+ * @remarks
6082
+ * Updates data entries value bounds.
6083
+ *
6084
+ */
6085
+ setBounds(bounds: { minValue: number; maxValue: number }): void;
6086
+ /**
6087
+ * @remarks
6088
+ * Set separator slice counts for x and y for the minor grid.
6089
+ *
6090
+ * @param counts
6091
+ * Counts for the thin grid lines.
6092
+ */
6093
+ setSeparatorSliceCount(counts: minecraftserver.Vector2): void;
6094
+ /**
6095
+ * @remarks
6096
+ * Set separator step counts for x and y for the major grid.
6097
+ *
6098
+ * @param counts
6099
+ * Counts for the thick grid lines.
6100
+ */
6101
+ setSeparatorStepCount(counts: minecraftserver.Vector2): void;
6102
+ /**
6103
+ * @remarks
6104
+ * Set time line slider value to a new value
6105
+ *
6106
+ * @param time
6107
+ * The new time value.
6108
+ */
6109
+ setTime(time: number): void;
6110
+ /**
6111
+ * @remarks
6112
+ * Updates title of the property item.
6113
+ *
6114
+ * @param title
6115
+ * New title.
6116
+ */
6117
+ setTitle(title: LocalizedString): void;
6118
+ /**
6119
+ * @remarks
6120
+ * Update node value
6121
+ *
6122
+ * @param data
6123
+ * Node to be updated.
6124
+ */
6125
+ updateNode(data: INumberTimelinePropertyItemEntry): void;
6126
+ }
6127
+
6128
+ /**
6129
+ * Properties of the Number timeline property item entry
6130
+ */
6131
+ export interface INumberTimelinePropertyItemEntry {
6132
+ color?: minecraftserver.RGBA;
6133
+ id: string;
6134
+ time: number;
6135
+ value: number;
6136
+ }
6137
+
6138
+ /**
6139
+ * Optional properties for Number Timeline property item
6140
+ */
6141
+ // @ts-ignore Class inheritance allowed for native defined classes
6142
+ export interface INumberTimelinePropertyItemOptions extends IPropertyItemOptionsBase {
6143
+ /**
6144
+ * @remarks
6145
+ * The data bounds for the value node property
6146
+ *
6147
+ */
6148
+ bounds?: {
6149
+ minValue: number;
6150
+ maxValue: number;
6151
+ };
6152
+ /**
6153
+ * @remarks
6154
+ * Custom precision for the calculations
6155
+ *
6156
+ */
6157
+ decimalPrecision?: number;
6158
+ /**
6159
+ * @remarks
6160
+ * If true, nodes cannot be added or removed
6161
+ *
6162
+ */
6163
+ disableAddRemoveNodes?: boolean;
6164
+ /**
6165
+ * @remarks
6166
+ * List of nodes entries in the color timeline.
6167
+ *
6168
+ */
6169
+ entries?: INumberTimelinePropertyItemEntry[];
6170
+ /**
6171
+ * @remarks
6172
+ * The separator slice count for the graph thin lines
6173
+ *
6174
+ */
6175
+ gridSeparatorSliceCount?: minecraftserver.Vector2;
6176
+ /**
6177
+ * @remarks
6178
+ * The separator step counts for the graph bold lines
6179
+ *
6180
+ */
6181
+ gridSeparatorStepCount?: minecraftserver.Vector2;
6182
+ /**
6183
+ * @remarks
6184
+ * True means nodes cannot be dragged or modified
6185
+ *
6186
+ */
6187
+ isGraphReadOnly?: boolean;
6188
+ /**
6189
+ * @remarks
6190
+ * Callback triggered when a new number node is added to the
6191
+ * timeline.
6192
+ *
6193
+ */
6194
+ onNodeAdded?: (node: INumberTimelinePropertyItemEntry) => void;
6195
+ /**
6196
+ * @remarks
6197
+ * Callback triggered when a timeline node's number value
6198
+ * changes.
6199
+ *
6200
+ */
6201
+ onNodeChanged?: (node: INumberTimelinePropertyItemEntry) => void;
6202
+ /**
6203
+ * @remarks
6204
+ * Callback triggered when an number node is removed from the
6205
+ * timeline. *
6206
+ *
6207
+ */
6208
+ onNodeRemoved?: (node: INumberTimelinePropertyItemEntry) => void;
6209
+ /**
6210
+ * @remarks
6211
+ * This callback is called when UI control time is changed.
6212
+ *
6213
+ */
6214
+ onTimeChanged?: (current: number, prev: number) => void;
6215
+ /**
6216
+ * @remarks
6217
+ * Localized title of the property item
6218
+ *
6219
+ */
6220
+ title?: LocalizedString;
6221
+ }
6222
+
5887
6223
  /**
5888
6224
  * Represents a stateful value that can be observed by
5889
6225
  * different objects.
@@ -6166,6 +6502,15 @@ export interface IPropertyPane extends IPane {
6166
6502
  value: IObservableProp<minecraftserver.RGBA>,
6167
6503
  options?: IColorPickerPropertyItemOptions,
6168
6504
  ): IColorPickerPropertyItem;
6505
+ /**
6506
+ * @remarks
6507
+ * Adds a Color Timeline item to the pane.
6508
+ *
6509
+ */
6510
+ addColorTimeline(
6511
+ value: IObservableProp<number>,
6512
+ options?: IColorTimelinePropertyItemOptions,
6513
+ ): IColorTimelinePropertyItem;
6169
6514
  /**
6170
6515
  * @remarks
6171
6516
  * Adds a combo box item to the pane.
@@ -6211,6 +6556,15 @@ export interface IPropertyPane extends IPane {
6211
6556
  *
6212
6557
  */
6213
6558
  addNumber(value: IObservableProp<number>, options?: INumberPropertyItemOptions): INumberPropertyItem;
6559
+ /**
6560
+ * @remarks
6561
+ * Adds a Number Timeline item to the pane.
6562
+ *
6563
+ */
6564
+ addNumberTimeline(
6565
+ value: IObservableProp<number>,
6566
+ options?: INumberTimelinePropertyItemOptions,
6567
+ ): INumberTimelinePropertyItem;
6214
6568
  /**
6215
6569
  * @remarks
6216
6570
  * Adds a Progress Indicator item to the pane.
@@ -6304,12 +6658,25 @@ export interface IPropertyPane extends IPane {
6304
6658
  * pane.
6305
6659
  */
6306
6660
  export interface IPropertyPaneOptions {
6661
+ /**
6662
+ * @remarks
6663
+ * Optional information tooltip for the pane to be displayed on
6664
+ * the header.
6665
+ *
6666
+ */
6667
+ infoTooltip?: TooltipInteractiveContent;
6307
6668
  /**
6308
6669
  * @remarks
6309
6670
  * Localized title of the property pane
6310
6671
  *
6311
6672
  */
6312
6673
  title?: LocalizedString;
6674
+ /**
6675
+ * @remarks
6676
+ * Unique identifier for the pane
6677
+ *
6678
+ */
6679
+ uniqueId?: string;
6313
6680
  }
6314
6681
 
6315
6682
  /**
@@ -6434,13 +6801,6 @@ export interface IRootPropertyPaneOptions extends IPropertyPaneOptions {
6434
6801
  *
6435
6802
  */
6436
6803
  headerAction?: IRootPropertyPaneHeaderAction;
6437
- /**
6438
- * @remarks
6439
- * Optional information tooltip for the pane to be displayed on
6440
- * the header.
6441
- *
6442
- */
6443
- infoTooltip?: TooltipInteractiveContent;
6444
6804
  }
6445
6805
 
6446
6806
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minecraft/server-editor",
3
- "version": "0.1.0-beta.1.21.90-preview.21",
3
+ "version": "0.1.0-beta.1.21.90-preview.23",
4
4
  "description": "",
5
5
  "contributors": [
6
6
  {
@@ -14,7 +14,7 @@
14
14
  ],
15
15
  "dependencies": {
16
16
  "@minecraft/common": "^1.0.0",
17
- "@minecraft/server": "^2.1.0-beta.1.21.90-preview.21"
17
+ "@minecraft/server": "^2.1.0-beta.1.21.90-preview.23"
18
18
  },
19
19
  "license": "MIT"
20
20
  }