Added support for Streamdeck Pedal and updated UI to better fit the Packed UI style

This commit is contained in:
2026-02-27 22:47:08 +01:00
committed by erik
parent 5a70f775f1
commit 93faae5cc8
1463 changed files with 306917 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
import type { HIDDevice } from '../hid-device.js';
import type { OpenStreamDeckOptions } from './base.js';
import { StreamDeckBase } from './base.js';
import { type DeviceModelId } from '../id.js';
import type { PropertiesService } from '../services/properties/interface.js';
export declare function StreamDeck15KeyFactory(model: DeviceModelId, device: HIDDevice, options: Required<OpenStreamDeckOptions>, _tcpPropertiesService?: PropertiesService): StreamDeckBase;
//# sourceMappingURL=15-key.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"15-key.d.ts","sourceRoot":"","sources":["../../src/models/15-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAG1C,OAAO,EAAE,KAAK,aAAa,EAAe,MAAM,UAAU,CAAA;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAe5E,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,QAAQ,CAAC,qBAAqB,CAAC,EACxC,qBAAqB,CAAC,EAAE,iBAAiB,GACvC,cAAc,CAUhB"}

View File

@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StreamDeck15KeyFactory = StreamDeck15KeyFactory;
const base_js_1 = require("./base.js");
const generic_gen2_js_1 = require("./generic-gen2.js");
const id_js_1 = require("../id.js");
const controlsGenerator_js_1 = require("../controlsGenerator.js");
const base15KeyProperties = {
SUPPORTS_RGB_KEY_FILL: false, // TODO - verify SUPPORTS_RGB_KEY_FILL
CONTROLS: (0, controlsGenerator_js_1.freezeDefinitions)((0, controlsGenerator_js_1.generateButtonsGrid)(5, 3, { width: 72, height: 72 })),
KEY_SPACING_HORIZONTAL: 25,
KEY_SPACING_VERTICAL: 25,
FULLSCREEN_PANELS: 0,
HAS_NFC_READER: false,
SUPPORTS_CHILD_DEVICES: false,
};
function StreamDeck15KeyFactory(model, device, options, _tcpPropertiesService) {
const properties = {
...base15KeyProperties,
MODEL: model,
PRODUCT_NAME: id_js_1.MODEL_NAMES[model],
};
const services = (0, generic_gen2_js_1.createBaseGen2Properties)(device, options, properties, null);
return new base_js_1.StreamDeckBase(device, options, services);
}
//# sourceMappingURL=15-key.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"15-key.js","sourceRoot":"","sources":["../../src/models/15-key.ts"],"names":[],"mappings":";;AAsBA,wDAeC;AAnCD,uCAA0C;AAE1C,uDAA4D;AAC5D,oCAA0D;AAC1D,kEAAgF;AAGhF,MAAM,mBAAmB,GAA6D;IACrF,qBAAqB,EAAE,KAAK,EAAE,sCAAsC;IAEpE,QAAQ,EAAE,IAAA,wCAAiB,EAAC,IAAA,0CAAmB,EAAC,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;IAEjF,sBAAsB,EAAE,EAAE;IAC1B,oBAAoB,EAAE,EAAE;IAExB,iBAAiB,EAAE,CAAC;IACpB,cAAc,EAAE,KAAK;IACrB,sBAAsB,EAAE,KAAK;CAC7B,CAAA;AAED,SAAgB,sBAAsB,CACrC,KAAoB,EACpB,MAAiB,EACjB,OAAwC,EACxC,qBAAyC;IAEzC,MAAM,UAAU,GAA6B;QAC5C,GAAG,mBAAmB;QACtB,KAAK,EAAE,KAAK;QACZ,YAAY,EAAE,mBAAW,CAAC,KAAK,CAAC;KAChC,CAAA;IAED,MAAM,QAAQ,GAAG,IAAA,0CAAwB,EAAC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,CAAC,CAAA;IAE5E,OAAO,IAAI,wBAAc,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAA;AACrD,CAAC"}

View File

@@ -0,0 +1,7 @@
import type { HIDDevice } from '../hid-device.js';
import type { OpenStreamDeckOptions } from './base.js';
import { StreamDeckBase } from './base.js';
import { type DeviceModelId } from '../id.js';
import type { PropertiesService } from '../services/properties/interface.js';
export declare function StreamDeck32KeyFactory(model: DeviceModelId, device: HIDDevice, options: Required<OpenStreamDeckOptions>, _tcpPropertiesService?: PropertiesService): StreamDeckBase;
//# sourceMappingURL=32-key.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"32-key.d.ts","sourceRoot":"","sources":["../../src/models/32-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAG1C,OAAO,EAAE,KAAK,aAAa,EAAe,MAAM,UAAU,CAAA;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAe5E,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,QAAQ,CAAC,qBAAqB,CAAC,EACxC,qBAAqB,CAAC,EAAE,iBAAiB,GACvC,cAAc,CAShB"}

View File

@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StreamDeck32KeyFactory = StreamDeck32KeyFactory;
const base_js_1 = require("./base.js");
const generic_gen2_js_1 = require("./generic-gen2.js");
const id_js_1 = require("../id.js");
const controlsGenerator_js_1 = require("../controlsGenerator.js");
const base32KeyProperties = {
SUPPORTS_RGB_KEY_FILL: false, // rev2 doesn't support it, even though rev1 does
CONTROLS: (0, controlsGenerator_js_1.freezeDefinitions)((0, controlsGenerator_js_1.generateButtonsGrid)(8, 4, { width: 96, height: 96 })),
KEY_SPACING_HORIZONTAL: 32,
KEY_SPACING_VERTICAL: 39,
FULLSCREEN_PANELS: 0,
HAS_NFC_READER: false,
SUPPORTS_CHILD_DEVICES: false,
};
function StreamDeck32KeyFactory(model, device, options, _tcpPropertiesService) {
const properties = {
...base32KeyProperties,
MODEL: model,
PRODUCT_NAME: id_js_1.MODEL_NAMES[model],
};
const services = (0, generic_gen2_js_1.createBaseGen2Properties)(device, options, properties, null);
return new base_js_1.StreamDeckBase(device, options, services);
}
//# sourceMappingURL=32-key.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"32-key.js","sourceRoot":"","sources":["../../src/models/32-key.ts"],"names":[],"mappings":";;AAsBA,wDAcC;AAlCD,uCAA0C;AAE1C,uDAA4D;AAC5D,oCAA0D;AAC1D,kEAAgF;AAGhF,MAAM,mBAAmB,GAA6D;IACrF,qBAAqB,EAAE,KAAK,EAAE,iDAAiD;IAE/E,QAAQ,EAAE,IAAA,wCAAiB,EAAC,IAAA,0CAAmB,EAAC,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;IAEjF,sBAAsB,EAAE,EAAE;IAC1B,oBAAoB,EAAE,EAAE;IAExB,iBAAiB,EAAE,CAAC;IACpB,cAAc,EAAE,KAAK;IACrB,sBAAsB,EAAE,KAAK;CAC7B,CAAA;AAED,SAAgB,sBAAsB,CACrC,KAAoB,EACpB,MAAiB,EACjB,OAAwC,EACxC,qBAAyC;IAEzC,MAAM,UAAU,GAA6B;QAC5C,GAAG,mBAAmB;QACtB,KAAK,EAAE,KAAK;QACZ,YAAY,EAAE,mBAAW,CAAC,KAAK,CAAC;KAChC,CAAA;IACD,MAAM,QAAQ,GAAG,IAAA,0CAAwB,EAAC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,CAAC,CAAA;IAE5E,OAAO,IAAI,wBAAc,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAA;AACrD,CAAC"}

View File

@@ -0,0 +1,6 @@
import type { HIDDevice } from '../hid-device.js';
import type { OpenStreamDeckOptions, StreamDeckBase } from './base.js';
import { type DeviceModelId } from '../id.js';
import type { PropertiesService } from '../services/properties/interface.js';
export declare function StreamDeck6KeyFactory(model: DeviceModelId, device: HIDDevice, options: Required<OpenStreamDeckOptions>, _tcpPropertiesService?: PropertiesService): StreamDeckBase;
//# sourceMappingURL=6-key.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"6-key.d.ts","sourceRoot":"","sources":["../../src/models/6-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAGtE,OAAO,EAAE,KAAK,aAAa,EAAe,MAAM,UAAU,CAAA;AAI1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAa5E,wBAAgB,qBAAqB,CACpC,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,QAAQ,CAAC,qBAAqB,CAAC,EACxC,qBAAqB,CAAC,EAAE,iBAAiB,GACvC,cAAc,CAehB"}

