scanbot-web-sdk 5.0.1-beta.2 → 6.0.0-dev.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.
Files changed (181) hide show
  1. package/@types/barcode-scanner-view.d.ts +11 -10
  2. package/@types/core/utils.d.ts +1 -0
  3. package/@types/core/worker-bridge.d.ts +1 -0
  4. package/@types/cropping-view.d.ts +1 -1
  5. package/@types/document-scanner-view.d.ts +2 -3
  6. package/@types/index.d.ts +5 -3
  7. package/@types/model/barcode/barcode-format.d.ts +1 -1
  8. package/@types/model/barcode/engine-mode.d.ts +1 -1
  9. package/@types/model/camera-info.d.ts +1 -1
  10. package/@types/model/configuration/barcode-scanner-configuration.d.ts +2 -5
  11. package/@types/model/configuration/base-configuration.d.ts +4 -5
  12. package/@types/model/configuration/document-scanner-configuration.d.ts +0 -9
  13. package/@types/model/configuration/initialization-options.d.ts +14 -3
  14. package/@types/model/configuration/mrz-scanner-configuration.d.ts +2 -4
  15. package/@types/model/configuration/scanner-configuration.d.ts +3 -2
  16. package/@types/model/configuration/selection-overlay-configuration.d.ts +7 -1
  17. package/@types/model/configuration/text-data-scanner-configuration.d.ts +4 -27
  18. package/@types/model/configuration/view-finder-scanner-configuration.d.ts +11 -0
  19. package/@types/model/configuration/vin-scanner-configuration.d.ts +2 -4
  20. package/@types/model/document/contour-detection-result.d.ts +0 -8
  21. package/@types/model/filter-types.d.ts +3 -3
  22. package/@types/model/mrz/mrz-result.d.ts +1 -1
  23. package/@types/model/response/document-quality-analyzer-result.d.ts +1 -1
  24. package/@types/mrz-scanner-view.d.ts +6 -6
  25. package/@types/scanbot-sdk.d.ts +4 -1
  26. package/@types/scanner-view.d.ts +4 -1
  27. package/@types/service/image-processor.d.ts +1 -1
  28. package/@types/service/pdf-generator.d.ts +3 -3
  29. package/@types/service/simple-mrz-recognizer.d.ts +3 -3
  30. package/@types/service/text-data-recognizer.d.ts +3 -3
  31. package/@types/text-data-scanner-view.d.ts +9 -11
  32. package/@types/ui2/configuration/ActionBarConfiguration.d.ts +42 -0
  33. package/@types/ui2/configuration/ArTrackingOverlayConfiguration.d.ts +323 -0
  34. package/@types/ui2/configuration/BarcodeInfoMapping.d.ts +96 -0
  35. package/@types/ui2/configuration/BarcodeItem.d.ts +30 -0
  36. package/@types/ui2/configuration/BarcodeItemMapper.d.ts +6 -0
  37. package/@types/ui2/configuration/BarcodeRecognizerConfiguration.d.ts +199 -0
  38. package/@types/ui2/configuration/BarcodeResult.d.ts +14 -0
  39. package/@types/ui2/configuration/BarcodeScannerConfiguration.d.ts +237 -0
  40. package/@types/ui2/configuration/BarcodeTextLocalization.d.ts +178 -0
  41. package/@types/ui2/configuration/BarcodeUseCase.d.ts +10 -0
  42. package/@types/ui2/configuration/CameraConfiguration.d.ts +61 -0
  43. package/@types/ui2/configuration/CameraPermission.d.ts +69 -0
  44. package/@types/ui2/configuration/Common.d.ts +396 -0
  45. package/@types/ui2/configuration/FindAndPickScanningModeUseCase.d.ts +25 -0
  46. package/@types/ui2/configuration/MultipleScanningModeUseCase.d.ts +610 -0
  47. package/@types/ui2/configuration/ScanbotAlertDialog.d.ts +49 -0
  48. package/@types/ui2/configuration/SingleScanningModeUseCase.d.ts +202 -0
  49. package/@types/ui2/configuration/TopBarConfiguration.d.ts +71 -0
  50. package/@types/ui2/configuration/UserGuidanceConfiguration.d.ts +30 -0
  51. package/@types/ui2/configuration/ViewFinderConfiguration.d.ts +90 -0
  52. package/@types/ui2/configuration/utils.d.ts +6 -0
  53. package/@types/ui2/configuration.d.ts +20 -0
  54. package/@types/ui2/controllers/barcode-scanner-controller.d.ts +9 -0
  55. package/@types/ui2/controllers/multiple-scanning-mode-controller.d.ts +10 -0
  56. package/@types/ui2/controllers/single-scanning-mode-controller.d.ts +11 -0
  57. package/@types/ui2/create-sb-theme.d.ts +14 -0
  58. package/@types/ui2/model/counted-barcodes.d.ts +31 -0
  59. package/@types/ui2/scanbot-sdk-ui.d.ts +7 -0
  60. package/@types/ui2/scanbot-ui-library.d.ts +17 -0
  61. package/@types/ui2/service/haptics-manager.d.ts +6 -0
  62. package/@types/ui2/service/sound-manager.d.ts +8 -0
  63. package/@types/ui2/utils/barcode-mapper.d.ts +29 -0
  64. package/@types/ui2/utils/camera-config.d.ts +3 -0
  65. package/@types/ui2/utils/dynamic-viewport-height.d.ts +2 -0
  66. package/@types/ui2/utils/lazy-initialized-singleton.d.ts +6 -0
  67. package/@types/ui2/utils/styled-badge.d.ts +9 -0
  68. package/@types/ui2/utils/styled-box.d.ts +8 -0
  69. package/@types/ui2/utils/styled-button.d.ts +7 -0
  70. package/@types/ui2/utils/styled-input.d.ts +6 -0
  71. package/@types/ui2/utils/useScanningViewSize.d.ts +8 -0
  72. package/@types/ui2/views/action-button/action-button-container.d.ts +21 -0
  73. package/@types/ui2/views/action-button/action-button.d.ts +13 -0
  74. package/@types/ui2/views/ar/ar-overlay-barcode-info.d.ts +19 -0
  75. package/@types/ui2/views/barcode-info/barcode-info.d.ts +24 -0
  76. package/@types/ui2/views/barcode-scanner.d.ts +24 -0
  77. package/@types/ui2/views/camera-permission-denied.d.ts +8 -0
  78. package/@types/ui2/views/dialog/barcode-info-dialog.d.ts +28 -0
  79. package/@types/ui2/views/dialog/barcode-mapping-error-dialog.d.ts +12 -0
  80. package/@types/ui2/views/dialog/count-edit-dialog.d.ts +11 -0
  81. package/@types/ui2/views/dialog/styled-dialog.d.ts +7 -0
  82. package/@types/ui2/views/drawer/barcode-result-drawer.d.ts +18 -0
  83. package/@types/ui2/views/drawer/counting-button.d.ts +11 -0
  84. package/@types/ui2/views/drawer/hooks/use-drag-listener.d.ts +26 -0
  85. package/@types/ui2/views/drawer/subviews/barcode-drawer-empty-state.d.ts +8 -0
  86. package/@types/ui2/views/drawer/subviews/barcode-drawer-header.d.ts +9 -0
  87. package/@types/ui2/views/drawer/subviews/barcode-list-item.d.ts +12 -0
  88. package/@types/ui2/views/drawer/subviews/barcode-list.d.ts +12 -0
  89. package/@types/ui2/views/drawer/subviews/drawer-header-content.d.ts +10 -0
  90. package/@types/ui2/views/drawer/subviews/swipe-underlay.d.ts +7 -0
  91. package/@types/ui2/views/form/dialog-button.d.ts +12 -0
  92. package/@types/ui2/views/navigation-bar.d.ts +15 -0
  93. package/@types/ui2/views/styled-text.d.ts +15 -0
  94. package/@types/utils/colors.d.ts +5 -0
  95. package/@types/utils/constants.d.ts +1 -0
  96. package/@types/utils/dto/Frame.d.ts +1 -0
  97. package/@types/utils/dto/Point.d.ts +1 -0
  98. package/@types/utils/dto/Polygon.d.ts +1 -1
  99. package/@types/utils/logger.d.ts +1 -0
  100. package/@types/utils/react/usePromise.d.ts +12 -0
  101. package/@types/utils/video-stream.d.ts +8 -1
  102. package/@types/view/barcode-calculation/barcode-calculation-popup.d.ts +1 -1
  103. package/@types/view/barcode-calculation/styled-spinner.d.ts +4 -2
  104. package/@types/view/barcode-polygon/animated-barcode-selection-overlay.d.ts +9 -3
  105. package/@types/view/barcode-polygon/barcode-polygon-label.d.ts +5 -1
  106. package/@types/view/cropping/cropping-image.d.ts +1 -1
  107. package/@types/view/cropping/draggable-handles-component.d.ts +1 -1
  108. package/@types/view/cropping/draggable-lines-container.d.ts +2 -2
  109. package/@types/view/cropping/draggable-points-container.d.ts +2 -2
  110. package/@types/view/cropping/magnetic-lines-component.d.ts +2 -2
  111. package/@types/view/cropping/magnifier-view.d.ts +4 -4
  112. package/@types/view/document-outline.d.ts +1 -1
  113. package/@types/view/polygon/animated-document-polygon.d.ts +1 -1
  114. package/@types/view/polygon/document-line-quad.d.ts +2 -2
  115. package/@types/view/polygon/draggable-document-polygon.d.ts +1 -1
  116. package/@types/view/scanbot-camera-view.d.ts +10 -4
  117. package/@types/view/shutter-button.d.ts +8 -8
  118. package/@types/view/utils/animatable.d.ts +2 -1
  119. package/@types/view/utils/icons/empty-state-box.d.ts +4 -0
  120. package/@types/view/utils/scroll-lock.d.ts +1 -1
  121. package/@types/view/view-finder.d.ts +49 -31
  122. package/@types/worker/worker-bridge.d.ts +7 -3
  123. package/README.md +3 -3
  124. package/bundle/ScanbotSDK.min.js +34 -5
  125. package/bundle/ScanbotSDK.ui2.min.js +240 -0
  126. package/bundle/ScanbotSDK.ui2.min.js.LICENSE.txt +31 -0
  127. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -0
  128. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  129. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.worker.js +1 -0
  130. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  131. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
  132. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
  133. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -0
  134. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -2
  135. package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -2
  136. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -0
  137. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  138. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm-webpack-file-loader +0 -0
  139. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.worker.js +1 -0
  140. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
  141. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm-webpack-file-loader +0 -0
  142. package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
  143. package/bundle/bin/complete/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
  144. package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -0
  145. package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -2
  146. package/bundle/bin/complete/ScanbotSDK.Core.js +1 -2
  147. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -0
  148. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  149. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.worker.js +1 -0
  150. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  151. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
  152. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
  153. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -0
  154. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -2
  155. package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -2
  156. package/package.json +1 -1
  157. package/webpack/fileLoader.js +10 -0
  158. package/webpack/index.js +1 -13
  159. package/webpack/ui.d.ts +0 -0
  160. package/webpack/ui.js +3 -0
  161. package/@types/model/configuration/text-style-configuration.d.ts +0 -5
  162. package/@types/model/configuration/view-finder-configuration.d.ts +0 -8
  163. package/@types/model/configuration/window-style-configuration.d.ts +0 -10
  164. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js.LICENSE.txt +0 -232
  165. package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js.LICENSE.txt +0 -232
  166. package/bundle/bin/barcode-scanner/tfjs-backend-wasm-simd.wasm +0 -0
  167. package/bundle/bin/barcode-scanner/tfjs-backend-wasm-threaded-simd.wasm +0 -0
  168. package/bundle/bin/barcode-scanner/tfjs-backend-wasm.wasm +0 -0
  169. package/bundle/bin/complete/ScanbotSDK.Core-simd.js.LICENSE.txt +0 -232
  170. package/bundle/bin/complete/ScanbotSDK.Core.js.LICENSE.txt +0 -232
  171. package/bundle/bin/complete/tfjs-backend-wasm-simd.wasm +0 -0
  172. package/bundle/bin/complete/tfjs-backend-wasm-threaded-simd.wasm +0 -0
  173. package/bundle/bin/complete/tfjs-backend-wasm.wasm +0 -0
  174. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js.LICENSE.txt +0 -232
  175. package/bundle/bin/document-scanner/ScanbotSDK.Core.js.LICENSE.txt +0 -232
  176. package/bundle/bin/document-scanner/tfjs-backend-wasm-simd.wasm +0 -0
  177. package/bundle/bin/document-scanner/tfjs-backend-wasm-threaded-simd.wasm +0 -0
  178. package/bundle/bin/document-scanner/tfjs-backend-wasm.wasm +0 -0
  179. package/bundle/bin/loader/tfjs-backend-wasm-simd.wasm-helper +0 -0
  180. package/bundle/bin/loader/tfjs-backend-wasm-threaded-simd.wasm-helper +0 -0
  181. package/bundle/bin/loader/tfjs-backend-wasm.wasm-helper +0 -0
