scanbot-web-sdk 8.1.0-alpha.1 → 8.1.0-beta.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 (96) hide show
  1. package/@types/core/bridge/worker-bridge.d.ts +28 -0
  2. package/@types/core/compiled/BarcodeConfigurationTypes.d.ts +146 -52
  3. package/@types/core/compiled/BarcodeDocumentModel.d.ts +12 -12
  4. package/@types/core/compiled/BarcodeScannerTypes.d.ts +13 -5
  5. package/@types/core/compiled/BarcodeTypes.d.ts +35 -0
  6. package/@types/core/compiled/CommonFieldType.d.ts +7 -1
  7. package/@types/core/compiled/DocumentQualityAnalyzerTypes.d.ts +43 -24
  8. package/@types/core/compiled/DocumentScannerTypes.d.ts +19 -19
  9. package/@types/core/compiled/DocumentsModel.d.ts +443 -1
  10. package/@types/core/compiled/MrzTypes.d.ts +9 -0
  11. package/@types/core/compiled/ParametricFilters.d.ts +36 -1
  12. package/@types/core/compiled/TextPatternScannerTypes.d.ts +5 -0
  13. package/@types/core/compiled/VinScannerTypes.d.ts +5 -0
  14. package/@types/core/compiled/utils.d.ts +1 -1
  15. package/@types/core-types.d.ts +1 -1
  16. package/@types/model/configuration/document-scanner-view-configuration.d.ts +4 -0
  17. package/@types/model/configuration/scanner-configuration.d.ts +3 -0
  18. package/@types/scanbot-sdk.d.ts +14 -0
  19. package/@types/service/pdf-generator.d.ts +2 -1
  20. package/@types/ui2/barcode/controllers/multiple-scanning-mode-controller.d.ts +4 -0
  21. package/@types/ui2/barcode/controllers/single-scanning-mode-controller.d.ts +4 -0
  22. package/@types/ui2/barcode/views/barcode-scanner.d.ts +2 -0
  23. package/@types/ui2/barcode/views/drawer/barcode-result-drawer.d.ts +2 -0
  24. package/@types/ui2/barcode/views/drawer/barcode-result-sidebar.d.ts +2 -0
  25. package/@types/ui2/barcode/views/navigation-bar.d.ts +1 -0
  26. package/@types/ui2/common.d.ts +1 -1
  27. package/@types/ui2/configuration/BarcodeTypes.d.ts +1 -1
  28. package/@types/ui2/configuration/barcode/BarcodeScannerScreenConfiguration.d.ts +2 -2
  29. package/@types/ui2/configuration/barcode/BarcodeTextLocalization.d.ts +15 -0
  30. package/@types/ui2/configuration/barcode/BarcodeUseCase.d.ts +3 -3
  31. package/@types/ui2/configuration/barcode/FindAndPickScanningModeUseCase.d.ts +4 -4
  32. package/@types/ui2/configuration/barcode/MultipleScanningModeUseCase.d.ts +2 -2
  33. package/@types/ui2/configuration/barcode/SingleScanningModeUseCase.d.ts +2 -2
  34. package/@types/ui2/configuration/check/CheckScannerScreenConfiguration.d.ts +4 -4
  35. package/@types/ui2/configuration/check/CheckScannerScreenTextLocalization.d.ts +15 -0
  36. package/@types/ui2/configuration/common/ActionBarConfiguration.d.ts +1 -1
  37. package/@types/ui2/configuration/common/CameraConfiguration.d.ts +6 -0
  38. package/@types/ui2/configuration/common/CameraPermission.d.ts +3 -3
  39. package/@types/ui2/configuration/common/Common.d.ts +19 -0
  40. package/@types/ui2/configuration/common/ScanCompletionOverlay.d.ts +1 -1
  41. package/@types/ui2/configuration/common/ScanbotAlertDialog.d.ts +2 -2
  42. package/@types/ui2/configuration/common/SelectCameraMenu.d.ts +63 -0
  43. package/@types/ui2/configuration/common/TopBarConfiguration.d.ts +8 -2
  44. package/@types/ui2/configuration/common/UserGuidanceConfiguration.d.ts +3 -3
  45. package/@types/ui2/configuration/common/ViewFinderConfiguration.d.ts +1 -1
  46. package/@types/ui2/configuration/credit_card/CreditCardScannerScreenConfiguration.d.ts +4 -4
  47. package/@types/ui2/configuration/credit_card/CreditCardScannerScreenTextLocalization.d.ts +15 -0
  48. package/@types/ui2/configuration/document/CameraScreenConfiguration.d.ts +6 -65
  49. package/@types/ui2/configuration/document/DocumentScannerCameraConfiguration.d.ts +6 -0
  50. package/@types/ui2/configuration/document/DocumentScannerScreens.d.ts +3 -3
  51. package/@types/ui2/configuration/document/DocumentScannerTextLocalization.d.ts +15 -15
  52. package/@types/ui2/configuration/document/DocumentScannerUserGuidance.d.ts +1 -1
  53. package/@types/ui2/configuration/document/DocumentScanningFlow.d.ts +3 -3
  54. package/@types/ui2/configuration/document_data/DocumentDataExtractorScreenConfiguration.d.ts +4 -4
  55. package/@types/ui2/configuration/document_data/DocumentDataExtractorScreenTextLocalization.d.ts +15 -0
  56. package/@types/ui2/configuration/mrz/MRZScannerScreenConfiguration.d.ts +3 -3
  57. package/@types/ui2/configuration/mrz/MRZScannerScreenTextLocalization.d.ts +15 -0
  58. package/@types/ui2/configuration/native/DocumentData.d.ts +1 -1
  59. package/@types/ui2/configuration/native/PageData.d.ts +1 -1
  60. package/@types/ui2/configuration/text_pattern/TextPatternScannerScreenConfiguration.d.ts +2 -2
  61. package/@types/ui2/configuration/text_pattern/TextPatternScannerScreenTextLocalization.d.ts +15 -0
  62. package/@types/ui2/configuration/vin/VINScannerScreenConfiguration.d.ts +2 -2
  63. package/@types/ui2/configuration/vin/VINScannerScreenTextLocalization.d.ts +15 -0
  64. package/@types/ui2/configuration.d.ts +1 -0
  65. package/@types/ui2/data-scanner/views/mrz-scanner-box.d.ts +4 -2
  66. package/@types/ui2/document/views/camera-screen/camera-select-dropdown.d.ts +2 -2
  67. package/@types/ui2/document/views/camera-screen/top-bar.d.ts +18 -3
  68. package/@types/ui2/document/views/camera-screen/use-document-scanner-view.d.ts +1 -0
  69. package/@types/ui2/document/views/common/common-top-bar.d.ts +1 -1
  70. package/@types/utils/assets/camera-localization.d.ts +44 -0
  71. package/@types/view/scanbot-camera-view.d.ts +2 -0
  72. package/@types/worker/worker-bridge.d.ts +28 -0
  73. package/bundle/ScanbotSDK.min.js +4 -4
  74. package/bundle/ScanbotSDK.ui2.min.js +85 -85
  75. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  76. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  77. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  78. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
  79. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  80. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
  81. package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
  82. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
  83. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  84. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
  85. package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
  86. package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
  87. package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
  88. package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
  89. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  90. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  91. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  92. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
  93. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  94. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
  95. package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
  96. package/package.json +1 -1
