@delta-comic/plugin 2.2.0 → 3.0.0-next.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/dist/global-3ZqxvD1L.mjs +1446 -0
- package/dist/global-3ZqxvD1L.mjs.map +1 -0
- package/dist/lib/index.d.mts +927 -0
- package/dist/lib/index.mjs +535 -0
- package/dist/lib/index.mjs.map +1 -0
- package/dist/native-CHH-Olpj.mjs +63 -0
- package/dist/native-CHH-Olpj.mjs.map +1 -0
- package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
- package/dist/runtime-C6MmbYYH.mjs +663 -0
- package/dist/runtime-C6MmbYYH.mjs.map +1 -0
- package/dist/storage-DMKDlPzl.mjs +351 -0
- package/dist/storage-DMKDlPzl.mjs.map +1 -0
- package/dist/vite/index.d.mts +33 -0
- package/dist/vite/index.mjs +81 -0
- package/dist/vite/index.mjs.map +1 -0
- package/package.json +30 -37
- package/README.md +0 -42
- package/dist/core-BF7YwnuZ.js +0 -2
- package/dist/core-Czlf2w3A.js +0 -521
- package/dist/core-Czlf2w3A.js.map +0 -1
- package/dist/index.css +0 -3
- package/dist/index.js +0 -6764
- package/dist/index.js.map +0 -1
- package/dist/lib/config.d.ts +0 -71
- package/dist/lib/depends.d.ts +0 -10
- package/dist/lib/driver/booter.d.ts +0 -4
- package/dist/lib/driver/core.d.ts +0 -67
- package/dist/lib/driver/icon.d.ts +0 -3
- package/dist/lib/driver/index.d.ts +0 -4
- package/dist/lib/driver/init/booter/0_configSetter.d.ts +0 -8
- package/dist/lib/driver/init/booter/10_apiTest.d.ts +0 -9
- package/dist/lib/driver/init/booter/20_resourceTest.d.ts +0 -8
- package/dist/lib/driver/init/booter/30_boot.d.ts +0 -8
- package/dist/lib/driver/init/booter/40_auth.d.ts +0 -8
- package/dist/lib/driver/init/booter/50_otherProcess.d.ts +0 -8
- package/dist/lib/driver/init/booter/utils.d.ts +0 -3
- package/dist/lib/driver/init/installer/10_normalUrl.d.ts +0 -12
- package/dist/lib/driver/init/installer/20_local.d.ts +0 -12
- package/dist/lib/driver/init/installer/30_dev.d.ts +0 -12
- package/dist/lib/driver/init/installer/40_github.d.ts +0 -12
- package/dist/lib/driver/init/installer/9999_awesome.d.ts +0 -12
- package/dist/lib/driver/init/loader/1_userscript.d.ts +0 -11
- package/dist/lib/driver/init/loader/2_zip.d.ts +0 -11
- package/dist/lib/driver/init/utils.d.ts +0 -29
- package/dist/lib/driver/install.d.ts +0 -14
- package/dist/lib/driver/loader.d.ts +0 -5
- package/dist/lib/driver/store.d.ts +0 -37
- package/dist/lib/env/Inject.vue.d.ts +0 -18
- package/dist/lib/env/index.d.ts +0 -12
- package/dist/lib/global.d.ts +0 -26
- package/dist/lib/index.d.ts +0 -6
- package/dist/lib/plugin/api.d.ts +0 -8
- package/dist/lib/plugin/auth.d.ts +0 -15
- package/dist/lib/plugin/content.d.ts +0 -8
- package/dist/lib/plugin/index.d.ts +0 -58
- package/dist/lib/plugin/otherProgress.d.ts +0 -4
- package/dist/lib/plugin/resource.d.ts +0 -5
- package/dist/lib/plugin/search.d.ts +0 -75
- package/dist/lib/plugin/share.d.ts +0 -26
- package/dist/lib/plugin/subscribe.d.ts +0 -15
- package/dist/lib/plugin/user.d.ts +0 -47
- package/dist/pack.tgz +0 -0
package/dist/lib/config.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { FormType } from '@delta-comic/ui';
|
|
2
|
-
import { Ref } from 'vue';
|
|
3
|
-
export type ConfigDescription = Record<string, Required<Pick<FormType.SingleConfigure, 'defaultValue'>> & FormType.SingleConfigure>;
|
|
4
|
-
export declare class ConfigPointer<T extends ConfigDescription = ConfigDescription> {
|
|
5
|
-
pluginName: string;
|
|
6
|
-
config: T;
|
|
7
|
-
configName: string;
|
|
8
|
-
constructor(pluginName: string, config: T, configName: string);
|
|
9
|
-
readonly key: symbol;
|
|
10
|
-
}
|
|
11
|
-
export declare const appConfig: ConfigPointer<{
|
|
12
|
-
recordHistory: {
|
|
13
|
-
type: "switch";
|
|
14
|
-
defaultValue: true;
|
|
15
|
-
info: string;
|
|
16
|
-
};
|
|
17
|
-
showAIProject: {
|
|
18
|
-
type: "switch";
|
|
19
|
-
defaultValue: true;
|
|
20
|
-
info: string;
|
|
21
|
-
};
|
|
22
|
-
darkMode: {
|
|
23
|
-
type: "radio";
|
|
24
|
-
defaultValue: string;
|
|
25
|
-
info: string;
|
|
26
|
-
comp: "select";
|
|
27
|
-
selects: {
|
|
28
|
-
label: string;
|
|
29
|
-
value: string;
|
|
30
|
-
}[];
|
|
31
|
-
};
|
|
32
|
-
easilyTitle: {
|
|
33
|
-
type: "switch";
|
|
34
|
-
defaultValue: false;
|
|
35
|
-
info: string;
|
|
36
|
-
};
|
|
37
|
-
githubToken: {
|
|
38
|
-
type: "string";
|
|
39
|
-
defaultValue: string;
|
|
40
|
-
info: string;
|
|
41
|
-
placeholder: string;
|
|
42
|
-
};
|
|
43
|
-
}>;
|
|
44
|
-
export declare const useConfig: import('pinia').StoreDefinition<"config", Pick<{
|
|
45
|
-
isDark: import('vue').ComputedRef<boolean>;
|
|
46
|
-
form: import('vue').ShallowReactive<Map<symbol, {
|
|
47
|
-
form: ConfigDescription;
|
|
48
|
-
value: any;
|
|
49
|
-
}>>;
|
|
50
|
-
$load: <T extends ConfigPointer>(pointer: T) => Ref<FormType.Result<T["config"]>>;
|
|
51
|
-
$isExistConfig: (pointer: ConfigPointer) => boolean;
|
|
52
|
-
$resignerConfig: (pointer: ConfigPointer) => void;
|
|
53
|
-
}, "form">, Pick<{
|
|
54
|
-
isDark: import('vue').ComputedRef<boolean>;
|
|
55
|
-
form: import('vue').ShallowReactive<Map<symbol, {
|
|
56
|
-
form: ConfigDescription;
|
|
57
|
-
value: any;
|
|
58
|
-
}>>;
|
|
59
|
-
$load: <T extends ConfigPointer>(pointer: T) => Ref<FormType.Result<T["config"]>>;
|
|
60
|
-
$isExistConfig: (pointer: ConfigPointer) => boolean;
|
|
61
|
-
$resignerConfig: (pointer: ConfigPointer) => void;
|
|
62
|
-
}, "isDark">, Pick<{
|
|
63
|
-
isDark: import('vue').ComputedRef<boolean>;
|
|
64
|
-
form: import('vue').ShallowReactive<Map<symbol, {
|
|
65
|
-
form: ConfigDescription;
|
|
66
|
-
value: any;
|
|
67
|
-
}>>;
|
|
68
|
-
$load: <T extends ConfigPointer>(pointer: T) => Ref<FormType.Result<T["config"]>>;
|
|
69
|
-
$isExistConfig: (pointer: ConfigPointer) => boolean;
|
|
70
|
-
$resignerConfig: (pointer: ConfigPointer) => void;
|
|
71
|
-
}, "$load" | "$isExistConfig" | "$resignerConfig">>;
|
package/dist/lib/depends.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
interface DependDefineConstraint<_T> {
|
|
2
|
-
}
|
|
3
|
-
export type DependDefine<T> = symbol & DependDefineConstraint<T> & {
|
|
4
|
-
_ts: T;
|
|
5
|
-
};
|
|
6
|
-
export declare const declareDepType: <T>(name: string) => DependDefine<T>;
|
|
7
|
-
export declare const require: <T>(define: DependDefine<T>) => T;
|
|
8
|
-
export type InferDependType<T extends DependDefine<any>> = T['_ts'];
|
|
9
|
-
export declare const pluginExposes: Map<symbol, any>;
|
|
10
|
-
export {};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { uni } from '@delta-comic/model';
|
|
2
|
-
export declare const $initCore: () => Promise<{
|
|
3
|
-
name: string;
|
|
4
|
-
config: import('../config').ConfigPointer<{
|
|
5
|
-
recordHistory: {
|
|
6
|
-
type: "switch";
|
|
7
|
-
defaultValue: true;
|
|
8
|
-
info: string;
|
|
9
|
-
};
|
|
10
|
-
showAIProject: {
|
|
11
|
-
type: "switch";
|
|
12
|
-
defaultValue: true;
|
|
13
|
-
info: string;
|
|
14
|
-
};
|
|
15
|
-
darkMode: {
|
|
16
|
-
type: "radio";
|
|
17
|
-
defaultValue: string;
|
|
18
|
-
info: string;
|
|
19
|
-
comp: "select";
|
|
20
|
-
selects: {
|
|
21
|
-
label: string;
|
|
22
|
-
value: string;
|
|
23
|
-
}[];
|
|
24
|
-
};
|
|
25
|
-
easilyTitle: {
|
|
26
|
-
type: "switch";
|
|
27
|
-
defaultValue: false;
|
|
28
|
-
info: string;
|
|
29
|
-
};
|
|
30
|
-
githubToken: {
|
|
31
|
-
type: "string";
|
|
32
|
-
defaultValue: string;
|
|
33
|
-
info: string;
|
|
34
|
-
placeholder: string;
|
|
35
|
-
};
|
|
36
|
-
}>[];
|
|
37
|
-
share: {
|
|
38
|
-
initiative: {
|
|
39
|
-
filter: (page: uni.content.ContentPage) => boolean;
|
|
40
|
-
icon: import('vue').FunctionalComponent<{}, {}, any, {}>;
|
|
41
|
-
key: string;
|
|
42
|
-
name: string;
|
|
43
|
-
call(page: uni.content.ContentPage): Promise<void>;
|
|
44
|
-
}[];
|
|
45
|
-
tokenListen: {
|
|
46
|
-
key: string;
|
|
47
|
-
name: string;
|
|
48
|
-
patten(chipboard: string): boolean;
|
|
49
|
-
show(chipboard: string): {
|
|
50
|
-
title: string;
|
|
51
|
-
detail: string;
|
|
52
|
-
onNegative(): void;
|
|
53
|
-
onPositive(): {
|
|
54
|
-
fn: import('@delta-comic/core').SharedFunctions[keyof import('@delta-comic/core').SharedFunctions];
|
|
55
|
-
plugin: string;
|
|
56
|
-
result: PromiseLike<any>;
|
|
57
|
-
}[] & Promise<{
|
|
58
|
-
result: any;
|
|
59
|
-
fn: import('@delta-comic/core').SharedFunctions[keyof import('@delta-comic/core').SharedFunctions];
|
|
60
|
-
plugin: string;
|
|
61
|
-
}[]>;
|
|
62
|
-
};
|
|
63
|
-
}[];
|
|
64
|
-
};
|
|
65
|
-
}>;
|
|
66
|
-
export declare const coreName = "core";
|
|
67
|
-
export declare const core: import('../depends').DependDefine<any>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PluginConfig } from '../../../plugin';
|
|
2
|
-
import { PluginBooter, PluginBooterSetMeta } from '../utils';
|
|
3
|
-
declare class _ConfigSetter extends PluginBooter {
|
|
4
|
-
name: string;
|
|
5
|
-
call(cfg: PluginConfig, setMeta: PluginBooterSetMeta): Promise<any>;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: _ConfigSetter;
|
|
8
|
-
export default _default;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PluginConfig } from '../../../plugin';
|
|
2
|
-
import { PluginBooter, PluginBooterSetMeta } from '../utils';
|
|
3
|
-
export type _TestPluginApiResult = Record<string, string | false | undefined>;
|
|
4
|
-
declare class _TestPluginApi extends PluginBooter {
|
|
5
|
-
name: string;
|
|
6
|
-
call(cfg: PluginConfig, setMeta: PluginBooterSetMeta, env: Record<any, any>): Promise<any>;
|
|
7
|
-
}
|
|
8
|
-
declare const _default: _TestPluginApi;
|
|
9
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PluginConfig } from '../../../plugin';
|
|
2
|
-
import { PluginBooter, PluginBooterSetMeta } from '../utils';
|
|
3
|
-
declare class _TestPluginResource extends PluginBooter {
|
|
4
|
-
name: string;
|
|
5
|
-
call(cfg: PluginConfig, setMeta: PluginBooterSetMeta): Promise<any>;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: _TestPluginResource;
|
|
8
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PluginConfig } from '../../../plugin';
|
|
2
|
-
import { PluginBooter } from '../utils';
|
|
3
|
-
declare class _ExposeBootPlugin extends PluginBooter {
|
|
4
|
-
name: string;
|
|
5
|
-
call(cfg: PluginConfig, _: any, env: Record<any, any>): Promise<any>;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: _ExposeBootPlugin;
|
|
8
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PluginConfig } from '../../../plugin';
|
|
2
|
-
import { PluginBooter, PluginBooterSetMeta } from '../utils';
|
|
3
|
-
declare class _PluginAuth extends PluginBooter {
|
|
4
|
-
name: string;
|
|
5
|
-
call(cfg: PluginConfig, setMeta: PluginBooterSetMeta): Promise<any>;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: _PluginAuth;
|
|
8
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PluginConfig } from '../../../plugin';
|
|
2
|
-
import { PluginBooter, PluginBooterSetMeta } from '../utils';
|
|
3
|
-
declare class _TestPluginResource extends PluginBooter {
|
|
4
|
-
name: string;
|
|
5
|
-
call(cfg: PluginConfig, setMeta: PluginBooterSetMeta): Promise<any>;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: _TestPluginResource;
|
|
8
|
-
export default _default;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { PluginConfig } from '../../../plugin';
|
|
2
|
-
export declare const testApi: (cfg: NonNullable<PluginConfig["api"]>[string]) => Promise<[url: string, result: number | false]>;
|
|
3
|
-
export declare const testResourceApi: (cfg: NonNullable<NonNullable<PluginConfig["resource"]>["types"]>[number]) => Promise<[url: string, result: number | false]>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PluginArchiveDB } from '@delta-comic/db';
|
|
2
|
-
import { PluginInstaller, PluginInstallerDescription } from '../utils';
|
|
3
|
-
export declare class _PluginInstallByFallbackUrl extends PluginInstaller {
|
|
4
|
-
description: PluginInstallerDescription;
|
|
5
|
-
name: string;
|
|
6
|
-
private installer;
|
|
7
|
-
download(input: string): Promise<File>;
|
|
8
|
-
update(pluginMeta: PluginArchiveDB.Archive): Promise<File>;
|
|
9
|
-
isMatched(input: string): boolean;
|
|
10
|
-
}
|
|
11
|
-
declare const _default: _PluginInstallByFallbackUrl;
|
|
12
|
-
export default _default;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PluginArchiveDB } from '@delta-comic/db';
|
|
2
|
-
import { PluginInstaller, PluginInstallerDescription } from '../utils';
|
|
3
|
-
export declare class _PluginInstallByLocal extends PluginInstaller {
|
|
4
|
-
description: PluginInstallerDescription;
|
|
5
|
-
name: string;
|
|
6
|
-
private installer;
|
|
7
|
-
download(input: string): Promise<File>;
|
|
8
|
-
update(pluginMeta: PluginArchiveDB.Archive): Promise<File>;
|
|
9
|
-
isMatched(input: string): boolean;
|
|
10
|
-
}
|
|
11
|
-
declare const _default: _PluginInstallByLocal;
|
|
12
|
-
export default _default;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PluginArchiveDB } from '@delta-comic/db';
|
|
2
|
-
import { PluginInstaller, PluginInstallerDescription } from '../utils';
|
|
3
|
-
export declare class _PluginInstallByDev extends PluginInstaller {
|
|
4
|
-
description: PluginInstallerDescription;
|
|
5
|
-
name: string;
|
|
6
|
-
private installer;
|
|
7
|
-
download(input: string): Promise<File>;
|
|
8
|
-
update(pluginMeta: PluginArchiveDB.Archive): Promise<File>;
|
|
9
|
-
isMatched(input: string): boolean;
|
|
10
|
-
}
|
|
11
|
-
declare const _default: _PluginInstallByDev;
|
|
12
|
-
export default _default;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PluginArchiveDB } from '@delta-comic/db';
|
|
2
|
-
import { PluginInstaller, PluginInstallerDescription } from '../utils';
|
|
3
|
-
export declare class _PluginInstallByNormalUrl extends PluginInstaller {
|
|
4
|
-
description: PluginInstallerDescription;
|
|
5
|
-
name: string;
|
|
6
|
-
private installer;
|
|
7
|
-
download(input: string): Promise<File>;
|
|
8
|
-
update(pluginMeta: PluginArchiveDB.Archive): Promise<File>;
|
|
9
|
-
isMatched(input: string): boolean;
|
|
10
|
-
}
|
|
11
|
-
declare const _default: _PluginInstallByNormalUrl;
|
|
12
|
-
export default _default;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PluginArchiveDB } from '@delta-comic/db';
|
|
2
|
-
import { PluginInstaller, PluginInstallerDescription } from '../utils';
|
|
3
|
-
export declare class _PluginInstallByAwesome extends PluginInstaller {
|
|
4
|
-
description: PluginInstallerDescription;
|
|
5
|
-
name: string;
|
|
6
|
-
private installer;
|
|
7
|
-
download(input: string): Promise<File | string>;
|
|
8
|
-
update(pluginMeta: PluginArchiveDB.Archive): Promise<File | string>;
|
|
9
|
-
isMatched(input: string): boolean;
|
|
10
|
-
}
|
|
11
|
-
declare const _default: _PluginInstallByAwesome;
|
|
12
|
-
export default _default;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PluginArchiveDB } from '@delta-comic/db';
|
|
2
|
-
import { PluginLoader } from '../utils';
|
|
3
|
-
declare class _PluginUserscriptLoader extends PluginLoader {
|
|
4
|
-
name: string;
|
|
5
|
-
install(file: File): Promise<PluginArchiveDB.Meta>;
|
|
6
|
-
canInstall(file: File): boolean;
|
|
7
|
-
load(pluginMeta: PluginArchiveDB.Archive): Promise<any>;
|
|
8
|
-
decodeMeta(file: File): Promise<PluginArchiveDB.Meta>;
|
|
9
|
-
}
|
|
10
|
-
declare const _default: _PluginUserscriptLoader;
|
|
11
|
-
export default _default;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PluginArchiveDB } from '@delta-comic/db';
|
|
2
|
-
import { PluginLoader } from '../utils';
|
|
3
|
-
declare class _PluginUserscriptLoader extends PluginLoader {
|
|
4
|
-
name: string;
|
|
5
|
-
install(file: File): Promise<PluginArchiveDB.Meta>;
|
|
6
|
-
canInstall(file: File): boolean;
|
|
7
|
-
load(pluginMeta: PluginArchiveDB.Archive): Promise<any>;
|
|
8
|
-
decodeMeta(file: File): Promise<PluginArchiveDB.Meta>;
|
|
9
|
-
}
|
|
10
|
-
declare const _default: _PluginUserscriptLoader;
|
|
11
|
-
export default _default;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { PluginArchiveDB } from '@delta-comic/db';
|
|
2
|
-
import { PluginConfig } from '../../plugin';
|
|
3
|
-
export declare const getPluginFsPath: (pluginName: string) => Promise<string>;
|
|
4
|
-
export interface PluginInstallerDescription {
|
|
5
|
-
title: string;
|
|
6
|
-
description: string;
|
|
7
|
-
}
|
|
8
|
-
export declare abstract class PluginInstaller {
|
|
9
|
-
abstract download(input: string): Promise<File | string>;
|
|
10
|
-
abstract update(pluginMeta: PluginArchiveDB.Archive): Promise<File | string>;
|
|
11
|
-
abstract isMatched(input: string): boolean;
|
|
12
|
-
abstract name: string;
|
|
13
|
-
abstract description: PluginInstallerDescription;
|
|
14
|
-
}
|
|
15
|
-
export declare abstract class PluginLoader {
|
|
16
|
-
abstract name: string;
|
|
17
|
-
abstract load(pluginMeta: PluginArchiveDB.Archive): Promise<any>;
|
|
18
|
-
abstract install(file: File): Promise<PluginArchiveDB.Meta>;
|
|
19
|
-
abstract decodeMeta(file: File): Promise<PluginArchiveDB.Meta>;
|
|
20
|
-
abstract canInstall(file: File): boolean;
|
|
21
|
-
}
|
|
22
|
-
export type PluginBooterSetMeta = (meta: Partial<{
|
|
23
|
-
description: string;
|
|
24
|
-
name: string;
|
|
25
|
-
}> | string) => void;
|
|
26
|
-
export declare abstract class PluginBooter {
|
|
27
|
-
abstract name: string;
|
|
28
|
-
abstract call(cfg: PluginConfig, setMeta: PluginBooterSetMeta, env: Record<any, any>): Promise<any>;
|
|
29
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { PluginArchiveDB } from '@delta-comic/db';
|
|
2
|
-
import { DownloadMessageBind } from '@delta-comic/ui';
|
|
3
|
-
import { PluginInstaller } from './init/utils';
|
|
4
|
-
export declare const installers: PluginInstaller[];
|
|
5
|
-
export interface SourceOverrideConfig {
|
|
6
|
-
id: string;
|
|
7
|
-
install: string;
|
|
8
|
-
enabled: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const usePluginConfig: () => import('@vueuse/core').RemovableRef<SourceOverrideConfig[]>;
|
|
11
|
-
export declare const installDepends: (m: DownloadMessageBind, meta: PluginArchiveDB.Meta, installedPlugins?: Set<string>) => Promise<void>;
|
|
12
|
-
export declare const installPlugin: (input: string, __installedPlugins?: Set<string>) => Promise<void>;
|
|
13
|
-
export declare const installFilePlugin: (file: File, __installedPlugins?: Set<string>) => Promise<void>;
|
|
14
|
-
export declare const updatePlugin: (pluginMeta: PluginArchiveDB.Archive, __installedPlugins?: Set<string>) => Promise<void>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { PluginArchiveDB } from '@delta-comic/db';
|
|
2
|
-
import { PluginLoader } from './init/utils';
|
|
3
|
-
export declare const loaders: PluginLoader[];
|
|
4
|
-
export declare const loadPlugin: (meta: PluginArchiveDB.Archive) => Promise<void>;
|
|
5
|
-
export declare const loadAllPlugins: () => Promise<void>;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Raw } from 'vue';
|
|
2
|
-
import { PluginConfig, Search } from '../plugin';
|
|
3
|
-
export interface SavePluginBlob {
|
|
4
|
-
key: string;
|
|
5
|
-
blob: Blob;
|
|
6
|
-
}
|
|
7
|
-
export interface PluginData {
|
|
8
|
-
key: string;
|
|
9
|
-
value: any;
|
|
10
|
-
}
|
|
11
|
-
export type PluginLoadingMicroSteps = {
|
|
12
|
-
steps: {
|
|
13
|
-
name: string;
|
|
14
|
-
description: string;
|
|
15
|
-
}[];
|
|
16
|
-
now: {
|
|
17
|
-
stepsIndex: number;
|
|
18
|
-
status: 'process' | 'error' | 'finish' | 'wait';
|
|
19
|
-
error?: Error;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export declare const usePluginStore: import('pinia').StoreDefinition<"plugin", Pick<{
|
|
23
|
-
$getPluginDisplayName: (key: string) => string;
|
|
24
|
-
plugins: import('vue').ShallowReactive<Map<string, Raw<PluginConfig>>>;
|
|
25
|
-
allSearchSource: import('vue').ComputedRef<[plugin: string, sources: [name: string, method: Search.SearchMethod][]][]>;
|
|
26
|
-
pluginSteps: Record<string, PluginLoadingMicroSteps>;
|
|
27
|
-
}, "plugins" | "pluginSteps">, Pick<{
|
|
28
|
-
$getPluginDisplayName: (key: string) => string;
|
|
29
|
-
plugins: import('vue').ShallowReactive<Map<string, Raw<PluginConfig>>>;
|
|
30
|
-
allSearchSource: import('vue').ComputedRef<[plugin: string, sources: [name: string, method: Search.SearchMethod][]][]>;
|
|
31
|
-
pluginSteps: Record<string, PluginLoadingMicroSteps>;
|
|
32
|
-
}, "allSearchSource">, Pick<{
|
|
33
|
-
$getPluginDisplayName: (key: string) => string;
|
|
34
|
-
plugins: import('vue').ShallowReactive<Map<string, Raw<PluginConfig>>>;
|
|
35
|
-
allSearchSource: import('vue').ComputedRef<[plugin: string, sources: [name: string, method: Search.SearchMethod][]][]>;
|
|
36
|
-
pluginSteps: Record<string, PluginLoadingMicroSteps>;
|
|
37
|
-
}, "$getPluginDisplayName">>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from 'vue-component-type-helpers';
|
|
2
|
-
import { GlobalInjections } from '.';
|
|
3
|
-
declare const _default: <T extends keyof GlobalInjections>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & {
|
|
5
|
-
key: T;
|
|
6
|
-
args: ComponentProps<GlobalInjections[T]>;
|
|
7
|
-
} & Partial<{}>> & import('vue').PublicProps;
|
|
8
|
-
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
9
|
-
attrs: any;
|
|
10
|
-
slots: {};
|
|
11
|
-
emit: {};
|
|
12
|
-
}>) => import('vue').VNode & {
|
|
13
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
14
|
-
};
|
|
15
|
-
export default _default;
|
|
16
|
-
type __VLS_PrettifyLocal<T> = {
|
|
17
|
-
[K in keyof T]: T[K];
|
|
18
|
-
} & {};
|
package/dist/lib/env/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Component, Raw } from 'vue';
|
|
2
|
-
import { default as Inject } from './Inject.vue';
|
|
3
|
-
import { ComponentProps } from 'vue-component-type-helpers';
|
|
4
|
-
export { Inject };
|
|
5
|
-
export type GlobalInjectionsConfig<T extends keyof GlobalInjections = keyof GlobalInjections> = {
|
|
6
|
-
key: T;
|
|
7
|
-
component: Raw<GlobalInjections[T]>;
|
|
8
|
-
condition: (args: ComponentProps<GlobalInjections[T]>) => boolean | Promise<boolean>;
|
|
9
|
-
};
|
|
10
|
-
export interface GlobalInjections extends Record<string, Component> {
|
|
11
|
-
}
|
|
12
|
-
export declare const addInjection: <T extends keyof GlobalInjections, TCfg extends GlobalInjectionsConfig<T> = GlobalInjectionsConfig<T>>(key: TCfg["key"], value: TCfg["component"], condition?: TCfg["condition"]) => void;
|
package/dist/lib/global.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { SourcedKeyMap } from '@delta-comic/model';
|
|
2
|
-
import { Component, Raw } from 'vue';
|
|
3
|
-
import { Search, Share, Subscribe, User } from './plugin';
|
|
4
|
-
import { GlobalInjectionsConfig } from './env';
|
|
5
|
-
declare class _Global {
|
|
6
|
-
share: import('vue').ShallowReactive<import('vue').ShallowReactive<SourcedKeyMap<[plugin: string, key: string], Share.InitiativeItem>>>;
|
|
7
|
-
shareToken: import('vue').ShallowReactive<import('vue').ShallowReactive<SourcedKeyMap<[plugin: string, key: string], Share.ShareToken>>>;
|
|
8
|
-
userActions: import('vue').ShallowReactive<import('vue').ShallowReactive<SourcedKeyMap<[plugin: string, key: string], User.UserAction>>>;
|
|
9
|
-
subscribes: import('vue').ShallowReactive<import('vue').ShallowReactive<SourcedKeyMap<[plugin: string, key: string], Subscribe.Config>>>;
|
|
10
|
-
globalNodes: import('vue').ShallowReactive<Raw<Component>[]>;
|
|
11
|
-
tabbar: import('vue').ShallowReactive<Map<string, Search.Tabbar[]>>;
|
|
12
|
-
addTabbar(plugin: string, ...tabbar: Search.Tabbar[]): void;
|
|
13
|
-
categories: import('vue').ShallowReactive<Map<string, Search.Category[]>>;
|
|
14
|
-
addCategories(plugin: string, ...categories: Search.Category[]): void;
|
|
15
|
-
barcode: import('vue').ShallowReactive<Map<string, Search.Barcode[]>>;
|
|
16
|
-
addBarcode(plugin: string, ...barcode: Search.Barcode[]): void;
|
|
17
|
-
levelboard: import('vue').ShallowReactive<Map<string, Search.HotLevelboard[]>>;
|
|
18
|
-
addLevelboard(plugin: string, ...levelboard: Search.HotLevelboard[]): void;
|
|
19
|
-
topButton: import('vue').ShallowReactive<Map<string, Search.HotTopButton[]>>;
|
|
20
|
-
addTopButton(plugin: string, ...topButton: Search.HotTopButton[]): void;
|
|
21
|
-
mainLists: import('vue').ShallowReactive<Map<string, Search.HotMainList[]>>;
|
|
22
|
-
addMainList(plugin: string, ...mainLists: Search.HotMainList[]): void;
|
|
23
|
-
envExtends: import('vue').ShallowReactive<Set<GlobalInjectionsConfig>>;
|
|
24
|
-
}
|
|
25
|
-
export declare const Global: _Global;
|
|
26
|
-
export {};
|
package/dist/lib/index.d.ts
DELETED
package/dist/lib/plugin/api.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FormType } from '@delta-comic/ui';
|
|
2
|
-
export interface Config {
|
|
3
|
-
signUp: (by: Method) => PromiseLike<any>;
|
|
4
|
-
logIn: (by: Method) => PromiseLike<any>;
|
|
5
|
-
passSelect: () => PromiseLike<'signUp' | 'logIn' | false>;
|
|
6
|
-
}
|
|
7
|
-
export type Method = {
|
|
8
|
-
form<T extends FormType.Configure>(form: T): Promise<{
|
|
9
|
-
[x in keyof T]: FormType.SingleResult<T[x]>;
|
|
10
|
-
}>;
|
|
11
|
-
/**
|
|
12
|
-
* sandbox: "allow-forms allow-modals allow-orientation-lock allow-popups-to-escape-sandbox allow-pointer-lock"
|
|
13
|
-
*/
|
|
14
|
-
website(url: string): Window;
|
|
15
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { uni } from '@delta-comic/model';
|
|
2
|
-
export type Config = Record<string, {
|
|
3
|
-
itemCard?: uni.item.ItemCardComponent;
|
|
4
|
-
commentRow?: uni.comment.CommentRow;
|
|
5
|
-
layout?: uni.content.LayoutComponent;
|
|
6
|
-
contentPage?: uni.content.ContentPageLike;
|
|
7
|
-
itemTranslator?: uni.item.ItemTranslator;
|
|
8
|
-
}>;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { ConfigPointer } from '../config';
|
|
2
|
-
import { PluginArchiveDB } from '@delta-comic/db';
|
|
3
|
-
import type * as Share from './share';
|
|
4
|
-
export type * as Share from './share';
|
|
5
|
-
import type * as Content from './content';
|
|
6
|
-
export type * as Content from './content';
|
|
7
|
-
import type * as Subscribe from './subscribe';
|
|
8
|
-
export type * as Subscribe from './subscribe';
|
|
9
|
-
import type * as User from './user';
|
|
10
|
-
export type * as User from './user';
|
|
11
|
-
import type * as Api from './api';
|
|
12
|
-
export type * as Api from './api';
|
|
13
|
-
import type * as OtherProgress from './otherProgress';
|
|
14
|
-
export type * as OtherProgress from './otherProgress';
|
|
15
|
-
import type * as Search from './search';
|
|
16
|
-
export type * as Search from './search';
|
|
17
|
-
import type * as Auth from './auth';
|
|
18
|
-
export type * as Auth from './auth';
|
|
19
|
-
import type * as Resource from './resource';
|
|
20
|
-
export type * as Resource from './resource';
|
|
21
|
-
export declare const pluginEmitter: import('mitt').Emitter<{
|
|
22
|
-
definedPlugin: PluginConfig;
|
|
23
|
-
}>;
|
|
24
|
-
export interface PluginConfig {
|
|
25
|
-
name: string;
|
|
26
|
-
content?: Content.Config;
|
|
27
|
-
resource?: Resource.Content;
|
|
28
|
-
api?: Record<string, Api.Config>;
|
|
29
|
-
user?: User.Config;
|
|
30
|
-
auth?: Auth.Config;
|
|
31
|
-
otherProgress?: OtherProgress.Config[];
|
|
32
|
-
/**
|
|
33
|
-
* 返回值如果不为空,则会await后作为expose暴露
|
|
34
|
-
*/
|
|
35
|
-
onBooted?(ins: DefineResult): (PromiseLike<object> | object) | void;
|
|
36
|
-
search?: Search.Config;
|
|
37
|
-
/**
|
|
38
|
-
* 插件的配置项需在此处注册
|
|
39
|
-
* 传入`Store.ConfigPointer`
|
|
40
|
-
*/
|
|
41
|
-
config?: ConfigPointer[];
|
|
42
|
-
subscribe?: Record<string, Subscribe.Config>;
|
|
43
|
-
share?: Share.Config;
|
|
44
|
-
}
|
|
45
|
-
export type DefineResult = {
|
|
46
|
-
api?: Record<string, string | undefined | false>;
|
|
47
|
-
};
|
|
48
|
-
export declare const definePlugin: <T extends PluginConfig>(config: T | ((safe: boolean) => T)) => Promise<T>;
|
|
49
|
-
export type PluginExpose<T extends () => Promise<PluginConfig>> = Awaited<ReturnType<NonNullable<Awaited<ReturnType<T>>['onBooted']>>>;
|
|
50
|
-
export interface RawPluginMeta {
|
|
51
|
-
'name:display': string;
|
|
52
|
-
'name:id': string;
|
|
53
|
-
'version': string;
|
|
54
|
-
'author': string | undefined;
|
|
55
|
-
'description': string;
|
|
56
|
-
'require'?: string[] | string;
|
|
57
|
-
}
|
|
58
|
-
export declare const decodePluginMeta: (v: RawPluginMeta) => PluginArchiveDB.Meta;
|