Added support for Streamdeck Pedal and updated UI to better fit the Packed UI style
This commit is contained in:
31
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/default.d.ts
generated
vendored
Normal file
31
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/default.d.ts
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
import type { HIDDevice } from '../../hid-device.js';
|
||||
import type { Dimension, KeyIndex } from '../../id.js';
|
||||
import type { StreamDeckProperties } from '../../models/base.js';
|
||||
import type { FillPanelDimensionsOptions, FillImageOptions, FillPanelOptions } from '../../types.js';
|
||||
import type { StreamdeckImageWriter } from '../imageWriter/types.js';
|
||||
import type { ButtonsLcdDisplayService } from './interface.js';
|
||||
import type { ButtonLcdImagePacker } from '../imagePacker/interface.js';
|
||||
import { type PreparedBuffer } from '../../preparedBuffer.js';
|
||||
export declare class DefaultButtonsLcdService implements ButtonsLcdDisplayService {
|
||||
#private;
|
||||
constructor(imageWriter: StreamdeckImageWriter, imagePacker: ButtonLcdImagePacker, device: Pick<HIDDevice, 'sendReports' | 'sendFeatureReport'>, deviceProperties: Readonly<StreamDeckProperties>);
|
||||
private getLcdButtonControls;
|
||||
private calculateLcdGridSpan;
|
||||
private calculateDimensionsFromGridSpan;
|
||||
calculateFillPanelDimensions(options: FillPanelDimensionsOptions | undefined): Dimension | null;
|
||||
clearPanel(): Promise<void>;
|
||||
clearKey(keyIndex: KeyIndex): Promise<void>;
|
||||
fillKeyColor(keyIndex: KeyIndex, r: number, g: number, b: number): Promise<void>;
|
||||
fillKeyBuffer(keyIndex: KeyIndex, imageBuffer: Uint8Array | Uint8ClampedArray, options?: FillImageOptions): Promise<void>;
|
||||
private prepareFillKeyBufferInner;
|
||||
prepareFillKeyBuffer(keyIndex: KeyIndex, imageBuffer: Uint8Array | Uint8ClampedArray, options: FillImageOptions | undefined, jsonSafe: boolean | undefined): Promise<PreparedBuffer>;
|
||||
fillPanelBuffer(imageBuffer: Uint8Array | Uint8ClampedArray, options?: FillPanelOptions): Promise<void>;
|
||||
private prepareFillPanelBufferInner;
|
||||
prepareFillPanelBuffer(imageBuffer: Uint8Array | Uint8ClampedArray, options: FillPanelOptions | undefined, jsonSafe: boolean | undefined): Promise<PreparedBuffer>;
|
||||
private sendKeyRgb;
|
||||
private fillImageRangeControl;
|
||||
private prepareFillImageRangeControl;
|
||||
private checkRGBValue;
|
||||
private checkSourceFormat;
|
||||
}
|
||||
//# sourceMappingURL=default.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/default.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/default.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/services/buttonsLcdDisplay/default.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,KAAK,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACpG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AACpE,OAAO,KAAK,EAAE,wBAAwB,EAAY,MAAM,gBAAgB,CAAA;AACxE,OAAO,KAAK,EAAE,oBAAoB,EAA4B,MAAM,6BAA6B,CAAA;AACjG,OAAO,EAA8B,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAEzF,qBAAa,wBAAyB,YAAW,wBAAwB;;gBAOvE,WAAW,EAAE,qBAAqB,EAClC,WAAW,EAAE,oBAAoB,EACjC,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,aAAa,GAAG,mBAAmB,CAAC,EAC5D,gBAAgB,EAAE,QAAQ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Display/default.js
generated
vendored
Normal file
241
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/default.js
generated
vendored
Normal file
@@ -0,0 +1,241 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.DefaultButtonsLcdService = void 0;
|
||||
const preparedBuffer_js_1 = require("../../preparedBuffer.js");
|
||||
class DefaultButtonsLcdService {
|
||||
#imageWriter;
|
||||
#imagePacker;
|
||||
#device;
|
||||
#deviceProperties;
|
||||
constructor(imageWriter, imagePacker, device, deviceProperties) {
|
||||
this.#imageWriter = imageWriter;
|
||||
this.#imagePacker = imagePacker;
|
||||
this.#device = device;
|
||||
this.#deviceProperties = deviceProperties;
|
||||
}
|
||||
getLcdButtonControls() {
|
||||
return this.#deviceProperties.CONTROLS.filter((control) => control.type === 'button' && control.feedbackType === 'lcd');
|
||||
}
|
||||
calculateLcdGridSpan(buttonsLcd) {
|
||||
if (buttonsLcd.length === 0)
|
||||
return null;
|
||||
const allRowValues = buttonsLcd.map((button) => button.row);
|
||||
const allColumnValues = buttonsLcd.map((button) => button.column);
|
||||
return {
|
||||
minRow: Math.min(...allRowValues),
|
||||
maxRow: Math.max(...allRowValues),
|
||||
minCol: Math.min(...allColumnValues),
|
||||
maxCol: Math.max(...allColumnValues),
|
||||
};
|
||||
}
|
||||
calculateDimensionsFromGridSpan(gridSpan, buttonPixelSize, withPadding) {
|
||||
if (withPadding) {
|
||||
// TODO: Implement padding
|
||||
throw new Error('Not implemented');
|
||||
}
|
||||
else {
|
||||
const rowCount = gridSpan.maxRow - gridSpan.minRow + 1;
|
||||
const columnCount = gridSpan.maxCol - gridSpan.minCol + 1;
|
||||
// TODO: Consider that different rows/columns could have different dimensions
|
||||
return {
|
||||
width: columnCount * buttonPixelSize.width,
|
||||
height: rowCount * buttonPixelSize.height,
|
||||
};
|
||||
}
|
||||
}
|
||||
calculateFillPanelDimensions(options) {
|
||||
const buttonLcdControls = this.getLcdButtonControls();
|
||||
const gridSpan = this.calculateLcdGridSpan(buttonLcdControls);
|
||||
if (!gridSpan || buttonLcdControls.length === 0)
|
||||
return null;
|
||||
return this.calculateDimensionsFromGridSpan(gridSpan, buttonLcdControls[0].pixelSize, options?.withPadding);
|
||||
}
|
||||
async clearPanel() {
|
||||
const ps = [];
|
||||
if (this.#deviceProperties.FULLSCREEN_PANELS > 0) {
|
||||
// TODO - should this be a separate property?
|
||||
for (let screenIndex = 0; screenIndex < this.#deviceProperties.FULLSCREEN_PANELS; screenIndex++) {
|
||||
ps.push(this.#device.sendFeatureReport(new Uint8Array([0x03, 0x05, screenIndex, 0, 0, 0])));
|
||||
}
|
||||
// TODO - clear rgb?
|
||||
}
|
||||
else {
|
||||
for (const control of this.#deviceProperties.CONTROLS) {
|
||||
if (control.type !== 'button')
|
||||
continue;
|
||||
switch (control.feedbackType) {
|
||||
case 'rgb':
|
||||
ps.push(this.sendKeyRgb(control.hidIndex, 0, 0, 0));
|
||||
break;
|
||||
case 'lcd':
|
||||
if (this.#deviceProperties.SUPPORTS_RGB_KEY_FILL) {
|
||||
ps.push(this.sendKeyRgb(control.hidIndex, 0, 0, 0));
|
||||
}
|
||||
else {
|
||||
const pixels = new Uint8Array(control.pixelSize.width * control.pixelSize.height * 3);
|
||||
// TODO - caching?
|
||||
ps.push(this.fillImageRangeControl(control, pixels, {
|
||||
format: 'rgb',
|
||||
offset: 0,
|
||||
stride: control.pixelSize.width * 3,
|
||||
}));
|
||||
}
|
||||
break;
|
||||
case 'none':
|
||||
// Do nothing
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
await Promise.all(ps);
|
||||
}
|
||||
async clearKey(keyIndex) {
|
||||
const control = this.#deviceProperties.CONTROLS.find((control) => control.type === 'button' && control.index === keyIndex);
|
||||
if (!control || control.feedbackType === 'none')
|
||||
throw new TypeError(`Expected a valid keyIndex`);
|
||||
if (this.#deviceProperties.SUPPORTS_RGB_KEY_FILL || control.feedbackType === 'rgb') {
|
||||
await this.sendKeyRgb(keyIndex, 0, 0, 0);
|
||||
}
|
||||
else {
|
||||
const pixels = new Uint8Array(control.pixelSize.width * control.pixelSize.height * 3);
|
||||
// TODO - caching?
|
||||
await this.fillImageRangeControl(control, pixels, {
|
||||
format: 'rgb',
|
||||
offset: 0,
|
||||
stride: control.pixelSize.width * 3,
|
||||
});
|
||||
}
|
||||
}
|
||||
async fillKeyColor(keyIndex, r, g, b) {
|
||||
this.checkRGBValue(r);
|
||||
this.checkRGBValue(g);
|
||||
this.checkRGBValue(b);
|
||||
const control = this.#deviceProperties.CONTROLS.find((control) => control.type === 'button' && control.index === keyIndex);
|
||||
if (!control || control.feedbackType === 'none')
|
||||
throw new TypeError(`Expected a valid keyIndex`);
|
||||
if (this.#deviceProperties.SUPPORTS_RGB_KEY_FILL || control.feedbackType === 'rgb') {
|
||||
await this.sendKeyRgb(keyIndex, r, g, b);
|
||||
}
|
||||
else {
|
||||
// rgba is excessive here, but it makes the fill easier as it can be done in a 32bit uint
|
||||
const pixelCount = control.pixelSize.width * control.pixelSize.height;
|
||||
const pixels = new Uint8Array(pixelCount * 4);
|
||||
const view = new DataView(pixels.buffer, pixels.byteOffset, pixels.byteLength);
|
||||
// write first pixel
|
||||
view.setUint8(0, r);
|
||||
view.setUint8(1, g);
|
||||
view.setUint8(2, b);
|
||||
view.setUint8(3, 255);
|
||||
// read computed pixel
|
||||
const sample = view.getUint32(0);
|
||||
// fill with computed pixel
|
||||
for (let i = 1; i < pixelCount; i++) {
|
||||
view.setUint32(i * 4, sample);
|
||||
}
|
||||
await this.fillImageRangeControl(control, pixels, {
|
||||
format: 'rgba',
|
||||
offset: 0,
|
||||
stride: control.pixelSize.width * 4,
|
||||
});
|
||||
}
|
||||
}
|
||||
async fillKeyBuffer(keyIndex, imageBuffer, options) {
|
||||
const packets = await this.prepareFillKeyBufferInner(keyIndex, imageBuffer, options);
|
||||
await this.#device.sendReports(packets);
|
||||
}
|
||||
async prepareFillKeyBufferInner(keyIndex, imageBuffer, options) {
|
||||
const sourceFormat = options?.format ?? 'rgb';
|
||||
this.checkSourceFormat(sourceFormat);
|
||||
const control = this.#deviceProperties.CONTROLS.find((control) => control.type === 'button' && control.index === keyIndex);
|
||||
if (!control || control.feedbackType === 'none')
|
||||
throw new TypeError(`Expected a valid keyIndex`);
|
||||
if (control.feedbackType !== 'lcd')
|
||||
throw new TypeError(`keyIndex ${control.index} does not support lcd feedback`);
|
||||
const imageSize = control.pixelSize.width * control.pixelSize.height * sourceFormat.length;
|
||||
if (imageBuffer.length !== imageSize) {
|
||||
throw new RangeError(`Expected image buffer of length ${imageSize}, got length ${imageBuffer.length}`);
|
||||
}
|
||||
return this.prepareFillImageRangeControl(control, imageBuffer, {
|
||||
format: sourceFormat,
|
||||
offset: 0,
|
||||
stride: control.pixelSize.width * sourceFormat.length,
|
||||
});
|
||||
}
|
||||
async prepareFillKeyBuffer(keyIndex, imageBuffer, options, jsonSafe) {
|
||||
const packets = await this.prepareFillKeyBufferInner(keyIndex, imageBuffer, options);
|
||||
return (0, preparedBuffer_js_1.wrapBufferToPreparedBuffer)(this.#deviceProperties.MODEL, 'fill-key', packets, jsonSafe ?? false);
|
||||
}
|
||||
async fillPanelBuffer(imageBuffer, options) {
|
||||
const packets = await this.prepareFillPanelBufferInner(imageBuffer, options);
|
||||
await this.#device.sendReports(packets);
|
||||
}
|
||||
async prepareFillPanelBufferInner(imageBuffer, options) {
|
||||
const sourceFormat = options?.format ?? 'rgb';
|
||||
this.checkSourceFormat(sourceFormat);
|
||||
const buttonLcdControls = this.getLcdButtonControls();
|
||||
const panelGridSpan = this.calculateLcdGridSpan(buttonLcdControls);
|
||||
if (!panelGridSpan || buttonLcdControls.length === 0) {
|
||||
throw new Error(`Panel does not support being filled`);
|
||||
}
|
||||
const panelDimensions = this.calculateDimensionsFromGridSpan(panelGridSpan, buttonLcdControls[0].pixelSize, options?.withPadding);
|
||||
const expectedByteCount = sourceFormat.length * panelDimensions.width * panelDimensions.height;
|
||||
if (imageBuffer.length !== expectedByteCount) {
|
||||
throw new RangeError(`Expected image buffer of length ${expectedByteCount}, got length ${imageBuffer.length}`);
|
||||
}
|
||||
const stride = panelDimensions.width * sourceFormat.length;
|
||||
const ps = [];
|
||||
for (const control of buttonLcdControls) {
|
||||
const controlRow = control.row - panelGridSpan.minRow;
|
||||
const controlCol = control.column - panelGridSpan.minCol;
|
||||
// TODO: Consider that different rows/columns could have different dimensions
|
||||
const iconSize = control.pixelSize.width * sourceFormat.length;
|
||||
const rowOffset = stride * controlRow * control.pixelSize.height;
|
||||
const colOffset = controlCol * iconSize;
|
||||
// TODO: Implement padding
|
||||
ps.push(this.prepareFillImageRangeControl(control, imageBuffer, {
|
||||
format: sourceFormat,
|
||||
offset: rowOffset + colOffset,
|
||||
stride,
|
||||
}));
|
||||
}
|
||||
const packets = await Promise.all(ps);
|
||||
return packets.flat();
|
||||
}
|
||||
async prepareFillPanelBuffer(imageBuffer, options, jsonSafe) {
|
||||
const packets = await this.prepareFillPanelBufferInner(imageBuffer, options);
|
||||
return (0, preparedBuffer_js_1.wrapBufferToPreparedBuffer)(this.#deviceProperties.MODEL, 'fill-panel', packets, jsonSafe ?? false);
|
||||
}
|
||||
async sendKeyRgb(keyIndex, red, green, blue) {
|
||||
await this.#device.sendFeatureReport(new Uint8Array([0x03, 0x06, keyIndex, red, green, blue]));
|
||||
}
|
||||
async fillImageRangeControl(buttonControl, imageBuffer, sourceOptions) {
|
||||
const packets = await this.prepareFillImageRangeControl(buttonControl, imageBuffer, sourceOptions);
|
||||
await this.#device.sendReports(packets);
|
||||
}
|
||||
async prepareFillImageRangeControl(buttonControl, imageBuffer, sourceOptions) {
|
||||
if (buttonControl.feedbackType !== 'lcd')
|
||||
throw new TypeError(`keyIndex ${buttonControl.index} does not support lcd feedback`);
|
||||
const byteBuffer = await this.#imagePacker.convertPixelBuffer(imageBuffer, sourceOptions, buttonControl.pixelSize);
|
||||
return this.#imageWriter.generateFillImageWrites({ keyIndex: buttonControl.hidIndex }, byteBuffer);
|
||||
}
|
||||
checkRGBValue(value) {
|
||||
if (value < 0 || value > 255) {
|
||||
throw new TypeError('Expected a valid color RGB value 0 - 255');
|
||||
}
|
||||
}
|
||||
checkSourceFormat(format) {
|
||||
switch (format) {
|
||||
case 'rgb':
|
||||
case 'rgba':
|
||||
case 'bgr':
|
||||
case 'bgra':
|
||||
break;
|
||||
default: {
|
||||
const fmt = format;
|
||||
throw new TypeError(`Expected a known color format not "${fmt}"`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.DefaultButtonsLcdService = DefaultButtonsLcdService;
|
||||
//# sourceMappingURL=default.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/default.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/default.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
15
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/fake.d.ts
generated
vendored
Normal file
15
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/fake.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import type { Dimension, KeyIndex } from '../../id.js';
|
||||
import type { ButtonsLcdDisplayService } from './interface.js';
|
||||
import type { FillPanelDimensionsOptions, FillImageOptions, FillPanelOptions } from '../../types.js';
|
||||
import type { PreparedBuffer } from '../../preparedBuffer.js';
|
||||
export declare class FakeLcdService implements ButtonsLcdDisplayService {
|
||||
calculateFillPanelDimensions(_options?: FillPanelDimensionsOptions): Dimension | null;
|
||||
clearKey(_keyIndex: number): Promise<void>;
|
||||
clearPanel(): Promise<void>;
|
||||
fillKeyColor(_keyIndex: number, _r: number, _g: number, _b: number): Promise<void>;
|
||||
fillKeyBuffer(_keyIndex: number, _imageBuffer: Uint8Array, _options?: FillImageOptions): Promise<void>;
|
||||
prepareFillKeyBuffer(_keyIndex: KeyIndex, _imageBuffer: Uint8Array | Uint8ClampedArray, _options: FillImageOptions | undefined, _jsonSafe: boolean | undefined): Promise<PreparedBuffer>;
|
||||
fillPanelBuffer(_imageBuffer: Uint8Array, _options?: FillPanelOptions): Promise<void>;
|
||||
prepareFillPanelBuffer(_imageBuffer: Uint8Array | Uint8ClampedArray, _options: FillPanelOptions | undefined, _jsonSafe: boolean | undefined): Promise<PreparedBuffer>;
|
||||
}
|
||||
//# sourceMappingURL=fake.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/fake.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/fake.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"fake.d.ts","sourceRoot":"","sources":["../../../src/services/buttonsLcdDisplay/fake.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAC9D,OAAO,KAAK,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACpG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAE7D,qBAAa,cAAe,YAAW,wBAAwB;IACvD,4BAA4B,CAAC,QAAQ,CAAC,EAAE,0BAA0B,GAAG,SAAS,GAAG,IAAI;IAI/E,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAG1C,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAG3B,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAGlF,aAAa,CACzB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,UAAU,EACxB,QAAQ,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,IAAI,CAAC;IAGH,oBAAoB,CAChC,SAAS,EAAE,QAAQ,EACnB,YAAY,EAAE,UAAU,GAAG,iBAAiB,EAC5C,QAAQ,EAAE,gBAAgB,GAAG,SAAS,EACtC,SAAS,EAAE,OAAO,GAAG,SAAS,GAC5B,OAAO,CAAC,cAAc,CAAC;IAIb,eAAe,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAGrF,sBAAsB,CAClC,YAAY,EAAE,UAAU,GAAG,iBAAiB,EAC5C,QAAQ,EAAE,gBAAgB,GAAG,SAAS,EACtC,SAAS,EAAE,OAAO,GAAG,SAAS,GAC5B,OAAO,CAAC,cAAc,CAAC;CAI1B"}
|
||||
34
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/fake.js
generated
vendored
Normal file
34
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/fake.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.FakeLcdService = void 0;
|
||||
class FakeLcdService {
|
||||
calculateFillPanelDimensions(_options) {
|
||||
// Not supported
|
||||
return null;
|
||||
}
|
||||
async clearKey(_keyIndex) {
|
||||
// Not supported
|
||||
}
|
||||
async clearPanel() {
|
||||
// Not supported
|
||||
}
|
||||
async fillKeyColor(_keyIndex, _r, _g, _b) {
|
||||
// Not supported
|
||||
}
|
||||
async fillKeyBuffer(_keyIndex, _imageBuffer, _options) {
|
||||
// Not supported
|
||||
}
|
||||
async prepareFillKeyBuffer(_keyIndex, _imageBuffer, _options, _jsonSafe) {
|
||||
// Not supported
|
||||
throw new Error('Not supported');
|
||||
}
|
||||
async fillPanelBuffer(_imageBuffer, _options) {
|
||||
// Not supported
|
||||
}
|
||||
async prepareFillPanelBuffer(_imageBuffer, _options, _jsonSafe) {
|
||||
// Not supported
|
||||
throw new Error('Not supported');
|
||||
}
|
||||
}
|
||||
exports.FakeLcdService = FakeLcdService;
|
||||
//# sourceMappingURL=fake.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/fake.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/fake.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"fake.js","sourceRoot":"","sources":["../../../src/services/buttonsLcdDisplay/fake.ts"],"names":[],"mappings":";;;AAKA,MAAa,cAAc;IACnB,4BAA4B,CAAC,QAAqC;QACxE,gBAAgB;QAChB,OAAO,IAAI,CAAA;IACZ,CAAC;IACM,KAAK,CAAC,QAAQ,CAAC,SAAiB;QACtC,gBAAgB;IACjB,CAAC;IACM,KAAK,CAAC,UAAU;QACtB,gBAAgB;IACjB,CAAC;IACM,KAAK,CAAC,YAAY,CAAC,SAAiB,EAAE,EAAU,EAAE,EAAU,EAAE,EAAU;QAC9E,gBAAgB;IACjB,CAAC;IACM,KAAK,CAAC,aAAa,CACzB,SAAiB,EACjB,YAAwB,EACxB,QAA2B;QAE3B,gBAAgB;IACjB,CAAC;IACM,KAAK,CAAC,oBAAoB,CAChC,SAAmB,EACnB,YAA4C,EAC5C,QAAsC,EACtC,SAA8B;QAE9B,gBAAgB;QAChB,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAA;IACjC,CAAC;IACM,KAAK,CAAC,eAAe,CAAC,YAAwB,EAAE,QAA2B;QACjF,gBAAgB;IACjB,CAAC;IACM,KAAK,CAAC,sBAAsB,CAClC,YAA4C,EAC5C,QAAsC,EACtC,SAA8B;QAE9B,gBAAgB;QAChB,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAA;IACjC,CAAC;CACD;AAzCD,wCAyCC"}
|
||||
20
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/interface.d.ts
generated
vendored
Normal file
20
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/interface.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import type { Dimension, KeyIndex } from '../../id.js';
|
||||
import type { FillImageOptions, FillPanelDimensionsOptions, FillPanelOptions } from '../../types.js';
|
||||
import type { PreparedBuffer } from '../../preparedBuffer.js';
|
||||
export interface GridSpan {
|
||||
minRow: number;
|
||||
maxRow: number;
|
||||
minCol: number;
|
||||
maxCol: number;
|
||||
}
|
||||
export interface ButtonsLcdDisplayService {
|
||||
calculateFillPanelDimensions(options: FillPanelDimensionsOptions | undefined): Dimension | null;
|
||||
clearPanel(): Promise<void>;
|
||||
clearKey(keyIndex: KeyIndex): 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 | undefined, jsonSafe: boolean | undefined): Promise<PreparedBuffer>;
|
||||
fillPanelBuffer(imageBuffer: Uint8Array, options: FillPanelOptions | undefined): Promise<void>;
|
||||
prepareFillPanelBuffer(imageBuffer: Uint8Array | Uint8ClampedArray, options: FillPanelOptions | undefined, jsonSafe: boolean | undefined): Promise<PreparedBuffer>;
|
||||
}
|
||||
//# sourceMappingURL=interface.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/interface.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/interface.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/services/buttonsLcdDisplay/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,0BAA0B,EAA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C1B"}
|
||||
3
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/interface.js
generated
vendored
Normal file
3
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/interface.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=interface.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/interface.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/buttonsLcdDisplay/interface.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../src/services/buttonsLcdDisplay/interface.ts"],"names":[],"mappings":""}
|
||||
15
node_modules/@elgato-stream-deck/core/dist/services/callback-hook.d.ts
generated
vendored
Normal file
15
node_modules/@elgato-stream-deck/core/dist/services/callback-hook.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
type EmitEventFn<TEvents extends {
|
||||
[k: string]: any[];
|
||||
}, K extends keyof TEvents> = (key: K, ...args: TEvents[K]) => void;
|
||||
/**
|
||||
* A simple helper that allows for the delayed registering of a listener, to avoid dependency cycles
|
||||
*/
|
||||
export declare class CallbackHook<TEvents extends {
|
||||
[k: string]: any[];
|
||||
}> {
|
||||
#private;
|
||||
emit<T extends keyof TEvents>(key: T, ...args: TEvents[T]): void;
|
||||
listen(fn: EmitEventFn<TEvents, keyof TEvents>): void;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=callback-hook.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/callback-hook.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/callback-hook.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"callback-hook.d.ts","sourceRoot":"","sources":["../../src/services/callback-hook.ts"],"names":[],"mappings":"AAAA,KAAK,WAAW,CAAC,OAAO,SAAS;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,EAAE,CAAA;CAAE,EAAE,CAAC,SAAS,MAAM,OAAO,IAAI,CACnF,GAAG,EAAE,CAAC,EACN,GAAG,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,KACf,IAAI,CAAA;AAET;;GAEG;AACH,qBAAa,YAAY,CAAC,OAAO,SAAS;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,EAAE,CAAA;CAAE;;IAG/D,IAAI,CAAC,CAAC,SAAS,MAAM,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI;IAMhE,MAAM,CAAC,EAAE,EAAE,WAAW,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,GAAG,IAAI;CAGrD"}
|
||||
19
node_modules/@elgato-stream-deck/core/dist/services/callback-hook.js
generated
vendored
Normal file
19
node_modules/@elgato-stream-deck/core/dist/services/callback-hook.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CallbackHook = void 0;
|
||||
/**
|
||||
* A simple helper that allows for the delayed registering of a listener, to avoid dependency cycles
|
||||
*/
|
||||
class CallbackHook {
|
||||
#listener = null;
|
||||
emit(key, ...args) {
|
||||
if (!this.#listener)
|
||||
throw new Error('No listener setup');
|
||||
this.#listener(key, ...args);
|
||||
}
|
||||
listen(fn) {
|
||||
this.#listener = fn;
|
||||
}
|
||||
}
|
||||
exports.CallbackHook = CallbackHook;
|
||||
//# sourceMappingURL=callback-hook.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/callback-hook.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/callback-hook.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"callback-hook.js","sourceRoot":"","sources":["../../src/services/callback-hook.ts"],"names":[],"mappings":";;;AAKA;;GAEG;AACH,MAAa,YAAY;IACxB,SAAS,GAA+C,IAAI,CAAA;IAE5D,IAAI,CAA0B,GAAM,EAAE,GAAG,IAAgB;QACxD,IAAI,CAAC,IAAI,CAAC,SAAS;YAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAA;QAEzD,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAA;IAC7B,CAAC;IAED,MAAM,CAAC,EAAuC;QAC7C,IAAI,CAAC,SAAS,GAAG,EAAE,CAAA;IACpB,CAAC;CACD;AAZD,oCAYC"}
|
||||
13
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/galleonK100.d.ts
generated
vendored
Normal file
13
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/galleonK100.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { EncoderIndex } from '../../id.js';
|
||||
import type { StreamDeckControlDefinition } from '../../controlDefinition.js';
|
||||
import type { HIDDevice } from '../../hid-device.js';
|
||||
import type { EncoderLedService } from './interface.js';
|
||||
export declare class GalleonK100EncoderLedService implements EncoderLedService {
|
||||
#private;
|
||||
constructor(device: HIDDevice, allControls: Readonly<StreamDeckControlDefinition[]>);
|
||||
clearAll(): Promise<void>;
|
||||
setEncoderColor(encoder: EncoderIndex, _red: number, _green: number, _blue: number): Promise<void>;
|
||||
setEncoderRingSingleColor(encoder: EncoderIndex, red: number, green: number, blue: number): Promise<void>;
|
||||
setEncoderRingColors(encoder: EncoderIndex, colors: number[] | Uint8Array): Promise<void>;
|
||||
}
|
||||
//# sourceMappingURL=galleonK100.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/galleonK100.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/galleonK100.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"galleonK100.d.ts","sourceRoot":"","sources":["../../../src/services/encoderLed/galleonK100.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,2BAA2B,EAAsC,MAAM,4BAA4B,CAAA;AACjH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEvD,qBAAa,4BAA6B,YAAW,iBAAiB;;gBAIzD,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAC,2BAA2B,EAAE,CAAC;IAOtE,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAUzB,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOlG,yBAAyB,CACrC,OAAO,EAAE,YAAY,EACrB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC;IAgBH,oBAAoB,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CA8CtG"}
|
||||
75
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/galleonK100.js
generated
vendored
Normal file
75
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/galleonK100.js
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GalleonK100EncoderLedService = void 0;
|
||||
class GalleonK100EncoderLedService {
|
||||
#device;
|
||||
#encoderControls;
|
||||
constructor(device, allControls) {
|
||||
this.#device = device;
|
||||
this.#encoderControls = allControls.filter((control) => control.type === 'encoder');
|
||||
}
|
||||
async clearAll() {
|
||||
const ps = [];
|
||||
for (const control of this.#encoderControls) {
|
||||
if (control.ledRingSteps > 0)
|
||||
ps.push(this.setEncoderRingSingleColor(control.index, 0, 0, 0));
|
||||
}
|
||||
await Promise.all(ps);
|
||||
}
|
||||
async setEncoderColor(encoder, _red, _green, _blue) {
|
||||
const control = this.#encoderControls.find((c) => c.index === encoder);
|
||||
if (!control)
|
||||
throw new Error(`Invalid encoder index ${encoder}`);
|
||||
throw new Error('Encoder does not have an LED');
|
||||
}
|
||||
async setEncoderRingSingleColor(encoder, red, green, blue) {
|
||||
const control = this.#encoderControls.find((c) => c.index === encoder);
|
||||
if (!control)
|
||||
throw new Error(`Invalid encoder index ${encoder}`);
|
||||
if (control.ledRingSteps <= 0)
|
||||
throw new Error('Encoder does not have an LED ring');
|
||||
// Assume them all the same number of steps
|
||||
const offset = (1 - encoder) * control.ledRingSteps;
|
||||
const ps = [];
|
||||
for (let i = 0; i < control.ledRingSteps; i++) {
|
||||
ps.push(this.#sendEncoderPixelColor(offset + i, red, green, blue));
|
||||
}
|
||||
await Promise.all(ps);
|
||||
}
|
||||
async setEncoderRingColors(encoder, colors) {
|
||||
const control = this.#encoderControls.find((c) => c.index === encoder);
|
||||
if (!control)
|
||||
throw new Error(`Invalid encoder index ${encoder}`);
|
||||
if (control.ledRingSteps <= 0)
|
||||
throw new Error('Encoder does not have an LED ring');
|
||||
if (colors.length !== control.ledRingSteps * 3)
|
||||
throw new Error('Invalid colors length');
|
||||
let colorsArray = colors instanceof Uint8Array ? Array.from(colors) : colors;
|
||||
// If there is an offset, repack the buffer to change the start point
|
||||
if (control.lcdRingOffset) {
|
||||
const oldColorsArray = colorsArray;
|
||||
colorsArray = [];
|
||||
colorsArray.push(...oldColorsArray.slice(control.lcdRingOffset * 3));
|
||||
colorsArray.push(...oldColorsArray.slice(0, control.lcdRingOffset * 3));
|
||||
}
|
||||
// Assume them all the same number of steps
|
||||
const offset = (1 - encoder) * control.ledRingSteps;
|
||||
const ps = [];
|
||||
for (let i = 0; i < control.ledRingSteps; i++) {
|
||||
ps.push(this.#sendEncoderPixelColor(offset + i, colorsArray[i * 3], colorsArray[i * 3 + 1], colorsArray[i * 3 + 2]));
|
||||
}
|
||||
await Promise.all(ps);
|
||||
}
|
||||
async #sendEncoderPixelColor(index, red, green, blue) {
|
||||
const buffer = new Uint8Array(6);
|
||||
buffer[0] = 0x03;
|
||||
buffer[1] = 0x24;
|
||||
buffer[2] = index;
|
||||
buffer[3] = red;
|
||||
buffer[4] = green;
|
||||
buffer[5] = blue;
|
||||
await this.#device.sendFeatureReport(buffer);
|
||||
}
|
||||
}
|
||||
exports.GalleonK100EncoderLedService = GalleonK100EncoderLedService;
|
||||
//# sourceMappingURL=galleonK100.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/galleonK100.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/galleonK100.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"galleonK100.js","sourceRoot":"","sources":["../../../src/services/encoderLed/galleonK100.ts"],"names":[],"mappings":";;;AAKA,MAAa,4BAA4B;IAC/B,OAAO,CAAW;IAClB,gBAAgB,CAAgD;IAEzE,YAAY,MAAiB,EAAE,WAAoD;QAClF,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;QACrB,IAAI,CAAC,gBAAgB,GAAG,WAAW,CAAC,MAAM,CACzC,CAAC,OAAO,EAAiD,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,CACtF,CAAA;IACF,CAAC;IAEM,KAAK,CAAC,QAAQ;QACpB,MAAM,EAAE,GAAyB,EAAE,CAAA;QAEnC,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC7C,IAAI,OAAO,CAAC,YAAY,GAAG,CAAC;gBAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CA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AAG,OAAO,CAAC,YAAY,EAAE,CAAC,EAAE,EAAE,CAAC;YAC/C,EAAE,CAAC,IAAI,CACN,IAAI,CAAC,sBAAsB,CAC1B,MAAM,GAAG,CAAC,EACV,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,EAClB,WAAW,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EACtB,WAAW,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CACtB,CACD,CAAA;QACF,CAAC;QACD,MAAM,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,sBAAsB,CAAC,KAAa,EAAE,GAAW,EAAE,KAAa,EAAE,IAAY;QACnF,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAA;QAChC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;QAChB,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;QAChB,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAA;QACjB,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,CAAA;QACf,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAA;QACjB,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;QAChB,MAAM,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAC7C,CAAC;CACD;AA/FD,oEA+FC"}
|
||||
8
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/interface.d.ts
generated
vendored
Normal file
8
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/interface.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import type { EncoderIndex } from '../../id.js';
|
||||
export interface EncoderLedService {
|
||||
clearAll(): Promise<void>;
|
||||
setEncoderColor(encoder: EncoderIndex, red: number, green: number, blue: number): Promise<void>;
|
||||
setEncoderRingSingleColor(encoder: EncoderIndex, red: number, green: number, blue: number): Promise<void>;
|
||||
setEncoderRingColors(encoder: EncoderIndex, colors: number[] | Uint8Array): Promise<void>;
|
||||
}
|
||||
//# sourceMappingURL=interface.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/interface.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/interface.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/services/encoderLed/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,MAAM,WAAW,iBAAiB;IACjC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAEzB,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAE/F,yBAAyB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAEzG,oBAAoB,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACzF"}
|
||||
3
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/interface.js
generated
vendored
Normal file
3
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/interface.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=interface.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/interface.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/interface.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../src/services/encoderLed/interface.ts"],"names":[],"mappings":""}
|
||||
13
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/studio.d.ts
generated
vendored
Normal file
13
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/studio.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { EncoderIndex } from '../../id.js';
|
||||
import type { StreamDeckControlDefinition } from '../../controlDefinition.js';
|
||||
import type { HIDDevice } from '../../hid-device.js';
|
||||
import type { EncoderLedService } from './interface.js';
|
||||
export declare class StudioEncoderLedService implements EncoderLedService {
|
||||
#private;
|
||||
constructor(device: HIDDevice, allControls: Readonly<StreamDeckControlDefinition[]>);
|
||||
clearAll(): Promise<void>;
|
||||
setEncoderColor(encoder: EncoderIndex, red: number, green: number, blue: number): Promise<void>;
|
||||
setEncoderRingSingleColor(encoder: EncoderIndex, red: number, green: number, blue: number): Promise<void>;
|
||||
setEncoderRingColors(encoder: EncoderIndex, colors: number[] | Uint8Array): Promise<void>;
|
||||
}
|
||||
//# sourceMappingURL=studio.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/studio.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/studio.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"studio.d.ts","sourceRoot":"","sources":["../../../src/services/encoderLed/studio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,2BAA2B,EAAsC,MAAM,4BAA4B,CAAA;AACjH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEvD,qBAAa,uBAAwB,YAAW,iBAAiB;;gBAIpD,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAC,2BAA2B,EAAE,CAAC;IAOtE,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAWzB,eAAe,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB/F,yBAAyB,CACrC,OAAO,EAAE,YAAY,EACrB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC;IAoBH,oBAAoB,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CA2BtG"}
|
||||
79
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/studio.js
generated
vendored
Normal file
79
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/studio.js
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.StudioEncoderLedService = void 0;
|
||||
class StudioEncoderLedService {
|
||||
#device;
|
||||
#encoderControls;
|
||||
constructor(device, allControls) {
|
||||
this.#device = device;
|
||||
this.#encoderControls = allControls.filter((control) => control.type === 'encoder');
|
||||
}
|
||||
async clearAll() {
|
||||
const ps = [];
|
||||
for (const control of this.#encoderControls) {
|
||||
if (control.hasLed)
|
||||
ps.push(this.setEncoderColor(control.index, 0, 0, 0));
|
||||
if (control.ledRingSteps > 0)
|
||||
ps.push(this.setEncoderRingSingleColor(control.index, 0, 0, 0));
|
||||
}
|
||||
await Promise.all(ps);
|
||||
}
|
||||
async setEncoderColor(encoder, red, green, blue) {
|
||||
const control = this.#encoderControls.find((c) => c.index === encoder);
|
||||
if (!control)
|
||||
throw new Error(`Invalid encoder index ${encoder}`);
|
||||
if (!control.hasLed)
|
||||
throw new Error('Encoder does not have an LED');
|
||||
const buffer = new Uint8Array(1024);
|
||||
buffer[0] = 0x02;
|
||||
buffer[1] = 0x10;
|
||||
buffer[2] = encoder;
|
||||
buffer[3] = red;
|
||||
buffer[4] = green;
|
||||
buffer[5] = blue;
|
||||
await this.#device.sendReports([buffer]);
|
||||
}
|
||||
async setEncoderRingSingleColor(encoder, red, green, blue) {
|
||||
const control = this.#encoderControls.find((c) => c.index === encoder);
|
||||
if (!control)
|
||||
throw new Error(`Invalid encoder index ${encoder}`);
|
||||
if (control.ledRingSteps <= 0)
|
||||
throw new Error('Encoder does not have an LED ring');
|
||||
const buffer = new Uint8Array(1024);
|
||||
buffer[0] = 0x02;
|
||||
buffer[1] = 0x0f;
|
||||
buffer[2] = encoder;
|
||||
for (let i = 0; i < control.ledRingSteps; i++) {
|
||||
const offset = 3 + i * 3;
|
||||
buffer[offset] = red;
|
||||
buffer[offset + 1] = green;
|
||||
buffer[offset + 2] = blue;
|
||||
}
|
||||
await this.#device.sendReports([buffer]);
|
||||
}
|
||||
async setEncoderRingColors(encoder, colors) {
|
||||
const control = this.#encoderControls.find((c) => c.index === encoder);
|
||||
if (!control)
|
||||
throw new Error(`Invalid encoder index ${encoder}`);
|
||||
if (control.ledRingSteps <= 0)
|
||||
throw new Error('Encoder does not have an LED ring');
|
||||
if (colors.length !== control.ledRingSteps * 3)
|
||||
throw new Error('Invalid colors length');
|
||||
let colorsBuffer = colors instanceof Uint8Array ? colors : new Uint8Array(colors);
|
||||
// If there is an offset, repack the buffer to change the start point
|
||||
if (control.lcdRingOffset) {
|
||||
const oldColorsBuffer = colorsBuffer;
|
||||
colorsBuffer = new Uint8Array(oldColorsBuffer.length);
|
||||
colorsBuffer.set(oldColorsBuffer.slice(control.lcdRingOffset * 3), 0);
|
||||
colorsBuffer.set(oldColorsBuffer.slice(0, control.lcdRingOffset * 3), control.lcdRingOffset * 3);
|
||||
}
|
||||
const buffer = new Uint8Array(1024);
|
||||
buffer[0] = 0x02;
|
||||
buffer[1] = 0x0f;
|
||||
buffer[2] = encoder;
|
||||
buffer.set(colorsBuffer, 3);
|
||||
await this.#device.sendReports([buffer]);
|
||||
}
|
||||
}
|
||||
exports.StudioEncoderLedService = StudioEncoderLedService;
|
||||
//# sourceMappingURL=studio.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/studio.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/encoderLed/studio.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"studio.js","sourceRoot":"","sources":["../../../src/services/encoderLed/studio.ts"],"names":[],"mappings":";;;AAKA,MAAa,uBAAuB;IAC1B,OAAO,CAAW;IAClB,gBAAgB,CAAgD;IAEzE,YAAY,MAAiB,EAAE,WAAoD;QAClF,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;QACrB,IAAI,CAAC,gBAAgB,GAAG,WAAW,CAAC,MAAM,CACzC,CAAC,OAAO,EAAiD,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,CACtF,CAAA;IACF,CAAC;IAEM,KAAK,CAAC,QAAQ;QACpB,MAAM,EAAE,GAAyB,EAAE,CAAA;QAEnC,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC7C,IAAI,OAAO,CAAC,MAAM;gBAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;YACzE,IAAI,OAAO,CAAC,YAAY,GAAG,CAAC;gBAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QAC9F,CAAC;QAED,MAAM,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IACtB,CAAC;IAEM,KAAK,CAAC,eAAe,CAAC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,CAAC,aAAa,EAAE,CAAC;YAC3B,MAAM,eAAe,GAAG,YAAY,CAAA;YACpC,YAAY,GAAG,IAAI,UAAU,CAAC,eAAe,CAAC,MAAM,CAAC,CAAA;YAErD,YAAY,CAAC,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;YACrE,YAAY,CAAC,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,aAAa,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,aAAa,GAAG,CAAC,CAAC,CAAA;QACjG,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;QACnC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;QAChB,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;QAChB,MAAM,CAAC,CAAC,CAAC,GAAG,OAAO,CAAA;QACnB,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC,CAAA;QAE3B,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IACzC,CAAC;CACD;AA1FD,0DA0FC"}
|
||||
9
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/bitmap.d.ts
generated
vendored
Normal file
9
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/bitmap.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { ButtonLcdImagePacker, InternalFillImageOptions } from './interface.js';
|
||||
import type { FillImageTargetOptions } from '../../util.js';
|
||||
import type { Dimension } from '../../id.js';
|
||||
export declare class BitmapButtonLcdImagePacker implements ButtonLcdImagePacker {
|
||||
#private;
|
||||
constructor(targetOptions: FillImageTargetOptions, bmpImagePPM: number);
|
||||
convertPixelBuffer(sourceBuffer: Uint8Array, sourceOptions: InternalFillImageOptions, targetSize: Dimension): Promise<Uint8Array>;
|
||||
}
|
||||
//# sourceMappingURL=bitmap.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/bitmap.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/bitmap.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"bitmap.d.ts","sourceRoot":"","sources":["../../../src/services/imagePacker/bitmap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AACpF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAE3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C,qBAAa,0BAA2B,YAAW,oBAAoB;;gBAI1D,aAAa,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM;IAKzD,kBAAkB,CAC9B,YAAY,EAAE,UAAU,EACxB,aAAa,EAAE,wBAAwB,EACvC,UAAU,EAAE,SAAS,GACnB,OAAO,CAAC,UAAU,CAAC;CAkBtB"}
|
||||
19
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/bitmap.js
generated
vendored
Normal file
19
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/bitmap.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.BitmapButtonLcdImagePacker = void 0;
|
||||
const util_js_1 = require("../../util.js");
|
||||
class BitmapButtonLcdImagePacker {
|
||||
#targetOptions;
|
||||
#bmpImagePPM;
|
||||
constructor(targetOptions, bmpImagePPM) {
|
||||
this.#targetOptions = targetOptions;
|
||||
this.#bmpImagePPM = bmpImagePPM;
|
||||
}
|
||||
async convertPixelBuffer(sourceBuffer, sourceOptions, targetSize) {
|
||||
const byteBuffer = (0, util_js_1.transformImageBuffer)(sourceBuffer, sourceOptions, this.#targetOptions, util_js_1.BMP_HEADER_LENGTH, targetSize.width, targetSize.height);
|
||||
(0, util_js_1.writeBMPHeader)(byteBuffer, targetSize.width, targetSize.height, byteBuffer.length - util_js_1.BMP_HEADER_LENGTH, this.#bmpImagePPM);
|
||||
return byteBuffer;
|
||||
}
|
||||
}
|
||||
exports.BitmapButtonLcdImagePacker = BitmapButtonLcdImagePacker;
|
||||
//# sourceMappingURL=bitmap.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/bitmap.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/bitmap.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"bitmap.js","sourceRoot":"","sources":["../../../src/services/imagePacker/bitmap.ts"],"names":[],"mappings":";;;AAEA,2CAAuF;AAGvF,MAAa,0BAA0B;IAC7B,cAAc,CAAwB;IACtC,YAAY,CAAQ;IAE7B,YAAY,aAAqC,EAAE,WAAmB;QACrE,IAAI,CAAC,cAAc,GAAG,aAAa,CAAA;QACnC,IAAI,CAAC,YAAY,GAAG,WAAW,CAAA;IAChC,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAC9B,YAAwB,EACxB,aAAuC,EACvC,UAAqB;QAErB,MAAM,UAAU,GAAG,IAAA,8BAAoB,EACtC,YAAY,EACZ,aAAa,EACb,IAAI,CAAC,cAAc,EACnB,2BAAiB,EACjB,UAAU,CAAC,KAAK,EAChB,UAAU,CAAC,MAAM,CACjB,CAAA;QACD,IAAA,wBAAc,EACb,UAAU,EACV,UAAU,CAAC,KAAK,EAChB,UAAU,CAAC,MAAM,EACjB,UAAU,CAAC,MAAM,GAAG,2BAAiB,EACrC,IAAI,CAAC,YAAY,CACjB,CAAA;QACD,OAAO,UAAU,CAAA;IAClB,CAAC;CACD;AA/BD,gEA+BC"}
|
||||
10
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/interface.d.ts
generated
vendored
Normal file
10
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/interface.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import type { Dimension } from '../../id.js';
|
||||
import type { FillImageOptions } from '../../types.js';
|
||||
export interface InternalFillImageOptions extends FillImageOptions {
|
||||
offset: number;
|
||||
stride: number;
|
||||
}
|
||||
export interface ButtonLcdImagePacker {
|
||||
convertPixelBuffer(sourceBuffer: Uint8Array | Uint8ClampedArray, sourceOptions: InternalFillImageOptions, targetSize: Dimension): Promise<Uint8Array>;
|
||||
}
|
||||
//# sourceMappingURL=interface.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/interface.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/interface.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/services/imagePacker/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEtD,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;IACjE,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,oBAAoB;IACpC,kBAAkB,CACjB,YAAY,EAAE,UAAU,GAAG,iBAAiB,EAC5C,aAAa,EAAE,wBAAwB,EACvC,UAAU,EAAE,SAAS,GACnB,OAAO,CAAC,UAAU,CAAC,CAAA;CACtB"}
|
||||
3
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/interface.js
generated
vendored
Normal file
3
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/interface.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=interface.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/interface.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/interface.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../src/services/imagePacker/interface.ts"],"names":[],"mappings":""}
|
||||
9
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/jpeg.d.ts
generated
vendored
Normal file
9
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/jpeg.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { ButtonLcdImagePacker, InternalFillImageOptions } from './interface.js';
|
||||
import type { EncodeJPEGHelper } from '../../models/base.js';
|
||||
import type { Dimension } from '../../id.js';
|
||||
export declare class JpegButtonLcdImagePacker implements ButtonLcdImagePacker {
|
||||
#private;
|
||||
constructor(encodeJPEG: EncodeJPEGHelper, xyFlip: boolean);
|
||||
convertPixelBuffer(sourceBuffer: Uint8Array, sourceOptions: InternalFillImageOptions, targetSize: Dimension): Promise<Uint8Array>;
|
||||
}
|
||||
//# sourceMappingURL=jpeg.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/jpeg.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/jpeg.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"jpeg.d.ts","sourceRoot":"","sources":["../../../src/services/imagePacker/jpeg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAEpF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C,qBAAa,wBAAyB,YAAW,oBAAoB;;gBAIxD,UAAU,EAAE,gBAAgB,EAAE,MAAM,EAAE,OAAO;IAK5C,kBAAkB,CAC9B,YAAY,EAAE,UAAU,EACxB,aAAa,EAAE,wBAAwB,EACvC,UAAU,EAAE,SAAS,GACnB,OAAO,CAAC,UAAU,CAAC;CAYtB"}
|
||||
18
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/jpeg.js
generated
vendored
Normal file
18
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/jpeg.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.JpegButtonLcdImagePacker = void 0;
|
||||
const util_js_1 = require("../../util.js");
|
||||
class JpegButtonLcdImagePacker {
|
||||
#encodeJPEG;
|
||||
#xyFlip;
|
||||
constructor(encodeJPEG, xyFlip) {
|
||||
this.#encodeJPEG = encodeJPEG;
|
||||
this.#xyFlip = xyFlip;
|
||||
}
|
||||
async convertPixelBuffer(sourceBuffer, sourceOptions, targetSize) {
|
||||
const byteBuffer = (0, util_js_1.transformImageBuffer)(sourceBuffer, sourceOptions, { colorMode: 'rgba', xFlip: this.#xyFlip, yFlip: this.#xyFlip }, 0, targetSize.width, targetSize.height);
|
||||
return this.#encodeJPEG(byteBuffer, targetSize.width, targetSize.height);
|
||||
}
|
||||
}
|
||||
exports.JpegButtonLcdImagePacker = JpegButtonLcdImagePacker;
|
||||
//# sourceMappingURL=jpeg.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/jpeg.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/imagePacker/jpeg.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"jpeg.js","sourceRoot":"","sources":["../../../src/services/imagePacker/jpeg.ts"],"names":[],"mappings":";;;AACA,2CAAoD;AAIpD,MAAa,wBAAwB;IAC3B,WAAW,CAAkB;IAC7B,OAAO,CAAS;IAEzB,YAAY,UAA4B,EAAE,MAAe;QACxD,IAAI,CAAC,WAAW,GAAG,UAAU,CAAA;QAC7B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;IACtB,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAC9B,YAAwB,EACxB,aAAuC,EACvC,UAAqB;QAErB,MAAM,UAAU,GAAG,IAAA,8BAAoB,EACtC,YAAY,EACZ,aAAa,EACb,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,EAC/D,CAAC,EACD,UAAU,CAAC,KAAK,EAChB,UAAU,CAAC,MAAM,CACjB,CAAA;QAED,OAAO,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,CAAA;IACzE,CAAC;CACD;AAzBD,4DAyBC"}
|
||||
24
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/headerGenerator.d.ts
generated
vendored
Normal file
24
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/headerGenerator.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import type { StreamdeckImageHeaderGenerator, StreamdeckImageWriterProps } from './types.js';
|
||||
export declare class StreamdeckGen1ImageHeaderGenerator implements StreamdeckImageHeaderGenerator {
|
||||
getFillImageCommandHeaderLength(): number;
|
||||
writeFillImageCommandHeader(buffer: Uint8Array, props: StreamdeckImageWriterProps, partIndex: number, isLast: boolean, _bodyLength: number): void;
|
||||
}
|
||||
export declare class StreamdeckGen2ImageHeaderGenerator implements StreamdeckImageHeaderGenerator {
|
||||
getFillImageCommandHeaderLength(): number;
|
||||
writeFillImageCommandHeader(buffer: Uint8Array, props: StreamdeckImageWriterProps, partIndex: number, isLast: boolean, bodyLength: number): void;
|
||||
}
|
||||
export interface StreamdeckPlusHeaderProps {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
export declare class StreamdeckDefaultLcdImageHeaderGenerator implements StreamdeckImageHeaderGenerator<StreamdeckPlusHeaderProps> {
|
||||
getFillImageCommandHeaderLength(): number;
|
||||
writeFillImageCommandHeader(buffer: Uint8Array, props: StreamdeckPlusHeaderProps, partIndex: number, isLast: boolean, bodyLength: number): void;
|
||||
}
|
||||
export declare class StreamdeckNeoLcdImageHeaderGenerator implements StreamdeckImageHeaderGenerator<null> {
|
||||
getFillImageCommandHeaderLength(): number;
|
||||
writeFillImageCommandHeader(buffer: Uint8Array, _props: never, partIndex: number, isLast: boolean, bodyLength: number): void;
|
||||
}
|
||||
//# sourceMappingURL=headerGenerator.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/headerGenerator.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/headerGenerator.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"headerGenerator.d.ts","sourceRoot":"","sources":["../../../src/services/imageWriter/headerGenerator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,8BAA8B,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAA;AAE5F,qBAAa,kCAAmC,YAAW,8BAA8B;IACxF,+BAA+B,IAAI,MAAM;IAIzC,2BAA2B,CAC1B,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,0BAA0B,EACjC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,EACf,WAAW,EAAE,MAAM,GACjB,IAAI;CASP;AAED,qBAAa,kCAAmC,YAAW,8BAA8B;IACxF,+BAA+B,IAAI,MAAM;IAIzC,2BAA2B,CAC1B,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,0BAA0B,EACjC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,MAAM,GAChB,IAAI;CAUP;AAED,MAAM,WAAW,yBAAyB;IACzC,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACd;AACD,qBAAa,wCAAyC,YAAW,8BAA8B,CAAC,yBAAyB,CAAC;IACzH,+BAA+B,IAAI,MAAM;IAIzC,2BAA2B,CAC1B,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,yBAAyB,EAChC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,MAAM,GAChB,IAAI;CAaP;AAED,qBAAa,oCAAqC,YAAW,8BAA8B,CAAC,IAAI,CAAC;IAChG,+BAA+B,IAAI,MAAM;IAIzC,2BAA2B,CAC1B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,KAAK,EACb,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,MAAM,GAChB,IAAI;CAUP"}
|
||||
67
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/headerGenerator.js
generated
vendored
Normal file
67
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/headerGenerator.js
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.StreamdeckNeoLcdImageHeaderGenerator = exports.StreamdeckDefaultLcdImageHeaderGenerator = exports.StreamdeckGen2ImageHeaderGenerator = exports.StreamdeckGen1ImageHeaderGenerator = void 0;
|
||||
const util_js_1 = require("../../util.js");
|
||||
class StreamdeckGen1ImageHeaderGenerator {
|
||||
getFillImageCommandHeaderLength() {
|
||||
return 16;
|
||||
}
|
||||
writeFillImageCommandHeader(buffer, props, partIndex, isLast, _bodyLength) {
|
||||
const bufferView = (0, util_js_1.uint8ArrayToDataView)(buffer);
|
||||
bufferView.setUint8(0, 0x02);
|
||||
bufferView.setUint8(1, 0x01);
|
||||
bufferView.setUint16(2, partIndex, true);
|
||||
bufferView.setUint8(4, isLast ? 1 : 0);
|
||||
bufferView.setUint8(5, props.keyIndex + 1);
|
||||
}
|
||||
}
|
||||
exports.StreamdeckGen1ImageHeaderGenerator = StreamdeckGen1ImageHeaderGenerator;
|
||||
class StreamdeckGen2ImageHeaderGenerator {
|
||||
getFillImageCommandHeaderLength() {
|
||||
return 8;
|
||||
}
|
||||
writeFillImageCommandHeader(buffer, props, partIndex, isLast, bodyLength) {
|
||||
const bufferView = (0, util_js_1.uint8ArrayToDataView)(buffer);
|
||||
bufferView.setUint8(0, 0x02);
|
||||
bufferView.setUint8(1, 0x07);
|
||||
bufferView.setUint8(2, props.keyIndex);
|
||||
bufferView.setUint8(3, isLast ? 1 : 0);
|
||||
bufferView.setUint16(4, bodyLength, true);
|
||||
bufferView.setUint16(6, partIndex++, true);
|
||||
}
|
||||
}
|
||||
exports.StreamdeckGen2ImageHeaderGenerator = StreamdeckGen2ImageHeaderGenerator;
|
||||
class StreamdeckDefaultLcdImageHeaderGenerator {
|
||||
getFillImageCommandHeaderLength() {
|
||||
return 16;
|
||||
}
|
||||
writeFillImageCommandHeader(buffer, props, partIndex, isLast, bodyLength) {
|
||||
const bufferView = (0, util_js_1.uint8ArrayToDataView)(buffer);
|
||||
bufferView.setUint8(0, 0x02);
|
||||
bufferView.setUint8(1, 0x0c);
|
||||
bufferView.setUint16(2, props.x, true);
|
||||
bufferView.setUint16(4, props.y, true);
|
||||
bufferView.setUint16(6, props.width, true);
|
||||
bufferView.setUint16(8, props.height, true);
|
||||
bufferView.setUint8(10, isLast ? 1 : 0);
|
||||
bufferView.setUint16(11, partIndex, true);
|
||||
bufferView.setUint16(13, bodyLength, true);
|
||||
}
|
||||
}
|
||||
exports.StreamdeckDefaultLcdImageHeaderGenerator = StreamdeckDefaultLcdImageHeaderGenerator;
|
||||
class StreamdeckNeoLcdImageHeaderGenerator {
|
||||
getFillImageCommandHeaderLength() {
|
||||
return 8;
|
||||
}
|
||||
writeFillImageCommandHeader(buffer, _props, partIndex, isLast, bodyLength) {
|
||||
const bufferView = (0, util_js_1.uint8ArrayToDataView)(buffer);
|
||||
bufferView.setUint8(0, 0x02);
|
||||
bufferView.setUint8(1, 0x0b);
|
||||
bufferView.setUint8(2, 0);
|
||||
bufferView.setUint8(3, isLast ? 1 : 0);
|
||||
bufferView.setUint16(4, bodyLength, true);
|
||||
bufferView.setUint16(6, partIndex, true);
|
||||
}
|
||||
}
|
||||
exports.StreamdeckNeoLcdImageHeaderGenerator = StreamdeckNeoLcdImageHeaderGenerator;
|
||||
//# sourceMappingURL=headerGenerator.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/headerGenerator.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/headerGenerator.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"headerGenerator.js","sourceRoot":"","sources":["../../../src/services/imageWriter/headerGenerator.ts"],"names":[],"mappings":";;;AAAA,2CAAoD;AAGpD,MAAa,kCAAkC;IAC9C,+BAA+B;QAC9B,OAAO,EAAE,CAAA;IACV,CAAC;IAED,2BAA2B,CAC1B,MAAkB,EAClB,KAAiC,EACjC,SAAiB,EACjB,MAAe,EACf,WAAmB;QAEnB,MAAM,UAAU,GAAG,IAAA,8BAAoB,EAAC,MAAM,CAAC,CAAA;QAE/C,UAAU,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QAC5B,UAAU,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QAC5B,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;QACxC,UAAU,CAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QACtC,UAAU,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAA;IAC3C,CAAC;CACD;AApBD,gFAoBC;AAED,MAAa,kCAAkC;IAC9C,+BAA+B;QAC9B,OAAO,CAAC,CAAA;IACT,CAAC;IAED,2BAA2B,CAC1B,MAAkB,EAClB,KAAiC,EACjC,SAAiB,EAC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AE,IAAI,CAAC,CAAA;QAC3C,UAAU,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QACvC,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;QACzC,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,CAAA;IAC3C,CAAC;CACD;AAxBD,4FAwBC;AAED,MAAa,oCAAoC;IAChD,+BAA+B;QAC9B,OAAO,CAAC,CAAA;IACT,CAAC;IAED,2BAA2B,CAC1B,MAAkB,EAClB,MAAa,EACb,SAAiB,EACjB,MAAe,EACf,UAAkB;QAElB,MAAM,UAAU,GAAG,IAAA,8BAAoB,EAAC,MAAM,CAAC,CAAA;QAE/C,UAAU,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QAC5B,UAAU,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QAC5B,UAAU,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QACzB,UAAU,CAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QACtC,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,CAAA;QACzC,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;IACzC,CAAC;CACD;AArBD,oFAqBC"}
|
||||
11
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/imageWriter.d.ts
generated
vendored
Normal file
11
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/imageWriter.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { StreamdeckImageHeaderGenerator, StreamdeckImageWriter, StreamdeckImageWriterProps } from './types.js';
|
||||
export declare class StreamdeckOriginalImageWriter implements StreamdeckImageWriter {
|
||||
private readonly headerGenerator;
|
||||
generateFillImageWrites(props: StreamdeckImageWriterProps, byteBuffer: Uint8Array): Uint8Array[];
|
||||
}
|
||||
export declare class StreamdeckDefaultImageWriter<TProps = StreamdeckImageWriterProps> implements StreamdeckImageWriter<TProps> {
|
||||
private readonly headerGenerator;
|
||||
constructor(headerGenerator: StreamdeckImageHeaderGenerator<TProps>);
|
||||
generateFillImageWrites(props: TProps, byteBuffer: Uint8Array): Uint8Array[];
|
||||
}
|
||||
//# sourceMappingURL=imageWriter.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/imageWriter.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/imageWriter.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"imageWriter.d.ts","sourceRoot":"","sources":["../../../src/services/imageWriter/imageWriter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,8BAA8B,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAA;AAEnH,qBAAa,6BAA8B,YAAW,qBAAqB;IAC1E,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA2C;IAEpE,uBAAuB,CAAC,KAAK,EAAE,0BAA0B,EAAE,UAAU,EAAE,UAAU,GAAG,UAAU,EAAE;CAkBvG;AAED,qBAAa,4BAA4B,CACxC,MAAM,GAAG,0BAA0B,CAClC,YAAW,qBAAqB,CAAC,MAAM,CAAC;IACzC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAwC;gBAE5D,eAAe,EAAE,8BAA8B,CAAC,MAAM,CAAC;IAI5D,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,UAAU,EAAE;CA6BnF"}
|
||||
46
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/imageWriter.js
generated
vendored
Normal file
46
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/imageWriter.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.StreamdeckDefaultImageWriter = exports.StreamdeckOriginalImageWriter = void 0;
|
||||
const headerGenerator_js_1 = require("./headerGenerator.js");
|
||||
class StreamdeckOriginalImageWriter {
|
||||
headerGenerator = new headerGenerator_js_1.StreamdeckGen1ImageHeaderGenerator();
|
||||
generateFillImageWrites(props, byteBuffer) {
|
||||
const MAX_PACKET_SIZE = 8191;
|
||||
const PACKET_HEADER_LENGTH = this.headerGenerator.getFillImageCommandHeaderLength();
|
||||
// The original uses larger packets, and splits the payload equally across 2
|
||||
const packet1Bytes = byteBuffer.length / 2;
|
||||
const packet1 = new Uint8Array(MAX_PACKET_SIZE);
|
||||
this.headerGenerator.writeFillImageCommandHeader(packet1, props, 0x01, false, packet1Bytes);
|
||||
packet1.set(byteBuffer.subarray(0, packet1Bytes), PACKET_HEADER_LENGTH);
|
||||
const packet2 = new Uint8Array(MAX_PACKET_SIZE);
|
||||
this.headerGenerator.writeFillImageCommandHeader(packet2, props, 0x02, true, packet1Bytes);
|
||||
packet2.set(byteBuffer.subarray(packet1Bytes), PACKET_HEADER_LENGTH);
|
||||
return [packet1, packet2];
|
||||
}
|
||||
}
|
||||
exports.StreamdeckOriginalImageWriter = StreamdeckOriginalImageWriter;
|
||||
class StreamdeckDefaultImageWriter {
|
||||
headerGenerator;
|
||||
constructor(headerGenerator) {
|
||||
this.headerGenerator = headerGenerator;
|
||||
}
|
||||
generateFillImageWrites(props, byteBuffer) {
|
||||
const MAX_PACKET_SIZE = 1024;
|
||||
const PACKET_HEADER_LENGTH = this.headerGenerator.getFillImageCommandHeaderLength();
|
||||
const MAX_PAYLOAD_SIZE = MAX_PACKET_SIZE - PACKET_HEADER_LENGTH;
|
||||
const result = [];
|
||||
let remainingBytes = byteBuffer.length;
|
||||
for (let part = 0; remainingBytes > 0; part++) {
|
||||
const packet = new Uint8Array(MAX_PACKET_SIZE);
|
||||
const byteCount = Math.min(remainingBytes, MAX_PAYLOAD_SIZE);
|
||||
this.headerGenerator.writeFillImageCommandHeader(packet, props, part, remainingBytes <= MAX_PAYLOAD_SIZE, byteCount);
|
||||
const byteOffset = byteBuffer.length - remainingBytes;
|
||||
remainingBytes -= byteCount;
|
||||
packet.set(byteBuffer.subarray(byteOffset, byteOffset + byteCount), PACKET_HEADER_LENGTH);
|
||||
result.push(packet);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
exports.StreamdeckDefaultImageWriter = StreamdeckDefaultImageWriter;
|
||||
//# sourceMappingURL=imageWriter.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/imageWriter.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/imageWriter.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"imageWriter.js","sourceRoot":"","sources":["../../../src/services/imageWriter/imageWriter.ts"],"names":[],"mappings":";;;AAAA,6DAAyE;AAGzE,MAAa,6BAA6B;IACxB,eAAe,GAAG,IAAI,uDAAkC,EAAE,CAAA;IAEpE,uBAAuB,CAAC,KAAiC,EAAE,UAAsB;QACvF,MAAM,eAAe,GAAG,IAAI,CAAA;QAC5B,MAAM,oBAAoB,GAAG,IAAI,CAAC,eAAe,CAAC,+BAA+B,EAAE,CAAA;QAEnF,4EAA4E;QAE5E,MAAM,YAAY,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,CAAA;QAE1C,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,eAAe,CAAC,CAAA;QAC/C,IAAI,CAAC,eAAe,CAAC,2BAA2B,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,CAAC,CAAA;QAC3F,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,EAAE,YAAY,CAAC,EAAE,oBAAoB,CAA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CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,CAAC,EAAE,oBAAoB,CAAC,CAAA;YAEzF,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACpB,CAAC;QAED,OAAO,MAAM,CAAA;IACd,CAAC;CACD;AAtCD,oEAsCC"}
|
||||
12
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/types.d.ts
generated
vendored
Normal file
12
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { KeyIndex } from '../../id.js';
|
||||
export interface StreamdeckImageWriterProps {
|
||||
keyIndex: KeyIndex;
|
||||
}
|
||||
export interface StreamdeckImageWriter<TProps = StreamdeckImageWriterProps> {
|
||||
generateFillImageWrites(props: TProps, byteBuffer: Uint8Array): Uint8Array[];
|
||||
}
|
||||
export interface StreamdeckImageHeaderGenerator<TProps = StreamdeckImageWriterProps> {
|
||||
getFillImageCommandHeaderLength(): number;
|
||||
writeFillImageCommandHeader(buffer: Uint8Array, props: TProps, partIndex: number, isLast: boolean, bodyLength: number): void;
|
||||
}
|
||||
//# sourceMappingURL=types.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/types.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/types.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/imageWriter/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C,MAAM,WAAW,0BAA0B;IAC1C,QAAQ,EAAE,QAAQ,CAAA;CAClB;AAED,MAAM,WAAW,qBAAqB,CAAC,MAAM,GAAG,0BAA0B;IACzE,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,GAAG,UAAU,EAAE,CAAA;CAC5E;AAED,MAAM,WAAW,8BAA8B,CAAC,MAAM,GAAG,0BAA0B;IAClF,+BAA+B,IAAI,MAAM,CAAA;IACzC,2BAA2B,CAC1B,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,EACf,UAAU,EAAE,MAAM,GAChB,IAAI,CAAA;CACP"}
|
||||
3
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/types.js
generated
vendored
Normal file
3
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/types.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=types.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/types.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/imageWriter/types.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/services/imageWriter/types.ts"],"names":[],"mappings":""}
|
||||
5
node_modules/@elgato-stream-deck/core/dist/services/input/fake.d.ts
generated
vendored
Normal file
5
node_modules/@elgato-stream-deck/core/dist/services/input/fake.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import type { StreamDeckInputService } from './interface.js';
|
||||
export declare class FakeInputService implements StreamDeckInputService {
|
||||
handleInput(_data: Uint8Array): void;
|
||||
}
|
||||
//# sourceMappingURL=fake.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/input/fake.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/input/fake.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"fake.d.ts","sourceRoot":"","sources":["../../../src/services/input/fake.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAE5D,qBAAa,gBAAiB,YAAW,sBAAsB;IAC9D,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;CAGpC"}
|
||||
10
node_modules/@elgato-stream-deck/core/dist/services/input/fake.js
generated
vendored
Normal file
10
node_modules/@elgato-stream-deck/core/dist/services/input/fake.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.FakeInputService = void 0;
|
||||
class FakeInputService {
|
||||
handleInput(_data) {
|
||||
// Noop
|
||||
}
|
||||
}
|
||||
exports.FakeInputService = FakeInputService;
|
||||
//# sourceMappingURL=fake.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/input/fake.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/input/fake.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"fake.js","sourceRoot":"","sources":["../../../src/services/input/fake.ts"],"names":[],"mappings":";;;AAEA,MAAa,gBAAgB;IAC5B,WAAW,CAAC,KAAiB;QAC5B,OAAO;IACR,CAAC;CACD;AAJD,4CAIC"}
|
||||
11
node_modules/@elgato-stream-deck/core/dist/services/input/gen1.d.ts
generated
vendored
Normal file
11
node_modules/@elgato-stream-deck/core/dist/services/input/gen1.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { StreamDeckProperties } from '../../models/base.js';
|
||||
import type { StreamDeckInputService } from './interface.js';
|
||||
import type { StreamDeckEvents } from '../../types.js';
|
||||
import type { CallbackHook } from '../callback-hook.js';
|
||||
export declare class ButtonOnlyInputService implements StreamDeckInputService {
|
||||
#private;
|
||||
protected readonly deviceProperties: Readonly<StreamDeckProperties>;
|
||||
constructor(deviceProperties: Readonly<StreamDeckProperties>, eventSource: CallbackHook<StreamDeckEvents>);
|
||||
handleInput(data: Uint8Array): void;
|
||||
}
|
||||
//# sourceMappingURL=gen1.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/input/gen1.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/input/gen1.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"gen1.d.ts","sourceRoot":"","sources":["../../../src/services/input/gen1.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAGvD,qBAAa,sBAAuB,YAAW,sBAAsB;;IACpE,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAA;gBAIvD,gBAAgB,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,WAAW,EAAE,YAAY,CAAC,gBAAgB,CAAC;IAUzG,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;CAkBnC"}
|
||||
34
node_modules/@elgato-stream-deck/core/dist/services/input/gen1.js
generated
vendored
Normal file
34
node_modules/@elgato-stream-deck/core/dist/services/input/gen1.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ButtonOnlyInputService = void 0;
|
||||
class ButtonOnlyInputService {
|
||||
deviceProperties;
|
||||
#keyState;
|
||||
#eventSource;
|
||||
constructor(deviceProperties, eventSource) {
|
||||
this.deviceProperties = deviceProperties;
|
||||
this.#eventSource = eventSource;
|
||||
const maxButtonIndex = this.deviceProperties.CONTROLS.filter((control) => control.type === 'button').map((control) => control.index);
|
||||
this.#keyState = new Array(Math.max(-1, ...maxButtonIndex) + 1).fill(false);
|
||||
}
|
||||
handleInput(data) {
|
||||
const dataOffset = this.deviceProperties.KEY_DATA_OFFSET || 0;
|
||||
for (const control of this.deviceProperties.CONTROLS) {
|
||||
if (control.type !== 'button')
|
||||
continue;
|
||||
const keyPressed = Boolean(data[dataOffset + control.hidIndex]);
|
||||
const stateChanged = keyPressed !== this.#keyState[control.index];
|
||||
if (stateChanged) {
|
||||
this.#keyState[control.index] = keyPressed;
|
||||
if (keyPressed) {
|
||||
this.#eventSource.emit('down', control);
|
||||
}
|
||||
else {
|
||||
this.#eventSource.emit('up', control);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.ButtonOnlyInputService = ButtonOnlyInputService;
|
||||
//# sourceMappingURL=gen1.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/input/gen1.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/input/gen1.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"gen1.js","sourceRoot":"","sources":["../../../src/services/input/gen1.ts"],"names":[],"mappings":";;;AAMA,MAAa,sBAAsB;IACf,gBAAgB,CAAgC;IAC1D,SAAS,CAAW;IACpB,YAAY,CAAgC;IAErD,YAAY,gBAAgD,EAAE,WAA2C;QACxG,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAA;QACxC,IAAI,CAAC,YAAY,GAAG,WAAW,CAAA;QAE/B,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAC3D,CAAC,OAAO,EAAgD,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,QAAQ,CACpF,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;QACjC,IAAI,CAAC,SAAS,GAAG,IAAI,KAAK,CAAU,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACrF,CAAC;IAED,WAAW,CAAC,IAAgB;QAC3B,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,eAAe,IAAI,CAAC,CAAA;QAE7D,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;YACtD,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ;gBAAE,SAAQ;YAEvC,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAA;YAC/D,MAAM,YAAY,GAAG,UAAU,KAAK,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;YACjE,IAAI,YAAY,EAAE,CAAC;gBAClB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,UAAU,CAAA;gBAC1C,IAAI,UAAU,EAAE,CAAC;oBAChB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;gBACxC,CAAC;qBAAM,CAAC;oBACP,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;gBACtC,CAAC;YACF,CAAC;QACF,CAAC;IACF,CAAC;CACD;AAjCD,wDAiCC"}
|
||||
10
node_modules/@elgato-stream-deck/core/dist/services/input/gen2.d.ts
generated
vendored
Normal file
10
node_modules/@elgato-stream-deck/core/dist/services/input/gen2.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import type { StreamDeckProperties } from '../../models/base.js';
|
||||
import type { StreamDeckEvents } from '../../types.js';
|
||||
import type { CallbackHook } from '../callback-hook.js';
|
||||
import { ButtonOnlyInputService } from './gen1.js';
|
||||
export declare class Gen2InputService extends ButtonOnlyInputService {
|
||||
#private;
|
||||
constructor(deviceProperties: Readonly<StreamDeckProperties>, eventSource: CallbackHook<StreamDeckEvents>);
|
||||
handleInput(data: Uint8Array): void;
|
||||
}
|
||||
//# sourceMappingURL=gen2.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/input/gen2.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/input/gen2.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"gen2.d.ts","sourceRoot":"","sources":["../../../src/services/input/gen2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,KAAK,EAAe,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAKvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAGlD,qBAAa,gBAAiB,SAAQ,sBAAsB;;gBAM/C,gBAAgB,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,WAAW,EAAE,YAAY,CAAC,gBAAgB,CAAC;IAezG,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;CAoFnC"}
|
||||
101
node_modules/@elgato-stream-deck/core/dist/services/input/gen2.js
generated
vendored
Normal file
101
node_modules/@elgato-stream-deck/core/dist/services/input/gen2.js
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Gen2InputService = void 0;
|
||||
const gen1_js_1 = require("./gen1.js");
|
||||
const util_js_1 = require("../../util.js");
|
||||
class Gen2InputService extends gen1_js_1.ButtonOnlyInputService {
|
||||
#eventSource;
|
||||
#encoderControls;
|
||||
#encoderState;
|
||||
#lcdSegmentControls;
|
||||
constructor(deviceProperties, eventSource) {
|
||||
super(deviceProperties, eventSource);
|
||||
this.#eventSource = eventSource;
|
||||
this.#encoderControls = deviceProperties.CONTROLS.filter((control) => control.type === 'encoder');
|
||||
const maxIndex = Math.max(-1, ...this.#encoderControls.map((control) => control.index));
|
||||
this.#encoderState = new Array(maxIndex + 1).fill(false);
|
||||
this.#lcdSegmentControls = deviceProperties.CONTROLS.filter((control) => control.type === 'lcd-segment');
|
||||
}
|
||||
handleInput(data) {
|
||||
const inputType = data[0];
|
||||
switch (inputType) {
|
||||
case 0x00: // Button
|
||||
super.handleInput(data);
|
||||
break;
|
||||
case 0x02: // LCD
|
||||
this.#handleLcdSegmentInput(data);
|
||||
break;
|
||||
case 0x03: // Encoder
|
||||
this.#handleEncoderInput(data);
|
||||
break;
|
||||
case 0x04: // NFC
|
||||
this.#handleNfcRead(data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#handleLcdSegmentInput(data) {
|
||||
// Future: This will need to handle selecting the correct control
|
||||
const lcdSegmentControl = this.#lcdSegmentControls.find((control) => control.id === 0);
|
||||
if (!lcdSegmentControl)
|
||||
return;
|
||||
const bufferView = (0, util_js_1.uint8ArrayToDataView)(data);
|
||||
const position = {
|
||||
x: bufferView.getUint16(5, true),
|
||||
y: bufferView.getUint16(7, true),
|
||||
};
|
||||
switch (data[3]) {
|
||||
case 1: // short press
|
||||
this.#eventSource.emit('lcdShortPress', lcdSegmentControl, position);
|
||||
break;
|
||||
case 2: // long press
|
||||
this.#eventSource.emit('lcdLongPress', lcdSegmentControl, position);
|
||||
break;
|
||||
case 3: {
|
||||
// swipe
|
||||
const positionTo = {
|
||||
x: bufferView.getUint16(9, true),
|
||||
y: bufferView.getUint16(11, true),
|
||||
};
|
||||
this.#eventSource.emit('lcdSwipe', lcdSegmentControl, position, positionTo);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#handleEncoderInput(data) {
|
||||
switch (data[3]) {
|
||||
case 0x00: // press/release
|
||||
for (const encoderControl of this.#encoderControls) {
|
||||
const keyPressed = Boolean(data[4 + encoderControl.hidIndex]);
|
||||
const stateChanged = keyPressed !== this.#encoderState[encoderControl.index];
|
||||
if (stateChanged) {
|
||||
this.#encoderState[encoderControl.index] = keyPressed;
|
||||
if (keyPressed) {
|
||||
this.#eventSource.emit('down', encoderControl);
|
||||
}
|
||||
else {
|
||||
this.#eventSource.emit('up', encoderControl);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0x01: // rotate
|
||||
for (const encoderControl of this.#encoderControls) {
|
||||
const intArray = new Int8Array(data.buffer, data.byteOffset, data.byteLength);
|
||||
const value = intArray[4 + encoderControl.hidIndex];
|
||||
if (value !== 0) {
|
||||
this.#eventSource.emit('rotate', encoderControl, value);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
#handleNfcRead(data) {
|
||||
if (!this.deviceProperties.HAS_NFC_READER)
|
||||
return;
|
||||
const length = data[1] + data[2] * 256;
|
||||
const id = new TextDecoder('ascii').decode(data.subarray(3, 3 + length));
|
||||
this.#eventSource.emit('nfcRead', id);
|
||||
}
|
||||
}
|
||||
exports.Gen2InputService = Gen2InputService;
|
||||
//# sourceMappingURL=gen2.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/input/gen2.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/input/gen2.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"gen2.js","sourceRoot":"","sources":["../../../src/services/input/gen2.ts"],"names":[],"mappings":";;;AAOA,uCAAkD;AAClD,2CAAoD;AAEpD,MAAa,gBAAiB,SAAQ,gCAAsB;IAClD,YAAY,CAAgC;IAC5C,gBAAgB,CAAgD;IAChE,aAAa,CAAW;IACxB,mBAAmB,CAAmD;IAE/E,YAAY,gBAAgD,EAAE,WAA2C;QACxG,KAAK,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAA;QAEpC,IAAI,CAAC,YAAY,GAAG,WAAW,CAAA;QAC/B,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CACvD,CAAC,OAAO,EAAiD,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,CACtF,CAAA;QACD,MAAM,QAAQ,GAAG,I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zGD,4CAyGC"}
|
||||
4
node_modules/@elgato-stream-deck/core/dist/services/input/interface.d.ts
generated
vendored
Normal file
4
node_modules/@elgato-stream-deck/core/dist/services/input/interface.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface StreamDeckInputService {
|
||||
handleInput(data: Uint8Array): void;
|
||||
}
|
||||
//# sourceMappingURL=interface.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/input/interface.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/input/interface.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/services/input/interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACtC,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAA;CACnC"}
|
||||
3
node_modules/@elgato-stream-deck/core/dist/services/input/interface.js
generated
vendored
Normal file
3
node_modules/@elgato-stream-deck/core/dist/services/input/interface.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=interface.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/input/interface.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/input/interface.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../src/services/input/interface.ts"],"names":[],"mappings":""}
|
||||
18
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/generic.d.ts
generated
vendored
Normal file
18
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/generic.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import type { StreamDeckLcdSegmentControlDefinition } from '../../controlDefinition.js';
|
||||
import type { HIDDevice } from '../../hid-device.js';
|
||||
import type { LcdSegmentDisplayService } from './interface.js';
|
||||
import type { FillImageOptions, FillLcdImageOptions } from '../../types.js';
|
||||
import type { EncodeJPEGHelper } from '../../models/base.js';
|
||||
import { type PreparedBuffer } from '../../preparedBuffer.js';
|
||||
export declare class StreamdeckDefaultLcdService implements LcdSegmentDisplayService {
|
||||
#private;
|
||||
constructor(encodeJPEG: EncodeJPEGHelper, device: HIDDevice, lcdControls: Readonly<StreamDeckLcdSegmentControlDefinition[]>);
|
||||
fillLcd(index: number, buffer: Uint8Array | Uint8ClampedArray, sourceOptions: FillImageOptions): Promise<void>;
|
||||
fillLcdRegion(index: number, x: number, y: number, imageBuffer: Uint8Array, sourceOptions: FillLcdImageOptions): Promise<void>;
|
||||
prepareFillLcdRegion(index: number, x: number, y: number, imageBuffer: Uint8Array, sourceOptions: FillLcdImageOptions, jsonSafe?: boolean): Promise<PreparedBuffer>;
|
||||
clearLcdSegment(index: number): Promise<void>;
|
||||
clearAllLcdSegments(): Promise<void>;
|
||||
private prepareFillControlRegion;
|
||||
private convertFillLcdBuffer;
|
||||
}
|
||||
//# sourceMappingURL=generic.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/generic.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/generic.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"generic.d.ts","sourceRoot":"","sources":["../../../src/services/lcdSegmentDisplay/generic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,4BAA4B,CAAA;AACvF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAIpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAE3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAA8B,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAGzF,qBAAa,2BAA4B,YAAW,wBAAwB;;gBAQ1E,UAAU,EAAE,gBAAgB,EAC5B,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,QAAQ,CAAC,qCAAqC,EAAE,CAAC;IAOlD,OAAO,CACnB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,UAAU,GAAG,iBAAiB,EACtC,aAAa,EAAE,gBAAgB,GAC7B,OAAO,CAAC,IAAI,CAAC;IAYH,aAAa,CACzB,KAAK,EAAE,MAAM,EACb,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,WAAW,EAAE,UAAU,EACvB,aAAa,EAAE,mBAAmB,GAChC,OAAO,CAAC,IAAI,CAAC;IAQH,oBAAoB,CAChC,KAAK,EAAE,MAAM,EACb,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,WAAW,EAAE,UAAU,EACvB,aAAa,EAAE,mBAAmB,EAClC,QAAQ,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,cAAc,CAAC;IAQb,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAc7C,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;YASnC,wBAAwB;YA2BxB,oBAAoB;CAqBlC"}
|
||||
91
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/generic.js
generated
vendored
Normal file
91
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/generic.js
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.StreamdeckDefaultLcdService = void 0;
|
||||
const headerGenerator_js_1 = require("../imageWriter/headerGenerator.js");
|
||||
const imageWriter_js_1 = require("../imageWriter/imageWriter.js");
|
||||
const util_js_1 = require("../../util.js");
|
||||
const preparedBuffer_js_1 = require("../../preparedBuffer.js");
|
||||
const id_js_1 = require("../../id.js");
|
||||
class StreamdeckDefaultLcdService {
|
||||
#encodeJPEG;
|
||||
#device;
|
||||
#lcdControls;
|
||||
#lcdImageWriter = new imageWriter_js_1.StreamdeckDefaultImageWriter(new headerGenerator_js_1.StreamdeckDefaultLcdImageHeaderGenerator());
|
||||
constructor(encodeJPEG, device, lcdControls) {
|
||||
this.#encodeJPEG = encodeJPEG;
|
||||
this.#device = device;
|
||||
this.#lcdControls = lcdControls;
|
||||
}
|
||||
async fillLcd(index, buffer, sourceOptions) {
|
||||
const lcdControl = this.#lcdControls.find((control) => control.id === index);
|
||||
if (!lcdControl)
|
||||
throw new Error(`Invalid lcd segment index ${index}`);
|
||||
const packets = await this.prepareFillControlRegion(lcdControl, 0, 0, buffer, {
|
||||
format: sourceOptions.format,
|
||||
width: lcdControl.pixelSize.width,
|
||||
height: lcdControl.pixelSize.height,
|
||||
});
|
||||
await this.#device.sendReports(packets);
|
||||
}
|
||||
async fillLcdRegion(index, x, y, imageBuffer, sourceOptions) {
|
||||
const lcdControl = this.#lcdControls.find((control) => control.id === index);
|
||||
if (!lcdControl)
|
||||
throw new Error(`Invalid lcd segment index ${index}`);
|
||||
const packets = await this.prepareFillControlRegion(lcdControl, x, y, imageBuffer, sourceOptions);
|
||||
await this.#device.sendReports(packets);
|
||||
}
|
||||
async prepareFillLcdRegion(index, x, y, imageBuffer, sourceOptions, jsonSafe) {
|
||||
const lcdControl = this.#lcdControls.find((control) => control.id === index);
|
||||
if (!lcdControl)
|
||||
throw new Error(`Invalid lcd segment index ${index}`);
|
||||
const packets = await this.prepareFillControlRegion(lcdControl, x, y, imageBuffer, sourceOptions);
|
||||
return (0, preparedBuffer_js_1.wrapBufferToPreparedBuffer)(id_js_1.DeviceModelId.PLUS, 'fill-lcd-region', packets, jsonSafe ?? false);
|
||||
}
|
||||
async clearLcdSegment(index) {
|
||||
const lcdControl = this.#lcdControls.find((control) => control.id === index);
|
||||
if (!lcdControl)
|
||||
throw new Error(`Invalid lcd segment index ${index}`);
|
||||
const buffer = new Uint8Array(lcdControl.pixelSize.width * lcdControl.pixelSize.height * 4);
|
||||
const packets = await this.prepareFillControlRegion(lcdControl, 0, 0, buffer, {
|
||||
format: 'rgba',
|
||||
width: lcdControl.pixelSize.width,
|
||||
height: lcdControl.pixelSize.height,
|
||||
});
|
||||
await this.#device.sendReports(packets);
|
||||
}
|
||||
async clearAllLcdSegments() {
|
||||
const ps = [];
|
||||
for (const control of this.#lcdControls) {
|
||||
ps.push(this.clearLcdSegment(control.id));
|
||||
}
|
||||
await Promise.all(ps);
|
||||
}
|
||||
async prepareFillControlRegion(lcdControl, x, y, imageBuffer, sourceOptions) {
|
||||
// Basic bounds checking
|
||||
const maxSize = lcdControl.pixelSize;
|
||||
if (x < 0 || x + sourceOptions.width > maxSize.width) {
|
||||
throw new TypeError(`Image will not fit within the lcd segment`);
|
||||
}
|
||||
if (y < 0 || y + sourceOptions.height > maxSize.height) {
|
||||
throw new TypeError(`Image will not fit within the lcd segment`);
|
||||
}
|
||||
const imageSize = sourceOptions.width * sourceOptions.height * sourceOptions.format.length;
|
||||
if (imageBuffer.length !== imageSize) {
|
||||
throw new RangeError(`Expected image buffer of length ${imageSize}, got length ${imageBuffer.length}`);
|
||||
}
|
||||
// A lot of this drawing code is heavily based on the normal button
|
||||
const byteBuffer = await this.convertFillLcdBuffer(imageBuffer, sourceOptions);
|
||||
return this.#lcdImageWriter.generateFillImageWrites({ ...sourceOptions, x, y }, byteBuffer);
|
||||
}
|
||||
async convertFillLcdBuffer(sourceBuffer, sourceOptions) {
|
||||
const sourceOptions2 = {
|
||||
format: sourceOptions.format,
|
||||
offset: 0,
|
||||
stride: sourceOptions.width * sourceOptions.format.length,
|
||||
};
|
||||
const byteBuffer = (0, util_js_1.transformImageBuffer)(sourceBuffer, sourceOptions2, { colorMode: 'rgba' }, 0, sourceOptions.width, sourceOptions.height);
|
||||
return this.#encodeJPEG(byteBuffer, sourceOptions.width, sourceOptions.height);
|
||||
}
|
||||
}
|
||||
exports.StreamdeckDefaultLcdService = StreamdeckDefaultLcdService;
|
||||
//# sourceMappingURL=generic.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/generic.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/generic.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"generic.js","sourceRoot":"","sources":["../../../src/services/lcdSegmentDisplay/generic.ts"],"names":[],"mappings":";;;AAGA,0EAA4F;AAC5F,kEAA4E;AAG5E,2CAAoD;AAEpD,+DAAyF;AACzF,uCAA2C;AAE3C,MAAa,2BAA2B;IAC9B,WAAW,CAAkB;IAC7B,OAAO,CAAW;IAClB,YAAY,CAAmD;IAE/D,eAAe,GAAG,IAAI,6CAA4B,CAAC,IAAI,6DAAwC,EAAE,CAAC,CAAA;IAE3G,YACC,UAA4B,EAC5B,MAAiB,EACjB,WAA8D;QAE9D,IAAI,CAAC,WAAW,GAAG,UAAU,CAAA;QAC7B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;QACrB,IAAI,CAAC,YAAY,GAAG,WAAW,CAAA;IAChC,CAAC;IAEM,KAAK,CAAC,OAAO,CACnB,KAAa,EACb,MAAsC,EACtC,aAA+B;QAE/B,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,KAAK,CAAC,CAAA;QAC5E,IAAI,CAAC,UAAU;YAAE,MAAM,IAAI,KAAK,CAAC,6BAA6B,KAAK,EAAE,CAAC,CAAA;QAEtE,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,wBAAwB,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE;YAC7E,MAAM,EAAE,aAAa,CAAC,MAAM;YAC5B,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,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CAAA;IAC/E,CAAC;CACD;AArID,kEAqIC"}
|
||||
41
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/interface.d.ts
generated
vendored
Normal file
41
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/interface.d.ts
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
import type { PreparedBuffer } from '../../preparedBuffer.js';
|
||||
import type { FillImageOptions, FillLcdImageOptions } from '../../types.js';
|
||||
export interface LcdSegmentDisplayService {
|
||||
/**
|
||||
* Fill the whole lcd segment
|
||||
* @param {number} lcdIndex The id of the lcd segment to draw to
|
||||
* @param {Buffer} imageBuffer The image to write
|
||||
* @param {Object} sourceOptions Options to control the write
|
||||
*/
|
||||
fillLcd(lcdIndex: number, imageBuffer: Uint8Array | Uint8ClampedArray, sourceOptions: FillImageOptions): Promise<void>;
|
||||
/**
|
||||
* Fill a region of the lcd segment, ignoring the boundaries of the encoders
|
||||
* @param {number} lcdIndex The id of the lcd segment to draw to
|
||||
* @param {number} x The x position to draw to
|
||||
* @param {number} y The y position to draw to
|
||||
* @param {Buffer} imageBuffer The image to write
|
||||
* @param {Object} sourceOptions Options to control the write
|
||||
*/
|
||||
fillLcdRegion(lcdIndex: number, x: number, y: number, imageBuffer: Uint8Array | Uint8ClampedArray, sourceOptions: FillLcdImageOptions): Promise<void>;
|
||||
/**
|
||||
* Prepare to fill region of the lcd with an image in a Buffer.
|
||||
* Note: The result is only guaranteed to be valid for this specific StreamDeck and the same library version, but is safe to store externally.
|
||||
*
|
||||
* @param {number} lcdIndex The id of the lcd segment to draw to
|
||||
* @param {number} x The x position to draw to
|
||||
* @param {number} y The y position to draw to
|
||||
* @param {Buffer} imageBuffer The image to write
|
||||
* @param {Object} sourceOptions Options to control the write
|
||||
*/
|
||||
prepareFillLcdRegion(lcdIndex: number, x: number, y: number, imageBuffer: Uint8Array, sourceOptions: FillLcdImageOptions, jsonSafe?: boolean): Promise<PreparedBuffer>;
|
||||
/**
|
||||
* Clear the lcd segment to black
|
||||
* @param {number} lcdIndex The id of the lcd segment to clear
|
||||
*/
|
||||
clearLcdSegment(lcdIndex: number): Promise<void>;
|
||||
/**
|
||||
* Clear all lcd segment to black
|
||||
*/
|
||||
clearAllLcdSegments(): Promise<void>;
|
||||
}
|
||||
//# sourceMappingURL=interface.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/interface.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/interface.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/services/lcdSegmentDisplay/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAE3E,MAAM,WAAW,wBAAwB;IACxC;;;;;OAKG;IACH,OAAO,CACN,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,UAAU,GAAG,iBAAiB,EAC3C,aAAa,EAAE,gBAAgB,GAC7B,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhB;;;;;;;OAOG;IACH,aAAa,CACZ,QAAQ,EAAE,MAAM,EAChB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,WAAW,EAAE,UAAU,GAAG,iBAAiB,EAC3C,aAAa,EAAE,mBAAmB,GAChC,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhB;;;;;;;;;OASG;IACH,oBAAoB,CACnB,QAAQ,EAAE,MAAM,EAChB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,WAAW,EAAE,UAAU,EACvB,aAAa,EAAE,mBAAmB,EAClC,QAAQ,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,cAAc,CAAC,CAAA;IAE1B;;;OAGG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhD;;OAEG;IACH,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACpC"}
|
||||
3
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/interface.js
generated
vendored
Normal file
3
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/interface.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=interface.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/interface.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/interface.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../src/services/lcdSegmentDisplay/interface.ts"],"names":[],"mappings":""}
|
||||
17
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/neo.d.ts
generated
vendored
Normal file
17
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/neo.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import type { StreamDeckLcdSegmentControlDefinition } from '../../controlDefinition.js';
|
||||
import type { HIDDevice } from '../../hid-device.js';
|
||||
import type { LcdSegmentDisplayService } from './interface.js';
|
||||
import type { FillLcdImageOptions, FillImageOptions } from '../../types.js';
|
||||
import type { EncodeJPEGHelper } from '../../models/base.js';
|
||||
import type { PreparedBuffer } from '../../preparedBuffer.js';
|
||||
export declare class StreamDeckNeoLcdService implements LcdSegmentDisplayService {
|
||||
#private;
|
||||
constructor(encodeJPEG: EncodeJPEGHelper, device: HIDDevice, lcdControls: Readonly<StreamDeckLcdSegmentControlDefinition[]>);
|
||||
fillLcdRegion(_index: number, _x: number, _y: number, _imageBuffer: Uint8Array, _sourceOptions: FillLcdImageOptions): Promise<void>;
|
||||
prepareFillLcdRegion(_index: number, _x: number, _y: number, _imageBuffer: Uint8Array, _sourceOptions: FillLcdImageOptions, _jsonSafe?: boolean): Promise<PreparedBuffer>;
|
||||
fillLcd(index: number, imageBuffer: Uint8Array, sourceOptions: FillImageOptions): Promise<void>;
|
||||
clearLcdSegment(index: number): Promise<void>;
|
||||
clearAllLcdSegments(): Promise<void>;
|
||||
private convertFillLcdBuffer;
|
||||
}
|
||||
//# sourceMappingURL=neo.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/neo.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/neo.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"neo.d.ts","sourceRoot":"","sources":["../../../src/services/lcdSegmentDisplay/neo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,4BAA4B,CAAA;AACvF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAKpD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAE3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAE7D,qBAAa,uBAAwB,YAAW,wBAAwB;;gBAQtE,UAAU,EAAE,gBAAgB,EAC5B,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,QAAQ,CAAC,qCAAqC,EAAE,CAAC;IAOzD,aAAa,CAClB,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,UAAU,EACxB,cAAc,EAAE,mBAAmB,GACjC,OAAO,CAAC,IAAI,CAAC;IAIH,oBAAoB,CAChC,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,UAAU,EACxB,cAAc,EAAE,mBAAmB,EACnC,SAAS,CAAC,EAAE,OAAO,GACjB,OAAO,CAAC,cAAc,CAAC;IAIb,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB/F,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAW7C,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;YASnC,oBAAoB;CAsBlC"}
|
||||
63
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/neo.js
generated
vendored
Normal file
63
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/neo.js
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.StreamDeckNeoLcdService = void 0;
|
||||
const headerGenerator_js_1 = require("../imageWriter/headerGenerator.js");
|
||||
const imageWriter_js_1 = require("../imageWriter/imageWriter.js");
|
||||
const util_js_1 = require("../../util.js");
|
||||
class StreamDeckNeoLcdService {
|
||||
#encodeJPEG;
|
||||
#device;
|
||||
#lcdControls;
|
||||
#lcdImageWriter = new imageWriter_js_1.StreamdeckDefaultImageWriter(new headerGenerator_js_1.StreamdeckNeoLcdImageHeaderGenerator());
|
||||
constructor(encodeJPEG, device, lcdControls) {
|
||||
this.#encodeJPEG = encodeJPEG;
|
||||
this.#device = device;
|
||||
this.#lcdControls = lcdControls;
|
||||
}
|
||||
async fillLcdRegion(_index, _x, _y, _imageBuffer, _sourceOptions) {
|
||||
throw new Error('Not supported for this model');
|
||||
}
|
||||
async prepareFillLcdRegion(_index, _x, _y, _imageBuffer, _sourceOptions, _jsonSafe) {
|
||||
throw new Error('Not supported for this model');
|
||||
}
|
||||
async fillLcd(index, imageBuffer, sourceOptions) {
|
||||
const lcdControl = this.#lcdControls.find((control) => control.id === index);
|
||||
if (!lcdControl)
|
||||
throw new Error(`Invalid lcd segment index ${index}`);
|
||||
const imageSize = lcdControl.pixelSize.width * lcdControl.pixelSize.height * sourceOptions.format.length;
|
||||
if (imageBuffer.length !== imageSize) {
|
||||
throw new RangeError(`Expected image buffer of length ${imageSize}, got length ${imageBuffer.length}`);
|
||||
}
|
||||
// A lot of this drawing code is heavily based on the normal button
|
||||
const byteBuffer = await this.convertFillLcdBuffer(imageBuffer, lcdControl.pixelSize, sourceOptions);
|
||||
const packets = this.#lcdImageWriter.generateFillImageWrites(null, byteBuffer);
|
||||
await this.#device.sendReports(packets);
|
||||
}
|
||||
async clearLcdSegment(index) {
|
||||
const lcdControl = this.#lcdControls.find((control) => control.id === index);
|
||||
if (!lcdControl)
|
||||
throw new Error(`Invalid lcd segment index ${index}`);
|
||||
const buffer = new Uint8Array(lcdControl.pixelSize.width * lcdControl.pixelSize.height * 4);
|
||||
await this.fillLcd(index, buffer, {
|
||||
format: 'rgba',
|
||||
});
|
||||
}
|
||||
async clearAllLcdSegments() {
|
||||
const ps = [];
|
||||
for (const control of this.#lcdControls) {
|
||||
ps.push(this.clearLcdSegment(control.id));
|
||||
}
|
||||
await Promise.all(ps);
|
||||
}
|
||||
async convertFillLcdBuffer(sourceBuffer, size, sourceOptions) {
|
||||
const sourceOptions2 = {
|
||||
format: sourceOptions.format,
|
||||
offset: 0,
|
||||
stride: size.width * sourceOptions.format.length,
|
||||
};
|
||||
const byteBuffer = (0, util_js_1.transformImageBuffer)(sourceBuffer, sourceOptions2, { colorMode: 'rgba', xFlip: true, yFlip: true }, 0, size.width, size.height);
|
||||
return this.#encodeJPEG(byteBuffer, size.width, size.height);
|
||||
}
|
||||
}
|
||||
exports.StreamDeckNeoLcdService = StreamDeckNeoLcdService;
|
||||
//# sourceMappingURL=neo.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/neo.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/lcdSegmentDisplay/neo.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"neo.js","sourceRoot":"","sources":["../../../src/services/lcdSegmentDisplay/neo.ts"],"names":[],"mappings":";;;AAIA,0EAAwF;AACxF,kEAA4E;AAG5E,2CAAoD;AAIpD,MAAa,uBAAuB;IAC1B,WAAW,CAAkB;IAC7B,OAAO,CAAW;IAClB,YAAY,CAAmD;IAE/D,eAAe,GAAG,IAAI,6CAA4B,CAAO,IAAI,yDAAoC,EAAE,CAAC,CAAA;IAE7G,YACC,UAA4B,EAC5B,MAAiB,EACjB,WAA8D;QAE9D,IAAI,CAAC,WAAW,GAAG,UAAU,CAAA;QAC7B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;QACrB,IAAI,CAAC,YAAY,GAAG,WAAW,CAAA;IAChC,CAAC;IAED,KAAK,CAAC,aAAa,CAClB,MAAc,EACd,EAAU,EACV,EAAU,EACV,YAAwB,EACxB,cAAmC;QAEnC,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAA;IAChD,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAChC,MAAc,EACd,EAAU,EACV,EAAU,EACV,YAAwB,EACxB,cAAmC,EACnC,SAAmB;QAEnB,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAA;IAChD,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,KAAa,EAAE,WAAuB,EAAE,aAA+B;QAC3F,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,KAAK,CAAC,CAAA;QAC5E,IAAI,CAAC,UAAU;YAAE,MAAM,IAAI,KAAK,CAAC,6BAA6B,KAAK,EAAE,CAAC,CAAA;QAEtE,MAAM,SAAS,GAAG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eAAe,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAA;QAC1C,CAAC;QAED,MAAM,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;IACtB,CAAC;IAEO,KAAK,CAAC,oBAAoB,CACjC,YAAwB,EACxB,IAAe,EACf,aAA+B;QAE/B,MAAM,cAAc,GAA6B;YAChD,MAAM,EAAE,aAAa,CAAC,MAAM;YAC5B,MAAM,EAAE,CAAC;YACT,MAAM,EAAE,IAAI,CAAC,KAAK,GAAG,aAAa,CAAC,MAAM,CAAC,MAAM;SAChD,CAAA;QAED,MAAM,UAAU,GAAG,IAAA,8BAAoB,EACtC,YAAY,EACZ,cAAc,EACd,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAC/C,CAAC,EACD,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,MAAM,CACX,CAAA;QAED,OAAO,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IAC7D,CAAC;CACD;AAhGD,0DAgGC"}
|
||||
6
node_modules/@elgato-stream-deck/core/dist/services/properties/all-firmware.d.ts
generated
vendored
Normal file
6
node_modules/@elgato-stream-deck/core/dist/services/properties/all-firmware.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export declare function parseAllFirmwareVersionsHelper(reportData: {
|
||||
ap2: Uint8Array | null;
|
||||
encoderAp2: Uint8Array | null;
|
||||
encoderLd: Uint8Array | null;
|
||||
}): Promise<Record<string, string>>;
|
||||
//# sourceMappingURL=all-firmware.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/properties/all-firmware.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/properties/all-firmware.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"all-firmware.d.ts","sourceRoot":"","sources":["../../../src/services/properties/all-firmware.ts"],"names":[],"mappings":"AAEA,wBAAsB,8BAA8B,CAAC,UAAU,EAAE;IAEhE,GAAG,EAAE,UAAU,GAAG,IAAI,CAAA;IACtB,UAAU,EAAE,UAAU,GAAG,IAAI,CAAA;IAC7B,SAAS,EAAE,UAAU,GAAG,IAAI,CAAA;CAC5B,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CA0BlC"}
|
||||
27
node_modules/@elgato-stream-deck/core/dist/services/properties/all-firmware.js
generated
vendored
Normal file
27
node_modules/@elgato-stream-deck/core/dist/services/properties/all-firmware.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.parseAllFirmwareVersionsHelper = parseAllFirmwareVersionsHelper;
|
||||
const util_js_1 = require("../../util.js");
|
||||
async function parseAllFirmwareVersionsHelper(reportData) {
|
||||
const decoder = new TextDecoder('ascii');
|
||||
const versions = {};
|
||||
if (reportData.ap2) {
|
||||
const ap2DataDataView = (0, util_js_1.uint8ArrayToDataView)(reportData.ap2);
|
||||
versions.AP2 = decoder.decode(reportData.ap2.subarray(6, 6 + 8));
|
||||
versions.AP2_CHECKSUM = ap2DataDataView.getUint32(2, false).toString(16);
|
||||
}
|
||||
if (reportData.encoderLd && (reportData.encoderLd[0] === 0x18 || reportData.encoderLd[1] === 0x18)) {
|
||||
const encoderLdDataView = (0, util_js_1.uint8ArrayToDataView)(reportData.encoderLd);
|
||||
// Sample just the first encoder, they should all be the same
|
||||
versions.ENCODER_LD = decoder.decode(reportData.encoderLd.subarray(2, 2 + 8));
|
||||
versions.ENCODER_LD_CHECKSUM = encoderLdDataView.getUint32(10, false).toString(16);
|
||||
}
|
||||
if (reportData.encoderAp2 && (reportData.encoderAp2[0] === 0x18 || reportData.encoderAp2[1] === 0x18)) {
|
||||
const encoderAp2DataView = (0, util_js_1.uint8ArrayToDataView)(reportData.encoderAp2);
|
||||
// Sample just the first encoder, they should all be the same
|
||||
versions.ENCODER_AP2 = decoder.decode(reportData.encoderAp2.subarray(2, 2 + 8));
|
||||
versions.ENCODER_AP2_CHECKSUM = encoderAp2DataView.getUint32(10, false).toString(16);
|
||||
}
|
||||
return versions;
|
||||
}
|
||||
//# sourceMappingURL=all-firmware.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/properties/all-firmware.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/properties/all-firmware.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"all-firmware.js","sourceRoot":"","sources":["../../../src/services/properties/all-firmware.ts"],"names":[],"mappings":";;AAEA,wEA+BC;AAjCD,2CAAoD;AAE7C,KAAK,UAAU,8BAA8B,CAAC,UAKpD;IACA,MAAM,OAAO,GAAG,IAAI,WAAW,CAAC,OAAO,CAAC,CAAA;IAExC,MAAM,QAAQ,GAA2B,EAAE,CAAA;IAE3C,IAAI,UAAU,CAAC,GAAG,EAAE,CAAC;QACpB,MAAM,eAAe,GAAG,IAAA,8BAAoB,EAAC,UAAU,CAAC,GAAG,CAAC,CAAA;QAC5D,QAAQ,CAAC,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QAChE,QAAQ,CAAC,YAAY,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;IACzE,CAAC;IAED,IAAI,UAAU,CAAC,SAAS,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC;QACpG,MAAM,iBAAiB,GAAG,IAAA,8BAAoB,EAAC,UAAU,CAAC,SAAS,CAAC,CAAA;QACpE,6DAA6D;QAC7D,QAAQ,CAAC,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QAC7E,QAAQ,CAAC,mBAAmB,GAAG,iBAAiB,CAAC,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;IACnF,CAAC;IAED,IAAI,UAAU,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC;QACvG,MAAM,kBAAkB,GAAG,IAAA,8BAAoB,EAAC,UAAU,CAAC,UAAU,CAAC,CAAA;QACtE,6DAA6D;QAC7D,QAAQ,CAAC,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QAC/E,QAAQ,CAAC,oBAAoB,GAAG,kBAAkB,CAAC,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;IACrF,CAAC;IAED,OAAO,QAAQ,CAAA;AAChB,CAAC"}
|
||||
12
node_modules/@elgato-stream-deck/core/dist/services/properties/gen1.d.ts
generated
vendored
Normal file
12
node_modules/@elgato-stream-deck/core/dist/services/properties/gen1.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { HIDDevice } from '../../hid-device.js';
|
||||
import type { PropertiesService } from './interface.js';
|
||||
export declare class Gen1PropertiesService implements PropertiesService {
|
||||
#private;
|
||||
constructor(device: HIDDevice);
|
||||
setBrightness(percentage: number): Promise<void>;
|
||||
resetToLogo(): Promise<void>;
|
||||
getFirmwareVersion(): Promise<string>;
|
||||
getAllFirmwareVersions(): Promise<Record<string, string>>;
|
||||
getSerialNumber(): Promise<string>;
|
||||
}
|
||||
//# sourceMappingURL=gen1.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/properties/gen1.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/properties/gen1.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"gen1.d.ts","sourceRoot":"","sources":["../../../src/services/properties/gen1.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEvD,qBAAa,qBAAsB,YAAW,iBAAiB;;gBAGlD,MAAM,EAAE,SAAS;IAIhB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAchD,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAU5B,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;IAYrC,sBAAsB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAKzD,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC;CAU/C"}
|
||||
59
node_modules/@elgato-stream-deck/core/dist/services/properties/gen1.js
generated
vendored
Normal file
59
node_modules/@elgato-stream-deck/core/dist/services/properties/gen1.js
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Gen1PropertiesService = void 0;
|
||||
class Gen1PropertiesService {
|
||||
#device;
|
||||
constructor(device) {
|
||||
this.#device = device;
|
||||
}
|
||||
async setBrightness(percentage) {
|
||||
if (percentage < 0 || percentage > 100) {
|
||||
throw new RangeError('Expected brightness percentage to be between 0 and 100');
|
||||
}
|
||||
// prettier-ignore
|
||||
const brightnessCommandBuffer = new Uint8Array([
|
||||
0x05,
|
||||
0x55, 0xaa, 0xd1, 0x01, percentage, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
]);
|
||||
await this.#device.sendFeatureReport(brightnessCommandBuffer);
|
||||
}
|
||||
async resetToLogo() {
|
||||
// prettier-ignore
|
||||
const resetCommandBuffer = new Uint8Array([
|
||||
0x0b,
|
||||
0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
]);
|
||||
await this.#device.sendFeatureReport(resetCommandBuffer);
|
||||
}
|
||||
async getFirmwareVersion() {
|
||||
let val;
|
||||
try {
|
||||
val = await this.#device.getFeatureReport(4, 32);
|
||||
}
|
||||
catch (_e) {
|
||||
// In case some devices can't handle the different report length
|
||||
val = await this.#device.getFeatureReport(4, 17);
|
||||
}
|
||||
const end = val.indexOf(0, 5);
|
||||
return new TextDecoder('ascii').decode(val.subarray(5, end === -1 ? undefined : end));
|
||||
}
|
||||
async getAllFirmwareVersions() {
|
||||
// Not supported for gen1 models
|
||||
return {};
|
||||
}
|
||||
async getSerialNumber() {
|
||||
let val;
|
||||
try {
|
||||
val = await this.#device.getFeatureReport(3, 32);
|
||||
}
|
||||
catch (_e) {
|
||||
// In case some devices can't handle the different report length
|
||||
val = await this.#device.getFeatureReport(3, 17);
|
||||
}
|
||||
return new TextDecoder('ascii').decode(val.subarray(5, 17));
|
||||
}
|
||||
}
|
||||
exports.Gen1PropertiesService = Gen1PropertiesService;
|
||||
//# sourceMappingURL=gen1.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/properties/gen1.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/properties/gen1.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"gen1.js","sourceRoot":"","sources":["../../../src/services/properties/gen1.ts"],"names":[],"mappings":";;;AAGA,MAAa,qBAAqB;I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E;YAChE,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QACjD,CAAC;QACD,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAC7B,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;IACtF,CAAC;IAEM,KAAK,CAAC,sBAAsB;QAClC,gCAAgC;QAChC,OAAO,EAAE,CAAA;IACV,CAAC;IAEM,KAAK,CAAC,eAAe;QAC3B,IAAI,GAAe,CAAA;QACnB,IAAI,CAAC;YACJ,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QACjD,CAAC;QAAC,OAAO,EAAE,EAAE,CAAC;YACb,gEAAgE;YAChE,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QACjD,CAAC;QACD,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;IAC5D,CAAC;CACD;AA1DD,sDA0DC"}
|
||||
12
node_modules/@elgato-stream-deck/core/dist/services/properties/gen2.d.ts
generated
vendored
Normal file
12
node_modules/@elgato-stream-deck/core/dist/services/properties/gen2.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { HIDDevice } from '../../hid-device.js';
|
||||
import type { PropertiesService } from './interface.js';
|
||||
export declare class Gen2PropertiesService implements PropertiesService {
|
||||
protected readonly device: HIDDevice;
|
||||
constructor(device: HIDDevice);
|
||||
setBrightness(percentage: number): Promise<void>;
|
||||
resetToLogo(): Promise<void>;
|
||||
getFirmwareVersion(): Promise<string>;
|
||||
getAllFirmwareVersions(): Promise<Record<string, string>>;
|
||||
getSerialNumber(): Promise<string>;
|
||||
}
|
||||
//# sourceMappingURL=gen2.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/properties/gen2.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/properties/gen2.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"gen2.d.ts","sourceRoot":"","sources":["../../../src/services/properties/gen2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEvD,qBAAa,qBAAsB,YAAW,iBAAiB;IAC9D,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;gBAExB,MAAM,EAAE,SAAS;IAIhB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBhD,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAY5B,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;IAMrC,sBAAsB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAOzD,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC;CAK/C"}
|
||||
52
node_modules/@elgato-stream-deck/core/dist/services/properties/gen2.js
generated
vendored
Normal file
52
node_modules/@elgato-stream-deck/core/dist/services/properties/gen2.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Gen2PropertiesService = void 0;
|
||||
class Gen2PropertiesService {
|
||||
device;
|
||||
constructor(device) {
|
||||
this.device = device;
|
||||
}
|
||||
async setBrightness(percentage) {
|
||||
if (percentage < 0 || percentage > 100) {
|
||||
throw new RangeError('Expected brightness percentage to be between 0 and 100');
|
||||
}
|
||||
// prettier-ignore
|
||||
const brightnessCommandBuffer = new Uint8Array([
|
||||
0x03,
|
||||
0x08, percentage, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
]);
|
||||
await this.device.sendFeatureReport(brightnessCommandBuffer);
|
||||
}
|
||||
async resetToLogo() {
|
||||
// prettier-ignore
|
||||
const resetCommandBuffer = new Uint8Array([
|
||||
0x03,
|
||||
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
]);
|
||||
await this.device.sendFeatureReport(resetCommandBuffer);
|
||||
}
|
||||
async getFirmwareVersion() {
|
||||
const val = await this.device.getFeatureReport(5, 32);
|
||||
const end = val[1] + 2;
|
||||
return new TextDecoder('ascii').decode(val.subarray(6, end));
|
||||
}
|
||||
async getAllFirmwareVersions() {
|
||||
return {
|
||||
AP2: await this.getFirmwareVersion(),
|
||||
// TODO AP2_CHECKSUM - uint32be after length
|
||||
};
|
||||
}
|
||||
async getSerialNumber() {
|
||||
const val = await this.device.getFeatureReport(6, 32);
|
||||
const end = val[1] + 2;
|
||||
return new TextDecoder('ascii').decode(val.subarray(2, end));
|
||||
}
|
||||
}
|
||||
exports.Gen2PropertiesService = Gen2PropertiesService;
|
||||
//# sourceMappingURL=gen2.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/properties/gen2.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/properties/gen2.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"gen2.js","sourceRoot":"","sources":["../../../src/services/properties/gen2.ts"],"names":[],"mappings":";;;AAGA,MAAa,qBAAqB;IACd,MAAM,CAAW;IAEpC,YAAY,MAAiB;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACrB,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,UAAkB;QAC5C,IAAI,UAAU,GAAG,CAAC,IAAI,UAAU,GAAG,GAAG,EAAE,CAAC;YACxC,MAAM,IAAI,UAAU,CAAC,wDAAwD,CAAC,CAAA;QAC/E,CAAC;QAED,kBAAkB;QAClB,MAAM,uBAAuB,GAAG,IAAI,UAAU,CAAC;YAC9C,IAAI;YACJ,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;YACpD,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;YAC9C,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;YAC9C,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;SACxC,CAAC,CAAC;QACH,MAAM,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,CAAA;IAC7D,CAAC;IAEM,KAAK,CAAC,WAAW;QACvB,kBAAkB;QAClB,MAAM,kBAAkB,GAAG,IAAI,UAAU,CAAC;YACzC,IAAI;YACJ,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;YAC9C,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;YAC9C,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;YAC9C,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;SACxC,CAAC,CAAC;QACH,MAAM,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAAA;IACxD,CAAC;IAEM,KAAK,CAAC,kBAAkB;QAC9B,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QACrD,MAAM,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;QACtB,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;IAC7D,CAAC;IAEM,KAAK,CAAC,sBAAsB;QAClC,OAAO;YACN,GAAG,EAAE,MAAM,IAAI,CAAC,kBAAkB,EAAE;YACpC,4CAA4C;SAC5C,CAAA;IACF,CAAC;IAEM,KAAK,CAAC,eAAe;QAC3B,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;QACrD,MAAM,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;QACtB,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;IAC7D,CAAC;CACD;AArDD,sDAqDC"}
|
||||
8
node_modules/@elgato-stream-deck/core/dist/services/properties/interface.d.ts
generated
vendored
Normal file
8
node_modules/@elgato-stream-deck/core/dist/services/properties/interface.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export interface PropertiesService {
|
||||
setBrightness(percentage: number): Promise<void>;
|
||||
resetToLogo(): Promise<void>;
|
||||
getFirmwareVersion(): Promise<string>;
|
||||
getAllFirmwareVersions(): Promise<Record<string, string>>;
|
||||
getSerialNumber(): Promise<string>;
|
||||
}
|
||||
//# sourceMappingURL=interface.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/properties/interface.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/properties/interface.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../src/services/properties/interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IACjC,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhD,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAE5B,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAErC,sBAAsB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IAEzD,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;CAClC"}
|
||||
3
node_modules/@elgato-stream-deck/core/dist/services/properties/interface.js
generated
vendored
Normal file
3
node_modules/@elgato-stream-deck/core/dist/services/properties/interface.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=interface.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/properties/interface.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/properties/interface.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../../src/services/properties/interface.ts"],"names":[],"mappings":""}
|
||||
12
node_modules/@elgato-stream-deck/core/dist/services/properties/network-dock.d.ts
generated
vendored
Normal file
12
node_modules/@elgato-stream-deck/core/dist/services/properties/network-dock.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { HIDDevice } from '../../hid-device.js';
|
||||
import type { PropertiesService } from './interface.js';
|
||||
export declare class NetworkDockPropertiesService implements PropertiesService {
|
||||
#private;
|
||||
constructor(device: HIDDevice);
|
||||
setBrightness(_percentage: number): Promise<void>;
|
||||
resetToLogo(): Promise<void>;
|
||||
getFirmwareVersion(): Promise<string>;
|
||||
getAllFirmwareVersions(): Promise<Record<string, string>>;
|
||||
getSerialNumber(): Promise<string>;
|
||||
}
|
||||
//# sourceMappingURL=network-dock.d.ts.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/properties/network-dock.d.ts.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/properties/network-dock.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"network-dock.d.ts","sourceRoot":"","sources":["../../../src/services/properties/network-dock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEvD,qBAAa,4BAA6B,YAAW,iBAAiB;;gBAGzD,MAAM,EAAE,SAAS;IAIhB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjD,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;IAMrC,sBAAsB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAUzD,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC;CAM/C"}
|
||||
35
node_modules/@elgato-stream-deck/core/dist/services/properties/network-dock.js
generated
vendored
Normal file
35
node_modules/@elgato-stream-deck/core/dist/services/properties/network-dock.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.NetworkDockPropertiesService = void 0;
|
||||
const all_firmware_js_1 = require("./all-firmware.js");
|
||||
class NetworkDockPropertiesService {
|
||||
#device;
|
||||
constructor(device) {
|
||||
this.#device = device;
|
||||
}
|
||||
async setBrightness(_percentage) {
|
||||
// Noop
|
||||
}
|
||||
async resetToLogo() {
|
||||
// Noop
|
||||
}
|
||||
async getFirmwareVersion() {
|
||||
const data = await this.#device.getFeatureReport(0x83, -1);
|
||||
return new TextDecoder('ascii').decode(data.subarray(8, 16));
|
||||
}
|
||||
async getAllFirmwareVersions() {
|
||||
const [ap2Data] = await Promise.all([this.#device.getFeatureReport(0x83, -1)]);
|
||||
return (0, all_firmware_js_1.parseAllFirmwareVersionsHelper)({
|
||||
ap2: ap2Data.slice(2),
|
||||
encoderAp2: null,
|
||||
encoderLd: null,
|
||||
});
|
||||
}
|
||||
async getSerialNumber() {
|
||||
const data = await this.#device.getFeatureReport(0x84, -1);
|
||||
const length = data[3];
|
||||
return new TextDecoder('ascii').decode(data.subarray(4, 4 + length));
|
||||
}
|
||||
}
|
||||
exports.NetworkDockPropertiesService = NetworkDockPropertiesService;
|
||||
//# sourceMappingURL=network-dock.js.map
|
||||
1
node_modules/@elgato-stream-deck/core/dist/services/properties/network-dock.js.map
generated
vendored
Normal file
1
node_modules/@elgato-stream-deck/core/dist/services/properties/network-dock.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"network-dock.js","sourceRoot":"","sources":["../../../src/services/properties/network-dock.ts"],"names":[],"mappings":";;;AACA,uDAAkE;AAGlE,MAAa,4BAA4B;IAC/B,OAAO,CAAW;IAE3B,YAAY,MAAiB;QAC5B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;IACtB,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,WAAmB;QAC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