blockbench-types 4.12.0 → 4.12.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/types/undo.d.ts CHANGED
@@ -6,10 +6,15 @@ interface UndoAspects {
6
6
  * Saves the entire outliner structure and hierarchy, including all groups. This is required when adding, or removing any elements, or changing their position in the outliner.
7
7
  */
8
8
  outliner?: boolean
9
+ /**
10
+ * Save individual groups, but not their children or hierarchy position
11
+ */
12
+ groups?: Group[]
9
13
  /**
10
14
  * Saves an individual group, but not it's children or hierarchy position
11
15
  */
12
16
  group?: Group
17
+ collections: Collection[]
13
18
  /**
14
19
  * Textures to save
15
20
  */
@@ -37,6 +42,8 @@ type UndoSave = {
37
42
  elements?: {}
38
43
  outliner?: []
39
44
  group?: {}
45
+ groups?: {}[]
46
+ collections: {}[]
40
47
  textures?: {}
41
48
  texture_order?: UUID[]
42
49
  selected_texture?: UUID | null
@@ -107,7 +114,6 @@ type UndoEntry = {
107
114
  time: number
108
115
  }
109
116
 
110
-
111
117
  declare class UndoSystem {
112
118
  constructor()
113
119
  /**
@@ -191,4 +197,3 @@ Undo.finishEdit('Add new cubes', {elements: [new_cube, other_cube]});
191
197
  ```
192
198
  */
193
199
  declare let Undo: UndoSystem
194
-
package/types/util.d.ts CHANGED
@@ -2,7 +2,8 @@
2
2
  type ConditionResolvable =
3
3
  | undefined
4
4
  | boolean
5
- | ((context: any) => boolean)
5
+ | any
6
+ | ((context: any) => any)
6
7
  | Partial<{
7
8
  modes: string[]
8
9
  formats: string[]
@@ -95,7 +96,7 @@ declare function onVueSetup(func: any): void
95
96
  declare function capitalizeFirstLetter(string: any): any
96
97
  declare function autoStringify(any: any): string
97
98
  declare function pluralS(arr: any): '' | 's'
98
- declare function pathToName(path: string, extension: boolean): string | ''
99
+ declare function pathToName(path: string, extension: boolean = false): string | ''
99
100
  declare function pathToExtension(path: string): string | ''
100
101
  declare function intToRGBA(int: any): {
101
102
  r: number