@uimaxbai/am-lyrics 0.6.4 → 0.6.5
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/.github/FUNDING.yml +15 -0
- package/README.md +1 -1
- package/demo/index.html +3 -3
- package/dist/src/AmLyrics.d.ts +7 -0
- package/dist/src/AmLyrics.d.ts.map +1 -1
- package/dist/src/GoogleService.d.ts +13 -0
- package/dist/src/GoogleService.d.ts.map +1 -0
- package/dist/src/am-lyrics.js +575 -65
- package/dist/src/am-lyrics.js.map +1 -1
- package/dist/src/react.js +575 -65
- package/dist/src/react.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/AmLyrics.ts +381 -79
- package/src/GoogleService.ts +299 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: [binimum]
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
|
12
|
+
polar: # Replace with a single Polar username
|
|
13
|
+
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
|
14
|
+
thanks_dev: # Replace with a single thanks.dev username
|
|
15
|
+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
package/README.md
CHANGED
|
@@ -75,7 +75,7 @@ am-lyrics {
|
|
|
75
75
|
|
|
76
76
|
## Lyrics providers
|
|
77
77
|
|
|
78
|
-
The component now
|
|
78
|
+
The component now only uses the LyricsPlus (KPoe) API that powers [YouLyPlus](https://github.com/ibratabian17/YouLyPlus).
|
|
79
79
|
|
|
80
80
|
1. Provide `song-title` and `song-artist` (plus optional `song-album`/`song-duration`) to request word-synced lyrics from LyricsPlus. A standalone `query` such as `"Bad Habit - Steve Lacy"` also works—the component looks up the metadata through LyricsPlus' `/v1/songlist/search` endpoint.
|
|
81
81
|
2. If LyricsPlus cannot serve lyrics or metadata is missing, the component automatically falls back to the legacy Apple Music endpoint using the best available identifiers (`query`, `music-id`, `isrc`). Requests that rely solely on `music-id` are handled exclusively by this backup service because LyricsPlus does not support Apple IDs.
|
package/demo/index.html
CHANGED
package/dist/src/AmLyrics.d.ts
CHANGED
|
@@ -14,6 +14,12 @@ export declare class AmLyrics extends LitElement {
|
|
|
14
14
|
fontFamily?: string;
|
|
15
15
|
autoScroll: boolean;
|
|
16
16
|
interpolate: boolean;
|
|
17
|
+
private showRomanization;
|
|
18
|
+
private showTranslation;
|
|
19
|
+
private toggleRomanization;
|
|
20
|
+
private applyRomanization;
|
|
21
|
+
private toggleTranslation;
|
|
22
|
+
private applyTranslation;
|
|
17
23
|
duration?: number;
|
|
18
24
|
currentTime: number;
|
|
19
25
|
private isLoading;
|
|
@@ -36,6 +42,7 @@ export declare class AmLyrics extends LitElement {
|
|
|
36
42
|
disconnectedCallback(): void;
|
|
37
43
|
private fetchLyrics;
|
|
38
44
|
private onLyricsLoaded;
|
|
45
|
+
private autoProcessLyrics;
|
|
39
46
|
private resolveSongMetadata;
|
|
40
47
|
private static parseQueryMetadata;
|
|
41
48
|
private static searchLyricsPlusCatalog;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmLyrics.d.ts","sourceRoot":"","sources":["../../src/AmLyrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"AmLyrics.d.ts","sourceRoot":"","sources":["../../src/AmLyrics.ts"],"names":[],"mappings":"AAA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IAEhC,OAAO,CAAC,oBAAoB,CAAS;IAErC,iBAAiB;IAKjB,oBAAoB;YAUN,WAAW;YAiCX,cAAc;YAoBd,iBAAiB;YASjB,mBAAmB;IAiGjC,OAAO,CAAC,MAAM,CAAC,kBAAkB;mBAkCZ,uBAAuB;mBA6CvB,wBAAwB;IAsE7C,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAqJhC,OAAO,CAAC,MAAM,CAAC,cAAc;IAa7B,YAAY;IAWZ,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC;IAwFjE,OAAO,CAAC,MAAM,CAAC,WAAW;IAI1B,OAAO,CAAC,gBAAgB;IA0BxB,OAAO,CAAC,qBAAqB;IAW7B,OAAO,CAAC,qBAAqB;IAiC7B,OAAO,CAAC,sBAAsB;IA8D9B,OAAO,CAAC,wBAAwB;IAwChC,OAAO,CAAC,eAAe;IA4CvB,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,MAAM,CAAC,0BAA0B;IAkBzC,OAAO,CAAC,kBAAkB;IA2C1B,OAAO,CAAC,oBAAoB;IAsC5B,OAAO,CAAC,eAAe;IA4HvB,OAAO,CAAC,WAAW;IAyBnB,OAAO,CAAC,YAAY;IA2DpB,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAUjC,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAYlC,OAAO,CAAC,cAAc;IAuCtB,MAAM;CAgWP"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service for translating and romanizing text using Google Translate (unofficial API)
|
|
3
|
+
*/
|
|
4
|
+
export declare class GoogleService {
|
|
5
|
+
private static delay;
|
|
6
|
+
private static isPurelyLatinScript;
|
|
7
|
+
static translate(textOrArray: string | string[], targetLang: string): Promise<string | string[]>;
|
|
8
|
+
static romanize(originalLyrics: any): Promise<any>;
|
|
9
|
+
static romanizeWordSynced(lines: any[]): Promise<any[]>;
|
|
10
|
+
static romanizeLineSynced(lines: any[]): Promise<any[]>;
|
|
11
|
+
static romanizeTexts(texts: string[]): Promise<string[]>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=GoogleService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GoogleService.d.ts","sourceRoot":"","sources":["../../src/GoogleService.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAC,KAAK;IAMpB,OAAO,CAAC,MAAM,CAAC,mBAAmB;WAQrB,SAAS,CACpB,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,EAC9B,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC;WAiIhB,QAAQ,CAAC,cAAc,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;WAsB3C,kBAAkB,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;WA+BhD,kBAAkB,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;WAqBhD,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAgE/D"}
|