2dai-sdk 1.4.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.
@@ -0,0 +1,175 @@
1
+ /**
2
+ * Constants and Enums for 2DAI SDK
3
+ */
4
+ import { StylePreset, FormatPreset } from './types';
5
+ /**
6
+ * Style presets for image generation
7
+ */
8
+ export declare const STYLES: {
9
+ /**
10
+ * โšก Raw Gen6 defaults
11
+ */
12
+ readonly raw: StylePreset;
13
+ /**
14
+ * โšกโšก Realistic 2DAI generation (formerly "raw+")
15
+ */
16
+ readonly realistic: StylePreset;
17
+ /**
18
+ * ๐Ÿ“ Text & Clarity - Optimized for text rendering
19
+ */
20
+ readonly text: StylePreset;
21
+ /**
22
+ * ๐ŸŽŒ Niji anime style with vibrant colors
23
+ */
24
+ readonly ciniji: StylePreset;
25
+ /**
26
+ * ๐Ÿ“ธ Gen6 Portrait
27
+ */
28
+ readonly portrait: StylePreset;
29
+ /**
30
+ * ๐ŸŽฅ Gen6 Cinematic
31
+ */
32
+ readonly cine: StylePreset;
33
+ /**
34
+ * โšฝ Gen6 Sport
35
+ */
36
+ readonly sport: StylePreset;
37
+ /**
38
+ * ๐Ÿ‘• Gen6 Fashion
39
+ */
40
+ readonly fashion: StylePreset;
41
+ /**
42
+ * ๐ŸŒธ Gen6 Anime Niji
43
+ */
44
+ readonly niji: StylePreset;
45
+ /**
46
+ * ๐ŸŽŽ Gen6 Anime
47
+ */
48
+ readonly anime: StylePreset;
49
+ /**
50
+ * ๐Ÿ“š Gen6 Manga
51
+ */
52
+ readonly manga: StylePreset;
53
+ /**
54
+ * ๐Ÿ–Œ๏ธ Gen6 Paint
55
+ */
56
+ readonly paint: StylePreset;
57
+ };
58
+ /**
59
+ * Format presets for image generation
60
+ */
61
+ export declare const FORMATS: {
62
+ /**
63
+ * 9:16 vertical (768ร—1344)
64
+ */
65
+ readonly portrait: FormatPreset;
66
+ /**
67
+ * 16:9 horizontal (1344ร—768)
68
+ */
69
+ readonly landscape: FormatPreset;
70
+ /**
71
+ * 1:1 profile picture (1024ร—1024)
72
+ */
73
+ readonly profile: FormatPreset;
74
+ /**
75
+ * 9:16 story format (720ร—1280)
76
+ */
77
+ readonly story: FormatPreset;
78
+ /**
79
+ * 9:7 wide square (1152ร—896)
80
+ */
81
+ readonly post: FormatPreset;
82
+ /**
83
+ * Phone screen (640ร—1344)
84
+ */
85
+ readonly smartphone: FormatPreset;
86
+ /**
87
+ * 3:1 wide screen (1472ร—448)
88
+ */
89
+ readonly banner: FormatPreset;
90
+ };
91
+ /**
92
+ * Valid style IDs (derived from STYLES)
93
+ */
94
+ export declare const VALID_STYLE_IDS: ReadonlyArray<keyof typeof STYLES>;
95
+ /**
96
+ * Valid format IDs (derived from FORMATS)
97
+ */
98
+ export declare const VALID_FORMAT_IDS: ReadonlyArray<keyof typeof FORMATS>;
99
+ /**
100
+ * Default API base URL
101
+ */
102
+ export declare const DEFAULT_BASE_URL = "https://api.2dai.com";
103
+ /**
104
+ * Default request timeout (milliseconds)
105
+ */
106
+ export declare const DEFAULT_TIMEOUT = 300000;
107
+ /**
108
+ * Default retry count
109
+ */
110
+ export declare const DEFAULT_RETRIES = 3;
111
+ /**
112
+ * Video FPS constraints
113
+ */
114
+ export declare const VIDEO_FPS: {
115
+ readonly MIN: 8;
116
+ readonly MAX: 60;
117
+ readonly DEFAULT: 16;
118
+ };
119
+ /**
120
+ * Video duration constraints (seconds)
121
+ */
122
+ export declare const VIDEO_DURATION: {
123
+ readonly MIN: 1;
124
+ readonly MAX: 10;
125
+ readonly DEFAULT: 5;
126
+ };
127
+ /**
128
+ * Image dimension constraints
129
+ */
130
+ export declare const IMAGE_DIMENSIONS: {
131
+ readonly MIN: 320;
132
+ readonly MAX: 1344;
133
+ };
134
+ /**
135
+ * Seed constraints
136
+ */
137
+ export declare const SEED: {
138
+ readonly MIN: 0;
139
+ readonly MAX: 2000000000;
140
+ };
141
+ /**
142
+ * Upscale factor constraints (for AI upscaling)
143
+ */
144
+ export declare const UPSCALE_FACTOR: {
145
+ readonly MIN: 2;
146
+ readonly MAX: 4;
147
+ readonly DEFAULT: 2;
148
+ };
149
+ /**
150
+ * WebSocket defaults
151
+ */
152
+ export declare const WS_DEFAULTS: {
153
+ /** Ping interval to keep connection alive (30 seconds) */
154
+ readonly PING_INTERVAL_MS: 30000;
155
+ /** Initial reconnect delay (1 second) */
156
+ readonly RECONNECT_INTERVAL_MS: 1000;
157
+ /** Maximum reconnect delay (30 seconds) */
158
+ readonly MAX_RECONNECT_DELAY_MS: 30000;
159
+ /** Auto-reconnect enabled by default */
160
+ readonly AUTO_RECONNECT: true;
161
+ };
162
+ /**
163
+ * WebSocket request types for wsSend()
164
+ */
165
+ export declare const WS_TYPES: {
166
+ /** Generate an image from a text prompt */
167
+ readonly IMAGE: "generate_image";
168
+ /** Generate a video from an image */
169
+ readonly VIDEO: "generate_video";
170
+ /** Generate text using LLM */
171
+ readonly LLM: "generate_llm";
172
+ /** AI upscale an image */
173
+ readonly UPSCALE: "generate_upscale";
174
+ };
175
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,MAAM;IACjB;;OAEG;kBAKE,WAAW;IAEhB;;OAEG;wBAKE,WAAW;IAEhB;;OAEG;mBAKE,WAAW;IAEhB;;OAEG;qBAKE,WAAW;IAEhB;;OAEG;uBAKE,WAAW;IAEhB;;OAEG;mBAKE,WAAW;IAEhB;;OAEG;oBAKE,WAAW;IAEhB;;OAEG;sBAKE,WAAW;IAEhB;;OAEG;mBAKE,WAAW;IAEhB;;OAEG;oBAKE,WAAW;IAEhB;;OAEG;oBAKE,WAAW;IAEhB;;OAEG;oBAKE,WAAW;CACR,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,OAAO;IAClB;;OAEG;uBAME,YAAY;IAEjB;;OAEG;wBAME,YAAY;IAEjB;;OAEG;sBAME,YAAY;IAEjB;;OAEG;oBAME,YAAY;IAEjB;;OAEG;mBAME,YAAY;IAEjB;;OAEG;yBAME,YAAY;IAEjB;;OAEG;qBAME,YAAY;CACT,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,eAAe,EAA0B,aAAa,CAAC,MAAM,OAAO,MAAM,CAAC,CAAC;AAEzF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAA2B,aAAa,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC;AAE5F;;GAEG;AACH,eAAO,MAAM,gBAAgB,yBAAyB,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,eAAe,SAAS,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,eAAe,IAAI,CAAC;AAEjC;;GAEG;AACH,eAAO,MAAM,SAAS;;;;CAIZ,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,cAAc;;;;CAIjB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,IAAI;;;CAGP,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,cAAc;;;;CAIjB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,WAAW;IACtB,0DAA0D;;IAE1D,yCAAyC;;IAEzC,2CAA2C;;IAE3C,wCAAwC;;CAEhC,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,QAAQ;IACnB,2CAA2C;;IAE3C,qCAAqC;;IAErC,8BAA8B;;IAE9B,0BAA0B;;CAElB,CAAC"}
@@ -0,0 +1,260 @@
1
+ "use strict";
2
+ /**
3
+ * Constants and Enums for 2DAI SDK
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.WS_TYPES = exports.WS_DEFAULTS = exports.UPSCALE_FACTOR = exports.SEED = exports.IMAGE_DIMENSIONS = exports.VIDEO_DURATION = exports.VIDEO_FPS = exports.DEFAULT_RETRIES = exports.DEFAULT_TIMEOUT = exports.DEFAULT_BASE_URL = exports.VALID_FORMAT_IDS = exports.VALID_STYLE_IDS = exports.FORMATS = exports.STYLES = void 0;
7
+ /**
8
+ * Style presets for image generation
9
+ */
10
+ exports.STYLES = {
11
+ /**
12
+ * โšก Raw Gen6 defaults
13
+ */
14
+ raw: {
15
+ id: 'raw',
16
+ name: 'Raw',
17
+ description: 'Raw Gen6 defaults'
18
+ },
19
+ /**
20
+ * โšกโšก Realistic 2DAI generation (formerly "raw+")
21
+ */
22
+ realistic: {
23
+ id: 'realistic',
24
+ name: 'Realistic',
25
+ description: 'Realistic 2DAI generation'
26
+ },
27
+ /**
28
+ * ๐Ÿ“ Text & Clarity - Optimized for text rendering
29
+ */
30
+ text: {
31
+ id: 'text',
32
+ name: 'Text & Clarity',
33
+ description: 'Text & Clarity 2DAI generation'
34
+ },
35
+ /**
36
+ * ๐ŸŽŒ Niji anime style with vibrant colors
37
+ */
38
+ ciniji: {
39
+ id: 'ciniji',
40
+ name: 'Ciniji',
41
+ description: 'Niji anime style with vibrant colors'
42
+ },
43
+ /**
44
+ * ๐Ÿ“ธ Gen6 Portrait
45
+ */
46
+ portrait: {
47
+ id: 'portrait',
48
+ name: 'Portrait',
49
+ description: 'Gen6 Portrait'
50
+ },
51
+ /**
52
+ * ๐ŸŽฅ Gen6 Cinematic
53
+ */
54
+ cine: {
55
+ id: 'cine',
56
+ name: 'Cinematic',
57
+ description: 'Gen6 Cinematic'
58
+ },
59
+ /**
60
+ * โšฝ Gen6 Sport
61
+ */
62
+ sport: {
63
+ id: 'sport',
64
+ name: 'Sport',
65
+ description: 'Gen6 Sport'
66
+ },
67
+ /**
68
+ * ๐Ÿ‘• Gen6 Fashion
69
+ */
70
+ fashion: {
71
+ id: 'fashion',
72
+ name: 'Fashion',
73
+ description: 'Gen6 Fashion'
74
+ },
75
+ /**
76
+ * ๐ŸŒธ Gen6 Anime Niji
77
+ */
78
+ niji: {
79
+ id: 'niji',
80
+ name: 'Niji',
81
+ description: 'Gen6 Anime Niji'
82
+ },
83
+ /**
84
+ * ๐ŸŽŽ Gen6 Anime
85
+ */
86
+ anime: {
87
+ id: 'anime',
88
+ name: 'Anime',
89
+ description: 'Gen6 Anime'
90
+ },
91
+ /**
92
+ * ๐Ÿ“š Gen6 Manga
93
+ */
94
+ manga: {
95
+ id: 'manga',
96
+ name: 'Manga',
97
+ description: 'Gen6 Manga'
98
+ },
99
+ /**
100
+ * ๐Ÿ–Œ๏ธ Gen6 Paint
101
+ */
102
+ paint: {
103
+ id: 'paint',
104
+ name: 'Paint',
105
+ description: 'Gen6 Paint'
106
+ }
107
+ };
108
+ /**
109
+ * Format presets for image generation
110
+ */
111
+ exports.FORMATS = {
112
+ /**
113
+ * 9:16 vertical (768ร—1344)
114
+ */
115
+ portrait: {
116
+ id: 'portrait',
117
+ name: 'Portrait',
118
+ width: 768,
119
+ height: 1344
120
+ },
121
+ /**
122
+ * 16:9 horizontal (1344ร—768)
123
+ */
124
+ landscape: {
125
+ id: 'landscape',
126
+ name: 'Landscape',
127
+ width: 1344,
128
+ height: 768
129
+ },
130
+ /**
131
+ * 1:1 profile picture (1024ร—1024)
132
+ */
133
+ profile: {
134
+ id: 'profile',
135
+ name: 'Profile',
136
+ width: 1024,
137
+ height: 1024
138
+ },
139
+ /**
140
+ * 9:16 story format (720ร—1280)
141
+ */
142
+ story: {
143
+ id: 'story',
144
+ name: 'Story',
145
+ width: 720,
146
+ height: 1280
147
+ },
148
+ /**
149
+ * 9:7 wide square (1152ร—896)
150
+ */
151
+ post: {
152
+ id: 'post',
153
+ name: 'Post',
154
+ width: 1152,
155
+ height: 896
156
+ },
157
+ /**
158
+ * Phone screen (640ร—1344)
159
+ */
160
+ smartphone: {
161
+ id: 'smartphone',
162
+ name: 'Smartphone',
163
+ width: 640,
164
+ height: 1344
165
+ },
166
+ /**
167
+ * 3:1 wide screen (1472ร—448)
168
+ */
169
+ banner: {
170
+ id: 'banner',
171
+ name: 'Banner',
172
+ width: 1472,
173
+ height: 448
174
+ }
175
+ };
176
+ /**
177
+ * Valid style IDs (derived from STYLES)
178
+ */
179
+ exports.VALID_STYLE_IDS = Object.keys(exports.STYLES);
180
+ /**
181
+ * Valid format IDs (derived from FORMATS)
182
+ */
183
+ exports.VALID_FORMAT_IDS = Object.keys(exports.FORMATS);
184
+ /**
185
+ * Default API base URL
186
+ */
187
+ exports.DEFAULT_BASE_URL = 'https://api.2dai.com';
188
+ /**
189
+ * Default request timeout (milliseconds)
190
+ */
191
+ exports.DEFAULT_TIMEOUT = 300000; // 5 minutes
192
+ /**
193
+ * Default retry count
194
+ */
195
+ exports.DEFAULT_RETRIES = 3;
196
+ /**
197
+ * Video FPS constraints
198
+ */
199
+ exports.VIDEO_FPS = {
200
+ MIN: 8,
201
+ MAX: 60,
202
+ DEFAULT: 16
203
+ };
204
+ /**
205
+ * Video duration constraints (seconds)
206
+ */
207
+ exports.VIDEO_DURATION = {
208
+ MIN: 1,
209
+ MAX: 10,
210
+ DEFAULT: 5
211
+ };
212
+ /**
213
+ * Image dimension constraints
214
+ */
215
+ exports.IMAGE_DIMENSIONS = {
216
+ MIN: 320,
217
+ MAX: 1344
218
+ };
219
+ /**
220
+ * Seed constraints
221
+ */
222
+ exports.SEED = {
223
+ MIN: 0,
224
+ MAX: 2000000000
225
+ };
226
+ /**
227
+ * Upscale factor constraints (for AI upscaling)
228
+ */
229
+ exports.UPSCALE_FACTOR = {
230
+ MIN: 2,
231
+ MAX: 4,
232
+ DEFAULT: 2
233
+ };
234
+ /**
235
+ * WebSocket defaults
236
+ */
237
+ exports.WS_DEFAULTS = {
238
+ /** Ping interval to keep connection alive (30 seconds) */
239
+ PING_INTERVAL_MS: 30000,
240
+ /** Initial reconnect delay (1 second) */
241
+ RECONNECT_INTERVAL_MS: 1000,
242
+ /** Maximum reconnect delay (30 seconds) */
243
+ MAX_RECONNECT_DELAY_MS: 30000,
244
+ /** Auto-reconnect enabled by default */
245
+ AUTO_RECONNECT: true
246
+ };
247
+ /**
248
+ * WebSocket request types for wsSend()
249
+ */
250
+ exports.WS_TYPES = {
251
+ /** Generate an image from a text prompt */
252
+ IMAGE: 'generate_image',
253
+ /** Generate a video from an image */
254
+ VIDEO: 'generate_video',
255
+ /** Generate text using LLM */
256
+ LLM: 'generate_llm',
257
+ /** AI upscale an image */
258
+ UPSCALE: 'generate_upscale'
259
+ };
260
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAIH;;GAEG;AACU,QAAA,MAAM,GAAG;IACpB;;OAEG;IACH,GAAG,EAAE;QACH,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,mBAAmB;KAClB;IAEhB;;OAEG;IACH,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,2BAA2B;KAC1B;IAEhB;;OAEG;IACH,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,gCAAgC;KAC/B;IAEhB;;OAEG;IACH,MAAM,EAAE;QACN,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,sCAAsC;KACrC;IAEhB;;OAEG;IACH,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,eAAe;KACd;IAEhB;;OAEG;IACH,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,gBAAgB;KACf;IAEhB;;OAEG;IACH,KAAK,EAAE;QACL,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,YAAY;KACX;IAEhB;;OAEG;IACH,OAAO,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2CAA2C;IAC3C,sBAAsB,EAAE,KAAK;IAC7B,wCAAwC;IACxC,cAAc,EAAE,IAAI;CACZ,CAAC;AAEX;;GAEG;AACU,QAAA,QAAQ,GAAG;IACtB,2CAA2C;IAC3C,KAAK,EAAE,gBAAgB;IACvB,qCAAqC;IACrC,KAAK,EAAE,gBAAgB;IACvB,8BAA8B;IAC9B,GAAG,EAAE,cAAc;IACnB,0BAA0B;IAC1B,OAAO,EAAE,kBAAkB;CACnB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 2DAI SDK - Official TypeScript/JavaScript SDK
3
+ *
4
+ * @packageDocumentation
5
+ */
6
+ export { TwoDAIClient, createClient } from './client';
7
+ export { default } from './client';
8
+ export { ClientOptions, ImageGenerationOptions, VideoGenerationOptions, TextGenerationOptions, UpscaleOptions, ImageGenerationResult, VideoGenerationResult, TextGenerationResult, UpscaleResult, StylePreset, FormatPreset, WatermarkOptions, WatermarkPosition, CDNFileMetadata, APIError, RateLimitInfo, APIKeySettings, WsImageRequest, WsImg2ImgRequest, WsVideoRequest, WsLlmRequest, WsUpscaleRequest, WsImageResponse, WsVideoResponse, WsLlmResponse, WsUpscaleResponse, WsRequestData, WsResponseData } from './types';
9
+ export { STYLES, FORMATS, VALID_STYLE_IDS, VALID_FORMAT_IDS, VIDEO_FPS, VIDEO_DURATION, IMAGE_DIMENSIONS, SEED, UPSCALE_FACTOR, WS_DEFAULTS, WS_TYPES } from './constants';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGnC,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,QAAQ,EACR,aAAa,EACb,cAAc,EAEd,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,cAAc,EACf,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,MAAM,EACN,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,IAAI,EACJ,cAAc,EACd,WAAW,EACX,QAAQ,EACT,MAAM,aAAa,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /**
3
+ * 2DAI SDK - Official TypeScript/JavaScript SDK
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+ var __importDefault = (this && this.__importDefault) || function (mod) {
8
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
+ };
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.WS_TYPES = exports.WS_DEFAULTS = exports.UPSCALE_FACTOR = exports.SEED = exports.IMAGE_DIMENSIONS = exports.VIDEO_DURATION = exports.VIDEO_FPS = exports.VALID_FORMAT_IDS = exports.VALID_STYLE_IDS = exports.FORMATS = exports.STYLES = exports.default = exports.createClient = exports.TwoDAIClient = void 0;
12
+ // Export main client
13
+ var client_1 = require("./client");
14
+ Object.defineProperty(exports, "TwoDAIClient", { enumerable: true, get: function () { return client_1.TwoDAIClient; } });
15
+ Object.defineProperty(exports, "createClient", { enumerable: true, get: function () { return client_1.createClient; } });
16
+ var client_2 = require("./client");
17
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(client_2).default; } });
18
+ // Export constants
19
+ var constants_1 = require("./constants");
20
+ Object.defineProperty(exports, "STYLES", { enumerable: true, get: function () { return constants_1.STYLES; } });
21
+ Object.defineProperty(exports, "FORMATS", { enumerable: true, get: function () { return constants_1.FORMATS; } });
22
+ Object.defineProperty(exports, "VALID_STYLE_IDS", { enumerable: true, get: function () { return constants_1.VALID_STYLE_IDS; } });
23
+ Object.defineProperty(exports, "VALID_FORMAT_IDS", { enumerable: true, get: function () { return constants_1.VALID_FORMAT_IDS; } });
24
+ Object.defineProperty(exports, "VIDEO_FPS", { enumerable: true, get: function () { return constants_1.VIDEO_FPS; } });
25
+ Object.defineProperty(exports, "VIDEO_DURATION", { enumerable: true, get: function () { return constants_1.VIDEO_DURATION; } });
26
+ Object.defineProperty(exports, "IMAGE_DIMENSIONS", { enumerable: true, get: function () { return constants_1.IMAGE_DIMENSIONS; } });
27
+ Object.defineProperty(exports, "SEED", { enumerable: true, get: function () { return constants_1.SEED; } });
28
+ Object.defineProperty(exports, "UPSCALE_FACTOR", { enumerable: true, get: function () { return constants_1.UPSCALE_FACTOR; } });
29
+ Object.defineProperty(exports, "WS_DEFAULTS", { enumerable: true, get: function () { return constants_1.WS_DEFAULTS; } });
30
+ Object.defineProperty(exports, "WS_TYPES", { enumerable: true, get: function () { return constants_1.WS_TYPES; } });
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,qBAAqB;AACrB,mCAAsD;AAA7C,sGAAA,YAAY,OAAA;AAAE,sGAAA,YAAY,OAAA;AACnC,mCAAmC;AAA1B,kHAAA,OAAO,OAAA;AAmChB,mBAAmB;AACnB,yCAYqB;AAXnB,mGAAA,MAAM,OAAA;AACN,oGAAA,OAAO,OAAA;AACP,4GAAA,eAAe,OAAA;AACf,6GAAA,gBAAgB,OAAA;AAChB,sGAAA,SAAS,OAAA;AACT,2GAAA,cAAc,OAAA;AACd,6GAAA,gBAAgB,OAAA;AAChB,iGAAA,IAAI,OAAA;AACJ,2GAAA,cAAc,OAAA;AACd,wGAAA,WAAW,OAAA;AACX,qGAAA,QAAQ,OAAA"}