@@ -1,19 +1,19 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { ScanbotCameraProps, ScanbotCameraState, ScannerView } from "./scanner-view";
3
- import { BarcodeScannerConfiguration } from "./model/configuration/barcode-scanner-configuration";
4
- import { BarcodeResult } from "./model/barcode/barcode-result";
5
- import { ViewFinder } from "./view/view-finder";
6
- import { Size } from "./utils/dto/Size";
3
+ import { IBarcodeScannerHandle } from "./interfaces/i-barcode-scanner-handle";
4
+ import ViewFinder, { ViewFinderPadding } from "./view/view-finder";
7
5
  import { ShutterButtonAction } from "./view/shutter-button";
8
6
  import BarcodeCalculationPopup from "./view/barcode-calculation/barcode-calculation-popup";
9
7
  import AnimatedBarcodeSelectionOverlay from "./view/barcode-polygon/animated-barcode-selection-overlay";
10
8
  import BottomActionBar from "./view/action-bar/bottom-action-bar";
11
9
  import ScannedImageWithOverlay from "./view/barcode-calculation/scanned-image-with-overlay";
10
+ import { BarcodeScannerConfiguration } from "./model/configuration/barcode-scanner-configuration";
11
+ import { BarcodeResult } from "./model/barcode/barcode-result";
12
12
  import { ImageDataWrapper } from "./model/image-data-wrapper";
