Pre-pretext, the karaoke gradient applied to a single span shared the same horizontal cut across every wrapped visual line — line 2 appeared partially sung when only line 1's worth of vocals had played. Pretext lays out the active lyric into visual lines; each renders as its own block-level span with its own 0->100% gradient, so progress fills sequentially. Also adds race/perf safeguards layered on top: - Cancellation token on tick().then(layoutActiveLine) so rapid activeIndex changes (seek-scrub, fast songs) don't queue stale microtasks against the current DOM. - ResizeObserver coalesces via rAF and ignores sub-pixel width deltas, so window-drag and the active-line scale animation don't trigger Pretext re-measurement every callback. - segmentBounds prefix array memoizes cumulative widths, dropping per- segment progress lookup from O(i) to O(1) inside the each-block. - EMA writes equality-guard measuredBlockMs/Delta and lookaheadEnabled so Svelte signals don't fan out no-op updates 60 times per second. - Lookahead clamped at 1/30 and disabled on backward dp so a coarse audio jump or in-line seek can't poison the visual lead. - measuredBlockMs seed lowered (>=20ms, dur * 0.01) since rAF-rate data converges the EMA within 2-3 ticks; the prior 80ms floor visibly lagged the gradient on the first frame of every new line. - LyricsLine type unified from store (single source of truth).
62 lines
2.3 KiB
JSON
62 lines
2.3 KiB
JSON
{
|
|
"name": "qbz-nix",
|
|
"version": "1.2.12",
|
|
"description": "Native high-fidelity client for Qobuz™ subscribers on Linux with Hi-Fi audio support (uses the Qobuz API; not certified by Qobuz)",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "svelte-kit sync && vite dev",
|
|
"dev:clean-runtime": "bash ./scripts/clean-dev-runtime.sh",
|
|
"dev:ghost-doctor": "bash ./scripts/dev-ghost-doctor.sh",
|
|
"dev:ghost-reset": "bash ./scripts/dev-ghost-doctor.sh --no-start",
|
|
"dev:ultra-restore": "bash ./scripts/dev-ultra-restore.sh",
|
|
"dev:ultra-reset": "bash ./scripts/dev-ultra-restore.sh --no-start",
|
|
"dev:ultra-full-reset": "bash ./scripts/dev-ultra-restore.sh --full --no-start",
|
|
"dev:reset-last-view": "bash ./scripts/dev-reset-last-view.sh",
|
|
"dev:tauri": "./scripts/dev-with-env.sh",
|
|
"build": "vite build",
|
|
"preview": "vite preview",
|
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
"check:v2-backend-purity": "bash ./scripts/check-v2-backend-purity.sh",
|
|
"check:v2-frontend-invokes": "python3 ./scripts/audit-frontend-invokes.py",
|
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
"check:no-t-shadow": "bash ./scripts/check-no-t-shadow.sh",
|
|
"test": "vitest",
|
|
"test:run": "vitest run",
|
|
"tauri": "tauri"
|
|
},
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"@chenglou/pretext": "^0.0.7",
|
|
"@icons-pack/svelte-simple-icons": "^7.2.0",
|
|
"@kawarp/core": "^1.1.1",
|
|
"@tauri-apps/api": "^2.11.0",
|
|
"@tauri-apps/plugin-clipboard-manager": "^2",
|
|
"@tauri-apps/plugin-dialog": "^2.7.1",
|
|
"@tauri-apps/plugin-opener": "^2",
|
|
"@tauri-apps/plugin-os": "^2",
|
|
"@tauri-apps/plugin-process": "^2.3.1",
|
|
"@tauri-apps/plugin-updater": "^2.10.1",
|
|
"lucide-svelte": "^1.0.1",
|
|
"node-vibrant": "^4.0.4",
|
|
"svelte-i18n": "^4.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@sveltejs/adapter-static": "^3.0.6",
|
|
"@sveltejs/kit": "^2.59.1",
|
|
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
|
"@tauri-apps/cli": "^2",
|
|
"@testing-library/svelte": "^5.3.1",
|
|
"@types/node": "^22.19.18",
|
|
"jsdom": "^29.1.1",
|
|
"svelte": "^5.55.5",
|
|
"svelte-check": "^4.4.8",
|
|
"typescript": "~6.0.3",
|
|
"vite": "^8.0.10",
|
|
"vitest": "^4.1.5"
|
|
},
|
|
"overrides": {
|
|
"cookie": "^0.7.0",
|
|
"esbuild": "^0.25.0"
|
|
}
|
|
}
|