@applemusic-like-lyrics/core 0.5.2 → 0.6.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 +1 -2
- package/dist/amll-core.cjs +5057 -1933
- package/dist/amll-core.cjs.map +1 -1
- package/dist/amll-core.d.cts +1884 -486
- package/dist/amll-core.d.mts +1884 -487
- package/dist/amll-core.mjs +5020 -1937
- package/dist/amll-core.mjs.map +1 -1
- package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
- package/dist/style.css +62 -31
- package/package.json +14 -10
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { __exportAll as t };
|
package/dist/style.css
CHANGED
|
@@ -29,11 +29,23 @@
|
|
|
29
29
|
--amll-lp-line-padding-x: 0;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
+
@property --bright-mask-alpha {
|
|
33
|
+
syntax: "<number>";
|
|
34
|
+
inherits: true;
|
|
35
|
+
initial-value: 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@property --dark-mask-alpha {
|
|
39
|
+
syntax: "<number>";
|
|
40
|
+
inherits: true;
|
|
41
|
+
initial-value: .2;
|
|
42
|
+
}
|
|
43
|
+
|
|
32
44
|
.FmKaba_lyricLineWrapper {
|
|
33
45
|
box-sizing: border-box;
|
|
34
46
|
width: 100%;
|
|
35
47
|
padding: .4em var(--lyric-line-padding-x);
|
|
36
|
-
will-change: transform
|
|
48
|
+
will-change: transform;
|
|
37
49
|
border-radius: .25em;
|
|
38
50
|
flex-direction: column;
|
|
39
51
|
align-items: flex-start;
|
|
@@ -44,11 +56,11 @@
|
|
|
44
56
|
top: 0;
|
|
45
57
|
left: 0;
|
|
46
58
|
|
|
47
|
-
&:hover {
|
|
59
|
+
&:not(.FmKaba_bottomLineWrapper):hover {
|
|
48
60
|
background-color: var(--amll-lp-hover-bg-color, #fff1);
|
|
49
61
|
}
|
|
50
62
|
|
|
51
|
-
&:active {
|
|
63
|
+
&:not(.FmKaba_bottomLineWrapper):active {
|
|
52
64
|
background-color: var(--amll-lp-hover-bg-color, #ffffff05);
|
|
53
65
|
}
|
|
54
66
|
}
|
|
@@ -63,12 +75,22 @@
|
|
|
63
75
|
contain-intrinsic-size: auto 40px;
|
|
64
76
|
backface-visibility: hidden;
|
|
65
77
|
transform-origin: 0;
|
|
66
|
-
|
|
78
|
+
--mask-alpha-duration: .45s;
|
|
79
|
+
--bright-mask-alpha: .2;
|
|
80
|
+
--dark-mask-alpha: .2;
|
|
67
81
|
height: fit-content;
|
|
82
|
+
transition: box-shadow .25s,
|
|
83
|
+
--bright-mask-alpha var(--mask-alpha-duration) ease-out,
|
|
84
|
+
--dark-mask-alpha var(--mask-alpha-duration) ease-out;
|
|
68
85
|
margin: -.2em;
|
|
69
86
|
padding: .2em;
|
|
70
|
-
transition: box-shadow .25s;
|
|
71
87
|
position: relative;
|
|
88
|
+
|
|
89
|
+
&.FmKaba_gradientMask {
|
|
90
|
+
--mask-alpha-duration: .3s;
|
|
91
|
+
--bright-mask-alpha: 1;
|
|
92
|
+
--dark-mask-alpha: .4;
|
|
93
|
+
}
|
|
72
94
|
}
|
|
73
95
|
|
|
74
96
|
.FmKaba_lyricDuetLine {
|
|
@@ -112,26 +134,33 @@
|
|
|
112
134
|
|
|
113
135
|
& .FmKaba_wordBody {
|
|
114
136
|
flex-direction: column;
|
|
115
|
-
align-items: center;
|
|
116
137
|
display: flex;
|
|
117
138
|
}
|
|
118
139
|
|
|
140
|
+
& .FmKaba_rubyBaseWord {
|
|
141
|
+
white-space: nowrap;
|
|
142
|
+
flex-wrap: nowrap;
|
|
143
|
+
justify-content: center;
|
|
144
|
+
display: inline-flex;
|
|
145
|
+
}
|
|
146
|
+
|
|
119
147
|
& > span, & span.FmKaba_emphasizeWrapper {
|
|
120
148
|
white-space: pre-wrap;
|
|
121
149
|
vertical-align: bottom;
|
|
122
|
-
will-change: transform, text-shadow;
|
|
123
150
|
contain: layout style;
|
|
124
151
|
margin: -1em;
|
|
125
152
|
padding: 1em;
|
|
126
153
|
display: inline-block;
|
|
127
154
|
|
|
128
|
-
|
|
129
|
-
backface-visibility: hidden;
|
|
155
|
+
& > span {
|
|
130
156
|
margin: -1em;
|
|
131
157
|
padding: 1em;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&.FmKaba_emphasize, & span.FmKaba_emphasize {
|
|
161
|
+
backface-visibility: hidden;
|
|
132
162
|
|
|
133
163
|
& > span {
|
|
134
|
-
will-change: transform, text-shadow;
|
|
135
164
|
backface-visibility: hidden;
|
|
136
165
|
margin: -1em;
|
|
137
166
|
padding: 1em;
|
|
@@ -143,7 +172,10 @@
|
|
|
143
172
|
.FmKaba_lyricBgLine {
|
|
144
173
|
opacity: .4;
|
|
145
174
|
font-size: max(calc(1em * var(--amll-lp-bg-line-scale, .7)), 10px);
|
|
146
|
-
transition: background-color .25s,
|
|
175
|
+
transition: background-color .25s,
|
|
176
|
+
box-shadow .25s,
|
|
177
|
+
--bright-mask-alpha var(--mask-alpha-duration) ease-out,
|
|
178
|
+
--dark-mask-alpha var(--mask-alpha-duration) ease-out;
|
|
147
179
|
|
|
148
180
|
& .FmKaba_lyricMainLine {
|
|
149
181
|
padding: 1.2em 1em;
|
|
@@ -151,7 +183,10 @@
|
|
|
151
183
|
|
|
152
184
|
&.FmKaba_active {
|
|
153
185
|
opacity: .4;
|
|
154
|
-
transition: background-color .25s,
|
|
186
|
+
transition: background-color .25s,
|
|
187
|
+
box-shadow .25s,
|
|
188
|
+
--bright-mask-alpha var(--mask-alpha-duration) ease-out,
|
|
189
|
+
--dark-mask-alpha var(--mask-alpha-duration) ease-out;
|
|
155
190
|
}
|
|
156
191
|
}
|
|
157
192
|
|
|
@@ -167,10 +202,17 @@
|
|
|
167
202
|
}
|
|
168
203
|
|
|
169
204
|
.FmKaba_bottomLine {
|
|
205
|
+
font-size: var(--amll-lp-bottom-line-font-size, max(.7em, 10px));
|
|
170
206
|
cursor: default;
|
|
207
|
+
opacity: .2;
|
|
171
208
|
padding-top: 0;
|
|
172
209
|
padding-bottom: 0;
|
|
173
210
|
line-height: 1.8em;
|
|
211
|
+
transition: opacity .4s;
|
|
212
|
+
|
|
213
|
+
&.FmKaba_gradientMask {
|
|
214
|
+
opacity: .85;
|
|
215
|
+
}
|
|
174
216
|
|
|
175
217
|
&:empty {
|
|
176
218
|
height: 0;
|
|
@@ -199,7 +241,6 @@
|
|
|
199
241
|
.FmKaba_bgWrapperTop {
|
|
200
242
|
transform-origin: 0 100%;
|
|
201
243
|
width: 100%;
|
|
202
|
-
margin-top: -999px;
|
|
203
244
|
position: relative;
|
|
204
245
|
top: auto;
|
|
205
246
|
bottom: auto;
|
|
@@ -221,35 +262,24 @@
|
|
|
221
262
|
}
|
|
222
263
|
|
|
223
264
|
.FmKaba_interludeDots {
|
|
224
|
-
opacity: 0;
|
|
225
|
-
transform-origin: center;
|
|
226
|
-
gap: .25em;
|
|
227
265
|
width: fit-content;
|
|
228
266
|
height: clamp(.5em, 1vh, 3em);
|
|
229
|
-
padding:
|
|
230
|
-
|
|
267
|
+
padding: .4em var(--lyric-line-padding-x);
|
|
268
|
+
transform-origin: center;
|
|
269
|
+
align-items: center;
|
|
270
|
+
gap: .18em;
|
|
231
271
|
display: flex;
|
|
232
272
|
position: absolute;
|
|
233
273
|
left: 0;
|
|
234
274
|
|
|
235
|
-
&.FmKaba_enabled {
|
|
236
|
-
opacity: 1;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
275
|
& > * {
|
|
240
276
|
background-color: var(--amll-lp-color, white);
|
|
241
277
|
aspect-ratio: 1;
|
|
242
278
|
border-radius: 50%;
|
|
243
|
-
width:
|
|
244
|
-
height:
|
|
245
|
-
margin-right: 4px;
|
|
279
|
+
width: .3em;
|
|
280
|
+
height: .3em;
|
|
246
281
|
display: inline-block;
|
|
247
282
|
}
|
|
248
|
-
|
|
249
|
-
&.FmKaba_duet {
|
|
250
|
-
transform-origin: center;
|
|
251
|
-
right: 0;
|
|
252
|
-
}
|
|
253
283
|
}
|
|
254
284
|
|
|
255
285
|
.FmKaba_disableSpring > *, .FmKaba_disableSpring .FmKaba_lyricLine {
|
|
@@ -262,6 +292,7 @@
|
|
|
262
292
|
|
|
263
293
|
.amll-lyric-player {
|
|
264
294
|
--lyric-line-padding-x: 1em;
|
|
295
|
+
touch-action: pan-x;
|
|
265
296
|
|
|
266
297
|
@media screen and (width <= 500px) {
|
|
267
298
|
--lyric-line-padding-x: 20px;
|
|
@@ -289,7 +320,7 @@
|
|
|
289
320
|
padding-left: 15%;
|
|
290
321
|
}
|
|
291
322
|
|
|
292
|
-
& .
|
|
323
|
+
& .FmKaba_isDuetWrapper {
|
|
293
324
|
align-items: flex-end;
|
|
294
325
|
|
|
295
326
|
& .FmKaba_bgWrapper {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applemusic-like-lyrics/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "AMLL 的纯 JS 核心组件框架,包括歌词显示组件和背景组件等其它可以复用的组件",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/amll-dev/applemusic-like-lyrics.git",
|
|
@@ -50,16 +50,16 @@
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@biomejs/biome": "^2.
|
|
53
|
+
"@biomejs/biome": "^2.5.7",
|
|
54
|
+
"@tsdown/css": "^0.22.14",
|
|
54
55
|
"@types/deep-freeze": "^0.1.5",
|
|
55
56
|
"@types/stats.js": "^0.17.3",
|
|
56
57
|
"@types/ungap__structured-clone": "^1.2.0",
|
|
57
58
|
"lil-gui": "^0.21.0",
|
|
58
59
|
"stats.js": "^0.17.0",
|
|
59
|
-
"
|
|
60
|
-
"typedoc
|
|
61
|
-
"
|
|
62
|
-
"tsdown": "^0.22.0"
|
|
60
|
+
"tsdown": "^0.22.14",
|
|
61
|
+
"typedoc": "^0.28.20",
|
|
62
|
+
"typedoc-plugin-markdown": "^4.12.0"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"@pixi/app": "*",
|
|
@@ -71,10 +71,11 @@
|
|
|
71
71
|
"@pixi/sprite": "*"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@ungap/structured-clone": "^1.3.
|
|
75
|
-
"bezier-easing": "^3.0.
|
|
74
|
+
"@ungap/structured-clone": "^1.3.3",
|
|
75
|
+
"bezier-easing": "^3.0.1",
|
|
76
76
|
"deep-freeze": "^0.0.1",
|
|
77
|
-
"gl-matrix": "4.0.0-beta.2"
|
|
77
|
+
"gl-matrix": "4.0.0-beta.2",
|
|
78
|
+
"vitest": "^4.1.10"
|
|
78
79
|
},
|
|
79
80
|
"scripts": {
|
|
80
81
|
"build:docs": "typedoc --plugin typedoc-plugin-markdown --out docs src/index.ts",
|
|
@@ -83,6 +84,9 @@
|
|
|
83
84
|
"build": "run-p typecheck \"build-only {@}\" --",
|
|
84
85
|
"build:dev": "tsdown",
|
|
85
86
|
"fmt": "biome format --write ./src",
|
|
86
|
-
"dev": "nx run @applemusic-like-lyrics/playground-core:dev"
|
|
87
|
+
"dev": "nx run @applemusic-like-lyrics/playground-core:dev",
|
|
88
|
+
"test": "vitest test",
|
|
89
|
+
"test:watch": "vitest test --watch",
|
|
90
|
+
"test:coverage": "vitest test --coverage"
|
|
87
91
|
}
|
|
88
92
|
}
|