v2.0.0
This commit is contained in:
Vendored
+456
@@ -0,0 +1,456 @@
|
||||
|
||||
|
||||
declare namespace LX {
|
||||
type AddMusicLocationType = 'top' | 'bottom'
|
||||
|
||||
interface AppSetting {
|
||||
version: string
|
||||
|
||||
/**
|
||||
* 窗口大小id
|
||||
*/
|
||||
'common.windowSizeId': number
|
||||
|
||||
/**
|
||||
* 窗口大小id
|
||||
*/
|
||||
'common.fontSize': number
|
||||
|
||||
/**
|
||||
* 是否以全屏启动
|
||||
*/
|
||||
'common.startInFullscreen': boolean
|
||||
|
||||
/**
|
||||
* 语言id
|
||||
*/
|
||||
'common.langId': string | null
|
||||
|
||||
/**
|
||||
* api id
|
||||
*/
|
||||
'common.apiSource': string
|
||||
|
||||
/**
|
||||
* 音源名称类型,原名、别名
|
||||
*/
|
||||
'common.sourceNameType': 'alias' | 'real'
|
||||
|
||||
/**
|
||||
* 显示的字体
|
||||
*/
|
||||
'common.font': string
|
||||
|
||||
/**
|
||||
* 是否启用动画
|
||||
*/
|
||||
'common.isShowAnimation': boolean
|
||||
|
||||
/**
|
||||
* 是否启用随机弹窗动画
|
||||
*/
|
||||
'common.randomAnimate': boolean
|
||||
|
||||
/**
|
||||
* 是否同意软件协议
|
||||
*/
|
||||
'common.isAgreePact': boolean
|
||||
|
||||
/**
|
||||
* 控制按钮位置,左边、右边
|
||||
*/
|
||||
'common.controlBtnPosition': 'left' | 'right'
|
||||
|
||||
/**
|
||||
* 启动时自动播放歌曲
|
||||
*/
|
||||
'player.startupAutoPlay': boolean
|
||||
|
||||
/**
|
||||
* 切歌模式
|
||||
*/
|
||||
'player.togglePlayMethod': 'listLoop' | 'random' | 'list' | 'singleLoop' | 'none'
|
||||
|
||||
/**
|
||||
* 是否优先播放320k音质
|
||||
*/
|
||||
'player.highQuality': boolean
|
||||
|
||||
/**
|
||||
* 是否显示任务栏进度条
|
||||
*/
|
||||
'player.isShowTaskProgess': boolean
|
||||
|
||||
/**
|
||||
* 音量大小
|
||||
*/
|
||||
'player.volume': number
|
||||
|
||||
/**
|
||||
* 是否静音
|
||||
*/
|
||||
'player.isMute': boolean
|
||||
|
||||
/**
|
||||
* 音频输出设备id
|
||||
*/
|
||||
'player.mediaDeviceId': string
|
||||
|
||||
/**
|
||||
* 是否在音频输出设备更改时暂停播放
|
||||
*/
|
||||
'player.isMediaDeviceRemovedStopPlay': boolean
|
||||
|
||||
/**
|
||||
* 是否显示歌词翻译
|
||||
*/
|
||||
'player.isShowLyricTranslation': boolean
|
||||
|
||||
/**
|
||||
* 是否显示歌词罗马音
|
||||
*/
|
||||
'player.isShowLyricRoma': boolean
|
||||
|
||||
/**
|
||||
* 是否将歌词从简体转换为繁体
|
||||
*/
|
||||
'player.isS2t': boolean
|
||||
|
||||
/**
|
||||
* 是否播放卡拉OK歌词
|
||||
*/
|
||||
'player.isPlayLxlrc': boolean
|
||||
|
||||
/**
|
||||
* 启动软件时是否恢复上次播放进度
|
||||
*/
|
||||
'player.isSavePlayTime': boolean
|
||||
|
||||
/**
|
||||
* 是否启用音频可视化
|
||||
*/
|
||||
'player.audioVisualization': boolean
|
||||
|
||||
/**
|
||||
* 定时暂停播放-是否等待歌曲播放完毕再暂停
|
||||
*/
|
||||
'player.waitPlayEndStop': boolean
|
||||
|
||||
/**
|
||||
* 定时暂停播放-倒计时时间
|
||||
*/
|
||||
'player.waitPlayEndStopTime': string
|
||||
|
||||
/**
|
||||
* 是否启用音频加载失败时自动切歌
|
||||
*/
|
||||
'player.autoSkipOnError': boolean
|
||||
|
||||
/**
|
||||
* 播放详情页-是否缩放当前播放的歌词行
|
||||
*/
|
||||
'playDetail.isZoomActiveLrc': boolean
|
||||
|
||||
/**
|
||||
* 播放详情页-是否允许通过歌词调整播放进度
|
||||
*/
|
||||
'playDetail.isShowLyricProgressSetting': boolean
|
||||
|
||||
/**
|
||||
* 播放详情页-歌词字体大小
|
||||
*/
|
||||
'playDetail.style.fontSize': number
|
||||
|
||||
/**
|
||||
* 播放详情页-歌词对齐方式
|
||||
*/
|
||||
'playDetail.style.align': 'center' | 'left' | 'right'
|
||||
|
||||
|
||||
/**
|
||||
* 是否启用桌面歌词
|
||||
*/
|
||||
'desktopLyric.enable': boolean
|
||||
|
||||
/**
|
||||
* 是否锁定桌面歌词
|
||||
*/
|
||||
'desktopLyric.isLock': boolean
|
||||
|
||||
/**
|
||||
* 是在置顶桌面
|
||||
*/
|
||||
'desktopLyric.isAlwaysOnTop': boolean
|
||||
|
||||
/**
|
||||
* 是否自动刷新歌词置顶
|
||||
*/
|
||||
'desktopLyric.isAlwaysOnTopLoop': boolean
|
||||
|
||||
/**
|
||||
* 是否启用音频可视化
|
||||
*/
|
||||
'desktopLyric.audioVisualization': boolean
|
||||
|
||||
/**
|
||||
* 桌面歌词窗口宽度
|
||||
*/
|
||||
'desktopLyric.width': number
|
||||
|
||||
/**
|
||||
* 桌面歌词窗口高度
|
||||
*/
|
||||
'desktopLyric.height': number
|
||||
|
||||
/**
|
||||
* 桌面歌词窗口x坐标
|
||||
*/
|
||||
'desktopLyric.x': number | null
|
||||
|
||||
/**
|
||||
* 桌面歌词窗口y坐标
|
||||
*/
|
||||
'desktopLyric.y': number | null
|
||||
|
||||
/**
|
||||
* 是否允许桌面歌词窗口拖出主屏幕之外
|
||||
*/
|
||||
'desktopLyric.isLockScreen': boolean
|
||||
|
||||
/**
|
||||
* 是否延迟桌面歌词滚动
|
||||
*/
|
||||
'desktopLyric.isDelayScroll': boolean
|
||||
|
||||
/**
|
||||
* 是否在鼠标划过桌面歌词窗口时降低歌词透明度
|
||||
*/
|
||||
'desktopLyric.isHoverHide': boolean
|
||||
|
||||
/**
|
||||
* 歌词方向
|
||||
*/
|
||||
'desktopLyric.direction': 'horizontal' | 'vertical'
|
||||
|
||||
/**
|
||||
* 是否在鼠标划过桌面歌词窗口时降低歌词透明度
|
||||
*/
|
||||
'desktopLyric.style.align': 'center' | 'left' | 'right'
|
||||
|
||||
/**
|
||||
* 桌面歌词字体
|
||||
*/
|
||||
'desktopLyric.style.font': string
|
||||
|
||||
/**
|
||||
* 桌面歌词字体大小
|
||||
*/
|
||||
'desktopLyric.style.fontSize': number
|
||||
|
||||
/**
|
||||
* 桌面歌词未播放字体颜色
|
||||
*/
|
||||
'desktopLyric.style.lyricUnplayColor': string
|
||||
|
||||
/**
|
||||
* 桌面歌词已播放字体颜色
|
||||
*/
|
||||
'desktopLyric.style.lyricPlayedColor': string
|
||||
|
||||
/**
|
||||
* 桌面歌词字体阴影颜色
|
||||
*/
|
||||
'desktopLyric.style.lyricShadowColor': string
|
||||
|
||||
/**
|
||||
* 桌面歌词加粗字体
|
||||
*/
|
||||
// 'desktopLyric.style.fontWeight': boolean
|
||||
|
||||
/**
|
||||
* 桌面歌词字体透明度
|
||||
*/
|
||||
'desktopLyric.style.opacity': number
|
||||
|
||||
/**
|
||||
* 桌面歌词是否允许换行
|
||||
*/
|
||||
'desktopLyric.style.ellipsis': boolean
|
||||
|
||||
/**
|
||||
* 是否缩放当前正在播放的桌面歌词
|
||||
*/
|
||||
'desktopLyric.style.isZoomActiveLrc': boolean
|
||||
|
||||
/**
|
||||
* 是否启用双击列表里的歌曲时自动切换到当前列表播放(仅对歌单、排行榜有效)
|
||||
*/
|
||||
'list.isClickPlayList': boolean
|
||||
|
||||
/**
|
||||
* 是否显示歌曲来源(仅对我的列表有效)
|
||||
*/
|
||||
'list.isShowSource': boolean
|
||||
|
||||
/**
|
||||
* 是否自动恢复列表滚动位置(仅对我的列表有效)
|
||||
*/
|
||||
'list.isSaveScrollLocation': boolean
|
||||
|
||||
/**
|
||||
* 添加歌曲到我的列表时的方式
|
||||
*/
|
||||
'list.addMusicLocationType': LX.AddMusicLocationType
|
||||
|
||||
/**
|
||||
* 是否显示列表操作按钮列
|
||||
*/
|
||||
'list.actionButtonsVisible': boolean
|
||||
|
||||
/**
|
||||
* 是否启用下载功能
|
||||
*/
|
||||
'download.enable': boolean
|
||||
|
||||
/**
|
||||
* 下载路径
|
||||
*/
|
||||
'download.savePath': string
|
||||
|
||||
/**
|
||||
* 文件命名方式
|
||||
*/
|
||||
'download.fileName': '歌名 - 歌手' | '歌手 - 歌名' | '歌名'
|
||||
|
||||
/**
|
||||
* 最大并发下载数
|
||||
*/
|
||||
'download.maxDownloadNum': number
|
||||
|
||||
/**
|
||||
* 是否下载lrc文件
|
||||
*/
|
||||
'download.isDownloadLrc': boolean
|
||||
|
||||
/**
|
||||
* 是否下载翻译歌词文件
|
||||
*/
|
||||
'download.isDownloadTLrc': boolean
|
||||
|
||||
/**
|
||||
* 是否下载罗马音歌词文件
|
||||
*/
|
||||
'download.isDownloadRLrc': boolean
|
||||
|
||||
/**
|
||||
* 保存lrc时的文本编码格式
|
||||
*/
|
||||
'download.lrcFormat': 'utf8' | 'gbk'
|
||||
|
||||
/**
|
||||
* 是否在音频文件中嵌入歌曲封面
|
||||
*/
|
||||
'download.isEmbedPic': boolean
|
||||
|
||||
/**
|
||||
* 是否在音频文件中嵌入歌词
|
||||
*/
|
||||
'download.isEmbedLyric': boolean
|
||||
|
||||
/**
|
||||
* 歌曲源不可用时,是否启用换源下载
|
||||
*/
|
||||
'download.isUseOtherSource': boolean
|
||||
|
||||
/**
|
||||
* 主题id
|
||||
*/
|
||||
'theme.id': string
|
||||
|
||||
/**
|
||||
* 亮色主题id
|
||||
*/
|
||||
'theme.lightId': string
|
||||
|
||||
/**
|
||||
* 暗色主题id
|
||||
*/
|
||||
'theme.darkId': string
|
||||
|
||||
/**
|
||||
* 是否显示热门搜索
|
||||
*/
|
||||
'search.isShowHotSearch': boolean
|
||||
|
||||
/**
|
||||
* 是否显示搜索历史
|
||||
*/
|
||||
'search.isShowHistorySearch': boolean
|
||||
|
||||
/**
|
||||
* 软件启动时是否自动聚焦搜索框
|
||||
*/
|
||||
'search.isFocusSearchBox': boolean
|
||||
|
||||
/**
|
||||
* 是否启用代理
|
||||
*/
|
||||
'network.proxy.enable': boolean
|
||||
|
||||
/**
|
||||
* 代理服务器地址
|
||||
*/
|
||||
'network.proxy.host': string
|
||||
|
||||
/**
|
||||
* 代理服务器端口号
|
||||
*/
|
||||
'network.proxy.port': string
|
||||
|
||||
/**
|
||||
* 代理服务器用户名
|
||||
*/
|
||||
'network.proxy.username': string
|
||||
|
||||
/**
|
||||
* 代理服务器密码
|
||||
*/
|
||||
'network.proxy.password': string
|
||||
|
||||
/**
|
||||
* 是否启用托盘
|
||||
*/
|
||||
'tray.enable': boolean
|
||||
|
||||
/**
|
||||
* 是否关闭时是否最小化到托盘
|
||||
*/
|
||||
// 'tray.isToTray': boolean
|
||||
|
||||
/**
|
||||
* 托盘主题id
|
||||
*/
|
||||
'tray.themeId': number
|
||||
|
||||
/**
|
||||
* 是否启用同步服务
|
||||
*/
|
||||
'sync.enable': boolean
|
||||
|
||||
/**
|
||||
* 同步服务端口号
|
||||
*/
|
||||
'sync.port': '23332' | string
|
||||
|
||||
/**
|
||||
* 是否在离开搜索界面时自动清空搜索框
|
||||
*/
|
||||
'odc.isAutoClearSearchInput': boolean
|
||||
|
||||
/**
|
||||
* 是否在离开搜索界面时自动清空搜索结果列表
|
||||
*/
|
||||
'odc.isAutoClearSearchList': boolean
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+122
@@ -0,0 +1,122 @@
|
||||
// import './app_setting'
|
||||
|
||||
declare namespace LX {
|
||||
interface CmdParams {
|
||||
/**
|
||||
* 搜索,启动软件时自动在搜索框搜索指定的内容,例如:-search="突然的自我 - 伍佰"
|
||||
*/
|
||||
search?: string
|
||||
|
||||
/**
|
||||
* 禁用硬件加速启动
|
||||
*/
|
||||
dha?: boolean
|
||||
|
||||
/**
|
||||
* 以非透明模式启动
|
||||
*/
|
||||
dt?: boolean
|
||||
|
||||
/**
|
||||
* 禁用硬件媒体密钥处理
|
||||
*/
|
||||
dhmkh?: boolean
|
||||
|
||||
/**
|
||||
* 设置代理服务器,代理应用的所有流量,例:-proxy-server="127.0.0.1:1081"(不支持设置账号密码,v1.17.0起新增)。注:应用内“设置-网络-代理设置”仅代理接口请求的流量,优先级更高
|
||||
*/
|
||||
'proxy-server'?: string
|
||||
|
||||
/**
|
||||
* 以分号分隔的主机列表绕过代理服务器,例:-proxy-bypass-list="<local>;*.google.com;*foo.com;1.2.3.4:5678"(与-proxy-server一起使用才有效,v1.17.0起新增)。注:此设置对应用内接口请求无效
|
||||
*/
|
||||
'proxy-bypass-list'?: string
|
||||
|
||||
/**
|
||||
* 启动时播放指定列表的音乐
|
||||
*/
|
||||
play?: string
|
||||
|
||||
[key: string]: boolean | number | string
|
||||
}
|
||||
|
||||
type OnlineSource = 'kw' | 'kg' | 'tx' | 'wy' | 'mg'
|
||||
type Source = OnlineSource | 'local'
|
||||
type Quality = '128k' | '320k' | 'flac' | 'flac24bit' | '192k' | 'ape' | 'wav'
|
||||
|
||||
type QualityList = Partial<Record<LX.Source, LX.Quality[]>>
|
||||
|
||||
interface EnvParams {
|
||||
deeplink?: string | null
|
||||
cmdParams: CmdParams
|
||||
workAreaSize?: Electron.Size
|
||||
}
|
||||
|
||||
interface HotKey {
|
||||
name: string
|
||||
action: string
|
||||
type: keyof typeof keyName
|
||||
}
|
||||
|
||||
interface HotKeyDownInfo {
|
||||
type: 'local' | 'global'
|
||||
key: string
|
||||
}
|
||||
|
||||
interface HotKeyConfig {
|
||||
enable: boolean
|
||||
keys: {
|
||||
[key: string]: HotKey
|
||||
}
|
||||
}
|
||||
interface HotKeyConfigAll {
|
||||
local: HotKeyConfig
|
||||
global: HotKeyConfig
|
||||
}
|
||||
interface RegisterKeyInfo {
|
||||
key: string
|
||||
info: HotKey
|
||||
}
|
||||
type HotKeyState = Map<string, {
|
||||
status: boolean
|
||||
info: HotKey
|
||||
}>
|
||||
interface HotKeyActionWrap<T, D> {
|
||||
action: T
|
||||
data: D
|
||||
source?: string
|
||||
}
|
||||
type HotKeyActions = HotKeyActionWrap<'config', HotKeyConfigAll>
|
||||
| HotKeyActionWrap<'enable', boolean>
|
||||
| HotKeyActionWrap<'register', RegisterKeyInfo>
|
||||
| HotKeyActionWrap<'unregister', string>
|
||||
|
||||
interface HotKeyEvent {
|
||||
type: string
|
||||
key: string
|
||||
}
|
||||
|
||||
interface TaskBarButtonFlags {
|
||||
empty: boolean
|
||||
collect: boolean
|
||||
play: boolean
|
||||
next: boolean
|
||||
prev: boolean
|
||||
}
|
||||
|
||||
interface Wait {
|
||||
time: number
|
||||
id: string
|
||||
}
|
||||
type WaitCancel = string
|
||||
interface Interval {
|
||||
time: number
|
||||
id: string
|
||||
}
|
||||
type IntervalCancel = string
|
||||
|
||||
interface VersionInfo {
|
||||
version: string
|
||||
desc: string
|
||||
}
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
declare namespace LX {
|
||||
namespace ConfigFile {
|
||||
interface MyListInfoPart {
|
||||
type: 'playListPart_v2'
|
||||
data: LX.List.MyDefaultListInfoFull | LX.List.MyLoveListInfoFull | LX.List.UserListInfoFull
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Vendored
+82
@@ -0,0 +1,82 @@
|
||||
declare namespace LX {
|
||||
namespace DesktopLyric {
|
||||
interface Config {
|
||||
'desktopLyric.enable': LX.AppSetting['desktopLyric.enable']
|
||||
'desktopLyric.isLock': LX.AppSetting['desktopLyric.isLock']
|
||||
'desktopLyric.isAlwaysOnTop': LX.AppSetting['desktopLyric.isAlwaysOnTop']
|
||||
'desktopLyric.isAlwaysOnTopLoop': LX.AppSetting['desktopLyric.isAlwaysOnTopLoop']
|
||||
'desktopLyric.audioVisualization': LX.AppSetting['desktopLyric.audioVisualization']
|
||||
'desktopLyric.width': LX.AppSetting['desktopLyric.width']
|
||||
'desktopLyric.height': LX.AppSetting['desktopLyric.height']
|
||||
'desktopLyric.x': LX.AppSetting['desktopLyric.x']
|
||||
'desktopLyric.y': LX.AppSetting['desktopLyric.y']
|
||||
'desktopLyric.isLockScreen': LX.AppSetting['desktopLyric.isLockScreen']
|
||||
'desktopLyric.isDelayScroll': LX.AppSetting['desktopLyric.isDelayScroll']
|
||||
'desktopLyric.isHoverHide': LX.AppSetting['desktopLyric.isHoverHide']
|
||||
'desktopLyric.direction': LX.AppSetting['desktopLyric.direction']
|
||||
'desktopLyric.style.align': LX.AppSetting['desktopLyric.style.align']
|
||||
'desktopLyric.style.font': LX.AppSetting['desktopLyric.style.font']
|
||||
'desktopLyric.style.fontSize': LX.AppSetting['desktopLyric.style.fontSize']
|
||||
'desktopLyric.style.lyricUnplayColor': LX.AppSetting['desktopLyric.style.lyricUnplayColor']
|
||||
'desktopLyric.style.lyricPlayedColor': LX.AppSetting['desktopLyric.style.lyricPlayedColor']
|
||||
'desktopLyric.style.lyricShadowColor': LX.AppSetting['desktopLyric.style.lyricShadowColor']
|
||||
// 'desktopLyric.style.fontWeight': LX.AppSetting['desktopLyric.style.fontWeight']
|
||||
'desktopLyric.style.opacity': LX.AppSetting['desktopLyric.style.opacity']
|
||||
'desktopLyric.style.ellipsis': LX.AppSetting['desktopLyric.style.ellipsis']
|
||||
'desktopLyric.style.isZoomActiveLrc': LX.AppSetting['desktopLyric.style.isZoomActiveLrc']
|
||||
'common.langId': LX.AppSetting['common.langId']
|
||||
'player.isShowLyricTranslation': LX.AppSetting['player.isShowLyricTranslation']
|
||||
'player.isShowLyricRoma': LX.AppSetting['player.isShowLyricRoma']
|
||||
'player.isPlayLxlrc': LX.AppSetting['player.isPlayLxlrc']
|
||||
}
|
||||
|
||||
type WinMainActions = 'get_info' | 'get_status' | 'get_analyser_data_array'
|
||||
|
||||
interface LyricActionBase <A> {
|
||||
action: A
|
||||
}
|
||||
interface LyricActionData<A, D> extends LyricActionBase<A> {
|
||||
data: D
|
||||
}
|
||||
type LyricAction<A, D = undefined> = D extends undefined ? LyricActionBase<A> : LyricActionData<A, D>
|
||||
|
||||
type LyricActions = LyricAction<'set_info', {
|
||||
id: string | null
|
||||
singer: string
|
||||
name: string
|
||||
album: string
|
||||
lrc: string | null
|
||||
tlrc: string | null
|
||||
rlrc: string | null
|
||||
lxlrc: string | null
|
||||
// pic: string | null
|
||||
isPlay: boolean
|
||||
line: number
|
||||
played_time: number
|
||||
}>
|
||||
| LyricAction<'set_status', {
|
||||
isPlay: boolean
|
||||
line: number
|
||||
played_time: number
|
||||
}>
|
||||
| LyricAction<'set_lyric', {
|
||||
lrc: string | null
|
||||
tlrc: string | null
|
||||
rlrc: string | null
|
||||
lxlrc: string | null
|
||||
}>
|
||||
| LyricAction<'set_offset', number>
|
||||
| LyricAction<'set_play', number>
|
||||
| LyricAction<'set_pause'>
|
||||
| LyricAction<'set_stop'>
|
||||
| LyricAction<'send_analyser_data_array', Uint8Array>
|
||||
|
||||
|
||||
interface NewBounds {
|
||||
x?: number | null
|
||||
y?: number
|
||||
w: number
|
||||
h: number
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+66
@@ -0,0 +1,66 @@
|
||||
|
||||
// interface DownloadList {
|
||||
|
||||
// }
|
||||
|
||||
|
||||
declare namespace LX {
|
||||
namespace Download {
|
||||
type DownloadTaskStatus = 'run'
|
||||
| 'waiting'
|
||||
| 'pause'
|
||||
| 'error'
|
||||
| 'completed'
|
||||
|
||||
type FileExt = 'mp3' | 'flac' | 'wav' | 'ape'
|
||||
|
||||
interface ProgressInfo {
|
||||
progress: number
|
||||
speed: string
|
||||
downloaded: number
|
||||
total: number
|
||||
}
|
||||
|
||||
interface DownloadTaskActionBase <A> {
|
||||
action: A
|
||||
}
|
||||
interface DownloadTaskActionData<A, D> extends DownloadTaskActionBase<A> {
|
||||
data: D
|
||||
}
|
||||
type DownloadTaskAction<A, D = undefined> = D extends undefined ? DownloadTaskActionBase<A> : DownloadTaskActionData<A, D>
|
||||
|
||||
type DownloadTaskActions = DownloadTaskAction<'start'>
|
||||
| DownloadTaskAction<'complete'>
|
||||
| DownloadTaskAction<'refreshUrl'>
|
||||
| DownloadTaskAction<'statusText', string>
|
||||
| DownloadTaskAction<'progress', ProgressInfo>
|
||||
| DownloadTaskAction<'error', {
|
||||
error?: string
|
||||
message?: string
|
||||
}>
|
||||
|
||||
interface ListItem {
|
||||
id: string
|
||||
isComplate: boolean
|
||||
status: DownloadTaskStatus
|
||||
statusText: string
|
||||
downloaded: number
|
||||
total: number
|
||||
progress: number
|
||||
speed: string
|
||||
metadata: {
|
||||
musicInfo: LX.Music.MusicInfoOnline
|
||||
url: string | null
|
||||
quality: LX.Quality
|
||||
ext: FileExt
|
||||
fileName: string
|
||||
filePath: string
|
||||
}
|
||||
}
|
||||
|
||||
interface saveDownloadMusicInfo {
|
||||
list: ListItem[]
|
||||
addMusicLocationType: LX.AddMusicLocationType
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
declare namespace LX {
|
||||
interface IpcMainEvent {
|
||||
event: Electron.IpcMainEvent
|
||||
}
|
||||
interface IpcMainEventParams<T> {
|
||||
event: Electron.IpcMainEvent
|
||||
params: T
|
||||
}
|
||||
type IpcMainEventListener = (params: LX.IpcMainEvent) => void
|
||||
type IpcMainEventListenerParams<T> = (params: LX.IpcMainEventParams<T>) => void
|
||||
|
||||
interface IpcMainInvokeEvent {
|
||||
event: Electron.IpcMainInvokeEvent
|
||||
}
|
||||
interface IpcMainInvokeEventParams<T> {
|
||||
event: Electron.IpcMainInvokeEvent
|
||||
params: T
|
||||
}
|
||||
|
||||
type IpcMainInvokeEventListener = (params: LX.IpcMainInvokeEvent) => Promise<void>
|
||||
type IpcMainInvokeEventListenerParams<T> = (params: LX.IpcMainInvokeEventParams<T>) => Promise<void>
|
||||
type IpcMainInvokeEventListenerValue<V> = (params: LX.IpcMainInvokeEvent) => Promise<V>
|
||||
type IpcMainInvokeEventListenerParamsValue<T, V> = (params: LX.IpcMainInvokeEventParams<T>) => Promise<V>
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
declare namespace LX {
|
||||
interface IpcRendererEvent {
|
||||
event: Electron.IpcRendererEvent
|
||||
}
|
||||
interface IpcRendererEventParams<T> {
|
||||
event: Electron.IpcRendererEvent
|
||||
params: T
|
||||
}
|
||||
type IpcRendererEventListener = (params: LX.IpcRendererEvent) => any
|
||||
type IpcRendererEventListenerParams<T> = (params: LX.IpcRendererEventParams<T>) => any
|
||||
}
|
||||
Vendored
+142
@@ -0,0 +1,142 @@
|
||||
declare namespace LX {
|
||||
namespace List {
|
||||
interface UserListInfo {
|
||||
id: string
|
||||
name: string
|
||||
// list: LX.Music.MusicInfo[]
|
||||
source?: LX.Source
|
||||
sourceListId?: string
|
||||
// position?: number
|
||||
locationUpdateTime: number | null
|
||||
}
|
||||
|
||||
interface MyDefaultListInfo {
|
||||
id: 'default'
|
||||
name: '试听列表'
|
||||
// list: LX.Music.MusicInfo[]
|
||||
}
|
||||
|
||||
interface MyLoveListInfo {
|
||||
id: 'love'
|
||||
name: '我的收藏'
|
||||
// list: LX.Music.MusicInfo[]
|
||||
}
|
||||
|
||||
interface MyTempListInfo {
|
||||
id: 'temp'
|
||||
name: '临时列表'
|
||||
// list: LX.Music.MusicInfo[]
|
||||
// TODO: save default lists info
|
||||
meta: {
|
||||
id?: string
|
||||
}
|
||||
}
|
||||
|
||||
type MyListInfo = MyDefaultListInfo | MyLoveListInfo | UserListInfo
|
||||
|
||||
interface MyAllList {
|
||||
defaultList: MyDefaultListInfo
|
||||
loveList: MyLoveListInfo
|
||||
userList: UserListInfo[]
|
||||
tempList: MyTempListInfo
|
||||
}
|
||||
|
||||
|
||||
type SearchHistoryList = string[]
|
||||
type ListPositionInfo = Record<string, number>
|
||||
type ListUpdateInfo = Record<string, {
|
||||
updateTime: number
|
||||
isAutoUpdate: boolean
|
||||
}>
|
||||
|
||||
type ListSaveType = 'myList' | 'downloadList'
|
||||
type ListSaveInfo = {
|
||||
type: 'myList'
|
||||
data: Partial<MyAllList>
|
||||
} | {
|
||||
type: 'downloadList'
|
||||
data: LX.Download.ListItem[]
|
||||
}
|
||||
|
||||
|
||||
type ListActionDataOverwrite = MakeOptional<LX.List.ListDataFull, 'tempList'>
|
||||
interface ListActionAdd {
|
||||
position: number
|
||||
listInfos: UserListInfo[]
|
||||
}
|
||||
type ListActionRemove = string[]
|
||||
type ListActionUpdate = UserListInfo[]
|
||||
interface ListActionUpdatePosition {
|
||||
/**
|
||||
* 列表id
|
||||
*/
|
||||
ids: string[]
|
||||
/**
|
||||
* 位置
|
||||
*/
|
||||
position: number
|
||||
}
|
||||
|
||||
interface ListActionMusicAdd {
|
||||
id: string
|
||||
musicInfos: LX.Music.MusicInfo[]
|
||||
addMusicLocationType: LX.AddMusicLocationType
|
||||
}
|
||||
|
||||
interface ListActionMusicMove {
|
||||
fromId: string
|
||||
toId: string
|
||||
musicInfos: LX.Music.MusicInfo[]
|
||||
addMusicLocationType: LX.AddMusicLocationType
|
||||
}
|
||||
|
||||
interface ListActionCheckMusicExistList {
|
||||
listId: string
|
||||
musicInfoId: string
|
||||
}
|
||||
|
||||
interface ListActionMusicRemove {
|
||||
listId: string
|
||||
ids: string[]
|
||||
}
|
||||
|
||||
type ListActionMusicUpdate = Array<{
|
||||
id: string
|
||||
musicInfo: LX.Music.MusicInfo
|
||||
}>
|
||||
|
||||
interface ListActionMusicUpdatePosition {
|
||||
listId: string
|
||||
position: number
|
||||
ids: string[]
|
||||
}
|
||||
|
||||
interface ListActionMusicOverwrite {
|
||||
listId: string
|
||||
musicInfos: LX.Music.MusicInfo[]
|
||||
}
|
||||
|
||||
type ListActionMusicClear = string
|
||||
|
||||
interface MyDefaultListInfoFull extends MyDefaultListInfo {
|
||||
list: LX.Music.MusicInfo[]
|
||||
}
|
||||
interface MyLoveListInfoFull extends MyLoveListInfo {
|
||||
list: LX.Music.MusicInfo[]
|
||||
}
|
||||
interface UserListInfoFull extends UserListInfo {
|
||||
list: LX.Music.MusicInfo[]
|
||||
}
|
||||
interface MyTempListInfoFull extends MyTempListInfo {
|
||||
list: LX.Music.MusicInfo[]
|
||||
}
|
||||
|
||||
interface ListDataFull {
|
||||
defaultList: LX.Music.MusicInfo[]
|
||||
loveList: LX.Music.MusicInfo[]
|
||||
userList: UserListInfoFull[]
|
||||
tempList: LX.Music.MusicInfo[]
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Vendored
+121
@@ -0,0 +1,121 @@
|
||||
declare namespace LX {
|
||||
namespace Music {
|
||||
interface MusicQualityType { // {"type": "128k", size: "3.56M"}
|
||||
type: LX.Quality
|
||||
size: string | null
|
||||
}
|
||||
interface MusicQualityTypeKg { // {"type": "128k", size: "3.56M"}
|
||||
type: LX.Quality
|
||||
size: string | null
|
||||
hash: string
|
||||
}
|
||||
type _MusicQualityType = Record<Quality, {
|
||||
size: string | null
|
||||
}>
|
||||
type _MusicQualityTypeKg = Record<Quality, {
|
||||
size: string | null
|
||||
hash: string
|
||||
}>
|
||||
|
||||
|
||||
interface MusicInfoMetaBase {
|
||||
songId: string | number // 歌曲ID,mg源为copyrightId,local为文件路径
|
||||
albumName: string // 歌曲专辑名称
|
||||
picUrl?: string | null // 歌曲图片链接
|
||||
}
|
||||
|
||||
interface MusicInfoMeta_online extends MusicInfoMetaBase {
|
||||
qualitys: MusicQualityType[]
|
||||
_qualitys: _MusicQualityType
|
||||
albumId?: string | number // 歌曲专辑ID
|
||||
}
|
||||
|
||||
interface MusicInfoMeta_local extends MusicInfoMetaBase {
|
||||
filePath: string
|
||||
ext: string
|
||||
}
|
||||
|
||||
|
||||
interface MusicInfoBase<S = LX.Source> {
|
||||
id: string
|
||||
name: string // 歌曲名
|
||||
singer: string // 艺术家名
|
||||
source: S // 源
|
||||
interval: string | null // 格式化后的歌曲时长,例:03:55
|
||||
meta: MusicInfoMetaBase
|
||||
}
|
||||
|
||||
interface MusicInfoLocal extends MusicInfoBase<'local'> {
|
||||
meta: MusicInfoMeta_local
|
||||
}
|
||||
|
||||
interface MusicInfo_online_common extends MusicInfoBase<'kw' | 'wy'> {
|
||||
meta: MusicInfoMeta_online
|
||||
}
|
||||
|
||||
interface MusicInfoMeta_kg extends MusicInfoMeta_online {
|
||||
qualitys: MusicQualityTypeKg[]
|
||||
_qualitys: _MusicQualityTypeKg
|
||||
hash: string // 歌曲hash
|
||||
}
|
||||
interface MusicInfo_kg extends MusicInfoBase<'kg'> {
|
||||
meta: MusicInfoMeta_kg
|
||||
}
|
||||
|
||||
interface MusicInfoMeta_tx extends MusicInfoMeta_online {
|
||||
strMediaMid: string // 歌曲strMediaMid
|
||||
albumMid?: string // 歌曲albumMid
|
||||
}
|
||||
interface MusicInfo_tx extends MusicInfoBase<'tx'> {
|
||||
meta: MusicInfoMeta_tx
|
||||
}
|
||||
|
||||
interface MusicInfoMeta_mg extends MusicInfoMeta_online {
|
||||
copyrightId: string // 歌曲copyrightId
|
||||
lrcUrl?: string // 歌曲lrcUrl
|
||||
mrcUrl?: string // 歌曲mrcUrl
|
||||
trcUrl?: string // 歌曲trcUrl
|
||||
}
|
||||
interface MusicInfo_mg extends MusicInfoBase<'mg'> {
|
||||
meta: MusicInfoMeta_mg
|
||||
}
|
||||
|
||||
type MusicInfoOnline = MusicInfo_online_common | MusicInfo_kg | MusicInfo_tx | MusicInfo_mg
|
||||
type MusicInfo = MusicInfoOnline | MusicInfoLocal
|
||||
|
||||
interface LyricInfo {
|
||||
// 歌曲歌词
|
||||
lyric: string
|
||||
// 翻译歌词
|
||||
tlyric?: string | null
|
||||
// 罗马音歌词
|
||||
rlyric?: string | null
|
||||
// 逐字歌词
|
||||
lxlyric?: string | null
|
||||
}
|
||||
|
||||
interface LyricInfoSave {
|
||||
id: string
|
||||
lyrics: LyricInfo
|
||||
}
|
||||
|
||||
interface MusicFileMeta {
|
||||
title: string
|
||||
artist: string | null
|
||||
album: string | null
|
||||
APIC: string | null
|
||||
lyrics: string | null
|
||||
}
|
||||
|
||||
interface MusicUrlInfo {
|
||||
id: string
|
||||
url: string
|
||||
}
|
||||
|
||||
interface MusicInfoOtherSourceSave {
|
||||
id: string
|
||||
list: MusicInfoOnline[]
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
import {
|
||||
IAudioMetadata as iAudioMetadata,
|
||||
} from 'music-metadata'
|
||||
|
||||
declare global {
|
||||
namespace LX {
|
||||
namespace MusicMetadataModule {
|
||||
type IAudioMetadata = iAudioMetadata
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
declare namespace LX {
|
||||
namespace Player {
|
||||
interface ProgressBarOptions {
|
||||
progress: number
|
||||
mode?: Electron.ProgressBarOptions['mode']
|
||||
}
|
||||
|
||||
type StatusButtonActions = 'unCollect'
|
||||
| 'collect'
|
||||
| 'prev'
|
||||
| 'pause'
|
||||
| 'play'
|
||||
| 'next'
|
||||
|
||||
interface LyricInfo extends LX.Music.LyricInfo {
|
||||
rawlrcInfo: LX.Music.LyricInfo
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// declare module '*.vue' {
|
||||
// import { App } from 'vue'
|
||||
// export default App.Component
|
||||
// }
|
||||
|
||||
declare module '*.vue' {
|
||||
import { Component } from 'vue'
|
||||
const component: Component
|
||||
export default component
|
||||
}
|
||||
Vendored
+73
@@ -0,0 +1,73 @@
|
||||
declare namespace LX {
|
||||
namespace Sync {
|
||||
|
||||
interface Enable {
|
||||
enable: boolean
|
||||
port: string
|
||||
}
|
||||
|
||||
interface SyncActionBase <A> {
|
||||
action: A
|
||||
}
|
||||
interface SyncActionData<A, D> extends SyncActionBase<A> {
|
||||
data: D
|
||||
}
|
||||
type SyncAction<A, D = undefined> = D extends undefined ? SyncActionBase<A> : SyncActionData<A, D>
|
||||
|
||||
type SyncMainWindowActions = SyncAction<'select_mode', KeyInfo>
|
||||
| SyncAction<'close_select_mode'>
|
||||
| SyncAction<'status', Status>
|
||||
|
||||
type SyncServiceActions = SyncAction<'select_mode', Mode>
|
||||
| SyncAction<'get_status'>
|
||||
| SyncAction<'generate_code'>
|
||||
| SyncAction<'enable', Enable>
|
||||
|
||||
type ActionList = SyncAction<'list_data_overwrite', LX.List.ListActionDataOverwrite>
|
||||
| SyncAction<'list_create', LX.List.ListActionAdd>
|
||||
| SyncAction<'list_remove', LX.List.ListActionRemove>
|
||||
| SyncAction<'list_update', LX.List.ListActionUpdate>
|
||||
| SyncAction<'list_update_position', LX.List.ListActionUpdatePosition>
|
||||
| SyncAction<'list_music_add', LX.List.ListActionMusicAdd>
|
||||
| SyncAction<'list_music_move', LX.List.ListActionMusicMove>
|
||||
| SyncAction<'list_music_remove', LX.List.ListActionMusicRemove>
|
||||
| SyncAction<'list_music_update', LX.List.ListActionMusicUpdate>
|
||||
| SyncAction<'list_music_update_position', LX.List.ListActionMusicUpdatePosition>
|
||||
| SyncAction<'list_music_overwrite', LX.List.ListActionMusicOverwrite>
|
||||
| SyncAction<'list_music_clear', LX.List.ListActionMusicClear>
|
||||
|
||||
|
||||
interface List {
|
||||
action: string
|
||||
data: any
|
||||
}
|
||||
|
||||
interface Status {
|
||||
status: boolean
|
||||
message: string
|
||||
address: string[]
|
||||
code: string
|
||||
devices: KeyInfo[]
|
||||
}
|
||||
|
||||
interface KeyInfo {
|
||||
clientId: string
|
||||
key: string
|
||||
iv: string
|
||||
deviceName: string
|
||||
connectionTime?: number
|
||||
}
|
||||
|
||||
type ListData = Omit<LX.List.ListDataFull, 'tempList'>
|
||||
|
||||
type Mode = 'merge_local_remote'
|
||||
| 'merge_remote_local'
|
||||
| 'overwrite_local_remote'
|
||||
| 'overwrite_remote_local'
|
||||
| 'overwrite_local_remote_full'
|
||||
| 'overwrite_remote_local_full'
|
||||
| 'none'
|
||||
| 'cancel'
|
||||
|
||||
}
|
||||
}
|
||||
Vendored
+293
@@ -0,0 +1,293 @@
|
||||
declare namespace LX {
|
||||
|
||||
interface ThemeColors {
|
||||
// '--color-000': string
|
||||
// '--color-050': string
|
||||
// '--color-100': string
|
||||
// '--color-200': string
|
||||
// '--color-300': string
|
||||
// '--color-400': string
|
||||
// '--color-500': string
|
||||
// '--color-600': string
|
||||
// '--color-700': string
|
||||
// '--color-800': string
|
||||
// '--color-900': string
|
||||
'--color-theme': string
|
||||
|
||||
'--color-primary': string
|
||||
'--color-primary-alpha-100': string
|
||||
'--color-primary-alpha-200': string
|
||||
'--color-primary-alpha-300': string
|
||||
'--color-primary-alpha-400': string
|
||||
'--color-primary-alpha-500': string
|
||||
'--color-primary-alpha-600': string
|
||||
'--color-primary-alpha-700': string
|
||||
'--color-primary-alpha-800': string
|
||||
'--color-primary-alpha-900': string
|
||||
|
||||
'--color-primary-dark-100': string
|
||||
'--color-primary-dark-100-alpha-100': string
|
||||
'--color-primary-dark-100-alpha-200': string
|
||||
'--color-primary-dark-100-alpha-300': string
|
||||
'--color-primary-dark-100-alpha-400': string
|
||||
'--color-primary-dark-100-alpha-500': string
|
||||
'--color-primary-dark-100-alpha-600': string
|
||||
'--color-primary-dark-100-alpha-700': string
|
||||
'--color-primary-dark-100-alpha-800': string
|
||||
'--color-primary-dark-100-alpha-900': string
|
||||
|
||||
'--color-primary-dark-200': string
|
||||
'--color-primary-dark-200-alpha-100': string
|
||||
'--color-primary-dark-200-alpha-200': string
|
||||
'--color-primary-dark-200-alpha-300': string
|
||||
'--color-primary-dark-200-alpha-400': string
|
||||
'--color-primary-dark-200-alpha-500': string
|
||||
'--color-primary-dark-200-alpha-600': string
|
||||
'--color-primary-dark-200-alpha-700': string
|
||||
'--color-primary-dark-200-alpha-800': string
|
||||
'--color-primary-dark-200-alpha-900': string
|
||||
|
||||
'--color-primary-dark-300': string
|
||||
'--color-primary-dark-300-alpha-100': string
|
||||
'--color-primary-dark-300-alpha-200': string
|
||||
'--color-primary-dark-300-alpha-300': string
|
||||
'--color-primary-dark-300-alpha-400': string
|
||||
'--color-primary-dark-300-alpha-500': string
|
||||
'--color-primary-dark-300-alpha-600': string
|
||||
'--color-primary-dark-300-alpha-700': string
|
||||
'--color-primary-dark-300-alpha-800': string
|
||||
'--color-primary-dark-300-alpha-900': string
|
||||
|
||||
'--color-primary-dark-400': string
|
||||
'--color-primary-dark-400-alpha-100': string
|
||||
'--color-primary-dark-400-alpha-200': string
|
||||
'--color-primary-dark-400-alpha-300': string
|
||||
'--color-primary-dark-400-alpha-400': string
|
||||
'--color-primary-dark-400-alpha-500': string
|
||||
'--color-primary-dark-400-alpha-600': string
|
||||
'--color-primary-dark-400-alpha-700': string
|
||||
'--color-primary-dark-400-alpha-800': string
|
||||
'--color-primary-dark-400-alpha-900': string
|
||||
|
||||
'--color-primary-dark-500': string
|
||||
'--color-primary-dark-500-alpha-100': string
|
||||
'--color-primary-dark-500-alpha-200': string
|
||||
'--color-primary-dark-500-alpha-300': string
|
||||
'--color-primary-dark-500-alpha-400': string
|
||||
'--color-primary-dark-500-alpha-500': string
|
||||
'--color-primary-dark-500-alpha-600': string
|
||||
'--color-primary-dark-500-alpha-700': string
|
||||
'--color-primary-dark-500-alpha-800': string
|
||||
'--color-primary-dark-500-alpha-900': string
|
||||
|
||||
'--color-primary-dark-600': string
|
||||
'--color-primary-dark-600-alpha-100': string
|
||||
'--color-primary-dark-600-alpha-200': string
|
||||
'--color-primary-dark-600-alpha-300': string
|
||||
'--color-primary-dark-600-alpha-400': string
|
||||
'--color-primary-dark-600-alpha-500': string
|
||||
'--color-primary-dark-600-alpha-600': string
|
||||
'--color-primary-dark-600-alpha-700': string
|
||||
'--color-primary-dark-600-alpha-800': string
|
||||
'--color-primary-dark-600-alpha-900': string
|
||||
|
||||
'--color-primary-dark-700': string
|
||||
'--color-primary-dark-700-alpha-100': string
|
||||
'--color-primary-dark-700-alpha-200': string
|
||||
'--color-primary-dark-700-alpha-300': string
|
||||
'--color-primary-dark-700-alpha-400': string
|
||||
'--color-primary-dark-700-alpha-500': string
|
||||
'--color-primary-dark-700-alpha-600': string
|
||||
'--color-primary-dark-700-alpha-700': string
|
||||
'--color-primary-dark-700-alpha-800': string
|
||||
'--color-primary-dark-700-alpha-900': string
|
||||
|
||||
'--color-primary-dark-800': string
|
||||
'--color-primary-dark-800-alpha-100': string
|
||||
'--color-primary-dark-800-alpha-200': string
|
||||
'--color-primary-dark-800-alpha-300': string
|
||||
'--color-primary-dark-800-alpha-400': string
|
||||
'--color-primary-dark-800-alpha-500': string
|
||||
'--color-primary-dark-800-alpha-600': string
|
||||
'--color-primary-dark-800-alpha-700': string
|
||||
'--color-primary-dark-800-alpha-800': string
|
||||
'--color-primary-dark-800-alpha-900': string
|
||||
|
||||
'--color-primary-dark-900': string
|
||||
'--color-primary-dark-900-alpha-100': string
|
||||
'--color-primary-dark-900-alpha-200': string
|
||||
'--color-primary-dark-900-alpha-300': string
|
||||
'--color-primary-dark-900-alpha-400': string
|
||||
'--color-primary-dark-900-alpha-500': string
|
||||
'--color-primary-dark-900-alpha-600': string
|
||||
'--color-primary-dark-900-alpha-700': string
|
||||
'--color-primary-dark-900-alpha-800': string
|
||||
'--color-primary-dark-900-alpha-900': string
|
||||
|
||||
'--color-primary-dark-1000': string
|
||||
'--color-primary-dark-1000-alpha-100': string
|
||||
'--color-primary-dark-1000-alpha-200': string
|
||||
'--color-primary-dark-1000-alpha-300': string
|
||||
'--color-primary-dark-1000-alpha-400': string
|
||||
'--color-primary-dark-1000-alpha-500': string
|
||||
'--color-primary-dark-1000-alpha-600': string
|
||||
'--color-primary-dark-1000-alpha-700': string
|
||||
'--color-primary-dark-1000-alpha-800': string
|
||||
'--color-primary-dark-1000-alpha-900': string
|
||||
|
||||
'--color-primary-light-100': string
|
||||
'--color-primary-light-100-alpha-100': string
|
||||
'--color-primary-light-100-alpha-200': string
|
||||
'--color-primary-light-100-alpha-300': string
|
||||
'--color-primary-light-100-alpha-400': string
|
||||
'--color-primary-light-100-alpha-500': string
|
||||
'--color-primary-light-100-alpha-600': string
|
||||
'--color-primary-light-100-alpha-700': string
|
||||
'--color-primary-light-100-alpha-800': string
|
||||
'--color-primary-light-100-alpha-900': string
|
||||
|
||||
'--color-primary-light-200': string
|
||||
'--color-primary-light-200-alpha-100': string
|
||||
'--color-primary-light-200-alpha-200': string
|
||||
'--color-primary-light-200-alpha-300': string
|
||||
'--color-primary-light-200-alpha-400': string
|
||||
'--color-primary-light-200-alpha-500': string
|
||||
'--color-primary-light-200-alpha-600': string
|
||||
'--color-primary-light-200-alpha-700': string
|
||||
'--color-primary-light-200-alpha-800': string
|
||||
'--color-primary-light-200-alpha-900': string
|
||||
|
||||
'--color-primary-light-300': string
|
||||
'--color-primary-light-300-alpha-100': string
|
||||
'--color-primary-light-300-alpha-200': string
|
||||
'--color-primary-light-300-alpha-300': string
|
||||
'--color-primary-light-300-alpha-400': string
|
||||
'--color-primary-light-300-alpha-500': string
|
||||
'--color-primary-light-300-alpha-600': string
|
||||
'--color-primary-light-300-alpha-700': string
|
||||
'--color-primary-light-300-alpha-800': string
|
||||
'--color-primary-light-300-alpha-900': string
|
||||
|
||||
'--color-primary-light-400': string
|
||||
'--color-primary-light-400-alpha-100': string
|
||||
'--color-primary-light-400-alpha-200': string
|
||||
'--color-primary-light-400-alpha-300': string
|
||||
'--color-primary-light-400-alpha-400': string
|
||||
'--color-primary-light-400-alpha-500': string
|
||||
'--color-primary-light-400-alpha-600': string
|
||||
'--color-primary-light-400-alpha-700': string
|
||||
'--color-primary-light-400-alpha-800': string
|
||||
'--color-primary-light-400-alpha-900': string
|
||||
|
||||
'--color-primary-light-500': string
|
||||
'--color-primary-light-500-alpha-100': string
|
||||
'--color-primary-light-500-alpha-200': string
|
||||
'--color-primary-light-500-alpha-300': string
|
||||
'--color-primary-light-500-alpha-400': string
|
||||
'--color-primary-light-500-alpha-500': string
|
||||
'--color-primary-light-500-alpha-600': string
|
||||
'--color-primary-light-500-alpha-700': string
|
||||
'--color-primary-light-500-alpha-800': string
|
||||
'--color-primary-light-500-alpha-900': string
|
||||
|
||||
'--color-primary-light-600': string
|
||||
'--color-primary-light-600-alpha-100': string
|
||||
'--color-primary-light-600-alpha-200': string
|
||||
'--color-primary-light-600-alpha-300': string
|
||||
'--color-primary-light-600-alpha-400': string
|
||||
'--color-primary-light-600-alpha-500': string
|
||||
'--color-primary-light-600-alpha-600': string
|
||||
'--color-primary-light-600-alpha-700': string
|
||||
'--color-primary-light-600-alpha-800': string
|
||||
'--color-primary-light-600-alpha-900': string
|
||||
|
||||
'--color-primary-light-700': string
|
||||
'--color-primary-light-700-alpha-100': string
|
||||
'--color-primary-light-700-alpha-200': string
|
||||
'--color-primary-light-700-alpha-300': string
|
||||
'--color-primary-light-700-alpha-400': string
|
||||
'--color-primary-light-700-alpha-500': string
|
||||
'--color-primary-light-700-alpha-600': string
|
||||
'--color-primary-light-700-alpha-700': string
|
||||
'--color-primary-light-700-alpha-800': string
|
||||
'--color-primary-light-700-alpha-900': string
|
||||
|
||||
'--color-primary-light-800': string
|
||||
'--color-primary-light-800-alpha-100': string
|
||||
'--color-primary-light-800-alpha-200': string
|
||||
'--color-primary-light-800-alpha-300': string
|
||||
'--color-primary-light-800-alpha-400': string
|
||||
'--color-primary-light-800-alpha-500': string
|
||||
'--color-primary-light-800-alpha-600': string
|
||||
'--color-primary-light-800-alpha-700': string
|
||||
'--color-primary-light-800-alpha-800': string
|
||||
'--color-primary-light-800-alpha-900': string
|
||||
|
||||
'--color-primary-light-900': string
|
||||
'--color-primary-light-900-alpha-100': string
|
||||
'--color-primary-light-900-alpha-200': string
|
||||
'--color-primary-light-900-alpha-300': string
|
||||
'--color-primary-light-900-alpha-400': string
|
||||
'--color-primary-light-900-alpha-500': string
|
||||
'--color-primary-light-900-alpha-600': string
|
||||
'--color-primary-light-900-alpha-700': string
|
||||
'--color-primary-light-900-alpha-800': string
|
||||
'--color-primary-light-900-alpha-900': string
|
||||
|
||||
'--color-primary-light-1000': string
|
||||
'--color-primary-light-1000-alpha-100': string
|
||||
'--color-primary-light-1000-alpha-200': string
|
||||
'--color-primary-light-1000-alpha-300': string
|
||||
'--color-primary-light-1000-alpha-400': string
|
||||
'--color-primary-light-1000-alpha-500': string
|
||||
'--color-primary-light-1000-alpha-600': string
|
||||
'--color-primary-light-1000-alpha-700': string
|
||||
'--color-primary-light-1000-alpha-800': string
|
||||
'--color-primary-light-1000-alpha-900': string
|
||||
}
|
||||
|
||||
interface Theme {
|
||||
id: string
|
||||
name: string
|
||||
isDark: boolean
|
||||
isCustom: boolean
|
||||
config: {
|
||||
themeColors: ThemeColors
|
||||
extInfo: {
|
||||
'--color-app-background': string
|
||||
'--color-main-background': string
|
||||
'--color-nav-font': string
|
||||
'--background-image': string
|
||||
'--background-image-position': string
|
||||
'--background-image-size': string
|
||||
|
||||
// 关闭按钮颜色
|
||||
'--color-btn-hide': string
|
||||
'--color-btn-min': string
|
||||
'--color-btn-close': string
|
||||
|
||||
// 徽章颜色
|
||||
'--color-badge-primary': string
|
||||
'--color-badge-secondary': string
|
||||
'--color-badge-tertiary': string
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface ThemeInfo {
|
||||
themes: LX.Theme[]
|
||||
userThemes: LX.Theme[]
|
||||
dataPath: string
|
||||
}
|
||||
|
||||
interface ThemeSetting {
|
||||
shouldUseDarkColors: boolean
|
||||
theme: {
|
||||
id: string
|
||||
name: string
|
||||
isDark: boolean
|
||||
colors: Record<string, string>
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+56
@@ -0,0 +1,56 @@
|
||||
declare namespace LX {
|
||||
namespace UserApi {
|
||||
type UserApiSourceInfoType = 'music'
|
||||
type UserApiSourceInfoActions = 'musicUrl'
|
||||
|
||||
interface UserApiSourceInfo {
|
||||
name: string
|
||||
type: UserApiSourceInfoType
|
||||
actions: UserApiSourceInfoActions[]
|
||||
qualitys: LX.Quality[]
|
||||
}
|
||||
|
||||
type UserApiSources = Record<LX.Source, UserApiSourceInfo>
|
||||
|
||||
|
||||
interface UserApiInfo {
|
||||
id: string
|
||||
name: string
|
||||
description: string
|
||||
script: string
|
||||
allowShowUpdateAlert: boolean
|
||||
sources?: UserApiSources
|
||||
}
|
||||
|
||||
interface UserApiStatus {
|
||||
status: boolean
|
||||
message?: string
|
||||
apiInfo?: UserApiInfo
|
||||
}
|
||||
|
||||
interface UserApiUpdateInfo {
|
||||
name: string
|
||||
description: string
|
||||
log: string
|
||||
updateUrl?: string
|
||||
}
|
||||
|
||||
interface UserApiRequestParams {
|
||||
requestKey: string
|
||||
data: any
|
||||
}
|
||||
type UserApiRequestCancelParams = string
|
||||
type UserApiSetApiParams = string
|
||||
|
||||
interface UserApiSetAllowUpdateAlertParams {
|
||||
id: string
|
||||
enable: boolean
|
||||
}
|
||||
|
||||
interface ImportUserApi {
|
||||
apiInfo: UserApiInfo
|
||||
apiList: UserApiInfo[]
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
type MakeOptional<Type, Key extends keyof Type> = Omit<Type, Key> & Partial<Pick<Type, Key>>
|
||||
|
||||
type DeepPartial<T> = {
|
||||
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
||||
}
|
||||
|
||||
type Modify<T, R> = Omit<T, keyof R> & R
|
||||
Reference in New Issue
Block a user