ref: project structure, write basic type for lyrics layout
This commit is contained in:
parent
d34ac176c0
commit
0c315972c1
@ -1,10 +1,9 @@
|
||||
<script lang="ts">
|
||||
import type { LrcJsonData } from '$lib/lyrics/type';
|
||||
import { onMount } from 'svelte';
|
||||
import LyricsLine from './lyrics/lyricLine.svelte';
|
||||
import type { ScriptItem } from 'lrc-parser-ts';
|
||||
import LyricLine from './lyrics/lyricLine.svelte';
|
||||
import type { LyricPos } from './lyrics/type';
|
||||
import type { ScriptItem } from '$lib/lyrics/type';
|
||||
import LyricLine from './lyricLine.svelte';
|
||||
import type { LyricPos } from './type';
|
||||
|
||||
// Props
|
||||
export let originalLyrics: LrcJsonData;
|
6
src/lib/components/lyrics/type.d.ts
vendored
6
src/lib/components/lyrics/type.d.ts
vendored
@ -2,3 +2,9 @@ export interface LyricPos {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
export interface LyricLayout {
|
||||
pos: LyricPos;
|
||||
blur: number;
|
||||
scale: number;
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
import Background from '$lib/components/background.svelte';
|
||||
import Cover from '$lib/components/cover.svelte';
|
||||
import InteractiveBox from '$lib/components/interactiveBox.svelte';
|
||||
import Lyrics from '$lib/components/lyrics.svelte';
|
||||
import Lyrics from '$lib/components/lyrics/lyrics.svelte';
|
||||
import extractFileName from '$lib/extractFileName';
|
||||
import localforage from 'localforage';
|
||||
import { writable } from 'svelte/store';
|
||||
@ -15,7 +15,7 @@
|
||||
import { onMount } from 'svelte';
|
||||
import progressBarRaw from '$lib/state/progressBarRaw';
|
||||
import { parseTTML, type LyricLine } from '$lib/lyrics/ttml';
|
||||
import NewLyrics from '$lib/components/newLyrics.svelte';
|
||||
import NewLyrics from '$lib/components/lyrics/newLyrics.svelte';
|
||||
|
||||
const audioId = $page.params.id;
|
||||
let audioPlayer: HTMLAudioElement | null = null;
|
||||
|
Loading…
Reference in New Issue
Block a user