View File

@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StreamDeck6KeyFactory = StreamDeck6KeyFactory;
const generic_gen1_js_1 = require("./generic-gen1.js");
const id_js_1 = require("../id.js");
const controlsGenerator_js_1 = require("../controlsGenerator.js");
const imageWriter_js_1 = require("../services/imageWriter/imageWriter.js");
const headerGenerator_js_1 = require("../services/imageWriter/headerGenerator.js");
const base6KeyProperties = {
SUPPORTS_RGB_KEY_FILL: false, // TODO - verify this
CONTROLS: (0, controlsGenerator_js_1.freezeDefinitions)((0, controlsGenerator_js_1.generateButtonsGrid)(3, 2, { width: 80, height: 80 })),
KEY_SPACING_HORIZONTAL: 28,
KEY_SPACING_VERTICAL: 28,
FULLSCREEN_PANELS: 0,
};
function StreamDeck6KeyFactory(model, device, options, _tcpPropertiesService) {
const properties = {
...base6KeyProperties,
MODEL: model,
PRODUCT_NAME: id_js_1.MODEL_NAMES[model],
};
return (0, generic_gen1_js_1.StreamDeckGen1Factory)(device, options, properties, new imageWriter_js_1.StreamdeckDefaultImageWriter(new headerGenerator_js_1.StreamdeckGen1ImageHeaderGenerator()), { colorMode: 'bgr', rotate: true, yFlip: true }, 2835);
}
//# sourceMappingURL=6-key.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"6-key.js","sourceRoot":"","sources":["../../src/models/6-key.ts"],"names":[],"mappings":";;AAqBA,sDAoBC;AAtCD,uDAAyD;AACzD,oCAA0D;AAC1D,kEAAgF;AAChF,2EAAqF;AACrF,mFAA+F;AAG/F,MAAM,kBAAkB,GAA6D;IACpF,qBAAqB,EAAE,KAAK,EAAE,qBAAqB;IAEnD,QAAQ,EAAE,IAAA,wCAAiB,EAAC,IAAA,0CAAmB,EAAC,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;IAEjF,sBAAsB,EAAE,EAAE;IAC1B,oBAAoB,EAAE,EAAE;IAExB,iBAAiB,EAAE,CAAC;CACpB,CAAA;AAED,SAAgB,qBAAqB,CACpC,KAAoB,EACpB,MAAiB,EACjB,OAAwC,EACxC,qBAAyC;IAEzC,MAAM,UAAU,GAA6B;QAC5C,GAAG,kBAAkB;QACrB,KAAK,EAAE,KAAK;QACZ,YAAY,EAAE,mBAAW,CAAC,KAAK,CAAC;KAChC,CAAA;IAED,OAAO,IAAA,uCAAqB,EAC3B,MAAM,EACN,OAAO,EACP,UAAU,EACV,IAAI,6CAA4B,CAAC,IAAI,uDAAkC,EAAE,CAAC,EAC1E,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAC/C,IAAI,CACJ,CAAA;AACF,CAAC"}

View File

@@ -0,0 +1,82 @@
import { EventEmitter } from 'eventemitter3';
import type { HIDDevice, HIDDeviceInfo } from '../hid-device.js';
import type { DeviceModelId, Dimension, KeyIndex } from '../id.js';
import type { FillImageOptions, FillPanelDimensionsOptions, FillPanelOptions, StreamDeck, StreamDeckEvents, StreamDeckTcpChildDeviceInfo } from '../types.js';
import type { ButtonsLcdDisplayService } from '../services/buttonsLcdDisplay/interface.js';
import type { StreamDeckButtonControlDefinition, StreamDeckControlDefinition } from '../controlDefinition.js';
import type { LcdSegmentDisplayService } from '../services/lcdSegmentDisplay/interface.js';
import type { PropertiesService } from '../services/properties/interface.js';
import type { CallbackHook } from '../services/callback-hook.js';
import type { StreamDeckInputService } from '../services/input/interface.js';
import type { EncoderLedService } from '../services/encoderLed/interface.js';
import { type PreparedBuffer } from '../preparedBuffer.js';
export type EncodeJPEGHelper = (buffer: Uint8Array, width: number, height: number) => Promise<Uint8Array>;
export interface OpenStreamDeckOptions {
encodeJPEG?: EncodeJPEGHelper;
}
export type StreamDeckProperties = Readonly<{
MODEL: DeviceModelId;
PRODUCT_NAME: string;
KEY_DATA_OFFSET: number;
SUPPORTS_RGB_KEY_FILL: boolean;
CONTROLS: Readonly<StreamDeckControlDefinition[]>;
/**
* TODO - rework this
* @deprecated
*/
KEY_SPACING_HORIZONTAL: number;
/**
* TODO - rework this
* @deprecated
*/
KEY_SPACING_VERTICAL: number;
FULLSCREEN_PANELS: number;
HAS_NFC_READER: boolean;
/** Whether this device supports child devices */
SUPPORTS_CHILD_DEVICES: boolean;
}>;
export interface StreamDeckServicesDefinition {
deviceProperties: StreamDeckProperties;
events: CallbackHook<StreamDeckEvents>;
properties: PropertiesService;
buttonsLcd: ButtonsLcdDisplayService;
inputService: StreamDeckInputService;
lcdSegmentDisplay: LcdSegmentDisplayService | null;
encoderLed: EncoderLedService | null;
}
export declare class StreamDeckBase extends EventEmitter<StreamDeckEvents> implements StreamDeck {
#private;
get CONTROLS(): Readonly<StreamDeckControlDefinition[]>;
get MODEL(): DeviceModelId;
get PRODUCT_NAME(): string;
get HAS_NFC_READER(): boolean;
protected readonly device: HIDDevice;
protected readonly deviceProperties: Readonly<StreamDeckProperties>;
constructor(device: HIDDevice, _options: Readonly<Required<OpenStreamDeckOptions>>, services: StreamDeckServicesDefinition);
protected checkValidKeyIndex(keyIndex: KeyIndex, feedbackType: StreamDeckButtonControlDefinition['feedbackType'] | null): void;
calculateFillPanelDimensions(options?: FillPanelDimensionsOptions): Dimension | null;
close(): Promise<void>;
getHidDeviceInfo(): Promise<HIDDeviceInfo>;
setBrightness(percentage: number): Promise<void>;
resetToLogo(): Promise<void>;
getFirmwareVersion(): Promise<string>;
getAllFirmwareVersions(): Promise<Record<string, string>>;
getSerialNumber(): Promise<string>;
sendPreparedBuffer(buffer: PreparedBuffer): Promise<void>;
fillKeyColor(keyIndex: KeyIndex, r: number, g: number, b: number): Promise<void>;
fillKeyBuffer(keyIndex: KeyIndex, imageBuffer: Uint8Array, options?: FillImageOptions): Promise<void>;
prepareFillKeyBuffer(keyIndex: KeyIndex, imageBuffer: Uint8Array | Uint8ClampedArray, options?: FillImageOptions, jsonSafe?: boolean): Promise<PreparedBuffer>;
fillPanelBuffer(imageBuffer: Uint8Array, options?: FillPanelOptions): Promise<void>;
prepareFillPanelBuffer(imageBuffer: Uint8Array | Uint8ClampedArray, options?: FillPanelOptions, jsonSafe?: boolean): Promise<PreparedBuffer>;
clearKey(keyIndex: KeyIndex): Promise<void>;
clearPanel(): Promise<void>;
fillLcd(...args: Parameters<StreamDeck['fillLcd']>): ReturnType<StreamDeck['fillLcd']>;
fillLcdRegion(...args: Parameters<StreamDeck['fillLcdRegion']>): ReturnType<StreamDeck['fillLcdRegion']>;
prepareFillLcdRegion(...args: Parameters<StreamDeck['prepareFillLcdRegion']>): ReturnType<StreamDeck['prepareFillLcdRegion']>;
clearLcdSegment(...args: Parameters<StreamDeck['clearLcdSegment']>): ReturnType<StreamDeck['clearLcdSegment']>;
setEncoderColor(...args: Parameters<StreamDeck['setEncoderColor']>): ReturnType<StreamDeck['setEncoderColor']>;
setEncoderRingSingleColor(...args: Parameters<StreamDeck['setEncoderRingSingleColor']>): ReturnType<StreamDeck['setEncoderRingSingleColor']>;
setEncoderRingColors(...args: Parameters<StreamDeck['setEncoderRingColors']>): ReturnType<StreamDeck['setEncoderRingColors']>;
getChildDeviceInfo(): Promise<StreamDeckTcpChildDeviceInfo | null>;
}
//# sourceMappingURL=base.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/models/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAClE,OAAO,KAAK,EACX,gBAAgB,EAChB,0BAA0B,EAC1B,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,4BAA4B,EAC5B,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAA;AAC1F,OAAO,KAAK,EAAE,iCAAiC,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAA;AAC7G,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAA;AAC1F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAE5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAC5E,OAAO,EAAgC,KAAK,cAAc,EAAE,MAA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2BAA2B,CAAC,CAAC;IAKzC,oBAAoB,CAChC,GAAG,IAAI,EAAE,UAAU,CAAC,UAAU,CAAC,sBAAsB,CAAC,CAAC,GACrD,UAAU,CAAC,UAAU,CAAC,sBAAsB,CAAC,CAAC;IAMpC,kBAAkB,IAAI,OAAO,CAAC,4BAA4B,GAAG,IAAI,CAAC;CAY/E"}

