@applemusic-like-lyrics/react-full 0.4.1 → 0.5.0
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 +2 -0
- package/dist/amll-react-framework.cjs +366 -269
- package/dist/amll-react-framework.cjs.map +1 -1
- package/dist/amll-react-framework.d.cts +281 -254
- package/dist/amll-react-framework.d.mts +281 -255
- package/dist/amll-react-framework.mjs +315 -225
- package/dist/amll-react-framework.mjs.map +1 -1
- package/dist/style.css +62 -60
- package/package.json +13 -13
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
}
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
20
20
|
value: mod,
|
|
21
21
|
enumerable: true
|
|
22
22
|
}) : target, mod));
|
|
@@ -24,16 +24,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
let react_compiler_runtime = require("react/compiler-runtime");
|
|
26
26
|
let react = require("react");
|
|
27
|
+
let react$1 = __toESM(react, 1);
|
|
27
28
|
react = __toESM(react);
|
|
28
29
|
let classnames = require("classnames");
|
|
29
|
-
classnames = __toESM(classnames);
|
|
30
|
+
classnames = __toESM(classnames, 1);
|
|
30
31
|
let framer_motion = require("framer-motion");
|
|
31
32
|
let corner_smoothing = require("corner-smoothing");
|
|
33
|
+
let _applemusic_like_lyrics_core = require("@applemusic-like-lyrics/core");
|
|
32
34
|
let _applemusic_like_lyrics_react = require("@applemusic-like-lyrics/react");
|
|
33
35
|
let _ungap_structured_clone = require("@ungap/structured-clone");
|
|
34
|
-
_ungap_structured_clone = __toESM(_ungap_structured_clone);
|
|
36
|
+
_ungap_structured_clone = __toESM(_ungap_structured_clone, 1);
|
|
35
37
|
let jotai = require("jotai");
|
|
36
|
-
let _applemusic_like_lyrics_core = require("@applemusic-like-lyrics/core");
|
|
37
38
|
let jotai_utils = require("jotai/utils");
|
|
38
39
|
//#region src/components/AudioFFTVisualizer/index.tsx
|
|
39
40
|
globalThis.jotaiAtomCache = globalThis.jotaiAtomCache || {
|
|
@@ -57,8 +58,8 @@ const AudioFFTVisualizer = (t0) => {
|
|
|
57
58
|
fftData = $[1];
|
|
58
59
|
props = $[2];
|
|
59
60
|
}
|
|
60
|
-
const canvasRef = (0, react.useRef)(null);
|
|
61
|
-
const fftDataRef = (0, react.useRef)(void 0);
|
|
61
|
+
const canvasRef = (0, react$1.useRef)(null);
|
|
62
|
+
const fftDataRef = (0, react$1.useRef)(void 0);
|
|
62
63
|
if (fftDataRef.current === void 0) fftDataRef.current = fftData;
|
|
63
64
|
let t1;
|
|
64
65
|
let t2;
|
|
@@ -74,7 +75,7 @@ const AudioFFTVisualizer = (t0) => {
|
|
|
74
75
|
t1 = $[4];
|
|
75
76
|
t2 = $[5];
|
|
76
77
|
}
|
|
77
|
-
(0, react.useEffect)(t1, t2);
|
|
78
|
+
(0, react$1.useEffect)(t1, t2);
|
|
78
79
|
let t3;
|
|
79
80
|
let t4;
|
|
80
81
|
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -168,7 +169,7 @@ const AudioFFTVisualizer = (t0) => {
|
|
|
168
169
|
t3 = $[6];
|
|
169
170
|
t4 = $[7];
|
|
170
171
|
}
|
|
171
|
-
(0, react.useLayoutEffect)(t3, t4);
|
|
172
|
+
(0, react$1.useLayoutEffect)(t3, t4);
|
|
172
173
|
let t5;
|
|
173
174
|
if ($[8] !== props) {
|
|
174
175
|
t5 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("canvas", {
|
|
@@ -294,7 +295,7 @@ const DOLBY_VARIENTS = {
|
|
|
294
295
|
hover: { scale: .95 },
|
|
295
296
|
active: { scale: .9 }
|
|
296
297
|
};
|
|
297
|
-
const AudioQualityTag = (0, react.memo)((0, react.forwardRef)((t0, ref) => {
|
|
298
|
+
const AudioQualityTag = (0, react$1.memo)((0, react$1.forwardRef)((t0, ref) => {
|
|
298
299
|
const $ = (0, react_compiler_runtime.c)(21);
|
|
299
300
|
let className;
|
|
300
301
|
let isDolbyAtmos;
|
|
@@ -394,13 +395,13 @@ globalThis.jotaiAtomCache = globalThis.jotaiAtomCache || {
|
|
|
394
395
|
return inst;
|
|
395
396
|
}
|
|
396
397
|
};
|
|
397
|
-
const INITIAL_INSET =
|
|
398
|
+
const INITIAL_INSET = 6;
|
|
398
399
|
const MAX_BOUNCE_DISTANCE = 12;
|
|
399
400
|
const BouncingSlider = ({ className, style, value, min, max, isPlaying = false, onChange, onAfterChange, onBeforeChange, onSeeking, beforeIcon, afterIcon, changeOnDrag = false }) => {
|
|
400
|
-
const containerRef = (0, react.useRef)(null);
|
|
401
|
-
const innerRef = (0, react.useRef)(null);
|
|
402
|
-
const rectRef = (0, react.useRef)(null);
|
|
403
|
-
const isHoveringRef = (0, react.useRef)(false);
|
|
401
|
+
const containerRef = (0, react$1.useRef)(null);
|
|
402
|
+
const innerRef = (0, react$1.useRef)(null);
|
|
403
|
+
const rectRef = (0, react$1.useRef)(null);
|
|
404
|
+
const isHoveringRef = (0, react$1.useRef)(false);
|
|
404
405
|
const progressMv = (0, framer_motion.useMotionValue)(0);
|
|
405
406
|
const scaleX = (0, framer_motion.useTransform)(progressMv, [0, 1], [0, 1]);
|
|
406
407
|
const insetMv = (0, framer_motion.useMotionValue)(INITIAL_INSET);
|
|
@@ -409,9 +410,9 @@ const BouncingSlider = ({ className, style, value, min, max, isPlaying = false,
|
|
|
409
410
|
damping: 12,
|
|
410
411
|
stiffness: 300
|
|
411
412
|
});
|
|
412
|
-
const isDraggingRef = (0, react.useRef)(false);
|
|
413
|
-
const localTimeRef = (0, react.useRef)(value);
|
|
414
|
-
(0, react.useEffect)(() => {
|
|
413
|
+
const isDraggingRef = (0, react$1.useRef)(false);
|
|
414
|
+
const localTimeRef = (0, react$1.useRef)(value);
|
|
415
|
+
(0, react$1.useEffect)(() => {
|
|
415
416
|
if (isDraggingRef.current) return;
|
|
416
417
|
localTimeRef.current = value;
|
|
417
418
|
const newProgress = Math.max(0, Math.min(1, (value - min) / (max - min)));
|
|
@@ -553,8 +554,8 @@ const ControlThumb = (t0) => {
|
|
|
553
554
|
onClick = $[2];
|
|
554
555
|
rest = $[3];
|
|
555
556
|
}
|
|
556
|
-
const containerRef = (0, react.useRef)(null);
|
|
557
|
-
const hoveringRef = (0, react.useRef)(false);
|
|
557
|
+
const containerRef = (0, react$1.useRef)(null);
|
|
558
|
+
const hoveringRef = (0, react$1.useRef)(false);
|
|
558
559
|
let t1;
|
|
559
560
|
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
560
561
|
t1 = {
|
|
@@ -563,7 +564,7 @@ const ControlThumb = (t0) => {
|
|
|
563
564
|
};
|
|
564
565
|
$[4] = t1;
|
|
565
566
|
} else t1 = $[4];
|
|
566
|
-
const [thumbOffset, setThumbOffset] = (0, react.useState)(t1);
|
|
567
|
+
const [thumbOffset, setThumbOffset] = (0, react$1.useState)(t1);
|
|
567
568
|
let t2;
|
|
568
569
|
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
569
570
|
t2 = (e) => {
|
|
@@ -760,8 +761,8 @@ globalThis.jotaiAtomCache = globalThis.jotaiAtomCache || {
|
|
|
760
761
|
/**
|
|
761
762
|
* 一个专辑图组件
|
|
762
763
|
*/
|
|
763
|
-
const Cover = (0, react.forwardRef)((t0, ref) => {
|
|
764
|
-
const $ = (0, react_compiler_runtime.c)(
|
|
764
|
+
const Cover = (0, react$1.forwardRef)((t0, ref) => {
|
|
765
|
+
const $ = (0, react_compiler_runtime.c)(36);
|
|
765
766
|
let className;
|
|
766
767
|
let coverIsVideo;
|
|
767
768
|
let coverUrl;
|
|
@@ -788,7 +789,7 @@ const Cover = (0, react.forwardRef)((t0, ref) => {
|
|
|
788
789
|
pauseShrinkAspect = $[6];
|
|
789
790
|
rest = $[7];
|
|
790
791
|
}
|
|
791
|
-
const frameRef = (0, react.useRef)(null);
|
|
792
|
+
const frameRef = (0, react$1.useRef)(null);
|
|
792
793
|
const t1 = musicPaused && index_module_default$7.musicPaused;
|
|
793
794
|
let t2;
|
|
794
795
|
if ($[8] !== className || $[9] !== t1) {
|
|
@@ -798,14 +799,16 @@ const Cover = (0, react.forwardRef)((t0, ref) => {
|
|
|
798
799
|
$[10] = t2;
|
|
799
800
|
} else t2 = $[10];
|
|
800
801
|
const clsNames = t2;
|
|
801
|
-
const videoRef = (0, react.useRef)(null);
|
|
802
|
+
const videoRef = (0, react$1.useRef)(null);
|
|
802
803
|
let t3;
|
|
803
804
|
let t4;
|
|
804
805
|
if ($[11] !== coverVideoPaused) {
|
|
805
806
|
t3 = () => {
|
|
806
807
|
const videoEl = videoRef.current;
|
|
807
|
-
if (videoEl)
|
|
808
|
-
|
|
808
|
+
if (videoEl) {
|
|
809
|
+
if (coverVideoPaused) videoEl.pause();
|
|
810
|
+
else videoEl.play();
|
|
811
|
+
}
|
|
809
812
|
};
|
|
810
813
|
t4 = [coverVideoPaused];
|
|
811
814
|
$[11] = coverVideoPaused;
|
|
@@ -815,8 +818,8 @@ const Cover = (0, react.forwardRef)((t0, ref) => {
|
|
|
815
818
|
t3 = $[12];
|
|
816
819
|
t4 = $[13];
|
|
817
820
|
}
|
|
818
|
-
(0, react.useEffect)(t3, t4);
|
|
819
|
-
const [cornerRadius, setCornerRadius] = (0, react.useState)(20);
|
|
821
|
+
(0, react$1.useEffect)(t3, t4);
|
|
822
|
+
const [cornerRadius, setCornerRadius] = (0, react$1.useState)(20);
|
|
820
823
|
let t5;
|
|
821
824
|
let t6;
|
|
822
825
|
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -842,35 +845,42 @@ const Cover = (0, react.forwardRef)((t0, ref) => {
|
|
|
842
845
|
t5 = $[14];
|
|
843
846
|
t6 = $[15];
|
|
844
847
|
}
|
|
845
|
-
(0, react.useLayoutEffect)(t5, t6);
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
$[
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
const
|
|
854
|
-
let
|
|
855
|
-
if ($[18] !==
|
|
856
|
-
|
|
848
|
+
(0, react$1.useLayoutEffect)(t5, t6);
|
|
849
|
+
let t7;
|
|
850
|
+
if ($[16] !== coverUrl) {
|
|
851
|
+
t7 = coverUrl?.startsWith("http://") || coverUrl?.startsWith("https://");
|
|
852
|
+
$[16] = coverUrl;
|
|
853
|
+
$[17] = t7;
|
|
854
|
+
} else t7 = $[17];
|
|
855
|
+
const isRemoteUrl = t7;
|
|
856
|
+
const t8 = pauseShrinkAspect ?? .75;
|
|
857
|
+
let t9;
|
|
858
|
+
if ($[18] !== t8) {
|
|
859
|
+
t9 = { "--scale-level": t8 };
|
|
860
|
+
$[18] = t8;
|
|
861
|
+
$[19] = t9;
|
|
862
|
+
} else t9 = $[19];
|
|
863
|
+
const t10 = t9;
|
|
864
|
+
let t11;
|
|
865
|
+
if ($[20] !== ref) {
|
|
866
|
+
t11 = (node) => {
|
|
857
867
|
frameRef.current = node;
|
|
858
868
|
if (typeof ref === "function") ref(node);
|
|
859
869
|
else if (ref) ref.current = node;
|
|
860
870
|
};
|
|
861
|
-
$[
|
|
862
|
-
$[
|
|
863
|
-
} else
|
|
864
|
-
let
|
|
865
|
-
if ($[
|
|
866
|
-
|
|
871
|
+
$[20] = ref;
|
|
872
|
+
$[21] = t11;
|
|
873
|
+
} else t11 = $[21];
|
|
874
|
+
let t12;
|
|
875
|
+
if ($[22] !== coverIsVideo || $[23] !== coverUrl || $[24] !== isRemoteUrl || $[25] !== pauseShrinkAspect) {
|
|
876
|
+
t12 = coverIsVideo ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("video", {
|
|
867
877
|
className: index_module_default$7.coverInner,
|
|
868
878
|
src: coverUrl,
|
|
869
879
|
autoPlay: true,
|
|
870
880
|
loop: true,
|
|
871
881
|
muted: true,
|
|
872
882
|
playsInline: true,
|
|
873
|
-
crossOrigin: "anonymous",
|
|
883
|
+
crossOrigin: isRemoteUrl ? "anonymous" : void 0,
|
|
874
884
|
ref: videoRef
|
|
875
885
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
876
886
|
className: index_module_default$7.coverInner,
|
|
@@ -879,40 +889,41 @@ const Cover = (0, react.forwardRef)((t0, ref) => {
|
|
|
879
889
|
"--scale-level": pauseShrinkAspect ?? .75
|
|
880
890
|
}
|
|
881
891
|
});
|
|
882
|
-
$[
|
|
883
|
-
$[
|
|
884
|
-
$[
|
|
885
|
-
$[
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
892
|
+
$[22] = coverIsVideo;
|
|
893
|
+
$[23] = coverUrl;
|
|
894
|
+
$[24] = isRemoteUrl;
|
|
895
|
+
$[25] = pauseShrinkAspect;
|
|
896
|
+
$[26] = t12;
|
|
897
|
+
} else t12 = $[26];
|
|
898
|
+
let t13;
|
|
899
|
+
if ($[27] !== cornerRadius || $[28] !== t12) {
|
|
900
|
+
t13 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(corner_smoothing.Squircle, {
|
|
890
901
|
cornerRadius,
|
|
891
902
|
cornerSmoothing: .7,
|
|
892
903
|
className: index_module_default$7.coverInner,
|
|
893
|
-
children:
|
|
904
|
+
children: t12
|
|
894
905
|
});
|
|
895
|
-
$[
|
|
896
|
-
$[
|
|
897
|
-
$[
|
|
898
|
-
} else
|
|
899
|
-
let
|
|
900
|
-
if ($[
|
|
901
|
-
|
|
906
|
+
$[27] = cornerRadius;
|
|
907
|
+
$[28] = t12;
|
|
908
|
+
$[29] = t13;
|
|
909
|
+
} else t13 = $[29];
|
|
910
|
+
let t14;
|
|
911
|
+
if ($[30] !== clsNames || $[31] !== rest || $[32] !== t10 || $[33] !== t11 || $[34] !== t13) {
|
|
912
|
+
t14 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
902
913
|
className: clsNames,
|
|
903
|
-
style:
|
|
904
|
-
ref:
|
|
914
|
+
style: t10,
|
|
915
|
+
ref: t11,
|
|
905
916
|
...rest,
|
|
906
|
-
children:
|
|
917
|
+
children: t13
|
|
907
918
|
});
|
|
908
|
-
$[
|
|
909
|
-
$[
|
|
910
|
-
$[
|
|
911
|
-
$[
|
|
912
|
-
$[
|
|
913
|
-
$[
|
|
914
|
-
} else
|
|
915
|
-
return
|
|
919
|
+
$[30] = clsNames;
|
|
920
|
+
$[31] = rest;
|
|
921
|
+
$[32] = t10;
|
|
922
|
+
$[33] = t11;
|
|
923
|
+
$[34] = t13;
|
|
924
|
+
$[35] = t14;
|
|
925
|
+
} else t14 = $[35];
|
|
926
|
+
return t14;
|
|
916
927
|
});
|
|
917
928
|
//#endregion
|
|
918
929
|
//#region src/components/MediaButton/index.module.css
|
|
@@ -931,7 +942,7 @@ globalThis.jotaiAtomCache = globalThis.jotaiAtomCache || {
|
|
|
931
942
|
return inst;
|
|
932
943
|
}
|
|
933
944
|
};
|
|
934
|
-
const MediaButton = (0, react.memo)((t0) => {
|
|
945
|
+
const MediaButton = (0, react$1.memo)((t0) => {
|
|
935
946
|
const $ = (0, react_compiler_runtime.c)(21);
|
|
936
947
|
let children;
|
|
937
948
|
let className;
|
|
@@ -957,7 +968,7 @@ const MediaButton = (0, react.memo)((t0) => {
|
|
|
957
968
|
t1 = $[6];
|
|
958
969
|
}
|
|
959
970
|
const type = t1 === void 0 ? "button" : t1;
|
|
960
|
-
const [isAnimating, setIsAnimating] = (0, react.useState)(false);
|
|
971
|
+
const [isAnimating, setIsAnimating] = (0, react$1.useState)(false);
|
|
961
972
|
let t2;
|
|
962
973
|
if ($[7] !== onClick) {
|
|
963
974
|
t2 = (e) => {
|
|
@@ -1036,7 +1047,7 @@ globalThis.jotaiAtomCache = globalThis.jotaiAtomCache || {
|
|
|
1036
1047
|
return inst;
|
|
1037
1048
|
}
|
|
1038
1049
|
};
|
|
1039
|
-
const MenuButton = (0, react.memo)((t0) => {
|
|
1050
|
+
const MenuButton = (0, react$1.memo)((t0) => {
|
|
1040
1051
|
const $ = (0, react_compiler_runtime.c)(9);
|
|
1041
1052
|
let className;
|
|
1042
1053
|
let rest;
|
|
@@ -1092,7 +1103,7 @@ globalThis.jotaiAtomCache = globalThis.jotaiAtomCache || {
|
|
|
1092
1103
|
return inst;
|
|
1093
1104
|
}
|
|
1094
1105
|
};
|
|
1095
|
-
const TextMarquee = (0, react.memo)((t0) => {
|
|
1106
|
+
const TextMarquee = (0, react$1.memo)((t0) => {
|
|
1096
1107
|
const $ = (0, react_compiler_runtime.c)(15);
|
|
1097
1108
|
let children;
|
|
1098
1109
|
let className;
|
|
@@ -1108,14 +1119,14 @@ const TextMarquee = (0, react.memo)((t0) => {
|
|
|
1108
1119
|
className = $[2];
|
|
1109
1120
|
rest = $[3];
|
|
1110
1121
|
}
|
|
1111
|
-
const outerDiv = (0, react.useRef)(null);
|
|
1112
|
-
const innerDiv = (0, react.useRef)(null);
|
|
1122
|
+
const outerDiv = (0, react$1.useRef)(null);
|
|
1123
|
+
const innerDiv = (0, react$1.useRef)(null);
|
|
1113
1124
|
let t1;
|
|
1114
1125
|
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1115
1126
|
t1 = /* @__PURE__ */ new Set();
|
|
1116
1127
|
$[4] = t1;
|
|
1117
1128
|
} else t1 = $[4];
|
|
1118
|
-
const currentAnimationsRef = (0, react.useRef)(t1);
|
|
1129
|
+
const currentAnimationsRef = (0, react$1.useRef)(t1);
|
|
1119
1130
|
let t2;
|
|
1120
1131
|
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1121
1132
|
t2 = () => {
|
|
@@ -1201,7 +1212,7 @@ globalThis.jotaiAtomCache = globalThis.jotaiAtomCache || {
|
|
|
1201
1212
|
return inst;
|
|
1202
1213
|
}
|
|
1203
1214
|
};
|
|
1204
|
-
const MusicInfo = (0, react.memo)((t0) => {
|
|
1215
|
+
const MusicInfo = (0, react$1.memo)((t0) => {
|
|
1205
1216
|
const $ = (0, react_compiler_runtime.c)(26);
|
|
1206
1217
|
let album;
|
|
1207
1218
|
let artists;
|
|
@@ -1499,20 +1510,24 @@ globalThis.jotaiAtomCache = globalThis.jotaiAtomCache || {
|
|
|
1499
1510
|
}
|
|
1500
1511
|
};
|
|
1501
1512
|
const VerticalLayout = ({ thumbSlot, coverSlot, smallControlsSlot, bigControlsSlot, lyricSlot, hideLyric, asChild, className, immerseCover, ...rest }) => {
|
|
1502
|
-
const rootRef = (0, react.useRef)(null);
|
|
1503
|
-
const phonyBigCoverRef = (0, react.useRef)(null);
|
|
1504
|
-
const phonySmallCoverRef = (0, react.useRef)(null);
|
|
1505
|
-
const coverFrameRef = (0, react.useRef)(null);
|
|
1506
|
-
const hideLyricRef = (0, react.useRef)(hideLyric ?? false);
|
|
1507
|
-
const immerseCoverRef = (0, react.useRef)(immerseCover ?? false);
|
|
1508
|
-
const [currentCoverStyle, setCurrentCoverStyle] = (0, react.useState)(void 0);
|
|
1509
|
-
const calcCoverLayout = (0, react.useCallback)((hideLyric_0 = hideLyricRef.current) => {
|
|
1513
|
+
const rootRef = (0, react$1.useRef)(null);
|
|
1514
|
+
const phonyBigCoverRef = (0, react$1.useRef)(null);
|
|
1515
|
+
const phonySmallCoverRef = (0, react$1.useRef)(null);
|
|
1516
|
+
const coverFrameRef = (0, react$1.useRef)(null);
|
|
1517
|
+
const hideLyricRef = (0, react$1.useRef)(hideLyric ?? false);
|
|
1518
|
+
const immerseCoverRef = (0, react$1.useRef)(immerseCover ?? false);
|
|
1519
|
+
const [currentCoverStyle, setCurrentCoverStyle] = (0, react$1.useState)(void 0);
|
|
1520
|
+
const calcCoverLayout = (0, react$1.useCallback)((hideLyric_0 = hideLyricRef.current) => {
|
|
1510
1521
|
if (!rootRef.current) return;
|
|
1511
1522
|
let rootEl = rootRef.current;
|
|
1512
1523
|
const targetCover = hideLyric_0 ? phonyBigCoverRef.current : phonySmallCoverRef.current;
|
|
1513
1524
|
if (!targetCover || !rootEl) return;
|
|
1514
1525
|
const immerseCover_0 = immerseCoverRef.current;
|
|
1515
|
-
while (getComputedStyle(rootEl).display === "contents")
|
|
1526
|
+
while (getComputedStyle(rootEl).display === "contents") {
|
|
1527
|
+
const parentEl = rootEl.parentElement;
|
|
1528
|
+
if (!parentEl) return;
|
|
1529
|
+
rootEl = parentEl;
|
|
1530
|
+
}
|
|
1516
1531
|
const rootB = rootEl.getBoundingClientRect();
|
|
1517
1532
|
const targetCoverB = targetCover.getBoundingClientRect();
|
|
1518
1533
|
if (immerseCover_0) {
|
|
@@ -1533,7 +1548,7 @@ const VerticalLayout = ({ thumbSlot, coverSlot, smallControlsSlot, bigControlsSl
|
|
|
1533
1548
|
top: targetCoverB.y - rootB.y + (targetCoverB.height - targetCoverSize_0) / 2
|
|
1534
1549
|
};
|
|
1535
1550
|
}, []);
|
|
1536
|
-
(0, react.useLayoutEffect)(() => {
|
|
1551
|
+
(0, react$1.useLayoutEffect)(() => {
|
|
1537
1552
|
hideLyricRef.current = hideLyric ?? false;
|
|
1538
1553
|
immerseCoverRef.current = immerseCover ?? false;
|
|
1539
1554
|
setCurrentCoverStyle(calcCoverLayout(hideLyricRef.current));
|
|
@@ -1542,7 +1557,7 @@ const VerticalLayout = ({ thumbSlot, coverSlot, smallControlsSlot, bigControlsSl
|
|
|
1542
1557
|
immerseCover,
|
|
1543
1558
|
calcCoverLayout
|
|
1544
1559
|
]);
|
|
1545
|
-
(0, react.useLayoutEffect)(() => {
|
|
1560
|
+
(0, react$1.useLayoutEffect)(() => {
|
|
1546
1561
|
const phonyBigCoverEl = phonyBigCoverRef.current;
|
|
1547
1562
|
const phonySmallCoverEl = phonySmallCoverRef.current;
|
|
1548
1563
|
if (!phonyBigCoverEl || !phonySmallCoverEl) return;
|
|
@@ -1551,7 +1566,8 @@ const VerticalLayout = ({ thumbSlot, coverSlot, smallControlsSlot, bigControlsSl
|
|
|
1551
1566
|
});
|
|
1552
1567
|
obz.observe(phonyBigCoverEl);
|
|
1553
1568
|
obz.observe(phonySmallCoverEl);
|
|
1554
|
-
|
|
1569
|
+
const init = calcCoverLayout(hideLyricRef.current);
|
|
1570
|
+
setCurrentCoverStyle(init);
|
|
1555
1571
|
return () => {
|
|
1556
1572
|
obz.disconnect();
|
|
1557
1573
|
};
|
|
@@ -1666,8 +1682,8 @@ const AutoLyricLayout = (t0) => {
|
|
|
1666
1682
|
thumbSlot = $[12];
|
|
1667
1683
|
verticalImmerseCover = $[13];
|
|
1668
1684
|
}
|
|
1669
|
-
const [isVertical, setIsVertical] = (0, react.useState)(false);
|
|
1670
|
-
const rootRef = (0, react.useRef)(null);
|
|
1685
|
+
const [isVertical, setIsVertical] = (0, react$1.useState)(false);
|
|
1686
|
+
const rootRef = (0, react$1.useRef)(null);
|
|
1671
1687
|
let t1;
|
|
1672
1688
|
if ($[14] !== onElementMounted) {
|
|
1673
1689
|
t1 = (node) => {
|
|
@@ -1699,7 +1715,7 @@ const AutoLyricLayout = (t0) => {
|
|
|
1699
1715
|
t2 = $[16];
|
|
1700
1716
|
t3 = $[17];
|
|
1701
1717
|
}
|
|
1702
|
-
(0, react.useLayoutEffect)(t2, t3);
|
|
1718
|
+
(0, react$1.useLayoutEffect)(t2, t3);
|
|
1703
1719
|
let t4;
|
|
1704
1720
|
let t5;
|
|
1705
1721
|
if ($[18] !== isVertical || $[19] !== onLayoutChange) {
|
|
@@ -1715,7 +1731,7 @@ const AutoLyricLayout = (t0) => {
|
|
|
1715
1731
|
t4 = $[20];
|
|
1716
1732
|
t5 = $[21];
|
|
1717
1733
|
}
|
|
1718
|
-
(0, react.useLayoutEffect)(t4, t5);
|
|
1734
|
+
(0, react$1.useLayoutEffect)(t4, t5);
|
|
1719
1735
|
let t6;
|
|
1720
1736
|
if ($[22] !== backgroundSlot) {
|
|
1721
1737
|
t6 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -2007,7 +2023,7 @@ globalThis.jotaiAtomCache = globalThis.jotaiAtomCache || {
|
|
|
2007
2023
|
return inst;
|
|
2008
2024
|
}
|
|
2009
2025
|
};
|
|
2010
|
-
const ToggleIconButton = (0, react.memo)((t0) => {
|
|
2026
|
+
const ToggleIconButton = (0, react$1.memo)((t0) => {
|
|
2011
2027
|
const $ = (0, react_compiler_runtime.c)(12);
|
|
2012
2028
|
let checked;
|
|
2013
2029
|
let checkedIcon;
|
|
@@ -2059,7 +2075,7 @@ const PREBUILT_ICONS_MAP = {
|
|
|
2059
2075
|
["star"]: [ForwardRef$12, ForwardRef$11],
|
|
2060
2076
|
["airplay"]: [ForwardRef$21, ForwardRef$21]
|
|
2061
2077
|
};
|
|
2062
|
-
const PrebuiltToggleIconButton = (0, react.memo)((t0) => {
|
|
2078
|
+
const PrebuiltToggleIconButton = (0, react$1.memo)((t0) => {
|
|
2063
2079
|
const $ = (0, react_compiler_runtime.c)(15);
|
|
2064
2080
|
let checked;
|
|
2065
2081
|
let onClick;
|
|
@@ -2177,9 +2193,9 @@ globalThis.jotaiAtomCache = globalThis.jotaiAtomCache || {
|
|
|
2177
2193
|
};
|
|
2178
2194
|
const VolumeControl = (props) => {
|
|
2179
2195
|
const $ = (0, react_compiler_runtime.c)(9);
|
|
2180
|
-
const lastValueRef = (0, react.useRef)(props.value);
|
|
2181
|
-
const minSpeakerRef = (0, react.useRef)(null);
|
|
2182
|
-
const maxSpeakerRef = (0, react.useRef)(null);
|
|
2196
|
+
const lastValueRef = (0, react$1.useRef)(props.value);
|
|
2197
|
+
const minSpeakerRef = (0, react$1.useRef)(null);
|
|
2198
|
+
const maxSpeakerRef = (0, react$1.useRef)(null);
|
|
2183
2199
|
let t0;
|
|
2184
2200
|
let t1;
|
|
2185
2201
|
if ($[0] !== props.max || $[1] !== props.min || $[2] !== props.value) {
|
|
@@ -2213,7 +2229,7 @@ const VolumeControl = (props) => {
|
|
|
2213
2229
|
t0 = $[3];
|
|
2214
2230
|
t1 = $[4];
|
|
2215
2231
|
}
|
|
2216
|
-
(0, react.useEffect)(t0, t1);
|
|
2232
|
+
(0, react$1.useEffect)(t0, t1);
|
|
2217
2233
|
let t2;
|
|
2218
2234
|
let t3;
|
|
2219
2235
|
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -2702,22 +2718,59 @@ const showVolumeControlAtom = globalThis.jotaiAtomCache.get("/home/runner/work/a
|
|
|
2702
2718
|
showVolumeControlAtom.debugLabel = "showVolumeControlAtom";
|
|
2703
2719
|
const showBottomControlAtom = globalThis.jotaiAtomCache.get("/home/runner/work/applemusic-like-lyrics/applemusic-like-lyrics/packages/react-full/src/states/configAtoms.ts/showBottomControlAtom", (0, jotai_utils.atomWithStorage)("amll-react-full.showBottomControl", true));
|
|
2704
2720
|
showBottomControlAtom.debugLabel = "showBottomControlAtom";
|
|
2705
|
-
const
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2721
|
+
const CSS_BACKGROUND_RENDERER_ID = "css-bg";
|
|
2722
|
+
const DEFAULT_BACKGROUND_RENDERER_ID = "mesh";
|
|
2723
|
+
/**
|
|
2724
|
+
* 所有可选的背景渲染器。
|
|
2725
|
+
*
|
|
2726
|
+
* `"css-bg"` 不在表内,因为它不是渲染器,而是固定的纯色 CSS 背景
|
|
2727
|
+
*/
|
|
2728
|
+
const BACKGROUND_RENDERERS = {
|
|
2729
|
+
mesh: {
|
|
2730
|
+
renderer: _applemusic_like_lyrics_core.MeshGradientRenderer,
|
|
2731
|
+
isSupported: () => _applemusic_like_lyrics_core.MeshGradientRenderer.isSupported()
|
|
2732
|
+
},
|
|
2733
|
+
pixi: {
|
|
2734
|
+
renderer: _applemusic_like_lyrics_core.PixiRenderer,
|
|
2735
|
+
isSupported: () => _applemusic_like_lyrics_core.PixiRenderer.isSupported()
|
|
2736
|
+
},
|
|
2737
|
+
isolation: {
|
|
2738
|
+
renderer: _applemusic_like_lyrics_core.IsolationRenderer,
|
|
2739
|
+
isSupported: () => _applemusic_like_lyrics_core.IsolationRenderer.isSupported()
|
|
2710
2740
|
}
|
|
2711
2741
|
};
|
|
2742
|
+
/** 背景渲染器配置在 localStorage 中的键名。 */
|
|
2743
|
+
const LYRIC_BACKGROUND_RENDERER_STORAGE_KEY = "amll-react-full.lyricBackgroundRenderer";
|
|
2744
|
+
/**
|
|
2745
|
+
* 把字符串标识解析成渲染器
|
|
2746
|
+
*
|
|
2747
|
+
* 如果传入的渲染器标识在当前环境不支持,则会依次回退到 Mesh 渲染器和 CSS 背景
|
|
2748
|
+
*/
|
|
2749
|
+
const resolveBackgroundRenderer = (id) => {
|
|
2750
|
+
if (id === "css-bg") return CSS_BACKGROUND_RENDERER_ID;
|
|
2751
|
+
const entry = BACKGROUND_RENDERERS[id];
|
|
2752
|
+
if (entry?.isSupported()) return entry.renderer;
|
|
2753
|
+
const fallback = BACKGROUND_RENDERERS[DEFAULT_BACKGROUND_RENDERER_ID];
|
|
2754
|
+
if (fallback?.isSupported()) return fallback.renderer;
|
|
2755
|
+
return CSS_BACKGROUND_RENDERER_ID;
|
|
2756
|
+
};
|
|
2757
|
+
const getInitialBackgroundRenderer = () => ({ renderer: resolveBackgroundRenderer(localStorage.getItem("amll-react-full.lyricBackgroundRenderer") ?? "mesh") });
|
|
2712
2758
|
/**
|
|
2713
2759
|
* 配置所使用的歌词背景渲染器
|
|
2714
2760
|
*/
|
|
2715
2761
|
const lyricBackgroundRendererAtom = globalThis.jotaiAtomCache.get("/home/runner/work/applemusic-like-lyrics/applemusic-like-lyrics/packages/react-full/src/states/configAtoms.ts/lyricBackgroundRendererAtom", (0, jotai.atom)(getInitialBackgroundRenderer()));
|
|
2716
2762
|
/**
|
|
2763
|
+
* Isolation 背景渲染器的专属选项
|
|
2764
|
+
*
|
|
2765
|
+
* 仅在背景渲染器为 Isolation 时生效
|
|
2766
|
+
*/
|
|
2767
|
+
lyricBackgroundRendererAtom.debugLabel = "lyricBackgroundRendererAtom";
|
|
2768
|
+
const isolationRendererOptionsAtom = globalThis.jotaiAtomCache.get("/home/runner/work/applemusic-like-lyrics/applemusic-like-lyrics/packages/react-full/src/states/configAtoms.ts/isolationRendererOptionsAtom", (0, jotai_utils.atomWithStorage)("amll-react-full.isolationRendererOptions", { ..._applemusic_like_lyrics_core.IsolationRenderer.defaultOptions }));
|
|
2769
|
+
/**
|
|
2717
2770
|
* 当背景渲染器设置为纯色或CSS背景时,使用此值
|
|
2718
2771
|
* @default "#111111"
|
|
2719
2772
|
*/
|
|
2720
|
-
|
|
2773
|
+
isolationRendererOptionsAtom.debugLabel = "isolationRendererOptionsAtom";
|
|
2721
2774
|
const cssBackgroundPropertyAtom = globalThis.jotaiAtomCache.get("/home/runner/work/applemusic-like-lyrics/applemusic-like-lyrics/packages/react-full/src/states/configAtoms.ts/cssBackgroundPropertyAtom", (0, jotai_utils.atomWithStorage)("amll-player.cssBackgroundProperty", "#111111"));
|
|
2722
2775
|
/**
|
|
2723
2776
|
* 调节背景的最大渲染帧率,较低的值可以提升性能
|
|
@@ -2953,6 +3006,10 @@ var index_module_default = {
|
|
|
2953
3006
|
};
|
|
2954
3007
|
//#endregion
|
|
2955
3008
|
//#region src/components/PrebuiltLyricPlayer/index.tsx
|
|
3009
|
+
/**
|
|
3010
|
+
* @fileoverview
|
|
3011
|
+
* 已经部署好所有组件的歌词播放器组件,在正确设置所有的 Jotai 状态后可以开箱即用
|
|
3012
|
+
*/
|
|
2956
3013
|
globalThis.jotaiAtomCache = globalThis.jotaiAtomCache || {
|
|
2957
3014
|
cache: /* @__PURE__ */ new Map(),
|
|
2958
3015
|
get(name, inst) {
|
|
@@ -3199,7 +3256,7 @@ const TotalDurationLabel = () => {
|
|
|
3199
3256
|
};
|
|
3200
3257
|
const manualSeekTriggerAtom = globalThis.jotaiAtomCache.get("/home/runner/work/applemusic-like-lyrics/applemusic-like-lyrics/packages/react-full/src/components/PrebuiltLyricPlayer/index.tsx/manualSeekTriggerAtom", (0, jotai.atom)(null));
|
|
3201
3258
|
manualSeekTriggerAtom.debugLabel = "manualSeekTriggerAtom";
|
|
3202
|
-
const PrebuiltProgressBar = react.default.memo(() => {
|
|
3259
|
+
const PrebuiltProgressBar = react$1.default.memo(() => {
|
|
3203
3260
|
const $ = (0, react_compiler_runtime.c)(38);
|
|
3204
3261
|
const musicDuration = (0, jotai.useAtomValue)(musicDurationAtom);
|
|
3205
3262
|
const musicPosition = (0, jotai.useAtomValue)(musicPlayingPositionAtom);
|
|
@@ -3366,7 +3423,7 @@ function getLyricFontSizeFromPreset(preset) {
|
|
|
3366
3423
|
const PrebuiltCoreLyricPlayer = (t0) => {
|
|
3367
3424
|
const $ = (0, react_compiler_runtime.c)(36);
|
|
3368
3425
|
const { alignPosition, alignAnchor, bottomLine, optimizeOptions } = t0;
|
|
3369
|
-
const amllPlayerRef = (0, react.useRef)(null);
|
|
3426
|
+
const amllPlayerRef = (0, react$1.useRef)(null);
|
|
3370
3427
|
const musicIsPlaying = (0, jotai.useAtomValue)(musicPlayingAtom);
|
|
3371
3428
|
const lyricLines = (0, jotai.useAtomValue)(musicLyricLinesAtom);
|
|
3372
3429
|
const isLyricPageOpened = (0, jotai.useAtomValue)(isLyricPageOpenedAtom);
|
|
@@ -3417,7 +3474,7 @@ const PrebuiltCoreLyricPlayer = (t0) => {
|
|
|
3417
3474
|
t1 = $[6];
|
|
3418
3475
|
t2 = $[7];
|
|
3419
3476
|
}
|
|
3420
|
-
(0, react.useEffect)(t1, t2);
|
|
3477
|
+
(0, react$1.useEffect)(t1, t2);
|
|
3421
3478
|
const t3 = lyricFontFamily || void 0;
|
|
3422
3479
|
const t4 = lyricFontWeight || void 0;
|
|
3423
3480
|
const t5 = lyricLetterSpacing || void 0;
|
|
@@ -3591,7 +3648,7 @@ const PrebuiltMusicControls = (t0) => {
|
|
|
3591
3648
|
* 已经部署好所有组件的歌词播放器组件,在正确设置所有的 Jotai 状态后可以开箱即用
|
|
3592
3649
|
*/
|
|
3593
3650
|
const PrebuiltLyricPlayer = (t0) => {
|
|
3594
|
-
const $ = (0, react_compiler_runtime.c)(
|
|
3651
|
+
const $ = (0, react_compiler_runtime.c)(74);
|
|
3595
3652
|
let bottomLineSlot;
|
|
3596
3653
|
let className;
|
|
3597
3654
|
let optimizeOptions;
|
|
@@ -3620,18 +3677,50 @@ const PrebuiltLyricPlayer = (t0) => {
|
|
|
3620
3677
|
const lyricBackgroundStaticMode = (0, jotai.useAtomValue)(lyricBackgroundStaticModeAtom);
|
|
3621
3678
|
const lyricBackgroundRenderScale = (0, jotai.useAtomValue)(lyricBackgroundRenderScaleAtom);
|
|
3622
3679
|
const onClickControlThumb = (0, jotai.useAtomValue)(onClickControlThumbAtom).onEmit;
|
|
3623
|
-
const [isVertical, setIsVertical] = (0, react.useState)(false);
|
|
3624
|
-
const [alignPosition, setAlignPosition] = (0, react.useState)(.25);
|
|
3625
|
-
const [alignAnchor, setAlignAnchor] = (0, react.useState)("top");
|
|
3626
|
-
const coverElRef = (0, react.useRef)(null);
|
|
3627
|
-
const [layoutEl, setLayoutEl] = (0, react.useState)(null);
|
|
3680
|
+
const [isVertical, setIsVertical] = (0, react$1.useState)(false);
|
|
3681
|
+
const [alignPosition, setAlignPosition] = (0, react$1.useState)(.25);
|
|
3682
|
+
const [alignAnchor, setAlignAnchor] = (0, react$1.useState)("top");
|
|
3683
|
+
const coverElRef = (0, react$1.useRef)(null);
|
|
3684
|
+
const [layoutEl, setLayoutEl] = (0, react$1.useState)(null);
|
|
3628
3685
|
const backgroundRenderer = (0, jotai.useAtomValue)(lyricBackgroundRendererAtom);
|
|
3629
|
-
const showBottomControl = (0, jotai.useAtomValue)(showBottomControlAtom);
|
|
3630
|
-
const cssBackgroundProperty = (0, jotai.useAtomValue)(cssBackgroundPropertyAtom);
|
|
3631
3686
|
let t1;
|
|
3687
|
+
bb0: {
|
|
3688
|
+
const configured = backgroundRenderer.renderer;
|
|
3689
|
+
if (typeof configured === "string") {
|
|
3690
|
+
let t2;
|
|
3691
|
+
if ($[5] !== configured) {
|
|
3692
|
+
t2 = resolveBackgroundRenderer(configured);
|
|
3693
|
+
$[5] = configured;
|
|
3694
|
+
$[6] = t2;
|
|
3695
|
+
} else t2 = $[6];
|
|
3696
|
+
t1 = t2;
|
|
3697
|
+
break bb0;
|
|
3698
|
+
}
|
|
3699
|
+
let t2;
|
|
3700
|
+
if ($[7] !== configured) {
|
|
3701
|
+
t2 = configured ?? resolveBackgroundRenderer("mesh");
|
|
3702
|
+
$[7] = configured;
|
|
3703
|
+
$[8] = t2;
|
|
3704
|
+
} else t2 = $[8];
|
|
3705
|
+
t1 = t2;
|
|
3706
|
+
}
|
|
3707
|
+
const resolvedBackgroundRenderer = t1;
|
|
3708
|
+
const isolationRendererOptions = (0, jotai.useAtomValue)(isolationRendererOptionsAtom);
|
|
3632
3709
|
let t2;
|
|
3633
|
-
if ($[
|
|
3634
|
-
|
|
3710
|
+
if ($[9] !== isolationRendererOptions) {
|
|
3711
|
+
t2 = (renderer) => {
|
|
3712
|
+
if (renderer instanceof _applemusic_like_lyrics_core.IsolationRenderer) renderer.setOptions(isolationRendererOptions);
|
|
3713
|
+
};
|
|
3714
|
+
$[9] = isolationRendererOptions;
|
|
3715
|
+
$[10] = t2;
|
|
3716
|
+
} else t2 = $[10];
|
|
3717
|
+
const configureBackgroundRenderer = t2;
|
|
3718
|
+
const showBottomControl = (0, jotai.useAtomValue)(showBottomControlAtom);
|
|
3719
|
+
const cssBackgroundProperty = (0, jotai.useAtomValue)(cssBackgroundPropertyAtom);
|
|
3720
|
+
let t3;
|
|
3721
|
+
let t4;
|
|
3722
|
+
if ($[11] !== isVertical || $[12] !== layoutEl) {
|
|
3723
|
+
t3 = () => {
|
|
3635
3724
|
if (!isVertical && coverElRef.current && layoutEl) {
|
|
3636
3725
|
const obz = new ResizeObserver(() => {
|
|
3637
3726
|
if (!(coverElRef.current && layoutEl)) return;
|
|
@@ -3649,59 +3738,59 @@ const PrebuiltLyricPlayer = (t0) => {
|
|
|
3649
3738
|
setAlignAnchor("top");
|
|
3650
3739
|
}
|
|
3651
3740
|
};
|
|
3652
|
-
|
|
3653
|
-
$[
|
|
3654
|
-
$[
|
|
3655
|
-
$[
|
|
3656
|
-
$[
|
|
3741
|
+
t4 = [isVertical, layoutEl];
|
|
3742
|
+
$[11] = isVertical;
|
|
3743
|
+
$[12] = layoutEl;
|
|
3744
|
+
$[13] = t3;
|
|
3745
|
+
$[14] = t4;
|
|
3657
3746
|
} else {
|
|
3658
|
-
|
|
3659
|
-
|
|
3747
|
+
t3 = $[13];
|
|
3748
|
+
t4 = $[14];
|
|
3660
3749
|
}
|
|
3661
|
-
(0, react.useLayoutEffect)(
|
|
3750
|
+
(0, react$1.useLayoutEffect)(t3, t4);
|
|
3662
3751
|
const verticalImmerseCover = hideLyricView && (verticalCoverLayout === "auto" ? musicCoverIsVideo && isVertical : verticalCoverLayout === "force-immersive");
|
|
3663
|
-
let t3;
|
|
3664
|
-
if ($[9] !== className) {
|
|
3665
|
-
t3 = (0, classnames.default)(index_module_default.autoLyricLayout, className);
|
|
3666
|
-
$[9] = className;
|
|
3667
|
-
$[10] = t3;
|
|
3668
|
-
} else t3 = $[10];
|
|
3669
|
-
const t4 = !musicIsPlaying && !musicCoverIsVideo && verticalImmerseCover;
|
|
3670
3752
|
let t5;
|
|
3671
|
-
if ($[
|
|
3672
|
-
t5 =
|
|
3753
|
+
if ($[15] !== className) {
|
|
3754
|
+
t5 = (0, classnames.default)(index_module_default.autoLyricLayout, className);
|
|
3755
|
+
$[15] = className;
|
|
3756
|
+
$[16] = t5;
|
|
3757
|
+
} else t5 = $[16];
|
|
3758
|
+
const t6 = !musicIsPlaying && !musicCoverIsVideo && verticalImmerseCover;
|
|
3759
|
+
let t7;
|
|
3760
|
+
if ($[17] !== musicCover || $[18] !== musicCoverIsVideo || $[19] !== t6) {
|
|
3761
|
+
t7 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Cover, {
|
|
3673
3762
|
coverUrl: musicCover,
|
|
3674
3763
|
coverIsVideo: musicCoverIsVideo,
|
|
3675
3764
|
ref: coverElRef,
|
|
3676
|
-
musicPaused:
|
|
3765
|
+
musicPaused: t6
|
|
3677
3766
|
});
|
|
3678
|
-
$[
|
|
3679
|
-
$[
|
|
3680
|
-
$[
|
|
3681
|
-
$[
|
|
3682
|
-
} else
|
|
3683
|
-
let t6;
|
|
3684
|
-
if ($[15] !== onClickControlThumb) {
|
|
3685
|
-
t6 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ControlThumb, { onClick: onClickControlThumb });
|
|
3686
|
-
$[15] = onClickControlThumb;
|
|
3687
|
-
$[16] = t6;
|
|
3688
|
-
} else t6 = $[16];
|
|
3689
|
-
const t7 = hideLyricView && index_module_default.hideLyric;
|
|
3767
|
+
$[17] = musicCover;
|
|
3768
|
+
$[18] = musicCoverIsVideo;
|
|
3769
|
+
$[19] = t6;
|
|
3770
|
+
$[20] = t7;
|
|
3771
|
+
} else t7 = $[20];
|
|
3690
3772
|
let t8;
|
|
3691
|
-
if ($[
|
|
3692
|
-
t8 = (0,
|
|
3693
|
-
$[
|
|
3694
|
-
$[
|
|
3695
|
-
} else t8 = $[
|
|
3696
|
-
|
|
3697
|
-
if ($[19] !== t8) {
|
|
3698
|
-
t9 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltMusicInfo, { className: t8 });
|
|
3699
|
-
$[19] = t8;
|
|
3700
|
-
$[20] = t9;
|
|
3701
|
-
} else t9 = $[20];
|
|
3773
|
+
if ($[21] !== onClickControlThumb) {
|
|
3774
|
+
t8 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ControlThumb, { onClick: onClickControlThumb });
|
|
3775
|
+
$[21] = onClickControlThumb;
|
|
3776
|
+
$[22] = t8;
|
|
3777
|
+
} else t8 = $[22];
|
|
3778
|
+
const t9 = hideLyricView && index_module_default.hideLyric;
|
|
3702
3779
|
let t10;
|
|
3703
|
-
if ($[
|
|
3704
|
-
t10 =
|
|
3780
|
+
if ($[23] !== t9) {
|
|
3781
|
+
t10 = (0, classnames.default)(index_module_default.smallMusicInfo, t9);
|
|
3782
|
+
$[23] = t9;
|
|
3783
|
+
$[24] = t10;
|
|
3784
|
+
} else t10 = $[24];
|
|
3785
|
+
let t11;
|
|
3786
|
+
if ($[25] !== t10) {
|
|
3787
|
+
t11 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltMusicInfo, { className: t10 });
|
|
3788
|
+
$[25] = t10;
|
|
3789
|
+
$[26] = t11;
|
|
3790
|
+
} else t11 = $[26];
|
|
3791
|
+
let t12;
|
|
3792
|
+
if ($[27] !== configureBackgroundRenderer || $[28] !== cssBackgroundProperty || $[29] !== isLyricPageOpened || $[30] !== lowFreqVolume || $[31] !== lyricBackgroundFPS || $[32] !== lyricBackgroundRenderScale || $[33] !== lyricBackgroundStaticMode || $[34] !== musicCover || $[35] !== musicCoverIsVideo || $[36] !== resolvedBackgroundRenderer) {
|
|
3793
|
+
t12 = resolvedBackgroundRenderer === "css-bg" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { style: {
|
|
3705
3794
|
zIndex: -1,
|
|
3706
3795
|
width: "100%",
|
|
3707
3796
|
height: "100%",
|
|
@@ -3715,48 +3804,50 @@ const PrebuiltLyricPlayer = (t0) => {
|
|
|
3715
3804
|
lowFreqVolume,
|
|
3716
3805
|
renderScale: lyricBackgroundRenderScale,
|
|
3717
3806
|
fps: lyricBackgroundFPS,
|
|
3718
|
-
renderer:
|
|
3807
|
+
renderer: resolvedBackgroundRenderer,
|
|
3719
3808
|
staticMode: lyricBackgroundStaticMode || !isLyricPageOpened,
|
|
3809
|
+
configureRenderer: configureBackgroundRenderer,
|
|
3720
3810
|
style: { zIndex: -1 }
|
|
3721
3811
|
});
|
|
3722
|
-
$[
|
|
3723
|
-
$[
|
|
3724
|
-
$[
|
|
3725
|
-
$[
|
|
3726
|
-
$[
|
|
3727
|
-
$[
|
|
3728
|
-
$[
|
|
3729
|
-
$[
|
|
3730
|
-
$[
|
|
3731
|
-
$[
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
if ($[31] !== t11) {
|
|
3736
|
-
t12 = (0, classnames.default)(index_module_default.bigMusicInfo, t11);
|
|
3737
|
-
$[31] = t11;
|
|
3738
|
-
$[32] = t12;
|
|
3739
|
-
} else t12 = $[32];
|
|
3740
|
-
let t13;
|
|
3741
|
-
if ($[33] !== t12) {
|
|
3742
|
-
t13 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltMusicInfo, { className: t12 });
|
|
3743
|
-
$[33] = t12;
|
|
3744
|
-
$[34] = t13;
|
|
3745
|
-
} else t13 = $[34];
|
|
3812
|
+
$[27] = configureBackgroundRenderer;
|
|
3813
|
+
$[28] = cssBackgroundProperty;
|
|
3814
|
+
$[29] = isLyricPageOpened;
|
|
3815
|
+
$[30] = lowFreqVolume;
|
|
3816
|
+
$[31] = lyricBackgroundFPS;
|
|
3817
|
+
$[32] = lyricBackgroundRenderScale;
|
|
3818
|
+
$[33] = lyricBackgroundStaticMode;
|
|
3819
|
+
$[34] = musicCover;
|
|
3820
|
+
$[35] = musicCoverIsVideo;
|
|
3821
|
+
$[36] = resolvedBackgroundRenderer;
|
|
3822
|
+
$[37] = t12;
|
|
3823
|
+
} else t12 = $[37];
|
|
3824
|
+
const t13 = hideLyricView && index_module_default.hideLyric;
|
|
3746
3825
|
let t14;
|
|
3826
|
+
if ($[38] !== t13) {
|
|
3827
|
+
t14 = (0, classnames.default)(index_module_default.bigMusicInfo, t13);
|
|
3828
|
+
$[38] = t13;
|
|
3829
|
+
$[39] = t14;
|
|
3830
|
+
} else t14 = $[39];
|
|
3747
3831
|
let t15;
|
|
3748
|
-
if ($[
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
$[
|
|
3752
|
-
|
|
3832
|
+
if ($[40] !== t14) {
|
|
3833
|
+
t15 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltMusicInfo, { className: t14 });
|
|
3834
|
+
$[40] = t14;
|
|
3835
|
+
$[41] = t15;
|
|
3836
|
+
} else t15 = $[41];
|
|
3837
|
+
let t16;
|
|
3838
|
+
let t17;
|
|
3839
|
+
if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3840
|
+
t16 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltProgressBar, {});
|
|
3841
|
+
t17 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltMusicControls, { className: index_module_default.bigControls });
|
|
3842
|
+
$[42] = t16;
|
|
3843
|
+
$[43] = t17;
|
|
3753
3844
|
} else {
|
|
3754
|
-
|
|
3755
|
-
|
|
3845
|
+
t16 = $[42];
|
|
3846
|
+
t17 = $[43];
|
|
3756
3847
|
}
|
|
3757
|
-
let
|
|
3758
|
-
if ($[
|
|
3759
|
-
|
|
3848
|
+
let t18;
|
|
3849
|
+
if ($[44] !== hideLyricView || $[45] !== setHideLyricView || $[46] !== showBottomControl) {
|
|
3850
|
+
t18 = showBottomControl && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3760
3851
|
style: {
|
|
3761
3852
|
display: "flex",
|
|
3762
3853
|
justifyContent: "space-evenly"
|
|
@@ -3771,32 +3862,32 @@ const PrebuiltLyricPlayer = (t0) => {
|
|
|
3771
3862
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltToggleIconButton, { type: "playlist" })
|
|
3772
3863
|
]
|
|
3773
3864
|
});
|
|
3774
|
-
$[
|
|
3775
|
-
$[
|
|
3776
|
-
$[
|
|
3777
|
-
$[
|
|
3778
|
-
} else
|
|
3779
|
-
let
|
|
3780
|
-
if ($[
|
|
3781
|
-
|
|
3782
|
-
$[
|
|
3783
|
-
} else
|
|
3784
|
-
let
|
|
3785
|
-
if ($[
|
|
3786
|
-
|
|
3787
|
-
t13,
|
|
3788
|
-
t14,
|
|
3865
|
+
$[44] = hideLyricView;
|
|
3866
|
+
$[45] = setHideLyricView;
|
|
3867
|
+
$[46] = showBottomControl;
|
|
3868
|
+
$[47] = t18;
|
|
3869
|
+
} else t18 = $[47];
|
|
3870
|
+
let t19;
|
|
3871
|
+
if ($[48] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3872
|
+
t19 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltVolumeControl, { className: index_module_default.bigVolumeControl });
|
|
3873
|
+
$[48] = t19;
|
|
3874
|
+
} else t19 = $[48];
|
|
3875
|
+
let t20;
|
|
3876
|
+
if ($[49] !== t15 || $[50] !== t18) {
|
|
3877
|
+
t20 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
3789
3878
|
t15,
|
|
3790
3879
|
t16,
|
|
3791
|
-
t17
|
|
3880
|
+
t17,
|
|
3881
|
+
t18,
|
|
3882
|
+
t19
|
|
3792
3883
|
] });
|
|
3793
|
-
$[
|
|
3794
|
-
$[
|
|
3795
|
-
$[
|
|
3796
|
-
} else
|
|
3797
|
-
let
|
|
3798
|
-
if ($[
|
|
3799
|
-
|
|
3884
|
+
$[49] = t15;
|
|
3885
|
+
$[50] = t18;
|
|
3886
|
+
$[51] = t20;
|
|
3887
|
+
} else t20 = $[51];
|
|
3888
|
+
let t21;
|
|
3889
|
+
if ($[52] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3890
|
+
t21 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
3800
3891
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltMusicInfo, { className: index_module_default.horizontalControls }),
|
|
3801
3892
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltProgressBar, {}),
|
|
3802
3893
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltMusicControls, {
|
|
@@ -3805,11 +3896,11 @@ const PrebuiltLyricPlayer = (t0) => {
|
|
|
3805
3896
|
}),
|
|
3806
3897
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltVolumeControl, {})
|
|
3807
3898
|
] });
|
|
3808
|
-
$[
|
|
3809
|
-
} else
|
|
3810
|
-
let
|
|
3811
|
-
if ($[
|
|
3812
|
-
|
|
3899
|
+
$[52] = t21;
|
|
3900
|
+
} else t21 = $[52];
|
|
3901
|
+
let t22;
|
|
3902
|
+
if ($[53] !== hideLyricView || $[54] !== setHideLyricView || $[55] !== showBottomControl) {
|
|
3903
|
+
t22 = showBottomControl && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
3813
3904
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltToggleIconButton, { type: "playlist" }),
|
|
3814
3905
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltToggleIconButton, {
|
|
3815
3906
|
type: "lyrics",
|
|
@@ -3819,57 +3910,57 @@ const PrebuiltLyricPlayer = (t0) => {
|
|
|
3819
3910
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { style: { flex: "1" } }),
|
|
3820
3911
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltToggleIconButton, { type: "airplay" })
|
|
3821
3912
|
] });
|
|
3822
|
-
$[
|
|
3823
|
-
$[
|
|
3824
|
-
$[
|
|
3825
|
-
$[
|
|
3826
|
-
} else
|
|
3827
|
-
let
|
|
3828
|
-
if ($[
|
|
3829
|
-
|
|
3913
|
+
$[53] = hideLyricView;
|
|
3914
|
+
$[54] = setHideLyricView;
|
|
3915
|
+
$[55] = showBottomControl;
|
|
3916
|
+
$[56] = t22;
|
|
3917
|
+
} else t22 = $[56];
|
|
3918
|
+
let t23;
|
|
3919
|
+
if ($[57] !== alignAnchor || $[58] !== alignPosition || $[59] !== bottomLineSlot || $[60] !== optimizeOptions) {
|
|
3920
|
+
t23 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltCoreLyricPlayer, {
|
|
3830
3921
|
alignPosition,
|
|
3831
3922
|
alignAnchor,
|
|
3832
3923
|
bottomLine: bottomLineSlot,
|
|
3833
3924
|
optimizeOptions
|
|
3834
3925
|
});
|
|
3835
|
-
$[
|
|
3836
|
-
$[
|
|
3837
|
-
$[
|
|
3838
|
-
$[
|
|
3839
|
-
$[
|
|
3840
|
-
} else
|
|
3841
|
-
let
|
|
3842
|
-
if ($[
|
|
3843
|
-
|
|
3926
|
+
$[57] = alignAnchor;
|
|
3927
|
+
$[58] = alignPosition;
|
|
3928
|
+
$[59] = bottomLineSlot;
|
|
3929
|
+
$[60] = optimizeOptions;
|
|
3930
|
+
$[61] = t23;
|
|
3931
|
+
} else t23 = $[61];
|
|
3932
|
+
let t24;
|
|
3933
|
+
if ($[62] !== hideLyricView || $[63] !== rest || $[64] !== t11 || $[65] !== t12 || $[66] !== t20 || $[67] !== t22 || $[68] !== t23 || $[69] !== t5 || $[70] !== t7 || $[71] !== t8 || $[72] !== verticalImmerseCover) {
|
|
3934
|
+
t24 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(framer_motion.LayoutGroup, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AutoLyricLayout, {
|
|
3844
3935
|
onElementMounted: setLayoutEl,
|
|
3845
|
-
className:
|
|
3936
|
+
className: t5,
|
|
3846
3937
|
onLayoutChange: setIsVertical,
|
|
3847
3938
|
verticalImmerseCover,
|
|
3848
|
-
coverSlot:
|
|
3849
|
-
thumbSlot:
|
|
3850
|
-
smallControlsSlot:
|
|
3851
|
-
backgroundSlot:
|
|
3852
|
-
bigControlsSlot:
|
|
3853
|
-
controlsSlot:
|
|
3854
|
-
horizontalBottomControls:
|
|
3855
|
-
lyricSlot:
|
|
3939
|
+
coverSlot: t7,
|
|
3940
|
+
thumbSlot: t8,
|
|
3941
|
+
smallControlsSlot: t11,
|
|
3942
|
+
backgroundSlot: t12,
|
|
3943
|
+
bigControlsSlot: t20,
|
|
3944
|
+
controlsSlot: t21,
|
|
3945
|
+
horizontalBottomControls: t22,
|
|
3946
|
+
lyricSlot: t23,
|
|
3856
3947
|
hideLyric: hideLyricView,
|
|
3857
3948
|
...rest
|
|
3858
3949
|
}) });
|
|
3859
|
-
$[
|
|
3860
|
-
$[
|
|
3861
|
-
$[
|
|
3862
|
-
$[
|
|
3863
|
-
$[
|
|
3864
|
-
$[
|
|
3865
|
-
$[
|
|
3866
|
-
$[
|
|
3867
|
-
$[
|
|
3868
|
-
$[
|
|
3869
|
-
$[
|
|
3870
|
-
$[
|
|
3871
|
-
} else
|
|
3872
|
-
return
|
|
3950
|
+
$[62] = hideLyricView;
|
|
3951
|
+
$[63] = rest;
|
|
3952
|
+
$[64] = t11;
|
|
3953
|
+
$[65] = t12;
|
|
3954
|
+
$[66] = t20;
|
|
3955
|
+
$[67] = t22;
|
|
3956
|
+
$[68] = t23;
|
|
3957
|
+
$[69] = t5;
|
|
3958
|
+
$[70] = t7;
|
|
3959
|
+
$[71] = t8;
|
|
3960
|
+
$[72] = verticalImmerseCover;
|
|
3961
|
+
$[73] = t24;
|
|
3962
|
+
} else t24 = $[73];
|
|
3963
|
+
return t24;
|
|
3873
3964
|
};
|
|
3874
3965
|
function _temp(v) {
|
|
3875
3966
|
return v.name;
|
|
@@ -3889,10 +3980,14 @@ exports.AudioFFTVisualizer = AudioFFTVisualizer;
|
|
|
3889
3980
|
exports.AudioQualityTag = AudioQualityTag;
|
|
3890
3981
|
exports.AudioQualityType = AudioQualityType;
|
|
3891
3982
|
exports.AutoLyricLayout = AutoLyricLayout;
|
|
3983
|
+
exports.BACKGROUND_RENDERERS = BACKGROUND_RENDERERS;
|
|
3892
3984
|
exports.BouncingSlider = BouncingSlider;
|
|
3985
|
+
exports.CSS_BACKGROUND_RENDERER_ID = CSS_BACKGROUND_RENDERER_ID;
|
|
3893
3986
|
exports.ControlThumb = ControlThumb;
|
|
3894
3987
|
exports.Cover = Cover;
|
|
3988
|
+
exports.DEFAULT_BACKGROUND_RENDERER_ID = DEFAULT_BACKGROUND_RENDERER_ID;
|
|
3895
3989
|
exports.HorizontalLayout = HorizontalLayout;
|
|
3990
|
+
exports.LYRIC_BACKGROUND_RENDERER_STORAGE_KEY = LYRIC_BACKGROUND_RENDERER_STORAGE_KEY;
|
|
3896
3991
|
exports.LyricPlayerImplementation = LyricPlayerImplementation;
|
|
3897
3992
|
exports.LyricSizePreset = LyricSizePreset;
|
|
3898
3993
|
exports.MediaButton = MediaButton;
|
|
@@ -3923,6 +4018,7 @@ exports.isLyricPageOpenedAtom = isLyricPageOpenedAtom;
|
|
|
3923
4018
|
exports.isRepeatEnabledAtom = isRepeatEnabledAtom;
|
|
3924
4019
|
exports.isShuffleActiveAtom = isShuffleActiveAtom;
|
|
3925
4020
|
exports.isShuffleEnabledAtom = isShuffleEnabledAtom;
|
|
4021
|
+
exports.isolationRendererOptionsAtom = isolationRendererOptionsAtom;
|
|
3926
4022
|
exports.lowFreqVolumeAtom = lowFreqVolumeAtom;
|
|
3927
4023
|
exports.lyricBackgroundFPSAtom = lyricBackgroundFPSAtom;
|
|
3928
4024
|
exports.lyricBackgroundRenderScaleAtom = lyricBackgroundRenderScaleAtom;
|
|
@@ -3961,6 +4057,7 @@ exports.onSeekPositionAtom = onSeekPositionAtom;
|
|
|
3961
4057
|
exports.onToggleShuffleAtom = onToggleShuffleAtom;
|
|
3962
4058
|
exports.playerControlsTypeAtom = playerControlsTypeAtom;
|
|
3963
4059
|
exports.repeatModeAtom = repeatModeAtom;
|
|
4060
|
+
exports.resolveBackgroundRenderer = resolveBackgroundRenderer;
|
|
3964
4061
|
exports.showBottomControlAtom = showBottomControlAtom;
|
|
3965
4062
|
exports.showMusicAlbumAtom = showMusicAlbumAtom;
|
|
3966
4063
|
exports.showMusicArtistsAtom = showMusicArtistsAtom;
|