@applemusic-like-lyrics/core 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/LICENSE +661 -0
- package/README.md +2 -2
- package/dist/amll-core.cjs +803 -1480
- package/dist/amll-core.cjs.map +1 -1
- package/dist/amll-core.d.cts +196 -246
- package/dist/amll-core.d.mts +196 -246
- package/dist/amll-core.mjs +803 -1480
- package/dist/amll-core.mjs.map +1 -1
- package/dist/style.css +5 -165
- package/package.json +87 -69
package/dist/style.css
CHANGED
|
@@ -19,33 +19,7 @@
|
|
|
19
19
|
user-select: none;
|
|
20
20
|
box-sizing: content-box;
|
|
21
21
|
z-index: 1;
|
|
22
|
-
line-height: 1.
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&.dom-slim {
|
|
26
|
-
--amll-lp-line-width-aspect: .8;
|
|
27
|
-
--amll-lp-line-padding-x: 1em;
|
|
28
|
-
--amll-lp-bg-line-scale: .7;
|
|
29
|
-
user-select: none;
|
|
30
|
-
box-sizing: content-box;
|
|
31
|
-
z-index: 1;
|
|
32
|
-
min-width: 0;
|
|
33
|
-
min-height: 0;
|
|
34
|
-
line-height: 1.2em;
|
|
35
|
-
overflow: hidden scroll;
|
|
36
|
-
|
|
37
|
-
&::-webkit-scrollbar {
|
|
38
|
-
opacity: 0;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&:hover::-webkit-scrollbar {
|
|
42
|
-
opacity: 1;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
& > * {
|
|
46
|
-
content-visibility: auto;
|
|
47
|
-
contain-intrinsic-size: 100% 2em;
|
|
48
|
-
}
|
|
22
|
+
line-height: 1.2;
|
|
49
23
|
}
|
|
50
24
|
}
|
|
51
25
|
|
|
@@ -97,6 +71,10 @@
|
|
|
97
71
|
calc(var(--amll-lp-line-padding-x, 1em) / var(--amll-lp-bg-line-scale, .7));
|
|
98
72
|
transition: opacity .25s, scale .5s, filter .2s, background-color .25s, box-shadow .25s;
|
|
99
73
|
|
|
74
|
+
& .FmKaba_lyricMainLine {
|
|
75
|
+
padding: 1.2em 1em;
|
|
76
|
+
}
|
|
77
|
+
|
|
100
78
|
&.FmKaba_active {
|
|
101
79
|
opacity: .4;
|
|
102
80
|
transition: opacity .5s .25s, scale 1.5s cubic-bezier(0, 1, 0, 1) .25s, filter .2s, background-color .25s, box-shadow .25s;
|
|
@@ -256,141 +234,3 @@
|
|
|
256
234
|
padding: 0;
|
|
257
235
|
display: none;
|
|
258
236
|
}
|
|
259
|
-
.KxF9Iq_lyricLine {
|
|
260
|
-
width: var(--amll-lp-width, 100%);
|
|
261
|
-
min-width: var(--amll-lp-width, 100%);
|
|
262
|
-
max-width: var(--amll-lp-width, 100%);
|
|
263
|
-
contain: content;
|
|
264
|
-
box-sizing: border-box;
|
|
265
|
-
border-radius: .25em;
|
|
266
|
-
width: 100%;
|
|
267
|
-
height: fit-content;
|
|
268
|
-
padding: 2vh 1em;
|
|
269
|
-
transition: opacity .25s, filter .2s, background-color .25s, box-shadow .25s;
|
|
270
|
-
|
|
271
|
-
&:has( > *):hover {
|
|
272
|
-
background-color: var(--amll-lp-hover-bg-color, #fff1);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
&:has( > *):active {
|
|
276
|
-
background-color: var(--amll-lp-hover-bg-color, #ffffff05);
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.KxF9Iq_lyricBgLine {
|
|
281
|
-
opacity: 0;
|
|
282
|
-
font-size: max(calc(1em * var(--amll-lp-bg-line-scale, .7)), 10px);
|
|
283
|
-
padding: 1vh
|
|
284
|
-
calc(var(--amll-lp-line-padding-x, 1em) / var(--amll-lp-bg-line-scale, .7));
|
|
285
|
-
transition: opacity .25s, scale .5s, filter .2s, background-color .25s, box-shadow .25s;
|
|
286
|
-
|
|
287
|
-
&.KxF9Iq_active {
|
|
288
|
-
opacity: .4;
|
|
289
|
-
transition: opacity .5s .25s, scale 1.5s cubic-bezier(0, 1, 0, 1) .25s, filter .2s, background-color .25s, box-shadow .25s;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.amll-lyric-player {
|
|
294
|
-
&:hover .KxF9Iq_lyricLine {
|
|
295
|
-
filter: unset !important;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
&.KxF9Iq_hasDuetLine {
|
|
299
|
-
& .KxF9Iq_lyricLine:not(.KxF9Iq_lyricDuetLine) {
|
|
300
|
-
padding-right: 15%;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
& .KxF9Iq_lyricDuetLine {
|
|
304
|
-
padding-left: 15%;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.KxF9Iq_lyricDuetLine {
|
|
310
|
-
text-align: right;
|
|
311
|
-
transform-origin: 100%;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
.KxF9Iq_lyricMainLine {
|
|
315
|
-
contain: content paint;
|
|
316
|
-
transition: opacity .3s .1s;
|
|
317
|
-
|
|
318
|
-
& span {
|
|
319
|
-
white-space: pre;
|
|
320
|
-
display: inline-block;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
& .KxF9Iq_romanWord {
|
|
324
|
-
font-size: .5em;
|
|
325
|
-
line-height: 1em;
|
|
326
|
-
display: flex;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
& .KxF9Iq_rubyWord {
|
|
330
|
-
justify-content: center;
|
|
331
|
-
min-height: 1em;
|
|
332
|
-
font-size: .5em;
|
|
333
|
-
line-height: 1em;
|
|
334
|
-
display: flex;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
& .KxF9Iq_wordWithRuby {
|
|
338
|
-
flex-direction: column;
|
|
339
|
-
align-items: center;
|
|
340
|
-
display: inline-flex;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
& .KxF9Iq_wordBody {
|
|
344
|
-
flex-direction: column;
|
|
345
|
-
align-items: center;
|
|
346
|
-
display: flex;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
.KxF9Iq_lyricSubLine {
|
|
351
|
-
opacity: .3;
|
|
352
|
-
font-size: max(.5em, 10px);
|
|
353
|
-
line-height: 1.5em;
|
|
354
|
-
transition: opacity .2s .25s;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
.KxF9Iq_interludeDots {
|
|
358
|
-
transform-origin: center;
|
|
359
|
-
opacity: 0;
|
|
360
|
-
gap: .25em;
|
|
361
|
-
width: fit-content;
|
|
362
|
-
height: clamp(.5em, 1vh, 3em);
|
|
363
|
-
padding: 2.5% .75em;
|
|
364
|
-
transition: opacity .25s;
|
|
365
|
-
display: flex;
|
|
366
|
-
left: 0;
|
|
367
|
-
|
|
368
|
-
&.KxF9Iq_enabled {
|
|
369
|
-
opacity: 1;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
& > * {
|
|
373
|
-
aspect-ratio: 1;
|
|
374
|
-
background-color: var(--amll-lp-color, white);
|
|
375
|
-
border-radius: 50%;
|
|
376
|
-
width: clamp(.5em, 1vh, 3em);
|
|
377
|
-
height: clamp(.5em, 1vh, 3em);
|
|
378
|
-
margin-right: 4px;
|
|
379
|
-
display: inline-block;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
&.KxF9Iq_duet {
|
|
383
|
-
transform-origin: center;
|
|
384
|
-
right: 0;
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
@supports (mix-blend-mode: plus-lighter) {
|
|
389
|
-
.KxF9Iq_lyricSubLine {
|
|
390
|
-
opacity: .3;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
.KxF9Iq_tmpDisableTransition {
|
|
395
|
-
transition: none !important;
|
|
396
|
-
}
|
package/package.json
CHANGED
|
@@ -1,70 +1,88 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
2
|
+
"name": "@applemusic-like-lyrics/core",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "AMLL 的纯 JS 核心组件框架,包括歌词显示组件和背景组件等其它可以复用的组件",
|
|
5
|
+
"repository": {
|
|
6
|
+
"url": "https://github.com/amll-dev/applemusic-like-lyrics.git",
|
|
7
|
+
"directory": "packages/core",
|
|
8
|
+
"type": "git"
|
|
9
|
+
},
|
|
10
|
+
"license": "GPL-3.0",
|
|
11
|
+
"nx": {
|
|
12
|
+
"tags": [
|
|
13
|
+
"library"
|
|
14
|
+
],
|
|
15
|
+
"targets": {
|
|
16
|
+
"nx-release-publish": {
|
|
17
|
+
"executor": "@nx/js:release-publish",
|
|
18
|
+
"dependsOn": []
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"type": "module",
|
|
26
|
+
"main": "./dist/amll-core.cjs",
|
|
27
|
+
"module": "./dist/amll-core.mjs",
|
|
28
|
+
"typings": "./dist/amll-core.d.mts",
|
|
29
|
+
"imports": {
|
|
30
|
+
"#interfaces": "./src/interfaces.ts",
|
|
31
|
+
"#utils/*": "./src/utils/*",
|
|
32
|
+
"#styles/*": "./src/styles/*",
|
|
33
|
+
"#lyric/*": "./src/lyric-player/*",
|
|
34
|
+
"#bg/*": "./src/bg-player/*"
|
|
35
|
+
},
|
|
36
|
+
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"import": {
|
|
39
|
+
"types": "./dist/amll-core.d.mts",
|
|
40
|
+
"default": "./dist/amll-core.mjs"
|
|
41
|
+
},
|
|
42
|
+
"require": {
|
|
43
|
+
"types": "./dist/amll-core.d.cts",
|
|
44
|
+
"default": "./dist/amll-core.cjs"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"./style.css": {
|
|
48
|
+
"import": "./dist/style.css",
|
|
49
|
+
"require": "./dist/style.css"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@biomejs/biome": "^2.4.8",
|
|
54
|
+
"@types/deep-freeze": "^0.1.5",
|
|
55
|
+
"@types/stats.js": "^0.17.3",
|
|
56
|
+
"@types/ungap__structured-clone": "^1.2.0",
|
|
57
|
+
"lil-gui": "^0.21.0",
|
|
58
|
+
"stats.js": "^0.17.0",
|
|
59
|
+
"typedoc": "^0.28.18",
|
|
60
|
+
"typedoc-plugin-markdown": "^4.11.0",
|
|
61
|
+
"@tsdown/css": "^0.21.9",
|
|
62
|
+
"tsdown": "^0.21.9"
|
|
63
|
+
},
|
|
64
|
+
"peerDependencies": {
|
|
65
|
+
"@pixi/app": "*",
|
|
66
|
+
"@pixi/core": "*",
|
|
67
|
+
"@pixi/display": "*",
|
|
68
|
+
"@pixi/filter-blur": "*",
|
|
69
|
+
"@pixi/filter-bulge-pinch": "*",
|
|
70
|
+
"@pixi/filter-color-matrix": "*",
|
|
71
|
+
"@pixi/sprite": "*"
|
|
72
|
+
},
|
|
73
|
+
"dependencies": {
|
|
74
|
+
"@ungap/structured-clone": "^1.3.0",
|
|
75
|
+
"bezier-easing": "^3.0.0",
|
|
76
|
+
"deep-freeze": "^0.0.1",
|
|
77
|
+
"gl-matrix": "4.0.0-beta.2"
|
|
78
|
+
},
|
|
79
|
+
"scripts": {
|
|
80
|
+
"build:docs": "typedoc --plugin typedoc-plugin-markdown --out docs src/index.ts",
|
|
81
|
+
"typecheck": "tsgo -b",
|
|
82
|
+
"build-only": "tsdown",
|
|
83
|
+
"build": "run-p typecheck \"build-only {@}\" --",
|
|
84
|
+
"build:dev": "tsdown",
|
|
85
|
+
"fmt": "biome format --write ./src",
|
|
86
|
+
"dev": "nx run @applemusic-like-lyrics/playground-core:dev"
|
|
87
|
+
}
|
|
88
|
+
}
|