@bscotch/yy 0.6.1 → 0.7.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.
Files changed (44) hide show
  1. package/LICENSE.md +23 -0
  2. package/dist/Yy.d.ts +6859 -6829
  3. package/dist/Yy.d.ts.map +1 -1
  4. package/dist/Yy.js +247 -246
  5. package/dist/Yy.js.map +1 -1
  6. package/dist/Yy.parse.d.ts +5 -5
  7. package/dist/Yy.parse.js +240 -240
  8. package/dist/Yy.stringify.d.ts +6 -6
  9. package/dist/Yy.stringify.js +129 -129
  10. package/dist/cli.d.ts +1 -1
  11. package/dist/cli.js +16 -16
  12. package/dist/index.d.ts +8 -8
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +8 -8
  15. package/dist/index.js.map +1 -1
  16. package/dist/types/YyBase.d.ts +46 -46
  17. package/dist/types/YyBase.js +37 -37
  18. package/dist/types/YyObject.d.ts +454 -462
  19. package/dist/types/YyObject.d.ts.map +1 -1
  20. package/dist/types/YyObject.js +108 -108
  21. package/dist/types/YyRoom.d.ts +1474 -1507
  22. package/dist/types/YyRoom.d.ts.map +1 -1
  23. package/dist/types/YyRoom.js +155 -155
  24. package/dist/types/YyScript.d.ts +45 -47
  25. package/dist/types/YyScript.d.ts.map +1 -1
  26. package/dist/types/YyScript.js +8 -8
  27. package/dist/types/YySound.d.ts +107 -115
  28. package/dist/types/YySound.d.ts.map +1 -1
  29. package/dist/types/YySound.js +61 -61
  30. package/dist/types/YySprite.d.ts +5438 -5446
  31. package/dist/types/YySprite.d.ts.map +1 -1
  32. package/dist/types/YySprite.js +417 -417
  33. package/dist/types/YySprite.lib.d.ts +221 -215
  34. package/dist/types/YySprite.lib.d.ts.map +1 -1
  35. package/dist/types/YySprite.lib.js +35 -35
  36. package/dist/types/Yyp.d.ts +604 -604
  37. package/dist/types/Yyp.js +101 -101
  38. package/dist/types/utility.d.ts +64 -64
  39. package/dist/types/utility.js +104 -104
  40. package/package.json +16 -11
  41. package/dist/Schema.d.ts +0 -1
  42. package/dist/Schema.d.ts.map +0 -1
  43. package/dist/Schema.js +0 -2
  44. package/dist/Schema.js.map +0 -1
