@applemusic-like-lyrics/react-full 0.4.2 → 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 +361 -268
- 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 +310 -224
- package/dist/amll-react-framework.mjs.map +1 -1
- package/dist/style.css +1 -1
- 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,14 +1510,14 @@ 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;
|
|
@@ -1537,7 +1548,7 @@ const VerticalLayout = ({ thumbSlot, coverSlot, smallControlsSlot, bigControlsSl
|
|
|
1537
1548
|
top: targetCoverB.y - rootB.y + (targetCoverB.height - targetCoverSize_0) / 2
|
|
1538
1549
|
};
|
|
1539
1550
|
}, []);
|
|
1540
|
-
(0, react.useLayoutEffect)(() => {
|
|
1551
|
+
(0, react$1.useLayoutEffect)(() => {
|
|
1541
1552
|
hideLyricRef.current = hideLyric ?? false;
|
|
1542
1553
|
immerseCoverRef.current = immerseCover ?? false;
|
|
1543
1554
|
setCurrentCoverStyle(calcCoverLayout(hideLyricRef.current));
|
|
@@ -1546,7 +1557,7 @@ const VerticalLayout = ({ thumbSlot, coverSlot, smallControlsSlot, bigControlsSl
|
|
|
1546
1557
|
immerseCover,
|
|
1547
1558
|
calcCoverLayout
|
|
1548
1559
|
]);
|
|
1549
|
-
(0, react.useLayoutEffect)(() => {
|
|
1560
|
+
(0, react$1.useLayoutEffect)(() => {
|
|
1550
1561
|
const phonyBigCoverEl = phonyBigCoverRef.current;
|
|
1551
1562
|
const phonySmallCoverEl = phonySmallCoverRef.current;
|
|
1552
1563
|
if (!phonyBigCoverEl || !phonySmallCoverEl) return;
|
|
@@ -1555,7 +1566,8 @@ const VerticalLayout = ({ thumbSlot, coverSlot, smallControlsSlot, bigControlsSl
|
|
|
1555
1566
|
});
|
|
1556
1567
|
obz.observe(phonyBigCoverEl);
|
|
1557
1568
|
obz.observe(phonySmallCoverEl);
|
|
1558
|
-
|
|
1569
|
+
const init = calcCoverLayout(hideLyricRef.current);
|
|
1570
|
+
setCurrentCoverStyle(init);
|
|
1559
1571
|
return () => {
|
|
1560
1572
|
obz.disconnect();
|
|
1561
1573
|
};
|
|
@@ -1670,8 +1682,8 @@ const AutoLyricLayout = (t0) => {
|
|
|
1670
1682
|
thumbSlot = $[12];
|
|
1671
1683
|
verticalImmerseCover = $[13];
|
|
1672
1684
|
}
|
|
1673
|
-
const [isVertical, setIsVertical] = (0, react.useState)(false);
|
|
1674
|
-
const rootRef = (0, react.useRef)(null);
|
|
1685
|
+
const [isVertical, setIsVertical] = (0, react$1.useState)(false);
|
|
1686
|
+
const rootRef = (0, react$1.useRef)(null);
|
|
1675
1687
|
let t1;
|
|
1676
1688
|
if ($[14] !== onElementMounted) {
|
|
1677
1689
|
t1 = (node) => {
|
|
@@ -1703,7 +1715,7 @@ const AutoLyricLayout = (t0) => {
|
|
|
1703
1715
|
t2 = $[16];
|
|
1704
1716
|
t3 = $[17];
|
|
1705
1717
|
}
|
|
1706
|
-
(0, react.useLayoutEffect)(t2, t3);
|
|
1718
|
+
(0, react$1.useLayoutEffect)(t2, t3);
|
|
1707
1719
|
let t4;
|
|
1708
1720
|
let t5;
|
|
1709
1721
|
if ($[18] !== isVertical || $[19] !== onLayoutChange) {
|
|
@@ -1719,7 +1731,7 @@ const AutoLyricLayout = (t0) => {
|
|
|
1719
1731
|
t4 = $[20];
|
|
1720
1732
|
t5 = $[21];
|
|
1721
1733
|
}
|
|
1722
|
-
(0, react.useLayoutEffect)(t4, t5);
|
|
1734
|
+
(0, react$1.useLayoutEffect)(t4, t5);
|
|
1723
1735
|
let t6;
|
|
1724
1736
|
if ($[22] !== backgroundSlot) {
|
|
1725
1737
|
t6 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -2011,7 +2023,7 @@ globalThis.jotaiAtomCache = globalThis.jotaiAtomCache || {
|
|
|
2011
2023
|
return inst;
|
|
2012
2024
|
}
|
|
2013
2025
|
};
|
|
2014
|
-
const ToggleIconButton = (0, react.memo)((t0) => {
|
|
2026
|
+
const ToggleIconButton = (0, react$1.memo)((t0) => {
|
|
2015
2027
|
const $ = (0, react_compiler_runtime.c)(12);
|
|
2016
2028
|
let checked;
|
|
2017
2029
|
let checkedIcon;
|
|
@@ -2063,7 +2075,7 @@ const PREBUILT_ICONS_MAP = {
|
|
|
2063
2075
|
["star"]: [ForwardRef$12, ForwardRef$11],
|
|
2064
2076
|
["airplay"]: [ForwardRef$21, ForwardRef$21]
|
|
2065
2077
|
};
|
|
2066
|
-
const PrebuiltToggleIconButton = (0, react.memo)((t0) => {
|
|
2078
|
+
const PrebuiltToggleIconButton = (0, react$1.memo)((t0) => {
|
|
2067
2079
|
const $ = (0, react_compiler_runtime.c)(15);
|
|
2068
2080
|
let checked;
|
|
2069
2081
|
let onClick;
|
|
@@ -2181,9 +2193,9 @@ globalThis.jotaiAtomCache = globalThis.jotaiAtomCache || {
|
|
|
2181
2193
|
};
|
|
2182
2194
|
const VolumeControl = (props) => {
|
|
2183
2195
|
const $ = (0, react_compiler_runtime.c)(9);
|
|
2184
|
-
const lastValueRef = (0, react.useRef)(props.value);
|
|
2185
|
-
const minSpeakerRef = (0, react.useRef)(null);
|
|
2186
|
-
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);
|
|
2187
2199
|
let t0;
|
|
2188
2200
|
let t1;
|
|
2189
2201
|
if ($[0] !== props.max || $[1] !== props.min || $[2] !== props.value) {
|
|
@@ -2217,7 +2229,7 @@ const VolumeControl = (props) => {
|
|
|
2217
2229
|
t0 = $[3];
|
|
2218
2230
|
t1 = $[4];
|
|
2219
2231
|
}
|
|
2220
|
-
(0, react.useEffect)(t0, t1);
|
|
2232
|
+
(0, react$1.useEffect)(t0, t1);
|
|
2221
2233
|
let t2;
|
|
2222
2234
|
let t3;
|
|
2223
2235
|
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -2706,22 +2718,59 @@ const showVolumeControlAtom = globalThis.jotaiAtomCache.get("/home/runner/work/a
|
|
|
2706
2718
|
showVolumeControlAtom.debugLabel = "showVolumeControlAtom";
|
|
2707
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));
|
|
2708
2720
|
showBottomControlAtom.debugLabel = "showBottomControlAtom";
|
|
2709
|
-
const
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
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()
|
|
2714
2740
|
}
|
|
2715
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") });
|
|
2716
2758
|
/**
|
|
2717
2759
|
* 配置所使用的歌词背景渲染器
|
|
2718
2760
|
*/
|
|
2719
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()));
|
|
2720
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
|
+
/**
|
|
2721
2770
|
* 当背景渲染器设置为纯色或CSS背景时,使用此值
|
|
2722
2771
|
* @default "#111111"
|
|
2723
2772
|
*/
|
|
2724
|
-
|
|
2773
|
+
isolationRendererOptionsAtom.debugLabel = "isolationRendererOptionsAtom";
|
|
2725
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"));
|
|
2726
2775
|
/**
|
|
2727
2776
|
* 调节背景的最大渲染帧率,较低的值可以提升性能
|
|
@@ -2957,6 +3006,10 @@ var index_module_default = {
|
|
|
2957
3006
|
};
|
|
2958
3007
|
//#endregion
|
|
2959
3008
|
//#region src/components/PrebuiltLyricPlayer/index.tsx
|
|
3009
|
+
/**
|
|
3010
|
+
* @fileoverview
|
|
3011
|
+
* 已经部署好所有组件的歌词播放器组件,在正确设置所有的 Jotai 状态后可以开箱即用
|
|
3012
|
+
*/
|
|
2960
3013
|
globalThis.jotaiAtomCache = globalThis.jotaiAtomCache || {
|
|
2961
3014
|
cache: /* @__PURE__ */ new Map(),
|
|
2962
3015
|
get(name, inst) {
|
|
@@ -3203,7 +3256,7 @@ const TotalDurationLabel = () => {
|
|
|
3203
3256
|
};
|
|
3204
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));
|
|
3205
3258
|
manualSeekTriggerAtom.debugLabel = "manualSeekTriggerAtom";
|
|
3206
|
-
const PrebuiltProgressBar = react.default.memo(() => {
|
|
3259
|
+
const PrebuiltProgressBar = react$1.default.memo(() => {
|
|
3207
3260
|
const $ = (0, react_compiler_runtime.c)(38);
|
|
3208
3261
|
const musicDuration = (0, jotai.useAtomValue)(musicDurationAtom);
|
|
3209
3262
|
const musicPosition = (0, jotai.useAtomValue)(musicPlayingPositionAtom);
|
|
@@ -3370,7 +3423,7 @@ function getLyricFontSizeFromPreset(preset) {
|
|
|
3370
3423
|
const PrebuiltCoreLyricPlayer = (t0) => {
|
|
3371
3424
|
const $ = (0, react_compiler_runtime.c)(36);
|
|
3372
3425
|
const { alignPosition, alignAnchor, bottomLine, optimizeOptions } = t0;
|
|
3373
|
-
const amllPlayerRef = (0, react.useRef)(null);
|
|
3426
|
+
const amllPlayerRef = (0, react$1.useRef)(null);
|
|
3374
3427
|
const musicIsPlaying = (0, jotai.useAtomValue)(musicPlayingAtom);
|
|
3375
3428
|
const lyricLines = (0, jotai.useAtomValue)(musicLyricLinesAtom);
|
|
3376
3429
|
const isLyricPageOpened = (0, jotai.useAtomValue)(isLyricPageOpenedAtom);
|
|
@@ -3421,7 +3474,7 @@ const PrebuiltCoreLyricPlayer = (t0) => {
|
|
|
3421
3474
|
t1 = $[6];
|
|
3422
3475
|
t2 = $[7];
|
|
3423
3476
|
}
|
|
3424
|
-
(0, react.useEffect)(t1, t2);
|
|
3477
|
+
(0, react$1.useEffect)(t1, t2);
|
|
3425
3478
|
const t3 = lyricFontFamily || void 0;
|
|
3426
3479
|
const t4 = lyricFontWeight || void 0;
|
|
3427
3480
|
const t5 = lyricLetterSpacing || void 0;
|
|
@@ -3595,7 +3648,7 @@ const PrebuiltMusicControls = (t0) => {
|
|
|
3595
3648
|
* 已经部署好所有组件的歌词播放器组件,在正确设置所有的 Jotai 状态后可以开箱即用
|
|
3596
3649
|
*/
|
|
3597
3650
|
const PrebuiltLyricPlayer = (t0) => {
|
|
3598
|
-
const $ = (0, react_compiler_runtime.c)(
|
|
3651
|
+
const $ = (0, react_compiler_runtime.c)(74);
|
|
3599
3652
|
let bottomLineSlot;
|
|
3600
3653
|
let className;
|
|
3601
3654
|
let optimizeOptions;
|
|
@@ -3624,18 +3677,50 @@ const PrebuiltLyricPlayer = (t0) => {
|
|
|
3624
3677
|
const lyricBackgroundStaticMode = (0, jotai.useAtomValue)(lyricBackgroundStaticModeAtom);
|
|
3625
3678
|
const lyricBackgroundRenderScale = (0, jotai.useAtomValue)(lyricBackgroundRenderScaleAtom);
|
|
3626
3679
|
const onClickControlThumb = (0, jotai.useAtomValue)(onClickControlThumbAtom).onEmit;
|
|
3627
|
-
const [isVertical, setIsVertical] = (0, react.useState)(false);
|
|
3628
|
-
const [alignPosition, setAlignPosition] = (0, react.useState)(.25);
|
|
3629
|
-
const [alignAnchor, setAlignAnchor] = (0, react.useState)("top");
|
|
3630
|
-
const coverElRef = (0, react.useRef)(null);
|
|
3631
|
-
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);
|
|
3632
3685
|
const backgroundRenderer = (0, jotai.useAtomValue)(lyricBackgroundRendererAtom);
|
|
3633
|
-
const showBottomControl = (0, jotai.useAtomValue)(showBottomControlAtom);
|
|
3634
|
-
const cssBackgroundProperty = (0, jotai.useAtomValue)(cssBackgroundPropertyAtom);
|
|
3635
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);
|
|
3636
3709
|
let t2;
|
|
3637
|
-
if ($[
|
|
3638
|
-
|
|
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 = () => {
|
|
3639
3724
|
if (!isVertical && coverElRef.current && layoutEl) {
|
|
3640
3725
|
const obz = new ResizeObserver(() => {
|
|
3641
3726
|
if (!(coverElRef.current && layoutEl)) return;
|
|
@@ -3653,59 +3738,59 @@ const PrebuiltLyricPlayer = (t0) => {
|
|
|
3653
3738
|
setAlignAnchor("top");
|
|
3654
3739
|
}
|
|
3655
3740
|
};
|
|
3656
|
-
|
|
3657
|
-
$[
|
|
3658
|
-
$[
|
|
3659
|
-
$[
|
|
3660
|
-
$[
|
|
3741
|
+
t4 = [isVertical, layoutEl];
|
|
3742
|
+
$[11] = isVertical;
|
|
3743
|
+
$[12] = layoutEl;
|
|
3744
|
+
$[13] = t3;
|
|
3745
|
+
$[14] = t4;
|
|
3661
3746
|
} else {
|
|
3662
|
-
|
|
3663
|
-
|
|
3747
|
+
t3 = $[13];
|
|
3748
|
+
t4 = $[14];
|
|
3664
3749
|
}
|
|
3665
|
-
(0, react.useLayoutEffect)(
|
|
3750
|
+
(0, react$1.useLayoutEffect)(t3, t4);
|
|
3666
3751
|
const verticalImmerseCover = hideLyricView && (verticalCoverLayout === "auto" ? musicCoverIsVideo && isVertical : verticalCoverLayout === "force-immersive");
|
|
3667
|
-
let t3;
|
|
3668
|
-
if ($[9] !== className) {
|
|
3669
|
-
t3 = (0, classnames.default)(index_module_default.autoLyricLayout, className);
|
|
3670
|
-
$[9] = className;
|
|
3671
|
-
$[10] = t3;
|
|
3672
|
-
} else t3 = $[10];
|
|
3673
|
-
const t4 = !musicIsPlaying && !musicCoverIsVideo && verticalImmerseCover;
|
|
3674
3752
|
let t5;
|
|
3675
|
-
if ($[
|
|
3676
|
-
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, {
|
|
3677
3762
|
coverUrl: musicCover,
|
|
3678
3763
|
coverIsVideo: musicCoverIsVideo,
|
|
3679
3764
|
ref: coverElRef,
|
|
3680
|
-
musicPaused:
|
|
3765
|
+
musicPaused: t6
|
|
3681
3766
|
});
|
|
3682
|
-
$[
|
|
3683
|
-
$[
|
|
3684
|
-
$[
|
|
3685
|
-
$[
|
|
3686
|
-
} else
|
|
3687
|
-
let t6;
|
|
3688
|
-
if ($[15] !== onClickControlThumb) {
|
|
3689
|
-
t6 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ControlThumb, { onClick: onClickControlThumb });
|
|
3690
|
-
$[15] = onClickControlThumb;
|
|
3691
|
-
$[16] = t6;
|
|
3692
|
-
} else t6 = $[16];
|
|
3693
|
-
const t7 = hideLyricView && index_module_default.hideLyric;
|
|
3767
|
+
$[17] = musicCover;
|
|
3768
|
+
$[18] = musicCoverIsVideo;
|
|
3769
|
+
$[19] = t6;
|
|
3770
|
+
$[20] = t7;
|
|
3771
|
+
} else t7 = $[20];
|
|
3694
3772
|
let t8;
|
|
3695
|
-
if ($[
|
|
3696
|
-
t8 = (0,
|
|
3697
|
-
$[
|
|
3698
|
-
$[
|
|
3699
|
-
} else t8 = $[
|
|
3700
|
-
|
|
3701
|
-
if ($[19] !== t8) {
|
|
3702
|
-
t9 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltMusicInfo, { className: t8 });
|
|
3703
|
-
$[19] = t8;
|
|
3704
|
-
$[20] = t9;
|
|
3705
|
-
} 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;
|
|
3706
3779
|
let t10;
|
|
3707
|
-
if ($[
|
|
3708
|
-
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: {
|
|
3709
3794
|
zIndex: -1,
|
|
3710
3795
|
width: "100%",
|
|
3711
3796
|
height: "100%",
|
|
@@ -3719,48 +3804,50 @@ const PrebuiltLyricPlayer = (t0) => {
|
|
|
3719
3804
|
lowFreqVolume,
|
|
3720
3805
|
renderScale: lyricBackgroundRenderScale,
|
|
3721
3806
|
fps: lyricBackgroundFPS,
|
|
3722
|
-
renderer:
|
|
3807
|
+
renderer: resolvedBackgroundRenderer,
|
|
3723
3808
|
staticMode: lyricBackgroundStaticMode || !isLyricPageOpened,
|
|
3809
|
+
configureRenderer: configureBackgroundRenderer,
|
|
3724
3810
|
style: { zIndex: -1 }
|
|
3725
3811
|
});
|
|
3726
|
-
$[
|
|
3727
|
-
$[
|
|
3728
|
-
$[
|
|
3729
|
-
$[
|
|
3730
|
-
$[
|
|
3731
|
-
$[
|
|
3732
|
-
$[
|
|
3733
|
-
$[
|
|
3734
|
-
$[
|
|
3735
|
-
$[
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
if ($[31] !== t11) {
|
|
3740
|
-
t12 = (0, classnames.default)(index_module_default.bigMusicInfo, t11);
|
|
3741
|
-
$[31] = t11;
|
|
3742
|
-
$[32] = t12;
|
|
3743
|
-
} else t12 = $[32];
|
|
3744
|
-
let t13;
|
|
3745
|
-
if ($[33] !== t12) {
|
|
3746
|
-
t13 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltMusicInfo, { className: t12 });
|
|
3747
|
-
$[33] = t12;
|
|
3748
|
-
$[34] = t13;
|
|
3749
|
-
} 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;
|
|
3750
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];
|
|
3751
3831
|
let t15;
|
|
3752
|
-
if ($[
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
$[
|
|
3756
|
-
|
|
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;
|
|
3757
3844
|
} else {
|
|
3758
|
-
|
|
3759
|
-
|
|
3845
|
+
t16 = $[42];
|
|
3846
|
+
t17 = $[43];
|
|
3760
3847
|
}
|
|
3761
|
-
let
|
|
3762
|
-
if ($[
|
|
3763
|
-
|
|
3848
|
+
let t18;
|
|
3849
|
+
if ($[44] !== hideLyricView || $[45] !== setHideLyricView || $[46] !== showBottomControl) {
|
|
3850
|
+
t18 = showBottomControl && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3764
3851
|
style: {
|
|
3765
3852
|
display: "flex",
|
|
3766
3853
|
justifyContent: "space-evenly"
|
|
@@ -3775,32 +3862,32 @@ const PrebuiltLyricPlayer = (t0) => {
|
|
|
3775
3862
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltToggleIconButton, { type: "playlist" })
|
|
3776
3863
|
]
|
|
3777
3864
|
});
|
|
3778
|
-
$[
|
|
3779
|
-
$[
|
|
3780
|
-
$[
|
|
3781
|
-
$[
|
|
3782
|
-
} else
|
|
3783
|
-
let
|
|
3784
|
-
if ($[
|
|
3785
|
-
|
|
3786
|
-
$[
|
|
3787
|
-
} else
|
|
3788
|
-
let
|
|
3789
|
-
if ($[
|
|
3790
|
-
|
|
3791
|
-
t13,
|
|
3792
|
-
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: [
|
|
3793
3878
|
t15,
|
|
3794
3879
|
t16,
|
|
3795
|
-
t17
|
|
3880
|
+
t17,
|
|
3881
|
+
t18,
|
|
3882
|
+
t19
|
|
3796
3883
|
] });
|
|
3797
|
-
$[
|
|
3798
|
-
$[
|
|
3799
|
-
$[
|
|
3800
|
-
} else
|
|
3801
|
-
let
|
|
3802
|
-
if ($[
|
|
3803
|
-
|
|
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: [
|
|
3804
3891
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltMusicInfo, { className: index_module_default.horizontalControls }),
|
|
3805
3892
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltProgressBar, {}),
|
|
3806
3893
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltMusicControls, {
|
|
@@ -3809,11 +3896,11 @@ const PrebuiltLyricPlayer = (t0) => {
|
|
|
3809
3896
|
}),
|
|
3810
3897
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltVolumeControl, {})
|
|
3811
3898
|
] });
|
|
3812
|
-
$[
|
|
3813
|
-
} else
|
|
3814
|
-
let
|
|
3815
|
-
if ($[
|
|
3816
|
-
|
|
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: [
|
|
3817
3904
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltToggleIconButton, { type: "playlist" }),
|
|
3818
3905
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltToggleIconButton, {
|
|
3819
3906
|
type: "lyrics",
|
|
@@ -3823,57 +3910,57 @@ const PrebuiltLyricPlayer = (t0) => {
|
|
|
3823
3910
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { style: { flex: "1" } }),
|
|
3824
3911
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrebuiltToggleIconButton, { type: "airplay" })
|
|
3825
3912
|
] });
|
|
3826
|
-
$[
|
|
3827
|
-
$[
|
|
3828
|
-
$[
|
|
3829
|
-
$[
|
|
3830
|
-
} else
|
|
3831
|
-
let
|
|
3832
|
-
if ($[
|
|
3833
|
-
|
|
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, {
|
|
3834
3921
|
alignPosition,
|
|
3835
3922
|
alignAnchor,
|
|
3836
3923
|
bottomLine: bottomLineSlot,
|
|
3837
3924
|
optimizeOptions
|
|
3838
3925
|
});
|
|
3839
|
-
$[
|
|
3840
|
-
$[
|
|
3841
|
-
$[
|
|
3842
|
-
$[
|
|
3843
|
-
$[
|
|
3844
|
-
} else
|
|
3845
|
-
let
|
|
3846
|
-
if ($[
|
|
3847
|
-
|
|
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, {
|
|
3848
3935
|
onElementMounted: setLayoutEl,
|
|
3849
|
-
className:
|
|
3936
|
+
className: t5,
|
|
3850
3937
|
onLayoutChange: setIsVertical,
|
|
3851
3938
|
verticalImmerseCover,
|
|
3852
|
-
coverSlot:
|
|
3853
|
-
thumbSlot:
|
|
3854
|
-
smallControlsSlot:
|
|
3855
|
-
backgroundSlot:
|
|
3856
|
-
bigControlsSlot:
|
|
3857
|
-
controlsSlot:
|
|
3858
|
-
horizontalBottomControls:
|
|
3859
|
-
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,
|
|
3860
3947
|
hideLyric: hideLyricView,
|
|
3861
3948
|
...rest
|
|
3862
3949
|
}) });
|
|
3863
|
-
$[
|
|
3864
|
-
$[
|
|
3865
|
-
$[
|
|
3866
|
-
$[
|
|
3867
|
-
$[
|
|
3868
|
-
$[
|
|
3869
|
-
$[
|
|
3870
|
-
$[
|
|
3871
|
-
$[
|
|
3872
|
-
$[
|
|
3873
|
-
$[
|
|
3874
|
-
$[
|
|
3875
|
-
} else
|
|
3876
|
-
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;
|
|
3877
3964
|
};
|
|
3878
3965
|
function _temp(v) {
|
|
3879
3966
|
return v.name;
|
|
@@ -3893,10 +3980,14 @@ exports.AudioFFTVisualizer = AudioFFTVisualizer;
|
|
|
3893
3980
|
exports.AudioQualityTag = AudioQualityTag;
|
|
3894
3981
|
exports.AudioQualityType = AudioQualityType;
|
|
3895
3982
|
exports.AutoLyricLayout = AutoLyricLayout;
|
|
3983
|
+
exports.BACKGROUND_RENDERERS = BACKGROUND_RENDERERS;
|
|
3896
3984
|
exports.BouncingSlider = BouncingSlider;
|
|
3985
|
+
exports.CSS_BACKGROUND_RENDERER_ID = CSS_BACKGROUND_RENDERER_ID;
|
|
3897
3986
|
exports.ControlThumb = ControlThumb;
|
|
3898
3987
|
exports.Cover = Cover;
|
|
3988
|
+
exports.DEFAULT_BACKGROUND_RENDERER_ID = DEFAULT_BACKGROUND_RENDERER_ID;
|
|
3899
3989
|
exports.HorizontalLayout = HorizontalLayout;
|
|
3990
|
+
exports.LYRIC_BACKGROUND_RENDERER_STORAGE_KEY = LYRIC_BACKGROUND_RENDERER_STORAGE_KEY;
|
|
3900
3991
|
exports.LyricPlayerImplementation = LyricPlayerImplementation;
|
|
3901
3992
|
exports.LyricSizePreset = LyricSizePreset;
|
|
3902
3993
|
exports.MediaButton = MediaButton;
|
|
@@ -3927,6 +4018,7 @@ exports.isLyricPageOpenedAtom = isLyricPageOpenedAtom;
|
|
|
3927
4018
|
exports.isRepeatEnabledAtom = isRepeatEnabledAtom;
|
|
3928
4019
|
exports.isShuffleActiveAtom = isShuffleActiveAtom;
|
|
3929
4020
|
exports.isShuffleEnabledAtom = isShuffleEnabledAtom;
|
|
4021
|
+
exports.isolationRendererOptionsAtom = isolationRendererOptionsAtom;
|
|
3930
4022
|
exports.lowFreqVolumeAtom = lowFreqVolumeAtom;
|
|
3931
4023
|
exports.lyricBackgroundFPSAtom = lyricBackgroundFPSAtom;
|
|
3932
4024
|
exports.lyricBackgroundRenderScaleAtom = lyricBackgroundRenderScaleAtom;
|
|
@@ -3965,6 +4057,7 @@ exports.onSeekPositionAtom = onSeekPositionAtom;
|
|
|
3965
4057
|
exports.onToggleShuffleAtom = onToggleShuffleAtom;
|
|
3966
4058
|
exports.playerControlsTypeAtom = playerControlsTypeAtom;
|
|
3967
4059
|
exports.repeatModeAtom = repeatModeAtom;
|
|
4060
|
+
exports.resolveBackgroundRenderer = resolveBackgroundRenderer;
|
|
3968
4061
|
exports.showBottomControlAtom = showBottomControlAtom;
|
|
3969
4062
|
exports.showMusicAlbumAtom = showMusicAlbumAtom;
|
|
3970
4063
|
exports.showMusicArtistsAtom = showMusicArtistsAtom;
|