@applemusic-like-lyrics/lyric 0.2.4 → 0.4.0

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.
Binary file
@@ -1,24 +1,25 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export function stringifyAss(a: number, b: number): void;
5
- export function decryptQrcHex(a: number, b: number, c: number): void;
6
- export function parseEslrc(a: number, b: number): number;
7
- export function stringifyEslrc(a: number, b: number): void;
8
- export function parseLrc(a: number, b: number): number;
9
- export function stringifyLrc(a: number, b: number): void;
10
- export function parseLys(a: number, b: number): number;
11
- export function stringifyLys(a: number, b: number): void;
12
- export function parseQrc(a: number, b: number): number;
13
- export function stringifyQrc(a: number, b: number): void;
14
- export function parseTTML(a: number, b: number): number;
15
- export function stringifyTTML(a: number, b: number): void;
16
- export function parseYrc(a: number, b: number): number;
17
- export function stringifyYrc(a: number, b: number): void;
18
- export function wasm_start(): void;
19
- export function __wbindgen_malloc(a: number, b: number): number;
20
- export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
21
- export function __wbindgen_add_to_stack_pointer(a: number): number;
22
- export function __wbindgen_free(a: number, b: number, c: number): void;
23
- export function __wbindgen_exn_store(a: number): void;
24
- export function __wbindgen_start(): void;
4
+ export const decryptQrcHex: (a: number, b: number) => [number, number];
5
+ export const parseEslrc: (a: number, b: number) => any;
6
+ export const parseLrc: (a: number, b: number) => any;
7
+ export const parseLys: (a: number, b: number) => any;
8
+ export const parseQrc: (a: number, b: number) => any;
9
+ export const parseTTML: (a: number, b: number) => any;
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
+ export const stringifyYrc: (a: any) => [number, number];
18
+ export const wasm_start: () => void;
19
+ export const __wbindgen_malloc: (a: number, b: number) => number;
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
+ export const __wbindgen_free: (a: number, b: number, c: number) => void;
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
@@ -1,4 +0,0 @@
1
- import * as wasm from "./lyric_bg.wasm";
2
- import { __wbg_set_wasm } from "./lyric_bg.js";
3
- __wbg_set_wasm(wasm);
4
- export * from "./lyric_bg.js";