scanbot-web-sdk 6.0.0-dev.1 → 6.0.0-dev.2

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 (177) hide show
  1. package/@types/barcode-scanner-view.d.ts +10 -10
  2. package/@types/consume-type.d.ts +7 -0
  3. package/@types/core/bridge/common.d.ts +24 -0
  4. package/@types/core/bridge/compiled/BarcodeConfigs.d.ts +973 -0
  5. package/@types/core/bridge/compiled/BarcodeScannerTypes.d.ts +183 -0
  6. package/@types/core/bridge/compiled/BarcodeTypes.d.ts +183 -0
  7. package/@types/core/bridge/compiled/CheckRecognizerTypes.d.ts +29 -0
  8. package/@types/core/bridge/compiled/CommonFieldType.d.ts +59 -0
  9. package/@types/core/bridge/compiled/DocumentDetectorTypes.d.ts +196 -0
  10. package/@types/core/bridge/compiled/DocumentQualityAnalyzerTypes.d.ts +105 -0
  11. package/@types/core/bridge/compiled/EhicTypes.d.ts +218 -0
  12. package/@types/core/bridge/compiled/FrameUtilities.d.ts +18 -0
  13. package/@types/core/bridge/compiled/GenericDocument.d.ts +198 -0
  14. package/@types/core/bridge/compiled/GenericDocumentRecognizerTypes.d.ts +104 -0
  15. package/@types/core/bridge/compiled/GenericTextLineScannerTypes.d.ts +165 -0
  16. package/@types/core/bridge/compiled/Geometry.d.ts +49 -0
  17. package/@types/core/bridge/compiled/ImageProcessorTypes.d.ts +13 -0
  18. package/@types/core/bridge/compiled/LicensePlateScannerTypes.d.ts +67 -0
  19. package/@types/core/bridge/compiled/MRZTypes.d.ts +52 -0
  20. package/@types/core/bridge/compiled/MedicalCertificateTypes.d.ts +306 -0
  21. package/@types/core/bridge/compiled/OcrElements.d.ts +129 -0
  22. package/@types/core/bridge/compiled/ParametricFilters.d.ts +186 -0
  23. package/@types/core/bridge/compiled/PdfConfig.d.ts +197 -0
  24. package/@types/core/bridge/compiled/TiffTypes.d.ts +183 -0
  25. package/@types/core/bridge/compiled_schemas_v3/BarcodeConfigs.d.ts +973 -0
  26. package/@types/core/bridge/compiled_schemas_v3/BarcodeScannerTypes.d.ts +183 -0
  27. package/@types/core/bridge/compiled_schemas_v3/BarcodeTypes.d.ts +183 -0
  28. package/@types/core/bridge/compiled_schemas_v3/CheckRecognizerTypes.d.ts +29 -0
  29. package/@types/core/bridge/compiled_schemas_v3/CommonFieldType.d.ts +59 -0
  30. package/@types/core/bridge/compiled_schemas_v3/DocumentDetectorTypes.d.ts +196 -0
  31. package/@types/core/bridge/compiled_schemas_v3/DocumentQualityAnalyzerTypes.d.ts +105 -0
  32. package/@types/core/bridge/compiled_schemas_v3/EhicTypes.d.ts +218 -0
  33. package/@types/core/bridge/compiled_schemas_v3/FrameUtilities.d.ts +18 -0
  34. package/@types/core/bridge/compiled_schemas_v3/GenericDocument.d.ts +198 -0
  35. package/@types/core/bridge/compiled_schemas_v3/GenericDocumentRecognizerTypes.d.ts +104 -0
  36. package/@types/core/bridge/compiled_schemas_v3/GenericTextLineScannerTypes.d.ts +165 -0
  37. package/@types/core/bridge/compiled_schemas_v3/Geometry.d.ts +49 -0
  38. package/@types/core/bridge/compiled_schemas_v3/ImageProcessorTypes.d.ts +13 -0
  39. package/@types/core/bridge/compiled_schemas_v3/LicensePlateScannerTypes.d.ts +67 -0
  40. package/@types/core/bridge/compiled_schemas_v3/MRZTypes.d.ts +52 -0
  41. package/@types/core/bridge/compiled_schemas_v3/MedicalCertificateTypes.d.ts +306 -0
  42. package/@types/core/bridge/compiled_schemas_v3/OcrElements.d.ts +129 -0
  43. package/@types/core/bridge/compiled_schemas_v3/ParametricFilters.d.ts +186 -0
  44. package/@types/core/bridge/compiled_schemas_v3/PdfConfig.d.ts +197 -0
  45. package/@types/core/bridge/compiled_schemas_v3/TiffTypes.d.ts +183 -0
  46. package/@types/core/bridge/utils.d.ts +7 -0
  47. package/@types/core/bridge/worker-bridge.d.ts +362 -0
  48. package/@types/core/worker/ScanbotSDK.Core-simd-threads.d.ts +0 -0
  49. package/@types/core/worker/ScanbotSDK.Core-simd.d.ts +0 -0
  50. package/@types/core/worker/ScanbotSDK.Core.d.ts +75 -0
  51. package/@types/core-types.d.ts +23 -0
  52. package/@types/cropping-view.d.ts +4 -2
  53. package/@types/document-scanner-view.d.ts +5 -5
  54. package/@types/generic-document-recognizer-view.d.ts +22 -0
  55. package/@types/index.d.ts +12 -19
  56. package/@types/interfaces/i-document-scanner-handle.d.ts +2 -2
  57. package/@types/interfaces/i-generic-document-recognizer-scanner-handle.d.ts +3 -0
  58. package/@types/model/barcode/barcode-result.d.ts +6 -8
  59. package/@types/model/barcode/barcode.d.ts +3 -14
  60. package/@types/model/configuration/barcode-scanner-configuration.d.ts +12 -8
  61. package/@types/model/configuration/cropping-view-configuration.d.ts +2 -1
  62. package/@types/model/configuration/document-scanner-configuration.d.ts +5 -20
  63. package/@types/model/configuration/generic-document-recognizer-configuration.d.ts +9 -0
  64. package/@types/model/configuration/initialization-options.d.ts +2 -1
  65. package/@types/model/configuration/mrz-scanner-configuration.d.ts +4 -3
  66. package/@types/model/configuration/scanner-configuration.d.ts +1 -0
  67. package/@types/model/configuration/selection-overlay-configuration.d.ts +2 -2
  68. package/@types/model/configuration/text-data-scanner-configuration.d.ts +3 -6
  69. package/@types/model/configuration/view-finder-scanner-configuration.d.ts +3 -2
  70. package/@types/model/configuration/vin-scanner-configuration.d.ts +2 -1
  71. package/@types/model/response/cropping-result.d.ts +2 -1
  72. package/@types/scanbot-sdk.d.ts +208 -29
  73. package/@types/service/document-quality-analyzer.d.ts +7 -5
  74. package/@types/service/generic-document-recognizer.d.ts +11 -0
  75. package/@types/service/ocr-engine.d.ts +8 -5
  76. package/@types/service/pdf-generator.d.ts +7 -95
  77. package/@types/service/public-utils.d.ts +1 -1
  78. package/@types/service/simple-mrz-recognizer.d.ts +5 -5
  79. package/@types/service/text-data-recognizer.d.ts +5 -4
  80. package/@types/service/tiff-generator.d.ts +12 -10
  81. package/@types/ui2/configuration/BarcodeInfoMapping.d.ts +1 -1
  82. package/@types/ui2/configuration/BarcodeItem.d.ts +4 -28
  83. package/@types/ui2/configuration/BarcodeRecognizerConfiguration.d.ts +12 -155
  84. package/@types/ui2/configuration/BarcodeScannerConfiguration.d.ts +2 -18
  85. package/@types/ui2/configuration/BarcodeScannerTypes.d.ts +6 -0
  86. package/@types/ui2/configuration/BarcodeTextLocalization.d.ts +0 -60
  87. package/@types/ui2/configuration/BarcodeTypes.d.ts +1 -0
  88. package/@types/ui2/configuration/BarcodeUseCase.d.ts +3 -0
  89. package/@types/ui2/configuration/CameraConfiguration.d.ts +22 -23
  90. package/@types/ui2/configuration/CameraPermission.d.ts +0 -15
  91. package/@types/ui2/configuration/Common.d.ts +0 -37
  92. package/@types/ui2/configuration/FindAndPickScanningModeUseCase.d.ts +2 -2
  93. package/@types/ui2/configuration/Geometry.d.ts +1 -0
  94. package/@types/ui2/configuration/MultipleScanningModeUseCase.d.ts +1 -1
  95. package/@types/ui2/configuration/SingleScanningModeUseCase.d.ts +1 -1
  96. package/@types/ui2/configuration/TopBarConfiguration.d.ts +0 -16
  97. package/@types/ui2/configuration/ViewFinderConfiguration.d.ts +6 -3
  98. package/@types/ui2/configuration.d.ts +1 -1
  99. package/@types/ui2/controllers/multiple-scanning-mode-controller.d.ts +2 -1
  100. package/@types/ui2/controllers/single-scanning-mode-controller.d.ts +2 -1
  101. package/@types/ui2/model/counted-barcodes.d.ts +13 -12
  102. package/@types/ui2/scanbot-sdk-ui.d.ts +2 -2
  103. package/@types/ui2/utils/barcode-mapper.d.ts +15 -3
  104. package/@types/ui2/utils/camera-config.d.ts +2 -2
  105. package/@types/ui2/utils/styled-input.d.ts +1 -1
  106. package/@types/ui2/views/action-button/action-button-container.d.ts +2 -0
  107. package/@types/ui2/views/barcode-scanner.d.ts +4 -3
  108. package/@types/ui2/views/drawer/subviews/barcode-list-item.d.ts +3 -3
  109. package/@types/ui2/views/form/dialog-button.d.ts +2 -2
  110. package/@types/utils/dto/MagneticLine.d.ts +4 -4
  111. package/@types/utils/dto/Point.d.ts +2 -2
  112. package/@types/utils/image-utils.d.ts +1 -0
  113. package/@types/utils/react/usePromise.d.ts +3 -1
  114. package/@types/utils/utils.d.ts +1 -1
  115. package/@types/utils/video-stream.d.ts +1 -0
  116. package/@types/view/action-bar/bottom-action-bar.d.ts +2 -2
  117. package/@types/view/barcode-calculation/barcode-calculation-popup-list.d.ts +2 -2
  118. package/@types/view/barcode-calculation/barcode-calculation-popup.d.ts +4 -4
  119. package/@types/view/barcode-calculation/scanned-image-with-overlay.d.ts +2 -2
  120. package/@types/view/barcode-polygon/animated-barcode-selection-overlay.d.ts +6 -5
  121. package/@types/view/barcode-polygon/barcode-overlay.d.ts +3 -3
  122. package/@types/view/barcode-polygon/barcode-polygon-label.d.ts +2 -2
  123. package/@types/view/cropping/draggable-base-container.d.ts +8 -2
  124. package/@types/view/cropping/draggable-handles-component.d.ts +9 -2
  125. package/@types/view/view-finder.d.ts +1 -0
  126. package/@types/worker/worker-bridge.d.ts +349 -5
  127. package/Libraries.txt +307 -174
  128. package/README.md +3 -3
  129. package/bundle/ScanbotSDK.min.js +5 -5
  130. package/bundle/ScanbotSDK.ui2.min.js +108 -161
  131. package/bundle/ScanbotSDK.ui2.min.js.LICENSE.txt +0 -18
  132. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  133. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  134. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  135. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
  136. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  137. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
  138. package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
  139. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
  140. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  141. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
  142. package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
  143. package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
  144. package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
  145. package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
  146. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  147. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  148. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  149. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
  150. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  151. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
  152. package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
  153. package/package.json +4 -3
  154. package/ui.d.ts +3 -0
  155. package/ui.js +2 -0
  156. package/webpack/fileLoader.js +3 -5
  157. package/@types/core/compiled/ParametricFilters.d.ts +0 -181
  158. package/@types/core/utils.d.ts +0 -1
  159. package/@types/core/worker-bridge.d.ts +0 -20
  160. package/@types/model/barcode/barcode-format.d.ts +0 -1
  161. package/@types/model/barcode/engine-mode.d.ts +0 -1
  162. package/@types/model/configuration/document-quality-analyzer-configuration.d.ts +0 -13
  163. package/@types/model/document/contour-detection-result.d.ts +0 -11
  164. package/@types/model/document/detection-status.d.ts +0 -11
  165. package/@types/model/document/document-detection-result.d.ts +0 -8
  166. package/@types/model/filter-types.d.ts +0 -6
  167. package/@types/model/generic-text-line-recognizer/text-data-scanner-result.d.ts +0 -6
  168. package/@types/model/mrz/mrz-result.d.ts +0 -41
  169. package/@types/model/response/document-quality-analyzer-result.d.ts +0 -8
  170. package/@types/service/image-processor.d.ts +0 -35
  171. package/@types/ui2/configuration/BarcodeResult.d.ts +0 -14
  172. package/@types/utils/networking.d.ts +0 -7
  173. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
  174. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm-webpack-file-loader +0 -0
  175. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm-webpack-file-loader +0 -0
  176. package/bundle/bin/complete/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
  177. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
