Skip to content

Commit

Permalink
lyric: 补全函数声明,准备发布 0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve-xmh committed May 10, 2024
1 parent 33a2735 commit 94634dd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/lyric/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "amll-lyric"
version = "0.2.1"
version = "0.2.2"
authors = ["SteveXMH <39523898+Steve-xmh@users.noreply.github.com>"]
edition = "2021"
repository = "https://github.com/Steve-xmh/applemusic-like-lyrics"
Expand Down
2 changes: 1 addition & 1 deletion packages/lyric/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"SteveXMH <39523898+Steve-xmh@users.noreply.github.com>"
],
"description": "一个歌词解析/生成模块,着重于歌词内容解析,支持多种格式",
"version": "0.2.1",
"version": "0.2.2",
"license": "GPL-3.0",
"repository": {
"type": "git",
Expand Down
15 changes: 14 additions & 1 deletion packages/lyric/src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export interface LyricLine {
export function decryptQrcHex(hexData: string): string;

/**
* 一个 TTML 歌词行对象,存储了歌词行信息和元数据信息
* 一个 TTML 歌词行对象,存储了歌词行信息和 AMLL 元数据信息
*/
export interface TTMLLyric {
/**
Expand All @@ -137,3 +137,16 @@ export interface TTMLLyric {
*/
metadata: [string, string[]][];
}

/**
* 解析 TTML 格式(包含 AMLL 特有属性信息)的歌词字符串
* @param src 歌词字符串
* @returns 成功解析出来的 TTML 歌词对象
*/
export function parseTTML(src: string): TTMLLyric;

/**
* 将歌词数组转换为 TTML 格式(包含 AMLL 特有属性信息)的歌词字符串
* @param lyric TTML 歌词对象
*/
export function stringifyTTML(lyric: TTMLLyric): string;

0 comments on commit 94634dd

Please sign in to comment.