@@ -1,116 +1,108 @@
1
- import { z } from 'zod';
2
- export declare enum SoundBitDepth {
3
- Bit8 = 0,
4
- Bit16 = 1
5
- }
6
- export declare enum SoundChannel {
7
- Mono = 0,
8
- Stereo = 1,
9
- ThreeD = 2
10
- }
11
- export declare enum SoundCompression {
12
- Uncompressed = 0,
13
- Compressed = 1,
14
- UncompressedOnLoad = 2,
15
- CompressedStreamed = 3
16
- }
17
- export type SoundChannelAsString = keyof typeof SoundChannel;
18
- export type SoundCompressionAsString = keyof typeof SoundCompression;
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 YySound = z.infer<typeof yySoundSchema>;
22
- export declare const yySoundSchema: z.ZodObject<z.extendShape<{
23
- ConfigValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
24
- name: z.ZodString;
25
- resourceType: z.ZodString;
26
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
27
- parent: z.ZodDefault<z.ZodObject<{
28
- name: z.ZodString;
29
- path: z.ZodString;
30
- }, "strip", z.ZodTypeAny, {
31
- path: string;
32
- name: string;
33
- }, {
34
- path: string;
35
- name: string;
36
- }>>;
37
- resourceVersion: z.ZodDefault<z.ZodString>;
38
- }, {
39
- compression: z.ZodDefault<z.ZodNativeEnum<typeof SoundCompression>>;
40
- conversionMode: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
41
- volume: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodNumber, number, number | import("./utility.js").FixedNumber>, import("./utility.js").FixedNumber, number | import("./utility.js").FixedNumber>>;
42
- preload: z.ZodDefault<z.ZodBoolean>;
43
- bitRate: z.ZodDefault<z.ZodNumber>;
44
- sampleRate: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<5512>, z.ZodLiteral<11025>, z.ZodLiteral<22050>, z.ZodLiteral<32000>, z.ZodLiteral<44100>, z.ZodLiteral<48000>]>>;
45
- type: z.ZodDefault<z.ZodNativeEnum<typeof SoundChannel>>;
46
- bitDepth: z.ZodDefault<z.ZodNativeEnum<typeof SoundBitDepth>>;
47
- audioGroupId: z.ZodDefault<z.ZodObject<{
48
- name: z.ZodString;
49
- path: z.ZodString;
50
- }, "strip", z.ZodTypeAny, {
51
- path: string;
52
- name: string;
53
- }, {
54
- path: string;
55
- name: string;
56
- }>>;
57
- /** `${name}.${ext} (e.g. mySound) */
58
- soundFile: z.ZodString;
59
- /**
60
- * Duration of the sound. Automatically
61
- * computed by GameMaker, so Stitch can generally
62
- * ignore it.
63
- */
64
- duration: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodNumber, number, number | import("./utility.js").FixedNumber>, import("./utility.js").FixedNumber, number | import("./utility.js").FixedNumber>>;
65
- resourceType: z.ZodDefault<z.ZodLiteral<"GMSound">>;
66
- }>, "strip", z.ZodTypeAny, {
67
- ConfigValues?: Record<string, Record<string, string>> | undefined;
68
- tags?: string[] | undefined;
69
- duration?: import("./utility.js").FixedNumber | undefined;
70
- type: SoundChannel;
71
- name: string;
72
- resourceType: "GMSound";
73
- parent: {
74
- path: string;
75
- name: string;
76
- };
77
- resourceVersion: string;
78
- volume: import("./utility.js").FixedNumber;
79
- compression: SoundCompression;
80
- conversionMode: number;
81
- preload: boolean;
82
- bitRate: number;
83
- sampleRate: 5512 | 11025 | 22050 | 32000 | 44100 | 48000;
84
- bitDepth: SoundBitDepth;
85
- audioGroupId: {
86
- path: string;
87
- name: string;
88
- };
89
- soundFile: string;
90
- }, {
91
- type?: SoundChannel | undefined;
92
- ConfigValues?: Record<string, Record<string, string>> | undefined;
93
- resourceType?: "GMSound" | undefined;
94
- tags?: string[] | undefined;
95
- parent?: {
96
- path: string;
97
- name: string;
98
- } | undefined;
99
- resourceVersion?: string | undefined;
100
- volume?: number | import("./utility.js").FixedNumber | undefined;
101
- compression?: SoundCompression | undefined;
102
- conversionMode?: number | undefined;
103
- preload?: boolean | undefined;
104
- bitRate?: number | undefined;
105
- sampleRate?: 5512 | 11025 | 22050 | 32000 | 44100 | 48000 | undefined;
106
- bitDepth?: SoundBitDepth | undefined;
107
- audioGroupId?: {
108
- path: string;
109
- name: string;
110
- } | undefined;
111
- duration?: number | import("./utility.js").FixedNumber | undefined;
112
- name: string;
113
- soundFile: string;
114
- }>;
115
- export {};
1
+ import { z } from 'zod';
2
+ export declare enum SoundBitDepth {
3
+ Bit8 = 0,
4
+ Bit16 = 1
5
+ }
6
+ export declare enum SoundChannel {
7
+ Mono = 0,
8
+ Stereo = 1,
9
+ ThreeD = 2
10
+ }
11
+ export declare enum SoundCompression {
12
+ Uncompressed = 0,
13
+ Compressed = 1,
14
+ UncompressedOnLoad = 2,
15
+ CompressedStreamed = 3
16
+ }
17
+ export type SoundChannelAsString = keyof typeof SoundChannel;
18
+ export type SoundCompressionAsString = keyof typeof SoundCompression;
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 YySound = z.infer<typeof yySoundSchema>;
22
+ export declare const yySoundSchema: z.ZodObject<{
23
+ ConfigValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
24
+ name: z.ZodString;
25
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
26
+ parent: z.ZodDefault<z.ZodObject<{
27
+ name: z.ZodString;
28
+ path: z.ZodString;
29
+ }, "strip", z.ZodTypeAny, {
30
+ path: string;
31
+ name: string;
32
+ }, {
33
+ path: string;
34
+ name: string;
35
+ }>>;
36
+ resourceVersion: z.ZodDefault<z.ZodString>;
37
+ compression: z.ZodDefault<z.ZodNativeEnum<typeof SoundCompression>>;
38
+ conversionMode: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
39
+ volume: z.ZodDefault<z.ZodEffects<z.ZodEffects<z.ZodNumber, number, number | import("./utility.js").FixedNumber>, import("./utility.js").FixedNumber, number | import("./utility.js").FixedNumber>>;
40
+ preload: z.ZodDefault<z.ZodBoolean>;
41
+ bitRate: z.ZodDefault<z.ZodNumber>;
42
+ sampleRate: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<5512>, z.ZodLiteral<11025>, z.ZodLiteral<22050>, z.ZodLiteral<32000>, z.ZodLiteral<44100>, z.ZodLiteral<48000>]>>;
43
+ type: z.ZodDefault<z.ZodNativeEnum<typeof SoundChannel>>;
44
+ bitDepth: z.ZodDefault<z.ZodNativeEnum<typeof SoundBitDepth>>;
45
+ audioGroupId: z.ZodDefault<z.ZodObject<{
46
+ name: z.ZodString;
47
+ path: z.ZodString;
48
+ }, "strip", z.ZodTypeAny, {
49
+ path: string;
50
+ name: string;
51
+ }, {
52
+ path: string;
53
+ name: string;
54
+ }>>;
55
+ soundFile: z.ZodString;
56
+ duration: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodNumber, number, number | import("./utility.js").FixedNumber>, import("./utility.js").FixedNumber, number | import("./utility.js").FixedNumber>>;
57
+ resourceType: z.ZodDefault<z.ZodLiteral<"GMSound">>;
58
+ }, z.UnknownKeysParam, z.ZodTypeAny, {
59
+ type: SoundChannel;
60
+ name: string;
61
+ resourceType: "GMSound";
62
+ parent: {
63
+ path: string;
64
+ name: string;
65
+ };
66
+ resourceVersion: string;
67
+ volume: import("./utility.js").FixedNumber;
68
+ compression: SoundCompression;
69
+ conversionMode: number;
70
+ preload: boolean;
71
+ bitRate: number;
72
+ sampleRate: 5512 | 11025 | 22050 | 32000 | 44100 | 48000;
73
+ bitDepth: SoundBitDepth;
74
+ audioGroupId: {
75
+ path: string;
76
+ name: string;
77
+ };
78
+ soundFile: string;
79
+ ConfigValues?: Record<string, Record<string, string>> | undefined;
80
+ tags?: string[] | undefined;
81
+ duration?: import("./utility.js").FixedNumber | undefined;
82
+ }, {
83
+ name: string;
84
+ soundFile: string;
85
+ ConfigValues?: Record<string, Record<string, string>> | undefined;
86
+ tags?: string[] | undefined;
87
+ parent?: {
88
+ path: string;
89
+ name: string;
90
+ } | undefined;
91
+ resourceVersion?: string | undefined;
92
+ compression?: SoundCompression | undefined;
93
+ conversionMode?: number | undefined;
94
+ volume?: number | import("./utility.js").FixedNumber | undefined;
95
+ preload?: boolean | undefined;
96
+ bitRate?: number | undefined;
97
+ sampleRate?: 5512 | 11025 | 22050 | 32000 | 44100 | 48000 | undefined;
98
+ type?: SoundChannel | undefined;
99
+ bitDepth?: SoundBitDepth | undefined;
100
+ audioGroupId?: {
101
+ path: string;
102
+ name: string;
103
+ } | undefined;
104
+ duration?: number | import("./utility.js").FixedNumber | undefined;
105
+ resourceType?: "GMSound" | undefined;
106
+ }>;
107
+ export {};
116
108
  //# 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,gB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ts-to-zod
