-
Notifications
You must be signed in to change notification settings - Fork 5
/
options.ts
executable file
·64 lines (60 loc) · 1.3 KB
/
options.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import type { Output } from "valibot";
import { literal, union } from "valibot";
import type {
Config,
FormattedComment,
FormattedLegacyComment,
OwnerComment,
RawApiResponse,
V1Thread,
Xml2jsPacket,
} from "@/@types/";
export const ZInputFormatType = union([
literal("XMLDocument"),
literal("niconicome"),
literal("xml2js"),
literal("formatted"),
literal("legacy"),
literal("legacyOwner"),
literal("owner"),
literal("v1"),
literal("empty"),
literal("default"),
]);
export type InputFormatType = Output<typeof ZInputFormatType>;
export type InputFormat =
| XMLDocument
| Xml2jsPacket
| FormattedComment[]
| FormattedLegacyComment[]
| RawApiResponse[]
| OwnerComment[]
| V1Thread[]
| string
| undefined;
type ModeType = "default" | "html5" | "flash";
export type BaseOptions = {
config: Config;
debug: boolean;
enableLegacyPiP: boolean;
format: InputFormatType;
formatted: boolean;
keepCA: boolean;
mode: ModeType;
scale: number;
showCollision: boolean;
showCommentCount: boolean;
showFPS: boolean;
useLegacy: boolean;
video: HTMLVideoElement | undefined;
lazy: boolean;
};
export type Options = Partial<BaseOptions>;
/**
* @deprecated
*/
export type inputFormatType = InputFormatType;
/**
* @deprecated
*/
export type inputFormat = InputFormat;