@uimaxbai/am-lyrics 1.5.2 → 1.5.4
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 -0
- package/dist/src/AmLyrics.d.ts +1 -0
- package/dist/src/AmLyrics.d.ts.map +1 -1
- package/dist/src/am-lyrics.js +78 -26
- package/dist/src/am-lyrics.js.map +1 -1
- package/dist/src/react.js +78 -26
- package/dist/src/react.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/AmLyrics.ts +99 -29
package/README.md
CHANGED
|
@@ -47,6 +47,7 @@ Or, just use the CDN.
|
|
|
47
47
|
| `query` | `string` | `undefined` | Search phrase that resolves metadata via LyricsPlus catalog (falls back to Apple Music search) |
|
|
48
48
|
| `music-id` | `string` | `undefined` | Specific Apple Music song ID (served through the backup Apple endpoint) |
|
|
49
49
|
| `isrc` | `string` | `undefined` | ISRC code to verify correct song match |
|
|
50
|
+
| `ttml` | `string` | `undefined` | A string of TTML formatted lyrics to be rendered directly (bypasses all external requests) |
|
|
50
51
|
| `song-title` | `string` | `undefined` | Preferred title for LyricsPlus (primary) provider |
|
|
51
52
|
| `song-artist` | `string` | `undefined` | Preferred artist name for LyricsPlus provider |
|
|
52
53
|
| `song-album` | `string` | `undefined` | Optional album name passed to LyricsPlus provider |
|
package/dist/src/AmLyrics.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmLyrics.d.ts","sourceRoot":"","sources":["../../src/AmLyrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAO,MAAM,KAAK,CAAC;AAyGjD,qBAAa,QAAS,SAAQ,UAAU;IACtC,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"AmLyrics.d.ts","sourceRoot":"","sources":["../../src/AmLyrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAO,MAAM,KAAK,CAAC;AAyGjD,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leService {
|
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
const VERSION = '1.5.
|
|
322
|
+
const VERSION = '1.5.4';
|
|
323
323
|
const INSTRUMENTAL_THRESHOLD_MS = 7000; // Show dots for gaps >= 7s
|
|
324
324
|
const FETCH_TIMEOUT_MS = 8000; // Timeout for all lyrics fetch requests
|
|
325
325
|
const SEEK_THRESHOLD_MS = 500;
|
|
@@ -580,6 +580,28 @@ class AmLyrics extends i {
|
|
|
580
580
|
this.hasFetchedAllProviders = false;
|
|
581
581
|
this._updateFooter();
|
|
582
582
|
try {
|
|
583
|
+
if (this.ttml) {
|
|
584
|
+
const parseResult = AmLyrics.parseTTML(this.ttml);
|
|
585
|
+
if (parseResult && parseResult.lines.length > 0) {
|
|
586
|
+
this.lyrics = parseResult.lines;
|
|
587
|
+
this.lyricsSource = 'Local';
|
|
588
|
+
if (parseResult.songwriters) {
|
|
589
|
+
this.songwriters = parseResult.songwriters;
|
|
590
|
+
}
|
|
591
|
+
this.availableSources = [
|
|
592
|
+
{
|
|
593
|
+
lines: this.lyrics,
|
|
594
|
+
source: 'Local',
|
|
595
|
+
songwriters: this.songwriters,
|
|
596
|
+
},
|
|
597
|
+
];
|
|
598
|
+
this.currentSourceIndex = 0;
|
|
599
|
+
this.hasFetchedAllProviders = true;
|
|
600
|
+
this._updateFooter();
|
|
601
|
+
await this.onLyricsLoaded();
|
|
602
|
+
return;
|
|
603
|
+
}
|
|
604
|
+
}
|
|
583
605
|
const resolvedMetadata = await this.resolveSongMetadata();
|
|
584
606
|
// If a newer fetch was triggered while we awaited, bail out
|
|
585
607
|
if (controller.signal.aborted)
|
|
@@ -2182,6 +2204,7 @@ class AmLyrics extends i {
|
|
|
2182
2204
|
if ((changedProperties.has('query') ||
|
|
2183
2205
|
changedProperties.has('musicId') ||
|
|
2184
2206
|
changedProperties.has('isrc') ||
|
|
2207
|
+
changedProperties.has('ttml') ||
|
|
2185
2208
|
changedProperties.has('songTitle') ||
|
|
2186
2209
|
changedProperties.has('songArtist') ||
|
|
2187
2210
|
changedProperties.has('songAlbum') ||
|
|
@@ -2396,7 +2419,9 @@ class AmLyrics extends i {
|
|
|
2396
2419
|
lineIsRTL = true;
|
|
2397
2420
|
const hasHyphen = combinedText.includes('-');
|
|
2398
2421
|
const wordLen = combinedText.length;
|
|
2399
|
-
|
|
2422
|
+
const canAnimateByChar = !isCJK && !isRTL && !hasHyphen && wordLen > 0;
|
|
2423
|
+
const isLineSynced = line.isWordSynced === false || line.text.some(s => s.lineSynced);
|
|
2424
|
+
let isGrowableVW = canAnimateByChar && wordLen > 0 && wordLen <= 7;
|
|
2400
2425
|
if (isGrowableVW) {
|
|
2401
2426
|
if (wordLen < 3) {
|
|
2402
2427
|
isGrowableVW =
|
|
@@ -2407,9 +2432,14 @@ class AmLyrics extends i {
|
|
|
2407
2432
|
combinedDuration >= 850 && combinedDuration >= wordLen * 190;
|
|
2408
2433
|
}
|
|
2409
2434
|
}
|
|
2410
|
-
const
|
|
2435
|
+
const hasCharRiseDuration = combinedDuration >= Math.max(700, wordLen * 85);
|
|
2436
|
+
const hasLongShortWordDuration = wordLen >= 4 && combinedDuration >= Math.max(1300, wordLen * 260);
|
|
2437
|
+
const isCharRiseVW = canAnimateByChar &&
|
|
2438
|
+
!isLineSynced &&
|
|
2439
|
+
!isGrowableVW &&
|
|
2440
|
+
((wordLen >= 8 && hasCharRiseDuration) ||
|
|
2441
|
+
(wordLen < 8 && hasLongShortWordDuration));
|
|
2411
2442
|
const isGlowingVW = isGrowableVW && !isLineSynced;
|
|
2412
|
-
const isCharRiseVW = !isGrowableVW && !isLineSynced && !isCJK && !isRTL && wordLen >= 8;
|
|
2413
2443
|
let charOff = 0;
|
|
2414
2444
|
for (let gi = vwStart; gi <= vwEnd; gi += 1) {
|
|
2415
2445
|
groupGrowable[gi] = isGrowableVW;
|
|
@@ -3314,12 +3344,24 @@ class AmLyrics extends i {
|
|
|
3314
3344
|
const isRTL = classList.contains('rtl-text');
|
|
3315
3345
|
const charSpans = Array.from(syllable.querySelectorAll('span.char'));
|
|
3316
3346
|
const wordElement = syllable.parentElement?.parentElement; // syllable-wrap -> word
|
|
3317
|
-
const
|
|
3318
|
-
|
|
3319
|
-
|
|
3347
|
+
const virtualWordId = wordElement?.dataset
|
|
3348
|
+
.virtualWordId;
|
|
3349
|
+
let wordElements = [];
|
|
3350
|
+
if (virtualWordId && wordElement?.parentElement) {
|
|
3351
|
+
wordElements = Array.from(wordElement.parentElement.querySelectorAll('.lyrics-word')).filter(el => el.dataset.virtualWordId === virtualWordId);
|
|
3352
|
+
}
|
|
3353
|
+
else if (wordElement) {
|
|
3354
|
+
wordElements = [wordElement];
|
|
3355
|
+
}
|
|
3356
|
+
const allWordCharSpans = wordElements.flatMap(word => Array.from(word.querySelectorAll('span.char')));
|
|
3320
3357
|
const isGrowable = wordElement?.classList.contains('growable');
|
|
3321
3358
|
const isCharRise = wordElement?.classList.contains('char-rise');
|
|
3322
3359
|
const isFirstSyllable = syllable.getAttribute('data-syllable-index') === '0';
|
|
3360
|
+
const syllableStartMs = parseFloat(syllable.getAttribute('data-start-time') || '0');
|
|
3361
|
+
const virtualWordStartMs = parseFloat(wordElement?.dataset.virtualWordStart || '');
|
|
3362
|
+
const isFirstInVirtualWord = isFirstSyllable &&
|
|
3363
|
+
(!Number.isFinite(virtualWordStartMs) ||
|
|
3364
|
+
Math.abs(syllableStartMs - virtualWordStartMs) < 0.5);
|
|
3323
3365
|
const isFirstInContainer = isFirstSyllable; // Simplified
|
|
3324
3366
|
const isGap = syllable.closest('.lyrics-gap') !== null;
|
|
3325
3367
|
// Get duration from data attribute
|
|
@@ -3331,7 +3373,7 @@ class AmLyrics extends i {
|
|
|
3331
3373
|
const charAnimationsMap = new Map();
|
|
3332
3374
|
const styleUpdates = [];
|
|
3333
3375
|
// Step 1: Grow Pass
|
|
3334
|
-
if (isGrowable &&
|
|
3376
|
+
if (isGrowable && isFirstInVirtualWord && allWordCharSpans.length > 0) {
|
|
3335
3377
|
const finalDuration = wordDurationMs;
|
|
3336
3378
|
const baseDelayPerChar = finalDuration * 0.09;
|
|
3337
3379
|
const growDurationMs = finalDuration * 1.5;
|
|
@@ -3365,7 +3407,7 @@ class AmLyrics extends i {
|
|
|
3365
3407
|
});
|
|
3366
3408
|
});
|
|
3367
3409
|
}
|
|
3368
|
-
if (isCharRise &&
|
|
3410
|
+
if (isCharRise && isFirstInVirtualWord && allWordCharSpans.length > 0) {
|
|
3369
3411
|
const finalDuration = Math.max(wordDurationMs, syllableDurationMs);
|
|
3370
3412
|
const baseDelayPerChar = finalDuration * 0.09;
|
|
3371
3413
|
const riseDurationMs = finalDuration * 1.5;
|
|
@@ -3397,14 +3439,15 @@ class AmLyrics extends i {
|
|
|
3397
3439
|
existingAnimation.includes('rise-char'))) {
|
|
3398
3440
|
animationParts.push(existingAnimation.split(',')[0].trim());
|
|
3399
3441
|
}
|
|
3400
|
-
if (charIndex > 0) {
|
|
3442
|
+
if (charIndex > 0 && wipeDelay > 0 && wipeDuration > 0) {
|
|
3401
3443
|
const arrivalTime = (span.dataset.preWipeArrival
|
|
3402
3444
|
? parseFloat(span.dataset.preWipeArrival)
|
|
3403
3445
|
: syllableDurationMs * startPct) - elapsedTimeMs;
|
|
3404
|
-
const
|
|
3405
|
-
const
|
|
3406
|
-
|
|
3407
|
-
|
|
3446
|
+
const measuredPreWipeDuration = parseFloat(span.dataset.preWipeDuration || '100');
|
|
3447
|
+
const preWipeDuration = Math.min(measuredPreWipeDuration, wipeDuration * 0.9, syllableDurationMs * 0.08, arrivalTime);
|
|
3448
|
+
const animDelay = arrivalTime - preWipeDuration;
|
|
3449
|
+
if (preWipeDuration >= 16) {
|
|
3450
|
+
animationParts.push(`pre-wipe-char ${preWipeDuration}ms linear ${animDelay}ms none`);
|
|
3408
3451
|
}
|
|
3409
3452
|
}
|
|
3410
3453
|
if (wipeDuration > 0) {
|
|
@@ -3982,6 +4025,8 @@ class AmLyrics extends i {
|
|
|
3982
4025
|
const vwFullText = lineData?.vwFullText ?? [];
|
|
3983
4026
|
const vwFullDuration = lineData?.vwFullDuration ?? [];
|
|
3984
4027
|
const vwCharOffset = lineData?.vwCharOffset ?? [];
|
|
4028
|
+
const vwStartMs = lineData?.vwStartMs ?? [];
|
|
4029
|
+
const vwEndMs = lineData?.vwEndMs ?? [];
|
|
3985
4030
|
const lineIsRTL = lineData?.lineIsRTL ?? false;
|
|
3986
4031
|
// Create main vocals using YouLyPlus syllable structure
|
|
3987
4032
|
const mainVocalElement = b `<p
|
|
@@ -4001,6 +4046,13 @@ class AmLyrics extends i {
|
|
|
4001
4046
|
const groupCharOffset = isAnimatedByChar
|
|
4002
4047
|
? vwCharOffset[groupIdx]
|
|
4003
4048
|
: 0;
|
|
4049
|
+
const virtualWordId = isAnimatedByChar
|
|
4050
|
+
? `${lineIndex}:${vwStartMs[groupIdx]}:${vwEndMs[groupIdx]}`
|
|
4051
|
+
: '';
|
|
4052
|
+
const virtualWordStart = isAnimatedByChar
|
|
4053
|
+
? vwStartMs[groupIdx]
|
|
4054
|
+
: '';
|
|
4055
|
+
const virtualWordEnd = isAnimatedByChar ? vwEndMs[groupIdx] : '';
|
|
4004
4056
|
let sylCharAccumulator = 0;
|
|
4005
4057
|
const groupText = group.map(s => s.text).join('');
|
|
4006
4058
|
const shouldAllowBreak = groupText.trim().length >= 16 ||
|
|
@@ -4017,6 +4069,9 @@ class AmLyrics extends i {
|
|
|
4017
4069
|
: ''}${isGlowing ? ' glowing' : ''}${shouldAllowBreak
|
|
4018
4070
|
? ' allow-break'
|
|
4019
4071
|
: ''}"
|
|
4072
|
+
data-virtual-word-id="${virtualWordId}"
|
|
4073
|
+
data-virtual-word-start="${virtualWordStart}"
|
|
4074
|
+
data-virtual-word-end="${virtualWordEnd}"
|
|
4020
4075
|
style="--rise-duration: ${riseDuration}s"
|
|
4021
4076
|
>${group.map((syllable, sylIdx) => {
|
|
4022
4077
|
const startTimeMs = syllable.timestamp;
|
|
@@ -4575,17 +4630,15 @@ AmLyrics.styles = i$3 `
|
|
|
4575
4630
|
|
|
4576
4631
|
.background-vocal-container {
|
|
4577
4632
|
max-height: 0;
|
|
4578
|
-
overflow:
|
|
4633
|
+
overflow: hidden;
|
|
4579
4634
|
opacity: 0;
|
|
4580
4635
|
font-size: var(--lyplus-font-size-subtext);
|
|
4581
4636
|
line-height: 1.15;
|
|
4582
4637
|
color: color-mix(in srgb, var(--lyplus-text-secondary) 80%, transparent);
|
|
4583
|
-
/* Fast exit (0.25 s) so bg vocals collapse quickly and feel snappy.
|
|
4584
|
-
The scroll takes ~0.4 s; finishing the collapse first prevents
|
|
4585
|
-
the container from trailing behind the motion. */
|
|
4586
4638
|
transition:
|
|
4587
|
-
max-height
|
|
4588
|
-
|
|
4639
|
+
max-height var(--scroll-duration, 400ms)
|
|
4640
|
+
cubic-bezier(0.41, 0, 0.12, 0.99),
|
|
4641
|
+
opacity var(--scroll-duration, 400ms) cubic-bezier(0.41, 0, 0.12, 0.99);
|
|
4589
4642
|
margin: 0;
|
|
4590
4643
|
pointer-events: none;
|
|
4591
4644
|
}
|
|
@@ -4594,7 +4647,8 @@ AmLyrics.styles = i$3 `
|
|
|
4594
4647
|
display: block;
|
|
4595
4648
|
padding-top: 0;
|
|
4596
4649
|
padding-bottom: 0;
|
|
4597
|
-
transition: padding-top
|
|
4650
|
+
transition: padding-top var(--scroll-duration, 400ms)
|
|
4651
|
+
cubic-bezier(0.41, 0, 0.12, 0.99);
|
|
4598
4652
|
}
|
|
4599
4653
|
|
|
4600
4654
|
.lyrics-line.singer-right .background-vocal-container,
|
|
@@ -4609,16 +4663,11 @@ AmLyrics.styles = i$3 `
|
|
|
4609
4663
|
.lyrics-line.bg-expanded .background-vocal-container {
|
|
4610
4664
|
max-height: 4em;
|
|
4611
4665
|
opacity: 1;
|
|
4612
|
-
/* Slower entry (0.6 s) so bg vocals expand smoothly. */
|
|
4613
|
-
transition:
|
|
4614
|
-
max-height 0.6s ease,
|
|
4615
|
-
opacity 0.6s ease;
|
|
4616
4666
|
will-change: max-height, opacity;
|
|
4617
4667
|
}
|
|
4618
4668
|
|
|
4619
4669
|
.lyrics-line.bg-expanded .background-vocal-wrap {
|
|
4620
4670
|
padding-top: 0.26em;
|
|
4621
|
-
transition: padding-top 0.6s ease;
|
|
4622
4671
|
}
|
|
4623
4672
|
|
|
4624
4673
|
/* --- Line States & Modifiers --- */
|
|
@@ -5857,6 +5906,9 @@ __decorate([
|
|
|
5857
5906
|
__decorate([
|
|
5858
5907
|
n({ type: String })
|
|
5859
5908
|
], AmLyrics.prototype, "isrc", void 0);
|
|
5909
|
+
__decorate([
|
|
5910
|
+
n({ type: String })
|
|
5911
|
+
], AmLyrics.prototype, "ttml", void 0);
|
|
5860
5912
|
__decorate([
|
|
5861
5913
|
n({ type: String, attribute: 'song-title' })
|
|
5862
5914
|
], AmLyrics.prototype, "songTitle", void 0);
|