delta-comic-core 0.1.1 → 0.1.3

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/bundle2.cjs CHANGED
@@ -1,2 +1,2 @@
1
- const e=(e,t)=>({entry:e.entry??`src/main.ts`,userscript:{name:{ds:e.displayName,default:e.name},version:e.version,author:e.author,description:e.description,require:[`core`,...e.require??[]]},build:{externalGlobals:t==`serve`?void 0:{vue:`window.$$lib$$.Vue`,vant:`window.$$lib$$.Vant`,"naive-ui":`window.$$lib$$.Naive`,axios:`window.$$lib$$.Axios`,"es-toolkit":`window.$$lib$$.EsKits`,"delta-comic-core":`window.$$lib$$.Dcc`,"vue-router":`window.$$lib$$.VR`,"crypto-js":`window.$$lib$$.Crypto`}},server:{mountGmApi:!1,open:!1,prefix:!1}}),t=e=>e==`build`?void 0:{externals:{vue:`window.$$lib$$.Vue`,vant:`window.$$lib$$.Vant`,"naive-ui":`window.$$lib$$.Naive`,axios:`window.$$lib$$.Axios`,"es-toolkit":`window.$$lib$$.EsKits`,"delta-comic-core":`window.$$lib$$.Dcc`,"vue-router":`window.$$lib$$.VR`,"crypto-js":`window.$$lib$$.Crypto`}};exports.createExternalConfig=t,exports.createMonkeyConfig=e;
1
+ const e=(e,t)=>({entry:e.entry??`src/main.ts`,userscript:{name:{ds:e.displayName,default:e.name},version:e.version,author:e.author,description:e.description,require:[`core`,...e.require??[]]},build:{externalGlobals:t==`serve`?{}:{vue:`window.$$lib$$.Vue`,vant:`window.$$lib$$.Vant`,"naive-ui":`window.$$lib$$.Naive`,axios:`window.$$lib$$.Axios`,"es-toolkit":`window.$$lib$$.EsKits`,"delta-comic-core":`window.$$lib$$.Dcc`,"vue-router":`window.$$lib$$.VR`,"crypto-js":`window.$$lib$$.Crypto`}},server:{mountGmApi:!1,open:!1,prefix:!1}}),t=e=>e==`build`?{}:{externals:{vue:`window.$$lib$$.Vue`,vant:`window.$$lib$$.Vant`,"naive-ui":`window.$$lib$$.Naive`,axios:`window.$$lib$$.Axios`,"es-toolkit":`window.$$lib$$.EsKits`,"delta-comic-core":`window.$$lib$$.Dcc`,"vue-router":`window.$$lib$$.VR`,"crypto-js":`window.$$lib$$.Crypto`}};exports.createExternalConfig=t,exports.createMonkeyConfig=e;
2
2
  //# sourceMappingURL=bundle2.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"bundle2.cjs","names":[],"sources":["../vite/index.ts"],"sourcesContent":["export const createMonkeyConfig = (config: {\r\n name: string\r\n displayName: string\r\n version: string\r\n author?: string\r\n description: string\r\n /** @default ['core'] */ require?: string[]\r\n /** @default 'src/main.ts' */ entry?: string\r\n}, command: \"build\" | \"serve\") => ({\r\n entry: config.entry ?? 'src/main.ts',\r\n userscript: {\r\n name: {\r\n ds: config.displayName,\r\n default: config.name\r\n },\r\n version: config.version,\r\n author: config.author,\r\n description: config.description,\r\n require: ['core', ...(config.require ?? [])],\r\n },\r\n build: {\r\n externalGlobals: command == 'serve' ? undefined : {\r\n vue: 'window.$$lib$$.Vue',\r\n vant: 'window.$$lib$$.Vant',\r\n 'naive-ui': 'window.$$lib$$.Naive',\r\n axios: 'window.$$lib$$.Axios',\r\n 'es-toolkit': 'window.$$lib$$.EsKits',\r\n 'delta-comic-core': 'window.$$lib$$.Dcc',\r\n 'vue-router': 'window.$$lib$$.VR',\r\n 'crypto-js': 'window.$$lib$$.Crypto'\r\n },\r\n },\r\n server: {\r\n mountGmApi: false,\r\n open: false,\r\n prefix: false\r\n }\r\n} as any)\r\n\r\nexport const createExternalConfig = (command: \"build\" | \"serve\") => command == 'build' ? undefined : {\r\n externals: {\r\n vue: 'window.$$lib$$.Vue',\r\n vant: 'window.$$lib$$.Vant',\r\n 'naive-ui': 'window.$$lib$$.Naive',\r\n axios: 'window.$$lib$$.Axios',\r\n 'es-toolkit': 'window.$$lib$$.EsKits',\r\n 'delta-comic-core': 'window.$$lib$$.Dcc',\r\n 'vue-router': 'window.$$lib$$.VR',\r\n 'crypto-js': 'window.$$lib$$.Crypto'\r\n }\r\n} as any\r\n"],"mappings":"AAAA,MAAa,GAAsB,EAQhC,KAAgC,CACjC,MAAO,EAAO,OAAS,cACvB,WAAY,CACV,KAAM,CACJ,GAAI,EAAO,YACX,QAAS,EAAO,KACjB,CACD,QAAS,EAAO,QAChB,OAAQ,EAAO,OACf,YAAa,EAAO,YACpB,QAAS,CAAC,OAAQ,GAAI,EAAO,SAAW,EAAE,CAAE,CAC7C,CACD,MAAO,CACL,gBAAiB,GAAW,QAAU,IAAA,GAAY,CAChD,IAAK,qBACL,KAAM,sBACN,WAAY,uBACZ,MAAO,uBACP,aAAc,wBACd,mBAAoB,qBACpB,aAAc,oBACd,YAAa,wBACd,CACF,CACD,OAAQ,CACN,WAAY,GACZ,KAAM,GACN,OAAQ,GACT,CACF,EAEY,EAAwB,GAA+B,GAAW,QAAU,IAAA,GAAY,CACnG,UAAW,CACT,IAAK,qBACL,KAAM,sBACN,WAAY,uBACZ,MAAO,uBACP,aAAc,wBACd,mBAAoB,qBACpB,aAAc,oBACd,YAAa,wBACd,CACF"}