@@ -8,12 +8,16 @@ import AnimatedBarcodeSelectionOverlay from "./view/barcode-polygon/animated-bar
8
8
  import BottomActionBar from "./view/action-bar/bottom-action-bar";
9
9
  import ScannedImageWithOverlay from "./view/barcode-calculation/scanned-image-with-overlay";
10
10
  import { BarcodeScannerConfiguration } from "./model/configuration/barcode-scanner-configuration";
11
- import { BarcodeResult } from "./model/barcode/barcode-result";
12
- import { ImageDataWrapper } from "./model/image-data-wrapper";
13
- import { Barcode } from "./model/barcode/barcode";
14
11
  import { Size } from "./utils/dto/Size";
12
+ import { BarcodeScannerTypes } from "./core-types";
13
+ import type { ObjectId } from "./core-types";
15
14
  export declare class BarcodeScannerProps extends ScanbotCameraProps {
16
15
  viewFinderPadding?: ViewFinderPadding;
16
+ /**
17
+ * The user should check that the license is valid before using the BarcodeScannerView.
18
+ * In case the license expires while the scanner is open, `onLicenseError` will be called.
19
+ */
20
+ onLicenseError?: () => void;
17
21
  }
18
22
  export declare class BarcodeScannerState extends ScanbotCameraState {
19
23
  isFinderVisible?: boolean;
@@ -27,16 +31,12 @@ export default class BarcodeScannerView extends ScannerView<BarcodeScannerProps,
27
31
  shouldComputeSize: boolean;
28
32
  private _configuration;
29
33
  private paused;
30
- recognition: {
31
- imageData: ImageDataWrapper;
32
- originalImage: any;
33
- barcodeResult: BarcodeResult;
34
- };
35
34
  overlay?: AnimatedBarcodeSelectionOverlay | undefined;
36
35
  popup: BarcodeCalculationPopup | undefined;
37
36
  scannedImage: ScannedImageWithOverlay | undefined;
38
37
  bottomActionBar: BottomActionBar | undefined;
39
- readonly barcodes: Barcode[];
38
+ barcodeRecognizerHandle: ObjectId<"BarcodeRecognizer"> | null;
39
+ readonly barcodes: BarcodeScannerTypes.BarcodeItem[];
40
40
  private detectionRunning;
41
41
  constructor(props: BarcodeScannerProps);
42
42
  get configuration(): BarcodeScannerConfiguration;
@@ -72,5 +72,5 @@ export default class BarcodeScannerView extends ScannerView<BarcodeScannerProps,
72
72
  getCapabilities(): MediaTrackCapabilities | undefined;
73
73
  render(): React.JSX.Element;
74
74
  resetCountImage(): void;
75
- countLabelText(barcodes: Barcode[]): string;
75
+ countLabelText(barcodes: BarcodeScannerTypes.BarcodeItem[]): string;
76
76
  }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * ConsumeImage describes how a SDK method should handle image data.
3
+ *
4
+ * - `CONSUME_IMAGE` - This will use less memory but the caller can no longer access the image data.
5
+ * - `COPY_IMAGE` - For processing the image, a copy is made. The caller can still access the original image data. This approach uses more memory.
6
+ */
7
+ export type ConsumeType = 'CONSUME_IMAGE' | 'COPY_IMAGE';
@@ -0,0 +1,24 @@
1
+ export declare class PartiallyConstructible {
2
+ /** @internal */
3
+ _marker(): void;
4
+ }
5
+ export type DeepPartial<T> = T extends PartiallyConstructible ? {
6
+ [P in keyof T]?: DeepPartial<T[P]>;
7
+ } : T;
8
+ export type RawImage = {
9
+ width: number;
10
+ height: number;
11
+ data: Uint8Array;
12
+ format: "BGR" | "BGRA" | "GRAY";
13
+ step: number;
14
+ };
15
+ export interface Point {
16
+ x: number;
17
+ y: number;
18
+ }
19
+ export interface Rectangle {
20
+ x: number;
21
+ y: number;
22
+ width: number;
23
+ height: number;
24
+ }