fork(fix): Clone AMLL 并修复 BUG

- 将AMLL Clone到本以地进行修复和优化(emm虽然这很不优雅但是暂时无时间做子模块和Fork)
- 修复在当前播放歌词行不可见的视口Seek会出现滚动偏移的问题
This commit is contained in:
lqtmcstudio
2026-06-07 00:02:14 +08:00
parent 783d2c3dee
commit 72f4510dc8
458 changed files with 86075 additions and 1665 deletions

View File

@@ -0,0 +1,34 @@
import { readFileSync } from "node:fs";
import { defineConfig } from "tsdown";
import { baseConfig } from "../../tsdown.base.ts";
const rawQueryPlugin = {
name: "raw-query",
resolveId(id: string, importer: string | undefined) {
if (id.endsWith("?raw")) {
const rawPath = id.slice(0, -4);
const base = importer ? `file://${importer}` : `file://${process.cwd()}/`;
const resolved = new URL(rawPath, base).pathname.replace(
/^\/([A-Za-z]:)/,
"$1",
);
return `\0raw:${resolved}`;
}
},
load(id: string) {
if (id.startsWith("\0raw:")) {
const file = id.slice(5);
const content = readFileSync(file, "utf-8");
return `export default ${JSON.stringify(content)}`;
}
},
};
export default defineConfig({
...baseConfig,
entry: { "amll-core": "./src/index.ts" },
plugins: [rawQueryPlugin],
define: {
"import.meta.env.DEV": "process.env.NODE_ENV !== 'production'",
},
});