Skip to content

Commit

Permalink
bld? Build
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbob3806 committed Feb 7, 2024
1 parent 2276e2e commit 290d394
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 25 deletions.
10 changes: 5 additions & 5 deletions dist/package/declarations/dct/BlurridEncoder.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ export class BlurridEncoder {
* dct coefficients.
*
* @param {object} obj - Object destructured argument.
* @param {number} [obj.length] - Desired length of encoded string.
* @param {string} [obj.subsampling] - Chroma subsampling string of the form
* "Y:Cb:Cr" where Y, Cb, Cr are all 3-bit numbers from 0-7 inclusive,
* corresponding to the sampling rates of luma, chroma blue and chroma
* red dct coefficients in the encoded string.
* @param {number} [obj.length=64] - Desired length of encoded string.
* @param {string} [obj.subsampling="4:2:2"] - Chroma subsampling string of
* the form "Y:Cb:Cr" where Y, Cb, Cr are all 3-bit numbers from 0-7
* inclusive, corresponding to the sampling rates of luma, chroma blue
* and chroma red dct coefficients in the encoded string.
* @returns {string}
*/
toString({ length, subsampling }?: {
Expand Down
6 changes: 3 additions & 3 deletions dist/package/declarations/sharp/image-loader.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
* and metadata pertaining to the image which is required for.
*
* @param {string} path - Relative path to image from point of execution.
* @param {number} samples - Maximum dimension of downsized sample image in any
* direction. Note that, due to max uniform limits in webgl fragment
* @param {number} [samples=16] - Maximum dimension of downsized sample image in
* any direction. Note that, due to max uniform limits in webgl fragment
* shaders, sample sizes greater than 16 will prevent a blur from being
* created using the webgl canvas. In this case the web component will
* set the image loading to `eager`, or will use web workers as a fallback
* if available to render the blur.
* @returns {Promise.<{buffer:Buffer, width:number, height:number}>} Data buffer
* and image metadata.
*/
export function loadImage(path: string, samples?: number): Promise<{
export function loadImage(path: string, samples?: number | undefined): Promise<{
buffer: Buffer;
width: number;
height: number;
Expand Down
32 changes: 26 additions & 6 deletions dist/package/declarations/utils/WorkerManager.d.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
export type workerCb = () => Worker;
export type workerEventCb = (event: any) => void;
export type EnqueuedWorker = {
message: any;
callback: workerEventCb;
};
/**
* @file Class for managing multiple workers up to a specified limit.
* @author James Reid
*/
/**
* @callback workerCb
* @returns {Worker}
*/
/**
* @callback workerEventCb
* @param {any} event
* @returns {void}
*/
/**
* @typedef {object} EnqueuedWorker
* @property {any} message
* @property {workerEventCb} callback
*/
export class WorkerManager {
/**
*
* @param {()=>Worker} callback
* @param {workerCb} callback
* @param {object} obj
* @param {number} [obj.limit]
*/
constructor(callback: () => Worker, { limit }?: {
constructor(callback: workerCb, { limit }?: {
limit?: number | undefined;
});
/**
Expand All @@ -21,14 +41,14 @@ export class WorkerManager {
*
* @param {Worker} worker
* @param {any} message
* @param {(event:any)=>void} callback
* @param {workerEventCb} callback
*/
postWorker(worker: Worker, message: any, callback: (event: any) => void): void;
postWorker(worker: Worker, message: any, callback: workerEventCb): void;
/**
*
* @param {any} message
* @param {(event:any)=>void} callback
* @param {workerEventCb} callback
*/
enqueue(message: any, callback: (event: any) => void): void;
enqueue(message: any, callback: workerEventCb): void;
#private;
}
6 changes: 3 additions & 3 deletions dist/package/declarations/utils/decorate-cli.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ export class DecoratedError extends Error {
* @summary Return original string decorated with control characters.
* @param {string} string - String to be decorated.
* @param {object} options - Options object.
* @param {string[]=} options.modifiers - String array of modifiers/control
* @param {string[]} [options.modifiers] - String array of modifiers/control
* characters to apply input string.
* @param {number=} options.tabs - Number of tab indents to include on string.
* @param {number=} options.tabSize - Number of spaces for each tab.
* @param {number} [options.tabs] - Number of tab indents to include on string.
* @param {number} [options.tabSize] - Number of spaces for each tab.
* @returns {string} Original string decorated with control characters.
*/
export function decorate(string: string, { modifiers, tabs, tabSize }?: {
Expand Down
16 changes: 8 additions & 8 deletions dist/package/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ declare class BlurridEncoder {
* dct coefficients.
*
* @param {object} obj - Object destructured argument.
* @param {number} [obj.length] - Desired length of encoded string.
* @param {string} [obj.subsampling] - Chroma subsampling string of the form
* "Y:Cb:Cr" where Y, Cb, Cr are all 3-bit numbers from 0-7 inclusive,
* corresponding to the sampling rates of luma, chroma blue and chroma
* red dct coefficients in the encoded string.
* @param {number} [obj.length=64] - Desired length of encoded string.
* @param {string} [obj.subsampling="4:2:2"] - Chroma subsampling string of
* the form "Y:Cb:Cr" where Y, Cb, Cr are all 3-bit numbers from 0-7
* inclusive, corresponding to the sampling rates of luma, chroma blue
* and chroma red dct coefficients in the encoded string.
* @returns {string}
*/
toString({ length, subsampling }?: {
Expand All @@ -97,16 +97,16 @@ declare class BlurridEncoder {
* and metadata pertaining to the image which is required for.
*
* @param {string} path - Relative path to image from point of execution.
* @param {number} samples - Maximum dimension of downsized sample image in any
* direction. Note that, due to max uniform limits in webgl fragment
* @param {number} [samples=16] - Maximum dimension of downsized sample image in
* any direction. Note that, due to max uniform limits in webgl fragment
* shaders, sample sizes greater than 16 will prevent a blur from being
* created using the webgl canvas. In this case the web component will
* set the image loading to `eager`, or will use web workers as a fallback
* if available to render the blur.
* @returns {Promise.<{buffer:Buffer, width:number, height:number}>} Data buffer
* and image metadata.
*/
declare function loadImage(path: string, samples?: number): Promise<{
declare function loadImage(path: string, samples?: number | undefined): Promise<{
buffer: Buffer;
width: number;
height: number;
Expand Down

0 comments on commit 290d394

Please sign in to comment.