View File

@@ -0,0 +1,167 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StreamDeckBase = void 0;
const eventemitter3_1 = require("eventemitter3");
const index_js_1 = require("../index.js");
const preparedBuffer_js_1 = require("../preparedBuffer.js");
class StreamDeckBase extends eventemitter3_1.EventEmitter {
get CONTROLS() {
return this.deviceProperties.CONTROLS;
}
// get KEY_SPACING_HORIZONTAL(): number {
// return this.deviceProperties.KEY_SPACING_HORIZONTAL
// }
// get KEY_SPACING_VERTICAL(): number {
// return this.deviceProperties.KEY_SPACING_VERTICAL
// }
get MODEL() {
return this.deviceProperties.MODEL;
}
get PRODUCT_NAME() {
return this.deviceProperties.PRODUCT_NAME;
}
get HAS_NFC_READER() {
return this.deviceProperties.HAS_NFC_READER;
}
device;
deviceProperties;
// readonly #options: Readonly<Required<OpenStreamDeckOptions>>
#propertiesService;
#buttonsLcdService;
#lcdSegmentDisplayService;
#inputService;
#encoderLedService;
constructor(device, _options, services) {
super();
this.device = device;
this.deviceProperties = services.deviceProperties;
// this.#options = options
this.#propertiesService = services.properties;
this.#buttonsLcdService = services.buttonsLcd;
this.#lcdSegmentDisplayService = services.lcdSegmentDisplay;
this.#inputService = services.inputService;
this.#encoderLedService = services.encoderLed;
// propogate events
services.events?.listen((key, ...args) => this.emit(key, ...args));
this.device.on('input', (data) => this.#inputService.handleInput(data));
this.device.on('error', (err) => {
this.emit('error', err);
});
}
checkValidKeyIndex(keyIndex, feedbackType) {
const buttonControl = this.deviceProperties.CONTROLS.find((control) => control.type === 'button' && control.index === keyIndex);
if (!buttonControl) {
throw new TypeError(`Expected a valid keyIndex`);
}
if (feedbackType && buttonControl.feedbackType !== feedbackType) {
throw new TypeError(`Expected a keyIndex with expected feedbackType`);
}
}
calculateFillPanelDimensions(options) {
return this.#buttonsLcdService.calculateFillPanelDimensions(options);
}
async close() {
return this.device.close();
}
async getHidDeviceInfo() {
return this.device.getDeviceInfo();
}
async setBrightness(percentage) {
return this.#propertiesService.setBrightness(percentage);
}
async resetToLogo() {
return this.#propertiesService.resetToLogo();
}
async getFirmwareVersion() {
return this.#propertiesService.getFirmwareVersion();
}
async getAllFirmwareVersions() {
return this.#propertiesService.getAllFirmwareVersions();
}
async getSerialNumber() {
return this.#propertiesService.getSerialNumber();
}
async sendPreparedBuffer(buffer) {
const packets = (0, preparedBuffer_js_1.unwrapPreparedBufferToBuffer)(this.deviceProperties.MODEL, buffer);
await this.device.sendReports(packets);
}
async fillKeyColor(keyIndex, r, g, b) {
this.checkValidKeyIndex(keyIndex, null);
await this.#buttonsLcdService.fillKeyColor(keyIndex, r, g, b);
}
async fillKeyBuffer(keyIndex, imageBuffer, options) {
this.checkValidKeyIndex(keyIndex, 'lcd');
await this.#buttonsLcdService.fillKeyBuffer(keyIndex, imageBuffer, options);
}
async prepareFillKeyBuffer(keyIndex, imageBuffer, options, jsonSafe) {
return this.#buttonsLcdService.prepareFillKeyBuffer(keyIndex, imageBuffer, options, jsonSafe);
}
async fillPanelBuffer(imageBuffer, options) {
await this.#buttonsLcdService.fillPanelBuffer(imageBuffer, options);
}
async prepareFillPanelBuffer(imageBuffer, options, jsonSafe) {
return this.#buttonsLcdService.prepareFillPanelBuffer(imageBuffer, options, jsonSafe);
}
async clearKey(keyIndex) {
this.checkValidKeyIndex(keyIndex, null);
await this.#buttonsLcdService.clearKey(keyIndex);
}
async clearPanel() {
const ps = [];
ps.push(this.#buttonsLcdService.clearPanel());
if (this.#lcdSegmentDisplayService)
ps.push(this.#lcdSegmentDisplayService.clearAllLcdSegments());
if (this.#encoderLedService)
ps.push(this.#encoderLedService.clearAll());
await Promise.all(ps);
}
async fillLcd(...args) {
if (!this.#lcdSegmentDisplayService)
throw new Error('Not supported for this model');
return this.#lcdSegmentDisplayService.fillLcd(...args);
}
async fillLcdRegion(...args) {
if (!this.#lcdSegmentDisplayService)
throw new Error('Not supported for this model');
return this.#lcdSegmentDisplayService.fillLcdRegion(...args);
}
async prepareFillLcdRegion(...args) {
if (!this.#lcdSegmentDisplayService)
throw new Error('Not supported for this model');
return this.#lcdSegmentDisplayService.prepareFillLcdRegion(...args);
}
async clearLcdSegment(...args) {
if (!this.#lcdSegmentDisplayService)
throw new Error('Not supported for this model');
return this.#lcdSegmentDisplayService.clearLcdSegment(...args);
}
async setEncoderColor(...args) {
if (!this.#encoderLedService)
throw new Error('Not supported for this model');
return this.#encoderLedService.setEncoderColor(...args);
}
async setEncoderRingSingleColor(...args) {
if (!this.#encoderLedService)
throw new Error('Not supported for this model');
return this.#encoderLedService.setEncoderRingSingleColor(...args);
}
async setEncoderRingColors(...args) {
if (!this.#encoderLedService)
throw new Error('Not supported for this model');
return this.#encoderLedService.setEncoderRingColors(...args);
}
async getChildDeviceInfo() {
const info = await this.device.getChildDeviceInfo();
if (!info)
return null;
const model = index_js_1.DEVICE_MODELS.find((m) => m.productIds.includes(info.productId) && m.vendorId === info.vendorId);
if (!model)
return null;
return {
...info,
model: model.id,
};
}
}
exports.StreamDeckBase = StreamDeckBase;
//# sourceMappingURL=base.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
import type { HIDDevice } from '../hid-device.js';
import type { OpenStreamDeckOptions } from './base.js';
import { StreamDeckBase } from './base.js';
import type { PropertiesService } from '../services/properties/interface.js';
export declare function GalleonK100Factory(device: HIDDevice, options: Required<OpenStreamDeckOptions>, _tcpPropertiesService?: PropertiesService): Promise<StreamDeckBase>;
//# sourceMappingURL=galleon-k100.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"galleon-k100.d.ts","sourceRoot":"","sources":["../../src/models/galleon-k100.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAgC,MAAM,WAAW,CAAA;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAK1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAiE5E,wBAAsB,kBAAkB,CACvC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,QAAQ,CAAC,qBAAqB,CAAC,EACxC,qBAAqB,CAAC,EAAE,iBAAiB,GACvC,OAAO,CAAC,cAAc,CAAC,CAWzB"}

View File

@@ -0,0 +1,88 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GalleonK100Factory = GalleonK100Factory;
const base_js_1 = require("./base.js");
const generic_gen2_js_1 = require("./generic-gen2.js");
const id_js_1 = require("../id.js");
const controlsGenerator_js_1 = require("../controlsGenerator.js");
const galleonK100_js_1 = require("../services/encoderLed/galleonK100.js");
const generic_js_1 = require("../services/lcdSegmentDisplay/generic.js");
const k100Controls = (0, controlsGenerator_js_1.generateButtonsGrid)(3, 4, { width: 160, height: 160 }, false, 0, 2);
k100Controls.push({
type: 'encoder',
row: 0,
column: 0,
index: 0,
hidIndex: 0,
hasLed: false,
ledRingSteps: 4,
lcdRingOffset: 3,
}, {
type: 'encoder',
row: 0,
column: 2,
index: 1,
hidIndex: 1,
hasLed: false,
ledRingSteps: 4,
lcdRingOffset: 1,
}, {
type: 'lcd-segment',
row: 1,
column: 0,
columnSpan: 3,
rowSpan: 1,
id: 0,
pixelSize: Object.freeze({
width: 720,
height: 384,
}),
drawRegions: true,
});
const galleonK100Properties = {
MODEL: id_js_1.DeviceModelId.GALLEON_K100,
PRODUCT_NAME: id_js_1.MODEL_NAMES[id_js_1.DeviceModelId.GALLEON_K100],
SUPPORTS_RGB_KEY_FILL: true,
CONTROLS: (0, controlsGenerator_js_1.freezeDefinitions)(k100Controls),
KEY_SPACING_HORIZONTAL: 64,
KEY_SPACING_VERTICAL: 64,
FULLSCREEN_PANELS: 0,
HAS_NFC_READER: false,
SUPPORTS_CHILD_DEVICES: false,
};
const lcdSegmentControls = galleonK100Properties.CONTROLS.filter((control) => control.type === 'lcd-segment');
async function GalleonK100Factory(device, options, _tcpPropertiesService) {
const services = (0, generic_gen2_js_1.createBaseGen2Properties)(device, options, galleonK100Properties, null, true);
services.encoderLed = new galleonK100_js_1.GalleonK100EncoderLedService(device, galleonK100Properties.CONTROLS);
services.lcdSegmentDisplay = new generic_js_1.StreamdeckDefaultLcdService(options.encodeJPEG, device, lcdSegmentControls);
const streamDeck = new GalleonK100StreamDeck(device, options, services);
// Wait for the device to be ready
await new Promise((resolve) => setTimeout(resolve, 200));
return streamDeck;
}
class GalleonK100StreamDeck extends base_js_1.StreamDeckBase {
#pingInterval;
constructor(device, options, services) {
super(device, options, services);
// Stop the ping upon error
device.on('error', () => this.#stopPing());
this.#pingInterval = setInterval(this.#sendPing, 500);
this.#sendPing();
}
async close() {
this.#stopPing();
return super.close();
}
#sendPing = () => {
this.device.sendFeatureReport(new Uint8Array([0x03, 0x27])).catch((e) => {
// Emit as an error on the streamdeck
this.emit('error', e);
this.#stopPing();
});
};
#stopPing() {
// Stop pinging
clearInterval(this.#pingInterval);
}
}
//# sourceMappingURL=galleon-k100.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"galleon-k100.js","sourceRoot":"","sources":["../../src/models/galleon-k100.ts"],"names":[],"mappings":";;AAwEA,gDAeC;AArFD,uCAA0C;AAE1C,uDAA4D;AAC5D,oCAAqD;AACrD,kEAAgF;AAGhF,0EAAoF;AACpF,yEAAsF;AAEtF,MAAM,YAAY,GAAkC,IAAA,0CAAmB,EAAC,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;AACvH,YAAY,CAAC,IAAI,CAChB;IACC,IAAI,EAAE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C,CAAC,EAAE,EAAE;YACvE,qCAAqC;YACrC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;YACrB,IAAI,CAAC,SAAS,EAAE,CAAA;QACjB,CAAC,CAAC,CAAA;IACH,CAAC,CAAA;IAED,SAAS;QACR,eAAe;QACf,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;IAClC,CAAC;CACD"}

View File

@@ -0,0 +1,8 @@
import type { HIDDevice } from '../hid-device.js';
import type { OpenStreamDeckOptions, StreamDeckProperties } from './base.js';
import { StreamDeckBase } from './base.js';
import type { StreamdeckImageWriter } from '../services/imageWriter/types.js';
import type { FillImageTargetOptions } from '../util.js';
export type StreamDeckGen1Properties = Omit<StreamDeckProperties, 'KEY_DATA_OFFSET' | 'HAS_NFC_READER' | 'SUPPORTS_CHILD_DEVICES'>;
export declare function StreamDeckGen1Factory(device: HIDDevice, options: Required<OpenStreamDeckOptions>, properties: StreamDeckGen1Properties, imageWriter: StreamdeckImageWriter, targetOptions: FillImageTargetOptions, bmpImagePPM: number): StreamDeckBase;
//# sourceMappingURL=generic-gen1.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"generic-gen1.d.ts","sourceRoot":"","sources":["../../src/models/generic-gen1.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AAC7E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAiBxD,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAC1C,oBAAoB,EACpB,iBAAiB,GAAG,gBAAgB,GAAG,wBAAwB,CAC/D,CAAA;AAED,wBAAgB,qBAAqB,CACpC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,QAAQ,CAAC,qBAAqB,CAAC,EACxC,UAAU,EAAE,wBAAwB,EACpC,WAAW,EAAE,qBAAqB,EAClC,aAAa,EAAE,sBAAsB,EACrC,WAAW,EAAE,MAAM,GACjB,cAAc,CAmBhB"}

View File

@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StreamDeckGen1Factory = StreamDeckGen1Factory;
const base_js_1 = require("./base.js");
const gen1_js_1 = require("../services/properties/gen1.js");
const default_js_1 = require("../services/buttonsLcdDisplay/default.js");
const bitmap_js_1 = require("../services/imagePacker/bitmap.js");
const callback_hook_js_1 = require("../services/callback-hook.js");
const gen1_js_2 = require("../services/input/gen1.js");
function extendDevicePropertiesForGen1(rawProps) {
return {
...rawProps,
KEY_DATA_OFFSET: 0,
HAS_NFC_READER: false,
SUPPORTS_CHILD_DEVICES: false,
};
}
function StreamDeckGen1Factory(device, options, properties, imageWriter, targetOptions, bmpImagePPM) {
const fullProperties = extendDevicePropertiesForGen1(properties);
const events = new callback_hook_js_1.CallbackHook();
return new base_js_1.StreamDeckBase(device, options, {
deviceProperties: fullProperties,
events,
properties: new gen1_js_1.Gen1PropertiesService(device),
buttonsLcd: new default_js_1.DefaultButtonsLcdService(imageWriter, new bitmap_js_1.BitmapButtonLcdImagePacker(targetOptions, bmpImagePPM), device, fullProperties),
lcdSegmentDisplay: null,
inputService: new gen1_js_2.ButtonOnlyInputService(fullProperties, events),
encoderLed: null,
});
}
//# sourceMappingURL=generic-gen1.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"generic-gen1.js","sourceRoot":"","sources":["../../src/models/generic-gen1.ts"],"names":[],"mappings":";;AA0BA,sDA0BC;AAlDD,uCAA0C;AAG1C,4DAAsE;AACtE,yEAAmF;AACnF,iEAA8E;AAC9E,mEAA2D;AAE3D,uDAAkE;AAElE,SAAS,6BAA6B,CAAC,QAAkC;IACxE,OAAO;QACN,GAAG,QAAQ;QACX,eAAe,EAAE,CAAC;QAClB,cAAc,EAAE,KAAK;QACrB,sBAAsB,EAAE,KAAK;KAC7B,CAAA;AACF,CAAC;AAOD,SAAgB,qBAAqB,CACpC,MAAiB,EACjB,OAAwC,EACxC,UAAoC,EACpC,WAAkC,EAClC,aAAqC,EACrC,WAAmB;IAEnB,MAAM,cAAc,GAAG,6BAA6B,CAAC,UAAU,CAAC,CAAA;IAEhE,MAAM,MAAM,GAAG,IAAI,+BAAY,EAAoB,CAAA;IAEnD,OAAO,IAAI,wBAAc,CAAC,MAAM,EAAE,OAAO,EAAE;QAC1C,gBAAgB,EAAE,cAAc;QAChC,MAAM;QACN,UAAU,EAAE,IAAI,+BAAqB,CAAC,MAAM,CAAC;QAC7C,UAAU,EAAE,IAAI,qCAAwB,CACvC,WAAW,EACX,IAAI,sCAA0B,CAAC,aAAa,EAAE,WAAW,CAAC,EAC1D,MAAM,EACN,cAAc,CACd;QACD,iBAAiB,EAAE,IAAI;QACvB,YAAY,EAAE,IAAI,gCAAsB,CAAC,cAAc,EAAE,MAAM,CAAC;QAChE,UAAU,EAAE,IAAI;KAChB,CAAC,CAAA;AACH,CAAC"}

View File

@@ -0,0 +1,6 @@
import type { HIDDevice } from '../hid-device.js';
import type { OpenStreamDeckOptions, StreamDeckProperties, StreamDeckServicesDefinition } from './base.js';
import type { PropertiesService } from '../services/properties/interface.js';
export type StreamDeckGen2Properties = Omit<StreamDeckProperties, 'KEY_DATA_OFFSET'>;
export declare function createBaseGen2Properties(device: HIDDevice, options: Required<OpenStreamDeckOptions>, properties: StreamDeckGen2Properties, propertiesService: PropertiesService | null, disableXYFlip?: boolean): StreamDeckServicesDefinition;
//# sourceMappingURL=generic-gen2.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"generic-gen2.d.ts","sourceRoot":"","sources":["../../src/models/generic-gen2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAA;AAS1G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAS5E,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAAC,oBAAoB,EAAE,iBAAiB,CAAC,CAAA;AAEpF,wBAAgB,wBAAwB,CACvC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,QAAQ,CAAC,qBAAqB,CAAC,EACxC,UAAU,EAAE,wBAAwB,EACpC,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,EAC3C,aAAa,CAAC,EAAE,OAAO,GACrB,4BAA4B,CAmB9B"}

View File

@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createBaseGen2Properties = createBaseGen2Properties;
const imageWriter_js_1 = require("../services/imageWriter/imageWriter.js");
const headerGenerator_js_1 = require("../services/imageWriter/headerGenerator.js");
const default_js_1 = require("../services/buttonsLcdDisplay/default.js");
const callback_hook_js_1 = require("../services/callback-hook.js");
const gen2_js_1 = require("../services/properties/gen2.js");
const jpeg_js_1 = require("../services/imagePacker/jpeg.js");
const gen2_js_2 = require("../services/input/gen2.js");
function extendDevicePropertiesForGen2(rawProps) {
return {
...rawProps,
KEY_DATA_OFFSET: 3,
};
}
function createBaseGen2Properties(device, options, properties, propertiesService, disableXYFlip) {
const fullProperties = extendDevicePropertiesForGen2(properties);
const events = new callback_hook_js_1.CallbackHook();
return {
deviceProperties: fullProperties,
events,
properties: propertiesService ?? new gen2_js_1.Gen2PropertiesService(device),
buttonsLcd: new default_js_1.DefaultButtonsLcdService(new imageWriter_js_1.StreamdeckDefaultImageWriter(new headerGenerator_js_1.StreamdeckGen2ImageHeaderGenerator()), new jpeg_js_1.JpegButtonLcdImagePacker(options.encodeJPEG, !disableXYFlip), device, fullProperties),
lcdSegmentDisplay: null,
inputService: new gen2_js_2.Gen2InputService(fullProperties, events),
encoderLed: null,
};
}
//# sourceMappingURL=generic-gen2.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"generic-gen2.js","sourceRoot":"","sources":["../../src/models/generic-gen2.ts"],"names":[],"mappings":";;AAqBA,4DAyBC;AA5CD,2EAAqF;AACrF,mFAA+F;AAC/F,yEAAmF;AACnF,mEAA2D;AAE3D,4DAAsE;AACtE,6DAA0E;AAC1E,uDAA4D;AAG5D,SAAS,6BAA6B,CAAC,QAAkC;IACxE,OAAO;QACN,GAAG,QAAQ;QACX,eAAe,EAAE,CAAC;KAClB,CAAA;AACF,CAAC;AAID,SAAgB,wBAAwB,CACvC,MAAiB,EACjB,OAAwC,EACxC,UAAoC,EACpC,iBAA2C,EAC3C,aAAuB;IAEvB,MAAM,cAAc,GAAG,6BAA6B,CAAC,UAAU,CAAC,CAAA;IAEhE,MAAM,MAAM,GAAG,IAAI,+BAAY,EAAoB,CAAA;IAEnD,OAAO;QACN,gBAAgB,EAAE,cAAc;QAChC,MAAM;QACN,UAAU,EAAE,iBAAiB,IAAI,IAAI,+BAAqB,CAAC,MAAM,CAAC;QAClE,UAAU,EAAE,IAAI,qCAAwB,CACvC,IAAI,6CAA4B,CAAC,IAAI,uDAAkC,EAAE,CAAC,EAC1E,IAAI,kCAAwB,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,aAAa,CAAC,EAChE,MAAM,EACN,cAAc,CACd;QACD,iBAAiB,EAAE,IAAI;QACvB,YAAY,EAAE,IAAI,0BAAgB,CAAC,cAAc,EAAE,MAAM,CAAC;QAC1D,UAAU,EAAE,IAAI;KAChB,CAAA;AACF,CAAC"}

View File

@@ -0,0 +1,5 @@
import type { HIDDevice } from '../hid-device.js';
import type { OpenStreamDeckOptions } from './base.js';
import { StreamDeckBase } from './base.js';
export declare function StreamDeckNeoFactory(device: HIDDevice, options: Required<OpenStreamDeckOptions>): StreamDeckBase;
//# sourceMappingURL=neo.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"neo.d.ts","sourceRoot":"","sources":["../../src/models/neo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AA8D1C,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,qBAAqB,CAAC,GAAG,cAAc,CAKhH"}

View File

@@ -0,0 +1,54 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StreamDeckNeoFactory = StreamDeckNeoFactory;
const base_js_1 = require("./base.js");
const id_js_1 = require("../id.js");
const generic_gen2_js_1 = require("./generic-gen2.js");
const controlsGenerator_js_1 = require("../controlsGenerator.js");
const neo_js_1 = require("../services/lcdSegmentDisplay/neo.js");
const neoControls = (0, controlsGenerator_js_1.generateButtonsGrid)(4, 2, { width: 96, height: 96 });
neoControls.push({
type: 'button',
row: 2,
column: 0,
index: 8,
hidIndex: 8,
feedbackType: 'rgb',
}, {
type: 'lcd-segment',
row: 2,
column: 1,
columnSpan: 2,
rowSpan: 1,
id: 0,
pixelSize: {
width: 248,
height: 58,
},
drawRegions: false,
}, {
type: 'button',
row: 2,
column: 3,
index: 9,
hidIndex: 9,
feedbackType: 'rgb',
});
const neoProperties = {
MODEL: id_js_1.DeviceModelId.NEO,
PRODUCT_NAME: id_js_1.MODEL_NAMES[id_js_1.DeviceModelId.NEO],
CONTROLS: (0, controlsGenerator_js_1.freezeDefinitions)(neoControls),
KEY_SPACING_HORIZONTAL: 30,
KEY_SPACING_VERTICAL: 30,
FULLSCREEN_PANELS: 0,
HAS_NFC_READER: false,
SUPPORTS_CHILD_DEVICES: false,
SUPPORTS_RGB_KEY_FILL: true,
};
const lcdSegmentControls = neoProperties.CONTROLS.filter((control) => control.type === 'lcd-segment');
function StreamDeckNeoFactory(device, options) {
const services = (0, generic_gen2_js_1.createBaseGen2Properties)(device, options, neoProperties, null);
services.lcdSegmentDisplay = new neo_js_1.StreamDeckNeoLcdService(options.encodeJPEG, device, lcdSegmentControls);
return new base_js_1.StreamDeckBase(device, options, services);
}
//# sourceMappingURL=neo.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"neo.js","sourceRoot":"","sources":["../../src/models/neo.ts"],"names":[],"mappings":";;AAgEA,oDAKC;AAnED,uCAA0C;AAC1C,oCAAqD;AAErD,uDAA4D;AAC5D,kEAAgF;AAEhF,iEAA8E;AAE9E,MAAM,WAAW,GAAkC,IAAA,0CAAmB,EAAC,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAA;AACvG,WAAW,CAAC,IAAI,CACf;IACC,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,CAAC;IACN,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;IACR,QAAQ,EAAE,CAAC;IACX,YAAY,EAAE,KAAK;CACnB,EACD;IACC,IAAI,EAAE,aAAa;IACnB,GAAG,EAAE,CAAC;IACN,MAAM,EAAE,CAAC;IACT,UAAU,EAAE,CAAC;IACb,OAAO,EAAE,CAAC;IAEV,EAAE,EAAE,CAAC;IAEL,SAAS,EAAE;QACV,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,EAAE;KACV;IAED,WAAW,EAAE,KAAK;CAClB,EACD;IACC,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,CAAC;IACN,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;IACR,QAAQ,EAAE,CAAC;IACX,YAAY,EAAE,KAAK;CACnB,CACD,CAAA;AAED,MAAM,aAAa,GAA6B;IAC/C,KAAK,EAAE,qBAAa,CAAC,GAAG;IACxB,YAAY,EAAE,mBAAW,CAAC,qBAAa,CAAC,GAAG,CAAC;IAE5C,QAAQ,EAAE,IAAA,wCAAiB,EAAC,WAAW,CAAC;IAExC,sBAAsB,EAAE,EAAE;IAC1B,oBAAoB,EAAE,EAAE;IAExB,iBAAiB,EAAE,CAAC;IACpB,cAAc,EAAE,KAAK;IACrB,sBAAsB,EAAE,KAAK;IAC7B,qBAAqB,EAAE,IAAI;CAC3B,CAAA;AACD,MAAM,kBAAkB,GAAG,aAAa,CAAC,QAAQ,CAAC,MAAM,CACvD,CAAC,OAAO,EAAoD,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,aAAa,CAC7F,CAAA;AAED,SAAgB,oBAAoB,CAAC,MAAiB,EAAE,OAAwC;IAC/F,MAAM,QAAQ,GAAG,IAAA,0CAAwB,EAAC,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,CAAC,CAAA;IAC/E,QAAQ,CAAC,iBAAiB,GAAG,IAAI,gCAAuB,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,kBAAkB,CAAC,CAAA;IAExG,OAAO,IAAI,wBAAc,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAA;AACrD,CAAC"}

View File

@@ -0,0 +1,6 @@
import type { HIDDevice } from '../hid-device.js';
import type { OpenStreamDeckOptions } from './base.js';
import { StreamDeckBase } from './base.js';
import type { PropertiesService } from '../services/properties/interface.js';
export declare function NetworkDockFactory(device: HIDDevice, options: Required<OpenStreamDeckOptions>, _tcpPropertiesService?: PropertiesService): StreamDeckBase;
//# sourceMappingURL=network-dock.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"network-dock.d.ts","sourceRoot":"","sources":["../../src/models/network-dock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAwB,MAAM,WAAW,CAAA;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAG1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAwB5E,wBAAgB,kBAAkB,CACjC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,QAAQ,CAAC,qBAAqB,CAAC,EACxC,qBAAqB,CAAC,EAAE,iBAAiB,GACvC,cAAc,CAYhB"}

View File

@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NetworkDockFactory = NetworkDockFactory;
const base_js_1 = require("./base.js");
const id_js_1 = require("../id.js");
const controlsGenerator_js_1 = require("../controlsGenerator.js");
const callback_hook_js_1 = require("../services/callback-hook.js");
const fake_js_1 = require("../services/buttonsLcdDisplay/fake.js");
const fake_js_2 = require("../services/input/fake.js");
const network_dock_js_1 = require("../services/properties/network-dock.js");
const networkDockProperties = {
MODEL: id_js_1.DeviceModelId.NETWORK_DOCK,
PRODUCT_NAME: id_js_1.MODEL_NAMES[id_js_1.DeviceModelId.NETWORK_DOCK],
KEY_DATA_OFFSET: 0,
SUPPORTS_RGB_KEY_FILL: false,
CONTROLS: (0, controlsGenerator_js_1.freezeDefinitions)([]),
KEY_SPACING_HORIZONTAL: 0,
KEY_SPACING_VERTICAL: 0,
FULLSCREEN_PANELS: 0,
HAS_NFC_READER: false,
SUPPORTS_CHILD_DEVICES: true,
};
function NetworkDockFactory(device, options, _tcpPropertiesService) {
const events = new callback_hook_js_1.CallbackHook();
return new base_js_1.StreamDeckBase(device, options, {
deviceProperties: networkDockProperties,
events,
properties: new network_dock_js_1.NetworkDockPropertiesService(device),
buttonsLcd: new fake_js_1.FakeLcdService(),
lcdSegmentDisplay: null,
inputService: new fake_js_2.FakeInputService(),
encoderLed: null,
});
}
//# sourceMappingURL=network-dock.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"network-dock.js","sourceRoot":"","sources":["../../src/models/network-dock.ts"],"names":[],"mappings":";;AA6BA,gDAgBC;AA3CD,uCAA0C;AAC1C,oCAAqD;AACrD,kEAA2D;AAG3D,mEAA2D;AAC3D,mEAAsE;AACtE,uDAA4D;AAC5D,4EAAqF;AAErF,MAAM,qBAAqB,GAAyB;IACnD,KAAK,EAAE,qBAAa,CAAC,YAAY;IACjC,YAAY,EAAE,mBAAW,CAAC,qBAAa,CAAC,YAAY,CAAC;IACrD,eAAe,EAAE,CAAC;IAElB,qBAAqB,EAAE,KAAK;IAE5B,QAAQ,EAAE,IAAA,wCAAiB,EAAC,EAAE,CAAC;IAE/B,sBAAsB,EAAE,CAAC;IACzB,oBAAoB,EAAE,CAAC;IAEvB,iBAAiB,EAAE,CAAC;IACpB,cAAc,EAAE,KAAK;IACrB,sBAAsB,EAAE,IAAI;CAC5B,CAAA;AAED,SAAgB,kBAAkB,CACjC,MAAiB,EACjB,OAAwC,EACxC,qBAAyC;IAEzC,MAAM,MAAM,GAAG,IAAI,+BAAY,EAAoB,CAAA;IAEnD,OAAO,IAAI,wBAAc,CAAC,MAAM,EAAE,OAAO,EAAE;QAC1C,gBAAgB,EAAE,qBAAqB;QACvC,MAAM;QACN,UAAU,EAAE,IAAI,8CAA4B,CAAC,MAAM,CAAC;QACpD,UAAU,EAAE,IAAI,wBAAc,EAAE;QAChC,iBAAiB,EAAE,IAAI;QACvB,YAAY,EAAE,IAAI,0BAAgB,EAAE;QACpC,UAAU,EAAE,IAAI;KAChB,CAAC,CAAA;AACH,CAAC"}

View File

@@ -0,0 +1,4 @@
import type { HIDDevice } from '../hid-device.js';
import type { OpenStreamDeckOptions, StreamDeckBase } from './base.js';
export declare function StreamDeckOriginalFactory(device: HIDDevice, options: Required<OpenStreamDeckOptions>): StreamDeckBase;
//# sourceMappingURL=original.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"original.d.ts","sourceRoot":"","sources":["../../src/models/original.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAoBtE,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,qBAAqB,CAAC,GAAG,cAAc,CASrH"}

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StreamDeckOriginalFactory = StreamDeckOriginalFactory;
const generic_gen1_js_1 = require("./generic-gen1.js");
const id_js_1 = require("../id.js");
const imageWriter_js_1 = require("../services/imageWriter/imageWriter.js");
const controlsGenerator_js_1 = require("../controlsGenerator.js");
const originalProperties = {
MODEL: id_js_1.DeviceModelId.ORIGINAL,
PRODUCT_NAME: id_js_1.MODEL_NAMES[id_js_1.DeviceModelId.ORIGINAL],
SUPPORTS_RGB_KEY_FILL: false,
CONTROLS: (0, controlsGenerator_js_1.freezeDefinitions)((0, controlsGenerator_js_1.generateButtonsGrid)(5, 3, { width: 72, height: 72 }, true)),
KEY_SPACING_HORIZONTAL: 25,
KEY_SPACING_VERTICAL: 25,
FULLSCREEN_PANELS: 0,
};
function StreamDeckOriginalFactory(device, options) {
return (0, generic_gen1_js_1.StreamDeckGen1Factory)(device, options, originalProperties, new imageWriter_js_1.StreamdeckOriginalImageWriter(), { colorMode: 'bgr', xFlip: true }, 3780);
}
//# sourceMappingURL=original.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"original.js","sourceRoot":"","sources":["../../src/models/original.ts"],"names":[],"mappings":";;AAqBA,8DASC;AA3BD,uDAAyD;AACzD,oCAAqD;AACrD,2EAAsF;AACtF,kEAAgF;AAEhF,MAAM,kBAAkB,GAA6B;IACpD,KAAK,EAAE,qBAAa,CAAC,QAAQ;IAC7B,YAAY,EAAE,mBAAW,CAAC,qBAAa,CAAC,QAAQ,CAAC;IACjD,qBAAqB,EAAE,KAAK;IAE5B,QAAQ,EAAE,IAAA,wCAAiB,EAAC,IAAA,0CAAmB,EAAC,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IAEvF,sBAAsB,EAAE,EAAE;IAC1B,oBAAoB,EAAE,EAAE;IAExB,iBAAiB,EAAE,CAAC;CACpB,CAAA;AAED,SAAgB,yBAAyB,CAAC,MAAiB,EAAE,OAAwC;IACpG,OAAO,IAAA,uCAAqB,EAC3B,MAAM,EACN,OAAO,EACP,kBAAkB,EAClB,IAAI,8CAA6B,EAAE,EACnC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EACjC,IAAI,CACJ,CAAA;AACF,CAAC"}

View File

@@ -0,0 +1,5 @@
import type { HIDDevice } from '../hid-device.js';
import type { OpenStreamDeckOptions } from './base.js';
import { StreamDeckBase } from './base.js';
export declare function StreamDeckPedalFactory(device: HIDDevice, options: Required<OpenStreamDeckOptions>): StreamDeckBase;
//# sourceMappingURL=pedal.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"pedal.d.ts","sourceRoot":"","sources":["../../src/models/pedal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAwB,MAAM,WAAW,CAAA;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAqD1C,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,qBAAqB,CAAC,GAAG,cAAc,CAYlH"}

View File

@@ -0,0 +1,61 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StreamDeckPedalFactory = StreamDeckPedalFactory;
const base_js_1 = require("./base.js");
const id_js_1 = require("../id.js");
const controlsGenerator_js_1 = require("../controlsGenerator.js");
const pedal_js_1 = require("../services/properties/pedal.js");
const fake_js_1 = require("../services/buttonsLcdDisplay/fake.js");
const callback_hook_js_1 = require("../services/callback-hook.js");
const gen1_js_1 = require("../services/input/gen1.js");
const pedalControls = [
{
type: 'button',
row: 0,
column: 0,
index: 0,
hidIndex: 0,
feedbackType: 'none',
},
{
type: 'button',
row: 0,
column: 1,
index: 1,
hidIndex: 1,
feedbackType: 'none',
},
{
type: 'button',
row: 0,
column: 2,
index: 2,
hidIndex: 2,
feedbackType: 'none',
},
];
const pedalProperties = {
MODEL: id_js_1.DeviceModelId.PEDAL,
PRODUCT_NAME: id_js_1.MODEL_NAMES[id_js_1.DeviceModelId.PEDAL],
KEY_DATA_OFFSET: 3,
SUPPORTS_RGB_KEY_FILL: false,
CONTROLS: (0, controlsGenerator_js_1.freezeDefinitions)(pedalControls),
KEY_SPACING_HORIZONTAL: 0,
KEY_SPACING_VERTICAL: 0,
FULLSCREEN_PANELS: 0,
HAS_NFC_READER: false,
SUPPORTS_CHILD_DEVICES: false,
};
function StreamDeckPedalFactory(device, options) {
const events = new callback_hook_js_1.CallbackHook();
return new base_js_1.StreamDeckBase(device, options, {
deviceProperties: pedalProperties,
events,
properties: new pedal_js_1.PedalPropertiesService(device),
buttonsLcd: new fake_js_1.FakeLcdService(),
lcdSegmentDisplay: null,
inputService: new gen1_js_1.ButtonOnlyInputService(pedalProperties, events),
encoderLed: null,
});
}
//# sourceMappingURL=pedal.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"pedal.js","sourceRoot":"","sources":["../../src/models/pedal.ts"],"names":[],"mappings":";;AAuDA,wDAYC;AAjED,uCAA0C;AAC1C,oCAAqD;AAErD,kEAA2D;AAC3D,8DAAwE;AACxE,mEAAsE;AAEtE,mEAA2D;AAC3D,uDAAkE;AAElE,MAAM,aAAa,GAAkC;IACpD;QACC,IAAI,EAAE,QAAQ;QACd,GAAG,EAAE,CAAC;QACN,MAAM,EAAE,CAAC;QACT,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,CAAC;QACX,YAAY,EAAE,MAAM;KACpB;IACD;QACC,IAAI,EAAE,QAAQ;QACd,GAAG,EAAE,CAAC;QACN,MAAM,EAAE,CAAC;QACT,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,CAAC;QACX,YAAY,EAAE,MAAM;KACpB;IACD;QACC,IAAI,EAAE,QAAQ;QACd,GAAG,EAAE,CAAC;QACN,MAAM,EAAE,CAAC;QACT,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,CAAC;QACX,YAAY,EAAE,MAAM;KACpB;CACD,CAAA;AAED,MAAM,eAAe,GAAyB;IAC7C,KAAK,EAAE,qBAAa,CAAC,KAAK;IAC1B,YAAY,EAAE,mBAAW,CAAC,qBAAa,CAAC,KAAK,CAAC;IAC9C,eAAe,EAAE,CAAC;IAClB,qBAAqB,EAAE,KAAK;IAE5B,QAAQ,EAAE,IAAA,wCAAiB,EAAC,aAAa,CAAC;IAE1C,sBAAsB,EAAE,CAAC;IACzB,oBAAoB,EAAE,CAAC;IAEvB,iBAAiB,EAAE,CAAC;IACpB,cAAc,EAAE,KAAK;IACrB,sBAAsB,EAAE,KAAK;CAC7B,CAAA;AAED,SAAgB,sBAAsB,CAAC,MAAiB,EAAE,OAAwC;IACjG,MAAM,MAAM,GAAG,IAAI,+BAAY,EAAoB,CAAA;IAEnD,OAAO,IAAI,wBAAc,CAAC,MAAM,EAAE,OAAO,EAAE;QAC1C,gBAAgB,EAAE,eAAe;QACjC,MAAM;QACN,UAAU,EAAE,IAAI,iCAAsB,CAAC,MAAM,CAAC;QAC9C,UAAU,EAAE,IAAI,wBAAc,EAAE;QAChC,iBAAiB,EAAE,IAAI;QACvB,YAAY,EAAE,IAAI,gCAAsB,CAAC,eAAe,EAAE,MAAM,CAAC;QACjE,UAAU,EAAE,IAAI;KAChB,CAAC,CAAA;AACH,CAAC"}

View File

@@ -0,0 +1,5 @@
import type { HIDDevice } from '../hid-device.js';
import type { OpenStreamDeckOptions } from './base.js';
import { StreamDeckBase } from './base.js';
export declare function StreamDeckPlusFactory(device: HIDDevice, options: Required<OpenStreamDeckOptions>): StreamDeckBase;
//# sourceMappingURL=plus.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"plus.d.ts","sourceRoot":"","sources":["../../src/models/plus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAsF1C,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,qBAAqB,CAAC,GAAG,cAAc,CAKjH"}

View File

@@ -0,0 +1,72 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StreamDeckPlusFactory = StreamDeckPlusFactory;
const base_js_1 = require("./base.js");
const generic_gen2_js_1 = require("./generic-gen2.js");
const id_js_1 = require("../id.js");
const controlsGenerator_js_1 = require("../controlsGenerator.js");
const generic_js_1 = require("../services/lcdSegmentDisplay/generic.js");
const plusControls = (0, controlsGenerator_js_1.generateButtonsGrid)(4, 2, { width: 120, height: 120 });
plusControls.push({
type: 'lcd-segment',
row: 2,
column: 0,
columnSpan: 4,
rowSpan: 1,
id: 0,
pixelSize: Object.freeze({
width: 800,
height: 100,
}),
drawRegions: true,
}, {
type: 'encoder',
row: 3,
column: 0,
index: 0,
hidIndex: 0,
hasLed: false,
ledRingSteps: 0,
}, {
type: 'encoder',
row: 3,
column: 1,
index: 1,
hidIndex: 1,
hasLed: false,
ledRingSteps: 0,
}, {
type: 'encoder',
row: 3,
column: 2,
index: 2,
hidIndex: 2,
hasLed: false,
ledRingSteps: 0,
}, {
type: 'encoder',
row: 3,
column: 3,
index: 3,
hidIndex: 3,
hasLed: false,
ledRingSteps: 0,
});
const plusProperties = {
MODEL: id_js_1.DeviceModelId.PLUS,
PRODUCT_NAME: id_js_1.MODEL_NAMES[id_js_1.DeviceModelId.PLUS],
SUPPORTS_RGB_KEY_FILL: true,
CONTROLS: (0, controlsGenerator_js_1.freezeDefinitions)(plusControls),
KEY_SPACING_HORIZONTAL: 99,
KEY_SPACING_VERTICAL: 40,
FULLSCREEN_PANELS: 0,
HAS_NFC_READER: false,
SUPPORTS_CHILD_DEVICES: false,
};
const lcdSegmentControls = plusProperties.CONTROLS.filter((control) => control.type === 'lcd-segment');
function StreamDeckPlusFactory(device, options) {
const services = (0, generic_gen2_js_1.createBaseGen2Properties)(device, options, plusProperties, null, true);
services.lcdSegmentDisplay = new generic_js_1.StreamdeckDefaultLcdService(options.encodeJPEG, device, lcdSegmentControls);
return new base_js_1.StreamDeckBase(device, options, services);
}
//# sourceMappingURL=plus.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"plus.js","sourceRoot":"","sources":["../../src/models/plus.ts"],"names":[],"mappings":";;AAwFA,sDAKC;AA3FD,uCAA0C;AAE1C,uDAA4D;AAC5D,oCAAqD;AACrD,kEAAgF;AAEhF,yEAAsF;AAEtF,MAAM,YAAY,GAAkC,IAAA,0CAAmB,EAAC,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAA;AAC1G,YAAY,CAAC,IAAI,CAChB;IACC,IAAI,EAAE,aAAa;IACnB,GAAG,EAAE,CAAC;IACN,MAAM,EAAE,CAAC;IACT,UAAU,EAAE,CAAC;IACb,OAAO,EAAE,CAAC;IAEV,EAAE,EAAE,CAAC;IAEL,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC;QACxB,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;KACX,CAAC;IAEF,WAAW,EAAE,IAAI;CACjB,EACD;IACC,IAAI,EAAE,SAAS;IACf,GAAG,EAAE,CAAC;IACN,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;IACR,QAAQ,EAAE,CAAC;IAEX,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,CAAC;CACf,EACD;IACC,IAAI,EAAE,SAAS;IACf,GAAG,EAAE,CAAC;IACN,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;IACR,QAAQ,EAAE,CAAC;IAEX,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,CAAC;CACf,EACD;I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device.js';
import { StreamDeckBase, type OpenStreamDeckOptions } from './base.js';
import { type StreamDeckGen2Properties } from './generic-gen2.js';
import type { PropertiesService } from '../services/properties/interface.js';
export declare const studioProperties: StreamDeckGen2Properties;
export declare function StreamDeckStudioFactory(device: HIDDevice, options: Required<OpenStreamDeckOptions>, propertiesService?: PropertiesService): StreamDeckBase;
//# sourceMappingURL=studio.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"studio.d.ts","sourceRoot":"","sources":["../../src/models/studio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,WAAW,CAAA;AACtE,OAAO,EAA4B,KAAK,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAI3F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AA6B5E,eAAO,MAAM,gBAAgB,EAAE,wBAc9B,CAAA;AAED,wBAAgB,uBAAuB,CACtC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,QAAQ,CAAC,qBAAqB,CAAC,EACxC,iBAAiB,CAAC,EAAE,iBAAiB,GACnC,cAAc,CAWhB"}

View File

@@ -0,0 +1,49 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.studioProperties = void 0;
exports.StreamDeckStudioFactory = StreamDeckStudioFactory;
const base_js_1 = require("./base.js");
const generic_gen2_js_1 = require("./generic-gen2.js");
const id_js_1 = require("../id.js");
const controlsGenerator_js_1 = require("../controlsGenerator.js");
const studio_js_1 = require("../services/properties/studio.js");
const studio_js_2 = require("../services/encoderLed/studio.js");
const studioControls = [
{
type: 'encoder',
row: 0,
column: 0,
index: 0,
hidIndex: 0,
hasLed: true,
ledRingSteps: 24,
},
...(0, controlsGenerator_js_1.generateButtonsGrid)(16, 2, { width: 144, height: 112 }, false, 1),
{
type: 'encoder',
row: 0,
column: 17,
index: 1,
hidIndex: 1,
hasLed: true,
ledRingSteps: 24,
lcdRingOffset: 12,
},
];
exports.studioProperties = {
MODEL: id_js_1.DeviceModelId.STUDIO,
PRODUCT_NAME: id_js_1.MODEL_NAMES[id_js_1.DeviceModelId.STUDIO],
SUPPORTS_RGB_KEY_FILL: true,
CONTROLS: (0, controlsGenerator_js_1.freezeDefinitions)(studioControls),
KEY_SPACING_HORIZONTAL: 0, // TODO
KEY_SPACING_VERTICAL: 0, // TODO
FULLSCREEN_PANELS: 2,
HAS_NFC_READER: true,
SUPPORTS_CHILD_DEVICES: true,
};
function StreamDeckStudioFactory(device, options, propertiesService) {
const services = (0, generic_gen2_js_1.createBaseGen2Properties)(device, options, exports.studioProperties, propertiesService ?? new studio_js_1.StudioPropertiesService(device), true);
services.encoderLed = new studio_js_2.StudioEncoderLedService(device, studioControls);
return new base_js_1.StreamDeckBase(device, options, services);
}
//# sourceMappingURL=studio.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"studio.js","sourceRoot":"","sources":["../../src/models/studio.ts"],"names":[],"mappings":";;;AAmDA,0DAeC;AAjED,uCAAsE;AACtE,uDAA2F;AAC3F,oCAAqD;AACrD,kEAAgF;AAGhF,gEAA0E;AAC1E,gEAA0E;AAE1E,MAAM,cAAc,GAAkC;IACrD;QACC,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,CAAC;QACN,MAAM,EAAE,CAAC;QACT,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,CAAC;QAEX,MAAM,EAAE,IAAI;QACZ,YAAY,EAAE,EAAE;KAChB;IACD,GAAG,IAAA,0CAAmB,EAAC,EAAE,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IACpE;QACC,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,CAAC;QACN,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,CAAC;QAEX,MAA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