@delta-comic/core 0.0.0-semantically-released
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 -0
- package/README.md +42 -0
- package/dist/index.js +2187 -0
- package/dist/index.js.map +1 -0
- package/dist/index.umd.cjs +10 -0
- package/dist/index.umd.cjs.map +1 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/ipc.d.ts +46 -0
- package/dist/lib/temp.d.ts +23 -0
- package/dist/pack.tgz +0 -0
- package/package.json +52 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { uni } from '@delta-comic/model';
|
|
2
|
+
import { DefineConfig } from '@delta-comic/plugin';
|
|
3
|
+
export type SharedFunctions = {
|
|
4
|
+
getRandomProvide(signal?: AbortSignal): PromiseLike<uni.item.Item[]>;
|
|
5
|
+
addPlugin(ins: DefineConfig): void;
|
|
6
|
+
addRecent(item: uni.item.Item): PromiseLike<any>;
|
|
7
|
+
routeToContent(contentType_: uni.content.ContentType_, id: string, ep: string, preload?: uni.content.PreloadValue): PromiseLike<any>;
|
|
8
|
+
routeToSearch(input: string, source?: [plugin: string, name: string], sort?: string): PromiseLike<any>;
|
|
9
|
+
addAuthorSubscribe(author: uni.item.Author, plugin: string): PromiseLike<void>;
|
|
10
|
+
removeAuthorSubscribe(author: uni.item.Author, plugin: string): PromiseLike<void>;
|
|
11
|
+
getIsAuthorSubscribe(author: uni.item.Author, plugin: string): PromiseLike<boolean>;
|
|
12
|
+
triggerSharePopup(page: uni.content.ContentPage): PromiseLike<void>;
|
|
13
|
+
triggerShareToken(token: string): PromiseLike<void>;
|
|
14
|
+
pushShareToken(token: string): PromiseLike<void>;
|
|
15
|
+
};
|
|
16
|
+
export declare class SharedFunction {
|
|
17
|
+
private static sharedFunctions;
|
|
18
|
+
static define<TKey extends keyof SharedFunctions>(fn: SharedFunctions[TKey], plugin: string, name: TKey): SharedFunctions[TKey];
|
|
19
|
+
static call<TKey extends keyof SharedFunctions>(name: TKey, ...args: Parameters<SharedFunctions[TKey]>): {
|
|
20
|
+
fn: SharedFunctions[keyof SharedFunctions];
|
|
21
|
+
plugin: string;
|
|
22
|
+
result: ReturnType<SharedFunctions[TKey]>;
|
|
23
|
+
}[] & Promise<{
|
|
24
|
+
result: Awaited<ReturnType<SharedFunctions[TKey]>>;
|
|
25
|
+
fn: SharedFunctions[keyof SharedFunctions];
|
|
26
|
+
plugin: string;
|
|
27
|
+
}[]>;
|
|
28
|
+
static callRandom<TKey extends keyof SharedFunctions>(name: TKey, ...args: Parameters<SharedFunctions[TKey]>): {
|
|
29
|
+
fn: SharedFunctions[keyof SharedFunctions];
|
|
30
|
+
plugin: string;
|
|
31
|
+
result: ReturnType<SharedFunctions[TKey]>;
|
|
32
|
+
} & Promise<{
|
|
33
|
+
result: Awaited<ReturnType<SharedFunctions[TKey]>>;
|
|
34
|
+
fn: SharedFunctions[keyof SharedFunctions];
|
|
35
|
+
plugin: string;
|
|
36
|
+
}>;
|
|
37
|
+
static callWitch<TKey extends keyof SharedFunctions>(name: TKey, plugin: string, ...args: Parameters<SharedFunctions[TKey]>): {
|
|
38
|
+
fn: SharedFunctions[keyof SharedFunctions];
|
|
39
|
+
plugin: string;
|
|
40
|
+
result: ReturnType<SharedFunctions[TKey]>;
|
|
41
|
+
}[] & Promise<{
|
|
42
|
+
result: Awaited<ReturnType<SharedFunctions[TKey]>>;
|
|
43
|
+
fn: SharedFunctions[keyof SharedFunctions];
|
|
44
|
+
plugin: string;
|
|
45
|
+
}[]>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Reactive } from 'vue';
|
|
2
|
+
export declare const useTemp: () => import('pinia').Store<"core:temp", Pick<{
|
|
3
|
+
$apply: <T extends object>(id: string, def: () => T) => Reactive<T>;
|
|
4
|
+
$has: (id: string) => boolean;
|
|
5
|
+
$onlyGet: <T extends object>(id: string) => Reactive<T>;
|
|
6
|
+
$applyRaw: <T extends object>(id: string, def: () => T) => T;
|
|
7
|
+
$hasRaw: (id: string) => boolean;
|
|
8
|
+
$onlyGetRaw: <T extends object>(id: string) => Reactive<T>;
|
|
9
|
+
}, never>, Pick<{
|
|
10
|
+
$apply: <T extends object>(id: string, def: () => T) => Reactive<T>;
|
|
11
|
+
$has: (id: string) => boolean;
|
|
12
|
+
$onlyGet: <T extends object>(id: string) => Reactive<T>;
|
|
13
|
+
$applyRaw: <T extends object>(id: string, def: () => T) => T;
|
|
14
|
+
$hasRaw: (id: string) => boolean;
|
|
15
|
+
$onlyGetRaw: <T extends object>(id: string) => Reactive<T>;
|
|
16
|
+
}, never>, Pick<{
|
|
17
|
+
$apply: <T extends object>(id: string, def: () => T) => Reactive<T>;
|
|
18
|
+
$has: (id: string) => boolean;
|
|
19
|
+
$onlyGet: <T extends object>(id: string) => Reactive<T>;
|
|
20
|
+
$applyRaw: <T extends object>(id: string, def: () => T) => T;
|
|
21
|
+
$hasRaw: (id: string) => boolean;
|
|
22
|
+
$onlyGetRaw: <T extends object>(id: string) => Reactive<T>;
|
|
23
|
+
}, "$apply" | "$has" | "$onlyGet" | "$applyRaw" | "$hasRaw" | "$onlyGetRaw">>;
|
package/dist/pack.tgz
ADDED
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@delta-comic/core",
|
|
3
|
+
"version": "0.0.0-semantically-released",
|
|
4
|
+
"description": "空阙虱楼",
|
|
5
|
+
"homepage": "https://github.com/delta-comic/delta-comic-core",
|
|
6
|
+
"license": "AGPL-3.0-only",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "wenxig",
|
|
9
|
+
"email": "wenxinguo12@gmail.com"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/delta-comic/delta-comic-core.git"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "./dist/index.js",
|
|
20
|
+
"module": "./dist/index.js",
|
|
21
|
+
"types": "./dist/lib/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/lib/index.d.ts",
|
|
25
|
+
"import": "./dist/index.js",
|
|
26
|
+
"require": "./dist/index.cjs"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@delta-comic/model": "0.0.0-semantically-released",
|
|
34
|
+
"@delta-comic/plugin": "0.0.0-semantically-released",
|
|
35
|
+
"@delta-comic/utils": "0.0.0-semantically-released"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"pinia": "^3.0",
|
|
39
|
+
"vue": "^3.5"
|
|
40
|
+
},
|
|
41
|
+
"release": {
|
|
42
|
+
"extends": "../../release.config.js",
|
|
43
|
+
"tagFormat": "core-${version}"
|
|
44
|
+
},
|
|
45
|
+
"dist": {
|
|
46
|
+
"tarball": "./dist/pack.tgz"
|
|
47
|
+
},
|
|
48
|
+
"readme": "./README.md",
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "vite build && pnpm pack --out ./dist/pack.tgz"
|
|
51
|
+
}
|
|
52
|
+
}
|