@fuxishi/vitepress-theme 1.0.11 → 1.0.13
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
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { defineComponent as e, nextTick as t, onBeforeUnmount as n, onMounted as r, watch as i } from "vue";
|
|
2
|
-
import { useData as a, useRoute as o } from "vitepress";
|
|
3
|
-
import { Vibrant as
|
|
2
|
+
import { useData as a, useRoute as o, withBase as s } from "vitepress";
|
|
3
|
+
import { Vibrant as c } from "node-vibrant/browser";
|
|
4
4
|
//#region .vitepress/components/FxHeroImageBg.ts
|
|
5
|
-
var
|
|
6
|
-
function
|
|
5
|
+
var l = "fx-hero-colors";
|
|
6
|
+
function u() {
|
|
7
7
|
try {
|
|
8
|
-
let e = localStorage.getItem(
|
|
8
|
+
let e = localStorage.getItem(l);
|
|
9
9
|
return e ? JSON.parse(e) : null;
|
|
10
10
|
} catch {
|
|
11
11
|
return null;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function d(e) {
|
|
15
15
|
try {
|
|
16
|
-
localStorage.setItem(
|
|
16
|
+
localStorage.setItem(l, JSON.stringify(e));
|
|
17
17
|
} catch {}
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function f(e) {
|
|
20
20
|
return [
|
|
21
21
|
e.Vibrant,
|
|
22
22
|
e.DarkVibrant,
|
|
@@ -26,63 +26,63 @@ function d(e) {
|
|
|
26
26
|
e.LightMuted
|
|
27
27
|
].filter(Boolean);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function p(e) {
|
|
30
30
|
return e.slice().sort((e, t) => e.hsl[0] - t.hsl[0]).map((e) => e.hex);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
let t =
|
|
32
|
+
function m(e) {
|
|
33
|
+
let t = f(e);
|
|
34
34
|
if (t.length === 0) return "-webkit-linear-gradient(-45deg, #bd34fe 50%, #47caff 50%)";
|
|
35
|
-
let n =
|
|
35
|
+
let n = p(t);
|
|
36
36
|
return `conic-gradient(from 0deg, ${[...n, n[0]].join(", ")})`;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function h(e, t) {
|
|
39
39
|
let n = Math.abs(e - t);
|
|
40
40
|
return Math.min(n, 360 - n);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
let t =
|
|
42
|
+
function g(e) {
|
|
43
|
+
let t = f(e);
|
|
44
44
|
if (t.length < 2) return "linear-gradient(120deg, #bd34fe, #41d1ff)";
|
|
45
45
|
let n = -1, r = [t[0].hex, t[1].hex];
|
|
46
46
|
for (let e = 0; e < t.length; e++) for (let i = e + 1; i < t.length; i++) {
|
|
47
|
-
let a =
|
|
47
|
+
let a = h(t[e].hsl[0], t[i].hsl[0]);
|
|
48
48
|
a > n && (n = a, r = [t[e].hex, t[i].hex]);
|
|
49
49
|
}
|
|
50
50
|
return `linear-gradient(120deg, ${r[0]}, ${r[1]})`;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function _(e) {
|
|
53
53
|
return `${parseInt(e.slice(1, 3), 16)}, ${parseInt(e.slice(3, 5), 16)}, ${parseInt(e.slice(5, 7), 16)}`;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
let t =
|
|
55
|
+
function v(e) {
|
|
56
|
+
let t = f(e);
|
|
57
57
|
if (t.length < 2) return ["189, 52, 254", "65, 209, 255"];
|
|
58
58
|
let n = -1, r = [t[0], t[1]];
|
|
59
59
|
for (let e = 0; e < t.length; e++) for (let i = e + 1; i < t.length; i++) {
|
|
60
|
-
let a =
|
|
60
|
+
let a = h(t[e].hsl[0], t[i].hsl[0]);
|
|
61
61
|
a > n && (n = a, r = [t[e], t[i]]);
|
|
62
62
|
}
|
|
63
|
-
return [
|
|
63
|
+
return [_(r[0].hex), _(r[1].hex)];
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function y() {
|
|
66
66
|
return document.documentElement.classList.contains("dark");
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
let [t, n] =
|
|
68
|
+
function b(e) {
|
|
69
|
+
let [t, n] = v(e);
|
|
70
70
|
return {
|
|
71
|
-
imageGradient:
|
|
72
|
-
nameGradient:
|
|
71
|
+
imageGradient: m(e),
|
|
72
|
+
nameGradient: g(e),
|
|
73
73
|
beamC1: t,
|
|
74
74
|
beamC2: n
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function x(e) {
|
|
78
78
|
let t = document.documentElement;
|
|
79
79
|
t.style.setProperty("--vp-home-hero-image-background-image", e.imageGradient), t.style.setProperty("--vp-home-hero-name-background", e.nameGradient), t.style.setProperty("--fx-beam-c1", e.beamC1), t.style.setProperty("--fx-beam-c2", e.beamC2);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function S(e) {
|
|
82
82
|
let t = document.documentElement;
|
|
83
83
|
t.style.setProperty("--fx-beam-c1", e.beamC1), t.style.setProperty("--fx-beam-c2", e.beamC2);
|
|
84
84
|
}
|
|
85
|
-
var
|
|
85
|
+
var C = e({
|
|
86
86
|
props: { heroImageColor: {
|
|
87
87
|
type: Boolean,
|
|
88
88
|
default: !1
|
|
@@ -90,38 +90,38 @@ var S = e({
|
|
|
90
90
|
render: () => null,
|
|
91
91
|
setup(e) {
|
|
92
92
|
if (!e.heroImageColor) return;
|
|
93
|
-
let
|
|
94
|
-
function
|
|
93
|
+
let f = null, p = o(), { frontmatter: m, site: h } = a();
|
|
94
|
+
function g() {
|
|
95
95
|
let e = document.documentElement;
|
|
96
96
|
e.style.removeProperty("--vp-home-hero-image-background-image"), e.style.removeProperty("--vp-home-hero-name-background"), e.style.removeProperty("--fx-beam-c1"), e.style.removeProperty("--fx-beam-c2");
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
return
|
|
98
|
+
function _(e) {
|
|
99
|
+
return y() ? e.dark || e.light : e.light || e.dark;
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
let t =
|
|
103
|
-
return !t || !t.images ? !1 : e && (e.light && t.images.light && e.light !== t.images.light || e.dark && t.images.dark && e.dark !== t.images.dark) ? (localStorage.removeItem(
|
|
101
|
+
function v(e) {
|
|
102
|
+
let t = u();
|
|
103
|
+
return !t || !t.images ? !1 : e && (e.light && t.images.light && e.light !== t.images.light || e.dark && t.images.dark && e.dark !== t.images.dark) ? (localStorage.removeItem(l), !0) : !1;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
let e =
|
|
105
|
+
function C() {
|
|
106
|
+
let e = u();
|
|
107
107
|
if (!e) return !1;
|
|
108
|
-
let t =
|
|
109
|
-
return t ? (
|
|
108
|
+
let t = _(e);
|
|
109
|
+
return t ? (x(t), !0) : !1;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
let e =
|
|
111
|
+
function w() {
|
|
112
|
+
let e = u();
|
|
113
113
|
if (!e) return !1;
|
|
114
|
-
let t =
|
|
115
|
-
return t ? (
|
|
114
|
+
let t = _(e);
|
|
115
|
+
return t ? (S(t), !0) : !1;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
return
|
|
117
|
+
function T() {
|
|
118
|
+
return m.value.fxHeroImages || {};
|
|
119
119
|
}
|
|
120
|
-
async function
|
|
120
|
+
async function E() {
|
|
121
121
|
try {
|
|
122
122
|
let e = await import(
|
|
123
123
|
/* @vite-ignore */
|
|
124
|
-
"
|
|
124
|
+
[h.value.base, "index.md"].join("")
|
|
125
125
|
), t = (typeof e.__pageData == "string" ? JSON.parse(e.__pageData) : e.__pageData)?.frontmatter?.hero?.image;
|
|
126
126
|
return t ? typeof t == "string" ? {
|
|
127
127
|
light: t,
|
|
@@ -134,48 +134,48 @@ var S = e({
|
|
|
134
134
|
return null;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
async function
|
|
137
|
+
async function D(e, t) {
|
|
138
138
|
let n = e.src;
|
|
139
139
|
if (n) try {
|
|
140
|
-
let e =
|
|
141
|
-
(
|
|
142
|
-
let r =
|
|
143
|
-
r[t] = e, r.images ||= {}, r.images[t] = n,
|
|
140
|
+
let e = b(await c.from(n).quality(1).getPalette());
|
|
141
|
+
(y() && t === "dark" || !y() && t === "light") && x(e);
|
|
142
|
+
let r = u() || {};
|
|
143
|
+
r[t] = e, r.images ||= {}, r.images[t] = n, d(r);
|
|
144
144
|
} catch {}
|
|
145
145
|
}
|
|
146
|
-
async function
|
|
146
|
+
async function O(e, t) {
|
|
147
147
|
try {
|
|
148
|
-
let n =
|
|
149
|
-
return r[t] = n, r.images ||= {}, r.images[t] = e,
|
|
148
|
+
let n = b(await c.from(e).quality(1).getPalette()), r = u() || {};
|
|
149
|
+
return r[t] = n, r.images ||= {}, r.images[t] = e, d(r), n;
|
|
150
150
|
} catch {
|
|
151
151
|
return null;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
async function
|
|
154
|
+
async function k(e, t = !0) {
|
|
155
155
|
if (!e.light && !e.dark) return;
|
|
156
|
-
let
|
|
156
|
+
let n = {};
|
|
157
157
|
if (e.light) {
|
|
158
|
-
let
|
|
159
|
-
|
|
158
|
+
let r = await O(t ? s(e.light) : e.light, "light");
|
|
159
|
+
r && (n.light = r);
|
|
160
160
|
}
|
|
161
161
|
if (e.dark) {
|
|
162
|
-
let
|
|
163
|
-
|
|
162
|
+
let r = await O(t ? s(e.dark) : e.dark, "dark");
|
|
163
|
+
r && (n.dark = r);
|
|
164
164
|
}
|
|
165
|
-
if (
|
|
166
|
-
let e =
|
|
167
|
-
e &&
|
|
165
|
+
if (n.light || n.dark) {
|
|
166
|
+
let e = y() ? n.dark || n.light : n.light || n.dark;
|
|
167
|
+
e && x(e);
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
async function
|
|
171
|
-
let e =
|
|
170
|
+
async function A() {
|
|
171
|
+
let e = T();
|
|
172
172
|
if (e.light || e.dark) {
|
|
173
|
-
await
|
|
173
|
+
await k(e);
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
|
-
let t = await
|
|
176
|
+
let t = await E();
|
|
177
177
|
if (t) {
|
|
178
|
-
await
|
|
178
|
+
await k(t);
|
|
179
179
|
return;
|
|
180
180
|
}
|
|
181
181
|
try {
|
|
@@ -183,34 +183,34 @@ var S = e({
|
|
|
183
183
|
t.forEach((e) => {
|
|
184
184
|
let t = e.getAttribute("src");
|
|
185
185
|
t && (e.classList.contains("dark") ? n.dark = t : n.light = t);
|
|
186
|
-
}), (n.light || n.dark) && await
|
|
186
|
+
}), (n.light || n.dark) && await k(n, !1);
|
|
187
187
|
} catch {}
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function j() {
|
|
190
190
|
let e = document.querySelector(".VPHero .image-container img.VPImage.light"), t = document.querySelector(".VPHero .image-container img.VPImage.dark");
|
|
191
|
-
e || t ? (e && e.complete && e.naturalWidth > 0 ?
|
|
191
|
+
e || t ? (e && e.complete && e.naturalWidth > 0 ? D(e, "light") : e && e.addEventListener("load", () => D(e, "light"), { once: !0 }), t && t.complete && t.naturalWidth > 0 ? D(t, "dark") : t && t.addEventListener("load", () => D(t, "dark"), { once: !0 })) : (g(), w(), E().then((e) => {
|
|
192
192
|
if (e && (e.light || e.dark)) {
|
|
193
|
-
let t =
|
|
194
|
-
t?.images && (e.light && t.images.light && e.light !== t.images.light || e.dark && t.images.dark && e.dark !== t.images.dark) && (localStorage.removeItem(
|
|
193
|
+
let t = u();
|
|
194
|
+
t?.images && (e.light && t.images.light && e.light !== t.images.light || e.dark && t.images.dark && e.dark !== t.images.dark) && (localStorage.removeItem(l), k(e));
|
|
195
195
|
}
|
|
196
|
-
}),
|
|
196
|
+
}), A());
|
|
197
197
|
}
|
|
198
198
|
r(() => {
|
|
199
|
-
|
|
199
|
+
v(T()), C() || A(), j(), f = new MutationObserver((e) => {
|
|
200
200
|
for (let t of e) if (t.attributeName === "class") {
|
|
201
|
-
|
|
201
|
+
w(), j();
|
|
202
202
|
break;
|
|
203
203
|
}
|
|
204
|
-
}),
|
|
204
|
+
}), f.observe(document.documentElement, {
|
|
205
205
|
attributes: !0,
|
|
206
206
|
attributeFilter: ["class"]
|
|
207
207
|
});
|
|
208
|
-
}), i(() =>
|
|
209
|
-
t(
|
|
208
|
+
}), i(() => p.path, () => {
|
|
209
|
+
t(j);
|
|
210
210
|
}), n(() => {
|
|
211
|
-
|
|
211
|
+
f?.disconnect(), g();
|
|
212
212
|
});
|
|
213
213
|
}
|
|
214
214
|
});
|
|
215
215
|
//#endregion
|
|
216
|
-
export {
|
|
216
|
+
export { C as default };
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { t as e } from "./icons-DtAsNqxj.js";
|
|
2
|
-
import { Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, nextTick as
|
|
3
|
-
import { useData as
|
|
4
|
-
import { ElSlider as
|
|
2
|
+
import { Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, nextTick as ee, normalizeClass as c, onBeforeUnmount as l, onMounted as u, openBlock as d, ref as f, renderList as p, toDisplayString as m, unref as h, vShow as g, watchEffect as _, withDirectives as v } from "vue";
|
|
3
|
+
import { useData as y, withBase as b } from "vitepress";
|
|
4
|
+
import { ElSlider as x } from "element-plus";
|
|
5
5
|
//#region .vitepress/components/FxMusicBall.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var
|
|
6
|
+
var S = [
|
|
7
7
|
"src",
|
|
8
8
|
"autoplay",
|
|
9
9
|
"loop"
|
|
10
|
-
],
|
|
10
|
+
], C = ["src", "autoplay"], w = { class: "fx-music-ball__inner" }, T = { class: "fx-play-pause" }, E = ["innerHTML"], D = ["innerHTML"], O = { class: "fx-time" }, k = { class: "fx-duration" }, te = { class: "fx-volume" }, ne = ["innerHTML"], re = ["innerHTML"], ie = ["innerHTML"], ae = {
|
|
11
11
|
id: "fx-progress-gradient",
|
|
12
12
|
x1: "0%",
|
|
13
13
|
y1: "0%",
|
|
14
14
|
x2: "100%",
|
|
15
15
|
y2: "100%"
|
|
16
|
-
},
|
|
16
|
+
}, oe = ["stop-color"], se = ["stop-color"], ce = ["stroke-dasharray"], le = {
|
|
17
17
|
key: 2,
|
|
18
18
|
class: "fx-orbit-ring"
|
|
19
|
-
},
|
|
19
|
+
}, ue = {
|
|
20
20
|
key: 3,
|
|
21
21
|
class: "fx-music-list"
|
|
22
|
-
},
|
|
22
|
+
}, de = ["onClick"], fe = ["d"], A = /* @__PURE__ */ s({
|
|
23
23
|
__name: "FxMusicBall",
|
|
24
24
|
setup(s) {
|
|
25
|
-
let
|
|
25
|
+
let A = [
|
|
26
26
|
"M123.252 73.826h111.169v790.935h-111.169z",
|
|
27
27
|
"M346.361 465.952h111.169v395.467h-111.169z",
|
|
28
28
|
"M569.466 229.325h111.169v636.444h-111.169z",
|
|
29
29
|
"M792.574 391.584h111.169v475.788h-111.169z"
|
|
30
|
-
], { site:
|
|
30
|
+
], { site: j } = y(), M = j.value.themeConfig.musicBall, N = f(null), P = f(0), F = f(0), I = f(0), L = f(!1), R = f(50), z = f(!1), B = f(0), V = f(!!M.autoplay), H = f(!1), U = 2 * Math.PI * 22, W = f("#bd34fe"), G = f("#41d1ff");
|
|
31
31
|
function K() {
|
|
32
32
|
let e = getComputedStyle(document.documentElement), t = e.getPropertyValue("--fx-beam-c1").trim(), n = e.getPropertyValue("--fx-beam-c2").trim();
|
|
33
33
|
t && (W.value = `rgb(${t})`), n && (G.value = `rgb(${n})`);
|
|
34
34
|
}
|
|
35
35
|
let q = null;
|
|
36
|
-
|
|
36
|
+
u(() => {
|
|
37
37
|
K(), q = new MutationObserver((e) => {
|
|
38
38
|
for (let t of e) if (t.attributeName === "style") {
|
|
39
39
|
K();
|
|
@@ -43,27 +43,30 @@ var x = [
|
|
|
43
43
|
attributes: !0,
|
|
44
44
|
attributeFilter: ["style"]
|
|
45
45
|
});
|
|
46
|
-
}),
|
|
46
|
+
}), l(() => {
|
|
47
47
|
q?.disconnect();
|
|
48
48
|
});
|
|
49
|
-
let
|
|
49
|
+
let pe = n(() => {
|
|
50
50
|
let e = U - X.value / 100 * U;
|
|
51
51
|
return `${U - e} ${e}`;
|
|
52
|
-
}), J = n(() => M.src || M.list?.length === 1),
|
|
52
|
+
}), J = n(() => M.src || M.list?.length === 1), me = n(() => b(M.src || M.list?.[0]?.src || "")), Y = n(() => (M.list || []).map((e) => ({
|
|
53
|
+
...e,
|
|
54
|
+
src: b(e.src)
|
|
55
|
+
}))), X = n({
|
|
53
56
|
get() {
|
|
54
57
|
return I.value / P.value * 100 || 0;
|
|
55
58
|
},
|
|
56
59
|
set(e) {
|
|
57
60
|
F.value = P.value * e / 100, !L.value && N.value && (N.value.currentTime = F.value);
|
|
58
61
|
}
|
|
59
|
-
}),
|
|
60
|
-
|
|
62
|
+
}), he = n(() => $(P.value)), Z = n(() => $(I.value));
|
|
63
|
+
_(() => {
|
|
61
64
|
N.value && (z.value = !1, N.value.volume = R.value / 100);
|
|
62
|
-
}),
|
|
65
|
+
}), _(() => {
|
|
63
66
|
N.value && (N.value.muted = z.value);
|
|
64
67
|
});
|
|
65
68
|
let Q = {};
|
|
66
|
-
|
|
69
|
+
u(() => {
|
|
67
70
|
let e = N.value;
|
|
68
71
|
if (!e) return;
|
|
69
72
|
let t = {
|
|
@@ -87,47 +90,47 @@ var x = [
|
|
|
87
90
|
}
|
|
88
91
|
B.value = 0;
|
|
89
92
|
} else B.value++;
|
|
90
|
-
|
|
93
|
+
ee(() => e.play());
|
|
91
94
|
}
|
|
92
95
|
};
|
|
93
96
|
for (let [n, r] of Object.entries(t)) e.addEventListener(n, r);
|
|
94
97
|
Q = t;
|
|
95
|
-
}),
|
|
98
|
+
}), l(() => {
|
|
96
99
|
let e = N.value;
|
|
97
100
|
if (e) {
|
|
98
101
|
for (let [t, n] of Object.entries(Q)) e.removeEventListener(t, n);
|
|
99
102
|
Q = {};
|
|
100
103
|
}
|
|
101
104
|
});
|
|
102
|
-
let
|
|
105
|
+
let ge = () => {
|
|
103
106
|
L.value = !L.value, L.value ? N.value?.play() : N.value?.pause(), !J.value && !V.value && (V.value = !0);
|
|
104
|
-
},
|
|
107
|
+
}, _e = () => {
|
|
105
108
|
N.value && (N.value.currentTime = F.value);
|
|
106
|
-
},
|
|
109
|
+
}, ve = (e) => {
|
|
107
110
|
V.value = !0, B.value = e;
|
|
108
|
-
},
|
|
111
|
+
}, ye = () => {
|
|
109
112
|
H.value = !1;
|
|
110
113
|
};
|
|
111
114
|
function $(e) {
|
|
112
115
|
return e = Math.max(0, Number(e) || 0), `${Math.floor(e % 3600 / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
|
|
113
116
|
}
|
|
114
|
-
return (n, s) => (
|
|
115
|
-
class:
|
|
117
|
+
return (n, s) => (d(), i("div", {
|
|
118
|
+
class: c(["fx-music-ball", {
|
|
116
119
|
active: H.value,
|
|
117
120
|
"is-playing": L.value
|
|
118
121
|
}]),
|
|
119
|
-
onMouseleave:
|
|
122
|
+
onMouseleave: ye
|
|
120
123
|
}, [
|
|
121
|
-
J.value ? (
|
|
124
|
+
J.value ? (d(), i("audio", {
|
|
122
125
|
key: 0,
|
|
123
126
|
class: "audio",
|
|
124
|
-
src:
|
|
125
|
-
autoplay:
|
|
126
|
-
loop:
|
|
127
|
+
src: me.value,
|
|
128
|
+
autoplay: h(M).autoplay,
|
|
129
|
+
loop: h(M).loop,
|
|
127
130
|
style: { display: "none" },
|
|
128
131
|
ref_key: "audioRef",
|
|
129
132
|
ref: N
|
|
130
|
-
}, null, 8,
|
|
133
|
+
}, null, 8, S)) : (d(), i("audio", {
|
|
131
134
|
key: 1,
|
|
132
135
|
class: "audio",
|
|
133
136
|
src: Y.value[B.value]?.src,
|
|
@@ -135,55 +138,55 @@ var x = [
|
|
|
135
138
|
style: { display: "none" },
|
|
136
139
|
ref_key: "audioRef",
|
|
137
140
|
ref: N
|
|
138
|
-
}, null, 8,
|
|
139
|
-
a("div",
|
|
140
|
-
a("div",
|
|
141
|
-
a("div",
|
|
142
|
-
a("div",
|
|
141
|
+
}, null, 8, C)),
|
|
142
|
+
a("div", w, [
|
|
143
|
+
a("div", T, [v(a("span", { innerHTML: h(e)("music-ball/playfill", 20) }, null, 8, E), [[g, !L.value]]), v(a("span", { innerHTML: h(e)("music-ball/pause", 26) }, null, 8, D), [[g, L.value]])]),
|
|
144
|
+
a("div", O, m(Z.value) + "\xA0/\xA0" + m(he.value), 1),
|
|
145
|
+
a("div", k, [o(h(x), {
|
|
143
146
|
style: { width: "100%" },
|
|
144
147
|
"show-tooltip": !1,
|
|
145
148
|
modelValue: X.value,
|
|
146
149
|
"onUpdate:modelValue": s[0] ||= (e) => X.value = e,
|
|
147
|
-
onChange:
|
|
150
|
+
onChange: _e
|
|
148
151
|
}, null, 8, ["modelValue"])]),
|
|
149
|
-
a("div",
|
|
150
|
-
o(
|
|
152
|
+
a("div", te, [
|
|
153
|
+
o(h(x), {
|
|
151
154
|
style: { width: "100%" },
|
|
152
155
|
"show-tooltip": !1,
|
|
153
156
|
modelValue: R.value,
|
|
154
157
|
"onUpdate:modelValue": s[1] ||= (e) => R.value = e
|
|
155
158
|
}, null, 8, ["modelValue"]),
|
|
156
|
-
|
|
159
|
+
v(a("span", {
|
|
157
160
|
class: "fx-icon-volume",
|
|
158
161
|
onClick: s[2] ||= (e) => z.value = !z.value,
|
|
159
|
-
innerHTML:
|
|
160
|
-
}, null, 8,
|
|
161
|
-
|
|
162
|
+
innerHTML: h(e)("music-ball/volume_off", 20)
|
|
163
|
+
}, null, 8, ne), [[g, z.value]]),
|
|
164
|
+
v(a("span", {
|
|
162
165
|
class: "fx-icon-volume",
|
|
163
166
|
onClick: s[3] ||= (e) => z.value = !z.value,
|
|
164
|
-
innerHTML:
|
|
165
|
-
}, null, 8,
|
|
167
|
+
innerHTML: h(e)("music-ball/volume_up", 20)
|
|
168
|
+
}, null, 8, re), [[g, !z.value]])
|
|
166
169
|
]),
|
|
167
|
-
J.value ? r("", !0) : (
|
|
170
|
+
J.value ? r("", !0) : (d(), i("div", {
|
|
168
171
|
key: 0,
|
|
169
172
|
class: "fx-music-list-button",
|
|
170
173
|
onClick: s[4] ||= (e) => H.value = !H.value
|
|
171
|
-
}, [a("span", { innerHTML:
|
|
174
|
+
}, [a("span", { innerHTML: h(e)("music-ball/music_list", 20) }, null, 8, ie)]))
|
|
172
175
|
]),
|
|
173
|
-
(
|
|
176
|
+
(d(), i("svg", {
|
|
174
177
|
class: "fx-progress-ring",
|
|
175
178
|
width: "50",
|
|
176
179
|
height: "50",
|
|
177
180
|
viewBox: "0 0 50 50",
|
|
178
|
-
onClick:
|
|
181
|
+
onClick: ge
|
|
179
182
|
}, [
|
|
180
|
-
a("defs", null, [a("linearGradient",
|
|
183
|
+
a("defs", null, [a("linearGradient", ae, [a("stop", {
|
|
181
184
|
offset: "0%",
|
|
182
185
|
"stop-color": W.value
|
|
183
|
-
}, null, 8,
|
|
186
|
+
}, null, 8, oe), a("stop", {
|
|
184
187
|
offset: "100%",
|
|
185
188
|
"stop-color": G.value
|
|
186
|
-
}, null, 8,
|
|
189
|
+
}, null, 8, se)])]),
|
|
187
190
|
s[5] ||= a("circle", {
|
|
188
191
|
class: "fx-progress-track",
|
|
189
192
|
cx: "25",
|
|
@@ -201,26 +204,26 @@ var x = [
|
|
|
201
204
|
stroke: "url(#fx-progress-gradient)",
|
|
202
205
|
"stroke-width": "2.5",
|
|
203
206
|
"stroke-linecap": "round",
|
|
204
|
-
"stroke-dasharray":
|
|
205
|
-
}, null, 8,
|
|
207
|
+
"stroke-dasharray": pe.value
|
|
208
|
+
}, null, 8, ce)
|
|
206
209
|
])),
|
|
207
|
-
L.value ? (
|
|
208
|
-
H.value ? (
|
|
209
|
-
class:
|
|
210
|
+
L.value ? (d(), i("div", le)) : r("", !0),
|
|
211
|
+
H.value ? (d(), i("div", ue, [(d(!0), i(t, null, p(Y.value, (e, n) => (d(), i("div", {
|
|
212
|
+
class: c(["fx-music-list-item", B.value === n ? "active" : ""]),
|
|
210
213
|
key: n,
|
|
211
|
-
onClick: (e) =>
|
|
212
|
-
}, [B.value === n ? (
|
|
214
|
+
onClick: (e) => ve(n)
|
|
215
|
+
}, [B.value === n ? (d(), i("svg", {
|
|
213
216
|
key: 0,
|
|
214
|
-
class:
|
|
217
|
+
class: c(["image-live", { playing: L.value }]),
|
|
215
218
|
viewBox: "0 0 1024 1024",
|
|
216
219
|
xmlns: "http://www.w3.org/2000/svg"
|
|
217
|
-
}, [(
|
|
220
|
+
}, [(d(), i(t, null, p(A, (e, t) => a("path", {
|
|
218
221
|
key: t,
|
|
219
222
|
d: e,
|
|
220
|
-
class:
|
|
221
|
-
}, null, 10,
|
|
223
|
+
class: c(["bar", `bar-${t + 1}`])
|
|
224
|
+
}, null, 10, fe)), 64))], 2)) : r("", !0), a("span", null, m(e.name), 1)], 10, de))), 128)), s[6] ||= a("div", { class: "fx-music-list-sep" }, null, -1)])) : r("", !0)
|
|
222
225
|
], 34));
|
|
223
226
|
}
|
|
224
227
|
});
|
|
225
228
|
//#endregion
|
|
226
|
-
export {
|
|
229
|
+
export { A as default };
|
package/dist/index.js
CHANGED
|
@@ -32,7 +32,7 @@ var d = {
|
|
|
32
32
|
}, t = document.querySelector(".VPNavBarTitle .title");
|
|
33
33
|
t && (x = new ResizeObserver(e), x.observe(t)), e();
|
|
34
34
|
}), a(() => x?.disconnect());
|
|
35
|
-
let w = c(() => import("./chunk/FxMusicBall-
|
|
35
|
+
let w = c(() => import("./chunk/FxMusicBall-CTP51ydo.js"), [{ style: { display: g.musicBall && g.musicBall.visible ? "" : "none" } }]), T = c(() => import("./chunk/FxHomeFeatureBefore-Cd9m9wit.js")), E = c(() => import("./chunk/FxConfetti-DFRD5KKS.js"), [{ confetti: g.confetti }]), D = c(() => import("./chunk/FxHeroImageBg-AXhVm0se.js"), [{ heroImageColor: g.heroImageColor }]), O = c(() => import("./chunk/FxCodeBlockFold-C7zqZ39g.js"), [{ lines: C }]);
|
|
36
36
|
return () => [
|
|
37
37
|
S && n("style", `:root{--fx-code-fold-lines:${C || 10}}`),
|
|
38
38
|
g.heroImageColor && n("style", ":root{--vp-home-hero-image-background-image:none;--vp-home-hero-name-color:transparent;--vp-home-hero-name-background:none}"),
|