diff --git a/apps/directory/package.json b/apps/directory/package.json
index cc17286..5ebdfa3 100644
--- a/apps/directory/package.json
+++ b/apps/directory/package.json
@@ -39,4 +39,4 @@
"sass": "^1.93.2",
"vite": "^7.1.9"
}
-}
\ No newline at end of file
+}
diff --git a/apps/directory/src/routes/path/Home.jsx b/apps/directory/src/routes/path/Home.jsx
index 0fadd20..9d3b567 100644
--- a/apps/directory/src/routes/path/Home.jsx
+++ b/apps/directory/src/routes/path/Home.jsx
@@ -120,7 +120,7 @@ export default function Home() {
const list = navigationList.filter((item) => {
return (
item.name.toLowerCase().indexOf(searchField.toLowerCase()) !==
- -1 || item.type === 'date'
+ -1 || item.type === 'date'
)
})
const newList = []
@@ -188,102 +188,101 @@ export default function Home() {
className={`${classes['styled-selection']}`}
>
{newOperators.map((entry, index) => {
- return (
-
+
+
+ {language ===
+ 'zh-CN'
+ ? entry.type ===
+ 'skin'
+ ? `${
+ entry
+ .skinName[
+ 'zh-CN'
+ ]
+ } · ${entry.operatorName}`
+ : entry.operatorName
+ : entry
+ .skinName[
+ 'en-US'
+ ]}
+
+
- {language ===
- 'zh-CN'
- ? entry.type ===
- 'skin'
- ? `${entry
- .skinName[
- 'zh-CN'
- ]
- } · ${entry.operatorName}`
- : entry.operatorName
- : entry
- .skinName[
- 'en-US'
- ]}
-
+ >
+ >
+
-
- )
- })}
+
+
+ )
+ })}
@@ -370,9 +369,9 @@ function OperatorElement({ item, hidden, handleVoicePlay }) {
{
item.codename[
- language.startsWith('en')
- ? alternateLang
- : textDefaultLang
+ language.startsWith('en')
+ ? alternateLang
+ : textDefaultLang
]
}
diff --git a/apps/directory/src/routes/path/Operator.jsx b/apps/directory/src/routes/path/Operator.jsx
index 23a94a0..ab66652 100644
--- a/apps/directory/src/routes/path/Operator.jsx
+++ b/apps/directory/src/routes/path/Operator.jsx
@@ -565,8 +565,8 @@ export default function Operator() {
style={
config.invert_filter
? {
- filter: 'invert(1)',
- }
+ filter: 'invert(1)',
+ }
: {}
}
/>
diff --git a/apps/directory/src/state/config.js b/apps/directory/src/state/config.js
index cd95fb2..6397bcc 100644
--- a/apps/directory/src/state/config.js
+++ b/apps/directory/src/state/config.js
@@ -24,7 +24,9 @@ export function useConfig() {
const compiledIds = operators.map((item) => item.official_id.toString())
const updatedIds = data.info.map((item) => item.id.toString())
const newIds = difference(updatedIds, compiledIds)
- setNewOperators(data.info.filter((item) => newIds.includes(item.id.toString())))
+ setNewOperators(
+ data.info.filter((item) => newIds.includes(item.id.toString()))
+ )
}, [])
return { config, operators, newOperators, fetchOfficialUpdate }
diff --git a/apps/module/package.json b/apps/module/package.json
index 79a2573..a25aedb 100644
--- a/apps/module/package.json
+++ b/apps/module/package.json
@@ -13,4 +13,4 @@
"devDependencies": {
"@aklive2d/postcss-config": "workspace:*"
}
-}
\ No newline at end of file
+}
diff --git a/apps/showcase/package.json b/apps/showcase/package.json
index 731342b..70256fe 100644
--- a/apps/showcase/package.json
+++ b/apps/showcase/package.json
@@ -25,4 +25,4 @@
"@aklive2d/vite-helpers": "workspace:*",
"@aklive2d/module": "workspace:*"
}
-}
\ No newline at end of file
+}
diff --git a/package.json b/package.json
index b0eb4b0..147f00c 100644
--- a/package.json
+++ b/package.json
@@ -8,6 +8,7 @@
"preview:directory": "turbo run preview:directory --ui tui",
"preview": "http-server ./dist",
"lint": "turbo run lint",
+ "lint:fix": "turbo run lint:fix",
"update": "turbo run update",
"init": "turbo run init",
"download:game": "turbo run download:game",
@@ -39,4 +40,4 @@
"esbuild",
"sharp"
]
-}
+}
\ No newline at end of file
diff --git a/packages/assets/libs/download.ts b/packages/assets/libs/download.ts
index ffd39e6..fb0b4af 100644
--- a/packages/assets/libs/download.ts
+++ b/packages/assets/libs/download.ts
@@ -48,7 +48,9 @@ const download = async (
})
mapping.musicFiles.map((item) => {
if (!file.exists(path.join(item.source, item.filename))) {
- const filename = item.filename.replace('.ogg', '').replace(/_(intro|loop)/, "")
+ const filename = item.filename
+ .replace('.ogg', '')
+ .replace(/_(intro|loop)/, '')
itemToDownload.add(filename)
}
})
diff --git a/packages/assets/package.json b/packages/assets/package.json
index 65fdf4e..4629d09 100644
--- a/packages/assets/package.json
+++ b/packages/assets/package.json
@@ -21,4 +21,4 @@
"lint:fix": "biome check --write .",
"build:cleanup": "rm -rf ./dist"
}
-}
\ No newline at end of file
+}
diff --git a/packages/charword-table/package.json b/packages/charword-table/package.json
index e5d28cb..0d71ac0 100644
--- a/packages/charword-table/package.json
+++ b/packages/charword-table/package.json
@@ -20,4 +20,4 @@
"lint:fix": "biome check --write .",
"build:cleanup": "rm -rf ./dist"
}
-}
\ No newline at end of file
+}
diff --git a/packages/config/package.json b/packages/config/package.json
index f055ff2..94dfb60 100644
--- a/packages/config/package.json
+++ b/packages/config/package.json
@@ -14,4 +14,4 @@
"lint": "biome lint --write .",
"lint:fix": "biome check --write ."
}
-}
\ No newline at end of file
+}
diff --git a/packages/libs/package.json b/packages/libs/package.json
index 8452780..57c9200 100644
--- a/packages/libs/package.json
+++ b/packages/libs/package.json
@@ -21,4 +21,4 @@
"@types/yauzl-promise": "^4.0.1",
"@types/yazl": "^3.3.0"
}
-}
\ No newline at end of file
+}
diff --git a/packages/music/index.ts b/packages/music/index.ts
index 7422628..f97b663 100644
--- a/packages/music/index.ts
+++ b/packages/music/index.ts
@@ -1,7 +1,7 @@
import path from 'node:path'
+import { files as backgroundFiles } from '@aklive2d/background'
import config from '@aklive2d/config'
import { githubDownload } from '@aklive2d/downloader'
-import {files as backgroundFiles} from "@aklive2d/background"
import { file } from '@aklive2d/libs'
import type {
AudioDataTable,
@@ -89,25 +89,36 @@ const generateMapping = () => {
for (const e of musicFiles) {
const musicPath = path.join(e.source, e.filename)
if (!file.exists(musicPath)) {
- throw new Error(`Music file ${e.filename} is not found in music folder.`)
+ throw new Error(
+ `Music file ${e.filename} is not found in music folder.`
+ )
}
}
for (const e of Object.keys(musicFileMapping)) {
if (!backgroundFiles.includes(e)) {
- throw new Error(`Background file ${e} is not found in background folder.`)
+ throw new Error(
+ `Background file ${e} is not found in background folder.`
+ )
}
}
for (const background of backgroundFiles) {
- if (!musicFileMapping[background]) {
- const alternativeMatch = background.replace(/_(form)(.*)(\.png)$/, "$3")
- if (musicFileMapping[alternativeMatch]){
- musicFileMapping[background] = structuredClone(musicFileMapping[alternativeMatch])
+ if (!musicFileMapping[background]) {
+ const alternativeMatch = background.replace(
+ /_(form)(.*)(\.png)$/,
+ '$3'
+ )
+ if (musicFileMapping[alternativeMatch]) {
+ musicFileMapping[background] = structuredClone(
+ musicFileMapping[alternativeMatch]
+ )
} else {
- throw new Error(`Music mapping for background file ${background} is not found in music mapping.`)
+ throw new Error(
+ `Music mapping for background file ${background} is not found in music mapping.`
+ )
}
- }
+ }
}
return {
diff --git a/packages/official-info/package.json b/packages/official-info/package.json
index cac3c97..61a6b46 100644
--- a/packages/official-info/package.json
+++ b/packages/official-info/package.json
@@ -16,4 +16,4 @@
"lint": "biome lint --write .",
"lint:fix": "biome check --write ."
}
-}
\ No newline at end of file
+}
diff --git a/packages/operator/index.ts b/packages/operator/index.ts
index f322b2a..b9a23c4 100644
--- a/packages/operator/index.ts
+++ b/packages/operator/index.ts
@@ -158,9 +158,10 @@ const generateMapping = () => {
: operatorInfo.skinName['en-US']
const skinEntry = findSkinEntry(skinTable, name, type)
operator.filename = skinEntry.dynIllustId.replace(/_2$/, '')
- operator.portrait_filename = type === 'skin'
- ? skinEntry.skinId.replace(/@/, '_')
- : `${skinEntry.charId}_2`
+ operator.portrait_filename =
+ type === 'skin'
+ ? skinEntry.skinId.replace(/@/, '_')
+ : `${skinEntry.charId}_2`
operator.fallback_name = `${operator.portrait_filename}${operator.isSP ? '_sp' : ''}`
const regions = Object.keys(
diff --git a/packages/operator/libs/builder.ts b/packages/operator/libs/builder.ts
index ecbdae9..c3593f4 100644
--- a/packages/operator/libs/builder.ts
+++ b/packages/operator/libs/builder.ts
@@ -73,7 +73,8 @@ const generateAssets = async (name: string) => {
) as string
if (!portraitHubContent) throw new Error('portrait_hub.json not found')
const portraitHub: PortraitHub = JSON.parse(portraitHubContent)
- const portrait_filename_lowerCase = operators[name].portrait_filename.toLowerCase()
+ const portrait_filename_lowerCase =
+ operators[name].portrait_filename.toLowerCase()
const portraitItem = portraitHub._sprites.find(
(item) => item.name.toLowerCase() === portrait_filename_lowerCase
)
diff --git a/packages/operator/package.json b/packages/operator/package.json
index 1e88e38..487b662 100644
--- a/packages/operator/package.json
+++ b/packages/operator/package.json
@@ -25,4 +25,4 @@
"devDependencies": {
"@types/unidecode": "^1.1.0"
}
-}
\ No newline at end of file
+}
diff --git a/packages/project-json/package.json b/packages/project-json/package.json
index 2955810..cc7eb80 100644
--- a/packages/project-json/package.json
+++ b/packages/project-json/package.json
@@ -20,4 +20,4 @@
"lint": "biome lint --write .",
"lint:fix": "biome check --write ."
}
-}
\ No newline at end of file
+}
diff --git a/packages/vite-helpers/package.json b/packages/vite-helpers/package.json
index 5688c32..b166727 100644
--- a/packages/vite-helpers/package.json
+++ b/packages/vite-helpers/package.json
@@ -21,4 +21,4 @@
"lint": "biome lint --write .",
"lint:fix": "biome check --write ."
}
-}
\ No newline at end of file
+}
diff --git a/turbo.json b/turbo.json
index 5f41031..2be9aef 100644
--- a/turbo.json
+++ b/turbo.json
@@ -8,7 +8,9 @@
"../../packages/assets/dist/**",
"src/**"
],
- "dependsOn": ["@aklive2d/showcase#build:directory"],
+ "dependsOn": [
+ "@aklive2d/showcase#build:directory"
+ ],
"persistent": true
},
"@aklive2d/directory#build:directory": {
@@ -18,59 +20,97 @@
"../../packages/assets/dist/**",
"src/**"
],
- "outputs": ["../../dist/index.html", "../../dist/_assets/**"],
- "dependsOn": ["@aklive2d/showcase#build:directory"]
+ "outputs": [
+ "../../dist/index.html",
+ "../../dist/_assets/**"
+ ],
+ "dependsOn": [
+ "@aklive2d/showcase#build:directory"
+ ]
},
"@aklive2d/showcase#build:directory": {
- "env": ["name"],
+ "env": [
+ "name"
+ ],
"inputs": [
"$TURBO_DEFAULT$",
"../../packages/assets/dist/**",
"src/**"
],
- "outputs": ["../../release/**"],
- "dependsOn": ["@aklive2d/assets#build"]
+ "outputs": [
+ "../../release/**"
+ ],
+ "dependsOn": [
+ "@aklive2d/assets#build"
+ ]
},
"@aklive2d/showcase#build": {
- "env": ["name"],
+ "env": [
+ "name"
+ ],
"inputs": [
"$TURBO_DEFAULT$",
"../../packages/assets/dist/**",
"src/**"
],
- "outputs": ["../../release/**"],
- "dependsOn": ["@aklive2d/assets#build"]
+ "outputs": [
+ "../../release/**"
+ ],
+ "dependsOn": [
+ "@aklive2d/assets#build"
+ ]
},
"@aklive2d/background#build": {
- "inputs": ["../music/auto_update/music_table.json"],
- "outputs": ["dist/bg_*.png", "dist/operator_bg.png"]
+ "inputs": [
+ "../music/auto_update/music_table.json"
+ ],
+ "outputs": [
+ "dist/bg_*.png",
+ "dist/operator_bg.png"
+ ]
},
"@aklive2d/charword-table#build": {
- "env": ["name"],
+ "env": [
+ "name"
+ ],
"inputs": [
"../official-info/auto_update/official_info.json",
"../operator/operators.yaml"
],
- "outputs": ["dist/**/charword_table.json"]
+ "outputs": [
+ "dist/**/charword_table.json"
+ ]
},
"@aklive2d/operator#build": {
- "env": ["name"],
- "dependsOn": ["@aklive2d/charword-table#build"],
+ "env": [
+ "name"
+ ],
+ "dependsOn": [
+ "@aklive2d/charword-table#build"
+ ],
"inputs": [
"../official-info/auto_update/official_info.json",
"operators.yaml"
],
- "outputs": ["dist/**"]
+ "outputs": [
+ "dist/**"
+ ]
},
"@aklive2d/project-json#build": {
- "env": ["name"],
+ "env": [
+ "name"
+ ],
"dependsOn": [
"@aklive2d/background#build",
"@aklive2d/charword-table#build",
"@aklive2d/music#build"
],
- "inputs": ["../operator/operators.yaml"],
- "outputs": ["dist/**"]
+ "inputs": [
+ "../operator/operators.yaml"
+ ],
+ "outputs": [
+ "dist/**"
+ ]
},
"@aklive2d/assets#build": {
"dependsOn": [
@@ -79,22 +119,40 @@
"@aklive2d/operator#build",
"@aklive2d/project-json#build"
],
- "outputs": ["dist/**"]
+ "outputs": [
+ "dist/**"
+ ]
},
"build": {
- "env": ["name"],
- "dependsOn": ["^build"],
- "inputs": ["$TURBO_DEFAULT$"],
- "outputs": ["release/**"]
+ "env": [
+ "name"
+ ],
+ "dependsOn": [
+ "^build"
+ ],
+ "inputs": [
+ "$TURBO_DEFAULT$"
+ ],
+ "outputs": [
+ "release/**"
+ ]
},
"build:directory": {
- "env": ["name"],
- "inputs": ["$TURBO_DEFAULT$"],
- "outputs": ["dist/**"]
+ "env": [
+ "name"
+ ],
+ "inputs": [
+ "$TURBO_DEFAULT$"
+ ],
+ "outputs": [
+ "dist/**"
+ ]
},
"@aklive2d/charword-table#update": {
"cache": false,
- "outputs": ["auto_update/charword_table*.json"]
+ "outputs": [
+ "auto_update/charword_table*.json"
+ ]
},
"@aklive2d/music#update": {
"cache": false,
@@ -106,77 +164,121 @@
},
"@aklive2d/official-info#update": {
"cache": false,
- "outputs": ["auto_update/official_info.json"]
+ "outputs": [
+ "auto_update/official_info.json"
+ ]
},
"update": {
"cache": false
},
"@aklive2d/operator#init": {
- "env": ["name", "id"],
+ "env": [
+ "name",
+ "id"
+ ],
"cache": false,
- "inputs": ["../official-info/auto_update/official_info.json"],
- "outputs": ["config/*.yaml", "config.yaml"]
+ "inputs": [
+ "../official-info/auto_update/official_info.json"
+ ],
+ "outputs": [
+ "config/*.yaml",
+ "config.yaml"
+ ]
},
"init": {
- "env": ["name", "id"],
+ "env": [
+ "name",
+ "id"
+ ],
"cache": false
},
"lint": {
"cache": false
},
+ "lint:fix": {
+ "cache": false
+ },
"dev:directory": {
- "env": ["name"],
- "dependsOn": ["^@aklive2d/assets#build"],
+ "env": [
+ "name"
+ ],
+ "dependsOn": [
+ "^@aklive2d/assets#build"
+ ],
"cache": false,
"persistent": true
},
"preview:directory": {
- "env": ["name"],
- "dependsOn": ["^@aklive2d/assets#build"],
+ "env": [
+ "name"
+ ],
+ "dependsOn": [
+ "^@aklive2d/assets#build"
+ ],
"cache": false,
"persistent": true
},
"dev:showcase": {
- "env": ["name"],
- "dependsOn": ["^@aklive2d/assets#build"],
+ "env": [
+ "name"
+ ],
+ "dependsOn": [
+ "^@aklive2d/assets#build"
+ ],
"cache": false,
"persistent": true
},
"preview:showcase": {
- "env": ["name"],
- "dependsOn": ["^@aklive2d/showcase#build"],
+ "env": [
+ "name"
+ ],
+ "dependsOn": [
+ "^@aklive2d/showcase#build"
+ ],
"cache": false,
"persistent": true
},
"@aklive2d/assets#download:game": {
"cache": false,
- "outputs": ["data/**"]
+ "outputs": [
+ "data/**"
+ ]
},
"download:game": {
"cache": false
},
"@aklive2d/assets#build:cleanup": {
"cache": false,
- "dependsOn": ["@aklive2d/directory#build"]
+ "dependsOn": [
+ "@aklive2d/directory#build"
+ ]
},
"@aklive2d/background#build:cleanup": {
"cache": false,
- "dependsOn": ["@aklive2d/directory#build"]
+ "dependsOn": [
+ "@aklive2d/directory#build"
+ ]
},
"@aklive2d/charword-table#build:cleanup": {
"cache": false,
- "dependsOn": ["@aklive2d/directory#build"]
+ "dependsOn": [
+ "@aklive2d/directory#build"
+ ]
},
"@aklive2d/music#build:cleanup": {
"cache": false,
- "dependsOn": ["@aklive2d/directory#build"]
+ "dependsOn": [
+ "@aklive2d/directory#build"
+ ]
},
"@aklive2d/operator#build:cleanup": {
"cache": false,
- "dependsOn": ["@aklive2d/directory#build"]
+ "dependsOn": [
+ "@aklive2d/directory#build"
+ ]
},
"build:cleanup": {
"cache": false
}
}
-}
+}
\ No newline at end of file