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

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

View File

@@ -0,0 +1,13 @@
export interface JPEGEncodeOptions {
quality: number;
subsampling?: number;
}
/**
* The default JPEG encoder.
* `@julusian/jpeg-turbo` will be used if it can be found, otherwise it will fall back to `jpeg-js`
* @param buffer The buffer to convert
* @param width Width of the image
* @param height Hieght of the image
*/
export declare function encodeJPEG(buffer: Uint8Array, width: number, height: number, options: JPEGEncodeOptions | undefined): Promise<Uint8Array>;
//# sourceMappingURL=jpeg.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"jpeg.d.ts","sourceRoot":"","sources":["../src/jpeg.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;CACpB;AAID;;;;;;GAMG;AACH,wBAAsB,UAAU,CAC/B,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,iBAAiB,GAAG,SAAS,GACpC,OAAO,CAAC,UAAU,CAAC,CAgCrB"}

42
node_modules/@elgato-stream-deck/node-lib/dist/jpeg.js generated vendored Normal file
View File

@@ -0,0 +1,42 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.encodeJPEG = encodeJPEG;
const jpegJS = require("jpeg-js");
const DEFAULT_QUALITY = 95;
/**
* The default JPEG encoder.
* `@julusian/jpeg-turbo` will be used if it can be found, otherwise it will fall back to `jpeg-js`
* @param buffer The buffer to convert
* @param width Width of the image
* @param height Hieght of the image
*/
async function encodeJPEG(buffer, width, height, options) {
try {
const jpegTurbo = await Promise.resolve().then(() => require('@julusian/jpeg-turbo'));
// Try using jpeg-turbo if it is available
if (jpegTurbo.bufferSize && !!jpegTurbo.compress) {
const encodeOptions = {
format: jpegTurbo.FORMAT_RGBA,
width,
height,
quality: DEFAULT_QUALITY,
...options,
};
if (buffer.length === width * height * 4) {
const tmpBuffer = Buffer.alloc(jpegTurbo.bufferSize(encodeOptions));
return jpegTurbo.compress(Buffer.from(buffer), tmpBuffer, encodeOptions); // Future: avoid rewrap
}
}
}
catch (_e) {
// TODO - log error
}
// If jpeg-turbo is unavailable or fails, then fallback to jpeg-js
const jpegBuffer2 = jpegJS.encode({
width,
height,
data: buffer,
}, options ? options.quality : DEFAULT_QUALITY);
return jpegBuffer2.data;
}
//# sourceMappingURL=jpeg.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"jpeg.js","sourceRoot":"","sources":["../src/jpeg.ts"],"names":[],"mappings":";;AAiBA,gCAqCC;AAtDD,kCAAiC;AAQjC,MAAM,eAAe,GAAG,EAAE,CAAA;AAE1B;;;;;;GAMG;AACI,KAAK,UAAU,UAAU,CAC/B,MAAkB,EAClB,KAAa,EACb,MAAc,EACd,OAAsC;IAEtC,IAAI,CAAC;QACJ,MAAM,SAAS,GAAG,2CAAa,sBAAsB,EAAC,CAAA;QAEtD,0CAA0C;QAC1C,IAAI,SAAS,CAAC,UAAU,IAAI,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;YAClD,MAAM,aAAa,GAAkB;gBACpC,MAAM,EAAE,SAAS,CAAC,WAAW;gBAC7B,KAAK;gBACL,MAAM;gBACN,OAAO,EAAE,eAAe;gBACxB,GAAG,OAAO;aACV,CAAA;YACD,IAAI,MAAM,CAAC,MAAM,KAAK,KAAK,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC1C,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAA;gBACnE,OAAO,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,CAAA,CAAC,uBAAuB;YACjG,CAAC;QACF,CAAC;IACF,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACb,mBAAmB;IACpB,CAAC;IAED,kEAAkE;IAClE,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAChC;QACC,KAAK;QACL,MAAM;QACN,IAAI,EAAE,MAAM;KACZ,EACD,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAC3C,CAAA;IACD,OAAO,WAAW,CAAC,IAAI,CAAA;AACxB,CAAC"}

View File

@@ -0,0 +1,2 @@
export * from './jpeg.js';
//# sourceMappingURL=lib.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}

View File

@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./jpeg.js"), exports);
//# sourceMappingURL=lib.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../src/lib.ts"],"names":[],"mappings":";;;AAAA,oDAAyB"}

View File

@@ -0,0 +1 @@
{"root":["../src/jpeg.ts","../src/lib.ts"],"version":"5.9.3"}