2
- import { z } from 'zod';
3
- import { fixedNumber } from './utility.js';
4
- import { yyBaseSchema } from './YyBase.js';
5
- export var SoundBitDepth;
6
- (function (SoundBitDepth) {
7
- SoundBitDepth[SoundBitDepth["Bit8"] = 0] = "Bit8";
8
- SoundBitDepth[SoundBitDepth["Bit16"] = 1] = "Bit16";
9
- })(SoundBitDepth || (SoundBitDepth = {}));
10
- export var SoundChannel;
11
- (function (SoundChannel) {
12
- SoundChannel[SoundChannel["Mono"] = 0] = "Mono";
13
- SoundChannel[SoundChannel["Stereo"] = 1] = "Stereo";
14
- SoundChannel[SoundChannel["ThreeD"] = 2] = "ThreeD";
15
- })(SoundChannel || (SoundChannel = {}));
16
- export var SoundCompression;
17
- (function (SoundCompression) {
18
- SoundCompression[SoundCompression["Uncompressed"] = 0] = "Uncompressed";
19
- SoundCompression[SoundCompression["Compressed"] = 1] = "Compressed";
20
- SoundCompression[SoundCompression["UncompressedOnLoad"] = 2] = "UncompressedOnLoad";
21
- SoundCompression[SoundCompression["CompressedStreamed"] = 3] = "CompressedStreamed";
22
- })(SoundCompression || (SoundCompression = {}));
23
- const soundChannelSchema = z.nativeEnum(SoundChannel);
24
- const soundCompressionSchema = z.nativeEnum(SoundCompression);
25
- const soundBitDepthSchema = z.nativeEnum(SoundBitDepth);
26
- const soundSampleRateSchema = z.union([
27
- z.literal(5512),
28
- z.literal(11025),
29
- z.literal(22050),
30
- z.literal(32000),
31
- z.literal(44100),
32
- z.literal(48000),
33
- ]);
34
- export const yySoundSchema = yyBaseSchema.extend({
35
- compression: soundCompressionSchema.default(0),
36
- conversionMode: z.number().optional().default(0),
37
- volume: fixedNumber(z.number().min(0).max(1)).default(1),
38
- preload: z.boolean().default(false),
39
- bitRate: z.number().min(128).max(512).multipleOf(8).default(128),
40
- sampleRate: soundSampleRateSchema.default(44100),
41
- type: soundChannelSchema.default(1),
42
- bitDepth: soundBitDepthSchema.default(1),
43
- audioGroupId: z
44
- .object({
45
- name: z.string(),
46
- path: z.string(),
47
- })
48
- .default({
49
- name: 'audiogroup_default',
50
- path: 'audiogroups/audiogroup_default',
51
- }),
52
- /** `${name}.${ext} (e.g. mySound) */
53
- soundFile: z.string(),
54
- /**
55
- * Duration of the sound. Automatically
56
- * computed by GameMaker, so Stitch can generally
57
- * ignore it.
58
- */
59
- duration: fixedNumber(z.number(), 2).optional(),
60
- resourceType: z.literal('GMSound').default('GMSound'),
61
- });
1
+ // Generated by ts-to-zod
2
+ import { z } from 'zod';
3
+ import { fixedNumber } from './utility.js';
4
+ import { yyBaseSchema } from './YyBase.js';
5
+ export var SoundBitDepth;
6
+ (function (SoundBitDepth) {
7
+ SoundBitDepth[SoundBitDepth["Bit8"] = 0] = "Bit8";
8
+ SoundBitDepth[SoundBitDepth["Bit16"] = 1] = "Bit16";
9
+ })(SoundBitDepth || (SoundBitDepth = {}));
10
+ export var SoundChannel;
11
+ (function (SoundChannel) {
12
+ SoundChannel[SoundChannel["Mono"] = 0] = "Mono";
13
+ SoundChannel[SoundChannel["Stereo"] = 1] = "Stereo";
14
+ SoundChannel[SoundChannel["ThreeD"] = 2] = "ThreeD";
15
+ })(SoundChannel || (SoundChannel = {}));
16
+ export var SoundCompression;
17
+ (function (SoundCompression) {
18
+ SoundCompression[SoundCompression["Uncompressed"] = 0] = "Uncompressed";
19
+ SoundCompression[SoundCompression["Compressed"] = 1] = "Compressed";
20
+ SoundCompression[SoundCompression["UncompressedOnLoad"] = 2] = "UncompressedOnLoad";
21
+ SoundCompression[SoundCompression["CompressedStreamed"] = 3] = "CompressedStreamed";
22
+ })(SoundCompression || (SoundCompression = {}));
23
+ const soundChannelSchema = z.nativeEnum(SoundChannel);
24
+ const soundCompressionSchema = z.nativeEnum(SoundCompression);
25
+ const soundBitDepthSchema = z.nativeEnum(SoundBitDepth);
26
+ const soundSampleRateSchema = z.union([
27
+ z.literal(5512),
28
+ z.literal(11025),
29
+ z.literal(22050),
30
+ z.literal(32000),
31
+ z.literal(44100),
32
+ z.literal(48000),
33
+ ]);
34
+ export const yySoundSchema = yyBaseSchema.extend({
35
+ compression: soundCompressionSchema.default(0),
36
+ conversionMode: z.number().optional().default(0),
37
+ volume: fixedNumber(z.number().min(0).max(1)).default(1),
38
+ preload: z.boolean().default(false),
39
+ bitRate: z.number().min(128).max(512).multipleOf(8).default(128),
40
+ sampleRate: soundSampleRateSchema.default(44100),
41
+ type: soundChannelSchema.default(1),
42
+ bitDepth: soundBitDepthSchema.default(1),
43
+ audioGroupId: z
44
+ .object({
45
+ name: z.string(),
46
+ path: z.string(),
47
+ })
48
+ .default({
49
+ name: 'audiogroup_default',
50
+ path: 'audiogroups/audiogroup_default',
51
+ }),
52
+ /** `${name}.${ext} (e.g. mySound) */
53
+ soundFile: z.string(),
54
+ /**
55
+ * Duration of the sound. Automatically
56
+ * computed by GameMaker, so Stitch can generally
57
+ * ignore it.
58
+ */
59
+ duration: fixedNumber(z.number(), 2).optional(),
60
+ resourceType: z.literal('GMSound').default('GMSound'),
61
+ });
62
62
  //# sourceMappingURL=YySound.js.map