@delta-comic/plugin 0.3.4 → 1.3.0

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.
Files changed (45) hide show
  1. package/LICENSE +1 -1
  2. package/dist/core-NoooY1bz.js +2 -0
  3. package/dist/core-wAb1OuYe.js +521 -0
  4. package/dist/core-wAb1OuYe.js.map +1 -0
  5. package/dist/index.css +2 -2
  6. package/dist/index.js +2300 -1614
  7. package/dist/index.js.map +1 -1
  8. package/dist/pack.tgz +0 -0
  9. package/package.json +21 -26
  10. package/dist/lib/config.d.ts +0 -71
  11. package/dist/lib/depends.d.ts +0 -7
  12. package/dist/lib/driver/core.d.ts +0 -68
  13. package/dist/lib/driver/icon.d.ts +0 -3
  14. package/dist/lib/driver/index.d.ts +0 -3
  15. package/dist/lib/driver/init/booter/0_configSetter.d.ts +0 -8
  16. package/dist/lib/driver/init/booter/10_apiTest.d.ts +0 -9
  17. package/dist/lib/driver/init/booter/20_resourceTest.d.ts +0 -8
  18. package/dist/lib/driver/init/booter/30_boot.d.ts +0 -8
  19. package/dist/lib/driver/init/booter/40_auth.d.ts +0 -8
  20. package/dist/lib/driver/init/booter/50_otherProcess.d.ts +0 -8
  21. package/dist/lib/driver/init/booter/utils.d.ts +0 -3
  22. package/dist/lib/driver/init/index.d.ts +0 -19
  23. package/dist/lib/driver/init/installer/10_normalUrl.d.ts +0 -12
  24. package/dist/lib/driver/init/installer/20_local.d.ts +0 -12
  25. package/dist/lib/driver/init/installer/30_dev.d.ts +0 -12
  26. package/dist/lib/driver/init/installer/40_github.d.ts +0 -12
  27. package/dist/lib/driver/init/installer/9999_awesome.d.ts +0 -12
  28. package/dist/lib/driver/init/loader/1_userscript.d.ts +0 -11
  29. package/dist/lib/driver/init/loader/2_zip.d.ts +0 -11
  30. package/dist/lib/driver/init/utils.d.ts +0 -28
  31. package/dist/lib/driver/store.d.ts +0 -37
  32. package/dist/lib/env/Inject.vue.d.ts +0 -18
  33. package/dist/lib/env/index.d.ts +0 -12
  34. package/dist/lib/global.d.ts +0 -26
  35. package/dist/lib/index.d.ts +0 -6
  36. package/dist/lib/plugin/api.d.ts +0 -8
  37. package/dist/lib/plugin/auth.d.ts +0 -15
  38. package/dist/lib/plugin/content.d.ts +0 -8
  39. package/dist/lib/plugin/index.d.ts +0 -81
  40. package/dist/lib/plugin/otherProgress.d.ts +0 -4
  41. package/dist/lib/plugin/resource.d.ts +0 -5
  42. package/dist/lib/plugin/search.d.ts +0 -71
  43. package/dist/lib/plugin/share.d.ts +0 -26
  44. package/dist/lib/plugin/subscribe.d.ts +0 -13
  45. package/dist/lib/plugin/user.d.ts +0 -47
package/dist/pack.tgz CHANGED
Binary file
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@delta-comic/plugin",
3
- "version": "0.3.4",
3
+ "version": "1.3.0",
4
4
  "description": "空阙虱楼",
5
- "homepage": "https://github.com/delta-comic/delta-comic-core",
5
+ "homepage": "https://github.com/delta-comic/delta-comic",
6
6
  "license": "AGPL-3.0-only",
7
7
  "author": {
8
8
  "name": "wenxig",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "https://github.com/delta-comic/delta-comic-core.git"
13
+ "url": "https://github.com/delta-comic/delta-comic.git"
14
14
  },
15
15
  "files": [
16
16
  "dist"
@@ -32,35 +32,33 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@octokit/rest": "^22.0.1",
35
+ "@pinia/colada": "^1.0.0",
35
36
  "@tauri-apps/api": "^2.10.1",
36
37
  "@tauri-apps/plugin-fs": "^2.4.5",
37
38
  "@vueuse/core": "^14.2.1",
39
+ "axios": "^1.13.6",
38
40
  "jszip": "^3.10.1",
39
41
  "lz-string": "^1.5.0",
40
42
  "mitt": "^3.0.1",
43
+ "pinia": "^3.0.4",
41
44
  "userscript-meta": "^1.0.1",
42
- "vue-component-type-helpers": "^3.2.4",
43
- "@delta-comic/db": "0.0.6",
44
- "@delta-comic/model": "0.0.4",
45
- "@delta-comic/utils": "0.0.6",
46
- "@delta-comic/ui": "0.0.7",
47
- "@delta-comic/core": "0.3.2"
45
+ "vue": "^3.5.30",
46
+ "vue-component-type-helpers": "^3.2.6",
47
+ "@delta-comic/db": "1.3.0",
48
+ "@delta-comic/ui": "1.3.0",
49
+ "@delta-comic/utils": "1.3.0",
50
+ "@delta-comic/model": "1.3.0",
51
+ "@delta-comic/core": "1.3.0"
48
52
  },
