@openmouse/protocol 0.48.1 → 0.50.0

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.
Files changed (96) hide show
  1. package/README.md +1 -0
  2. package/dist/drivers/atk/hid.d.ts.map +1 -1
  3. package/dist/drivers/atk/hid.js +2 -2
  4. package/dist/drivers/atk/hid.js.map +1 -1
  5. package/dist/drivers/atk/products.d.ts +7 -0
  6. package/dist/drivers/atk/products.d.ts.map +1 -1
  7. package/dist/drivers/atk/products.js +19 -2
  8. package/dist/drivers/atk/products.js.map +1 -1
  9. package/dist/drivers/glorious/sinowealth-hid.d.ts +71 -0
  10. package/dist/drivers/glorious/sinowealth-hid.d.ts.map +1 -0
  11. package/dist/drivers/glorious/sinowealth-hid.js +388 -0
  12. package/dist/drivers/glorious/sinowealth-hid.js.map +1 -0
  13. package/dist/drivers/gwolves/products.d.ts +5 -0
  14. package/dist/drivers/gwolves/products.d.ts.map +1 -1
  15. package/dist/drivers/gwolves/products.js +14 -10
  16. package/dist/drivers/gwolves/products.js.map +1 -1
  17. package/dist/drivers/gwolves/xvi-hid.d.ts +1 -0
  18. package/dist/drivers/gwolves/xvi-hid.d.ts.map +1 -1
  19. package/dist/drivers/gwolves/xvi-hid.js +14 -7
  20. package/dist/drivers/gwolves/xvi-hid.js.map +1 -1
  21. package/dist/drivers/hitscan/xvi-hid.d.ts +110 -0
  22. package/dist/drivers/hitscan/xvi-hid.d.ts.map +1 -0
  23. package/dist/drivers/hitscan/xvi-hid.js +803 -0
  24. package/dist/drivers/hitscan/xvi-hid.js.map +1 -0
  25. package/dist/drivers/motospeed/hid.js +1 -1
  26. package/dist/drivers/motospeed/hid.js.map +1 -1
  27. package/dist/drivers/mouse-types.d.ts +16 -0
  28. package/dist/drivers/mouse-types.d.ts.map +1 -1
  29. package/dist/drivers/razer/hid.d.ts +0 -1
  30. package/dist/drivers/razer/hid.d.ts.map +1 -1
  31. package/dist/drivers/razer/hid.js +14 -9
  32. package/dist/drivers/razer/hid.js.map +1 -1
  33. package/dist/drivers/redragon/hid.d.ts +44 -63
  34. package/dist/drivers/redragon/hid.d.ts.map +1 -1
  35. package/dist/drivers/redragon/hid.js +207 -270
  36. package/dist/drivers/redragon/hid.js.map +1 -1
  37. package/dist/drivers/registry.d.ts +2 -1
  38. package/dist/drivers/registry.d.ts.map +1 -1
  39. package/dist/drivers/registry.js +10 -1
  40. package/dist/drivers/registry.js.map +1 -1
  41. package/dist/drivers/vendors.d.ts +8 -1
  42. package/dist/drivers/vendors.d.ts.map +1 -1
  43. package/dist/drivers/vendors.js +18 -4
  44. package/dist/drivers/vendors.js.map +1 -1
  45. package/dist/gearhub/index.d.ts +8 -0
  46. package/dist/gearhub/index.d.ts.map +1 -1
  47. package/dist/gearhub/index.js +18 -0
  48. package/dist/gearhub/index.js.map +1 -1
  49. package/dist/glorious-sinowealth/index.d.ts +165 -0
  50. package/dist/glorious-sinowealth/index.d.ts.map +1 -0
  51. package/dist/glorious-sinowealth/index.js +345 -0
  52. package/dist/glorious-sinowealth/index.js.map +1 -0
  53. package/dist/hitscan/index.d.ts +2 -0
  54. package/dist/hitscan/index.d.ts.map +1 -1
  55. package/dist/hitscan/index.js +2 -0
  56. package/dist/hitscan/index.js.map +1 -1
  57. package/dist/hitscan/xvi-inputs.d.ts +81 -0
  58. package/dist/hitscan/xvi-inputs.d.ts.map +1 -0
  59. package/dist/hitscan/xvi-inputs.js +393 -0
  60. package/dist/hitscan/xvi-inputs.js.map +1 -0
  61. package/dist/hitscan/xvi.d.ts +278 -0
  62. package/dist/hitscan/xvi.d.ts.map +1 -0
  63. package/dist/hitscan/xvi.js +773 -0
  64. package/dist/hitscan/xvi.js.map +1 -0
  65. package/dist/index.d.ts +1 -0
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +1 -0
  68. package/dist/index.js.map +1 -1
  69. package/dist/keychron/index.d.ts.map +1 -1
  70. package/dist/keychron/index.js +4 -0
  71. package/dist/keychron/index.js.map +1 -1
  72. package/dist/razer/codec.d.ts +3 -2
  73. package/dist/razer/codec.d.ts.map +1 -1
  74. package/dist/razer/codec.js +5 -4
  75. package/dist/razer/codec.js.map +1 -1
  76. package/dist/redragon/deprecated.d.ts +24 -0
  77. package/dist/redragon/deprecated.d.ts.map +1 -0
  78. package/dist/redragon/deprecated.js +54 -0
  79. package/dist/redragon/deprecated.js.map +1 -0
  80. package/dist/redragon/holtek.d.ts +127 -0
  81. package/dist/redragon/holtek.d.ts.map +1 -0
  82. package/dist/redragon/holtek.js +232 -0
  83. package/dist/redragon/holtek.js.map +1 -0
  84. package/dist/redragon/index.d.ts +9 -203
  85. package/dist/redragon/index.d.ts.map +1 -1
  86. package/dist/redragon/index.js +11 -430
  87. package/dist/redragon/index.js.map +1 -1
  88. package/dist/redragon/m612.d.ts +82 -0
  89. package/dist/redragon/m612.d.ts.map +1 -0
  90. package/dist/redragon/m612.js +166 -0
  91. package/dist/redragon/m612.js.map +1 -0
  92. package/dist/redragon/m724.d.ts +47 -0
  93. package/dist/redragon/m724.d.ts.map +1 -0
  94. package/dist/redragon/m724.js +107 -0
  95. package/dist/redragon/m724.js.map +1 -0
  96. package/package.json +5 -1
