music-lyric-kit 0.12.0 → 0.12.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/index.comm.js +1 -1
- package/dist/index.comm.js.map +1 -1
- package/dist/index.ecma.d.ts +60 -10
- package/dist/index.ecma.js +107 -77
- package/dist/index.ecma.js.map +1 -1
- package/package.json +12 -12
package/dist/index.comm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@music-lyric-kit/lyric"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("@music-lyric-kit/lyric"),_=require("@music-lyric-kit/plugin-format-lrc"),x=require("@music-lyric-kit/plugin-format-ttml"),P=require("@music-lyric-kit/plugin-transform-interlude"),b=require("@music-lyric-kit/plugin-transform-background"),w=require("@music-lyric-kit/plugin-transform-agent"),y=require("@music-lyric-kit/plugin-transform-space"),T=require("@music-lyric-kit/plugin-transform-pure"),k=require("@music-lyric-kit/plugin-transform-stress"),s=require("@music-lyric-kit/core");function n(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const l=n(_),h=n(x),f=n(P),i=n(b),m=n(w),p=n(y),c=n(T),g=n(k),S=Object.freeze(Object.defineProperty({__proto__:null,Lrc:l,Ttml:h},Symbol.toStringTag,{value:"Module"})),O=Object.freeze(Object.defineProperty({__proto__:null,Agent:m,Background:i,Interlude:f,Pure:c,Space:p,Stress:g},Symbol.toStringTag,{value:"Module"})),a=[new l.Parser,new h.AmllParser];class j{constructor(e){this.client=e}_extract=new m.Extract;extract(e){return this.client.run(this._extract,e)}}class C{constructor(e){this.client=e}_extract=new i.Extract;_clean=new i.Clean;extract(e){return this.client.run(this._extract,e)}clean(){return this.client.run(this._clean)}}class I{constructor(e){this.client=e}_extractCreator=new c.ExtractCreator;_clean=new c.Clean;extractCreator(e){return this.client.run(this._extractCreator,e)}clean(e){return this.client.run(this._clean,e)}}class q{constructor(e){this.client=e}_insert=new f.Insert;insert(e){return this.client.run(this._insert,e)}}class L{constructor(e){this.client=e}_insert=new p.Insert;insert(e){return this.client.run(this._insert,e)}}class ${constructor(e){this.client=e}_mark=new g.Mark;mark(e){return this.client.run(this._mark,e)}}class d{context;format;input;done;agent;background;pure;interlude;space;stress;constructor(e){this.done=!1,this.input=e,this.format=this.input.format||"";const t=new u.Lyric.Info;this.context=new s.ParserContext({content:this.input.content,musicInfo:this.input.musicInfo},t),this.agent=new j(this),this.background=new C(this),this.pure=new I(this),this.interlude=new q(this),this.space=new L(this),this.stress=new $(this)}applyConfig(e,t){e.config&&(e.config.reset(),t&&e.config.update(t))}exec(e){this.done=!1;try{if(!e.check(this.context))return}catch(t){console.warn(`plugin check failed id=${e.id} err=${t?.message}`);return}try{e.exec(this.context)}catch(t){console.warn(`plugin call failed id=${e.id} err=${t?.message}`)}}run(e,t){return this.applyConfig(e,t),this.exec(e),this}infer(){if(this.format)return this;for(const e of a)try{if(e.check(this.context)){this.format=e.format;break}}catch{continue}return this}parse(){if(!this.format)throw new Error("no format detected. call .infer() before .parse()");const e=a.find(t=>t.format===this.format);if(!e)throw new Error(`parser plugin not found: "${this.format}"`);this.done=!1;try{e.exec(this.context)}catch(t){console.warn(`plugin call failed id=${e.id} err=${t?.message}`)}return this}final(){return this.done||(this.context.cleanWord(),this.context.syncLineTimeWithWord(),this.context.sort(),this.context.calcAgentIndex(),this.context.syncLineTimeWithBackground(),this.done=!0),{format:this.format,result:this.context.result}}}const A=r=>new d(r);Object.defineProperty(exports,"Lyric",{enumerable:!0,get:()=>u.Lyric});Object.defineProperty(exports,"Generator",{enumerable:!0,get:()=>s.Generator});Object.defineProperty(exports,"GeneratorContext",{enumerable:!0,get:()=>s.GeneratorContext});Object.defineProperty(exports,"Parser",{enumerable:!0,get:()=>s.Parser});Object.defineProperty(exports,"ParserContext",{enumerable:!0,get:()=>s.ParserContext});exports.Format=S;exports.ParserPipeline=d;exports.Transform=O;exports.createParserPipeline=A;
|
|
2
2
|
//# sourceMappingURL=index.comm.js.map
|
package/dist/index.comm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.comm.js","sources":["../src/parser/pipeline.ts"],"sourcesContent":["import type { ParserParams } from '@music-lyric-kit/core'\n\nimport { Lyric } from '@music-lyric-kit/lyric'\nimport { ParserContext, ParserPlugin } from '@music-lyric-kit/core'\n\nimport { Format, Transform } from '@root/plugin'\n\nexport interface ParserPipelineInput {\n format?: string\n content: any\n musicInfo?: ParserParams['musicInfo']\n}\n\nexport interface ParserPipelineResult {\n format: string\n result: Lyric.Info\n}\n\nconst BuiltInFormats = [new Format.Lrc.Parser(), new Format.Ttml.AmllParser()]\n\
|
|
1
|
+
{"version":3,"file":"index.comm.js","sources":["../src/parser/pipeline.ts"],"sourcesContent":["import type { ParserParams } from '@music-lyric-kit/core'\n\nimport { Lyric } from '@music-lyric-kit/lyric'\nimport { ParserContext, ParserPlugin } from '@music-lyric-kit/core'\n\nimport { Format, Transform } from '@root/plugin'\n\nexport interface ParserPipelineInput {\n format?: string\n content: any\n musicInfo?: ParserParams['musicInfo']\n}\n\nexport interface ParserPipelineResult {\n format: string\n result: Lyric.Info\n}\n\nconst BuiltInFormats = [new Format.Lrc.Parser(), new Format.Ttml.AmllParser()]\n\nclass Agent {\n private _extract = new Transform.Agent.Extract()\n\n constructor(private client: ParserPipeline) {}\n\n extract(options?: Transform.Agent.ExtractConfig) {\n return this.client.run(this._extract, options)\n }\n}\n\nclass Background {\n private _extract = new Transform.Background.Extract()\n private _clean = new Transform.Background.Clean()\n\n constructor(private client: ParserPipeline) {}\n\n extract(options?: Transform.Background.ExtractConfig) {\n return this.client.run(this._extract, options)\n }\n\n clean() {\n return this.client.run(this._clean)\n }\n}\n\nclass Pure {\n private _extractCreator = new Transform.Pure.ExtractCreator()\n private _clean = new Transform.Pure.Clean()\n\n constructor(private client: ParserPipeline) {}\n\n extractCreator(options?: Transform.Pure.ExtractCreatorConfig) {\n return this.client.run(this._extractCreator, options)\n }\n\n clean(options?: Transform.Pure.CleanConfig) {\n return this.client.run(this._clean, options)\n }\n}\n\nclass Interlude {\n private _insert = new Transform.Interlude.Insert()\n\n constructor(private client: ParserPipeline) {}\n\n insert(options?: Transform.Interlude.InsertConfig) {\n return this.client.run(this._insert, options)\n }\n}\n\nclass Space {\n private _insert = new Transform.Space.Insert()\n\n constructor(private client: ParserPipeline) {}\n\n insert(options?: Transform.Space.SpaceConfig) {\n return this.client.run(this._insert, options)\n }\n}\n\nclass Stress {\n private _mark = new Transform.Stress.Mark()\n\n constructor(private client: ParserPipeline) {}\n\n mark(options?: Transform.Stress.MarkConfig) {\n return this.client.run(this._mark, options)\n }\n}\n\nexport class ParserPipeline {\n private context: ParserContext\n private format: string\n private input: ParserPipelineInput\n private done: boolean\n\n readonly agent: Agent\n readonly background: Background\n readonly pure: Pure\n readonly interlude: Interlude\n readonly space: Space\n readonly stress: Stress\n\n constructor(input: ParserPipelineInput) {\n this.done = false\n this.input = input\n this.format = this.input.format || ''\n\n const init = new Lyric.Info()\n this.context = new ParserContext({ content: this.input.content, musicInfo: this.input.musicInfo }, init)\n\n this.agent = new Agent(this)\n this.background = new Background(this)\n this.pure = new Pure(this)\n this.interlude = new Interlude(this)\n this.space = new Space(this)\n this.stress = new Stress(this)\n }\n\n private applyConfig(plugin: ParserPlugin, options?: any) {\n if (!plugin.config) {\n return\n }\n\n // reset config first\n plugin.config.reset()\n\n if (options) {\n plugin.config.update(options)\n }\n }\n\n private exec(plugin: ParserPlugin) {\n this.done = false\n\n try {\n const result = plugin.check(this.context)\n if (!result) {\n return\n }\n } catch (e: any) {\n console.warn(`plugin check failed id=${plugin.id} err=${e?.message}`)\n return\n }\n\n try {\n plugin.exec(this.context)\n } catch (e: any) {\n console.warn(`plugin call failed id=${plugin.id} err=${e?.message}`)\n }\n }\n\n /**\n * Apply optional config to a plugin and execute it against the current context.\n * Intended for use by the pipeline plugin scopes.\n */\n run(plugin: ParserPlugin, options?: any): this {\n this.applyConfig(plugin, options)\n this.exec(plugin)\n return this\n }\n\n infer(): this {\n if (this.format) {\n return this\n }\n for (const plugin of BuiltInFormats) {\n try {\n const result = plugin.check(this.context)\n if (result) {\n this.format = plugin.format\n break\n }\n } catch {\n continue\n }\n }\n return this\n }\n\n parse(): this {\n if (!this.format) {\n throw new Error('no format detected. call .infer() before .parse()')\n }\n\n const parser = BuiltInFormats.find((item) => item.format === this.format)\n if (!parser) {\n throw new Error(`parser plugin not found: \"${this.format}\"`)\n }\n\n this.done = false\n\n try {\n parser.exec(this.context)\n } catch (e: any) {\n console.warn(`plugin call failed id=${parser.id} err=${e?.message}`)\n }\n\n return this\n }\n\n final(): ParserPipelineResult {\n if (!this.done) {\n this.context.cleanWord()\n this.context.syncLineTimeWithWord()\n this.context.sort()\n this.context.calcAgentIndex()\n this.context.syncLineTimeWithBackground()\n this.done = true\n }\n\n return {\n format: this.format,\n result: this.context.result,\n }\n }\n}\n\nexport const createParserPipeline = (input: ParserPipelineInput) => {\n return new ParserPipeline(input)\n}\n"],"names":["BuiltInFormats","Format.Lrc","Format.Ttml","Agent","client","Transform.Agent","options","Background","Transform.Background","Pure","Transform.Pure","Interlude","Transform.Interlude","Space","Transform.Space","Stress","Transform.Stress","ParserPipeline","input","init","Lyric","ParserContext","plugin","e","parser","item","createParserPipeline"],"mappings":"gpCAkBMA,EAAiB,CAAC,IAAIC,EAAW,OAAU,IAAIC,EAAY,UAAY,EAE7E,MAAMC,CAAM,CAGV,YAAoBC,EAAwB,CAAxB,KAAA,OAAAA,CAAyB,CAFrC,SAAW,IAAIC,EAAgB,QAIvC,QAAQC,EAAyC,CAC/C,OAAO,KAAK,OAAO,IAAI,KAAK,SAAUA,CAAO,CA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E,MAAME,EAASxB,EAAe,KAAMyB,GAASA,EAAK,SAAW,KAAK,MAAM,EACxE,GAAI,CAACD,EACH,MAAM,IAAI,MAAM,6BAA6B,KAAK,MAAM,GAAG,EAG7D,KAAK,KAAO,GAEZ,GAAI,CACFA,EAAO,KAAK,KAAK,OAAO,CAC1B,OAASD,EAAQ,CACf,QAAQ,KAAK,yBAAyBC,EAAO,EAAE,QAAQD,GAAG,OAAO,EAAE,CACrE,CAEA,OAAO,IACT,CAEA,OAA8B,CAC5B,OAAK,KAAK,OACR,KAAK,QAAQ,UAAA,EACb,KAAK,QAAQ,qBAAA,EACb,KAAK,QAAQ,KAAA,EACb,KAAK,QAAQ,eAAA,EACb,KAAK,QAAQ,2BAAA,EACb,KAAK,KAAO,IAGP,CACL,OAAQ,KAAK,OACb,OAAQ,KAAK,QAAQ,MAAA,CAEzB,CACF,CAEO,MAAMG,EAAwBR,GAC5B,IAAID,EAAeC,CAAK"}
|
package/dist/index.ecma.d.ts
CHANGED
|
@@ -12,12 +12,29 @@ import { Parser } from '@music-lyric-kit/core';
|
|
|
12
12
|
import { ParserContext } from '@music-lyric-kit/core';
|
|
13
13
|
import { ParserOptions } from '@music-lyric-kit/core';
|
|
14
14
|
import { ParserParams } from '@music-lyric-kit/core';
|
|
15
|
+
import { ParserPlugin } from '@music-lyric-kit/core';
|
|
15
16
|
import { ParserResult } from '@music-lyric-kit/core';
|
|
16
17
|
import * as Pure from '@music-lyric-kit/plugin-transform-pure';
|
|
17
18
|
import * as Space from '@music-lyric-kit/plugin-transform-space';
|
|
18
19
|
import * as Stress from '@music-lyric-kit/plugin-transform-stress';
|
|
19
20
|
import * as Ttml from '@music-lyric-kit/plugin-format-ttml';
|
|
20
21
|
|
|
22
|
+
declare class Agent_2 {
|
|
23
|
+
private client;
|
|
24
|
+
private _extract;
|
|
25
|
+
constructor(client: ParserPipeline);
|
|
26
|
+
extract(options?: Transform.Agent.ExtractConfig): ParserPipeline;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare class Background_2 {
|
|
30
|
+
private client;
|
|
31
|
+
private _extract;
|
|
32
|
+
private _clean;
|
|
33
|
+
constructor(client: ParserPipeline);
|
|
34
|
+
extract(options?: Transform.Background.ExtractConfig): ParserPipeline;
|
|
35
|
+
clean(): ParserPipeline;
|
|
36
|
+
}
|
|
37
|
+
|
|
21
38
|
export declare const createParserPipeline: (input: ParserPipelineInput) => ParserPipeline;
|
|
22
39
|
|
|
23
40
|
declare namespace Format {
|
|
@@ -38,6 +55,13 @@ export { GeneratorParams }
|
|
|
38
55
|
|
|
39
56
|
export { GeneratorResult }
|
|
40
57
|
|
|
58
|
+
declare class Interlude_2 {
|
|
59
|
+
private client;
|
|
60
|
+
private _insert;
|
|
61
|
+
constructor(client: ParserPipeline);
|
|
62
|
+
insert(options?: Transform.Interlude.InsertConfig): ParserPipeline;
|
|
63
|
+
}
|
|
64
|
+
|
|
41
65
|
export { Lyric }
|
|
42
66
|
|
|
43
67
|
export { Parser }
|
|
@@ -53,19 +77,22 @@ export declare class ParserPipeline {
|
|
|
53
77
|
private format;
|
|
54
78
|
private input;
|
|
55
79
|
private done;
|
|
80
|
+
readonly agent: Agent_2;
|
|
81
|
+
readonly background: Background_2;
|
|
82
|
+
readonly pure: Pure_2;
|
|
83
|
+
readonly interlude: Interlude_2;
|
|
84
|
+
readonly space: Space_2;
|
|
85
|
+
readonly stress: Stress_2;
|
|
56
86
|
constructor(input: ParserPipelineInput);
|
|
57
|
-
private
|
|
58
|
-
private
|
|
87
|
+
private applyConfig;
|
|
88
|
+
private exec;
|
|
89
|
+
/**
|
|
90
|
+
* Apply optional config to a plugin and execute it against the current context.
|
|
91
|
+
* Intended for use by the pipeline plugin scopes.
|
|
92
|
+
*/
|
|
93
|
+
run(plugin: ParserPlugin, options?: any): this;
|
|
59
94
|
infer(): this;
|
|
60
95
|
parse(): this;
|
|
61
|
-
backgroundExtract(options?: Transform.Background.ExtractConfig): this;
|
|
62
|
-
backgroundClean(): this;
|
|
63
|
-
agentExtract(options?: Transform.Agent.ExtractConfig): this;
|
|
64
|
-
pureExtract(options?: Transform.Pure.ExtractCreatorConfig): this;
|
|
65
|
-
pureClean(options?: Transform.Pure.CleanConfig): this;
|
|
66
|
-
interludeInsert(options?: Transform.Interlude.InsertConfig): this;
|
|
67
|
-
spaceInsert(options?: Transform.Space.SpaceConfig): this;
|
|
68
|
-
stressMark(options?: Transform.Stress.MarkConfig): this;
|
|
69
96
|
final(): ParserPipelineResult;
|
|
70
97
|
}
|
|
71
98
|
|
|
@@ -82,6 +109,29 @@ export declare interface ParserPipelineResult {
|
|
|
82
109
|
|
|
83
110
|
export { ParserResult }
|
|
84
111
|
|
|
112
|
+
declare class Pure_2 {
|
|
113
|
+
private client;
|
|
114
|
+
private _extractCreator;
|
|
115
|
+
private _clean;
|
|
116
|
+
constructor(client: ParserPipeline);
|
|
117
|
+
extractCreator(options?: Transform.Pure.ExtractCreatorConfig): ParserPipeline;
|
|
118
|
+
clean(options?: Transform.Pure.CleanConfig): ParserPipeline;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
declare class Space_2 {
|
|
122
|
+
private client;
|
|
123
|
+
private _insert;
|
|
124
|
+
constructor(client: ParserPipeline);
|
|
125
|
+
insert(options?: Transform.Space.SpaceConfig): ParserPipeline;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
declare class Stress_2 {
|
|
129
|
+
private client;
|
|
130
|
+
private _mark;
|
|
131
|
+
constructor(client: ParserPipeline);
|
|
132
|
+
mark(options?: Transform.Stress.MarkConfig): ParserPipeline;
|
|
133
|
+
}
|
|
134
|
+
|
|
85
135
|
declare namespace Transform {
|
|
86
136
|
export {
|
|
87
137
|
Interlude,
|
package/dist/index.ecma.js
CHANGED
|
@@ -1,63 +1,110 @@
|
|
|
1
|
-
import { Lyric as
|
|
2
|
-
import { Lyric as
|
|
1
|
+
import { Lyric as f } from "@music-lyric-kit/lyric";
|
|
2
|
+
import { Lyric as $ } from "@music-lyric-kit/lyric";
|
|
3
3
|
import * as o from "@music-lyric-kit/plugin-format-lrc";
|
|
4
4
|
import * as c from "@music-lyric-kit/plugin-format-ttml";
|
|
5
|
-
import * as
|
|
5
|
+
import * as a from "@music-lyric-kit/plugin-transform-interlude";
|
|
6
6
|
import * as n from "@music-lyric-kit/plugin-transform-background";
|
|
7
|
-
import * as
|
|
8
|
-
import * as
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
7
|
+
import * as l from "@music-lyric-kit/plugin-transform-agent";
|
|
8
|
+
import * as u from "@music-lyric-kit/plugin-transform-space";
|
|
9
|
+
import * as s from "@music-lyric-kit/plugin-transform-pure";
|
|
10
|
+
import * as h from "@music-lyric-kit/plugin-transform-stress";
|
|
11
11
|
import { ParserContext as m } from "@music-lyric-kit/core";
|
|
12
|
-
import { Generator as
|
|
13
|
-
const
|
|
12
|
+
import { Generator as A, GeneratorContext as B, Parser as E, ParserContext as j } from "@music-lyric-kit/core";
|
|
13
|
+
const T = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
14
14
|
__proto__: null,
|
|
15
15
|
Lrc: o,
|
|
16
16
|
Ttml: c
|
|
17
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
17
|
+
}, Symbol.toStringTag, { value: "Module" })), C = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
18
18
|
__proto__: null,
|
|
19
|
-
Agent:
|
|
19
|
+
Agent: l,
|
|
20
20
|
Background: n,
|
|
21
|
-
Interlude:
|
|
22
|
-
Pure:
|
|
23
|
-
Space:
|
|
24
|
-
Stress:
|
|
25
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
background: {
|
|
30
|
-
extract: new n.Extract(),
|
|
31
|
-
clean: new n.Clean()
|
|
32
|
-
},
|
|
33
|
-
pure: {
|
|
34
|
-
extract: new i.ExtractCreator(),
|
|
35
|
-
clean: new i.Clean()
|
|
36
|
-
},
|
|
37
|
-
space: {
|
|
38
|
-
insert: new h.Insert()
|
|
39
|
-
},
|
|
40
|
-
interlude: {
|
|
41
|
-
insert: new l.Insert()
|
|
42
|
-
},
|
|
43
|
-
stress: {
|
|
44
|
-
mark: new f.Mark()
|
|
21
|
+
Interlude: a,
|
|
22
|
+
Pure: s,
|
|
23
|
+
Space: u,
|
|
24
|
+
Stress: h
|
|
25
|
+
}, Symbol.toStringTag, { value: "Module" })), i = [new o.Parser(), new c.AmllParser()];
|
|
26
|
+
class p {
|
|
27
|
+
constructor(t) {
|
|
28
|
+
this.client = t;
|
|
45
29
|
}
|
|
46
|
-
|
|
30
|
+
_extract = new l.Extract();
|
|
31
|
+
extract(t) {
|
|
32
|
+
return this.client.run(this._extract, t);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
47
35
|
class d {
|
|
36
|
+
constructor(t) {
|
|
37
|
+
this.client = t;
|
|
38
|
+
}
|
|
39
|
+
_extract = new n.Extract();
|
|
40
|
+
_clean = new n.Clean();
|
|
41
|
+
extract(t) {
|
|
42
|
+
return this.client.run(this._extract, t);
|
|
43
|
+
}
|
|
44
|
+
clean() {
|
|
45
|
+
return this.client.run(this._clean);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
class x {
|
|
49
|
+
constructor(t) {
|
|
50
|
+
this.client = t;
|
|
51
|
+
}
|
|
52
|
+
_extractCreator = new s.ExtractCreator();
|
|
53
|
+
_clean = new s.Clean();
|
|
54
|
+
extractCreator(t) {
|
|
55
|
+
return this.client.run(this._extractCreator, t);
|
|
56
|
+
}
|
|
57
|
+
clean(t) {
|
|
58
|
+
return this.client.run(this._clean, t);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
class g {
|
|
62
|
+
constructor(t) {
|
|
63
|
+
this.client = t;
|
|
64
|
+
}
|
|
65
|
+
_insert = new a.Insert();
|
|
66
|
+
insert(t) {
|
|
67
|
+
return this.client.run(this._insert, t);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
class w {
|
|
71
|
+
constructor(t) {
|
|
72
|
+
this.client = t;
|
|
73
|
+
}
|
|
74
|
+
_insert = new u.Insert();
|
|
75
|
+
insert(t) {
|
|
76
|
+
return this.client.run(this._insert, t);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
class _ {
|
|
80
|
+
constructor(t) {
|
|
81
|
+
this.client = t;
|
|
82
|
+
}
|
|
83
|
+
_mark = new h.Mark();
|
|
84
|
+
mark(t) {
|
|
85
|
+
return this.client.run(this._mark, t);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
class k {
|
|
48
89
|
context;
|
|
49
90
|
format;
|
|
50
91
|
input;
|
|
51
92
|
done;
|
|
93
|
+
agent;
|
|
94
|
+
background;
|
|
95
|
+
pure;
|
|
96
|
+
interlude;
|
|
97
|
+
space;
|
|
98
|
+
stress;
|
|
52
99
|
constructor(t) {
|
|
53
100
|
this.done = !1, this.input = t, this.format = this.input.format || "";
|
|
54
|
-
const r = new
|
|
55
|
-
this.context = new m({ content: this.input.content, musicInfo: this.input.musicInfo }, r);
|
|
101
|
+
const r = new f.Info();
|
|
102
|
+
this.context = new m({ content: this.input.content, musicInfo: this.input.musicInfo }, r), this.agent = new p(this), this.background = new d(this), this.pure = new x(this), this.interlude = new g(this), this.space = new w(this), this.stress = new _(this);
|
|
56
103
|
}
|
|
57
|
-
|
|
104
|
+
applyConfig(t, r) {
|
|
58
105
|
t.config && (t.config.reset(), r && t.config.update(r));
|
|
59
106
|
}
|
|
60
|
-
|
|
107
|
+
exec(t) {
|
|
61
108
|
this.done = !1;
|
|
62
109
|
try {
|
|
63
110
|
if (!t.check(this.context))
|
|
@@ -72,10 +119,17 @@ class d {
|
|
|
72
119
|
console.warn(`plugin call failed id=${t.id} err=${r?.message}`);
|
|
73
120
|
}
|
|
74
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Apply optional config to a plugin and execute it against the current context.
|
|
124
|
+
* Intended for use by the pipeline plugin scopes.
|
|
125
|
+
*/
|
|
126
|
+
run(t, r) {
|
|
127
|
+
return this.applyConfig(t, r), this.exec(t), this;
|
|
128
|
+
}
|
|
75
129
|
infer() {
|
|
76
130
|
if (this.format)
|
|
77
131
|
return this;
|
|
78
|
-
for (const t of
|
|
132
|
+
for (const t of i)
|
|
79
133
|
try {
|
|
80
134
|
if (t.check(this.context)) {
|
|
81
135
|
this.format = t.format;
|
|
@@ -89,7 +143,7 @@ class d {
|
|
|
89
143
|
parse() {
|
|
90
144
|
if (!this.format)
|
|
91
145
|
throw new Error("no format detected. call .infer() before .parse()");
|
|
92
|
-
const t =
|
|
146
|
+
const t = i.find((r) => r.format === this.format);
|
|
93
147
|
if (!t)
|
|
94
148
|
throw new Error(`parser plugin not found: "${this.format}"`);
|
|
95
149
|
this.done = !1;
|
|
@@ -100,47 +154,23 @@ class d {
|
|
|
100
154
|
}
|
|
101
155
|
return this;
|
|
102
156
|
}
|
|
103
|
-
backgroundExtract(t) {
|
|
104
|
-
return this.handleApplyConfig(e.background.extract, t), this.handleExecPlugin(e.background.extract), this;
|
|
105
|
-
}
|
|
106
|
-
backgroundClean() {
|
|
107
|
-
return this.handleExecPlugin(e.background.clean), this;
|
|
108
|
-
}
|
|
109
|
-
agentExtract(t) {
|
|
110
|
-
return this.handleApplyConfig(e.agent.extract, t), this.handleExecPlugin(e.agent.extract), this;
|
|
111
|
-
}
|
|
112
|
-
pureExtract(t) {
|
|
113
|
-
return this.handleApplyConfig(e.pure.extract, t), this.handleExecPlugin(e.pure.extract), this;
|
|
114
|
-
}
|
|
115
|
-
pureClean(t) {
|
|
116
|
-
return this.handleApplyConfig(e.pure.clean, t), this.handleExecPlugin(e.pure.clean), this;
|
|
117
|
-
}
|
|
118
|
-
interludeInsert(t) {
|
|
119
|
-
return this.handleApplyConfig(e.interlude.insert, t), this.handleExecPlugin(e.interlude.insert), this;
|
|
120
|
-
}
|
|
121
|
-
spaceInsert(t) {
|
|
122
|
-
return this.handleApplyConfig(e.space.insert, t), this.handleExecPlugin(e.space.insert), this;
|
|
123
|
-
}
|
|
124
|
-
stressMark(t) {
|
|
125
|
-
return this.handleApplyConfig(e.stress.mark, t), this.handleExecPlugin(e.stress.mark), this;
|
|
126
|
-
}
|
|
127
157
|
final() {
|
|
128
|
-
return this.done || (this.context.cleanWord(), this.context.
|
|
158
|
+
return this.done || (this.context.cleanWord(), this.context.syncLineTimeWithWord(), this.context.sort(), this.context.calcAgentIndex(), this.context.syncLineTimeWithBackground(), this.done = !0), {
|
|
129
159
|
format: this.format,
|
|
130
160
|
result: this.context.result
|
|
131
161
|
};
|
|
132
162
|
}
|
|
133
163
|
}
|
|
134
|
-
const
|
|
164
|
+
const b = (e) => new k(e);
|
|
135
165
|
export {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
166
|
+
T as Format,
|
|
167
|
+
A as Generator,
|
|
168
|
+
B as GeneratorContext,
|
|
169
|
+
$ as Lyric,
|
|
170
|
+
E as Parser,
|
|
171
|
+
j as ParserContext,
|
|
172
|
+
k as ParserPipeline,
|
|
173
|
+
C as Transform,
|
|
174
|
+
b as createParserPipeline
|
|
145
175
|
};
|
|
146
176
|
//# sourceMappingURL=index.ecma.js.map
|
package/dist/index.ecma.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.ecma.js","sources":["../src/parser/pipeline.ts"],"sourcesContent":["import type { ParserParams } from '@music-lyric-kit/core'\n\nimport { Lyric } from '@music-lyric-kit/lyric'\nimport { ParserContext, ParserPlugin } from '@music-lyric-kit/core'\n\nimport { Format, Transform } from '@root/plugin'\n\nexport interface ParserPipelineInput {\n format?: string\n content: any\n musicInfo?: ParserParams['musicInfo']\n}\n\nexport interface ParserPipelineResult {\n format: string\n result: Lyric.Info\n}\n\nconst BuiltInFormats = [new Format.Lrc.Parser(), new Format.Ttml.AmllParser()]\n\
|
|
1
|
+
{"version":3,"file":"index.ecma.js","sources":["../src/parser/pipeline.ts"],"sourcesContent":["import type { ParserParams } from '@music-lyric-kit/core'\n\nimport { Lyric } from '@music-lyric-kit/lyric'\nimport { ParserContext, ParserPlugin } from '@music-lyric-kit/core'\n\nimport { Format, Transform } from '@root/plugin'\n\nexport interface ParserPipelineInput {\n format?: string\n content: any\n musicInfo?: ParserParams['musicInfo']\n}\n\nexport interface ParserPipelineResult {\n format: string\n result: Lyric.Info\n}\n\nconst BuiltInFormats = [new Format.Lrc.Parser(), new Format.Ttml.AmllParser()]\n\nclass Agent {\n private _extract = new Transform.Agent.Extract()\n\n constructor(private client: ParserPipeline) {}\n\n extract(options?: Transform.Agent.ExtractConfig) {\n return this.client.run(this._extract, options)\n }\n}\n\nclass Background {\n private _extract = new Transform.Background.Extract()\n private _clean = new Transform.Background.Clean()\n\n constructor(private client: ParserPipeline) {}\n\n extract(options?: Transform.Background.ExtractConfig) {\n return this.client.run(this._extract, options)\n }\n\n clean() {\n return this.client.run(this._clean)\n }\n}\n\nclass Pure {\n private _extractCreator = new Transform.Pure.ExtractCreator()\n private _clean = new Transform.Pure.Clean()\n\n constructor(private client: ParserPipeline) {}\n\n extractCreator(options?: Transform.Pure.ExtractCreatorConfig) {\n return this.client.run(this._extractCreator, options)\n }\n\n clean(options?: Transform.Pure.CleanConfig) {\n return this.client.run(this._clean, options)\n }\n}\n\nclass Interlude {\n private _insert = new Transform.Interlude.Insert()\n\n constructor(private client: ParserPipeline) {}\n\n insert(options?: Transform.Interlude.InsertConfig) {\n return this.client.run(this._insert, options)\n }\n}\n\nclass Space {\n private _insert = new Transform.Space.Insert()\n\n constructor(private client: ParserPipeline) {}\n\n insert(options?: Transform.Space.SpaceConfig) {\n return this.client.run(this._insert, options)\n }\n}\n\nclass Stress {\n private _mark = new Transform.Stress.Mark()\n\n constructor(private client: ParserPipeline) {}\n\n mark(options?: Transform.Stress.MarkConfig) {\n return this.client.run(this._mark, options)\n }\n}\n\nexport class ParserPipeline {\n private context: ParserContext\n private format: string\n private input: ParserPipelineInput\n private done: boolean\n\n readonly agent: Agent\n readonly background: Background\n readonly pure: Pure\n readonly interlude: Interlude\n readonly space: Space\n readonly stress: Stress\n\n constructor(input: ParserPipelineInput) {\n this.done = false\n this.input = input\n this.format = this.input.format || ''\n\n const init = new Lyric.Info()\n this.context = new ParserContext({ content: this.input.content, musicInfo: this.input.musicInfo }, init)\n\n this.agent = new Agent(this)\n this.background = new Background(this)\n this.pure = new Pure(this)\n this.interlude = new Interlude(this)\n this.space = new Space(this)\n this.stress = new Stress(this)\n }\n\n private applyConfig(plugin: ParserPlugin, options?: any) {\n if (!plugin.config) {\n return\n }\n\n // reset config first\n plugin.config.reset()\n\n if (options) {\n plugin.config.update(options)\n }\n }\n\n private exec(plugin: ParserPlugin) {\n this.done = false\n\n try {\n const result = plugin.check(this.context)\n if (!result) {\n return\n }\n } catch (e: any) {\n console.warn(`plugin check failed id=${plugin.id} err=${e?.message}`)\n return\n }\n\n try {\n plugin.exec(this.context)\n } catch (e: any) {\n console.warn(`plugin call failed id=${plugin.id} err=${e?.message}`)\n }\n }\n\n /**\n * Apply optional config to a plugin and execute it against the current context.\n * Intended for use by the pipeline plugin scopes.\n */\n run(plugin: ParserPlugin, options?: any): this {\n this.applyConfig(plugin, options)\n this.exec(plugin)\n return this\n }\n\n infer(): this {\n if (this.format) {\n return this\n }\n for (const plugin of BuiltInFormats) {\n try {\n const result = plugin.check(this.context)\n if (result) {\n this.format = plugin.format\n break\n }\n } catch {\n continue\n }\n }\n return this\n }\n\n parse(): this {\n if (!this.format) {\n throw new Error('no format detected. call .infer() before .parse()')\n }\n\n const parser = BuiltInFormats.find((item) => item.format === this.format)\n if (!parser) {\n throw new Error(`parser plugin not found: \"${this.format}\"`)\n }\n\n this.done = false\n\n try {\n parser.exec(this.context)\n } catch (e: any) {\n console.warn(`plugin call failed id=${parser.id} err=${e?.message}`)\n }\n\n return this\n }\n\n final(): ParserPipelineResult {\n if (!this.done) {\n this.context.cleanWord()\n this.context.syncLineTimeWithWord()\n this.context.sort()\n this.context.calcAgentIndex()\n this.context.syncLineTimeWithBackground()\n this.done = true\n }\n\n return {\n format: this.format,\n result: this.context.result,\n }\n }\n}\n\nexport const createParserPipeline = (input: ParserPipelineInput) => {\n return new ParserPipeline(input)\n}\n"],"names":["BuiltInFormats","Format.Lrc","Format.Ttml","Agent","client","Transform.Agent","options","Background","Transform.Background","Pure","Transform.Pure","Interlude","Transform.Interlude","Space","Transform.Space","Stress","Transform.Stress","ParserPipeline","input","init","Lyric","ParserContext","plugin","e","parser","item","createParserPipeline"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;8CAkBMA,IAAiB,CAAC,IAAIC,EAAW,OAAA,GAAU,IAAIC,EAAY,YAAY;AAE7E,MAAMC,EAAM;AAAA,EAGV,YAAoBC,GAAwB;AAAxB,SAAA,SAAAA;AAAA,EAAyB;AAAA,EAFrC,WAAW,IAAIC,EAAgB,QAAA;AAAA,EAIvC,QAAQC,GAAyC;AAC/C,WAAO,KAAK,OAAO,IAAI,KAAK,UAAUA,CAAO;AAAA,EAC/C;AACF;AAEA,MAAMC,EAAW;AAAA,EAIf,YAAoBH,GAAwB;AAAxB,SAAA,SAAAA;AAAA,EAAyB;AAAA,EAHrC,WAAW,IAAII,EAAqB,QAAA;AAAA,EACpC,SAAS,IAAIA,EAAqB,MAAA;AAAA,EAI1C,QAAQF,GAA8C;AACpD,WAAO,KAAK,OAAO,IAAI,KAAK,UAAUA,CAAO;AAAA,EAC/C;AAAA,EAEA,QAAQ;AACN,WAAO,KAAK,OAAO,IAAI,KAAK,MAAM;AAAA,EACpC;AACF;AAEA,MAAMG,EAAK;AAAA,EAIT,YAAoBL,GAAwB;AAAxB,SAAA,SAAAA;AAAA,EAAyB;AAAA,EAHrC,kBAAkB,IAAIM,EAAe,eAAA;AAAA,EACrC,SAAS,IAAIA,EAAe,MAAA;AAAA,EAIpC,eAAeJ,GAA+C;AAC5D,WAAO,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A6B,KAAK,MAAM,GAAG;AAG7D,SAAK,OAAO;AAEZ,QAAI;AACF,MAAAA,EAAO,KAAK,KAAK,OAAO;AAAA,IAC1B,SAASD,GAAQ;AACf,cAAQ,KAAK,yBAAyBC,EAAO,EAAE,QAAQD,GAAG,OAAO,EAAE;AAAA,IACrE;AAEA,WAAO;AAAA,EACT;AAAA,EAEA,QAA8B;AAC5B,WAAK,KAAK,SACR,KAAK,QAAQ,UAAA,GACb,KAAK,QAAQ,qBAAA,GACb,KAAK,QAAQ,KAAA,GACb,KAAK,QAAQ,eAAA,GACb,KAAK,QAAQ,2BAAA,GACb,KAAK,OAAO,KAGP;AAAA,MACL,QAAQ,KAAK;AAAA,MACb,QAAQ,KAAK,QAAQ;AAAA,IAAA;AAAA,EAEzB;AACF;AAEO,MAAMG,IAAuB,CAACR,MAC5B,IAAID,EAAeC,CAAK;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "music-lyric-kit",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"author": "folltoshe",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Music Lyric Kit",
|
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
"dist"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@music-lyric-kit/core": "0.12.
|
|
38
|
-
"@music-lyric-kit/lyric": "0.12.
|
|
39
|
-
"@music-lyric-kit/
|
|
40
|
-
"@music-lyric-kit/plugin-format-ttml": "0.12.
|
|
41
|
-
"@music-lyric-kit/
|
|
42
|
-
"@music-lyric-kit/plugin-transform-interlude": "0.12.
|
|
43
|
-
"@music-lyric-kit/plugin-transform-
|
|
44
|
-
"@music-lyric-kit/plugin-transform-
|
|
45
|
-
"@music-lyric-kit/plugin-transform-
|
|
46
|
-
"@music-lyric-kit/plugin-transform-
|
|
47
|
-
"@music-lyric-kit/plugin-transform-
|
|
37
|
+
"@music-lyric-kit/core": "0.12.1",
|
|
38
|
+
"@music-lyric-kit/lyric": "0.12.1",
|
|
39
|
+
"@music-lyric-kit/utils": "0.12.1",
|
|
40
|
+
"@music-lyric-kit/plugin-format-ttml": "0.12.1",
|
|
41
|
+
"@music-lyric-kit/plugin-format-lrc": "0.12.1",
|
|
42
|
+
"@music-lyric-kit/plugin-transform-interlude": "0.12.1",
|
|
43
|
+
"@music-lyric-kit/plugin-transform-background": "0.12.1",
|
|
44
|
+
"@music-lyric-kit/plugin-transform-space": "0.12.1",
|
|
45
|
+
"@music-lyric-kit/plugin-transform-agent": "0.12.1",
|
|
46
|
+
"@music-lyric-kit/plugin-transform-pure": "0.12.1",
|
|
47
|
+
"@music-lyric-kit/plugin-transform-stress": "0.12.1"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "vite build"
|