49
53
  "devDependencies": {
50
- "@tailwindcss/vite": "^4.1.18",
51
- "@vitejs/plugin-vue": "^6.0.3",
52
- "@vitejs/plugin-vue-jsx": "^5.1.3",
54
+ "@tailwindcss/vite": "^4.2.1",
55
+ "@vitejs/plugin-vue": "^6.0.4",
56
+ "@vitejs/plugin-vue-jsx": "^5.1.4",
53
57
  "browserslist": "^4.28.1",
54
- "lightningcss": "^1.30.2",
55
- "tailwindcss": "^4.1.18",
56
- "vite": "8.0.0-beta.15"
57
- },
58
- "peerDependencies": {
59
- "axios": "^1.13",
60
- "kysely": "^0.28",
61
- "pinia": "^3.0",
62
- "vue": "^3.5",
63
- "vue-router": "^5.0"
58
+ "lightningcss": "^1.32.0",
59
+ "tailwindcss": "^4.2.2",
60
+ "vite": "npm:@voidzero-dev/vite-plus-core@latest",
61
+ "vite-plus": "latest"
64
62
  },
65
63
  "release": {
66
64
  "tagFormat": "plugin-${version}"
@@ -70,9 +68,6 @@
70
68
  },
71
69
  "readme": "./README.md",
72
70
  "scripts": {
73
- "build": "vite build && pnpm pack --out ./dist/pack.tgz",
74
- "version:major": "pnpm version major --no-git-tag-version || true",
75
- "version:minor": "pnpm version minor --no-git-tag-version || true",
76
- "version:patch": "pnpm version patch --no-git-tag-version || true"
71
+ "build": "vp build && pnpm pack --out ./dist/pack.tgz"
77
72
  }
78
73
  }
