@applemusic-like-lyrics/core 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/amll-core.cjs +398 -214
- package/dist/amll-core.cjs.map +1 -1
- package/dist/amll-core.d.cts +125 -67
- package/dist/amll-core.d.mts +125 -67
- package/dist/amll-core.mjs +398 -214
- package/dist/amll-core.mjs.map +1 -1
- package/dist/style.css +129 -63
- package/package.json +2 -2
package/dist/style.css
CHANGED
|
@@ -29,21 +29,32 @@
|
|
|
29
29
|
--amll-lp-line-padding-x: 0;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
+
.FmKaba_lyricLineWrapper {
|
|
33
|
+
will-change: transform, opacity, filter;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
align-items: flex-start;
|
|
36
|
+
width: 100%;
|
|
37
|
+
transition: opacity .4s, filter .4s;
|
|
38
|
+
display: flex;
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: 0;
|
|
41
|
+
left: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
32
44
|
.FmKaba_lyricLine {
|
|
33
|
-
|
|
34
|
-
transform-origin: 0;
|
|
45
|
+
box-sizing: border-box;
|
|
35
46
|
width: var(--amll-lp-width, 100%);
|
|
36
47
|
min-width: var(--amll-lp-width, 100%);
|
|
37
48
|
max-width: var(--amll-lp-width, 100%);
|
|
38
49
|
contain: content;
|
|
50
|
+
backface-visibility: hidden;
|
|
51
|
+
transform-origin: 0;
|
|
39
52
|
will-change: transform;
|
|
40
|
-
box-sizing: border-box;
|
|
41
53
|
border-radius: .25em;
|
|
42
|
-
width: 100%;
|
|
43
54
|
height: fit-content;
|
|
44
55
|
padding: .5em 1em;
|
|
45
|
-
transition:
|
|
46
|
-
position:
|
|
56
|
+
transition: background-color .25s, box-shadow .25s;
|
|
57
|
+
position: relative;
|
|
47
58
|
|
|
48
59
|
@media screen and (width <= 500px) {
|
|
49
60
|
padding-left: 20px;
|
|
@@ -64,43 +75,6 @@
|
|
|
64
75
|
}
|
|
65
76
|
}
|
|
66
77
|
|
|
67
|
-
.FmKaba_lyricBgLine {
|
|
68
|
-
opacity: .0001;
|
|
69
|
-
font-size: max(calc(1em * var(--amll-lp-bg-line-scale, .7)), 10px);
|
|
70
|
-
padding: 1vh
|
|
71
|
-
calc(var(--amll-lp-line-padding-x, 1em) / var(--amll-lp-bg-line-scale, .7));
|
|
72
|
-
transition: opacity .25s, scale .5s, filter .2s, background-color .25s, box-shadow .25s;
|
|
73
|
-
|
|
74
|
-
& .FmKaba_lyricMainLine {
|
|
75
|
-
padding: 1.2em 1em;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&.FmKaba_active {
|
|
79
|
-
opacity: .4;
|
|
80
|
-
transition: opacity .5s .25s, scale 1.5s cubic-bezier(0, 1, 0, 1) .25s, filter .2s, background-color .25s, box-shadow .25s;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.amll-lyric-player {
|
|
85
|
-
&:hover .FmKaba_lyricLine {
|
|
86
|
-
filter: unset !important;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
&.FmKaba_hasDuetLine {
|
|
90
|
-
& .FmKaba_lyricLine:not(.FmKaba_lyricDuetLine) {
|
|
91
|
-
padding-right: 15%;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
& .FmKaba_lyricDuetLine {
|
|
95
|
-
padding-left: 15%;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
&:not(.playing) > .FmKaba_lyricBgLine {
|
|
100
|
-
opacity: .4;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
78
|
.FmKaba_lyricDuetLine {
|
|
105
79
|
text-align: right;
|
|
106
80
|
transform-origin: 100%;
|
|
@@ -147,8 +121,8 @@
|
|
|
147
121
|
|
|
148
122
|
& > span, & span.FmKaba_emphasizeWrapper {
|
|
149
123
|
white-space: pre-wrap;
|
|
150
|
-
will-change: transform;
|
|
151
124
|
vertical-align: bottom;
|
|
125
|
+
will-change: transform;
|
|
152
126
|
margin: -1em;
|
|
153
127
|
padding: 1em;
|
|
154
128
|
display: inline-block;
|
|
@@ -168,20 +142,87 @@
|
|
|
168
142
|
}
|
|
169
143
|
}
|
|
170
144
|
|
|
145
|
+
.FmKaba_lyricBgLine {
|
|
146
|
+
opacity: .4;
|
|
147
|
+
padding: 1vh
|
|
148
|
+
calc(var(--amll-lp-line-padding-x, 1em) / var(--amll-lp-bg-line-scale, .7));
|
|
149
|
+
font-size: max(calc(1em * var(--amll-lp-bg-line-scale, .7)), 10px);
|
|
150
|
+
transition: background-color .25s, box-shadow .25s;
|
|
151
|
+
|
|
152
|
+
& .FmKaba_lyricMainLine {
|
|
153
|
+
padding: 1.2em 1em;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&.FmKaba_active {
|
|
157
|
+
opacity: .4;
|
|
158
|
+
transition: background-color .25s, box-shadow .25s;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
171
162
|
.FmKaba_lyricSubLine {
|
|
172
163
|
opacity: .3;
|
|
173
164
|
font-size: max(.5em, 10px);
|
|
174
165
|
line-height: 1.5em;
|
|
175
166
|
transition: opacity .2s .25s;
|
|
167
|
+
|
|
168
|
+
@supports (mix-blend-mode: plus-lighter) {
|
|
169
|
+
opacity: .3;
|
|
170
|
+
}
|
|
176
171
|
}
|
|
177
172
|
|
|
178
|
-
.
|
|
179
|
-
|
|
173
|
+
.FmKaba_bottomLine {
|
|
174
|
+
cursor: default;
|
|
175
|
+
padding-top: 0;
|
|
176
|
+
padding-bottom: 0;
|
|
177
|
+
line-height: 1.8em;
|
|
178
|
+
|
|
179
|
+
&:empty {
|
|
180
|
+
height: 0;
|
|
181
|
+
margin: 0;
|
|
182
|
+
padding: 0;
|
|
183
|
+
display: none;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.FmKaba_bgWrapper {
|
|
188
|
+
z-index: -1;
|
|
189
|
+
align-items: inherit;
|
|
190
|
+
visibility: visible;
|
|
191
|
+
pointer-events: auto;
|
|
192
|
+
opacity: 0;
|
|
193
|
+
width: 100%;
|
|
194
|
+
transform-origin: var(--lyric-line-padding-x) top;
|
|
195
|
+
flex-direction: column;
|
|
196
|
+
transition: opacity .3s;
|
|
197
|
+
display: flex;
|
|
198
|
+
position: absolute;
|
|
199
|
+
top: 100%;
|
|
200
|
+
left: 0;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.FmKaba_bgWrapperTop {
|
|
204
|
+
transform-origin: var(--lyric-line-padding-x) bottom;
|
|
205
|
+
margin-top: -999px;
|
|
206
|
+
position: relative;
|
|
207
|
+
top: auto;
|
|
208
|
+
bottom: auto;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.FmKaba_bgWrapperActive {
|
|
212
|
+
opacity: 1;
|
|
213
|
+
position: relative;
|
|
214
|
+
top: auto;
|
|
215
|
+
bottom: auto;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.FmKaba_bgWrapperHidden {
|
|
219
|
+
visibility: hidden;
|
|
220
|
+
pointer-events: none;
|
|
180
221
|
}
|
|
181
222
|
|
|
182
223
|
.FmKaba_interludeDots {
|
|
183
|
-
transform-origin: center;
|
|
184
224
|
opacity: 0;
|
|
225
|
+
transform-origin: center;
|
|
185
226
|
gap: .25em;
|
|
186
227
|
width: fit-content;
|
|
187
228
|
height: clamp(.5em, 1vh, 3em);
|
|
@@ -196,8 +237,8 @@
|
|
|
196
237
|
}
|
|
197
238
|
|
|
198
239
|
& > * {
|
|
199
|
-
aspect-ratio: 1;
|
|
200
240
|
background-color: var(--amll-lp-color, white);
|
|
241
|
+
aspect-ratio: 1;
|
|
201
242
|
border-radius: 50%;
|
|
202
243
|
width: clamp(.5em, 1vh, 3em);
|
|
203
244
|
height: clamp(.5em, 1vh, 3em);
|
|
@@ -211,26 +252,51 @@
|
|
|
211
252
|
}
|
|
212
253
|
}
|
|
213
254
|
|
|
214
|
-
|
|
215
|
-
.
|
|
216
|
-
opacity: .3;
|
|
217
|
-
}
|
|
255
|
+
.FmKaba_disableSpring > *, .FmKaba_disableSpring .FmKaba_lyricLine {
|
|
256
|
+
transition: filter .25s, transform .5s, background-color .25s, box-shadow .25s;
|
|
218
257
|
}
|
|
219
258
|
|
|
220
259
|
.FmKaba_tmpDisableTransition {
|
|
221
260
|
transition: none !important;
|
|
222
261
|
}
|
|
223
262
|
|
|
224
|
-
.
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}
|
|
263
|
+
.amll-lyric-player {
|
|
264
|
+
--lyric-line-padding-x: 1em;
|
|
265
|
+
|
|
266
|
+
@media screen and (width <= 500px) {
|
|
267
|
+
--lyric-line-padding-x: 20px;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
&:hover .FmKaba_lyricLine, &:hover .FmKaba_lyricLineWrapper {
|
|
271
|
+
filter: unset !important;
|
|
272
|
+
}
|
|
230
273
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
274
|
+
&.FmKaba_hasDuetLine {
|
|
275
|
+
& .FmKaba_lyricLine:not(.FmKaba_lyricDuetLine) {
|
|
276
|
+
padding-right: 15%;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
& .FmKaba_lyricDuetLine {
|
|
280
|
+
padding-left: 15%;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
& .FmKaba_lyricLineWrapper:has(.FmKaba_lyricDuetLine) {
|
|
284
|
+
align-items: flex-end;
|
|
285
|
+
|
|
286
|
+
& .FmKaba_bgWrapper {
|
|
287
|
+
transform-origin: calc(100% - var(--lyric-line-padding-x)) top;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
& .FmKaba_bgWrapperTop {
|
|
291
|
+
transform-origin: calc(100% - var(--lyric-line-padding-x)) bottom;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
&:not(.FmKaba_playing) .FmKaba_bgWrapper {
|
|
297
|
+
opacity: 1;
|
|
298
|
+
position: relative;
|
|
299
|
+
top: auto;
|
|
300
|
+
bottom: auto;
|
|
301
|
+
}
|
|
236
302
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applemusic-like-lyrics/core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "AMLL 的纯 JS 核心组件框架,包括歌词显示组件和背景组件等其它可以复用的组件",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/amll-dev/applemusic-like-lyrics.git",
|
|
7
7
|
"directory": "packages/core",
|
|
8
8
|
"type": "git"
|
|
9
9
|
},
|
|
10
|
-
"license": "
|
|
10
|
+
"license": "AGPL-3.0-only",
|
|
11
11
|
"nx": {
|
|
12
12
|
"tags": [
|
|
13
13
|
"library"
|