@bscotch/yy 2.3.2 → 2.5.0
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/dist/Yy.d.ts +2251 -9034
- package/dist/Yy.d.ts.map +1 -1
- package/dist/Yy.js +4 -4
- package/dist/Yy.js.map +1 -1
- package/dist/Yy.parse.d.ts +2 -2
- package/dist/Yy.parse.d.ts.map +1 -1
- package/dist/Yy.parse.js.map +1 -1
- package/dist/Yy.stringify.js +14 -0
- package/dist/Yy.stringify.js.map +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/types/GameMakerVersionString.js.map +1 -1
- package/dist/types/YyBase.d.ts +6 -39
- package/dist/types/YyBase.d.ts.map +1 -1
- package/dist/types/YyBase.js +5 -1
- package/dist/types/YyBase.js.map +1 -1
- package/dist/types/YyExtension.d.ts +17 -753
- package/dist/types/YyExtension.d.ts.map +1 -1
- package/dist/types/YyExtension.js +4 -8
- package/dist/types/YyExtension.js.map +1 -1
- package/dist/types/YyObject.d.ts +25 -321
- package/dist/types/YyObject.d.ts.map +1 -1
- package/dist/types/YyRoom.d.ts +184 -2867
- package/dist/types/YyRoom.d.ts.map +1 -1
- package/dist/types/YyRoom.js +45 -43
- package/dist/types/YyRoom.js.map +1 -1
- package/dist/types/YyRoomUI.d.ts +18 -0
- package/dist/types/YyRoomUI.d.ts.map +1 -0
- package/dist/types/YyRoomUI.js +15 -0
- package/dist/types/YyRoomUI.js.map +1 -0
- package/dist/types/YyScript.d.ts +4 -38
- package/dist/types/YyScript.d.ts.map +1 -1
- package/dist/types/YyShader.d.ts +4 -52
- package/dist/types/YyShader.d.ts.map +1 -1
- package/dist/types/YySound.d.ts +150 -79
- package/dist/types/YySound.d.ts.map +1 -1
- package/dist/types/YySound.js +83 -16
- package/dist/types/YySound.js.map +1 -1
- package/dist/types/YySprite.d.ts +1385 -2633
- package/dist/types/YySprite.d.ts.map +1 -1
- package/dist/types/YySprite.js +40 -24
- package/dist/types/YySprite.js.map +1 -1
- package/dist/types/YySprite.lib.d.ts +564 -123
- package/dist/types/YySprite.lib.d.ts.map +1 -1
- package/dist/types/YySprite.lib.js.map +1 -1
- package/dist/types/Yyp.d.ts +50 -1100
- package/dist/types/Yyp.d.ts.map +1 -1
- package/dist/types/Yyp.js +15 -13
- package/dist/types/Yyp.js.map +1 -1
- package/dist/types/utility.d.ts +8 -28
- package/dist/types/utility.d.ts.map +1 -1
- package/dist/types/utility.js +14 -14
- package/dist/types/utility.js.map +1 -1
- package/package.json +12 -12
package/dist/types/YySound.d.ts
CHANGED
|
@@ -17,103 +17,174 @@ export declare enum SoundCompression {
|
|
|
17
17
|
export type SoundChannelAsString = keyof typeof SoundChannel;
|
|
18
18
|
export type SoundCompressionAsString = keyof typeof SoundCompression;
|
|
19
19
|
export type SoundSampleRate = z.infer<typeof soundSampleRateSchema>;
|
|
20
|
-
declare const soundSampleRateSchema: z.ZodUnion<[z.ZodLiteral<5512>, z.ZodLiteral<11025>, z.ZodLiteral<22050>, z.ZodLiteral<32000>, z.ZodLiteral<44100>, z.ZodLiteral<48000>]>;
|
|
21
|
-
export type
|
|
22
|
-
export declare const
|
|
20
|
+
declare const soundSampleRateSchema: z.ZodUnion<readonly [z.ZodLiteral<5512>, z.ZodLiteral<11025>, z.ZodLiteral<22050>, z.ZodLiteral<32000>, z.ZodLiteral<44100>, z.ZodLiteral<48000>]>;
|
|
21
|
+
export type YySoundLegacy = z.infer<typeof yySoundSchemaLegacy>;
|
|
22
|
+
export declare const yySoundSchemaLegacy: z.ZodObject<{
|
|
23
23
|
"%Name": z.ZodOptional<z.ZodString>;
|
|
24
24
|
ConfigValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
25
25
|
name: z.ZodString;
|
|
26
|
-
|
|
27
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
26
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
28
27
|
parent: z.ZodDefault<z.ZodObject<{
|
|
29
28
|
name: z.ZodString;
|
|
30
29
|
path: z.ZodString;
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
name: string;
|
|
34
|
-
}, {
|
|
35
|
-
path: string;
|
|
36
|
-
name: string;
|
|
37
|
-
}>>;
|
|
38
|
-
resourceVersion: z.ZodDefault<z.ZodString>;
|
|
39
|
-
}, {
|
|
40
|
-
compression: z.ZodDefault<z.ZodNativeEnum<typeof SoundCompression>>;
|
|
30
|
+
}, z.core.$strip>>;
|
|
31
|
+
compression: z.ZodDefault<z.ZodEnum<typeof SoundCompression>>;
|
|
41
32
|
conversionMode: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
42
|
-
volume: z.ZodDefault<z.
|
|
33
|
+
volume: z.ZodDefault<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodTransform<import("./utility.js").FixedNumber, number>>>;
|
|
43
34
|
preload: z.ZodDefault<z.ZodBoolean>;
|
|
44
35
|
bitRate: z.ZodDefault<z.ZodNumber>;
|
|
45
|
-
sampleRate: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<5512>, z.ZodLiteral<11025>, z.ZodLiteral<22050>, z.ZodLiteral<32000>, z.ZodLiteral<44100>, z.ZodLiteral<48000>]>>;
|
|
46
|
-
type: z.ZodDefault<z.
|
|
47
|
-
bitDepth: z.ZodDefault<z.
|
|
36
|
+
sampleRate: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<5512>, z.ZodLiteral<11025>, z.ZodLiteral<22050>, z.ZodLiteral<32000>, z.ZodLiteral<44100>, z.ZodLiteral<48000>]>>;
|
|
37
|
+
type: z.ZodDefault<z.ZodEnum<typeof SoundChannel>>;
|
|
38
|
+
bitDepth: z.ZodDefault<z.ZodEnum<typeof SoundBitDepth>>;
|
|
48
39
|
audioGroupId: z.ZodDefault<z.ZodObject<{
|
|
49
40
|
name: z.ZodString;
|
|
50
41
|
path: z.ZodString;
|
|
51
|
-
},
|
|
52
|
-
path: string;
|
|
53
|
-
name: string;
|
|
54
|
-
}, {
|
|
55
|
-
path: string;
|
|
56
|
-
name: string;
|
|
57
|
-
}>>;
|
|
58
|
-
/** `${name}.${ext} (e.g. mySound) */
|
|
42
|
+
}, z.core.$strip>>;
|
|
59
43
|
soundFile: z.ZodString;
|
|
44
|
+
duration: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodTransform<import("./utility.js").FixedNumber, number>>>;
|
|
45
|
+
resourceType: z.ZodDefault<z.ZodLiteral<"GMSound">>;
|
|
46
|
+
resourceVersion: z.ZodDefault<z.ZodLiteral<"1.0">>;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
export type YySoundV1 = z.infer<typeof yySoundSchemaV1>;
|
|
49
|
+
export declare const yySoundSchemaV1: z.ZodObject<{
|
|
50
|
+
$GMSound: z.ZodLiteral<"">;
|
|
51
|
+
'%Name': z.ZodString;
|
|
52
|
+
audioGroupId: z.ZodDefault<z.ZodObject<{
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
path: z.ZodString;
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
bitDepth: z.ZodDefault<z.ZodEnum<typeof SoundBitDepth>>;
|
|
57
|
+
bitRate: z.ZodDefault<z.ZodNumber>;
|
|
58
|
+
compression: z.ZodDefault<z.ZodEnum<typeof SoundCompression>>;
|
|
59
|
+
conversionMode: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
60
60
|
/**
|
|
61
61
|
* Duration of the sound. Automatically
|
|
62
62
|
* computed by GameMaker, so Stitch can generally
|
|
63
63
|
* ignore it.
|
|
64
64
|
*/
|
|
65
|
-
duration: z.
|
|
65
|
+
duration: z.ZodDefault<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodTransform<import("./utility.js").FixedNumber, number>>>;
|
|
66
|
+
name: z.ZodString;
|
|
67
|
+
parent: z.ZodDefault<z.ZodObject<{
|
|
68
|
+
name: z.ZodString;
|
|
69
|
+
path: z.ZodString;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
preload: z.ZodDefault<z.ZodBoolean>;
|
|
72
|
+
resourceType: z.ZodDefault<z.ZodLiteral<"GMSound">>;
|
|
73
|
+
resourceVersion: z.ZodDefault<z.ZodLiteral<"2.0">>;
|
|
74
|
+
sampleRate: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<5512>, z.ZodLiteral<11025>, z.ZodLiteral<22050>, z.ZodLiteral<32000>, z.ZodLiteral<44100>, z.ZodLiteral<48000>]>>;
|
|
75
|
+
soundFile: z.ZodString;
|
|
76
|
+
type: z.ZodDefault<z.ZodEnum<typeof SoundChannel>>;
|
|
77
|
+
volume: z.ZodDefault<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodTransform<import("./utility.js").FixedNumber, number>>>;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
export type YySoundV2 = z.infer<typeof yySoundSchemaV2>;
|
|
80
|
+
export declare const yySoundSchemaV2: z.ZodObject<{
|
|
81
|
+
$GMSound: z.ZodLiteral<"v2">;
|
|
82
|
+
'%Name': z.ZodString;
|
|
83
|
+
audioGroupId: z.ZodDefault<z.ZodObject<{
|
|
84
|
+
name: z.ZodString;
|
|
85
|
+
path: z.ZodString;
|
|
86
|
+
}, z.core.$strip>>;
|
|
87
|
+
bitDepth: z.ZodDefault<z.ZodEnum<typeof SoundBitDepth>>;
|
|
88
|
+
channelFormat: z.ZodDefault<z.ZodEnum<typeof SoundChannel>>;
|
|
89
|
+
compression: z.ZodDefault<z.ZodEnum<typeof SoundCompression>>;
|
|
90
|
+
compressionQuality: z.ZodDefault<z.ZodNumber>;
|
|
91
|
+
ConfigValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
92
|
+
conversionMode: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
93
|
+
duration: z.ZodDefault<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodTransform<import("./utility.js").FixedNumber, number>>>;
|
|
94
|
+
exportDir: z.ZodDefault<z.ZodString>;
|
|
95
|
+
name: z.ZodString;
|
|
96
|
+
parent: z.ZodDefault<z.ZodObject<{
|
|
97
|
+
name: z.ZodString;
|
|
98
|
+
path: z.ZodString;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
preload: z.ZodDefault<z.ZodBoolean>;
|
|
66
101
|
resourceType: z.ZodDefault<z.ZodLiteral<"GMSound">>;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
soundFile:
|
|
95
|
-
|
|
96
|
-
"
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
name:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
102
|
+
resourceVersion: z.ZodDefault<z.ZodLiteral<"2.0">>;
|
|
103
|
+
sampleRate: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<5512>, z.ZodLiteral<11025>, z.ZodLiteral<22050>, z.ZodLiteral<32000>, z.ZodLiteral<44100>, z.ZodLiteral<48000>]>>;
|
|
104
|
+
soundFile: z.ZodString;
|
|
105
|
+
volume: z.ZodDefault<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodTransform<import("./utility.js").FixedNumber, number>>>;
|
|
106
|
+
}, z.core.$loose>;
|
|
107
|
+
export type YySound = YySoundLegacy | YySoundV1 | YySoundV2;
|
|
108
|
+
export declare const yySoundSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
109
|
+
"%Name": z.ZodOptional<z.ZodString>;
|
|
110
|
+
ConfigValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
111
|
+
name: z.ZodString;
|
|
112
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
113
|
+
parent: z.ZodDefault<z.ZodObject<{
|
|
114
|
+
name: z.ZodString;
|
|
115
|
+
path: z.ZodString;
|
|
116
|
+
}, z.core.$strip>>;
|
|
117
|
+
compression: z.ZodDefault<z.ZodEnum<typeof SoundCompression>>;
|
|
118
|
+
conversionMode: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
119
|
+
volume: z.ZodDefault<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodTransform<import("./utility.js").FixedNumber, number>>>;
|
|
120
|
+
preload: z.ZodDefault<z.ZodBoolean>;
|
|
121
|
+
bitRate: z.ZodDefault<z.ZodNumber>;
|
|
122
|
+
sampleRate: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<5512>, z.ZodLiteral<11025>, z.ZodLiteral<22050>, z.ZodLiteral<32000>, z.ZodLiteral<44100>, z.ZodLiteral<48000>]>>;
|
|
123
|
+
type: z.ZodDefault<z.ZodEnum<typeof SoundChannel>>;
|
|
124
|
+
bitDepth: z.ZodDefault<z.ZodEnum<typeof SoundBitDepth>>;
|
|
125
|
+
audioGroupId: z.ZodDefault<z.ZodObject<{
|
|
126
|
+
name: z.ZodString;
|
|
127
|
+
path: z.ZodString;
|
|
128
|
+
}, z.core.$strip>>;
|
|
129
|
+
soundFile: z.ZodString;
|
|
130
|
+
duration: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodTransform<import("./utility.js").FixedNumber, number>>>;
|
|
131
|
+
resourceType: z.ZodDefault<z.ZodLiteral<"GMSound">>;
|
|
132
|
+
resourceVersion: z.ZodDefault<z.ZodLiteral<"1.0">>;
|
|
133
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
134
|
+
$GMSound: z.ZodLiteral<"">;
|
|
135
|
+
'%Name': z.ZodString;
|
|
136
|
+
audioGroupId: z.ZodDefault<z.ZodObject<{
|
|
137
|
+
name: z.ZodString;
|
|
138
|
+
path: z.ZodString;
|
|
139
|
+
}, z.core.$strip>>;
|
|
140
|
+
bitDepth: z.ZodDefault<z.ZodEnum<typeof SoundBitDepth>>;
|
|
141
|
+
bitRate: z.ZodDefault<z.ZodNumber>;
|
|
142
|
+
compression: z.ZodDefault<z.ZodEnum<typeof SoundCompression>>;
|
|
143
|
+
conversionMode: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
144
|
+
/**
|
|
145
|
+
* Duration of the sound. Automatically
|
|
146
|
+
* computed by GameMaker, so Stitch can generally
|
|
147
|
+
* ignore it.
|
|
148
|
+
*/
|
|
149
|
+
duration: z.ZodDefault<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodTransform<import("./utility.js").FixedNumber, number>>>;
|
|
150
|
+
name: z.ZodString;
|
|
151
|
+
parent: z.ZodDefault<z.ZodObject<{
|
|
152
|
+
name: z.ZodString;
|
|
153
|
+
path: z.ZodString;
|
|
154
|
+
}, z.core.$strip>>;
|
|
155
|
+
preload: z.ZodDefault<z.ZodBoolean>;
|
|
156
|
+
resourceType: z.ZodDefault<z.ZodLiteral<"GMSound">>;
|
|
157
|
+
resourceVersion: z.ZodDefault<z.ZodLiteral<"2.0">>;
|
|
158
|
+
sampleRate: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<5512>, z.ZodLiteral<11025>, z.ZodLiteral<22050>, z.ZodLiteral<32000>, z.ZodLiteral<44100>, z.ZodLiteral<48000>]>>;
|
|
159
|
+
soundFile: z.ZodString;
|
|
160
|
+
type: z.ZodDefault<z.ZodEnum<typeof SoundChannel>>;
|
|
161
|
+
volume: z.ZodDefault<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodTransform<import("./utility.js").FixedNumber, number>>>;
|
|
162
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
163
|
+
$GMSound: z.ZodLiteral<"v2">;
|
|
164
|
+
'%Name': z.ZodString;
|
|
165
|
+
audioGroupId: z.ZodDefault<z.ZodObject<{
|
|
166
|
+
name: z.ZodString;
|
|
167
|
+
path: z.ZodString;
|
|
168
|
+
}, z.core.$strip>>;
|
|
169
|
+
bitDepth: z.ZodDefault<z.ZodEnum<typeof SoundBitDepth>>;
|
|
170
|
+
channelFormat: z.ZodDefault<z.ZodEnum<typeof SoundChannel>>;
|
|
171
|
+
compression: z.ZodDefault<z.ZodEnum<typeof SoundCompression>>;
|
|
172
|
+
compressionQuality: z.ZodDefault<z.ZodNumber>;
|
|
173
|
+
ConfigValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
174
|
+
conversionMode: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
175
|
+
duration: z.ZodDefault<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodTransform<import("./utility.js").FixedNumber, number>>>;
|
|
176
|
+
exportDir: z.ZodDefault<z.ZodString>;
|
|
177
|
+
name: z.ZodString;
|
|
178
|
+
parent: z.ZodDefault<z.ZodObject<{
|
|
179
|
+
name: z.ZodString;
|
|
180
|
+
path: z.ZodString;
|
|
181
|
+
}, z.core.$strip>>;
|
|
182
|
+
preload: z.ZodDefault<z.ZodBoolean>;
|
|
183
|
+
resourceType: z.ZodDefault<z.ZodLiteral<"GMSound">>;
|
|
184
|
+
resourceVersion: z.ZodDefault<z.ZodLiteral<"2.0">>;
|
|
185
|
+
sampleRate: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<5512>, z.ZodLiteral<11025>, z.ZodLiteral<22050>, z.ZodLiteral<32000>, z.ZodLiteral<44100>, z.ZodLiteral<48000>]>>;
|
|
186
|
+
soundFile: z.ZodString;
|
|
187
|
+
volume: z.ZodDefault<z.ZodPipe<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodTransform<import("./utility.js").FixedNumber, number>>>;
|
|
188
|
+
}, z.core.$loose>]>]>>;
|
|
118
189
|
export {};
|
|
119
190
|
//# sourceMappingURL=YySound.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YySound.d.ts","sourceRoot":"","sources":["../../src/types/YySound.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,oBAAY,aAAa;IACvB,IAAI,IAAA;IACJ,KAAK,IAAA;CACN;AACD,oBAAY,YAAY;IACtB,IAAI,IAAA;IACJ,MAAM,IAAA;IACN,MAAM,IAAA;CACP;AAED,oBAAY,gBAAgB;IAC1B,YAAY,IAAA;IACZ,UAAU,IAAA;IACV,kBAAkB,IAAA;IAClB,kBAAkB,IAAA;CACnB;AAQD,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,YAAY,CAAC;AAC7D,MAAM,MAAM,wBAAwB,GAAG,MAAM,OAAO,gBAAgB,CAAC;AAErE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,QAAA,MAAM,qBAAqB,
|
|
1
|
+
{"version":3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;;;;;;;;;;;;;sBA2DJ,CAAC"}
|
package/dist/types/YySound.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Generated by ts-to-zod
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { yyBaseSchema } from './YyBase.js';
|
|
4
|
-
import { fixedNumber } from './utility.js';
|
|
3
|
+
import { configValuesSchema, yyBaseSchema, yyParentSchema } from './YyBase.js';
|
|
4
|
+
import { fixed0, fixed1, fixedNumber, unstable } from './utility.js';
|
|
5
5
|
export var SoundBitDepth;
|
|
6
6
|
(function (SoundBitDepth) {
|
|
7
7
|
SoundBitDepth[SoundBitDepth["Bit8"] = 0] = "Bit8";
|
|
@@ -20,9 +20,9 @@ export var SoundCompression;
|
|
|
20
20
|
SoundCompression[SoundCompression["UncompressedOnLoad"] = 2] = "UncompressedOnLoad";
|
|
21
21
|
SoundCompression[SoundCompression["CompressedStreamed"] = 3] = "CompressedStreamed";
|
|
22
22
|
})(SoundCompression || (SoundCompression = {}));
|
|
23
|
-
const soundChannelSchema = z.
|
|
24
|
-
const soundCompressionSchema = z.
|
|
25
|
-
const soundBitDepthSchema = z.
|
|
23
|
+
const soundChannelSchema = z.enum(SoundChannel);
|
|
24
|
+
const soundCompressionSchema = z.enum(SoundCompression);
|
|
25
|
+
const soundBitDepthSchema = z.enum(SoundBitDepth);
|
|
26
26
|
const soundSampleRateSchema = z.union([
|
|
27
27
|
z.literal(5512),
|
|
28
28
|
z.literal(11025),
|
|
@@ -31,24 +31,25 @@ const soundSampleRateSchema = z.union([
|
|
|
31
31
|
z.literal(44100),
|
|
32
32
|
z.literal(48000),
|
|
33
33
|
]);
|
|
34
|
-
|
|
34
|
+
const audioGroupIdSchema = z
|
|
35
|
+
.object({
|
|
36
|
+
name: z.string(),
|
|
37
|
+
path: z.string(),
|
|
38
|
+
})
|
|
39
|
+
.default({
|
|
40
|
+
name: 'audiogroup_default',
|
|
41
|
+
path: 'audiogroups/audiogroup_default',
|
|
42
|
+
});
|
|
43
|
+
export const yySoundSchemaLegacy = yyBaseSchema.extend({
|
|
35
44
|
compression: soundCompressionSchema.default(0),
|
|
36
45
|
conversionMode: z.number().optional().default(0),
|
|
37
|
-
volume: fixedNumber(z.number().min(0).max(1)).default(
|
|
46
|
+
volume: fixedNumber(z.number().min(0).max(1)).default(fixed1),
|
|
38
47
|
preload: z.boolean().default(false),
|
|
39
48
|
bitRate: z.number().default(128),
|
|
40
49
|
sampleRate: soundSampleRateSchema.default(44100),
|
|
41
50
|
type: soundChannelSchema.default(1),
|
|
42
51
|
bitDepth: soundBitDepthSchema.default(1),
|
|
43
|
-
audioGroupId:
|
|
44
|
-
.object({
|
|
45
|
-
name: z.string(),
|
|
46
|
-
path: z.string(),
|
|
47
|
-
})
|
|
48
|
-
.default({
|
|
49
|
-
name: 'audiogroup_default',
|
|
50
|
-
path: 'audiogroups/audiogroup_default',
|
|
51
|
-
}),
|
|
52
|
+
audioGroupId: audioGroupIdSchema,
|
|
52
53
|
/** `${name}.${ext} (e.g. mySound) */
|
|
53
54
|
soundFile: z.string(),
|
|
54
55
|
/**
|
|
@@ -58,5 +59,71 @@ export const yySoundSchema = yyBaseSchema.extend({
|
|
|
58
59
|
*/
|
|
59
60
|
duration: fixedNumber(z.number(), 2).optional(),
|
|
60
61
|
resourceType: z.literal('GMSound').default('GMSound'),
|
|
62
|
+
resourceVersion: z.literal('1.0').default('1.0'),
|
|
63
|
+
});
|
|
64
|
+
export const yySoundSchemaV1 = unstable({
|
|
65
|
+
$GMSound: z.literal(''),
|
|
66
|
+
'%Name': z.string(),
|
|
67
|
+
audioGroupId: audioGroupIdSchema,
|
|
68
|
+
bitDepth: soundBitDepthSchema.default(1),
|
|
69
|
+
bitRate: z.number().default(128),
|
|
70
|
+
compression: soundCompressionSchema.default(0),
|
|
71
|
+
conversionMode: z.number().optional().default(0),
|
|
72
|
+
/**
|
|
73
|
+
* Duration of the sound. Automatically
|
|
74
|
+
* computed by GameMaker, so Stitch can generally
|
|
75
|
+
* ignore it.
|
|
76
|
+
*/
|
|
77
|
+
duration: fixedNumber(z.number(), 2).default(fixed0),
|
|
78
|
+
name: z.string(),
|
|
79
|
+
parent: yyParentSchema,
|
|
80
|
+
preload: z.boolean().default(false),
|
|
81
|
+
resourceType: z.literal('GMSound').default('GMSound'),
|
|
82
|
+
resourceVersion: z.literal('2.0').default('2.0'),
|
|
83
|
+
sampleRate: soundSampleRateSchema.default(44100),
|
|
84
|
+
soundFile: z.string(),
|
|
85
|
+
type: soundChannelSchema.default(1),
|
|
86
|
+
volume: fixedNumber(z.number().min(0).max(1)).default(fixed1),
|
|
87
|
+
});
|
|
88
|
+
export const yySoundSchemaV2 = z.looseObject({
|
|
89
|
+
$GMSound: z.literal('v2'),
|
|
90
|
+
'%Name': z.string(),
|
|
91
|
+
audioGroupId: audioGroupIdSchema,
|
|
92
|
+
bitDepth: soundBitDepthSchema.default(1),
|
|
93
|
+
channelFormat: soundChannelSchema
|
|
94
|
+
.default(1)
|
|
95
|
+
.describe("Previously called 'type'"),
|
|
96
|
+
compression: soundCompressionSchema.default(0),
|
|
97
|
+
compressionQuality: z.number().default(4),
|
|
98
|
+
ConfigValues: configValuesSchema,
|
|
99
|
+
conversionMode: z.number().optional().default(0),
|
|
100
|
+
duration: fixedNumber(z.number(), 2).default(fixed0),
|
|
101
|
+
exportDir: z.string().default(''),
|
|
102
|
+
name: z.string(),
|
|
103
|
+
parent: yyParentSchema,
|
|
104
|
+
preload: z.boolean().default(false),
|
|
105
|
+
resourceType: z.literal('GMSound').default('GMSound'),
|
|
106
|
+
resourceVersion: z.literal('2.0').default('2.0'),
|
|
107
|
+
sampleRate: soundSampleRateSchema.default(44100),
|
|
108
|
+
soundFile: z.string(),
|
|
109
|
+
volume: fixedNumber(z.number().min(0).max(1)).default(fixed1),
|
|
61
110
|
});
|
|
111
|
+
export const yySoundSchema = z.preprocess((arg) => {
|
|
112
|
+
if (!arg || typeof arg !== 'object')
|
|
113
|
+
return arg;
|
|
114
|
+
if ('resourceVersion' in arg && arg.resourceVersion === '2.0') {
|
|
115
|
+
// @ts-expect-error type is unknown here
|
|
116
|
+
arg['$GMSound'] ||= '';
|
|
117
|
+
}
|
|
118
|
+
if ('$GMSound' in arg) {
|
|
119
|
+
let v2 = arg;
|
|
120
|
+
v2['resourceVersion'] = '2.0';
|
|
121
|
+
v2.name ||= v2['%Name'];
|
|
122
|
+
v2['%Name'] ||= v2.name;
|
|
123
|
+
}
|
|
124
|
+
return arg;
|
|
125
|
+
}, z.discriminatedUnion('resourceVersion', [
|
|
126
|
+
yySoundSchemaLegacy,
|
|
127
|
+
z.discriminatedUnion('$GMSound', [yySoundSchemaV1, yySoundSchemaV2]),
|
|
128
|
+
]));
|
|
62
129
|
//# sourceMappingURL=YySound.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YySound.js","sourceRoot":"","sources":["../../src/types/YySound.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"YySound.js","sourceRoot":"","sources":["../../src/types/YySound.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAErE,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,iDAAI,CAAA;IACJ,mDAAK,CAAA;AACP,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB;AACD,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,+CAAI,CAAA;IACJ,mDAAM,CAAA;IACN,mDAAM,CAAA;AACR,CAAC,EAJ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