@@ -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: Ref<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: Ref<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: Ref<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">>;
@@ -1,7 +0,0 @@
1
- interface DependDefineConstraint<_T> {
2
- }
3
- export type DependDefine<T> = symbol & DependDefineConstraint<T>;
4
- export declare const declareDepType: <T>(name: string) => DependDefine<T>;
5
- export declare const require: <T>(define: DependDefine<T>) => T;
6
- export declare const pluginExposes: Map<symbol, any>;
7
- export {};
@@ -1,68 +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
- onBooted: () => void;
38
- share: {
39
- initiative: {
40
- filter: () => true;
41
- icon: import('vue').FunctionalComponent<{}, {}, any, {}>;
42
- key: string;
43
- name: string;
44
- call(page: uni.content.ContentPage<any>): Promise<void>;
45
- }[];
46
- tokenListen: {
47
- key: string;
48
- name: string;
49
- patten(chipboard: string): boolean;
50
- show(chipboard: string): {
51
- title: string;
52
- detail: string;
53
- onNegative(): void;
54
- onPositive(): {
55
- fn: import('@delta-comic/core').SharedFunctions[keyof import('@delta-comic/core').SharedFunctions];
56
- plugin: string;
57
- result: PromiseLike<any>;
58
- }[] & Promise<{
59
- result: any;
60
- fn: import('@delta-comic/core').SharedFunctions[keyof import('@delta-comic/core').SharedFunctions];
61
- plugin: string;
62
- }[]>;
63
- };
64
- }[];
65
- };
66
- }>;
67
- export declare const coreName = "core";
68
- export declare const core: import('../depends').DependDefine<void>;
@@ -1,3 +0,0 @@
1
- import { FunctionalComponent } from 'vue';
2
- export declare const OfflineShareRound: FunctionalComponent;
3
- export declare const TagOutlined: FunctionalComponent;
@@ -1,3 +0,0 @@
1
- export declare const loadAllPlugins: () => import('@delta-comic/model').RPromiseContent<void, void>;
2
- export * from './init';
3
- export * from './store';
@@ -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,19 +0,0 @@
1
- import { PluginArchiveDB } from '@delta-comic/db';
2
- import { DownloadMessageBind } from '@delta-comic/ui';
3
- import { PluginConfig, PluginMeta } from '../../plugin';
4
- import { PluginInstaller, PluginLoader } from './utils';
5
- export declare const bootPlugin: (cfg: PluginConfig) => Promise<void>;
6
- declare const installers: PluginInstaller[];
7
- export interface SourceOverrideConfig {
8
- id: string;
9
- install: string;
10
- enabled: boolean;
11
- }
12
- export declare const usePluginConfig: () => import('@vueuse/core').RemovableRef<SourceOverrideConfig[]> & Promise<import('@vueuse/core').RemovableRef<SourceOverrideConfig[]>>;
13
- export declare const installDepends: (m: DownloadMessageBind, meta: PluginMeta, installedPlugins?: Set<string>) => Promise<void>;
14
- export declare const installPlugin: (input: string, __installedPlugins?: Set<string>) => Promise<void>;
15
- export declare const installFilePlugin: (file: File, __installedPlugins?: Set<string>) => Promise<void>;
16
- export declare const updatePlugin: (pluginMeta: PluginArchiveDB.Meta, __installedPlugins?: Set<string>) => Promise<void>;
17
- declare const loaders: PluginLoader[];
18
- export declare const loadPlugin: (meta: PluginArchiveDB.Meta) => Promise<void>;
19
- export { loaders as pluginLoaders, installers as pluginInstallers };
@@ -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
- install(input: string): Promise<File>;
8
- update(pluginMeta: PluginArchiveDB.Meta): Promise<File>;
9
- isMatched(input: string): boolean;
10
- }
11
- declare const _default: _PluginInstallByFallbackUrl;
12
- export default _default;
@@ -1,12 +0,0 @@
1
- import { PluginInstaller, PluginInstallerDescription } from '../utils';
2
- import { PluginArchiveDB } from '@delta-comic/db';
3
- export declare class _PluginInstallByLocal extends PluginInstaller {
4
- description: PluginInstallerDescription;
5
- name: string;
6
- private installer;
7
- install(input: string): Promise<File>;
8
- update(pluginMeta: PluginArchiveDB.Meta): Promise<File>;
9
- isMatched(input: string): boolean;
10
- }
11
- declare const _default: _PluginInstallByLocal;
12
- export default _default;
@@ -1,12 +0,0 @@
1
- import { PluginInstaller, PluginInstallerDescription } from '../utils';
2
- import { PluginArchiveDB } from '@delta-comic/db';
3
- export declare class _PluginInstallByDev extends PluginInstaller {
4
- description: PluginInstallerDescription;
5
- name: string;
6
- private installer;
7
- install(input: string): Promise<File>;
8
- update(pluginMeta: PluginArchiveDB.Meta): 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
- install(input: string): Promise<File>;
8
- update(pluginMeta: PluginArchiveDB.Meta): 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
- install(input: string): Promise<File | string>;
8
- update(pluginMeta: PluginArchiveDB.Meta): 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 { PluginMeta } from '../../../plugin';
3
- import { PluginLoader } from '../utils';
4
- declare class _PluginUserscriptLoader extends PluginLoader {
5
- name: string;
6
- installDownload(file: File): Promise<PluginMeta>;
7
- canInstall(file: File): boolean;
8
- load(pluginMeta: PluginArchiveDB.Meta): Promise<any>;
9
- }
10
- declare const _default: _PluginUserscriptLoader;
11
- export default _default;
@@ -1,11 +0,0 @@
1
- import { PluginLoader } from '../utils';
2
- import { PluginMeta } from '../../../plugin';
3
- import { PluginArchiveDB } from '@delta-comic/db';
4
- declare class _PluginUserscriptLoader extends PluginLoader {
5
- name: string;
6
- installDownload(file: File): Promise<PluginMeta>;
7
- canInstall(file: File): boolean;
8
- load(pluginMeta: PluginArchiveDB.Meta): Promise<any>;
9
- }
10
- declare const _default: _PluginUserscriptLoader;
11
- export default _default;
@@ -1,28 +0,0 @@
1
- import { PluginArchiveDB } from '@delta-comic/db';
2
- import { PluginConfig, PluginMeta } 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 install(input: string): Promise<File | string>;
10
- abstract update(pluginMeta: PluginArchiveDB.Meta): 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.Meta): Promise<any>;
18
- abstract installDownload(file: File): Promise<PluginMeta>;
19
- abstract canInstall(file: File): boolean;
20
- }
21
- export type PluginBooterSetMeta = (meta: Partial<{
22
- description: string;
23
- name: string;
24
- }> | string) => void;
25
- export declare abstract class PluginBooter {
26
- abstract name: string;
27
- abstract call(cfg: PluginConfig, setMeta: PluginBooterSetMeta, env: Record<any, any>): Promise<any>;
28
- }
@@ -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 { GlobalInjections } from '.';
2
- import { ComponentProps } from 'vue-component-type-helpers';
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
- } & {};
@@ -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;
@@ -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 {};
@@ -1,6 +0,0 @@
1
- export * from './plugin';
2
- export * from './config';
3
- export * from './depends';
4
- export * from './global';
5
- export * from './driver';
6
- export * from './env';
@@ -1,8 +0,0 @@
1
- export interface Config {
2
- forks: () => PromiseLike<string[]> | string[];
3
- /**
4
- * error -> 不可用
5
- * other -> 可用并比对时间
6
- */
7
- test: (fork: string, signal: AbortSignal) => PromiseLike<void>;
8
- }
@@ -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.ItemCardComp;
4
- commentRow?: uni.comment.CommentRow;
5
- layout?: uni.content.ViewLayoutComp;
6
- contentPage?: uni.content.ContentPageLike;
7
- itemTranslator?: uni.item.ItemTranslator;
8
- }>;