scanbot-web-sdk 2.8.2 → 2.9.0-alpha3
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.
- package/@types/index.d.ts +8 -0
- package/@types/interfaces/i-text-data-scanner-handle.d.ts +6 -0
- package/@types/model/configuration/text-data-scanner-configuration.d.ts +12 -0
- package/@types/model/generic-text-line-recognizer/text-data-scanner-result.d.ts +6 -0
- package/@types/scanbot-sdk.d.ts +3 -0
- package/@types/service/text-data-recognizer.d.ts +11 -0
- package/@types/text-data-scanner-view.d.ts +39 -0
- package/bundle/ScanbotSDK.min.js +2 -2
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
- package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/complete/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
- package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
- package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
- package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
- package/package.json +1 -1
package/@types/index.d.ts
CHANGED
|
@@ -16,6 +16,10 @@ import { IMrzScannerHandle } from "./interfaces/i-mrz-scanner-handle";
|
|
|
16
16
|
import { MrzScannerConfiguration } from "./model/configuration/mrz-scanner-configuration";
|
|
17
17
|
import { MrzResult, MrzCheckDigits, MrzField } from "./model/mrz/mrz-result";
|
|
18
18
|
|
|
19
|
+
import { TextDataScannerResult } from './model/generic-text-line-recognizer/text-data-scanner-result';
|
|
20
|
+
import { TextDataScannerConfiguration } from "./model/configuration/text-data-scanner-configuration";
|
|
21
|
+
import { ITextDataScannerHandle } from "./interfaces/i-text-data-scanner-handle";
|
|
22
|
+
|
|
19
23
|
import PdfGenerator, { PdfGenerationOptions } from "./service/pdf-generator";
|
|
20
24
|
import TiffGenerator, { TiffGenerationOptions } from "./service/tiff-generator";
|
|
21
25
|
|
|
@@ -42,6 +46,10 @@ export {
|
|
|
42
46
|
MrzCheckDigits,
|
|
43
47
|
MrzField,
|
|
44
48
|
|
|
49
|
+
ITextDataScannerHandle,
|
|
50
|
+
TextDataScannerConfiguration,
|
|
51
|
+
TextDataScannerResult,
|
|
52
|
+
|
|
45
53
|
ICroppingViewHandle,
|
|
46
54
|
CroppingViewConfiguration,
|
|
47
55
|
CroppingResult,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TextDataScannerResult } from "../generic-text-line-recognizer/text-data-scanner-result";
|
|
2
|
+
import { ScannerConfiguration } from "./scanner-configuration";
|
|
3
|
+
import { ViewFinderConfiguration } from "./view-finder-configuration";
|
|
4
|
+
export declare class TextDataScannerConfiguration extends ScannerConfiguration {
|
|
5
|
+
constructor();
|
|
6
|
+
ocrResolutionLimit?: number;
|
|
7
|
+
supportedLanguages?: string[];
|
|
8
|
+
style?: ViewFinderConfiguration;
|
|
9
|
+
onTextDetected?: (e: TextDataScannerResult) => void;
|
|
10
|
+
_onDetectionFailed?: (e: ImageData) => void;
|
|
11
|
+
static fromJson(json: any): TextDataScannerConfiguration;
|
|
12
|
+
}
|
package/@types/scanbot-sdk.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ import SimpleMrzRecognizer from "./service/simple-mrz-recognizer";
|
|
|
21
21
|
import OcrEngine from "./service/ocr-engine";
|
|
22
22
|
import BlurDetector from "./service/blur-detector";
|
|
23
23
|
import { ContourDetectionResult } from "./model/document/contour-detection-result";
|
|
24
|
+
import { TextDataScannerConfiguration } from "./model/configuration/text-data-scanner-configuration";
|
|
25
|
+
import { ITextDataScannerHandle } from "./interfaces/i-text-data-scanner-handle";
|
|
24
26
|
export default class ScanbotSDK {
|
|
25
27
|
bridge: WorkerBridge;
|
|
26
28
|
initialized: boolean;
|
|
@@ -34,6 +36,7 @@ export default class ScanbotSDK {
|
|
|
34
36
|
createMrzScanner(configuration: MrzScannerConfiguration): Promise<IMrzScannerHandle>;
|
|
35
37
|
createBarcodeScanner(configuration: BarcodeScannerConfiguration): Promise<IBarcodeScannerHandle>;
|
|
36
38
|
openCroppingView(configuration: CroppingViewConfiguration): Promise<ICroppingViewHandle>;
|
|
39
|
+
createTextDataScanner(configuration: TextDataScannerConfiguration): Promise<ITextDataScannerHandle>;
|
|
37
40
|
/**
|
|
38
41
|
* Image Operations
|
|
39
42
|
*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TextDataScannerResult } from '../model/generic-text-line-recognizer/text-data-scanner-result';
|
|
2
|
+
import ScanbotSDK from '../scanbot-sdk';
|
|
3
|
+
export default class TextDataScanner {
|
|
4
|
+
_textDataScannerToken: string;
|
|
5
|
+
_sdk: ScanbotSDK;
|
|
6
|
+
constructor(sdk: ScanbotSDK, textDataScannerToken: string);
|
|
7
|
+
recognize(imageData: ImageData): Promise<TextDataScannerResult>;
|
|
8
|
+
cleanRecognitionQueue(): Promise<void>;
|
|
9
|
+
recognizeURL(imageURL: string): Promise<TextDataScannerResult>;
|
|
10
|
+
release(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ScanbotCameraProps, ScanbotCameraState, ScannerView } from "./scanner-view";
|
|
3
|
+
import { TextDataScannerConfiguration } from "./model/configuration/text-data-scanner-configuration";
|
|
4
|
+
import { ViewFinder } from "./view/view-finder";
|
|
5
|
+
import TextDataScanner from "./service/text-data-recognizer";
|
|
6
|
+
export declare class TextDataScannerProps extends ScanbotCameraProps {
|
|
7
|
+
textDataScanner: TextDataScanner;
|
|
8
|
+
}
|
|
9
|
+
export declare class TextDataScannerState extends ScanbotCameraState {
|
|
10
|
+
isFinderVisible?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export default class TextDataScannerView extends ScannerView<TextDataScannerProps, TextDataScannerState> {
|
|
13
|
+
static FRAME_RESOLUTION: number;
|
|
14
|
+
finder?: ViewFinder;
|
|
15
|
+
shouldComputeSize: boolean;
|
|
16
|
+
private paused;
|
|
17
|
+
constructor(props: TextDataScannerProps);
|
|
18
|
+
get configuration(): TextDataScannerConfiguration;
|
|
19
|
+
get enabled(): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Public API functions
|
|
22
|
+
*/
|
|
23
|
+
static create(configuration: TextDataScannerConfiguration, textDataScanner: TextDataScanner): Promise<TextDataScannerView>;
|
|
24
|
+
isDetectionPaused(): boolean;
|
|
25
|
+
resumeDetection(): Promise<void>;
|
|
26
|
+
pauseDetection(): void;
|
|
27
|
+
/**
|
|
28
|
+
* React Overrides
|
|
29
|
+
*/
|
|
30
|
+
componentDidMount(): Promise<void>;
|
|
31
|
+
componentWillUnmount(): void;
|
|
32
|
+
updateDimensions(): Promise<void>;
|
|
33
|
+
resume(): Promise<void>;
|
|
34
|
+
pause(): void;
|
|
35
|
+
computeSize(): boolean;
|
|
36
|
+
detect(): Promise<void>;
|
|
37
|
+
saveExtractedImageData(): void;
|
|
38
|
+
render(): JSX.Element;
|
|
39
|
+
}
|