@xpadev-net/niconicomments 0.2.31 → 0.2.32

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 CHANGED
@@ -216,66 +216,66 @@ declare const fonts: {
216
216
  };
217
217
 
218
218
 
219
- type configItem<T> = T | { html5: T; flash: T };
220
- type configSizeItem<T> = { big: T; medium: T; small: T };
221
- type configResizedItem<T> = { default: T; resized: T };
222
-
223
- type commentStageSize = { width: number; fullWidth: number; height: number };
224
-
225
- type flashCharList = {
226
- [key in "simsunStrong" | "simsunWeak" | "gulim" | "gothic"]: string;
227
- };
228
- type flashMode = "xp" | "vista";
229
- type flashScriptChar = {
230
- [key in "super" | "sub"]: string;
231
- };
232
- type fontList = {
233
- [key in "gulim" | "simsun"]: string;
234
- };
235
- type lineCounts = {
236
- [key in "default" | "resized" | "doubleResized"]: configSizeItem<number>;
237
- };
238
- type typeDoubleResizeMaxWidth = {
239
- [key in "full" | "normal"]: number;
240
- };
241
-
242
- type Config = {
243
- cacheAge: number;
244
- canvasHeight: number;
245
- canvasWidth: number;
246
- collisionRange: { [key in "left" | "right"]: number };
247
- colors: { [key: string]: string };
248
- commentDrawPadding: configItem<number>;
249
- commentDrawRange: configItem<number>;
250
- commentScale: configItem<number>;
251
- commentStageSize: configItem<commentStageSize>;
252
- commentYMarginBottom: configSizeItem<number>;
253
- commentYOffset: configSizeItem<configResizedItem<number>>;
254
- commentYPaddingTop: configResizedItem<number>;
255
- contextFillLiveOpacity: number;
256
- contextLineWidth: number;
257
- contextStrokeColor: string;
258
- contextStrokeInversionColor: string;
259
- contextStrokeOpacity: number;
260
- doubleResizeMaxWidth: configItem<typeDoubleResizeMaxWidth>;
261
- flashChar: flashCharList;
262
- flashMode: flashMode;
263
- flashScriptChar: flashScriptChar;
264
- flashThreshold: number;
265
- font: fontList;
266
- fonts: platformFont;
267
- fontSize: configItem<configSizeItem<configResizedItem<number>>>;
268
- fpsInterval: number;
269
- hiResCommentCorrection: number;
270
- lineCounts: configItem<lineCounts>;
271
- lineHeight: configItem<configSizeItem<configResizedItem<number>>>;
272
- minFontSize: number;
273
- sameCAGap: number;
274
- sameCAMinScore: number;
275
- sameCARange: number;
276
- };
277
-
278
- type ConfigNullable = Partial<Config>;
219
+ type configItem<T> = T | { html5: T; flash: T };
220
+ type configSizeItem<T> = { big: T; medium: T; small: T };
221
+ type configResizedItem<T> = { default: T; resized: T };
222
+
223
+ type commentStageSize = { width: number; fullWidth: number; height: number };
224
+
225
+ type flashCharList = {
226
+ [key in "simsunStrong" | "simsunWeak" | "gulim" | "gothic"]: string;
227
+ };
228
+ type flashMode = "xp" | "vista";
229
+ type flashScriptChar = {
230
+ [key in "super" | "sub"]: string;
231
+ };
232
+ type fontList = {
233
+ [key in "gulim" | "simsun"]: string;
234
+ };
235
+ type lineCounts = {
236
+ [key in "default" | "resized" | "doubleResized"]: configSizeItem<number>;
237
+ };
238
+ type typeDoubleResizeMaxWidth = {
239
+ [key in "full" | "normal"]: number;
240
+ };
241
+
242
+ type Config = {
243
+ cacheAge: number;
244
+ canvasHeight: number;
245
+ canvasWidth: number;
246
+ collisionRange: { [key in "left" | "right"]: number };
247
+ colors: { [key: string]: string };
248
+ commentDrawPadding: configItem<number>;
249
+ commentDrawRange: configItem<number>;
250
+ commentScale: configItem<number>;
251
+ commentStageSize: configItem<commentStageSize>;
252
+ commentYMarginBottom: configSizeItem<number>;
253
+ commentYOffset: configSizeItem<configResizedItem<number>>;
254
+ commentYPaddingTop: configResizedItem<number>;
255
+ contextFillLiveOpacity: number;
256
+ contextLineWidth: number;
257
+ contextStrokeColor: string;
258
+ contextStrokeInversionColor: string;
259
+ contextStrokeOpacity: number;
260
+ doubleResizeMaxWidth: configItem<typeDoubleResizeMaxWidth>;
261
+ flashChar: flashCharList;
262
+ flashMode: flashMode;
263
+ flashScriptChar: flashScriptChar;
264
+ flashThreshold: number;
265
+ font: fontList;
266
+ fonts: platformFont;
267
+ fontSize: configItem<configSizeItem<configResizedItem<number>>>;
268
+ fpsInterval: number;
269
+ hiResCommentCorrection: number;
270
+ lineCounts: configItem<lineCounts>;
271
+ lineHeight: configItem<configSizeItem<configResizedItem<number>>>;
272
+ minFontSize: number;
273
+ sameCAGap: number;
274
+ sameCAMinScore: number;
275
+ sameCARange: number;
276
+ };
277
+
278
+ type ConfigNullable = Partial<Config>;
279
279
 
