@squoosh-kit/mozjpeg 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Bridge implementation for the MozJPEG package, handling worker and client modes.
3
+ */
4
+ import { type ImageInput } from '@squoosh-kit/runtime';
5
+ import type { MozjpegEncodeOptions } from './types';
6
+ export type BridgeOptions = {
7
+ assetPath?: string;
8
+ };
9
+ interface MozjpegBridge {
10
+ encode(image: ImageInput, options?: MozjpegEncodeOptions, signal?: AbortSignal): Promise<Uint8Array>;
11
+ decode(data: BufferSource, signal?: AbortSignal): Promise<ImageData>;
12
+ terminate(): Promise<void>;
13
+ }
14
+ export declare function createBridge(mode: 'worker' | 'client', options?: BridgeOptions): MozjpegBridge;
15
+ export {};
16
+ //# sourceMappingURL=bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../src/bridge.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,UAAU,aAAa;IACrB,MAAM,CACJ,KAAK,EAAE,UAAU,EACjB,OAAO,CAAC,EAAE,oBAAoB,EAC9B,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,UAAU,CAAC,CAAC;IACvB,MAAM,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IACrE,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAwFD,wBAAgB,YAAY,CAC1B,IAAI,EAAE,QAAQ,GAAG,QAAQ,EACzB,OAAO,CAAC,EAAE,aAAa,GACtB,aAAa,CAMf"}