13
13
  import { Barcode } from "./model/barcode/barcode";
14
- import { IBarcodeScannerHandle } from "./interfaces/i-barcode-scanner-handle";
14
+ import { Size } from "./utils/dto/Size";
15
15
  export declare class BarcodeScannerProps extends ScanbotCameraProps {
16
- showFinder?: boolean;
16
+ viewFinderPadding?: ViewFinderPadding;
17
17
  }
18
18
  export declare class BarcodeScannerState extends ScanbotCameraState {
19
19
  isFinderVisible?: boolean;
@@ -27,7 +27,6 @@ export default class BarcodeScannerView extends ScannerView<BarcodeScannerProps,
27
27
  shouldComputeSize: boolean;
28
28
  private _configuration;
29
29
  private paused;
30
- finderRect: DOMRect | undefined;
31
30
  recognition: {
32
31
  imageData: ImageDataWrapper;
33
32
  originalImage: any;
@@ -38,6 +37,7 @@ export default class BarcodeScannerView extends ScannerView<BarcodeScannerProps,
38
37
  scannedImage: ScannedImageWithOverlay | undefined;
39
38
  bottomActionBar: BottomActionBar | undefined;
40
39
  readonly barcodes: Barcode[];
40
+ private detectionRunning;
41
41
  constructor(props: BarcodeScannerProps);
42
42
  get configuration(): BarcodeScannerConfiguration;
43
43
  get enabled(): boolean;
@@ -48,6 +48,7 @@ export default class BarcodeScannerView extends ScannerView<BarcodeScannerProps,
48
48
  isDetectionPaused(): boolean;
49
49
  resumeDetection(): Promise<void>;
50
50
  pauseDetection(): void;
51
+ private readonly updateDimensionsCallback;
51
52
  /**
52
53
  * React Overrides
53
54
  */
@@ -56,7 +57,6 @@ export default class BarcodeScannerView extends ScannerView<BarcodeScannerProps,
56
57
  updateDimensions(): Promise<void>;
57
58
  resume(): Promise<void>;
58
59
  pause(): void;
59
- computeSize(): boolean;
60
60
  detect(): Promise<void>;
61
61
  backendurl: string | undefined;
62
62
  setUseBackendService(url: string | undefined): void;
@@ -67,9 +67,10 @@ export default class BarcodeScannerView extends ScannerView<BarcodeScannerProps,
67
67
  saveExtractedImageData(): void;
68
68
  setFinderVisible(isVisible: boolean): void;
69
69
  setZoom(zoom: number): void;
70
+ setCameraDirection(direction: "environment" | "user"): void;
70
71
  updateTorch(enabled: boolean): void;
71
72
  getCapabilities(): MediaTrackCapabilities | undefined;
72
- render(): JSX.Element;
73
+ render(): React.JSX.Element;
73
74
  resetCountImage(): void;
74
75
  countLabelText(barcodes: Barcode[]): string;
75
76
  }
@@ -0,0 +1 @@
1
+ export function areThreadsAvailable(): boolean;
@@ -2,6 +2,7 @@
2
2
  export class WorkerBridgeInitOptions {
3
3
  allowSimd?: boolean;
4
4
  allowThreads?: boolean;
5
+ requestSuffix?: string;
5
6
  }
6
7
 
7
8
  export class WorkerBridge {
@@ -57,7 +57,7 @@ export default class CroppingView extends React.Component<CroppingViewProps, Cro
57
57
  onResize(): void;
58
58
  initializeSizes(relativeCoordPolygon?: Polygon, horizontalLines?: MagneticLine[], verticalLines?: MagneticLine[]): void;
59
59
  magnifier?: MagnifierView;
60
- render(): JSX.Element;
60
+ render(): React.JSX.Element;
61
61
  showMagnifier(data: any): void;
62
62
  updateMagnifier(data: any): void;
63
63
  magnifierOptions(data: any): MagnifierOptions;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { DocumentScannerConfiguration } from "./model/configuration/document-scanner-configuration";
3
3
  import { DocumentDetectionResult } from "./model/document/document-detection-result";
4
4
  import { ScanbotCameraProps, ScanbotCameraState, ScannerView } from "./scanner-view";
@@ -11,7 +11,6 @@ export declare class DocumentScannerState extends ScanbotCameraState {
11
11
  action: ShutterButtonAction;
12
12
  }
13
13
  export declare class DocumentScannerProps extends ScanbotCameraProps {
14
- configuration: DocumentScannerConfiguration;
15
14
  }
16
15
  export default class DocumentScannerView extends ScannerView<DocumentScannerProps, DocumentScannerState> implements IDocumentScannerHandle {
17
16
  static DETECT_AND_CROP_RESOLUTION: number;
@@ -46,7 +45,7 @@ export default class DocumentScannerView extends ScannerView<DocumentScannerProp
46
45
  preventAutoCapture?: boolean;
47
46
  handleAutoCapture(statusOk: boolean, polygon?: Polygon): Promise<void>;
48
47
  updateButton(action: ShutterButtonAction): void;
49
- render(): JSX.Element;
48
+ render(): React.JSX.Element;
50
49
  defaultCaptureButtonClick: () => Promise<void>;
51
50
  private scalePolygonPointsToPixels;
52
51
  private runMovementPredicate;
package/@types/index.d.ts CHANGED
@@ -4,6 +4,8 @@ export { DocumentDetectionResult } from "./model/document/document-detection-res
4
4
  export { ContourDetectionResult } from "./model/document/contour-detection-result";
5
5
  export * as DetectionStatus from "./model/document/detection-status";
6
6
 
7
+ export { ViewFinderScannerConfiguration } from "./model/configuration/view-finder-scanner-configuration";
8
+
7
9
  export { ICroppingViewHandle } from "./interfaces/i-cropping-view-handle";
8
10
  export { CroppingViewConfiguration, CroppingViewStyle, CroppingViewMagneticLineStyle, CroppingViewMagnifierStyle, CroppingViewPolygonStyle, CroppingViewMagnifierBorderStyle, CroppingViewMagnifierCrosshairStyle, CroppingViewPolygonHandleStyle } from "./model/configuration/cropping-view-configuration";
9
11
  export { CroppingResult } from "./model/response/cropping-result";
@@ -42,9 +44,6 @@ export { Size } from "./utils/dto/Size";
42
44
  export { VideoSize } from "./utils/dto/VideoSize";
43
45
 
44
46
  export { SelectionOverlayConfiguration, IBarcodePolygonHandle, IBarcodePolygonLabelHandle, BarcodePolygonStyle, SelectionOverlayTextFormat, SelectionOverlayStyleConfiguration, BarcodePolygonLabelStyle } from "./model/configuration/selection-overlay-configuration";
45
- export { ViewFinderConfiguration } from "./model/configuration/view-finder-configuration";
46
- export { TextStyleConfiguration } from "./model/configuration/text-style-configuration";
47
- export { WindowStyleConfiguration } from "./model/configuration/window-style-configuration";
48
47
 
49
48
  export { default as PdfGenerator, PdfGenerationOptions, PageDirection, PageSize, PageFit } from "./service/pdf-generator";
50
49
  export { default as TiffGenerator, TiffGenerationOptions } from "./service/tiff-generator";
@@ -56,3 +55,6 @@ export { Barcode } from "./model/barcode/barcode";
56
55
  export { InitializationOptions } from "./model/configuration/initialization-options";
57
56
  export { LicenseInfo } from "./model/response/license-info";
58
57
  export { CameraInfo, CameraFacingMode } from "./model/camera-info";
58
+
59
+ export { default as ScanbotSDKUI2 } from "./ui2/scanbot-sdk-ui";
60
+ export * as UIConfig from "./ui2/configuration";
@@ -1 +1 @@
1
- export declare type BarcodeFormat = "ONE_D" | "AZTEC" | "CODABAR" | "CODE_39" | "CODE_93" | "CODE_128" | "DATA_MATRIX" | "EAN_8" | "EAN_13" | "ITF" | "MAXICODE" | "PDF_417" | "QR_CODE" | "UPC_A" | "UPC_E" | "UPC_EAN_EXTENSION" | "MSI_PLESSEY" | "IATA_2_OF_5" | "INDUSTRIAL_2_OF_5" | "CODE_25" | "MICRO_QR_CODE" | "USPS_INTELLIGENT_MAIL" | "ROYAL_MAIL" | "JAPAN_POST" | "ROYAL_TNT_POST" | "AUSTRALIA_POST" | "DATABAR" | "DATABAR_EXPANDED" | "DATABAR_LIMITED" | "GS1_COMPOSITE";
1
+ export type BarcodeFormat = "ONE_D" | "AZTEC" | "CODABAR" | "CODE_39" | "CODE_93" | "CODE_128" | "DATA_MATRIX" | "EAN_8" | "EAN_13" | "ITF" | "MAXICODE" | "PDF_417" | "QR_CODE" | "UPC_A" | "UPC_E" | "UPC_EAN_EXTENSION" | "MSI_PLESSEY" | "IATA_2_OF_5" | "INDUSTRIAL_2_OF_5" | "CODE_25" | "MICRO_QR_CODE" | "USPS_INTELLIGENT_MAIL" | "ROYAL_MAIL" | "JAPAN_POST" | "ROYAL_TNT_POST" | "AUSTRALIA_POST" | "DATABAR" | "DATABAR_EXPANDED" | "DATABAR_LIMITED" | "GS1_COMPOSITE";
@@ -1 +1 @@
1
- export declare type EngineMode = "NEXT_GEN" | "LEGACY";
1
+ export type EngineMode = "NEXT_GEN" | "LEGACY";
@@ -1,4 +1,4 @@
1
- export declare type CameraFacingMode = 'front' | 'back' | 'unknown';
1
+ export type CameraFacingMode = 'front' | 'back' | 'unknown';
2
2
  export interface CameraInfo {
3
3
  deviceId: string;
4
4
  label: string;
@@ -1,22 +1,19 @@
1
- import { ScannerConfiguration } from "./scanner-configuration";
2
1
  import { BarcodeResult } from "../barcode/barcode-result";
3
2
  import { EngineMode } from "../barcode/engine-mode";
4
3
  import { BarcodeFormat } from "../barcode/barcode-format";
5
- import { ViewFinderConfiguration } from "./view-finder-configuration";
6
4
  import { SelectionOverlayConfiguration } from "./selection-overlay-configuration";
7
5
  import { BarcodeCountConfiguration } from "./barcode-count-configuration";
8
- export declare class BarcodeScannerConfiguration extends ScannerConfiguration {
6
+ import { ViewFinderScannerConfiguration } from "./view-finder-scanner-configuration";
7
+ export declare class BarcodeScannerConfiguration extends ViewFinderScannerConfiguration {
9
8
  constructor();
10
9
  /**
11
10
  * Capture delay in milliseconds after detecting barcodes. Defaults to 1000
12
11
  */
13
12
  captureDelay?: number;
14
- style?: ViewFinderConfiguration;
15
13
  overlay?: SelectionOverlayConfiguration;
16
14
  engineMode?: EngineMode;
17
15
  barcodeFormats?: BarcodeFormat[];
18
16
  returnBarcodeImage?: boolean;
19
- showFinder?: boolean;
20
17
  /**
21
18
  * Special property to enable barcode count mode.
22
19
  * This is a type of a ready-to-use user interface scanning and counting found barcodes.
@@ -17,10 +17,9 @@ export declare class BaseConfiguration {
17
17
  static mapValuesDeep(source: any, destination: {
18
18
  [key: string]: any;
19
19
  }): void;
20
- /** Instantiate a new configuration object of type T and merge any of its values with the values provided
21
- * in the partialConfigurationObject.
20
+ /**
21
+ * Populate a base configuration object
22
+ * and merge any of its values with the values provided in the partialConfigurationObject.
22
23
  */
23
- protected static _fromJson<T extends BaseConfiguration>(t: {
24
- new (): T;
25
- }, partialConfigurationObject: any): T;
24
+ protected static _fromJson<BaseConfiguration>(result: BaseConfiguration, partialConfigurationObject: any): BaseConfiguration;
26
25
  }
@@ -53,15 +53,6 @@ export declare class CaptureButtonStyleConfiguration {
53
53
  }
54
54
  export declare class DocumentScannerConfiguration extends ScannerConfiguration {
55
55
  constructor();
56
- /**
57
- * An average brightness is computed as follows: It is the average
58
- * of the Value channel in the HSV color space of:
59
- * - the whole image, if no document was detected
60
- * - the document crop, if a document was detected
61
- * It ranges from 0 to 255.
62
- * If this computed value is below the acceptanceBrightnessThreshold, the document is accepted.
63
- */
64
- acceptedBrightnessThreshold?: number;
65
56
  /**
66
57
  * The minimum score in percent (0 - 100) of the perspective
67
58
  * distortion to accept a detected document. Default is 75.0.
@@ -8,13 +8,24 @@ export interface InitializationOptions {
8
8
  */
9
9
  engine?: string;
10
10
  /**
11
- * Detemines whether threading is allowed in the WebAssembly binary. If set to true, the user should also manage headers in the browser:
12
- * https://github.com/tensorflow/tfjs/blob/master/tfjs-backend-wasm/README.md#setting-up-cross-origin-isolation
13
- * Defaults to false
11
+ * Determines whether the SDK should use multithreading. Defaults to true.
12
+ * Multithreading will only affect supported Android devices and desktop browsers. Multithreading on
13
+ * iOS is currently not supported.
14
+ * On supported devices, multithreading will improve performance significantly.
15
+ * Note that multithreading will only work on crossOriginIsolated sites. To enable this for your site, certain
16
+ * HTTP headers need to be set. Please consult our documentation for more information. If multithreading was
17
+ * requested but the site is not in a crossOriginIsolated context, the SDK will print a warning and fallback to
18
+ * single-threaded operation.
14
19
  */
15
20
  allowThreads?: boolean;
16
21
  /**
17
22
  * Determines whether the SDK should log debug messages. Defaults to false.
18
23
  */
19
24
  verboseLogging?: boolean;
25
+ /**
26
+ * The requestSuffix is appended to the HTTP requests made by the SDK to load necessary WASM and JS files.
27
+ * It is meant to avoid any caching issues that may arise when the SDK is updated.
28
+ * Defaults to '?CURRENT_SDK_VERSION'.
29
+ */
30
+ requestSuffix?: string;
20
31
  }
@@ -1,6 +1,5 @@
1
1
  import { MrzResult } from "../mrz/mrz-result";
2
- import { ScannerConfiguration } from "./scanner-configuration";
3
- import { ViewFinderConfiguration } from "./view-finder-configuration";
2
+ import { ViewFinderScannerConfiguration } from "./view-finder-scanner-configuration";
4
3
  export interface MrzScannerAccumulatedFrameVerificationConfiguration {
5
4
  /** Maximum number of accumulated frames to inspect to verify a scan result */
6
5
  maximumNumberOfAccumulatedFrames?: number;
@@ -8,9 +7,8 @@ export interface MrzScannerAccumulatedFrameVerificationConfiguration {
8
7
  * in order for the result to be considered verified */
9
8
  minimumNumberOfRequiredFramesWithEqualRecognitionResult?: number;
10
9
  }
11
- export declare class MrzScannerConfiguration extends ScannerConfiguration {
10
+ export declare class MrzScannerConfiguration extends ViewFinderScannerConfiguration {
12
11
  constructor();
13
- style?: ViewFinderConfiguration;
14
12
  accumulatedFrameVerificationConfiguration?: MrzScannerAccumulatedFrameVerificationConfiguration;
15
13
  onMrzDetected?: (e: MrzResult) => void;
16
14
  _onDetectionFailed?: (e: ImageData) => void;
@@ -8,7 +8,6 @@ export declare class ScannerConfiguration extends BaseConfiguration {
8
8
  width: number;
9
9
  height: number;
10
10
  };
11
- static DEFAULT_ACCEPTED_BRIGHTNESS_SCORE: number;
12
11
  static DEFAULT_ACCEPTED_ANGLE_SCORE: number;
13
12
  static DEFAULT_ACCEPTED_SIZE_SCORE: number;
14
13
  /**
@@ -17,6 +16,8 @@ export declare class ScannerConfiguration extends BaseConfiguration {
17
16
  videoConstraints?: any;
18
17
  mirrored?: boolean;
19
18
  preferredCamera?: string;
19
+ spinnerColor?: string;
20
+ backgroundColor?: string;
20
21
  constructor(resolution: {
21
22
  width: number;
22
23
  height: number;
@@ -26,5 +27,5 @@ export declare class ScannerConfiguration extends BaseConfiguration {
26
27
  /**
27
28
  * Error callback of the SDK.
28
29
  */
29
- onError: (e: any) => void;
30
+ onError?: (e: any) => void;
30
31
  }
@@ -1,8 +1,10 @@
1
1
  import { Barcode } from "../barcode/barcode";
2
- export declare type SelectionOverlayTextFormat = "Text" | "TextAndFormat" | "None";
2
+ export type SelectionOverlayTextFormat = "Text" | "TextAndFormat" | "None";
3
3
  export declare class BarcodePolygonStyle {
4
4
  fill?: string;
5
5
  stroke?: string;
6
+ strokeWidth?: number;
7
+ cornerRadius?: number;
6
8
  }
7
9
  export interface IBarcodePolygonHandle {
8
10
  style(style: BarcodePolygonStyle): void;
@@ -19,8 +21,12 @@ export declare class SelectionOverlayStyleConfiguration {
19
21
  private defaultHighlightedFillColor?;
20
22
  polygonStrokeColor?: string;
21
23
  polygonFillColor?: string;
24
+ polygonStrokeWidth?: number;
25
+ polygonCornerRadius?: number;
22
26
  highlightedPolygonStrokeColor?: string;
23
27
  highlightedPolygonFillColor?: string;
28
+ highlightedPolygonStrokeWidth?: number;
29
+ highlightedPolygonCornerRadius?: number;
24
30
  textColor?: string;
25
31
  textBackgroundColor?: string;
26
32
  highlightedTextColor?: string;
@@ -1,35 +1,12 @@
1
1
  import { TextDataScannerResult } from "../generic-text-line-recognizer/text-data-scanner-result";
2
- import { ScannerConfiguration } from "./scanner-configuration";
3
- import { TextStyleConfiguration } from "./text-style-configuration";
4
- import { WindowStyleConfiguration } from "./window-style-configuration";
5
- import { ViewFinderConfiguration } from "./view-finder-configuration";
6
- export declare class TextDataScannerWindowStyle implements WindowStyleConfiguration {
7
- aspectRatio: number;
8
- widthProportion: number;
9
- borderColor: string;
10
- left: string;
11
- top: string;
12
- transform: string;
13
- }
14
- export declare class TextDataScannerTextStyle implements TextStyleConfiguration {
15
- color: string;
16
- size: string;
17
- weight: number;
18
- }
19
- export declare class TextDataScannerViewFinderStyle implements ViewFinderConfiguration {
20
- window: TextDataScannerWindowStyle;
21
- text: TextDataScannerTextStyle;
22
- backgroundColor: string;
23
- hint: string;
24
- }
25
- export declare type ValidatorPreset = "VehicleIdentificationNumber";
26
- export declare type TextDetectionCallback = (e: TextDataScannerResult) => void;
27
- export declare class TextDataScannerConfiguration extends ScannerConfiguration {
2
+ import { ViewFinderScannerConfiguration } from "./view-finder-scanner-configuration";
3
+ export type ValidatorPreset = "VehicleIdentificationNumber";
4
+ export type TextDetectionCallback = (e: TextDataScannerResult) => void;
5
+ export declare class TextDataScannerConfiguration extends ViewFinderScannerConfiguration {
28
6
  constructor();
29
7
  ocrResolutionLimit?: number;
30
8
  supportedLanguages?: string[];
31
9
  validatorPreset?: ValidatorPreset;
32
- style?: ViewFinderConfiguration;
33
10
  onTextDetected?: TextDetectionCallback;
34
11
  static fromJson(json: any): TextDataScannerConfiguration;
35
12
  }
@@ -0,0 +1,11 @@
1
+ import { ScannerConfiguration } from "./scanner-configuration";
2
+ import { ViewFinderConfiguration, UserGuidanceConfiguration } from "../../ui2/configuration";
3
+ export declare class ViewFinderScannerConfiguration extends ScannerConfiguration {
4
+ constructor(resolution: {
5
+ width: number;
6
+ height: number;
7
+ });
8
+ finder?: ViewFinderConfiguration;
9
+ userGuidance?: UserGuidanceConfiguration;
10
+ static mapFinderConfiguration(result: ViewFinderScannerConfiguration, json: any): void;
11
+ }
@@ -1,10 +1,8 @@
1
- import { ScannerConfiguration } from "./scanner-configuration";
2
- import { ViewFinderConfiguration } from "./view-finder-configuration";
3
1
  import { TextDetectionCallback } from "./text-data-scanner-configuration";
4
- export declare class VINScannerConfiguration extends ScannerConfiguration {
2
+ import { ViewFinderScannerConfiguration } from "./view-finder-scanner-configuration";
3
+ export declare class VINScannerConfiguration extends ViewFinderScannerConfiguration {
5
4
  constructor();
6
5
  ocrResolutionLimit?: number;
7
- style?: ViewFinderConfiguration;
8
6
  onTextDetected?: TextDetectionCallback;
9
7
  static fromJson(json: any): VINScannerConfiguration;
10
8
  }
@@ -7,13 +7,5 @@ export declare class ContourDetectionResult {
7
7
  polygon?: Polygon;
8
8
  detectionStatus?: DetectionStatus;
9
9
  success?: boolean;
10
- /**
11
- * Average brightness, calculated as the average
12
- * of the Value channel in the HSV color space of:
13
- * - the whole image, if no document was detected
14
- * - the document crop, if a document was detected
15
- * Ranges from 0 to 255
16
- */
17
- averageBrightness?: number;
18
10
  constructor(contourDetectionResult?: ContourDetectionResult);
19
11
  }
@@ -1,6 +1,6 @@
1
- export declare type BinarizationFilter = 'binarized' | 'otsuBinarization' | 'pureBinarized' | 'lowLightBinarization' | 'lowLightBinarization2' | 'deepBinarization';
2
- export declare type ColorFilter = 'color' | 'gray' | 'colorDocument' | 'blackAndWhite' | 'edgeHighlight';
1
+ export type BinarizationFilter = 'binarized' | 'otsuBinarization' | 'pureBinarized' | 'lowLightBinarization' | 'lowLightBinarization2' | 'deepBinarization';
2
+ export type ColorFilter = 'color' | 'gray' | 'colorDocument' | 'blackAndWhite' | 'edgeHighlight';
3
3
  /**
4
4
  * @deprecated Use the new ImageProcessor API instead (see {@link ScanbotSDK.createImageProcessor}).
5
5
  */
6
- export declare type ImageFilter = BinarizationFilter | ColorFilter;
6
+ export type ImageFilter = BinarizationFilter | ColorFilter;
@@ -1,4 +1,4 @@
1
- export declare type MRZFieldValidationStatus = 'Success' | 'Failure' | 'NotValidated';
1
+ export type MRZFieldValidationStatus = 'Success' | 'Failure' | 'NotValidated';
2
2
  export declare class MrzField {
3
3
  name?: string;
4
4
  value?: string;
@@ -1,4 +1,4 @@
1
- export declare type DocumentQuality = "NO_DOCUMENT" | "VERY_POOR" | "POOR" | "REASONABLE" | "GOOD" | "EXCELLENT";
1
+ export type DocumentQuality = "NO_DOCUMENT" | "VERY_POOR" | "POOR" | "REASONABLE" | "GOOD" | "EXCELLENT";
2
2
  export default interface DocumentQualityAnalyzerResult {
3
3
  /**
4
4
  * Result of document quality analysis.
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { ScanbotCameraProps, ScanbotCameraState, ScannerView } from "./scanner-view";
3
- import { MrzScannerConfiguration } from "./model/configuration/mrz-scanner-configuration";
4
- import { ViewFinder } from "./view/view-finder";
5
- import SimpleMrzRecognizer from "./service/simple-mrz-recognizer";
6
3
  import { IMrzScannerHandle } from "./interfaces/i-mrz-scanner-handle";
4
+ import ViewFinder from "./view/view-finder";
5
+ import SimpleMrzRecognizer from "./service/simple-mrz-recognizer";
6
+ import { MrzScannerConfiguration } from "./model/configuration/mrz-scanner-configuration";
7
7
  export declare class MrzScannerProps extends ScanbotCameraProps {
8
8
  mrzRecognizer: SimpleMrzRecognizer;
9
9
  }
@@ -26,6 +26,7 @@ export default class MrzScannerView extends ScannerView<MrzScannerProps, MrzScan
26
26
  isDetectionPaused(): boolean;
27
27
  resumeDetection(): Promise<void>;
28
28
  pauseDetection(): void;
29
+ private readonly updateDimensionsCallback;
29
30
  /**
30
31
  * React Overrides
31
32
  */
@@ -34,9 +35,8 @@ export default class MrzScannerView extends ScannerView<MrzScannerProps, MrzScan
34
35
  updateDimensions(): Promise<void>;
35
36
  resume(): Promise<void>;
36
37
  pause(): void;
37
- computeSize(): boolean;
38
38
  detect(): Promise<void>;
39
39
  saveExtractedImageData(): void;
40
40
  setFinderVisible(isVisible: boolean): void;
41
- render(): JSX.Element;
41
+ render(): React.JSX.Element;
42
42
  }
@@ -27,6 +27,7 @@ import DocumentQualityAnalyzerConfiguration from "./model/configuration/document
27
27
  import DocumentQualityAnalyzer from "./service/document-quality-analyzer";
28
28
  import { ImageProcessor } from "./service/image-processor";
29
29
  import * as imageFilters from "./core/compiled/ParametricFilters";
30
+ import ScanbotSDKUI from "./ui2/scanbot-sdk-ui";
30
31
  export default class ScanbotSDK {
31
32
  /** @internal */
32
33
  bridge: WorkerBridge;
@@ -34,6 +35,8 @@ export default class ScanbotSDK {
34
35
  private static defaultEnginePath;
35
36
  /** @internal */
36
37
  static instance: ScanbotSDK;
38
+ private static _ui2;
39
+ static get UI(): typeof ScanbotSDKUI;
37
40
  static initialize(options: InitializationOptions): Promise<ScanbotSDK>;
38
41
  /**
39
42
  * View Components
@@ -54,7 +57,7 @@ export default class ScanbotSDK {
54
57
  applyFilter(imageBuffer: ArrayBuffer, filterType: ImageFilter): Promise<ArrayBuffer>;
55
58
  rotateImageCcw(imageBuffer: ArrayBuffer, rotations: number): Promise<ArrayBuffer>;
56
59
  cropAndRotateImageCcw(imageBuffer: ArrayBuffer, polygon: Polygon, rotations: number): Promise<any>;
57
- detectDocument(imageBuffer: ArrayBuffer, acceptedAngleScore?: number, acceptedSizeScore?: number, acceptedBrightnessThreshold?: number): Promise<ContourDetectionResult>;
60
+ detectDocument(imageBuffer: ArrayBuffer, acceptedAngleScore?: number, acceptedSizeScore?: number): Promise<ContourDetectionResult>;
58
61
  detectAndCropDocument(imageBuffer: ArrayBuffer): Promise<ContourDetectionResult>;
59
62
  detectBarcodes(base64: string, engineMode?: EngineMode, barcodeFormats?: BarcodeFormat[], returnBarcodeImage?: boolean): Promise<BarcodeResult>;
60
63
  createSimpleMRZRecognizer(): Promise<SimpleMrzRecognizer>;
@@ -9,11 +9,13 @@ export declare class ScanbotCameraProps {
9
9
  onFailure?: (err: Error) => void;
10
10
  }
11
11
  export declare class ScanbotCameraState {
12
- initialized?: boolean;
12
+ videoReady: boolean;
13
+ sdkReady: boolean;
13
14
  }
14
15
  export declare abstract class ScannerView<P extends ScanbotCameraProps, S extends ScanbotCameraState> extends React.Component<P, S> {
15
16
  static DEFAULT_DETECTION_RESOLUTION: number;
16
17
  static DETECTION_RESULTION_4K: number;
18
+ protected constructor(props: P);
17
19
  camera: ScanbotCameraView | null;
18
20
  disposed?: boolean;
19
21
  get bridge(): import("./worker/worker-bridge").WorkerBridge;
@@ -30,5 +32,6 @@ export declare abstract class ScannerView<P extends ScanbotCameraProps, S extend
30
32
  switchCamera(deviceId: string, mirrored?: boolean): Promise<void>;
31
33
  getActiveCameraInfo(): CameraInfo | undefined;
32
34
  fetchAvailableCameras(): Promise<CameraInfo[]>;
35
+ protected renderSpinner(color: string): React.JSX.Element;
33
36
  setTorchState(enabled: boolean): Promise<void>;
34
37
  }
@@ -1,7 +1,7 @@
1
1
  import ScanbotSDK from "../scanbot-sdk";
2
2
  import { ParametricFilter } from "../core/compiled/ParametricFilters";
3
3
  import { Polygon } from "../utils/dto/Polygon";
4
- export declare type Rotation = "ROTATION_NONE" | "ROTATION_90_CLOCKWISE" | "ROTATION_180" | "ROTATION_90_COUNTERCLOCKWISE";
4
+ export type Rotation = "ROTATION_NONE" | "ROTATION_90_CLOCKWISE" | "ROTATION_180" | "ROTATION_90_COUNTERCLOCKWISE";
5
5
  export declare class ImageProcessor {
6
6
  private _sdk;
7
7
  private _token;
@@ -14,18 +14,18 @@ import ScanbotSDK from '../scanbot-sdk';
14
14
  * "COMM10" 4.125 x 9.5 (inches) 297 x 684 (pixels) at 72 DPI<br>
15
15
  * "CUSTOM" physical size will be calculated from the image dimensions and the `dpi` parameter.
16
16
  */
17
- export declare type PageSize = "LETTER" | "LEGAL" | "A3" | "A4" | "A5" | "B4" | "B5" | "EXECUTIVE" | "US4x6" | "US4x8" | "US5x7" | "COMM10" | "CUSTOM";
17
+ export type PageSize = "LETTER" | "LEGAL" | "A3" | "A4" | "A5" | "B4" | "B5" | "EXECUTIVE" | "US4x6" | "US4x8" | "US5x7" | "COMM10" | "CUSTOM";
18
18
  /**
19
19
  * AUTO – decides based on image aspect ratio
20
20
  */
21
- export declare type PageDirection = "PORTRAIT" | "LANDSCAPE" | "AUTO";
21
+ export type PageDirection = "PORTRAIT" | "LANDSCAPE" | "AUTO";
22
22
  /**
23
23
  * FIT_IN – Fit image into page. May leave white borders if the aspect ratio of the image and the page don't match. Preserves image aspect ratio. <br>
24
24
  * FILL_IN – Fill page with image. Will crop the image if the aspect ratio of the image and the page don't match. Preserves image aspect ratio.<br>
25
25
  * STRETCH – Stretch image to fill the entire page. The image will never be cropped and there will never be any white borders left, but the image aspect ratio will be made to match the page aspect ratio. <br>
26
26
  * NONE – No resizing, centers the image on the page. The physical size of the image will be determined by the `dpi` parameter.
27
27
  */
28
- export declare type PageFit = "FIT_IN" | "FILL_IN" | "STRETCH" | "NONE";
28
+ export type PageFit = "FIT_IN" | "FILL_IN" | "STRETCH" | "NONE";
29
29
  /**
30
30
  * The parameters `pageSize`, `pageFit`, `dpi` and `resample` interact in a complex way
31
31
  * when adding bitmap images (JPEG, PNG, or raw) to the PDF.
@@ -4,8 +4,8 @@ export default class SimpleMrzRecognizer {
4
4
  private _sdk;
5
5
  private _mrzRecognizerToken;
6
6
  private enableFrameAccumulation;
7
- constructor(_sdk: ScanbotSDK, _mrzRecognizerToken: string, enableFrameAccumulation: boolean);
8
- recognize(imageData: ImageData | ArrayBuffer): Promise<MrzResult | undefined>;
9
- recognizeURL(imageURL: string): Promise<MrzResult | undefined>;
7
+ constructor(_sdk: ScanbotSDK, _mrzRecognizerToken: Promise<string>, enableFrameAccumulation: boolean);
8
+ recognize(imageData: ImageData | ArrayBuffer): Promise<MrzResult>;
9
+ recognizeURL(imageURL: string): Promise<MrzResult>;
10
10
  release(): Promise<void>;
11
11
  }
@@ -1,9 +1,9 @@
1
1
  import { TextDataScannerResult } from '../model/generic-text-line-recognizer/text-data-scanner-result';
2
2
  import ScanbotSDK from '../scanbot-sdk';
3
3
  export default class TextDataScanner {
4
- _textDataScannerToken: string;
5
- _sdk: ScanbotSDK;
6
- constructor(sdk: ScanbotSDK, textDataScannerToken: string);
4
+ private _sdk;
5
+ private _textDataScannerToken;
6
+ constructor(_sdk: ScanbotSDK, _textDataScannerToken: Promise<string>);
7
7
  recognize(imageData: ImageData): Promise<TextDataScannerResult>;
8
8
  cleanRecognitionQueue(): Promise<void>;
9
9
  recognizeURL(imageURL: string): Promise<TextDataScannerResult>;
@@ -1,15 +1,13 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { ScanbotCameraProps, ScanbotCameraState, ScannerView } from "./scanner-view";
3
- import { TextDetectionCallback } from "./model/configuration/text-data-scanner-configuration";
4
- import { ViewFinder } from "./view/view-finder";
5
- import TextDataScanner from "./service/text-data-recognizer";
6
- import { ScannerConfiguration } from "./model/configuration/scanner-configuration";
7
- import { ViewFinderConfiguration } from "./model/configuration/view-finder-configuration";
8
3
  import { ITextDataScannerHandle } from "./interfaces/i-text-data-scanner-handle";
4
+ import ViewFinder from "./view/view-finder";
5
+ import TextDataScanner from "./service/text-data-recognizer";
6
+ import { TextDetectionCallback } from "./model/configuration/text-data-scanner-configuration";
7
+ import { ViewFinderScannerConfiguration } from "./model/configuration/view-finder-scanner-configuration";
9
8
  export declare class TextDataScannerProps extends ScanbotCameraProps {
10
9
  textDataScanner: TextDataScanner;
11
10
  onTextDetected: TextDetectionCallback;
12
- style: ViewFinderConfiguration;
13
11
  }
14
12
  export declare class TextDataScannerState extends ScanbotCameraState {
15
13
  isFinderVisible?: boolean;
@@ -20,15 +18,16 @@ export default class TextDataScannerView extends ScannerView<TextDataScannerProp
20
18
  shouldComputeSize: boolean;
21
19
  private paused;
22
20
  constructor(props: TextDataScannerProps);
23
- get configuration(): ScannerConfiguration;
21
+ get configuration(): ViewFinderScannerConfiguration;
24
22
  get enabled(): boolean;
25
23
  /**
26
24
  * Public API functions
27
25
  */
28
- static create(configuration: ScannerConfiguration, style: ViewFinderConfiguration, onTextDetected: TextDetectionCallback, textDataScanner: TextDataScanner): Promise<TextDataScannerView>;
26
+ static create(configuration: ViewFinderScannerConfiguration, onTextDetected: TextDetectionCallback, textDataScanner: TextDataScanner): Promise<TextDataScannerView>;
29
27
  isDetectionPaused(): boolean;
30
28
  resumeDetection(): Promise<void>;
31
29
  pauseDetection(): void;
30
+ private readonly updateDimensionsCallback;
32
31
  /**
33
32
  * React Overrides
34
33
  */
@@ -37,8 +36,7 @@ export default class TextDataScannerView extends ScannerView<TextDataScannerProp
37
36
  updateDimensions(): Promise<void>;
38
37
  resume(): Promise<void>;
39
38
  pause(): void;
40
- computeSize(): boolean;
41
39
  detect(): Promise<void>;
42
40
  saveExtractedImageData(): void;
43
- render(): JSX.Element;
41
+ render(): React.JSX.Element;
44
42
  }