@applemusic-like-lyrics/lyric 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +9 -3
- package/pkg/amll_lyric.d.ts +61 -60
- package/pkg/amll_lyric.js +5 -1
- package/pkg/amll_lyric_bg.js +391 -435
- package/pkg/amll_lyric_bg.wasm +0 -0
- package/pkg/amll_lyric_bg.wasm.d.ts +9 -9
- package/pkg/lyric.d.ts +0 -138
- package/pkg/lyric.js +0 -4
- package/pkg/lyric_bg.js +0 -746
- package/pkg/lyric_bg.wasm +0 -0
- package/pkg/lyric_bg.wasm.d.ts +0 -21
package/pkg/amll_lyric_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const stringifyAss: (a: any) => [number, number];
|
|
5
4
|
export const decryptQrcHex: (a: number, b: number) => [number, number];
|
|
6
5
|
export const parseEslrc: (a: number, b: number) => any;
|
|
7
|
-
export const stringifyEslrc: (a: any) => [number, number];
|
|
8
6
|
export const parseLrc: (a: number, b: number) => any;
|
|
9
|
-
export const stringifyLrc: (a: any) => [number, number];
|
|
10
7
|
export const parseLys: (a: number, b: number) => any;
|
|
11
|
-
export const stringifyLys: (a: any) => [number, number];
|
|
12
8
|
export const parseQrc: (a: number, b: number) => any;
|
|
13
|
-
export const stringifyQrc: (a: any) => [number, number];
|
|
14
9
|
export const parseTTML: (a: number, b: number) => any;
|
|
15
|
-
export const stringifyTTML: (a: any) => [number, number];
|
|
16
10
|
export const parseYrc: (a: number, b: number) => any;
|
|
11
|
+
export const stringifyAss: (a: any) => [number, number];
|
|
12
|
+
export const stringifyEslrc: (a: any) => [number, number];
|
|
13
|
+
export const stringifyLrc: (a: any) => [number, number];
|
|
14
|
+
export const stringifyLys: (a: any) => [number, number];
|
|
15
|
+
export const stringifyQrc: (a: any) => [number, number];
|
|
16
|
+
export const stringifyTTML: (a: any) => [number, number];
|
|
17
17
|
export const stringifyYrc: (a: any) => [number, number];
|
|
18
18
|
export const wasm_start: () => void;
|
|
19
|
-
export const __wbindgen_exn_store: (a: number) => void;
|
|
20
|
-
export const __externref_table_alloc: () => number;
|
|
21
|
-
export const __wbindgen_export_2: WebAssembly.Table;
|
|
22
19
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
23
20
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
21
|
+
export const __wbindgen_exn_store: (a: number) => void;
|
|
22
|
+
export const __externref_table_alloc: () => number;
|
|
23
|
+
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
24
24
|
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
25
25
|
export const __wbindgen_start: () => void;
|
package/pkg/lyric.d.ts
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* When the `console_error_panic_hook` feature is enabled, we can call the
|
|
5
|
-
* `set_panic_hook` function at least once during initialization, and then
|
|
6
|
-
* we will get better error messages if our code ever panics.
|
|
7
|
-
*
|
|
8
|
-
* For more details see
|
|
9
|
-
* https://github.com/rustwasm/console_error_panic_hook#readme
|
|
10
|
-
*/
|
|
11
|
-
export function set_panic_hook(): void;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* 解析 LyRiC 格式的歌词字符串
|
|
15
|
-
* @param src 歌词字符串
|
|
16
|
-
* @returns 成功解析出来的歌词
|
|
17
|
-
*/
|
|
18
|
-
export function parseLrc(src: string): LyricLine[];
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* 将歌词数组转换为 LyRiC 格式的字符串
|
|
22
|
-
* @param lines 歌词数组
|
|
23
|
-
* @returns LyRiC 格式的字符串
|
|
24
|
-
*/
|
|
25
|
-
export function stringifyLrc(lines: LyricLine[]): string;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* 解析 YRC 格式的歌词字符串
|
|
29
|
-
* @param src 歌词字符串
|
|
30
|
-
* @returns 成功解析出来的歌词
|
|
31
|
-
*/
|
|
32
|
-
export function parseYrc(src: string): LyricLine[];
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* 将歌词数组转换为 YRC 格式的字符串
|
|
36
|
-
* @param lines 歌词数组
|
|
37
|
-
* @returns YRC 格式的字符串
|
|
38
|
-
*/
|
|
39
|
-
export function stringifyYrc(lines: LyricLine[]): string;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* 解析 QRC 格式的歌词字符串
|
|
43
|
-
* @param src 歌词字符串
|
|
44
|
-
* @returns 成功解析出来的歌词
|
|
45
|
-
*/
|
|
46
|
-
export function parseQrc(src: string): LyricLine[];
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* 将歌词数组转换为 QRC 格式的字符串
|
|
50
|
-
* @param lines 歌词数组
|
|
51
|
-
* @returns QRC 格式的字符串
|
|
52
|
-
*/
|
|
53
|
-
export function stringifyQrc(lines: LyricLine[]): string;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* 解析 Lyricify Syllable 格式的歌词字符串
|
|
57
|
-
* @param src 歌词字符串
|
|
58
|
-
* @returns 成功解析出来的歌词
|
|
59
|
-
*/
|
|
60
|
-
export function parseLys(src: string): LyricLine[];
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* 将歌词数组转换为 Lyricify Syllable 格式的字符串
|
|
64
|
-
* @param lines 歌词数组
|
|
65
|
-
* @returns Lyricify Syllable 格式的字符串
|
|
66
|
-
*/
|
|
67
|
-
export function stringifyLys(lines: LyricLine[]): string;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* 解析 ESLyric 格式的歌词字符串
|
|
71
|
-
* @param src 歌词字符串
|
|
72
|
-
* @returns 成功解析出来的歌词
|
|
73
|
-
*/
|
|
74
|
-
export function parseEslrc(src: string): LyricLine[];
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* 将歌词数组转换为 ESLyric 格式的字符串
|
|
78
|
-
* @param lines 歌词数组
|
|
79
|
-
* @returns ESLyric 格式的字符串
|
|
80
|
-
*/
|
|
81
|
-
export function stringifyEslrc(lines: LyricLine[]): string;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* 将歌词数组转换为 ASS 字幕格式的字符串
|
|
85
|
-
*
|
|
86
|
-
* 注意导出会损失 10 毫秒以内的精度
|
|
87
|
-
*
|
|
88
|
-
* 主唱名称会变为 `v1`,对唱会变为 `v2`
|
|
89
|
-
*
|
|
90
|
-
* 如果是背景歌词则会在名称后面加上后缀 `-bg`
|
|
91
|
-
* @param lines 歌词数组
|
|
92
|
-
* @returns ASS 字幕格式的字符串
|
|
93
|
-
*/
|
|
94
|
-
export function stringifyAss(lines: LyricLine[]): string;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* 一个歌词单词
|
|
98
|
-
*/
|
|
99
|
-
export interface LyricWord {
|
|
100
|
-
/** 单词的起始时间 */
|
|
101
|
-
startTime: number;
|
|
102
|
-
/** 单词的结束时间 */
|
|
103
|
-
endTime: number;
|
|
104
|
-
/** 单词 */
|
|
105
|
-
word: string;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* 一行歌词,存储多个单词
|
|
110
|
-
* 如果是 LyRiC 等只能表达一行歌词的格式,则会将整行当做一个单词存储起来
|
|
111
|
-
*/
|
|
112
|
-
export interface LyricLine {
|
|
113
|
-
/**
|
|
114
|
-
* 该行的所有单词
|
|
115
|
-
* 如果是 LyRiC 等只能表达一行歌词的格式,这里就只会有一个单词
|
|
116
|
-
*/
|
|
117
|
-
words: LyricWord[];
|
|
118
|
-
/**
|
|
119
|
-
* 该行是否为背景歌词行
|
|
120
|
-
* 此选项只有作为 Lyricify Syllable 文件格式导入导出时才有意义
|
|
121
|
-
*/
|
|
122
|
-
isBG?: boolean;
|
|
123
|
-
/**
|
|
124
|
-
* 该行是否为对唱歌词行(即歌词行靠右对齐)
|
|
125
|
-
* 此选项只有作为 Lyricify Syllable 文件格式导入导出时才有意义
|
|
126
|
-
*/
|
|
127
|
-
isDuet?: boolean;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* 解密十六进制字符串格式的 Qrc 歌词数据
|
|
132
|
-
* 解密后可去头尾 XML 数据后通过调用 `parseQrc` 解析歌词行
|
|
133
|
-
* @param hexData 十六进制格式的字符串,代表被加密的歌词数据
|
|
134
|
-
* @returns 被解密出来的歌词字符串,是前后有 XML 混合的 QRC 歌词
|
|
135
|
-
*/
|
|
136
|
-
export function decryptQrcHex(hexData: string): string;
|
|
137
|
-
|
|
138
|
-
|
package/pkg/lyric.js
DELETED