@undecaf/barcode-detector-polyfill
Advanced tools
Comparing version 0.9.12 to 0.9.13
@@ -0,2 +1,25 @@ | ||
type Point = { | ||
x: number; | ||
y: number; | ||
}; | ||
/** | ||
* @see https://wicg.github.io/shape-detection-api/#detectedbarcode-section | ||
*/ | ||
interface DetectedBarcode { | ||
boundingBox: DOMRectReadOnly; | ||
cornerPoints: Array<Point>; | ||
format: string; | ||
rawValue: string; | ||
// @undecaf/zbar-wasm extensions | ||
orientation: Orientation; | ||
quality: number; | ||
} | ||
declare enum Orientation { | ||
UNKNOWN = -1, | ||
UPRIGHT = 0, | ||
ROTATED_RIGHT = 1, | ||
UPSIDE_DOWN = 2, | ||
ROTATED_LEFT = 3 | ||
} | ||
/** | ||
* Additional {@link BarcodeDetectorPolyfill} options supported by | ||
@@ -40,7 +63,7 @@ * the underlying ZBar implementation. | ||
* | ||
* @param {ImageBitmapSource} image the image to be scanned | ||
* @returns {Promise<Object>} the scan result as described for {@link BarcodeDetector} | ||
* @param {ImageBitmapSource} source the image to be scanned | ||
* @returns {Promise<Array<DetectedBarcode>>} the scan result as described for {@link BarcodeDetector} | ||
*/ | ||
// TODO Enable cache for video source, disable for others unless overridden in zbarConfig | ||
detect(source: ImageBitmapSource): Promise<Array<Object>>; | ||
detect(source: ImageBitmapSource): Promise<Array<DetectedBarcode>>; | ||
/** | ||
@@ -64,24 +87,2 @@ * Returns an {@link ZBarScanner} configured for the requested barcode formats. | ||
} | ||
/** | ||
* @see https://wicg.github.io/shape-detection-api/#detectedbarcode-section | ||
*/ | ||
interface DetectedBarcode { | ||
boundingBox: DOMRectReadOnly; | ||
cornerPoints: Array<{ | ||
x: any; | ||
y: any; | ||
}>; | ||
format: string; | ||
rawValue: string; | ||
// @undecaf/zbar-wasm extensions | ||
orientation: Orientation; | ||
quality: number; | ||
} | ||
declare enum Orientation { | ||
UNKNOWN = -1, | ||
UPRIGHT = 0, | ||
ROTATED_RIGHT = 1, | ||
UPSIDE_DOWN = 2, | ||
ROTATED_LEFT = 3 | ||
} | ||
declare const ZBAR_WASM_PKG_NAME = "__ZBAR_WASM_PKG_NAME__"; | ||
@@ -88,0 +89,0 @@ declare const ZBAR_WASM_VERSION = "__ZBAR_WASM_VERSION__"; |
/*! | ||
* @undecaf/barcode-detector-polyfill v0.9.12 | ||
* @undecaf/barcode-detector-polyfill v0.9.13 | ||
* A WebAssembly polyfill for the Barcode Detection API | ||
* Built 2022-08-18T08:41:14.405Z | ||
* Built 2022-09-15T07:57:08.789Z | ||
* (c) 2021-present Ferdinand Kasper <fkasper@modus-operandi.at> | ||
@@ -6,0 +6,0 @@ * Released under the MIT license. |
@@ -0,2 +1,25 @@ | ||
type Point = { | ||
x: number; | ||
y: number; | ||
}; | ||
/** | ||
* @see https://wicg.github.io/shape-detection-api/#detectedbarcode-section | ||
*/ | ||
interface DetectedBarcode { | ||
boundingBox: DOMRectReadOnly; | ||
cornerPoints: Array<Point>; | ||
format: string; | ||
rawValue: string; | ||
// @undecaf/zbar-wasm extensions | ||
orientation: Orientation; | ||
quality: number; | ||
} | ||
declare enum Orientation { | ||
UNKNOWN = -1, | ||
UPRIGHT = 0, | ||
ROTATED_RIGHT = 1, | ||
UPSIDE_DOWN = 2, | ||
ROTATED_LEFT = 3 | ||
} | ||
/** | ||
* Additional {@link BarcodeDetectorPolyfill} options supported by | ||
@@ -40,7 +63,7 @@ * the underlying ZBar implementation. | ||
* | ||
* @param {ImageBitmapSource} image the image to be scanned | ||
* @returns {Promise<Object>} the scan result as described for {@link BarcodeDetector} | ||
* @param {ImageBitmapSource} source the image to be scanned | ||
* @returns {Promise<Array<DetectedBarcode>>} the scan result as described for {@link BarcodeDetector} | ||
*/ | ||
// TODO Enable cache for video source, disable for others unless overridden in zbarConfig | ||
detect(source: ImageBitmapSource): Promise<Array<Object>>; | ||
detect(source: ImageBitmapSource): Promise<Array<DetectedBarcode>>; | ||
/** | ||
@@ -64,24 +87,2 @@ * Returns an {@link ZBarScanner} configured for the requested barcode formats. | ||
} | ||
/** | ||
* @see https://wicg.github.io/shape-detection-api/#detectedbarcode-section | ||
*/ | ||
interface DetectedBarcode { | ||
boundingBox: DOMRectReadOnly; | ||
cornerPoints: Array<{ | ||
x: any; | ||
y: any; | ||
}>; | ||
format: string; | ||
rawValue: string; | ||
// @undecaf/zbar-wasm extensions | ||
orientation: Orientation; | ||
quality: number; | ||
} | ||
declare enum Orientation { | ||
UNKNOWN = -1, | ||
UPRIGHT = 0, | ||
ROTATED_RIGHT = 1, | ||
UPSIDE_DOWN = 2, | ||
ROTATED_LEFT = 3 | ||
} | ||
declare const ZBAR_WASM_PKG_NAME = "__ZBAR_WASM_PKG_NAME__"; | ||
@@ -88,0 +89,0 @@ declare const ZBAR_WASM_VERSION = "__ZBAR_WASM_VERSION__"; |
/*! | ||
* @undecaf/barcode-detector-polyfill v0.9.12 | ||
* @undecaf/barcode-detector-polyfill v0.9.13 | ||
* A WebAssembly polyfill for the Barcode Detection API | ||
* Built 2022-08-18T08:41:14.405Z | ||
* Built 2022-09-15T07:57:08.789Z | ||
* (c) 2021-present Ferdinand Kasper <fkasper@modus-operandi.at> | ||
@@ -6,0 +6,0 @@ * Released under the MIT license. |
{ | ||
"name": "@undecaf/barcode-detector-polyfill", | ||
"version": "0.9.12", | ||
"version": "0.9.13", | ||
"description": "A WebAssembly polyfill for the Barcode Detection API", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
31779
269