@luckylillia-dev/plugin-webqq 0.0.0-stage → 1.0.2
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 +339 -0
- package/assets/LICENSE-dashboard-icons.txt +201 -0
- package/assets/README.md +7 -0
- package/assets/icon.svg +42 -0
- package/lib/client/chunks/WebQQEntry-34LQMVRZ.js +91 -0
- package/lib/client/chunks/chunk-JP6IZEMY.js +1 -0
- package/lib/client/index.js +10 -0
- package/lib/client/module.js +1 -0
- package/lib/client/style.css +2 -0
- package/lib/index.js +22774 -0
- package/lib/index.js.map +7 -0
- package/lib/types/actions.d.ts +4 -0
- package/lib/types/chats.d.ts +4 -0
- package/lib/types/events.d.ts +4 -0
- package/lib/types/groupFiles.d.ts +4 -0
- package/lib/types/index.d.ts +25 -0
- package/lib/types/media.d.ts +11 -0
- package/lib/types/members.d.ts +3 -0
- package/lib/types/messages.d.ts +5 -0
- package/lib/types/notifications.d.ts +3 -0
- package/lib/types/proxy.d.ts +3 -0
- package/lib/types/settings.d.ts +7 -0
- package/lib/types/upload.d.ts +3 -0
- package/lib/types/utils.d.ts +8 -0
- package/package.json +113 -4
- package/README.md +0 -3
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Context } from 'cordis';
|
|
2
|
+
import { Hono } from 'hono';
|
|
3
|
+
import { SSEStreamingApi } from 'hono/streaming';
|
|
4
|
+
import { SendPicElement } from '@luckylillia-dev/plugin-nt-protocol/api';
|
|
5
|
+
export interface WebQQRoutesOptions {
|
|
6
|
+
uploadDir: string;
|
|
7
|
+
sseClients: Set<SSEStreamingApi>;
|
|
8
|
+
createPicElement: (imagePath: string) => Promise<SendPicElement | null>;
|
|
9
|
+
}
|
|
10
|
+
export declare function createWebQQRoutes(ctx: Context, options: WebQQRoutesOptions): Hono;
|
|
11
|
+
/**
|
|
12
|
+
* The standalone WebQQ plugin: its routes, upload dir and SSE stream, plus
|
|
13
|
+
* the NT listeners feeding the stream. It only comes up once everything its routes call is there.
|
|
14
|
+
*/
|
|
15
|
+
export declare const WebQQ: {
|
|
16
|
+
name: string;
|
|
17
|
+
inject: string[];
|
|
18
|
+
Config: import("schemastery")<import("./settings").WebQQSettings>;
|
|
19
|
+
apply(ctx: Context): Promise<void>;
|
|
20
|
+
};
|
|
21
|
+
export declare const name = "@luckylillia-dev/plugin-webqq";
|
|
22
|
+
export declare const inject: string[];
|
|
23
|
+
export declare const Config: import("schemastery")<import("./settings").WebQQSettings>;
|
|
24
|
+
export type Config = import('./settings').WebQQSettings;
|
|
25
|
+
export declare const apply: (ctx: Context) => Promise<void>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Context } from 'cordis';
|
|
2
|
+
import type { FFmpegAPI } from '@luckylillia-dev/plugin-sdk';
|
|
3
|
+
export declare class FFmpegUnavailableError extends Error {
|
|
4
|
+
readonly code = "FFMPEG_PLUGIN_MISSING";
|
|
5
|
+
constructor(message?: string);
|
|
6
|
+
}
|
|
7
|
+
export declare function isFFmpegUnavailableError(error: unknown): error is FFmpegUnavailableError;
|
|
8
|
+
export declare function getFFmpegAddon(ctx: Context): FFmpegAPI;
|
|
9
|
+
export declare function decodeSilk(ctx: Context, input: string, format: 'wav'): Promise<string>;
|
|
10
|
+
export declare function isSilk(data: Buffer): boolean;
|
|
11
|
+
export declare function isWav(data: Buffer): boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Context } from 'cordis';
|
|
2
|
+
import { RawMessage, SendPicElement } from '@luckylillia-dev/plugin-nt-protocol/api';
|
|
3
|
+
import { Hono } from 'hono';
|
|
4
|
+
export declare function resolveWatchPicUrls(ctx: Context, message: RawMessage): Promise<void>;
|
|
5
|
+
export declare function createMessagesRoutes(ctx: Context, createPicElement: (imagePath: string) => Promise<SendPicElement | null>): Hono;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Schema from 'schemastery';
|
|
2
|
+
/** How the WebUI shows WebQQ; its client reads them, the backend has no use for them. */
|
|
3
|
+
export interface WebQQSettings {
|
|
4
|
+
autoHideSidebar: boolean;
|
|
5
|
+
fullscreenButton: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const WebQQSchema: Schema<WebQQSettings>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function serializeResult(result: unknown): unknown;
|
|
2
|
+
export declare function encodeGroupRequestFlag(groupCode: number, seq: number, type: number, doubt: boolean): string;
|
|
3
|
+
export declare function decodeGroupRequestFlag(flag: string): {
|
|
4
|
+
groupCode: number;
|
|
5
|
+
seq: number;
|
|
6
|
+
type: number;
|
|
7
|
+
doubt: boolean;
|
|
8
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,115 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luckylillia-dev/plugin-webqq",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "在 LuckyLillia WebUI 中像 QQ 客户端一样收发 NTQQ 消息",
|
|
6
|
+
"main": "./lib/index.js",
|
|
7
|
+
"types": "./lib/types/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/types/index.d.ts",
|
|
11
|
+
"default": "./lib/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"lib",
|
|
17
|
+
"assets",
|
|
18
|
+
"LICENSE"
|
|
19
|
+
],
|
|
20
|
+
"author": "LuckyLilliaDev",
|
|
21
|
+
"license": "GPL-2.0",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/LuckyLilliaDev/lucky-lillia-plugin-webqq.git"
|
|
25
|
+
},
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=22.15"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"luckylillia-plugin",
|
|
31
|
+
"webqq",
|
|
32
|
+
"ntqq"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "node scripts/build.mjs",
|
|
36
|
+
"check": "tsc --noEmit && tsc --noEmit -p tsconfig.client.json",
|
|
37
|
+
"test": "vitest run",
|
|
38
|
+
"prepack": "npm run check && npm run build"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"hono": "^4.13.5"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"@luckylillia-dev/plugin-nt-protocol": "^1.0.1",
|
|
45
|
+
"@luckylillia-dev/plugin-sdk": "^1.0.1",
|
|
46
|
+
"cordis": "4.0.0-rc.11",
|
|
47
|
+
"cosmokit": "^1.8.1",
|
|
48
|
+
"react": "^19.0.0",
|
|
49
|
+
"react-dom": "^19.0.0",
|
|
50
|
+
"schemastery": "^3.18.0"
|
|
51
|
+
},
|
|
52
|
+
"peerDependenciesMeta": {
|
|
53
|
+
"@luckylillia-dev/plugin-nt-protocol": {
|
|
54
|
+
"optional": true
|
|
55
|
+
},
|
|
56
|
+
"react": {
|
|
57
|
+
"optional": true
|
|
58
|
+
},
|
|
59
|
+
"react-dom": {
|
|
60
|
+
"optional": true
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@luckylillia-dev/plugin-sdk": "npm:@luckylillia/plugin-sdk@^1.0.1",
|
|
65
|
+
"@tailwindcss/postcss": "^4.2.0",
|
|
66
|
+
"@tanstack/react-virtual": "^3.14.6",
|
|
67
|
+
"@types/node": "^24.12.4",
|
|
68
|
+
"@types/react": "^19.2.17",
|
|
69
|
+
"@types/react-dom": "^19.2.3",
|
|
70
|
+
"esbuild": "~0.28.0",
|
|
71
|
+
"lucide-react": "^1.25.0",
|
|
72
|
+
"postcss": "^8.5.0",
|
|
73
|
+
"react": "^19.2.7",
|
|
74
|
+
"react-dom": "^19.2.7",
|
|
75
|
+
"tailwindcss": "^4.2.0",
|
|
76
|
+
"typescript": "^5.9.3",
|
|
77
|
+
"vitest": "^4.1.11",
|
|
78
|
+
"zustand": "^5.0.14"
|
|
79
|
+
},
|
|
80
|
+
"publishConfig": {
|
|
81
|
+
"access": "public",
|
|
82
|
+
"registry": "https://registry.npmjs.org"
|
|
83
|
+
},
|
|
84
|
+
"llbot": {
|
|
85
|
+
"title": "WebQQ",
|
|
86
|
+
"description": "在 WebUI 里像 QQ 客户端一样收发消息,查看好友、群聊、通知和群文件。",
|
|
87
|
+
"category": "tool",
|
|
88
|
+
"icon": "assets/icon.svg",
|
|
89
|
+
"dependencies": {
|
|
90
|
+
"@luckylillia-dev/plugin-nt-protocol": "^1.0.1"
|
|
91
|
+
},
|
|
92
|
+
"service": {
|
|
93
|
+
"required": [
|
|
94
|
+
"webuiServer",
|
|
95
|
+
"app",
|
|
96
|
+
"store",
|
|
97
|
+
"qqProtocol",
|
|
98
|
+
"ntMsgApi",
|
|
99
|
+
"ntFileApi",
|
|
100
|
+
"ntUserApi",
|
|
101
|
+
"ntGroupApi",
|
|
102
|
+
"ntFriendApi"
|
|
103
|
+
],
|
|
104
|
+
"optional": [
|
|
105
|
+
"ffmpeg"
|
|
106
|
+
],
|
|
107
|
+
"labels": {
|
|
108
|
+
"qqProtocol": "NTQQ 协议",
|
|
109
|
+
"app": "NTQQ 账号登录",
|
|
110
|
+
"store": "NTQQ 账号登录"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"webui": "./lib/client/index.js"
|
|
114
|
+
}
|
|
115
|
+
}
|
package/README.md
DELETED