@applemusic-like-lyrics/vue 0.3.2 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/amll-vue.cjs +279 -0
- package/dist/amll-vue.cjs.map +1 -0
- package/dist/amll-vue.d.cts +762 -0
- package/dist/amll-vue.d.mts +762 -0
- package/dist/{amll-vue.js → amll-vue.mjs} +20 -14
- package/dist/amll-vue.mjs.map +1 -0
- package/package.json +59 -70
- package/LICENSE +0 -661
- package/dist/BackgroundRender.d.ts +0 -248
- package/dist/LyricPlayer.d.ts +0 -488
- package/dist/amll-vue.js.map +0 -1
- package/dist/index.d.ts +0 -2
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ Since Vue components are not convenient for generating API documentation, please
|
|
|
38
38
|
|
|
39
39
|
(Or refer to the React binding, as both have identical properties and reference methods)
|
|
40
40
|
|
|
41
|
-
A test program can be found in [
|
|
41
|
+
A test program can be found in [../playground/vue/src/test.ts](../playground/vue/src/test.ts).
|
|
42
42
|
|
|
43
43
|
```vue
|
|
44
44
|
<tamplate>
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
let vue = require("vue");
|
|
3
|
+
let _applemusic_like_lyrics_core = require("@applemusic-like-lyrics/core");
|
|
4
|
+
//#region src/BackgroundRender.tsx
|
|
5
|
+
const backgroundRenderProps = {
|
|
6
|
+
album: {
|
|
7
|
+
type: [String, Object],
|
|
8
|
+
required: false
|
|
9
|
+
},
|
|
10
|
+
albumIsVideo: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
required: false
|
|
13
|
+
},
|
|
14
|
+
fps: {
|
|
15
|
+
type: Number,
|
|
16
|
+
required: false
|
|
17
|
+
},
|
|
18
|
+
playing: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
required: false
|
|
21
|
+
},
|
|
22
|
+
flowSpeed: {
|
|
23
|
+
type: Number,
|
|
24
|
+
required: false
|
|
25
|
+
},
|
|
26
|
+
hasLyric: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
required: false
|
|
29
|
+
},
|
|
30
|
+
lowFreqVolume: {
|
|
31
|
+
type: Number,
|
|
32
|
+
required: false
|
|
33
|
+
},
|
|
34
|
+
renderScale: {
|
|
35
|
+
type: Number,
|
|
36
|
+
required: false
|
|
37
|
+
},
|
|
38
|
+
renderer: {
|
|
39
|
+
type: Object,
|
|
40
|
+
required: false
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const BackgroundRender = (0, vue.defineComponent)({
|
|
44
|
+
name: "BackgroundRender",
|
|
45
|
+
props: backgroundRenderProps,
|
|
46
|
+
setup(props, { expose }) {
|
|
47
|
+
const wrapperRef = (0, vue.useTemplateRef)("wrapper-ref");
|
|
48
|
+
const bgRenderRef = (0, vue.ref)();
|
|
49
|
+
(0, vue.onMounted)(() => {
|
|
50
|
+
if (wrapperRef.value) {
|
|
51
|
+
bgRenderRef.value = _applemusic_like_lyrics_core.BackgroundRender.new(props.renderer ?? _applemusic_like_lyrics_core.MeshGradientRenderer);
|
|
52
|
+
const el = bgRenderRef.value.getElement();
|
|
53
|
+
el.style.width = "100%";
|
|
54
|
+
el.style.height = "100%";
|
|
55
|
+
wrapperRef.value.appendChild(el);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
(0, vue.onUnmounted)(() => {
|
|
59
|
+
if (bgRenderRef.value) bgRenderRef.value.dispose();
|
|
60
|
+
});
|
|
61
|
+
(0, vue.watchEffect)(() => {
|
|
62
|
+
if (props.album) bgRenderRef.value?.setAlbum(props.album, props.albumIsVideo);
|
|
63
|
+
});
|
|
64
|
+
(0, vue.watchEffect)(() => {
|
|
65
|
+
if (props.fps) bgRenderRef.value?.setFPS(props.fps);
|
|
66
|
+
});
|
|
67
|
+
(0, vue.watchEffect)(() => {
|
|
68
|
+
if (props.playing) bgRenderRef.value?.pause();
|
|
69
|
+
else bgRenderRef.value?.resume();
|
|
70
|
+
});
|
|
71
|
+
(0, vue.watchEffect)(() => {
|
|
72
|
+
if (props.flowSpeed) bgRenderRef.value?.setFlowSpeed(props.flowSpeed);
|
|
73
|
+
});
|
|
74
|
+
(0, vue.watchEffect)(() => {
|
|
75
|
+
if (props.renderScale) bgRenderRef.value?.setRenderScale(props.renderScale);
|
|
76
|
+
});
|
|
77
|
+
(0, vue.watchEffect)(() => {
|
|
78
|
+
if (props.lowFreqVolume) bgRenderRef.value?.setLowFreqVolume(props.lowFreqVolume);
|
|
79
|
+
});
|
|
80
|
+
(0, vue.watchEffect)(() => {
|
|
81
|
+
if (props.hasLyric !== void 0) bgRenderRef.value?.setHasLyric(props.hasLyric ?? true);
|
|
82
|
+
});
|
|
83
|
+
expose({
|
|
84
|
+
bgRender: bgRenderRef,
|
|
85
|
+
wrapperEl: wrapperRef
|
|
86
|
+
});
|
|
87
|
+
return () => (0, vue.createVNode)("div", {
|
|
88
|
+
"style": "display: contents;",
|
|
89
|
+
"ref": "wrapper-ref"
|
|
90
|
+
}, null);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region src/LyricPlayer.tsx
|
|
95
|
+
const lyricPlayerProps = {
|
|
96
|
+
disabled: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
default: false
|
|
99
|
+
},
|
|
100
|
+
playing: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
default: true
|
|
103
|
+
},
|
|
104
|
+
alignAnchor: {
|
|
105
|
+
type: String,
|
|
106
|
+
default: "center"
|
|
107
|
+
},
|
|
108
|
+
alignPosition: {
|
|
109
|
+
type: Number,
|
|
110
|
+
default: .5
|
|
111
|
+
},
|
|
112
|
+
enableSpring: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
default: true
|
|
115
|
+
},
|
|
116
|
+
enableBlur: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: true
|
|
119
|
+
},
|
|
120
|
+
enableScale: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
default: true
|
|
123
|
+
},
|
|
124
|
+
hidePassedLines: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
default: false
|
|
127
|
+
},
|
|
128
|
+
maskObsceneWordsMode: {
|
|
129
|
+
type: String,
|
|
130
|
+
default: _applemusic_like_lyrics_core.MaskObsceneWordsMode.Disabled
|
|
131
|
+
},
|
|
132
|
+
optimizeOptions: {
|
|
133
|
+
type: Object,
|
|
134
|
+
required: false
|
|
135
|
+
},
|
|
136
|
+
lyricLines: {
|
|
137
|
+
type: Object,
|
|
138
|
+
required: false
|
|
139
|
+
},
|
|
140
|
+
currentTime: {
|
|
141
|
+
type: Number,
|
|
142
|
+
default: 0
|
|
143
|
+
},
|
|
144
|
+
wordFadeWidth: {
|
|
145
|
+
type: Number,
|
|
146
|
+
default: .5
|
|
147
|
+
},
|
|
148
|
+
linePosXSpringParams: {
|
|
149
|
+
type: Object,
|
|
150
|
+
required: false
|
|
151
|
+
},
|
|
152
|
+
linePosYSpringParams: {
|
|
153
|
+
type: Object,
|
|
154
|
+
required: false
|
|
155
|
+
},
|
|
156
|
+
lineScaleSpringParams: {
|
|
157
|
+
type: Object,
|
|
158
|
+
required: false
|
|
159
|
+
},
|
|
160
|
+
lyricPlayer: {
|
|
161
|
+
type: Object,
|
|
162
|
+
required: false
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
const LyricPlayer = (0, vue.defineComponent)({
|
|
166
|
+
name: "LyricPlayer",
|
|
167
|
+
props: lyricPlayerProps,
|
|
168
|
+
emits: {
|
|
169
|
+
lineClick: (_) => true,
|
|
170
|
+
lineContextmenu: (_) => true
|
|
171
|
+
},
|
|
172
|
+
slots: Object,
|
|
173
|
+
setup(props, { expose, emit, attrs, slots }) {
|
|
174
|
+
const wrapperRef = (0, vue.useTemplateRef)("wrapper-ref");
|
|
175
|
+
const playerRef = (0, vue.ref)();
|
|
176
|
+
const lineClickHandler = (e) => emit("lineClick", e);
|
|
177
|
+
const lineContextMenuHandler = (e) => emit("lineContextmenu", e);
|
|
178
|
+
(0, vue.onMounted)(() => {
|
|
179
|
+
const wrapper = wrapperRef.value;
|
|
180
|
+
if (wrapper) {
|
|
181
|
+
playerRef.value = new _applemusic_like_lyrics_core.LyricPlayer();
|
|
182
|
+
wrapper.appendChild(playerRef.value.getElement());
|
|
183
|
+
playerRef.value.addEventListener("line-click", lineClickHandler);
|
|
184
|
+
playerRef.value.addEventListener("line-contextmenu", lineContextMenuHandler);
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
(0, vue.onUnmounted)(() => {
|
|
188
|
+
if (playerRef.value) {
|
|
189
|
+
playerRef.value.removeEventListener("line-click", lineClickHandler);
|
|
190
|
+
playerRef.value.removeEventListener("line-contextmenu", lineContextMenuHandler);
|
|
191
|
+
playerRef.value.dispose();
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
(0, vue.watchEffect)((onCleanup) => {
|
|
195
|
+
if (!props.disabled) {
|
|
196
|
+
let canceled = false;
|
|
197
|
+
let lastTime = -1;
|
|
198
|
+
const onFrame = (time) => {
|
|
199
|
+
if (canceled) return;
|
|
200
|
+
if (lastTime === -1) lastTime = time;
|
|
201
|
+
playerRef.value?.update(time - lastTime);
|
|
202
|
+
lastTime = time;
|
|
203
|
+
requestAnimationFrame(onFrame);
|
|
204
|
+
};
|
|
205
|
+
requestAnimationFrame(onFrame);
|
|
206
|
+
onCleanup(() => {
|
|
207
|
+
canceled = true;
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
(0, vue.watchEffect)(() => {
|
|
212
|
+
if (props.playing !== void 0) if (props.playing) playerRef.value?.resume();
|
|
213
|
+
else playerRef.value?.pause();
|
|
214
|
+
else playerRef.value?.resume();
|
|
215
|
+
});
|
|
216
|
+
(0, vue.watchEffect)(() => {
|
|
217
|
+
if (props.alignAnchor !== void 0) playerRef.value?.setAlignAnchor(props.alignAnchor);
|
|
218
|
+
});
|
|
219
|
+
(0, vue.watchEffect)(() => {
|
|
220
|
+
if (props.hidePassedLines !== void 0) playerRef.value?.setHidePassedLines(props.hidePassedLines);
|
|
221
|
+
});
|
|
222
|
+
(0, vue.watchEffect)(() => {
|
|
223
|
+
if (props.maskObsceneWordsMode !== void 0) playerRef.value?.setMaskObsceneWords(props.maskObsceneWordsMode);
|
|
224
|
+
else playerRef.value?.setMaskObsceneWords(_applemusic_like_lyrics_core.MaskObsceneWordsMode.Disabled);
|
|
225
|
+
});
|
|
226
|
+
(0, vue.watchEffect)(() => {
|
|
227
|
+
if (props.alignPosition !== void 0) playerRef.value?.setAlignPosition(props.alignPosition);
|
|
228
|
+
});
|
|
229
|
+
(0, vue.watchEffect)(() => {
|
|
230
|
+
if (props.enableSpring !== void 0) playerRef.value?.setEnableSpring(props.enableSpring);
|
|
231
|
+
else playerRef.value?.setEnableSpring(true);
|
|
232
|
+
});
|
|
233
|
+
(0, vue.watchEffect)(() => {
|
|
234
|
+
if (props.enableBlur !== void 0) playerRef.value?.setEnableBlur(props.enableBlur);
|
|
235
|
+
else playerRef.value?.setEnableBlur(true);
|
|
236
|
+
});
|
|
237
|
+
(0, vue.watchEffect)(() => {
|
|
238
|
+
if (props.enableScale !== void 0) playerRef.value?.setEnableScale(props.enableScale);
|
|
239
|
+
else playerRef.value?.setEnableScale(true);
|
|
240
|
+
});
|
|
241
|
+
(0, vue.watch)([
|
|
242
|
+
playerRef,
|
|
243
|
+
() => props.lyricLines,
|
|
244
|
+
() => props.optimizeOptions
|
|
245
|
+
], ([player, lyricLines, optimizeOptions]) => {
|
|
246
|
+
if (!player) return;
|
|
247
|
+
if (optimizeOptions !== void 0) player.setOptimizeOptions(optimizeOptions);
|
|
248
|
+
if (lyricLines !== void 0) player.setLyricLines(lyricLines);
|
|
249
|
+
else player.setLyricLines([]);
|
|
250
|
+
if (props.currentTime !== void 0) player.setCurrentTime(props.currentTime, true);
|
|
251
|
+
}, { immediate: true });
|
|
252
|
+
(0, vue.watchEffect)(() => {
|
|
253
|
+
if (props.currentTime !== void 0) playerRef.value?.setCurrentTime(props.currentTime);
|
|
254
|
+
});
|
|
255
|
+
(0, vue.watchEffect)(() => {
|
|
256
|
+
if (props.wordFadeWidth !== void 0) playerRef.value?.setWordFadeWidth(props.wordFadeWidth);
|
|
257
|
+
});
|
|
258
|
+
(0, vue.watchEffect)(() => {
|
|
259
|
+
if (props.linePosXSpringParams !== void 0) playerRef.value?.setLinePosXSpringParams(props.linePosXSpringParams);
|
|
260
|
+
});
|
|
261
|
+
(0, vue.watchEffect)(() => {
|
|
262
|
+
if (props.linePosYSpringParams !== void 0) playerRef.value?.setLinePosYSpringParams(props.linePosYSpringParams);
|
|
263
|
+
});
|
|
264
|
+
(0, vue.watchEffect)(() => {
|
|
265
|
+
if (props.lineScaleSpringParams !== void 0) playerRef.value?.setLineScaleSpringParams(props.lineScaleSpringParams);
|
|
266
|
+
});
|
|
267
|
+
const bottomLineEl = (0, vue.computed)(() => playerRef.value?.getBottomLineElement());
|
|
268
|
+
expose({
|
|
269
|
+
lyricPlayer: playerRef,
|
|
270
|
+
wrapperEl: wrapperRef
|
|
271
|
+
});
|
|
272
|
+
return () => (0, vue.createVNode)("div", (0, vue.mergeProps)({ "ref": "wrapper-ref" }, attrs), [bottomLineEl.value && (0, vue.createVNode)(vue.Teleport, { "to": bottomLineEl.value }, { default: () => [slots["bottom-line"]?.()] })]);
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
//#endregion
|
|
276
|
+
exports.BackgroundRender = BackgroundRender;
|
|
277
|
+
exports.LyricPlayer = LyricPlayer;
|
|
278
|
+
|
|
279
|
+
//# sourceMappingURL=amll-vue.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amll-vue.cjs","names":["AbstractBaseRenderer","BaseRenderer","BackgroundRender","CoreBackgroundRender","MeshGradientRenderer","defineComponent","ExtractPublicPropTypes","onMounted","onUnmounted","PropType","Ref","ref","ShallowRef","useTemplateRef","watchEffect","BackgroundRenderRef","bgRender","wrapperEl","Readonly","HTMLDivElement","backgroundRenderProps","album","type","String","Object","HTMLImageElement","HTMLVideoElement","required","albumIsVideo","Boolean","fps","Number","playing","flowSpeed","hasLyric","lowFreqVolume","renderScale","renderer","args","ConstructorParameters","const","BackgroundRenderProps","name","props","setup","expose","wrapperRef","bgRenderRef","value","new","el","getElement","style","width","height","appendChild","dispose","setAlbum","setFPS","pause","resume","setFlowSpeed","setRenderScale","setLowFreqVolume","undefined","setHasLyric","_createVNode","BaseRenderer","LyricPlayer","CoreLyricPlayer","LyricLine","LyricLineMouseEvent","LyricPlayerBase","MaskObsceneWordsMode","OptimizeLyricOptions","spring","computed","defineComponent","ExtractPublicPropTypes","onMounted","onUnmounted","PropType","Ref","ref","ShallowRef","SlotsType","Teleport","useTemplateRef","watch","watchEffect","lyricPlayerProps","disabled","type","Boolean","default","playing","alignAnchor","String","alignPosition","Number","enableSpring","enableBlur","enableScale","hidePassedLines","maskObsceneWordsMode","Disabled","optimizeOptions","Object","required","lyricLines","currentTime","wordFadeWidth","linePosXSpringParams","Partial","SpringParams","linePosYSpringParams","lineScaleSpringParams","lyricPlayer","args","ConstructorParameters","const","LyricPlayerProps","lyricPlayerEmits","lineClick","_","lineContextmenu","LyricPlayerEmits","LyricPlayerRef","wrapperEl","Readonly","HTMLDivElement","name","props","emits","slots","setup","expose","emit","attrs","wrapperRef","playerRef","lineClickHandler","e","Event","lineContextMenuHandler","wrapper","value","appendChild","getElement","addEventListener","removeEventListener","dispose","onCleanup","canceled","lastTime","onFrame","time","update","requestAnimationFrame","undefined","resume","pause","setAlignAnchor","setHidePassedLines","setMaskObsceneWords","setAlignPosition","setEnableSpring","setEnableBlur","setEnableScale","player","setOptimizeOptions","setLyricLines","setCurrentTime","immediate","setWordFadeWidth","setLinePosXSpringParams","setLinePosYSpringParams","setLineScaleSpringParams","bottomLineEl","getBottomLineElement","_createVNode","_mergeProps"],"sources":["../src/BackgroundRender.tsx","../src/LyricPlayer.tsx"],"sourcesContent":["import {\n\ttype AbstractBaseRenderer,\n\ttype BaseRenderer,\n\tBackgroundRender as CoreBackgroundRender,\n\tMeshGradientRenderer,\n} from \"@applemusic-like-lyrics/core\";\nimport {\n\tdefineComponent,\n\ttype ExtractPublicPropTypes,\n\tonMounted,\n\tonUnmounted,\n\ttype PropType,\n\ttype Ref,\n\tref,\n\ttype ShallowRef,\n\tuseTemplateRef,\n\twatchEffect,\n} from \"vue\";\n\n/**\n * 背景渲染组件的引用\n */\nexport interface BackgroundRenderRef {\n\t/**\n\t * 背景渲染实例引用\n\t */\n\tbgRender?: Ref<AbstractBaseRenderer | undefined>;\n\t/**\n\t * 将背景渲染实例的元素包裹起来的 DIV 元素实例\n\t */\n\twrapperEl: Readonly<ShallowRef<HTMLDivElement | null>>;\n}\n\nconst backgroundRenderProps = {\n\t/**\n\t * 设置背景专辑资源\n\t */\n\talbum: {\n\t\ttype: [String, Object] as PropType<\n\t\t\tstring | HTMLImageElement | HTMLVideoElement\n\t\t>,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置专辑资源是否为视频\n\t */\n\talbumIsVideo: {\n\t\ttype: Boolean,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置当前背景动画帧率,如果为 `undefined` 则默认为 `30`\n\t */\n\tfps: {\n\t\ttype: Number,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置当前播放状态,如果为 `undefined` 则默认为 `true`\n\t */\n\tplaying: {\n\t\ttype: Boolean,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置当前动画流动速度,如果为 `undefined` 则默认为 `2`\n\t */\n\tflowSpeed: {\n\t\ttype: Number,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置背景是否根据“是否有歌词”这个特征调整自身效果,例如有歌词时会变得更加活跃\n\t *\n\t * 部分渲染器会根据这个特征调整自身效果\n\t *\n\t * 如果不确定是否需要赋值或无法知晓是否包含歌词,请传入 true 或不做任何处理(默认值为 true)\n\t */\n\thasLyric: {\n\t\ttype: Boolean,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置低频的音量大小,范围在 80hz-120hz 之间为宜,取值范围在 [0.0-1.0] 之间\n\t *\n\t * 部分渲染器会根据音量大小调整背景效果(例如根据鼓点跳动)\n\t *\n\t * 如果无法获取到类似的数据,请传入 undefined 或 1.0 作为默认值,或不做任何处理(默认值即 1.0)\n\t */\n\tlowFreqVolume: {\n\t\ttype: Number,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置当前渲染缩放比例,如果为 `undefined` 则默认为 `0.5`\n\t */\n\trenderScale: {\n\t\ttype: Number,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置渲染器,如果为 `undefined` 则默认为 `MeshGradientRenderer`\n\t * 默认渲染器有可能会随着版本更新而更换\n\t */\n\trenderer: {\n\t\ttype: Object as PropType<{\n\t\t\tnew (...args: ConstructorParameters<typeof BaseRenderer>): BaseRenderer;\n\t\t}>,\n\t\trequired: false,\n\t},\n} as const;\n\nexport type BackgroundRenderProps = ExtractPublicPropTypes<\n\ttypeof backgroundRenderProps\n>;\n\nexport const BackgroundRender = defineComponent({\n\tname: \"BackgroundRender\",\n\tprops: backgroundRenderProps,\n\tsetup(props, { expose }) {\n\t\tconst wrapperRef = useTemplateRef<HTMLDivElement>(\"wrapper-ref\");\n\t\tconst bgRenderRef = ref<AbstractBaseRenderer>();\n\n\t\tonMounted(() => {\n\t\t\tif (wrapperRef.value) {\n\t\t\t\tbgRenderRef.value = CoreBackgroundRender.new(\n\t\t\t\t\tprops.renderer ?? MeshGradientRenderer,\n\t\t\t\t);\n\t\t\t\tconst el = bgRenderRef.value.getElement();\n\t\t\t\tel.style.width = \"100%\";\n\t\t\t\tel.style.height = \"100%\";\n\t\t\t\twrapperRef.value.appendChild(el);\n\t\t\t}\n\t\t});\n\n\t\tonUnmounted(() => {\n\t\t\tif (bgRenderRef.value) {\n\t\t\t\tbgRenderRef.value.dispose();\n\t\t\t}\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.album)\n\t\t\t\tbgRenderRef.value?.setAlbum(props.album, props.albumIsVideo);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.fps) bgRenderRef.value?.setFPS(props.fps);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.playing) bgRenderRef.value?.pause();\n\t\t\telse bgRenderRef.value?.resume();\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.flowSpeed) bgRenderRef.value?.setFlowSpeed(props.flowSpeed);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.renderScale)\n\t\t\t\tbgRenderRef.value?.setRenderScale(props.renderScale);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.lowFreqVolume)\n\t\t\t\tbgRenderRef.value?.setLowFreqVolume(props.lowFreqVolume);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.hasLyric !== undefined)\n\t\t\t\tbgRenderRef.value?.setHasLyric(props.hasLyric ?? true);\n\t\t});\n\n\t\texpose<BackgroundRenderRef>({\n\t\t\tbgRender: bgRenderRef,\n\t\t\twrapperEl: wrapperRef,\n\t\t});\n\n\t\treturn () => <div style=\"display: contents;\" ref=\"wrapper-ref\" />;\n\t},\n});\n","import {\n\ttype BaseRenderer,\n\tLyricPlayer as CoreLyricPlayer,\n\ttype LyricLine,\n\ttype LyricLineMouseEvent,\n\ttype LyricPlayerBase,\n\tMaskObsceneWordsMode,\n\ttype OptimizeLyricOptions,\n\ttype spring,\n} from \"@applemusic-like-lyrics/core\";\nimport {\n\tcomputed,\n\tdefineComponent,\n\ttype ExtractPublicPropTypes,\n\tonMounted,\n\tonUnmounted,\n\ttype PropType,\n\ttype Ref,\n\tref,\n\ttype ShallowRef,\n\ttype SlotsType,\n\tTeleport,\n\tuseTemplateRef,\n\twatch,\n\twatchEffect,\n} from \"vue\";\n\nconst lyricPlayerProps = {\n\t/**\n\t * 是否禁用歌词播放组件,默认为 `false`,歌词组件启用后将会开始逐帧更新歌词的动画效果,并对传入的其他参数变更做出反馈。\n\t *\n\t * 如果禁用了歌词组件动画,你也可以通过引用取得原始渲染组件实例,手动逐帧调用其 `update` 函数来更新动画效果。\n\t */\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n\t/**\n\t * 是否演出部分效果,目前会控制播放间奏点的动画的播放暂停与否,默认为 `true`\n\t */\n\tplaying: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 设置歌词行的对齐方式,如果为 `undefined` 则默认为 `center`\n\t *\n\t * - 设置成 `top` 的话将会向目标歌词行的顶部对齐\n\t * - 设置成 `bottom` 的话将会向目标歌词行的底部对齐\n\t * - 设置成 `center` 的话将会向目标歌词行的垂直中心对齐\n\t */\n\talignAnchor: {\n\t\ttype: String as PropType<\"top\" | \"bottom\" | \"center\">,\n\t\tdefault: \"center\",\n\t},\n\t/**\n\t * 设置默认的歌词行对齐位置,相对于整个歌词播放组件的大小位置,如果为 `undefined`\n\t * 则默认为 `0.5`\n\t *\n\t * 可以设置一个 `[0.0-1.0]` 之间的任意数字,代表组件高度由上到下的比例位置\n\t */\n\talignPosition: {\n\t\ttype: Number,\n\t\tdefault: 0.5,\n\t},\n\t/**\n\t * 设置是否使用物理弹簧算法实现歌词动画效果,默认启用\n\t *\n\t * 如果启用,则会通过弹簧算法实时处理歌词位置,但是需要性能足够强劲的电脑方可流畅运行\n\t *\n\t * 如果不启用,则会回退到基于 `transition` 的过渡效果,对低性能的机器比较友好,但是效果会比较单一\n\t */\n\tenableSpring: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 设置是否启用歌词行的模糊效果,默认为 `true`\n\t */\n\tenableBlur: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 设置是否使用物理弹簧算法实现歌词动画效果,默认启用\n\t *\n\t * 如果启用,则会通过弹簧算法实时处理歌词位置,但是需要性能足够强劲的电脑方可流畅运行\n\t *\n\t * 如果不启用,则会回退到基于 `transition` 的过渡效果,对低性能的机器比较友好,但是效果会比较单一\n\t */\n\tenableScale: {\n\t\ttype: Boolean,\n\t\tdefault: true,\n\t},\n\t/**\n\t * 设置是否隐藏已经播放过的歌词行,默认不隐藏\n\t */\n\thidePassedLines: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n\t/**\n\t * 设置歌词中不雅用语的掩码模式,默认为 `MaskObsceneWordsMode.Disabled`,即不掩码\n\t */\n\tmaskObsceneWordsMode: {\n\t\ttype: String as PropType<MaskObsceneWordsMode>,\n\t\tdefault: MaskObsceneWordsMode.Disabled,\n\t},\n\t/**\n\t * 设置歌词优化选项\n\t */\n\toptimizeOptions: {\n\t\ttype: Object as PropType<OptimizeLyricOptions>,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置当前播放歌词,要注意传入后这个数组内的信息不得修改,否则会发生错误\n\t */\n\tlyricLines: {\n\t\ttype: Object as PropType<LyricLine[]>,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置当前播放进度,单位为毫秒且**必须是整数**,此时将会更新内部的歌词进度信息\n\t * 内部会根据调用间隔和播放进度自动决定如何滚动和显示歌词,所以这个的调用频率越快越准确越好\n\t */\n\tcurrentTime: {\n\t\ttype: Number,\n\t\tdefault: 0,\n\t},\n\t/**\n\t * 设置文字动画的渐变宽度,单位以歌词行的主文字字体大小的倍数为单位,默认为 0.5,即一个全角字符的一半宽度\n\t *\n\t * 如果要模拟 Apple Music for Android 的效果,可以设置为 1\n\t *\n\t * 如果要模拟 Apple Music for iPad 的效果,可以设置为 0.5\n\t *\n\t * 如果想要近乎禁用渐变效果,可以设置成非常接近 0 的小数(例如 `0.0001` ),但是**不可以为 0**\n\t */\n\twordFadeWidth: {\n\t\ttype: Number,\n\t\tdefault: 0.5,\n\t},\n\t/**\n\t * 设置所有歌词行在横坐标上的弹簧属性,包括重量、弹力和阻力。\n\t *\n\t * @param params 需要设置的弹簧属性,提供的属性将会覆盖原来的属性,未提供的属性将会保持原样\n\t */\n\tlinePosXSpringParams: {\n\t\ttype: Object as PropType<Partial<spring.SpringParams>>,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置所有歌词行在纵坐标上的弹簧属性,包括重量、弹力和阻力。\n\t *\n\t * @param params 需要设置的弹簧属性,提供的属性将会覆盖原来的属性,未提供的属性将会保持原样\n\t */\n\tlinePosYSpringParams: {\n\t\ttype: Object as PropType<Partial<spring.SpringParams>>,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置所有歌词行在缩放大小上的弹簧属性,包括重量、弹力和阻力。\n\t *\n\t * @param params 需要设置的弹簧属性,提供的属性将会覆盖原来的属性,未提供的属性将会保持原样\n\t */\n\tlineScaleSpringParams: {\n\t\ttype: Object as PropType<Partial<spring.SpringParams>>,\n\t\trequired: false,\n\t},\n\t/**\n\t * 设置渲染器,如果为 `undefined` 则默认为 `MeshGradientRenderer`\n\t * 默认渲染器有可能会随着版本更新而更换\n\t */\n\tlyricPlayer: {\n\t\ttype: Object as PropType<{\n\t\t\tnew (...args: ConstructorParameters<typeof BaseRenderer>): BaseRenderer;\n\t\t}>,\n\t\trequired: false,\n\t},\n} as const;\n\n/**\n * 歌词播放组件的属性\n */\nexport type LyricPlayerProps = ExtractPublicPropTypes<typeof lyricPlayerProps>;\n\nconst lyricPlayerEmits = {\n\tlineClick: (_: LyricLineMouseEvent) => true,\n\tlineContextmenu: (_: LyricLineMouseEvent) => true,\n} as const;\n\n/**\n * 歌词播放组件的事件\n */\nexport type LyricPlayerEmits = typeof lyricPlayerEmits;\n\n/**\n * 歌词播放组件的引用\n */\nexport interface LyricPlayerRef {\n\t/**\n\t * 歌词播放实例\n\t */\n\tlyricPlayer: Ref<LyricPlayerBase | undefined>;\n\t/**\n\t * 将歌词播放实例的元素包裹起来的 DIV 元素实例\n\t */\n\twrapperEl: Readonly<ShallowRef<HTMLDivElement | null>>;\n}\n\nexport const LyricPlayer = defineComponent({\n\tname: \"LyricPlayer\",\n\tprops: lyricPlayerProps,\n\temits: lyricPlayerEmits,\n\tslots: Object as SlotsType<{\n\t\t\"bottom-line\": () => void;\n\t}>,\n\tsetup(props, { expose, emit, attrs, slots }) {\n\t\tconst wrapperRef = useTemplateRef<HTMLDivElement>(\"wrapper-ref\");\n\t\tconst playerRef = ref<CoreLyricPlayer>();\n\n\t\tconst lineClickHandler = (e: Event) =>\n\t\t\temit(\"lineClick\", e as LyricLineMouseEvent);\n\t\tconst lineContextMenuHandler = (e: Event) =>\n\t\t\temit(\"lineContextmenu\", e as LyricLineMouseEvent);\n\n\t\tonMounted(() => {\n\t\t\tconst wrapper = wrapperRef.value;\n\t\t\tif (wrapper) {\n\t\t\t\tplayerRef.value = new CoreLyricPlayer();\n\t\t\t\twrapper.appendChild(playerRef.value.getElement());\n\t\t\t\tplayerRef.value.addEventListener(\"line-click\", lineClickHandler);\n\t\t\t\tplayerRef.value.addEventListener(\n\t\t\t\t\t\"line-contextmenu\",\n\t\t\t\t\tlineContextMenuHandler,\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\n\t\tonUnmounted(() => {\n\t\t\tif (playerRef.value) {\n\t\t\t\tplayerRef.value.removeEventListener(\"line-click\", lineClickHandler);\n\t\t\t\tplayerRef.value.removeEventListener(\n\t\t\t\t\t\"line-contextmenu\",\n\t\t\t\t\tlineContextMenuHandler,\n\t\t\t\t);\n\t\t\t\tplayerRef.value.dispose();\n\t\t\t}\n\t\t});\n\n\t\twatchEffect((onCleanup) => {\n\t\t\tif (!props.disabled) {\n\t\t\t\tlet canceled = false;\n\t\t\t\tlet lastTime = -1;\n\t\t\t\tconst onFrame = (time: number) => {\n\t\t\t\t\tif (canceled) return;\n\t\t\t\t\tif (lastTime === -1) {\n\t\t\t\t\t\tlastTime = time;\n\t\t\t\t\t}\n\t\t\t\t\tplayerRef.value?.update(time - lastTime);\n\t\t\t\t\tlastTime = time;\n\t\t\t\t\trequestAnimationFrame(onFrame);\n\t\t\t\t};\n\t\t\t\trequestAnimationFrame(onFrame);\n\t\t\t\tonCleanup(() => {\n\t\t\t\t\tcanceled = true;\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.playing !== undefined) {\n\t\t\t\tif (props.playing) {\n\t\t\t\t\tplayerRef.value?.resume();\n\t\t\t\t} else {\n\t\t\t\t\tplayerRef.value?.pause();\n\t\t\t\t}\n\t\t\t} else playerRef.value?.resume();\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.alignAnchor !== undefined)\n\t\t\t\tplayerRef.value?.setAlignAnchor(props.alignAnchor);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.hidePassedLines !== undefined)\n\t\t\t\tplayerRef.value?.setHidePassedLines(props.hidePassedLines);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.maskObsceneWordsMode !== undefined)\n\t\t\t\tplayerRef.value?.setMaskObsceneWords(props.maskObsceneWordsMode);\n\t\t\telse playerRef.value?.setMaskObsceneWords(MaskObsceneWordsMode.Disabled);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.alignPosition !== undefined)\n\t\t\t\tplayerRef.value?.setAlignPosition(props.alignPosition);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.enableSpring !== undefined)\n\t\t\t\tplayerRef.value?.setEnableSpring(props.enableSpring);\n\t\t\telse playerRef.value?.setEnableSpring(true);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.enableBlur !== undefined)\n\t\t\t\tplayerRef.value?.setEnableBlur(props.enableBlur);\n\t\t\telse playerRef.value?.setEnableBlur(true);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.enableScale !== undefined)\n\t\t\t\tplayerRef.value?.setEnableScale(props.enableScale);\n\t\t\telse playerRef.value?.setEnableScale(true);\n\t\t});\n\n\t\twatch(\n\t\t\t[playerRef, () => props.lyricLines, () => props.optimizeOptions],\n\t\t\t([player, lyricLines, optimizeOptions]) => {\n\t\t\t\tif (!player) return;\n\n\t\t\t\tif (optimizeOptions !== undefined) {\n\t\t\t\t\tplayer.setOptimizeOptions(optimizeOptions);\n\t\t\t\t}\n\n\t\t\t\tif (lyricLines !== undefined) {\n\t\t\t\t\tplayer.setLyricLines(lyricLines);\n\t\t\t\t} else {\n\t\t\t\t\tplayer.setLyricLines([]);\n\t\t\t\t}\n\n\t\t\t\tif (props.currentTime !== undefined) {\n\t\t\t\t\tplayer.setCurrentTime(props.currentTime, true);\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ immediate: true },\n\t\t);\n\n\t\twatchEffect(() => {\n\t\t\tif (props.currentTime !== undefined)\n\t\t\t\tplayerRef.value?.setCurrentTime(props.currentTime);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.wordFadeWidth !== undefined)\n\t\t\t\tplayerRef.value?.setWordFadeWidth(props.wordFadeWidth);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.linePosXSpringParams !== undefined)\n\t\t\t\tplayerRef.value?.setLinePosXSpringParams(props.linePosXSpringParams);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.linePosYSpringParams !== undefined)\n\t\t\t\tplayerRef.value?.setLinePosYSpringParams(props.linePosYSpringParams);\n\t\t});\n\n\t\twatchEffect(() => {\n\t\t\tif (props.lineScaleSpringParams !== undefined)\n\t\t\t\tplayerRef.value?.setLineScaleSpringParams(props.lineScaleSpringParams);\n\t\t});\n\n\t\tconst bottomLineEl = computed(() =>\n\t\t\tplayerRef.value?.getBottomLineElement(),\n\t\t);\n\n\t\texpose<LyricPlayerRef>({\n\t\t\tlyricPlayer: playerRef,\n\t\t\twrapperEl: wrapperRef,\n\t\t});\n\n\t\treturn () => (\n\t\t\t<div ref=\"wrapper-ref\" {...attrs}>\n\t\t\t\t{bottomLineEl.value && (\n\t\t\t\t\t<Teleport to={bottomLineEl.value}>\n\t\t\t\t\t\t{slots[\"bottom-line\"]?.()}\n\t\t\t\t\t</Teleport>\n\t\t\t\t)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