A face was always built as a legacy FaceElem (face.index). QQ-NT only renders classic small faces that way; newer 'super'/animated faces sent as face.index are silently remapped by the server (e.g. 424→168) or shown as a placeholder. Classify each face id off QQ's own system-face catalog (0x9154_1, ported from SLE/Lagrange) and pick the matching wire form: - super (animated, aniSticker pack ≠ (1,1)) → CommonElem 37 + QFaceExtra - other id ≥ 260 → CommonElem 33 + QSmallFaceExtra - classic id < 260 → legacy FaceElem The catalog is fetched once (shared, lazy-warmed off the first face send) and classify falls back to an id-range guess until it lands. Data-driven so all 66 non-(1,1) super faces encode correctly, not just a hardcoded few. Verified on a live account: 424→424 (was 168), super 392→392, classic 14→14.
111 lines
3.5 KiB
JSON
111 lines
3.5 KiB
JSON
{
|
|
"license": "SEE LICENSE IN LICENSE",
|
|
"name": "@snowluma/proto-defs",
|
|
"version": "1.10.4",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "SnowLuma QQ/Lagrange wire-protobuf type definitions. Pure TypeScript interfaces with proton's `pb<N, T>` marker types — `@snowluma/proton`'s vite plugin compiles them into zero-runtime encoder/decoder functions at the call sites in `@snowluma/core` (and any downstream consumer). Exposed as per-file subpaths (`@snowluma/proto-defs/oidb`, `@snowluma/proto-defs/message`, …) so the import-site shape mirrors the legacy `bridge/proto/proton/*` layout and avoids name collisions across files (notably `highway.ts` and `oidb-actions/media.ts` share NTV2-prefixed names).",
|
|
"main": "./src/index.ts",
|
|
"types": "./src/index.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./src/index.ts",
|
|
"default": "./src/index.ts"
|
|
},
|
|
"./action": {
|
|
"types": "./src/action.ts",
|
|
"default": "./src/action.ts"
|
|
},
|
|
"./element": {
|
|
"types": "./src/element.ts",
|
|
"default": "./src/element.ts"
|
|
},
|
|
"./highway": {
|
|
"types": "./src/highway.ts",
|
|
"default": "./src/highway.ts"
|
|
},
|
|
"./longmsg": {
|
|
"types": "./src/longmsg.ts",
|
|
"default": "./src/longmsg.ts"
|
|
},
|
|
"./message": {
|
|
"types": "./src/message.ts",
|
|
"default": "./src/message.ts"
|
|
},
|
|
"./get-group-msg": {
|
|
"types": "./src/get-group-msg.ts",
|
|
"default": "./src/get-group-msg.ts"
|
|
},
|
|
"./get-c2c-msg": {
|
|
"types": "./src/get-c2c-msg.ts",
|
|
"default": "./src/get-c2c-msg.ts"
|
|
},
|
|
"./notify": {
|
|
"types": "./src/notify.ts",
|
|
"default": "./src/notify.ts"
|
|
},
|
|
"./ptt-trans": {
|
|
"types": "./src/ptt-trans.ts",
|
|
"default": "./src/ptt-trans.ts"
|
|
},
|
|
"./oidb": {
|
|
"types": "./src/oidb.ts",
|
|
"default": "./src/oidb.ts"
|
|
},
|
|
"./oidb-action": {
|
|
"types": "./src/oidb-action.ts",
|
|
"default": "./src/oidb-action.ts"
|
|
},
|
|
"./oidb-actions/base": {
|
|
"types": "./src/oidb-actions/base.ts",
|
|
"default": "./src/oidb-actions/base.ts"
|
|
},
|
|
"./oidb-actions/contact-ark": {
|
|
"types": "./src/oidb-actions/contact-ark.ts",
|
|
"default": "./src/oidb-actions/contact-ark.ts"
|
|
},
|
|
"./oidb-actions/doubt-buddy": {
|
|
"types": "./src/oidb-actions/doubt-buddy.ts",
|
|
"default": "./src/oidb-actions/doubt-buddy.ts"
|
|
},
|
|
"./oidb-actions/group-ext": {
|
|
"types": "./src/oidb-actions/group-ext.ts",
|
|
"default": "./src/oidb-actions/group-ext.ts"
|
|
},
|
|
"./oidb-actions/group-album": {
|
|
"types": "./src/oidb-actions/group-album.ts",
|
|
"default": "./src/oidb-actions/group-album.ts"
|
|
},
|
|
"./oidb-actions/group-file": {
|
|
"types": "./src/oidb-actions/group-file.ts",
|
|
"default": "./src/oidb-actions/group-file.ts"
|
|
},
|
|
"./oidb-actions/flash-transfer": {
|
|
"types": "./src/oidb-actions/flash-transfer.ts",
|
|
"default": "./src/oidb-actions/flash-transfer.ts"
|
|
},
|
|
"./oidb-actions/media": {
|
|
"types": "./src/oidb-actions/media.ts",
|
|
"default": "./src/oidb-actions/media.ts"
|
|
},
|
|
"./oidb-actions/ocr": {
|
|
"types": "./src/oidb-actions/ocr.ts",
|
|
"default": "./src/oidb-actions/ocr.ts"
|
|
},
|
|
"./oidb-actions/sys-faces": {
|
|
"types": "./src/oidb-actions/sys-faces.ts",
|
|
"default": "./src/oidb-actions/sys-faces.ts"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@snowluma/proton": "workspace:*"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^24.12.2",
|
|
"typescript": "catalog:"
|
|
}
|
|
}
|