@@ -68,7 +68,7 @@ export declare const BinarizationFilterPresetValues: ReadonlyArray<BinarizationF
68
68
  /**
69
69
  Base class for all parametric filters.
70
70
  */
71
- export type ParametricFilter = LegacyFilter | ScanbotBinarizationFilter | CustomBinarizationFilter | ColorDocumentFilter | BrightnessFilter | ContrastFilter | GrayscaleFilter | WhiteBlackPointFilter;
71
+ export type ParametricFilter = LegacyFilter | ScanbotBinarizationFilter | CustomBinarizationFilter | ColorDocumentFilter | ColorDocumentShadowRemovalFilter | BrightnessFilter | ContrastFilter | GrayscaleFilter | WhiteBlackPointFilter;
72
72
  /** @internal */
73
73
  export declare namespace ParametricFilter {
74
74
  /** @internal */
@@ -165,6 +165,41 @@ export declare class ColorDocumentFilter {
165
165
  constructor(source?: DeepPartial<ColorDocumentFilter>);
166
166
  }
167
167
  /**
168
+ Color document shadow removal filter. The filter is similar to ColorDocumentFilter tries to remove shadows from the image without damaging colorful elements. As a result of shadow removal, paper is usually whitened.
169
+ */
170
+ export declare class ColorDocumentShadowRemovalFilter {
171
+ readonly _type: "ColorDocumentShadowRemovalFilter";
172
+ /**
173
+ Strength of contrast enhancement. Typical values are between 0 and 1, although higher values are possible.
174
+ @defaultValue 0.5;
175
+ */
176
+ contrastEnhancement: number;
177
+ /**
178
+ Strength of color saturation enhancement. Typical values are between 0 and 1, although higher values are possible.
179
+ @defaultValue 0.5;
180
+ */
181
+ colorEnhancement: number;
182
+ /**
183
+ The shadow removal filter balances between whitening paper and enhancing the contrast and colors of the printed parts of a document.
184
+ This parameter controls the saturation (colorfulness) threshold for distinguishing paper from print. Values must be between 0 and 1.
185
+ Lower values will cause the filter to prefer whitening to enhancing.
186
+ Higher values will cause the filter to prefer enhancing to whitening.
187
+ @defaultValue 0.5;
188
+ */
189
+ paperSaturation: number;
190
+ /**
191
+ The shadow removal filter balances between whitening paper and enhancing the contrast and colors of the printed parts of a document.
192
+ This parameter controls the lightness threshold for distinguishing paper from print.
193
+ Values must be between 0 and 1.
194
+ Lower values will cause the filter to prefer whitening to enhancing.
195
+ Higher values will cause the filter to prefer enhancing to whitening.
196
+ @defaultValue 0.5;
197
+ */
198
+ paperLightness: number;
199
+ /** @param source {@displayType `DeepPartial<ColorDocumentShadowRemovalFilter>`} */
200
+ constructor(source?: DeepPartial<ColorDocumentShadowRemovalFilter>);
201
+ }
202
+ /**
168
203
  Brightness adjustment filter.
169
204
  */
170
205
  export declare class BrightnessFilter {
@@ -158,6 +158,11 @@ export declare class TextPatternScannerConfiguration {
158
158
  */
159
159
  minimumNumberOfRequiredFramesWithEqualScanningResult: number;
160
160
  /**
161
+ Optimize for scanning a single line or a single word. Enable this option when scanning a single line or single word that are hard to scan reliably.
162
+ @defaultValue false;
163
+ */
164
+ optimizeSingleLine: boolean;
165
+ /**
161
166
  Content validator.
162
167
  @defaultValue new DefaultContentValidator({});
163
168
  */
@@ -70,6 +70,11 @@ export declare class VinScannerResult {
70
70
  Configuration for the VIN scanner.
71
71
  */
72
72
  export declare class VinScannerConfiguration {
73
+ /**
74
+ Optimize for scanning a single line or a single word. Enable this option when scanning a single line or single word that are hard to scan reliably.
75
+ @defaultValue true;
76
+ */
77
+ optimizeSingleLine: boolean;
73
78
  /**
74
79
  If true, the VIN scanner will also extract VINs from barcodes.
75
80
  Requires a license that allows barcode scanning in addition to VIN scanning.
@@ -43,7 +43,7 @@ export type WrappedImage = {
43
43
  format: string;
44
44
  step: number;
45
45
  };
46
- export declare class ObjectMap<T extends string> {
46
+ export declare class WasmObjectMap<T extends string> {
47
47
  private _map;
48
48
  private _nextId;
49
49
  private _unique;
@@ -60,5 +60,5 @@ export * from './core/bridge/utils';
60
60
  export * from './core/bridge/worker-bridge';
61
61
  export * from './core/compiled/bridge/image';
62
62
  export * from './core/compiled/utils';
63
- export { type RawImage, type DeepPartial, type Point, type Rectangle, type ObjectId, type ObjectMap, type WrappedImage, type IsUnion, type IsPolymorphicKey, type NonPartiallyConstructibleTrait, consumeResult } from './core/compiled/utils';
63
+ export { type RawImage, type DeepPartial, type Point, type Rectangle, type ObjectId, type WasmObjectMap, type WrappedImage, type IsUnion, type IsPolymorphicKey, type NonPartiallyConstructibleTrait, consumeResult } from './core/compiled/utils';
64
64
  export type * from './core/worker/ScanbotSDK.Core';
@@ -77,6 +77,10 @@ export declare class DocumentScannerViewConfiguration extends ScannerConfigurati
77
77
  * Default is 1000ms.
78
78
  */
79
79
  autoCaptureDelay?: number;
80
+ /**
81
+ * Determines whether the captured image should be automatically cropped to the detected document's outline.
82
+ */
83
+ autoCrop?: boolean;
80
84
  /**
81
85
  * Attempts to take a single exposure using the video capture device,
82
86
  * resulting in a high resolution image and potentially greatly improved detection quality.
@@ -23,6 +23,9 @@ export declare class ScannerConfiguration extends BaseConfiguration {
23
23
  preferredCamera?: string;
24
24
  spinnerColor?: string;
25
25
  backgroundColor?: string;
26
+ /** In FILL_IN – Fits the camera frame into the view, cropping the frame if necessary */
27
+ /** In FIT_IN – Fits the entire preview (camera) frame into the view. If aspect ratio does not fit, will contain black edges */
28
+ previewMode?: 'FIT_IN' | 'FILL_IN';
26
29
  constructor(resolution: {
27
30
  width: number;
28
31
  height: number;
@@ -142,6 +142,13 @@ export default class ScanbotSDK {
142
142
  paperWhiteningBias?: number;
143
143
  } & {
144
144
  readonly _type: "ColorDocumentFilter";
145
+ }) | ({
146
+ contrastEnhancement?: number;
147
+ colorEnhancement?: number;
148
+ paperSaturation?: number;
149
+ paperLightness?: number;
150
+ } & {
151
+ readonly _type: "ColorDocumentShadowRemovalFilter";
145
152
  }) | ({
146
153
  brightness?: number;
147
154
  } & {
@@ -210,6 +217,13 @@ export default class ScanbotSDK {
210
217
  paperWhiteningBias?: number;
211
218
  } & {
212
219
  readonly _type: "ColorDocumentFilter";
220
+ }) | ({
221
+ contrastEnhancement?: number;
222
+ colorEnhancement?: number;
223
+ paperSaturation?: number;
224
+ paperLightness?: number;
225
+ } & {
226
+ readonly _type: "ColorDocumentShadowRemovalFilter";
213
227
  }) | ({
214
228
  brightness?: number;
215
229
  } & {
@@ -1,9 +1,10 @@
1
1
  import ScanbotSDK from '../scanbot-sdk';
2
- import { Image, ObjectId } from '../core-types';
2
+ import { Image, ObjectId, type PageBinarization } from '../core-types';
3
3
  import { ConsumeType } from "../consume-type";
4
4
  import { SBDocument } from "../ui2/document/model/sb-document";
5
5
  export interface PdfPageOptions {
6
6
  consumeImage?: ConsumeType;
7
+ binarization?: PageBinarization;
7
8
  runOcr?: boolean;
8
9
  }
9
10
  export declare class PdfGenerator {
@@ -2,14 +2,18 @@ import React from "react";
2
2
  import { BarcodeScannerUiResult, BarcodeScannerScreenConfiguration } from "../../configuration";
3
3
  import { IBarcodeMapper } from "../utils/barcode-mapper/i-barcode-mapper";
4
4
  import { Root } from "react-dom/client";
5
+ import { NavigationBarSize } from "../../document/views/camera-screen/top-bar";
6
+ import BarcodeScannerView from "../../../barcode-scanner-view";
5
7
  declare class Props {
6
8
  root: Root;
7
9
  configuration: BarcodeScannerScreenConfiguration;
8
10
  onCameraPermissionDenied: () => void;
11
+ onSdkReady: (scanner: BarcodeScannerView | null) => void;
9
12
  onSubmit: (barcodeScannerResult: BarcodeScannerUiResult) => void;
10
13
  onError: (error?: Error) => void;
11
14
  scanningEnabled: React.MutableRefObject<boolean>;
12
15
  barcodeMapper: IBarcodeMapper;
16
+ navigationBarSize: NavigationBarSize;
13
17
  }
14
18
  export declare function MultipleScanningModeController(props: Props): React.JSX.Element;
15
19
  export {};
@@ -2,15 +2,19 @@ import React from "react";
2
2
  import { BarcodeScannerScreenConfiguration, BarcodeScannerUiResult } from "../../configuration";
3
3
  import { IBarcodeMapper } from "../utils/barcode-mapper/i-barcode-mapper";
4
4
  import { Root } from "react-dom/client";
5
+ import { NavigationBarSize } from "../../document/views/camera-screen/top-bar";
6
+ import BarcodeScannerView from "../../../barcode-scanner-view";
5
7
  declare class Props {
6
8
  root: Root;
7
9
  configuration: BarcodeScannerScreenConfiguration;
8
10
  onClose: () => void;
11
+ onSdkReady: (scanner: BarcodeScannerView | null) => void;
9
12
  onSubmit: (barcodeScannerUIResult: BarcodeScannerUiResult) => void;
10
13
  onError: (error?: Error) => void;
11
14
  onCameraPermissionDenied: () => void;
12
15
  scanningEnabled: React.MutableRefObject<boolean>;
13
16
  barcodeMapper: IBarcodeMapper;
17
+ navigationBarSize: NavigationBarSize;
14
18
  }
15
19
  export declare function SingleScanningModeController(props: Props): React.JSX.Element;
16
20
  export {};
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import BarcodeScannerView from "../../../barcode-scanner-view";
2
3
  import { ArOverlayFindAndPickConfiguration, ArOverlayGeneralConfiguration } from "../../configuration/barcode/ArTrackingOverlayConfiguration";
3
4
  import type { ActionBarConfiguration } from "../../configuration/common/ActionBarConfiguration";
4
5
  import { BarcodeScannerViewConfiguration as BarcodeScannerViewConfig } from "../../../model/configuration/barcode-scanner-view-configuration";
@@ -21,5 +22,6 @@ export declare class Props {
21
22
  onCameraPermissionDenied: () => void;
22
23
  setActionButtonsVisible: (visible: boolean) => void;
23
24
  onLicenseError?: () => void;
25
+ onSdkReady: (scanner: BarcodeScannerView | null) => void;
24
26
  }
25
27
  export declare function BarcodeScanner(props: Props): React.JSX.Element;
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import { ManualCountEditDialog, Sheet, SheetContent } from '../../../configuration';
3
3
  import { CountedBarcodeAction } from "../../model/counted-barcodes";
4
4
  import { DrawerHeaderContentProps } from "./subviews/drawer-header-content";
5
+ import { NavigationBarSize } from "../../../document/views/camera-screen/top-bar";
5
6
  declare class Props {
6
7
  isPlaceholderVisible: boolean;
7
8
  sheetStyle: Sheet;
@@ -13,6 +14,7 @@ declare class Props {
13
14
  isOpen: boolean;
14
15
  onSwipe: (action: 'swipe-to-open' | 'swipe-to-close') => void;
15
16
  closedSheetVisibleHeight: number;
17
+ navigationBarSize: NavigationBarSize;
16
18
  }
17
19
  export declare function BarcodeResultDrawer(props: Props): React.JSX.Element;
18
20
  export {};
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
2
  import { DrawerHeaderContentProps } from "./subviews/drawer-header-content";
3
3
  import { SheetContent } from "../../../configuration/barcode/MultipleScanningModeUseCase";
4
+ import { NavigationBarSize } from "../../../document/views/camera-screen/top-bar";
4
5
  export declare class Props {
5
6
  headerProps: DrawerHeaderContentProps;
6
7
  sheetContent: SheetContent;
7
8
  isEmptyStateVisible: boolean;
8
9
  barcodeList: React.JSX.Element;
10
+ navigationBarSize: NavigationBarSize;
9
11
  }
10
12
  export default function BarcodeResultSidebar(props: Props): React.JSX.Element;
@@ -5,6 +5,7 @@ declare class Props extends TopBarConfiguration {
5
5
  children: React.ReactNode;
6
6
  rightItem?: React.ReactNode;
7
7
  cameraPermissionDenied: boolean;
8
+ isCancelDisabled: boolean;
8
9
  }
9
10
  type NavigationBarSize = {
10
11
  height: number;
@@ -1,3 +1,3 @@
1
1
  export type { Point, RawImage, Rectangle } from "../core-types";
2
- export type { ObjectId, ObjectMap, consumeResult } from "../core-types";
2
+ export type { ObjectId, WasmObjectMap, consumeResult } from "../core-types";
3
3
  export type wrapImage = void;
@@ -1 +1 @@
1
- export type { BarcodeFormat, Gs1Handling, Gs1HandlingValues, BarcodeFormatValues, CharacterEncoding, CharacterEncodingValues, RangeEncoding, StructuredAppendInfo, UpcEanExtensionBehavior, UpcEanExtensionBehaviorValues, } from "../../core-types";
1
+ export type { BarcodeFormat, Gs1Handling, Gs1HandlingValues, BarcodeFormatValues, CharacterEncoding, CharacterEncodingValues, RangeEncoding, StructuredAppendInfo, UpcEanExtensionBehavior, UpcEanExtensionBehaviorValues, OneDConfirmationMode, OneDConfirmationModeValues, } from "../../core-types";
@@ -1,8 +1,8 @@
1
1
  import type { DeepPartial } from "../utils";
2
2
  import { ActionBarConfiguration } from "../common/ActionBarConfiguration";
3
3
  import { BarcodeScannerConfiguration } from "../BarcodeScannerTypes";
4
- import { BarcodeTextLocalization } from "../barcode/BarcodeTextLocalization";
5
- import { BarcodeUseCase } from "../barcode/BarcodeUseCase";
4
+ import { BarcodeTextLocalization } from "./BarcodeTextLocalization";
5
+ import { BarcodeUseCase } from "./BarcodeUseCase";
6
6
  import { CameraConfiguration } from "../common/CameraConfiguration";
7
7
  import { CameraPermissionScreen } from "../common/CameraPermission";
8
8
  import { Palette } from "../common/Common";
@@ -198,6 +198,21 @@ export declare class BarcodeTextLocalization {
198
198
  @defaultValue "Close screen without granting permission";
199
199
  */
200
200
  accessibilityDescriptionCameraPermissionCloseButton: string;
201
+ /**
202
+ The accessibility hint for the 'select camera' button, located in the top bar of the camera screen.
203
+ @defaultValue "Tap to open camera selection menu";
204
+ */
205
+ accessibilityDescriptionCameraSelectButton: string;
206
+ /**
207
+ The accessibility hint for the 'select camera' menu item, accessed via the top bar button on the camera screen.
208
+ @defaultValue "Tap to select camera";
209
+ */
210
+ accessibilityDescriptionCameraSelectMenuItem: string;
211
+ /**
212
+ The title of the camera selection menu.
213
+ @defaultValue "Select camera";
214
+ */
215
+ cameraSelectCameraMenuTitle: string;
201
216
  /** @param source {@displayType `DeepPartial<BarcodeTextLocalization>`} */
202
217
  constructor(source?: DeepPartial<BarcodeTextLocalization>);
203
218
  }
@@ -1,7 +1,7 @@
1
1
  import type { DeepPartial } from "../utils";
2
- import { FindAndPickScanningMode } from "../barcode/FindAndPickScanningModeUseCase";
3
- import { MultipleScanningMode } from "../barcode/MultipleScanningModeUseCase";
4
- import { SingleScanningMode } from "../barcode/SingleScanningModeUseCase";
2
+ import { FindAndPickScanningMode } from "./FindAndPickScanningModeUseCase";
3
+ import { MultipleScanningMode } from "./MultipleScanningModeUseCase";
4
+ import { SingleScanningMode } from "./SingleScanningModeUseCase";
5
5
  /**
6
6
  Configuration of the barcode scanner screen's behavior.
7
7
  */
@@ -1,9 +1,9 @@
1
1
  import type { DeepPartial } from "../utils";
2
- import { ArOverlayFindAndPickConfiguration } from "../barcode/ArTrackingOverlayConfiguration";
3
- import { ManualCountEditDialog } from "../barcode/MultipleScanningModeUseCase";
2
+ import { ArOverlayFindAndPickConfiguration } from "./ArTrackingOverlayConfiguration";
3
+ import { ManualCountEditDialog } from "./MultipleScanningModeUseCase";
4
4
  import { ScanbotAlertDialog } from "../common/ScanbotAlertDialog";
5
- import { SheetContent } from "../barcode/MultipleScanningModeUseCase";
6
- import { Sheet } from "../barcode/MultipleScanningModeUseCase";
5
+ import { SheetContent } from "./MultipleScanningModeUseCase";
6
+ import { Sheet } from "./MultipleScanningModeUseCase";
7
7
  /**
8
8
  Configuration of the barcode to find and scan.
9
9
  */
@@ -1,7 +1,7 @@
1
1
  import type { DeepPartial } from "../utils";
2
- import { ArOverlayGeneralConfiguration } from "../barcode/ArTrackingOverlayConfiguration";
2
+ import { ArOverlayGeneralConfiguration } from "./ArTrackingOverlayConfiguration";
3
3
  import { BadgedButton } from "../common/Common";
4
- import { BarcodeInfoMapping } from "../barcode/BarcodeInfoMapping";
4
+ import { BarcodeInfoMapping } from "./BarcodeInfoMapping";
5
5
  import { ButtonConfiguration } from "../common/Common";
6
6
  import { IconStyle } from "../common/Common";
7
7
  import { StyledText } from "../common/Common";
@@ -1,6 +1,6 @@
1
1
  import type { DeepPartial } from "../utils";
2
- import { ArOverlayGeneralConfiguration } from "../barcode/ArTrackingOverlayConfiguration";
3
- import { BarcodeInfoMapping } from "../barcode/BarcodeInfoMapping";
2
+ import { ArOverlayGeneralConfiguration } from "./ArTrackingOverlayConfiguration";
3
+ import { BarcodeInfoMapping } from "./BarcodeInfoMapping";
4
4
  import { ButtonConfiguration } from "../common/Common";
5
5
  import { StyledText } from "../common/Common";
6
6
  /**
@@ -3,10 +3,10 @@ import { ActionBarConfiguration } from "../common/ActionBarConfiguration";
3
3
  import { CameraConfiguration } from "../common/CameraConfiguration";
4
4
  import { CameraPermissionScreen } from "../common/CameraPermission";
5
5
  import { CheckScannerConfiguration } from "../CheckScannerTypes";
6
- import { CheckScannerGuidanceConfiguration } from "../check/CheckScannerUserGuidance";
7
- import { CheckScannerIntroScreenConfiguration } from "../check/CheckScannerIntroScreenConfiguration";
8
- import { CheckScannerScreenTextLocalization } from "../check/CheckScannerScreenTextLocalization";
9
- import { CheckScanningProgressConfiguration } from "../check/CheckScanningProgressConfiguration";
6
+ import { CheckScannerGuidanceConfiguration } from "./CheckScannerUserGuidance";
7
+ import { CheckScannerIntroScreenConfiguration } from "./CheckScannerIntroScreenConfiguration";
8
+ import { CheckScannerScreenTextLocalization } from "./CheckScannerScreenTextLocalization";
9
+ import { CheckScanningProgressConfiguration } from "./CheckScanningProgressConfiguration";
10
10
  import { IconButton } from "../common/Common";
11
11
  import { Palette } from "../common/Common";
12
12
  import { PermanentViewFinderConfiguration } from "../common/ViewFinderConfiguration";
@@ -168,6 +168,21 @@ export declare class CheckScannerScreenTextLocalization {
168
168
  @defaultValue "Please hold your device straight over the check.";
169
169
  */
170
170
  checkUserGuidanceBadPerspective: string;
171
+ /**
172
+ The accessibility hint for the 'select camera' button, located in the top bar of the camera screen.
173
+ @defaultValue "Tap to open camera selection menu";
174
+ */
175
+ accessibilityDescriptionCameraSelectButton: string;
176
+ /**
177
+ The accessibility hint for the 'select camera' menu item, accessed via the top bar button on the camera screen.
178
+ @defaultValue "Tap to select camera";
179
+ */
180
+ accessibilityDescriptionCameraSelectMenuItem: string;
181
+ /**
182
+ The title of the camera selection menu.
183
+ @defaultValue "Select camera";
184
+ */
185
+ cameraSelectCameraMenuTitle: string;
171
186
  /** @param source {@displayType `DeepPartial<CheckScannerScreenTextLocalization>`} */
172
187
  constructor(source?: DeepPartial<CheckScannerScreenTextLocalization>);
173
188
  }
@@ -1,5 +1,5 @@
1
1
  import type { DeepPartial } from "../utils";
2
- import { RoundButton } from "../common/Common";
2
+ import { RoundButton } from "./Common";
3
3
  /**
4
4
  Configuration of the buttons available in the action bar.
5
5
  */
@@ -1,5 +1,6 @@
1
1
  import type { DeepPartial } from "../utils";
2
2
  import { CameraLiveScannerResolution } from "../sdk/Camera";
3
+ import { CameraPreviewMode } from "./Common";
3
4
  /**
4
5
  The ideal resolution of the camera preview.
5
6
  */
@@ -58,6 +59,11 @@ export declare class CameraConfiguration {
58
59
  @defaultValue false;
59
60
  */
60
61
  flashEnabled: boolean;
62
+ /**
63
+ Determines which camera preview mode to use.
64
+ @defaultValue "FILL_IN";
65
+ */
66
+ cameraPreviewMode: CameraPreviewMode;
61
67
  /**
62
68
  The ideal resolution for the camera preview. Actual resolution may vary depending on browser and device capabilities.
63
69
  @defaultValue new Resolution({
@@ -1,7 +1,7 @@
1
1
  import type { DeepPartial } from "../utils";
2
- import { ButtonConfiguration } from "../common/Common";
3
- import { IconStyle } from "../common/Common";
4
- import { StyledText } from "../common/Common";
2
+ import { ButtonConfiguration } from "./Common";
3
+ import { IconStyle } from "./Common";
4
+ import { StyledText } from "./Common";
5
5
  /**
6
6
  Configuration of the camera permission request view.
7
7
  */
@@ -411,6 +411,25 @@ export declare class BarButtonConfiguration {
411
411
  constructor(source?: DeepPartial<BarButtonConfiguration>);
412
412
  }
413
413
  /**
414
+ Configuration of the camera preview mode.
415
+
416
+ - `FIT_IN`:
417
+ In this mode, the camera preview frames will be scaled to fit inside the layout view size - the full preview frame content will be visible, but unused edges might appear in the preview layout.
418
+ - `FILL_IN`:
419
+ In this mode, the camera preview frames fill the entire layout view - the preview frames may contain additional content at the edges that are not visible in the preview layout.
420
+ */
421
+ export type CameraPreviewMode =
422
+ /**
423
+ In this mode, the camera preview frames will be scaled to fit inside the layout view size - the full preview frame content will be visible, but unused edges might appear in the preview layout.
424
+ */
425
+ "FIT_IN"
426
+ /**
427
+ In this mode, the camera preview frames fill the entire layout view - the preview frames may contain additional content at the edges that are not visible in the preview layout.
428
+ */
429
+ | "FILL_IN";
430
+ /** @hidden */
431
+ export declare const CameraPreviewModeValues: ReadonlyArray<CameraPreviewMode>;
432
+ /**
414
433
  Determines the successful detection sound.
415
434
 
416
435
  - `MODERN_BEEP`:
@@ -1,5 +1,5 @@
1
1
  import type { DeepPartial } from "../utils";
2
- import { StyledText } from "../common/Common";
2
+ import { StyledText } from "./Common";
3
3
  /**
4
4
  Configuration of the overlay to be shown after the successful scan.
5
5
  */
@@ -1,6 +1,6 @@
1
1
  import type { DeepPartial } from "../utils";
2
- import { ButtonConfiguration } from "../common/Common";
3
- import { StyledText } from "../common/Common";
2
+ import { ButtonConfiguration } from "./Common";
3
+ import { StyledText } from "./Common";
4
4
  /**
5
5
  Configuration of the standard alert dialog.
6
6
  */
@@ -0,0 +1,63 @@
1
+ import type { DeepPartial } from "../utils";
2
+ import { IconButton } from "./Common";
3
+ import { PopupMenuItem } from "./Common";
4
+ import { StyledText } from "./Common";
5
+ /**
6
+ Configuration of the 'select camera' menu.
7
+ */
8
+ export declare class SelectCameraMenu {
9
+ /**
10
+ Configuration of the icon that toggles the 'select camera' menu.
11
+ @defaultValue new IconButton({
12
+ "color": "?sbColorOnPrimary",
13
+ "accessibilityDescription": "?accessibilityDescriptionCameraSelectButton"
14
+ });
15
+ */
16
+ button: IconButton;
17
+ /**
18
+ The background color of the 'select camera' menu.
19
+ @defaultValue "?sbColorSurface";
20
+ */
21
+ backgroundColor: string;
22
+ /**
23
+ Configuration of the title of the 'select camera' menu.
24
+ @defaultValue new StyledText({
25
+ "text": "?cameraSelectCameraMenuTitle",
26
+ "color": "?sbColorOnSurfaceVariant"
27
+ });
28
+ */
29
+ title: StyledText;
30
+ /**
31
+ The color of the divider that separates the 'select camera' title from the menu items.
32
+ @defaultValue "?sbColorOutline";
33
+ */
34
+ dividerColor: string;
35
+ /**
36
+ Configuration of the menu items in the 'select camera' menu.
37
+ @defaultValue new PopupMenuItem({
38
+ "title": new StyledText({
39
+ "color": "?sbColorOnSurface"
40
+ }),
41
+ "accessibilityDescription": "?accessibilityDescriptionCameraSelectMenuItem",
42
+ "icon": new IconStyle({
43
+ "color": "?sbColorOnSurface"
44
+ })
45
+ });
46
+ */
47
+ menuEntry: PopupMenuItem;
48
+ /**
49
+ Configuration of the active menu items in the 'select camera' menu.
50
+ @defaultValue new PopupMenuItem({
51
+ "title": new StyledText({
52
+ "color": "?sbColorPrimary"
53
+ }),
54
+ "accessibilityDescription": "?accessibilityDescriptionCameraSelectMenuItem",
55
+ "icon": new IconStyle({
56
+ "color": "?sbColorPrimary"
57
+ })
58
+ });
59
+ */
60
+ menuEntryActive: PopupMenuItem;
61
+ /** @param source {@displayType `DeepPartial<SelectCameraMenu>`} */
62
+ constructor(source?: DeepPartial<SelectCameraMenu>);
63
+ }
@@ -1,6 +1,7 @@
1
1
  import type { DeepPartial } from "../utils";
2
- import { ButtonConfiguration } from "../common/Common";
3
- import { StyledText } from "../common/Common";
2
+ import { ButtonConfiguration } from "./Common";
3
+ import { SelectCameraMenu } from "./SelectCameraMenu";
4
+ import { StyledText } from "./Common";
4
5
  /**
5
6
  Configuration of the top bar's appearance.
6
7
  */
@@ -39,6 +40,11 @@ export declare class TopBarConfiguration {
39
40
  });
40
41
  */
41
42
  cancelButton: ButtonConfiguration;
43
+ /**
44
+ Configuration of the 'select camera' button, located in the top bar.
45
+ @defaultValue new SelectCameraMenu({});
46
+ */
47
+ cameraSelect: SelectCameraMenu;
42
48
  /** @param source {@displayType `DeepPartial<TopBarConfiguration>`} */
43
49
  constructor(source?: DeepPartial<TopBarConfiguration>);
44
50
  }
@@ -1,7 +1,7 @@
1
1
  import type { DeepPartial } from "../utils";
2
- import { BackgroundStyle } from "../common/Common";
3
- import { IconStyle } from "../common/Common";
4
- import { StyledText } from "../common/Common";
2
+ import { BackgroundStyle } from "./Common";
3
+ import { IconStyle } from "./Common";
4
+ import { StyledText } from "./Common";
5
5
  /**
6
6
  Configuration of the hint guiding users through the scanning process.
7
7
  */
@@ -1,6 +1,6 @@
1
1
  import type { DeepPartial } from "../utils";
2
2
  import { AspectRatio } from "../Geometry";
3
- import { EdgeInsets } from "../common/Common";
3
+ import { EdgeInsets } from "./Common";
4
4
  /**
5
5
  Base configuration of the scanning interface’s viewfinder, serving as guidance to the user.
6
6
  */
@@ -2,11 +2,11 @@ import type { DeepPartial } from "../utils";
2
2
  import { ActionBarConfiguration } from "../common/ActionBarConfiguration";
3
3
  import { CameraConfiguration } from "../common/CameraConfiguration";
4
4
  import { CameraPermissionScreen } from "../common/CameraPermission";
5
- import { CreditCardScanGuidanceConfiguration } from "../credit_card/CreditCardScannerUserGuidance";
5
+ import { CreditCardScanGuidanceConfiguration } from "./CreditCardScannerUserGuidance";
6
6
  import { CreditCardScannerConfiguration } from "../CreditCardTypes";
7
- import { CreditCardScannerIntroScreenConfiguration } from "../credit_card/CreditCardScannerIntroScreenConfiguration";
8
- import { CreditCardScannerScreenTextLocalization } from "../credit_card/CreditCardScannerScreenTextLocalization";
9
- import { CreditCardScanningProgressConfiguration } from "../credit_card/CreditCardScanningProgressConfiguration";
7
+ import { CreditCardScannerIntroScreenConfiguration } from "./CreditCardScannerIntroScreenConfiguration";
8
+ import { CreditCardScannerScreenTextLocalization } from "./CreditCardScannerScreenTextLocalization";
9
+ import { CreditCardScanningProgressConfiguration } from "./CreditCardScanningProgressConfiguration";
10
10
  import { IconButton } from "../common/Common";
11
11
  import { Palette } from "../common/Common";
12
12
  import { PermanentViewFinderConfiguration } from "../common/ViewFinderConfiguration";
@@ -128,6 +128,21 @@ export declare class CreditCardScannerScreenTextLocalization {
128
128
  @defaultValue "Close screen without granting permission";
129
129
  */
130
130
  accessibilityDescriptionCameraPermissionCloseButton: string;
131
+ /**
132
+ The accessibility hint for the 'select camera' button, located in the top bar of the camera screen.
133
+ @defaultValue "Tap to open camera selection menu";
134
+ */
135
+ accessibilityDescriptionCameraSelectButton: string;
136
+ /**
137
+ The accessibility hint for the 'select camera' menu item, accessed via the top bar button on the camera screen.
138
+ @defaultValue "Tap to select camera";
139
+ */
140
+ accessibilityDescriptionCameraSelectMenuItem: string;
141
+ /**
142
+ The title of the camera selection menu.
143
+ @defaultValue "Select camera";
144
+ */
145
+ cameraSelectCameraMenuTitle: string;
131
146
  /** @param source {@displayType `DeepPartial<CreditCardScannerScreenTextLocalization>`} */
132
147
  constructor(source?: DeepPartial<CreditCardScannerScreenTextLocalization>);
133
148
  }