@microblink/blinkid-ux-manager 7.8.0 → 8000.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +182 -4
- package/dist/blinkid-ux-manager.js +2147 -1820
- package/package.json +2 -2
- package/types/core/BlinkIdTimeoutConfiguration.d.ts +31 -0
- package/types/core/BlinkIdTimeoutConfiguration.d.ts.map +1 -0
- package/types/core/BlinkIdUxManager.d.ts +84 -58
- package/types/core/BlinkIdUxManager.d.ts.map +1 -1
- package/types/core/BlinkIdUxManager.session-status.test.d.ts +5 -0
- package/types/core/BlinkIdUxManager.session-status.test.d.ts.map +1 -0
- package/types/core/BlinkIdUxManager.timeout.test.d.ts +5 -0
- package/types/core/BlinkIdUxManager.timeout.test.d.ts.map +1 -0
- package/types/core/__testdata/blinkidTestFixtures.d.ts +1 -4
- package/types/core/__testdata/blinkidTestFixtures.d.ts.map +1 -1
- package/types/core/blinkid-ui-state.d.ts +4 -9
- package/types/core/blinkid-ui-state.d.ts.map +1 -1
- package/types/core/createBlinkIdUxManager.d.ts +8 -0
- package/types/core/createBlinkIdUxManager.d.ts.map +1 -1
- package/types/core/extractionMode.d.ts +41 -0
- package/types/core/extractionMode.d.ts.map +1 -0
- package/types/core/extractionMode.test.d.ts +5 -0
- package/types/core/extractionMode.test.d.ts.map +1 -0
- package/types/core/test-helpers.integration.d.ts +3 -3
- package/types/core/test-helpers.integration.d.ts.map +1 -1
- package/types/core/test-utils.d.ts +14 -0
- package/types/core/test-utils.d.ts.map +1 -0
- package/types/core/ui-state-utils.d.ts +2 -1
- package/types/core/ui-state-utils.d.ts.map +1 -1
- package/types/index.d.ts +3 -2
- package/types/index.d.ts.map +1 -1
- package/types/index.rollup.d.ts +315 -143
- package/types/ui/BlinkIdFeedbackUi.d.ts +2 -2
- package/types/ui/BlinkIdFeedbackUi.d.ts.map +1 -1
- package/types/ui/LocalizationContext.d.ts +22 -4
- package/types/ui/LocalizationContext.d.ts.map +1 -1
- package/types/ui/UiFeedbackOverlay.d.ts +2 -0
- package/types/ui/UiFeedbackOverlay.d.ts.map +1 -1
- package/types/ui/createBlinkIdFeedbackUi.d.ts +3 -14
- package/types/ui/createBlinkIdFeedbackUi.d.ts.map +1 -1
- package/types/ui/dialogs/HelpModal.d.ts +43 -0
- package/types/ui/dialogs/HelpModal.d.ts.map +1 -1
- package/types/ui/dialogs/OnboardingGuideModal.d.ts +25 -0
- package/types/ui/dialogs/OnboardingGuideModal.d.ts.map +1 -1
- package/types/ui/dialogs/modalExtractionMode.d.ts +7 -0
- package/types/ui/dialogs/modalExtractionMode.d.ts.map +1 -0
- package/types/ui/dialogs/modalExtractionMode.test.d.ts +5 -0
- package/types/ui/dialogs/modalExtractionMode.test.d.ts.map +1 -0
- package/types/ui/feedbackMessages.d.ts +2 -1
- package/types/ui/feedbackMessages.d.ts.map +1 -1
- package/types/ui/locales/ak.d.ts +156 -61
- package/types/ui/locales/ak.d.ts.map +1 -1
- package/types/ui/locales/am.d.ts +156 -61
- package/types/ui/locales/am.d.ts.map +1 -1
- package/types/ui/locales/ar.d.ts +156 -61
- package/types/ui/locales/ar.d.ts.map +1 -1
- package/types/ui/locales/bn.d.ts +156 -61
- package/types/ui/locales/bn.d.ts.map +1 -1
- package/types/ui/locales/cs.d.ts +156 -61
- package/types/ui/locales/cs.d.ts.map +1 -1
- package/types/ui/locales/da.d.ts +156 -61
- package/types/ui/locales/da.d.ts.map +1 -1
- package/types/ui/locales/de.d.ts +156 -61
- package/types/ui/locales/de.d.ts.map +1 -1
- package/types/ui/locales/el.d.ts +156 -61
- package/types/ui/locales/el.d.ts.map +1 -1
- package/types/ui/locales/en.d.ts +156 -61
- package/types/ui/locales/en.d.ts.map +1 -1
- package/types/ui/locales/en_GB.d.ts +156 -61
- package/types/ui/locales/en_GB.d.ts.map +1 -1
- package/types/ui/locales/es.d.ts +156 -61
- package/types/ui/locales/es.d.ts.map +1 -1
- package/types/ui/locales/es_MX.d.ts +156 -61
- package/types/ui/locales/es_MX.d.ts.map +1 -1
- package/types/ui/locales/fa-latn.d.ts +156 -61
- package/types/ui/locales/fa-latn.d.ts.map +1 -1
- package/types/ui/locales/fi.d.ts +156 -61
- package/types/ui/locales/fi.d.ts.map +1 -1
- package/types/ui/locales/fil.d.ts +156 -61
- package/types/ui/locales/fil.d.ts.map +1 -1
- package/types/ui/locales/fr.d.ts +156 -61
- package/types/ui/locales/fr.d.ts.map +1 -1
- package/types/ui/locales/fr_CA.d.ts +156 -61
- package/types/ui/locales/fr_CA.d.ts.map +1 -1
- package/types/ui/locales/ha.d.ts +156 -61
- package/types/ui/locales/ha.d.ts.map +1 -1
- package/types/ui/locales/he.d.ts +156 -61
- package/types/ui/locales/he.d.ts.map +1 -1
- package/types/ui/locales/hi.d.ts +156 -61
- package/types/ui/locales/hi.d.ts.map +1 -1
- package/types/ui/locales/hr.d.ts +156 -61
- package/types/ui/locales/hr.d.ts.map +1 -1
- package/types/ui/locales/hu.d.ts +156 -61
- package/types/ui/locales/hu.d.ts.map +1 -1
- package/types/ui/locales/id.d.ts +156 -61
- package/types/ui/locales/id.d.ts.map +1 -1
- package/types/ui/locales/is.d.ts +156 -61
- package/types/ui/locales/is.d.ts.map +1 -1
- package/types/ui/locales/it.d.ts +156 -61
- package/types/ui/locales/it.d.ts.map +1 -1
- package/types/ui/locales/ja.d.ts +156 -61
- package/types/ui/locales/ja.d.ts.map +1 -1
- package/types/ui/locales/ka_GE.d.ts +156 -61
- package/types/ui/locales/ka_GE.d.ts.map +1 -1
- package/types/ui/locales/kk.d.ts +156 -61
- package/types/ui/locales/kk.d.ts.map +1 -1
- package/types/ui/locales/km_KH.d.ts +156 -61
- package/types/ui/locales/km_KH.d.ts.map +1 -1
- package/types/ui/locales/ko.d.ts +156 -61
- package/types/ui/locales/ko.d.ts.map +1 -1
- package/types/ui/locales/lv.d.ts +156 -61
- package/types/ui/locales/lv.d.ts.map +1 -1
- package/types/ui/locales/ms.d.ts +156 -61
- package/types/ui/locales/ms.d.ts.map +1 -1
- package/types/ui/locales/ne.d.ts +156 -61
- package/types/ui/locales/ne.d.ts.map +1 -1
- package/types/ui/locales/nl.d.ts +156 -61
- package/types/ui/locales/nl.d.ts.map +1 -1
- package/types/ui/locales/no.d.ts +156 -61
- package/types/ui/locales/no.d.ts.map +1 -1
- package/types/ui/locales/pl.d.ts +156 -61
- package/types/ui/locales/pl.d.ts.map +1 -1
- package/types/ui/locales/ps_AF.d.ts +156 -61
- package/types/ui/locales/ps_AF.d.ts.map +1 -1
- package/types/ui/locales/pt.d.ts +156 -61
- package/types/ui/locales/pt.d.ts.map +1 -1
- package/types/ui/locales/pt_BR.d.ts +156 -61
- package/types/ui/locales/pt_BR.d.ts.map +1 -1
- package/types/ui/locales/ro.d.ts +156 -61
- package/types/ui/locales/ro.d.ts.map +1 -1
- package/types/ui/locales/ru.d.ts +156 -61
- package/types/ui/locales/ru.d.ts.map +1 -1
- package/types/ui/locales/si.d.ts +156 -61
- package/types/ui/locales/si.d.ts.map +1 -1
- package/types/ui/locales/sk.d.ts +156 -61
- package/types/ui/locales/sk.d.ts.map +1 -1
- package/types/ui/locales/sl.d.ts +156 -61
- package/types/ui/locales/sl.d.ts.map +1 -1
- package/types/ui/locales/sr.d.ts +156 -61
- package/types/ui/locales/sr.d.ts.map +1 -1
- package/types/ui/locales/sv.d.ts +156 -61
- package/types/ui/locales/sv.d.ts.map +1 -1
- package/types/ui/locales/sw.d.ts +156 -61
- package/types/ui/locales/sw.d.ts.map +1 -1
- package/types/ui/locales/th.d.ts +156 -61
- package/types/ui/locales/th.d.ts.map +1 -1
- package/types/ui/locales/tr.d.ts +156 -61
- package/types/ui/locales/tr.d.ts.map +1 -1
- package/types/ui/locales/uk.d.ts +156 -61
- package/types/ui/locales/uk.d.ts.map +1 -1
- package/types/ui/locales/ur.d.ts +156 -61
- package/types/ui/locales/ur.d.ts.map +1 -1
- package/types/ui/locales/uz.d.ts +156 -61
- package/types/ui/locales/uz.d.ts.map +1 -1
- package/types/ui/locales/vi.d.ts +156 -61
- package/types/ui/locales/vi.d.ts.map +1 -1
- package/types/ui/locales/yo.d.ts +156 -61
- package/types/ui/locales/yo.d.ts.map +1 -1
- package/types/ui/locales/zh_CN.d.ts +156 -61
- package/types/ui/locales/zh_CN.d.ts.map +1 -1
- package/types/ui/locales/zh_TW.d.ts +156 -61
- package/types/ui/locales/zh_TW.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microblink/blinkid-ux-manager",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8000.0.0",
|
|
4
4
|
"author": "Microblink",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/blinkid-ux-manager.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"types"
|
|
12
12
|
],
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@microblink/blinkid-core": "^
|
|
14
|
+
"@microblink/blinkid-core": "^8000.0.0",
|
|
15
15
|
"@microblink/camera-manager": "^7.3.2",
|
|
16
16
|
"type-fest": "^4.35.0"
|
|
17
17
|
},
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026 Microblink Ltd. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
export type BlinkIdTimeoutConfiguration = {
|
|
5
|
+
/**
|
|
6
|
+
* Maximum allowed inactivity window in milliseconds. The inactivity timer is
|
|
7
|
+
* reset whenever the stabilized BlinkID UI state changes. Set to `null` to
|
|
8
|
+
* disable the inactivity timeout.
|
|
9
|
+
*/
|
|
10
|
+
inactivityTimeoutMs: number | null;
|
|
11
|
+
/**
|
|
12
|
+
* Maximum allowed capture duration for a single BlinkID scan step in
|
|
13
|
+
* milliseconds. Set to `null` to disable the scan-step timeout.
|
|
14
|
+
*/
|
|
15
|
+
scanStepTimeoutMs: number | null;
|
|
16
|
+
/**
|
|
17
|
+
* Active-capture delay before resolving a barcode step once BlinkID reports a
|
|
18
|
+
* barcode whose parsing is not supported. Set to `null` to disable automatic
|
|
19
|
+
* resolution for partially supported barcodes.
|
|
20
|
+
*/
|
|
21
|
+
partiallySupportedBarcodeResolveTimeoutMs: number | null;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* The default BlinkID timeout configuration.
|
|
25
|
+
*/
|
|
26
|
+
export declare const defaultBlinkIdTimeoutConfiguration: BlinkIdTimeoutConfiguration;
|
|
27
|
+
/**
|
|
28
|
+
* Normalizes the BlinkID timeout configuration.
|
|
29
|
+
*/
|
|
30
|
+
export declare const normalizeBlinkIdTimeoutConfiguration: (timeoutConfiguration?: Partial<BlinkIdTimeoutConfiguration>) => BlinkIdTimeoutConfiguration;
|
|
31
|
+
//# sourceMappingURL=BlinkIdTimeoutConfiguration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlinkIdTimeoutConfiguration.d.ts","sourceRoot":"","sources":["../../src/core/BlinkIdTimeoutConfiguration.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC;;;OAGG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC;;;;OAIG;IACH,yCAAyC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kCAAkC,EAAE,2BAIhD,CAAC;AAkBF;;GAEG;AACH,eAAO,MAAM,oCAAoC,GAC/C,uBAAsB,OAAO,CAAC,2BAA2B,CAAM,KAC9D,2BAoBF,CAAC"}
|
|
@@ -1,14 +1,63 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2026 Microblink Ltd. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import { AnalyticService, DeviceInfo, type
|
|
4
|
+
import { AnalyticService, DeviceInfo, type BlinkIdProcessResult, type BlinkIdScanningResult, type BlinkIdSessionSettings, type DocumentClassInfo, type RemoteScanningSession } from "@microblink/blinkid-core";
|
|
5
5
|
import type { CameraManager } from "@microblink/camera-manager";
|
|
6
6
|
import { FeedbackStabilizer } from "@microblink/feedback-stabilizer";
|
|
7
7
|
import { HapticFeedbackManager } from "@microblink/ux-common/hapticFeedback";
|
|
8
8
|
import { BlinkIdUiState, BlinkIdUiStateKey, BlinkIdUiStateMap } from "./blinkid-ui-state";
|
|
9
9
|
import { BlinkIdProcessingError } from "./BlinkIdProcessingError";
|
|
10
|
-
import { BlinkIdUxManagerOptions } from "./createBlinkIdUxManager";
|
|
11
10
|
import { DocumentClassFilter } from "./DocumentClassFilter";
|
|
11
|
+
import type { BlinkIdTimeoutConfiguration } from "./BlinkIdTimeoutConfiguration";
|
|
12
|
+
import type { BlinkIdUxManagerOptions } from "./createBlinkIdUxManager";
|
|
13
|
+
import { type BlinkIdExtractionMode } from "./extractionMode";
|
|
14
|
+
export type BlinkIdProgressTimerStatus = "disabled" | "idle" | "running" | "paused";
|
|
15
|
+
/**
|
|
16
|
+
* Callback invoked after BlinkID processes a camera frame.
|
|
17
|
+
*
|
|
18
|
+
* @param frameResult - Process result for the current frame. This contains the
|
|
19
|
+
* input image analysis and result completeness data that the UX manager uses to
|
|
20
|
+
* map feedback state; it does not include the final scanning result.
|
|
21
|
+
* @param advanceToNextStep - Advances the scanning session to the next required
|
|
22
|
+
* step. Use this for custom flows that decide, from the frame result, that the
|
|
23
|
+
* current side or step is complete before the default UX flow advances. For
|
|
24
|
+
* example, call this once `frameResult` contains all data your integration
|
|
25
|
+
* needs, even if the default flow would keep waiting for an optional barcode
|
|
26
|
+
* step that is hard to capture on a poor camera.
|
|
27
|
+
* @param triggerStepTimeout - Immediately triggers the scan-step timeout path
|
|
28
|
+
* for the active step. Use this when custom validation decides that the current
|
|
29
|
+
* step should fail or stop waiting for more frames.
|
|
30
|
+
* @param getLastFrame - Returns the raw `ArrayBuffer` for the frame that
|
|
31
|
+
* produced `frameResult`. The buffer is intended for diagnostics or custom
|
|
32
|
+
* tooling that needs the exact last processed frame.
|
|
33
|
+
*/
|
|
34
|
+
export type BlinkIdFrameProcessCallback = (frameResult: BlinkIdProcessResult, advanceToNextStep: () => Promise<void>, triggerStepTimeout: () => void, getLastFrame: () => ArrayBuffer) => void;
|
|
35
|
+
export type BlinkIdProgressTimerState = {
|
|
36
|
+
/** Configured timeout duration in milliseconds. */
|
|
37
|
+
configuredMs: number | null;
|
|
38
|
+
/** Remaining timeout duration in milliseconds. */
|
|
39
|
+
remainingMs: number | null;
|
|
40
|
+
/** Whether this timer is idle, actively counting down, or paused. */
|
|
41
|
+
status: BlinkIdProgressTimerStatus;
|
|
42
|
+
};
|
|
43
|
+
export type BlinkIdProgress = {
|
|
44
|
+
/** Currently stabilized BlinkID UI state key. */
|
|
45
|
+
uiStateKey: BlinkIdUiStateKey;
|
|
46
|
+
/** Remaining state for the inactivity timeout. */
|
|
47
|
+
inactivity: BlinkIdProgressTimerState;
|
|
48
|
+
/** Remaining state for the scan-step timeout. */
|
|
49
|
+
perSide: BlinkIdProgressTimerState;
|
|
50
|
+
/** Remaining state for partially supported barcode auto-resolution. */
|
|
51
|
+
partiallySupportedBarcodeResolve: BlinkIdProgressTimerState;
|
|
52
|
+
/** Whether BlinkID is currently timing an active scan step. */
|
|
53
|
+
isTimingActiveScanStep: boolean;
|
|
54
|
+
/** Current camera playback state that controls timer pause/resume. */
|
|
55
|
+
playbackState: "idle" | "playback" | "capturing";
|
|
56
|
+
/** Latest raw mapped BlinkID UI key. */
|
|
57
|
+
mappedUiStateKey: BlinkIdUiStateKey;
|
|
58
|
+
/** Stabilized UI state key that last reset the inactivity timeout. */
|
|
59
|
+
inactivityResetUiStateKey?: BlinkIdUiStateKey;
|
|
60
|
+
};
|
|
12
61
|
/**
|
|
13
62
|
* The BlinkIdUxManager class. This is the main class that manages the UX of
|
|
14
63
|
* the BlinkID SDK. It is responsible for handling the UI state, the timeout,
|
|
@@ -51,28 +100,14 @@ export declare class BlinkIdUxManager {
|
|
|
51
100
|
get uiStateKey(): BlinkIdUiStateKey;
|
|
52
101
|
/** Latest mapped candidate key before stabilization. */
|
|
53
102
|
get mappedUiStateKey(): BlinkIdUiStateKey;
|
|
54
|
-
/**
|
|
55
|
-
|
|
56
|
-
*/
|
|
57
|
-
get rawUiStateKey(): BlinkIdUiStateKey;
|
|
103
|
+
/** Session-settings-derived extraction mode used by feedback and dialogs. */
|
|
104
|
+
get extractionMode(): BlinkIdExtractionMode;
|
|
58
105
|
startUiUpdateLoop(): void;
|
|
59
106
|
stopUiUpdateLoop(): void;
|
|
60
107
|
/**
|
|
61
|
-
* Returns the
|
|
62
|
-
*/
|
|
63
|
-
getTimeoutDuration(): number | null;
|
|
64
|
-
/**
|
|
65
|
-
* Returns the time in ms before the help tooltip is shown. Null if tooltip won't be auto shown.
|
|
66
|
-
*
|
|
67
|
-
* @deprecated This option will be removed in a future release. Use `helpTooltipShowDelay` in `FeedbackUiOptions` instead.
|
|
68
|
-
*/
|
|
69
|
-
getHelpTooltipShowDelay(): number | null;
|
|
70
|
-
/**
|
|
71
|
-
* Returns the time in ms before the help tooltip is hidden. Null if tooltip won't be auto hidden.
|
|
72
|
-
*
|
|
73
|
-
* @deprecated This option will be removed in a future release. Use `helpTooltipHideDelay` in `FeedbackUiOptions` instead.
|
|
108
|
+
* Returns the active BlinkID timeout configuration.
|
|
74
109
|
*/
|
|
75
|
-
|
|
110
|
+
getTimeoutConfiguration(): BlinkIdTimeoutConfiguration;
|
|
76
111
|
/**
|
|
77
112
|
* Gets the haptic feedback manager instance.
|
|
78
113
|
*
|
|
@@ -155,20 +190,24 @@ export declare class BlinkIdUxManager {
|
|
|
155
190
|
/**
|
|
156
191
|
* Registers a callback function to be called when a frame is processed.
|
|
157
192
|
*
|
|
158
|
-
* @param callback - A function that
|
|
159
|
-
*
|
|
193
|
+
* @param callback - A function that receives the processed frame result and
|
|
194
|
+
* controls for custom step advancement, step timeout triggering, and access to
|
|
195
|
+
* the last processed frame buffer.
|
|
160
196
|
* @returns A cleanup function that, when called, will remove the registered
|
|
161
197
|
* callback.
|
|
162
198
|
*
|
|
163
199
|
* @example
|
|
164
|
-
* const cleanup = manager.addOnFrameProcessCallback((frameResult) => {
|
|
200
|
+
* const cleanup = manager.addOnFrameProcessCallback((frameResult, advanceToNextStep) => {
|
|
165
201
|
* console.log('Frame processed:', frameResult);
|
|
202
|
+
* if (shouldAdvance(frameResult)) {
|
|
203
|
+
* void advanceToNextStep();
|
|
204
|
+
* }
|
|
166
205
|
* });
|
|
167
206
|
*
|
|
168
207
|
* // Later, to remove the callback:
|
|
169
208
|
* cleanup();
|
|
170
209
|
*/
|
|
171
|
-
addOnFrameProcessCallback(callback:
|
|
210
|
+
addOnFrameProcessCallback(callback: BlinkIdFrameProcessCallback): () => void;
|
|
172
211
|
/**
|
|
173
212
|
* Registers a callback function to be called when an error occurs during
|
|
174
213
|
* processing.
|
|
@@ -186,6 +225,23 @@ export declare class BlinkIdUxManager {
|
|
|
186
225
|
* cleanup();
|
|
187
226
|
*/
|
|
188
227
|
addOnErrorCallback(callback: (errorState: BlinkIdProcessingError) => void): () => void;
|
|
228
|
+
/**
|
|
229
|
+
* Registers a callback function to receive BlinkID progress snapshots.
|
|
230
|
+
*
|
|
231
|
+
* @param callback - A function that will be called with progress data from
|
|
232
|
+
* the internal 30 FPS RAF loop.
|
|
233
|
+
* @returns A cleanup function that, when called, will remove the registered
|
|
234
|
+
* callback.
|
|
235
|
+
*
|
|
236
|
+
* @example
|
|
237
|
+
* const cleanup = manager.addOnProgressCallback((progress) => {
|
|
238
|
+
* console.log('BlinkID progress:', progress);
|
|
239
|
+
* });
|
|
240
|
+
*
|
|
241
|
+
* // Later, to remove the callback:
|
|
242
|
+
* cleanup();
|
|
243
|
+
*/
|
|
244
|
+
addOnProgressCallback(callback: (progress: BlinkIdProgress) => void): () => void;
|
|
189
245
|
/**
|
|
190
246
|
* Registers a callback function to be called when a document is filtered.
|
|
191
247
|
*
|
|
@@ -204,42 +260,12 @@ export declare class BlinkIdUxManager {
|
|
|
204
260
|
*/
|
|
205
261
|
addOnDocumentFilteredCallback(callback: (documentClassInfo: DocumentClassInfo) => void): () => void;
|
|
206
262
|
/**
|
|
207
|
-
*
|
|
208
|
-
* timeout can occur in various scenarios and may be restarted by different
|
|
209
|
-
* scanning events.
|
|
210
|
-
*
|
|
211
|
-
* @param duration The timeout duration in milliseconds. If null, timeout won't
|
|
212
|
-
* be triggered ever.
|
|
213
|
-
* @param setHelpTooltipShowDelay If true, also sets the help tooltip show
|
|
214
|
-
* delay to half of the provided duration. If timeout duration is null, help
|
|
215
|
-
* tooltip show delay will be set to null. Defaults to true.
|
|
216
|
-
* @throws {Error} Throws an error if duration is less than or equal to 0 when not null.
|
|
217
|
-
*/
|
|
218
|
-
setTimeoutDuration(duration: number | null, setHelpTooltipShowDelay?: boolean): void;
|
|
219
|
-
/**
|
|
220
|
-
* Sets the duration in milliseconds before the help tooltip is shown.
|
|
221
|
-
* A value of null means the help tooltip will not be auto shown.
|
|
222
|
-
*
|
|
223
|
-
* @param duration The duration in milliseconds before the help tooltip is
|
|
224
|
-
* shown. If null, tooltip won't be auto shown.
|
|
225
|
-
* @throws {Error} Throws an error if duration is less than or equal to 0 when
|
|
226
|
-
* not null.
|
|
227
|
-
*
|
|
228
|
-
* @deprecated This option will be removed in a future release. Use `helpTooltipShowDelay` in `FeedbackUiOptions` instead.
|
|
229
|
-
*/
|
|
230
|
-
setHelpTooltipShowDelay(duration: number | null): void;
|
|
231
|
-
/**
|
|
232
|
-
* Sets the duration in milliseconds before the help tooltip is hidden.
|
|
233
|
-
* A value of null means the help tooltip will not be auto hidden.
|
|
234
|
-
*
|
|
235
|
-
* @param duration The duration in milliseconds before the help tooltip is
|
|
236
|
-
* hidden. If null, tooltip won't be auto hidden.
|
|
237
|
-
* @throws {Error} Throws an error if duration is less than or equal to 0 when
|
|
238
|
-
* not null.
|
|
263
|
+
* Updates the BlinkID timeout configuration.
|
|
239
264
|
*
|
|
240
|
-
*
|
|
265
|
+
* Updating the configuration resets timeout tracking for the current scan
|
|
266
|
+
* step so the new durations take effect immediately.
|
|
241
267
|
*/
|
|
242
|
-
|
|
268
|
+
setTimeoutConfiguration(timeoutConfiguration: Partial<BlinkIdTimeoutConfiguration>): void;
|
|
243
269
|
handleCameraManagerError: (error: Error) => void;
|
|
244
270
|
/**
|
|
245
271
|
* Returns the initial UI state key used when resetting UX state.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlinkIdUxManager.d.ts","sourceRoot":"","sources":["../../src/core/BlinkIdUxManager.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EACL,eAAe,EACf,UAAU,EAGV,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"BlinkIdUxManager.d.ts","sourceRoot":"","sources":["../../src/core/BlinkIdUxManager.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EACL,eAAe,EACf,UAAU,EAGV,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EAItB,KAAK,qBAAqB,EAC3B,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAOrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAI7E,OAAO,EAIL,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EAKlB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAoB5D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,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M,EAAE,qBAAqB,KAAK,IAAI;IAOrE;;;;;;;;;;;;;;;OAeG;IACH,sBAAsB,CAAC,QAAQ,EAAE,mBAAmB;IAOpD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,yBAAyB,CAAC,QAAQ,EAAE,2BAA2B;IAO/D;;;;;;;;;;;;;;;OAeG;IACH,kBAAkB,CAAC,QAAQ,EAAE,CAAC,UAAU,EAAE,sBAAsB,KAAK,IAAI;IAOzE;;;;;;;;;;;;;;;OAeG;IACH,qBAAqB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI;IAiBnE;;;;;;;;;;;;;;;OAeG;IACH,6BAA6B,CAC3B,QAAQ,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,IAAI;IAuG1D;;;;;OAKG;IACH,uBAAuB,CACrB,oBAAoB,EAAE,OAAO,CAAC,2BAA2B,CAAC;IA2gB5D,wBAAwB,GAAI,OAAO,KAAK,UAOtC;IAwNF;;OAEG;IACH,oBAAoB;IAIpB;;;;;OAKG;IACH,oBAAoB,CAClB,UAAU,EAAE,iBAAiB,EAC7B,gBAAgB,UAAQ;IAsB1B;;OAEG;IACH,gBAAgB;IAIhB;;;;OAIG;IACG,gBAAgB,IAAI,OAAO,CAAC,qBAAqB,CAAC;IAcxD;;;;OAIG;IACG,oBAAoB,CAAC,iBAAiB,UAAO;IAgBnD,kBAAkB;IAWlB,mBAAmB;IAOnB;;;;OAIG;IACH,KAAK;IASL;;;;;;OAMG;IACH,OAAO;CASR"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlinkIdUxManager.session-status.test.d.ts","sourceRoot":"","sources":["../../src/core/BlinkIdUxManager.session-status.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlinkIdUxManager.timeout.test.d.ts","sourceRoot":"","sources":["../../src/core/BlinkIdUxManager.timeout.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2026 Microblink Ltd. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import type { BlinkIdScanningResult,
|
|
4
|
+
import type { BlinkIdScanningResult, ProcessResultWithBuffer } from "@microblink/blinkid-core";
|
|
5
5
|
import { type PartialDeep } from "type-fest";
|
|
6
|
-
export declare const defaultScanningSettings: ScanningSettings;
|
|
7
|
-
export declare const getMergedSettings: (overrides?: PartialDeep<ScanningSettings>) => ScanningSettings;
|
|
8
|
-
export declare const createSessionSettings: (settingsOverrides?: PartialDeep<ScanningSettings>) => BlinkIdSessionSettings;
|
|
9
6
|
export declare const createScanningResult: (overrides?: Partial<BlinkIdScanningResult>) => BlinkIdScanningResult;
|
|
10
7
|
/**
|
|
11
8
|
* Utility function to create a BlinkIdProcessResult with specified overrides.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blinkidTestFixtures.d.ts","sourceRoot":"","sources":["../../../src/core/__testdata/blinkidTestFixtures.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,qBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"blinkidTestFixtures.d.ts","sourceRoot":"","sources":["../../../src/core/__testdata/blinkidTestFixtures.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAI7C,eAAO,MAAM,oBAAoB,GAC/B,YAAW,OAAO,CAAC,qBAAqB,CAAM,KAC7C,qBAIF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,GAC9B,YAAW,WAAW,CAAC,uBAAuB,CAAM,KACnD,uBAEF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2026 Microblink Ltd. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import { InputImageAnalysisResult,
|
|
4
|
+
import { InputImageAnalysisResult, ScanningSettings, ScanningStatus } from "@microblink/blinkid-core";
|
|
5
5
|
import { UiState } from "@microblink/feedback-stabilizer";
|
|
6
6
|
/**
|
|
7
7
|
* The type of reticle to display.
|
|
@@ -126,14 +126,9 @@ export type BlinkIdUiState = BlinkIdUiStateMap[keyof BlinkIdUiStateMap];
|
|
|
126
126
|
*/
|
|
127
127
|
export declare const blinkIdUiStateMap: BlinkIdUiStateMap;
|
|
128
128
|
/**
|
|
129
|
-
*
|
|
129
|
+
* Maps a session-level scanning status to a UI state key
|
|
130
130
|
*/
|
|
131
|
-
export
|
|
132
|
-
/** The input image analysis result. */
|
|
133
|
-
inputImageAnalysisResult: Partial<InputImageAnalysisResult>;
|
|
134
|
-
/** The result completeness. */
|
|
135
|
-
resultCompleteness: Partial<ResultCompleteness>;
|
|
136
|
-
};
|
|
131
|
+
export declare function getUiStateKeyFromScanningStatus(scanningStatus: ScanningStatus): BlinkIdUiMappableKey | undefined;
|
|
137
132
|
/**
|
|
138
133
|
* Determines the appropriate UI state key based on the current frame processing
|
|
139
134
|
* result and scanning settings.
|
|
@@ -148,5 +143,5 @@ export type PartialProcessResult = {
|
|
|
148
143
|
* selection.
|
|
149
144
|
* @returns The UI state key representing what should be shown to the user.
|
|
150
145
|
*/
|
|
151
|
-
export declare function getUiStateKey(
|
|
146
|
+
export declare function getUiStateKey(scanningStatus: ScanningStatus, inputImageAnalysisResult: InputImageAnalysisResult, scanningSettings: ScanningSettings): BlinkIdUiMappableKey | undefined;
|
|
152
147
|
//# sourceMappingURL=blinkid-ui-state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blinkid-ui-state.d.ts","sourceRoot":"","sources":["../../src/core/blinkid-ui-state.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,wBAA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;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG;KAC7B,CAAC,IAAI,iBAAiB,GAAG,OAAO,GAAG;QAClC,+BAA+B;QAC/B,GAAG,EAAE,CAAC,CAAC;QACP,+BAA+B;QAC/B,WAAW,EAAE,kBAAkB,CAAC;KACjC;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAAC,MAAM,iBAAiB,CAAC,CAAC;AAOxE;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,iBA8NtB,CAAC;AAEX;;GAEG;AACH,wBAAgB,+BAA+B,CAC7C,cAAc,EAAE,cAAc,GAC7B,oBAAoB,GAAG,SAAS,CAMlC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAC3B,cAAc,EAAE,cAAc,EAC9B,wBAAwB,EAAE,wBAAwB,EAClD,gBAAgB,EAAE,gBAAgB,oCA+RnC"}
|
|
@@ -5,12 +5,20 @@ import { type RemoteScanningSession } from "@microblink/blinkid-core";
|
|
|
5
5
|
import { CameraManager } from "@microblink/camera-manager";
|
|
6
6
|
import { BlinkIdUxManager } from "./BlinkIdUxManager";
|
|
7
7
|
import { BlinkIdUiStateKey } from "./blinkid-ui-state";
|
|
8
|
+
import type { BlinkIdTimeoutConfiguration } from "./BlinkIdTimeoutConfiguration";
|
|
9
|
+
/**
|
|
10
|
+
* Options for the BlinkIdUxManager.
|
|
11
|
+
*/
|
|
8
12
|
export type BlinkIdUxManagerOptions = {
|
|
9
13
|
/**
|
|
10
14
|
* Initial UI state key used by the manager/stabilizer reset flow.
|
|
11
15
|
* Defaults to `INTRO_FRONT_PAGE`.
|
|
12
16
|
*/
|
|
13
17
|
initialUiStateKey?: BlinkIdUiStateKey;
|
|
18
|
+
/**
|
|
19
|
+
* Configures BlinkID scanning timeout behavior.
|
|
20
|
+
*/
|
|
21
|
+
timeoutConfiguration?: Partial<BlinkIdTimeoutConfiguration>;
|
|
14
22
|
};
|
|
15
23
|
/**
|
|
16
24
|
* Creates a BlinkIdUxManager.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createBlinkIdUxManager.d.ts","sourceRoot":"","sources":["../../src/core/createBlinkIdUxManager.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,
|
|
1
|
+
{"version":3,"file":"createBlinkIdUxManager.d.ts","sourceRoot":"","sources":["../../src/core/createBlinkIdUxManager.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACL,iBAAiB,EAElB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAEjF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,CAAC;CAC7D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GACjC,eAAe,aAAa,EAC5B,iBAAiB,qBAAqB,EACtC,UAAS,uBAA4B,KACpC,OAAO,CAAC,gBAAgB,CA8D1B,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026 Microblink Ltd. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import type { BlinkIdSessionSettings, ScanningSettings } from "@microblink/blinkid-core";
|
|
5
|
+
/**
|
|
6
|
+
* UI-facing classification of how a BlinkID session extracts data.
|
|
7
|
+
*
|
|
8
|
+
* The UX manager uses this mode to choose feedback copy, help/onboarding locale
|
|
9
|
+
* groups, and extraction-specific modal illustrations.
|
|
10
|
+
*
|
|
11
|
+
* - `full-document` - Standard document flow for document capture, MRZ, VIZ, or
|
|
12
|
+
* mixed multi-side extraction.
|
|
13
|
+
* - `document-with-barcode` - Single-side document capture flow that requires
|
|
14
|
+
* the barcode side to be scanned.
|
|
15
|
+
* - `barcode-only` - Barcode extraction flow with no document capture, MRZ, or
|
|
16
|
+
* VIZ extraction.
|
|
17
|
+
*/
|
|
18
|
+
export type BlinkIdExtractionMode = "full-document" | "document-with-barcode" | "barcode-only";
|
|
19
|
+
/**
|
|
20
|
+
* Minimal subset of session settings required to derive a UX extraction mode.
|
|
21
|
+
*
|
|
22
|
+
* The helper accepts partial settings because mode derivation only depends on
|
|
23
|
+
* module presence and whether the session is explicitly configured for a
|
|
24
|
+
* single-side scan.
|
|
25
|
+
*/
|
|
26
|
+
export type BlinkIdExtractionModeInput = Partial<Pick<BlinkIdSessionSettings, "scanningMode">> & {
|
|
27
|
+
scanningSettings?: Partial<Pick<ScanningSettings, "documentCaptureModule" | "barcodeModule" | "mrzModule" | "vizModule">> | null;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Derives the UX extraction mode from BlinkID session settings.
|
|
31
|
+
*
|
|
32
|
+
* Barcode-focused modes are intentionally narrow: document-with-barcode requires
|
|
33
|
+
* a mandatory barcode, while MRZ and VIZ keep the UI in the full-document flow
|
|
34
|
+
* because they rely on document-capture guidance and may need front-side
|
|
35
|
+
* document context.
|
|
36
|
+
*
|
|
37
|
+
* @returns The matching extraction mode, or `full-document` when settings are
|
|
38
|
+
* missing or do not match a barcode-focused flow.
|
|
39
|
+
*/
|
|
40
|
+
export declare function getBlinkIdExtractionMode(sessionSettings: BlinkIdExtractionModeInput): BlinkIdExtractionMode;
|
|
41
|
+
//# sourceMappingURL=extractionMode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractionMode.d.ts","sourceRoot":"","sources":["../../src/core/extractionMode.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,0BAA0B,CAAC;AAElC;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,qBAAqB,GAC7B,eAAe,GACf,uBAAuB,GACvB,cAAc,CAAC;AAEnB;;;;;;GAMG;AACH,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAC9C,IAAI,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAC7C,GAAG;IACF,gBAAgB,CAAC,EAAE,OAAO,CACxB,IAAI,CACF,gBAAgB,EAChB,uBAAuB,GAAG,eAAe,GAAG,WAAW,GAAG,WAAW,CACtE,CACF,GAAG,IAAI,CAAC;CACV,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACtC,eAAe,EAAE,0BAA0B,GAC1C,qBAAqB,CA2BvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractionMode.test.d.ts","sourceRoot":"","sources":["../../src/core/extractionMode.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2026 Microblink Ltd. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import type { BlinkIdScanningResult, BlinkIdSessionSettings, ScanningSettings } from "@microblink/blinkid-core";
|
|
4
|
+
import type { BlinkIdScanningResult, BlinkIdSessionSettings, BlinkIdSessionSettingsInput, PartialScanningSettingsInput, ScanningSettings } from "@microblink/blinkid-core";
|
|
5
5
|
import type { CameraManager } from "@microblink/camera-manager";
|
|
6
6
|
import { type CreateFakeCameraManagerOptions, type FakeCameraHarness, type FakeScanningSession } from "@microblink/test-utils";
|
|
7
7
|
import type { BlinkIdUxManager } from "./BlinkIdUxManager";
|
|
@@ -13,13 +13,13 @@ export type BlinkIdUnitSessionMock = FakeScanningSession<ReturnType<typeof creat
|
|
|
13
13
|
scanningSettings: Partial<ScanningSettings>;
|
|
14
14
|
}, unknown>;
|
|
15
15
|
export type CreateBlinkIdIntegrationContextOptions = {
|
|
16
|
-
sessionSettings?:
|
|
16
|
+
sessionSettings?: BlinkIdSessionSettingsInput;
|
|
17
17
|
showDemoOverlay?: boolean;
|
|
18
18
|
showProductionOverlay?: boolean;
|
|
19
19
|
fakeCameraOptions?: CreateFakeCameraManagerOptions;
|
|
20
20
|
sessionOverrides?: Partial<BlinkIdSessionMock>;
|
|
21
21
|
};
|
|
22
|
-
export declare const createBlinkIdUnitSessionMock: (overrideSettings?:
|
|
22
|
+
export declare const createBlinkIdUnitSessionMock: (overrideSettings?: PartialScanningSettingsInput) => BlinkIdUnitSessionMock;
|
|
23
23
|
export declare const createBlinkIdIntegrationContext: (options?: CreateBlinkIdIntegrationContextOptions) => Promise<{
|
|
24
24
|
manager: BlinkIdUxManager;
|
|
25
25
|
fakeCameraManager: BlinkIdCameraHarness["fakeCameraManager"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-helpers.integration.d.ts","sourceRoot":"","sources":["../../src/core/test-helpers.integration.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"test-helpers.integration.d.ts","sourceRoot":"","sources":["../../src/core/test-helpers.integration.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC3B,4BAA4B,EAC5B,gBAAgB,EAEjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAGL,KAAK,8BAA8B,EACnC,KAAK,iBA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|
4
|
+
import { Country, DocumentClassInfo, DocumentType, Region } from "@microblink/blinkid-core";
|
|
5
|
+
export declare const createDocumentClassInfo: ({ type, country, region, countryName, isoNumericCountryCode, isoAlpha2CountryCode, isoAlpha3CountryCode, }: {
|
|
6
|
+
type?: DocumentType | undefined;
|
|
7
|
+
country?: Country | undefined;
|
|
8
|
+
region?: Region | undefined;
|
|
9
|
+
countryName?: string;
|
|
10
|
+
isoNumericCountryCode?: string;
|
|
11
|
+
isoAlpha2CountryCode?: string;
|
|
12
|
+
isoAlpha3CountryCode?: string;
|
|
13
|
+
}) => DocumentClassInfo;
|
|
14
|
+
//# sourceMappingURL=test-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../src/core/test-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,OAAO,EACP,iBAAiB,EACjB,YAAY,EACZ,MAAM,EACP,MAAM,0BAA0B,CAAC;AAElC,eAAO,MAAM,uBAAuB,GAAI,4GAQrC;IACD,IAAI,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,KAAG,iBAUH,CAAC"}
|
|
@@ -37,7 +37,8 @@ export declare function isPassportWithBarcode(docClass: DocumentClassInfo | unde
|
|
|
37
37
|
* @param docClass - The document class info.
|
|
38
38
|
* @returns True if the document is a passport without a barcode on the last page (not USA or India), false otherwise.
|
|
39
39
|
*/
|
|
40
|
-
export declare function isPassportWithoutBarcode(docClass: DocumentClassInfo | undefined): boolean;
|
|
40
|
+
export declare function isPassportWithoutBarcode(docClass: DocumentClassInfo | undefined): boolean;
|
|
41
|
+
/**
|
|
41
42
|
* Utility type for document pagination types.
|
|
42
43
|
*/
|
|
43
44
|
export type DocumentPagination = "passport-no-barcode" | "passport-with-barcode" | "other";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-state-utils.d.ts","sourceRoot":"","sources":["../../src/core/ui-state-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;AAElC;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,oBAAoB,qBAE3E;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,iBAAiB,EAAE,iBAAiB,GACnC,OAAO,CAKT;AAED,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,oBAAoB,uDAEtE;AAED;;;;;GAKG;AAEH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,WAEjE;AACD;;;;;GAKG;AAEH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,WAK5E;AACD;;;;;GAKG;AAEH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,WAOxC
|
|
1
|
+
{"version":3,"file":"ui-state-utils.d.ts","sourceRoot":"","sources":["../../src/core/ui-state-utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;AAElC;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,oBAAoB,qBAE3E;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,iBAAiB,EAAE,iBAAiB,GACnC,OAAO,CAKT;AAED,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,oBAAoB,uDAEtE;AAED;;;;;GAKG;AAEH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,WAEjE;AACD;;;;;GAKG;AAEH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,WAK5E;AACD;;;;;GAKG;AAEH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,WAOxC;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,qBAAqB,GACrB,uBAAuB,GACvB,OAAO,CAAC;AACZ;;;;;GAKG;AAEH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,GACtC,kBAAkB,CAQpB"}
|
package/types/index.d.ts
CHANGED
|
@@ -11,11 +11,12 @@ export type * from "@microblink/feedback-stabilizer";
|
|
|
11
11
|
export type * from "@microblink/ux-common/hapticFeedback";
|
|
12
12
|
export * from "./core/blinkid-ui-state";
|
|
13
13
|
export type { BlinkIdProcessingError } from "./core/BlinkIdProcessingError";
|
|
14
|
-
export type {
|
|
14
|
+
export type { BlinkIdTimeoutConfiguration } from "./core/BlinkIdTimeoutConfiguration";
|
|
15
|
+
export type { BlinkIdFrameProcessCallback, BlinkIdProgress, BlinkIdProgressTimerState, BlinkIdProgressTimerStatus, BlinkIdUxManager, } from "./core/BlinkIdUxManager";
|
|
15
16
|
export * from "./core/createBlinkIdUxManager";
|
|
16
17
|
export type { DocumentClassFilter } from "./core/DocumentClassFilter";
|
|
17
18
|
export * from "./ui/createBlinkIdFeedbackUi";
|
|
18
|
-
export type { LocaleRecord, LocalizationStrings, } from "./ui/LocalizationContext";
|
|
19
|
+
export type { LocaleRecord, LocalizationStrings, PartialLocalizationStrings, } from "./ui/LocalizationContext";
|
|
19
20
|
/**
|
|
20
21
|
* The global interface.
|
|
21
22
|
*
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AAEH,mBAAmB,iCAAiC,CAAC;AACrD,mBAAmB,sCAAsC,CAAC;AAC1D,cAAc,yBAAyB,CAAC;AACxC,YAAY,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AAEH,mBAAmB,iCAAiC,CAAC;AACrD,mBAAmB,sCAAsC,CAAC;AAC1D,cAAc,yBAAyB,CAAC;AACxC,YAAY,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,YAAY,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACtF,YAAY,EACV,2BAA2B,EAC3B,eAAe,EACf,yBAAyB,EACzB,0BAA0B,EAC1B,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,YAAY,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,cAAc,8BAA8B,CAAC;AAC7C,YAAY,EACV,YAAY,EACZ,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,0BAA0B,CAAC;AAElC;;;;GAIG;AACH,QAAA,MAAM,UAAU,eAAW,CAAC;AAE5B;;GAEG;AACH,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,sBAAsB,EAAE,OAAO,UAAU,CAAC;CAC/C"}
|