1
+ {"version":3,"file":"bundle2.cjs","names":[],"sources":["../vite/index.ts"],"sourcesContent":["export const createMonkeyConfig = (config: {\r\n name: string\r\n displayName: string\r\n version: string\r\n author?: string\r\n description: string\r\n /** @default ['core'] */ require?: string[]\r\n /** @default 'src/main.ts' */ entry?: string\r\n}, command: \"build\" | \"serve\") => ({\r\n entry: config.entry ?? 'src/main.ts',\r\n userscript: {\r\n name: {\r\n ds: config.displayName,\r\n default: config.name\r\n },\r\n version: config.version,\r\n author: config.author,\r\n description: config.description,\r\n require: ['core', ...(config.require ?? [])],\r\n },\r\n build: {\r\n externalGlobals: command == 'serve' ? {} : {\r\n vue: 'window.$$lib$$.Vue',\r\n vant: 'window.$$lib$$.Vant',\r\n 'naive-ui': 'window.$$lib$$.Naive',\r\n axios: 'window.$$lib$$.Axios',\r\n 'es-toolkit': 'window.$$lib$$.EsKits',\r\n 'delta-comic-core': 'window.$$lib$$.Dcc',\r\n 'vue-router': 'window.$$lib$$.VR',\r\n 'crypto-js': 'window.$$lib$$.Crypto'\r\n },\r\n },\r\n server: {\r\n mountGmApi: false,\r\n open: false,\r\n prefix: false\r\n }\r\n} as any)\r\n\r\nexport const createExternalConfig = (command: \"build\" | \"serve\") => command == 'build' ? {} : {\r\n externals: {\r\n vue: 'window.$$lib$$.Vue',\r\n vant: 'window.$$lib$$.Vant',\r\n 'naive-ui': 'window.$$lib$$.Naive',\r\n axios: 'window.$$lib$$.Axios',\r\n 'es-toolkit': 'window.$$lib$$.EsKits',\r\n 'delta-comic-core': 'window.$$lib$$.Dcc',\r\n 'vue-router': 'window.$$lib$$.VR',\r\n 'crypto-js': 'window.$$lib$$.Crypto'\r\n }\r\n} as any\r\n"],"mappings":"AAAA,MAAa,GAAsB,EAQhC,KAAgC,CACjC,MAAO,EAAO,OAAS,cACvB,WAAY,CACV,KAAM,CACJ,GAAI,EAAO,YACX,QAAS,EAAO,KACjB,CACD,QAAS,EAAO,QAChB,OAAQ,EAAO,OACf,YAAa,EAAO,YACpB,QAAS,CAAC,OAAQ,GAAI,EAAO,SAAW,EAAE,CAAE,CAC7C,CACD,MAAO,CACL,gBAAiB,GAAW,QAAU,EAAE,CAAG,CACzC,IAAK,qBACL,KAAM,sBACN,WAAY,uBACZ,MAAO,uBACP,aAAc,wBACd,mBAAoB,qBACpB,aAAc,oBACd,YAAa,wBACd,CACF,CACD,OAAQ,CACN,WAAY,GACZ,KAAM,GACN,OAAQ,GACT,CACF,EAEY,EAAwB,GAA+B,GAAW,QAAU,EAAE,CAAG,CAC5F,UAAW,CACT,IAAK,qBACL,KAAM,sBACN,WAAY,uBACZ,MAAO,uBACP,aAAc,wBACd,mBAAoB,qBACpB,aAAc,oBACd,YAAa,wBACd,CACF"}
package/dist/bundle2.js CHANGED
@@ -10,7 +10,7 @@ const createMonkeyConfig = (e, t) => ({
10
10
  description: e.description,
11
11
  require: ["core", ...e.require ?? []]
12
12
  },
13
- build: { externalGlobals: t == "serve" ? void 0 : {
13
+ build: { externalGlobals: t == "serve" ? {} : {
14
14
  vue: "window.$$lib$$.Vue",
15
15
  vant: "window.$$lib$$.Vant",
16
16
  "naive-ui": "window.$$lib$$.Naive",
@@ -25,7 +25,7 @@ const createMonkeyConfig = (e, t) => ({
25
25
  open: !1,
26
26
  prefix: !1
27
27
  }
28
- }), createExternalConfig = (e) => e == "build" ? void 0 : { externals: {
28
+ }), createExternalConfig = (e) => e == "build" ? {} : { externals: {
29
29
  vue: "window.$$lib$$.Vue",
30
30
  vant: "window.$$lib$$.Vant",
31
31
  "naive-ui": "window.$$lib$$.Naive",
@@ -1 +1 @@
1
- {"version":3,"file":"bundle2.js","names":[],"sources":["../vite/index.ts"],"sourcesContent":["export const createMonkeyConfig = (config: {\r\n name: string\r\n displayName: string\r\n version: string\r\n author?: string\r\n description: string\r\n /** @default ['core'] */ require?: string[]\r\n /** @default 'src/main.ts' */ entry?: string\r\n}, command: \"build\" | \"serve\") => ({\r\n entry: config.entry ?? 'src/main.ts',\r\n userscript: {\r\n name: {\r\n ds: config.displayName,\r\n default: config.name\r\n },\r\n version: config.version,\r\n author: config.author,\r\n description: config.description,\r\n require: ['core', ...(config.require ?? [])],\r\n },\r\n build: {\r\n externalGlobals: command == 'serve' ? undefined : {\r\n vue: 'window.$$lib$$.Vue',\r\n vant: 'window.$$lib$$.Vant',\r\n 'naive-ui': 'window.$$lib$$.Naive',\r\n axios: 'window.$$lib$$.Axios',\r\n 'es-toolkit': 'window.$$lib$$.EsKits',\r\n 'delta-comic-core': 'window.$$lib$$.Dcc',\r\n 'vue-router': 'window.$$lib$$.VR',\r\n 'crypto-js': 'window.$$lib$$.Crypto'\r\n },\r\n },\r\n server: {\r\n mountGmApi: false,\r\n open: false,\r\n prefix: false\r\n }\r\n} as any)\r\n\r\nexport const createExternalConfig = (command: \"build\" | \"serve\") => command == 'build' ? undefined : {\r\n externals: {\r\n vue: 'window.$$lib$$.Vue',\r\n vant: 'window.$$lib$$.Vant',\r\n 'naive-ui': 'window.$$lib$$.Naive',\r\n axios: 'window.$$lib$$.Axios',\r\n 'es-toolkit': 'window.$$lib$$.EsKits',\r\n 'delta-comic-core': 'window.$$lib$$.Dcc',\r\n 'vue-router': 'window.$$lib$$.VR',\r\n 'crypto-js': 'window.$$lib$$.Crypto'\r\n }\r\n} as any\r\n"],"mappings":"AAAA,MAAa,sBAAsB,GAQhC,OAAgC;CACjC,OAAO,EAAO,SAAS;CACvB,YAAY;EACV,MAAM;GACJ,IAAI,EAAO;GACX,SAAS,EAAO;GACjB;EACD,SAAS,EAAO;EAChB,QAAQ,EAAO;EACf,aAAa,EAAO;EACpB,SAAS,CAAC,QAAQ,GAAI,EAAO,WAAW,EAAE,CAAE;EAC7C;CACD,OAAO,EACL,iBAAiB,KAAW,UAAU,KAAA,IAAY;EAChD,KAAK;EACL,MAAM;EACN,YAAY;EACZ,OAAO;EACP,cAAc;EACd,oBAAoB;EACpB,cAAc;EACd,aAAa;EACd,EACF;CACD,QAAQ;EACN,YAAY;EACZ,MAAM;EACN,QAAQ;EACT;CACF,GAEY,wBAAwB,MAA+B,KAAW,UAAU,KAAA,IAAY,EACnG,WAAW;CACT,KAAK;CACL,MAAM;CACN,YAAY;CACZ,OAAO;CACP,cAAc;CACd,oBAAoB;CACpB,cAAc;CACd,aAAa;CACd,EACF"}
1
+ {"version":3,"file":"bundle2.js","names":[],"sources":["../vite/index.ts"],"sourcesContent":["export const createMonkeyConfig = (config: {\r\n name: string\r\n displayName: string\r\n version: string\r\n author?: string\r\n description: string\r\n /** @default ['core'] */ require?: string[]\r\n /** @default 'src/main.ts' */ entry?: string\r\n}, command: \"build\" | \"serve\") => ({\r\n entry: config.entry ?? 'src/main.ts',\r\n userscript: {\r\n name: {\r\n ds: config.displayName,\r\n default: config.name\r\n },\r\n version: config.version,\r\n author: config.author,\r\n description: config.description,\r\n require: ['core', ...(config.require ?? [])],\r\n },\r\n build: {\r\n externalGlobals: command == 'serve' ? {} : {\r\n vue: 'window.$$lib$$.Vue',\r\n vant: 'window.$$lib$$.Vant',\r\n 'naive-ui': 'window.$$lib$$.Naive',\r\n axios: 'window.$$lib$$.Axios',\r\n 'es-toolkit': 'window.$$lib$$.EsKits',\r\n 'delta-comic-core': 'window.$$lib$$.Dcc',\r\n 'vue-router': 'window.$$lib$$.VR',\r\n 'crypto-js': 'window.$$lib$$.Crypto'\r\n },\r\n },\r\n server: {\r\n mountGmApi: false,\r\n open: false,\r\n prefix: false\r\n }\r\n} as any)\r\n\r\nexport const createExternalConfig = (command: \"build\" | \"serve\") => command == 'build' ? {} : {\r\n externals: {\r\n vue: 'window.$$lib$$.Vue',\r\n vant: 'window.$$lib$$.Vant',\r\n 'naive-ui': 'window.$$lib$$.Naive',\r\n axios: 'window.$$lib$$.Axios',\r\n 'es-toolkit': 'window.$$lib$$.EsKits',\r\n 'delta-comic-core': 'window.$$lib$$.Dcc',\r\n 'vue-router': 'window.$$lib$$.VR',\r\n 'crypto-js': 'window.$$lib$$.Crypto'\r\n }\r\n} as any\r\n"],"mappings":"AAAA,MAAa,sBAAsB,GAQhC,OAAgC;CACjC,OAAO,EAAO,SAAS;CACvB,YAAY;EACV,MAAM;GACJ,IAAI,EAAO;GACX,SAAS,EAAO;GACjB;EACD,SAAS,EAAO;EAChB,QAAQ,EAAO;EACf,aAAa,EAAO;EACpB,SAAS,CAAC,QAAQ,GAAI,EAAO,WAAW,EAAE,CAAE;EAC7C;CACD,OAAO,EACL,iBAAiB,KAAW,UAAU,EAAE,GAAG;EACzC,KAAK;EACL,MAAM;EACN,YAAY;EACZ,OAAO;EACP,cAAc;EACd,oBAAoB;EACpB,cAAc;EACd,aAAa;EACd,EACF;CACD,QAAQ;EACN,YAAY;EACZ,MAAM;EACN,QAAQ;EACT;CACF,GAEY,wBAAwB,MAA+B,KAAW,UAAU,EAAE,GAAG,EAC5F,WAAW;CACT,KAAK;CACL,MAAM;CACN,YAAY;CACZ,OAAO;CACP,cAAc;CACd,oBAAoB;CACpB,cAAc;CACd,aAAa;CACd,EACF"}
@@ -49,8 +49,8 @@ export declare abstract class ContentPage<T extends object = any> {
49
49
  abstract loadAll(signal?: AbortSignal): Promise<any>;
50
50
  abstract reloadAll(signal?: AbortSignal): Promise<any>;
51
51
  abstract plugin: string;
52
- abstract loadAllOffline(): Promise<T>;
53
- abstract exportOffline(save: T): Promise<any>;
52
+ abstract loadAllOffline(save: T): Promise<any>;
53
+ abstract exportOffline(): Promise<T>;
54
54
  abstract ViewComp: ViewComp;
55
55
  }
56
56
  export type ViewComp = Component<{
@@ -0,0 +1,8 @@
1
+ export declare abstract class Downloader {
2
+ abstract id: string;
3
+ abstract name: string;
4
+ abstract $$plugin: string;
5
+ abstract begin: () => void;
6
+ abstract resume: () => void;
7
+ abstract pause: () => void;
8
+ }
@@ -1,10 +1,43 @@
1
1
  import { Raw, Ref } from 'vue';
2
+ /**
3
+ * 可以结构化的数据
4
+ */
2
5
  export declare class Struct<TRaw extends object> {
3
6
  protected $$raw: TRaw;
4
7
  toJSON(): TRaw;
5
8
  constructor($$raw: TRaw);
6
9
  }
7
10
  export type MetaData = Record<string | number, any>;
11
+ /**
12
+ * 比如有很多需要注明来自哪个插件的值都可以用
13
+ */
14
+ export declare class SourcedValue<T extends [string, string]> {
15
+ separator: string;
16
+ toJSON(value: T | string): T;
17
+ parse(value: string): T;
18
+ toString(value: T | string): string;
19
+ stringify(value: T): string;
20
+ constructor(separator?: string);
21
+ }
22
+ /**
23
+ * 相比较于普通的Map,这个元素的key操作可以是`TKey | string`
24
+ * _但内部保存仍使用`SourcedValue.toString`作为key_
25
+ */
26
+ export declare class SourcedKeyMap<TKey extends [string, string], TValue> extends SourcedValue<TKey> implements Map<string, TValue> {
27
+ private store;
28
+ get size(): number;
29
+ [Symbol.toStringTag]: string;
30
+ clear(): void;
31
+ delete(key: string | TKey): boolean;
32
+ forEach(callbackfn: (value: TValue, key: string, map: Map<string, TValue>) => void, thisArg?: any): void;
33
+ get(key: string | TKey): TValue | undefined;
34
+ has(key: string | TKey): boolean;
35
+ set(key: string | TKey, value: TValue): this;
36
+ entries(): MapIterator<[string, TValue]>;
37
+ keys(): MapIterator<string>;
38
+ values(): MapIterator<TValue>;
39
+ [Symbol.iterator](): MapIterator<[string, TValue]>;
40
+ }
8
41
  type PromiseContentEmits<TR> = {
9
42
  success: TR;
10
43
  error: any;
package/dist/pack.tgz CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "delta-comic-core",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "我曾亲眼见证神的熟视无睹.",
5
5
  "homepage": "https://github.com/wenxig/delta-comic-core",
6
6
  "repository": {