280
280
  type platform =
281
281
  | "win7"
@@ -400,39 +400,39 @@ interface IComment {
400
400
  draw: (vpos: number, showCollision: boolean, isDebug: boolean) => void;
401
401
  }
402
402
 
403
- type inputFormatType =
404
- | "niconicome"
405
- | "formatted"
406
- | "legacy"
407
- | "legacyOwner"
408
- | "owner"
409
- | "v1"
410
- | "default";
411
- type inputFormat =
412
- | XMLDocument
413
- | formattedComment[]
414
- | formattedLegacyComment[]
415
- | rawApiResponse[]
416
- | ownerComment[]
417
- | v1Thread[]
418
- | string;
419
- type modeType = "default" | "html5" | "flash";
420
- type Options = {
421
- config: ConfigNullable;
422
- debug: boolean;
423
- enableLegacyPiP: boolean;
424
- format: inputFormatType;
425
- formatted: boolean;
426
- keepCA: boolean;
427
- mode: modeType;
428
- scale: number;
429
- showCollision: boolean;
430
- showCommentCount: boolean;
431
- showFPS: boolean;
432
- useLegacy: boolean;
433
- video: HTMLVideoElement | undefined;
434
- };
435
- type InitOptions = Partial<Options>;
403
+ type inputFormatType =
404
+ | "niconicome"
405
+ | "formatted"
406
+ | "legacy"
407
+ | "legacyOwner"
408
+ | "owner"
409
+ | "v1"
410
+ | "default";
411
+ type inputFormat =
412
+ | XMLDocument
413
+ | formattedComment[]
414
+ | formattedLegacyComment[]
415
+ | rawApiResponse[]
416
+ | ownerComment[]
417
+ | v1Thread[]
418
+ | string;
419
+ type modeType = "default" | "html5" | "flash";
420
+ type Options = {
421
+ config: ConfigNullable;
422
+ debug: boolean;
423
+ enableLegacyPiP: boolean;
424
+ format: inputFormatType;
425
+ formatted: boolean;
426
+ keepCA: boolean;
427
+ mode: modeType;
428
+ scale: number;
429
+ showCollision: boolean;
430
+ showCommentCount: boolean;
431
+ showFPS: boolean;
432
+ useLegacy: boolean;
433
+ video: HTMLVideoElement | undefined;
434
+ };
435
+ type InitOptions = Partial<Options>;
436
436
 
437
437
  type formattedCommentWithFont = {
438
438
  id: number;
@@ -597,7 +597,7 @@ declare class NiconiComments {
597
597
  private readonly collision;
598
598
  private readonly context;
599
599
  private readonly timeline;
600
- constructor(canvas: HTMLCanvasElement, data: inputFormat[], initOptions?: InitOptions);
600
+ constructor(canvas: HTMLCanvasElement, data: inputFormat, initOptions?: InitOptions);
601
601
  preRendering(rawData: formattedComment[]): void;
602
602
  getCommentPos(data: IComment[]): IComment[];
603
603
  sortComment(parsedData: IComment[]): IComment[];
package/dist/bundle.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- niconicomments.js v0.2.31
2
+ niconicomments.js v0.2.32
3
3
  (c) 2021 xpadev-net https://xpadev.net
4
4
  Released under the MIT License.
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpadev-net/niconicomments",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
4
4
  "description": "NiconiComments is a comment drawing library that is somewhat compatible with the official Nico Nico Douga player.",
5
5
  "main": "dist/bundle.js",
6
6
  "types": "dist/bundle.d.ts",