@hfd-sdk/keyboard-kit 1.0.0 → 1.1.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.
@@ -1,4 +1,4 @@
1
- import { k as p, c as _, x as y, l as d, o as m, a as w, m as b, r as k, s as v, p as x, t as z, w as h } from "./runtime-core.es.js";
1
+ import { c as p, b as _, d, z as m, p as y, o as b, f as v, q as w, r as z, s as h, a as j, v as k, t as x, w as F } from "./runtime-core.es.js";
2
2
  function s(e) {
3
3
  const n = {};
4
4
  for (const [o, t] of Object.entries(e))
@@ -9,18 +9,18 @@ function a(e) {
9
9
  const n = {};
10
10
  for (const [o, t] of Object.entries(e)) {
11
11
  const r = t;
12
- n[o] = r && typeof r == "object" && r.__fn__ ? c(r.body) : t;
12
+ n[o] = r && typeof r == "object" && r.__fn__ ? u(r.body) : t;
13
13
  }
14
14
  return n;
15
15
  }
16
- function c(e) {
16
+ function u(e) {
17
17
  try {
18
18
  return new Function(`return (${e})`)();
19
19
  } catch {
20
20
  return new Function(`return function ${e}`)();
21
21
  }
22
22
  }
23
- function u(e) {
23
+ function c(e) {
24
24
  return s(e);
25
25
  }
26
26
  function i(e) {
@@ -28,17 +28,19 @@ function i(e) {
28
28
  }
29
29
  export {
30
30
  p as clearInterval,
31
- _ as computed,
32
- y as defineCustomElement,
31
+ _ as clearTimeout,
32
+ d as computed,
33
+ m as defineCustomElement,
33
34
  i as deserializePreset,
34
- d as nextTick,
35
- m as onBeforeUnmount,
36
- w as onMounted,
37
- b as onScopeDispose,
38
- k as ref,
39
- u as serializePreset,
40
- v as setInterval,
41
- x as shallowRef,
42
- z as toValue,
43
- h as watch
35
+ y as nextTick,
36
+ b as onBeforeUnmount,
37
+ v as onMounted,
38
+ w as onScopeDispose,
39
+ z as ref,
40
+ c as serializePreset,
41
+ h as setInterval,
42
+ j as setTimeout,
43
+ k as shallowRef,
44
+ x as toValue,
45
+ F as watch
44
46
  };
@@ -0,0 +1,5 @@
1
+ import { RgbColor } from './types';
2
+ /** HSV 转 RGB,h: 0-360,s/v: 0-1 */
3
+ export declare function HSVtoRGB(h: number, s: number, v: number): RgbColor;
4
+ /** 十六进制颜色(#rgb / #rrggbb)转 RGB */
5
+ export declare function hexToRgb(hex: string): RgbColor;
@@ -1,8 +1,8 @@
1
- import { KeyboardSyncConfig, KeyElementRef, RgbColor } from '../types';
1
+ import { KeyboardConfig, KeyElementRef, RgbColor } from '../types';
2
2
  export declare function discoverKeyElements(root: HTMLElement): KeyElementRef[];
3
3
  export interface SampleKeysOptions {
4
4
  canvas: HTMLCanvasElement;
5
- keyboardConfig: KeyboardSyncConfig;
5
+ keyboardConfig: KeyboardConfig;
6
6
  getKeyElements: () => KeyElementRef[];
7
7
  }
8
8
  export declare function sampleKeysFromCanvas(options: SampleKeysOptions): RgbColor[][] | null;
@@ -1,4 +1,4 @@
1
- import { KeyboardSyncConfig, RgbColor } from '../types';
2
- export declare function getMusicGridCol(keyboardConfig: KeyboardSyncConfig, rowIndex: number, colIndex: number): number;
3
- export declare function createKeysRgbGrid(keyboardConfig: KeyboardSyncConfig): RgbColor[][];
4
- export declare function buildMusicData(keysRgb: RgbColor[][], keyboardConfig: KeyboardSyncConfig): number[];
1
+ import { KeyboardConfig, RgbColor } from '../types';
2
+ export declare function getMusicGridCol(keyboardConfig: KeyboardConfig, rowIndex: number, colIndex: number): number;
3
+ export declare function createKeysRgbGrid(keyboardConfig: KeyboardConfig): RgbColor[][];
4
+ export declare function buildMusicData(keysRgb: RgbColor[][], keyboardConfig: KeyboardConfig): number[];
@@ -0,0 +1,474 @@
1
+ /**
2
+ * 键盘配置接口定义
3
+ */
4
+ export interface KeyboardConfig {
5
+ /** 厂商ID */
6
+ vendorId: number;
7
+ /** 产品ID */
8
+ productId: number;
9
+ /** 供应商名称 */
10
+ supplierName: string;
11
+ /** 键盘名称 */
12
+ name: string;
13
+ /** 键盘名称后缀 */
14
+ nameSuffix?: string;
15
+ /** 连接方式 */
16
+ connectType: ConnectType;
17
+ /** 协议类型 默认 default 协议 */
18
+ protocol?: string;
19
+ /** 路由名称列表 */
20
+ routesName: AppRouteName[];
21
+ /** 键盘图片(腾讯桶 keyboards 目录) */
22
+ keyboardImg?: string;
23
+ /** 键盘外框图片(腾讯桶 outline 目录) */
24
+ keyboardOutline?: string;
25
+ /** 键盘类名 */
26
+ keyboardClassName?: string;
27
+ /** 键盘按键显示语言 */
28
+ keyboardLang?: KeyboardLang;
29
+ /** 其他配置 */
30
+ otherConfig?: otherConfig;
31
+ /** 自定义按键配置 */
32
+ customKeysConfig?: customKeysConfig;
33
+ /** 灯光配置 */
34
+ lightingConfig?: lightingConfig;
35
+ /** 音乐律动配置 */
36
+ musicConfig?: musicConfig;
37
+ /** 宏配置 */
38
+ macroConfig?: macroConfig;
39
+ /** 性能配置 */
40
+ performanceConfig?: performanceConfig;
41
+ /** 触发设置配置 */
42
+ triggerConfig?: triggerConfig;
43
+ /** 高级键配置 */
44
+ advancedKeysConfig?: advancedKeysConfig;
45
+ /** 点阵屏led配置 */
46
+ ledConfig?: ledConfig;
47
+ /** TFT 屏幕配置 */
48
+ tftConfig?: tftConfig;
49
+ /** 设置配置 */
50
+ settingsConfig?: settingsConfig;
51
+ /** 社区配置 */
52
+ communityConfig?: communityConfig;
53
+ /** 键盘按键布局列表 */
54
+ keyList: KeyboardList;
55
+ /** 滚轮按键配置 */
56
+ wheelKeys?: wheelKey[];
57
+ }
58
+ /** 连接方式 */
59
+ export type ConnectType = 'USB' | '2.4G';
60
+ /**
61
+ * 应用路由名称类型定义
62
+ * 对应 Vue Router 中定义的路由名称
63
+ */
64
+ export type AppRouteName = 'home' | 'customKeys' | 'lighting' | 'macro' | 'performance' | 'advancedKeys' | 'led' | 'tft' | 'community' | 'settings' | 'profiles' | 'trigger';
65
+ /** 键盘多种颜色列表 */
66
+ export interface keyboardColorList {
67
+ /** 颜色名称 */
68
+ name: string;
69
+ /** 圆点背景颜色值 */
70
+ pointBg: string;
71
+ /** 键盘图片(腾讯桶 keyboards 目录) */
72
+ keyboardImg: string;
73
+ }
74
+ /** 键盘按键显示语言 */
75
+ export type KeyboardLang = 'deText' | 'ptText' | 'jaText' | 'jaTextBr' | 'frText' | 'esText' | 'trText' | 'huText';
76
+ /** 其他配置 */
77
+ export interface otherConfig {
78
+ /** 是否跳转旧版驱动(旧版本打包文件放在目录 hub 下) */
79
+ isJumpOldDrive?: boolean;
80
+ /** 键盘多种颜色列表 */
81
+ keyboardColorList?: keyboardColorList[];
82
+ /** 使用说明文档(腾讯桶 docs 目录) */
83
+ docsLink?: string;
84
+ /** 是否显示自定义图标 */
85
+ isShowCustomIcon?: boolean;
86
+ }
87
+ /** 自定义按键配置 */
88
+ export interface customKeysConfig {
89
+ /** 是否有 FN 层 */
90
+ isShowFn?: boolean;
91
+ /** 是否显示普通层功能按键 */
92
+ isShowNormalFuncKeys?: boolean;
93
+ /** FN 层功能按键值列表 funcChars */
94
+ fnFuncIds?: number[];
95
+ /** FN 层禁用修改按键值 */
96
+ fnDisabledKeyIds?: number[];
97
+ }
98
+ /**
99
+ * 灯光配置接口定义
100
+ */
101
+ export interface lightingConfig {
102
+ /** 灯光最小亮度 默认 1 */
103
+ minBrightness?: number;
104
+ /** 灯光最大亮度 默认 5 */
105
+ maxBrightness?: number;
106
+ /** 灯光最小速度 默认 1 */
107
+ minSpeed?: number;
108
+ /** 灯光最大速度 默认 5 */
109
+ maxSpeed?: number;
110
+ /**
111
+ * 追加灯光效果值列表
112
+ * 0x17 彩虹风车
113
+ * 0x18 七彩聚拢
114
+ * 0x19 霓虹叠影
115
+ * 0xfe 心动时刻
116
+ * */
117
+ customEffect?: number[];
118
+ /** 是否单色灯光键盘 默认 false */
119
+ isSingleColor?: boolean;
120
+ /** 隐藏默认效果值列表 */
121
+ hiddenDefaultEffect?: number[];
122
+ /** 是否显示灯箱灯效 */
123
+ isShowLightBox?: boolean;
124
+ /** 灯箱效果列表 */
125
+ lightBoxList?: number[];
126
+ /** 是否显示灯箱灯效编辑(亮度、速度) */
127
+ isShowLightBoxEdit?: boolean;
128
+ /** 是否显示侧灯灯效 */
129
+ isShowSideLight?: boolean;
130
+ /** 侧灯效果列表 */
131
+ sideLightList?: number[];
132
+ /** 是否显示侧灯灯效编辑(亮度、速度) */
133
+ isShowSideLightEdit?: boolean;
134
+ /** 是否显示gif灯效 默认 false */
135
+ isShowGifEffect?: boolean;
136
+ /**
137
+ * gif灯效列表
138
+ * heartRateCurve_87 87键心率曲线
139
+ * heart_XX XX键爱心,XX值为 66、67、84、85_02(第一列突出两个按键)、87、95、99、99_ansi、100(扩展按键1-4 行)、101、102_iso、104、106、108
140
+ * */
141
+ gifEffectIds?: string[];
142
+ /** 是否开启灯光同步 */
143
+ isEnableLightSync?: boolean;
144
+ }
145
+ /** 音乐律动配置 */
146
+ export interface musicConfig {
147
+ /** 音乐律动版本 */
148
+ version: number;
149
+ /** 是否开启 AI 灯效 */
150
+ isEnableAILighting?: boolean;
151
+ /** 是否开启音乐律动 DIY */
152
+ isEnableMusicDiy?: boolean;
153
+ /** 最大列数偏移值 默认 0 */
154
+ maxColOffset?: number;
155
+ /** 过滤需要展示的音乐律动模式值列表,默认展示所有模式 */
156
+ filterMusicMode?: number[];
157
+ /** 按键偏移配置 */
158
+ keyOffset?: keyOffset[];
159
+ /** 圆环按键坐标配置,使用对应配列,也可以自定义坐标 */
160
+ ringKeyPositions?: 'ring_68' | 'ring_87' | 'ring_108' | keyPosition[][];
161
+ /** 火山按键坐标配置,使用对应配列,也可以自定义左/中/右山坐标 */
162
+ volcanoKeyPositions?: 'volcano_64' | 'volcano_84_iso' | 'volcano_87' | 'volcano_98' | volcanoMountainPositions;
163
+ }
164
+ /** 音乐律动按键坐标 */
165
+ export interface keyPosition {
166
+ row: number;
167
+ col: number;
168
+ }
169
+ /** 火山三座山的按键坐标,每座山从底部到顶部分层,每层可指定任意按键 */
170
+ export interface volcanoMountainPositions {
171
+ left: keyPosition[][];
172
+ middle: keyPosition[][];
173
+ right: keyPosition[][];
174
+ }
175
+ /** 按键偏移配置 */
176
+ export interface keyOffset {
177
+ /** 按键名称 */
178
+ name: string;
179
+ /** 按键值 */
180
+ value: number;
181
+ /** 按键列偏移值 */
182
+ offsetX: number;
183
+ }
184
+ /** 宏配置 */
185
+ export interface macroConfig {
186
+ /** 是否显示 FN 层 */
187
+ isShowFn?: boolean;
188
+ /** 是否获取最大宏空间大小 */
189
+ isGetMaxMacroSpaceSize?: boolean;
190
+ }
191
+ /** 性能配置 */
192
+ export interface performanceConfig {
193
+ /** 触发行程值 */
194
+ triggerTripValue?: number;
195
+ /** 最大触发行程 */
196
+ maxTriggerTrip?: number;
197
+ /** 最小触发行程 */
198
+ minTriggerTrip?: number;
199
+ /** 触发行程步长 */
200
+ triggerTripStep?: number;
201
+ /** 最小灵敏度 默认 0.01 */
202
+ minSensitivity?: number;
203
+ /** 最大灵敏度 默认 3.3 */
204
+ maxSensitivity?: number;
205
+ /** 灵敏度值 */
206
+ sensitivityValue?: number;
207
+ /** 灵敏度步长 */
208
+ sensitivityStep?: number;
209
+ /** 是否可以切换轴体 */
210
+ isSwitchAxis?: boolean;
211
+ /** 默认轴体 */
212
+ defaultAxisValue?: number;
213
+ /** 轴体列表 */
214
+ axisList?: axisItem[];
215
+ /** 是否显示狂暴模式 */
216
+ isShowRampageMode?: boolean;
217
+ /** 模式选择列表,'default' 表示使用默认列表,也可以自定义列表 */
218
+ modeList?: 'default' | modeItem[];
219
+ /** 是否显示死区 */
220
+ isShowDeadZone?: boolean;
221
+ /** 是否开启2.4G校准 */
222
+ isShow24GCalibration?: boolean;
223
+ }
224
+ /** 轴体 */
225
+ export interface axisItem {
226
+ /** 轴体名称 */
227
+ name: string;
228
+ /** 轴体值 */
229
+ value: number;
230
+ /** 轴体信息 */
231
+ axisInfo?: number;
232
+ /** 最小灵敏度 默认 0.01 */
233
+ minSensitivity?: number;
234
+ /** 最大灵敏度 默认 3.3 */
235
+ maxSensitivity?: number;
236
+ /** 灵敏度值 默认取 triggerTripValue 的值 */
237
+ sensitivityValue?: number;
238
+ /** 灵敏度步长 */
239
+ sensitivityStep?: number;
240
+ }
241
+ /** 模式 */
242
+ export interface modeItem {
243
+ /** 模式名称 */
244
+ name: string;
245
+ /** 模式翻译文本 */
246
+ text?: string;
247
+ /** 触发行程值 */
248
+ triggerTripValue?: number;
249
+ /** 按下灵敏度值 */
250
+ downSensitivityValue?: number;
251
+ /** 松开灵敏度值 */
252
+ upSensitivityValue?: number;
253
+ /** 灵敏度步长 */
254
+ sensitivityStep?: number;
255
+ /** 修改按键配置 */
256
+ keys?: keyItem[];
257
+ }
258
+ /** 按键配置 */
259
+ export interface keyItem {
260
+ /** 按键名称 */
261
+ name: string;
262
+ /** 按键值 */
263
+ value: number;
264
+ /** 触发行程值 */
265
+ triggerTripValue?: number;
266
+ /** 按下灵敏度值 */
267
+ downSensitivityValue?: number;
268
+ /** 松开灵敏度值 */
269
+ upSensitivityValue?: number;
270
+ }
271
+ /** 触发设置配置 */
272
+ export interface triggerConfig {
273
+ /** 禁止修改触发设置的按键值列表 */
274
+ disabledKeyIds?: number[];
275
+ }
276
+ /** 高级键配置 */
277
+ export interface advancedKeysConfig {
278
+ /** 高级键功能名称列表 */
279
+ advancedKeysList: advancedKeyName[];
280
+ }
281
+ /** 高级键名称 */
282
+ export type advancedKeyName = 'RS' | 'SOCD' | 'DKS' | 'MT' | 'TGL' | 'CB' | 'END' | 'MPT';
283
+ /** 点阵屏led配置 */
284
+ export interface ledConfig {
285
+ /** 点阵屏行数 */
286
+ rows: number;
287
+ /** 点阵屏列数 */
288
+ cols: number;
289
+ /** 点阵屏 localforage 存储key */
290
+ localforageKey: string;
291
+ /** 是否显示字符模式 */
292
+ isShowCharMode?: boolean;
293
+ /** 是否显示拾音灯模式 */
294
+ isShowVoiceMode?: boolean;
295
+ /** 是否显示时间校准 */
296
+ isShowTimeCalibration?: boolean;
297
+ /** 灯光最大亮度 默认 4 */
298
+ maxBrightness?: number;
299
+ }
300
+ /** TFT 屏幕配置 */
301
+ export interface tftConfig {
302
+ /** 名称(获取默认GIF时使用) */
303
+ name?: string;
304
+ /** TFT 屏幕宽度 */
305
+ width: number;
306
+ /** TFT 屏幕高度 */
307
+ height: number;
308
+ /** localforage 存储key */
309
+ localforageKey: string;
310
+ /** 内置数量 默认 1 */
311
+ builtInCount?: number;
312
+ /** 是否隐藏时间校准 */
313
+ hideScreenTimeCalibration?: boolean;
314
+ /** 是否显示 TFT 屏幕信息(CPU、GPU、天气等) */
315
+ isShowTftInfo?: boolean;
316
+ }
317
+ /** 社区配置 */
318
+ export interface communityConfig {
319
+ /** 社区列表 */
320
+ communityList?: communityItem[];
321
+ /** 使用设备信息(用哪个设备信息请求社区接口,默认使用当前设备信息) */
322
+ communityDeviceInfo?: communityDeviceInfo;
323
+ }
324
+ /** 社区列表 */
325
+ export type communityItem = 'led' | 'tft' | 'gif' | 'profile';
326
+ /** 使用设备信息 */
327
+ export interface communityDeviceInfo {
328
+ /** 使用设备产品ID */
329
+ deviceProductId: number;
330
+ /** 使用设备名称 */
331
+ deviceName: string;
332
+ }
333
+ /** 设置配置 */
334
+ export interface settingsConfig {
335
+ /** 是否显示休眠模式 */
336
+ isShowSleepMode?: boolean;
337
+ /** 是否显示 tft 屏幕时间制式 */
338
+ isShowTftTimeMode?: boolean;
339
+ /** 是否显示按键响应时间 */
340
+ isShowKeyDelay?: boolean;
341
+ /** 是否显示单键唤醒 */
342
+ isShowSingleKeyWakeup?: boolean;
343
+ /** 是否显示稳定模式 */
344
+ isShowStabilityMode?: boolean;
345
+ /** 是否显示自动校准 */
346
+ isShowAutoCalibration?: boolean;
347
+ /** 是否显示回报率 */
348
+ isShowReportRate?: boolean;
349
+ /** 回报率列表 */
350
+ reportRateList?: number[];
351
+ /** 帮助链接 */
352
+ helpLink?: string;
353
+ /** 是否显示摇杆模式 */
354
+ isShowPushButtonMode?: boolean;
355
+ /** 各键盘模式的续航时间配置,按数组顺序展示 */
356
+ enduranceConfig?: enduranceModeItem[];
357
+ }
358
+ /** 单档回报率的续航配置 */
359
+ export interface enduranceReportRateItem {
360
+ /** 回报率 Hz,如 1000、8000 */
361
+ reportRate: number;
362
+ /** 最小续航小时 */
363
+ min: number;
364
+ /** 最大续航小时 */
365
+ max: number;
366
+ }
367
+ /** 单个键盘模式的续航配置 */
368
+ export interface enduranceModeItem {
369
+ /** 模式名称 */
370
+ name: string;
371
+ /** 模式值 */
372
+ value: number;
373
+ /** 模式翻译文本 */
374
+ text?: string;
375
+ /** 各回报率续航时间,按数组顺序展示 */
376
+ reportRateList: enduranceReportRateItem[];
377
+ }
378
+ /**
379
+ * 按键页面类型枚举的键名类型
380
+ */
381
+ export type KeyPageTypeName = 'DEFAULT' | 'MOUSE' | 'KEYBOARD' | 'CONSUMER_KEY' | 'SYSTEM_KEY' | 'EXTRA_FUNCTION' | 'MACRO' | 'CB' | 'DKS' | 'MT' | 'TGL' | 'SOCD' | 'RS' | 'FUNC' | 'FUNC_V2' | 'END' | 'MPT';
382
+ /**
383
+ * 字符配置接口定义
384
+ * 用于定义键盘按键的字符映射和功能配置
385
+ */
386
+ export interface Character {
387
+ /** 字符名称 */
388
+ name: string;
389
+ /** 字符值 */
390
+ value?: number;
391
+ /** 键盘键值 */
392
+ key?: number;
393
+ /** 字符翻译文本,用于国际化显示 */
394
+ text?: string;
395
+ /** 德语翻译文本 */
396
+ deText?: string;
397
+ /** 葡萄牙语翻译文本 */
398
+ ptText?: string;
399
+ /** 日语翻译文本 */
400
+ jaText?: string;
401
+ /** 日语键帽双行显示文本,使用 \n 换行 */
402
+ jaTextBr?: string;
403
+ /** 法语翻译文本 */
404
+ frText?: string;
405
+ /** 西班牙语翻译文本 */
406
+ esText?: string;
407
+ /** 土耳其翻译语言 */
408
+ trText?: string;
409
+ /** 匈牙利语翻译文本 */
410
+ huText?: string;
411
+ /** 用户自定义按键配置页分类,指定字符所属的功能页面类型 */
412
+ page?: KeyPageTypeName;
413
+ /** 用户自定义按键配置参数1 */
414
+ param1?: number;
415
+ /** 用户自定义按键配置参数2 */
416
+ param2?: number;
417
+ /** 用户自定义按键配置参数3 */
418
+ param3?: number;
419
+ /** 按键类型(短按:1,长按:2) */
420
+ keyType?: 1 | 2;
421
+ }
422
+ /**
423
+ * 键盘按键配置接口定义
424
+ * 用于定义键盘上每个物理按键的属性和行为
425
+ */
426
+ export interface KeyboardKey {
427
+ /** CSS 类名,用于按键的样式定制 */
428
+ className: string;
429
+ /** 按键值,按键的唯一标识数值 */
430
+ value: number;
431
+ /** 按键名称 */
432
+ name: string;
433
+ /** 字符翻译文本,用于国际化显示 */
434
+ text?: string;
435
+ /** 按键标识,对应 DOM 事件中的 key 值 */
436
+ key: string;
437
+ /** 按键码 */
438
+ keyCode: number;
439
+ /** 用户自定义按键配置,可选的字符映射 */
440
+ userKey?: Character;
441
+ /** 按键背景颜色 */
442
+ bgColor?: string;
443
+ /** 按键禁止点击修改(通常是FN层按键) */
444
+ disabled?: boolean;
445
+ /** 灯光禁用,为 true 时灯光相关功能跳过不渲染 */
446
+ disabledLight?: boolean;
447
+ /** 高级键禁用,为 true 时不能修改高级键(参考 FN 键禁用逻辑) */
448
+ disabledAdvanced?: boolean;
449
+ /** 按键图标 */
450
+ icon?: string;
451
+ /** 行程校准高度 */
452
+ calibrationHeight?: number;
453
+ }
454
+ export type KeyboardRow = KeyboardKey[];
455
+ export type KeyboardList = KeyboardRow[];
456
+ /** 滚轮按键配置 */
457
+ export interface wheelKey {
458
+ /** 旋钮组ID(可选,默认为1保持向后兼容) */
459
+ wheelId?: number;
460
+ /** 类名 */
461
+ className?: string;
462
+ /** 滚轮按键值 */
463
+ value: number;
464
+ /** 滚轮按键名称 */
465
+ name: string;
466
+ /** 滚轮按键翻译文本 */
467
+ text?: string;
468
+ /** 动作类型 (right: 右旋转,center: 按下,left: 左旋转) */
469
+ action: 'right' | 'center' | 'left';
470
+ /** 用户自定义按键配置 */
471
+ userKey?: Character;
472
+ /** 是否禁用 */
473
+ disabled?: boolean;
474
+ }
@@ -1,24 +1,10 @@
1
+ import { KeyboardConfig, KeyboardKey, KeyboardList, KeyboardRow, keyOffset, keyPosition, volcanoMountainPositions, ConnectType, musicConfig } from './keyboard-config';
1
2
  export interface RgbColor {
2
3
  r: number;
3
4
  g: number;
4
5
  b: number;
5
6
  }
6
- export interface KeyOffset {
7
- value: number;
8
- offsetX: number;
9
- }
10
- export interface KeyboardKeyMeta {
11
- value: number;
12
- keyCode: number;
13
- name?: string;
14
- }
15
- export interface KeyboardSyncConfig {
16
- keys: KeyboardKeyMeta[][];
17
- musicConfig?: {
18
- keyOffset?: KeyOffset[];
19
- maxColOffset?: number;
20
- };
21
- }
7
+ export type { KeyboardConfig, KeyboardKey, KeyboardList, KeyboardRow, keyOffset, keyPosition, volcanoMountainPositions, ConnectType, musicConfig, };
22
8
  export interface KeyboardLayoutState {
23
9
  x: number;
24
10
  y: number;
@@ -82,7 +68,7 @@ export interface AiLightingInitOptions {
82
68
  importedPresets?: AiLightingPreset[];
83
69
  selectedPresetId?: string;
84
70
  defaultParams?: Partial<Record<string, AiLightingPresetParamValue>>;
85
- keyboardConfig: KeyboardSyncConfig;
71
+ keyboardConfig: KeyboardConfig;
86
72
  device: HFDSDKDevice;
87
73
  isUSBDevice?: boolean;
88
74
  lightingVersion?: number;