Comparing version 0.0.2 to 0.0.3
@@ -1,3 +0,5 @@ | ||
export declare const setText: (mem: Uint8ClampedArray, idx: number, s: string) => void; | ||
export declare const getText: (mem: Uint8ClampedArray, idx: number) => string; | ||
type CreateOptions = { | ||
pageSize?: number; | ||
debug?: boolean; | ||
}; | ||
type EncodeOptions = { | ||
@@ -10,14 +12,23 @@ code_type?: keyof typeof Qrean.CODE_TYPES; | ||
scale?: number; | ||
padding?: number; | ||
padding?: number[]; | ||
}; | ||
type DetectOptions = { | ||
gamma?: number; | ||
eci_code?: 'UTF-8' | 'ShiftJIS' | 'Latin1'; | ||
outbuf_size?: number; | ||
digitized?: Uint8ClampedArray; | ||
eci_code?: 'UTF-8' | 'ShiftJIS' | 'Latin1'; | ||
}; | ||
type Image = { | ||
width: number; | ||
height: number; | ||
data: Uint8ClampedArray; | ||
}; | ||
export declare class Qrean { | ||
wasm: WebAssembly.WebAssemblyInstantiatedSource; | ||
on_found?: (type: string, str: string) => void; | ||
static create(debug?: boolean): Promise<Qrean>; | ||
heap: number; | ||
memory: WebAssembly.Memory; | ||
static create(opts?: CreateOptions): Promise<Qrean>; | ||
private constructor(); | ||
memreset(): void; | ||
static CODE_TYPE_QR: "QR"; | ||
@@ -255,5 +266,10 @@ static CODE_TYPE_MQR: "mQR"; | ||
}; | ||
encode(text: string, opts?: EncodeOptions | keyof typeof Qrean.CODE_TYPES): ImageData; | ||
detect(imgdata: ImageData, callback: (type: string, str: string) => void, opts?: DetectOptions): any; | ||
encode(text: string, opts?: EncodeOptions | keyof typeof Qrean.CODE_TYPES): Image; | ||
private allocImage; | ||
private readImage; | ||
detect(imgdata: Image, callback: (type: string, str: string) => void, opts?: DetectOptions): { | ||
detected: number; | ||
digitized: Image; | ||
}; | ||
} | ||
export {}; |
{ | ||
"name": "qrean", | ||
"type": "module", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "A portable QR and Barcode generation / manipulation library written in C", | ||
@@ -6,0 +6,0 @@ "module": "./dist/Qrean.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
475226
2203