blockbench-types 5.1.0-beta.2-next.1 → 5.1.0-beta.2-next.2

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/custom/codec.d.ts CHANGED
@@ -68,9 +68,9 @@ declare class Codec extends Deletable {
68
68
  * Load a file into the program
69
69
  * @param model
70
70
  * @param file
71
- * @param add
71
+ * @param args Load options
72
72
  */
73
- load(model: any, file?: any, args?: LoadOptions): void
73
+ load(model: any, file?: FileSystem.FileResult, args?: LoadOptions): void
74
74
  /**
75
75
  * Compiles the file content
76
76
  * @param options
package/custom/misc.d.ts CHANGED
@@ -91,8 +91,8 @@ interface BlockbenchEventMap {
91
91
  convert_format: {format: ModelFormat, old_format: ModelFormat}
92
92
  construct_format: {format: ModelFormat}
93
93
  delete_format: {format: ModelFormat}
94
- select_project: { project: Project }
95
- unselect_project: { project: Project }
94
+ select_project: { project: ModelProject }
95
+ unselect_project: { project: ModelProject }
96
96
  setup_project: any
97
97
  update_project_resolution: any
98
98
  merge_project: any
@@ -85,7 +85,7 @@ export declare const Blockbench: {
85
85
  once<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any): Deletable;
86
86
  addListener<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any): Deletable;
87
87
  removeListener<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any): void;
88
- onUpdateTo(version: any, callback: any): void;
88
+ onUpdateTo(version: string, callback: (previous_version: string) => void): void;
89
89
  Format: (ModelFormat | number);
90
90
  Project: (ModelProject | number);
91
91
  readonly Undo: UndoSystem;
@@ -168,7 +168,7 @@ declare const global: {
168
168
  once<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any): Deletable;
169
169
  addListener<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any): Deletable;
170
170
  removeListener<T extends BlockbenchEventName, D extends BlockbenchEventMap[T]>(event_name: T, cb: (data: D) => any): void;
171
- onUpdateTo(version: any, callback: any): void;
171
+ onUpdateTo(version: string, callback: (previous_version: string) => void): void;
172
172
  Format: (ModelFormat | number);
173
173
  Project: (ModelProject | number);
174
174
  readonly Undo: UndoSystem;
@@ -1,6 +1,6 @@
1
1
  declare global {
2
2
  function calculateVisibleBox(): any;
3
- function parseGeometry(data: any, args: any): void;
3
+ function parseGeometry(data: any, args?: {}): void;
4
4
  }
5
5
 
6
6
  export {};
@@ -354,6 +354,10 @@ export interface ToggleOptions extends Omit<ActionOptions, 'click'> {
354
354
  * Default value of the toggle
355
355
  */
356
356
  default?: boolean;
357
+ /**
358
+ * If true, remember the value between restarts
359
+ */
360
+ save_on_restart?: boolean;
357
361
  /**
358
362
  * ID of a setting that the toggle is linked to
359
363
  */
@@ -34,7 +34,6 @@ export declare class ModelProject {
34
34
  format: ModelFormat;
35
35
  mode: string;
36
36
  view_mode: string;
37
- display_uv: string;
38
37
  multi_file_ruleset: string;
39
38
  previews: {
40
39
  [key: string]: any;
@@ -2,7 +2,7 @@ type Language = Record<string, string>;
2
2
  export declare const data: Record<string, Language>;
3
3
  /**
4
4
  * Returns a translated string in the current language
5
- * @param key Translation key
5
+ * @param string Translation key
6
6
  * @param variables Array of variables that replace anchors (%0, etc.) in the translation. Items can be strings or anything that can be converted to strings
7
7
  * @param default_value String value to default to if the translation is not available
8
8
  */
@@ -1,4 +1,5 @@
1
1
  declare global {
2
+ function splitCube(cube: any, axis: any, offset_value: any): any;
2
3
  class KnifeToolContext {
3
4
  static current: any;
4
5
  /**
@@ -36,6 +36,7 @@ export declare abstract class OutlinerNode {
36
36
  addTo(target?: OutlinerNode | 'root', index?: number): this;
37
37
  removeFromParent(): this;
38
38
  getParentArray(): OutlinerNode[];
39
+ getAllAncestors(): OutlinerNode[];
39
40
  showContextMenu(event: any): this;
40
41
  /**
41
42
  * Unfolds the outliner and scrolls up or down if necessary to show the group or element.
@@ -6,6 +6,7 @@ export interface CollectionOptions {
6
6
  name?: string;
7
7
  export_codec?: string;
8
8
  export_path?: string;
9
+ offset?: ArrayVector3;
9
10
  model_identifier?: string;
10
11
  visibility?: boolean;
11
12
  scope?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blockbench-types",
3
- "version": "5.1.0-beta.2-next.1",
3
+ "version": "5.1.0-beta.2-next.2",
4
4
  "description": "Blockbench typescript types",
5
5
  "main": "",
6
6
  "types": "./index.d.ts",