@nxtedition/types 23.0.38 → 23.0.40
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/app.d.ts +0 -18
- package/dist/app.js +5 -173
- package/dist/common/render-query.js +280 -191
- package/dist/common/render-scene.js +336 -158
- package/dist/common/settings.d.ts +33 -9
- package/dist/common/settings.js +2069 -1381
- package/dist/domains/event.d.ts +129 -1
- package/dist/domains/event.js +2025 -0
- package/dist/domains/media.js +168 -79
- package/dist/domains/publish.d.ts +55 -0
- package/dist/domains/publish.js +4668 -3689
- package/dist/domains/render.d.ts +10 -24
- package/dist/domains/render.js +497 -828
- package/dist/domains/script.d.ts +250 -0
- package/dist/domains/script.js +6652 -0
- package/dist/domains/settings.js +2022 -1351
- package/dist/domains/subtitle-style.d.ts +5 -0
- package/dist/domains/subtitle-style.js +95 -6
- package/dist/index.d.ts +23 -0
- package/dist/index.js +294 -12
- package/dist/nxtpression.d.ts +247 -30
- package/dist/rpc.d.ts +9 -0
- package/dist/schema.json +903 -124
- package/package.json +2 -1
|
@@ -28,6 +28,11 @@ export interface SubtitleStyleDomainRecord {
|
|
|
28
28
|
encoding?: string;
|
|
29
29
|
scaledBorderAndShadow?: boolean;
|
|
30
30
|
futureWordWrapping?: boolean;
|
|
31
|
+
previewSettings?: {
|
|
32
|
+
aspectRatio?: string;
|
|
33
|
+
backgroundAssetId?: string;
|
|
34
|
+
text?: string;
|
|
35
|
+
};
|
|
31
36
|
}
|
|
32
37
|
export declare const isSubtitleStyleDomainRecord: (input: unknown) => input is SubtitleStyleDomainRecord;
|
|
33
38
|
export declare const assertSubtitleStyleDomainRecord: (input: unknown) => SubtitleStyleDomainRecord;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import __typia from "typia";
|
|
2
2
|
export const isSubtitleStyleDomainRecord = input => {
|
|
3
|
-
const $io0 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding) && (undefined === input.scaledBorderAndShadow || "boolean" === typeof input.scaledBorderAndShadow) && (undefined === input.futureWordWrapping || "boolean" === typeof input.futureWordWrapping);
|
|
3
|
+
const $io0 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding) && (undefined === input.scaledBorderAndShadow || "boolean" === typeof input.scaledBorderAndShadow) && (undefined === input.futureWordWrapping || "boolean" === typeof input.futureWordWrapping) && (undefined === input.previewSettings || "object" === typeof input.previewSettings && null !== input.previewSettings && false === Array.isArray(input.previewSettings) && $io1(input.previewSettings));
|
|
4
|
+
const $io1 = input => (undefined === input.aspectRatio || "string" === typeof input.aspectRatio) && (undefined === input.backgroundAssetId || "string" === typeof input.backgroundAssetId) && (undefined === input.text || "string" === typeof input.text);
|
|
4
5
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
5
6
|
};
|
|
6
7
|
export const assertSubtitleStyleDomainRecord = (input, errorFactory) => {
|
|
7
8
|
const __is = input => {
|
|
8
|
-
const $io0 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding) && (undefined === input.scaledBorderAndShadow || "boolean" === typeof input.scaledBorderAndShadow) && (undefined === input.futureWordWrapping || "boolean" === typeof input.futureWordWrapping);
|
|
9
|
+
const $io0 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding) && (undefined === input.scaledBorderAndShadow || "boolean" === typeof input.scaledBorderAndShadow) && (undefined === input.futureWordWrapping || "boolean" === typeof input.futureWordWrapping) && (undefined === input.previewSettings || "object" === typeof input.previewSettings && null !== input.previewSettings && false === Array.isArray(input.previewSettings) && $io1(input.previewSettings));
|
|
10
|
+
const $io1 = input => (undefined === input.aspectRatio || "string" === typeof input.aspectRatio) && (undefined === input.backgroundAssetId || "string" === typeof input.backgroundAssetId) && (undefined === input.text || "string" === typeof input.text);
|
|
9
11
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
10
12
|
};
|
|
11
13
|
if (false === __is(input))
|
|
@@ -111,6 +113,27 @@ export const assertSubtitleStyleDomainRecord = (input, errorFactory) => {
|
|
|
111
113
|
path: _path + ".futureWordWrapping",
|
|
112
114
|
expected: "(boolean | undefined)",
|
|
113
115
|
value: input.futureWordWrapping
|
|
116
|
+
}, errorFactory)) && (undefined === input.previewSettings || ("object" === typeof input.previewSettings && null !== input.previewSettings && false === Array.isArray(input.previewSettings) || $guard(_exceptionable, {
|
|
117
|
+
path: _path + ".previewSettings",
|
|
118
|
+
expected: "(__type | undefined)",
|
|
119
|
+
value: input.previewSettings
|
|
120
|
+
}, errorFactory)) && $ao1(input.previewSettings, _path + ".previewSettings", true && _exceptionable) || $guard(_exceptionable, {
|
|
121
|
+
path: _path + ".previewSettings",
|
|
122
|
+
expected: "(__type | undefined)",
|
|
123
|
+
value: input.previewSettings
|
|
124
|
+
}, errorFactory));
|
|
125
|
+
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.aspectRatio || "string" === typeof input.aspectRatio || $guard(_exceptionable, {
|
|
126
|
+
path: _path + ".aspectRatio",
|
|
127
|
+
expected: "(string | undefined)",
|
|
128
|
+
value: input.aspectRatio
|
|
129
|
+
}, errorFactory)) && (undefined === input.backgroundAssetId || "string" === typeof input.backgroundAssetId || $guard(_exceptionable, {
|
|
130
|
+
path: _path + ".backgroundAssetId",
|
|
131
|
+
expected: "(string | undefined)",
|
|
132
|
+
value: input.backgroundAssetId
|
|
133
|
+
}, errorFactory)) && (undefined === input.text || "string" === typeof input.text || $guard(_exceptionable, {
|
|
134
|
+
path: _path + ".text",
|
|
135
|
+
expected: "(string | undefined)",
|
|
136
|
+
value: input.text
|
|
114
137
|
}, errorFactory));
|
|
115
138
|
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
116
139
|
path: _path + "",
|
|
@@ -227,13 +250,32 @@ export const randomSubtitleStyleDomainRecord = generator => {
|
|
|
227
250
|
futureWordWrapping: $pick([
|
|
228
251
|
() => undefined,
|
|
229
252
|
() => (generator?.boolean ?? $generator.boolean)()
|
|
253
|
+
])(),
|
|
254
|
+
previewSettings: $pick([
|
|
255
|
+
() => undefined,
|
|
256
|
+
() => $ro1(_recursive, _recursive ? 1 + _depth : _depth)
|
|
257
|
+
])()
|
|
258
|
+
});
|
|
259
|
+
const $ro1 = (_recursive = false, _depth = 0) => ({
|
|
260
|
+
aspectRatio: $pick([
|
|
261
|
+
() => undefined,
|
|
262
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
263
|
+
])(),
|
|
264
|
+
backgroundAssetId: $pick([
|
|
265
|
+
() => undefined,
|
|
266
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
267
|
+
])(),
|
|
268
|
+
text: $pick([
|
|
269
|
+
() => undefined,
|
|
270
|
+
() => (generator?.customs ?? $generator.customs)?.string?.([]) ?? (generator?.string ?? $generator.string)()
|
|
230
271
|
])()
|
|
231
272
|
});
|
|
232
273
|
return $ro0();
|
|
233
274
|
};
|
|
234
275
|
export const assertGuardSubtitleStyleDomainRecord = (input, errorFactory) => {
|
|
235
276
|
const __is = input => {
|
|
236
|
-
const $io0 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding) && (undefined === input.scaledBorderAndShadow || "boolean" === typeof input.scaledBorderAndShadow) && (undefined === input.futureWordWrapping || "boolean" === typeof input.futureWordWrapping);
|
|
277
|
+
const $io0 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding) && (undefined === input.scaledBorderAndShadow || "boolean" === typeof input.scaledBorderAndShadow) && (undefined === input.futureWordWrapping || "boolean" === typeof input.futureWordWrapping) && (undefined === input.previewSettings || "object" === typeof input.previewSettings && null !== input.previewSettings && false === Array.isArray(input.previewSettings) && $io1(input.previewSettings));
|
|
278
|
+
const $io1 = input => (undefined === input.aspectRatio || "string" === typeof input.aspectRatio) && (undefined === input.backgroundAssetId || "string" === typeof input.backgroundAssetId) && (undefined === input.text || "string" === typeof input.text);
|
|
237
279
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
238
280
|
};
|
|
239
281
|
if (false === __is(input))
|
|
@@ -339,6 +381,27 @@ export const assertGuardSubtitleStyleDomainRecord = (input, errorFactory) => {
|
|
|
339
381
|
path: _path + ".futureWordWrapping",
|
|
340
382
|
expected: "(boolean | undefined)",
|
|
341
383
|
value: input.futureWordWrapping
|
|
384
|
+
}, errorFactory)) && (undefined === input.previewSettings || ("object" === typeof input.previewSettings && null !== input.previewSettings && false === Array.isArray(input.previewSettings) || $guard(_exceptionable, {
|
|
385
|
+
path: _path + ".previewSettings",
|
|
386
|
+
expected: "(__type | undefined)",
|
|
387
|
+
value: input.previewSettings
|
|
388
|
+
}, errorFactory)) && $ao1(input.previewSettings, _path + ".previewSettings", true && _exceptionable) || $guard(_exceptionable, {
|
|
389
|
+
path: _path + ".previewSettings",
|
|
390
|
+
expected: "(__type | undefined)",
|
|
391
|
+
value: input.previewSettings
|
|
392
|
+
}, errorFactory));
|
|
393
|
+
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.aspectRatio || "string" === typeof input.aspectRatio || $guard(_exceptionable, {
|
|
394
|
+
path: _path + ".aspectRatio",
|
|
395
|
+
expected: "(string | undefined)",
|
|
396
|
+
value: input.aspectRatio
|
|
397
|
+
}, errorFactory)) && (undefined === input.backgroundAssetId || "string" === typeof input.backgroundAssetId || $guard(_exceptionable, {
|
|
398
|
+
path: _path + ".backgroundAssetId",
|
|
399
|
+
expected: "(string | undefined)",
|
|
400
|
+
value: input.backgroundAssetId
|
|
401
|
+
}, errorFactory)) && (undefined === input.text || "string" === typeof input.text || $guard(_exceptionable, {
|
|
402
|
+
path: _path + ".text",
|
|
403
|
+
expected: "(string | undefined)",
|
|
404
|
+
value: input.text
|
|
342
405
|
}, errorFactory));
|
|
343
406
|
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
344
407
|
path: _path + "",
|
|
@@ -352,14 +415,17 @@ export const assertGuardSubtitleStyleDomainRecord = (input, errorFactory) => {
|
|
|
352
415
|
})(input, "$input", true);
|
|
353
416
|
};
|
|
354
417
|
export const stringifySubtitleStyleDomainRecord = input => {
|
|
418
|
+
const $io1 = input => (undefined === input.aspectRatio || "string" === typeof input.aspectRatio) && (undefined === input.backgroundAssetId || "string" === typeof input.backgroundAssetId) && (undefined === input.text || "string" === typeof input.text);
|
|
355
419
|
const $string = __typia.json.createStringify.string;
|
|
356
420
|
const $tail = __typia.json.createStringify.tail;
|
|
357
|
-
const $so0 = input => `{${$tail(`${undefined === input.name ? "" : `"name":${undefined !== input.name ? $string(input.name) : undefined},`}${undefined === input.fontname ? "" : `"fontname":${undefined !== input.fontname ? $string(input.fontname) : undefined},`}${undefined === input.fontsize ? "" : `"fontsize":${undefined !== input.fontsize ? $string(input.fontsize) : undefined},`}${undefined === input.primaryColour ? "" : `"primaryColour":${undefined !== input.primaryColour ? $string(input.primaryColour) : undefined},`}${undefined === input.secondaryColour ? "" : `"secondaryColour":${undefined !== input.secondaryColour ? $string(input.secondaryColour) : undefined},`}${undefined === input.outlineColour ? "" : `"outlineColour":${undefined !== input.outlineColour ? $string(input.outlineColour) : undefined},`}${undefined === input.backColour ? "" : `"backColour":${undefined !== input.backColour ? $string(input.backColour) : undefined},`}${undefined === input.bold ? "" : `"bold":${undefined !== input.bold ? $string(input.bold) : undefined},`}${undefined === input.italic ? "" : `"italic":${undefined !== input.italic ? $string(input.italic) : undefined},`}${undefined === input.underline ? "" : `"underline":${undefined !== input.underline ? $string(input.underline) : undefined},`}${undefined === input.strikeOut ? "" : `"strikeOut":${undefined !== input.strikeOut ? $string(input.strikeOut) : undefined},`}${undefined === input.scaleX ? "" : `"scaleX":${undefined !== input.scaleX ? $string(input.scaleX) : undefined},`}${undefined === input.scaleY ? "" : `"scaleY":${undefined !== input.scaleY ? $string(input.scaleY) : undefined},`}${undefined === input.spacing ? "" : `"spacing":${undefined !== input.spacing ? $string(input.spacing) : undefined},`}${undefined === input.angle ? "" : `"angle":${undefined !== input.angle ? $string(input.angle) : undefined},`}${undefined === input.borderStyle ? "" : `"borderStyle":${undefined !== input.borderStyle ? $string(input.borderStyle) : undefined},`}${undefined === input.outline ? "" : `"outline":${undefined !== input.outline ? $string(input.outline) : undefined},`}${undefined === input.shadow ? "" : `"shadow":${undefined !== input.shadow ? $string(input.shadow) : undefined},`}${undefined === input.alignment ? "" : `"alignment":${undefined !== input.alignment ? $string(input.alignment) : undefined},`}${undefined === input.marginL ? "" : `"marginL":${undefined !== input.marginL ? $string(input.marginL) : undefined},`}${undefined === input.marginR ? "" : `"marginR":${undefined !== input.marginR ? $string(input.marginR) : undefined},`}${undefined === input.marginV ? "" : `"marginV":${undefined !== input.marginV ? $string(input.marginV) : undefined},`}${undefined === input.encoding ? "" : `"encoding":${undefined !== input.encoding ? $string(input.encoding) : undefined},`}${undefined === input.scaledBorderAndShadow ? "" : `"scaledBorderAndShadow":${undefined !== input.scaledBorderAndShadow ? input.scaledBorderAndShadow : undefined},`}${undefined === input.futureWordWrapping ? "" : `"futureWordWrapping":${undefined !== input.futureWordWrapping ? input.futureWordWrapping : undefined}`}`)}}`;
|
|
421
|
+
const $so0 = input => `{${$tail(`${undefined === input.name ? "" : `"name":${undefined !== input.name ? $string(input.name) : undefined},`}${undefined === input.fontname ? "" : `"fontname":${undefined !== input.fontname ? $string(input.fontname) : undefined},`}${undefined === input.fontsize ? "" : `"fontsize":${undefined !== input.fontsize ? $string(input.fontsize) : undefined},`}${undefined === input.primaryColour ? "" : `"primaryColour":${undefined !== input.primaryColour ? $string(input.primaryColour) : undefined},`}${undefined === input.secondaryColour ? "" : `"secondaryColour":${undefined !== input.secondaryColour ? $string(input.secondaryColour) : undefined},`}${undefined === input.outlineColour ? "" : `"outlineColour":${undefined !== input.outlineColour ? $string(input.outlineColour) : undefined},`}${undefined === input.backColour ? "" : `"backColour":${undefined !== input.backColour ? $string(input.backColour) : undefined},`}${undefined === input.bold ? "" : `"bold":${undefined !== input.bold ? $string(input.bold) : undefined},`}${undefined === input.italic ? "" : `"italic":${undefined !== input.italic ? $string(input.italic) : undefined},`}${undefined === input.underline ? "" : `"underline":${undefined !== input.underline ? $string(input.underline) : undefined},`}${undefined === input.strikeOut ? "" : `"strikeOut":${undefined !== input.strikeOut ? $string(input.strikeOut) : undefined},`}${undefined === input.scaleX ? "" : `"scaleX":${undefined !== input.scaleX ? $string(input.scaleX) : undefined},`}${undefined === input.scaleY ? "" : `"scaleY":${undefined !== input.scaleY ? $string(input.scaleY) : undefined},`}${undefined === input.spacing ? "" : `"spacing":${undefined !== input.spacing ? $string(input.spacing) : undefined},`}${undefined === input.angle ? "" : `"angle":${undefined !== input.angle ? $string(input.angle) : undefined},`}${undefined === input.borderStyle ? "" : `"borderStyle":${undefined !== input.borderStyle ? $string(input.borderStyle) : undefined},`}${undefined === input.outline ? "" : `"outline":${undefined !== input.outline ? $string(input.outline) : undefined},`}${undefined === input.shadow ? "" : `"shadow":${undefined !== input.shadow ? $string(input.shadow) : undefined},`}${undefined === input.alignment ? "" : `"alignment":${undefined !== input.alignment ? $string(input.alignment) : undefined},`}${undefined === input.marginL ? "" : `"marginL":${undefined !== input.marginL ? $string(input.marginL) : undefined},`}${undefined === input.marginR ? "" : `"marginR":${undefined !== input.marginR ? $string(input.marginR) : undefined},`}${undefined === input.marginV ? "" : `"marginV":${undefined !== input.marginV ? $string(input.marginV) : undefined},`}${undefined === input.encoding ? "" : `"encoding":${undefined !== input.encoding ? $string(input.encoding) : undefined},`}${undefined === input.scaledBorderAndShadow ? "" : `"scaledBorderAndShadow":${undefined !== input.scaledBorderAndShadow ? input.scaledBorderAndShadow : undefined},`}${undefined === input.futureWordWrapping ? "" : `"futureWordWrapping":${undefined !== input.futureWordWrapping ? input.futureWordWrapping : undefined},`}${undefined === input.previewSettings ? "" : `"previewSettings":${undefined !== input.previewSettings ? $so1(input.previewSettings) : undefined}`}`)}}`;
|
|
422
|
+
const $so1 = input => `{${$tail(`${undefined === input.aspectRatio ? "" : `"aspectRatio":${undefined !== input.aspectRatio ? $string(input.aspectRatio) : undefined},`}${undefined === input.backgroundAssetId ? "" : `"backgroundAssetId":${undefined !== input.backgroundAssetId ? $string(input.backgroundAssetId) : undefined},`}${undefined === input.text ? "" : `"text":${undefined !== input.text ? $string(input.text) : undefined}`}`)}}`;
|
|
358
423
|
return $so0(input);
|
|
359
424
|
};
|
|
360
425
|
export const assertStringifySubtitleStyleDomainRecord = (input, errorFactory) => { const assert = (input, errorFactory) => {
|
|
361
426
|
const __is = input => {
|
|
362
|
-
const $io0 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding) && (undefined === input.scaledBorderAndShadow || "boolean" === typeof input.scaledBorderAndShadow) && (undefined === input.futureWordWrapping || "boolean" === typeof input.futureWordWrapping);
|
|
427
|
+
const $io0 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.fontname || "string" === typeof input.fontname) && (undefined === input.fontsize || "string" === typeof input.fontsize) && (undefined === input.primaryColour || "string" === typeof input.primaryColour) && (undefined === input.secondaryColour || "string" === typeof input.secondaryColour) && (undefined === input.outlineColour || "string" === typeof input.outlineColour) && (undefined === input.backColour || "string" === typeof input.backColour) && (undefined === input.bold || "string" === typeof input.bold) && (undefined === input.italic || "string" === typeof input.italic) && (undefined === input.underline || "string" === typeof input.underline) && (undefined === input.strikeOut || "string" === typeof input.strikeOut) && (undefined === input.scaleX || "string" === typeof input.scaleX) && (undefined === input.scaleY || "string" === typeof input.scaleY) && (undefined === input.spacing || "string" === typeof input.spacing) && (undefined === input.angle || "string" === typeof input.angle) && (undefined === input.borderStyle || "string" === typeof input.borderStyle) && (undefined === input.outline || "string" === typeof input.outline) && (undefined === input.shadow || "string" === typeof input.shadow) && (undefined === input.alignment || "string" === typeof input.alignment) && (undefined === input.marginL || "string" === typeof input.marginL) && (undefined === input.marginR || "string" === typeof input.marginR) && (undefined === input.marginV || "string" === typeof input.marginV) && (undefined === input.encoding || "string" === typeof input.encoding) && (undefined === input.scaledBorderAndShadow || "boolean" === typeof input.scaledBorderAndShadow) && (undefined === input.futureWordWrapping || "boolean" === typeof input.futureWordWrapping) && (undefined === input.previewSettings || "object" === typeof input.previewSettings && null !== input.previewSettings && false === Array.isArray(input.previewSettings) && $io1(input.previewSettings));
|
|
428
|
+
const $io1 = input => (undefined === input.aspectRatio || "string" === typeof input.aspectRatio) && (undefined === input.backgroundAssetId || "string" === typeof input.backgroundAssetId) && (undefined === input.text || "string" === typeof input.text);
|
|
363
429
|
return "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input);
|
|
364
430
|
};
|
|
365
431
|
if (false === __is(input))
|
|
@@ -465,6 +531,27 @@ export const assertStringifySubtitleStyleDomainRecord = (input, errorFactory) =>
|
|
|
465
531
|
path: _path + ".futureWordWrapping",
|
|
466
532
|
expected: "(boolean | undefined)",
|
|
467
533
|
value: input.futureWordWrapping
|
|
534
|
+
}, errorFactory)) && (undefined === input.previewSettings || ("object" === typeof input.previewSettings && null !== input.previewSettings && false === Array.isArray(input.previewSettings) || $guard(_exceptionable, {
|
|
535
|
+
path: _path + ".previewSettings",
|
|
536
|
+
expected: "(__type | undefined)",
|
|
537
|
+
value: input.previewSettings
|
|
538
|
+
}, errorFactory)) && $ao1(input.previewSettings, _path + ".previewSettings", true && _exceptionable) || $guard(_exceptionable, {
|
|
539
|
+
path: _path + ".previewSettings",
|
|
540
|
+
expected: "(__type | undefined)",
|
|
541
|
+
value: input.previewSettings
|
|
542
|
+
}, errorFactory));
|
|
543
|
+
const $ao1 = (input, _path, _exceptionable = true) => (undefined === input.aspectRatio || "string" === typeof input.aspectRatio || $guard(_exceptionable, {
|
|
544
|
+
path: _path + ".aspectRatio",
|
|
545
|
+
expected: "(string | undefined)",
|
|
546
|
+
value: input.aspectRatio
|
|
547
|
+
}, errorFactory)) && (undefined === input.backgroundAssetId || "string" === typeof input.backgroundAssetId || $guard(_exceptionable, {
|
|
548
|
+
path: _path + ".backgroundAssetId",
|
|
549
|
+
expected: "(string | undefined)",
|
|
550
|
+
value: input.backgroundAssetId
|
|
551
|
+
}, errorFactory)) && (undefined === input.text || "string" === typeof input.text || $guard(_exceptionable, {
|
|
552
|
+
path: _path + ".text",
|
|
553
|
+
expected: "(string | undefined)",
|
|
554
|
+
value: input.text
|
|
468
555
|
}, errorFactory));
|
|
469
556
|
return ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
|
|
470
557
|
path: _path + "",
|
|
@@ -478,8 +565,10 @@ export const assertStringifySubtitleStyleDomainRecord = (input, errorFactory) =>
|
|
|
478
565
|
})(input, "$input", true);
|
|
479
566
|
return input;
|
|
480
567
|
}; const stringify = input => {
|
|
568
|
+
const $io1 = input => (undefined === input.aspectRatio || "string" === typeof input.aspectRatio) && (undefined === input.backgroundAssetId || "string" === typeof input.backgroundAssetId) && (undefined === input.text || "string" === typeof input.text);
|
|
481
569
|
const $string = __typia.json.createAssertStringify.string;
|
|
482
570
|
const $tail = __typia.json.createAssertStringify.tail;
|
|
483
|
-
const $so0 = input => `{${$tail(`${undefined === input.name ? "" : `"name":${undefined !== input.name ? $string(input.name) : undefined},`}${undefined === input.fontname ? "" : `"fontname":${undefined !== input.fontname ? $string(input.fontname) : undefined},`}${undefined === input.fontsize ? "" : `"fontsize":${undefined !== input.fontsize ? $string(input.fontsize) : undefined},`}${undefined === input.primaryColour ? "" : `"primaryColour":${undefined !== input.primaryColour ? $string(input.primaryColour) : undefined},`}${undefined === input.secondaryColour ? "" : `"secondaryColour":${undefined !== input.secondaryColour ? $string(input.secondaryColour) : undefined},`}${undefined === input.outlineColour ? "" : `"outlineColour":${undefined !== input.outlineColour ? $string(input.outlineColour) : undefined},`}${undefined === input.backColour ? "" : `"backColour":${undefined !== input.backColour ? $string(input.backColour) : undefined},`}${undefined === input.bold ? "" : `"bold":${undefined !== input.bold ? $string(input.bold) : undefined},`}${undefined === input.italic ? "" : `"italic":${undefined !== input.italic ? $string(input.italic) : undefined},`}${undefined === input.underline ? "" : `"underline":${undefined !== input.underline ? $string(input.underline) : undefined},`}${undefined === input.strikeOut ? "" : `"strikeOut":${undefined !== input.strikeOut ? $string(input.strikeOut) : undefined},`}${undefined === input.scaleX ? "" : `"scaleX":${undefined !== input.scaleX ? $string(input.scaleX) : undefined},`}${undefined === input.scaleY ? "" : `"scaleY":${undefined !== input.scaleY ? $string(input.scaleY) : undefined},`}${undefined === input.spacing ? "" : `"spacing":${undefined !== input.spacing ? $string(input.spacing) : undefined},`}${undefined === input.angle ? "" : `"angle":${undefined !== input.angle ? $string(input.angle) : undefined},`}${undefined === input.borderStyle ? "" : `"borderStyle":${undefined !== input.borderStyle ? $string(input.borderStyle) : undefined},`}${undefined === input.outline ? "" : `"outline":${undefined !== input.outline ? $string(input.outline) : undefined},`}${undefined === input.shadow ? "" : `"shadow":${undefined !== input.shadow ? $string(input.shadow) : undefined},`}${undefined === input.alignment ? "" : `"alignment":${undefined !== input.alignment ? $string(input.alignment) : undefined},`}${undefined === input.marginL ? "" : `"marginL":${undefined !== input.marginL ? $string(input.marginL) : undefined},`}${undefined === input.marginR ? "" : `"marginR":${undefined !== input.marginR ? $string(input.marginR) : undefined},`}${undefined === input.marginV ? "" : `"marginV":${undefined !== input.marginV ? $string(input.marginV) : undefined},`}${undefined === input.encoding ? "" : `"encoding":${undefined !== input.encoding ? $string(input.encoding) : undefined},`}${undefined === input.scaledBorderAndShadow ? "" : `"scaledBorderAndShadow":${undefined !== input.scaledBorderAndShadow ? input.scaledBorderAndShadow : undefined},`}${undefined === input.futureWordWrapping ? "" : `"futureWordWrapping":${undefined !== input.futureWordWrapping ? input.futureWordWrapping : undefined}`}`)}}`;
|
|
571
|
+
const $so0 = input => `{${$tail(`${undefined === input.name ? "" : `"name":${undefined !== input.name ? $string(input.name) : undefined},`}${undefined === input.fontname ? "" : `"fontname":${undefined !== input.fontname ? $string(input.fontname) : undefined},`}${undefined === input.fontsize ? "" : `"fontsize":${undefined !== input.fontsize ? $string(input.fontsize) : undefined},`}${undefined === input.primaryColour ? "" : `"primaryColour":${undefined !== input.primaryColour ? $string(input.primaryColour) : undefined},`}${undefined === input.secondaryColour ? "" : `"secondaryColour":${undefined !== input.secondaryColour ? $string(input.secondaryColour) : undefined},`}${undefined === input.outlineColour ? "" : `"outlineColour":${undefined !== input.outlineColour ? $string(input.outlineColour) : undefined},`}${undefined === input.backColour ? "" : `"backColour":${undefined !== input.backColour ? $string(input.backColour) : undefined},`}${undefined === input.bold ? "" : `"bold":${undefined !== input.bold ? $string(input.bold) : undefined},`}${undefined === input.italic ? "" : `"italic":${undefined !== input.italic ? $string(input.italic) : undefined},`}${undefined === input.underline ? "" : `"underline":${undefined !== input.underline ? $string(input.underline) : undefined},`}${undefined === input.strikeOut ? "" : `"strikeOut":${undefined !== input.strikeOut ? $string(input.strikeOut) : undefined},`}${undefined === input.scaleX ? "" : `"scaleX":${undefined !== input.scaleX ? $string(input.scaleX) : undefined},`}${undefined === input.scaleY ? "" : `"scaleY":${undefined !== input.scaleY ? $string(input.scaleY) : undefined},`}${undefined === input.spacing ? "" : `"spacing":${undefined !== input.spacing ? $string(input.spacing) : undefined},`}${undefined === input.angle ? "" : `"angle":${undefined !== input.angle ? $string(input.angle) : undefined},`}${undefined === input.borderStyle ? "" : `"borderStyle":${undefined !== input.borderStyle ? $string(input.borderStyle) : undefined},`}${undefined === input.outline ? "" : `"outline":${undefined !== input.outline ? $string(input.outline) : undefined},`}${undefined === input.shadow ? "" : `"shadow":${undefined !== input.shadow ? $string(input.shadow) : undefined},`}${undefined === input.alignment ? "" : `"alignment":${undefined !== input.alignment ? $string(input.alignment) : undefined},`}${undefined === input.marginL ? "" : `"marginL":${undefined !== input.marginL ? $string(input.marginL) : undefined},`}${undefined === input.marginR ? "" : `"marginR":${undefined !== input.marginR ? $string(input.marginR) : undefined},`}${undefined === input.marginV ? "" : `"marginV":${undefined !== input.marginV ? $string(input.marginV) : undefined},`}${undefined === input.encoding ? "" : `"encoding":${undefined !== input.encoding ? $string(input.encoding) : undefined},`}${undefined === input.scaledBorderAndShadow ? "" : `"scaledBorderAndShadow":${undefined !== input.scaledBorderAndShadow ? input.scaledBorderAndShadow : undefined},`}${undefined === input.futureWordWrapping ? "" : `"futureWordWrapping":${undefined !== input.futureWordWrapping ? input.futureWordWrapping : undefined},`}${undefined === input.previewSettings ? "" : `"previewSettings":${undefined !== input.previewSettings ? $so1(input.previewSettings) : undefined}`}`)}}`;
|
|
572
|
+
const $so1 = input => `{${$tail(`${undefined === input.aspectRatio ? "" : `"aspectRatio":${undefined !== input.aspectRatio ? $string(input.aspectRatio) : undefined},`}${undefined === input.backgroundAssetId ? "" : `"backgroundAssetId":${undefined !== input.backgroundAssetId ? $string(input.backgroundAssetId) : undefined},`}${undefined === input.text ? "" : `"text":${undefined !== input.text ? $string(input.text) : undefined}`}`)}}`;
|
|
484
573
|
return $so0(input);
|
|
485
574
|
}; return stringify(assert(input, errorFactory)); };
|
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,10 @@ export type Records = {
|
|
|
41
41
|
languages: Record<string, string>;
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
|
+
"media.fonts?": {
|
|
45
|
+
fontFaces?: FontFace[];
|
|
46
|
+
fontFamilyNames?: Array<FontFace["family"]>;
|
|
47
|
+
};
|
|
44
48
|
"media.consolidate": {
|
|
45
49
|
presets?: {
|
|
46
50
|
[type in MediaType]: RenderPreset;
|
|
@@ -77,9 +81,28 @@ export type Records = {
|
|
|
77
81
|
interface DomainRows {
|
|
78
82
|
rows: string[];
|
|
79
83
|
}
|
|
84
|
+
type Range = [
|
|
85
|
+
number,
|
|
86
|
+
number
|
|
87
|
+
];
|
|
80
88
|
interface SubtitleFontFace {
|
|
81
89
|
family: string;
|
|
82
90
|
asset?: string;
|
|
83
91
|
weight?: "normal" | "bold";
|
|
84
92
|
style?: "normal" | "italic";
|
|
85
93
|
}
|
|
94
|
+
export interface FontFace {
|
|
95
|
+
name: string;
|
|
96
|
+
family: string;
|
|
97
|
+
asset: string;
|
|
98
|
+
url: string;
|
|
99
|
+
weight: number;
|
|
100
|
+
style: "normal" | "italic";
|
|
101
|
+
ranges: Range[];
|
|
102
|
+
}
|
|
103
|
+
export declare const isFontFace: (input: unknown) => input is FontFace;
|
|
104
|
+
export declare const assertFontFace: (input: unknown) => FontFace;
|
|
105
|
+
export declare const randomFontFace: () => FontFace;
|
|
106
|
+
export declare const assertGuardFontFace: __AssertionGuard<FontFace>;
|
|
107
|
+
export declare const stringifyFontFace: (input: FontFace) => string;
|
|
108
|
+
export declare const assertStringifyFontFace: (input: unknown) => string;
|