delta-comic-core 0.0.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.
- package/LICENSE +21 -0
- package/README.md +30 -0
- package/dist/bundle.css +2 -0
- package/dist/bundle.js +4896 -0
- package/dist/bundle.js.map +1 -0
- package/dist/bundle.umd.cjs +3 -0
- package/dist/bundle.umd.cjs.map +1 -0
- package/dist/components/await.vue.d.ts +26 -0
- package/dist/components/content/unitCard.vue.d.ts +317 -0
- package/dist/components/content.vue.d.ts +43 -0
- package/dist/components/floatPopup.vue.d.ts +39 -0
- package/dist/components/image.vue.d.ts +63 -0
- package/dist/components/list.vue.d.ts +53 -0
- package/dist/components/loading.vue.d.ts +18 -0
- package/dist/components/popup.vue.d.ts +41 -0
- package/dist/components/routerTab.vue.d.ts +34 -0
- package/dist/components/text.vue.d.ts +23 -0
- package/dist/components/toggleIcon.vue.d.ts +42 -0
- package/dist/components/user/previewUser.vue.d.ts +94 -0
- package/dist/components/var.vue.d.ts +23 -0
- package/dist/components/waterfall.vue.d.ts +54 -0
- package/dist/config/index.d.ts +38 -0
- package/dist/index.d.ts +1112 -0
- package/dist/layout/user.d.ts +0 -0
- package/dist/plugin.d.ts +189 -0
- package/dist/stores/temp.d.ts +23 -0
- package/dist/struct/comment.d.ts +55 -0
- package/dist/struct/content.d.ts +70 -0
- package/dist/struct/ep.d.ts +14 -0
- package/dist/struct/image.d.ts +44 -0
- package/dist/struct/index.d.ts +14 -0
- package/dist/struct/item.d.ts +56 -0
- package/dist/struct/user.d.ts +21 -0
- package/dist/symbol.d.ts +3 -0
- package/dist/utils/data.d.ts +123 -0
- package/dist/utils/delay.d.ts +1 -0
- package/dist/utils/eventBus.d.ts +34 -0
- package/dist/utils/image.d.ts +5 -0
- package/dist/utils/layout.d.ts +8 -0
- package/dist/utils/message.d.ts +22 -0
- package/dist/utils/plugin.d.ts +1 -0
- package/dist/utils/request.d.ts +48 -0
- package/dist/utils/translate.d.ts +2 -0
- package/package.json +73 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CSSProperties, MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import { DialogOptions, DialogReactive } from 'naive-ui';
|
|
3
|
+
export type LoadingInstance = ReturnType<typeof createLoadingMessage>;
|
|
4
|
+
export declare const createLoadingMessage: (text?: MaybeRefOrGetter<string>, api?: import('naive-ui').MessageApi) => {
|
|
5
|
+
bind: {
|
|
6
|
+
<T extends PromiseLike<any>>(promise?: T, throwError?: false, successText?: string, failText?: string): Promise<Awaited<T>>;
|
|
7
|
+
<T extends PromiseLike<any>>(promise?: T, throwError?: true, successText?: string, failText?: string): Promise<Awaited<T> | undefined>;
|
|
8
|
+
};
|
|
9
|
+
success(text?: string, delayTime?: number): Promise<void>;
|
|
10
|
+
fail(text?: string, delayTime?: number): Promise<void>;
|
|
11
|
+
info(text: string, delayTime?: number): Promise<void>;
|
|
12
|
+
destroy(): void;
|
|
13
|
+
[Symbol.dispose](): void;
|
|
14
|
+
instance: import('naive-ui').MessageReactive;
|
|
15
|
+
};
|
|
16
|
+
type PromiseWith<T, D> = Promise<T> & Partial<D>;
|
|
17
|
+
export declare const createDialog: (options: DialogOptions & {
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
}) => PromiseWith<void, {
|
|
20
|
+
ins: DialogReactive;
|
|
21
|
+
}>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useGlobalVar: <T>(val: T, key: string) => T;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { AxiosInstance, AxiosError, AxiosResponse, CreateAxiosDefaults, AxiosRequestConfig } from 'axios';
|
|
2
|
+
import { EventBus } from './eventBus';
|
|
3
|
+
export declare class SmartAbortController implements AbortController {
|
|
4
|
+
private _controller;
|
|
5
|
+
private mitt;
|
|
6
|
+
get signal(): AbortSignal;
|
|
7
|
+
abort(reason?: any): void;
|
|
8
|
+
onAbort(fn: () => any): () => void;
|
|
9
|
+
onAbortOnce(fn: () => any): void;
|
|
10
|
+
}
|
|
11
|
+
export declare const requestErrorResult: (errType: keyof EventBus, err: any) => Promise<never>;
|
|
12
|
+
export declare namespace requestType {
|
|
13
|
+
const isPost: (v: {
|
|
14
|
+
config: {
|
|
15
|
+
method?: string;
|
|
16
|
+
};
|
|
17
|
+
}) => boolean;
|
|
18
|
+
const isPut: (v: {
|
|
19
|
+
config: {
|
|
20
|
+
method?: string;
|
|
21
|
+
};
|
|
22
|
+
}) => boolean;
|
|
23
|
+
const isGet: (v: {
|
|
24
|
+
config: {
|
|
25
|
+
method?: string;
|
|
26
|
+
};
|
|
27
|
+
}) => boolean;
|
|
28
|
+
}
|
|
29
|
+
export declare namespace utilInterceptors {
|
|
30
|
+
const checkIsAxiosError: <T extends object>(err: any) => err is AxiosError<T, any>;
|
|
31
|
+
const useUnreadableRetry: <T extends () => Promise<AxiosResponse>>(fn: T, times?: number) => Promise<Awaited<ReturnType<T>>["data"]>;
|
|
32
|
+
const useForceRetry: <T extends () => Promise<AxiosResponse>>(fn: T, times?: number) => Promise<Awaited<ReturnType<T>>["data"]>;
|
|
33
|
+
const createAutoRetry: (api: AxiosInstance, times?: number) => (err: any) => Promise<AxiosResponse<any, any, {}>>;
|
|
34
|
+
const createCheckIsUnauth: (api: AxiosInstance, relogin?: () => Promise<boolean>) => (err: any) => Promise<AxiosResponse<any, any, {}>>;
|
|
35
|
+
const isClientError: (err: any) => Promise<never>;
|
|
36
|
+
const passCorsError: (err: any) => Promise<never>;
|
|
37
|
+
}
|
|
38
|
+
export type Requester = ReturnType<typeof createAxios>;
|
|
39
|
+
export declare const createAxios: (fork: () => Promise<string> | string, config?: CreateAxiosDefaults, middle?: (axios: AxiosInstance) => AxiosInstance) => {
|
|
40
|
+
get: <T>(url: string, config?: AxiosRequestConfig) => Promise<T>;
|
|
41
|
+
post: <T>(url: string, data?: any, config?: AxiosRequestConfig) => Promise<T>;
|
|
42
|
+
postForm: <T>(url: string, data?: any, config?: AxiosRequestConfig) => Promise<T>;
|
|
43
|
+
put: <T>(url: string, data?: any, config?: AxiosRequestConfig) => Promise<T>;
|
|
44
|
+
putForm: <T>(url: string, data?: any, config?: AxiosRequestConfig) => Promise<T>;
|
|
45
|
+
delete: <T>(url: string, config?: AxiosRequestConfig) => Promise<T>;
|
|
46
|
+
patch: <T>(url: string, data?: any, config?: AxiosRequestConfig) => Promise<T>;
|
|
47
|
+
patchForm: <T>(url: string, data?: any, config?: AxiosRequestConfig) => Promise<T>;
|
|
48
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "delta-comic-core",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "我曾亲眼见证神的熟视无睹.",
|
|
5
|
+
"homepage": "https://github.com/wenxig/delta-comic-core",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/wenxig/delta-comic-core.git"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"type": "module",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@capacitor/splash-screen": "^7.0.3",
|
|
14
|
+
"@capacitor/status-bar": "^7.0.3",
|
|
15
|
+
"@lhlyu/vue-virtual-waterfall": "^1.0.8",
|
|
16
|
+
"@types/crypto-js": "^4.2.2",
|
|
17
|
+
"@vant/use": "^1.6.0",
|
|
18
|
+
"@vicons/antd": "^0.13.0",
|
|
19
|
+
"@vicons/material": "^0.13.0",
|
|
20
|
+
"@vueuse/core": "^13.9.0",
|
|
21
|
+
"capacitor-plugin-safe-area": "^4.0.0",
|
|
22
|
+
"dayjs": "^1.11.18",
|
|
23
|
+
"dexie": "^4.2.0",
|
|
24
|
+
"dexie-relationships": "^1.2.11",
|
|
25
|
+
"mitt": "^3.0.1",
|
|
26
|
+
"tailwindcss": "^4.1.13",
|
|
27
|
+
"tailwindcss-safe-area-capacitor": "^0.5.1"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"axios": "^1.12.2",
|
|
31
|
+
"crypto-js": "^4.2.0",
|
|
32
|
+
"lodash-es": "^4.17.21",
|
|
33
|
+
"motion-v": "^1.7.1",
|
|
34
|
+
"naive-ui": "^2.42.0",
|
|
35
|
+
"pinia": "^3.0.3",
|
|
36
|
+
"vant": "^4.9.21",
|
|
37
|
+
"vue": "^3.5.18",
|
|
38
|
+
"vue-router": "^4.5.1"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@tailwindcss/vite": "^4.1.13",
|
|
42
|
+
"@types/lodash-es": "^4.17.12",
|
|
43
|
+
"@types/node": "^24.5.2",
|
|
44
|
+
"@vant/auto-import-resolver": "^1.3.0",
|
|
45
|
+
"@vitejs/plugin-vue": "^6.0.1",
|
|
46
|
+
"@vitejs/plugin-vue-jsx": "^5.1.1",
|
|
47
|
+
"browserslist": "^4.26.2",
|
|
48
|
+
"lightningcss": "^1.30.1",
|
|
49
|
+
"sass-embedded": "^1.93.0",
|
|
50
|
+
"unplugin-vue-components": "^29.0.0",
|
|
51
|
+
"vite": "npm:rolldown-vite@^7.0.12",
|
|
52
|
+
"vite-plugin-copy-dts": "^0.0.6",
|
|
53
|
+
"vite-plugin-dts": "^4.5.4",
|
|
54
|
+
"vue-component-type-helpers": "^3.0.7"
|
|
55
|
+
},
|
|
56
|
+
"files": [
|
|
57
|
+
"dist"
|
|
58
|
+
],
|
|
59
|
+
"main": "./dist/bundle.umd.cjs",
|
|
60
|
+
"module": "./dist/bundle.js",
|
|
61
|
+
"types": "./dist/index.d.ts",
|
|
62
|
+
"exports": {
|
|
63
|
+
".": {
|
|
64
|
+
"import": "./dist/bundle.js",
|
|
65
|
+
"require": "./dist/bundle.umd.cjs",
|
|
66
|
+
"types": "./dist/index.d.ts"
|
|
67
|
+
},
|
|
68
|
+
"./style.css": "./dist/bundle.css"
|
|
69
|
+
},
|
|
70
|
+
"scripts": {
|
|
71
|
+
"build": "vite build"
|
|
72
|
+
}
|
|
73
|
+
}
|