@xpadev-net/niconicomments 0.2.62 → 0.2.64
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/bundle.d.ts +2512 -1621
- package/dist/bundle.js +38 -6
- package/package.json +3 -2
package/dist/bundle.d.ts
CHANGED
|
@@ -1,1257 +1,1752 @@
|
|
|
1
|
-
|
|
2
|
-
import * as valibot from 'valibot';
|
|
3
|
-
import { Output } from 'valibot';
|
|
1
|
+
// Generated by dts-bundle-generator v9.0.0
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
top: number;
|
|
28
|
-
height: number;
|
|
3
|
+
/**
|
|
4
|
+
* Issue reason type.
|
|
5
|
+
*/
|
|
6
|
+
export type IssueReason = "any" | "array" | "bigint" | "blob" | "boolean" | "date" | "function" | "instance" | "map" | "number" | "object" | "record" | "set" | "special" | "string" | "symbol" | "tuple" | "undefined" | "unknown" | "type";
|
|
7
|
+
/**
|
|
8
|
+
* Issue origin type.
|
|
9
|
+
*/
|
|
10
|
+
export type IssueOrigin = "key" | "value";
|
|
11
|
+
/**
|
|
12
|
+
* Issue type.
|
|
13
|
+
*/
|
|
14
|
+
export type Issue = {
|
|
15
|
+
reason: IssueReason;
|
|
16
|
+
validation: string;
|
|
17
|
+
origin: IssueOrigin;
|
|
18
|
+
message: string;
|
|
19
|
+
input: any;
|
|
20
|
+
path?: PathItem[];
|
|
21
|
+
issues?: Issues;
|
|
22
|
+
abortEarly?: boolean;
|
|
23
|
+
abortPipeEarly?: boolean;
|
|
24
|
+
skipPipe?: boolean;
|
|
29
25
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Issues type.
|
|
28
|
+
*/
|
|
29
|
+
export type Issues = [
|
|
30
|
+
Issue,
|
|
31
|
+
...Issue[]
|
|
32
|
+
];
|
|
33
|
+
/**
|
|
34
|
+
* Parse info type.
|
|
35
|
+
*/
|
|
36
|
+
export type ParseInfo = Partial<Pick<Issue, "origin" | "abortEarly" | "abortPipeEarly" | "skipPipe">>;
|
|
37
|
+
/**
|
|
38
|
+
* Path item type.
|
|
39
|
+
*/
|
|
40
|
+
export type PathItem = ObjectPathItem | RecordPathItem | TuplePathItem | MapPathItem | SetPathItem | ArrayPathItem;
|
|
41
|
+
/**
|
|
42
|
+
* Parse result type.
|
|
43
|
+
*/
|
|
44
|
+
export type _ParseResult<TOutput> = {
|
|
45
|
+
output: TOutput;
|
|
46
|
+
issues?: undefined;
|
|
47
|
+
} | {
|
|
48
|
+
output?: undefined;
|
|
49
|
+
issues: Issues;
|
|
39
50
|
};
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Base schema type.
|
|
53
|
+
*/
|
|
54
|
+
export type BaseSchema<TInput = any, TOutput = TInput> = {
|
|
55
|
+
async: false;
|
|
56
|
+
_parse(input: unknown, info?: ParseInfo): _ParseResult<TOutput>;
|
|
57
|
+
_types?: {
|
|
58
|
+
input: TInput;
|
|
59
|
+
output: TOutput;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Base schema async type.
|
|
64
|
+
*/
|
|
65
|
+
export type BaseSchemaAsync<TInput = any, TOutput = TInput> = {
|
|
66
|
+
async: true;
|
|
67
|
+
_parse(input: unknown, info?: ParseInfo): Promise<_ParseResult<TOutput>>;
|
|
68
|
+
_types?: {
|
|
69
|
+
input: TInput;
|
|
70
|
+
output: TOutput;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Input inference type.
|
|
75
|
+
*/
|
|
76
|
+
export type Input<TSchema extends BaseSchema | BaseSchemaAsync> = NonNullable<TSchema["_types"]>["input"];
|
|
77
|
+
/**
|
|
78
|
+
* Output inference type.
|
|
79
|
+
*/
|
|
80
|
+
export type Output<TSchema extends BaseSchema | BaseSchemaAsync> = NonNullable<TSchema["_types"]>["output"];
|
|
81
|
+
/**
|
|
82
|
+
* Resolve type.
|
|
83
|
+
*
|
|
84
|
+
* Hint: This type has no effect and is only used so that TypeScript displays
|
|
85
|
+
* the final type in the preview instead of the utility types used.
|
|
86
|
+
*/
|
|
87
|
+
export type Resolve<T> = T;
|
|
88
|
+
/**
|
|
89
|
+
* Resolve object type.
|
|
90
|
+
*
|
|
91
|
+
* Hint: This type has no effect and is only used so that TypeScript displays
|
|
92
|
+
* the final type in the preview instead of the utility types used.
|
|
93
|
+
*/
|
|
94
|
+
export type ResolveObject<T> = Resolve<{
|
|
95
|
+
[k in keyof T]: T[k];
|
|
96
|
+
}>;
|
|
97
|
+
/**
|
|
98
|
+
* Array schema type.
|
|
99
|
+
*/
|
|
100
|
+
export type ArraySchema<TItem extends BaseSchema, TOutput = Output<TItem>[]> = BaseSchema<Input<TItem>[], TOutput> & {
|
|
101
|
+
type: "array";
|
|
102
|
+
item: TItem;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Array path item type.
|
|
106
|
+
*/
|
|
107
|
+
export type ArrayPathItem = {
|
|
108
|
+
type: "array";
|
|
109
|
+
input: any[];
|
|
110
|
+
key: number;
|
|
111
|
+
value: any;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Boolean schema type.
|
|
115
|
+
*/
|
|
116
|
+
export type BooleanSchema<TOutput = boolean> = BaseSchema<boolean, TOutput> & {
|
|
117
|
+
type: "boolean";
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Enum type.
|
|
121
|
+
*/
|
|
122
|
+
export type Enum = {
|
|
123
|
+
[key: string]: string | number;
|
|
124
|
+
[key: number]: string;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Native enum schema type.
|
|
128
|
+
*/
|
|
129
|
+
export type EnumSchema<TEnum extends Enum, TOutput = TEnum[keyof TEnum]> = BaseSchema<TEnum[keyof TEnum], TOutput> & {
|
|
130
|
+
type: "enum";
|
|
131
|
+
enum: TEnum;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Native enum schema async type.
|
|
135
|
+
*/
|
|
136
|
+
export type EnumSchemaAsync<TEnum extends Enum, TOutput = TEnum[keyof TEnum]> = BaseSchemaAsync<TEnum[keyof TEnum], TOutput> & {
|
|
137
|
+
type: "enum";
|
|
138
|
+
enum: TEnum;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Intersect options async type.
|
|
142
|
+
*/
|
|
143
|
+
export type IntersectOptionsAsync = [
|
|
144
|
+
BaseSchema | BaseSchemaAsync,
|
|
145
|
+
BaseSchema | BaseSchemaAsync,
|
|
146
|
+
...(BaseSchema[] | BaseSchemaAsync[])
|
|
147
|
+
];
|
|
148
|
+
/**
|
|
149
|
+
* Intersect input type.
|
|
150
|
+
*/
|
|
151
|
+
export type IntersectInput<TIntersectOptions extends IntersectOptions | IntersectOptionsAsync> = TIntersectOptions extends [
|
|
152
|
+
BaseSchema<infer TInput1, any> | BaseSchemaAsync<infer TInput1, any>,
|
|
153
|
+
...infer TRest
|
|
154
|
+
] ? TRest extends IntersectOptions ? TInput1 & IntersectOutput<TRest> : TRest extends [
|
|
155
|
+
BaseSchema<infer TInput2, any> | BaseSchemaAsync<infer TInput2, any>
|
|
156
|
+
] ? TInput1 & TInput2 : never : never;
|
|
157
|
+
/**
|
|
158
|
+
* Intersect output type.
|
|
159
|
+
*/
|
|
160
|
+
export type IntersectOutput<TIntersectOptions extends IntersectOptions | IntersectOptionsAsync> = TIntersectOptions extends [
|
|
161
|
+
BaseSchema<any, infer TOutput1> | BaseSchemaAsync<any, infer TOutput1>,
|
|
162
|
+
...infer TRest
|
|
163
|
+
] ? TRest extends IntersectOptions ? TOutput1 & IntersectOutput<TRest> : TRest extends [
|
|
164
|
+
BaseSchema<any, infer TOutput2> | BaseSchemaAsync<any, infer TOutput2>
|
|
165
|
+
] ? TOutput1 & TOutput2 : never : never;
|
|
166
|
+
/**
|
|
167
|
+
* Intersect options type.
|
|
168
|
+
*/
|
|
169
|
+
export type IntersectOptions = [
|
|
170
|
+
BaseSchema,
|
|
171
|
+
BaseSchema,
|
|
172
|
+
...BaseSchema[]
|
|
173
|
+
];
|
|
174
|
+
/**
|
|
175
|
+
* Intersect schema type.
|
|
176
|
+
*/
|
|
177
|
+
export type IntersectSchema<TOptions extends IntersectOptions, TOutput = IntersectOutput<TOptions>> = BaseSchema<IntersectInput<TOptions>, TOutput> & {
|
|
178
|
+
type: "intersect";
|
|
179
|
+
options: TOptions;
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Literal type.
|
|
183
|
+
*/
|
|
184
|
+
export type Literal = number | string | boolean | symbol | bigint;
|
|
185
|
+
/**
|
|
186
|
+
* Literal schema type.
|
|
187
|
+
*/
|
|
188
|
+
export type LiteralSchema<TLiteral extends Literal, TOutput = TLiteral> = BaseSchema<TLiteral, TOutput> & {
|
|
189
|
+
type: "literal";
|
|
190
|
+
literal: TLiteral;
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* Map path item type.
|
|
194
|
+
*/
|
|
195
|
+
export type MapPathItem = {
|
|
196
|
+
type: "map";
|
|
197
|
+
input: Map<any, any>;
|
|
198
|
+
key: any;
|
|
199
|
+
value: any;
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* Never schema type.
|
|
203
|
+
*/
|
|
204
|
+
export type NeverSchema = BaseSchema<never> & {
|
|
205
|
+
type: "never";
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* Never schema async type.
|
|
209
|
+
*/
|
|
210
|
+
export type NeverSchemaAsync = BaseSchemaAsync<never> & {
|
|
211
|
+
type: "never";
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* Nullable schema type.
|
|
215
|
+
*/
|
|
216
|
+
export type NullableSchema<TWrapped extends BaseSchema, TDefault extends Input<TWrapped> | undefined = undefined, TOutput = TDefault extends Input<TWrapped> ? Output<TWrapped> : Output<TWrapped> | null> = BaseSchema<Input<TWrapped> | null, TOutput> & {
|
|
217
|
+
type: "nullable";
|
|
218
|
+
wrapped: TWrapped;
|
|
219
|
+
getDefault: () => TDefault;
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* Number schema type.
|
|
223
|
+
*/
|
|
224
|
+
export type NumberSchema<TOutput = number> = BaseSchema<number, TOutput> & {
|
|
225
|
+
type: "number";
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* Object entries async type.
|
|
229
|
+
*/
|
|
230
|
+
export type ObjectEntriesAsync = Record<string, BaseSchema | BaseSchemaAsync>;
|
|
231
|
+
/**
|
|
232
|
+
* Object path item type.
|
|
233
|
+
*/
|
|
234
|
+
export type ObjectPathItem = {
|
|
235
|
+
type: "object";
|
|
236
|
+
input: Record<string, any>;
|
|
237
|
+
key: string;
|
|
238
|
+
value: any;
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* Required object keys type.
|
|
242
|
+
*/
|
|
243
|
+
export type RequiredKeys<TObject extends object> = {
|
|
244
|
+
[TKey in keyof TObject]: undefined extends TObject[TKey] ? never : TKey;
|
|
245
|
+
}[keyof TObject];
|
|
246
|
+
/**
|
|
247
|
+
* Optional object keys type.
|
|
248
|
+
*/
|
|
249
|
+
export type OptionalKeys<TObject extends object> = {
|
|
250
|
+
[TKey in keyof TObject]: undefined extends TObject[TKey] ? TKey : never;
|
|
251
|
+
}[keyof TObject];
|
|
252
|
+
/**
|
|
253
|
+
* Object with question marks type.
|
|
254
|
+
*/
|
|
255
|
+
export type WithQuestionMarks<TObject extends object> = Pick<TObject, RequiredKeys<TObject>> & Partial<Pick<TObject, OptionalKeys<TObject>>>;
|
|
256
|
+
/**
|
|
257
|
+
* Object input inference type.
|
|
258
|
+
*/
|
|
259
|
+
export type ObjectInput<TEntries extends ObjectEntries | ObjectEntriesAsync, TRest extends BaseSchema | BaseSchemaAsync | undefined> = TRest extends undefined | NeverSchema | NeverSchemaAsync ? ResolveObject<WithQuestionMarks<{
|
|
260
|
+
[TKey in keyof TEntries]: Input<TEntries[TKey]>;
|
|
261
|
+
}>> : TRest extends BaseSchema | BaseSchemaAsync ? ResolveObject<WithQuestionMarks<{
|
|
262
|
+
[TKey in keyof TEntries]: Input<TEntries[TKey]>;
|
|
263
|
+
}>> & Record<string, Input<TRest>> : never;
|
|
264
|
+
/**
|
|
265
|
+
* Object output inference type.
|
|
266
|
+
*/
|
|
267
|
+
export type ObjectOutput<TEntries extends ObjectEntries | ObjectEntriesAsync, TRest extends BaseSchema | BaseSchemaAsync | undefined> = TRest extends undefined | NeverSchema | NeverSchemaAsync ? ResolveObject<WithQuestionMarks<{
|
|
268
|
+
[TKey in keyof TEntries]: Output<TEntries[TKey]>;
|
|
269
|
+
}>> : TRest extends BaseSchema | BaseSchemaAsync ? ResolveObject<WithQuestionMarks<{
|
|
270
|
+
[TKey in keyof TEntries]: Output<TEntries[TKey]>;
|
|
271
|
+
}>> & Record<string, Output<TRest>> : never;
|
|
272
|
+
/**
|
|
273
|
+
* Object entries type.
|
|
274
|
+
*/
|
|
275
|
+
export type ObjectEntries = Record<string, BaseSchema>;
|
|
276
|
+
/**
|
|
277
|
+
* Object schema type.
|
|
278
|
+
*/
|
|
279
|
+
export type ObjectSchema<TEntries extends ObjectEntries, TRest extends BaseSchema | undefined = undefined, TOutput = ObjectOutput<TEntries, TRest>> = BaseSchema<ObjectInput<TEntries, TRest>, TOutput> & {
|
|
280
|
+
type: "object";
|
|
281
|
+
entries: TEntries;
|
|
282
|
+
rest: TRest;
|
|
283
|
+
};
|
|
284
|
+
/**
|
|
285
|
+
* Optional schema type.
|
|
286
|
+
*/
|
|
287
|
+
export type OptionalSchema<TWrapped extends BaseSchema, TDefault extends Input<TWrapped> | undefined = undefined, TOutput = TDefault extends Input<TWrapped> ? Output<TWrapped> : Output<TWrapped> | undefined> = BaseSchema<Input<TWrapped> | undefined, TOutput> & {
|
|
288
|
+
type: "optional";
|
|
289
|
+
wrapped: TWrapped;
|
|
290
|
+
getDefault: () => TDefault;
|
|
291
|
+
};
|
|
292
|
+
/**
|
|
293
|
+
* Picklist options type.
|
|
294
|
+
*/
|
|
295
|
+
export type PicklistOptions<TOption extends string = string> = Readonly<[
|
|
296
|
+
TOption,
|
|
297
|
+
...TOption[]
|
|
298
|
+
]> | [
|
|
299
|
+
TOption,
|
|
300
|
+
...TOption[]
|
|
301
|
+
];
|
|
302
|
+
/**
|
|
303
|
+
* Picklist schema type.
|
|
304
|
+
*/
|
|
305
|
+
export type PicklistSchema<Toptions extends PicklistOptions, TOutput = Toptions[number]> = BaseSchema<Toptions[number], TOutput> & {
|
|
306
|
+
type: "picklist";
|
|
307
|
+
options: Toptions;
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
* Picklist schema async type.
|
|
311
|
+
*/
|
|
312
|
+
export type PicklistSchemaAsync<TOptions extends PicklistOptions, TOutput = TOptions[number]> = BaseSchemaAsync<TOptions[number], TOutput> & {
|
|
313
|
+
type: "picklist";
|
|
314
|
+
options: TOptions;
|
|
315
|
+
};
|
|
316
|
+
/**
|
|
317
|
+
* String schema type.
|
|
318
|
+
*/
|
|
319
|
+
export type StringSchema<TOutput = string> = BaseSchema<string, TOutput> & {
|
|
320
|
+
type: "string";
|
|
321
|
+
};
|
|
322
|
+
/**
|
|
323
|
+
* String schema async type.
|
|
324
|
+
*/
|
|
325
|
+
export type StringSchemaAsync<TOutput = string> = BaseSchemaAsync<string, TOutput> & {
|
|
326
|
+
type: "string";
|
|
327
|
+
};
|
|
328
|
+
/**
|
|
329
|
+
* Union options type.
|
|
330
|
+
*/
|
|
331
|
+
export type UnionOptions = [
|
|
332
|
+
BaseSchema,
|
|
333
|
+
BaseSchema,
|
|
334
|
+
...BaseSchema[]
|
|
335
|
+
];
|
|
336
|
+
/**
|
|
337
|
+
* Union schema type.
|
|
338
|
+
*/
|
|
339
|
+
export type UnionSchema<TOptions extends UnionOptions, TOutput = Output<TOptions[number]>> = BaseSchema<Input<TOptions[number]>, TOutput> & {
|
|
340
|
+
type: "union";
|
|
341
|
+
options: TOptions;
|
|
342
|
+
};
|
|
343
|
+
/**
|
|
344
|
+
* Union options async type.
|
|
345
|
+
*/
|
|
346
|
+
export type UnionOptionsAsync = [
|
|
347
|
+
BaseSchema | BaseSchemaAsync,
|
|
348
|
+
BaseSchema | BaseSchemaAsync,
|
|
349
|
+
...(BaseSchema[] | BaseSchemaAsync[])
|
|
350
|
+
];
|
|
351
|
+
/**
|
|
352
|
+
* Union schema async type.
|
|
353
|
+
*/
|
|
354
|
+
export type UnionSchemaAsync<TOptions extends UnionOptionsAsync, TOutput = Output<TOptions[number]>> = BaseSchemaAsync<Input<TOptions[number]>, TOutput> & {
|
|
355
|
+
type: "union";
|
|
356
|
+
options: TOptions;
|
|
357
|
+
};
|
|
358
|
+
/**
|
|
359
|
+
* Record key type.
|
|
360
|
+
*/
|
|
361
|
+
export type RecordKeyAsync = EnumSchema<any, string | number | symbol> | EnumSchemaAsync<any, string | number | symbol> | PicklistSchema<any, string | number | symbol> | PicklistSchemaAsync<any, string | number | symbol> | StringSchema<string | number | symbol> | StringSchemaAsync<string | number | symbol> | UnionSchema<any, string | number | symbol> | UnionSchemaAsync<any, string | number | symbol>;
|
|
362
|
+
/**
|
|
363
|
+
* Record path item type.
|
|
364
|
+
*/
|
|
365
|
+
export type RecordPathItem = {
|
|
366
|
+
type: "record";
|
|
367
|
+
input: Record<string | number | symbol, any>;
|
|
368
|
+
key: string | number | symbol;
|
|
369
|
+
value: any;
|
|
370
|
+
};
|
|
371
|
+
/**
|
|
372
|
+
* Partial key schema type.
|
|
373
|
+
*/
|
|
374
|
+
export type PartialKeySchema = PicklistSchema<any> | PicklistSchemaAsync<any> | EnumSchema<any> | EnumSchemaAsync<any> | UnionSchema<any>;
|
|
375
|
+
/**
|
|
376
|
+
* Record input inference type.
|
|
377
|
+
*/
|
|
378
|
+
export type RecordInput<TKey extends RecordKey | RecordKeyAsync, TValue extends BaseSchema | BaseSchemaAsync> = ResolveObject<TKey extends PartialKeySchema ? Partial<Record<Input<TKey>, Input<TValue>>> : Record<Input<TKey>, Input<TValue>>>;
|
|
379
|
+
/**
|
|
380
|
+
* Record output inference type.
|
|
381
|
+
*/
|
|
382
|
+
export type RecordOutput<TKey extends RecordKey | RecordKeyAsync, TValue extends BaseSchema | BaseSchemaAsync> = ResolveObject<TKey extends PartialKeySchema ? Partial<Record<Output<TKey>, Output<TValue>>> : Record<Output<TKey>, Output<TValue>>>;
|
|
383
|
+
/**
|
|
384
|
+
* Record key type.
|
|
385
|
+
*/
|
|
386
|
+
export type RecordKey = EnumSchema<any, string | number | symbol> | PicklistSchema<any, string | number | symbol> | StringSchema<string | number | symbol> | UnionSchema<any, string | number | symbol>;
|
|
387
|
+
/**
|
|
388
|
+
* Record schema type.
|
|
389
|
+
*/
|
|
390
|
+
export type RecordSchema<TKey extends RecordKey, TValue extends BaseSchema, TOutput = RecordOutput<TKey, TValue>> = BaseSchema<RecordInput<TKey, TValue>, TOutput> & {
|
|
391
|
+
type: "record";
|
|
392
|
+
key: TKey;
|
|
393
|
+
value: TValue;
|
|
394
|
+
};
|
|
395
|
+
/**
|
|
396
|
+
* Set path item type.
|
|
397
|
+
*/
|
|
398
|
+
export type SetPathItem = {
|
|
399
|
+
type: "set";
|
|
400
|
+
input: Set<any>;
|
|
401
|
+
key: number;
|
|
402
|
+
value: any;
|
|
403
|
+
};
|
|
404
|
+
/**
|
|
405
|
+
* Tuple path item type.
|
|
406
|
+
*/
|
|
407
|
+
export type TuplePathItem = {
|
|
408
|
+
type: "tuple";
|
|
409
|
+
input: [
|
|
410
|
+
any,
|
|
411
|
+
...any[]
|
|
412
|
+
];
|
|
413
|
+
key: number;
|
|
414
|
+
value: any;
|
|
415
|
+
};
|
|
416
|
+
/**
|
|
417
|
+
* Unknown schema type.
|
|
418
|
+
*/
|
|
419
|
+
export type UnknownSchema<TOutput = unknown> = BaseSchema<unknown, TOutput> & {
|
|
420
|
+
type: "unknown";
|
|
421
|
+
};
|
|
422
|
+
export type ButtonList = {
|
|
423
|
+
left: ButtonPartLeft;
|
|
424
|
+
middle: ButtonPartMiddle[];
|
|
425
|
+
right: ButtonPartRight;
|
|
426
|
+
};
|
|
427
|
+
export type ButtonPartLeft = {
|
|
428
|
+
type: "left";
|
|
429
|
+
left: number;
|
|
430
|
+
top: number;
|
|
431
|
+
width: number;
|
|
432
|
+
height: number;
|
|
433
|
+
};
|
|
434
|
+
export type ButtonPartMiddle = {
|
|
435
|
+
type: "middle";
|
|
436
|
+
left: number;
|
|
437
|
+
top: number;
|
|
438
|
+
width: number;
|
|
439
|
+
height: number;
|
|
440
|
+
};
|
|
441
|
+
export type ButtonPartRight = {
|
|
442
|
+
type: "right";
|
|
443
|
+
right: number;
|
|
444
|
+
top: number;
|
|
445
|
+
height: number;
|
|
446
|
+
};
|
|
447
|
+
export type Canvas = HTMLCanvasElement;
|
|
448
|
+
export type Context2D = CanvasRenderingContext2D;
|
|
449
|
+
export type DefaultCommand = {
|
|
450
|
+
color?: string;
|
|
451
|
+
size?: CommentSize;
|
|
452
|
+
font?: CommentFont;
|
|
453
|
+
loc?: CommentLoc;
|
|
454
|
+
};
|
|
455
|
+
export interface IRenderer {
|
|
456
|
+
readonly canvas: HTMLCanvasElement;
|
|
457
|
+
readonly video?: HTMLVideoElement;
|
|
458
|
+
destroy(): void;
|
|
459
|
+
drawVideo(enableLegacyPip: boolean): void;
|
|
460
|
+
getFont(): string;
|
|
461
|
+
getFillStyle(): string | CanvasGradient | CanvasPattern;
|
|
462
|
+
setScale(scale: number, arg1?: number): void;
|
|
463
|
+
fillRect(x: number, y: number, width: number, height: number): void;
|
|
464
|
+
strokeRect(x: number, y: number, width: number, height: number): void;
|
|
465
|
+
fillText(text: string, x: number, y: number): void;
|
|
466
|
+
strokeText(text: string, x: number, y: number): void;
|
|
467
|
+
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
|
|
468
|
+
clearRect(x: number, y: number, width: number, height: number): void;
|
|
469
|
+
setFont(font: string): void;
|
|
470
|
+
setFillStyle(color: string): void;
|
|
471
|
+
setStrokeStyle(color: string): void;
|
|
472
|
+
setLineWidth(width: number): void;
|
|
473
|
+
setGlobalAlpha(alpha: number): void;
|
|
474
|
+
setSize(width: number, height: number): void;
|
|
475
|
+
getSize(): {
|
|
476
|
+
width: number;
|
|
477
|
+
height: number;
|
|
478
|
+
};
|
|
479
|
+
measureText(text: string): TextMetrics;
|
|
480
|
+
beginPath(): void;
|
|
481
|
+
closePath(): void;
|
|
482
|
+
moveTo(x: number, y: number): void;
|
|
483
|
+
lineTo(x: number, y: number): void;
|
|
484
|
+
stroke(): void;
|
|
485
|
+
save(): void;
|
|
486
|
+
restore(): void;
|
|
487
|
+
getCanvas(): IRenderer;
|
|
488
|
+
drawImage(image: IRenderer, x: number, y: number, width?: number, height?: number): void;
|
|
74
489
|
}
|
|
75
|
-
|
|
76
490
|
declare class BaseComment implements IComment {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
491
|
+
protected readonly renderer: IRenderer;
|
|
492
|
+
protected cacheKey: string;
|
|
493
|
+
comment: FormattedCommentWithSize;
|
|
494
|
+
pos: {
|
|
495
|
+
x: number;
|
|
496
|
+
y: number;
|
|
497
|
+
};
|
|
498
|
+
posY: number;
|
|
499
|
+
readonly pluginName: string;
|
|
500
|
+
image?: IRenderer | null;
|
|
501
|
+
buttonImage?: IRenderer | null;
|
|
502
|
+
constructor(comment: FormattedComment, renderer: IRenderer);
|
|
503
|
+
get invisible(): boolean;
|
|
504
|
+
get loc(): "ue" | "naka" | "shita";
|
|
505
|
+
get long(): number;
|
|
506
|
+
get vpos(): number;
|
|
507
|
+
get width(): number;
|
|
508
|
+
get height(): number;
|
|
509
|
+
get flash(): boolean;
|
|
510
|
+
get layer(): number;
|
|
511
|
+
get owner(): boolean;
|
|
512
|
+
get mail(): string[];
|
|
513
|
+
get content(): string;
|
|
514
|
+
set content(_: string);
|
|
515
|
+
protected getCommentSize(parsedData: FormattedCommentWithFont): FormattedCommentWithSize;
|
|
516
|
+
protected parseCommandAndNicoscript(comment: FormattedComment): FormattedCommentWithFont;
|
|
517
|
+
protected parseContent(comment: string): ParseContentResult;
|
|
518
|
+
protected measureText(comment: MeasureTextInput): MeasureTextResult;
|
|
519
|
+
protected convertComment(comment: FormattedComment): FormattedCommentWithSize;
|
|
520
|
+
draw(vpos: number, showCollision: boolean, cursor?: Position): void;
|
|
521
|
+
protected _draw(posX: number, posY: number, cursor?: Position): void;
|
|
522
|
+
protected _drawRectColor(posX: number, posY: number): void;
|
|
523
|
+
protected _drawBackgroundColor(posX: number, posY: number): void;
|
|
524
|
+
protected _drawDebugInfo(posX: number, posY: number): void;
|
|
525
|
+
protected _drawCollision(posX: number, posY: number, showCollision: boolean): void;
|
|
526
|
+
protected getTextImage(): IRenderer | null;
|
|
527
|
+
protected _generateTextImage(): IRenderer;
|
|
528
|
+
protected _cacheImage(image: IRenderer): void;
|
|
529
|
+
protected getButtonImage(posX: number, posY: number, cursor?: Position): IRenderer | undefined;
|
|
530
|
+
isHovered(cursor?: Position, posX?: number, posY?: number): boolean;
|
|
531
|
+
protected getCacheKey(): string;
|
|
118
532
|
}
|
|
119
|
-
|
|
120
533
|
declare class FlashComment extends BaseComment {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
534
|
+
private _globalScale;
|
|
535
|
+
readonly pluginName: string;
|
|
536
|
+
buttonImage: IRenderer;
|
|
537
|
+
constructor(comment: FormattedComment, renderer: IRenderer);
|
|
538
|
+
get content(): string;
|
|
539
|
+
set content(input: string);
|
|
540
|
+
convertComment(comment: FormattedComment): FormattedCommentWithSize;
|
|
541
|
+
getCommentSize(parsedData: FormattedCommentWithFont): FormattedCommentWithSize;
|
|
542
|
+
parseCommandAndNicoscript(comment: FormattedComment): FormattedCommentWithFont;
|
|
543
|
+
parseContent(input: string, button?: ButtonParams): {
|
|
544
|
+
content: ({
|
|
545
|
+
type: "spacer";
|
|
546
|
+
char: string;
|
|
547
|
+
charWidth: number;
|
|
548
|
+
count: number;
|
|
549
|
+
isButton?: boolean | undefined;
|
|
550
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
551
|
+
} | {
|
|
552
|
+
type: "text";
|
|
553
|
+
content: string;
|
|
554
|
+
slicedContent: string[];
|
|
555
|
+
isButton?: boolean | undefined;
|
|
556
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
557
|
+
width?: number[] | undefined;
|
|
558
|
+
})[];
|
|
559
|
+
lineCount: number;
|
|
560
|
+
lineOffset: number;
|
|
561
|
+
};
|
|
562
|
+
measureText(comment: MeasureTextInput): MeasureTextResult;
|
|
563
|
+
private _isDoubleResize;
|
|
564
|
+
private _measureContent;
|
|
565
|
+
_drawCollision(posX: number, posY: number, showCollision: boolean): void;
|
|
566
|
+
_generateTextImage(): IRenderer;
|
|
567
|
+
getButtonImage(posX: number, posY: number, cursor?: Position): IRenderer | undefined;
|
|
568
|
+
isHovered(_cursor?: Position, _posX?: number, _posY?: number): boolean;
|
|
569
|
+
protected _setupCanvas(renderer: IRenderer): {
|
|
570
|
+
renderer: IRenderer;
|
|
571
|
+
};
|
|
159
572
|
}
|
|
160
|
-
|
|
161
573
|
declare class HTML5Comment extends BaseComment {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
574
|
+
readonly pluginName: string;
|
|
575
|
+
constructor(comment: FormattedComment, context: IRenderer);
|
|
576
|
+
get content(): string;
|
|
577
|
+
set content(input: string);
|
|
578
|
+
convertComment(comment: FormattedComment): FormattedCommentWithSize;
|
|
579
|
+
getCommentSize(parsedData: FormattedCommentWithFont): FormattedCommentWithSize;
|
|
580
|
+
parseCommandAndNicoscript(comment: FormattedComment): FormattedCommentWithFont;
|
|
581
|
+
parseContent(input: string, font?: HTML5Fonts): {
|
|
582
|
+
content: {
|
|
583
|
+
type: "text";
|
|
584
|
+
content: string;
|
|
585
|
+
slicedContent: string[];
|
|
586
|
+
isButton?: boolean | undefined;
|
|
587
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
588
|
+
width?: number[] | undefined;
|
|
589
|
+
}[];
|
|
590
|
+
lineCount: number;
|
|
591
|
+
lineOffset: number;
|
|
592
|
+
};
|
|
593
|
+
measureText(comment: MeasureTextInput): MeasureTextResult;
|
|
594
|
+
private _measureComment;
|
|
595
|
+
private _processResizeX;
|
|
596
|
+
_drawCollision(posX: number, posY: number, showCollision: boolean): void;
|
|
597
|
+
_generateTextImage(): IRenderer;
|
|
598
|
+
getButtonImage(): undefined;
|
|
599
|
+
isHovered(): boolean;
|
|
188
600
|
}
|
|
189
|
-
|
|
190
|
-
type index_d$4_BaseComment = BaseComment;
|
|
601
|
+
export type index_d$4_BaseComment = BaseComment;
|
|
191
602
|
declare const index_d$4_BaseComment: typeof BaseComment;
|
|
192
|
-
type index_d$4_FlashComment = FlashComment;
|
|
603
|
+
export type index_d$4_FlashComment = FlashComment;
|
|
193
604
|
declare const index_d$4_FlashComment: typeof FlashComment;
|
|
194
|
-
type index_d$4_HTML5Comment = HTML5Comment;
|
|
605
|
+
export type index_d$4_HTML5Comment = HTML5Comment;
|
|
195
606
|
declare const index_d$4_HTML5Comment: typeof HTML5Comment;
|
|
196
607
|
declare namespace index_d$4 {
|
|
197
|
-
|
|
608
|
+
export { index_d$4_BaseComment as index_d$4_BaseComment, index_d$4_FlashComment as index_d$4_FlashComment, index_d$4_HTML5Comment as index_d$4_HTML5Comment };
|
|
198
609
|
}
|
|
199
|
-
|
|
200
|
-
type
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
flash: T;
|
|
204
|
-
};
|
|
205
|
-
type ConfigSizeItem<T> = {
|
|
206
|
-
big: T;
|
|
207
|
-
medium: T;
|
|
208
|
-
small: T;
|
|
209
|
-
};
|
|
210
|
-
type ConfigResizedItem<T> = {
|
|
211
|
-
default: T;
|
|
212
|
-
resized: T;
|
|
213
|
-
};
|
|
214
|
-
type ConfigFlashFontItem<T> = {
|
|
215
|
-
gulim: T;
|
|
216
|
-
simsun: T;
|
|
217
|
-
defont: T;
|
|
218
|
-
};
|
|
219
|
-
type ConfigHTML5FontItem<T> = {
|
|
220
|
-
gothic: T;
|
|
221
|
-
mincho: T;
|
|
222
|
-
defont: T;
|
|
223
|
-
};
|
|
224
|
-
type CommentStageSize = {
|
|
225
|
-
width: number;
|
|
226
|
-
fullWidth: number;
|
|
227
|
-
height: number;
|
|
228
|
-
};
|
|
229
|
-
type FlashCharList = {
|
|
230
|
-
[key in "simsunStrong" | "simsunWeak" | "gulim" | "gothic"]: string;
|
|
231
|
-
};
|
|
232
|
-
type FlashMode = "xp" | "vista";
|
|
233
|
-
type FlashScriptChar = {
|
|
234
|
-
[key in "super" | "sub"]: string;
|
|
235
|
-
};
|
|
236
|
-
type FontList = {
|
|
237
|
-
[key in "gulim" | "simsun"]: string;
|
|
238
|
-
};
|
|
239
|
-
type LineCounts = {
|
|
240
|
-
[key in "default" | "resized" | "doubleResized"]: ConfigSizeItem<number>;
|
|
241
|
-
};
|
|
242
|
-
type BaseConfig = {
|
|
243
|
-
cacheAge: number;
|
|
244
|
-
canvasHeight: number;
|
|
245
|
-
canvasWidth: number;
|
|
246
|
-
collisionRange: {
|
|
247
|
-
[key in "left" | "right"]: number;
|
|
248
|
-
};
|
|
249
|
-
collisionPadding: number;
|
|
250
|
-
colors: {
|
|
251
|
-
[key: string]: string;
|
|
252
|
-
};
|
|
253
|
-
commentDrawPadding: number;
|
|
254
|
-
commentDrawRange: number;
|
|
255
|
-
commentScale: ConfigItem<number>;
|
|
256
|
-
commentStageSize: ConfigItem<CommentStageSize>;
|
|
257
|
-
flashCommentYOffset: ConfigSizeItem<ConfigResizedItem<number>>;
|
|
258
|
-
flashCommentYPaddingTop: ConfigResizedItem<number>;
|
|
259
|
-
contextFillLiveOpacity: number;
|
|
260
|
-
contextLineWidth: ConfigItem<number>;
|
|
261
|
-
contextStrokeColor: string;
|
|
262
|
-
contextStrokeInversionColor: string;
|
|
263
|
-
contextStrokeOpacity: number;
|
|
264
|
-
flashChar: FlashCharList;
|
|
265
|
-
flashMode: FlashMode;
|
|
266
|
-
flashScriptChar: FlashScriptChar;
|
|
267
|
-
flashThreshold: number;
|
|
268
|
-
fonts: {
|
|
269
|
-
flash: FontList;
|
|
270
|
-
html5: PlatformFont;
|
|
271
|
-
};
|
|
272
|
-
fontSize: ConfigItem<ConfigSizeItem<ConfigResizedItem<number>>>;
|
|
273
|
-
fpsInterval: number;
|
|
274
|
-
html5HiResCommentCorrection: number;
|
|
275
|
-
html5LineCounts: ConfigItem<LineCounts>;
|
|
276
|
-
lineHeight: ConfigItem<ConfigSizeItem<ConfigResizedItem<number>>>;
|
|
277
|
-
html5MinFontSize: number;
|
|
278
|
-
sameCAGap: number;
|
|
279
|
-
sameCAMinScore: number;
|
|
280
|
-
sameCARange: number;
|
|
281
|
-
sameCATimestampRange: number;
|
|
282
|
-
flashLetterSpacing: number;
|
|
283
|
-
flashScriptCharOffset: number;
|
|
284
|
-
plugins: IPluginConstructor[];
|
|
285
|
-
commentPlugins: {
|
|
286
|
-
class: typeof BaseComment;
|
|
287
|
-
condition: (comment: FormattedComment) => boolean;
|
|
288
|
-
}[];
|
|
289
|
-
commentLimit: number | undefined;
|
|
290
|
-
hideCommentOrder: "asc" | "desc";
|
|
291
|
-
lineBreakCount: {
|
|
292
|
-
[key in CommentSize]: number;
|
|
293
|
-
};
|
|
294
|
-
nakaCommentSpeedOffset: number;
|
|
295
|
-
atButtonPadding: number;
|
|
296
|
-
atButtonRadius: number;
|
|
297
|
-
flashDoubleResizeHeights: Partial<ConfigSizeItem<{
|
|
298
|
-
[key: number]: number;
|
|
299
|
-
}>>;
|
|
300
|
-
flashLineBreakScale: ConfigSizeItem<number>;
|
|
301
|
-
compatSpacer: {
|
|
302
|
-
flash: {
|
|
303
|
-
[key: string]: Partial<ConfigFlashFontItem<number>>;
|
|
304
|
-
};
|
|
305
|
-
html5: {
|
|
306
|
-
[key: string]: Partial<ConfigHTML5FontItem<number>>;
|
|
307
|
-
};
|
|
308
|
-
};
|
|
309
|
-
};
|
|
310
|
-
type Config = Partial<BaseConfig>;
|
|
311
|
-
|
|
312
|
-
type Position = {
|
|
313
|
-
x: number;
|
|
314
|
-
y: number;
|
|
610
|
+
export type ConfigItem<T> = T | MultiConfigItem<T>;
|
|
611
|
+
export type MultiConfigItem<T> = {
|
|
612
|
+
html5: T;
|
|
613
|
+
flash: T;
|
|
315
614
|
};
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
615
|
+
export type ConfigSizeItem<T> = {
|
|
616
|
+
big: T;
|
|
617
|
+
medium: T;
|
|
618
|
+
small: T;
|
|
619
|
+
};
|
|
620
|
+
export type ConfigResizedItem<T> = {
|
|
621
|
+
default: T;
|
|
622
|
+
resized: T;
|
|
623
|
+
};
|
|
624
|
+
export type ConfigFlashFontItem<T> = {
|
|
625
|
+
gulim: T;
|
|
626
|
+
simsun: T;
|
|
627
|
+
defont: T;
|
|
628
|
+
};
|
|
629
|
+
export type ConfigHTML5FontItem<T> = {
|
|
630
|
+
gothic: T;
|
|
631
|
+
mincho: T;
|
|
632
|
+
defont: T;
|
|
633
|
+
};
|
|
634
|
+
export type CommentStageSize = {
|
|
635
|
+
width: number;
|
|
636
|
+
fullWidth: number;
|
|
637
|
+
height: number;
|
|
638
|
+
};
|
|
639
|
+
export type FlashCharList = {
|
|
640
|
+
[key in "simsunStrong" | "simsunWeak" | "gulim" | "gothic"]: string;
|
|
641
|
+
};
|
|
642
|
+
export type FlashMode = "xp" | "vista";
|
|
643
|
+
export type FlashScriptChar = {
|
|
644
|
+
[key in "super" | "sub"]: string;
|
|
645
|
+
};
|
|
646
|
+
export type FontList = {
|
|
647
|
+
[key in "gulim" | "simsun"]: string;
|
|
648
|
+
};
|
|
649
|
+
export type LineCounts = {
|
|
650
|
+
[key in "default" | "resized" | "doubleResized"]: ConfigSizeItem<number>;
|
|
651
|
+
};
|
|
652
|
+
export type BaseConfig = {
|
|
653
|
+
cacheAge: number;
|
|
654
|
+
canvasHeight: number;
|
|
655
|
+
canvasWidth: number;
|
|
656
|
+
collisionRange: {
|
|
657
|
+
[key in "left" | "right"]: number;
|
|
658
|
+
};
|
|
659
|
+
collisionPadding: number;
|
|
660
|
+
colors: {
|
|
661
|
+
[key: string]: string;
|
|
662
|
+
};
|
|
663
|
+
commentDrawPadding: number;
|
|
664
|
+
commentDrawRange: number;
|
|
665
|
+
commentScale: ConfigItem<number>;
|
|
666
|
+
commentStageSize: ConfigItem<CommentStageSize>;
|
|
667
|
+
flashCommentYOffset: ConfigSizeItem<ConfigResizedItem<number>>;
|
|
668
|
+
flashCommentYPaddingTop: ConfigResizedItem<number>;
|
|
669
|
+
contextFillLiveOpacity: number;
|
|
670
|
+
contextLineWidth: ConfigItem<number>;
|
|
671
|
+
contextStrokeColor: string;
|
|
672
|
+
contextStrokeInversionColor: string;
|
|
673
|
+
contextStrokeOpacity: number;
|
|
674
|
+
flashChar: FlashCharList;
|
|
675
|
+
flashMode: FlashMode;
|
|
676
|
+
flashScriptChar: FlashScriptChar;
|
|
677
|
+
flashThreshold: number;
|
|
678
|
+
fonts: {
|
|
679
|
+
flash: FontList;
|
|
680
|
+
html5: PlatformFont;
|
|
681
|
+
};
|
|
682
|
+
fontSize: ConfigItem<ConfigSizeItem<ConfigResizedItem<number>>>;
|
|
683
|
+
fpsInterval: number;
|
|
684
|
+
html5HiResCommentCorrection: number;
|
|
685
|
+
html5LineCounts: ConfigItem<LineCounts>;
|
|
686
|
+
lineHeight: ConfigItem<ConfigSizeItem<ConfigResizedItem<number>>>;
|
|
687
|
+
html5MinFontSize: number;
|
|
688
|
+
sameCAGap: number;
|
|
689
|
+
sameCAMinScore: number;
|
|
690
|
+
sameCARange: number;
|
|
691
|
+
sameCATimestampRange: number;
|
|
692
|
+
flashLetterSpacing: number;
|
|
693
|
+
flashScriptCharOffset: number;
|
|
694
|
+
plugins: IPluginConstructor[];
|
|
695
|
+
commentPlugins: {
|
|
696
|
+
class: typeof BaseComment;
|
|
697
|
+
condition: (comment: FormattedComment) => boolean;
|
|
698
|
+
}[];
|
|
699
|
+
commentLimit: number | undefined;
|
|
700
|
+
hideCommentOrder: "asc" | "desc";
|
|
701
|
+
lineBreakCount: {
|
|
702
|
+
[key in CommentSize]: number;
|
|
703
|
+
};
|
|
704
|
+
nakaCommentSpeedOffset: number;
|
|
705
|
+
atButtonPadding: number;
|
|
706
|
+
atButtonRadius: number;
|
|
707
|
+
flashDoubleResizeHeights: Partial<ConfigSizeItem<{
|
|
708
|
+
[key: number]: number;
|
|
709
|
+
}>>;
|
|
710
|
+
flashLineBreakScale: ConfigSizeItem<number>;
|
|
711
|
+
compatSpacer: {
|
|
712
|
+
flash: {
|
|
713
|
+
[key: string]: Partial<ConfigFlashFontItem<number>>;
|
|
714
|
+
};
|
|
715
|
+
html5: {
|
|
716
|
+
[key: string]: Partial<ConfigHTML5FontItem<number>>;
|
|
717
|
+
};
|
|
718
|
+
};
|
|
719
|
+
};
|
|
720
|
+
export type Config = Partial<BaseConfig>;
|
|
721
|
+
export type Position = {
|
|
722
|
+
x: number;
|
|
723
|
+
y: number;
|
|
724
|
+
};
|
|
725
|
+
export interface CommentEventBase {
|
|
726
|
+
type: CommentEventName;
|
|
727
|
+
timeStamp: number;
|
|
728
|
+
vpos: number;
|
|
321
729
|
}
|
|
322
|
-
interface SeekDisableEvent extends CommentEventBase {
|
|
323
|
-
|
|
730
|
+
export interface SeekDisableEvent extends CommentEventBase {
|
|
731
|
+
type: "seekDisable";
|
|
324
732
|
}
|
|
325
|
-
type SeekDisableEventHandler = (event: SeekDisableEvent) => unknown;
|
|
326
|
-
interface SeekEnableEvent extends CommentEventBase {
|
|
327
|
-
|
|
733
|
+
export type SeekDisableEventHandler = (event: SeekDisableEvent) => unknown;
|
|
734
|
+
export interface SeekEnableEvent extends CommentEventBase {
|
|
735
|
+
type: "seekEnable";
|
|
328
736
|
}
|
|
329
|
-
type SeekEnableEventHandler = (event: SeekEnableEvent) => unknown;
|
|
330
|
-
interface CommentDisableEvent extends CommentEventBase {
|
|
331
|
-
|
|
737
|
+
export type SeekEnableEventHandler = (event: SeekEnableEvent) => unknown;
|
|
738
|
+
export interface CommentDisableEvent extends CommentEventBase {
|
|
739
|
+
type: "commentDisable";
|
|
332
740
|
}
|
|
333
|
-
type CommentDisableEventHandler = (event: CommentDisableEvent) => unknown;
|
|
334
|
-
interface CommentEnableEvent extends CommentEventBase {
|
|
335
|
-
|
|
741
|
+
export type CommentDisableEventHandler = (event: CommentDisableEvent) => unknown;
|
|
742
|
+
export interface CommentEnableEvent extends CommentEventBase {
|
|
743
|
+
type: "commentEnable";
|
|
336
744
|
}
|
|
337
|
-
type CommentEnableEventHandler = (event: CommentEnableEvent) => unknown;
|
|
338
|
-
interface JumpEvent extends CommentEventBase {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
745
|
+
export type CommentEnableEventHandler = (event: CommentEnableEvent) => unknown;
|
|
746
|
+
export interface JumpEvent extends CommentEventBase {
|
|
747
|
+
type: "jump";
|
|
748
|
+
to: string;
|
|
749
|
+
message?: string;
|
|
342
750
|
}
|
|
343
|
-
type JumpEventHandler = (event: JumpEvent) => unknown;
|
|
344
|
-
type CommentEventName = "seekDisable" | "seekEnable" | "commentDisable" | "commentEnable" | "jump";
|
|
345
|
-
type CommentEventHandler = SeekDisableEventHandler | SeekEnableEventHandler | CommentDisableEventHandler | CommentEnableEventHandler | JumpEventHandler;
|
|
346
|
-
interface CommentEventHandlerMap {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
751
|
+
export type JumpEventHandler = (event: JumpEvent) => unknown;
|
|
752
|
+
export type CommentEventName = "seekDisable" | "seekEnable" | "commentDisable" | "commentEnable" | "jump";
|
|
753
|
+
export type CommentEventHandler = SeekDisableEventHandler | SeekEnableEventHandler | CommentDisableEventHandler | CommentEnableEventHandler | JumpEventHandler;
|
|
754
|
+
export interface CommentEventHandlerMap {
|
|
755
|
+
seekDisable: SeekDisableEventHandler;
|
|
756
|
+
seekEnable: SeekEnableEventHandler;
|
|
757
|
+
commentDisable: CommentDisableEventHandler;
|
|
758
|
+
commentEnable: CommentEnableEventHandler;
|
|
759
|
+
jump: JumpEventHandler;
|
|
352
760
|
}
|
|
353
|
-
interface CommentEventMap {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
761
|
+
export interface CommentEventMap {
|
|
762
|
+
seekDisable: SeekDisableEvent;
|
|
763
|
+
seekEnable: SeekEnableEvent;
|
|
764
|
+
commentDisable: CommentDisableEvent;
|
|
765
|
+
commentEnable: CommentEnableEvent;
|
|
766
|
+
jump: JumpEvent;
|
|
359
767
|
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
768
|
+
export type Platform = "win7" | "win8_1" | "win" | "mac10_9" | "mac10_11" | "mac" | "other";
|
|
769
|
+
export declare const ZHTML5Fonts: UnionSchema<[
|
|
770
|
+
LiteralSchema<"gothic", "gothic">,
|
|
771
|
+
LiteralSchema<"mincho", "mincho">,
|
|
772
|
+
LiteralSchema<"defont", "defont">
|
|
773
|
+
], "defont" | "mincho" | "gothic">;
|
|
774
|
+
export type HTML5Fonts = Output<typeof ZHTML5Fonts>;
|
|
775
|
+
export type FontItem = {
|
|
776
|
+
font: string;
|
|
777
|
+
offset: number;
|
|
778
|
+
weight: number;
|
|
368
779
|
};
|
|
369
|
-
type PlatformFont = {
|
|
370
|
-
|
|
780
|
+
export type PlatformFont = {
|
|
781
|
+
[key in HTML5Fonts]: FontItem;
|
|
371
782
|
};
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
is_my_post: valibot.OptionalSchema<valibot.BooleanSchema<boolean>, false, boolean>;
|
|
783
|
+
export declare const ZFormattedComment: ObjectSchema<{
|
|
784
|
+
id: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
785
|
+
vpos: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
786
|
+
content: OptionalSchema<StringSchema<string>, "", string>;
|
|
787
|
+
date: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
788
|
+
date_usec: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
789
|
+
owner: OptionalSchema<BooleanSchema<boolean>, false, boolean>;
|
|
790
|
+
premium: OptionalSchema<BooleanSchema<boolean>, false, boolean>;
|
|
791
|
+
mail: OptionalSchema<ArraySchema<StringSchema<string>, string[]>, never[], string[]>;
|
|
792
|
+
user_id: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
793
|
+
layer: OptionalSchema<NumberSchema<number>, -1, number>;
|
|
794
|
+
is_my_post: OptionalSchema<BooleanSchema<boolean>, false, boolean>;
|
|
385
795
|
}, undefined, {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
796
|
+
owner: boolean;
|
|
797
|
+
content: string;
|
|
798
|
+
id: number;
|
|
799
|
+
vpos: number;
|
|
800
|
+
date: number;
|
|
801
|
+
date_usec: number;
|
|
802
|
+
premium: boolean;
|
|
803
|
+
mail: string[];
|
|
804
|
+
user_id: number;
|
|
805
|
+
layer: number;
|
|
806
|
+
is_my_post: boolean;
|
|
397
807
|
}>;
|
|
398
|
-
type FormattedComment = Output<typeof ZFormattedComment>;
|
|
399
|
-
declare const ZFormattedLegacyComment:
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
808
|
+
export type FormattedComment = Output<typeof ZFormattedComment>;
|
|
809
|
+
export declare const ZFormattedLegacyComment: ObjectSchema<Omit<{
|
|
810
|
+
id: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
811
|
+
vpos: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
812
|
+
content: OptionalSchema<StringSchema<string>, "", string>;
|
|
813
|
+
date: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
814
|
+
date_usec: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
815
|
+
owner: OptionalSchema<BooleanSchema<boolean>, false, boolean>;
|
|
816
|
+
premium: OptionalSchema<BooleanSchema<boolean>, false, boolean>;
|
|
817
|
+
mail: OptionalSchema<ArraySchema<StringSchema<string>, string[]>, never[], string[]>;
|
|
818
|
+
user_id: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
819
|
+
layer: OptionalSchema<NumberSchema<number>, -1, number>;
|
|
820
|
+
is_my_post: OptionalSchema<BooleanSchema<boolean>, false, boolean>;
|
|
411
821
|
}, "user_id" | "layer" | "is_my_post">, undefined, {
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
822
|
+
owner: boolean;
|
|
823
|
+
content: string;
|
|
824
|
+
id: number;
|
|
825
|
+
vpos: number;
|
|
826
|
+
date: number;
|
|
827
|
+
date_usec: number;
|
|
828
|
+
premium: boolean;
|
|
829
|
+
mail: string[];
|
|
420
830
|
}>;
|
|
421
|
-
type FormattedLegacyComment = Output<typeof ZFormattedLegacyComment>;
|
|
422
|
-
type formattedComment = FormattedComment;
|
|
423
|
-
type formattedLegacyComment = FormattedLegacyComment;
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
deleted: valibot.OptionalSchema<valibot.NumberSchema<number>, 0, number>;
|
|
831
|
+
export type FormattedLegacyComment = Output<typeof ZFormattedLegacyComment>;
|
|
832
|
+
export type formattedComment = FormattedComment;
|
|
833
|
+
export type formattedLegacyComment = FormattedLegacyComment;
|
|
834
|
+
export declare const ZApiChat: ObjectSchema<{
|
|
835
|
+
thread: OptionalSchema<StringSchema<string>, "", string>;
|
|
836
|
+
no: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
837
|
+
vpos: NumberSchema<number>;
|
|
838
|
+
date: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
839
|
+
date_usec: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
840
|
+
nicoru: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
841
|
+
premium: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
842
|
+
anonymity: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
843
|
+
user_id: OptionalSchema<StringSchema<string>, "", string>;
|
|
844
|
+
mail: OptionalSchema<StringSchema<string>, "", string>;
|
|
845
|
+
content: StringSchema<string>;
|
|
846
|
+
deleted: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
438
847
|
}, undefined, {
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
848
|
+
content: string;
|
|
849
|
+
vpos: number;
|
|
850
|
+
date: number;
|
|
851
|
+
date_usec: number;
|
|
852
|
+
premium: number;
|
|
853
|
+
mail: string;
|
|
854
|
+
user_id: string;
|
|
855
|
+
thread: string;
|
|
856
|
+
no: number;
|
|
857
|
+
nicoru: number;
|
|
858
|
+
anonymity: number;
|
|
859
|
+
deleted: number;
|
|
451
860
|
}>;
|
|
452
|
-
type ApiChat = Output<typeof ZApiChat>;
|
|
453
|
-
declare const ZRawApiResponse:
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
861
|
+
export type ApiChat = Output<typeof ZApiChat>;
|
|
862
|
+
export declare const ZRawApiResponse: UnionSchema<[
|
|
863
|
+
ObjectSchema<{
|
|
864
|
+
chat: ObjectSchema<{
|
|
865
|
+
thread: OptionalSchema<StringSchema<string>, "", string>;
|
|
866
|
+
no: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
867
|
+
vpos: NumberSchema<number>;
|
|
868
|
+
date: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
869
|
+
date_usec: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
870
|
+
nicoru: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
871
|
+
premium: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
872
|
+
anonymity: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
873
|
+
user_id: OptionalSchema<StringSchema<string>, "", string>;
|
|
874
|
+
mail: OptionalSchema<StringSchema<string>, "", string>;
|
|
875
|
+
content: StringSchema<string>;
|
|
876
|
+
deleted: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
877
|
+
}, undefined, {
|
|
878
|
+
content: string;
|
|
879
|
+
vpos: number;
|
|
880
|
+
date: number;
|
|
881
|
+
date_usec: number;
|
|
882
|
+
premium: number;
|
|
883
|
+
mail: string;
|
|
884
|
+
user_id: string;
|
|
885
|
+
thread: string;
|
|
886
|
+
no: number;
|
|
887
|
+
nicoru: number;
|
|
888
|
+
anonymity: number;
|
|
889
|
+
deleted: number;
|
|
890
|
+
}>;
|
|
891
|
+
}, undefined, {
|
|
892
|
+
chat: {
|
|
893
|
+
content: string;
|
|
894
|
+
vpos: number;
|
|
895
|
+
date: number;
|
|
896
|
+
date_usec: number;
|
|
897
|
+
premium: number;
|
|
898
|
+
mail: string;
|
|
899
|
+
user_id: string;
|
|
900
|
+
thread: string;
|
|
901
|
+
no: number;
|
|
902
|
+
nicoru: number;
|
|
903
|
+
anonymity: number;
|
|
904
|
+
deleted: number;
|
|
905
|
+
};
|
|
906
|
+
}>,
|
|
907
|
+
RecordSchema<StringSchema<string>, UnknownSchema<unknown>, {
|
|
908
|
+
[x: string]: unknown;
|
|
909
|
+
}>
|
|
910
|
+
], {
|
|
911
|
+
chat: {
|
|
912
|
+
content: string;
|
|
913
|
+
vpos: number;
|
|
914
|
+
date: number;
|
|
915
|
+
date_usec: number;
|
|
916
|
+
premium: number;
|
|
917
|
+
mail: string;
|
|
918
|
+
user_id: string;
|
|
919
|
+
thread: string;
|
|
920
|
+
no: number;
|
|
921
|
+
nicoru: number;
|
|
922
|
+
anonymity: number;
|
|
923
|
+
deleted: number;
|
|
924
|
+
};
|
|
513
925
|
} | {
|
|
514
|
-
|
|
926
|
+
[x: string]: unknown;
|
|
515
927
|
}>;
|
|
516
|
-
type RawApiResponse = Output<typeof ZRawApiResponse>;
|
|
517
|
-
declare const ZApiPing:
|
|
518
|
-
|
|
928
|
+
export type RawApiResponse = Output<typeof ZRawApiResponse>;
|
|
929
|
+
export declare const ZApiPing: ObjectSchema<{
|
|
930
|
+
content: StringSchema<string>;
|
|
519
931
|
}, undefined, {
|
|
520
|
-
|
|
932
|
+
content: string;
|
|
521
933
|
}>;
|
|
522
|
-
type ApiPing = Output<typeof ZApiPing>;
|
|
523
|
-
declare const ZApiThread:
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
934
|
+
export type ApiPing = Output<typeof ZApiPing>;
|
|
935
|
+
export declare const ZApiThread: ObjectSchema<{
|
|
936
|
+
resultcode: NumberSchema<number>;
|
|
937
|
+
thread: StringSchema<string>;
|
|
938
|
+
server_time: NumberSchema<number>;
|
|
939
|
+
ticket: StringSchema<string>;
|
|
940
|
+
revision: NumberSchema<number>;
|
|
529
941
|
}, undefined, {
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
942
|
+
thread: string;
|
|
943
|
+
resultcode: number;
|
|
944
|
+
server_time: number;
|
|
945
|
+
ticket: string;
|
|
946
|
+
revision: number;
|
|
535
947
|
}>;
|
|
536
|
-
type ApiThread = Output<typeof ZApiThread>;
|
|
537
|
-
declare const ZApiLeaf:
|
|
538
|
-
|
|
539
|
-
|
|
948
|
+
export type ApiThread = Output<typeof ZApiThread>;
|
|
949
|
+
export declare const ZApiLeaf: ObjectSchema<{
|
|
950
|
+
thread: StringSchema<string>;
|
|
951
|
+
count: NumberSchema<number>;
|
|
540
952
|
}, undefined, {
|
|
541
|
-
|
|
542
|
-
|
|
953
|
+
count: number;
|
|
954
|
+
thread: string;
|
|
543
955
|
}>;
|
|
544
|
-
type ApiLeaf = Output<typeof ZApiLeaf>;
|
|
545
|
-
declare const ZApiGlobalNumRes:
|
|
546
|
-
|
|
547
|
-
|
|
956
|
+
export type ApiLeaf = Output<typeof ZApiLeaf>;
|
|
957
|
+
export declare const ZApiGlobalNumRes: ObjectSchema<{
|
|
958
|
+
thread: StringSchema<string>;
|
|
959
|
+
num_res: NumberSchema<number>;
|
|
548
960
|
}, undefined, {
|
|
549
|
-
|
|
550
|
-
|
|
961
|
+
thread: string;
|
|
962
|
+
num_res: number;
|
|
551
963
|
}>;
|
|
552
|
-
type ApiGlobalNumRes = Output<typeof ZApiGlobalNumRes>;
|
|
553
|
-
type rawApiResponse = RawApiResponse;
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
comment: valibot.StringSchema<string>;
|
|
964
|
+
export type ApiGlobalNumRes = Output<typeof ZApiGlobalNumRes>;
|
|
965
|
+
export type rawApiResponse = RawApiResponse;
|
|
966
|
+
export declare const ZOwnerComment: ObjectSchema<{
|
|
967
|
+
time: StringSchema<string>;
|
|
968
|
+
command: StringSchema<string>;
|
|
969
|
+
comment: StringSchema<string>;
|
|
559
970
|
}, undefined, {
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
971
|
+
time: string;
|
|
972
|
+
command: string;
|
|
973
|
+
comment: string;
|
|
563
974
|
}>;
|
|
564
|
-
type OwnerComment = Output<typeof ZOwnerComment>;
|
|
565
|
-
type ownerComment = OwnerComment;
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
isMyPost: valibot.BooleanSchema<boolean>;
|
|
975
|
+
export type OwnerComment = Output<typeof ZOwnerComment>;
|
|
976
|
+
export type ownerComment = OwnerComment;
|
|
977
|
+
export declare const ZV1Comment: ObjectSchema<{
|
|
978
|
+
id: StringSchema<string>;
|
|
979
|
+
no: NumberSchema<number>;
|
|
980
|
+
vposMs: NumberSchema<number>;
|
|
981
|
+
body: StringSchema<string>;
|
|
982
|
+
commands: ArraySchema<StringSchema<string>, string[]>;
|
|
983
|
+
userId: StringSchema<string>;
|
|
984
|
+
isPremium: BooleanSchema<boolean>;
|
|
985
|
+
score: NumberSchema<number>;
|
|
986
|
+
postedAt: StringSchema<string>;
|
|
987
|
+
nicoruCount: NumberSchema<number>;
|
|
988
|
+
nicoruId: NullableSchema<StringSchema<string>, undefined, string | null>;
|
|
989
|
+
source: StringSchema<string>;
|
|
990
|
+
isMyPost: BooleanSchema<boolean>;
|
|
581
991
|
}, undefined, {
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
992
|
+
id: string;
|
|
993
|
+
no: number;
|
|
994
|
+
vposMs: number;
|
|
995
|
+
body: string;
|
|
996
|
+
commands: string[];
|
|
997
|
+
userId: string;
|
|
998
|
+
isPremium: boolean;
|
|
999
|
+
score: number;
|
|
1000
|
+
postedAt: string;
|
|
1001
|
+
nicoruCount: number;
|
|
1002
|
+
nicoruId: string | null;
|
|
1003
|
+
source: string;
|
|
1004
|
+
isMyPost: boolean;
|
|
595
1005
|
}>;
|
|
596
|
-
type V1Comment = Output<typeof ZV1Comment>;
|
|
597
|
-
declare const ZV1Thread:
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
1006
|
+
export type V1Comment = Output<typeof ZV1Comment>;
|
|
1007
|
+
export declare const ZV1Thread: ObjectSchema<{
|
|
1008
|
+
id: UnknownSchema<unknown>;
|
|
1009
|
+
fork: StringSchema<string>;
|
|
1010
|
+
commentCount: OptionalSchema<NumberSchema<number>, 0, number>;
|
|
1011
|
+
comments: ArraySchema<ObjectSchema<{
|
|
1012
|
+
id: StringSchema<string>;
|
|
1013
|
+
no: NumberSchema<number>;
|
|
1014
|
+
vposMs: NumberSchema<number>;
|
|
1015
|
+
body: StringSchema<string>;
|
|
1016
|
+
commands: ArraySchema<StringSchema<string>, string[]>;
|
|
1017
|
+
userId: StringSchema<string>;
|
|
1018
|
+
isPremium: BooleanSchema<boolean>;
|
|
1019
|
+
score: NumberSchema<number>;
|
|
1020
|
+
postedAt: StringSchema<string>;
|
|
1021
|
+
nicoruCount: NumberSchema<number>;
|
|
1022
|
+
nicoruId: NullableSchema<StringSchema<string>, undefined, string | null>;
|
|
1023
|
+
source: StringSchema<string>;
|
|
1024
|
+
isMyPost: BooleanSchema<boolean>;
|
|
1025
|
+
}, undefined, {
|
|
1026
|
+
id: string;
|
|
1027
|
+
no: number;
|
|
1028
|
+
vposMs: number;
|
|
1029
|
+
body: string;
|
|
1030
|
+
commands: string[];
|
|
1031
|
+
userId: string;
|
|
1032
|
+
isPremium: boolean;
|
|
1033
|
+
score: number;
|
|
1034
|
+
postedAt: string;
|
|
1035
|
+
nicoruCount: number;
|
|
1036
|
+
nicoruId: string | null;
|
|
1037
|
+
source: string;
|
|
1038
|
+
isMyPost: boolean;
|
|
1039
|
+
}>, {
|
|
1040
|
+
id: string;
|
|
1041
|
+
no: number;
|
|
1042
|
+
vposMs: number;
|
|
1043
|
+
body: string;
|
|
1044
|
+
commands: string[];
|
|
1045
|
+
userId: string;
|
|
1046
|
+
isPremium: boolean;
|
|
1047
|
+
score: number;
|
|
1048
|
+
postedAt: string;
|
|
1049
|
+
nicoruCount: number;
|
|
1050
|
+
nicoruId: string | null;
|
|
1051
|
+
source: string;
|
|
1052
|
+
isMyPost: boolean;
|
|
1053
|
+
}[]>;
|
|
644
1054
|
}, undefined, {
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
1055
|
+
fork: string;
|
|
1056
|
+
commentCount: number;
|
|
1057
|
+
comments: {
|
|
1058
|
+
id: string;
|
|
1059
|
+
no: number;
|
|
1060
|
+
vposMs: number;
|
|
1061
|
+
body: string;
|
|
1062
|
+
commands: string[];
|
|
1063
|
+
userId: string;
|
|
1064
|
+
isPremium: boolean;
|
|
1065
|
+
score: number;
|
|
1066
|
+
postedAt: string;
|
|
1067
|
+
nicoruCount: number;
|
|
1068
|
+
nicoruId: string | null;
|
|
1069
|
+
source: string;
|
|
1070
|
+
isMyPost: boolean;
|
|
1071
|
+
}[];
|
|
1072
|
+
id?: unknown;
|
|
663
1073
|
}>;
|
|
664
|
-
type V1Thread = Output<typeof ZV1Thread>;
|
|
665
|
-
type v1Thread = V1Thread;
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
isHovered: (cursor?: Position, posX?: number, posY?: number) => boolean;
|
|
1074
|
+
export type V1Thread = Output<typeof ZV1Thread>;
|
|
1075
|
+
export type v1Thread = V1Thread;
|
|
1076
|
+
export interface IComment {
|
|
1077
|
+
comment: FormattedCommentWithSize;
|
|
1078
|
+
invisible: boolean;
|
|
1079
|
+
loc: CommentLoc;
|
|
1080
|
+
width: number;
|
|
1081
|
+
long: number;
|
|
1082
|
+
height: number;
|
|
1083
|
+
vpos: number;
|
|
1084
|
+
flash: boolean;
|
|
1085
|
+
posY: number;
|
|
1086
|
+
owner: boolean;
|
|
1087
|
+
layer: number;
|
|
1088
|
+
mail: string[];
|
|
1089
|
+
content: string;
|
|
1090
|
+
image?: IRenderer | null;
|
|
1091
|
+
draw: (vpos: number, showCollision: boolean, cursor?: Position) => void;
|
|
1092
|
+
isHovered: (cursor?: Position, posX?: number, posY?: number) => boolean;
|
|
684
1093
|
}
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
new (Canvas: IRenderer, comments: IComment[]): IPlugin;
|
|
1094
|
+
export interface IPluginConstructor {
|
|
1095
|
+
id: string;
|
|
1096
|
+
new (Canvas: IRenderer, comments: IComment[]): IPlugin;
|
|
689
1097
|
}
|
|
690
|
-
interface IPlugin {
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
1098
|
+
export interface IPlugin {
|
|
1099
|
+
draw?: (vpos: number) => void;
|
|
1100
|
+
addComments?: (comments: IComment[]) => void;
|
|
1101
|
+
transformComments?: (comments: IComment[]) => IComment[];
|
|
694
1102
|
}
|
|
695
|
-
type IPluginList = {
|
|
696
|
-
|
|
697
|
-
|
|
1103
|
+
export type IPluginList = {
|
|
1104
|
+
instance: IPlugin;
|
|
1105
|
+
canvas: IRenderer;
|
|
698
1106
|
}[];
|
|
699
|
-
|
|
700
|
-
type
|
|
701
|
-
type
|
|
702
|
-
type
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
type
|
|
719
|
-
type
|
|
720
|
-
type
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
type
|
|
794
|
-
declare const
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
1107
|
+
export type InputFormatType = "XMLDocument" | "niconicome" | "formatted" | "legacy" | "legacyOwner" | "owner" | "v1" | "empty" | "default";
|
|
1108
|
+
export type InputFormat = XMLDocument | FormattedComment[] | FormattedLegacyComment[] | RawApiResponse[] | OwnerComment[] | V1Thread[] | string | undefined;
|
|
1109
|
+
export type ModeType = "default" | "html5" | "flash";
|
|
1110
|
+
export type BaseOptions = {
|
|
1111
|
+
config: Config;
|
|
1112
|
+
debug: boolean;
|
|
1113
|
+
enableLegacyPiP: boolean;
|
|
1114
|
+
format: InputFormatType;
|
|
1115
|
+
formatted: boolean;
|
|
1116
|
+
keepCA: boolean;
|
|
1117
|
+
mode: ModeType;
|
|
1118
|
+
scale: number;
|
|
1119
|
+
showCollision: boolean;
|
|
1120
|
+
showCommentCount: boolean;
|
|
1121
|
+
showFPS: boolean;
|
|
1122
|
+
useLegacy: boolean;
|
|
1123
|
+
video: HTMLVideoElement | undefined;
|
|
1124
|
+
};
|
|
1125
|
+
export type Options = Partial<BaseOptions>;
|
|
1126
|
+
export type inputFormatType = InputFormatType;
|
|
1127
|
+
export type inputFormat = InputFormat;
|
|
1128
|
+
export type FormattedCommentWithFont = {
|
|
1129
|
+
id: number;
|
|
1130
|
+
vpos: number;
|
|
1131
|
+
date: number;
|
|
1132
|
+
date_usec: number;
|
|
1133
|
+
owner: boolean;
|
|
1134
|
+
premium: boolean;
|
|
1135
|
+
mail: string[];
|
|
1136
|
+
user_id: number;
|
|
1137
|
+
layer: number;
|
|
1138
|
+
loc: CommentLoc;
|
|
1139
|
+
size: CommentSize;
|
|
1140
|
+
fontSize: number;
|
|
1141
|
+
font: CommentFont;
|
|
1142
|
+
color: string;
|
|
1143
|
+
strokeColor?: string;
|
|
1144
|
+
wakuColor?: string;
|
|
1145
|
+
fillColor?: string;
|
|
1146
|
+
full: boolean;
|
|
1147
|
+
ender: boolean;
|
|
1148
|
+
_live: boolean;
|
|
1149
|
+
long: number;
|
|
1150
|
+
invisible: boolean;
|
|
1151
|
+
content: CommentContentItem[];
|
|
1152
|
+
rawContent: string;
|
|
1153
|
+
flash: boolean;
|
|
1154
|
+
lineCount: number;
|
|
1155
|
+
lineOffset: number;
|
|
1156
|
+
is_my_post: boolean;
|
|
1157
|
+
button?: ButtonParams;
|
|
1158
|
+
};
|
|
1159
|
+
export type FormattedCommentWithSize = FormattedCommentWithFont & {
|
|
1160
|
+
height: number;
|
|
1161
|
+
width: number;
|
|
1162
|
+
lineHeight: number;
|
|
1163
|
+
resized: boolean;
|
|
1164
|
+
resizedX: boolean;
|
|
1165
|
+
resizedY: boolean;
|
|
1166
|
+
content: CommentMeasuredContentItem[];
|
|
1167
|
+
charSize: number;
|
|
1168
|
+
scale: number;
|
|
1169
|
+
scaleX: number;
|
|
1170
|
+
buttonObjects?: ButtonList;
|
|
1171
|
+
};
|
|
1172
|
+
export type ParseContentResult = {
|
|
1173
|
+
content: CommentContentItem[];
|
|
1174
|
+
lineCount: number;
|
|
1175
|
+
lineOffset: number;
|
|
1176
|
+
};
|
|
1177
|
+
export type ParseCommandAndNicoScriptResult = {
|
|
1178
|
+
flash: boolean;
|
|
1179
|
+
loc: CommentLoc;
|
|
1180
|
+
size: CommentSize;
|
|
1181
|
+
fontSize: number;
|
|
1182
|
+
color: string;
|
|
1183
|
+
strokeColor?: string;
|
|
1184
|
+
wakuColor?: string;
|
|
1185
|
+
fillColor?: string;
|
|
1186
|
+
font: CommentFont;
|
|
1187
|
+
full: boolean;
|
|
1188
|
+
ender: boolean;
|
|
1189
|
+
_live: boolean;
|
|
1190
|
+
invisible: boolean;
|
|
1191
|
+
long: number;
|
|
1192
|
+
button?: ButtonParams;
|
|
1193
|
+
};
|
|
1194
|
+
export declare const ZCommentFont: UnionSchema<[
|
|
1195
|
+
LiteralSchema<"defont", "defont">,
|
|
1196
|
+
LiteralSchema<"mincho", "mincho">,
|
|
1197
|
+
LiteralSchema<"gothic", "gothic">,
|
|
1198
|
+
LiteralSchema<"gulim", "gulim">,
|
|
1199
|
+
LiteralSchema<"simsun", "simsun">
|
|
1200
|
+
], "defont" | "mincho" | "gothic" | "gulim" | "simsun">;
|
|
1201
|
+
export type CommentFont = Output<typeof ZCommentFont>;
|
|
1202
|
+
export declare const ZCommentHTML5Font: UnionSchema<[
|
|
1203
|
+
LiteralSchema<"defont", "defont">,
|
|
1204
|
+
LiteralSchema<"mincho", "mincho">,
|
|
1205
|
+
LiteralSchema<"gothic", "gothic">
|
|
1206
|
+
], "defont" | "mincho" | "gothic">;
|
|
1207
|
+
export type CommentHTML5Font = Output<typeof ZCommentHTML5Font>;
|
|
1208
|
+
export declare const ZCommentFlashFont: UnionSchema<[
|
|
1209
|
+
LiteralSchema<"defont", "defont">,
|
|
1210
|
+
LiteralSchema<"gulim", "gulim">,
|
|
1211
|
+
LiteralSchema<"simsun", "simsun">
|
|
1212
|
+
], "defont" | "gulim" | "simsun">;
|
|
1213
|
+
export type CommentFlashFont = Output<typeof ZCommentFlashFont>;
|
|
1214
|
+
export declare const ZCommentContentItemSpacer: ObjectSchema<{
|
|
1215
|
+
type: LiteralSchema<"spacer", "spacer">;
|
|
1216
|
+
char: StringSchema<string>;
|
|
1217
|
+
charWidth: NumberSchema<number>;
|
|
1218
|
+
isButton: OptionalSchema<BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
1219
|
+
font: OptionalSchema<UnionSchema<[
|
|
1220
|
+
LiteralSchema<"defont", "defont">,
|
|
1221
|
+
LiteralSchema<"gulim", "gulim">,
|
|
1222
|
+
LiteralSchema<"simsun", "simsun">
|
|
1223
|
+
], "defont" | "gulim" | "simsun">, undefined, "defont" | "gulim" | "simsun" | undefined>;
|
|
1224
|
+
count: NumberSchema<number>;
|
|
801
1225
|
}, undefined, {
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
1226
|
+
type: "spacer";
|
|
1227
|
+
char: string;
|
|
1228
|
+
charWidth: number;
|
|
1229
|
+
count: number;
|
|
1230
|
+
isButton?: boolean | undefined;
|
|
1231
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
808
1232
|
}>;
|
|
809
|
-
declare const ZCommentContentItemText:
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
1233
|
+
export declare const ZCommentContentItemText: ObjectSchema<{
|
|
1234
|
+
type: LiteralSchema<"text", "text">;
|
|
1235
|
+
content: StringSchema<string>;
|
|
1236
|
+
slicedContent: ArraySchema<StringSchema<string>, string[]>;
|
|
1237
|
+
isButton: OptionalSchema<BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
1238
|
+
font: OptionalSchema<UnionSchema<[
|
|
1239
|
+
LiteralSchema<"defont", "defont">,
|
|
1240
|
+
LiteralSchema<"gulim", "gulim">,
|
|
1241
|
+
LiteralSchema<"simsun", "simsun">
|
|
1242
|
+
], "defont" | "gulim" | "simsun">, undefined, "defont" | "gulim" | "simsun" | undefined>;
|
|
1243
|
+
width: OptionalSchema<ArraySchema<NumberSchema<number>, number[]>, undefined, number[] | undefined>;
|
|
816
1244
|
}, undefined, {
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
1245
|
+
type: "text";
|
|
1246
|
+
content: string;
|
|
1247
|
+
slicedContent: string[];
|
|
1248
|
+
isButton?: boolean | undefined;
|
|
1249
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1250
|
+
width?: number[] | undefined;
|
|
823
1251
|
}>;
|
|
824
|
-
type CommentContentItemText = Output<typeof ZCommentContentItemText>;
|
|
825
|
-
declare const ZCommentContentItem:
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
1252
|
+
export type CommentContentItemText = Output<typeof ZCommentContentItemText>;
|
|
1253
|
+
export declare const ZCommentContentItem: UnionSchema<[
|
|
1254
|
+
ObjectSchema<{
|
|
1255
|
+
type: LiteralSchema<"spacer", "spacer">;
|
|
1256
|
+
char: StringSchema<string>;
|
|
1257
|
+
charWidth: NumberSchema<number>;
|
|
1258
|
+
isButton: OptionalSchema<BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
1259
|
+
font: OptionalSchema<UnionSchema<[
|
|
1260
|
+
LiteralSchema<"defont", "defont">,
|
|
1261
|
+
LiteralSchema<"gulim", "gulim">,
|
|
1262
|
+
LiteralSchema<"simsun", "simsun">
|
|
1263
|
+
], "defont" | "gulim" | "simsun">, undefined, "defont" | "gulim" | "simsun" | undefined>;
|
|
1264
|
+
count: NumberSchema<number>;
|
|
1265
|
+
}, undefined, {
|
|
1266
|
+
type: "spacer";
|
|
1267
|
+
char: string;
|
|
1268
|
+
charWidth: number;
|
|
1269
|
+
count: number;
|
|
1270
|
+
isButton?: boolean | undefined;
|
|
1271
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1272
|
+
}>,
|
|
1273
|
+
ObjectSchema<{
|
|
1274
|
+
type: LiteralSchema<"text", "text">;
|
|
1275
|
+
content: StringSchema<string>;
|
|
1276
|
+
slicedContent: ArraySchema<StringSchema<string>, string[]>;
|
|
1277
|
+
isButton: OptionalSchema<BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
1278
|
+
font: OptionalSchema<UnionSchema<[
|
|
1279
|
+
LiteralSchema<"defont", "defont">,
|
|
1280
|
+
LiteralSchema<"gulim", "gulim">,
|
|
1281
|
+
LiteralSchema<"simsun", "simsun">
|
|
1282
|
+
], "defont" | "gulim" | "simsun">, undefined, "defont" | "gulim" | "simsun" | undefined>;
|
|
1283
|
+
width: OptionalSchema<ArraySchema<NumberSchema<number>, number[]>, undefined, number[] | undefined>;
|
|
1284
|
+
}, undefined, {
|
|
1285
|
+
type: "text";
|
|
1286
|
+
content: string;
|
|
1287
|
+
slicedContent: string[];
|
|
1288
|
+
isButton?: boolean | undefined;
|
|
1289
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1290
|
+
width?: number[] | undefined;
|
|
1291
|
+
}>
|
|
1292
|
+
], {
|
|
1293
|
+
type: "spacer";
|
|
1294
|
+
char: string;
|
|
1295
|
+
charWidth: number;
|
|
1296
|
+
count: number;
|
|
1297
|
+
isButton?: boolean | undefined;
|
|
1298
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
860
1299
|
} | {
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
1300
|
+
type: "text";
|
|
1301
|
+
content: string;
|
|
1302
|
+
slicedContent: string[];
|
|
1303
|
+
isButton?: boolean | undefined;
|
|
1304
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1305
|
+
width?: number[] | undefined;
|
|
867
1306
|
}>;
|
|
868
|
-
type CommentContentItem = Output<typeof ZCommentContentItem>;
|
|
869
|
-
declare const ZCommentMeasuredContentItemText:
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
1307
|
+
export type CommentContentItem = Output<typeof ZCommentContentItem>;
|
|
1308
|
+
export declare const ZCommentMeasuredContentItemText: IntersectSchema<[
|
|
1309
|
+
UnionSchema<[
|
|
1310
|
+
ObjectSchema<{
|
|
1311
|
+
type: LiteralSchema<"spacer", "spacer">;
|
|
1312
|
+
char: StringSchema<string>;
|
|
1313
|
+
charWidth: NumberSchema<number>;
|
|
1314
|
+
isButton: OptionalSchema<BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
1315
|
+
font: OptionalSchema<UnionSchema<[
|
|
1316
|
+
LiteralSchema<"defont", "defont">,
|
|
1317
|
+
LiteralSchema<"gulim", "gulim">,
|
|
1318
|
+
LiteralSchema<"simsun", "simsun">
|
|
1319
|
+
], "defont" | "gulim" | "simsun">, undefined, "defont" | "gulim" | "simsun" | undefined>;
|
|
1320
|
+
count: NumberSchema<number>;
|
|
1321
|
+
}, undefined, {
|
|
1322
|
+
type: "spacer";
|
|
1323
|
+
char: string;
|
|
1324
|
+
charWidth: number;
|
|
1325
|
+
count: number;
|
|
1326
|
+
isButton?: boolean | undefined;
|
|
1327
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1328
|
+
}>,
|
|
1329
|
+
ObjectSchema<{
|
|
1330
|
+
type: LiteralSchema<"text", "text">;
|
|
1331
|
+
content: StringSchema<string>;
|
|
1332
|
+
slicedContent: ArraySchema<StringSchema<string>, string[]>;
|
|
1333
|
+
isButton: OptionalSchema<BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
1334
|
+
font: OptionalSchema<UnionSchema<[
|
|
1335
|
+
LiteralSchema<"defont", "defont">,
|
|
1336
|
+
LiteralSchema<"gulim", "gulim">,
|
|
1337
|
+
LiteralSchema<"simsun", "simsun">
|
|
1338
|
+
], "defont" | "gulim" | "simsun">, undefined, "defont" | "gulim" | "simsun" | undefined>;
|
|
1339
|
+
width: OptionalSchema<ArraySchema<NumberSchema<number>, number[]>, undefined, number[] | undefined>;
|
|
1340
|
+
}, undefined, {
|
|
1341
|
+
type: "text";
|
|
1342
|
+
content: string;
|
|
1343
|
+
slicedContent: string[];
|
|
1344
|
+
isButton?: boolean | undefined;
|
|
1345
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1346
|
+
width?: number[] | undefined;
|
|
1347
|
+
}>
|
|
1348
|
+
], {
|
|
1349
|
+
type: "spacer";
|
|
1350
|
+
char: string;
|
|
1351
|
+
charWidth: number;
|
|
1352
|
+
count: number;
|
|
1353
|
+
isButton?: boolean | undefined;
|
|
1354
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1355
|
+
} | {
|
|
1356
|
+
type: "text";
|
|
1357
|
+
content: string;
|
|
1358
|
+
slicedContent: string[];
|
|
1359
|
+
isButton?: boolean | undefined;
|
|
1360
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1361
|
+
width?: number[] | undefined;
|
|
1362
|
+
}>,
|
|
1363
|
+
ObjectSchema<{
|
|
1364
|
+
width: ArraySchema<NumberSchema<number>, number[]>;
|
|
1365
|
+
}, undefined, {
|
|
1366
|
+
width: number[];
|
|
1367
|
+
}>
|
|
1368
|
+
], ({
|
|
1369
|
+
type: "spacer";
|
|
1370
|
+
char: string;
|
|
1371
|
+
charWidth: number;
|
|
1372
|
+
count: number;
|
|
1373
|
+
isButton?: boolean | undefined;
|
|
1374
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
922
1375
|
} | {
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
1376
|
+
type: "text";
|
|
1377
|
+
content: string;
|
|
1378
|
+
slicedContent: string[];
|
|
1379
|
+
isButton?: boolean | undefined;
|
|
1380
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1381
|
+
width?: number[] | undefined;
|
|
929
1382
|
}) & {
|
|
930
|
-
|
|
1383
|
+
width: number[];
|
|
931
1384
|
}>;
|
|
932
|
-
declare const ZCommentMeasuredContentItem:
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1385
|
+
export declare const ZCommentMeasuredContentItem: UnionSchema<[
|
|
1386
|
+
IntersectSchema<[
|
|
1387
|
+
UnionSchema<[
|
|
1388
|
+
ObjectSchema<{
|
|
1389
|
+
type: LiteralSchema<"spacer", "spacer">;
|
|
1390
|
+
char: StringSchema<string>;
|
|
1391
|
+
charWidth: NumberSchema<number>;
|
|
1392
|
+
isButton: OptionalSchema<BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
1393
|
+
font: OptionalSchema<UnionSchema<[
|
|
1394
|
+
LiteralSchema<"defont", "defont">,
|
|
1395
|
+
LiteralSchema<"gulim", "gulim">,
|
|
1396
|
+
LiteralSchema<"simsun", "simsun">
|
|
1397
|
+
], "defont" | "gulim" | "simsun">, undefined, "defont" | "gulim" | "simsun" | undefined>;
|
|
1398
|
+
count: NumberSchema<number>;
|
|
1399
|
+
}, undefined, {
|
|
1400
|
+
type: "spacer";
|
|
1401
|
+
char: string;
|
|
1402
|
+
charWidth: number;
|
|
1403
|
+
count: number;
|
|
1404
|
+
isButton?: boolean | undefined;
|
|
1405
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1406
|
+
}>,
|
|
1407
|
+
ObjectSchema<{
|
|
1408
|
+
type: LiteralSchema<"text", "text">;
|
|
1409
|
+
content: StringSchema<string>;
|
|
1410
|
+
slicedContent: ArraySchema<StringSchema<string>, string[]>;
|
|
1411
|
+
isButton: OptionalSchema<BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
1412
|
+
font: OptionalSchema<UnionSchema<[
|
|
1413
|
+
LiteralSchema<"defont", "defont">,
|
|
1414
|
+
LiteralSchema<"gulim", "gulim">,
|
|
1415
|
+
LiteralSchema<"simsun", "simsun">
|
|
1416
|
+
], "defont" | "gulim" | "simsun">, undefined, "defont" | "gulim" | "simsun" | undefined>;
|
|
1417
|
+
width: OptionalSchema<ArraySchema<NumberSchema<number>, number[]>, undefined, number[] | undefined>;
|
|
1418
|
+
}, undefined, {
|
|
1419
|
+
type: "text";
|
|
1420
|
+
content: string;
|
|
1421
|
+
slicedContent: string[];
|
|
1422
|
+
isButton?: boolean | undefined;
|
|
1423
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1424
|
+
width?: number[] | undefined;
|
|
1425
|
+
}>
|
|
1426
|
+
], {
|
|
1427
|
+
type: "spacer";
|
|
1428
|
+
char: string;
|
|
1429
|
+
charWidth: number;
|
|
1430
|
+
count: number;
|
|
1431
|
+
isButton?: boolean | undefined;
|
|
1432
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1433
|
+
} | {
|
|
1434
|
+
type: "text";
|
|
1435
|
+
content: string;
|
|
1436
|
+
slicedContent: string[];
|
|
1437
|
+
isButton?: boolean | undefined;
|
|
1438
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1439
|
+
width?: number[] | undefined;
|
|
1440
|
+
}>,
|
|
1441
|
+
ObjectSchema<{
|
|
1442
|
+
width: ArraySchema<NumberSchema<number>, number[]>;
|
|
1443
|
+
}, undefined, {
|
|
1444
|
+
width: number[];
|
|
1445
|
+
}>
|
|
1446
|
+
], ({
|
|
1447
|
+
type: "spacer";
|
|
1448
|
+
char: string;
|
|
1449
|
+
charWidth: number;
|
|
1450
|
+
count: number;
|
|
1451
|
+
isButton?: boolean | undefined;
|
|
1452
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1453
|
+
} | {
|
|
1454
|
+
type: "text";
|
|
1455
|
+
content: string;
|
|
1456
|
+
slicedContent: string[];
|
|
1457
|
+
isButton?: boolean | undefined;
|
|
1458
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1459
|
+
width?: number[] | undefined;
|
|
1460
|
+
}) & {
|
|
1461
|
+
width: number[];
|
|
1462
|
+
}>,
|
|
1463
|
+
ObjectSchema<{
|
|
1464
|
+
type: LiteralSchema<"spacer", "spacer">;
|
|
1465
|
+
char: StringSchema<string>;
|
|
1466
|
+
charWidth: NumberSchema<number>;
|
|
1467
|
+
isButton: OptionalSchema<BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
1468
|
+
font: OptionalSchema<UnionSchema<[
|
|
1469
|
+
LiteralSchema<"defont", "defont">,
|
|
1470
|
+
LiteralSchema<"gulim", "gulim">,
|
|
1471
|
+
LiteralSchema<"simsun", "simsun">
|
|
1472
|
+
], "defont" | "gulim" | "simsun">, undefined, "defont" | "gulim" | "simsun" | undefined>;
|
|
1473
|
+
count: NumberSchema<number>;
|
|
1474
|
+
}, undefined, {
|
|
1475
|
+
type: "spacer";
|
|
1476
|
+
char: string;
|
|
1477
|
+
charWidth: number;
|
|
1478
|
+
count: number;
|
|
1479
|
+
isButton?: boolean | undefined;
|
|
1480
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1481
|
+
}>
|
|
1482
|
+
], {
|
|
1483
|
+
type: "spacer";
|
|
1484
|
+
char: string;
|
|
1485
|
+
charWidth: number;
|
|
1486
|
+
count: number;
|
|
1487
|
+
isButton?: boolean | undefined;
|
|
1488
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1015
1489
|
} | (({
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1490
|
+
type: "spacer";
|
|
1491
|
+
char: string;
|
|
1492
|
+
charWidth: number;
|
|
1493
|
+
count: number;
|
|
1494
|
+
isButton?: boolean | undefined;
|
|
1495
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1022
1496
|
} | {
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1497
|
+
type: "text";
|
|
1498
|
+
content: string;
|
|
1499
|
+
slicedContent: string[];
|
|
1500
|
+
isButton?: boolean | undefined;
|
|
1501
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1502
|
+
width?: number[] | undefined;
|
|
1029
1503
|
}) & {
|
|
1030
|
-
|
|
1504
|
+
width: number[];
|
|
1031
1505
|
})>;
|
|
1032
|
-
type CommentMeasuredContentItem = Output<typeof ZCommentMeasuredContentItem>;
|
|
1033
|
-
type CommentFlashFontParsed = "gothic" | "gulim" | "simsunStrong" | "simsunWeak";
|
|
1034
|
-
type CommentContentIndex = {
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
};
|
|
1038
|
-
declare const ZCommentSize:
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
type
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
};
|
|
1060
|
-
type
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
};
|
|
1105
|
-
type
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
};
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1506
|
+
export type CommentMeasuredContentItem = Output<typeof ZCommentMeasuredContentItem>;
|
|
1507
|
+
export type CommentFlashFontParsed = "gothic" | "gulim" | "simsunStrong" | "simsunWeak";
|
|
1508
|
+
export type CommentContentIndex = {
|
|
1509
|
+
index: number;
|
|
1510
|
+
font: CommentFlashFontParsed;
|
|
1511
|
+
};
|
|
1512
|
+
export declare const ZCommentSize: UnionSchema<[
|
|
1513
|
+
LiteralSchema<"big", "big">,
|
|
1514
|
+
LiteralSchema<"medium", "medium">,
|
|
1515
|
+
LiteralSchema<"small", "small">
|
|
1516
|
+
], "big" | "medium" | "small">;
|
|
1517
|
+
export type CommentSize = Output<typeof ZCommentSize>;
|
|
1518
|
+
export declare const ZCommentLoc: UnionSchema<[
|
|
1519
|
+
LiteralSchema<"ue", "ue">,
|
|
1520
|
+
LiteralSchema<"naka", "naka">,
|
|
1521
|
+
LiteralSchema<"shita", "shita">
|
|
1522
|
+
], "ue" | "naka" | "shita">;
|
|
1523
|
+
export type CommentLoc = Output<typeof ZCommentLoc>;
|
|
1524
|
+
export type Collision = {
|
|
1525
|
+
[key in CollisionPos]: CollisionItem;
|
|
1526
|
+
};
|
|
1527
|
+
export type Timeline = {
|
|
1528
|
+
[key: number]: IComment[];
|
|
1529
|
+
};
|
|
1530
|
+
export type CollisionPos = "ue" | "shita" | "right" | "left";
|
|
1531
|
+
export type CollisionItem = {
|
|
1532
|
+
[p: number]: IComment[];
|
|
1533
|
+
};
|
|
1534
|
+
export type NicoScript = {
|
|
1535
|
+
reverse: NicoScriptReverse[];
|
|
1536
|
+
ban: NicoScriptBan[];
|
|
1537
|
+
default: NicoScriptDefault[];
|
|
1538
|
+
replace: NicoScriptReplace[];
|
|
1539
|
+
seekDisable: NicoScriptSeekDisable[];
|
|
1540
|
+
jump: NicoScriptJump[];
|
|
1541
|
+
};
|
|
1542
|
+
export type NicoScriptSeekDisable = {
|
|
1543
|
+
start: number;
|
|
1544
|
+
end: number;
|
|
1545
|
+
};
|
|
1546
|
+
export type NicoScriptJump = {
|
|
1547
|
+
start: number;
|
|
1548
|
+
end?: number;
|
|
1549
|
+
to: string;
|
|
1550
|
+
message?: string;
|
|
1551
|
+
};
|
|
1552
|
+
export type NicoScriptReverse = {
|
|
1553
|
+
target: NicoScriptReverseTarget;
|
|
1554
|
+
start: number;
|
|
1555
|
+
end: number;
|
|
1556
|
+
};
|
|
1557
|
+
export type NicoScriptReverseTarget = "\u30B3\u30E1" | "\u6295\u30B3\u30E1" | "\u5168";
|
|
1558
|
+
export type NicoScriptReplace = {
|
|
1559
|
+
start: number;
|
|
1560
|
+
long: number | undefined;
|
|
1561
|
+
keyword: string;
|
|
1562
|
+
replace: string;
|
|
1563
|
+
range: NicoScriptReplaceRange;
|
|
1564
|
+
target: NicoScriptReplaceTarget;
|
|
1565
|
+
condition: NicoScriptReplaceCondition;
|
|
1566
|
+
color: string | undefined;
|
|
1567
|
+
size: CommentSize | undefined;
|
|
1568
|
+
font: CommentFont | undefined;
|
|
1569
|
+
loc: CommentLoc | undefined;
|
|
1570
|
+
no: number;
|
|
1571
|
+
};
|
|
1572
|
+
export type NicoScriptReplaceRange = "\u5358" | "\u5168";
|
|
1573
|
+
export type NicoScriptReplaceTarget = "\u30B3\u30E1" | "\u6295\u30B3\u30E1" | "\u5168" | "\u542B\u307E\u306A\u3044" | "\u542B\u3080";
|
|
1574
|
+
export type NicoScriptReplaceCondition = "\u5B8C\u5168\u4E00\u81F4" | "\u90E8\u5206\u4E00\u81F4";
|
|
1575
|
+
export type NicoScriptBan = {
|
|
1576
|
+
start: number;
|
|
1577
|
+
end: number;
|
|
1578
|
+
};
|
|
1579
|
+
export type NicoScriptDefault = {
|
|
1580
|
+
start: number;
|
|
1581
|
+
long: number | undefined;
|
|
1582
|
+
color: string | undefined;
|
|
1583
|
+
size: CommentSize | undefined;
|
|
1584
|
+
font: CommentFont | undefined;
|
|
1585
|
+
loc: CommentLoc | undefined;
|
|
1586
|
+
};
|
|
1587
|
+
export type MeasureTextResult = {
|
|
1588
|
+
width: number;
|
|
1589
|
+
height: number;
|
|
1590
|
+
resized: boolean;
|
|
1591
|
+
resizedX: boolean;
|
|
1592
|
+
resizedY: boolean;
|
|
1593
|
+
fontSize: number;
|
|
1594
|
+
lineHeight: number;
|
|
1595
|
+
content: CommentMeasuredContentItem[];
|
|
1596
|
+
charSize: number;
|
|
1597
|
+
scaleX: number;
|
|
1598
|
+
scale: number;
|
|
1599
|
+
};
|
|
1600
|
+
export type ButtonParams = {
|
|
1601
|
+
message: {
|
|
1602
|
+
before: string;
|
|
1603
|
+
body: string;
|
|
1604
|
+
after: string;
|
|
1605
|
+
};
|
|
1606
|
+
commentMessage: string;
|
|
1607
|
+
commentMail: string[];
|
|
1608
|
+
commentVisible: boolean;
|
|
1609
|
+
limit: number;
|
|
1610
|
+
local: boolean;
|
|
1611
|
+
hidden: boolean;
|
|
1612
|
+
};
|
|
1613
|
+
export type ParsedCommand = {
|
|
1614
|
+
loc: CommentLoc | undefined;
|
|
1615
|
+
size: CommentSize | undefined;
|
|
1616
|
+
fontSize: number | undefined;
|
|
1617
|
+
color: string | undefined;
|
|
1618
|
+
strokeColor?: string;
|
|
1619
|
+
wakuColor?: string;
|
|
1620
|
+
fillColor?: string;
|
|
1621
|
+
font: CommentFont | undefined;
|
|
1622
|
+
full: boolean;
|
|
1623
|
+
ender: boolean;
|
|
1624
|
+
_live: boolean;
|
|
1625
|
+
invisible: boolean;
|
|
1626
|
+
long: number | undefined;
|
|
1627
|
+
button?: ButtonParams;
|
|
1628
|
+
};
|
|
1629
|
+
export type MeasureTextInput = FormattedCommentWithFont & {
|
|
1630
|
+
resized?: boolean;
|
|
1631
|
+
resizedY?: boolean;
|
|
1632
|
+
resizedX?: boolean;
|
|
1633
|
+
lineHeight?: number;
|
|
1634
|
+
charSize?: number;
|
|
1635
|
+
scale: number;
|
|
1636
|
+
};
|
|
1637
|
+
export declare const ZMeasureInput: ObjectSchema<{
|
|
1638
|
+
font: UnionSchema<[
|
|
1639
|
+
LiteralSchema<"defont", "defont">,
|
|
1640
|
+
LiteralSchema<"mincho", "mincho">,
|
|
1641
|
+
LiteralSchema<"gothic", "gothic">,
|
|
1642
|
+
LiteralSchema<"gulim", "gulim">,
|
|
1643
|
+
LiteralSchema<"simsun", "simsun">
|
|
1644
|
+
], "defont" | "mincho" | "gothic" | "gulim" | "simsun">;
|
|
1645
|
+
content: ArraySchema<UnionSchema<[
|
|
1646
|
+
ObjectSchema<{
|
|
1647
|
+
type: LiteralSchema<"spacer", "spacer">;
|
|
1648
|
+
char: StringSchema<string>;
|
|
1649
|
+
charWidth: NumberSchema<number>;
|
|
1650
|
+
isButton: OptionalSchema<BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
1651
|
+
font: OptionalSchema<UnionSchema<[
|
|
1652
|
+
LiteralSchema<"defont", "defont">,
|
|
1653
|
+
LiteralSchema<"gulim", "gulim">,
|
|
1654
|
+
LiteralSchema<"simsun", "simsun">
|
|
1655
|
+
], "defont" | "gulim" | "simsun">, undefined, "defont" | "gulim" | "simsun" | undefined>;
|
|
1656
|
+
count: NumberSchema<number>;
|
|
1657
|
+
}, undefined, {
|
|
1658
|
+
type: "spacer";
|
|
1659
|
+
char: string;
|
|
1660
|
+
charWidth: number;
|
|
1661
|
+
count: number;
|
|
1662
|
+
isButton?: boolean | undefined;
|
|
1663
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1664
|
+
}>,
|
|
1665
|
+
ObjectSchema<{
|
|
1666
|
+
type: LiteralSchema<"text", "text">;
|
|
1667
|
+
content: StringSchema<string>;
|
|
1668
|
+
slicedContent: ArraySchema<StringSchema<string>, string[]>;
|
|
1669
|
+
isButton: OptionalSchema<BooleanSchema<boolean>, undefined, boolean | undefined>;
|
|
1670
|
+
font: OptionalSchema<UnionSchema<[
|
|
1671
|
+
LiteralSchema<"defont", "defont">,
|
|
1672
|
+
LiteralSchema<"gulim", "gulim">,
|
|
1673
|
+
LiteralSchema<"simsun", "simsun">
|
|
1674
|
+
], "defont" | "gulim" | "simsun">, undefined, "defont" | "gulim" | "simsun" | undefined>;
|
|
1675
|
+
width: OptionalSchema<ArraySchema<NumberSchema<number>, number[]>, undefined, number[] | undefined>;
|
|
1676
|
+
}, undefined, {
|
|
1677
|
+
type: "text";
|
|
1678
|
+
content: string;
|
|
1679
|
+
slicedContent: string[];
|
|
1680
|
+
isButton?: boolean | undefined;
|
|
1681
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1682
|
+
width?: number[] | undefined;
|
|
1683
|
+
}>
|
|
1684
|
+
], {
|
|
1685
|
+
type: "spacer";
|
|
1686
|
+
char: string;
|
|
1687
|
+
charWidth: number;
|
|
1688
|
+
count: number;
|
|
1689
|
+
isButton?: boolean | undefined;
|
|
1690
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1691
|
+
} | {
|
|
1692
|
+
type: "text";
|
|
1693
|
+
content: string;
|
|
1694
|
+
slicedContent: string[];
|
|
1695
|
+
isButton?: boolean | undefined;
|
|
1696
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1697
|
+
width?: number[] | undefined;
|
|
1698
|
+
}>, ({
|
|
1699
|
+
type: "spacer";
|
|
1700
|
+
char: string;
|
|
1701
|
+
charWidth: number;
|
|
1702
|
+
count: number;
|
|
1703
|
+
isButton?: boolean | undefined;
|
|
1704
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1705
|
+
} | {
|
|
1706
|
+
type: "text";
|
|
1707
|
+
content: string;
|
|
1708
|
+
slicedContent: string[];
|
|
1709
|
+
isButton?: boolean | undefined;
|
|
1710
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1711
|
+
width?: number[] | undefined;
|
|
1712
|
+
})[]>;
|
|
1713
|
+
lineHeight: NumberSchema<number>;
|
|
1714
|
+
charSize: NumberSchema<number>;
|
|
1715
|
+
lineCount: NumberSchema<number>;
|
|
1217
1716
|
}, undefined, {
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1717
|
+
lineHeight: number;
|
|
1718
|
+
font: "defont" | "mincho" | "gothic" | "gulim" | "simsun";
|
|
1719
|
+
content: ({
|
|
1720
|
+
type: "spacer";
|
|
1721
|
+
char: string;
|
|
1722
|
+
charWidth: number;
|
|
1723
|
+
count: number;
|
|
1724
|
+
isButton?: boolean | undefined;
|
|
1725
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1726
|
+
} | {
|
|
1727
|
+
type: "text";
|
|
1728
|
+
content: string;
|
|
1729
|
+
slicedContent: string[];
|
|
1730
|
+
isButton?: boolean | undefined;
|
|
1731
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1732
|
+
width?: number[] | undefined;
|
|
1733
|
+
})[];
|
|
1734
|
+
charSize: number;
|
|
1735
|
+
lineCount: number;
|
|
1237
1736
|
}>;
|
|
1238
|
-
type MeasureInput = Output<typeof ZMeasureInput>;
|
|
1239
|
-
type ValueOf<T> = T[keyof T];
|
|
1240
|
-
|
|
1737
|
+
export type MeasureInput = Output<typeof ZMeasureInput>;
|
|
1738
|
+
export type ValueOf<T> = T[keyof T];
|
|
1241
1739
|
declare let imageCache: {
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1740
|
+
[key: string]: {
|
|
1741
|
+
image: IRenderer;
|
|
1742
|
+
timeout: number | NodeJS.Timeout;
|
|
1743
|
+
};
|
|
1246
1744
|
};
|
|
1247
1745
|
declare const resetImageCache: () => void;
|
|
1248
|
-
|
|
1249
1746
|
declare let nicoScripts: NicoScript;
|
|
1250
1747
|
declare const resetNicoScripts: () => void;
|
|
1251
|
-
|
|
1252
1748
|
declare let plugins: IPluginList;
|
|
1253
1749
|
declare const setPlugins: (input: IPluginList) => void;
|
|
1254
|
-
|
|
1255
1750
|
declare const index_d$3_imageCache: typeof imageCache;
|
|
1256
1751
|
declare const index_d$3_nicoScripts: typeof nicoScripts;
|
|
1257
1752
|
declare const index_d$3_plugins: typeof plugins;
|
|
@@ -1259,44 +1754,41 @@ declare const index_d$3_resetImageCache: typeof resetImageCache;
|
|
|
1259
1754
|
declare const index_d$3_resetNicoScripts: typeof resetNicoScripts;
|
|
1260
1755
|
declare const index_d$3_setPlugins: typeof setPlugins;
|
|
1261
1756
|
declare namespace index_d$3 {
|
|
1262
|
-
|
|
1757
|
+
export { index_d$3_imageCache as index_d$3_imageCache, index_d$3_nicoScripts as index_d$3_nicoScripts, index_d$3_plugins as index_d$3_plugins, index_d$3_resetImageCache as index_d$3_resetImageCache, index_d$3_resetNicoScripts as index_d$3_resetNicoScripts, index_d$3_setPlugins as index_d$3_setPlugins };
|
|
1263
1758
|
}
|
|
1264
|
-
|
|
1265
1759
|
declare const colors: {
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1760
|
+
white: string;
|
|
1761
|
+
red: string;
|
|
1762
|
+
pink: string;
|
|
1763
|
+
orange: string;
|
|
1764
|
+
yellow: string;
|
|
1765
|
+
green: string;
|
|
1766
|
+
cyan: string;
|
|
1767
|
+
blue: string;
|
|
1768
|
+
purple: string;
|
|
1769
|
+
black: string;
|
|
1770
|
+
white2: string;
|
|
1771
|
+
niconicowhite: string;
|
|
1772
|
+
red2: string;
|
|
1773
|
+
truered: string;
|
|
1774
|
+
pink2: string;
|
|
1775
|
+
orange2: string;
|
|
1776
|
+
passionorange: string;
|
|
1777
|
+
yellow2: string;
|
|
1778
|
+
madyellow: string;
|
|
1779
|
+
green2: string;
|
|
1780
|
+
elementalgreen: string;
|
|
1781
|
+
cyan2: string;
|
|
1782
|
+
blue2: string;
|
|
1783
|
+
marinblue: string;
|
|
1784
|
+
purple2: string;
|
|
1785
|
+
nobleviolet: string;
|
|
1786
|
+
black2: string;
|
|
1293
1787
|
};
|
|
1294
|
-
|
|
1295
1788
|
declare const colors$1_colors: typeof colors;
|
|
1296
1789
|
declare namespace colors$1 {
|
|
1297
|
-
|
|
1790
|
+
export { colors$1_colors as colors$1_colors };
|
|
1298
1791
|
}
|
|
1299
|
-
|
|
1300
1792
|
declare let defaultConfig: BaseConfig;
|
|
1301
1793
|
declare const updateConfig: (config: BaseConfig) => void;
|
|
1302
1794
|
declare const defaultOptions: BaseOptions;
|
|
@@ -1304,7 +1796,6 @@ declare let config: BaseConfig;
|
|
|
1304
1796
|
declare let options: BaseOptions;
|
|
1305
1797
|
declare const setConfig: (value: BaseConfig) => void;
|
|
1306
1798
|
declare const setOptions: (value: BaseOptions) => void;
|
|
1307
|
-
|
|
1308
1799
|
declare const config$1_config: typeof config;
|
|
1309
1800
|
declare const config$1_defaultConfig: typeof defaultConfig;
|
|
1310
1801
|
declare const config$1_defaultOptions: typeof defaultOptions;
|
|
@@ -1313,314 +1804,507 @@ declare const config$1_setConfig: typeof setConfig;
|
|
|
1313
1804
|
declare const config$1_setOptions: typeof setOptions;
|
|
1314
1805
|
declare const config$1_updateConfig: typeof updateConfig;
|
|
1315
1806
|
declare namespace config$1 {
|
|
1316
|
-
|
|
1807
|
+
export { config$1_config as config$1_config, config$1_defaultConfig as config$1_defaultConfig, config$1_defaultOptions as config$1_defaultOptions, config$1_options as config$1_options, config$1_setConfig as config$1_setConfig, config$1_setOptions as config$1_setOptions, config$1_updateConfig as config$1_updateConfig };
|
|
1317
1808
|
}
|
|
1318
|
-
|
|
1319
1809
|
declare const fontTemplates: {
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1810
|
+
arial: {
|
|
1811
|
+
font: string;
|
|
1812
|
+
offset: number;
|
|
1813
|
+
weight: number;
|
|
1814
|
+
};
|
|
1815
|
+
gothic: {
|
|
1816
|
+
font: string;
|
|
1817
|
+
offset: number;
|
|
1818
|
+
weight: number;
|
|
1819
|
+
};
|
|
1820
|
+
gulim: {
|
|
1821
|
+
font: string;
|
|
1822
|
+
offset: number;
|
|
1823
|
+
weight: number;
|
|
1824
|
+
};
|
|
1825
|
+
mincho: {
|
|
1826
|
+
font: string;
|
|
1827
|
+
offset: number;
|
|
1828
|
+
weight: number;
|
|
1829
|
+
};
|
|
1830
|
+
simsun: {
|
|
1831
|
+
font: string;
|
|
1832
|
+
offset: number;
|
|
1833
|
+
weight: number;
|
|
1834
|
+
};
|
|
1835
|
+
macGothicPro6: {
|
|
1836
|
+
font: string;
|
|
1837
|
+
offset: number;
|
|
1838
|
+
weight: number;
|
|
1839
|
+
};
|
|
1840
|
+
macGothicPro3: {
|
|
1841
|
+
font: string;
|
|
1842
|
+
offset: number;
|
|
1843
|
+
weight: number;
|
|
1844
|
+
};
|
|
1845
|
+
macMincho: {
|
|
1846
|
+
font: string;
|
|
1847
|
+
offset: number;
|
|
1848
|
+
weight: number;
|
|
1849
|
+
};
|
|
1850
|
+
macGothic1: {
|
|
1851
|
+
font: string;
|
|
1852
|
+
offset: number;
|
|
1853
|
+
weight: number;
|
|
1854
|
+
};
|
|
1855
|
+
macGothic2: {
|
|
1856
|
+
font: string;
|
|
1857
|
+
offset: number;
|
|
1858
|
+
weight: number;
|
|
1859
|
+
};
|
|
1860
|
+
sansSerif600: {
|
|
1861
|
+
font: string;
|
|
1862
|
+
offset: number;
|
|
1863
|
+
weight: number;
|
|
1864
|
+
};
|
|
1865
|
+
sansSerif400: {
|
|
1866
|
+
font: string;
|
|
1867
|
+
offset: number;
|
|
1868
|
+
weight: number;
|
|
1869
|
+
};
|
|
1870
|
+
serif: {
|
|
1871
|
+
font: string;
|
|
1872
|
+
offset: number;
|
|
1873
|
+
weight: number;
|
|
1874
|
+
};
|
|
1385
1875
|
};
|
|
1386
1876
|
declare const fonts: {
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1877
|
+
win7: {
|
|
1878
|
+
defont: FontItem;
|
|
1879
|
+
gothic: FontItem;
|
|
1880
|
+
mincho: FontItem;
|
|
1881
|
+
};
|
|
1882
|
+
win8_1: {
|
|
1883
|
+
defont: FontItem;
|
|
1884
|
+
gothic: FontItem;
|
|
1885
|
+
mincho: FontItem;
|
|
1886
|
+
};
|
|
1887
|
+
win: {
|
|
1888
|
+
defont: FontItem;
|
|
1889
|
+
gothic: FontItem;
|
|
1890
|
+
mincho: FontItem;
|
|
1891
|
+
};
|
|
1892
|
+
mac10_9: {
|
|
1893
|
+
defont: FontItem;
|
|
1894
|
+
gothic: FontItem;
|
|
1895
|
+
mincho: FontItem;
|
|
1896
|
+
};
|
|
1897
|
+
mac10_11: {
|
|
1898
|
+
defont: FontItem;
|
|
1899
|
+
gothic: FontItem;
|
|
1900
|
+
mincho: FontItem;
|
|
1901
|
+
};
|
|
1902
|
+
mac: {
|
|
1903
|
+
defont: FontItem;
|
|
1904
|
+
gothic: FontItem;
|
|
1905
|
+
mincho: FontItem;
|
|
1906
|
+
};
|
|
1907
|
+
other: {
|
|
1908
|
+
defont: FontItem;
|
|
1909
|
+
gothic: FontItem;
|
|
1910
|
+
mincho: FontItem;
|
|
1911
|
+
};
|
|
1422
1912
|
};
|
|
1423
|
-
|
|
1424
1913
|
declare const fonts$1_fontTemplates: typeof fontTemplates;
|
|
1425
1914
|
declare const fonts$1_fonts: typeof fonts;
|
|
1426
1915
|
declare namespace fonts$1 {
|
|
1427
|
-
|
|
1916
|
+
export { fonts$1_fontTemplates as fonts$1_fontTemplates, fonts$1_fonts as fonts$1_fonts };
|
|
1428
1917
|
}
|
|
1429
|
-
|
|
1430
1918
|
declare const initConfig: () => void;
|
|
1431
|
-
|
|
1432
1919
|
declare const initConfig$1_initConfig: typeof initConfig;
|
|
1433
1920
|
declare namespace initConfig$1 {
|
|
1434
|
-
|
|
1921
|
+
export { initConfig$1_initConfig as initConfig$1_initConfig };
|
|
1435
1922
|
}
|
|
1436
|
-
|
|
1437
1923
|
declare class CanvasRenderingContext2DError extends Error {
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1924
|
+
constructor(options?: {
|
|
1925
|
+
[key: string]: unknown;
|
|
1926
|
+
});
|
|
1441
1927
|
}
|
|
1442
|
-
|
|
1443
1928
|
declare class InvalidFormatError extends Error {
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1929
|
+
constructor(options?: {
|
|
1930
|
+
[key: string]: unknown;
|
|
1931
|
+
});
|
|
1447
1932
|
}
|
|
1448
|
-
|
|
1449
1933
|
declare class InvalidOptionError extends Error {
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1934
|
+
constructor(options?: {
|
|
1935
|
+
[key: string]: unknown;
|
|
1936
|
+
});
|
|
1453
1937
|
}
|
|
1454
|
-
|
|
1455
1938
|
declare class NotImplementedError extends Error {
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1939
|
+
pluginName: string;
|
|
1940
|
+
methodName: string;
|
|
1941
|
+
constructor(pluginName: string, methodName: string, options?: {
|
|
1942
|
+
[key: string]: unknown;
|
|
1943
|
+
});
|
|
1461
1944
|
}
|
|
1462
|
-
|
|
1463
|
-
type index_d$2_CanvasRenderingContext2DError = CanvasRenderingContext2DError;
|
|
1945
|
+
export type index_d$2_CanvasRenderingContext2DError = CanvasRenderingContext2DError;
|
|
1464
1946
|
declare const index_d$2_CanvasRenderingContext2DError: typeof CanvasRenderingContext2DError;
|
|
1465
|
-
type index_d$2_InvalidFormatError = InvalidFormatError;
|
|
1947
|
+
export type index_d$2_InvalidFormatError = InvalidFormatError;
|
|
1466
1948
|
declare const index_d$2_InvalidFormatError: typeof InvalidFormatError;
|
|
1467
|
-
type index_d$2_InvalidOptionError = InvalidOptionError;
|
|
1949
|
+
export type index_d$2_InvalidOptionError = InvalidOptionError;
|
|
1468
1950
|
declare const index_d$2_InvalidOptionError: typeof InvalidOptionError;
|
|
1469
|
-
type index_d$2_NotImplementedError = NotImplementedError;
|
|
1951
|
+
export type index_d$2_NotImplementedError = NotImplementedError;
|
|
1470
1952
|
declare const index_d$2_NotImplementedError: typeof NotImplementedError;
|
|
1471
1953
|
declare namespace index_d$2 {
|
|
1472
|
-
|
|
1954
|
+
export { index_d$2_CanvasRenderingContext2DError as index_d$2_CanvasRenderingContext2DError, index_d$2_InvalidFormatError as index_d$2_InvalidFormatError, index_d$2_InvalidOptionError as index_d$2_InvalidOptionError, index_d$2_NotImplementedError as index_d$2_NotImplementedError };
|
|
1473
1955
|
}
|
|
1474
|
-
|
|
1475
1956
|
declare const registerHandler: <K extends keyof CommentEventHandlerMap>(eventName: K, handler: CommentEventHandlerMap[K]) => void;
|
|
1476
1957
|
declare const removeHandler: <K extends keyof CommentEventHandlerMap>(eventName: K, handler: CommentEventHandlerMap[K]) => void;
|
|
1477
1958
|
declare const triggerHandler: (vpos: number, lastVpos: number) => void;
|
|
1478
|
-
|
|
1479
1959
|
declare const eventHandler_d_registerHandler: typeof registerHandler;
|
|
1480
1960
|
declare const eventHandler_d_removeHandler: typeof removeHandler;
|
|
1481
1961
|
declare const eventHandler_d_triggerHandler: typeof triggerHandler;
|
|
1482
1962
|
declare namespace eventHandler_d {
|
|
1483
|
-
|
|
1963
|
+
export { eventHandler_d_registerHandler as eventHandler_d_registerHandler, eventHandler_d_removeHandler as eventHandler_d_removeHandler, eventHandler_d_triggerHandler as eventHandler_d_triggerHandler };
|
|
1484
1964
|
}
|
|
1485
|
-
|
|
1486
1965
|
declare const convert2formattedComment: (data: unknown, type: InputFormatType) => FormattedComment[];
|
|
1487
|
-
|
|
1488
1966
|
declare namespace inputParser_d {
|
|
1489
|
-
|
|
1967
|
+
export { convert2formattedComment as convert2formattedComment };
|
|
1490
1968
|
}
|
|
1491
|
-
|
|
1492
1969
|
declare class CanvasRenderer implements IRenderer {
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1970
|
+
readonly canvas: HTMLCanvasElement;
|
|
1971
|
+
readonly video?: HTMLVideoElement;
|
|
1972
|
+
private readonly context;
|
|
1973
|
+
constructor(canvas?: HTMLCanvasElement, video?: HTMLVideoElement);
|
|
1974
|
+
drawVideo(enableLegacyPip: boolean): void;
|
|
1975
|
+
getFont(): string;
|
|
1976
|
+
getFillStyle(): string | CanvasGradient | CanvasPattern;
|
|
1977
|
+
setScale(scale: number, arg1?: number): void;
|
|
1978
|
+
drawImage(image: IRenderer, x: number, y: number, width?: number, height?: number): void;
|
|
1979
|
+
fillRect(x: number, y: number, width: number, height: number): void;
|
|
1980
|
+
strokeRect(x: number, y: number, width: number, height: number): void;
|
|
1981
|
+
fillText(text: string, x: number, y: number): void;
|
|
1982
|
+
strokeText(text: string, x: number, y: number): void;
|
|
1983
|
+
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
|
|
1984
|
+
clearRect(x: number, y: number, width: number, height: number): void;
|
|
1985
|
+
setFont(font: string): void;
|
|
1986
|
+
setFillStyle(color: string): void;
|
|
1987
|
+
setStrokeStyle(color: string): void;
|
|
1988
|
+
setLineWidth(width: number): void;
|
|
1989
|
+
setGlobalAlpha(alpha: number): void;
|
|
1990
|
+
setSize(width: number, height: number): void;
|
|
1991
|
+
getSize(): {
|
|
1992
|
+
width: number;
|
|
1993
|
+
height: number;
|
|
1994
|
+
};
|
|
1995
|
+
measureText(text: string): TextMetrics;
|
|
1996
|
+
beginPath(): void;
|
|
1997
|
+
closePath(): void;
|
|
1998
|
+
moveTo(x: number, y: number): void;
|
|
1999
|
+
lineTo(x: number, y: number): void;
|
|
2000
|
+
stroke(): void;
|
|
2001
|
+
save(): void;
|
|
2002
|
+
restore(): void;
|
|
2003
|
+
getCanvas(): IRenderer;
|
|
2004
|
+
destroy(): void;
|
|
1527
2005
|
}
|
|
1528
|
-
|
|
1529
|
-
type index_d$1_CanvasRenderer = CanvasRenderer;
|
|
2006
|
+
export type index_d$1_CanvasRenderer = CanvasRenderer;
|
|
1530
2007
|
declare const index_d$1_CanvasRenderer: typeof CanvasRenderer;
|
|
1531
2008
|
declare namespace index_d$1 {
|
|
1532
|
-
|
|
2009
|
+
export { index_d$1_CanvasRenderer as index_d$1_CanvasRenderer };
|
|
1533
2010
|
}
|
|
1534
|
-
|
|
1535
2011
|
declare const typeGuard: {
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
2012
|
+
formatted: {
|
|
2013
|
+
comment: (i: unknown) => i is {
|
|
2014
|
+
owner: boolean;
|
|
2015
|
+
content: string;
|
|
2016
|
+
id: number;
|
|
2017
|
+
vpos: number;
|
|
2018
|
+
date: number;
|
|
2019
|
+
date_usec: number;
|
|
2020
|
+
premium: boolean;
|
|
2021
|
+
mail: string[];
|
|
2022
|
+
user_id: number;
|
|
2023
|
+
layer: number;
|
|
2024
|
+
is_my_post: boolean;
|
|
2025
|
+
};
|
|
2026
|
+
comments: (i: unknown) => i is {
|
|
2027
|
+
owner: boolean;
|
|
2028
|
+
content: string;
|
|
2029
|
+
id: number;
|
|
2030
|
+
vpos: number;
|
|
2031
|
+
date: number;
|
|
2032
|
+
date_usec: number;
|
|
2033
|
+
premium: boolean;
|
|
2034
|
+
mail: string[];
|
|
2035
|
+
user_id: number;
|
|
2036
|
+
layer: number;
|
|
2037
|
+
is_my_post: boolean;
|
|
2038
|
+
}[];
|
|
2039
|
+
legacyComment: (i: unknown) => i is {
|
|
2040
|
+
owner: boolean;
|
|
2041
|
+
content: string;
|
|
2042
|
+
id: number;
|
|
2043
|
+
vpos: number;
|
|
2044
|
+
date: number;
|
|
2045
|
+
date_usec: number;
|
|
2046
|
+
premium: boolean;
|
|
2047
|
+
mail: string[];
|
|
2048
|
+
};
|
|
2049
|
+
legacyComments: (i: unknown) => i is {
|
|
2050
|
+
owner: boolean;
|
|
2051
|
+
content: string;
|
|
2052
|
+
id: number;
|
|
2053
|
+
vpos: number;
|
|
2054
|
+
date: number;
|
|
2055
|
+
date_usec: number;
|
|
2056
|
+
premium: boolean;
|
|
2057
|
+
mail: string[];
|
|
2058
|
+
}[];
|
|
2059
|
+
};
|
|
2060
|
+
legacy: {
|
|
2061
|
+
rawApiResponses: (i: unknown) => i is ({
|
|
2062
|
+
chat: {
|
|
2063
|
+
content: string;
|
|
2064
|
+
vpos: number;
|
|
2065
|
+
date: number;
|
|
2066
|
+
date_usec: number;
|
|
2067
|
+
premium: number;
|
|
2068
|
+
mail: string;
|
|
2069
|
+
user_id: string;
|
|
2070
|
+
thread: string;
|
|
2071
|
+
no: number;
|
|
2072
|
+
nicoru: number;
|
|
2073
|
+
anonymity: number;
|
|
2074
|
+
deleted: number;
|
|
2075
|
+
};
|
|
2076
|
+
} | {
|
|
2077
|
+
[x: string]: unknown;
|
|
2078
|
+
})[];
|
|
2079
|
+
apiChat: (i: unknown) => i is {
|
|
2080
|
+
content: string;
|
|
2081
|
+
vpos: number;
|
|
2082
|
+
date: number;
|
|
2083
|
+
date_usec: number;
|
|
2084
|
+
premium: number;
|
|
2085
|
+
mail: string;
|
|
2086
|
+
user_id: string;
|
|
2087
|
+
thread: string;
|
|
2088
|
+
no: number;
|
|
2089
|
+
nicoru: number;
|
|
2090
|
+
anonymity: number;
|
|
2091
|
+
deleted: number;
|
|
2092
|
+
};
|
|
2093
|
+
apiGlobalNumRes: (i: unknown) => i is {
|
|
2094
|
+
thread: string;
|
|
2095
|
+
num_res: number;
|
|
2096
|
+
};
|
|
2097
|
+
apiLeaf: (i: unknown) => i is {
|
|
2098
|
+
count: number;
|
|
2099
|
+
thread: string;
|
|
2100
|
+
};
|
|
2101
|
+
apiPing: (i: unknown) => i is {
|
|
2102
|
+
content: string;
|
|
2103
|
+
};
|
|
2104
|
+
apiThread: (i: unknown) => i is {
|
|
2105
|
+
thread: string;
|
|
2106
|
+
resultcode: number;
|
|
2107
|
+
server_time: number;
|
|
2108
|
+
ticket: string;
|
|
2109
|
+
revision: number;
|
|
2110
|
+
};
|
|
2111
|
+
};
|
|
2112
|
+
xmlDocument: (i: unknown) => i is XMLDocument;
|
|
2113
|
+
legacyOwner: {
|
|
2114
|
+
comments: (i: unknown) => i is string;
|
|
2115
|
+
};
|
|
2116
|
+
owner: {
|
|
2117
|
+
comment: (i: unknown) => i is {
|
|
2118
|
+
time: string;
|
|
2119
|
+
command: string;
|
|
2120
|
+
comment: string;
|
|
2121
|
+
};
|
|
2122
|
+
comments: (i: unknown) => i is {
|
|
2123
|
+
time: string;
|
|
2124
|
+
command: string;
|
|
2125
|
+
comment: string;
|
|
2126
|
+
}[];
|
|
2127
|
+
};
|
|
2128
|
+
v1: {
|
|
2129
|
+
comment: (i: unknown) => i is {
|
|
2130
|
+
id: string;
|
|
2131
|
+
no: number;
|
|
2132
|
+
vposMs: number;
|
|
2133
|
+
body: string;
|
|
2134
|
+
commands: string[];
|
|
2135
|
+
userId: string;
|
|
2136
|
+
isPremium: boolean;
|
|
2137
|
+
score: number;
|
|
2138
|
+
postedAt: string;
|
|
2139
|
+
nicoruCount: number;
|
|
2140
|
+
nicoruId: string | null;
|
|
2141
|
+
source: string;
|
|
2142
|
+
isMyPost: boolean;
|
|
2143
|
+
};
|
|
2144
|
+
comments: (i: unknown) => i is {
|
|
2145
|
+
id: string;
|
|
2146
|
+
no: number;
|
|
2147
|
+
vposMs: number;
|
|
2148
|
+
body: string;
|
|
2149
|
+
commands: string[];
|
|
2150
|
+
userId: string;
|
|
2151
|
+
isPremium: boolean;
|
|
2152
|
+
score: number;
|
|
2153
|
+
postedAt: string;
|
|
2154
|
+
nicoruCount: number;
|
|
2155
|
+
nicoruId: string | null;
|
|
2156
|
+
source: string;
|
|
2157
|
+
isMyPost: boolean;
|
|
2158
|
+
}[];
|
|
2159
|
+
thread: (i: unknown) => i is {
|
|
2160
|
+
fork: string;
|
|
2161
|
+
commentCount: number;
|
|
2162
|
+
comments: {
|
|
2163
|
+
id: string;
|
|
2164
|
+
no: number;
|
|
2165
|
+
vposMs: number;
|
|
2166
|
+
body: string;
|
|
2167
|
+
commands: string[];
|
|
2168
|
+
userId: string;
|
|
2169
|
+
isPremium: boolean;
|
|
2170
|
+
score: number;
|
|
2171
|
+
postedAt: string;
|
|
2172
|
+
nicoruCount: number;
|
|
2173
|
+
nicoruId: string | null;
|
|
2174
|
+
source: string;
|
|
2175
|
+
isMyPost: boolean;
|
|
2176
|
+
}[];
|
|
2177
|
+
id?: unknown;
|
|
2178
|
+
};
|
|
2179
|
+
threads: (i: unknown) => i is {
|
|
2180
|
+
fork: string;
|
|
2181
|
+
commentCount: number;
|
|
2182
|
+
comments: {
|
|
2183
|
+
id: string;
|
|
2184
|
+
no: number;
|
|
2185
|
+
vposMs: number;
|
|
2186
|
+
body: string;
|
|
2187
|
+
commands: string[];
|
|
2188
|
+
userId: string;
|
|
2189
|
+
isPremium: boolean;
|
|
2190
|
+
score: number;
|
|
2191
|
+
postedAt: string;
|
|
2192
|
+
nicoruCount: number;
|
|
2193
|
+
nicoruId: string | null;
|
|
2194
|
+
source: string;
|
|
2195
|
+
isMyPost: boolean;
|
|
2196
|
+
}[];
|
|
2197
|
+
id?: unknown;
|
|
2198
|
+
}[];
|
|
2199
|
+
};
|
|
2200
|
+
nicoScript: {
|
|
2201
|
+
range: {
|
|
2202
|
+
target: (i: unknown) => i is NicoScriptReverseTarget;
|
|
2203
|
+
};
|
|
2204
|
+
replace: {
|
|
2205
|
+
range: (i: unknown) => i is NicoScriptReplaceRange;
|
|
2206
|
+
target: (i: unknown) => i is NicoScriptReplaceTarget;
|
|
2207
|
+
condition: (i: unknown) => i is NicoScriptReplaceCondition;
|
|
2208
|
+
};
|
|
2209
|
+
};
|
|
2210
|
+
comment: {
|
|
2211
|
+
font: (i: unknown) => i is "defont" | "mincho" | "gothic" | "gulim" | "simsun";
|
|
2212
|
+
loc: (i: unknown) => i is "ue" | "naka" | "shita";
|
|
2213
|
+
size: (i: unknown) => i is "big" | "medium" | "small";
|
|
2214
|
+
command: {
|
|
2215
|
+
key: (i: unknown) => i is "full" | "ender" | "_live" | "invisible";
|
|
2216
|
+
};
|
|
2217
|
+
color: (i: unknown) => i is "white" | "red" | "pink" | "orange" | "yellow" | "green" | "cyan" | "blue" | "purple" | "black" | "white2" | "niconicowhite" | "red2" | "truered" | "pink2" | "orange2" | "passionorange" | "yellow2" | "madyellow" | "green2" | "elementalgreen" | "cyan2" | "blue2" | "marinblue" | "purple2" | "nobleviolet" | "black2";
|
|
2218
|
+
colorCode: (i: unknown) => i is string;
|
|
2219
|
+
colorCodeAllowAlpha: (i: unknown) => i is string;
|
|
2220
|
+
};
|
|
2221
|
+
config: {
|
|
2222
|
+
initOptions: (item: unknown) => item is Partial<BaseOptions>;
|
|
2223
|
+
};
|
|
2224
|
+
internal: {
|
|
2225
|
+
CommentMeasuredContentItem: (i: unknown) => i is {
|
|
2226
|
+
type: "spacer";
|
|
2227
|
+
char: string;
|
|
2228
|
+
charWidth: number;
|
|
2229
|
+
count: number;
|
|
2230
|
+
isButton?: boolean | undefined;
|
|
2231
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
2232
|
+
} | (({
|
|
2233
|
+
type: "spacer";
|
|
2234
|
+
char: string;
|
|
2235
|
+
charWidth: number;
|
|
2236
|
+
count: number;
|
|
2237
|
+
isButton?: boolean | undefined;
|
|
2238
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
2239
|
+
} | {
|
|
2240
|
+
type: "text";
|
|
2241
|
+
content: string;
|
|
2242
|
+
slicedContent: string[];
|
|
2243
|
+
isButton?: boolean | undefined;
|
|
2244
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
2245
|
+
width?: number[] | undefined;
|
|
2246
|
+
}) & {
|
|
2247
|
+
width: number[];
|
|
2248
|
+
});
|
|
2249
|
+
CommentMeasuredContentItemArray: (i: unknown) => i is ({
|
|
2250
|
+
type: "spacer";
|
|
2251
|
+
char: string;
|
|
2252
|
+
charWidth: number;
|
|
2253
|
+
count: number;
|
|
2254
|
+
isButton?: boolean | undefined;
|
|
2255
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
2256
|
+
} | (({
|
|
2257
|
+
type: "spacer";
|
|
2258
|
+
char: string;
|
|
2259
|
+
charWidth: number;
|
|
2260
|
+
count: number;
|
|
2261
|
+
isButton?: boolean | undefined;
|
|
2262
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
2263
|
+
} | {
|
|
2264
|
+
type: "text";
|
|
2265
|
+
content: string;
|
|
2266
|
+
slicedContent: string[];
|
|
2267
|
+
isButton?: boolean | undefined;
|
|
2268
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
2269
|
+
width?: number[] | undefined;
|
|
2270
|
+
}) & {
|
|
2271
|
+
width: number[];
|
|
2272
|
+
}))[];
|
|
2273
|
+
MultiConfigItem: <T>(i: unknown) => i is MultiConfigItem<T>;
|
|
2274
|
+
HTML5Fonts: (i: unknown) => i is "defont" | "mincho" | "gothic";
|
|
2275
|
+
MeasureInput: (i: unknown) => i is {
|
|
2276
|
+
lineHeight: number;
|
|
2277
|
+
font: "defont" | "mincho" | "gothic" | "gulim" | "simsun";
|
|
2278
|
+
content: ({
|
|
2279
|
+
type: "spacer";
|
|
2280
|
+
char: string;
|
|
2281
|
+
charWidth: number;
|
|
2282
|
+
count: number;
|
|
2283
|
+
isButton?: boolean | undefined;
|
|
2284
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
2285
|
+
} | {
|
|
2286
|
+
type: "text";
|
|
2287
|
+
content: string;
|
|
2288
|
+
slicedContent: string[];
|
|
2289
|
+
isButton?: boolean | undefined;
|
|
2290
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
2291
|
+
width?: number[] | undefined;
|
|
2292
|
+
})[];
|
|
2293
|
+
charSize: number;
|
|
2294
|
+
lineCount: number;
|
|
2295
|
+
};
|
|
2296
|
+
};
|
|
1609
2297
|
};
|
|
1610
|
-
|
|
1611
2298
|
declare namespace typeGuard_d {
|
|
1612
|
-
|
|
2299
|
+
export { typeGuard as typeGuard };
|
|
1613
2300
|
}
|
|
1614
|
-
|
|
1615
2301
|
declare const arrayPush: (array: {
|
|
1616
|
-
|
|
2302
|
+
[key: number]: IComment[];
|
|
1617
2303
|
}, key: string | number, push: IComment) => void;
|
|
1618
2304
|
declare const arrayEqual: (a: unknown[], b: unknown[]) => boolean;
|
|
1619
|
-
|
|
1620
2305
|
declare const hex2rgb: (hex: string) => number[];
|
|
1621
2306
|
declare const hex2rgba: (hex: string) => number[];
|
|
1622
2307
|
declare const getStrokeColor: (comment: FormattedCommentWithSize) => string;
|
|
1623
|
-
|
|
1624
2308
|
declare const isLineBreakResize: (comment: MeasureTextInput) => boolean;
|
|
1625
2309
|
declare const getDefaultCommand: (vpos: number) => DefaultCommand;
|
|
1626
2310
|
declare const parseCommandAndNicoScript: (comment: FormattedComment) => ParseCommandAndNicoScriptResult;
|
|
@@ -1630,53 +2314,47 @@ declare const isBanActive: (vpos: number) => boolean;
|
|
|
1630
2314
|
declare const processFixedComment: (comment: IComment, collision: CollisionItem, timeline: Timeline) => void;
|
|
1631
2315
|
declare const processMovableComment: (comment: IComment, collision: Collision, timeline: Timeline) => void;
|
|
1632
2316
|
declare const getPosY: (currentPos: number, targetComment: IComment, collision: IComment[] | undefined, isChanged?: boolean) => {
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
2317
|
+
currentPos: number;
|
|
2318
|
+
isChanged: boolean;
|
|
2319
|
+
isBreak: boolean;
|
|
1636
2320
|
};
|
|
1637
2321
|
declare const getPosX: (comment: FormattedCommentWithSize, vpos: number, isReverse?: boolean) => number;
|
|
1638
2322
|
declare const parseFont: (font: CommentFont, size: string | number) => string;
|
|
1639
|
-
|
|
1640
2323
|
declare const changeCALayer: (rawData: FormattedComment[]) => FormattedComment[];
|
|
1641
|
-
|
|
1642
2324
|
declare const getConfig: <T>(input: ConfigItem<T>, isFlash?: boolean) => T;
|
|
1643
|
-
|
|
1644
2325
|
declare const getFlashFontIndex: (part: string) => CommentContentIndex[];
|
|
1645
2326
|
declare const getFlashFontName: (font: CommentFlashFontParsed) => CommentFlashFont;
|
|
1646
2327
|
declare const parseContent: (content: string) => ({
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
2328
|
+
type: "spacer";
|
|
2329
|
+
char: string;
|
|
2330
|
+
charWidth: number;
|
|
2331
|
+
count: number;
|
|
2332
|
+
isButton?: boolean | undefined;
|
|
2333
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
1653
2334
|
} | {
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
2335
|
+
type: "text";
|
|
2336
|
+
content: string;
|
|
2337
|
+
slicedContent: string[];
|
|
2338
|
+
isButton?: boolean | undefined;
|
|
2339
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
2340
|
+
width?: number[] | undefined;
|
|
1660
2341
|
})[];
|
|
1661
2342
|
declare const getButtonParts: (comment: FormattedCommentWithSize) => FormattedCommentWithSize;
|
|
1662
2343
|
declare const buildAtButtonComment: (comment: FormattedCommentWithSize, vpos: number) => FormattedComment | undefined;
|
|
1663
|
-
|
|
1664
2344
|
declare const getLineHeight: (fontSize: CommentSize, isFlash: boolean, resized?: boolean) => number;
|
|
1665
2345
|
declare const getCharSize: (fontSize: CommentSize, isFlash: boolean) => number;
|
|
1666
2346
|
declare const measure: (comment: MeasureInput, renderer: IRenderer) => {
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
2347
|
+
height: number;
|
|
2348
|
+
width: number;
|
|
2349
|
+
lineWidth: number[];
|
|
2350
|
+
itemWidth: number[][];
|
|
1671
2351
|
};
|
|
1672
2352
|
declare const addHTML5PartToResult: (lineContent: CommentContentItem[], part: string, font?: CommentHTML5Font) => void;
|
|
1673
2353
|
declare const getFontSizeAndScale: (charSize: number) => {
|
|
1674
|
-
|
|
1675
|
-
|
|
2354
|
+
scale: number;
|
|
2355
|
+
fontSize: number;
|
|
1676
2356
|
};
|
|
1677
|
-
|
|
1678
2357
|
declare const nativeSort: <T>(getter: (input: T) => number) => (a: T, b: T) => 1 | 0 | -1;
|
|
1679
|
-
|
|
1680
2358
|
declare const index_d_addHTML5PartToResult: typeof addHTML5PartToResult;
|
|
1681
2359
|
declare const index_d_arrayEqual: typeof arrayEqual;
|
|
1682
2360
|
declare const index_d_arrayPush: typeof arrayPush;
|
|
@@ -1707,138 +2385,351 @@ declare const index_d_parseFont: typeof parseFont;
|
|
|
1707
2385
|
declare const index_d_processFixedComment: typeof processFixedComment;
|
|
1708
2386
|
declare const index_d_processMovableComment: typeof processMovableComment;
|
|
1709
2387
|
declare namespace index_d {
|
|
1710
|
-
|
|
2388
|
+
export { index_d_addHTML5PartToResult as index_d_addHTML5PartToResult, index_d_arrayEqual as index_d_arrayEqual, index_d_arrayPush as index_d_arrayPush, index_d_buildAtButtonComment as index_d_buildAtButtonComment, index_d_changeCALayer as index_d_changeCALayer, index_d_getButtonParts as index_d_getButtonParts, index_d_getCharSize as index_d_getCharSize, index_d_getConfig as index_d_getConfig, index_d_getDefaultCommand as index_d_getDefaultCommand, index_d_getFlashFontIndex as index_d_getFlashFontIndex, index_d_getFlashFontName as index_d_getFlashFontName, index_d_getFontSizeAndScale as index_d_getFontSizeAndScale, index_d_getLineHeight as index_d_getLineHeight, index_d_getPosX as index_d_getPosX, index_d_getPosY as index_d_getPosY, index_d_getStrokeColor as index_d_getStrokeColor, index_d_hex2rgb as index_d_hex2rgb, index_d_hex2rgba as index_d_hex2rgba, index_d_isBanActive as index_d_isBanActive, index_d_isFlashComment as index_d_isFlashComment, index_d_isLineBreakResize as index_d_isLineBreakResize, index_d_isReverseActive as index_d_isReverseActive, index_d_measure as index_d_measure, index_d_nativeSort as index_d_nativeSort, index_d_parseCommandAndNicoScript as index_d_parseCommandAndNicoScript, index_d_parseContent as index_d_parseContent, index_d_parseFont as index_d_parseFont, index_d_processFixedComment as index_d_processFixedComment, index_d_processMovableComment as index_d_processMovableComment };
|
|
1711
2389
|
}
|
|
1712
|
-
|
|
1713
2390
|
declare const definition: {
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
2391
|
+
colors: typeof colors$1;
|
|
2392
|
+
config: typeof config$1;
|
|
2393
|
+
fonts: typeof fonts$1;
|
|
2394
|
+
initConfig: typeof initConfig$1;
|
|
1718
2395
|
};
|
|
1719
|
-
|
|
1720
2396
|
declare const internal_definition: typeof definition;
|
|
1721
2397
|
declare namespace internal {
|
|
1722
|
-
|
|
2398
|
+
export { index_d$4 as index_d$4, index_d$3 as index_d$3, internal_definition as internal_definition, index_d$2 as index_d$2, eventHandler_d as eventHandler_d, inputParser_d as inputParser_d, index_d$1 as index_d$1, typeGuard_d as typeGuard_d, index_d as index_d };
|
|
1723
2399
|
}
|
|
1724
|
-
|
|
1725
2400
|
declare class NiconiComments {
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
2401
|
+
enableLegacyPiP: boolean;
|
|
2402
|
+
showCollision: boolean;
|
|
2403
|
+
showFPS: boolean;
|
|
2404
|
+
showCommentCount: boolean;
|
|
2405
|
+
private lastVpos;
|
|
2406
|
+
private readonly renderer;
|
|
2407
|
+
private readonly collision;
|
|
2408
|
+
private readonly timeline;
|
|
2409
|
+
static typeGuard: {
|
|
2410
|
+
formatted: {
|
|
2411
|
+
comment: (i: unknown) => i is {
|
|
2412
|
+
owner: boolean;
|
|
2413
|
+
content: string;
|
|
2414
|
+
id: number;
|
|
2415
|
+
vpos: number;
|
|
2416
|
+
date: number;
|
|
2417
|
+
date_usec: number;
|
|
2418
|
+
premium: boolean;
|
|
2419
|
+
mail: string[];
|
|
2420
|
+
user_id: number;
|
|
2421
|
+
layer: number;
|
|
2422
|
+
is_my_post: boolean;
|
|
2423
|
+
};
|
|
2424
|
+
comments: (i: unknown) => i is {
|
|
2425
|
+
owner: boolean;
|
|
2426
|
+
content: string;
|
|
2427
|
+
id: number;
|
|
2428
|
+
vpos: number;
|
|
2429
|
+
date: number;
|
|
2430
|
+
date_usec: number;
|
|
2431
|
+
premium: boolean;
|
|
2432
|
+
mail: string[];
|
|
2433
|
+
user_id: number;
|
|
2434
|
+
layer: number;
|
|
2435
|
+
is_my_post: boolean;
|
|
2436
|
+
}[];
|
|
2437
|
+
legacyComment: (i: unknown) => i is {
|
|
2438
|
+
owner: boolean;
|
|
2439
|
+
content: string;
|
|
2440
|
+
id: number;
|
|
2441
|
+
vpos: number;
|
|
2442
|
+
date: number;
|
|
2443
|
+
date_usec: number;
|
|
2444
|
+
premium: boolean;
|
|
2445
|
+
mail: string[];
|
|
2446
|
+
};
|
|
2447
|
+
legacyComments: (i: unknown) => i is {
|
|
2448
|
+
owner: boolean;
|
|
2449
|
+
content: string;
|
|
2450
|
+
id: number;
|
|
2451
|
+
vpos: number;
|
|
2452
|
+
date: number;
|
|
2453
|
+
date_usec: number;
|
|
2454
|
+
premium: boolean;
|
|
2455
|
+
mail: string[];
|
|
2456
|
+
}[];
|
|
2457
|
+
};
|
|
2458
|
+
legacy: {
|
|
2459
|
+
rawApiResponses: (i: unknown) => i is ({
|
|
2460
|
+
chat: {
|
|
2461
|
+
content: string;
|
|
2462
|
+
vpos: number;
|
|
2463
|
+
date: number;
|
|
2464
|
+
date_usec: number;
|
|
2465
|
+
premium: number;
|
|
2466
|
+
mail: string;
|
|
2467
|
+
user_id: string;
|
|
2468
|
+
thread: string;
|
|
2469
|
+
no: number;
|
|
2470
|
+
nicoru: number;
|
|
2471
|
+
anonymity: number;
|
|
2472
|
+
deleted: number;
|
|
2473
|
+
};
|
|
2474
|
+
} | {
|
|
2475
|
+
[x: string]: unknown;
|
|
2476
|
+
})[];
|
|
2477
|
+
apiChat: (i: unknown) => i is {
|
|
2478
|
+
content: string;
|
|
2479
|
+
vpos: number;
|
|
2480
|
+
date: number;
|
|
2481
|
+
date_usec: number;
|
|
2482
|
+
premium: number;
|
|
2483
|
+
mail: string;
|
|
2484
|
+
user_id: string;
|
|
2485
|
+
thread: string;
|
|
2486
|
+
no: number;
|
|
2487
|
+
nicoru: number;
|
|
2488
|
+
anonymity: number;
|
|
2489
|
+
deleted: number;
|
|
2490
|
+
};
|
|
2491
|
+
apiGlobalNumRes: (i: unknown) => i is {
|
|
2492
|
+
thread: string;
|
|
2493
|
+
num_res: number;
|
|
2494
|
+
};
|
|
2495
|
+
apiLeaf: (i: unknown) => i is {
|
|
2496
|
+
count: number;
|
|
2497
|
+
thread: string;
|
|
2498
|
+
};
|
|
2499
|
+
apiPing: (i: unknown) => i is {
|
|
2500
|
+
content: string;
|
|
2501
|
+
};
|
|
2502
|
+
apiThread: (i: unknown) => i is {
|
|
2503
|
+
thread: string;
|
|
2504
|
+
resultcode: number;
|
|
2505
|
+
server_time: number;
|
|
2506
|
+
ticket: string;
|
|
2507
|
+
revision: number;
|
|
2508
|
+
};
|
|
2509
|
+
};
|
|
2510
|
+
xmlDocument: (i: unknown) => i is XMLDocument;
|
|
2511
|
+
legacyOwner: {
|
|
2512
|
+
comments: (i: unknown) => i is string;
|
|
2513
|
+
};
|
|
2514
|
+
owner: {
|
|
2515
|
+
comment: (i: unknown) => i is {
|
|
2516
|
+
time: string;
|
|
2517
|
+
command: string;
|
|
2518
|
+
comment: string;
|
|
2519
|
+
};
|
|
2520
|
+
comments: (i: unknown) => i is {
|
|
2521
|
+
time: string;
|
|
2522
|
+
command: string;
|
|
2523
|
+
comment: string;
|
|
2524
|
+
}[];
|
|
2525
|
+
};
|
|
2526
|
+
v1: {
|
|
2527
|
+
comment: (i: unknown) => i is {
|
|
2528
|
+
id: string;
|
|
2529
|
+
no: number;
|
|
2530
|
+
vposMs: number;
|
|
2531
|
+
body: string;
|
|
2532
|
+
commands: string[];
|
|
2533
|
+
userId: string;
|
|
2534
|
+
isPremium: boolean;
|
|
2535
|
+
score: number;
|
|
2536
|
+
postedAt: string;
|
|
2537
|
+
nicoruCount: number;
|
|
2538
|
+
nicoruId: string | null;
|
|
2539
|
+
source: string;
|
|
2540
|
+
isMyPost: boolean;
|
|
2541
|
+
};
|
|
2542
|
+
comments: (i: unknown) => i is {
|
|
2543
|
+
id: string;
|
|
2544
|
+
no: number;
|
|
2545
|
+
vposMs: number;
|
|
2546
|
+
body: string;
|
|
2547
|
+
commands: string[];
|
|
2548
|
+
userId: string;
|
|
2549
|
+
isPremium: boolean;
|
|
2550
|
+
score: number;
|
|
2551
|
+
postedAt: string;
|
|
2552
|
+
nicoruCount: number;
|
|
2553
|
+
nicoruId: string | null;
|
|
2554
|
+
source: string;
|
|
2555
|
+
isMyPost: boolean;
|
|
2556
|
+
}[];
|
|
2557
|
+
thread: (i: unknown) => i is {
|
|
2558
|
+
fork: string;
|
|
2559
|
+
commentCount: number;
|
|
2560
|
+
comments: {
|
|
2561
|
+
id: string;
|
|
2562
|
+
no: number;
|
|
2563
|
+
vposMs: number;
|
|
2564
|
+
body: string;
|
|
2565
|
+
commands: string[];
|
|
2566
|
+
userId: string;
|
|
2567
|
+
isPremium: boolean;
|
|
2568
|
+
score: number;
|
|
2569
|
+
postedAt: string;
|
|
2570
|
+
nicoruCount: number;
|
|
2571
|
+
nicoruId: string | null;
|
|
2572
|
+
source: string;
|
|
2573
|
+
isMyPost: boolean;
|
|
2574
|
+
}[];
|
|
2575
|
+
id?: unknown;
|
|
2576
|
+
};
|
|
2577
|
+
threads: (i: unknown) => i is {
|
|
2578
|
+
fork: string;
|
|
2579
|
+
commentCount: number;
|
|
2580
|
+
comments: {
|
|
2581
|
+
id: string;
|
|
2582
|
+
no: number;
|
|
2583
|
+
vposMs: number;
|
|
2584
|
+
body: string;
|
|
2585
|
+
commands: string[];
|
|
2586
|
+
userId: string;
|
|
2587
|
+
isPremium: boolean;
|
|
2588
|
+
score: number;
|
|
2589
|
+
postedAt: string;
|
|
2590
|
+
nicoruCount: number;
|
|
2591
|
+
nicoruId: string | null;
|
|
2592
|
+
source: string;
|
|
2593
|
+
isMyPost: boolean;
|
|
2594
|
+
}[];
|
|
2595
|
+
id?: unknown;
|
|
2596
|
+
}[];
|
|
2597
|
+
};
|
|
2598
|
+
nicoScript: {
|
|
2599
|
+
range: {
|
|
2600
|
+
target: (i: unknown) => i is NicoScriptReverseTarget;
|
|
2601
|
+
};
|
|
2602
|
+
replace: {
|
|
2603
|
+
range: (i: unknown) => i is NicoScriptReplaceRange;
|
|
2604
|
+
target: (i: unknown) => i is NicoScriptReplaceTarget;
|
|
2605
|
+
condition: (i: unknown) => i is NicoScriptReplaceCondition;
|
|
2606
|
+
};
|
|
2607
|
+
};
|
|
2608
|
+
comment: {
|
|
2609
|
+
font: (i: unknown) => i is "defont" | "mincho" | "gothic" | "gulim" | "simsun";
|
|
2610
|
+
loc: (i: unknown) => i is "ue" | "naka" | "shita";
|
|
2611
|
+
size: (i: unknown) => i is "big" | "medium" | "small";
|
|
2612
|
+
command: {
|
|
2613
|
+
key: (i: unknown) => i is "full" | "ender" | "_live" | "invisible";
|
|
2614
|
+
};
|
|
2615
|
+
color: (i: unknown) => i is "white" | "red" | "pink" | "orange" | "yellow" | "green" | "cyan" | "blue" | "purple" | "black" | "white2" | "niconicowhite" | "red2" | "truered" | "pink2" | "orange2" | "passionorange" | "yellow2" | "madyellow" | "green2" | "elementalgreen" | "cyan2" | "blue2" | "marinblue" | "purple2" | "nobleviolet" | "black2";
|
|
2616
|
+
colorCode: (i: unknown) => i is string;
|
|
2617
|
+
colorCodeAllowAlpha: (i: unknown) => i is string;
|
|
2618
|
+
};
|
|
2619
|
+
config: {
|
|
2620
|
+
initOptions: (item: unknown) => item is Partial<BaseOptions>;
|
|
2621
|
+
};
|
|
2622
|
+
internal: {
|
|
2623
|
+
CommentMeasuredContentItem: (i: unknown) => i is {
|
|
2624
|
+
type: "spacer";
|
|
2625
|
+
char: string;
|
|
2626
|
+
charWidth: number;
|
|
2627
|
+
count: number;
|
|
2628
|
+
isButton?: boolean | undefined;
|
|
2629
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
2630
|
+
} | (({
|
|
2631
|
+
type: "spacer";
|
|
2632
|
+
char: string;
|
|
2633
|
+
charWidth: number;
|
|
2634
|
+
count: number;
|
|
2635
|
+
isButton?: boolean | undefined;
|
|
2636
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
2637
|
+
} | {
|
|
2638
|
+
type: "text";
|
|
2639
|
+
content: string;
|
|
2640
|
+
slicedContent: string[];
|
|
2641
|
+
isButton?: boolean | undefined;
|
|
2642
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
2643
|
+
width?: number[] | undefined;
|
|
2644
|
+
}) & {
|
|
2645
|
+
width: number[];
|
|
2646
|
+
});
|
|
2647
|
+
CommentMeasuredContentItemArray: (i: unknown) => i is ({
|
|
2648
|
+
type: "spacer";
|
|
2649
|
+
char: string;
|
|
2650
|
+
charWidth: number;
|
|
2651
|
+
count: number;
|
|
2652
|
+
isButton?: boolean | undefined;
|
|
2653
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
2654
|
+
} | (({
|
|
2655
|
+
type: "spacer";
|
|
2656
|
+
char: string;
|
|
2657
|
+
charWidth: number;
|
|
2658
|
+
count: number;
|
|
2659
|
+
isButton?: boolean | undefined;
|
|
2660
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
2661
|
+
} | {
|
|
2662
|
+
type: "text";
|
|
2663
|
+
content: string;
|
|
2664
|
+
slicedContent: string[];
|
|
2665
|
+
isButton?: boolean | undefined;
|
|
2666
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
2667
|
+
width?: number[] | undefined;
|
|
2668
|
+
}) & {
|
|
2669
|
+
width: number[];
|
|
2670
|
+
}))[];
|
|
2671
|
+
MultiConfigItem: <T>(i: unknown) => i is MultiConfigItem<T>;
|
|
2672
|
+
HTML5Fonts: (i: unknown) => i is "defont" | "mincho" | "gothic";
|
|
2673
|
+
MeasureInput: (i: unknown) => i is {
|
|
2674
|
+
lineHeight: number;
|
|
2675
|
+
font: "defont" | "mincho" | "gothic" | "gulim" | "simsun";
|
|
2676
|
+
content: ({
|
|
2677
|
+
type: "spacer";
|
|
2678
|
+
char: string;
|
|
2679
|
+
charWidth: number;
|
|
2680
|
+
count: number;
|
|
2681
|
+
isButton?: boolean | undefined;
|
|
2682
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
2683
|
+
} | {
|
|
2684
|
+
type: "text";
|
|
2685
|
+
content: string;
|
|
2686
|
+
slicedContent: string[];
|
|
2687
|
+
isButton?: boolean | undefined;
|
|
2688
|
+
font?: "defont" | "gulim" | "simsun" | undefined;
|
|
2689
|
+
width?: number[] | undefined;
|
|
2690
|
+
})[];
|
|
2691
|
+
charSize: number;
|
|
2692
|
+
lineCount: number;
|
|
2693
|
+
};
|
|
2694
|
+
};
|
|
2695
|
+
};
|
|
2696
|
+
static default: typeof NiconiComments;
|
|
2697
|
+
static FlashComment: {
|
|
2698
|
+
condition: (comment: {
|
|
2699
|
+
owner: boolean;
|
|
2700
|
+
content: string;
|
|
2701
|
+
id: number;
|
|
2702
|
+
vpos: number;
|
|
2703
|
+
date: number;
|
|
2704
|
+
date_usec: number;
|
|
2705
|
+
premium: boolean;
|
|
2706
|
+
mail: string[];
|
|
2707
|
+
user_id: number;
|
|
2708
|
+
layer: number;
|
|
2709
|
+
is_my_post: boolean;
|
|
2710
|
+
}) => boolean;
|
|
2711
|
+
class: typeof FlashComment;
|
|
2712
|
+
};
|
|
2713
|
+
static internal: typeof internal;
|
|
2714
|
+
constructor(renderer: IRenderer | HTMLCanvasElement, data: InputFormat, initOptions?: Options);
|
|
2715
|
+
private preRendering;
|
|
2716
|
+
private getCommentPos;
|
|
2717
|
+
private sortComment;
|
|
2718
|
+
addComments(...rawComments: FormattedComment[]): void;
|
|
2719
|
+
drawCanvas(vpos: number, forceRendering?: boolean, cursor?: Position): boolean;
|
|
2720
|
+
private _drawVideo;
|
|
2721
|
+
private _drawComments;
|
|
2722
|
+
private _drawCollision;
|
|
2723
|
+
private _drawFPS;
|
|
2724
|
+
private _drawCommentCount;
|
|
2725
|
+
addEventListener<K extends keyof CommentEventHandlerMap>(eventName: K, handler: CommentEventHandlerMap[K]): void;
|
|
2726
|
+
removeEventListener<K extends keyof CommentEventHandlerMap>(eventName: K, handler: CommentEventHandlerMap[K]): void;
|
|
2727
|
+
clear(): void;
|
|
2728
|
+
click(vpos: number, pos: Position): void;
|
|
1842
2729
|
}
|
|
1843
2730
|
|
|
1844
|
-
export {
|
|
2731
|
+
export {
|
|
2732
|
+
NiconiComments as default,
|
|
2733
|
+
};
|
|
2734
|
+
|
|
2735
|
+
export {};
|