textalive-react-api 0.3.1 → 0.4.13

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.
@@ -1,17 +1,24 @@
1
1
  import { Context } from 'react';
2
2
  import { DetailedHTMLProps } from 'react';
3
3
  import { FC } from 'react';
4
+ import { ForwardRefExoticComponent } from 'react';
4
5
  import { HTMLAttributes } from 'react';
5
- import { Interpolation } from '@emotion/serialize';
6
- import { Option as Option_2 } from 'react-dropdown-now';
7
6
  import { ReactNode } from 'react';
7
+ import { RefAttributes } from 'react';
8
8
  import { RefObject } from 'react';
9
+ import { SliderProps } from '@mantine/core';
10
+ import { TextProps } from '@mantine/core';
9
11
 
10
12
  /**
11
13
  * TextAlive ログインに使えるサービス / Account service for TextAlive login
14
+ *
15
+ * @internal
12
16
  */
13
17
  declare type AccountService = "twitter" | "github" | "youtube" | "piapro" | "songle";
14
18
 
19
+ /**
20
+ * @internal
21
+ */
15
22
  declare interface Asset {
16
23
  originalUrl: string;
17
24
  contentType?: number;
@@ -24,6 +31,9 @@ declare interface Asset {
24
31
  createdDate?: string;
25
32
  }
26
33
 
34
+ /**
35
+ * @internal
36
+ */
27
37
  declare interface AssetLicense {
28
38
  code?: number;
29
39
  condition?: {
@@ -40,7 +50,7 @@ declare interface AssetLicense {
40
50
  * 背景グラフィックに関するイベントのリスナ
41
51
  *
42
52
  * Event listener for background graphics
43
- * @public
53
+ * @internal
44
54
  */
45
55
  declare interface BackgroundGraphicsListener {
46
56
  /**
@@ -53,6 +63,9 @@ declare interface BackgroundGraphicsListener {
53
63
  onBackgroundGraphicsUpdate?(backgroundImage: BackgroundImageAsset): void;
54
64
  }
55
65
 
66
+ /**
67
+ * @internal
68
+ */
56
69
  declare interface BackgroundImageAsset extends Asset {
57
70
  css?: string;
58
71
  x?: number;
@@ -68,33 +81,14 @@ declare interface CharData extends UnitData, FontData {
68
81
  char?: string;
69
82
  }
70
83
 
71
- export declare const Check: FC<CheckProps>;
72
-
73
- export declare interface CheckProps {
74
- label?: ReactNode;
75
- labelTitle?: string;
76
- value: boolean;
77
- onValueChange?(value: boolean): void;
78
- styles?: CheckStyles;
79
- }
80
-
81
- export declare interface CheckStyles {
82
- container?: Interpolation;
83
- containerDisabled?: Interpolation;
84
- track?: Interpolation;
85
- trackChecked?: Interpolation;
86
- button?: Interpolation;
87
- buttonChecked?: Interpolation;
88
- }
89
-
90
84
  export declare const CheckWidget: FC<CheckWidgetProps>;
91
85
 
92
86
  export declare interface CheckWidgetProps {
93
87
  widget: ParameterWidget;
94
- value: any;
88
+ value: ParameterValue;
95
89
  onValueChange?(value: boolean): void;
96
90
  withoutName?: boolean;
97
- styles?: CheckStyles;
91
+ description?: string | RegionalText;
98
92
  }
99
93
 
100
94
  /**
@@ -116,21 +110,30 @@ declare interface ColorData {
116
110
  export declare const ColorPicker: FC<ColorPickerProps>;
117
111
 
118
112
  export declare interface ColorPickerProps {
113
+ position?: WidgetPosition;
119
114
  label?: ReactNode;
115
+ /**
116
+ * @deprecated use `description` instead
117
+ */
120
118
  labelTitle?: string;
119
+ description?: string;
121
120
  value: IColor;
122
121
  colorFactory(hexString: string): IColor;
123
122
  onValueChange?(value: IColor): void;
124
123
  }
125
124
 
125
+ export declare const ColorsContext: Context<string[] | null>;
126
+
126
127
  export declare const ColorWidget: FC<ColorWidgetProps>;
127
128
 
128
129
  export declare interface ColorWidgetProps {
130
+ position?: WidgetPosition;
129
131
  widget: ParameterWidget;
130
- value: any;
132
+ value: ParameterValue;
131
133
  colorFactory(hexString: string): IColor;
132
134
  onValueChange?(value: IColor): void;
133
135
  withoutName?: boolean;
136
+ description?: string | RegionalText;
134
137
  }
135
138
 
136
139
  /**
@@ -141,6 +144,9 @@ export declare interface ColorWidgetProps {
141
144
  */
142
145
  declare type DataLoaderListener = VideoLoaderListener & SongLoaderListener & TextLoaderListener & FontLoaderListener;
143
146
 
147
+ /**
148
+ * @public
149
+ */
144
150
  declare interface DecomposedProps {
145
151
  x?: number;
146
152
  y?: number;
@@ -151,6 +157,9 @@ declare interface DecomposedProps {
151
157
  rotation?: number;
152
158
  }
153
159
 
160
+ /**
161
+ * @internal
162
+ */
154
163
  declare interface EndpointData {
155
164
  fallback: {
156
165
  protocol: string;
@@ -164,6 +173,17 @@ declare interface EndpointData {
164
173
  protocol?: string;
165
174
  domain: string;
166
175
  server?: string;
176
+ appToken?: string;
177
+ authUser?: string;
178
+ authToken?: string;
179
+ };
180
+ content: {
181
+ protocol?: string;
182
+ domain: string;
183
+ server?: string;
184
+ };
185
+ client: {
186
+ version?: string;
167
187
  };
168
188
  }
169
189
 
@@ -173,20 +193,21 @@ declare interface EndpointData {
173
193
  * Find options for sorted timed objects
174
194
  * @public
175
195
  */
176
- declare interface FindTimedObjectOptions {
196
+ declare type FindTimedObjectOptions = {
177
197
  /**
178
198
  * 指定された場合、探索対象の時刻とこの時刻情報がなす区間と重複する時刻付きオブジェクトを返す
179
199
  *
180
200
  * When specified, find an object that overlaps with the specified range rather than the timing
181
201
  */
182
202
  endTime?: number;
203
+ } | {
183
204
  /**
184
205
  * 指定された場合、時刻付きオブジェクトは必ずしも探索対象の時刻を含んでいなくてもよい(二分探索の結果をそのまま返す)
185
206
  *
186
207
  * When specified, an object does not need to contain the specified timing (result from the binary tree search is always returned)
187
208
  */
188
209
  loose?: boolean;
189
- }
210
+ };
190
211
 
191
212
  /**
192
213
  * @public
@@ -197,13 +218,23 @@ declare interface FontData {
197
218
  fontStyle?: string;
198
219
  }
199
220
 
221
+ export declare const FontFamilyDropdown: FC<FontFamilyDropdownProps>;
222
+
223
+ export declare interface FontFamilyDropdownProps extends Omit<SelectDropdownProps, "options"> {
224
+ value: string;
225
+ onValueChange?(value: string): void;
226
+ withPrivate?: boolean;
227
+ }
228
+
200
229
  export declare const FontFamilyWidget: FC<FontFamilyWidgetProps>;
201
230
 
202
231
  export declare interface FontFamilyWidgetProps {
203
232
  widget: ParameterWidget;
204
233
  value: any;
205
234
  onValueChange?(value: ParameterValue): void;
235
+ withPrivate?: boolean;
206
236
  withoutName?: boolean;
237
+ description?: string | RegionalText;
207
238
  }
208
239
 
209
240
  /**
@@ -237,10 +268,21 @@ declare interface FontInfo {
237
268
  * URL of the CSS file
238
269
  */
239
270
  url?: string;
271
+ /**
272
+ * CSSのURL (頻出文字のみを抽出したサブセット)
273
+ *
274
+ * URL of the CSS file (Subset fonts for frequently-used chars)
275
+ */
276
+ compactUrl?: string;
277
+ /**
278
+ * プライベートフォントか否か
279
+ */
280
+ isPrivate?: boolean;
240
281
  /**
241
282
  * モリサワ TypeSquare フォントか否か
242
283
  *
243
284
  * Whether this font is provided by Morisawa TypeSquare or not
285
+ * @internal
244
286
  */
245
287
  typesquare?: boolean;
246
288
  /**
@@ -256,6 +298,12 @@ declare interface FontInfo {
256
298
  * @internal
257
299
  */
258
300
  typekit?: boolean;
301
+ /**
302
+ * フォントのグループ名
303
+ *
304
+ * Optional font group name
305
+ */
306
+ group?: string;
259
307
  }
260
308
 
261
309
  /**
@@ -285,12 +333,12 @@ declare interface FontLoadingError extends Error {
285
333
  export declare const FontsContext: Context<FontInfo[] | null>;
286
334
 
287
335
  /**
288
- * @public
336
+ * @internal
289
337
  */
290
338
  declare type GraphicData = UnitData;
291
339
 
292
340
  /**
293
- * @public
341
+ * @internal
294
342
  */
295
343
  declare interface GraphicsDriver {
296
344
  /**
@@ -353,20 +401,32 @@ declare interface GraphicsDriver {
353
401
 
354
402
  export declare const GraphicsDriverContext: Context<GraphicsDriver | null>;
355
403
 
404
+ /**
405
+ * @internal
406
+ */
356
407
  declare interface IAssetLicenceLoader {
357
408
  read(url: string, skipOptoutCheck?: boolean): Promise<Asset>;
358
409
  }
359
410
 
411
+ /**
412
+ * @internal
413
+ */
360
414
  declare interface IAssetURLManager {
361
415
  isUploaderAsset(asset: Asset): boolean;
362
416
  isPiaproAsset(asset: Asset): boolean;
363
417
  }
364
418
 
419
+ /**
420
+ * @internal
421
+ */
365
422
  declare interface IBackgroundAssetManager {
366
423
  checkBackgroundImageLicense(license: AssetLicense): boolean;
367
424
  getQueryParameter(backgroundImage: BackgroundImageAsset): string;
368
425
  }
369
426
 
427
+ /**
428
+ * @internal
429
+ */
370
430
  declare interface IBackgroundGraphicsLoader {
371
431
  readonly background: BackgroundImageAsset;
372
432
  readonly defaultBackgroundCss: string;
@@ -377,12 +437,19 @@ declare interface IBackgroundGraphicsLoader {
377
437
  exportPartialVideoEntry(options: VideoExportOptions): Partial<VideoEntry>;
378
438
  }
379
439
 
440
+ /**
441
+ * @internal
442
+ */
380
443
  declare type IBackgroundPlayer = IBackgroundURLManager & IAssetURLManager & IBackgroundAssetManager & IAssetLicenceLoader;
381
444
 
445
+ /**
446
+ * @internal
447
+ */
382
448
  declare interface IBackgroundURLManager {
383
449
  isBlankBackgroundAsset(background: BackgroundImageAsset): boolean;
384
450
  isBackgroundColorAsset(background: BackgroundImageAsset): boolean;
385
451
  isBackgroundPiaproImageAsset(background: BackgroundImageAsset): boolean;
452
+ isBackgroundRawImageAsset(background: BackgroundImageAsset): boolean;
386
453
  isBackgroundSpecialImageAsset(background: BackgroundImageAsset): boolean;
387
454
  }
388
455
 
@@ -391,9 +458,7 @@ declare interface IBackgroundURLManager {
391
458
  * @public
392
459
  */
393
460
  declare interface IBeat extends TimedObject {
394
- /**
395
- * @inheritDoc
396
- */
461
+ /** @inheritDoc */
397
462
  readonly endTime: number;
398
463
  /** ビート間隔 [ms] / Duration [ms] */
399
464
  readonly duration: number;
@@ -417,24 +482,15 @@ declare interface IBeat extends TimedObject {
417
482
  }
418
483
 
419
484
  /**
485
+ * 文字 / Character
420
486
  * @public
421
487
  */
422
488
  declare interface IChar extends ITextUnit {
423
- /**
424
- * @inheritDoc
425
- */
426
- animate: RenderingUnitFunction<IChar>;
427
- /**
428
- * @inheritDoc
429
- */
489
+ /** @inheritDoc */
430
490
  readonly parent: IWord;
431
- /**
432
- * @inheritDoc
433
- */
491
+ /** @inheritDoc */
434
492
  readonly previous: IChar;
435
- /**
436
- * @inheritDoc
437
- */
493
+ /** @inheritDoc */
438
494
  readonly next: IChar;
439
495
  }
440
496
 
@@ -481,8 +537,14 @@ declare interface IColor {
481
537
  value: number;
482
538
  /** 色情報の16進数表現 (RGB) / Hex string (RGB) */
483
539
  readonly rgb: string;
484
- /** 色情報の16進数表現 (RGBA) / Hex string (RGBA) */
540
+ /** 色情報のCSS互換表現 (RGB; e.g., rgba(17,34,51)) / Color info in CSS-compatible format (RGB; e.g., rgba(17,34,51)) */
541
+ readonly cssRgb: string;
542
+ /** 色情報の16進数表現 (RGBA; e.g., #11223300) / Hex string (RGBA; e.g., #11223300) */
485
543
  readonly rgba: string;
544
+ /** 色情報の16進数表現 (ARGB; e.g., 0x00112233) / Hex string (ARGB; e.g., 0x00112233) */
545
+ readonly argb: string;
546
+ /** 色情報のCSS互換表現 (RGBA; e.g., rgba(17,34,51,0)) / Color info in CSS-compatible format (RGBA; e.g., rgba(17,34,51,0)) */
547
+ readonly cssRgba: string;
486
548
  /**
487
549
  * @param color - 色情報 / Color
488
550
  * @returns 色情報が一致するか否か / Whether the specified color info matches the current info
@@ -503,9 +565,9 @@ declare interface IColor {
503
565
  */
504
566
  from(color: string | number | IColor): void;
505
567
  /**
506
- * 色情報をセットする
568
+ * 16進数で表された文字情報の色情報をセットする
507
569
  *
508
- * Set color info
570
+ * Set color info (Hex string RGB or RGBA e.g., #123 or #11223300)
509
571
  * @param color - 色情報の文字列表現 / Information source in string
510
572
  */
511
573
  fromString(color: string): void;
@@ -513,43 +575,56 @@ declare interface IColor {
513
575
  * 色情報をセットする
514
576
  *
515
577
  * Set color info
516
- * @param val - 色情報の数値表現 / Information source in number
578
+ * @param val - 色情報の数値表現 (32 bit ARGB または 24 bit RGB) / Information source in number (32 bit ARGB or 24 bit RGB)
517
579
  * @param withAlpha - 透明度付きか否か / Whether alpha value is included or not
518
580
  */
519
581
  fromNumber(val: number, withAlpha?: boolean): void;
520
582
  }
521
583
 
522
584
  /**
523
- * **IDataLoader**
524
- *
525
- * 読み込まれている音楽地図などの情報
585
+ * 読み込まれている音楽地図や歌詞などの情報にアクセスするためのインタフェース
526
586
  *
527
- * Current video materials
587
+ * This interface provides access to song map and lyrics information.
528
588
  * @public
529
589
  */
530
590
  declare interface IDataLoader extends ISongExplorer {
531
591
  /** TextAlive サービスのURL / TextAlive website url */
532
592
  readonly permalink: string;
533
- /** 動画データ / Video data */
593
+ /**
594
+ * 動画データ / Video data
595
+ * @internal
596
+ */
534
597
  readonly video: VideoEntry;
535
598
  /** 楽曲情報 / Song info */
536
599
  readonly song: Song;
537
- /** 楽曲の解析ステータス / Song analysis status */
600
+ /**
601
+ * 楽曲の解析ステータス / Song analysis status
602
+ * @internal
603
+ */
538
604
  readonly songStatus: SongStatus;
539
605
  /** 音楽地図情報 / Song map info */
540
606
  readonly songMap: ISongMap;
541
- /** 歌詞の発声タイミング推定ID / Lyrics timing estimation ID */
607
+ /**
608
+ * 歌詞の発声タイミング推定ID / Lyrics timing estimation ID
609
+ * @deprecated Use {@link LyricsInfo.id} property instead
610
+ */
542
611
  readonly lyricsId: number;
543
612
  /** 歌詞の発声タイミング情報 / Lyrics timing info */
544
- readonly lyrics: LyricsDiffInfo;
613
+ readonly lyrics: LyricsInfo;
545
614
  /** 歌詞の情報 / Lyrics info */
546
615
  readonly lyricsBody: LyricsBody;
547
- /** 歌詞テキスト / Lyrics text */
616
+ /**
617
+ * 歌詞テキスト / Lyrics text
618
+ * @deprecated Use {@link LyricsBody.text} property instead
619
+ */
548
620
  readonly text: string;
549
621
  /** フォントの読み込みステータス / Font loading status */
550
622
  readonly fonts: IFontLoader;
551
623
  }
552
624
 
625
+ /**
626
+ * @internal
627
+ */
553
628
  declare interface IEndpointManager extends EndpointData {
554
629
  songle: {
555
630
  protocol?: string;
@@ -560,6 +635,13 @@ declare interface IEndpointManager extends EndpointData {
560
635
  protocol: string;
561
636
  domain: string;
562
637
  server: string;
638
+ appToken?: string;
639
+ authUser?: string;
640
+ authToken?: string;
641
+ };
642
+ client: {
643
+ version: string;
644
+ axios?: any;
563
645
  };
564
646
  }
565
647
 
@@ -615,16 +697,24 @@ declare interface IFont {
615
697
  toString(scaleFactor?: number): string;
616
698
  }
617
699
 
700
+ /**
701
+ * @internal
702
+ */
618
703
  declare interface IFontInfoManager {
619
704
  endpoint: string;
705
+ clearCache(): void;
620
706
  getFrequentChars(): Promise<string>;
621
- listAvailableFonts(): Promise<FontInfo[]>;
707
+ listAvailableFonts(options?: ListAvailableFontsOptions): Promise<FontInfo[]>;
622
708
  }
623
709
 
624
710
  /**
625
711
  * @public
626
712
  */
627
713
  declare interface IFontLoader {
714
+ /**
715
+ * プライベートフォントを対象に含めるかどうか / Whether private fonts are included
716
+ */
717
+ isPrivateFontEnabled: boolean;
628
718
  /**
629
719
  * 読み込みに失敗したフォントの一覧 / List of fonts failed to load
630
720
  */
@@ -658,6 +748,7 @@ declare interface IFontLoader {
658
748
  * Load all required fonts to render the specified video data
659
749
  * @param json - 動画データ / Video data
660
750
  * @returns 読み込まれたフォントの一覧 / List of loaded fonts
751
+ * @internal
661
752
  */
662
753
  loadForVideo(json: VideoData): Promise<FontInfo[]>;
663
754
  /**
@@ -666,36 +757,36 @@ declare interface IFontLoader {
666
757
  * List up required fonts to render the specified video data
667
758
  * @param json - 動画データ / Video data
668
759
  * @returns フォント名の一覧 / List of font family names
760
+ * @internal
669
761
  */
670
762
  listFontFamiliesInVideo(json: VideoData): string[];
671
763
  /**
672
764
  * 利用可能なフォントの一覧を取得する
673
765
  *
674
766
  * List up all available fonts
767
+ * @param options - オプション / Options
675
768
  * @returns フォントの一覧 / List of fonts
769
+ * @internal
676
770
  */
677
- listAvailableFonts(): Promise<FontInfo[]>;
771
+ listAvailableFonts(options?: ListAvailableFontsOptions): Promise<FontInfo[]>;
678
772
  }
679
773
 
680
774
  /**
681
- * @public
775
+ * グラフィック / Graphic
776
+ * @internal
682
777
  */
683
778
  declare interface IGraphic extends IRenderingUnit {
684
- /**
685
- * @inheritDoc
686
- */
687
- animate: RenderingUnitFunction<IGraphic>;
688
- /**
689
- * @inheritDoc
690
- */
779
+ /** @inheritDoc */
691
780
  readonly previous: IGraphic;
692
- /**
693
- * @inheritDoc
694
- */
781
+ /** @inheritDoc */
695
782
  readonly next: IGraphic;
696
783
  }
697
784
 
785
+ /**
786
+ * @internal
787
+ */
698
788
  declare interface ILyricsBodyFetcher {
789
+ clearLyricBodyCache(): void;
699
790
  parseLyricBody(text: string, parserUrl: string): Promise<string>;
700
791
  fetchLyricBody(lyricUrl: string, options: {
701
792
  parserPath: string;
@@ -704,18 +795,31 @@ declare interface ILyricsBodyFetcher {
704
795
  fetchLocalLyricBody(lyricIdOrSongCode: number | string): Promise<LyricsBody>;
705
796
  }
706
797
 
798
+ /**
799
+ * @internal
800
+ */
707
801
  declare interface ILyricsDiffManager {
708
802
  loadDiffs(songCode: string, lyricsId: number): Promise<LyricsDiffs>;
709
803
  loadDiff(songCode: string, lyricsId: number, diffId: number): Promise<LyricsDiffInfo>;
710
804
  }
711
805
 
806
+ /**
807
+ * @internal
808
+ */
712
809
  declare interface ILyricsLoader {
810
+ clearCache(): void;
713
811
  load(songCode: string): Promise<SongleLyrics>;
714
812
  loadDetail(songCode: string, lyricsId: number): Promise<LyricsInfo>;
715
813
  }
716
814
 
815
+ /**
816
+ * @internal
817
+ */
717
818
  declare type ILyricsPlayer = ILyricsURLManager & ILyricsDiffManager & ILyricsBodyFetcher & ILyricsLoader;
718
819
 
820
+ /**
821
+ * @internal
822
+ */
719
823
  declare interface ILyricsURLManager {
720
824
  isUploaderUrl(url: string): boolean;
721
825
  parseUploaderUrl(url: string): {
@@ -775,8 +879,10 @@ declare interface IMatrix2D {
775
879
  * Generates matrix properties from the specified display object transform properties, and appends them to this matrix.
776
880
  * For example, you can use this to generate a matrix representing the transformations of a display object:
777
881
  *
882
+ * ```
778
883
  * var mtx = new createjs.Matrix2D();
779
884
  * mtx.appendTransform(o.x, o.y, o.scaleX, o.scaleY, o.rotation);
885
+ * ```
780
886
  * @param x
781
887
  * @param y
782
888
  * @param scaleX
@@ -845,12 +951,14 @@ declare interface IMatrix2D {
845
951
  * This is the equivalent of multiplying `(specified matrix) * (this matrix)`.
846
952
  * For example, you could calculate the combined transformation for a child object using:
847
953
  *
954
+ * ```
848
955
  * var o = myDisplayObject;
849
956
  * var mtx = o.getMatrix();
850
957
  * while (o = o.parent) {
851
958
  * // prepend each parent's transformation in turn:
852
959
  * o.prependMatrix(o.getMatrix());
853
960
  * }
961
+ * ```
854
962
  * @param matrix
855
963
  * @returns This matrix. Useful for chaining method calls.
856
964
  */
@@ -859,15 +967,14 @@ declare interface IMatrix2D {
859
967
  * Generates matrix properties from the specified display object transform properties, and prepends them to this matrix.
860
968
  * For example, you could calculate the combined transformation for a child object using:
861
969
  *
862
- * var o = myDisplayObject;
863
- * var mtx = new createjs.Matrix2D();
864
- * do {
865
- * // prepend each parent's transformation in turn:
866
- * mtx.prependTransform(o.x, o.y, o.scaleX, o.scaleY, o.rotation, o.skewX, o.skewY, o.regX, o.regY);
867
- * } while (o = o.parent);
868
- *
869
- * Note that the above example would not account for {@link https://www.createjs.com/docs/easeljs/classes/DisplayObject.html#property_transformMatrix}
870
- * values. See {@link IMatrix2D.prependMatrix} for an example that does.
970
+ * ```
971
+ * var o = myDisplayObject;
972
+ * var mtx = new createjs.Matrix2D();
973
+ * do {
974
+ * // prepend each parent's transformation in turn:
975
+ * mtx.prependTransform(o.x, o.y, o.scaleX, o.scaleY, o.rotation, o.skewX, o.skewY, o.regX, o.regY);
976
+ * } while (o = o.parent);
977
+ * ```
871
978
  * @param x
872
979
  * @param y
873
980
  * @param scaleX
@@ -934,24 +1041,15 @@ declare interface IMatrix2D {
934
1041
  }
935
1042
 
936
1043
  /**
1044
+ * フレーズ / Phrase
937
1045
  * @public
938
1046
  */
939
1047
  declare interface IPhrase extends ITextUnit {
940
- /**
941
- * @inheritDoc
942
- */
943
- animate: RenderingUnitFunction<IPhrase>;
944
- /**
945
- * @inheritDoc
946
- */
1048
+ /** @inheritDoc */
947
1049
  readonly children: IWord[];
948
- /**
949
- * @inheritDoc
950
- */
1050
+ /** @inheritDoc */
951
1051
  readonly previous: IPhrase;
952
- /**
953
- * @inheritDoc
954
- */
1052
+ /** @inheritDoc */
955
1053
  readonly next: IPhrase;
956
1054
  readonly wordCount: number;
957
1055
  readonly charCount: number;
@@ -965,9 +1063,9 @@ declare interface IPhrase extends ITextUnit {
965
1063
  /**
966
1064
  * **IPlayer**
967
1065
  *
968
- * TextAlive のプレイヤーが実装するインタフェースです。
1066
+ * Player の機能を抽象化したインタフェースです。
969
1067
  *
970
- * TextAlive Player implements this interface.
1068
+ * This interface provides abstraction of the Player features.
971
1069
  * @public
972
1070
  */
973
1071
  declare interface IPlayer {
@@ -978,15 +1076,15 @@ declare interface IPlayer {
978
1076
  */
979
1077
  readonly options: PlayerOptions;
980
1078
  /**
981
- * TextAlive アプリの状態
1079
+ * リリックアプリの状態
982
1080
  *
983
- * TextAlive app status
1081
+ * Lyric app status
984
1082
  */
985
1083
  readonly app: IPlayerApp;
986
1084
  /**
987
- * 読み込まれている音楽地図などの情報
1085
+ * 読み込み済みの音楽地図など楽曲に関する情報
988
1086
  *
989
- * Current video materials
1087
+ * Current song map and other information related to the musical piece
990
1088
  */
991
1089
  readonly data: IDataLoader;
992
1090
  /**
@@ -1034,6 +1132,8 @@ declare interface IPlayer {
1034
1132
  * 音源メディアの配置先となるDOM要素
1035
1133
  *
1036
1134
  * Media element
1135
+ *
1136
+ * @see {@link IPlayer.banner}
1037
1137
  */
1038
1138
  mediaElement: HTMLElement;
1039
1139
  /**
@@ -1173,13 +1273,13 @@ declare interface IPlayer {
1173
1273
  */
1174
1274
  readonly isVideoSeeking: boolean;
1175
1275
  /**
1176
- * TextAlive Player の情報を表示する `IPlayerBanner` インスタンスです。
1276
+ * Player の情報を表示する `IPlayerBanner` インスタンスです。
1177
1277
  *
1178
1278
  * A banner instance that shows the player info.
1179
1279
  */
1180
1280
  readonly banner: IPlayerBanner;
1181
1281
  /**
1182
- * TextAlive Player の音源の再生状態を管理する `Timer` インスタンスです。
1282
+ * Player の音源の再生状態を管理する `Timer` インスタンスです。
1183
1283
  *
1184
1284
  * A timer instance that controls the player status.
1185
1285
  */
@@ -1298,7 +1398,7 @@ declare interface IPlayer {
1298
1398
  * Get chorus parts in the current song
1299
1399
  *
1300
1400
  * @see {@link IDataLoader.getChoruses}
1301
- * @returns サビ情報(見つからなければ空の配列)
1401
+ * @returns サビ情報(見つからなければ空の配列) / Chorus parts (empty array if not found)
1302
1402
  */
1303
1403
  getChoruses(): IRepetitiveSegment[];
1304
1404
  /**
@@ -1308,21 +1408,32 @@ declare interface IPlayer {
1308
1408
  *
1309
1409
  * @see {@link IDataLoader.findChorus}
1310
1410
  * @param time - 位置 [ms] / Position [ms]
1311
- * @param options - optional parameters for finding a chorus part
1312
- * @returns サビ情報(見つからなければ `null`)
1411
+ * @param options - 取得オプション / Optional parameters for finding a chorus part
1412
+ * @returns サビ情報(見つからなければ `null`) / Chorus part info (`null` if not found)
1313
1413
  */
1314
1414
  findChorus(time: number, options?: PlayerFindOptions): IRepetitiveSegment;
1315
1415
  /**
1316
1416
  * @deprecated Use of {@link IPlayer.findChorusBetween} is deprecated - find a chorus part with {@link IPlayer.findChorus} instead.
1317
1417
  */
1318
1418
  findChorusBetween(startTime: number, endTime: number): IRepetitiveSegment;
1419
+ /**
1420
+ * 指定された時区間のサビ情報の変化を取得する
1421
+ *
1422
+ * Look for chorus part transitions in the specified time range
1423
+ *
1424
+ * @see {@link IDataLoader.findChorusChange}
1425
+ * @param startTime - 時区間の開始位置 [ms] / Start position [ms]
1426
+ * @param endTime - 時区間の終了位置 [ms] / End position [ms]
1427
+ * @returns サビ情報の変化 / Chorus part transitions
1428
+ */
1429
+ findChorusChange(startTime: number, endTime: number): TimedObjectsInRange<IRepetitiveSegment>;
1319
1430
  /**
1320
1431
  * 楽曲中のビートに関する情報を取得する
1321
1432
  *
1322
1433
  * Get beats in the current song
1323
1434
  *
1324
1435
  * @see {@link IDataLoader.getBeats}
1325
- * @returns ビート情報(見つからなければ空の配列)
1436
+ * @returns ビート情報(見つからなければ空の配列) / Beats (empty array if not found)
1326
1437
  */
1327
1438
  getBeats(): IBeat[];
1328
1439
  /**
@@ -1332,17 +1443,28 @@ declare interface IPlayer {
1332
1443
  *
1333
1444
  * @see {@link IDataLoader.findBeat}
1334
1445
  * @param time - 位置 [ms] / Position [ms]
1335
- * @param options - 探索オプション / Optional parameters for finding beat
1336
- * @returns ビート情報(見つからなければ `null`)
1446
+ * @param options - 取得オプション / Optional parameters for finding beat
1447
+ * @returns ビート情報(見つからなければ `null`) / Beat info (`null` if not found)
1337
1448
  */
1338
1449
  findBeat(time: number, options?: PlayerFindOptions): IBeat;
1450
+ /**
1451
+ * 指定された時区間のビート情報の変化を取得する
1452
+ *
1453
+ * Look for beat transitions in the specified time range
1454
+ *
1455
+ * @see {@link IDataLoader.findBeatChange}
1456
+ * @param startTime - 時区間の開始位置 [ms] / Start position [ms]
1457
+ * @param endTime - 時区間の終了位置 [ms] / End position [ms]
1458
+ * @returns ビート情報の変化 / Beat transitions
1459
+ */
1460
+ findBeatChange(startTime: number, endTime: number): TimedObjectsInRange<IBeat>;
1339
1461
  /**
1340
1462
  * 楽曲中のコード進行に関する情報を取得する
1341
1463
  *
1342
1464
  * Get chord info in the current song
1343
1465
  *
1344
1466
  * @see {@link IDataLoader.getChords}
1345
- * @returns コード進行の情報(見つからなければ空の配列)
1467
+ * @returns コード進行の情報(見つからなければ空の配列) / Chord info (empty array if not found)
1346
1468
  */
1347
1469
  getChords(): IChord[];
1348
1470
  /**
@@ -1353,18 +1475,29 @@ declare interface IPlayer {
1353
1475
  * @see {@link IDataLoader.findChord}
1354
1476
  * @param time - 位置 [ms] / Position [ms]
1355
1477
  * @param options - 探索オプション / Optional parameters for finding chord
1356
- * @returns コード進行(見つからなければ `null`)
1478
+ * @returns コード進行(見つからなければ `null`) / Chord info (`null` if not found)
1357
1479
  */
1358
1480
  findChord(time: number, options?: PlayerFindOptions): IChord;
1481
+ /**
1482
+ * 指定された時区間のコード進行の変化を取得する
1483
+ *
1484
+ * Look for chord progressions in the specified time range
1485
+ *
1486
+ * @see {@link IDataLoader.findChordChange}
1487
+ * @param startTime - 時区間の開始位置 [ms] / Start position [ms]
1488
+ * @param endTime - 時区間の終了位置 [ms] / End position [ms]
1489
+ * @returns コード進行の変化 / Chord progressions
1490
+ */
1491
+ findChordChange(startTime: number, endTime: number): TimedObjectsInRange<IChord>;
1359
1492
  /**
1360
1493
  * 指定された位置の音高情報を取得する
1361
1494
  *
1362
- * - {@link PlayerOptions.vocalFrequencyEnabled} を `true` にセットしておく必要があります
1495
+ * - 取得するには、あらかじめプレイヤー初期化オプション {@link PlayerOptions.vocalFrequencyEnabled} を `true` にセットしておく必要があります
1363
1496
  * - 今後、仕様変更の可能性があります
1364
1497
  *
1365
1498
  * Get vocal frequency at the specified timing
1366
1499
  *
1367
- * - {@link PlayerOptions.vocalFrequencyEnabled} needs to be `true`
1500
+ * - Constructor option {@link PlayerOptions.vocalFrequencyEnabled} needs to be `true`
1368
1501
  * - This API is subject to change in the future
1369
1502
  *
1370
1503
  * @see {@link IDataLoader.getVocalFrequency}
@@ -1376,8 +1509,14 @@ declare interface IPlayer {
1376
1509
  /**
1377
1510
  * 指定された位置の声量を取得する
1378
1511
  *
1512
+ * - 取得するには、あらかじめプレイヤー初期化オプション {@link PlayerOptions.vocalAmplitudeEnabled} を `true` にセットしておく必要があります
1513
+ * - 返値は 0 以上 {@link IPlayer.getMaxVocalAmplitude} で取得できる最大値以下の値
1514
+ *
1379
1515
  * Get vocal amplitude at the specified timing
1380
1516
  *
1517
+ * - Constructor option {@link PlayerOptions.vocalAmplitudeEnabled} needs to be `true`
1518
+ * - Return value ranges from 0 to the maximum value that can be retrieved by {@link IPlayer.getMaxVocalAmplitude}
1519
+ *
1381
1520
  * @see {@link IDataLoader.getVocalAmplitude}
1382
1521
  * @param time - 位置 [ms] / Position [ms]
1383
1522
  * @returns 声量
@@ -1386,8 +1525,12 @@ declare interface IPlayer {
1386
1525
  /**
1387
1526
  * 楽曲中の最大声量を取得する
1388
1527
  *
1528
+ * - 取得するには、あらかじめプレイヤー初期化オプション {@link PlayerOptions.vocalAmplitudeEnabled} を `true` にセットしておく必要があります
1529
+ *
1389
1530
  * Get maximum vocal amplitude
1390
1531
  *
1532
+ * - Constructor option {@link PlayerOptions.vocalAmplitudeEnabled} needs to be `true`
1533
+ *
1391
1534
  * @see {@link IDataLoader.getMaxVocalAmplitude}
1392
1535
  * @returns 最大声量
1393
1536
  */
@@ -1395,8 +1538,12 @@ declare interface IPlayer {
1395
1538
  /**
1396
1539
  * 指定された位置のV/A空間中の座標を取得する
1397
1540
  *
1541
+ * - 取得するには、あらかじめプレイヤー初期化オプション {@link PlayerOptions.valenceArousalEnabled} を `true` にセットしておく必要があります
1542
+ *
1398
1543
  * Get valence arousal value at the specified timing
1399
1544
  *
1545
+ * - Constructor option {@link PlayerOptions.valenceArousalEnabled} needs to be `true`
1546
+ *
1400
1547
  * @see {@link IDataLoader.getValenceArousal}
1401
1548
  * @param time - 位置 [ms] / Position [ms]
1402
1549
  * @returns 座標値
@@ -1405,8 +1552,12 @@ declare interface IPlayer {
1405
1552
  /**
1406
1553
  * V/A空間中の座標遷移の中央値を取得する
1407
1554
  *
1555
+ * - 取得するには、あらかじめプレイヤー初期化オプション {@link PlayerOptions.valenceArousalEnabled} を `true` にセットしておく必要があります
1556
+ *
1408
1557
  * Get median valence arousal value throughout the song
1409
1558
  *
1559
+ * - Constructor option {@link PlayerOptions.valenceArousalEnabled} needs to be `true`
1560
+ *
1410
1561
  * @see {@link IDataLoader.getMedianValenceArousal}
1411
1562
  * @returns 座標値
1412
1563
  */
@@ -1510,18 +1661,42 @@ declare interface IPlayer {
1510
1661
  }
1511
1662
 
1512
1663
  /**
1513
- * TextAlive アプリの情報
1664
+ * リリックアプリの情報
1514
1665
  *
1515
- * TextAlive app information
1666
+ * Lyric app information
1516
1667
  * @public
1517
1668
  */
1518
1669
  declare interface IPlayerApp {
1519
1670
  /**
1520
- * TextAlive アプリのオプション
1671
+ * リリックアプリのオプション
1521
1672
  *
1522
- * TextAlive app options
1673
+ * Lyric app options
1523
1674
  */
1524
1675
  readonly options: PlayerAppOptions;
1676
+ /**
1677
+ * アプリの名前
1678
+ *
1679
+ * Name of this application
1680
+ */
1681
+ name: string;
1682
+ /**
1683
+ * アプリ作者の名前
1684
+ *
1685
+ * Name of the author of this application
1686
+ */
1687
+ author: string;
1688
+ /**
1689
+ * アプリの状態
1690
+ *
1691
+ * Status of this application
1692
+ */
1693
+ status: number;
1694
+ /**
1695
+ * TextAlive API サーバの情報
1696
+ *
1697
+ * TextAlive server info
1698
+ */
1699
+ readonly server: PlayerAppServer;
1525
1700
  /**
1526
1701
  * TextAlive のホストに接続されているか否か
1527
1702
  *
@@ -1535,13 +1710,19 @@ declare interface IPlayerApp {
1535
1710
  */
1536
1711
  readonly host: PlayerAppHost;
1537
1712
  /**
1538
- * クエリパラメタなどによりホストから指定されている再生対象の楽曲URL
1713
+ * クエリパラメタまたはTextAliveホストにより指定されている再生対象の楽曲URL
1714
+ *
1715
+ * - アプリは起動時にクエリパラメタを調べ、楽曲が指定されていれば自動的に {@link IPlayer.createFromSongUrl} で楽曲情報の読み込みを開始します(ホストに接続されていても、クエリパラメタによる指定がなければ空になります)
1716
+ * - アプリがTextAliveホストに接続されると、ホストの指示により楽曲が上書きされることがあります(この後に {@link PlayerAppListener.onAppMediaChange} イベントが呼ばれます)
1539
1717
  *
1540
1718
  * Song url specified by the query parameter or updated by the media message
1719
+ *
1720
+ * - During the initialization of this app, it automatically looks for the song URL in the query parameter. When the song URL is specified, it loads the song by calling {@link IPlayer.createFromSongUrl}.
1721
+ * - When the app is connected to a host, the host might overwrite the song URL, resulting in the {@link PlayerAppListener.onAppMediaChange} event.
1541
1722
  */
1542
1723
  readonly songUrl: string;
1543
1724
  /**
1544
- * クエリパラメタなどによりホストから指定されている楽曲データの読み込みオプション
1725
+ * クエリパラメタまたはTextAliveホストにより指定されている楽曲データの読み込みオプション
1545
1726
  *
1546
1727
  * Options to load song data specified by the query parameter or updated by the media message
1547
1728
  */
@@ -1555,7 +1736,7 @@ declare interface IPlayerApp {
1555
1736
  /**
1556
1737
  * ホストへの接続中か否か
1557
1738
  *
1558
- * Whether the player is connecting to a host
1739
+ * Whether the player is trying to connect to a host
1559
1740
  */
1560
1741
  readonly isConnecting: boolean;
1561
1742
  /**
@@ -1574,6 +1755,24 @@ declare interface IPlayerApp {
1574
1755
  connect(): Promise<boolean>;
1575
1756
  }
1576
1757
 
1758
+ /**
1759
+ * **IPlayerBanner**
1760
+ *
1761
+ * Player の情報を表示する `IPlayerBanner` インスタンスです。Webブラウザで実行されると以下のようなDOM要素が生成されます。
1762
+ *
1763
+ * - CSSクラス `textalive-banner` を持つ {@link IPlayer.mediaElement} の子要素になります
1764
+ * - TextAliveサービスサイトへのリンクになっているアイコンを子要素に持ちます
1765
+ * - 楽曲配信元へのリンクになっているCSSクラス `song` を持つアンカーを子要素に持ちます
1766
+ * - 歌詞配信元へのリンクになっているCSSクラス `lyrics` を持つアンカーを子要素に持ちます
1767
+ *
1768
+ * A banner instance that shows the player info. When executed in a web browser, the banner is shown as a DOM element with the following conditions.
1769
+ *
1770
+ * - The banner is shown as a child element of {@link IPlayer.mediaElement} with the CSS class `textalive-banner`
1771
+ * - The banner contains an icon link to the TextAlive website
1772
+ * - The banner contains an anchor to the song URL with the CSS class `song`
1773
+ * - The banner also contains an anchor to the lyrics URL with the CSS class `lyrics`
1774
+ * @public
1775
+ */
1577
1776
  declare interface IPlayerBanner {
1578
1777
  readonly domEnabled: boolean;
1579
1778
  position: PlayerBannerPosition;
@@ -1588,7 +1787,7 @@ declare interface IPlayerBanner {
1588
1787
  * TextAlive の各種APIアクセスを司るマネージャのコレクションです。
1589
1788
  *
1590
1789
  * TextAlive manager instances.
1591
- * @public
1790
+ * @internal
1592
1791
  */
1593
1792
  declare interface IPlayerManagers {
1594
1793
  asset?: IBackgroundPlayer;
@@ -1660,12 +1859,6 @@ declare interface IPoint {
1660
1859
  * @public
1661
1860
  */
1662
1861
  declare interface IRenderingUnit extends TimedObject {
1663
- /**
1664
- * このプロパティに関数が定義されているとき、 TextAlive の通常動作(割り当て済みテンプレートの `animate` 関数を呼ぶ)はスキップされ、この関数が呼ばれる
1665
- *
1666
- * When `animate` function is defined, TextAlive default behavior (call `animate` functions of all assigned template instances) is suppressed and this function is called instead
1667
- */
1668
- animate: RenderingUnitFunction<IRenderingUnit>;
1669
1862
  readonly parent: IRenderingUnit;
1670
1863
  readonly children: IRenderingUnit[];
1671
1864
  readonly previous: IRenderingUnit;
@@ -1688,6 +1881,12 @@ declare interface IRenderingUnit extends TimedObject {
1688
1881
  * @internal
1689
1882
  */
1690
1883
  readonly templateCount: number;
1884
+ /**
1885
+ * このプロパティに関数が定義されているとき、 TextAlive の通常動作(割り当て済みテンプレートの `animate` 関数を呼ぶ)はスキップされ、この関数が呼ばれる
1886
+ *
1887
+ * When `animate` function is defined, TextAlive default behavior (call `animate` functions of all assigned template instances) is suppressed and this function is called instead
1888
+ */
1889
+ animate: RenderingUnitFunction;
1691
1890
  /**
1692
1891
  * 指定された楽曲中の位置をこの描画ユニット中の位置 `[0, 1]` にマッピングして返す
1693
1892
  *
@@ -1769,12 +1968,18 @@ export declare function isJa(profile?: {
1769
1968
  language?: string;
1770
1969
  }): boolean;
1771
1970
 
1971
+ /**
1972
+ * 読み込まれている音楽地図の情報にアクセスするためのインタフェース
1973
+ *
1974
+ * This interface provides access to song map information etc.
1975
+ * @public
1976
+ */
1772
1977
  declare interface ISongExplorer {
1773
1978
  /**
1774
1979
  * 楽曲中のサビに関する情報を取得する
1775
1980
  *
1776
1981
  * Get chorus parts in the current song
1777
- * @returns サビ情報(見つからなければ空の配列)
1982
+ * @returns サビ情報(見つからなければ空の配列) / Chorus parts (empty array if not found)
1778
1983
  */
1779
1984
  getChoruses(): IRepetitiveSegment[];
1780
1985
  /**
@@ -1782,19 +1987,29 @@ declare interface ISongExplorer {
1782
1987
  *
1783
1988
  * Find a chorus part that overlaps with the specified timing
1784
1989
  * @param time - 位置 [ms] / Position [ms]
1785
- * @param options - optional parameters for finding a chorus part
1786
- * @returns サビ情報(見つからなければ `null`)
1990
+ * @param options - 取得オプション / Optional parameters for finding a chorus part
1991
+ * @returns サビ情報(見つからなければ `null`) / Chorus part info (`null` if not found)
1787
1992
  */
1788
1993
  findChorus(time: number, options?: PlayerFindOptions): IRepetitiveSegment;
1789
1994
  /**
1790
1995
  * @deprecated Use of {@link ISongExplorer.findChorusBetween} is deprecated - find a chorus part with {@link ISongExplorer.findChorus} instead.
1791
1996
  */
1792
1997
  findChorusBetween(startTime: number, endTime: number): IRepetitiveSegment;
1998
+ /**
1999
+ * 指定された時区間のサビ情報の変化を取得する
2000
+ *
2001
+ * Look for chorus part transitions in the specified time range
2002
+ *
2003
+ * @param startTime - 時区間の開始位置 [ms] / Start position [ms]
2004
+ * @param endTime - 時区間の終了位置 [ms] / End position [ms]
2005
+ * @returns サビ情報の変化 / Chorus part transitions
2006
+ */
2007
+ findChorusChange(startTime: number, endTime: number): TimedObjectsInRange<IRepetitiveSegment>;
1793
2008
  /**
1794
2009
  * 楽曲中のビートに関する情報を取得する
1795
2010
  *
1796
2011
  * Get beats in the current song
1797
- * @returns ビート情報(見つからなければ空の配列)
2012
+ * @returns ビート情報(見つからなければ空の配列) / Beats (empty array if not found)
1798
2013
  */
1799
2014
  getBeats(): IBeat[];
1800
2015
  /**
@@ -1802,15 +2017,25 @@ declare interface ISongExplorer {
1802
2017
  *
1803
2018
  * Find beat that overlaps with the specified timing
1804
2019
  * @param time - 位置 [ms] / Position [ms]
1805
- * @param options - 探索オプション / Optional parameters for finding beat
1806
- * @returns ビート情報(見つからなければ `null`)
2020
+ * @param options - 取得オプション / Optional parameters for finding beat
2021
+ * @returns ビート情報(見つからなければ `null`) / Beat info (`null` if not found)
1807
2022
  */
1808
2023
  findBeat(time: number, options?: PlayerFindOptions): IBeat;
2024
+ /**
2025
+ * 指定された時区間のビート情報の変化を取得する
2026
+ *
2027
+ * Look for beat transitions in the specified time range
2028
+ *
2029
+ * @param startTime - 時区間の開始位置 [ms] / Start position [ms]
2030
+ * @param endTime - 時区間の終了位置 [ms] / End position [ms]
2031
+ * @returns ビート情報の変化 / Beat transitions
2032
+ */
2033
+ findBeatChange(startTime: number, endTime: number): TimedObjectsInRange<IBeat>;
1809
2034
  /**
1810
2035
  * 楽曲中のコード進行に関する情報を取得する
1811
2036
  *
1812
2037
  * Get chord info in the current song
1813
- * @returns コード進行の情報(見つからなければ空の配列)
2038
+ * @returns コード進行の情報(見つからなければ空の配列) / Chord info (empty array if not found)
1814
2039
  */
1815
2040
  getChords(): IChord[];
1816
2041
  /**
@@ -1818,20 +2043,27 @@ declare interface ISongExplorer {
1818
2043
  *
1819
2044
  * Find chord that overlaps with the specified timing
1820
2045
  * @param time - 位置 [ms] / Position [ms]
1821
- * @param options - 探索オプション / Optional parameters for finding chord
1822
- * @returns コード進行(見つからなければ `null`)
2046
+ * @param options - 探索オプション / Optional parameters for finding a chord
2047
+ * @returns コード進行(見つからなければ `null`) / Chord info (`null` if not found)
1823
2048
  */
1824
2049
  findChord(time: number, options?: PlayerFindOptions): IChord;
1825
2050
  /**
1826
- * 指定された位置の音高情報を取得する
2051
+ * 指定された時区間のコード進行の変化を取得する
1827
2052
  *
1828
- * - {@link PlayerOptions.vocalFrequencyEnabled} を `true` にセットしておく必要があります
1829
- * - 今後、仕様変更の可能性があります
2053
+ * Look for chord progressions in the specified time range
2054
+ *
2055
+ * @param startTime - 時区間の開始位置 [ms] / Start position [ms]
2056
+ * @param endTime - 時区間の終了位置 [ms] / End position [ms]
2057
+ * @returns コード進行の変化 / Chord progressions
2058
+ */
2059
+ findChordChange(startTime: number, endTime: number): TimedObjectsInRange<IChord>;
2060
+ /**
2061
+ * 指定された位置の音高情報を取得する
1830
2062
  *
1831
2063
  * Get vocal frequency at the specified timing
1832
2064
  *
1833
- * - {@link PlayerOptions.vocalFrequencyEnabled} needs to be `true`
1834
- * - This API is subject to change in the future
2065
+ * - このメソッドを使うには {@link Player} の初期化オプション({@link PlayerOptions#vocalFrequencyEnabled} を `true` にする必要があります(今後、仕様変更の可能性があります)
2066
+ * - To use this method, {@link Player} constructor option {@link PlayerOptions#vocalFrequencyEnabled} needs to be `true` (this API is subject to change in the future)
1835
2067
  *
1836
2068
  * @param time - 位置 [ms] / Position [ms]
1837
2069
  * @returns 音高情報
@@ -1842,39 +2074,65 @@ declare interface ISongExplorer {
1842
2074
  * 指定された位置の声量を取得する
1843
2075
  *
1844
2076
  * Get vocal amplitude at the specified timing
2077
+ *
2078
+ * - このメソッドを使うには {@link Player} の初期化オプション({@link PlayerOptions#vocalAmplitudeEnabled} を `true` にする必要があります
2079
+ * - To use this method, {@link Player} constructor option {@link PlayerOptions#vocalAmplitudeEnabled} needs to be `true`
2080
+ *
1845
2081
  * @param time - 位置 [ms] / Position [ms]
1846
2082
  * @returns 声量
2083
+ * @see {@link PlayerOptions}
1847
2084
  */
1848
2085
  getVocalAmplitude(time: number): number;
1849
2086
  /**
1850
2087
  * 楽曲中の最大声量を取得する
1851
2088
  *
1852
2089
  * Get maximum vocal amplitude
2090
+ *
2091
+ * - このメソッドを使うには {@link Player} の初期化オプション({@link PlayerOptions#vocalAmplitudeEnabled} を `true` にする必要があります
2092
+ * - To use this method, {@link Player} constructor option {@link PlayerOptions#vocalAmplitudeEnabled} needs to be `true`
2093
+ *
1853
2094
  * @returns 最大声量
2095
+ * @see {@link PlayerOptions}
1854
2096
  */
1855
2097
  getMaxVocalAmplitude(): number;
1856
2098
  /**
1857
2099
  * 指定された位置のV/A空間中の座標を取得する
1858
2100
  *
1859
2101
  * Get valence arousal value at the specified timing
2102
+ *
2103
+ * - このメソッドを使うには {@link Player} の初期化オプション({@link PlayerOptions#valenceArousalEnabled} を `true` にする必要があります
2104
+ * - To use this method, {@link Player} constructor option {@link PlayerOptions#valenceArousalEnabled} needs to be `true`
2105
+ *
1860
2106
  * @param time - 位置 [ms] / Position [ms]
1861
2107
  * @returns 座標値
2108
+ * @see {@link PlayerOptions}
1862
2109
  */
1863
2110
  getValenceArousal(time: number): ValenceArousalValue;
1864
2111
  /**
1865
2112
  * V/A空間中の座標遷移の中央値を取得する
1866
2113
  *
1867
2114
  * Get median valence arousal value throughout the song
2115
+ *
2116
+ * - このメソッドを使うには {@link Player} の初期化オプション({@link PlayerOptions#valenceArousalEnabled} を `true` にする必要があります
2117
+ * - To use this method, {@link Player} constructor option {@link PlayerOptions#valenceArousalEnabled} needs to be `true`
2118
+ *
1868
2119
  * @returns 座標値
2120
+ * @see {@link PlayerOptions}
1869
2121
  */
1870
2122
  getMedianValenceArousal(): ValenceArousalValue;
1871
2123
  }
1872
2124
 
2125
+ /**
2126
+ * @internal
2127
+ */
1873
2128
  declare interface ISongInfoLoader {
1874
2129
  loadVocalAmplitude(identifier: number | string): Promise<VocalAmplitude>;
1875
2130
  loadValenceArousal(identifier: number | string): Promise<ValenceArousal>;
1876
2131
  }
1877
2132
 
2133
+ /**
2134
+ * @internal
2135
+ */
1878
2136
  declare interface ISongLoader {
1879
2137
  load(q: {
1880
2138
  id?: number;
@@ -1940,14 +2198,21 @@ declare interface ISongMap {
1940
2198
  };
1941
2199
  }
1942
2200
 
2201
+ /**
2202
+ * @internal
2203
+ */
1943
2204
  declare type ISongPlayer = ISongURLManager & ISongLoader & ISongInfoLoader;
1944
2205
 
2206
+ /**
2207
+ * @internal
2208
+ */
1945
2209
  declare interface ISongURLManager {
1946
2210
  getSongPathFromUrl(url: string): string;
1947
2211
  isUploaderUrl(url: string): boolean;
1948
2212
  isUploaderPath(path: string): boolean;
1949
2213
  getUploaderGuid(path: string): string;
1950
2214
  getSongUrlFromUploaderGuid(guid: string): string;
2215
+ getAltSongUrlFromUploaderGuid(guid: string): string;
1951
2216
  getSongUrlFromPath(path: string): string;
1952
2217
  isYouTubeUrl(url: string): boolean;
1953
2218
  isNicovideoUrl(url: string): boolean;
@@ -1955,6 +2220,9 @@ declare interface ISongURLManager {
1955
2220
  isPiaproUrl(url: string): boolean;
1956
2221
  }
1957
2222
 
2223
+ /**
2224
+ * @internal
2225
+ */
1958
2226
  declare interface ITemplate {
1959
2227
  templateClass: ITemplateClass;
1960
2228
  templateInstance: any;
@@ -1963,68 +2231,267 @@ declare interface ITemplate {
1963
2231
  assignedUnit: IRenderingUnit;
1964
2232
  }
1965
2233
 
2234
+ /**
2235
+ * @internal
2236
+ */
1966
2237
  declare interface ITemplateClass {
1967
2238
  className: string;
1968
2239
  id: number;
1969
2240
  script: string;
1970
2241
  }
1971
2242
 
2243
+ /**
2244
+ * @internal
2245
+ */
1972
2246
  declare interface ITemplateInfoManager {
1973
2247
  create(request: TemplateCreateRequest): Promise<TemplateCreateResponse>;
1974
2248
  listContributors(className: string, templateId: number): Promise<UserEntry[]>;
1975
2249
  }
1976
2250
 
1977
- declare interface ITemplateInterpreter {
2251
+ /**
2252
+ * Template interpreter
2253
+ *
2254
+ * @internal
2255
+ */
2256
+ declare interface ITemplateInterpreter {
2257
+ /**
2258
+ * Emit verbose output to console
2259
+ * @internal
2260
+ */
1978
2261
  verbose: boolean;
2262
+ /**
2263
+ * Ignore versions when checking dependencies for templates
2264
+ * @internal
2265
+ */
2266
+ ignoreVersion: boolean;
2267
+ /**
2268
+ * Print raw interpreter objects when emitting output to console
2269
+ * @internal
2270
+ */
2271
+ rawConsole: boolean;
2272
+ /**
2273
+ * Whether this interpreter is initialized or not
2274
+ * @internal
2275
+ */
1979
2276
  readonly ready: boolean;
2277
+ /**
2278
+ * Loaded templates
2279
+ * @internal
2280
+ */
1980
2281
  readonly loaded: {
1981
2282
  [s: string]: ITemplateClass;
1982
2283
  };
2284
+ /**
2285
+ * Get template by ID
2286
+ *
2287
+ * @param id Template version ID
2288
+ * @internal
2289
+ */
1983
2290
  getById(id: number): ITemplateClass;
2291
+ /**
2292
+ * Get template by class name
2293
+ *
2294
+ * @param className Template class name (with optional `@` version specifier)
2295
+ * @param ignoreVersion Ignore the version specifier even when specified
2296
+ * @internal
2297
+ */
1984
2298
  getByName(className: string, ignoreVersion?: boolean): ITemplateClass;
2299
+ /**
2300
+ * Load template by version ID
2301
+ *
2302
+ * @param id Template version ID
2303
+ * @internal
2304
+ */
1985
2305
  loadById(id: number): Promise<ITemplateClass>;
2306
+ /**
2307
+ * Load template by class name
2308
+ *
2309
+ * @see {@link ITemplateInterpreter.ignoreVersion}
2310
+ * @param className Template class name (with optional `@` version specifier)
2311
+ * @internal
2312
+ */
1986
2313
  loadByName(className: string): Promise<ITemplateClass>;
2314
+ /**
2315
+ * Load templates by class names
2316
+ *
2317
+ * @see {@link ITemplateInterpreter.ignoreVersion}
2318
+ * @param classNames Template class names (with optional `@` version specifiers)
2319
+ * @internal
2320
+ */
1987
2321
  loadByNames(classNames: string[]): Promise<ITemplateClass[]>;
2322
+ /**
2323
+ * Load templates required to render the specified video
2324
+ *
2325
+ * @see {@link ITemplateInterpreter.ignoreVersion}
2326
+ * @param videoId Video ID
2327
+ * @internal
2328
+ */
1988
2329
  loadForVideo(videoId: number): Promise<ITemplateClass[]>;
1989
- register(model: TemplateEntry): Promise<ITemplateClass>;
2330
+ /**
2331
+ * Get list of template classes required in specified script
2332
+ *
2333
+ * @param script JavaScript text
2334
+ * @internal
2335
+ */
2336
+ getRequiredTemplates(script: string): string[];
2337
+ /**
2338
+ * Get template class required in specified line of script
2339
+ *
2340
+ * @param script JavaScript text
2341
+ * @param index Line of script (\>= 1)
2342
+ * @internal
2343
+ */
2344
+ getRequiredTemplateAt(script: string, index: number): string;
2345
+ /**
2346
+ * Register template class to the interpreter
2347
+ *
2348
+ * 1. When model data (`TemplateEntry`) is provided, create template class first
2349
+ * 2. Otherwise (`ITemplateClass` is provided), load dependencies and register it
2350
+ *
2351
+ * Use case 1. is intended for use with `TemplateManager` in `textalive-data-web` package
2352
+ *
2353
+ * @param model Template model data
2354
+ * @internal
2355
+ */
2356
+ register(modelOrClass: TemplateEntry | ITemplateClass): Promise<ITemplateClass>;
2357
+ /**
2358
+ * Create template class from text script
2359
+ *
2360
+ * @param script JavaScript text
2361
+ * @internal
2362
+ */
1990
2363
  createClass(script: string): ITemplateClass;
2364
+ /**
2365
+ * Update template class with new text script
2366
+ *
2367
+ * @param oldClass Old template class to be updated
2368
+ * @param script JavaScript text
2369
+ * @internal
2370
+ */
1991
2371
  updateClassScript(oldClass: ITemplateClass, script: string): ITemplateClass;
2372
+ /**
2373
+ * Commit template class with optional log text
2374
+ *
2375
+ * @param templateClass Template class
2376
+ * @param log Log text
2377
+ * @internal
2378
+ */
1992
2379
  commit(templateClass: ITemplateClass, log?: string): Promise<TemplateCreateResponse>;
2380
+ /**
2381
+ * Export template instance (class name and parameters) as JSON data
2382
+ *
2383
+ * @param instance Template instance
2384
+ * @internal
2385
+ */
1993
2386
  exportInstance(instance: ITemplate): TemplateData;
2387
+ /**
2388
+ * Import template data and instantiate template
2389
+ *
2390
+ * @param data Template data
2391
+ * @internal
2392
+ */
1994
2393
  importInstance(data: TemplateData): ITemplate;
2394
+ /**
2395
+ * Import template data in video data, instantiate templates, and assign them to video object
2396
+ *
2397
+ * @param video Video object
2398
+ * @param data Video data
2399
+ * @internal
2400
+ */
1995
2401
  importInstances(video: IVideo, data: VideoData): boolean;
2402
+ /**
2403
+ * Create template instance
2404
+ *
2405
+ * @param templateClass Template class
2406
+ * @internal
2407
+ */
1996
2408
  newInstance(templateClass: ITemplateClass): ITemplate;
2409
+ /**
2410
+ * Dispose template instance
2411
+ *
2412
+ * @param instance Template instance
2413
+ * @internal
2414
+ */
1997
2415
  disposeInstance(instance: ITemplate): void;
2416
+ /**
2417
+ * Dispose template instances
2418
+ *
2419
+ * @param instances Array of template instances or video object containing template instances
2420
+ * @internal
2421
+ */
1998
2422
  disposeInstances(instances: ITemplate[] | IVideo): void;
2423
+ /**
2424
+ * Set template instance of rendering unit
2425
+ *
2426
+ * @param unit Rendering unit
2427
+ * @param template Template instance
2428
+ * @internal
2429
+ */
1999
2430
  setTemplate(unit: IRenderingUnit, template: ITemplate): void;
2431
+ /**
2432
+ * Clear templates assigned to rendering unit
2433
+ *
2434
+ * @param unit Rendering unit
2435
+ * @internal
2436
+ */
2000
2437
  clearTemplate(unit: IRenderingUnit): void;
2001
- getRequiredTemplates(script: string): string[];
2002
- getRequiredTemplateAt(script: string, index: number): string;
2438
+ /**
2439
+ * Execute specific method in template instance
2440
+ *
2441
+ * @param template Template instance
2442
+ * @param funcName Method name
2443
+ * @param parameters Parameter values
2444
+ * @returns Return value of method invocation
2445
+ * @internal
2446
+ */
2003
2447
  exec(template: ITemplate, funcName: string, parameters: ParameterValue[]): any;
2448
+ /**
2449
+ * Set property of template instance
2450
+ * @param instance Template instance
2451
+ * @param name Property name
2452
+ * @param value Property value
2453
+ * @internal
2454
+ */
2004
2455
  setProperty(instance: ITemplate, name: string, value: ParameterValue): void;
2456
+ /**
2457
+ * Get property of template instance
2458
+ * @param instance Template instance
2459
+ * @param name Property name
2460
+ * @returns Property value
2461
+ * @internal
2462
+ */
2005
2463
  getProperty(instance: ITemplate, name: string): ParameterValue;
2006
2464
  }
2007
2465
 
2466
+ /**
2467
+ * @internal
2468
+ */
2008
2469
  declare interface ITemplateLoader {
2009
2470
  list(options?: TemplateListRequest): Promise<TemplateListResponse>;
2010
2471
  load(templateId: number): Promise<TemplateEntry>;
2011
2472
  loadByName(templateName: string): Promise<TemplateEntry>;
2012
- loadForVideo(videoId: number, params?: {
2013
- withoutAuthors: boolean;
2014
- withScript: boolean;
2015
- }): Promise<TemplateList>;
2473
+ loadForVideo(videoId: number, options?: TemplateListForVideoRequest): Promise<TemplateListResponse>;
2016
2474
  }
2017
2475
 
2476
+ /**
2477
+ * @internal
2478
+ */
2018
2479
  declare type ITemplateManager = ITemplateLoader & ITemplateInfoManager;
2019
2480
 
2481
+ /**
2482
+ * @internal
2483
+ */
2020
2484
  declare interface ITextParser {
2021
2485
  parse(text: string): Promise<TextParsingResponse>;
2022
2486
  }
2023
2487
 
2488
+ /**
2489
+ * @internal
2490
+ */
2024
2491
  declare type ITextPlayer = ITextParser;
2025
2492
 
2026
2493
  /**
2027
- *
2494
+ * 文字ユニット / Text unit
2028
2495
  * @public
2029
2496
  */
2030
2497
  declare interface ITextUnit extends IRenderingUnit {
@@ -2070,16 +2537,25 @@ declare interface ITextUnit extends IRenderingUnit {
2070
2537
  readonly height: number;
2071
2538
  }
2072
2539
 
2540
+ /**
2541
+ * @internal
2542
+ */
2073
2543
  declare interface IUserActionManager {
2544
+ getServerStatus(): Promise<ServerStatus>;
2545
+ doGetServerStatus(): Promise<ServerStatus>;
2074
2546
  getProfile(): Promise<UserProfile>;
2075
2547
  doGetProfile(): Promise<UserProfile>;
2076
2548
  getToken(): Promise<string>;
2077
2549
  doGetToken(): Promise<string>;
2078
2550
  getMergingUsers(): Promise<UserEntry[]>;
2079
2551
  mergeUsers(): Promise<UserEntry>;
2552
+ updateUser(entry: UserUpdateRequest): Promise<UserEntry>;
2080
2553
  authenticate(userId: number, password: string): Promise<UserProfile>;
2081
2554
  }
2082
2555
 
2556
+ /**
2557
+ * @internal
2558
+ */
2083
2559
  declare interface IUserBrowserActionManager {
2084
2560
  loginTwitter(ev?: MouseEvent): false;
2085
2561
  loginGitHub(ev?: MouseEvent): false;
@@ -2095,6 +2571,9 @@ declare interface IUserBrowserActionManager {
2095
2571
  logout(ev?: MouseEvent, provider?: AccountService): false;
2096
2572
  }
2097
2573
 
2574
+ /**
2575
+ * @internal
2576
+ */
2098
2577
  declare interface IUserEventManager {
2099
2578
  readonly userProfile: UserProfile;
2100
2579
  isLoading(): boolean;
@@ -2102,13 +2581,29 @@ declare interface IUserEventManager {
2102
2581
  removeListener(listener: UserListener): void;
2103
2582
  }
2104
2583
 
2584
+ /**
2585
+ * @internal
2586
+ */
2105
2587
  declare type IUserManager = IUserTypeManager & IUserActionManager & IUserBrowserActionManager & IUserSpoofingManager & IUserEventManager;
2106
2588
 
2589
+ /**
2590
+ * @deprecated Use {@link EndpointManager.textalive.authUser} and {@link EndpointManager.textalive.authToken} properties instead
2591
+ * @internal
2592
+ */
2107
2593
  declare interface IUserSpoofingManager {
2594
+ /**
2595
+ * @deprecated Use {@link EndpointManager.textalive.authUser} and {@link EndpointManager.textalive.authToken} properties instead
2596
+ */
2108
2597
  spoof(userProfile: UserProfile): void;
2598
+ /**
2599
+ * @deprecated Use {@link EndpointManager.textalive.authUser} and {@link EndpointManager.textalive.authToken} properties instead
2600
+ */
2109
2601
  isSpoofingSongleUser(profile: UserProfile): boolean;
2110
2602
  }
2111
2603
 
2604
+ /**
2605
+ * @internal
2606
+ */
2112
2607
  declare interface IUserTypeManager {
2113
2608
  isYouTubeUser(profile: UserProfile): boolean;
2114
2609
  isPiaproUser(profile: UserProfile): boolean;
@@ -2116,32 +2611,44 @@ declare interface IUserTypeManager {
2116
2611
  }
2117
2612
 
2118
2613
  /**
2119
- * 動画({@link IRenderingUnit} を格納する入れ物)
2614
+ * 動画(描画ユニット {@link IRenderingUnit} を格納する入れ物)
2120
2615
  *
2121
2616
  * Video (A container for {@link IRenderingUnit} objects)
2122
2617
  * @public
2123
2618
  */
2124
2619
  declare interface IVideo extends TimedObject {
2620
+ /** @internal */
2621
+ readonly credits: IPhrase[];
2125
2622
  readonly phrases: IPhrase[];
2623
+ readonly words: IWord[];
2624
+ readonly chars: IChar[];
2625
+ /** @internal */
2126
2626
  readonly graphics: IGraphic[];
2127
- /**
2128
- * @internal
2129
- */
2627
+ /** @internal */
2130
2628
  readonly rendering: RenderingParameter;
2131
2629
  duration: number;
2132
2630
  readonly startTime: number;
2133
2631
  readonly endTime: number;
2632
+ /** @internal */
2633
+ readonly creditCount: number;
2134
2634
  readonly phraseCount: number;
2635
+ /** @internal */
2135
2636
  readonly graphicCount: number;
2136
2637
  readonly wordCount: number;
2137
2638
  readonly charCount: number;
2639
+ /** @internal */
2640
+ readonly firstCredit: IPhrase;
2138
2641
  readonly firstPhrase: IPhrase;
2139
2642
  readonly firstWord: IWord;
2140
2643
  readonly firstChar: IChar;
2644
+ /** @internal */
2141
2645
  readonly firstGraphic: IGraphic;
2646
+ /** @internal */
2647
+ readonly lastCredit: IPhrase;
2142
2648
  readonly lastPhrase: IPhrase;
2143
2649
  readonly lastWord: IWord;
2144
2650
  readonly lastChar: IChar;
2651
+ /** @internal */
2145
2652
  readonly lastGraphic: IGraphic;
2146
2653
  /**
2147
2654
  * 指定された位置を `[0, 1]` にマッピングして返す
@@ -2150,41 +2657,105 @@ declare interface IVideo extends TimedObject {
2150
2657
  * @param time - 位置 / Position in this video
2151
2658
  */
2152
2659
  progress(time: number): number;
2660
+ /**
2661
+ * @internal
2662
+ */
2663
+ getCredit(index: number): IPhrase;
2664
+ /**
2665
+ * 指定したインデックスのフレーズを取得する / Get phrase with the specified index
2666
+ * @param index フレーズのインデックス / Phrase index
2667
+ */
2153
2668
  getPhrase(index: number): IPhrase;
2669
+ /**
2670
+ * 指定したインデックスの単語を取得する / Get word with the specified index
2671
+ * @param index 単語のインデックス / Word index
2672
+ */
2154
2673
  getWord(index: number): IWord;
2674
+ /**
2675
+ * 指定したインデックスの文字を取得する / Get character with the specified index
2676
+ * @param index 文字のインデックス / Phrase index
2677
+ */
2155
2678
  getChar(index: number): IChar;
2679
+ /**
2680
+ * @internal
2681
+ */
2156
2682
  getGraphic(index: number): IGraphic;
2683
+ /**
2684
+ * 指定した描画オブジェクトのインデックスを取得する / Get index of the specified rendering unit
2685
+ * @param unit 描画オブジェクト / Rendering unit
2686
+ * @returns インデックス / Index
2687
+ */
2157
2688
  findIndex(unit: IRenderingUnit): number;
2158
2689
  /**
2159
- * Get phrase object in the current video
2690
+ * Get phrase object (credits) in the current video
2691
+ * @param time - position [ms]
2692
+ * @param options - optional parameters for finding phrase
2693
+ * @internal
2694
+ */
2695
+ findCredit(time: number, options?: FindTimedObjectOptions): IPhrase;
2696
+ /**
2697
+ * 指定した再生位置のフレーズを取得する / Get phrase object in the current video
2160
2698
  * @param time - position [ms]
2161
2699
  * @param options - optional parameters for finding phrase
2162
2700
  */
2163
2701
  findPhrase(time: number, options?: FindTimedObjectOptions): IPhrase;
2164
2702
  /**
2165
- * Get word object in the current video
2703
+ * 指定された時区間のフレーズ発声情報を取得する
2704
+ *
2705
+ * Look for phrases in the specified time range
2706
+ */
2707
+ findPhraseChange(startTime: number, endTime: number): TimedObjectsInRange<IPhrase>;
2708
+ /**
2709
+ * 指定した再生位置の単語を取得する / Get word object in the current video
2166
2710
  * @param time - position [ms]
2167
2711
  * @param options - optional parameters for finding word
2168
2712
  */
2169
2713
  findWord(time: number, options?: FindTimedObjectOptions): IWord;
2170
2714
  /**
2171
- * Get character object in the current video
2715
+ * 指定された時区間の単語発声情報を取得する
2716
+ *
2717
+ * Look for words in the specified time range
2718
+ */
2719
+ findWordChange(startTime: number, endTime: number): TimedObjectsInRange<IWord>;
2720
+ /**
2721
+ * 指定した再生位置の文字を取得する / Get character object in the current video
2172
2722
  * @param time - position [ms]
2173
2723
  * @param options - optional parameters for finding character
2174
2724
  */
2175
2725
  findChar(time: number, options?: FindTimedObjectOptions): IChar;
2176
2726
  /**
2177
- * Get graphic object in the current video
2727
+ * 指定された時区間の文字発声情報を取得する
2728
+ *
2729
+ * Look for characters in the specified time range
2730
+ */
2731
+ findCharChange(startTime: number, endTime: number): TimedObjectsInRange<IChar>;
2732
+ /**
2733
+ * 指定した再生位置のグラフィックを取得する / Get graphic object in the current video
2178
2734
  * @param time - position [ms]
2179
2735
  * @param options - optional parameters for finding graphic
2736
+ * @internal
2180
2737
  */
2181
2738
  findGraphic(time: number, options?: FindTimedObjectOptions): IGraphic;
2739
+ /**
2740
+ * 指定された時区間のグラフィック情報を取得する
2741
+ *
2742
+ * Look for graphics in the specified time range
2743
+ * @internal
2744
+ */
2745
+ findGraphicChange(startTime: number, endTime: number): TimedObjectsInRange<IGraphic>;
2182
2746
  }
2183
2747
 
2748
+ /**
2749
+ * @internal
2750
+ */
2184
2751
  declare interface IVideoLoader {
2752
+ list(options?: VideoListRequest): Promise<VideoListResponse>;
2185
2753
  load(videoId: number): Promise<VideoEntry>;
2186
2754
  }
2187
2755
 
2756
+ /**
2757
+ * @internal
2758
+ */
2188
2759
  declare type IVideoPlayer = IVideoLoader;
2189
2760
 
2190
2761
  /**
@@ -2216,28 +2787,17 @@ declare interface IVoice extends TimedObject {
2216
2787
  }
2217
2788
 
2218
2789
  /**
2790
+ * 単語 / Word
2219
2791
  * @public
2220
2792
  */
2221
2793
  declare interface IWord extends ITextUnit {
2222
- /**
2223
- * @inheritDoc
2224
- */
2225
- animate: RenderingUnitFunction<IWord>;
2226
- /**
2227
- * @inheritDoc
2228
- */
2794
+ /** @inheritDoc */
2229
2795
  readonly parent: IPhrase;
2230
- /**
2231
- * @inheritDoc
2232
- */
2796
+ /** @inheritDoc */
2233
2797
  readonly children: IChar[];
2234
- /**
2235
- * @inheritDoc
2236
- */
2798
+ /** @inheritDoc */
2237
2799
  readonly previous: IWord;
2238
- /**
2239
- * @inheritDoc
2240
- */
2800
+ /** @inheritDoc */
2241
2801
  readonly next: IWord;
2242
2802
  /**
2243
2803
  * 品詞
@@ -2271,17 +2831,62 @@ declare interface IWord extends ITextUnit {
2271
2831
  * 言語(`en`: 英語、`ja`: 日本語)
2272
2832
  */
2273
2833
  readonly language: string;
2834
+ /**
2835
+ * カウントダウン(カウントダウンの場合は 0 以上の数値)
2836
+ * @internal
2837
+ */
2838
+ readonly countDown: number;
2839
+ /**
2840
+ * カウントアップ(カウントアップの場合は 0 以上の数値)
2841
+ * @internal
2842
+ */
2843
+ readonly countUp: number;
2844
+ /**
2845
+ * カウントダウン、カウントアップの初期値
2846
+ * @internal
2847
+ */
2848
+ readonly initialCount: number;
2274
2849
  readonly charCount: number;
2275
2850
  readonly firstChar: IChar;
2276
2851
  readonly lastChar: IChar;
2277
2852
  findIndex(unit: IChar): number;
2278
2853
  }
2279
2854
 
2855
+ /**
2856
+ * @internal
2857
+ */
2858
+ declare interface ListAvailableFontsOptions {
2859
+ isPrivateFontEnabled?: boolean;
2860
+ }
2861
+
2862
+ /**
2863
+ * @internal
2864
+ */
2865
+ declare interface ListRequest extends ListSimpleRequest {
2866
+ lastId?: number;
2867
+ startId?: number;
2868
+ maxResults?: number;
2869
+ }
2870
+
2871
+ /**
2872
+ * @internal
2873
+ */
2874
+ declare interface ListResponse<T> extends ListSimpleResponse<T> {
2875
+ nextStartId?: number;
2876
+ nextLastId?: number;
2877
+ }
2878
+
2879
+ /**
2880
+ * @internal
2881
+ */
2280
2882
  declare interface ListSimpleRequest {
2281
2883
  lastIndex?: number;
2282
2884
  startIndex?: number;
2283
2885
  }
2284
2886
 
2887
+ /**
2888
+ * @internal
2889
+ */
2285
2890
  declare interface ListSimpleResponse<T> {
2286
2891
  list: T[];
2287
2892
  nextStartIndex?: number;
@@ -2300,6 +2905,7 @@ declare type LoaderListener = DataLoaderListener & BackgroundGraphicsListener &
2300
2905
  * 歌詞発声タイミングの推定結果
2301
2906
  *
2302
2907
  * Results of lyrics timing estimation
2908
+ * @internal
2303
2909
  */
2304
2910
  declare interface Lyrics {
2305
2911
  /** 歌詞発声タイミングの推定ID / Lyrics timing estimation ID */
@@ -2336,6 +2942,7 @@ declare interface LyricsBody {
2336
2942
  * 歌詞発声タイミングの訂正情報
2337
2943
  *
2338
2944
  * Lyrics diff information
2945
+ * @internal
2339
2946
  */
2340
2947
  declare interface LyricsDiff {
2341
2948
  /** 歌詞発声タイミングの訂正ID / Lyrics diff ID */
@@ -2349,37 +2956,42 @@ declare interface LyricsDiff {
2349
2956
  }
2350
2957
 
2351
2958
  /**
2352
- * 歌詞発声タイミングの詳細情報
2959
+ * 歌詞発声タイミングの差分に関する情報
2353
2960
  *
2354
2961
  * Detailed lyrics diff information
2355
- * @public
2962
+ * @internal
2356
2963
  */
2357
- declare interface LyricsDiffInfo {
2964
+ declare interface LyricsDiffInfo extends LyricsTimingInfo {
2358
2965
  /**
2359
- * 歌詞発声タイミングの訂正ID
2360
- *
2361
- * Lyrics diff ID
2966
+ * Null if this points to the original lyrics, and otherwise undefined
2362
2967
  */
2363
- id: number;
2968
+ diff?: null;
2364
2969
  /**
2365
- * 歌詞URL
2970
+ * Songle で推定中か否か
2366
2971
  *
2367
- * Lyrics url
2972
+ * Songle analysis processing status if this points to the original lyrics, and otherwise undefined
2368
2973
  */
2369
- url: string;
2974
+ processing?: boolean;
2370
2975
  /**
2371
- * @see e.g. {@link http://songle.jp/songs/1299363/lyrics/48823/diffs/1279/lyrics.json}
2372
- * @internal
2976
+ * Songle での推定が失敗したか否か
2977
+ *
2978
+ * Songle analysis failure status if this points to the original lyrics, and otherwise undefined
2373
2979
  */
2374
- data: LyricsTiming[][][];
2980
+ failed?: boolean;
2375
2981
  /**
2982
+ * 作成日時
2983
+ *
2984
+ * Created date if this points to the original lyrics, and otherwise undefined
2376
2985
  * @internal
2377
2986
  */
2378
- offset: number;
2987
+ created_at?: string;
2379
2988
  /**
2989
+ * 更新日時
2990
+ *
2991
+ * Updated date if this points to the original lyrics, and otherwise undefined
2380
2992
  * @internal
2381
2993
  */
2382
- parser_path: string;
2994
+ updated_at?: string;
2383
2995
  }
2384
2996
 
2385
2997
  /**
@@ -2394,11 +3006,13 @@ declare type LyricsDiffs = LyricsDiff[];
2394
3006
  * 歌詞発声タイミングの推定結果
2395
3007
  *
2396
3008
  * Results of lyrics timing estimation
2397
- *
2398
- * e.g. https://songle.jp/songs/1247946/lyrics/48789.json
2399
- * @internal
3009
+ * @public
2400
3010
  */
2401
- declare interface LyricsInfo extends LyricsDiffInfo {
3011
+ declare interface LyricsInfo extends LyricsTimingInfo {
3012
+ /**
3013
+ * 歌詞発声タイミングのID
3014
+ */
3015
+ id: number;
2402
3016
  /**
2403
3017
  * 歌詞発声タイミングの訂正情報
2404
3018
  *
@@ -2412,32 +3026,73 @@ declare interface LyricsInfo extends LyricsDiffInfo {
2412
3026
  *
2413
3027
  * Songle analysis processing status
2414
3028
  */
2415
- processing: boolean;
3029
+ processing?: boolean;
2416
3030
  /**
2417
3031
  * Songle での推定が失敗したか否か
2418
3032
  *
2419
3033
  * Songle analysis failure status
2420
3034
  */
2421
- failed: boolean;
3035
+ failed?: boolean;
2422
3036
  /**
2423
3037
  * 作成日時
2424
3038
  *
2425
3039
  * Created date
3040
+ * @internal
2426
3041
  */
2427
- created_at: string;
3042
+ created_at?: string;
2428
3043
  /**
2429
3044
  * 更新日時
2430
3045
  *
2431
3046
  * Updated date
3047
+ * @internal
2432
3048
  */
2433
- updated_at: string;
3049
+ updated_at?: string;
2434
3050
  }
2435
3051
 
3052
+ /**
3053
+ * @internal
3054
+ */
2436
3055
  declare interface LyricsTiming {
3056
+ /** Lyrics vocalized timing (start) [s] */
2437
3057
  start_time: number;
3058
+ /** Lyrics vocalized timing (end) [s] */
2438
3059
  end_time: number;
2439
3060
  }
2440
3061
 
3062
+ /**
3063
+ * 歌詞発声タイミングの情報
3064
+ *
3065
+ * Lyrics timing information
3066
+ * @public
3067
+ */
3068
+ declare interface LyricsTimingInfo {
3069
+ /**
3070
+ * 歌詞発声タイミングのID
3071
+ *
3072
+ * Lyrics ID
3073
+ */
3074
+ id: number;
3075
+ /**
3076
+ * 歌詞URL
3077
+ *
3078
+ * Lyrics url
3079
+ */
3080
+ url: string;
3081
+ /**
3082
+ * @see e.g. {@link http://songle.jp/songs/1299363/lyrics/48823/diffs/1279/lyrics.json}
3083
+ * @internal
3084
+ */
3085
+ data: LyricsTiming[][][];
3086
+ /**
3087
+ * @internal
3088
+ */
3089
+ offset: number;
3090
+ /**
3091
+ * @internal
3092
+ */
3093
+ parser_path: string;
3094
+ }
3095
+
2441
3096
  /**
2442
3097
  * **Matrix2D**
2443
3098
  *
@@ -2445,9 +3100,11 @@ declare interface LyricsTiming {
2445
3100
  *
2446
3101
  * This matrix can be visualized as:
2447
3102
  *
3103
+ * ```
2448
3104
  * [ a c tx
2449
3105
  * b d ty
2450
3106
  * 0 0 1 ]
3107
+ * ```
2451
3108
  *
2452
3109
  * Note the locations of b and c.
2453
3110
  *
@@ -2480,29 +3137,17 @@ declare interface LyricsTiming {
2480
3137
  * @public
2481
3138
  */
2482
3139
  declare class Matrix2D implements IMatrix2D {
2483
- /**
2484
- * @inheritDoc
2485
- */
3140
+ /** @inheritDoc */
2486
3141
  a: number;
2487
- /**
2488
- * @inheritDoc
2489
- */
3142
+ /** @inheritDoc */
2490
3143
  b: number;
2491
- /**
2492
- * @inheritDoc
2493
- */
3144
+ /** @inheritDoc */
2494
3145
  c: number;
2495
- /**
2496
- * @inheritDoc
2497
- */
3146
+ /** @inheritDoc */
2498
3147
  d: number;
2499
- /**
2500
- * @inheritDoc
2501
- */
3148
+ /** @inheritDoc */
2502
3149
  tx: number;
2503
- /**
2504
- * @inheritDoc
2505
- */
3150
+ /** @inheritDoc */
2506
3151
  ty: number;
2507
3152
  /**
2508
3153
  * @param a - Specifies the a property for the new matrix.
@@ -2513,85 +3158,45 @@ declare class Matrix2D implements IMatrix2D {
2513
3158
  * @param ty - Specifies the ty property for the new matrix.
2514
3159
  */
2515
3160
  constructor(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number);
2516
- /**
2517
- * @inheritDoc
2518
- */
3161
+ /** @inheritDoc */
2519
3162
  setValues(a?: number, b?: number, c?: number, d?: number, tx?: number, ty?: number): Matrix2D;
2520
- /**
2521
- * @inheritDoc
2522
- */
3163
+ /** @inheritDoc */
2523
3164
  append(a: number, b: number, c: number, d: number, tx: number, ty: number): Matrix2D;
2524
- /**
2525
- * @inheritDoc
2526
- */
3165
+ /** @inheritDoc */
2527
3166
  prepend(a: number, b: number, c: number, d: number, tx: number, ty: number): Matrix2D;
2528
- /**
2529
- * @inheritDoc
2530
- */
3167
+ /** @inheritDoc */
2531
3168
  appendMatrix(matrix: Matrix2D): Matrix2D;
2532
- /**
2533
- * @inheritDoc
2534
- */
3169
+ /** @inheritDoc */
2535
3170
  prependMatrix(matrix: Matrix2D): Matrix2D;
2536
- /**
2537
- * @inheritDoc
2538
- */
3171
+ /** @inheritDoc */
2539
3172
  appendTransform(x: number, y: number, scaleX: number, scaleY: number, rotation: number, skewX: number, skewY: number, regX: number, regY: number): Matrix2D;
2540
- /**
2541
- * @inheritDoc
2542
- */
3173
+ /** @inheritDoc */
2543
3174
  prependTransform(x: number, y: number, scaleX: number, scaleY: number, rotation: number, skewX: number, skewY: number, regX: number, regY: number): Matrix2D;
2544
- /**
2545
- * @inheritDoc
2546
- */
3175
+ /** @inheritDoc */
2547
3176
  rotate(angle: number): Matrix2D;
2548
- /**
2549
- * @inheritDoc
2550
- */
3177
+ /** @inheritDoc */
2551
3178
  skew(skewX: number, skewY: number): Matrix2D;
2552
- /**
2553
- * @inheritDoc
2554
- */
3179
+ /** @inheritDoc */
2555
3180
  scale(x: number, y: number): Matrix2D;
2556
- /**
2557
- * @inheritDoc
2558
- */
3181
+ /** @inheritDoc */
2559
3182
  translate(x: number, y: number): Matrix2D;
2560
- /**
2561
- * @inheritDoc
2562
- */
3183
+ /** @inheritDoc */
2563
3184
  identity(): Matrix2D;
2564
- /**
2565
- * @inheritDoc
2566
- */
3185
+ /** @inheritDoc */
2567
3186
  invert(): Matrix2D;
2568
- /**
2569
- * @inheritDoc
2570
- */
3187
+ /** @inheritDoc */
2571
3188
  isIdentity(): boolean;
2572
- /**
2573
- * @inheritDoc
2574
- */
3189
+ /** @inheritDoc */
2575
3190
  equals(matrix: Matrix2D): boolean;
2576
- /**
2577
- * @inheritDoc
2578
- */
3191
+ /** @inheritDoc */
2579
3192
  transformPoint(x: number, y: number, pt: Point): Point;
2580
- /**
2581
- * @inheritDoc
2582
- */
3193
+ /** @inheritDoc */
2583
3194
  decompose(target?: DecomposedProps): DecomposedProps;
2584
- /**
2585
- * @inheritDoc
2586
- */
3195
+ /** @inheritDoc */
2587
3196
  copy(matrix: Matrix2D): Matrix2D;
2588
- /**
2589
- * @inheritDoc
2590
- */
3197
+ /** @inheritDoc */
2591
3198
  clone(): Matrix2D;
2592
- /**
2593
- * @inheritDoc
2594
- */
3199
+ /** @inheritDoc */
2595
3200
  toString(): string;
2596
3201
  /**
2597
3202
  * Multiplier for converting degrees to radians. Used internally by Matrix2D.
@@ -2603,13 +3208,17 @@ declare class Matrix2D implements IMatrix2D {
2603
3208
  static readonly identity: Matrix2D;
2604
3209
  }
2605
3210
 
2606
- export declare const NativeCheckWidget: FC<NativeCheckWidgetProps>;
3211
+ export declare function msToString(x: number, ja?: boolean): string;
2607
3212
 
2608
- export declare interface NativeCheckWidgetProps {
2609
- widget: ParameterWidget;
2610
- value: any;
2611
- onValueChange?(value: boolean): void;
2612
- withoutName?: boolean;
3213
+ export declare const NumericSlider: FC<NumericSliderProps>;
3214
+
3215
+ export declare interface NumericSliderProps {
3216
+ disabled?: boolean;
3217
+ min: number;
3218
+ max: number;
3219
+ value: number | string;
3220
+ onValueChange?(value: number): void;
3221
+ withTextInput?: boolean;
2613
3222
  }
2614
3223
 
2615
3224
  export declare const Overlay: FC<OverlayProps>;
@@ -2619,9 +3228,9 @@ export declare interface OverlayProps extends DetailedHTMLProps<HTMLAttributes<H
2619
3228
  }
2620
3229
 
2621
3230
  /**
2622
- * TextAlive アプリ、スタイル、テンプレートで調整可能なパラメタ値の型情報
3231
+ * リリックアプリ、スタイル、テンプレートで調整可能なパラメタ値の型情報
2623
3232
  *
2624
- * Type definition for parameter values that can be customized in TextAlive App, styles, and templates
3233
+ * Type definition for parameter values that can be customized in lyric apps, styles, and templates
2625
3234
  * @public
2626
3235
  */
2627
3236
  declare type ParameterValue = IColor | string | number | boolean;
@@ -2634,9 +3243,9 @@ declare interface ParameterValues {
2634
3243
  }
2635
3244
 
2636
3245
  /**
2637
- * TextAlive アプリ、スタイル、テンプレートで調整可能なパラメタ
3246
+ * リリックアプリ、スタイル、テンプレートで調整可能なパラメタ
2638
3247
  *
2639
- * Parameters that can be customized in TextAlive App, styles, and templates
3248
+ * Parameters that can be customized in lyric apps, styles, and templates
2640
3249
  * @public
2641
3250
  */
2642
3251
  declare interface ParameterWidget {
@@ -2664,99 +3273,49 @@ declare interface ParameterWidget {
2664
3273
  *
2665
3274
  * Type of this variable (e.g. `Slider`)
2666
3275
  */
2667
- className?: string;
2668
- /**
2669
- * パラメタのオプション(例: {@link ParameterWidget.className} が `Slider` のとき `[0, 100]` で値域 `0` から `100` のスライダーウィジェットが出現)
2670
- *
2671
- * Options for constructing a parameter widget parsed from description e.g. `[0, 100]`
2672
- */
2673
- params?: (boolean | number | string | [boolean | number | string, string?] | {
2674
- [value: string]: string;
2675
- })[];
2676
- /**
2677
- * User-Generated Variable の場合、その説明
2678
- *
2679
- * Explanation for user-generated variable
2680
- * @internal
2681
- */
2682
- comment?: string | RegionalText;
2683
- /**
2684
- * User-Generated Variable の場合、その提案状況
2685
- *
2686
- * Flag for user-generated variable
2687
- * @internal
2688
- */
2689
- proposed?: boolean;
2690
- /**
2691
- * パラメタの初期値
2692
- *
2693
- * Initial value for this parameter variable
2694
- */
2695
- initialValue?: ParameterValue;
2696
- }
2697
-
2698
- export declare interface PartialPlayerOptions {
2699
- /**
2700
- * TextAlive App Framework usage option. When this flag is set, the player parses query string to gain initial media information and tries communicating with the app host.
2701
- */
2702
- app?: PlayerAppOptions | boolean;
2703
- /**
2704
- * Unsafe acceleration. When this flag is set, JavaScript code is executed natively.
2705
- */
2706
- unsafeAcceleration?: boolean;
2707
- /**
2708
- * A timer instance that controls the player status.
2709
- */
2710
- timer?: Timer;
2711
- /**
2712
- * A graphics driver that renders the video.
2713
- */
2714
- graphics?: GraphicsDriver;
2715
- /**
2716
- * A HTML div element to host media elements.
2717
- */
2718
- mediaElement?: HTMLElement;
2719
- /**
2720
- * TextAlive manager instances.
2721
- */
2722
- managers?: IPlayerManagers;
2723
- /**
2724
- * An interval for emitting throttled events [ms].
2725
- */
2726
- throttleInterval?: number;
2727
- /**
2728
- * Timeout for fetching lyrics text [ms].
2729
- */
2730
- lyricsFetchTimeout?: number;
3276
+ className?: string;
2731
3277
  /**
2732
- * A list of font families to load.
2733
- * When a video is loaded, fonts used in the video override the list.
3278
+ * パラメタのオプション(例: {@link ParameterWidget.className} が `Slider` のとき `[0, 100]` で値域 `0` から `100` のスライダーウィジェットが出現)
3279
+ *
3280
+ * Options for constructing a parameter widget parsed from description e.g. `[0, 100]`
2734
3281
  */
2735
- fontFamilies?: string[];
3282
+ params?: (boolean | number | string | [boolean | number | string, string?] | {
3283
+ [value: string]: string;
3284
+ })[];
2736
3285
  /**
2737
- * Default video size
3286
+ * User-Generated Variable の場合、その説明
3287
+ *
3288
+ * Explanation for user-generated variable
3289
+ * @internal
2738
3290
  */
2739
- defaultVideoSize?: VideoSizeConfig;
3291
+ comment?: string | RegionalText;
2740
3292
  /**
2741
- * Whether to load vocal amplitude data or not
3293
+ * User-Generated Variable の場合、その提案状況
3294
+ *
3295
+ * Flag for user-generated variable
3296
+ * @internal
2742
3297
  */
2743
- vocalAmplitudeEnabled?: boolean;
3298
+ proposed?: boolean;
2744
3299
  /**
2745
- * Whether to load valence arousal data or not
3300
+ * パラメタの初期値
3301
+ *
3302
+ * Initial value for this parameter variable
2746
3303
  */
2747
- valenceArousalEnabled?: boolean;
3304
+ initialValue?: ParameterValue;
2748
3305
  }
2749
3306
 
3307
+ export declare type PartialPlayerOptions = Omit<PlayerOptions, "stageElement">;
3308
+
2750
3309
  /**
2751
3310
  * TextAlive の動画データを上書きする情報
2752
3311
  *
2753
3312
  * Optional data to overwrite TextAlive video data
2754
- * @see {@link VideoEntry}
2755
3313
  * @public
2756
3314
  */
2757
3315
  declare interface PartialVideoEntry {
2758
3316
  /**
2759
3317
  * 楽曲コード(ID) / Songle song code
3318
+ * @internal
2760
3319
  */
2761
3320
  songleCode?: string;
2762
3321
  /**
@@ -2829,29 +3388,35 @@ declare interface PlayerAppHost {
2829
3388
  }
2830
3389
 
2831
3390
  /**
2832
- * TextAlive アプリ関連のイベント
3391
+ * リリックアプリ関連のイベント
2833
3392
  *
2834
- * TextAlive app-related events
3393
+ * Lyric app-related events
2835
3394
  * @public
2836
3395
  */
2837
3396
  declare interface PlayerAppListener {
2838
3397
  /**
2839
- * TextAlive ホストとの接続時に呼ばれる
3398
+ * TextAlive App API サーバとの接続時に呼ばれる
3399
+ * @param app - TextAlive App API サーバに関する情報 / TextAlive app API server info
3400
+ * @param error - エラーメッセージ / Error message
3401
+ */
3402
+ onAppLoad?(app: IPlayerApp, error?: string): void;
3403
+ /**
3404
+ * リリックアプリ ホストとの接続時に呼ばれる
2840
3405
  *
2841
- * Called when connection to a TextAlive host is established
2842
- * @param app - TextAlive アプリのホストに関する情報 / TextAlive app host info
3406
+ * Called when connection to a lyric app host is established
3407
+ * @param app - リリックアプリのホストに関する情報 / Lyric app host info
2843
3408
  */
2844
3409
  onAppReady?(app: IPlayerApp): void;
2845
3410
  /**
2846
- * TextAlive アプリのパラメタが更新されたときに呼ばれる
3411
+ * リリックアプリのパラメタが更新されたときに呼ばれる
2847
3412
  *
2848
- * Called when a parameter value of TextAlive app is updated
3413
+ * Called when a parameter value of this lyric app is updated
2849
3414
  * @param name - パラメタ名 / Parameter name
2850
3415
  * @param value - パラメタ値 / Parameter value
2851
3416
  */
2852
3417
  onAppParameterUpdate?(name: string, value: ParameterValue): void;
2853
3418
  /**
2854
- * TextAlive アプリの再生すべき楽曲URLが変更されたときに呼ばれる
3419
+ * リリックアプリの再生すべき楽曲URLが変更されたときに呼ばれる
2855
3420
  *
2856
3421
  * Called when a media URL to play is updated
2857
3422
  * @param songUrl - 楽曲URL / Song URL
@@ -2861,22 +3426,30 @@ declare interface PlayerAppListener {
2861
3426
  }
2862
3427
 
2863
3428
  /**
2864
- * TextAlive アプリのオプション
3429
+ * リリックアプリのオプション
2865
3430
  *
2866
- * TextAlive app options
3431
+ * Lyric app options
2867
3432
  * @public
2868
3433
  */
2869
3434
  declare interface PlayerAppOptions {
3435
+ /**
3436
+ * アプリの開発者用トークン
3437
+ *
3438
+ * Application token
3439
+ */
3440
+ token: string;
2870
3441
  /**
2871
3442
  * アプリの名前
2872
3443
  *
2873
3444
  * Name of this application
3445
+ * @deprecated This value will be automatically retrieved from TextAlive API server.
2874
3446
  */
2875
3447
  appName?: string;
2876
3448
  /**
2877
3449
  * アプリ作者の名前
2878
3450
  *
2879
3451
  * Name of the author of this application
3452
+ * @deprecated This value will be automatically retrieved from TextAlive API server.
2880
3453
  */
2881
3454
  appAuthor?: string;
2882
3455
  /**
@@ -2888,9 +3461,28 @@ declare interface PlayerAppOptions {
2888
3461
  }
2889
3462
 
2890
3463
  /**
2891
- * TextAlive アプリ向けの楽曲データ読み込みオプション
3464
+ * TextAlive App APIサーバに関する情報
3465
+ * @public
3466
+ */
3467
+ declare interface PlayerAppServer {
3468
+ /**
3469
+ * バージョン番号
3470
+ */
3471
+ version?: string;
3472
+ /**
3473
+ * メッセージ
3474
+ */
3475
+ message?: string;
3476
+ /**
3477
+ * エラーメッセージ
3478
+ */
3479
+ error?: string;
3480
+ }
3481
+
3482
+ /**
3483
+ * リリックアプリ向けの楽曲データ読み込みオプション
2892
3484
  *
2893
- * Options to load song data in TextAlive app
3485
+ * Options to load song data in a lyric app
2894
3486
  * @see {@link PlayerVideoOptions}, {@link PartialVideoEntry}
2895
3487
  * @public
2896
3488
  */
@@ -2946,9 +3538,9 @@ export declare interface PlayerControlProps {
2946
3538
  }
2947
3539
 
2948
3540
  /**
2949
- * TextAlive Player のイベント
3541
+ * Player のイベント
2950
3542
  *
2951
- * TextAlive Player events
3543
+ * Player events
2952
3544
  * @public
2953
3545
  */
2954
3546
  declare interface PlayerEventListener {
@@ -2986,6 +3578,7 @@ declare interface PlayerEventListener {
2986
3578
  *
2987
3579
  * Called when the stage size is updated
2988
3580
  * @param size - ステージのサイズ / Stage size
3581
+ * @internal
2989
3582
  */
2990
3583
  onResize?(size: PlayerSize): void;
2991
3584
  /**
@@ -3060,6 +3653,13 @@ declare interface PlayerEventListener {
3060
3653
  * @param position - 再生位置 [ms]
3061
3654
  */
3062
3655
  onSeek?(position: number): void;
3656
+ /**
3657
+ * 楽曲の再生位置変更が完了したときに呼ばれる
3658
+ *
3659
+ * Called when the media playback position is successfully updated after {@link onSeek}
3660
+ * @param position - 再生位置 [ms]
3661
+ */
3662
+ onSeekComplete?(position: number): void;
3063
3663
  /**
3064
3664
  * プレイヤーが破棄されるときに呼ばれる
3065
3665
  *
@@ -3075,9 +3675,9 @@ declare interface PlayerEventListener {
3075
3675
  declare type PlayerFindOptions = FindTimedObjectOptions;
3076
3676
 
3077
3677
  /**
3078
- * TextAlive Player に関するさまざまなイベントのリスナ
3678
+ * Player に関するさまざまなイベントのリスナ
3079
3679
  *
3080
- * Event listener for TextAlive Player
3680
+ * Event listener for Player
3081
3681
  * @public
3082
3682
  */
3083
3683
  declare type PlayerListener = PlayerEventListener & PlayerAppListener & LoaderListener;
@@ -3098,26 +3698,28 @@ export declare enum PlayerLoaderStatus {
3098
3698
  declare type PlayerMediaPositionUpdateFunction = (position: number) => Promise<number>;
3099
3699
 
3100
3700
  /**
3101
- * TextAlive Player の初期化オプション
3701
+ * Player の初期化オプション
3702
+ *
3703
+ * Player initialization options
3102
3704
  *
3103
3705
  * @see {@link IPlayer}
3104
3706
  * @public
3105
3707
  */
3106
3708
  declare interface PlayerOptions {
3107
3709
  /**
3108
- * TextAlive アプリの情報; このプロパティがセットされていると、再生メディアをURLのクエリパラメタから取得したり、アプリのホストとの接続を試みたりします。
3710
+ * リリックアプリの情報; このプロパティがセットされていると、再生メディアをURLのクエリパラメタから取得したり、アプリのホストとの接続を試みたりします。
3109
3711
  *
3110
- * TextAlive app options. When this property is set, the player parses query string to gain initial media information and tries communicating with the app host.
3712
+ * Lyric app options. When this property is set, the player parses query string to gain initial media information and tries communicating with the app host.
3111
3713
  */
3112
- app?: PlayerAppOptions | boolean;
3714
+ app?: PlayerAppOptions;
3113
3715
  /**
3114
- * TextAlive Player の音源の再生状態を管理する `Timer` インスタンスです。
3716
+ * Player の音源の再生状態を管理する `Timer` インスタンスです。
3115
3717
  *
3116
3718
  * A timer instance that controls the player status.
3117
3719
  */
3118
3720
  timer?: Timer;
3119
3721
  /**
3120
- * TextAlive のJavaScriptインタプリタを介さず、直接テンプレートのコードを実行することで描画を高速化するオプションです。
3722
+ * TextAlive の JavaScript インタプリタを介さず、直接テンプレートのコードを実行することで描画を高速化するオプションです。
3121
3723
  *
3122
3724
  * Unsafe acceleration. When this flag is set, JavaScript code is executed natively.
3123
3725
  * @internal
@@ -3137,13 +3739,13 @@ declare interface PlayerOptions {
3137
3739
  * A HTML canvas element to render the video on.
3138
3740
  * @internal
3139
3741
  */
3140
- stageElement?: HTMLElement;
3742
+ stageElement?: HTMLElement | string;
3141
3743
  /**
3142
3744
  * 音源メディアの配置先となるDOM要素; 音源を埋め込むコンテナとして利用されるDOM要素です。
3143
3745
  *
3144
3746
  * A HTML element to host media elements.
3145
3747
  */
3146
- mediaElement?: HTMLElement;
3748
+ mediaElement?: HTMLElement | string;
3147
3749
  /**
3148
3750
  * 音源メディアの関連情報を表示する位置; 指定がなければ `embed` と見なされ、メディア直下に表示されます。
3149
3751
  *
@@ -3171,13 +3773,18 @@ declare interface PlayerOptions {
3171
3773
  */
3172
3774
  lyricsFetchTimeout?: number;
3173
3775
  /**
3174
- * 読み込むフォントの一覧を指定できます。 TextAlive 動画が読み込まれると、このオプションに限らず、動画中で利用されているフォントがすべて読み込まれます。 `null` が指定されると、利用可能なすべてのフォントが読み込まれます。
3776
+ * 読み込むフォントの一覧を指定できます。 `null` が指定されると、利用可能なすべてのフォントが読み込まれます。
3175
3777
  *
3176
- * A list of font families to load. When a video is loaded, fonts used in the video override the list. When `null` is set, all available fonts are loaded.
3778
+ * A list of font families to load. When `null` is set, all available fonts are loaded.
3779
+ */
3780
+ fontFamilies?: (FontInfo | string)[] | null;
3781
+ /**
3782
+ * プライベートフォントを読み込むか制御できます。
3177
3783
  *
3178
- * @see {@link IFontLoader.listAvailableFonts}
3784
+ * Whether to load private fonts or not
3785
+ * @internal
3179
3786
  */
3180
- fontFamilies?: (FontInfo | string)[];
3787
+ isPrivateFontEnabled?: boolean;
3181
3788
  /**
3182
3789
  * 明示的に指定されなかった場合に採用されるデフォルトのステージサイズ
3183
3790
  *
@@ -3211,6 +3818,7 @@ export declare const PlayerOverlay: FC<PlayerOverlayProps>;
3211
3818
  export declare interface PlayerOverlayProps {
3212
3819
  showStatus?: boolean;
3213
3820
  svgLogoImage?: string;
3821
+ onError?: (eventType: string, reason: any) => void;
3214
3822
  }
3215
3823
 
3216
3824
  export declare const PlayerSeekbar: FC<PlayerSeekbarProps>;
@@ -3220,15 +3828,13 @@ export declare interface PlayerSeekbarProps {
3220
3828
  disabled?: boolean;
3221
3829
  /** TextAlive player (this is optional because the value can also be passed with `PlayerContext`) */
3222
3830
  player?: IPlayer;
3223
- /** CSS style values for the seekbar */
3224
- styles?: SliderStyles;
3225
3831
  }
3226
3832
 
3227
3833
  /**
3228
- * TextAlive Player のサイズ
3834
+ * Player のサイズ
3229
3835
  *
3230
- * TextAlive Player size
3231
- * @public
3836
+ * Player size
3837
+ * @internal
3232
3838
  */
3233
3839
  declare interface PlayerSize {
3234
3840
  /**
@@ -3241,7 +3847,7 @@ declare interface PlayerSize {
3241
3847
  height: number;
3242
3848
  }
3243
3849
 
3244
- export declare const PlayerStatus: FC;
3850
+ export declare const PlayerStatus: FC<PlayerStatusProps>;
3245
3851
 
3246
3852
  export declare const PlayerStatusItem: FC<PlayerStatusItemProps>;
3247
3853
 
@@ -3250,6 +3856,10 @@ export declare interface PlayerStatusItemProps {
3250
3856
  status: PlayerLoaderStatus;
3251
3857
  }
3252
3858
 
3859
+ export declare interface PlayerStatusProps {
3860
+ onError?: (eventType: string, reason: any) => void;
3861
+ }
3862
+
3253
3863
  /**
3254
3864
  * TextAliveの動画オブジェクトを構築するためのオプション
3255
3865
  *
@@ -3286,6 +3896,7 @@ declare interface PlayerVideoOptions {
3286
3896
  *
3287
3897
  * - URL of lyrics text needs to support CORS access
3288
3898
  * - When failed, the default method is used
3899
+ * @internal
3289
3900
  */
3290
3901
  lyricsDirectAccess?: boolean;
3291
3902
  /**
@@ -3311,6 +3922,7 @@ export declare interface PlayerWrapperProps {
3311
3922
  overlayed?: boolean;
3312
3923
  rounded?: boolean;
3313
3924
  bordered?: boolean;
3925
+ children?: ReactNode;
3314
3926
  }
3315
3927
 
3316
3928
  /**
@@ -3347,34 +3959,22 @@ export declare interface PlayerWrapperProps {
3347
3959
  * @public
3348
3960
  */
3349
3961
  declare class Point implements IPoint {
3350
- /**
3351
- * @inheritDoc
3352
- */
3962
+ /** @inheritDoc */
3353
3963
  x: number;
3354
- /**
3355
- * @inheritDoc
3356
- */
3964
+ /** @inheritDoc */
3357
3965
  y: number;
3358
3966
  /**
3359
3967
  * @param x - X position.
3360
3968
  * @param y - Y position.
3361
3969
  */
3362
3970
  constructor(x?: number, y?: number);
3363
- /**
3364
- * @inheritDoc
3365
- */
3971
+ /** @inheritDoc */
3366
3972
  setValues(x?: number, y?: number): Point;
3367
- /**
3368
- * @inheritDoc
3369
- */
3973
+ /** @inheritDoc */
3370
3974
  copy(point: Point): Point;
3371
- /**
3372
- * @inheritDoc
3373
- */
3975
+ /** @inheritDoc */
3374
3976
  clone(): Point;
3375
- /**
3376
- * @inheritDoc
3377
- */
3977
+ /** @inheritDoc */
3378
3978
  toString(): string;
3379
3979
  }
3380
3980
 
@@ -3384,6 +3984,7 @@ export declare const ProfileProvider: FC<ProfileProviderProps>;
3384
3984
 
3385
3985
  export declare interface ProfileProviderProps {
3386
3986
  manager: IUserManager;
3987
+ children?: ReactNode;
3387
3988
  }
3388
3989
 
3389
3990
  /**
@@ -3410,6 +4011,10 @@ export declare interface ReactPlayerProps extends PartialPlayerOptions {
3410
4011
  * Player callback
3411
4012
  */
3412
4013
  onInit(player: IPlayer): void;
4014
+ /**
4015
+ * Child component if any (intended to be used by PlayerOverlay component)
4016
+ */
4017
+ children?: ReactNode;
3413
4018
  }
3414
4019
 
3415
4020
  /**
@@ -3427,10 +4032,16 @@ declare type RegionalText = {
3427
4032
 
3428
4033
  export declare function regionalText(text?: string | RegionalText, ja?: boolean): string | undefined;
3429
4034
 
4035
+ /**
4036
+ * @internal
4037
+ */
3430
4038
  declare interface RenderingGraphics {
3431
4039
  clear(): void;
3432
4040
  }
3433
4041
 
4042
+ /**
4043
+ * @internal
4044
+ */
3434
4045
  declare interface RenderingParameter {
3435
4046
  alpha: number;
3436
4047
  tx: Matrix2D;
@@ -3440,55 +4051,85 @@ declare interface RenderingParameter {
3440
4051
  }
3441
4052
 
3442
4053
  /**
4054
+ * 定期的に呼び出される描画用関数 / Rendering function that runs periodically
3443
4055
  * @public
3444
4056
  */
3445
- declare type RenderingUnitFunction<U extends IRenderingUnit> = (now: number, u: U) => void;
4057
+ declare type RenderingUnitFunction = (now: number, u: IRenderingUnit) => void;
3446
4058
 
4059
+ /**
4060
+ * @internal
4061
+ */
3447
4062
  declare interface RuntimeVideo {
3448
4063
  rendering: RenderingParameter;
4064
+ addCredit(p: IPhrase): void;
4065
+ removeCredit(p: IPhrase): void;
4066
+ addPhrase(p: IPhrase): void;
4067
+ removePhrase(p: IPhrase): void;
3449
4068
  addGraphic(g: IGraphic): void;
3450
4069
  removeGraphic(g: IGraphic): void;
3451
4070
  }
3452
4071
 
3453
- /**
3454
- * A seekbar allows users to seek for a numerical value in the specified range.
3455
- */
3456
4072
  export declare const Seekbar: FC<SeekbarProps>;
3457
4073
 
3458
- export declare interface SeekbarProps {
3459
- /** whether this seekbar is disabled or not */
3460
- disabled?: boolean;
3461
- /** maximum value of the seekbar slider [ms] */
4074
+ export declare interface SeekbarProps extends SliderProps {
3462
4075
  duration: number;
3463
- /** current value of the seekbar slider [ms] */
3464
4076
  position: number;
3465
- /** called when the current value is updated */
3466
4077
  onSeek?: (position: number) => void;
3467
- /** called when seek starts */
3468
4078
  onSeekStart?: () => void;
3469
- /** called when seek ends */
3470
4079
  onSeekEnd?: () => void;
3471
- /** CSS style values for the seekbar */
3472
- styles?: SliderStyles;
3473
4080
  }
3474
4081
 
3475
4082
  export declare const SelectDropdown: FC<SelectDropdownProps>;
3476
4083
 
3477
4084
  export declare interface SelectDropdownProps {
3478
4085
  label?: ReactNode;
3479
- labelTitle?: string;
3480
- options: Option_2[];
4086
+ description?: ReactNode;
4087
+ options: SelectOption[] | null;
3481
4088
  value: any;
4089
+ disabled?: boolean;
3482
4090
  onValueChange?(value: any): void;
3483
4091
  }
3484
4092
 
4093
+ export declare interface SelectOption {
4094
+ label: ReactNode;
4095
+ value: string | number | boolean | {
4096
+ [value: string]: string;
4097
+ };
4098
+ }
4099
+
3485
4100
  export declare const SelectWidget: FC<SelectWidgetProps>;
3486
4101
 
3487
4102
  export declare interface SelectWidgetProps {
3488
4103
  widget: ParameterWidget;
3489
- value: any;
4104
+ value: ParameterValue;
3490
4105
  onValueChange?(value: ParameterValue): void;
3491
4106
  withoutName?: boolean;
4107
+ description?: string | RegionalText;
4108
+ }
4109
+
4110
+ /**
4111
+ * @internal
4112
+ */
4113
+ declare interface ServerStatus {
4114
+ lang: string;
4115
+ version: string;
4116
+ releaseDate: string;
4117
+ status: {
4118
+ core: "ready" | "maintenance";
4119
+ renderer: "ready" | "maintenance";
4120
+ };
4121
+ app: {
4122
+ success: boolean;
4123
+ data: {
4124
+ name: string;
4125
+ url: string;
4126
+ status?: number;
4127
+ author: string;
4128
+ createdDate: string;
4129
+ };
4130
+ error?: string;
4131
+ message?: string;
4132
+ } | null;
3492
4133
  }
3493
4134
 
3494
4135
  export declare interface Size {
@@ -3496,39 +4137,19 @@ export declare interface Size {
3496
4137
  height: number;
3497
4138
  }
3498
4139
 
3499
- export declare const Slider: FC<SliderProps>;
3500
-
3501
- export declare interface SliderProps {
3502
- label?: ReactNode;
3503
- labelTitle?: string;
3504
- min: number;
3505
- max: number;
3506
- value: number;
3507
- onValueChange?(value: number): void;
3508
- withTextInput?: boolean;
3509
- styles?: SliderStyles;
3510
- }
3511
-
3512
- export declare interface SliderStyles {
3513
- track?: Interpolation;
3514
- active?: Interpolation;
3515
- thumb?: Interpolation;
3516
- disabled?: Interpolation;
3517
- }
3518
-
3519
4140
  export declare const SliderWidget: FC<SliderWidgetProps>;
3520
4141
 
3521
4142
  export declare interface SliderWidgetProps {
3522
4143
  widget: ParameterWidget;
3523
- value: any;
4144
+ value: ParameterValue;
3524
4145
  onValueChange?(value: number): void;
3525
4146
  withTextInput?: boolean;
3526
4147
  withoutName?: boolean;
3527
- styles?: SliderStyles;
4148
+ description?: string | RegionalText;
3528
4149
  }
3529
4150
 
3530
4151
  /**
3531
- * Songle 楽曲情報
4152
+ * 楽曲のメタ情報
3532
4153
  * @public
3533
4154
  */
3534
4155
  declare interface Song {
@@ -3569,12 +4190,12 @@ declare interface Song {
3569
4190
  * 楽曲の再生時間長 [s]
3570
4191
  *
3571
4192
  * - この値は低精度です
3572
- * - 演出に利用する値は必ず TextAlive Player から取得してください
4193
+ * - 演出に利用する値は必ず Player インスタンスから取得してください
3573
4194
  *
3574
4195
  * Song duration [s]
3575
4196
  *
3576
4197
  * - This value is error-prone
3577
- * - Gain more precise value from TextAlive Player instance
4198
+ * - Gain more precise value from Player instance
3578
4199
  */
3579
4200
  length: number;
3580
4201
  /**
@@ -3691,6 +4312,9 @@ declare interface Song {
3691
4312
  commented_at: string | null;
3692
4313
  }
3693
4314
 
4315
+ /**
4316
+ * @internal
4317
+ */
3694
4318
  declare interface SongAnalysis {
3695
4319
  beats: SongBeat[][];
3696
4320
  chords: SongChord[];
@@ -3698,26 +4322,35 @@ declare interface SongAnalysis {
3698
4322
  voice: SongVoice[][];
3699
4323
  }
3700
4324
 
4325
+ /**
4326
+ * @internal
4327
+ */
3701
4328
  declare type SongBeat = [
3702
- /** startTime [s] */ number,
3703
- /** ? */ number,
3704
- /** length */ number,
3705
- /** position */ number,
3706
- /** ? */ number];
4329
+ /** startTime [s] */ number,
4330
+ /** ? */ number,
4331
+ /** length */ number,
4332
+ /** position */ number,
4333
+ /** ? */ number
4334
+ ];
3707
4335
 
4336
+ /**
4337
+ * @internal
4338
+ */
3708
4339
  declare type SongChord = [
3709
- /** startTime [s] */ number,
3710
- /** endTime [s] */ number,
3711
- /** name */ string,
3712
- /** ? */ any[]];
4340
+ /** startTime [s] */ number,
4341
+ /** endTime [s] */ number,
4342
+ /** name */ string,
4343
+ /** ? */ any[]
4344
+ ];
3713
4345
 
3714
4346
  /**
3715
- * Detailed song information
3716
- * e.g. http://songle.jp/songs/1227536/info?format=json&min=1
4347
+ * 楽曲の詳細な情報 / Detailed song information
3717
4348
  * @internal
3718
4349
  */
3719
4350
  declare interface SongInfo {
4351
+ /** @internal */
3720
4352
  analysis: SongAnalysis;
4353
+ /** @internal */
3721
4354
  info: SongMeta;
3722
4355
  }
3723
4356
 
@@ -3735,12 +4368,12 @@ declare interface SongleLyrics {
3735
4368
  }
3736
4369
 
3737
4370
  /**
3738
- * Song information
3739
- * e.g. http://songle.jp/songs/www.youtube.com%2Fwatch%3Fv%3DKdNHFKTKX2s?format=json
3740
- * @internal
4371
+ * Songle 楽曲情報
4372
+ * @public
3741
4373
  */
3742
4374
  declare interface SongleSong {
3743
4375
  song: Song;
4376
+ /** @internal */
3744
4377
  status: SongStatus;
3745
4378
  }
3746
4379
 
@@ -3770,36 +4403,51 @@ declare interface SongLoaderListener {
3770
4403
  * Called when detailed song info is loaded
3771
4404
  * @param songInfo - 楽曲の詳細情報 / Detailed song info
3772
4405
  * @param reason - 失敗したときの理由 / Reason for failures (if any)
4406
+ * @internal
3773
4407
  * @deprecated Use {@link SongLoaderListener.onSongMapLoad} instead
3774
4408
  */
3775
4409
  onSongInfoLoad?(songInfo: SongInfo, reason?: Error): void;
3776
4410
  /**
3777
4411
  * 声量の情報が読み込まれたときに呼ばれる
3778
4412
  *
4413
+ * - 実際の声量情報は {@link ISongExplorer.getVocalAmplitude} を使って取得してください
4414
+ *
3779
4415
  * Called when vocal amplitude is loaded
3780
- * @param vocalAmplitude - 声量の情報
4416
+ *
4417
+ * - To retrieve vocal amplitude information, call {@link ISongExplorer.getVocalAmplitude}
4418
+ * @param vocalAmplitude - 声量の情報(未整形のデータ)
3781
4419
  * @param reason - 失敗したときの理由 / Reason for failures (if any)
3782
4420
  */
3783
4421
  onVocalAmplitudeLoad?(vocalAmplitude: VocalAmplitude, reason?: Error): void;
3784
4422
  /**
3785
4423
  * V/A空間の情報が読み込まれたときに呼ばれる
3786
4424
  *
4425
+ * - 実際のV/A空間の座標情報は {@link ISongExplorer.getValenceArousal} を使って取得してください
4426
+ *
3787
4427
  * Called when valence arousal info is loaded
3788
- * @param valenceArousal - V/A空間の情報
4428
+ *
4429
+ * - To retrieve valence/arousal metrics, call {@link ISongExplorer.getValenceArousal}
4430
+ * @param valenceArousal - V/A空間の情報(未整形のデータ)
3789
4431
  * @param reason - 失敗したときの理由 / Reason for failures (if any)
3790
4432
  */
3791
4433
  onValenceArousalLoad?(valenceArousal: ValenceArousal, reason?: Error): void;
3792
4434
  }
3793
4435
 
4436
+ /**
4437
+ * @internal
4438
+ */
3794
4439
  declare interface SongMapRevisions {
3795
4440
  chord?: number;
3796
4441
  beat?: number;
3797
4442
  chorus?: number;
3798
4443
  }
3799
4444
 
4445
+ /**
4446
+ * @internal
4447
+ */
3800
4448
  declare interface SongMeta {
3801
4449
  /**
3802
- * @deprecated
4450
+ * @deprecated Use {@link code} to identify a Songle song
3803
4451
  */
3804
4452
  songId: number;
3805
4453
  offset: number;
@@ -3815,6 +4463,9 @@ declare interface SongMeta {
3815
4463
  code: string;
3816
4464
  }
3817
4465
 
4466
+ /**
4467
+ * @internal
4468
+ */
3818
4469
  declare interface SongRepetitiveSegment {
3819
4470
  index: number;
3820
4471
  chorus: boolean;
@@ -3826,7 +4477,7 @@ declare interface SongRepetitiveSegment {
3826
4477
  * Songle での解析状況
3827
4478
  *
3828
4479
  * Songle analysis status
3829
- * @public
4480
+ * @internal
3830
4481
  */
3831
4482
  declare interface SongStatus {
3832
4483
  /**
@@ -3867,17 +4518,38 @@ declare interface SongStatus {
3867
4518
  * Lyrics
3868
4519
  */
3869
4520
  lyrics: boolean;
4521
+ /**
4522
+ * 実データにアクセス権のあるプライベート楽曲
4523
+ *
4524
+ * Private song with owner permission
4525
+ * @internal
4526
+ */
4527
+ owner?: boolean;
3870
4528
  }
3871
4529
 
3872
- declare type SongVoice = [[/** current f0 */ number, /** initially recognized f0 */ number],
3873
- /** number of frames (10 [ms] per each frame) */ number];
4530
+ /**
4531
+ * @internal
4532
+ */
4533
+ declare type SongVoice = [
4534
+ [ /** current f0 */
4535
+ number, /** initially recognized f0 */
4536
+ number
4537
+ ],
4538
+ /** number of frames (10 [ms] per each frame) */ number
4539
+ ];
3874
4540
 
4541
+ /**
4542
+ * @internal
4543
+ */
3875
4544
  declare interface TemplateCreateRequest {
3876
4545
  sourceId?: number;
3877
4546
  script: string;
3878
4547
  log?: string;
3879
4548
  }
3880
4549
 
4550
+ /**
4551
+ * @internal
4552
+ */
3881
4553
  declare interface TemplateCreateResponse {
3882
4554
  success: boolean;
3883
4555
  /** Template ID (when succeeded) */
@@ -3905,6 +4577,9 @@ declare interface TemplateData {
3905
4577
  };
3906
4578
  }
3907
4579
 
4580
+ /**
4581
+ * @internal
4582
+ */
3908
4583
  declare interface TemplateEntry {
3909
4584
  id: number;
3910
4585
  type: number;
@@ -3918,15 +4593,11 @@ declare interface TemplateEntry {
3918
4593
  createdDate: string;
3919
4594
  }
3920
4595
 
3921
- declare interface TemplateList {
3922
- list: TemplateEntry[];
3923
- }
3924
-
3925
4596
  /**
3926
4597
  * テンプレートプログラミングに関するイベントのリスナ
3927
4598
  *
3928
4599
  * Event listener for template editing
3929
- * @public
4600
+ * @internal
3930
4601
  */
3931
4602
  declare interface TemplateListener {
3932
4603
  /**
@@ -3943,14 +4614,28 @@ declare interface TemplateListener {
3943
4614
  onTemplatesLoad?(templates: string[], reason?: Error): void;
3944
4615
  }
3945
4616
 
3946
- declare interface TemplateListRequest extends ListSimpleRequest {
3947
- maxResults?: number;
4617
+ /**
4618
+ * @internal
4619
+ */
4620
+ declare interface TemplateListForVideoRequest extends ListRequest {
4621
+ script?: boolean;
4622
+ withoutAuthors?: boolean;
4623
+ }
4624
+
4625
+ /**
4626
+ * @internal
4627
+ */
4628
+ declare interface TemplateListRequest extends ListRequest {
3948
4629
  className?: string;
3949
4630
  script?: boolean;
3950
4631
  withoutAuthors?: boolean;
3951
4632
  withoutOriginalAuthors?: boolean;
4633
+ templateType?: "text" | "graphic" | "utility";
3952
4634
  }
3953
4635
 
4636
+ /**
4637
+ * @internal
4638
+ */
3954
4639
  declare type TemplateListResponse = ListSimpleResponse<TemplateEntry>;
3955
4640
 
3956
4641
  /**
@@ -3964,7 +4649,7 @@ declare interface TextLoaderListener {
3964
4649
  * @param lyrics - 発声タイミングの情報 / Lyrics timing info
3965
4650
  * @param reason - 失敗したときの理由 / Reason for failures (if any)
3966
4651
  */
3967
- onLyricsLoad?(lyrics: LyricsDiffInfo, reason?: Error): void;
4652
+ onLyricsLoad?(lyrics: LyricsInfo, reason?: Error): void;
3968
4653
  /**
3969
4654
  * 歌詞テキストが読み込まれたときに呼ばれる
3970
4655
  *
@@ -3975,6 +4660,9 @@ declare interface TextLoaderListener {
3975
4660
  onTextLoad?(lyricsBody: LyricsBody, reason?: Error): void;
3976
4661
  }
3977
4662
 
4663
+ /**
4664
+ * @internal
4665
+ */
3978
4666
  declare interface TextParsingResponse {
3979
4667
  status: "success" | "error";
3980
4668
  result?: WordParsingResponse[][];
@@ -3985,21 +4673,54 @@ declare interface TextParsingResponse {
3985
4673
  * 時刻付きオブジェクト
3986
4674
  *
3987
4675
  * Timed object
4676
+ *
4677
+ * @see {@link TimedUnit}
3988
4678
  * @public
3989
4679
  */
3990
4680
  declare interface TimedObject {
3991
4681
  startTime: number;
3992
4682
  endTime: number;
4683
+ /**
4684
+ * Returns whether this time range contains the specified time (start and end inclusive).
4685
+ * @param time - 時刻 [ms] / Time [ms]
4686
+ */
3993
4687
  contains(time: number): boolean;
4688
+ /**
4689
+ * Returns whether the specified range overlaps with this time range (start and end inclusive).
4690
+ * @param obj - 時刻付きオブジェクト / Timed object
4691
+ */
4692
+ overlaps(obj: TimedObject): boolean;
4693
+ /**
4694
+ * Returns whether the specified range overlaps with this time range (start and end inclusive).
4695
+ * @param startTime - 開始時刻 [ms] / Start time [ms]
4696
+ * @param endTime - 終了時刻 [ms] / End time [ms]
4697
+ */
3994
4698
  overlaps(startTime: number, endTime: number): boolean;
3995
4699
  }
3996
4700
 
4701
+ /**
4702
+ * 時区間駆動型APIの問い合わせ結果 / Query results for time-range-driven API
4703
+ * @public
4704
+ */
4705
+ declare interface TimedObjectsInRange<T extends TimedObject> {
4706
+ /** 指定区間の終了時にかぶっているオブジェクト / Timed object overlapping with the end time of the specified time range */
4707
+ current: T | null;
4708
+ /** 指定区間内で開始したオブジェクト / Timed objects that started within the specified time range */
4709
+ entered: T[];
4710
+ /** 指定区間内で終了したオブジェクト / Timed objects that ended within the specified time range */
4711
+ left: T[];
4712
+ /** 指定区間の直前にあるオブジェクト / The last timed object before the specified time range */
4713
+ previous: T | null;
4714
+ /** 指定区間の直後にあるオブジェクト / The first timed object after the specified time range */
4715
+ next: T | null;
4716
+ }
4717
+
3997
4718
  /**
3998
4719
  * **Timer**
3999
4720
  *
4000
- * TextAlive Player の音源の再生状態を管理するクラスが実装するインタフェースです。
4721
+ * Player の音源の再生状態を管理するクラスが実装するインタフェースです。
4001
4722
  *
4002
- * Classes that manage music playback for TextAlive Player should implement this interface.
4723
+ * Classes that manage music playback for Player should implement this interface.
4003
4724
  * @public
4004
4725
  */
4005
4726
  declare interface Timer {
@@ -4013,20 +4734,20 @@ declare interface Timer {
4013
4734
  * **現在の再生位置 [ms]**
4014
4735
  *
4015
4736
  * `Timer` 実装クラスはこの値をリアルタイムに計算して返さなくてはなりません。
4016
- * TextAlive には他にも再生位置を返すAPIが以下の2種類用意されていますが、実装手法の違いにより、このAPIが常に最も精確な値を返します。
4737
+ * 他にも再生位置を返す API が以下の2種類用意されていますが、実装手法の違いにより、この API が常に最も精確な値を返します。
4017
4738
  *
4018
4739
  * - {@link IPlayer.mediaPosition} は `Timer` 実装クラスによって定期的に更新されます
4019
- * - {@link IPlayer.videoPosition} は TextAlive Player が定期的に呼び出す {@link IRenderingUnit.animate} が成功してから更新されます
4740
+ * - {@link IPlayer.videoPosition} は Player が定期的に呼び出す {@link IRenderingUnit.animate} が成功してから更新されます
4020
4741
  *
4021
- * このAPIを利用するアプリでは、動画のシーク操作に対応するために {@link PlayerEventListener.onVideoSeekStart} {@link PlayerEventListener.onVideoSeek} {@link PlayerEventListener.onVideoSeekEnd} イベントを適切にハンドルする必要があります。
4742
+ * この API を利用するアプリでは、動画のシーク操作に対応するために {@link PlayerEventListener.onVideoSeekStart} {@link PlayerEventListener.onVideoSeek} {@link PlayerEventListener.onVideoSeekEnd} イベントを適切にハンドルする必要があります。
4022
4743
  *
4023
4744
  * **Current playback position [ms]**
4024
4745
  *
4025
4746
  * `Timer` implementations need to calculate this property value in real time.
4026
- * While TextAlive also has the following APIs to retrieve the current playback position, this one returns the most precise value at any time.
4747
+ * While there are two other APIs to retrieve the current playback position as follows, this one returns the most precise value.
4027
4748
  *
4028
4749
  * - {@link IPlayer.mediaPosition} is updated by `Timer` implementations periodically
4029
- * - {@link IPlayer.videoPosition} is updated by TextAlive Player after the periodic call to {@link IRenderingUnit.animate}
4750
+ * - {@link IPlayer.videoPosition} is updated by Player after the periodic call to {@link IRenderingUnit.animate}
4030
4751
  *
4031
4752
  * Applications utilizing this API need to handle {@link PlayerEventListener.onVideoSeekStart} {@link PlayerEventListener.onVideoSeek} {@link PlayerEventListener.onVideoSeekEnd} events appropriately so that the applications respond to the video seeking operation.
4032
4753
  */
@@ -4086,9 +4807,9 @@ declare interface Timer {
4086
4807
  */
4087
4808
  declare interface TimerInitOptions {
4088
4809
  /**
4089
- * TextAlive Player インスタンス
4810
+ * Player インスタンス
4090
4811
  *
4091
- * TextAlive Player instance
4812
+ * Player instance
4092
4813
  */
4093
4814
  player: IPlayer;
4094
4815
  /**
@@ -4121,13 +4842,14 @@ declare interface UnitData {
4121
4842
 
4122
4843
  /**
4123
4844
  * TextAlive user information
4845
+ *
4846
+ * @internal
4124
4847
  */
4125
4848
  declare interface UserEntry {
4126
4849
  id?: number;
4127
4850
  name?: string;
4128
4851
  displayName?: string;
4129
4852
  photoUrl?: string;
4130
- language?: string;
4131
4853
  twitterId?: number;
4132
4854
  twitterName?: string;
4133
4855
  twitterDisplayName?: string;
@@ -4150,12 +4872,20 @@ declare interface UserEntry {
4150
4872
  songleUserName?: string;
4151
4873
  songleAccessToken?: string;
4152
4874
  songleRefreshToken?: string;
4875
+ language?: string;
4876
+ isDeveloper?: boolean;
4153
4877
  createdDate?: string;
4154
4878
  updatedDate?: string;
4155
4879
  }
4156
4880
 
4157
- export declare function useResize<T extends HTMLElement>(): [Size, RefObject<T>];
4881
+ export declare function useResize<T extends HTMLElement>(): [
4882
+ Size,
4883
+ RefObject<T | null>
4884
+ ];
4158
4885
 
4886
+ /**
4887
+ * @internal
4888
+ */
4159
4889
  declare interface UserListener {
4160
4890
  onUserProfileUpdated?: (user: UserProfile) => void;
4161
4891
  onUserMergeRequired?: (user: UserEntry, mergeWith: UserEntry) => void;
@@ -4166,6 +4896,8 @@ declare interface UserListener {
4166
4896
 
4167
4897
  /**
4168
4898
  * TextAlive user profile
4899
+ *
4900
+ * @internal
4169
4901
  */
4170
4902
  declare interface UserProfile {
4171
4903
  user: UserEntry;
@@ -4177,8 +4909,15 @@ declare interface UserProfile {
4177
4909
  }
4178
4910
 
4179
4911
  /**
4180
- * Valence and arousal model information
4181
- * e.g. https://songle.jp/songs/ad3e5f353/av.json
4912
+ * @internal
4913
+ */
4914
+ declare interface UserUpdateRequest {
4915
+ language?: string;
4916
+ isDeveloper?: boolean;
4917
+ }
4918
+
4919
+ /**
4920
+ * V/A空間の情報 / Valence and arousal model information
4182
4921
  * @internal
4183
4922
  */
4184
4923
  declare interface ValenceArousal {
@@ -4188,6 +4927,9 @@ declare interface ValenceArousal {
4188
4927
  seq: ValenceArousalUnit[];
4189
4928
  }
4190
4929
 
4930
+ /**
4931
+ * @internal
4932
+ */
4191
4933
  declare interface ValenceArousalUnit extends ValenceArousalValue {
4192
4934
  /** Time */
4193
4935
  t: [number, number];
@@ -4196,20 +4938,26 @@ declare interface ValenceArousalUnit extends ValenceArousalValue {
4196
4938
  /**
4197
4939
  * V/A空間の座標値
4198
4940
  *
4941
+ * - 感情価、覚醒度とも `[-1, 1]` の範囲に正規化された値
4942
+ * - 曲内の相対的な変化 **ではなく** 曲間で比較可能な絶対値
4943
+ *
4199
4944
  * Valence arousal data
4945
+ *
4946
+ * - Both valence and arousal values range from -1 to 1
4947
+ * - The values do NOT represent relative changes within a song but absolute values comparable with values in other songs
4200
4948
  * @public
4201
4949
  */
4202
4950
  declare interface ValenceArousalValue {
4203
4951
  /**
4204
- * 感情価
4952
+ * 感情価 [-1, 1]
4205
4953
  *
4206
- * Valence
4954
+ * Valence [-1, 1]
4207
4955
  */
4208
4956
  v: number;
4209
4957
  /**
4210
- * 覚醒度
4958
+ * 覚醒度 [-1, 1]
4211
4959
  *
4212
- * Arousal
4960
+ * Arousal [-1, 1]
4213
4961
  */
4214
4962
  a: number;
4215
4963
  }
@@ -4221,7 +4969,14 @@ declare interface VideoData {
4221
4969
  startTime?: number;
4222
4970
  endTime?: number;
4223
4971
  duration?: number;
4972
+ /**
4973
+ * @internal
4974
+ */
4975
+ credits?: PhraseData[];
4224
4976
  phrases?: PhraseData[];
4977
+ /**
4978
+ * @internal
4979
+ */
4225
4980
  graphics?: GraphicData[];
4226
4981
  /**
4227
4982
  * @internal
@@ -4233,7 +4988,7 @@ declare interface VideoData {
4233
4988
 
4234
4989
  /**
4235
4990
  * TextAlive の動画データ
4236
- * @public
4991
+ * @internal
4237
4992
  */
4238
4993
  declare interface VideoEntry {
4239
4994
  /**
@@ -4249,7 +5004,7 @@ declare interface VideoEntry {
4249
5004
  */
4250
5005
  sourceOriginId: number;
4251
5006
  /**
4252
- * @deprecated
5007
+ * @deprecated {@link songleCode} で楽曲を特定してください / Use {@link songleCode} to identify a Songle song
4253
5008
  * @internal
4254
5009
  */
4255
5010
  songleId: number;
@@ -4328,7 +5083,7 @@ declare interface VideoEntry {
4328
5083
  }
4329
5084
 
4330
5085
  /**
4331
- * @public
5086
+ * @internal
4332
5087
  */
4333
5088
  declare interface VideoEntryConfig extends VideoSizeConfig {
4334
5089
  /**
@@ -4339,6 +5094,7 @@ declare interface VideoEntryConfig extends VideoSizeConfig {
4339
5094
 
4340
5095
  /**
4341
5096
  * Options for exporting video object
5097
+ * @internal
4342
5098
  */
4343
5099
  declare interface VideoExportOptions {
4344
5100
  /**
@@ -4348,7 +5104,30 @@ declare interface VideoExportOptions {
4348
5104
  }
4349
5105
 
4350
5106
  /**
4351
- * @public
5107
+ * @internal
5108
+ */
5109
+ declare interface VideoListRequest extends ListRequest {
5110
+ /**
5111
+ * @deprecated Use {@link VideoListRequest.songCode} instead
5112
+ */
5113
+ songId?: number;
5114
+ songCode?: string;
5115
+ authorId?: number;
5116
+ mine?: boolean;
5117
+ sort?: "latest" | "popularity";
5118
+ uniqueSource?: boolean;
5119
+ uniqueAuthor?: boolean;
5120
+ uniqueSong?: boolean;
5121
+ template?: string;
5122
+ }
5123
+
5124
+ /**
5125
+ * @internal
5126
+ */
5127
+ declare type VideoListResponse = ListResponse<VideoEntry>;
5128
+
5129
+ /**
5130
+ * @internal
4352
5131
  */
4353
5132
  declare interface VideoLoaderListener {
4354
5133
  /**
@@ -4362,7 +5141,7 @@ declare interface VideoLoaderListener {
4362
5141
  }
4363
5142
 
4364
5143
  /**
4365
- * @public
5144
+ * @internal
4366
5145
  */
4367
5146
  declare interface VideoSizeConfig {
4368
5147
  /**
@@ -4386,29 +5165,45 @@ declare interface VideoSizeConfig {
4386
5165
  }
4387
5166
 
4388
5167
  /**
4389
- * Vocal amplitude information
4390
- * e.g. https://songle.jp/songs/ad3e5f353/vamplitude.json
5168
+ * 楽曲の声量の情報 / Vocal amplitude information
4391
5169
  * @internal
4392
5170
  */
4393
5171
  declare type VocalAmplitude = Array<number>;
4394
5172
 
4395
5173
  export declare const Widget: FC<WidgetProps>;
4396
5174
 
5175
+ export declare const WidgetLabel: FC<WidgetLabelProps>;
5176
+
5177
+ declare interface WidgetLabelProps extends TextProps {
5178
+ children?: ReactNode;
5179
+ }
5180
+
5181
+ export declare type WidgetPosition = "leftAligned" | "rightAligned";
5182
+
4397
5183
  export declare interface WidgetProps {
5184
+ position?: WidgetPosition;
4398
5185
  widget: ParameterWidget;
4399
5186
  value: ParameterValue;
4400
5187
  colorFactory(hexString: string): IColor;
4401
5188
  onValueChange(name: string, value: ParameterValue): void;
5189
+ withPrivate?: boolean;
4402
5190
  withoutName?: boolean;
5191
+ description?: string | RegionalText;
4403
5192
  }
4404
5193
 
4405
- export declare const Widgets: FC<WidgetsProps>;
5194
+ export declare const Widgets: ForwardRefExoticComponent<WidgetsProps & RefAttributes<WidgetsIface>>;
5195
+
5196
+ export declare interface WidgetsIface {
5197
+ values: ParameterValues;
5198
+ setValues(values: ParameterValues): void;
5199
+ }
4406
5200
 
4407
5201
  export declare interface WidgetsProps {
4408
5202
  widgets: ParameterWidget[];
4409
5203
  initialValues?: ParameterValues;
4410
5204
  colorFactory(hexString: string): IColor;
4411
5205
  onValueChange?(name: string, value: ParameterValue): void;
5206
+ withPrivate?: boolean;
4412
5207
  withoutName?: boolean;
4413
5208
  }
4414
5209
 
@@ -4420,8 +5215,17 @@ declare interface WordData extends UnitData {
4420
5215
  pos?: string;
4421
5216
  rawPoS?: string;
4422
5217
  language?: string;
5218
+ /** @internal */
5219
+ countDown?: number;
5220
+ /** @internal */
5221
+ countUp?: number;
5222
+ /** @internal */
5223
+ initialCount?: number;
4423
5224
  }
4424
5225
 
5226
+ /**
5227
+ * @internal
5228
+ */
4425
5229
  declare interface WordParsingResponse {
4426
5230
  PoS: string;
4427
5231
  rawPoS: string;
@@ -4431,6 +5235,9 @@ declare interface WordParsingResponse {
4431
5235
  language: "ja" | "en";
4432
5236
  }
4433
5237
 
5238
+ /**
5239
+ * @internal
5240
+ */
4434
5241
  declare type WrapperTable = {
4435
5242
  [className: string]: new (...params: any[]) => any;
4436
5243
  };