@delta-comic/plugin 0.3.5 → 1.3.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.
@@ -0,0 +1,4 @@
1
+ import { PluginConfig } from '../plugin';
2
+ import { PluginBooter } from './init/utils';
3
+ export declare const booters: PluginBooter[];
4
+ export declare const bootPlugin: (cfg: PluginConfig) => Promise<void>;
@@ -34,14 +34,13 @@ export declare const $initCore: () => Promise<{
34
34
  placeholder: string;
35
35
  };
36
36
  }>[];
37
- onBooted: () => void;
38
37
  share: {
39
38
  initiative: {
40
- filter: () => true;
39
+ filter: (page: uni.content.ContentPage) => boolean;
41
40
  icon: import('vue').FunctionalComponent<{}, {}, any, {}>;
42
41
  key: string;
43
42
  name: string;
44
- call(page: uni.content.ContentPage<any>): Promise<void>;
43
+ call(page: uni.content.ContentPage): Promise<void>;
45
44
  }[];
46
45
  tokenListen: {
47
46
  key: string;
@@ -65,4 +64,4 @@ export declare const $initCore: () => Promise<{
65
64
  };
66
65
  }>;
67
66
  export declare const coreName = "core";
68
- export declare const core: import('../depends').DependDefine<void>;
67
+ export declare const core: import('../depends').DependDefine<any>;
@@ -1,3 +1,4 @@
1
- export declare const loadAllPlugins: () => import('@delta-comic/model').RPromiseContent<void, void>;
2
- export * from './init';
3
1
  export * from './store';
2
+ export * as Booter from './booter';
3
+ export * as Install from './install';
4
+ export * as Loader from './loader';
@@ -4,8 +4,8 @@ export declare class _PluginInstallByFallbackUrl extends PluginInstaller {
4
4
  description: PluginInstallerDescription;
5
5
  name: string;
6
6
  private installer;
7
- install(input: string): Promise<File>;
8
- update(pluginMeta: PluginArchiveDB.Meta): Promise<File>;
7
+ download(input: string): Promise<File>;
8
+ update(pluginMeta: PluginArchiveDB.Archive): Promise<File>;
9
9
  isMatched(input: string): boolean;
10
10
  }
11
11
  declare const _default: _PluginInstallByFallbackUrl;
@@ -1,11 +1,11 @@
1
- import { PluginInstaller, PluginInstallerDescription } from '../utils';
2
1
  import { PluginArchiveDB } from '@delta-comic/db';
2
+ import { PluginInstaller, PluginInstallerDescription } from '../utils';
3
3
  export declare class _PluginInstallByLocal extends PluginInstaller {
4
4
  description: PluginInstallerDescription;
5
5
  name: string;
6
6
  private installer;
7
- install(input: string): Promise<File>;
8
- update(pluginMeta: PluginArchiveDB.Meta): Promise<File>;
7
+ download(input: string): Promise<File>;
8
+ update(pluginMeta: PluginArchiveDB.Archive): Promise<File>;
9
9
  isMatched(input: string): boolean;
10
10
  }
11
11
  declare const _default: _PluginInstallByLocal;
@@ -1,11 +1,11 @@
1
- import { PluginInstaller, PluginInstallerDescription } from '../utils';
2
1
  import { PluginArchiveDB } from '@delta-comic/db';
2
+ import { PluginInstaller, PluginInstallerDescription } from '../utils';
3
3
  export declare class _PluginInstallByDev extends PluginInstaller {
4
4
  description: PluginInstallerDescription;
5
5
  name: string;
6
6
  private installer;
7
- install(input: string): Promise<File>;
8
- update(pluginMeta: PluginArchiveDB.Meta): Promise<File>;
7
+ download(input: string): Promise<File>;
8
+ update(pluginMeta: PluginArchiveDB.Archive): Promise<File>;
9
9
  isMatched(input: string): boolean;
10
10
  }
11
11
  declare const _default: _PluginInstallByDev;
@@ -4,8 +4,8 @@ export declare class _PluginInstallByNormalUrl extends PluginInstaller {
4
4
  description: PluginInstallerDescription;
5
5
  name: string;
6
6
  private installer;
7
- install(input: string): Promise<File>;
8
- update(pluginMeta: PluginArchiveDB.Meta): Promise<File>;
7
+ download(input: string): Promise<File>;
8
+ update(pluginMeta: PluginArchiveDB.Archive): Promise<File>;
9
9
  isMatched(input: string): boolean;
10
10
  }
11
11
  declare const _default: _PluginInstallByNormalUrl;
@@ -4,8 +4,8 @@ export declare class _PluginInstallByAwesome extends PluginInstaller {
4
4
  description: PluginInstallerDescription;
5
5
  name: string;
6
6
  private installer;
7
- install(input: string): Promise<File | string>;
8
- update(pluginMeta: PluginArchiveDB.Meta): Promise<File | string>;
7
+ download(input: string): Promise<File | string>;
8
+ update(pluginMeta: PluginArchiveDB.Archive): Promise<File | string>;
9
9
  isMatched(input: string): boolean;
10
10
  }
11
11
  declare const _default: _PluginInstallByAwesome;
@@ -1,11 +1,11 @@
1
1
  import { PluginArchiveDB } from '@delta-comic/db';
2
- import { PluginMeta } from '../../../plugin';
3
2
  import { PluginLoader } from '../utils';
4
3
  declare class _PluginUserscriptLoader extends PluginLoader {
5
4
  name: string;
6
- installDownload(file: File): Promise<PluginMeta>;
5
+ install(file: File): Promise<PluginArchiveDB.Meta>;
7
6
  canInstall(file: File): boolean;
8
- load(pluginMeta: PluginArchiveDB.Meta): Promise<any>;
7
+ load(pluginMeta: PluginArchiveDB.Archive): Promise<any>;
8
+ decodeMeta(file: File): Promise<PluginArchiveDB.Meta>;
9
9
  }
10
10
  declare const _default: _PluginUserscriptLoader;
11
11
  export default _default;
@@ -1,11 +1,11 @@
1
- import { PluginLoader } from '../utils';
2
- import { PluginMeta } from '../../../plugin';
3
1
  import { PluginArchiveDB } from '@delta-comic/db';
2
+ import { PluginLoader } from '../utils';
4
3
  declare class _PluginUserscriptLoader extends PluginLoader {
5
4
  name: string;
6
- installDownload(file: File): Promise<PluginMeta>;
5
+ install(file: File): Promise<PluginArchiveDB.Meta>;
7
6
  canInstall(file: File): boolean;
8
- load(pluginMeta: PluginArchiveDB.Meta): Promise<any>;
7
+ load(pluginMeta: PluginArchiveDB.Archive): Promise<any>;
8
+ decodeMeta(file: File): Promise<PluginArchiveDB.Meta>;
9
9
  }
10
10
  declare const _default: _PluginUserscriptLoader;
11
11
  export default _default;
@@ -1,21 +1,22 @@
1
1
  import { PluginArchiveDB } from '@delta-comic/db';
2
- import { PluginConfig, PluginMeta } from '../../plugin';
2
+ import { PluginConfig } from '../../plugin';
3
3
  export declare const getPluginFsPath: (pluginName: string) => Promise<string>;
4
4
  export interface PluginInstallerDescription {
5
5
  title: string;
6
6
  description: string;
7
7
  }
8
8
  export declare abstract class PluginInstaller {
9
- abstract install(input: string): Promise<File | string>;
10
- abstract update(pluginMeta: PluginArchiveDB.Meta): Promise<File | string>;
9
+ abstract download(input: string): Promise<File | string>;
10
+ abstract update(pluginMeta: PluginArchiveDB.Archive): Promise<File | string>;
11
11
  abstract isMatched(input: string): boolean;
12
12
  abstract name: string;
13
13
  abstract description: PluginInstallerDescription;
14
14
  }
15
15
  export declare abstract class PluginLoader {
16
16
  abstract name: string;
17
- abstract load(pluginMeta: PluginArchiveDB.Meta): Promise<any>;
18
- abstract installDownload(file: File): Promise<PluginMeta>;
17
+ abstract load(pluginMeta: PluginArchiveDB.Archive): Promise<any>;
18
+ abstract install(file: File): Promise<PluginArchiveDB.Meta>;
19
+ abstract decodeMeta(file: File): Promise<PluginArchiveDB.Meta>;
19
20
  abstract canInstall(file: File): boolean;
20
21
  }
21
22
  export type PluginBooterSetMeta = (meta: Partial<{
@@ -1,19 +1,14 @@
1
1
  import { PluginArchiveDB } from '@delta-comic/db';
2
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[];
3
+ import { PluginInstaller } from './init/utils';
4
+ export declare const installers: PluginInstaller[];
7
5
  export interface SourceOverrideConfig {
8
6
  id: string;
9
7
  install: string;
10
8
  enabled: boolean;
11
9
  }
12
10
  export declare const usePluginConfig: () => import('@vueuse/core').RemovableRef<SourceOverrideConfig[]>;
13
- export declare const installDepends: (m: DownloadMessageBind, meta: PluginMeta, installedPlugins?: Set<string>) => Promise<void>;
11
+ export declare const installDepends: (m: DownloadMessageBind, meta: PluginArchiveDB.Meta, installedPlugins?: Set<string>) => Promise<void>;
14
12
  export declare const installPlugin: (input: string, __installedPlugins?: Set<string>) => Promise<void>;
15
13
  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 };
14
+ export declare const updatePlugin: (pluginMeta: PluginArchiveDB.Archive, __installedPlugins?: Set<string>) => Promise<void>;
@@ -0,0 +1,5 @@
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,5 +1,5 @@
1
- import { GlobalInjections } from '.';
2
1
  import { ComponentProps } from 'vue-component-type-helpers';
2
+ import { GlobalInjections } from '.';
3
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
4
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & {
5
5
  key: T;
@@ -1,8 +1,8 @@
1
1
  import { uni } from '@delta-comic/model';
2
2
  export type Config = Record<string, {
3
- itemCard?: uni.item.ItemCardComp;
3
+ itemCard?: uni.item.ItemCardComponent;
4
4
  commentRow?: uni.comment.CommentRow;
5
- layout?: uni.content.ViewLayoutComp;
5
+ layout?: uni.content.LayoutComponent;
6
6
  contentPage?: uni.content.ContentPageLike;
7
7
  itemTranslator?: uni.item.ItemTranslator;
8
8
  }>;
@@ -1,4 +1,5 @@
1
1
  import { ConfigPointer } from '../config';
2
+ import { PluginArchiveDB } from '@delta-comic/db';
2
3
  import type * as Share from './share';
3
4
  export type * as Share from './share';
4
5
  import type * as Content from './content';
@@ -54,28 +55,4 @@ export interface RawPluginMeta {
54
55
  'description': string;
55
56
  'require'?: string[] | string;
56
57
  }
57
- export interface PluginMeta {
58
- name: {
59
- display: string;
60
- id: string;
61
- };
62
- version: {
63
- plugin: string;
64
- supportCore: string;
65
- };
66
- author: string;
67
- description: string;
68
- require: {
69
- id: string;
70
- download?: string | undefined;
71
- }[];
72
- entry?: {
73
- jsPath: string;
74
- cssPath?: string;
75
- };
76
- beforeBoot?: {
77
- path: string;
78
- slot: string;
79
- }[];
80
- }
81
- export declare const decodePluginMeta: (v: RawPluginMeta) => PluginMeta;
58
+ export declare const decodePluginMeta: (v: RawPluginMeta) => PluginArchiveDB.Meta;
@@ -1,4 +1,5 @@
1
- import { RPromiseContent, RStream, uni } from '@delta-comic/model';
1
+ import { StreamQuery, uni } from '@delta-comic/model';
2
+ import { UseQueryReturn } from '@pinia/colada';
2
3
  import { Component } from 'vue';
3
4
  export interface Config {
4
5
  /**
@@ -22,7 +23,7 @@ export interface SearchMethod {
22
23
  value: string;
23
24
  }[];
24
25
  defaultSort: string;
25
- getStream(input: string, sort: string): RStream<uni.item.Item>;
26
+ fetchSearchResult: StreamQuery<[input: string, sort: string], uni.item.Item>;
26
27
  getAutoComplete(input: string, signal: AbortSignal): PromiseLike<({
27
28
  text: string;
28
29
  value: string;
@@ -30,11 +31,11 @@ export interface SearchMethod {
30
31
  }
31
32
  export interface HotLevelboard {
32
33
  name: string;
33
- content: () => RStream<uni.item.Item> | RPromiseContent<any, uni.item.Item[]>;
34
+ content: () => UseQueryReturn<uni.item.Item[]>;
34
35
  }
35
36
  export interface HotMainList {
36
37
  name: string;
37
- content: () => RStream<uni.item.Item> | RPromiseContent<any, uni.item.Item[]>;
38
+ content: () => UseQueryReturn<uni.item.Item[]>;
38
39
  onClick?(): any;
39
40
  }
40
41
  export interface HotTopButton {
@@ -60,7 +61,7 @@ export interface Tabbar {
60
61
  tabbar: Tabbar;
61
62
  }>;
62
63
  }
63
- export type RouteToContent = (contentType_: uni.content.ContentType_, id: string, ep: string, preload?: uni.content.PreloadValue) => PromiseLike<any>;
64
+ export type RouteToContent = (contentType_: uni.content.ContentType_, id: string, ep: string, preload?: uni.item.Item) => PromiseLike<any>;
64
65
  export interface Barcode {
65
66
  match: (searchText: string) => boolean;
66
67
  /**
@@ -1,4 +1,4 @@
1
- import { uni, RStream } from '@delta-comic/model';
1
+ import { StreamQuery, uni } from '@delta-comic/model';
2
2
  export interface Config {
3
3
  getUpdateList(olds: {
4
4
  author: uni.item.Author;
@@ -9,5 +9,5 @@ export interface Config {
9
9
  }>;
10
10
  onAdd?(author: uni.item.Author): any;
11
11
  onRemove?(author: uni.item.Author): any;
12
- getListStream(author: uni.item.Author): RStream<uni.item.Item>;
12
+ fetchAuthorContent: StreamQuery<[author: uni.item.Author], uni.item.Item>;
13
13
  }
@@ -2,7 +2,7 @@ import { uni } from '@delta-comic/model';
2
2
  import { Component, MaybeRefOrGetter } from 'vue';
3
3
  export interface Config {
4
4
  edit?: Component;
5
- card?: uni.user.UserCardComp;
5
+ card?: uni.user.UserCardComponent;
6
6
  authorIcon?: Record<string, Component>;
7
7
  /**
8
8
  * 1. download
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.5",
3
+ "version": "1.3.1",
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.5",
43
- "@delta-comic/db": "0.0.8",
44
- "@delta-comic/model": "0.0.5",
45
- "@delta-comic/ui": "0.0.9",
46
- "@delta-comic/core": "0.3.3",
47
- "@delta-comic/utils": "0.0.7"
45
+ "vue": "^3.5.30",
46
+ "vue-component-type-helpers": "^3.2.6",
47
+ "@delta-comic/ui": "1.3.1",
48
+ "@delta-comic/db": "1.3.1",
49
+ "@delta-comic/model": "1.3.1",
50
+ "@delta-comic/utils": "1.3.1",
51
+ "@delta-comic/core": "1.3.1"
48
52
  },
49
53
  "devDependencies": {
50
54
  "@tailwindcss/vite": "^4.2.1",
51
55
  "@vitejs/plugin-vue": "^6.0.4",
52
56
  "@vitejs/plugin-vue-jsx": "^5.1.4",
53
57
  "browserslist": "^4.28.1",
54
- "lightningcss": "^1.31.1",
55
- "tailwindcss": "^4.2.1",
56
- "vite": "8.0.0-beta.16"
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
  }