@@ -0,0 +1,278 @@
1
+ /** Hit scan devices that speak the web protocol. `0x0300` is the shared dongle. */
2
+ export declare const HITSCAN_XVI_VENDOR_ID = 14192;
3
+ export interface HitscanXviProduct {
4
+ model: "Hyperlight X" | "Hyperlight N" | null;
5
+ transport: "wired" | "receiver";
6
+ }
7
+ export declare const HITSCAN_XVI_PRODUCTS: ReadonlyMap<number, HitscanXviProduct>;
8
+ export declare const HITSCAN_XVI_REPORT_ID = 0;
9
+ export declare const HITSCAN_XVI_PACKET_LENGTH = 64;
10
+ /** Mouse device id used in request byte 2 (`sdk.wiredMouseDeviceID`). */
11
+ export declare const HITSCAN_XVI_DEVICE_ID = 2;
12
+ /** The dongle answers its own firmware query with device id 0. */
13
+ export declare const HITSCAN_XVI_DONGLE_DEVICE_ID = 0;
14
+ export declare const HITSCAN_XVI_STATUS_OK = 161;
15
+ export declare const HITSCAN_XVI_STATUS_ASLEEP = 2;
16
+ export declare const HITSCAN_XVI_NOTIFICATION_REPORT_ID = 4;
17
+ export declare const HITSCAN_XVI_MAX_PROFILES = 10;
18
+ export declare const HITSCAN_XVI_MAX_DPI_STAGES = 4;
19
+ /** The vendor reads and writes six RGB slots even on four-stage mice. */
20
+ export declare const HITSCAN_XVI_MAX_DPI_COLORS = 6;
21
+ export declare const HITSCAN_XVI_DPI_MIN = 50;
22
+ export declare const HITSCAN_XVI_DPI_MAX = 30000;
23
+ export declare const HITSCAN_XVI_DPI_STEP = 50;
24
+ export declare const HITSCAN_XVI_MAX_MACROS = 20;
25
+ export declare const HITSCAN_XVI_MAX_MACRO_BYTES = 4096;
26
+ export declare const HITSCAN_XVI_TIMING_MAX_MS = 50;
27
+ export declare const HITSCAN_XVI_ANGLE_LIMIT = 30;
28
+ /** `RATE_IDS` in hitscan-device.js. 16 is also read back as 1 kHz. */
29
+ export declare const HITSCAN_XVI_POLLING_CODES: ReadonlyMap<number, number>;
30
+ /** The app's polling picker offers these on both the cable and the receiver. */
31
+ export declare const HITSCAN_XVI_POLLING_RATES: readonly number[];
32
+ export declare const HITSCAN_XVI_LIFT_OFF_MILLIMETRES: readonly number[];
33
+ /** Auto-sleep picker in the web app, seconds. 0/0xff00/0xffff read as "never". */
34
+ export declare const HITSCAN_XVI_SLEEP_OPTIONS: readonly number[];
35
+ export declare const HITSCAN_XVI_SLEEP_NEVER = 65535;
36
+ /** Request classes (`request[4]`). */
37
+ export declare const HITSCAN_XVI_CLASS: {
38
+ readonly config: 0;
39
+ readonly sensor: 1;
40
+ readonly color: 2;
41
+ readonly button: 3;
42
+ readonly macro: 4;
43
+ };
44
+ /** Command bytes (`request[5]`). A value may repeat across classes. */
45
+ export declare const HITSCAN_XVI_COMMAND: {
46
+ readonly profileSet: 5;
47
+ readonly profileGet: 133;
48
+ readonly profileList: 134;
49
+ readonly profileNameSet: 14;
50
+ readonly profileNameGet: 142;
51
+ readonly resetProfile: 13;
52
+ readonly firmware: 129;
53
+ readonly battery: 131;
54
+ readonly signal: 167;
55
+ readonly devicePid: 139;
56
+ readonly pollingSet: 0;
57
+ readonly pollingGet: 128;
58
+ readonly sleepSet: 7;
59
+ readonly sleepGet: 135;
60
+ readonly liftOffSet: 8;
61
+ readonly liftOffGet: 136;
62
+ readonly dpiStagesSet: 1;
63
+ readonly dpiStagesGet: 129;
64
+ readonly dpiStageSet: 2;
65
+ readonly dpiStageGet: 130;
66
+ readonly dpiMax: 140;
67
+ readonly colorsSet: 1;
68
+ readonly colorsGet: 129;
69
+ readonly splitDpiSet: 13;
70
+ readonly splitDpiGet: 141;
71
+ readonly angleSet: 20;
72
+ readonly angleGet: 148;
73
+ readonly motionSyncSet: 9;
74
+ readonly motionSyncGet: 137;
75
+ readonly hyperModeSet: 11;
76
+ readonly hyperModeGet: 139;
77
+ readonly trackingModeSet: 19;
78
+ readonly trackingModeGet: 147;
79
+ readonly spdtSet: 3;
80
+ readonly spdtGet: 131;
81
+ readonly scrollHighPerformanceSet: 25;
82
+ readonly scrollHighPerformanceGet: 153;
83
+ readonly timingsSet: 8;
84
+ readonly timingsGet: 136;
85
+ readonly buttonSet: 0;
86
+ readonly buttonGet: 128;
87
+ readonly macroAllocate: 1;
88
+ readonly macroSize: 129;
89
+ readonly macroDataSet: 3;
90
+ readonly macroDataGet: 131;
91
+ readonly macroNameSet: 6;
92
+ readonly macroNameGet: 134;
93
+ readonly macroList: 133;
94
+ readonly macroDelete: 2;
95
+ };
96
+ type Bytes = Uint8Array | readonly number[];
97
+ /** `[0, 0, device, length, class, command, data...]`, zero padded to 64 bytes. */
98
+ export declare function hitscanXviFrame(length: number, commandClass: number, command: number, data?: Bytes, deviceId?: number): Uint8Array<ArrayBuffer>;
99
+ /** Drops a platform-prepended report-id byte so reply[0] is the status. */
100
+ export declare function hitscanXviNormalize(reply: Bytes): Uint8Array<ArrayBuffer>;
101
+ /**
102
+ * Normalizes and validates a reply against the request's class and command.
103
+ * Returns null for stale, malformed or mismatched replies; the caller decides
104
+ * whether an `0x02` status means "asleep".
105
+ */
106
+ export declare function hitscanXviReply(reply: Bytes, request?: Bytes): Uint8Array<ArrayBuffer> | null;
107
+ /** Valid `0xa1` reply for `class`/`command`, or null. */
108
+ export declare function hitscanXviDecode(reply: Bytes, commandClass: number, command: number): Uint8Array<ArrayBuffer> | null;
109
+ /** Signed angle byte to degrees. */
110
+ export declare function hitscanXviDecodeAngleByte(value: number): number;
111
+ export declare function hitscanXviEncodeAngle(degrees: number): number;
112
+ /** Lift-off distance: fractional millimetres use `value | 0x80` with tenths. */
113
+ export declare function hitscanXviEncodeLiftOff(millimetres: number): number;
114
+ export declare function hitscanXviDecodeLiftOffByte(value: number): number | null;
115
+ export declare function hitscanXviEncodePollingRate(hz: number): number;
116
+ /** `16` is the receiver's alternate 1 kHz code, exactly as the vendor app maps it. */
117
+ export declare function hitscanXviDecodePollingRateCode(code: number): number | null;
118
+ export declare function hitscanXviFirmwareRequest(deviceId?: number): Uint8Array<ArrayBuffer>;
119
+ export declare function hitscanXviBatteryRequest(): Uint8Array<ArrayBuffer>;
120
+ export declare function hitscanXviSignalRequest(): Uint8Array<ArrayBuffer>;
121
+ /** Device id 1 and a trailing `2`: the vendor's `GetDevicePID` constructor. */
122
+ export declare function hitscanXviDevicePidRequest(): Uint8Array<ArrayBuffer>;
123
+ export declare function hitscanXviProfileListRequest(): Uint8Array<ArrayBuffer>;
124
+ export declare function hitscanXviProfileGetRequest(): Uint8Array<ArrayBuffer>;
125
+ export declare function hitscanXviProfileSetRequest(profileId: number): Uint8Array<ArrayBuffer>;
126
+ export declare function hitscanXviProfileNameGetRequest(profileId: number): Uint8Array<ArrayBuffer>;
127
+ export declare function hitscanXviProfileNameSetRequest(profileId: number, nameBytes: Bytes): Uint8Array<ArrayBuffer>;
128
+ export declare function hitscanXviResetProfileRequest(profileId: number): Uint8Array<ArrayBuffer>;
129
+ export declare function hitscanXviPollingRateGetRequest(profileId: number): Uint8Array<ArrayBuffer>;
130
+ export declare function hitscanXviPollingRateSetRequest(profileId: number, hz: number): Uint8Array<ArrayBuffer>;
131
+ export declare function hitscanXviSleepGetRequest(profileId: number): Uint8Array<ArrayBuffer>;
132
+ /** `seconds === null` writes the "never" sentinel. */
133
+ export declare function hitscanXviSleepSetRequest(profileId: number, seconds: number | null): Uint8Array<ArrayBuffer>;
134
+ export declare function hitscanXviLiftOffGetRequest(profileId: number): Uint8Array<ArrayBuffer>;
135
+ export declare function hitscanXviLiftOffSetRequest(profileId: number, millimetres: number): Uint8Array<ArrayBuffer>;
136
+ export interface HitscanXviDpiStage {
137
+ x: number;
138
+ y: number;
139
+ }
140
+ export declare function hitscanXviDpiStagesGetRequest(profileId: number, capacity?: number): Uint8Array<ArrayBuffer>;
141
+ /** `[2, 26, 1, 1, profile, count, x/y pairs...]`; the length byte stays 26. */
142
+ export declare function hitscanXviDpiStagesSetRequest(profileId: number, stages: readonly HitscanXviDpiStage[]): Uint8Array<ArrayBuffer>;
143
+ export declare function hitscanXviActiveStageGetRequest(profileId: number): Uint8Array<ArrayBuffer>;
144
+ /** `stage` is 1-based, matching the firmware. */
145
+ export declare function hitscanXviActiveStageSetRequest(profileId: number, stage: number): Uint8Array<ArrayBuffer>;
146
+ export declare function hitscanXviDpiMaxRequest(): Uint8Array<ArrayBuffer>;
147
+ export declare function hitscanXviDpiColorsGetRequest(profileId: number): Uint8Array<ArrayBuffer>;
148
+ /** `rgb` is 18 bytes: six RGB triplets, one per stage slot. */
149
+ export declare function hitscanXviDpiColorsSetRequest(profileId: number, rgb: Bytes): Uint8Array<ArrayBuffer>;
150
+ export declare function hitscanXviSplitDpiGetRequest(profileId: number): Uint8Array<ArrayBuffer>;
151
+ export declare function hitscanXviSplitDpiSetRequest(profileId: number, enabled: boolean): Uint8Array<ArrayBuffer>;
152
+ export declare function hitscanXviAngleGetRequest(profileId: number): Uint8Array<ArrayBuffer>;
153
+ export declare function hitscanXviAngleSetRequest(profileId: number, degrees: number): Uint8Array<ArrayBuffer>;
154
+ export declare function hitscanXviFlagGetRequest(profileId: number, command: number): Uint8Array<ArrayBuffer>;
155
+ export declare function hitscanXviFlagSetRequest(profileId: number, command: number, enabled: boolean): Uint8Array<ArrayBuffer>;
156
+ export declare function hitscanXviSpdtGetRequest(profileId: number): Uint8Array<ArrayBuffer>;
157
+ /** The vendor SDK duplicates one flag; Hitscan's own adapter writes both. */
158
+ export declare function hitscanXviSpdtSetRequest(profileId: number, left: boolean, right: boolean): Uint8Array<ArrayBuffer>;
159
+ export declare function hitscanXviScrollHighPerformanceGetRequest(profileId: number): Uint8Array<ArrayBuffer>;
160
+ /** `timeoutMs` is the vendor UI's 300 ms constant. */
161
+ export declare function hitscanXviScrollHighPerformanceSetRequest(profileId: number, enabled: boolean, timeoutMs?: number): Uint8Array<ArrayBuffer>;
162
+ export interface HitscanXviClickTimings {
163
+ beforePress: number;
164
+ beforeRelease: number;
165
+ afterPress: number;
166
+ afterRelease: number;
167
+ }
168
+ export declare function hitscanXviTimingsGetRequest(profileId: number): Uint8Array<ArrayBuffer>;
169
+ /** Five payload bytes: four timings plus the vendor's trailing `3`. */
170
+ export declare function hitscanXviTimingsSetRequest(profileId: number, timings: HitscanXviClickTimings): Uint8Array<ArrayBuffer>;
171
+ /** Physical button record ids: Left, Right, Middle, Forward, Back, DPI. */
172
+ export declare const HITSCAN_XVI_BUTTON_IDS: readonly number[];
173
+ export declare const HITSCAN_XVI_BUTTON_NAMES: readonly string[];
174
+ export declare function hitscanXviButtonGetRequest(profileId: number, buttonId: number, length?: number): Uint8Array<ArrayBuffer>;
175
+ export declare function hitscanXviButtonSetRequest(profileId: number, buttonId: number, functionId: number, data: Bytes): Uint8Array<ArrayBuffer>;
176
+ export declare function hitscanXviMacroListRequest(capacity?: number): Uint8Array<ArrayBuffer>;
177
+ export declare function hitscanXviMacroSizeRequest(macroId: number): Uint8Array<ArrayBuffer>;
178
+ export declare function hitscanXviMacroAllocateRequest(macroId: number, size: number): Uint8Array<ArrayBuffer>;
179
+ export declare function hitscanXviMacroDataSetRequest(macroId: number, offset: number, data: Bytes): Uint8Array<ArrayBuffer>;
180
+ export declare function hitscanXviMacroDataRequest(macroId: number, offset: number, length: number): Uint8Array<ArrayBuffer>;
181
+ export declare function hitscanXviMacroNameRequest(macroId: number): Uint8Array<ArrayBuffer>;
182
+ export declare function hitscanXviMacroNameSetRequest(macroId: number, nameBytes: Bytes): Uint8Array<ArrayBuffer>;
183
+ export declare function hitscanXviMacroDeleteRequest(macroId: number): Uint8Array<ArrayBuffer>;
184
+ export declare function hitscanXviDecodeFirmware(reply: Bytes): string | null;
185
+ /** Payload byte 0 is the charging flag, byte 1 the percentage. */
186
+ export declare function hitscanXviDecodeBattery(reply: Bytes): {
187
+ percent: number;
188
+ charging: boolean;
189
+ } | null;
190
+ /** Supplier levels are 1 = strong, 2 = medium, 3 = weak, 0 = unavailable. */
191
+ export declare function hitscanXviDecodeSignal(reply: Bytes): {
192
+ level: 0 | 1 | 2 | 3;
193
+ rssi: number;
194
+ } | null;
195
+ /** PID at payload[4..5], VID at payload[2..3]. */
196
+ export declare function hitscanXviDecodeDevicePid(reply: Bytes): number | null;
197
+ export declare function hitscanXviDecodeProfileCount(reply: Bytes): number | null;
198
+ export declare function hitscanXviDecodeProfileId(reply: Bytes): number | null;
199
+ /** Payload[0] is the profile echo, payload[1] the name length, then GBK bytes. */
200
+ export declare function hitscanXviDecodeProfileName(reply: Bytes): {
201
+ id: number;
202
+ name: string | null;
203
+ } | null;
204
+ export declare function hitscanXviDecodePollingRate(reply: Bytes): number | null;
205
+ export declare function hitscanXviDecodeSleep(reply: Bytes): number | null;
206
+ export declare function hitscanXviDecodeLiftOff(reply: Bytes): number | null;
207
+ /**
208
+ * Payload[1] is the stage count, then four bytes per stage from payload[2].
209
+ * The vendor reads and writes X and Y independently.
210
+ */
211
+ export declare function hitscanXviDecodeDpiStages(reply: Bytes): {
212
+ stages: HitscanXviDpiStage[];
213
+ } | null;
214
+ export declare function hitscanXviDecodeActiveStage(reply: Bytes): number | null;
215
+ export declare function hitscanXviDecodeDpiColors(reply: Bytes): string[] | null;
216
+ export declare function hitscanXviDecodeSplitDpi(reply: Bytes): boolean | null;
217
+ export declare function hitscanXviDecodeAngle(reply: Bytes): number | null;
218
+ export declare function hitscanXviDecodeFlag(reply: Bytes, command: number): boolean | null;
219
+ export declare function hitscanXviDecodeSpdt(reply: Bytes): {
220
+ left: boolean;
221
+ right: boolean;
222
+ } | null;
223
+ export declare function hitscanXviDecodeScrollHighPerformance(reply: Bytes): boolean | null;
224
+ export declare function hitscanXviDecodeTimings(reply: Bytes): HitscanXviClickTimings | null;
225
+ /** Payload: `[profile, button, 0, function, length, data...]`. */
226
+ export declare function hitscanXviDecodeButton(reply: Bytes): {
227
+ profileId: number;
228
+ buttonId: number;
229
+ functionId: number;
230
+ data: number[];
231
+ } | null;
232
+ /** Payload[0..1] is the returned count, payload[4..] the ids. */
233
+ export declare function hitscanXviDecodeMacroIds(reply: Bytes): number[] | null;
234
+ /** Payload[2..5] is a big-endian 32-bit byte count. */
235
+ export declare function hitscanXviDecodeMacroSize(reply: Bytes): number | null;
236
+ /** Payload: `[macro, length, GBK bytes...]`. */
237
+ export declare function hitscanXviDecodeMacroName(reply: Bytes): {
238
+ id: number;
239
+ bytes: number[];
240
+ } | null;
241
+ /** Validates the echoed id, offset and length before returning chunk bytes. */
242
+ export declare function hitscanXviDecodeMacroData(reply: Bytes, macroId: number, offset: number, length: number): number[] | null;
243
+ export type HitscanXviNotification = {
244
+ type: "signal";
245
+ level: 0 | 1 | 2 | 3;
246
+ rssi: number;
247
+ } | {
248
+ type: "sleep";
249
+ } | {
250
+ type: "wake";
251
+ } | {
252
+ type: "battery";
253
+ percent: number;
254
+ charging: boolean;
255
+ } | {
256
+ type: "profile";
257
+ } | {
258
+ type: "dpi";
259
+ stage: number;
260
+ x: number;
261
+ y: number;
262
+ } | {
263
+ type: "liftOff";
264
+ millimetres: number;
265
+ } | {
266
+ type: "polling";
267
+ hz: number;
268
+ } | {
269
+ type: "unknown";
270
+ bytes: number[];
271
+ };
272
+ /**
273
+ * Input report 4 carries unsolicited state changes. WebHID strips the report id
274
+ * on some platforms, so a leading `4` followed by a known type is dropped too.
275
+ */
276
+ export declare function hitscanXviDecodeNotification(bytes: Bytes): HitscanXviNotification | null;
277
+ export {};
278
+ //# sourceMappingURL=xvi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"xvi.d.ts","sourceRoot":"","sources":["../../src/hitscan/xvi.ts"],"names":[],"mappings":"AAwBA,mFAAmF;AACnF,eAAO,MAAM,qBAAqB,QAAS,CAAC;AAC5C,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,cAAc,GAAG,cAAc,GAAG,IAAI,CAAC;IAC9C,SAAS,EAAE,OAAO,GAAG,UAAU,CAAC;CACjC;AACD,eAAO,MAAM,oBAAoB,EAAE,WAAW,CAAC,MAAM,EAAE,iBAAiB,CAMtE,CAAC;AAEH,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAC5C,yEAAyE;AACzE,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,kEAAkE;AAClE,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAC9C,eAAO,MAAM,qBAAqB,MAAO,CAAC;AAC1C,eAAO,MAAM,yBAAyB,IAAO,CAAC;AAC9C,eAAO,MAAM,kCAAkC,IAAI,CAAC;AAEpD,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C,yEAAyE;AACzE,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,mBAAmB,QAAS,CAAC;AAC1C,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,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