delta-comic-core 0.0.1 → 0.0.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/LICENSE +661 -21
- package/README.md +30 -30
- package/dist/bundle.css +1 -1
- package/dist/bundle.js +989 -490
- package/dist/bundle.js.map +1 -1
- package/dist/bundle.umd.cjs +2 -2
- package/dist/bundle.umd.cjs.map +1 -1
- package/dist/components/content/unitCard.vue.d.ts +2263 -77
- package/dist/components/content.vue.d.ts +3 -3
- package/dist/components/floatPopup.vue.d.ts +1 -1
- package/dist/components/image.vue.d.ts +1104 -9
- package/dist/components/list.vue.d.ts +4 -4
- package/dist/components/loading.vue.d.ts +1 -1
- package/dist/components/popup.vue.d.ts +3 -3
- package/dist/components/text.vue.d.ts +1 -1
- package/dist/components/toggleIcon.vue.d.ts +4 -4
- package/dist/components/waterfall.vue.d.ts +6 -6
- package/dist/config/index.d.ts +38 -29
- package/dist/index.d.ts +2761 -289
- package/dist/pack.tgz +0 -0
- package/dist/{plugin.d.ts → plugin/define.d.ts} +64 -21
- package/dist/plugin/index.d.ts +2 -0
- package/dist/stores/temp.d.ts +1 -1
- package/dist/struct/comment.d.ts +2 -6
- package/dist/struct/content.d.ts +21 -7
- package/dist/struct/image.d.ts +2 -2
- package/dist/struct/item.d.ts +13 -3
- package/dist/struct/user.d.ts +2 -0
- package/dist/utils/data.d.ts +5 -4
- package/dist/utils/eventBus.d.ts +5 -4
- package/dist/utils/request.d.ts +3 -1
- package/package.json +18 -26
- package/dist/components/user/previewUser.vue.d.ts +0 -94
package/dist/pack.tgz
ADDED
|
Binary file
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { ContentPageLike, ItemCardComp, ViewLayoutComp } from '
|
|
2
|
-
import { ProcessInstance } from '
|
|
3
|
-
import { CommentRow } from '
|
|
4
|
-
import { UserCardComp } from '
|
|
5
|
-
import { RStream } from '
|
|
6
|
-
import { Item, RawItem } from '
|
|
7
|
-
import { Component } from 'vue';
|
|
1
|
+
import { ContentPageLike, ItemCardComp, ViewLayoutComp } from '../struct/content';
|
|
2
|
+
import { ProcessInstance } from '../struct/image';
|
|
3
|
+
import { CommentRow } from '../struct/comment';
|
|
4
|
+
import { UserCardComp } from '../struct/user';
|
|
5
|
+
import { RStream, RPromiseContent } from '../utils/data';
|
|
6
|
+
import { Item, RawItem } from '../struct/item';
|
|
7
|
+
import { Component, MaybeRefOrGetter } from 'vue';
|
|
8
|
+
export type PluginDefineResult = {
|
|
9
|
+
api?: Record<string, string | undefined | false>;
|
|
10
|
+
};
|
|
8
11
|
export interface PluginConfig {
|
|
9
12
|
name: string;
|
|
10
13
|
content?: PluginConfigContent;
|
|
@@ -12,26 +15,49 @@ export interface PluginConfig {
|
|
|
12
15
|
api?: Record<string, PluginConfigApi>;
|
|
13
16
|
user?: PluginConfigUser;
|
|
14
17
|
auth?: PluginConfigAuth;
|
|
15
|
-
otherProgress?:
|
|
16
|
-
call: (setDescription: (description: string) => void) => PromiseLike<any>;
|
|
17
|
-
name: string;
|
|
18
|
-
}[];
|
|
18
|
+
otherProgress?: PluginOtherProgress[];
|
|
19
19
|
onBooted?(ins: PluginDefineResult): PromiseLike<void> | void;
|
|
20
20
|
search?: PluginConfigSearch;
|
|
21
21
|
}
|
|
22
|
+
export interface PluginOtherProgress {
|
|
23
|
+
call: (setDescription: (description: string) => void) => PromiseLike<any>;
|
|
24
|
+
name: string;
|
|
25
|
+
}
|
|
22
26
|
export interface PluginConfigUser {
|
|
23
27
|
edit: Component;
|
|
24
28
|
card: UserCardComp;
|
|
25
29
|
/**
|
|
26
30
|
* 1. download
|
|
27
|
-
* 2. (
|
|
28
|
-
* 3. upload
|
|
31
|
+
* 2. upload (收藏那些云端未收藏的漫画)
|
|
29
32
|
*/
|
|
30
33
|
syncFavourite?: {
|
|
31
34
|
download: () => PromiseLike<Item[]>;
|
|
32
35
|
upload: (items: RawItem[]) => PromiseLike<any>;
|
|
33
36
|
};
|
|
37
|
+
/**
|
|
38
|
+
* 在用户界面,在历史记录那个板块的下方,你希望展示的自己的板块
|
|
39
|
+
*/
|
|
40
|
+
userActionPages?: PluginUserActionPage[];
|
|
41
|
+
}
|
|
42
|
+
export interface PluginUserActionPage {
|
|
43
|
+
title?: string;
|
|
44
|
+
items: PluginUserActionPageItem[];
|
|
45
|
+
clickPage?: Component;
|
|
46
|
+
clickText?: string;
|
|
34
47
|
}
|
|
48
|
+
export type PluginUserActionPageItem = {
|
|
49
|
+
name: string;
|
|
50
|
+
key: string;
|
|
51
|
+
type: 'button';
|
|
52
|
+
icon: Component;
|
|
53
|
+
page: Component;
|
|
54
|
+
} | {
|
|
55
|
+
name: string;
|
|
56
|
+
key: string;
|
|
57
|
+
type: 'statistic';
|
|
58
|
+
icon?: Component;
|
|
59
|
+
value: MaybeRefOrGetter<string | number>;
|
|
60
|
+
};
|
|
35
61
|
export interface PluginConfigSearch {
|
|
36
62
|
/**
|
|
37
63
|
* @description
|
|
@@ -40,6 +66,26 @@ export interface PluginConfigSearch {
|
|
|
40
66
|
methods?: Record<string, PluginConfigSearchMethod>;
|
|
41
67
|
tabbar?: PluginConfigSearchTabbar[];
|
|
42
68
|
categories?: PluginConfigSearchCategory[];
|
|
69
|
+
hotPage?: {
|
|
70
|
+
levelBoard?: PluginConfigSearchHotPageLevelboard[];
|
|
71
|
+
topButton?: PluginConfigSearchHotPageTopButton[];
|
|
72
|
+
mainListCard?: PluginConfigSearchHotPageMainList[];
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
export interface PluginConfigSearchHotPageLevelboard {
|
|
76
|
+
name: string;
|
|
77
|
+
content: () => (RStream<Item> | RPromiseContent<any, Item[]>);
|
|
78
|
+
}
|
|
79
|
+
export interface PluginConfigSearchHotPageMainList {
|
|
80
|
+
name: string;
|
|
81
|
+
content: () => (RStream<Item> | RPromiseContent<any, Item[]>);
|
|
82
|
+
onClick?(): any;
|
|
83
|
+
}
|
|
84
|
+
export interface PluginConfigSearchHotPageTopButton {
|
|
85
|
+
name: string;
|
|
86
|
+
icon: Component;
|
|
87
|
+
bgColor: string;
|
|
88
|
+
onClick?(): any;
|
|
43
89
|
}
|
|
44
90
|
export interface PluginConfigSearchCategory {
|
|
45
91
|
title: string;
|
|
@@ -127,7 +173,7 @@ export interface PluginConfigContent {
|
|
|
127
173
|
*/
|
|
128
174
|
contentPage?: Record<string, ContentPageLike>;
|
|
129
175
|
}
|
|
130
|
-
export type
|
|
176
|
+
export type UniFormDescription = {
|
|
131
177
|
info: string;
|
|
132
178
|
placeholder?: string;
|
|
133
179
|
/**
|
|
@@ -168,10 +214,10 @@ export type PluginConfigAuthFormType = {
|
|
|
168
214
|
type: 'date';
|
|
169
215
|
defaultValue?: number;
|
|
170
216
|
});
|
|
171
|
-
export type
|
|
217
|
+
export type UniFormResult<T extends UniFormDescription> = T['type'] extends 'string' ? string : T['type'] extends 'number' ? number : T['type'] extends 'radio' ? string : T['type'] extends 'checkbox' ? string[] : T['type'] extends 'switch' ? boolean : T['type'] extends 'date' ? number : never;
|
|
172
218
|
export type PluginConfigAuthMethod = {
|
|
173
|
-
form<T extends Record<string,
|
|
174
|
-
[x in keyof T]:
|
|
219
|
+
form<T extends Record<string, UniFormDescription>>(form: T): Promise<{
|
|
220
|
+
[x in keyof T]: UniFormResult<T[x]>;
|
|
175
221
|
}>;
|
|
176
222
|
/**
|
|
177
223
|
* sandbox: "allow-forms allow-modals allow-orientation-lock allow-popups-to-escape-sandbox allow-pointer-lock"
|
|
@@ -183,7 +229,4 @@ export interface PluginConfigAuth {
|
|
|
183
229
|
logIn: (by: PluginConfigAuthMethod) => PromiseLike<any>;
|
|
184
230
|
passSelect: () => PromiseLike<'signUp' | 'logIn' | false>;
|
|
185
231
|
}
|
|
186
|
-
export declare const
|
|
187
|
-
export type PluginDefineResult = {
|
|
188
|
-
api?: Record<string, string | undefined | false>;
|
|
189
|
-
};
|
|
232
|
+
export declare const _: undefined;
|
package/dist/stores/temp.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Reactive } from 'vue';
|
|
2
|
-
export declare const useTemp: import('pinia').
|
|
2
|
+
export declare const useTemp: () => import('pinia').Store<"core:temp", Pick<{
|
|
3
3
|
$apply: <T extends object>(id: string, def: () => T) => Reactive<T>;
|
|
4
4
|
$has: (id: string) => boolean;
|
|
5
5
|
$onlyGet: <T extends object>(id: string) => Reactive<T>;
|
package/dist/struct/comment.d.ts
CHANGED
|
@@ -4,10 +4,7 @@ import { uni } from '.';
|
|
|
4
4
|
import { default as dayjs } from 'dayjs';
|
|
5
5
|
import { User } from './user';
|
|
6
6
|
export interface RawComment {
|
|
7
|
-
sender:
|
|
8
|
-
name: string;
|
|
9
|
-
user?: any;
|
|
10
|
-
};
|
|
7
|
+
sender: uni.user.User;
|
|
11
8
|
content: {
|
|
12
9
|
type: 'string' | 'html';
|
|
13
10
|
text: string;
|
|
@@ -26,12 +23,11 @@ export type CommentRow = Component<{
|
|
|
26
23
|
comment: Comment;
|
|
27
24
|
item: uni.item.Item;
|
|
28
25
|
parentComment?: Comment;
|
|
29
|
-
onClick?: ((c: Comment) => any);
|
|
30
26
|
}>;
|
|
31
27
|
export declare abstract class Comment extends Struct<RawComment> implements RawComment {
|
|
32
28
|
private static commentRow;
|
|
33
29
|
static setCommentRow(ct_: uni.content.ContentType_, component: CommentRow): string;
|
|
34
|
-
static getCommentRow(ct_: uni.content.ContentType_): uni.comment.CommentRow;
|
|
30
|
+
static getCommentRow(ct_: uni.content.ContentType_): uni.comment.CommentRow | undefined;
|
|
35
31
|
constructor(v: RawComment);
|
|
36
32
|
abstract sender: User;
|
|
37
33
|
content: {
|
package/dist/struct/content.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component, StyleValue } from 'vue';
|
|
2
2
|
import { RStream } from '../utils/data';
|
|
3
3
|
import { uni } from '.';
|
|
4
|
-
import { PluginConfigSearchCategory, PluginConfigSearchTabbar } from '../plugin';
|
|
4
|
+
import { PluginConfigSearchCategory, PluginConfigSearchHotPageLevelboard, PluginConfigSearchHotPageMainList, PluginConfigSearchHotPageTopButton, PluginConfigSearchTabbar } from '../plugin/define';
|
|
5
5
|
import * as item from './item';
|
|
6
6
|
import * as ep from './ep';
|
|
7
7
|
import * as comment from './comment';
|
|
@@ -12,7 +12,7 @@ export declare abstract class ContentPage<T extends object = any> {
|
|
|
12
12
|
ep: string;
|
|
13
13
|
private static viewLayout;
|
|
14
14
|
static setViewLayout(ct_: ContentType_, component: ViewLayoutComp): string;
|
|
15
|
-
static getViewLayout(ct_: ContentType_): uni.content.ViewLayoutComp;
|
|
15
|
+
static getViewLayout(ct_: ContentType_): uni.content.ViewLayoutComp | undefined;
|
|
16
16
|
static tabbar: import('vue').ShallowReactive<Map<string, PluginConfigSearchTabbar[]>>;
|
|
17
17
|
static setTabbar(plugin: string, ...tabbar: PluginConfigSearchTabbar[]): void;
|
|
18
18
|
static getTabbar(plugin: string): PluginConfigSearchTabbar[];
|
|
@@ -21,23 +21,32 @@ export declare abstract class ContentPage<T extends object = any> {
|
|
|
21
21
|
static getCategories(plugin: string): PluginConfigSearchCategory[];
|
|
22
22
|
private static itemCard;
|
|
23
23
|
static setItemCard(ct_: ContentType_, component: ItemCardComp): string;
|
|
24
|
-
static getItemCard(ct_: ContentType_): uni.content.ItemCardComp;
|
|
24
|
+
static getItemCard(ct_: ContentType_): uni.content.ItemCardComp | undefined;
|
|
25
25
|
private static contentPage;
|
|
26
26
|
static setContentPage(contentType: ContentType_, page: ContentPageLike): void;
|
|
27
27
|
static getContentPage(contentType: ContentType_): uni.content.ContentPageLike;
|
|
28
28
|
static toContentType(ct: ContentType_): ContentType;
|
|
29
29
|
static toContentTypeString(ct: ContentType_): string;
|
|
30
|
+
static levelboard: import('vue').ShallowReactive<Map<string, PluginConfigSearchHotPageLevelboard[]>>;
|
|
31
|
+
static setLevelboard(plugin: string, cfg: PluginConfigSearchHotPageLevelboard): string;
|
|
32
|
+
static getLevelboard(plugin: string): PluginConfigSearchHotPageLevelboard[] | undefined;
|
|
33
|
+
static topButton: import('vue').ShallowReactive<Map<string, PluginConfigSearchHotPageTopButton[]>>;
|
|
34
|
+
static setTopButton(plugin: string, cfg: PluginConfigSearchHotPageTopButton): string;
|
|
35
|
+
static getTopButton(plugin: string): PluginConfigSearchHotPageTopButton[] | undefined;
|
|
36
|
+
static mainLists: import('vue').ShallowReactive<Map<string, PluginConfigSearchHotPageMainList[]>>;
|
|
37
|
+
static setMainList(plugin: string, cfg: PluginConfigSearchHotPageMainList): string;
|
|
38
|
+
static getMainList(plugin: string): PluginConfigSearchHotPageMainList[] | undefined;
|
|
30
39
|
constructor(preload: PreloadValue, id: string, ep: string);
|
|
31
40
|
abstract contentType: ContentType;
|
|
32
41
|
pid: import('../utils/data').PromiseWithResolvers<string>;
|
|
33
|
-
preload: import('vue').ShallowRef<
|
|
42
|
+
preload: import('vue').ShallowRef<uni.content.PreloadValue, uni.content.PreloadValue>;
|
|
34
43
|
detail: import('../utils/data').PromiseWithResolvers<item.Item>;
|
|
35
|
-
union: import('vue').ComputedRef<
|
|
44
|
+
union: import('vue').ComputedRef<uni.content.PreloadValue>;
|
|
36
45
|
recommends: import('../utils/data').PromiseWithResolvers<item.Item[]>;
|
|
37
46
|
abstract comments: RStream<comment.Comment>;
|
|
38
47
|
eps: import('../utils/data').PromiseWithResolvers<ep.Ep[]>;
|
|
39
|
-
abstract loadAll(): Promise<any>;
|
|
40
|
-
abstract reloadAll(): Promise<any>;
|
|
48
|
+
abstract loadAll(signal?: AbortSignal): Promise<any>;
|
|
49
|
+
abstract reloadAll(signal?: AbortSignal): Promise<any>;
|
|
41
50
|
abstract plugin: string;
|
|
42
51
|
abstract loadAllOffline(): Promise<T>;
|
|
43
52
|
abstract exportOffline(save: T): Promise<any>;
|
|
@@ -59,6 +68,11 @@ export interface ContentType {
|
|
|
59
68
|
export type ContentType_ = ContentType | string;
|
|
60
69
|
export type ViewLayoutComp = Component<{
|
|
61
70
|
page: ContentPage;
|
|
71
|
+
comp: {
|
|
72
|
+
FavouriteSelect: Component<{
|
|
73
|
+
item: uni.item.Item;
|
|
74
|
+
}>;
|
|
75
|
+
};
|
|
62
76
|
}>;
|
|
63
77
|
export type ItemCardComp = Component<{
|
|
64
78
|
item: uni.item.Item;
|
package/dist/struct/image.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export interface ProcessInstance {
|
|
|
3
3
|
fullName: string;
|
|
4
4
|
plugin: string;
|
|
5
5
|
referenceName: string;
|
|
6
|
-
func: (nowPath: string, img: Image) => Promise<[path: string, exit:
|
|
6
|
+
func: (nowPath: string, img: Image) => Promise<[path: string, exit: boolean]>;
|
|
7
7
|
}
|
|
8
8
|
export interface ProcessStep {
|
|
9
9
|
referenceName: string;
|
|
@@ -21,7 +21,7 @@ export declare class Image extends Struct<RawImage> implements RawImage {
|
|
|
21
21
|
aspect?: {
|
|
22
22
|
width: number;
|
|
23
23
|
height: number;
|
|
24
|
-
};
|
|
24
|
+
} | undefined;
|
|
25
25
|
static processInstances: import('vue').ShallowReactive<Map<string, ProcessInstance>>;
|
|
26
26
|
static setProcess(plugin: string, referenceName: string, func: ProcessInstance['func']): void;
|
|
27
27
|
static fork: import('vue').ShallowReactive<Map<string, string[]>>;
|
package/dist/struct/item.d.ts
CHANGED
|
@@ -3,11 +3,21 @@ import { default as dayjs } from 'dayjs';
|
|
|
3
3
|
import { ContentType, ContentType_ } from './content';
|
|
4
4
|
import { Ep, RawEp } from './ep';
|
|
5
5
|
import * as image from "./image";
|
|
6
|
+
export interface Category {
|
|
7
|
+
name: string;
|
|
8
|
+
group: string;
|
|
9
|
+
search: {
|
|
10
|
+
keyword: string;
|
|
11
|
+
source: string;
|
|
12
|
+
sort: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
6
15
|
export interface RawItem {
|
|
7
16
|
cover: image.RawImage;
|
|
8
17
|
title: string;
|
|
9
18
|
id: string;
|
|
10
|
-
|
|
19
|
+
/** @alias tags */
|
|
20
|
+
categories: Category[];
|
|
11
21
|
author: string[];
|
|
12
22
|
viewNumber?: number;
|
|
13
23
|
likeNumber?: number;
|
|
@@ -33,7 +43,7 @@ export declare abstract class Item extends Struct<RawItem> implements RawItem {
|
|
|
33
43
|
get $cover(): image.Image;
|
|
34
44
|
title: string;
|
|
35
45
|
id: string;
|
|
36
|
-
categories:
|
|
46
|
+
categories: Category[];
|
|
37
47
|
author: string[];
|
|
38
48
|
viewNumber?: number;
|
|
39
49
|
likeNumber?: number;
|
|
@@ -46,7 +56,7 @@ export declare abstract class Item extends Struct<RawItem> implements RawItem {
|
|
|
46
56
|
length: string;
|
|
47
57
|
epLength: string;
|
|
48
58
|
$$plugin: string;
|
|
49
|
-
$$meta:
|
|
59
|
+
$$meta: MetaData;
|
|
50
60
|
thisEp: RawEp;
|
|
51
61
|
get $thisEp(): Ep;
|
|
52
62
|
constructor(v: RawItem);
|
package/dist/struct/user.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export interface RawUser {
|
|
|
5
5
|
avatar?: RawImage;
|
|
6
6
|
name: string;
|
|
7
7
|
id: string;
|
|
8
|
+
$$plugin: string;
|
|
8
9
|
}
|
|
9
10
|
export declare abstract class User {
|
|
10
11
|
static userBase: import('vue').ShallowReactive<Map<string, uni.user.User>>;
|
|
@@ -13,6 +14,7 @@ export declare abstract class User {
|
|
|
13
14
|
avatar?: Image;
|
|
14
15
|
name: string;
|
|
15
16
|
id: string;
|
|
17
|
+
$$plugin: string;
|
|
16
18
|
abstract customUser: object;
|
|
17
19
|
}
|
|
18
20
|
export type UserCardComp = Component<{
|
package/dist/utils/data.d.ts
CHANGED
|
@@ -18,7 +18,8 @@ export declare class PromiseContent<T, TPF extends any = T> implements PromiseLi
|
|
|
18
18
|
* 使用`PromiseContent.fromPromise`或`PromiseContent.fromAsyncFunction`代替`new PromiseContent`
|
|
19
19
|
*/
|
|
20
20
|
private constructor();
|
|
21
|
-
|
|
21
|
+
loadPromise(promise: Promise<T>): Promise<void>;
|
|
22
|
+
[Symbol.toStringTag]: string;
|
|
22
23
|
/**
|
|
23
24
|
* 对`this.data.value`做出处理,多次调用仅最后一次生效
|
|
24
25
|
*/
|
|
@@ -26,10 +27,10 @@ export declare class PromiseContent<T, TPF extends any = T> implements PromiseLi
|
|
|
26
27
|
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<T | TResult>;
|
|
27
28
|
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
|
|
28
29
|
finally(onfinally?: (() => void) | null | undefined): Promise<T>;
|
|
29
|
-
data: import('vue').ShallowRef<TPF, TPF>;
|
|
30
|
+
data: import('vue').ShallowRef<TPF | undefined, TPF | undefined>;
|
|
30
31
|
isLoading: import('vue').ShallowRef<boolean, boolean>;
|
|
31
32
|
isError: import('vue').ShallowRef<boolean, boolean>;
|
|
32
|
-
errorCause: import('vue').ShallowRef<Error, Error>;
|
|
33
|
+
errorCause: import('vue').ShallowRef<Error | undefined, Error | undefined>;
|
|
33
34
|
isEmpty: import('vue').ShallowRef<boolean, boolean>;
|
|
34
35
|
static fromAsyncFunction<T extends (...args: any[]) => Promise<any>>(asyncFunction: T): (...args: Parameters<T>) => RPromiseContent<Awaited<ReturnType<T>>>;
|
|
35
36
|
static resolve<T>(data: T): RPromiseContent<Awaited<T>, Awaited<T>>;
|
|
@@ -77,7 +78,7 @@ export declare class Stream<T> implements AsyncIterableIterator<T[], void> {
|
|
|
77
78
|
stop(): void;
|
|
78
79
|
[Symbol.asyncIterator](): this;
|
|
79
80
|
/** 错误(如果有) */
|
|
80
|
-
error: import('vue').ShallowRef<void | Error, void | Error>;
|
|
81
|
+
error: import('vue').ShallowRef<void | Error | undefined, void | Error | undefined>;
|
|
81
82
|
/** 数据 */
|
|
82
83
|
data: Ref<T[]>;
|
|
83
84
|
/** 数据 */
|
package/dist/utils/eventBus.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PluginConfig } from '../plugin';
|
|
1
|
+
import { PluginConfig } from '../plugin/define';
|
|
2
2
|
import { uni } from '../struct';
|
|
3
3
|
export type EventBus = {
|
|
4
4
|
networkError_unauth: any;
|
|
@@ -8,10 +8,11 @@ export type EventBus = {
|
|
|
8
8
|
};
|
|
9
9
|
export declare const eventBus: import('mitt').Emitter<EventBus>;
|
|
10
10
|
export type SharedFunctions = {
|
|
11
|
-
/** 重复调用需缓存(自行实现)(可不缓存) */ getUser(): PromiseLike<object>;
|
|
12
11
|
getRandomProvide(signal: AbortSignal): PromiseLike<uni.item.Item[]>;
|
|
13
12
|
addPlugin(ins: PluginConfig): void;
|
|
14
|
-
addRecent(item: uni.item.Item
|
|
13
|
+
addRecent(item: uni.item.Item): PromiseLike<any>;
|
|
14
|
+
routeToContent(contentType_: uni.content.ContentType_, id: string, ep: string, preload?: uni.content.PreloadValue): PromiseLike<any>;
|
|
15
|
+
routeToSearch(input: string, source?: string, sort?: string): PromiseLike<any>;
|
|
15
16
|
};
|
|
16
17
|
export declare class SharedFunction {
|
|
17
18
|
private static sharedFunctions;
|
|
@@ -20,7 +21,7 @@ export declare class SharedFunction {
|
|
|
20
21
|
fn: SharedFunctions[keyof SharedFunctions];
|
|
21
22
|
plugin: string;
|
|
22
23
|
result: ReturnType<SharedFunctions[TKey]>;
|
|
23
|
-
}[];
|
|
24
|
+
}[] | undefined;
|
|
24
25
|
static callRandom<TKey extends keyof SharedFunctions>(name: TKey, ...args: Parameters<SharedFunctions[TKey]>): {
|
|
25
26
|
fn: SharedFunctions[keyof SharedFunctions];
|
|
26
27
|
plugin: string;
|
package/dist/utils/request.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AxiosInstance, AxiosError, AxiosResponse, CreateAxiosDefaults, AxiosRequestConfig } from 'axios';
|
|
1
|
+
import { AxiosInstance, AxiosError, AxiosResponse, CreateAxiosDefaults, AxiosRequestConfig, AxiosAdapter } from 'axios';
|
|
2
2
|
import { EventBus } from './eventBus';
|
|
3
3
|
export declare class SmartAbortController implements AbortController {
|
|
4
4
|
private _controller;
|
|
@@ -34,6 +34,8 @@ export declare namespace utilInterceptors {
|
|
|
34
34
|
const createCheckIsUnauth: (api: AxiosInstance, relogin?: () => Promise<boolean>) => (err: any) => Promise<AxiosResponse<any, any, {}>>;
|
|
35
35
|
const isClientError: (err: any) => Promise<never>;
|
|
36
36
|
const passCorsError: (err: any) => Promise<never>;
|
|
37
|
+
const devProxy: AxiosAdapter;
|
|
38
|
+
const _ = 1;
|
|
37
39
|
}
|
|
38
40
|
export type Requester = ReturnType<typeof createAxios>;
|
|
39
41
|
export declare const createAxios: (fork: () => Promise<string> | string, config?: CreateAxiosDefaults, middle?: (axios: AxiosInstance) => AxiosInstance) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "delta-comic-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "我曾亲眼见证神的熟视无睹.",
|
|
5
5
|
"homepage": "https://github.com/wenxig/delta-comic-core",
|
|
6
6
|
"repository": {
|
|
@@ -10,48 +10,40 @@
|
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"type": "module",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@capacitor/splash-screen": "^7.0.3",
|
|
14
13
|
"@capacitor/status-bar": "^7.0.3",
|
|
15
14
|
"@lhlyu/vue-virtual-waterfall": "^1.0.8",
|
|
16
|
-
"@types/crypto-js": "^4.2.2",
|
|
17
15
|
"@vant/use": "^1.6.0",
|
|
18
16
|
"@vicons/antd": "^0.13.0",
|
|
19
17
|
"@vicons/material": "^0.13.0",
|
|
20
18
|
"@vueuse/core": "^13.9.0",
|
|
21
|
-
"capacitor-plugin-safe-area": "^4.0.0",
|
|
22
19
|
"dayjs": "^1.11.18",
|
|
23
|
-
"dexie": "^4.2.0",
|
|
24
|
-
"dexie-relationships": "^1.2.11",
|
|
25
20
|
"mitt": "^3.0.1",
|
|
26
|
-
"tailwindcss": "^4.1.13",
|
|
27
21
|
"tailwindcss-safe-area-capacitor": "^0.5.1"
|
|
28
22
|
},
|
|
29
23
|
"peerDependencies": {
|
|
30
24
|
"axios": "^1.12.2",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"motion-v": "
|
|
34
|
-
"naive-ui": "
|
|
25
|
+
"es-toolkit": "^1.40.0",
|
|
26
|
+
"crypto-js": "4.2.0",
|
|
27
|
+
"motion-v": "1.7.3",
|
|
28
|
+
"naive-ui": "2.43.1",
|
|
35
29
|
"pinia": "^3.0.3",
|
|
36
|
-
"vant": "
|
|
37
|
-
"vue": "
|
|
38
|
-
"vue-router": "
|
|
30
|
+
"vant": "4.9.21",
|
|
31
|
+
"vue": "3.5.22",
|
|
32
|
+
"vue-router": "4.6.3"
|
|
39
33
|
},
|
|
40
34
|
"devDependencies": {
|
|
41
|
-
"@tailwindcss/vite": "^4.1.
|
|
42
|
-
"@types/
|
|
43
|
-
"@types/node": "^24.
|
|
44
|
-
"@vant/auto-import-resolver": "^1.3.0",
|
|
35
|
+
"@tailwindcss/vite": "^4.1.14",
|
|
36
|
+
"@types/crypto-js": "^4.2.2",
|
|
37
|
+
"@types/node": "^24.8.1",
|
|
45
38
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
46
39
|
"@vitejs/plugin-vue-jsx": "^5.1.1",
|
|
47
|
-
"browserslist": "^4.26.
|
|
48
|
-
"lightningcss": "^1.30.
|
|
49
|
-
"
|
|
50
|
-
"unplugin-vue-components": "
|
|
51
|
-
"vite": "npm:rolldown-vite@^7.
|
|
52
|
-
"vite-plugin-copy-dts": "^0.0.6",
|
|
40
|
+
"browserslist": "^4.26.3",
|
|
41
|
+
"lightningcss": "^1.30.2",
|
|
42
|
+
"tailwindcss": "^4.1.14",
|
|
43
|
+
"unplugin-vue-components": "30.0.0",
|
|
44
|
+
"vite": "npm:rolldown-vite@^7.1.19",
|
|
53
45
|
"vite-plugin-dts": "^4.5.4",
|
|
54
|
-
"vue-component-type-helpers": "^3.
|
|
46
|
+
"vue-component-type-helpers": "^3.1.1"
|
|
55
47
|
},
|
|
56
48
|
"files": [
|
|
57
49
|
"dist"
|
|
@@ -68,6 +60,6 @@
|
|
|
68
60
|
"./style.css": "./dist/bundle.css"
|
|
69
61
|
},
|
|
70
62
|
"scripts": {
|
|
71
|
-
"build": "vite build"
|
|
63
|
+
"build": "vite build && pnpm pack --out ./dist/pack.tgz"
|
|
72
64
|
}
|
|
73
65
|
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {
|
|
2
|
-
show(u: any): void;
|
|
3
|
-
isShowing: import('vue').ComputedRef<boolean>;
|
|
4
|
-
close(): void;
|
|
5
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
6
|
-
floatPopup: {
|
|
7
|
-
$: import('vue').ComponentInternalInstance;
|
|
8
|
-
$data: {};
|
|
9
|
-
$props: Partial<{
|
|
10
|
-
anchors: "high" | "low" | number[];
|
|
11
|
-
lockScroll: boolean;
|
|
12
|
-
}> & Omit<{
|
|
13
|
-
readonly anchors?: "high" | "low" | number[];
|
|
14
|
-
readonly lockScroll?: boolean;
|
|
15
|
-
readonly class?: any;
|
|
16
|
-
readonly style?: import('vue').StyleValue;
|
|
17
|
-
readonly overlay?: boolean;
|
|
18
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, "anchors" | "lockScroll">;
|
|
19
|
-
$attrs: {
|
|
20
|
-
[x: string]: unknown;
|
|
21
|
-
};
|
|
22
|
-
$refs: {
|
|
23
|
-
[x: string]: unknown;
|
|
24
|
-
};
|
|
25
|
-
$slots: Readonly<{
|
|
26
|
-
[name: string]: import('vue').Slot<any>;
|
|
27
|
-
}>;
|
|
28
|
-
$root: import('vue').ComponentPublicInstance | null;
|
|
29
|
-
$parent: import('vue').ComponentPublicInstance | null;
|
|
30
|
-
$host: Element | null;
|
|
31
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
32
|
-
$el: any;
|
|
33
|
-
$options: import('vue').ComponentOptionsBase<Readonly<{
|
|
34
|
-
anchors?: "high" | "low" | number[];
|
|
35
|
-
lockScroll?: boolean;
|
|
36
|
-
class?: any;
|
|
37
|
-
style?: import('vue').StyleValue;
|
|
38
|
-
overlay?: boolean;
|
|
39
|
-
}> & Readonly<{}>, {
|
|
40
|
-
show(node?: number): void;
|
|
41
|
-
close(): void;
|
|
42
|
-
isShowing: Readonly<import('vue').ShallowRef<boolean, boolean>>;
|
|
43
|
-
height: Readonly<import('vue').ShallowRef<number, number>>;
|
|
44
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
45
|
-
anchors: "high" | "low" | number[];
|
|
46
|
-
lockScroll: boolean;
|
|
47
|
-
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
|
|
48
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
49
|
-
created?: (() => void) | (() => void)[];
|
|
50
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
51
|
-
mounted?: (() => void) | (() => void)[];
|
|
52
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
53
|
-
updated?: (() => void) | (() => void)[];
|
|
54
|
-
activated?: (() => void) | (() => void)[];
|
|
55
|
-
deactivated?: (() => void) | (() => void)[];
|
|
56
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
57
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
58
|
-
destroyed?: (() => void) | (() => void)[];
|
|
59
|
-
unmounted?: (() => void) | (() => void)[];
|
|
60
|
-
renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
61
|
-
renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
|
|
62
|
-
errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
63
|
-
};
|
|
64
|
-
$forceUpdate: () => void;
|
|
65
|
-
$nextTick: typeof import('vue').nextTick;
|
|
66
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
|
|
67
|
-
} & Readonly<{
|
|
68
|
-
anchors: "high" | "low" | number[];
|
|
69
|
-
lockScroll: boolean;
|
|
70
|
-
}> & Omit<Readonly<{
|
|
71
|
-
anchors?: "high" | "low" | number[];
|
|
72
|
-
lockScroll?: boolean;
|
|
73
|
-
class?: any;
|
|
74
|
-
style?: import('vue').StyleValue;
|
|
75
|
-
overlay?: boolean;
|
|
76
|
-
}> & Readonly<{}>, "height" | "show" | ("anchors" | "lockScroll") | "close" | "isShowing"> & import('vue').ShallowUnwrapRef<{
|
|
77
|
-
show(node?: number): void;
|
|
78
|
-
close(): void;
|
|
79
|
-
isShowing: Readonly<import('vue').ShallowRef<boolean, boolean>>;
|
|
80
|
-
height: Readonly<import('vue').ShallowRef<number, number>>;
|
|
81
|
-
}> & {} & import('vue').ComponentCustomProperties & {} & {
|
|
82
|
-
$slots: Readonly<{
|
|
83
|
-
default(arg: {
|
|
84
|
-
height: number;
|
|
85
|
-
}): void;
|
|
86
|
-
}> & {
|
|
87
|
-
default(arg: {
|
|
88
|
-
height: number;
|
|
89
|
-
}): void;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
contentBox: HTMLDivElement;
|
|
93
|
-
}, any>;
|
|
94
|
-
export default _default;
|